/* ========================================
   Pension Insight - Lando Norris Inspired UI
   Dark Theme + Lime Accent + Bold Typography
   ======================================== */

/* CSS Variables - Dark Theme (Default) */
:root {
    /* Colors - Lando Norris Style */
    --bg-black: #000000;
    --bg-dark: #0a0a0a;
    --bg-card: #111111;
    --bg-card-hover: #1a1a1a;
    --bg-input: #0d0d0d;
    
    /* Accent - Lime Green */
    --lime: #c8ff00;
    --lime-dim: rgba(200, 255, 0, 0.15);
    --lime-glow: 0 0 40px rgba(200, 255, 0, 0.3);
    
    /* Secondary Accents */
    --cyan: #00f0ff;
    --magenta: #ff00aa;
    --blue: #0066ff;
    --green: #00ff88;
    --red: #ff4757;
    
    /* Text */
    --text-white: #ffffff;
    --text-gray: #888888;
    --text-dark: #555555;
    
    /* Borders */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 96px;
    
    /* Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 100px;
    
    /* Fonts */
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Pretendard Variable', 'Outfit', -apple-system, sans-serif;
    
    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 0.2s var(--ease-out);
    --transition-normal: 0.4s var(--ease-out);
    --transition-slow: 0.6s var(--ease-out);
}

/* Light Theme */
[data-theme="light"] {
    --bg-black: #f8f9fa;
    --bg-dark: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f3f4;
    --bg-input: #f8f9fa;
    
    /* Accent - Deep Teal for Light Mode */
    --lime: #00897b;
    --lime-dim: rgba(0, 137, 123, 0.12);
    --lime-glow: 0 0 40px rgba(0, 137, 123, 0.25);
    
    /* Secondary Accents (adjusted for light mode) */
    --cyan: #0097a7;
    --magenta: #d81b60;
    --blue: #1976d2;
    --green: #2e7d32;
    --red: #e53935;
    
    /* Text */
    --text-white: #1a1a2e;
    --text-gray: #5f6368;
    --text-dark: #9aa0a6;
    
    /* Borders */
    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.15);
}

/* Theme Toggle Button */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    border-color: var(--lime);
    transform: scale(1.05);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-icon {
    position: absolute;
    font-size: 1.2rem;
    transition: all 0.4s var(--ease-out);
}

.theme-icon.sun {
    opacity: 0;
    transform: translateY(20px) rotate(-90deg);
}

.theme-icon.moon {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
}

[data-theme="light"] .theme-icon.sun {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
}

[data-theme="light"] .theme-icon.moon {
    opacity: 0;
    transform: translateY(-20px) rotate(90deg);
}

/* Nav Actions Container */
.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-black);
    color: var(--text-white);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Background Effects */
.bg-effects {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.gradient-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.5;
}

.blob-1 {
    width: 800px;
    height: 800px;
    background: var(--lime);
    top: -400px;
    right: -200px;
    opacity: 0.15;
    animation: float-slow 25s ease-in-out infinite;
    transition: opacity 0.4s var(--ease-out);
}

.blob-2 {
    width: 600px;
    height: 600px;
    background: var(--cyan);
    bottom: -300px;
    left: -200px;
    opacity: 0.1;
    animation: float-slow 30s ease-in-out infinite reverse;
    transition: opacity 0.4s var(--ease-out);
}

[data-theme="light"] .blob-1 {
    opacity: 0.08;
}

[data-theme="light"] .blob-2 {
    opacity: 0.06;
}

[data-theme="light"] .noise-overlay {
    opacity: 0.02;
}

@keyframes float-slow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, 30px) scale(1.1); }
}

.noise-overlay {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
}

/* App Wrapper */
.app-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    min-height: 100vh;
}

/* Navigation */
.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--border-color);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.logo-icon {
    color: var(--lime);
    font-size: 1.5rem;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.accent, .accent-text {
    color: var(--lime);
}

.nav-status {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-gray);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--lime);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(200, 255, 0, 0.4); }
    50% { opacity: 0.8; box-shadow: 0 0 0 8px rgba(200, 255, 0, 0); }
}

/* Hero Section */
.hero-section {
    padding: var(--space-4xl) 0;
    text-align: center;
}

