@import url('/static/badge.css?v=4');
/* app.css v30 — 라이트 모드 대비 수정: accent 변수 다크블루, text-muted 강화, 보드카드/잠금탭 오버라이드 */

        /* date-badge 전역 표준 — badge.css @import 캐시 대비 명시적 재정의 */
        .date-badge {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            font-size: 0.6rem;
            font-weight: 600;
            color: var(--text-secondary, #cbd5e1);
            background: var(--badge-bg, rgba(30, 41, 59, 0.8));
            border: 1px solid var(--badge-border, #475569);
            border-radius: 6px;
            padding: 3px 9px;
            white-space: nowrap;
            flex-shrink: 0;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        /* ── 다크 모드 CSS 변수 (기본값) ── */
        :root {
            /* 배경 */
            --bg:              #000000;
            --surface:         rgba(255,255,255,0.04);
            --surface-border:  rgba(255,255,255,0.08);
            --surface-2:       rgba(255,255,255,0.03);
            --surface-2-hover: rgba(255,255,255,0.07);

            /* 텍스트 */
            --text-primary:   #f8fafc;
            --text-secondary: #cbd5e1;
            --text-muted:     #94a3b8;
            --accent:         #fde68a;

            /* 검색 헤더 */
            --search-header-bg:      rgba(11,23,41,0.97);
            --search-header-shadow:  0 4px 12px rgba(0,0,0,0.4);
            --search-header-border:  rgba(255,255,255,0.06);
            --search-type-bg:        rgba(255,255,255,0.06);
            --search-input-bg:       rgba(255,255,255,0.06);
            --search-input-border:   rgba(255,255,255,0.12);
            --search-input-color:    #f1f5f9;
            --search-results-bg:     #1a2a45;
            --search-results-border: rgba(255,255,255,0.1);
            --search-item-border:    rgba(255,255,255,0.06);
            --search-item-color:     #cbd5e1;
            --search-item-hover:     rgba(255,255,255,0.07);
            --filter-sel-bg:         rgba(255,255,255,0.06);
            --filter-sel-border:     rgba(255,255,255,0.12);
            --filter-sel-color:      #cbd5e1;

            /* 탭 */
            --tab-border-bottom:  rgba(255,255,255,0.1);
            --tab-bg:             rgba(255,255,255,0.04);
            --tab-border:         rgba(255,255,255,0.08);
            --tab-color:          #94a3b8;
            --tab-hover-bg:       rgba(255,255,255,0.08);
            --tab-active-bg:      rgba(255,255,255,0.08);
            --tab-active-border:  rgba(255,255,255,0.25);
            --tab-active-top:     #ffffff;
            --tab-active-color:   #ffffff;

            /* 테이블 */
            --tbl-th-bg:      rgba(0,198,162,0.15);
            --tbl-th-color:   #5eead4;
            --tbl-td-border:  rgba(255,255,255,0.05);
            --tbl-td-color:   #cbd5e1;
            --tbl-even-bg:    rgba(255,255,255,0.03);
            --tbl-hover-bg:   rgba(255,255,255,0.05);
            --dtbl-th-color:  #94a3b8;
            --dtbl-th-border: rgba(255,255,255,0.08);

            /* 기타 */
            --divider:               rgba(255,255,255,0.06);
            --modal-bg:              #1a2a45;
            --modal-border:          rgba(255,255,255,0.1);
            --bottom-nav-bg:         rgba(11,23,41,0.95);
            --bottom-nav-border:     rgba(255,255,255,0.06);
            --importer-card-bg:      rgba(0,198,162,0.06);
            --importer-card-border:  rgba(0,198,162,0.2);
            --coord-bg:              rgba(255,255,255,0.04);
            --coord-border:          rgba(255,255,255,0.08);
            --country-filter-bg:     rgba(255,255,255,0.04);
            --country-filter-border: rgba(255,255,255,0.08);
            --country-sel-bg:        rgba(255,255,255,0.06);
            --country-sel-border:    rgba(255,255,255,0.12);
            --country-sel-color:     #cbd5e1;

            /* 배지 */
            --badge-bg:      rgba(30,41,59,0.8);
            --badge-border:  #475569;

            /* 하위 호환 변수 */
            --bg-color:      #000000;
            --surface-color: #0b1729;
            --text-main:     #f8fafc;
            --border-color:  rgba(255,255,255,0.12);
            --primary-color: #fde68a;
            --shadow-md:     0 4px 6px -1px rgba(0,0,0,0.3);
            --shadow-float:  0 10px 15px -3px rgba(0,0,0,0.4);
            --radius-lg:     16px;
            --radius-xl:     20px;
        }

        /* ── 라이트 모드 CSS 변수 오버라이드 ── */
        body.light {
            /* 배경 */
            --bg:              #f1f5f9;
            --surface:         #ffffff;
            --surface-border:  #e2e8f0;
            --surface-2:       #f8fafc;
            --surface-2-hover: #f3f4f6;

            /* 텍스트 */
            --text-primary:   #111827;
            --text-secondary: #374151;
            --text-muted:     #4b5563;
            --accent:         #1d4ed8;

            /* 검색 헤더 */
            --search-header-bg:      rgba(248,250,252,0.97);
            --search-header-shadow:  0 4px 12px rgba(0,0,0,0.1);
            --search-header-border:  #e5e7eb;
            --search-type-bg:        #f1f5f9;
            --search-input-bg:       #ffffff;
            --search-input-border:   #e2e8f0;
            --search-input-color:    #111827;
            --search-results-bg:     #ffffff;
            --search-results-border: #e2e8f0;
            --search-item-border:    #e5e7eb;
            --search-item-color:     #374151;
            --search-item-hover:     #f3f4f6;
            --filter-sel-bg:         #ffffff;
            --filter-sel-border:     #e2e8f0;
            --filter-sel-color:      #374151;

            /* 탭 */
            --tab-border-bottom:  #cbd5e1;
            --tab-bg:             #f1f5f9;
            --tab-border:         #e2e8f0;
            --tab-color:          #6b7280;
            --tab-hover-bg:       #e2e8f0;
            --tab-active-bg:      #ffffff;
            --tab-active-border:  #cbd5e1;
            --tab-active-top:     #3b82f6;
            --tab-active-color:   #1e3a8a;

            /* 테이블 */
            --tbl-th-bg:      #1e3a8a;
            --tbl-th-color:   #ffffff;
            --tbl-td-border:  #e2e8f0;
            --tbl-td-color:   #374151;
            --tbl-even-bg:    #f8fafc;
            --tbl-hover-bg:   #f1f5f9;
            --dtbl-th-color:  #6b7280;
            --dtbl-th-border: #e2e8f0;

            /* 기타 */
            --divider:               #e5e7eb;
            --modal-bg:              #ffffff;
            --modal-border:          #e2e8f0;
            --bottom-nav-bg:         rgba(248,250,252,0.95);
            --bottom-nav-border:     #e5e7eb;
            --importer-card-bg:      rgba(59,130,246,0.06);
            --importer-card-border:  rgba(59,130,246,0.2);
            --coord-bg:              #f8fafc;
            --coord-border:          #e2e8f0;
            --country-filter-bg:     #f8fafc;
            --country-filter-border: #e2e8f0;
            --country-sel-bg:        #ffffff;
            --country-sel-border:    #e2e8f0;
            --country-sel-color:     #374151;

            /* 배지 */
            --badge-bg:      #e5e7eb;
            --badge-border:  #9ca3af;

            /* 하위 호환 변수 */
            --bg-color:      #f1f5f9;
            --surface-color: #ffffff;
            --text-main:     #111827;
            --border-color:  #e2e8f0;
            --primary-color: #1d4ed8;
            --shadow-md:     0 4px 6px -1px rgba(0,0,0,0.1);
            --shadow-float:  0 10px 15px -3px rgba(0,0,0,0.1);
        }

        /* ── 라이트 모드 선택자 오버라이드 (CSS 변수로 해결 안 되는 semantic 색상) ── */
        /* solid 배경 사용: rgba 배경은 스캐너가 alpha 무시해 false-positive 발생 */
        body.light .prod-change-up   { background: #fef2f2 !important; color: #dc2626 !important; }
        body.light .prod-change-down { background: #eff6ff !important; color: #2563eb !important; }
        body.light .prod-country-table .prod-chg-up   { color: #dc2626; }
        body.light .prod-country-table .prod-chg-down { color: #2563eb; }
        body.light .prod-insight-list li span.highlight { color: #dc2626; }
        body.light .period-badge {
            color: #0d9488; background: #f0fdfa;
            border-color: rgba(13,148,136,0.25);
        }
        /* 큰 가격 텍스트 (#fde68a 하드코딩 → 라이트에서 다크 블루) */
        body.light .prod-price { color: #1e3a8a !important; }
        /* 나중에 하기 버튼 인라인 색상 재정의 */
        body.light .modal-btn.btn-cancel { color: var(--text-secondary) !important; }
        /* 잠금 탭 오버레이: solid 파란 배경 + 다크 블루 텍스트 */
        body.light .tab-lock-overlay {
            color: #1d4ed8 !important;
            background: #eff6ff !important;
            border-color: #bfdbfe !important;
        }
        /* 활성 검색 타입 버튼: solid 배경으로 false-positive 방지 */
        body.light .search-type-btn.active {
            background: #eff6ff !important;
            color: #1d4ed8 !important;
            border-bottom: 2px solid #1d4ed8 !important;
        }
        /* 하단 내비 active: yellow → 다크 블루 */
        body.light .bottom-nav-item.active { color: #1d4ed8 !important; }
        body.light .bottom-nav-item.active svg { stroke: #1d4ed8 !important; }
        /* 샘플 배너 / CTA 텍스트: 라이트 모드 색상 */
        body.light .sample-banner { color: #1d4ed8; border-bottom-color: rgba(29,78,216,0.2); background: #eff6ff; }
        body.light .sample-cta-btn { background: #1d4ed8; color: #ffffff; }
        /* 범용: #94a3b8 인라인 색상을 라이트 모드에서 가독성 있는 색상으로 */
        body.light [style*="color:#94a3b8"] { color: var(--text-secondary, #374151) !important; }
        body.light [style*="color: #94a3b8"] { color: var(--text-secondary, #374151) !important; }
        /* upgradeModal / quoteModal 등 다크 배경 고정 모달 — light 모드에서도 색상 보존 */
        body.light #upgradeModal { color: #ffffff; }
        body.light #upgradeModal [style*="color:#94a3b8"],
        body.light #upgradeModal [style*="color: #94a3b8"] { color: #94a3b8 !important; }
        /* Board view — 라이트 모드 */
        body.light #viewBoard { background: var(--bg, #f1f5f9) !important; }
        body.light #viewBoard > div:first-child { background: var(--bg, #f1f5f9) !important; border-bottom-color: #e2e8f0 !important; }
        body.light #viewBoard [style*="color:#ffffff"] { color: var(--text-primary, #111827) !important; }
        /* MY view — 라이트 모드 */
        body.light #viewMy { background: var(--bg, #f1f5f9) !important; }
        body.light #viewMy > div:first-child { border-bottom-color: #e2e8f0 !important; }
        body.light #viewMy [style*="color:#f1f5f9"], body.light #viewMy [style*="color: #f1f5f9"] { color: var(--text-primary, #111827) !important; }
        body.light #viewMy [style*="color:#f8fafc"], body.light #viewMy [style*="color: #f8fafc"] { color: var(--text-primary, #111827) !important; }
        body.light #viewMy [style*="color:#cbd5e1"], body.light #viewMy [style*="color: #cbd5e1"] { color: var(--text-secondary, #374151) !important; }
        body.light #viewMy button[style*="background:rgba(255,255,255,0.04)"] { background: #f8fafc !important; border-color: #e2e8f0 !important; }
        body.light #viewMy div[style*="background:rgba(255,255,255,0.02)"],
        body.light #viewMy div[style*="background:rgba(255,255,255,0.04)"] { background: #ffffff !important; border-color: #e2e8f0 !important; }
        body.light #viewMy div[style*="background:rgba(0,198,162,0.06)"] { background: rgba(13,148,136,0.08) !important; border-color: rgba(13,148,136,0.25) !important; }
        body.light #themeToggleBtn { background: #f0fdfa !important; border-color: rgba(13,148,136,0.3) !important; color: #0d9488 !important; }
        body.light .wl-tab-btn { background: #f1f5f9; border: 1px solid #e2e8f0; color: #374151; }
        body.light .wl-tab-btn.active { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
        /* 즐겨찾기(viewDashboard) — 라이트 모드: 노란색 → 표준 파란색 */
        body.light #viewDashboard [style*="color:#fde68a"],
        body.light #viewDashboard [style*="color: #fde68a"] { color: #1d4ed8 !important; }

        body {
            font-family: 'Nanum Gothic', sans-serif;
            background-color: var(--bg-color);
            color: var(--text-main);
            font-weight: 500;
            -webkit-font-smoothing: antialiased;
            -webkit-text-stroke: 0.2px currentColor;
        }

        .phone-container {
            width: 100%;
            max-width: 480px;
            margin: 0 auto;
            min-height: 100vh;
            background: var(--bg-color);
            position: relative;
            padding-top: 60px;
            padding-bottom: 100px;
            /* 고질적인 모바일 스크롤 하단 잘림 해결 */
            overflow-x: hidden;
            display: block;
            /* Flexbox의 높이 계산 오류 방지 */
        }

        /* ── 검색바 ── */
        .search-area {
            padding: 12px 16px;
            border-bottom: 1px solid rgba(229, 231, 235, 0.5);
        }

        .search-input-wrap {
            position: relative;
        }

        .search-input {
            width: 100%;
            padding: 12px 16px;
            background: var(--bg-color);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            font-size: 0.95rem;
            outline: none;
            transition: all 0.2s;
        }

        .search-input:focus {
            border-color: var(--primary-color);
        }

        .search-results {
            position: absolute;
            top: calc(100% + 4px);
            left: 0;
            right: 0;
            background: white;
            border-radius: 12px;
            box-shadow: var(--shadow-float);
            max-height: 250px;
            overflow-y: auto;
            z-index: 100;
            display: none;
        }

        .search-results.active {
            display: block;
        }

        .search-item {
            padding: 12px 16px;
            border-bottom: 1px solid var(--border-color);
            cursor: pointer;
            font-size: 0.9rem;
        }

        .search-item:last-child {
            border-bottom: none;
        }

        .search-item:active {
            background: #f9fafb;
        }

        /* ── 화면 전환 로직 ── */
        .view-panel {
            padding: 16px;
            display: none;
            width: 100%;
            flex-direction: column;
            gap: 16px;
            animation: fadeIn 0.3s ease;
        }

        .view-panel.active {
            display: flex;
            height: auto;
            /* 고정 높이 제약 해제 */
        }

        .source-footer {
            font-size: 8px;
            color: #c8c8c8;
            text-align: left;
            padding: 6px 0 2px;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* TOP 5 리스트 전용 툴팁 (모바일/PC 공용) */
        .top-list-item {
            position: relative;
            margin-bottom: 10px;
            cursor: pointer;
        }

        .top-list-item:active::after,
        .top-list-item:hover::after {
            content: attr(data-tooltip);
            position: absolute;
            top: -26px;
            right: 0;
            background: rgba(30, 58, 138, 0.95);
            color: #fff;
            padding: 5px 10px;
            border-radius: 6px;
            font-size: 10px;
            font-weight: 500;
            white-space: nowrap;
            z-index: 1000;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
            pointer-events: none;
        }

        /* ── 타이틀 계층 ── */
        .section-title {
            font-size: 1.25rem;
            font-weight: 700;
            margin-bottom: 4px;
        }

        .section-subtitle {
            font-size: 0.8rem;
            color: var(--text-muted);
            background: #e2e8f0;
            padding: 2px 8px;
            border-radius: 4px;
            display: inline-block;
        }

        .flex-between {
            display: flex;
            justify-content: space-between;
            align-items: flex-end;
        }

        /* ── 클릭 가능한 항목 스타일 ── */
        .list-group-item {
            cursor: pointer;
            padding: 12px 16px;
            background: #fff;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            justify-content: space-between;
            align-items: center;
            transition: all 0.2s;
        }

        .list-group-item:hover {
            background-color: #f8fafc;
            transform: translateX(4px);
        }

        .search-item {
            cursor: pointer;
            transition: background 0.2s;
        }

        .search-item:hover {
            background-color: #f3f4f6;
        }

        /* ── 공통 카드 스타일 ── */
        .card {
            background: var(--surface-color);
            border-radius: var(--radius-lg);
            padding: 16px;
            box-shadow: var(--shadow-md);
        }

        .card-header {
            font-size: 0.95rem;
            font-weight: 600;
            margin-bottom: 12px;
        }

        /* ── 차트 컨테이너 ── */
        .chart-box {
            width: 100%;
            height: 320px;
        }

        .chart-box.small {
            height: 200px;
        }

        /* ── 데이터 테이블 ── */
        .data-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.85rem;
            background: white;
        }

        .data-table th {
            text-align: left;
            padding: 10px 8px;
            color: var(--text-muted);
            border-bottom: 1px solid var(--border-color);
            font-weight: 500;
        }

        .data-table td {
            padding: 12px 8px;
            border-bottom: 1px solid var(--border-color);
        }

        .data-table tbody tr {
            cursor: pointer;
            transition: background 0.2s;
        }

        .data-table tbody tr:hover {
            background-color: #f1f5f9;
        }

        .data-table tr:last-child td {
            border-bottom: none;
        }

        /* ── 네비게이션(백버튼) ── */
        .back-btn {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            color: var(--text-muted);
            font-size: 0.9rem;
            cursor: pointer;
            margin-bottom: 4px;
            padding: 4px 0;
        }

        /* 통계 위젯 박스 */
        .stat-widget {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: var(--surface-color);
            border-radius: var(--radius-lg);
            padding: 16px;
            box-shadow: var(--shadow-md);
        }

        .stat-label {
            font-size: 0.85rem;
            color: var(--text-muted);
        }

        .stat-val {
            font-size: 1.2rem;
            font-weight: 700;
            color: var(--text-main);
        }

        /* 로딩 스피너 */
        .loading {
            text-align: center;
            padding: 40px;
            color: var(--text-muted);
            font-size: 0.9rem;
        }

        @keyframes spin {
            to {
                transform: rotate(360deg);
            }
        }

        .spinner {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            border: 3px solid #e2e8f0;
            border-top-color: #3b82f6;
            animation: spin 0.7s linear infinite;
            margin: 0 auto 12px;
        }

        /* Leaflet 거리 라벨 툴팁 */
        .dist-tooltip {
            padding: 1px 5px;
            font-size: 9px;
            font-weight: 700;
            border-radius: 3px;
            white-space: nowrap;
        }

        .dist-tooltip.leaflet-tooltip-right::before {
            display: none;
        }

        /* 품목검색·수입사·수출사 공통 탭 */
        .product-tabs,
        .importer-tabs,
        .exporter-tabs {
            display: flex;
            gap: 5px;
            margin-bottom: 0;
            border-bottom: 2px solid #cbd5e1;
            align-items: flex-end;
            padding: 0 2px;
        }

        .product-tab,
        .importer-tab,
        .exporter-tab {
            flex: 1;
            padding: 9px 4px 8px;
            font-size: 0.68rem;
            font-weight: 600;
            color: #94a3b8;
            background: #f1f5f9;
            border: 1.5px solid #e2e8f0;
            border-bottom: none;
            border-radius: 8px 8px 0 0;
            cursor: pointer;
            text-align: center;
            transition: all 0.15s;
            line-height: 1.3;
            white-space: nowrap;
            position: relative;
            bottom: 0;
        }

        .product-tab:hover:not(.active),
        .importer-tab:hover:not(.active),
        .exporter-tab:hover:not(.active) {
            background: #e2e8f0;
            color: #94a3b8;
        }

        .product-tab.active,
        .importer-tab.active,
        .exporter-tab.active {
            color: #1e3a8a;
            background: #ffffff;
            border-color: #cbd5e1;
            border-top: 3px solid #3b82f6;
            font-weight: 700;
            bottom: -2px;
            padding-top: 8px;
            z-index: 1;
            box-shadow: 0 -2px 6px rgba(59, 130, 246, 0.10);
        }

        /* 비적격 품목 탭 비활성화 (2026-05-24 — 단가 산정 어려운 품목) */
        .product-tab.disabled {
            opacity: 0.55;
            cursor: not-allowed;
            color: #94a3b8 !important;
            background: #f1f5f9 !important;
        }
        .product-tab.disabled::before {
            content: "🔒 ";
            margin-right: 1px;
            font-size: 0.85em;
        }
        .product-tab.disabled:hover {
            background: #f1f5f9 !important;
            color: #94a3b8 !important;
        }
        body.dark .product-tab.disabled {
            color: #64748b !important;
            background: #1e293b !important;
            opacity: 0.5;
        }
        body.dark .product-tab.disabled:hover {
            background: #1e293b !important;
            color: #64748b !important;
        }

        .product-tab-panel,
        .importer-tab-panel,
        .exporter-tab-panel {
            display: none;
        }

        .product-tab-panel.active,
        .importer-tab-panel.active,
        .exporter-tab-panel.active {
            display: block;
        }

        /* 단가추이 필터 선택 */
        .price-filter-row {
            display: flex;
            gap: 8px;
            margin-bottom: 12px;
            align-items: center;
        }

        .price-filter-row label {
            font-size: 0.75rem;
            font-weight: 700;
            color: #94a3b8;
            white-space: nowrap;
        }

        .price-filter-sel {
            flex: 1;
            padding: 7px 10px;
            border: 1.5px solid #e2e8f0;
            border-radius: 10px;
            font-size: 0.8rem;
            font-weight: 600;
            color: #1e3a8a;
            background: #f8fafc;
            outline: none;
            cursor: pointer;
            transition: border-color 0.15s;
        }

        .price-filter-sel:focus {
            border-color: #fde68a;
        }
        /* ── 하단 네비게이션 바 (공통 dark 디자인) ── */
        /* 2026-05-25: PC에서 phone-container(max 480px)와 동일 폭 고정 */
        .bottom-nav {
            position: fixed !important;
            bottom: 0 !important;
            left: 50% !important;
            right: auto !important;
            transform: translateX(-50%) !important;
            width: 100% !important;
            max-width: 480px !important;
            background: var(--bottom-nav-bg) !important;
            backdrop-filter: blur(14px) !important;
            -webkit-backdrop-filter: blur(14px) !important;
            display: flex !important;
            justify-content: space-around !important;
            align-items: center !important;
            padding: 8px 6px env(safe-area-inset-bottom, 6px) !important;
            border-top: 1px solid var(--bottom-nav-border) !important;
            box-shadow: none !important;
            z-index: 1001 !important;
        }
        .bottom-nav-item {
            display: flex !important;
            flex-direction: column !important;
            align-items: center !important;
            gap: 4px !important;
            text-decoration: none !important;
            color: var(--text-muted) !important;
            font-size: 9px !important;
            font-weight: 500 !important;
            min-width: 0 !important;
            padding: 6px 8px !important;
            cursor: pointer !important;
            white-space: nowrap !important;
            transition: color 0.15s !important;
            -webkit-tap-highlight-color: transparent !important;
            user-select: none !important;
        }
        .bottom-nav-item svg {
            width: 22px !important;
            height: 22px !important;
            stroke-width: 1.8 !important;
            transition: transform 0.15s !important;
        }
        .bottom-nav-item.active {
            color: #fde68a !important;
        }
        .bottom-nav-item.active svg {
            stroke: #fde68a !important;
        }

        /* ── 대시보드 (Royal Blue 상단 + 흰색 하단) ── */
        /* Royal Blue 기준색: #1a3dab */
        #viewDashboard {
            background: #f1f5f9;
            min-height: 100vh;
        }
        /* 히어로 섹션 — Royal Blue 배경, 외부 여백 없음 */
        .dash-hero {
            background: linear-gradient(165deg, #1e45c0 0%, #1a3dab 55%, #163296 100%);
            padding: 28px 20px 22px;
            margin: 0;
            color: #fff;
            position: relative;
            overflow: hidden;
        }
        .dash-hero::before {
            content: '';
            position: absolute; right: -20px; top: -30px;
            width: 180px; height: 180px; border-radius: 50%;
            background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
        }
        .dash-hero::after {
            content: '';
            position: absolute; left: -30px; bottom: -40px;
            width: 140px; height: 140px; border-radius: 50%;
            background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
        }
        .dash-hero-label {
            font-size: 0.6rem; font-weight: 800; letter-spacing: 0.18em;
            color: rgba(255,255,255,0.65); margin-bottom: 8px; text-transform: uppercase;
        }
        .dash-hero-price {
            font-size: 3.2rem; font-weight: 900; line-height: 1;
            letter-spacing: -0.03em; color: #fff;
        }
        .dash-hero-currency {
            font-size: 0.9rem; font-weight: 700; color: rgba(255,255,255,0.65);
            margin-left: 5px; vertical-align: super;
        }
        .dash-hero-unit {
            font-size: 0.7rem; font-weight: 700; color: rgba(255,255,255,0.55);
            letter-spacing: 0.12em; margin-top: 5px; text-transform: uppercase;
        }
        /* 품목명 — 한글 망고 (단가와 동일 크기, 망고색) */
        .dash-hero-product-name {
            font-size: 2.6rem; font-weight: 900; line-height: 1;
            letter-spacing: -0.02em; text-align: center;
            color: #f59e0b;
            text-shadow: 0 2px 8px rgba(0,0,0,0.2);
        }
        /* 품목명 — 영문 소자 (1/4 크기, 망고색 연하게) */
        .dash-hero-product-sub {
            font-size: 0.65rem; font-weight: 700; text-align: center;
            color: rgba(245,158,11,0.75); letter-spacing: 0.06em;
            margin-top: 3px;
        }
        .dash-hero-meta {
            display: flex; align-items: center; gap: 8px;
            margin-top: 16px; padding-top: 0;
        }
        .dash-change-badge {
            display: inline-flex; align-items: center; gap: 4px;
            border-radius: 20px; padding: 4px 10px; font-size: 0.73rem; font-weight: 800;
        }
        .dash-change-up   { background: rgba(239,68,68,0.30);   color: #fca5a5; }
        .dash-change-down { background: rgba(96,165,250,0.25);  color: #bfdbfe; }
        .dash-month-badge {
            background: #eff6ff; color: #1a3dab;
            font-size: 0.65rem; font-weight: 800;
            padding: 3px 9px; border-radius: 7px;
            letter-spacing: 0.05em; white-space: nowrap;
            border: 1px solid #bfdbfe;
        }
        .dash-live-dot {
            display: inline-flex; align-items: center; gap: 5px;
            font-size: 0.65rem; font-weight: 600; color: rgba(255,255,255,0.55);
        }
        .dash-live-dot::before {
            content: ''; width: 6px; height: 6px; border-radius: 50%;
            background: rgba(255,255,255,0.9); display: inline-block; animation: pulse-white 1.5s infinite;
        }
        @keyframes pulse-white {
            0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255,255,255,0.5); }
            50%      { opacity: 0.5; box-shadow: 0 0 0 4px rgba(255,255,255,0); }
        }
        .dash-total-amt {
            font-size: 0.7rem; font-weight: 700; color: rgba(255,255,255,0.7);
            margin-left: auto;  /* 우측 정렬 */
            white-space: nowrap;
        }
        /* 콘텐츠 영역 — 카드 박스들을 연한 회색 배경 위에 표시 */
        .dash-white-area {
            background: #f1f5f9;
            padding: 0;
        }
        /* 트렌드 카드 */
        .dash-card {
            background: #fff; border-radius: 0;
            padding: 18px 20px 14px; margin-bottom: 0;
            border-bottom: 1px solid #f1f5f9;
        }
        .dash-card-title {
            font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em;
            color: #1e3a8a; margin-bottom: 14px; text-transform: uppercase;
        }
        /* 수출국 카드 */
        .dash-card-surface {
            background: #fff; border-radius: 0;
            padding: 16px 20px; margin: 0;   /* 좌우 여백 원상복구 */
            border-bottom: 1px solid #f1f5f9;
        }
        .dash-tab-btn {
            border: none; background: transparent; font-size: 0.72rem; font-weight: 700;
            color: #94a3b8; padding: 5px 10px; border-radius: 10px; cursor: pointer;
            transition: all 0.15s;
        }
        .dash-tab-btn.active {
            background: #eff6ff; color: #1d4ed8;
        }
        .dash-country-row {
            display: flex; align-items: center; gap: 10px;
            padding: 10px 0; border-bottom: 1px solid #f1f5f9;
        }
        .dash-country-row:last-child { border-bottom: none; padding-bottom: 0; }
        .dash-flag-circle {
            width: 36px; height: 36px; border-radius: 50%; overflow: hidden;
            background: #e2e8f0; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
        }
        .dash-flag-circle img { width: 100%; height: 100%; object-fit: cover; }
        .dash-country-name { font-size: 0.85rem; font-weight: 700; color: #1e293b; }
        .dash-country-sub  { font-size: 0.68rem; color: #94a3b8; margin-top: 1px; }
        .dash-price-col    { margin-left: auto; text-align: right; }
        .dash-price-val    { font-size: 0.9rem; font-weight: 800; color: #1e293b; }
        .dash-price-chg    { font-size: 0.7rem; font-weight: 700; margin-top: 2px; }
        .dash-chg-up   { color: #dc2626; }
        .dash-chg-down { color: #2563eb; }
        .dash-chg-base { color: #94a3b8; }
        /* 2×2 국가 그리드 */
        .dash-country-grid {
            display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
        }
        .dash-country-cell {
            background: #f8fafc; border-radius: 14px; padding: 20px 25px 16px;
            border: 1px solid #e2e8f0; position: relative; overflow: hidden;
        }
        /* 1행: 국기 + 국가명 */
        .dash-country-cell-head {
            display: flex; align-items: center; gap: 6px; margin-bottom: 8px;
        }
        .dash-country-cell-flag {
            width: 22px; height: 22px; border-radius: 50%; overflow: hidden;
            background: #e2e8f0; flex-shrink: 0;
            display: flex; align-items: center; justify-content: center;
        }
        .dash-country-cell-flag img { width: 22px; height: 22px; object-fit: cover; border-radius: 50%; }
        .dash-country-cell-name {
            font-size: 0.68rem; font-weight: 700; color: #374151;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }
        /* 2행: 단가(좌) + 차트+등락률(우) */
        .dash-country-cell-body {
            display: flex; align-items: flex-end; gap: 6px;
        }
        .dash-country-cell-left { flex: 1; min-width: 0; }
        .dash-country-cell-price {
            font-size: 1.05rem; font-weight: 900; color: #1e293b;
            letter-spacing: -0.02em; line-height: 1;
        }
        .dash-country-cell-share {
            font-size: 0.58rem; color: #94a3b8; font-weight: 600; margin-top: 3px;
        }
        /* 우측: 차트 위, 등락률 아래 */
        .dash-country-cell-right {
            display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
            flex-shrink: 0;
        }
        .dash-country-cell-chg {
            font-size: 0.95rem; font-weight: 900; line-height: 1;
            letter-spacing: -0.02em;
        }
        /* Trade Intelligence 카드 */
        .dash-intel {
            background: #ffffff;
            border: 1.5px solid #64748b;
            margin: 16px 16px 12px;
            border-radius: 18px; padding: 20px;
            position: relative; overflow: hidden;
        }
        .dash-intel::after { display: none; }
        .dash-intel-tag {
            font-size: 0.6rem; font-weight: 800; letter-spacing: 0.1em;
            color: #94a3b8; margin-bottom: 8px;
            display: flex; align-items: center; gap: 6px;
        }
        .dash-intel-title { font-size: 1.05rem; font-weight: 900; line-height: 1.3; margin-bottom: 8px; color: #111827; }
        .dash-intel-body  { font-size: 0.78rem; color: #374151; line-height: 1.7; margin-bottom: 18px; }
        .dash-intel-btn {
            background: #1a3dab; border: none;
            color: #fff; font-size: 0.73rem; font-weight: 800; padding: 10px 20px;
            border-radius: 22px; cursor: pointer; letter-spacing: 0.06em;
        }
        /* VIEW FULL MARKET REPORT CTA 버튼 */
        .dash-cta-wrap {
            padding: 4px 16px 24px;
            background: #f1f5f9;
        }
        .dash-cta-btn {
            width: 100%; padding: 16px;
            background: linear-gradient(90deg, #1a3dab 0%, #2563eb 100%);
            color: #fff; font-size: 0.82rem; font-weight: 800;
            letter-spacing: 0.1em; text-transform: uppercase;
            border: none; border-radius: 30px; cursor: pointer;
            box-shadow: 0 4px 18px rgba(26,61,171,0.35);
            transition: opacity 0.15s;
        }
        .dash-cta-btn:active { opacity: 0.85; }
        /* 단가추이 주차별 단가 테이블 */
        .price-week-table {
            width: 100%; border-collapse: collapse; font-size: 11px;
        }
        .price-week-table th {
            background: #1e3a8a; color: #fff; padding: 6px 8px;
            text-align: center; font-weight: 700; white-space: nowrap;
        }
        .price-week-table td {
            padding: 5px 8px; text-align: center; border-bottom: 1px solid #e2e8f0;
            white-space: nowrap;
        }
        .price-week-table tr:nth-child(even) td { background: #f8fafc; }
        .price-week-table .col-avg  { color: #fde68a; font-weight: 700; }
        .price-week-table .col-all  { color: #ef4444; font-weight: 600; }
        .price-week-table .col-diff-up   { color: #dc2626; font-weight: 700; }
        .price-week-table .col-diff-down { color: #2563eb; font-weight: 700; }
        .importer-detail-table { width: 100%; border-collapse: collapse; font-size: 11px; table-layout: fixed; }
        .importer-detail-table col.col-no   { width: 28px; }
        .importer-detail-table col.col-date { width: 42px; }
        .importer-detail-table col.col-prod { width: 74px; }
        .importer-detail-table col.col-exp  { width: 90px; }
        .importer-detail-table col.col-ctry { width: 44px; }
        .importer-detail-table th { background: #1e3a8a; color: #fff; padding: 6px 4px; text-align: center; font-weight: 700; white-space: nowrap; overflow: hidden; }
        .importer-detail-table td { padding: 5px 4px; text-align: center; border-bottom: 1px solid #e2e8f0; white-space: nowrap; overflow: hidden; }
        .importer-detail-table tr:nth-child(even) td { background: #f8fafc; }
        .importer-detail-table .td-ellipsis { text-align: left; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
        .importer-detail-table .td-ellipsis-center { text-align: left; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
        .importer-detail-table .td-link { cursor: pointer; color: #1d4ed8; text-decoration: underline; text-underline-offset: 2px; }
        .importer-detail-table .td-link:active { color: #1e40af; }
        .imp-detail-filter-row { display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
        .imp-detail-sel { flex:1; min-width:80px; padding:6px 8px; border:1.5px solid #e2e8f0; border-radius:10px; font-size:0.78rem; font-weight:600; color:#1e3a8a; background:#f8fafc; outline:none; }
        .imp-detail-sel:focus { border-color:#fde68a; }
        .imp-detail-input { flex:2; min-width:100px; padding:6px 10px; border:1.5px solid #e2e8f0; border-radius:10px; font-size:0.78rem; color:#1e293b; background:#f8fafc; outline:none; }
        .imp-detail-input:focus { border-color:#fde68a; }

        .price-filter-sel:disabled {
            opacity: 0.4;
            cursor: default;
        }

        /* ── 제품 상세 페이지 전용 스타일 ── */
        #viewProductAnalysis { padding: 0; background: var(--bg); }

        .prod-top-nav {
            display: flex; align-items: center; justify-content: space-between;
            padding: 12px 16px; background: #fff;
            border-bottom: 1px solid #e5e7eb;
        }
        .prod-nav-btn {
            width: 36px; height: 36px; border-radius: 50%;
            border: none; background: #f1f5f9; cursor: pointer;
            display: flex; align-items: center; justify-content: center;
            color: #374151; font-size: 0.9rem;
        }
        .prod-nav-btn:active { background: #e2e8f0; }
        .prod-date-badge { /* 하위 호환 — date-badge 사용 권장 */
            display: inline-flex; align-items: center; gap: 5px;
            font-size: 0.75rem; font-weight: 600; color: #374151;
            background: #ffffff; border: 1px solid #d1d5db;
            border-radius: 6px; padding: 3px 9px;
            white-space: nowrap;
        }
        .prod-nav-actions { display: flex; gap: 8px; }
        .product-type-badge {
            display: inline-block;
            font-size: 0.72rem; font-weight: 700;
            color: var(--text-secondary); background: var(--badge-bg);
            border: 1px solid var(--badge-border);
            border-radius: 99px; padding: 2px 10px;
            letter-spacing: 0.02em;
        }

        /* ── 대시보드 dark 테마 ── */
        #viewDashboard { padding: 0; background: var(--bg) !important; min-height: 100vh; }

        .prod-hero {
            position: relative;
            background: var(--surface) !important;
            border-bottom: none !important;
            border-radius: 16px !important;
            box-shadow: none !important;
            border: 1px solid var(--surface-border) !important;
            padding: 24px 20px 24px !important;
            margin: 8px 12px 8px !important;
        }
        .prod-title-ko {
            font-size: 2rem; font-weight: 900; color: var(--text-primary); line-height: 1.1; margin-bottom: 2px;
        }
        .prod-title-en {
            font-size: 0.82rem; font-weight: 600; color: var(--text-muted); letter-spacing: 0.08em;
            text-transform: uppercase; margin-bottom: 16px;
        }
        .prod-price-row {
            display: flex; align-items: baseline; gap: 4px; margin-bottom: 6px;
        }
        .prod-price {
            font-size: 2.4rem; font-weight: 900; color: #fde68a; letter-spacing: -0.03em;
        }
        .prod-price-unit {
            font-size: 1rem; font-weight: 600; color: var(--text-muted);
        }
        .prod-change-row {
            display: flex; align-items: center; gap: 8px;
        }
        .prod-change-badge {
            font-size: 0.82rem; font-weight: 800; padding: 3px 8px;
            border-radius: 6px; display: inline-flex; align-items: center; gap: 3px;
        }
        .prod-change-up   { background: rgba(239,68,68,0.15) !important; color: #fca5a5 !important; }
        .prod-change-down { background: rgba(59,130,246,0.15) !important; color: #93c5fd !important; }
        .prod-change-label {
            font-size: 0.75rem; color: var(--text-muted); font-weight: 500;
        }

        .prod-card {
            background: var(--surface) !important;
            border: 1px solid var(--surface-border) !important;
            border-radius: 16px !important;
            padding: 16px 16px 12px;
            margin: 0 12px 16px !important;
            box-shadow: none !important;
        }
        .prod-card-title {
            font-size: 0.78rem; font-weight: 700; color: var(--accent);
            letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 12px;
        }
        .prod-card-sub {
            font-size: 0.65rem; font-weight: 600; color: var(--text-muted);
            text-transform: none; letter-spacing: 0;
        }

        /* 수출국 테이블 */
        .prod-country-table {
            width: 100%; border-collapse: collapse;
        }
        .prod-country-table thead th {
            font-size: 0.68rem; font-weight: 700; color: var(--text-muted);
            padding: 0 6px 8px; text-align: right;
            border-bottom: 1px solid var(--surface-border);
        }
        .prod-country-table thead th:first-child { text-align: left; }
        .prod-country-table tbody td {
            padding: 10px 6px; border-bottom: none;
            font-size: 0.82rem; color: var(--text-secondary);
        }
        .prod-country-table .prod-chg-up   { color: #fca5a5; font-weight: 700; }
        .prod-country-table .prod-chg-down { color: #93c5fd; font-weight: 700; }
        .prod-country-table .td-link { cursor: pointer; color: var(--text-primary); font-weight: 600; }
        .prod-country-table tr.clickable-row { cursor: pointer; }
        .prod-country-table tr.clickable-row:active td { background: var(--surface-2-hover); }

        /* 인사이트 카드 */
        .prod-insight {
            background: var(--surface) !important;
            border: 1px solid var(--surface-border) !important;
            border-left: 4px solid var(--surface-border) !important;
            border-radius: 16px !important;
            padding: 16px; margin: 0 12px 12px;
            box-shadow: none !important;
        }
        .prod-insight-header {
            font-size: 0.78rem; font-weight: 700; color: var(--accent);
            letter-spacing: 0.05em; text-transform: uppercase;
            margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
        }
        .prod-insight-list {
            list-style: none; padding: 0; margin: 0;
        }
        .prod-insight-list li {
            font-size: 0.79rem; color: var(--text-muted); line-height: 1.6;
            padding: 3px 0 3px 14px; position: relative;
        }
        .prod-insight-list li::before {
            content: "•"; position: absolute; left: 0; color: var(--accent); font-weight: 900;
        }
        .prod-insight-list li span.highlight { color: #fca5a5; font-weight: 700; }

        /* 대시보드 prod-hero 내 품목명 오버라이드 */
        .prod-hero .dash-hero-product-name {
            font-size: 2rem; font-weight: 900; color: var(--text-primary);
            text-shadow: none; text-align: left; letter-spacing: -0.02em;
            margin-bottom: 2px; line-height: 1.1;
        }
        .prod-hero .dash-hero-product-sub {
            font-size: 0.82rem; font-weight: 600; color: var(--text-muted);
            letter-spacing: 0.08em; text-transform: uppercase;
            text-align: left; margin-bottom: 16px;
        }

        #dashMonthBadge {
            position: absolute; top: 24px; right: 15px;
            font-size: 0.72rem; z-index: 10;
        }

        .prod-card-gap { margin-top: 16px !important; }
        .prod-top-nav { display: none !important; }

        /* CTA 버튼 */
        .dash-cta-btn {
            background: rgba(0,198,162,0.1) !important;
            color: #fde68a !important;
            border: 1px solid rgba(0,198,162,0.3) !important;
            box-shadow: none !important;
            text-transform: none !important; padding: 14px !important;
            border-radius: 12px !important; font-weight: 700 !important;
            display: flex; align-items: center; justify-content: center; gap: 8px;
        }
        .dash-cta-btn:active { background: rgba(0,198,162,0.18) !important; }
        .dash-cta-container { padding: 4px 12px 8px !important; }

        /* period-badge — date-badge 별칭 (하위 호환) */
        .period-badge {
            display: inline-flex; align-items: center; gap: 5px;
            font-size: 0.75rem; font-weight: 600; color: #5eead4;
            background: rgba(0,198,162,0.1); border: 1px solid rgba(0,198,162,0.3);
            border-radius: 6px; padding: 3px 9px;
            white-space: nowrap; flex-shrink: 0;
        }

        /* 상단 프로필 바 */
        .top-profile-bar {
            display: none; justify-content: space-between; align-items: center;
            padding: 10px 16px; margin: 12px 12px 0;
            background: var(--surface); backdrop-filter: blur(10px);
            border-radius: 14px; border: 1px solid var(--surface-border);
            box-shadow: none;
            position: relative; z-index: 1005;
        }
        .grade-badge {
            background: rgba(0,198,162,0.1); color: #5eead4; padding: 4px 12px;
            border-radius: 20px; font-size: 11px; font-weight: 500;
            border: 1px solid rgba(0,198,162,0.3);
        }
        body.light .grade-badge {
            background: rgba(29,78,216,0.10); color: #1d4ed8;
            border: 1px solid rgba(29,78,216,0.35); font-weight: 600;
        }
        body.light .grade-badge[data-grade="pro"] {
            background: rgba(29,78,216,0.12); color: #1e3a8a;
            border-color: rgba(29,78,216,0.4);
        }
        body.light .grade-badge[data-grade="vip"] {
            background: rgba(146,64,14,0.10); color: #92400e;
            border-color: rgba(146,64,14,0.35);
        }
        .logout-link {
            color: var(--text-muted); text-decoration: none; font-size: 11px;
            font-weight: 400; cursor: pointer; padding: 6px 10px;
            margin: -6px -10px; transition: color 0.2s;
        }
        .logout-link:hover { color: var(--text-muted); }

        /* 모달 */
        .modal-overlay {
            display: none; position: fixed; inset: 0;
            background: rgba(0,0,0,0.6); backdrop-filter: blur(8px);
            z-index: 9999; align-items: center; justify-content: center;
        }
        .modal-content {
            background: var(--modal-bg); width: 85%; max-width: 320px;
            border-radius: 24px; padding: 24px; text-align: center;
            border: 1px solid var(--modal-border);
            box-shadow: 0 20px 40px rgba(0,0,0,0.4);
            transform: scale(0.9); animation: scaleUp 0.2s ease-out forwards;
        }
        .modal-text { color: var(--text-primary); font-size: 16px; font-weight: 600; margin-bottom: 24px; line-height: 1.5; }
        .modal-btns { display: flex; gap: 12px; }
        .modal-btn { flex: 1; padding: 14px; border-radius: 14px; font-size: 14px; font-weight: 600; border: none; cursor: pointer; transition: all 0.2s; font-family: inherit; }
        .btn-cancel { background: var(--surface-border); color: var(--text-muted); }
        .btn-confirm { background: #00c6a2; color: #03161e; }
        @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
        @keyframes scaleUp { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

        /* authModal 아이콘 — 다크 모드 기본 */
        #authModal .auth-icon-wrap { background: rgba(253,230,138,0.12); }
        #authModal .auth-icon-lock { stroke: #fde68a; }
        /* authModal 아이콘 — 라이트 모드 오버라이드 */
        body.light #authModal .auth-icon-wrap { background: #eff6ff; }
        body.light #authModal .auth-icon-lock { stroke: #1e3a8a; }
        /* authModal 로그인 버튼 — 라이트 모드 hover */
        body.light #authModal .auth-modal-primary-btn:hover { opacity: 0.85; }
        body.light #authModal { background: rgba(0,0,0,0.4); }

        .phone-container { padding-bottom: 100px !important; }

        .logistics-badge {
            font-size: 0.62rem; font-weight: 700; color: #fde68a;
            background: #ffffff; border: 1px solid #e2e8f0;
            border-radius: 5px; padding: 2px 5px; cursor: pointer;
            flex-shrink: 0; white-space: nowrap;
        }
        .logistics-badge:active { background: #f1f5f9; }

        /* ── 페이지네이션 공통 (다크/라이트 CSS 변수 자동 전환) ── */
        .pg-nav {
            display: flex; justify-content: center; align-items: center;
            gap: 8px; padding: 8px 0 4px;
        }
        .pg-btn {
            padding: 4px 12px;
            border-radius: 8px;
            border: 1px solid var(--surface-border);
            background: var(--surface);
            color: var(--text-secondary);
            font-size: 0.75rem;
            cursor: pointer;
            transition: opacity 0.15s;
        }
        .pg-btn:disabled { opacity: 0.35; cursor: default; }
        .pg-lbl {
            font-size: 0.78rem;
            color: var(--text-muted);
            min-width: 36px;
            text-align: center;
        }

        .top-exporter-row {
            display: grid; grid-template-columns: 36px 1fr 58px 44px 28px;
            gap: 4px; align-items: center; padding: 10px 6px; cursor: pointer;
        }
        .top-exporter-row:not(:last-child) { border-bottom: none; }
        .top-exporter-row:active { background: #f8fafc; border-radius: 6px; }

        .product-cnt-tooltip {
            position: relative; display: inline-flex; align-items: center; gap: 4px;
        }
        .product-cnt-tooltip .tooltip-box {
            display: none; position: absolute; top: 50%; left: calc(100% + 8px);
            transform: translateY(-50%); background: #1e293b; color: #f1f5f9;
            font-size: 0.72rem; font-weight: 500; line-height: 1.6;
            padding: 7px 10px; border-radius: 8px; white-space: nowrap;
            z-index: 999; box-shadow: 0 4px 12px rgba(0,0,0,0.2);
            pointer-events: none; text-align: left;
        }
        .product-cnt-tooltip:hover .tooltip-box { display: block; }

        .product-type-badge {
            display: inline-block; font-size: 0.72rem; font-weight: 700;
            color: var(--text-secondary); background: var(--badge-bg); border: 1px solid var(--badge-border);
            border-radius: 99px; padding: 2px 10px; letter-spacing: 0.02em;
            white-space: nowrap; vertical-align: middle;
        }

        /* ── 테마 공통 오버라이드 (dark/light 모두 CSS 변수로 제어) ── */
        body { background: var(--bg) !important; }
        .phone-container { background: var(--bg) !important; }

        /* 공통 카드 */
        .card {
            background: var(--surface) !important;
            border: 1px solid var(--surface-border) !important;
            box-shadow: none !important;
            color: var(--text-secondary);
        }
        .card-header {
            color: var(--accent) !important;
            border-bottom-color: var(--surface-border) !important;
        }

        /* section-title, back-btn */
        .section-title { color: var(--text-primary) !important; }
        .back-btn { color: var(--text-muted) !important; }
        .back-btn:hover { color: var(--text-muted) !important; }

        /* stat-widget */
        .stat-widget {
            background: var(--surface) !important;
            border: 1px solid var(--surface-border) !important;
            box-shadow: none !important;
        }
        .stat-label { color: var(--text-muted) !important; }
        .stat-val { color: var(--text-primary) !important; }

        /* list-group-item */
        .list-group-item {
            background: var(--surface-2) !important;
            border-bottom-color: var(--divider) !important;
            color: var(--text-secondary);
        }
        .list-group-item:hover {
            background: var(--surface-2-hover) !important;
        }

        /* 검색 fixed 헤더 */
        #fixedSearchHeader {
            background: var(--search-header-bg) !important;
            box-shadow: var(--search-header-shadow) !important;
            border-bottom: 1px solid var(--search-header-border) !important;
        }
        #searchTypeGroup {
            background: var(--search-type-bg) !important;
        }
        .search-type-btn {
            color: var(--text-muted) !important;
            background: transparent !important;
        }
        .search-type-btn.active {
            background: rgba(0,198,162,0.12) !important;
            color: var(--accent) !important;
            box-shadow: none !important;
        }
        #searchYear, #searchMonth {
            background: var(--filter-sel-bg) !important;
            border-color: var(--filter-sel-border) !important;
            color: var(--filter-sel-color) !important;
        }
        .search-input {
            background: var(--search-input-bg) !important;
            border-color: var(--search-input-border) !important;
            color: var(--search-input-color) !important;
        }
        .search-input::placeholder { color: var(--text-muted) !important; }
        .search-input:focus { border-color: var(--accent) !important; }
        .search-results {
            background: var(--search-results-bg) !important;
            border: 1px solid var(--search-results-border) !important;
        }
        .search-item {
            border-bottom-color: var(--search-item-border) !important;
            color: var(--search-item-color) !important;
        }
        .search-item:hover { background: var(--search-item-hover) !important; }

        /* 탭 */
        .product-tabs,
        .importer-tabs,
        .exporter-tabs {
            background: transparent !important;
            border-bottom-color: var(--tab-border-bottom) !important;
        }
        .product-tab,
        .importer-tab,
        .exporter-tab {
            background: var(--tab-bg) !important;
            border-color: var(--tab-border) !important;
            color: var(--tab-color) !important;
            font-size: 0.68rem !important;
            white-space: nowrap !important;
        }
        .product-tab:hover:not(.active),
        .importer-tab:hover:not(.active),
        .exporter-tab:hover:not(.active) {
            background: var(--tab-hover-bg) !important;
            color: var(--tab-color) !important;
        }
        .product-tab.active,
        .importer-tab.active,
        .exporter-tab.active {
            background: var(--tab-active-bg) !important;
            border-color: var(--tab-active-border) !important;
            border-top: 3px solid var(--tab-active-top) !important;
            color: var(--tab-active-color) !important;
            box-shadow: none !important;
        }

        /* data-table */
        .data-table {
            background: transparent !important;
        }
        .data-table th {
            color: var(--dtbl-th-color) !important;
            border-bottom-color: var(--dtbl-th-border) !important;
        }
        .data-table td { border-bottom-color: var(--tbl-td-border) !important; color: var(--text-secondary); }
        .data-table tbody tr:hover { background: var(--tbl-hover-bg) !important; }

        /* importer info 카드 */
        #importerInfoCard {
            background: var(--importer-card-bg) !important;
            border-color: var(--importer-card-border) !important;
            color: var(--text-muted) !important;
        }

        /* 상단 제목 */
        #mainTitle { color: var(--text-primary) !important; }
        #exporterTitle,
        #detailTitle,
        #competitorTitle,
        #productsTitle { color: var(--text-primary) !important; }

        /* 수출국 필터 */
        #productCountryFilter {
            background: var(--country-filter-bg) !important;
            box-shadow: none !important;
            border: 1px solid var(--country-filter-border) !important;
        }
        #productCountrySelect {
            background: var(--country-sel-bg) !important;
            border-color: var(--country-sel-border) !important;
            color: var(--country-sel-color) !important;
        }

        /* 품목 탭 래퍼 */
        #viewProductAnalysis > div[style*="background:#fff"],
        .product-tabs-wrapper { background: transparent !important; }

        /* 등급안내 화면 */
        #viewGradeInfo { background: var(--bg) !important; }
        #viewGradeInfo h2 { color: var(--text-primary) !important; }
        #viewGradeInfo .card:last-child { border-color: var(--surface-border) !important; }
        #viewGradeInfo h3 { color: var(--text-secondary) !important; }
        #viewGradeInfo ul { color: var(--text-muted) !important; }

        /* competitor 카드 헤더 border */
        .card > .card-header[style*="border-bottom:1px solid #f3f4f6"],
        .card > .card-header[style*="border-bottom: 1px solid #f3f4f6"] {
            border-bottom-color: var(--surface-border) !important;
        }

        /* imp-detail 필터 */
        .imp-detail-sel {
            background: var(--filter-sel-bg) !important;
            border-color: var(--filter-sel-border) !important;
            color: var(--filter-sel-color) !important;
        }
        .imp-detail-input {
            background: var(--filter-sel-bg) !important;
            border-color: var(--filter-sel-border) !important;
            color: var(--search-input-color) !important;
        }

        /* importer-detail-table / price-week-table */
        .importer-detail-table th,
        .price-week-table th {
            background: var(--tbl-th-bg) !important;
            color: var(--tbl-th-color) !important;
        }
        .importer-detail-table td,
        .price-week-table td { border-bottom-color: var(--tbl-td-border) !important; color: var(--tbl-td-color); }
        .importer-detail-table tr:nth-child(even) td,
        .price-week-table tr:nth-child(even) td { background: var(--tbl-even-bg) !important; }

        /* top-exporter-row */
        .top-exporter-row { border-bottom: none !important; }
        .top-exporter-row:active { background: var(--surface-2-hover) !important; }

        /* exporterCoordInfo */
        #exporterCoordInfo {
            background: var(--coord-bg) !important;
            border-color: var(--coord-border) !important;
            color: var(--text-muted) !important;
        }

        /* prod-top-nav (검색에서 사용 시) */
        .prod-top-nav {
            background: var(--surface) !important;
            border-bottom-color: var(--surface-border) !important;
        }
        .prod-nav-btn {
            background: var(--surface-border) !important;
            color: var(--text-muted) !important;
        }

        /* 월별 수입단가 텍스트 */
        #viewProductAnalysis .prod-card span[style*="color:#000"] { color: var(--text-muted) !important; }

        /* top5 header row */
        div[style*="background:#f8fafc"][style*="border-radius:6px"] {
            background: var(--surface-2) !important;
        }

        /* ── 견적요청 팝업 (QuoteModal) ── */
        #quoteModal {
            /* 오버레이 배경 — modal-overlay display:none 기본에 flex 덮어씀 */
        }
        /* 팝업 내 select 화살표 제거 (커스텀 ▼ 사용) */
        #quoteModal select {
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
        }
        /* 팝업 내 number input 스피너 숨김 */
        #quoteModal input[type=number]::-webkit-inner-spin-button,
        #quoteModal input[type=number]::-webkit-outer-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }
        #quoteModal input[type=number] { -moz-appearance: textfield; }
        /* 팝업 내 date input — dark 모드 달력 아이콘 색상 */
        #quoteModal input[type=date]::-webkit-calendar-picker-indicator {
            filter: invert(0.7);
            cursor: pointer;
        }
        /* radio/checkbox label hover 효과 */
        #quoteModal label:hover {
            background: rgba(255,255,255,0.08) !important;
        }
        /* 견적요청 버튼 hover */
        #quoteModal button[onclick="QuoteModal.submit()"]:hover {
            background: #1d4ed8 !important;
        }
        /* 팝업 스크롤바 다크 스타일 */
        #quoteModal > div::-webkit-scrollbar { width: 4px; }
        #quoteModal > div::-webkit-scrollbar-track { background: transparent; }
        #quoteModal > div::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

        /* ─── Plan Sheet 비교표 신규 컴포넌트 ─── */

        /* 닫기 버튼 행 */
        .pct-sheet-header {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: flex-start;
            padding: 20px 16px 0;
        }
        .plan-sheet-close {
            position: absolute;
            left: 16px;
            background: none;
            border: none;
            cursor: pointer;
            color: rgba(255,255,255,0.7);
            padding: 4px;
        }
        body.light .plan-sheet-close { color: #475569; }

        /* 탭 pill 컨테이너 */
        .pct-tab-pill {
            display: inline-flex;
            background: rgba(255,255,255,0.08);
            border-radius: 24px;
            padding: 3px;
            gap: 2px;
        }
        body.light .pct-tab-pill {
            background: rgba(0,0,0,0.07);
        }
        body.light .plan-sheet-plan-tab {
            color: rgba(0,0,0,0.45);
            border-color: transparent;
        }
        body.light .plan-sheet-plan-tab.active {
            background: #fff;
            color: #1e293b;
            border-color: rgba(0,0,0,0.12);
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        }

        /* 타이틀 */
        .pct-title-wrap { padding: 20px 20px 4px; text-align: center; }
        .pct-title {
            font-size: 1.25rem;
            font-weight: 800;
            color: #f1f5f9;
            line-height: 1.45;
            letter-spacing: -0.3px;
        }
        body.light .pct-title { color: #0f172a; }

        /* 비교표 컨테이너 */
        .pct-table {
            margin: 16px 16px 0;
            border-radius: 16px;
            overflow: hidden;
            border: 1px solid rgba(255,255,255,0.09);
        }
        body.light .pct-table {
            border-color: #e2e8f0;
            box-shadow: 0 1px 4px rgba(0,0,0,0.06);
        }

        /* 비교표 헤더 행 */
        .pct-table-header {
            display: grid;
            grid-template-columns: 1fr 52px 52px;
            background: rgba(255,255,255,0.06);
            padding: 10px 14px;
            border-bottom: 1px solid rgba(255,255,255,0.07);
        }
        body.light .pct-table-header {
            background: #f8fafc;
            border-bottom-color: #e2e8f0;
        }
        .pct-hcol {
            font-size: 0.72rem;
            color: #94a3b8;
            font-weight: 600;
        }
        body.light .pct-hcol { color: #64748b; }
        .pct-hcol-paid { color: #60a5fa; }
        body.light .pct-hcol-paid { color: #1d4ed8; }

        /* 비교표 데이터 행 */
        .pct-row {
            display: grid;
            grid-template-columns: 1fr 52px 52px;
            padding: 11px 14px;
            align-items: center;
            font-size: 0.82rem;
            color: #f1f5f9;
            border-bottom: 1px solid rgba(255,255,255,0.05);
        }
        .pct-row:last-child { border-bottom: none; }
        body.light .pct-row {
            color: #1e293b;
            border-bottom-color: #e2e8f0;
        }
        .pct-c { display: flex; justify-content: center; align-items: center; }

        /* 기능 항목 — 아이콘 + 텍스트 */
        .pct-feat { display: flex; align-items: center; gap: 8px; }
        body.light .pct-feat svg { stroke: #94a3b8; }

        /* 플랜 아이콘 (타이틀 아래, 비교표 위) */
        .pct-plan-icon {
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 20px 0 4px;
        }

        /* 라이트모드 — 무료 체크(회색) 아이콘을 더 진하게 */
        body.light .pct-c svg path[stroke="#94a3b8"] { stroke: #9ca3af; }
        /* 라이트모드 — 대시(dash) 아이콘을 진한 회색으로 */
        body.light .pct-c svg path[stroke="#475569"] { stroke: #94a3b8; }
        /* 라이트모드 — Pro 체크(파란색)는 유지 */
        body.light .pct-c svg path[stroke="#60a5fa"] { stroke: #1d4ed8; }

        /* ─── Plan Sheet (전체 화면 플랜 선택) ─── */
        #planSheet {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 9999;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            background: #0d1117;
        }
        body.light #planSheet { background: #f0f4f8; }

        .plan-sheet-inner {
            min-height: 100%;
            display: flex;
            flex-direction: column;
            max-width: 480px;
            margin: 0 auto;
            padding-bottom: 40px;
        }

        .plan-sheet-hero {
            position: relative;
            padding: 56px 20px 32px;
            background: linear-gradient(160deg, #1a2a4a 0%, #0d1117 75%);
            text-align: center;
        }
        body.light .plan-sheet-hero { background: linear-gradient(160deg, #1e3a8a 0%, #1d4ed8 80%); }
        #planSheet[data-plan="vip"] .plan-sheet-hero { background: linear-gradient(160deg, #5c2a0a 0%, #1c1008 75%); }
        body.light #planSheet[data-plan="vip"] .plan-sheet-hero { background: linear-gradient(160deg, #78350f 0%, #d97706 80%); }

        .plan-sheet-close {
            position: absolute;
            top: 16px;
            left: 16px;
            background: rgba(255,255,255,0.13);
            border: none;
            color: #fff;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            font-size: 1rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .plan-sheet-plan-tabs {
            display: flex;
            gap: 8px;
            justify-content: center;
            margin-bottom: 18px;
        }
        .plan-sheet-plan-tab {
            padding: 6px 18px;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 700;
            cursor: pointer;
            border: 1.5px solid rgba(255,255,255,0.22);
            background: transparent;
            color: rgba(255,255,255,0.5);
            transition: all 0.2s;
        }
        .plan-sheet-plan-tab.active {
            background: rgba(255,255,255,0.18);
            color: #fff;
            border-color: rgba(255,255,255,0.5);
        }

        .plan-sheet-title {
            font-size: 2rem;
            font-weight: 900;
            color: #fff;
            margin-bottom: 8px;
            letter-spacing: -0.5px;
        }
        .plan-sheet-sub {
            font-size: 0.88rem;
            color: rgba(255,255,255,0.6);
        }

        .plan-sheet-features {
            margin: 16px 16px 0;
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 16px;
            padding: 4px 16px;
        }
        body.light .plan-sheet-features {
            background: #fff;
            border-color: rgba(0,0,0,0.08);
            box-shadow: 0 1px 6px rgba(0,0,0,0.07);
        }

        .plan-feature-row {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            padding: 12px 0;
            border-bottom: 1px solid rgba(255,255,255,0.05);
        }
        body.light .plan-feature-row { border-bottom-color: rgba(0,0,0,0.06); }
        .plan-feature-row:last-child { border-bottom: none; }

        .plan-feature-icon {
            width: 38px;
            height: 38px;
            background: rgba(255,255,255,0.07);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            font-size: 1.1rem;
        }
        body.light .plan-feature-icon { background: #eff6ff; }

        .plan-feature-title {
            font-size: 0.88rem;
            font-weight: 700;
            color: #f1f5f9;
            margin-bottom: 2px;
        }
        body.light .plan-feature-title { color: #1e293b; }

        .plan-feature-desc {
            font-size: 0.75rem;
            color: #64748b;
            line-height: 1.4;
        }

        .plan-sheet-pricing { padding: 16px 16px 0; }

        .plan-price-options {
            display: flex;
            gap: 10px;
            margin-bottom: 14px;
        }

        .plan-price-opt {
            flex: 1;
            padding: 14px 12px;
            border-radius: 14px;
            border: 2px solid rgba(255,255,255,0.1);
            background: rgba(255,255,255,0.03);
            cursor: pointer;
            transition: border-color 0.2s, background 0.2s;
        }
        body.light .plan-price-opt { background: #fff; border-color: #e2e8f0; }
        .plan-price-opt.active { border-color: #3b82f6; background: rgba(59,130,246,0.09); }
        body.light .plan-price-opt.active { border-color: #1d4ed8; background: rgba(29,78,216,0.05); }
        #planSheet[data-plan="vip"] .plan-price-opt.active { border-color: #d97706; background: rgba(217,119,6,0.09); }

        .plan-price-opt-label {
            font-size: 0.7rem;
            font-weight: 700;
            color: #64748b;
            margin-bottom: 6px;
            display: flex;
            align-items: center;
            gap: 5px;
            text-transform: uppercase;
            letter-spacing: 0.3px;
        }
        .plan-price-opt.active .plan-price-opt-label { color: #3b82f6; }
        body.light .plan-price-opt.active .plan-price-opt-label { color: #1d4ed8; }
        #planSheet[data-plan="vip"] .plan-price-opt.active .plan-price-opt-label { color: #d97706; }

        .plan-discount-badge {
            font-size: 0.6rem;
            background: rgba(253,230,138,0.2);
            color: #fde68a;
            padding: 1px 5px;
            border-radius: 4px;
            font-weight: 800;
            text-transform: none;
            letter-spacing: 0;
        }
        body.light .plan-discount-badge { background: rgba(251,191,36,0.15); color: #b45309; }

        .plan-price-main {
            font-size: 1.5rem;
            font-weight: 900;
            color: #f1f5f9;
            letter-spacing: -0.5px;
            line-height: 1.1;
            margin-bottom: 2px;
        }
        body.light .plan-price-main { color: #0f172a; }

        .plan-price-unit { font-size: 0.82rem; font-weight: 600; color: #94a3b8; }
        body.light .plan-price-unit { color: #64748b; }
        .plan-price-sub { font-size: 0.72rem; color: #64748b; margin-top: 2px; }

        .plan-cta-btn {
            width: 100%;
            padding: 16px;
            border-radius: 14px;
            border: none;
            background: #1d4ed8;
            color: #fff;
            font-size: 1rem;
            font-weight: 800;
            cursor: pointer;
            letter-spacing: -0.3px;
            transition: opacity 0.15s;
        }
        .plan-cta-btn:active { opacity: 0.88; }
        #planSheet[data-plan="vip"] .plan-cta-btn { background: linear-gradient(135deg, #d97706, #f59e0b); }

        .plan-cta-note {
            text-align: center;
            font-size: 0.73rem;
            color: #64748b;
            margin-top: 10px;
        }


        /* ─── 구독 상태 카드 ─── */
        .sub-info-card {
            margin-top: 6px;
            background: rgba(59,130,246,0.08);
            border: 1px solid rgba(59,130,246,0.22);
            border-radius: 12px;
            padding: 12px 14px;
        }
        body.light .sub-info-card {
            background: #1e3a8a;
            border-color: rgba(255,255,255,0.15);
        }

        .sub-info-row {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
        }

        /* 플랜 배지 */
        .sub-plan-badge {
            font-size: 0.75rem;
            font-weight: 700;
            padding: 3px 10px;
            border-radius: 99px;
            background: rgba(59,130,246,0.2);
            color: #93c5fd;
            white-space: nowrap;
        }
        body.light .sub-plan-badge {
            background: rgba(255,255,255,0.18);
            color: #ffffff;
        }
        /* VIP 배지 — 골드 */
        .sub-plan-badge[data-plan="vip"] {
            background: rgba(217,119,6,0.18);
            color: #fbbf24;
        }
        body.light .sub-plan-badge[data-plan="vip"] {
            background: rgba(251,191,36,0.25);
            color: #fde68a;
        }

        /* 날짜 범위 */
        .sub-dates {
            font-size: 0.8rem;
            color: #94a3b8;
            letter-spacing: 0.2px;
        }
        body.light .sub-dates { color: #ffffff; }

        /* 구독 액션 버튼 */
        .sub-action-btn {
            padding: 7px 14px;
            background: none;
            border-radius: 8px;
            font-size: 0.78rem;
            font-weight: 600;
            cursor: pointer;
        }
        .sub-action-cancel {
            border: 1px solid rgba(239,68,68,0.4);
            color: #ef4444;
        }
        body.light .sub-action-cancel {
            background: #ffffff;
            border-color: #ffffff;
            color: #1e293b;
        }
        .sub-action-pause {
            border: 1px solid rgba(251,191,36,0.45);
            color: #fbbf24;
        }
        body.light .sub-action-pause {
            border-color: rgba(253,230,138,0.45);
            color: #fde68a;
        }

        /* 구독관리 버튼 — 라이트 모드 */
        body.light #subCardBtn {
            background: #fff !important;
            border-color: rgba(0,0,0,0.1) !important;
            color: #1e293b !important;
        }
