/* ==========================================================================
   MEZUN RADARI - Modern Veri Odaklı Analitik İstihdam Platformu
   Tasarım Sistemi: Analytical / Data-Dense / Linear-Inspired Slate Theme
   Mobil Odaklı Responsive Tasarım Sistemi
   ========================================================================== */

:root {
    /* Color Palette - Dark Mode (Default) */
    --bg-canvas: #090d16;
    --bg-subtle: #0f172a;
    --bg-surface: #131c31;
    --bg-surface-hover: #18233e;
    --bg-surface-active: #1e2c4d;

    --border-subtle: #1e293b;
    --border-strong: #334155;
    --border-focus: #3b82f6;

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --text-inverse: #090d16;

    /* Technical Cobalt Accent */
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-active: #1e40af;
    --accent-subtle: rgba(37, 99, 235, 0.12);
    --accent-border: rgba(37, 99, 235, 0.35);

    /* Data Visualization Colors */
    --color-defense: #3b82f6;
    --color-fintech: #10b981;
    --color-tech: #6366f1;
    --color-consulting: #8b5cf6;
    --color-health: #ec4899;
    --color-other: #64748b;

    /* Status */
    --status-success: #10b981;
    --status-success-subtle: rgba(16, 185, 129, 0.12);
    --status-warning: #f59e0b;
    --status-warning-subtle: rgba(245, 158, 11, 0.12);

    /* Radius & Spacing */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;

    /* Shadows (Subtle, no neon glows) */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.25);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.25);
    --shadow-input: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
}

[data-theme="light"] {
    --bg-canvas: #f8fafc;
    --bg-subtle: #f1f5f9;
    --bg-surface: #ffffff;
    --bg-surface-hover: #f8fafc;
    --bg-surface-active: #f1f5f9;

    --border-subtle: #e2e8f0;
    --border-strong: #cbd5e1;
    --border-focus: #2563eb;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #64748b;
    --text-inverse: #ffffff;

    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-active: #1e40af;
    --accent-subtle: rgba(37, 99, 235, 0.08);
    --accent-border: rgba(37, 99, 235, 0.25);

    --color-defense: #2563eb;
    --color-fintech: #059669;
    --color-tech: #4f46e5;
    --color-consulting: #7c3aed;
    --color-health: #db2777;
    --color-other: #94a3b8;

    --status-success: #059669;
    --status-success-subtle: rgba(5, 150, 105, 0.1);
    --status-warning: #d97706;
    --status-warning-subtle: rgba(217, 119, 6, 0.1);

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-input: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
}

/* ==========================================================================
   Base Styles & Reset
   ========================================================================== */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-canvas);
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 0.9375rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Fixed-width Tabular Numbers for Data Figures */
.tabular-nums,
.metric-value,
.stat-digit,
.tag-badge-num {
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-variant-numeric: tabular-nums;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Container */
.app-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (max-width: 768px) {
    .app-container {
        padding: 0 1rem;
    }
}

/* ==========================================================================
   Header & Top Navigation (Mobile Bulletproof)
   ========================================================================== */

.app-header {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header-inner {
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.brand-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    background: var(--accent);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
}

.brand-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.brand-name {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
}

.brand-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    background: var(--accent-subtle);
    border: 1px solid var(--accent-border);
    color: var(--accent);
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.brand-subtext {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.telemetry-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--bg-subtle);
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid var(--border-subtle);
    white-space: nowrap;
}

.indicator-dot {
    width: 8px;
    height: 8px;
    background: var(--status-success);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.indicator-dot::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: var(--status-success);
    opacity: 0.4;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.6); opacity: 0; }
}

.theme-toggle-btn {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.theme-toggle-btn:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
    border-color: var(--border-strong);
}

/* Mobile Header Optimizations (< 768px) */
@media (max-width: 768px) {
    .header-inner {
        height: 54px;
    }
    .brand-icon {
        width: 28px;
        height: 28px;
        min-width: 28px;
    }
    .brand-icon svg {
        width: 16px;
        height: 16px;
    }
    .brand-name {
        font-size: 0.9375rem;
    }
    .brand-badge {
        display: none; /* Hide badge on mobile to prevent crushing */
    }
    .brand-subtext {
        display: none; /* Hide subtext on mobile */
    }
    .telemetry-indicator {
        display: none; /* Hide live badge on mobile */
    }
    .theme-btn-text {
        display: none; /* Icon-only on mobile */
    }
    .theme-toggle-btn {
        padding: 0.45rem;
        border-radius: var(--radius-md);
    }
}