.hero-subtitle {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-gray);
    margin-bottom: var(--space-lg);
}

.hero-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: var(--space-xl);
}

.title-line {
    font-family: var(--font-display);
    font-size: clamp(3rem, 12vw, 8rem);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -0.03em;
    text-transform: uppercase;
}

.hero-desc {
    font-size: 1rem;
    color: var(--text-gray);
    max-width: 500px;
    margin: 0 auto;
}

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.section-number {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--lime);
    padding: var(--space-xs) var(--space-sm);
    background: var(--lime-dim);
    border-radius: var(--radius-sm);
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Main Content */
.main-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-3xl);
    padding-bottom: var(--space-4xl);
}

/* Search Section */
.search-section {
    animation: fade-up 0.8s var(--ease-out);
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.search-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    transition: var(--transition-normal);
}

.search-card:hover {
    border-color: var(--border-hover);
}

[data-theme="light"] .search-card {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .search-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.search-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.full-width {
    grid-column: 1 / -1;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.input-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.required {
    color: var(--red);
}

.input-wrapper {
    position: relative;
}

.input-field,
.select-field {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-white);
    transition: var(--transition-fast);
    outline: none;
}

.input-field::placeholder {
    color: var(--text-dark);
}

.input-field:focus,
.select-field:focus {
    border-color: var(--lime);
    box-shadow: 0 0 0 3px var(--lime-dim);
}

.select-field {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

[data-theme="light"] .select-field {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235f6368' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

/* Suggestions */
.workplace-suggestions {
    margin-top: var(--space-md);
}

.suggestions-label span {
    font-size: 0.75rem;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.suggestions-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.suggestion-btn {
    padding: var(--space-xs) var(--space-md);
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-family: inherit;
    font-size: 0.8rem;
    color: var(--text-gray);
    cursor: pointer;
    transition: var(--transition-fast);
}

.suggestion-btn:hover {
    color: var(--bg-black);
    background: var(--lime);
    border-color: var(--lime);
    transform: translateY(-2px);
}

.suggestion-btn.recent-popular {
    background: var(--lime);
    color: var(--bg-black);
    border-color: var(--lime);
    font-weight: 600;
}

/* ========================================
   자동완성 드롭다운 스타일
   ======================================== */
.autocomplete-container {
    position: relative;
    width: 100%;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    margin-top: var(--space-xs);
    background: var(--bg-card);
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    animation: dropdown-fade-in 0.2s var(--ease-out);
}

[data-theme="light"] .autocomplete-dropdown {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border-color: var(--border-color);
}

@keyframes dropdown-fade-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.autocomplete-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    cursor: pointer;
    transition: var(--transition-fast);
    border-bottom: 1px solid var(--border-color);
}

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

.autocomplete-item:hover,
.autocomplete-item.active {
    background: var(--lime-dim);
}

.autocomplete-item.active {
    background: var(--lime);
    color: var(--bg-black);
}

.autocomplete-item-name {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.95rem;
    font-weight: 500;
}

.autocomplete-item-name .highlight {
    color: var(--lime);
    font-weight: 700;
}

.autocomplete-item.active .autocomplete-item-name .highlight {
    color: var(--bg-black);
    text-decoration: underline;
}

.autocomplete-item-badge {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: var(--cyan);
    color: var(--bg-black);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.autocomplete-item.active .autocomplete-item-badge {
    background: rgba(0, 0, 0, 0.2);
    color: var(--bg-black);
}

.autocomplete-item-icon {
    font-size: 0.85rem;
    opacity: 0.6;
}

.autocomplete-empty {
    padding: var(--space-lg);
    text-align: center;
    color: var(--text-dark);
    font-size: 0.85rem;
}

.autocomplete-hint {
    padding: var(--space-sm) var(--space-lg);
    background: var(--bg-input);
    border-top: 1px solid var(--border-color);
    font-size: 0.7rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.autocomplete-hint kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 18px;
    padding: 0 4px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 600;
}

[data-theme="light"] .autocomplete-hint kbd {
    background: #e8eaed;
    border-color: #dadce0;
}

/* Quick Select */
.quick-select {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-lg);
    background: var(--bg-input);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-xl);
}

.quick-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
}

.quick-options {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.quick-option {
    cursor: pointer;
}

.quick-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.quick-btn {
    display: block;
    padding: var(--space-sm) var(--space-lg);
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-gray);
    transition: var(--transition-fast);
}

.quick-radio:checked + .quick-btn {
    background: var(--lime);
    color: var(--bg-black);
    border-color: var(--lime);
    font-weight: 700;
    box-shadow: var(--lime-glow);
}

.quick-option:hover .quick-btn {
    border-color: var(--lime);
    color: var(--lime);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: var(--space-md);
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    border: none;
    border-radius: var(--radius-full);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-primary {
    flex: 1;
    background: var(--lime);
    color: var(--bg-black);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--lime-glow);
}

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

.btn-arrow {
    font-size: 1.2rem;
    transition: transform 0.2s;
}

.btn-primary:hover .btn-arrow {
    transform: translateX(4px);
}

.btn-outline {
    background: transparent;
    color: var(--text-white);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--lime);
    color: var(--lime);
    transform: translateY(-2px);
}

