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

        :root {
            --navy-900: #0f172a;
            --navy-800: #1a2744;
            --navy-700: #1e3a5f;
            --navy-600: #2c4d7a;
            --blue-500: #3b82f6;
            --blue-400: #60a5fa;
            --blue-300: #93c5fd;
            --bg-page: #f4f6fa;
            --bg-card: #ffffff;
            --text-primary: #1e293b;
            --text-secondary: #64748b;
            --text-muted: #94a3b8;
            --border: #e2e8f0;
            --border-strong: #cbd5e1;
            --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 4px rgba(0, 0, 0, 0.03);
            --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
            --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
            --radius-sm: 10px;
            --radius-md: 14px;
            --radius-lg: 20px;
        }

        /* ===== 다크모드 (오후 7시 ~ 오전 7시 자동 적용) ===== */
        body.dark-mode {
            --bg-page: #0f172a;
            --bg-card: #1e293b;
            --text-primary: #e2e8f0;
            --text-secondary: #94a3b8;
            --text-muted: #64748b;
            --border: #334155;
            --border-strong: #475569;
        }
        body.dark-mode { background: var(--bg-page); color: var(--text-primary); }
        body.dark-mode .search-card,
        body.dark-mode .table-card { background: var(--bg-card); border-color: var(--border); }
        body.dark-mode .pagination-bar { background: var(--bg-card); border-color: var(--border); }
        body.dark-mode .pagination-bar select { background: #334155; color: var(--text-primary); border-color: var(--border); }
        body.dark-mode .pagination-bar .pg-btn { background: #334155; color: var(--text-primary); border-color: var(--border); }
        body.dark-mode .pagination-bar .pg-btn:hover { background: #475569; }
        body.dark-mode .pagination-bar .pg-btn.active { background: var(--blue-500); color: #fff; }
        body.dark-mode thead th, body.dark-mode th { background: #1a2744 !important; color: #94a3b8 !important; border-bottom-color: #334155; }
        body.dark-mode thead th[data-sortcol]:hover { background: #22335a !important; }
        body.dark-mode td { background: #1e293b; border-color: var(--border); color: #e2e8f0 !important; }
        /* 야간모드: 인라인 색상 있는 td 전부 흰색으로 통일 */
        body.dark-mode td[style*="color:#047857"] { color: #6ee7b7 !important; }
        body.dark-mode td[style*="color:#0e7490"] { color: #7dd3fc !important; }
        body.dark-mode td[style*="color:#64748b"] { color: #94a3b8 !important; }
        body.dark-mode td[style*="color:#15803d"] { color: #4ade80 !important; }
        body.dark-mode td[style*="color:#92400e"] { color: #fcd34d !important; }
        body.dark-mode tr:nth-child(even) td { background: #263548; }
        body.dark-mode tr:hover td { background: #2d4263 !important; }
        body.dark-mode select,
        body.dark-mode input[type="text"],
        body.dark-mode input[type="date"] {
            background: #1e293b; color: var(--text-primary);
            border-color: var(--border-strong);
        }
        body.dark-mode .checkbox-group { background: #1e293b; border-color: var(--border); }
        body.dark-mode .checkbox-group label { color: var(--text-primary); }
        body.dark-mode .bottom-scrollbar-wrap { background: rgba(30, 41, 59, 0.97); }
        body.dark-mode .btn-ghost { background: #334155; color: var(--text-secondary); border-color: var(--border); }
        body.dark-mode #dark-mode-badge { background: #1e3a5f; color: #93c5fd; }
        /* 다크모드: 사이드바 (다크모드에서도 다크 네이비 유지 — 별도 조정 불필요) */
        body.dark-mode .sidebar { background: linear-gradient(180deg, #0a1020 0%, #0f1a2e 100%); }
        body.dark-mode .mobile-tab-bar { background: #0a1020; border-top-color: rgba(255,255,255,0.06); }
        /* 다크모드: 기존사업자 상호명 */
        body.dark-mode #biz-tbody .mob-sticky { color: #c4b5fd !important; }
        /* 다크모드: 신규가맹 결과값 텍스트 */
        body.dark-mode #new-tbody td { color: #e2e8f0; }
        body.dark-mode #new-tbody .mob-sticky b { color: #e2e8f0 !important; }
        body.dark-mode #new-tbody td b[style*="navy"] { color: #93c5fd !important; }
        body.dark-mode #new-tbody td span[style*="#1d4ed8"] { background: #1e3a5f !important; color: #93c5fd !important; }
        body.dark-mode #new-tbody td span[style*="#2563eb"] { color: #60a5fa !important; }

        /* 다크모드: CSS 클래스 텍스트 색상 수정 */
        body.dark-mode .summary { color: var(--text-primary); }
        /* 야간모드: 검색폼 레이블/서브타이틀 흰색 */
        body.dark-mode .form-label,
        body.dark-mode .form-label[style],
        body.dark-mode .search-form .form-label { color: #e2e8f0 !important; }
        body.dark-mode .page-sub { color: #94a3b8; }
        body.dark-mode .page-title { color: #f1f5f9; }
        body.dark-mode .field-label { color: #94a3b8; }
        body.dark-mode small[style*="color:#94a3b8"] { color: #64748b !important; }

        /* 다크모드: 인라인 dark color → 밝은 색으로 보정 */
        /* td 직접 적용 */
        body.dark-mode td[style*="color:#0f766e"] { color: #2dd4bf !important; }
        body.dark-mode td[style*="color:#2563eb"] { color: #60a5fa !important; }
        body.dark-mode td[style*="color:#dc2626"] { color: #f87171 !important; }
        body.dark-mode td[style*="color:#64748b"] { color: #94a3b8 !important; }
        /* td 내 b 태그 (신규가맹 인허가일자: color:var(--navy-800)) */
        body.dark-mode td b[style*="navy-800"] { color: var(--blue-300) !important; }
        /* td 내 span 태그 */
        body.dark-mode td span[style*="color:#2563eb"] { color: #60a5fa !important; }
        body.dark-mode td span[style*="color:#15803d"] { color: #4ade80 !important; }
        body.dark-mode td span[style*="color:#1d4ed8"] { color: #93c5fd !important; background: #1e3a5f !important; }
        body.dark-mode td span[style*="color:#0369a1"] { color: #38bdf8 !important; background: #0c4a6e !important; }
        body.dark-mode td span[style*="color:#075985"] { color: #7dd3fc !important; background: #0c4a6e !important; }
        body.dark-mode td span[style*="color:#b91c1c"],
        body.dark-mode td div[style*="color:#b91c1c"] { color: #fca5a5 !important; background: #450a0a !important; border-color: #7f1d1d !important; }
        /* 핫스팟 bar-label */
        body.dark-mode .bar-label { color: #4ade80 !important; }
        /* 야간모드: td 내 모든 인라인 컬러 → 흰색 통일 (마지막에 위치해 최종 적용) */
        body.dark-mode td[style*="color"],
        body.dark-mode td span[style*="color"],
        body.dark-mode td b[style*="color"],
        body.dark-mode td div[style*="color"] { color: #e2e8f0 !important; }
        /* 예외: 지도/길찾기 등 링크 버튼 흰색 유지 */
        body.dark-mode td a[href][style*="color:#fff"] { color: #fff !important; }

        /* 다크모드: 협력승마장시설명 배지 가독성 보완 */
        body.dark-mode .partner-badge {
            background: rgba(16, 185, 129, 0.15) !important;
            color: #34d399 !important;
            border-color: rgba(16, 185, 129, 0.35) !important;
        }

        /* 다크모드 배지 — 모바일 전용 (PC는 사이드바 푸터에서 제어) */
        #dark-mode-badge {
            position: fixed;
            bottom: 68px;
            right: 16px;
            background: #e2e8f0;
            color: #475569;
            font-size: 12px;
            font-weight: 600;
            padding: 5px 12px;
            border-radius: 20px;
            z-index: 999;
            cursor: pointer;
            box-shadow: 0 2px 8px rgba(0,0,0,0.15);
            user-select: none;
            display: none;
        }

        @media (max-width: 768px) {
            #dark-mode-badge { display: block; bottom: 68px; }
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
            background: var(--bg-page);
            min-height: 100vh;
            color: var(--text-primary);
        }

        /* ====== SIDEBAR LAYOUT ====== */
        .page-wrapper {
            display: flex;
            min-height: 100vh;
        }

        .sidebar {
            position: fixed;
            left: 0; top: 0; bottom: 0;
            width: 245px;
            background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-800) 100%);
            z-index: 200;
            display: flex;
            flex-direction: column;
            overflow-y: auto;
            scrollbar-width: thin;
            scrollbar-color: rgba(255,255,255,0.12) transparent;
        }

        .sidebar::after {
            content: '';
            position: absolute;
            top: 0; right: 0; bottom: 0; width: 1px;
            background: linear-gradient(180deg, transparent, rgba(249,115,22,0.35) 50%, transparent);
            pointer-events: none;
        }

        .sidebar-header {
            padding: 20px 16px 14px;
            border-bottom: 1px solid rgba(255,255,255,0.07);
            flex-shrink: 0;
            cursor: pointer;
        }

        .sidebar-logo {
            font-size: 17px;
            font-weight: 800;
            color: #fff;
            letter-spacing: -0.5px;
            line-height: 1.3;
            white-space: nowrap;
        }

        .sidebar-logo span {
            color: #f97316;
        }

        .sidebar-subtitle {
            font-size: 10px;
            color: rgba(255,255,255,0.35);
            margin-top: 3px;
            letter-spacing: 0.2px;
        }

        .sidebar-section {
            font-size: 11px;
            font-weight: 700;
            color: #ffffff;
            padding: 14px 14px 4px;
            letter-spacing: 0.8px;
            text-transform: uppercase;
        }

        .sidebar-nav {
            flex: 1;
            padding: 10px 8px;
        }

        .sidebar-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 9px 12px;
            font-size: 15px;
            font-weight: 700;
            color: #ffffff;
            cursor: pointer;
            transition: all 0.15s ease;
            border-left: 3px solid transparent;
            text-decoration: none;
            letter-spacing: -0.2px;
            white-space: nowrap;
            overflow: hidden;
            background: none;
            border-right: none;
            border-top: none;
            border-bottom: none;
            width: 100%;
            text-align: left;
            font-family: inherit;
            border-radius: 9px;
            margin-bottom: 2px;
        }

        .sidebar-item:hover {
            background: rgba(255,255,255,0.07);
            color: #ffffff;
            border-left-color: rgba(249,115,22,0.4);
        }

        .sidebar-item.si-active {
            background: rgba(249,115,22,0.15);
            color: #fff;
            font-weight: 700;
            border-left-color: #f97316;
        }

        .si-icon {
            font-size: 15px;
            flex-shrink: 0;
            width: 22px;
            text-align: center;
        }

        .si-icon-fda {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 22px;
            height: 18px;
            border: 1px solid rgba(255,255,255,0.28);
            border-radius: 4px;
            font-size: 9px;
            font-weight: 800;
            letter-spacing: 0;
            line-height: 1;
            color: #dbeafe;
        }

        .si-label {
            overflow: hidden;
            text-overflow: ellipsis;
            flex: 1;
        }

        .si-badge {
            margin-left: auto;
            background: rgba(249,115,22,0.2);
            color: #fb923c;
            font-size: 10px;
            padding: 2px 7px;
            border-radius: 10px;
            font-weight: 700;
            display: none;
            flex-shrink: 0;
        }

        .si-badge.visible { display: inline-block; }

        .sidebar-footer {
            padding: 10px 8px;
            border-top: 1px solid rgba(255,255,255,0.07);
            flex-shrink: 0;
        }

        .sidebar-dm-btn {
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            color: rgba(255,255,255,0.75);
            font-size: 12.5px;
            padding: 8px 10px;
            border-radius: 8px;
            transition: all 0.15s;
            border: none;
            background: none;
            font-family: inherit;
            width: 100%;
            text-align: left;
        }

        .sidebar-dm-btn:hover {
            background: rgba(255,255,255,0.06);
            color: rgba(255,255,255,0.6);
        }

        .sidebar-notice-btn {
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            color: #93c5fd;
            font-size: 12.5px;
            padding: 8px 10px;
            border-radius: 8px;
            transition: all 0.15s;
            border: none;
            background: rgba(59,130,246,0.12);
            font-family: inherit;
            width: 100%;
            text-align: left;
            margin-bottom: 4px;
            font-weight: 600;
        }
        .sidebar-notice-btn:hover {
            background: rgba(59,130,246,0.22);
            color: #bfdbfe;
        }
        .notice-new-badge {
            margin-left: auto;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 36px;
            padding: 2px 8px;
            border-radius: 999px;
            background: #ef4444;
            color: #fff;
            font-size: 10px;
            font-weight: 800;
            letter-spacing: 0.4px;
            box-shadow: 0 6px 14px rgba(239, 68, 68, 0.28);
        }
        .notice-new-badge[hidden] { display: none !important; }

        /* ====== TOPBAR ====== */
        .topbar {
            height: 52px;
            background: var(--bg-card);
            border-bottom: 1px solid var(--border);
            display: flex;
            align-items: center;
            padding: 0 24px;
            gap: 12px;
            flex-shrink: 0;
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .topbar-bc {
            font-size: 12px;
            color: var(--text-secondary);
        }

        .topbar-bc b {
            color: var(--text-primary);
            font-weight: 700;
        }

        .topbar-right {
            margin-left: auto;
            display: flex;
            gap: 8px;
            align-items: center;
        }

        .topbar-tag {
            font-size: 12px;
            background: #fff7ed;
            color: #c2410c;
            padding: 4px 12px;
            border-radius: 20px;
            font-weight: 700;
            border: 1px solid #fed7aa;
            white-space: nowrap;
        }

        .topbar-btn {
            padding: 7px 14px;
            font-size: 12px;
            font-weight: 600;
            border-radius: 7px;
            border: 1.5px solid var(--border);
            background: var(--bg-card);
            color: var(--text-secondary);
            cursor: pointer;
            white-space: nowrap;
            font-family: inherit;
            transition: all 0.15s;
        }

        .topbar-btn:hover { background: var(--bg-page); }

        body.dark-mode .topbar {
            background: var(--bg-card);
            border-bottom-color: var(--border);
        }

        body.dark-mode .topbar-tag {
            background: #431407;
            color: #fb923c;
            border-color: #7c2d12;
        }

        body.dark-mode .topbar-btn {
            background: #334155;
            color: var(--text-secondary);
            border-color: var(--border);
        }

        /* ====== PAGE HEADER ====== */
        .page-header {
            display: flex;
            align-items: flex-end;
            gap: 14px;
            margin-bottom: 20px;
        }

        .page-header-inner { display: flex; flex-direction: column; gap: 3px; }

        .page-sub {
            font-size: 12px;
            color: var(--text-secondary);
        }

        .page-title {
            font-size: 22px;
            font-weight: 800;
            color: var(--text-primary);
            letter-spacing: -0.5px;
        }

        /* ====== LABELED FORM GRID (기존사업자) ====== */
        .form-row {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
            margin-bottom: 14px;
        }

        .form-group {
            display: flex;
            flex-direction: column;
            gap: 5px;
            flex: 1;
            min-width: 140px;
        }

        .field-label {
            font-size: 10.5px;
            font-weight: 700;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .form-actions {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
        }

        /* redesigned card for biz_info */
        .search-card.card-biz-v2 {
            background: var(--bg-card);
            border-radius: var(--radius-md);
            box-shadow: var(--shadow-md);
            padding: 20px 24px;
            margin-bottom: 18px;
            border: 1px solid var(--border);
        }

        body.dark-mode .search-card.card-biz-v2 {
            background: var(--bg-card);
            border-color: var(--border);
        }

        @media (max-width: 768px) {
            .topbar { padding: 0 12px; height: 46px; }
            .topbar-tag { display: none; }
            .page-title { font-size: 18px; }
            .form-group { min-width: calc(50% - 6px); }
        }

        .main-area {
            margin-left: 245px;
            flex: 1;
            min-width: 0;
        }

        /* ====== MOBILE BOTTOM TAB BAR ====== */
        .mobile-tab-bar {
            display: none;
        }

        /* ====== MAIN CONTAINER ====== */
        .container {
            max-width: 100%;
            padding: 24px 24px 40px;
        }

        /* ====== SEARCH CARD ====== */
        .search-card {
            background: var(--bg-card);
            border-radius: 0 0 var(--radius-md) var(--radius-md);
            box-shadow: var(--shadow-md);
            padding: 28px;
            margin-bottom: 20px;
            border: 1px solid var(--border);
            border-top: none;
        }

        .search-card.card-new {
            border-top: 3px solid #3b82f6;
            border-radius: var(--radius-md);
            margin-top: 0;
        }

        .search-card.card-risk {
            border-top: 3px solid #ef4444;
            border-radius: var(--radius-md);
        }

        .search-card.card-food {
            border-top: 3px solid #f97316;
            border-radius: var(--radius-md);
        }

        .search-card.card-admin-disposal {
            border-top: 3px solid #b45309;
            border-radius: var(--radius-md);
        }

        .search-card.card-biz {
            border-top: 3px solid #8b5cf6;
            border-radius: var(--radius-md);
        }

        .search-form {
            display: flex;
            gap: 12px;
            align-items: center;
            flex-wrap: wrap;
        }

        .form-label {
            font-size: 15px;
            font-weight: 700;
            white-space: nowrap;
        }

        select,
        input[type="text"] {
            padding: 11px 16px;
            font-size: 14px;
            font-family: inherit;
            border: 1px solid var(--border);
            border-radius: var(--radius-sm);
            outline: none;
            background: #fff;
            color: var(--text-primary);
            transition: border-color 0.2s, box-shadow 0.2s;
        }

        select:focus,
        input[type="text"]:focus {
            border-color: var(--blue-500);
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
        }

        /* ====== BUTTONS ====== */
        .btn {
            padding: 11px 24px;
            font-size: 14px;
            font-family: inherit;
            font-weight: 600;
            border: none;
            border-radius: var(--radius-sm);
            cursor: pointer;
            transition: all 0.15s ease;
            white-space: nowrap;
        }

        .btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.12);
        }

        .btn:active {
            transform: translateY(0);
        }

        .btn-primary {
            background: linear-gradient(135deg, #3b82f6, #2563eb);
            color: #fff;
        }

        .btn-risk {
            background: linear-gradient(135deg, #ef4444, #dc2626);
            color: #fff;
        }

        .btn-food {
            background: linear-gradient(135deg, #f97316, #ea580c);
            color: #fff;
        }

        .btn-admin-disposal {
            background: linear-gradient(135deg, #d97706, #b45309);
            color: #fff;
        }

        .btn-biz {
            background: linear-gradient(135deg, #8b5cf6, #7c3aed);
            color: #fff;
        }


        .btn-ghost {
            background: #f8fafc;
            color: var(--text-secondary);
            border: 1px solid var(--border);
        }

        .btn-ghost:hover {
            background: #e2e8f0;
        }

        .btn-excel {
            background: linear-gradient(135deg, #16a34a, #15803d);
            color: #fff;
            float: right;
        }

        /* ====== CHECKBOX GROUP ====== */
        .checkbox-group {
            display: flex;
            flex-wrap: wrap;
            gap: 8px 14px;
            background: #f8fafc;
            border: 1px solid var(--border);
            border-radius: var(--radius-sm);
            padding: 14px 18px;
            width: 100%;
        }

        .checkbox-group label {
            display: flex;
            align-items: center;
            gap: 7px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            color: var(--text-primary);
            padding: 4px 8px;
            border-radius: 8px;
            transition: background 0.15s;
        }

        .checkbox-group label:hover {
            background: #e8f0fe;
        }

        .checkbox-group input[type="checkbox"] {
            width: 18px;
            height: 18px;
            cursor: pointer;
            margin: 0;
            accent-color: var(--blue-500);
        }

        .chk-all-label {
            border-right: 2px solid var(--border-strong);
            padding-right: 14px !important;
            margin-right: 4px;
            color: var(--blue-500) !important;
            font-weight: 700 !important;
        }

        .btn-sort {
            padding: 6px 16px;
            border-radius: 20px;
            border: 1px solid var(--blue-500);
            background: #fff;
            color: var(--blue-500);
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: 0.15s ease;
            font-family: inherit;
        }

        .btn-sort.active {
            background: var(--blue-500);
            color: #fff;
        }

        .btn-sort:hover:not(.active) {
            background: #eff6ff;
        }

        input[type=range] {
            accent-color: var(--blue-500);
            cursor: pointer;
            width: 110px;
        }

        /* ====== SUMMARY + TOOLBAR ====== */
        .toolbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 10px;
            margin-bottom: 14px;
        }

        .summary {
            font-size: 15px;
            font-weight: 700;
            color: var(--navy-800);
        }

        .summary-count {
            color: var(--blue-500);
            font-size: 20px;
        }

        /* ====== TABLE ====== */
        .table-card {
            background: var(--bg-card);
            border-radius: var(--radius-md);
            box-shadow: var(--shadow-sm);
            overflow: hidden;
            border: 1px solid var(--border);
        }

        /* 하단 고정 가로 스크롤바 */
        .bottom-scrollbar-wrap {
            position: sticky;
            bottom: 0;
            width: 100%;
            overflow-x: auto;
            overflow-y: hidden;
            background: rgba(255, 255, 255, 0.97);
            border-top: 2px solid var(--blue-500);
            z-index: 100;
            box-shadow: 0 -2px 10px rgba(59, 130, 246, 0.15);
        }

        .bottom-scrollbar-inner {
            height: 14px;
        }

        .table-wrapper {
            width: 100%;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }

        table {
            width: 100%;
            border-collapse: collapse;
            font-size: 14.5px;
        }

        thead th, th {
            background: #f8fafc;
            color: var(--text-secondary);
            padding: 11px 14px;
            text-align: center;
            white-space: nowrap;
            font-weight: 700;
            font-size: 12px !important;
            position: sticky;
            top: 0;
            z-index: 10;
            border-bottom: 1px solid var(--border);
        }

        thead th:first-child {
            border-radius: 0;
        }

        td {
            border-bottom: 1px solid var(--border);
            padding: 12px 14px;
            text-align: center;
            white-space: nowrap;
            vertical-align: middle;
            background: #ffffff;
            font-size: 13.5px;
            color: #1e293b;
        }
        /* 주간모드: td 내 모든 인라인 컬러 → 검은색 통일 */
        td[style*="color"],
        td span[style*="color"],
        td b[style*="color"],
        td div[style*="color"] { color: #1e293b !important; }
        /* 예외: 지도/길찾기 등 링크 버튼 흰색 유지 */
        td a[href][style*="color:#fff"] { color: #fff !important; }
        /* GMP 변경이력 + 건강기능식품 인허가: 셀 패딩 축소로 가로 스크롤 제거 */
        #gmp-tbody td, .thead-gmp th,
        #hf-tbody td, .thead-health-func th {
            padding: 8px 10px;
        }
        /* GMP: 주소·변경사유 컬럼 줄바꿈 */
        #gmp-tbody td:nth-child(4),
        #gmp-tbody td:nth-child(5) {
            white-space: normal;
            word-break: keep-all;
            text-align: left;
            max-width: 160px;
        }
        #gmp-tbody td:nth-child(3) { min-width: 120px !important; }
        .thead-gmp th:nth-child(3) { min-width: 120px !important; }
        /* health_func: 주소 열 줄바꿈 + 업소명 너비 축소 */
        #hf-tbody td:nth-child(3) {
            white-space: normal;
            word-break: keep-all;
            text-align: left;
            max-width: 180px;
        }
        #hf-tbody td:nth-child(2) { min-width: 120px !important; }
        .thead-health-func th:nth-child(2) { min-width: 120px !important; }

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

        tr:hover td {
            background: #f1f5f9 !important;
            transition: background 0.15s;
        }

        tr:nth-child(even) td {
            background: #f8fafc;
        }

        tr:nth-child(even):hover td {
            background: #f1f5f9;
        }

        /* ====== PAGINATION ====== */
        .pagination-bar {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 14px 16px;
            background: var(--bg-card);
            border-top: 1px solid var(--border);
            flex-wrap: wrap;
        }
        .pagination-bar select {
            padding: 6px 10px;
            border: 1px solid var(--border);
            border-radius: var(--radius-sm);
            font-size: 13px;
            background: #fff;
            cursor: pointer;
        }
        .pagination-bar .pg-btn {
            min-width: 34px;
            height: 34px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border: 1px solid var(--border);
            border-radius: var(--radius-sm);
            background: #fff;
            font-size: 13px;
            cursor: pointer;
            transition: all .15s;
            color: var(--text-main);
        }
        .pagination-bar .pg-btn:hover { background: var(--blue-50); border-color: var(--blue-300); }
        .pagination-bar .pg-btn.active { background: var(--blue-500); color: #fff; border-color: var(--blue-500); font-weight: 700; }
        .pagination-bar .pg-btn:disabled { opacity: .4; cursor: default; background: #f9fafb; }
        .pagination-bar .pg-info { font-size: 13px; color: var(--text-muted); margin: 0 4px; }

        /* biz_info 테이블 헤더 */
        /* thead 색상 오버라이드 제거 — 공통 회색 헤더 사용 */

        /* ====== COLUMN SORT HEADERS ====== */
        thead th[data-sortcol] {
            cursor: pointer;
            user-select: none;
            transition: background 0.15s;
            white-space: nowrap;
        }

        thead th[data-sortcol]:hover {
            background: #eef2f7;
        }

        thead th[data-sortcol] .sort-icon {
            display: inline-block;
            margin-left: 5px;
            font-size: 11px;
            opacity: 0.45;
            transition: opacity 0.15s, transform 0.2s;
            vertical-align: middle;
        }

        thead th[data-sortcol].sort-asc .sort-icon,
        thead th[data-sortcol].sort-desc .sort-icon {
            opacity: 1;
        }

        thead th[data-sortcol].sort-asc .sort-icon::after {
            content: ' ▲';
        }

        thead th[data-sortcol].sort-desc .sort-icon::after {
            content: ' ▼';
        }

        thead th[data-sortcol]:not(.sort-asc):not(.sort-desc) .sort-icon::after {
            content: ' ⇅';
        }

        /* ====== BUILDING TAB ====== */
        .tab.active-building {
            background: #0ea5e9;
            color: #fff;
            font-weight: 700;
            box-shadow: 0 -2px 8px rgba(14, 165, 233, 0.3);
        }

        .search-card.card-building {
            border-top: 3px solid #0ea5e9;
            border-radius: var(--radius-md);
        }

        .btn-building {
            background: linear-gradient(135deg, #0ea5e9, #0284c7);
            color: #fff;
        }

        /* .thead-building th — 색상 제거, 공통 회색 헤더 사용 */
        /* 건축인허가 PC: 대지위치 한 줄 표시 */
        #building-tbody td.mob-sticky { white-space: nowrap; }

        /* ====== CORPORATE FINANCE TAB ====== */
        .search-card.card-finance {
            border-top: 3px solid #0f766e;
            border-radius: var(--radius-md);
        }

        .btn-finance {
            background: linear-gradient(135deg, #0f766e, #115e59);
            color: #fff;
        }

        .finance-note {
            color: var(--text-muted);
            font-size: 12px;
            line-height: 1.6;
            display: block;
            margin-bottom: 12px;
        }

        .finance-panel {
            display: grid;
            gap: 20px;
        }

        .finance-block {
            background: #fff;
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 18px;
            box-shadow: var(--shadow-sm);
        }

        .finance-block-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 14px;
        }

        .finance-block-title {
            font-size: 18px;
            font-weight: 800;
            color: #0f172a;
        }

        .finance-block-sub {
            font-size: 12px;
            color: var(--text-muted);
        }

        .finance-summary-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
            gap: 16px;
        }

        .finance-summary-card {
            border: 1px solid #dbe7e4;
            border-radius: 16px;
            padding: 16px;
            background: linear-gradient(180deg, #f7fbfa 0%, #ffffff 100%);
        }

        .finance-summary-title {
            font-size: 15px;
            font-weight: 800;
            color: #115e59;
            margin-bottom: 6px;
        }

        .finance-summary-date {
            font-size: 12px;
            color: var(--text-muted);
            margin-bottom: 14px;
        }

        .finance-metric-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
        }

        .finance-metric {
            background: #fff;
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            padding: 10px 12px;
        }

        .finance-metric-label {
            display: block;
            font-size: 11px;
            color: var(--text-muted);
            margin-bottom: 6px;
        }

        .finance-metric-value {
            font-size: 15px;
            font-weight: 800;
            color: #0f172a;
            line-height: 1.35;
            word-break: break-word;
        }

        .finance-group {
            margin-top: 14px;
        }

        .finance-group + .finance-group {
            margin-top: 20px;
        }

        .finance-group-label {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: #ecfeff;
            color: #155e75;
            border: 1px solid #bae6fd;
            border-radius: 999px;
            padding: 6px 12px;
            font-size: 12px;
            font-weight: 700;
            margin-bottom: 10px;
        }

        .finance-table-wrap {
            overflow-x: auto;
            overflow-y: visible;
            -webkit-overflow-scrolling: touch;
            border: 1px solid var(--border);
            border-radius: 14px;
        }

        .finance-table {
            width: 100%;
            min-width: 760px;
            border-collapse: collapse;
            background: #fff;
        }

        .finance-table th,
        .finance-table td {
            border-bottom: 1px solid var(--border);
            padding: 11px 12px;
            font-size: 13px;
            text-align: right;
            white-space: nowrap;
        }

        .finance-table th {
            background: #f8fafc;
            color: var(--text-secondary);
            font-weight: 700;
        }

        .finance-table td:first-child,
        .finance-table th:first-child {
            text-align: left;
            position: sticky;
            left: 0;
            background: inherit;
        }

        .finance-table td:first-child {
            background: #fff;
            font-weight: 700;
            color: #0f172a;
        }

        .finance-empty {
            text-align: center;
            color: var(--text-muted);
            font-size: 14px;
            padding: 36px 20px;
            border: 1px dashed var(--border-strong);
            border-radius: 16px;
            background: #fff;
        }

        @media (max-width: 768px) {
            .table-card.table-card-finance {
                overflow: visible;
            }

            .table-card.table-card-finance .finance-panel {
                gap: 14px;
            }

            .finance-block {
                padding: 14px 12px;
                border-radius: 14px;
            }

            .finance-block-head {
                flex-direction: column;
                align-items: flex-start;
            }

            .finance-block-title {
                font-size: 16px;
            }

            .finance-block-sub {
                white-space: normal;
                word-break: break-word;
            }

            .finance-summary-grid {
                grid-template-columns: 1fr;
                gap: 12px;
            }

            .finance-summary-card {
                padding: 14px;
            }

            .finance-metric-grid {
                grid-template-columns: 1fr;
            }

            .finance-group-label {
                white-space: normal;
            }

            .finance-table-wrap {
                margin: 0 -4px;
                border-radius: 12px;
            }

            .finance-table {
                min-width: 640px;
            }

            .finance-table th,
            .finance-table td {
                padding: 10px 8px;
                font-size: 12px;
            }
        }

        /* ====== EMPTY STATE ====== */
        .empty-state {
            text-align: center;
            padding: 60px 20px;
            color: var(--text-muted);
        }

        .empty-state-icon {
            font-size: 48px;
            margin-bottom: 16px;
            opacity: 0.5;
        }

        .empty-state-text {
            font-size: 15px;
            font-weight: 500;
        }

        /* ====== LOADING OVERLAY ====== */
        #loading-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(15, 23, 42, 0.85);
            z-index: 9999;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            color: white;
            text-align: center;
            padding: 20px;
            backdrop-filter: blur(6px);
        }

        .spinner {
            width: 48px;
            height: 48px;
            border: 3px solid rgba(255, 255, 255, 0.12);
            border-top: 3px solid var(--blue-400);
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
            margin-bottom: 20px;
        }

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

        .loading-title {
            font-size: 20px;
            font-weight: 700;
            margin-bottom: 8px;
        }

        .loading-timer {
            font-size: 28px;
            font-weight: 800;
            color: #60a5fa;
            margin-bottom: 12px;
            font-variant-numeric: tabular-nums;
        }

        .loading-sub {
            font-size: 14px;
            color: var(--blue-300);
        }

        /* ====== ERROR MSG ====== */
        .error-msg {
            background: #fef2f2;
            border: 1px solid #fca5a5;
            color: #dc2626;
            font-weight: 600;
            padding: 6px 14px;
            border-radius: 6px;
            font-size: 13px;
        }

        /* ====== G2B LINK (삭제됨) ====== */
        .g2b-link-placeholder {
            display: none;
        }

        /* ====== HACCP TAB ====== */
        .tab.active-haccp {
            background: #0d9488;
            color: #fff;
            font-weight: 700;
            box-shadow: 0 -2px 8px rgba(13, 148, 136, 0.3);
        }

        .tab.active-gmp {
            background: #059669;
            color: #fff;
            font-weight: 700;
            box-shadow: 0 -2px 8px rgba(5, 150, 105, 0.3);
        }


        .search-card.card-haccp {
            border-top: 3px solid #0d9488;
            border-radius: var(--radius-md);
        }

        .btn-haccp {
            background: linear-gradient(135deg, #0d9488, #0f766e);
            color: #fff;
        }

        /* .thead-haccp th — 색상 제거 */

        .search-card.card-smart-haccp {
            border-top: 3px solid #2563eb;
            border-radius: var(--radius-md);
        }

        .btn-smart-haccp {
            background: linear-gradient(135deg, #2563eb, #1d4ed8);
            color: #fff;
        }

        .smart-haccp-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 3px 10px;
            border-radius: 999px;
            font-size: 11.5px;
            font-weight: 700;
            background: #dbeafe;
            color: #1d4ed8;
            white-space: nowrap;
        }

        .smart-haccp-badge.is-muted {
            background: #e2e8f0;
            color: #475569;
        }

        .smart-haccp-meta {
            display: block;
            margin-top: 4px;
            font-size: 11.5px;
            color: var(--text-muted);
        }

        .smart-haccp-table td {
            vertical-align: top;
        }

        .smart-haccp-mobile-list {
            display: none;
        }

        .smart-haccp-card {
            border: 1px solid var(--border);
            border-radius: 16px;
            background: linear-gradient(180deg, rgba(37,99,235,0.06), rgba(255,255,255,0));
            padding: 16px;
        }

        .smart-haccp-card-head {
            display: flex;
            justify-content: space-between;
            gap: 12px;
            align-items: flex-start;
            margin-bottom: 12px;
        }

        .smart-haccp-card-company {
            font-size: 15px;
            font-weight: 800;
            color: #1e40af;
            line-height: 1.4;
        }

        .smart-haccp-card-region {
            margin-top: 5px;
            font-size: 12px;
            color: var(--text-muted);
        }

        .smart-haccp-card-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px 14px;
        }

        .smart-haccp-card-item {
            min-width: 0;
        }

        .smart-haccp-card-item.span-2 {
            grid-column: 1 / -1;
        }

        .smart-haccp-card-label {
            display: block;
            margin-bottom: 4px;
            font-size: 11px;
            font-weight: 700;
            color: var(--text-muted);
        }

        .smart-haccp-card-value {
            display: block;
            font-size: 13px;
            font-weight: 600;
            color: var(--text-primary);
            line-height: 1.55;
            word-break: break-word;
        }

        body.dark-mode .smart-haccp-card-company,
        body.dark-mode .smart-haccp-table td.mob-sticky {
            color: #fff !important;
        }

        body.dark-mode .smart-haccp-table tbody td:nth-child(7),
        body.dark-mode .smart-haccp-table tbody td:nth-child(8) {
            color: #fff !important;
        }

        .ltc-name {
            color: #0f766e;
            font-weight: 700;
            min-width: 190px;
            white-space: normal;
            word-break: keep-all;
        }

        .ltc-num {
            white-space: nowrap;
            font-weight: 700;
            color: #0f766e;
        }

        .ltc-date {
            white-space: nowrap;
            color: #0f766e;
            font-weight: 600;
        }

        .ltc-address {
            min-width: 260px;
            max-width: 360px;
            white-space: normal;
            word-break: keep-all;
            text-align: left;
        }

        body.dark-mode #biz-tbody td.ltc-name,
        body.dark-mode #biz-tbody td.ltc-num,
        body.dark-mode #biz-tbody td.ltc-date {
            color: #fff !important;
        }

        .search-card.card-childcare {
            border-top: 3px solid #7c3aed;
            border-radius: var(--radius-md);
        }

        .btn-childcare {
            background: linear-gradient(135deg, #7c3aed, #6d28d9);
            color: #fff;
        }

        .childcare-table td {
            vertical-align: top;
        }

        #childcare-tbody td:nth-child(2) {
            min-width: 170px;
            max-width: 190px;
            white-space: normal;
            word-break: keep-all;
        }

        #childcare-tbody td:nth-child(3),
        #childcare-tbody td:nth-child(4) {
            white-space: nowrap;
        }

        #childcare-tbody td:nth-child(5) {
            min-width: 240px;
            max-width: 320px;
            white-space: normal;
            word-break: keep-all;
            text-align: left;
        }

        #childcare-tbody td:nth-child(6) {
            min-width: 84px;
            white-space: nowrap;
            text-align: center;
        }

        .childcare-name {
            color: #6d28d9;
            font-weight: 700;
        }

        .childcare-capacity {
            color: #7c3aed;
            font-weight: 700;
        }

        .childcare-region {
            color: var(--text-secondary);
            font-weight: 600;
        }

        .admin-disposal-table td {
            vertical-align: top;
        }

        #admin-disposal-tbody td:nth-child(2) {
            min-width: 210px;
            max-width: 260px;
            white-space: normal;
            word-break: keep-all;
        }

        #admin-disposal-tbody td:nth-child(3) {
            min-width: 108px;
            white-space: nowrap;
        }

        #admin-disposal-tbody td:nth-child(4) {
            min-width: 150px;
        }

        #admin-disposal-tbody td:nth-child(5) {
            min-width: 320px;
            max-width: 420px;
            text-align: left;
            white-space: normal;
            word-break: keep-all;
        }

        #admin-disposal-tbody td:nth-child(6) {
            min-width: 280px;
            max-width: 360px;
            text-align: left;
            white-space: normal;
            word-break: keep-all;
        }

        #admin-disposal-tbody td:nth-child(7) {
            min-width: 220px;
            max-width: 280px;
            text-align: left;
            white-space: normal;
            word-break: keep-all;
        }

        .admin-disposal-name {
            color: #92400e;
            font-weight: 800;
            line-height: 1.45;
        }

        .admin-disposal-meta {
            display: block;
            margin-top: 6px;
            font-size: 12px;
            font-weight: 600;
            color: var(--text-secondary);
            line-height: 1.45;
        }

        .admin-disposal-date {
            color: #b45309;
            font-weight: 800;
            white-space: nowrap;
        }

        .admin-disposal-type-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 4px 10px;
            border-radius: 999px;
            background: #fef3c7;
            color: #92400e;
            font-size: 12px;
            font-weight: 800;
            line-height: 1.2;
        }

        .admin-disposal-subtext {
            display: block;
            margin-top: 6px;
            font-size: 12px;
            line-height: 1.5;
            color: var(--text-secondary);
            white-space: normal;
            word-break: keep-all;
        }

        body.dark-mode .childcare-name,
        body.dark-mode .childcare-table td.mob-sticky {
            color: #fff !important;
        }

        body.dark-mode .childcare-capacity,
        body.dark-mode .childcare-region {
            color: #fff !important;
        }

        body.dark-mode .admin-disposal-name,
        body.dark-mode #admin-disposal-tbody td.mob-sticky,
        body.dark-mode .admin-disposal-date,
        body.dark-mode .admin-disposal-meta,
        body.dark-mode .admin-disposal-subtext {
            color: #fff !important;
        }

        .search-card.card-gmp {
            border-top: 3px solid #059669;
            border-radius: var(--radius-md);
        }
        .btn-gmp {
            background: linear-gradient(135deg, #059669, #047857);
            color: #fff;
        }
        /* .thead-gmp th — 색상 제거 */

        .tab.active-health-func {
            background: #0891b2;
            color: #fff;
            font-weight: 700;
            box-shadow: 0 -2px 8px rgba(8, 145, 178, 0.3);
        }
        .search-card.card-health-func {
            border-top: 3px solid #0891b2;
            border-radius: var(--radius-md);
        }
        .btn-health-func {
            background: linear-gradient(135deg, #0891b2, #0e7490);
            color: #fff;
        }
        /* .thead-health-func th — 색상 제거 */

        .haccp-badge {
            display: inline-block;
            padding: 2px 10px;
            border-radius: 20px;
            font-size: 11.5px;
            font-weight: 700;
            background: #ccfbf1;
            color: #0f766e;
        }

        .haccp-expired {
            background: #fee2e2;
            color: #b91c1c;
        }

        /* ===== 협력승마장 탭 ===== */
        .partner-badge {
            display: inline-block;
            padding: 3px 10px;
            border-radius: 20px;
            font-size: 11.5px;
            font-weight: 700;
            background: #d1fae5; /* Green 100: 차분하고 고급스러운 연민트 그린 */
            color: #065f46;      /* Green 800: 깊은 에메랄드 그린 (글자 가독성 최상) */
            border: 1px solid #a7f3d0; /* Green 200: 명확한 경계선 테두리 */
        }

        .partner-none {
            color: var(--text-muted);
        }

        /* ===== 공동주택 탭 ===== */
        .tab.active-apt {
            background: #b45309;
            color: #fff;
            font-weight: 700;
            box-shadow: 0 -2px 8px rgba(180, 83, 9, 0.3);
        }
        .search-card.card-apt {
            border-top: 3px solid #b45309;
            border-radius: var(--radius-md);
        }
        .btn-apt {
            background: linear-gradient(135deg, #b45309, #92400e);
            color: #fff;
        }
        .apt-result-area {
            padding: 16px;
        }
        .apt-initial-msg {
            text-align: center;
            padding: 48px 20px;
            color: #94a3b8;
        }
        .apt-initial-msg .apt-initial-icon { font-size: 36px; margin-bottom: 12px; }
        .apt-initial-msg .apt-initial-text { font-size: 14px; line-height: 1.6; }
        .apt-detail-card {
            background: var(--bg-page);
            border: 1px solid var(--border);
            border-radius: var(--radius-md);
            padding: 20px;
            margin-bottom: 20px;
        }
        .apt-detail-title {
            font-size: 16px;
            font-weight: 700;
            color: #92400e;
            margin-bottom: 4px;
        }
        .apt-detail-addr {
            font-size: 12px;
            color: var(--text-secondary);
            margin-bottom: 16px;
        }
        .apt-info-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
            gap: 12px;
        }
        .apt-info-section {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 12px 14px;
        }
        .apt-info-section-title {
            font-size: 11px;
            font-weight: 700;
            color: #b45309;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 8px;
            padding-bottom: 6px;
            border-bottom: 1px solid var(--border);
        }
        .apt-info-row {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            padding: 3px 0;
            font-size: 13px;
            gap: 8px;
        }
        .apt-info-label {
            color: var(--text-secondary);
            white-space: nowrap;
            flex-shrink: 0;
        }
        .apt-info-value {
            color: var(--text-primary);
            font-weight: 500;
            text-align: right;
            word-break: break-all;
        }
        .apt-cost-section {
            background: var(--bg-page);
            border: 1px solid var(--border);
            border-radius: var(--radius-md);
            padding: 20px;
        }
        .apt-cost-header {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 14px;
            flex-wrap: wrap;
        }
        .apt-cost-header-title {
            font-size: 14px;
            font-weight: 700;
            color: #92400e;
        }
        .apt-cost-ym {
            padding: 6px 10px;
            border: 1px solid var(--border);
            border-radius: 6px;
            background: var(--bg-card);
            color: var(--text-primary);
            font-size: 13px;
        }
        .apt-cost-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 13px;
        }
        .apt-cost-table th {
            background: #92400e;
            color: #fff;
            padding: 8px 12px;
            text-align: left;
        }
        .apt-cost-table td {
            padding: 8px 12px;
            border-bottom: 1px solid var(--border);
            color: var(--text-primary);
        }
        .apt-cost-table tr:last-child td { border-bottom: none; }
        .apt-cost-amount {
            font-weight: 700;
            color: #b45309;
        }

        /* ====================================================
           📱 모바일 반응형 (768px 이하)
           ==================================================== */
        @media (max-width: 768px) {

            /* --- 사이드바 숨김 → 하단 탭바로 전환 --- */
            .sidebar { display: none; }
            .main-area { margin-left: 0; padding-bottom: 56px; }

            /* --- 모바일 하단 탭바 --- */
            .mobile-tab-bar {
                display: flex;
                position: fixed;
                bottom: 0; left: 0; right: 0;
                height: 56px;
                background: var(--navy-900);
                border-top: 1px solid rgba(255,255,255,0.08);
                z-index: 200;
                overflow-x: auto;
                scrollbar-width: none;
            }
            .mobile-tab-bar::-webkit-scrollbar { display: none; }
            .mobile-tab-item {
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                gap: 2px;
                flex: 0 0 auto;
                min-width: 66px;
                height: 56px;
                padding: 5px 6px;
                color: rgba(255,255,255,0.5);
                text-decoration: none;
                cursor: pointer;
                border: none;
                background: none;
                font-family: inherit;
                transition: color 0.15s;
            }
            .mobile-tab-item:hover { color: rgba(255,255,255,0.85); }
            .mobile-tab-item.mti-active { color: #f97316; }
            .mt-icon { font-size: 18px; line-height: 1; }
            .mt-label { font-size: 9px; white-space: nowrap; font-weight: 500; }

            /* --- 메인 컨테이너 --- */
            .container {
                padding: 14px 10px 32px;
            }

            /* --- 검색 카드 --- */
            .search-card {
                padding: 14px 12px;
            }

            .search-form {
                gap: 8px;
            }

            /* iOS 자동확대(zoom-in) 방지: font-size 반드시 16px 이상 */
            select,
            input[type="text"],
            input[type="date"] {
                font-size: 16px !important;
                padding: 9px 11px;
                width: 100% !important;     /* 모바일에서 전체 너비 */
                min-width: unset !important;
                box-sizing: border-box;
            }

            /* 폼 내부 flex 컨테이너도 100% */
            .search-form > div[style*="flex"] {
                width: 100% !important;
            }

            /* --- 버튼 --- */
            .btn {
                padding: 10px 16px;
                font-size: 14px;
                flex: 1;                   /* 버튼들이 가로 공간을 나눠 가짐 */
            }

            .btn-excel {
                float: none;
                width: 100%;
                margin-top: 6px;
            }

            /* --- 툴바 --- */
            .toolbar {
                flex-direction: column;
                align-items: flex-start;
                gap: 8px;
            }

            .summary {
                font-size: 13px;
            }

            .summary-count {
                font-size: 17px;
            }

            /* --- 체크박스 그룹 --- */
            .checkbox-group {
                padding: 10px 12px;
                gap: 6px 10px;
            }

            .checkbox-group label {
                font-size: 13.5px;
            }

            /* --- 핫스팟 포디엄 --- */
            .podium {
                flex-direction: column;
                gap: 10px;
            }

            .podium-card {
                min-width: unset;
            }

            .podium-region {
                font-size: 18px;
            }

            .podium-count {
                font-size: 28px;
            }

            /* --- 페이지네이션 모바일 --- */
            .pagination-bar {
                gap: 5px;
                padding: 10px 12px;
            }
            .pagination-bar select { font-size: 12px; padding: 5px 8px; }
            .pagination-bar .pg-btn { min-width: 30px; height: 30px; font-size: 12px; }
            .pagination-bar .pg-info { font-size: 11px; }

            /* --- 테이블: 좌우 스크롤 인디케이터 (우측 그림자) --- */
            .table-card {
                position: relative;
            }

            .table-wrapper {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }

            /* 테이블 셀 폰트 조금 작게 */
            table {
                font-size: 13px;
            }

            /* 신규가맹 상호명, 주소 폰트 크기를 업종(대) 12px와 동일하게 */
            #new-tbody td:nth-child(3) b,
            #new-tbody td:nth-child(4) {
                font-size: 12px !important;
            }

            thead th, th {
                padding: 9px 8px;
                font-size: 12px !important;
            }

            td {
                padding: 9px 10px;
            }

            /* --- 하단 스크롤바 모바일에서 숨김 (브라우저 네이티브 터치 스크롤 사용) --- */
            .bottom-scrollbar-wrap {
                display: none;
            }

            /* --- 에러 메시지 --- */
            .smart-haccp-mobile-list {
                display: grid;
                gap: 12px;
                margin-bottom: 14px;
            }

            .smart-haccp-scroll,
            .smart-haccp-table {
                display: none;
            }

            .smart-haccp-card-grid {
                grid-template-columns: 1fr;
                gap: 10px;
            }

            .error-msg {
                font-size: 12px;
                width: 100%;
            }
        }

        /* 초소형(480px): 모바일 탭 아이템 */
        @media (max-width: 480px) {
            .mobile-tab-item { min-width: 58px; }
            .mt-label { font-size: 8.5px; }
        }

        /* ====================================================
           📱 모바일 컬럼 제어
           ==================================================== */

        /* 모바일에서 숨길 컬럼 */
        @media (max-width: 768px) {
            .mob-hide { display: none !important; }
        }

        /* 모바일 Sticky 컬럼 (첫 번째 주요 컬럼) */
        .mob-sticky {
            position: sticky;
            left: 0;
            z-index: 5;
            box-shadow: 2px 0 6px rgba(0,0,0,0.10);
            min-width: 90px;
            max-width: 120px;
            white-space: normal;   /* 줄바꿈 허용 */
            word-break: break-all;
            font-size: 13px;
            background: #ffffff;   /* 수평 스크롤 시 겹침 방지 — 불투명 배경 필수 */
        }
        body.dark-mode .mob-sticky { background: #1e293b; }
        body.dark-mode tr:nth-child(even) .mob-sticky { background: #263548; }
        tr:nth-child(even) .mob-sticky { background: #f8fafc; }
        tr:hover .mob-sticky { background: #f1f5f9 !important; }
        body.dark-mode tr:hover .mob-sticky { background: #2d4263 !important; }

        /* sticky 헤더 셀은 z-index 더 높게 */
        thead th.mob-sticky {
            z-index: 15;
            background: #f8fafc;   /* thead 배경과 일치 */
        }
        body.dark-mode thead th.mob-sticky { background: #1a2744 !important; }

        /* 신규가맹: 상호명 sticky 열 너비 헤더와 일치 */
        #new-tbody td.mob-sticky {
            min-width: 160px;
            max-width: 160px;
            white-space: normal;
            word-break: keep-all;
        }
        #childcare-tbody td.mob-sticky {
            min-width: 160px;
            max-width: 170px;
            white-space: normal;
            word-break: keep-all;
        }
        #admin-disposal-tbody td.mob-sticky {
            min-width: 180px;
            max-width: 200px;
            white-space: normal;
            word-break: keep-all;
        }
        /* 신규가맹: 사업장 주소 열 줄바꿈 허용 → 겹침 해소, 업종(대) 방향으로 압축 */
        #new-tbody td:nth-child(4) {
            white-space: normal;
            word-break: keep-all;
            text-align: left;
            max-width: 220px;
            min-width: 120px;
        }
        /* 모바일 주소 표시 규칙 */
        @media (max-width: 768px) {
            /* 신규사업자·건축인허가 대지위치: 전체 표시, word-break만 */
            .addr-clamp {
                white-space: normal;
                word-break: keep-all;
            }
            #new-tbody td:nth-child(4) {
                min-width: 200px;
                max-width: 260px;
            }
            #childcare-tbody td:nth-child(3) {
                min-width: 78px;
            }
            #childcare-tbody td:nth-child(4) {
                min-width: 130px;
            }
            #childcare-tbody td:nth-child(5) {
                min-width: 220px;
                max-width: 280px;
            }
            #childcare-tbody td:nth-child(6) {
                min-width: 78px;
            }
            #admin-disposal-tbody td:nth-child(3) {
                min-width: 104px;
            }
            #admin-disposal-tbody td:nth-child(4) {
                min-width: 132px;
            }
            #admin-disposal-tbody td:nth-child(5) {
                min-width: 260px;
                max-width: 320px;
            }
            #admin-disposal-tbody td:nth-child(6),
            #admin-disposal-tbody td:nth-child(7) {
                min-width: 220px;
                max-width: 260px;
            }

            /* 건기식·건기식 인허가: 최대 2줄 클램프 */
            .addr-clamp-2 {
                display: -webkit-box;
                -webkit-line-clamp: 2;
                -webkit-box-orient: vertical;
                overflow: hidden;
                word-break: keep-all;
            }
            #gmp-tbody td:nth-child(4)    { min-width: 200px; max-width: 260px; }
            #hf-tbody  td:nth-child(3)    { min-width: 200px; max-width: none; white-space: nowrap; }

            /* 건축인허가: 대지위치·건물명 전체 표시 (스크롤) */
            #building-tbody td.mob-sticky {
                min-width: 200px;
                max-width: none;
                white-space: nowrap;
            }
            #building-tbody td:nth-child(5) {
                min-width: 100px;
                max-width: none;
                white-space: nowrap;
            }
            .thead-building th:nth-child(5) {
                min-width: 100px;
            }
        }

        /* 기존사업자 탭: 너비 최소화 */
        @media (max-width: 768px) {
            #biz-tbody td, .thead-biz th {
                padding: 8px 8px;
            }
            /* 주소 셀 모바일 폰트 축소 */
            #biz-tbody td.biz-addr {
                font-size: 11px !important;
            }
            /* 식품안전나라 업종: 상호명 넓히기 */
            #biz-tbody td.fs-name, .thead-biz th.fs-name {
                min-width: 150px;
                max-width: 200px;
            }
        }

        /* 의약품 업종 배지 */
        .drug-badge {
            display: inline-block; padding: 3px 10px; border-radius: 12px;
            font-size: 11.5px; font-weight: 700; white-space: nowrap;
        }
        .drug-의약품품목제조업 { background: #1e3a5f; color: #7dd3fc; }
        .drug-의약품 { background: #1e3a5f; color: #7dd3fc; }
        .drug-의약외품 { background: #064e3b; color: #6ee7b7; }
        .drug-수입품 { background: #4a1d96; color: #c4b5fd; }
        .drug-수입의약품 { background: #4a1d96; color: #c4b5fd; }
        .drug-원료의약품 { background: #78350f; color: #fcd34d; }
        .drug-의약품판매업 { background: #3b0764; color: #e9d5ff; }
        .drug-GMP { background: #dbeafe; color: #1e40af; }
        .drug-GIP { background: #d1fae5; color: #065f46; }
        .drug-badge:not([class*="drug-의"]):not([class*="drug-수"]):not([class*="drug-원"]):not([class*="drug-GMP"]):not([class*="drug-GIP"]) {
            background: #1e293b; color: #94a3b8;
        }
        body.dark-mode .drug-GMP { background: #1e3a5f; color: #7dd3fc; }
        body.dark-mode .drug-GIP { background: #064e3b; color: #6ee7b7; }

        /* 신규가맹 탭: 너비 조금 줄임 */
        @media (max-width: 768px) {
            #new-tbody td, #dataTable thead:not(.thead-biz):not(.thead-haccp):not(.thead-smart-haccp):not(.thead-childcare):not(.thead-admin-disposal):not(.thead-risk):not(.thead-building):not(.thead-gmp):not(.thead-health-func) th {
                padding: 9px 9px;
            }
            .beta-map-responsive {
                height: calc(100vh - 350px) !important;
                min-height: 400px;
            }
        }
        @media (min-width: 769px) {
            .beta-map-responsive {
                height: 600px !important;
            }
        }

        /* ===================== 공지사항 / 조회 제한 팝업 =====================
           refactor(ee8b5e7)에서 index.html 인라인 CSS 분리 시 누락되어
           팝업이 오버레이로 뜨지 않고 화면 하단에 잘려 노출되던 문제 복구 */
        .notice-overlay {
            display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5);
            z-index: 9100; align-items: center; justify-content: center;
        }
        .notice-overlay.active { display: flex; }
        .notice-modal {
            background: #fff; border-radius: 16px; padding: 28px 30px 22px; width: 420px;
            max-width: 92vw; max-height: 88vh; overflow-y: auto;
            box-shadow: 0 20px 60px rgba(0,0,0,.35); position: relative;
        }
        .notice-title {
            font-size: 17px; font-weight: 800; color: #1e293b; margin: 0 0 18px;
            display: flex; align-items: center; gap: 8px;
        }
        .notice-date-block { margin-bottom: 14px; }
        .notice-date-header {
            font-size: 12.5px; font-weight: 700; color: #2563eb;
            background: #eff6ff; border-radius: 7px; padding: 4px 12px;
            display: inline-block; margin-bottom: 8px;
        }
        .notice-list {
            list-style: none; margin: 0; padding: 0;
        }
        .notice-list li {
            font-size: 13.5px; color: #334155; padding: 3px 0 3px 18px;
            position: relative; line-height: 1.55;
        }
        .notice-list li::before {
            content: 'ㅇ'; position: absolute; left: 0; color: #94a3b8; font-size: 11px; top: 5px;
        }
        .notice-close-btn {
            display: block; width: 100%; margin-top: 20px;
            background: #2563eb; color: #fff; border: none; border-radius: 10px;
            padding: 11px; font-size: 14px; font-weight: 700; cursor: pointer; transition: background .15s;
        }
        .notice-close-btn:hover { background: #1d4ed8; }
        .notice-x {
            position: absolute; top: 16px; right: 18px; background: none; border: none;
            font-size: 20px; cursor: pointer; color: #94a3b8; line-height: 1;
        }
        .notice-x:hover { color: #64748b; }
        .notice-empty { color: #64748b; font-size: 13px; line-height: 1.6; }
        #notice-reopen-btn {
            position: fixed; bottom: 166px; right: 16px;
            background: #2563eb; color: #fff; border: none; border-radius: 20px;
            padding: 8px 16px; font-size: 12.5px; font-weight: 700; cursor: pointer;
            box-shadow: 0 4px 14px rgba(37,99,235,.4); z-index: 8000; transition: all .15s;
            display: none;   /* 모바일에서만 hideNotice() 호출 시 표시 */
        }
        @media (min-width: 769px) {
            #notice-reopen-btn { display: none !important; }  /* PC: 사이드바 버튼으로 대체 */
        }
        #notice-reopen-btn:hover { background: #1d4ed8; transform: scale(1.05); }
        body.dark-mode .notice-modal { background: #1e293b; }
        body.dark-mode .notice-title { color: #f1f5f9; }
        body.dark-mode .notice-list li { color: #cbd5e1; }
        body.dark-mode .notice-date-header { background: #1e3a5f; color: #7dd3fc; }
        body.dark-mode .notice-close-btn { background: #3b82f6; }
        body.dark-mode .notice-close-btn:hover { background: #2563eb; }
        body.dark-mode .notice-x { color: #64748b; }
        body.dark-mode #notice-reopen-btn { background: #3b82f6; box-shadow: 0 4px 14px rgba(59,130,246,.4); }

        /* 식품안전나라 Open-API 이용 제한 안내 팝업 */
        #foodsafetyRestrictOverlay .notice-title { color: #b45309; }
        .fs-restrict-lead {
            font-size: 13.5px; color: #334155; line-height: 1.7; margin: 0 0 14px;
        }
        .fs-restrict-target {
            font-size: 13px; font-weight: 700; color: #b91c1c;
            background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px;
            padding: 10px 12px; margin: 0 0 14px; line-height: 1.55;
        }
        .fs-restrict-period {
            font-size: 13px; font-weight: 700; color: #1e293b; margin: 0 0 14px;
        }
        .fs-restrict-foot {
            font-size: 13px; color: #475569; line-height: 1.6; margin: 0;
        }
        body.dark-mode #foodsafetyRestrictOverlay .notice-title { color: #fbbf24; }
        body.dark-mode .fs-restrict-lead { color: #cbd5e1; }
        body.dark-mode .fs-restrict-target { background: #3b1a1a; border-color: #7f1d1d; color: #fca5a5; }
        body.dark-mode .fs-restrict-period { color: #f1f5f9; }
        body.dark-mode .fs-restrict-foot { color: #cbd5e1; }

        /* ===================== 공기질 현황 페이지 =====================
           refactor(ee8b5e7) 인라인 CSS 분리 시 .aq-* 스타일 블록이 함께
           누락되어 /air_quality 화면이 스타일 없이 평문으로 노출되던 문제 복구 */
        .aq-region-tabs { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; }
        .aq-tab {
            background:var(--bg-card); border:1.5px solid var(--border);
            border-radius:14px; padding:16px 12px; text-align:center;
            cursor:pointer; transition:all 0.2s;
        }
        .aq-tab:hover { transform:translateY(-2px); box-shadow:var(--shadow-md,0 2px 10px rgba(0,0,0,.07)); }
        .aq-tab.active { border-color:#38bdf8; box-shadow:0 0 0 3px rgba(56,189,248,.15); }
        .aq-tab-name { font-size:14px; font-weight:800; color:var(--text-primary,#1e293b); margin-bottom:8px; }
        .aq-tab-vals { display:flex; justify-content:center; gap:14px; }
        .aq-tab-item { text-align:center; }
        .aq-tab-label { font-size:10px; color:var(--text-muted,#94a3b8); display:block; margin-bottom:2px; }
        .aq-tab-num { font-size:20px; font-weight:800; display:block; line-height:1.1; }
        .aq-tab-grade { font-size:10px; font-weight:700; display:inline-block; padding:2px 7px; border-radius:4px; margin-top:3px; }
        .aq-loading { text-align:center; color:var(--text-muted,#94a3b8); padding:30px 0; font-size:14px; }
        .aq-station-box { background:var(--bg-card); border:1.5px solid var(--border,#e2e8f0); border-radius:14px; overflow:hidden; }
        .aq-station-header { padding:14px 18px; border-bottom:1px solid var(--border,#e2e8f0); font-size:13.5px; font-weight:700; color:var(--text-primary,#1e293b); display:flex; align-items:center; gap:8px; }
        .aq-station-list { max-height:400px; overflow-y:auto; }
        .aq-st-row { display:grid; grid-template-columns:120px 1fr; gap:8px; padding:10px 18px; align-items:center; border-left:4px solid transparent; transition:background 0.15s; }
        .aq-st-row:nth-child(even) { background:rgba(0,0,0,.02); }
        body.dark-mode .aq-st-row:nth-child(even) { background:rgba(255,255,255,.03); }
        .aq-st-row:hover { background:rgba(56,189,248,.06); }
        .aq-st-row.gr-1 { border-left-color:#4ade80; }
        .aq-st-row.gr-2 { border-left-color:#60a5fa; }
        .aq-st-row.gr-3 { border-left-color:#fbbf24; }
        .aq-st-row.gr-4 { border-left-color:#f87171; }
        .aq-st-row.gr-0 { border-left-color:#475569; }
        .aq-st-name { font-size:13px; font-weight:600; color:var(--text-primary,#1e293b); display:flex; align-items:center; gap:6px; }
        .aq-st-dot { width:9px; height:9px; border-radius:50%; flex-shrink:0; }
        .aq-st-vals { display:flex; gap:12px; font-size:12px; flex-wrap:wrap; align-items:center; }
        .aq-sv-label { color:var(--text-muted,#94a3b8); }
        .aq-attribution { font-size:11.5px; color:var(--text-muted,#94a3b8); padding:10px 18px; border-top:1px solid var(--border,#e2e8f0); text-align:right; }
        .aq-attribution a { color:#38bdf8; text-decoration:none; }
        .aq-attribution a:hover { text-decoration:underline; }
        .aqg-1 { color:#4ade80; } .aqg-bg-1 { background:rgba(74,222,128,.15); color:#4ade80; }
        .aqg-2 { color:#60a5fa; } .aqg-bg-2 { background:rgba(96,165,250,.15); color:#60a5fa; }
        .aqg-3 { color:#fbbf24; } .aqg-bg-3 { background:rgba(251,191,36,.15); color:#fbbf24; }
        .aqg-4 { color:#f87171; } .aqg-bg-4 { background:rgba(248,113,113,.15); color:#f87171; }
        @media(max-width:768px){
            .aq-region-tabs { grid-template-columns:repeat(2,1fr); gap:10px; }
            .aq-tab-num { font-size:17px; }
            .aq-st-row { grid-template-columns:80px 1fr; padding:8px 14px; }
            .aq-st-vals { gap:8px; font-size:11px; }
        }