/* ==========================================================================
   Hero & Central Filter Console (Critical Zone)
   ========================================================================== */

.hero-section {
    padding: 3.25rem 0 2rem 0;
    border-bottom: 1px solid var(--border-subtle);
    background: radial-gradient(circle at 50% 0%, var(--bg-subtle) 0%, var(--bg-canvas) 100%);
}

.hero-content {
    max-width: 880px;
    margin: 0 auto;
    text-align: center;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-subtle);
    border: 1px solid var(--accent-border);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    margin-bottom: 1.15rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-title {
    font-size: 2.25rem;
    line-height: 1.22;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.hero-title span {
    color: var(--accent);
}

.hero-desc {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto 2rem auto;
    line-height: 1.6;
}

/* Search Console Card */
.search-console-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    padding: 0.75rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.25rem;
}

.search-console-grid {
    display: grid;
    grid-template-columns: 1.5fr 1.5fr 1fr auto;
    gap: 0.5rem;
    align-items: center;
}

.console-field {
    display: flex;
    flex-direction: column;
    text-align: left;
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.875rem;
    position: relative;
    transition: border-color 0.15s ease;
}

.console-field:focus-within {
    border-color: var(--border-focus);
    background: var(--bg-surface);
}

.field-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-tertiary);
    margin-bottom: 0.15rem;
}

.console-select,
.console-input {
    width: 100%;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    outline: none;
    font-family: inherit;
}

.console-select option {
    background-color: var(--bg-surface);
    color: var(--text-primary);
}

.console-btn {
    background: var(--accent);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    padding: 0 1.5rem;
    height: 100%;
    min-height: 52px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color 0.15s ease;
    white-space: nowrap;
}

.console-btn:hover {
    background: var(--accent-hover);
}

/* Quick Filter Tags (Horizontal swipeable on mobile) */
.quick-tags-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8125rem;
}

.quick-tags-label {
    color: var(--text-tertiary);
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 0.25rem;
}

.quick-tag {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 0.28rem 0.65rem;
    border-radius: 9999px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.15s ease;
    user-select: none;
    white-space: nowrap;
}

.quick-tag:hover {
    border-color: var(--border-strong);
    color: var(--text-primary);
    background: var(--bg-surface-hover);
}

.quick-tag.active {
    background: var(--accent-subtle);
    border-color: var(--accent-border);
    color: var(--accent);
    font-weight: 600;
}

/* Mobile Hero Adjustments (< 768px) */
@media (max-width: 768px) {
    .hero-section {
        padding: 1.75rem 0 1.25rem 0;
    }
    .hero-pill {
        font-size: 0.6875rem;
        padding: 0.2rem 0.6rem;
        margin-bottom: 0.75rem;
    }
    .hero-title {
        font-size: 1.55rem;
        line-height: 1.25;
        margin-bottom: 0.65rem;
        letter-spacing: -0.02em;
    }
    .hero-desc {
        font-size: 0.875rem;
        line-height: 1.5;
        margin-bottom: 1.25rem;
        padding: 0 0.25rem;
    }
    .search-console-card {
        padding: 0.55rem;
        border-radius: var(--radius-lg);
    }
    .search-console-grid {
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }
    .console-field {
        padding: 0.45rem 0.75rem;
    }
    .field-label {
        font-size: 0.625rem;
    }
    .console-select,
    .console-input {
        font-size: 0.84rem;
    }
    .console-btn {
        height: 46px;
        min-height: 46px;
        width: 100%;
        font-size: 0.875rem;
        margin-top: 0.2rem;
    }
    .quick-tags-wrapper {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding: 0.25rem 0.25rem 0.5rem 0.25rem;
        gap: 0.4rem;
        scrollbar-width: none;
        margin: 0 -0.5rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    .quick-tags-wrapper::-webkit-scrollbar {
        display: none;
    }
    .quick-tags-label {
        font-size: 0.6875rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
    .quick-tag {
        flex-shrink: 0;
        font-size: 0.72rem;
        padding: 0.32rem 0.6rem;
    }
}

/* ==========================================================================
   Primary Metrics Banner (Key Performance Indicators)
   ========================================================================== */

.metrics-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.kpi-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.15s ease;
}

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

.kpi-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.kpi-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-tertiary);
}