/* Loading */
.loading-section {
    padding: var(--space-3xl);
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
    color: var(--text-gray);
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 2px solid var(--border-color);
    border-top-color: var(--lime);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Error */
.error-message {
    padding: var(--space-lg);
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid rgba(255, 71, 87, 0.3);
    border-radius: var(--radius-lg);
    color: var(--red);
    font-weight: 500;
}

/* Stats Section */
.stats-section {
    animation: fade-up 0.8s var(--ease-out) 0.1s both;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-md);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-xl);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: var(--transition-fast);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
}

[data-theme="light"] .stat-card {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .stat-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 900;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.stat-icon.green {
    background: rgba(0, 255, 136, 0.1);
    color: var(--green);
}

.stat-icon.red {
    background: rgba(255, 71, 87, 0.1);
    color: var(--red);
}

.stat-icon.blue {
    background: rgba(0, 102, 255, 0.1);
    color: var(--blue);
}

.stat-icon.lime {
    background: var(--lime-dim);
    color: var(--lime);
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
}

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

/* Business Tabs */
.business-tabs {
    animation: fade-up 0.8s var(--ease-out);
}

.tabs-header h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-gray);
    margin-bottom: var(--space-md);
}

.tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    align-items: center;
}

.tab-expand-btn {
    padding: var(--space-xs) var(--space-md);
    font-size: 0.75rem;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.expand-count {
    font-weight: 700;
    color: var(--lime);
}

.business-tab {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-fast);
}

.business-tab:hover {
    border-color: var(--lime);
}

.business-tab.active {
    background: var(--lime);
    border-color: var(--lime);
    color: var(--bg-black);
}

.business-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.business-reg-no {
    font-size: 0.75rem;
    opacity: 0.7;
}

.combined-tab {
    background: var(--green);
    border-color: var(--green);
    color: var(--bg-black);
}

.business-checkbox input {
    width: 14px;
    height: 14px;
    accent-color: var(--lime);
}

/* Charts Section */
.charts-section {
    animation: fade-up 0.8s var(--ease-out) 0.2s both;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    transition: var(--transition-fast);
}

.chart-card:hover {
    border-color: var(--border-hover);
}

[data-theme="light"] .chart-card {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .chart-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.chart-card.full-width {
    grid-column: 1 / -1;
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.chart-header h3 {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-gray);
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.chart-header h3::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 14px;
    background: var(--lime);
    border-radius: 2px;
}

.chart-wrapper {
    position: relative;
    height: 280px;
    padding: var(--space-xs);
}

.chart-wrapper canvas {
    border-radius: var(--radius-md);
}
}

/* Table Section */
.table-section {
    animation: fade-up 0.8s var(--ease-out) 0.3s both;
}

.table-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

[data-theme="light"] .table-card {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--bg-input);
}

th {
    padding: var(--space-md) var(--space-lg);
    text-align: left;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dark);
    white-space: nowrap;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: var(--space-md) var(--space-lg);
    font-size: 0.9rem;
    color: var(--text-white);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

tbody tr {
    transition: var(--transition-fast);
}

tbody tr:hover {
    background: var(--bg-card-hover);
}

.no-data {
    padding: var(--space-4xl) !important;
    text-align: center;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    color: var(--text-dark);
}

