/* ===================================
   전화·상담 스크립트 플로우 트리 스타일
   정리 버전 - 중복 제거
   =================================== */

/* ===== 기본 레이아웃 ===== */
.main-content {
    min-height: calc(100vh - 140px);
    padding: 20px;
    padding-top: 80px;
    background: #f1f5f9;
    transition: all 0.3s ease;
    max-width: 1200px;
    margin: 0 auto;
}

body {
    background: #f1f5f9;
    min-height: 100vh;
}

.main-actions-row {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin: 24px 0 0 0;
}

/* ===== 페이지 헤더 ===== */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 2.1rem;
    color: #2e7d32;
    margin-bottom: 22px;
    word-break: keep-all;
    letter-spacing: 0.5px;
}

.page-header h1 i {
    margin-right: 10px;
    color: #43a047;
}

.page-description {
    color: #666;
    font-size: 1.08rem;
    word-break: keep-all;
    margin-bottom: 30px;
}

/* ===== 데이터 관리 버튼 ===== */
.data-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 30px;
    justify-content: center;
    align-items: center;
}

.btn-data {
    background: linear-gradient(135deg, #fff, #f5f5f5);
    border: 2px solid #ddd;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.btn-data:hover {
    border-color: #4caf50;
    color: #4caf50;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

.btn-data i {
    font-size: 1rem;
}

.btn-quick-main {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 3px 10px rgba(255, 152, 0, 0.3);
}

.btn-quick-main:hover {
    background: linear-gradient(135deg, #ffa726, #fb8c00);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.4);
}

.btn-dark-mode {
    background: linear-gradient(135deg, #424242, #303030);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #ffd54f;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.btn-dark-mode:hover {
    transform: rotate(20deg) scale(1.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* ===== 통계 대시보드 ===== */
.stats-dashboard {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-width: 140px;
}

.stat-card i {
    font-size: 24px;
    color: #4caf50;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.stat-label {
    font-size: 12px;
    color: #888;
}

/* ===== 3단 레이아웃 ===== */
.flow-container {
    display: grid;
    grid-template-columns: 250px 1fr 280px;
    gap: 20px;
    max-width: 1600px;
    margin: 0 auto;
}

/* ===== 좌측 사이드바 - 카테고리 ===== */
.category-sidebar {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e8e8e8;
    height: fit-content;
    position: sticky;
    top: 90px;
}

.category-sidebar h2 {
    font-size: 1.15rem;
    color: #333;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 3px solid #2196f3;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-sidebar h2 i {
    color: #2196f3;
}

/* 검색창 */
.search-box {
    position: relative;
    margin-bottom: 16px;
}

.search-box i.fa-search {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.search-box input {
    width: 100%;
    padding: 12px 40px 12px 42px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.2s;
    box-sizing: border-box;
}

.search-box input:focus {
    border-color: #2196f3;
    outline: none;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.btn-clear-search {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #eee;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    color: #666;
    font-size: 0.8rem;
}

.btn-clear-search:hover {
    background: #ddd;
}

/* 검색 결과 */
.search-results {
    margin-bottom: 15px;
    max-height: 200px;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #fff8e1;
    border-radius: 8px;
    margin-bottom: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.search-result-item:hover {
    background: #ffecb3;
    transform: translateX(3px);
}

.search-result-item .cat-name {
    font-size: 11px;
    color: #888;
}

.search-result-item .node-name {
    font-weight: 600;
    color: #333;
}

/* 즐겨찾기 섹션 */
.favorites-section {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px dashed #e0e0e0;
}

.favorites-section h3 {
    font-size: 14px;
    color: #ff9800;
    margin-bottom: 10px;
}

.favorites-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.favorite-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #fff8e1;
    border-radius: 6px;
    margin-bottom: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.favorite-item:hover {
    background: #ffecb3;
}

.favorite-item .fa-star {
    color: #ff9800;
}

.btn-remove-favorite {
    margin-left: auto;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.favorite-item:hover .btn-remove-favorite {
    opacity: 1;
}

.btn-remove-favorite:hover {
    color: #f44336;
}

/* 카테고리 리스트 */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 8px;
    background: #fff;
    border: 2px solid transparent;
    position: relative;
}

.category-item i {
    font-size: 1.2rem;
    width: 28px;
    text-align: center;
    color: #666;
}

.category-item span {
    flex: 1;
    font-weight: 500;
    color: #444;
}

.category-item:hover {
    background: #f5f5f5;
    border-color: #e0e0e0;
}

.category-item.active {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-color: #2196f3;
}

.category-item.active i {
    color: #1976d2;
}

.category-item.active span {
    color: #1565c0;
    font-weight: 600;
}

.btn-delete-cat {
    opacity: 0;
    background: #ffebee;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    color: #f44336;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
}

.category-item:hover .btn-delete-cat {
    opacity: 1;
}

.btn-delete-cat:hover {
    background: #ffcdd2;
}

/* 카테고리 추가 버튼 */
.btn-add-category {
    width: 100%;
    background: #fff;
    border: 2px dashed #2196f3;
    border-radius: 10px;
    padding: 12px;
    color: #2196f3;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-add-category:hover {
    background: #e3f2fd;
    border-style: solid;
}

/* 사이드바 안내문 */
.sidebar-info {
    margin-top: 16px;
    padding: 14px;
    background: #fff8e1;
    border-radius: 10px;
    border-left: 4px solid #ffc107;
}

.sidebar-info p {
    margin: 0;
    font-size: 0.85rem;
    color: #795548;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.sidebar-info i {
    color: #ff9800;
    margin-top: 2px;
}

/* ===== 중앙 메인 영역 - 스크립트 ===== */
.script-main {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* 진행 상태 바 */
.progress-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.progress-track {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #43a047, #66bb6a);
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 10%;
}

.progress-text {
    font-size: 0.9rem;
    color: #2e7d32;
    font-weight: 600;
    white-space: nowrap;
}

/* 스크립트 액션 버튼 */
.script-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    justify-content: flex-end;
}

.btn-action {
    padding: 8px 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-action:hover {
    border-color: #4caf50;
    color: #4caf50;
}

.btn-action.btn-favorite.is-favorite {
    background: #fff8e1;
    border-color: #ff9800;
    color: #ff9800;
}

.btn-action.btn-favorite.is-favorite i {
    font-weight: 900;
}

/* 스크립트 박스 */
.script-box {
    min-height: 350px;
    max-height: 450px;
    overflow-y: auto;
    padding: 20px;
    background: rgba(250, 250, 250, 0.9);
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    margin-bottom: 25px;
}

/* 말풍선 스타일 */
.bubble {
    max-width: 85%;
    padding: 18px 24px;
    border-radius: 18px;
    margin-bottom: 18px;
    position: relative;
    font-size: 1.08rem;
    line-height: 1.7;
    box-sizing: border-box;
    animation: bubbleIn 0.4s ease;
}

@keyframes bubbleIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bubble.customer {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    margin-right: auto;
    border-bottom-left-radius: 7px;
    border: 1.5px solid #ffcc80;
}

.bubble.customer::before {
    content: '👤 고객';
    position: absolute;
    top: -26px;
    left: 12px;
    font-size: 0.92rem;
    color: #e65100;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.bubble.agent {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    margin-left: auto;
    border-bottom-right-radius: 7px;
    border: 1.5px solid #90caf9;
}

.bubble.agent::before {
    content: '💼 상담원';
    position: absolute;
    top: -26px;
    right: 12px;
    font-size: 0.92rem;
    color: #1565c0;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.bubble.system {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    margin: 0 auto 18px;
    text-align: center;
    border: 1.5px solid #ce93d8;
    font-size: 1rem;
}

.bubble.system::before {
    content: '📋 안내';
    position: absolute;
    top: -26px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.92rem;
    color: #7b1fa2;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.bubble p {
    margin: 0;
    line-height: 1.7;
    color: #222;
    font-size: inherit;
}

/* ===== 선택지 버튼 ===== */
.choice-section h3 {
    font-size: 1.08rem;
    color: #555;
    margin-bottom: 15px;
    text-align: center;
    letter-spacing: 0.5px;
}

.choice-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin: 20px 0;
}

.choice-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px 20px;
    min-width: 160px;
    max-width: 220px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    animation: fadeInUp 0.4s ease forwards;
    opacity: 1;
}

@keyframes fadeInUp {
    from {
    opacity: 0;
        transform: translateY(20px);
}
    to {
    opacity: 1;
        transform: translateY(0);
    }
}

.choice-card:hover {
    border-color: #4caf50;
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.2);
}

.choice-card.end {
    border-color: #ff9800;
    background: #fff8e1;
}

.choice-card.end:hover {
    border-color: #f57c00;
    box-shadow: 0 6px 16px rgba(255, 152, 0, 0.2);
}

.choice-card .choice-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.choice-card .choice-label {
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
    font-size: 1.08rem;
    letter-spacing: 0.5px;
}

.choice-card .choice-desc {
    font-size: 0.97rem;
    color: #777;
}

/* ===== 우측 사이드바 - 상담 TIP ===== */
.help-sidebar {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e8e8e8;
    height: fit-content;
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.help-sidebar h2 {
    font-size: 1.15rem;
    color: #333;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 3px solid #4caf50;
    display: flex;
    align-items: center;
    gap: 10px;
    position: sticky;
    top: -24px;
    background: rgba(255, 255, 255, 0.95);
    padding-top: 4px;
    z-index: 10;
}

.help-sidebar h2 i {
    color: #ffc107;
    font-size: 1.3rem;
}

/* 팁 박스 */
.tip-box {
    background: rgba(232, 245, 233, 0.8);
    border-left: 4px solid #4caf50;
    border-radius: 0 12px 12px 0;
    padding: 14px 16px;
    margin-bottom: 20px;
}

.tip-box p {
    margin: 0;
    color: #2e7d32;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* 자주 쓰는 표현 */
.quick-phrases {
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.quick-phrases h3 {
    font-size: 0.95rem;
    color: #555;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.quick-phrases h3 i {
    color: #2196f3;
}

.phrase-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.phrase-list li {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 12px 10px 30px;
    margin-bottom: 6px;
    font-size: 0.88rem;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    line-height: 1.5;
}

.phrase-list li::before {
    content: '"';
    position: absolute;
    left: 12px;
    top: 10px;
    font-size: 1.4rem;
    color: #4caf50;
    font-weight: bold;
}

.phrase-list li:hover {
    background: #e8f5e9;
    border-color: #4caf50;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.15);
}

.phrase-list li:active {
    transform: translateX(2px);
    background: #c8e6c9;
}

/* 진행 경로 */
.history-section {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e0e0e0;
    margin-top: 8px;
}

.history-section h3 {
    font-size: 0.95rem;
    color: #555;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.history-section h3 i {
    color: #9c27b0;
}

.history-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 180px;
    overflow-y: auto;
}

.history-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-left: 3px solid #e0e0e0;
    margin-left: 10px;
    font-size: 0.9rem;
    color: #666;
    position: relative;
    transition: all 0.2s;
}

.history-list li:last-child {
    border-left-color: #4caf50;
    color: #2e7d32;
    font-weight: 600;
}

.history-list li .step-num {
    background: #e0e0e0;
    color: #666;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.history-list li:last-child .step-num {
    background: #4caf50;
    color: #fff;
}

/* ===== 모달 공통 스타일 ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

.modal-overlay.active {
    display: flex;
}

.modal-container {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    color: #fff;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    background: #f8f9fa;
    padding: 16px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid #e9ecef;
}

/* ===== 폼 그룹 ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #4caf50;
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-group small {
    display: block;
    color: #888;
    font-size: 0.85rem;
    margin-top: 6px;
}

/* ===== 버튼 스타일 ===== */
.btn-primary {
    background: linear-gradient(135deg, #4caf50, #388e3c);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #43a047, #2e7d32);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-secondary {
    background: #f5f5f5;
    color: #555;
    border: 2px solid #ddd;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #eee;
    border-color: #ccc;
}

/* ===== 마법사 레이아웃 ===== */
.wizard-modal {
    max-width: 1000px;
}

.wizard-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    min-height: 500px;
}

.wizard-sidebar {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
}

.wizard-sidebar h3 {
    font-size: 1rem;
    color: #333;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

.wizard-categories {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.category-btn {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-btn:hover {
    border-color: #4caf50;
    background: #f1f8e9;
}

.category-btn.active {
    border-color: #4caf50;
    background: #e8f5e9;
    font-weight: 600;
}

.category-btn .cat-icon {
    font-size: 1.1rem;
}

.wizard-situations {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.situation-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.situation-item:hover {
    background: #f5f5f5;
    border-color: #bbb;
}

.situation-item.active {
    background: #e3f2fd;
    border-color: #2196f3;
}

.situation-item.is-end {
    background: #fff3e0;
    border-color: #ff9800;
}

.situation-item .sit-icon {
    font-size: 1rem;
}

.situation-item .sit-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-add-simple {
    width: 100%;
    background: #fff;
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 10px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.9rem;
}

.btn-add-simple:hover {
    border-color: #4caf50;
    color: #4caf50;
    background: #f1f8e9;
}

/* 마법사 콘텐츠 영역 */
.wizard-content {
    padding: 0;
}

.wizard-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    text-align: center;
}

.wizard-placeholder i {
    font-size: 3rem;
    margin-bottom: 16px;
    color: #ddd;
}

.wizard-placeholder p {
    font-size: 1.1rem;
    line-height: 1.6;
}

/* 마법사 카드 */
.wizard-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
}

.wizard-card .card-header {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.wizard-card .card-header.blue { background: linear-gradient(135deg, #e3f2fd, #bbdefb); }
.wizard-card .card-header.green { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); }
.wizard-card .card-header.orange { background: linear-gradient(135deg, #fff3e0, #ffe0b2); }
.wizard-card .card-header.purple { background: linear-gradient(135deg, #f3e5f5, #e1bee7); }
.wizard-card .card-header.red { background: linear-gradient(135deg, #ffebee, #ffcdd2); }

.wizard-card .card-number {
    background: rgba(0,0,0,0.1);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.wizard-card .card-body {
    padding: 16px;
}

.wizard-textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    resize: vertical;
    box-sizing: border-box;
}

.wizard-textarea:focus {
    border-color: #4caf50;
    outline: none;
}

/* 다음 상황 목록 */
.next-situations-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.next-situation-item {
    display: grid;
    grid-template-columns: 50px 1fr 150px 1fr 40px;
    gap: 8px;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.next-situation-item input,
.next-situation-item select {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

.btn-add-next {
    background: #e8f5e9;
    border: 2px dashed #4caf50;
    color: #4caf50;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.btn-add-next:hover {
    background: #c8e6c9;
}

.btn-remove-next {
    background: #ffebee;
    border: none;
    color: #f44336;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-remove-next:hover {
    background: #ffcdd2;
}

/* 종료 옵션 */
.end-option {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}

.checkbox-big {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 1rem;
}

.checkbox-big input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* ===== 빠른 입력 모달 ===== */
.quick-input-section h3 {
    font-size: 1.1rem;
    color: #333;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.easy-input-card {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
}

.easy-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.easy-row label {
    min-width: 100px;
    font-weight: 500;
    color: #555;
    font-size: 0.95rem;
}

.easy-row input[type="text"] {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
}

.easy-row input[type="text"]:focus {
    border-color: #4caf50;
    outline: none;
}

.easy-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95rem;
}

.easy-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

/* 고급 입력 */
.advanced-input {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
}

.advanced-input summary {
    cursor: pointer;
    font-weight: 500;
    color: #666;
    padding: 8px;
}

.advanced-input summary:hover {
    color: #4caf50;
}

.quick-textarea {
    width: 100%;
    min-height: 150px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.9rem;
    margin-top: 12px;
    box-sizing: border-box;
}

/* 미리보기 섹션 */
.preview-section h3 {
    font-size: 1rem;
    color: #333;
    margin: 0 0 12px 0;
}

.preview-list {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    min-height: 100px;
    max-height: 200px;
    overflow-y: auto;
}

.preview-empty {
    color: #999;
    text-align: center;
    padding: 20px;
}

.preview-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
}

.preview-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.preview-item-title {
    font-weight: 600;
    color: #333;
}

.preview-delete-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px;
}

.preview-delete-btn:hover {
    color: #f44336;
}

.preview-msg {
    font-size: 0.9rem;
    padding: 4px 0;
}

.preview-msg.agent { color: #1976d2; }
.preview-msg.customer { color: #e65100; }

.preview-tip {
    font-size: 0.85rem;
    color: #666;
    margin-top: 8px;
}

.preview-next {
    font-size: 0.85rem;
    color: #4caf50;
    margin-top: 4px;
}

.preview-end {
    font-size: 0.85rem;
    color: #ff9800;
    margin-top: 4px;
}

/* ===== FAQ 섹션 ===== */
.faq-section {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
    padding: 40px 32px;
    margin: 40px auto 0 auto;
    max-width: 900px;
}

.faq-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
    text-align: center;
}

.faq-title i {
    color: #2563eb;
    font-size: 1.5rem;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.faq-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 24px;
    transition: all 0.3s ease;
    width: 100%;
}

.faq-item.active,
.faq-item:hover {
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
    background: #f8fafc;
}

.faq-question {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    line-height: 1.6;
    width: 100%;
}

.faq-question span:not(.faq-icon) {
    flex: 1;
    word-break: keep-all;
}

.faq-icon {
    background: #2563eb;
    color: #fff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.faq-arrow {
    margin-left: auto;
    color: #64748b;
    font-size: 0.9rem;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item.active .faq-arrow {
    transform: rotate(180deg);
    color: #2563eb;
}

.faq-item .faq-answer {
    display: none;
    margin-top: 16px;
    padding-top: 16px;
    padding-left: 0;
    border-top: 1px solid #e2e8f0;
    color: #475569;
    font-size: 1rem;
    line-height: 1.8;
    width: 100%;
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-answer p {
    margin: 0;
    margin-bottom: 8px;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-answer strong {
    color: #1e293b;
    font-weight: 600;
}

/* ===== 다크모드 ===== */
body.dark-mode {
    background: #1e293b;
}

body.dark-mode .main-content {
    background: #1e293b;
}

body.dark-mode .page-header h1 {
    color: #81c784;
}

body.dark-mode .page-description {
    color: #aaa;
}

body.dark-mode .category-sidebar,
body.dark-mode .help-sidebar,
body.dark-mode .script-main {
    background: linear-gradient(180deg, #1e1e1e, #252525);
    border-color: #333;
    color: #e0e0e0;
}

body.dark-mode .category-sidebar h2,
body.dark-mode .help-sidebar h2 {
    color: #eee;
}

body.dark-mode .category-item {
    background: #2d2d2d;
}

body.dark-mode .category-item span {
    color: #ccc;
}

body.dark-mode .category-item:hover {
    background: #3d5a3d;
}

body.dark-mode .category-item.active {
    background: linear-gradient(135deg, #1a3a5c, #1e4976);
    border-color: #2196f3;
}

body.dark-mode .script-box {
    background: #252538;
    border-color: #3d3d5c;
}

body.dark-mode .bubble.agent {
    background: #2e5a2e;
    color: #e0e0e0;
}

body.dark-mode .bubble.customer {
    background: #3d3d5c;
    color: #e0e0e0;
}

body.dark-mode .choice-card {
    background: #2d2d2d;
    border-color: #444;
    color: #eee;
}

body.dark-mode .choice-card:hover {
    border-color: #66bb6a;
}

body.dark-mode .choice-card.end {
    background: #3d3520;
    border-color: #ff9800;
}

body.dark-mode .tip-box {
    background: linear-gradient(135deg, #1b3d1f, #2e4a2e);
}

body.dark-mode .tip-box p {
    color: #a5d6a7;
}

body.dark-mode .stats-dashboard .stat-card {
    background: #2d2d44;
    color: #e0e0e0;
}

body.dark-mode .search-box input {
    background: #2d2d2d;
    border-color: #444;
    color: #eee;
}

body.dark-mode .phrase-list li {
    background: #2d2d2d;
    border-color: #444;
    color: #ccc;
}

body.dark-mode .phrase-list li:hover {
    background: #1b3d1f;
    border-color: #4caf50;
}

body.dark-mode .history-section {
    background: #2d2d2d;
    border-color: #444;
}

body.dark-mode .history-list li {
    color: #aaa;
}

body.dark-mode .sidebar-info {
    background: #3d3520;
}

body.dark-mode .sidebar-info p {
    color: #ddd;
}

body.dark-mode .btn-data {
    background: linear-gradient(135deg, #2d2d2d, #333);
    border-color: #444;
    color: #ccc;
}

body.dark-mode .btn-data:hover {
    border-color: #66bb6a;
    color: #66bb6a;
}

body.dark-mode .btn-dark-mode {
    background: linear-gradient(135deg, #ffd54f, #ffb300);
    color: #333;
}

body.dark-mode .modal-container {
    background: #1e1e1e;
    color: #eee;
}

body.dark-mode .modal-body {
    background: #1e1e1e;
}

body.dark-mode .modal-footer {
    background: #2d2d2d;
    border-color: #444;
}

body.dark-mode .wizard-sidebar {
    background: #2d2d2d;
}

body.dark-mode .wizard-card {
    background: #2d2d2d;
    border-color: #444;
}

body.dark-mode .form-group input,
body.dark-mode .form-group select,
body.dark-mode .form-group textarea,
body.dark-mode .wizard-textarea,
body.dark-mode .easy-row input {
    background: #333;
    border-color: #555;
    color: #eee;
}

body.dark-mode .category-btn,
body.dark-mode .situation-item {
    background: #333;
    border-color: #555;
    color: #eee;
}

body.dark-mode .easy-input-card,
body.dark-mode .preview-list {
    background: #2d2d2d;
    border-color: #444;
}

body.dark-mode .btn-secondary {
    background: #444;
    border-color: #555;
    color: #eee;
}

body.dark-mode .faq-section {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .faq-title {
    color: #f1f5f9;
    border-bottom-color: #334155;
}

body.dark-mode .faq-title i {
    color: #60a5fa;
}

body.dark-mode .faq-item {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .faq-item.active,
body.dark-mode .faq-item:hover {
    background: #334155;
    border-color: #60a5fa;
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.2);
}

body.dark-mode .faq-question {
    color: #f1f5f9;
}

body.dark-mode .faq-icon {
    background: #60a5fa;
}

body.dark-mode .faq-arrow {
    color: #94a3b8;
}

body.dark-mode .faq-item.active .faq-arrow {
    color: #60a5fa;
}

body.dark-mode .faq-item .faq-answer {
    border-top-color: #334155;
    color: #cbd5e1;
}

body.dark-mode .faq-answer strong {
    color: #f1f5f9;
}

/* ===== 반응형 ===== */
@media (max-width: 1200px) {
    .flow-container {
        grid-template-columns: 220px 1fr 240px;
}
}

@media (max-width: 992px) {
    .flow-container {
        grid-template-columns: 1fr;
}

    .category-sidebar,
    .help-sidebar {
        position: static;
    }
    
    .wizard-layout {
        grid-template-columns: 1fr;
}
}

@media (max-width: 768px) {
.page-header h1 {
        font-size: 1.5rem;
    }
    
    .data-controls {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
    
    .btn-data,
    .btn-quick-main {
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    .stats-dashboard {
        flex-direction: column;
        align-items: center;
}

    .choice-buttons {
        flex-direction: column;
        align-items: center;
}

    .choice-card {
        min-width: auto;
        max-width: 100%;
        width: 100%;
    }
    
    .faq-section {
        padding: 24px 20px;
        margin: 24px 16px 0;
    }
    
    .faq-title {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }
    
    .faq-item {
        padding: 16px 18px;
    }
    
    .faq-question {
        font-size: 1rem;
        gap: 10px;
    }
    
    .faq-icon {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    
    .faq-item .faq-answer {
        padding-left: 0;
        font-size: 0.95rem;
    }
    
    .faq-title {
        font-size: 1.2rem;
        flex-direction: column;
        gap: 8px;
    }
}