.kpi-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-sm);
}

.kpi-badge.positive {
    background: var(--status-success-subtle);
    color: var(--status-success);
}

.kpi-badge.neutral {
    background: var(--bg-subtle);
    color: var(--text-secondary);
}

.kpi-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.kpi-subtitle {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* Mobile KPI Grid (2x2 Clean Dashboard) */
@media (max-width: 768px) {
    .metrics-strip {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        margin-top: 1.25rem;
        margin-bottom: 1.25rem;
    }
    .kpi-card {
        padding: 0.75rem;
        border-radius: var(--radius-md);
    }
    .kpi-title {
        font-size: 0.625rem;
    }
    .kpi-badge {
        font-size: 0.5625rem;
        padding: 0.05rem 0.25rem;
    }
    .kpi-value {
        font-size: 1.35rem;
        margin-bottom: 0.15rem;
    }
    .kpi-subtitle {
        font-size: 0.625rem;
        line-height: 1.25;
    }
}

/* ==========================================================================
   Two-Column Analytics Dashboard
   ========================================================================== */

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.analytics-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.card-header-flex {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
}

.card-heading-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-heading-desc {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 0.2rem;
}

.card-source-tag {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Sector Breakdown Bars */
.sector-breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sector-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sector-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
}

.sector-name {
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sector-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sector-percent {
    font-weight: 600;
    color: var(--text-secondary);
}

.bar-track {
    height: 8px;
    background: var(--bg-subtle);
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Top Employers Micro Badges */
.employers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
}

.employer-chip {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.75rem 0.875rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.15s ease;
}

.employer-chip:hover {
    border-color: var(--border-strong);
    background: var(--bg-surface-hover);
    transform: translateY(-1px);
}

.employer-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

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

.employer-sector {
    font-size: 0.6875rem;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.employer-rate-badge {
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    background: var(--accent-subtle);
    border: 1px solid var(--accent-border);
    color: var(--accent);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Mobile Dashboard Grid (< 768px) */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 1.25rem;
    }
    .analytics-card {
        padding: 1rem;
        border-radius: var(--radius-md);
    }
    .card-heading-title {
        font-size: 0.9375rem;
    }
    .card-heading-desc {
        font-size: 0.6875rem;
    }
    .employers-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.45rem;
    }
    .employer-chip {
        padding: 0.55rem 0.65rem;
    }
    .employer-name {
        font-size: 0.75rem;
    }
    .employer-sector {
        font-size: 0.625rem;
    }
    .employer-rate-badge {
        font-size: 0.625rem;
        padding: 0.1rem 0.3rem;
    }
}

/* ==========================================================================
   Selected University Dossier Section
   ========================================================================== */

.dossier-spotlight {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.spotlight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.spotlight-uni-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.spotlight-tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    background: var(--status-success-subtle);
    color: var(--status-success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.spotlight-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.spotlight-metric-box {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.spotlight-metric-lbl {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.spotlight-metric-val {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
}

.spotlight-summary-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    padding: 1rem;
    background: var(--bg-subtle);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* Mobile Spotlight (< 768px) */
@media (max-width: 768px) {
    .dossier-spotlight {
        padding: 1rem;
        border-radius: var(--radius-md);
        margin-bottom: 1.25rem;
    }
    .spotlight-header {
        margin-bottom: 0.75rem;
    }
    .spotlight-uni-name {
        font-size: 1.05rem;
    }
    .spotlight-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.4rem;
        margin-bottom: 0.75rem;
    }
    .spotlight-metric-box {
        padding: 0.55rem;
    }
    .spotlight-metric-lbl {
        font-size: 0.5625rem;
        margin-bottom: 0.15rem;
    }
    .spotlight-metric-val {
        font-size: 0.95rem;
    }
    .spotlight-summary-text {
        font-size: 0.8125rem;
        padding: 0.75rem;
        line-height: 1.5;
    }
}

/* ==========================================================================
   Full Data Matrix Table
   ========================================================================== */

.matrix-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.matrix-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.matrix-search-box {
    position: relative;
    max-width: 360px;
    width: 100%;
}

.matrix-search-input {
    width: 100%;
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.875rem 0.5rem 2.25rem;
    color: var(--text-primary);
    font-size: 0.8125rem;
    outline: none;
    font-family: inherit;
    transition: border-color 0.15s ease;
}

.matrix-search-input:focus {
    border-color: var(--border-focus);
    background: var(--bg-surface);
}

.matrix-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 0.875rem;
    pointer-events: none;
    display: flex;
    align-items: center;
}

.table-scroll-hint {
    display: none;
    font-size: 0.6875rem;
    color: var(--text-tertiary);
    text-align: center;
    margin-bottom: 0.5rem;
}

.table-responsive {
    overflow-x: auto;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
    text-align: left;
    white-space: nowrap;
}

.data-table thead {
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.data-table th {
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    font-size: 0.6875rem;
    letter-spacing: 0.04em;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--border-subtle);
    transition: background-color 0.1s ease;
    cursor: pointer;
}

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

.data-table tbody tr:hover {
    background-color: var(--bg-surface-hover);
}

.data-table td {
    padding: 0.875rem 1rem;
    color: var(--text-secondary);
}

.data-table td.cell-primary {
    color: var(--text-primary);
    font-weight: 600;
}

.data-table tr.highlighted {
    background-color: var(--accent-subtle);
    border-left: 3px solid var(--accent);
}

.tag-sector-chip {
    display: inline-block;
    font-size: 0.6875rem;
    padding: 0.15rem 0.45rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

/* Mobile Table (< 768px) */
@media (max-width: 768px) {
    .table-scroll-hint {
        display: block;
    }
    .matrix-section {
        padding: 1rem;
        border-radius: var(--radius-md);
        margin-bottom: 1.25rem;
    }
    .matrix-toolbar {
        gap: 0.75rem;
    }
    .matrix-search-box {
        max-width: 100%;
    }
    .data-table th,
    .data-table td {
        padding: 0.6rem 0.75rem;
        font-size: 0.75rem;
    }
}

/* ==========================================================================
   FAQ & Editorial Policy Section
   ========================================================================== */

.faq-section {
    margin-bottom: 2rem;
}

.faq-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.15s ease;
}

.faq-item:hover {
    border-color: var(--border-strong);
}

.faq-trigger {
    width: 100%;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    gap: 0.75rem;
}

.faq-trigger svg {
    color: var(--text-tertiary);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.faq-content {
    padding: 0 1.25rem 1rem 1.25rem;
    color: var(--text-secondary);
    font-size: 0.84rem;
    line-height: 1.6;
    display: none;
    border-top: 1px solid var(--border-subtle);
    padding-top: 0.875rem;
}

.faq-item.open .faq-content {
    display: block;
}

.faq-item.open .faq-trigger svg {
    transform: rotate(180deg);
}

@media (max-width: 768px) {
    .faq-section {
        margin-bottom: 1.5rem;
    }
    .faq-title {
        font-size: 1.05rem;
    }
    .faq-trigger {
        padding: 0.75rem 1rem;
        font-size: 0.8125rem;
    }
    .faq-content {
        padding: 0.65rem 1rem 0.85rem 1rem;
        font-size: 0.78rem;
    }
}

/* ==========================================================================
   Footer & Legal Disclaimer
   ========================================================================== */

.app-footer {
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    padding: 2.5rem 0;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.legal-box {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.legal-box strong {
    color: var(--text-secondary);
}

.footer-bottom-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-nav {
    display: flex;
    gap: 1.25rem;
}

@media (max-width: 768px) {
    .app-footer {
        padding: 1.75rem 0;
    }
    .legal-box {
        padding: 0.85rem 1rem;
        font-size: 0.6875rem;
    }
    .footer-bottom-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .footer-nav {
        flex-wrap: wrap;
        gap: 0.75rem 1rem;
    }
}

/* Toast Notifications */
.toast-notice {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    color: var(--text-primary);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    z-index: 100;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toast-notice.visible {
    transform: translateY(0);
    opacity: 1;
}

@media (max-width: 768px) {
    .toast-notice {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        justify-content: center;
    }
}