.empty-icon {
    font-size: 3rem;
    color: var(--lime);
    opacity: 0.5;
}

.text-success {
    color: var(--green) !important;
}

.text-danger {
    color: var(--red) !important;
}

/* Footer */
.app-footer {
    border-top: 1px solid var(--border-color);
    padding: var(--space-xl) 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
    margin-bottom: var(--space-md);
}

.footer-service-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-address {
    font-size: 0.72rem;
    font-style: normal;
    color: var(--text-dark);
}

.footer-address a {
    color: var(--text-dark);
    text-decoration: none;
}

.footer-address a:hover {
    color: var(--accent-primary);
    text-decoration: underline;
}

.footer-policy {
    margin-left: auto;
}

.footer-policy a {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
}

.footer-policy a:hover {
    color: var(--accent-primary);
    text-decoration: underline;
}

.footer-disclaimer {
    font-size: 0.68rem;
    color: var(--text-dark);
    line-height: 1.6;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border-color);
    opacity: 0.8;
}

.footer-copyright {
    font-size: 0.68rem;
    color: var(--text-dark);
    text-align: center;
    margin-top: var(--space-sm);
    opacity: 0.6;
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-card);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-dark);
}

[data-theme="light"] ::-webkit-scrollbar-track {
    background: #e8eaed;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: #dadce0;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: #bdc1c6;
}

/* Selection */
::selection {
    background: var(--lime);
    color: var(--bg-black);
}

/* Focus */
:focus-visible {
    outline: 2px solid var(--lime);
    outline-offset: 2px;
}

/* Responsive */
@media (max-width: 1024px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-card.full-width {
        grid-column: 1;
    }
}

@media (max-width: 768px) {
    :root {
        font-size: 14px;
    }
    
    .app-wrapper {
        padding: 0 var(--space-md);
    }
    
    .hero-section {
        padding: var(--space-2xl) 0;
    }
    
    .title-line {
        font-size: clamp(2.5rem, 15vw, 5rem);
    }
    
    .search-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-select {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        flex-direction: column;
        gap: var(--space-sm);
        text-align: center;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: var(--space-md);
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .nav-status {
        display: none;
    }
    
    .theme-toggle {
        width: 40px;
        height: 40px;
    }
    
    .theme-icon {
        font-size: 1rem;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   사업자 유형 배지 스타일
   ======================================== */
.biz-type-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: var(--radius-full);
    white-space: nowrap;
    text-align: center;
}

/* 법인(영리) 본점/지점 - 블루 */
.biz-type-corp {
    background: rgba(0, 102, 255, 0.15);
    color: var(--blue);
    border: 1px solid rgba(0, 102, 255, 0.3);
}

[data-theme="light"] .biz-type-corp {
    background: rgba(25, 118, 210, 0.1);
    color: #1565c0;
    border: 1px solid rgba(25, 118, 210, 0.25);
}

/* 법인(비영리) - 퍼플 */
.biz-type-nonprofit {
    background: rgba(156, 39, 176, 0.15);
    color: #ce93d8;
    border: 1px solid rgba(156, 39, 176, 0.3);
}

[data-theme="light"] .biz-type-nonprofit {
    background: rgba(156, 39, 176, 0.1);
    color: #7b1fa2;
    border: 1px solid rgba(156, 39, 176, 0.25);
}

/* 개인 과세사업자 - 그린 */
.biz-type-individual {
    background: rgba(0, 255, 136, 0.12);
    color: var(--green);
    border: 1px solid rgba(0, 255, 136, 0.25);
}

[data-theme="light"] .biz-type-individual {
    background: rgba(46, 125, 50, 0.1);
    color: #2e7d32;
    border: 1px solid rgba(46, 125, 50, 0.25);
}

/* 개인 면세사업자 - 시안 */
.biz-type-taxfree {
    background: rgba(0, 240, 255, 0.12);
    color: var(--cyan);
    border: 1px solid rgba(0, 240, 255, 0.25);
}

[data-theme="light"] .biz-type-taxfree {
    background: rgba(0, 151, 167, 0.1);
    color: #00838f;
    border: 1px solid rgba(0, 151, 167, 0.25);
}

/* 국가·지방자치단체 - 골드 */
.biz-type-gov {
    background: rgba(255, 193, 7, 0.15);
    color: #ffd54f;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

[data-theme="light"] .biz-type-gov {
    background: rgba(255, 160, 0, 0.1);
    color: #f57c00;
    border: 1px solid rgba(255, 160, 0, 0.25);
}

/* 외국법인 - 마젠타 */
.biz-type-foreign {
    background: rgba(255, 0, 170, 0.12);
    color: var(--magenta);
    border: 1px solid rgba(255, 0, 170, 0.25);
}

[data-theme="light"] .biz-type-foreign {
    background: rgba(216, 27, 96, 0.1);
    color: #c2185b;
    border: 1px solid rgba(216, 27, 96, 0.25);
}

/* 종교단체 - 오렌지 */
.biz-type-religious {
    background: rgba(255, 138, 101, 0.15);
    color: #ffab91;
    border: 1px solid rgba(255, 138, 101, 0.3);
}

[data-theme="light"] .biz-type-religious {
    background: rgba(230, 74, 25, 0.1);
    color: #e64a19;
    border: 1px solid rgba(230, 74, 25, 0.25);
}

/* 기타/미분류 - 그레이 */
.biz-type-other {
    background: rgba(136, 136, 136, 0.15);
    color: var(--text-gray);
    border: 1px solid rgba(136, 136, 136, 0.25);
}

[data-theme="light"] .biz-type-other {
    background: rgba(95, 99, 104, 0.1);
    color: #5f6368;
    border: 1px solid rgba(95, 99, 104, 0.2);
}

/* 탭 내 배지 스타일 조정 */
.business-tab .biz-type-badge {
    margin-left: 8px;
    font-size: 0.65rem;
    padding: 2px 8px;
}

/* 테이블 내 배지 스타일 조정 */
#dataTable .biz-type-badge {
    font-size: 0.65rem;
    padding: 3px 8px;
}

/* ========================================
   지도 섹션 스타일
   ======================================== */
.map-section {
    animation: fade-up 0.8s var(--ease-out) 0.25s both;
}

.map-card {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    overflow: hidden;
    transition: var(--transition-fast);
}

.map-card:hover {
    border-color: var(--border-hover);
}

[data-theme="light"] .map-card {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .map-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.map-container {
    width: 100%;
    height: 450px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
}

/* Leaflet 다크모드 스타일 오버라이드 */
.leaflet-container {
    background: var(--bg-input) !important;
    font-family: var(--font-body) !important;
}

.leaflet-popup-content-wrapper {
    background: var(--bg-card) !important;
    color: var(--text-white) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
    border: 1px solid var(--border-color) !important;
}

.leaflet-popup-tip {
    background: var(--bg-card) !important;
}

.leaflet-popup-content {
    margin: var(--space-md) !important;
    line-height: 1.5 !important;
}

[data-theme="light"] .leaflet-popup-content-wrapper {
    background: #ffffff !important;
    color: #333333 !important;
    border: 1px solid #e0e0e0 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
}

[data-theme="light"] .leaflet-popup-tip {
    background: #ffffff !important;
}

[data-theme="light"] .map-popup-title {
    color: var(--lime) !important;
    border-bottom-color: #e0e0e0 !important;
}

[data-theme="light"] .map-popup-info strong {
    color: #333333 !important;
}

.leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.leaflet-control-zoom a {
    background: var(--bg-card) !important;
    color: var(--text-white) !important;
    border: 1px solid var(--border-color) !important;
    transition: var(--transition-fast) !important;
}

.leaflet-control-zoom a:hover {
    background: var(--bg-card-hover) !important;
    color: var(--lime) !important;
}

[data-theme="light"] .leaflet-control-zoom a {
    background: #ffffff !important;
    color: #333333 !important;
    border: 1px solid #ddd !important;
}

[data-theme="light"] .leaflet-control-zoom a:hover {
    background: #f4f4f4 !important;
    color: var(--lime) !important;
}

.leaflet-control-attribution {
    background: rgba(0, 0, 0, 0.6) !important;
    color: var(--text-dark) !important;
    font-size: 10px !important;
}

[data-theme="light"] .leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.8) !important;
}

/* 지도 팝업 스타일 */
.map-popup {
    min-width: 200px;
}

.map-popup-title {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--lime);
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border-color);
}

.map-popup-info {
    font-size: 0.8rem;
    color: var(--text-gray);
}

.map-popup-info p {
    margin: var(--space-xs) 0;
}

.map-popup-info strong {
    color: var(--text-white);
}

/* 지도 범례 */
.map-legend {
    display: flex;
    flex-direction: column;
    background: var(--bg-input);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.legend-header {
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
}

.legend-title {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-gray);
}

.legend-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-sm);
    max-height: 390px;
}

.legend-empty {
    text-align: center;
    color: var(--text-dark);
    font-size: 0.85rem;
    padding: var(--space-xl);
}

.legend-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    margin-bottom: var(--space-xs);
}

.legend-item:hover {
    background: var(--bg-card-hover);
}

.legend-item.active {
    background: var(--lime-dim);
    border: 1px solid var(--lime);
}

.legend-marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--lime);
    flex-shrink: 0;
    margin-top: 4px;
    box-shadow: 0 0 8px var(--lime);
}

.legend-marker.error {
    background: var(--red);
    box-shadow: 0 0 8px var(--red);
}

.legend-info {
    flex: 1;
    min-width: 0;
}

.legend-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.legend-address {
    font-size: 0.75rem;
    color: var(--text-gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.legend-members {
    font-size: 0.7rem;
    color: var(--cyan);
    margin-top: 2px;
}

/* 지도 로딩/에러 */
.map-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--lime-dim);
    border-radius: var(--radius-md);
    margin-top: var(--space-md);
    color: var(--lime);
    font-size: 0.9rem;
}

.map-error {
    padding: var(--space-md) var(--space-lg);
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid rgba(255, 71, 87, 0.3);
    border-radius: var(--radius-md);
    color: var(--red);
    font-size: 0.85rem;
    margin-top: var(--space-md);
}

/* 작은 버튼 스타일 */
.btn-sm {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.75rem;
    margin-left: auto;
}

/* 섹션 헤더 - 버튼 포함 시 정렬 */
.section-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

/* 반응형 지도 */
@media (max-width: 1024px) {
    .map-card {
        grid-template-columns: 1fr;
    }
    
    .map-legend {
        order: 2;
        max-height: 250px;
    }
    
    .legend-content {
        max-height: 200px;
    }
    
    .map-container {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .map-container {
        height: 300px;
    }
    
    .map-legend {
        max-height: 200px;
    }
    
    .legend-content {
        max-height: 150px;
    }
}

/* 커스텀 마커 스타일 */
.custom-marker {
    background: var(--lime);
    border: 3px solid var(--bg-black);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    box-shadow: 0 0 12px var(--lime), 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}

.custom-marker:hover {
    transform: scale(1.2);
    box-shadow: 0 0 20px var(--lime), 0 4px 12px rgba(0, 0, 0, 0.5);
}

.custom-marker.selected {
    background: var(--cyan);
    box-shadow: 0 0 20px var(--cyan), 0 4px 12px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .custom-marker {
    border: 3px solid #ffffff;
    box-shadow: 0 0 8px var(--lime), 0 2px 6px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .custom-marker:hover {
    box-shadow: 0 0 16px var(--lime), 0 4px 10px rgba(0, 0, 0, 0.35);
}

/* Leaflet 다크 타일 필터 (선택적) */
.leaflet-tile-container img {
    filter: brightness(0.85) contrast(1.1) saturate(0.9);
}

[data-theme="light"] .leaflet-tile-container img {
    filter: none;
}

/* ========================================
   사업자 정보 섹션 스타일
   ======================================== */
.business-operator-section {
    animation: fade-up 0.8s var(--ease-out) 0.15s both;
}

.operator-info-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 4px 12px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    border-radius: var(--radius-full);
    background: var(--cyan);
    color: var(--bg-black);
    text-transform: uppercase;
    margin-left: auto;
}

.operator-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: var(--space-lg);
}

.operator-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: var(--transition-fast);
}

.operator-card:hover {
    transform: translateY(-4px);
    border-color: var(--lime);
    box-shadow: var(--lime-glow);
}

[data-theme="light"] .operator-card {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .operator-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.operator-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--bg-input);
    border-bottom: 1px solid var(--border-color);
}

.operator-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--lime);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.operator-type-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: var(--radius-full);
    white-space: nowrap;
    flex-shrink: 0;
}

/* 통신판매사업자 - 시안 */
.operator-type-online {
    background: rgba(0, 240, 255, 0.15);
    color: var(--cyan);
    border: 1px solid rgba(0, 240, 255, 0.3);
}

[data-theme="light"] .operator-type-online {
    background: rgba(0, 151, 167, 0.1);
    color: #00838f;
    border: 1px solid rgba(0, 151, 167, 0.25);
}

/* 방문판매사업자 - 그린 */
.operator-type-visit {
    background: rgba(0, 255, 136, 0.12);
    color: var(--green);
    border: 1px solid rgba(0, 255, 136, 0.25);
}

[data-theme="light"] .operator-type-visit {
    background: rgba(46, 125, 50, 0.1);
    color: #2e7d32;
    border: 1px solid rgba(46, 125, 50, 0.25);
}

/* 후원방문판매사업자 - 마젠타 */
.operator-type-sponsor {
    background: rgba(255, 0, 170, 0.12);
    color: var(--magenta);
    border: 1px solid rgba(255, 0, 170, 0.25);
}

[data-theme="light"] .operator-type-sponsor {
    background: rgba(216, 27, 96, 0.1);
    color: #c2185b;
    border: 1px solid rgba(216, 27, 96, 0.25);
}

/* 전화권유판매사업자 - 블루 */
.operator-type-phone {
    background: rgba(0, 102, 255, 0.15);
    color: var(--blue);
    border: 1px solid rgba(0, 102, 255, 0.3);
}

[data-theme="light"] .operator-type-phone {
    background: rgba(25, 118, 210, 0.1);
    color: #1565c0;
    border: 1px solid rgba(25, 118, 210, 0.25);
}

/* 다단계판매사업자 - 오렌지 */
.operator-type-mlm {
    background: rgba(255, 138, 101, 0.15);
    color: #ffab91;
    border: 1px solid rgba(255, 138, 101, 0.3);
}

[data-theme="light"] .operator-type-mlm {
    background: rgba(230, 74, 25, 0.1);
    color: #e64a19;
    border: 1px solid rgba(230, 74, 25, 0.25);
}

/* 기타 - 그레이 */
.operator-type-other {
    background: rgba(136, 136, 136, 0.15);
    color: var(--text-gray);
    border: 1px solid rgba(136, 136, 136, 0.25);
}

[data-theme="light"] .operator-type-other {
    background: rgba(95, 99, 104, 0.1);
    color: #5f6368;
    border: 1px solid rgba(95, 99, 104, 0.2);
}

.operator-type-prepaid {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.25);
}

[data-theme="light"] .operator-type-prepaid {
    background: rgba(217, 119, 6, 0.1);
    color: #d97706;
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.operator-financials {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
    margin-top: 0.25rem;
}

.financial-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
    min-width: 80px;
}

.financial-label {
    font-size: 0.7rem;
    color: var(--text-gray);
}

.financial-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-primary);
}

.operator-card-body {
    padding: var(--space-lg);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm) var(--space-md);
}

.operator-info-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.operator-info-row.full-width {
    grid-column: 1 / -1;
}

.operator-info-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dark);
}

.operator-info-value {
    font-size: 0.9rem;
    color: var(--text-white);
    word-break: break-word;
}

.operator-info-value a {
    color: var(--cyan);
    text-decoration: none;
    transition: var(--transition-fast);
}

.operator-info-value a:hover {
    color: var(--lime);
    text-decoration: underline;
}

/* 업소상태 스타일 */
.status-active {
    color: var(--green) !important;
    font-weight: 600;
}

.status-closed {
    color: var(--red) !important;
    font-weight: 600;
}

/* 사업자 정보 빈 상태 */
.operator-info-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-3xl);
    color: var(--text-dark);
    text-align: center;
}

.operator-info-empty .empty-icon {
    font-size: 3rem;
    opacity: 0.5;
}

/* 반응형 사업자 정보 */
@media (max-width: 768px) {
    .operator-info-grid {
        grid-template-columns: 1fr;
    }
    
    .operator-card-body {
        grid-template-columns: 1fr;
    }
    
    .operator-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }
    
    .operator-name {
        width: 100%;
    }
}
