/* ==========================================================================
   TRUDATLAS UNIFIED LIGHT DESIGN SYSTEM ("Editorial Data Atlas")
   Design Tokens, Typography, Layout, Components & Dark Theme Readiness
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Typography Imports (Cyrillic-capable distinctive editorial typography)
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Golos+Text:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

:root {
    /* ----------------------------------------------------------------------
       1.1 Primitive Palette (Базовая палитра)
       ---------------------------------------------------------------------- */
    /* Spruce / Deep Teal Scale (Primary Interactive Accent) */
    --palette-spruce-50:  #f0fdfa;
    --palette-spruce-100: #ccfbf1;
    --palette-spruce-200: #99f6e4;
    --palette-spruce-300: #5eead4;
    --palette-spruce-400: #2dd4bf;
    --palette-spruce-500: #14b8a6;
    --palette-spruce-600: #0d9488;
    --palette-spruce-700: #0f766e;
    --palette-spruce-800: #115e59;
    --palette-spruce-900: #134e4a;
    --palette-spruce-950: #042f2e;

    /* Warm Mineral Canvas & Stone Scale */
    --palette-mineral-25: #fdfcfb;
    --palette-mineral-50: #fbfaf7;
    --palette-mineral-100: #f4efe9;
    --palette-mineral-200: #e8e1d5;
    --palette-mineral-300: #d8cebf;
    --palette-mineral-400: #b5a793;

    /* Deep Ink & Slate Scale (Text & Neutral Surfaces) */
    --palette-ink-50:  #f8fafc;
    --palette-ink-100: #f1f5f9;
    --palette-ink-200: #e2e8f0;
    --palette-ink-300: #cbd5e1;
    --palette-ink-400: #94a3b8;
    --palette-ink-500: #64748b;
    --palette-ink-600: #475569;
    --palette-ink-700: #334155;
    --palette-ink-800: #1e293b;
    --palette-ink-900: #0e1726;
    --palette-ink-950: #080d17;

    /* Semantic Amber (Warning / Stale Data / Cooldown) */
    --palette-amber-50:  #fffbeb;
    --palette-amber-100: #fef3c7;
    --palette-amber-200: #fde68a;
    --palette-amber-600: #d97706;
    --palette-amber-700: #b45309;
    --palette-amber-800: #92400e;

    /* Semantic Crimson / Rose (Danger / Missing Data / Errors) */
    --palette-rose-50:  #fff1f2;
    --palette-rose-100: #ffe4e6;
    --palette-rose-200: #fecdd3;
    --palette-rose-600: #e11d48;
    --palette-rose-700: #be123c;
    --palette-rose-800: #9f1239;

    /* Semantic Emerald (Success / High Coverage / Fresh) */
    --palette-emerald-50:  #f0fdf4;
    --palette-emerald-100: #dcfce7;
    --palette-emerald-200: #bbf7d0;
    --palette-emerald-600: #16a34a;
    --palette-emerald-700: #15803d;
    --palette-emerald-800: #166534;

    /* Semantic Azure (Informational / Regional Selection) */
    --palette-azure-50:  #f0f9ff;
    --palette-azure-100: #e0f2fe;
    --palette-azure-200: #bae6fd;
    --palette-azure-600: #0284c7;
    --palette-azure-700: #0369a1;
    --palette-azure-800: #075985;

    /* ----------------------------------------------------------------------
       1.2 Typography Stacks
       ---------------------------------------------------------------------- */
    --font-brand: 'Plus Jakarta Sans', 'Golos Text', 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-sans: 'Golos Text', 'Manrope', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

    /* ----------------------------------------------------------------------
       1.3 Spacing Scale
       ---------------------------------------------------------------------- */
    --spacing-2xs: 4px;
    --spacing-xs: 6px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    --spacing-3xl: 64px;

    /* ----------------------------------------------------------------------
       1.4 Geometry: Radii Scale
       ---------------------------------------------------------------------- */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --radius-pill: 9999px;

    /* ----------------------------------------------------------------------
       1.5 Elevation & Shadows
       ---------------------------------------------------------------------- */
    --shadow-xs: 0 1px 2px rgba(14, 23, 38, 0.04);
    --shadow-sm: 0 1px 3px rgba(14, 23, 38, 0.06), 0 1px 2px rgba(14, 23, 38, 0.04);
    --shadow-md: 0 4px 8px -1px rgba(14, 23, 38, 0.07), 0 2px 4px -2px rgba(14, 23, 38, 0.04);
    --shadow-lg: 0 12px 24px -4px rgba(14, 23, 38, 0.09), 0 4px 8px -2px rgba(14, 23, 38, 0.04);
    --shadow-card: 0 1px 3px rgba(14, 23, 38, 0.05), 0 0 0 1px rgba(14, 23, 38, 0.04);
    --shadow-card-hover: 0 8px 20px -2px rgba(14, 23, 38, 0.08), 0 2px 6px -1px rgba(14, 23, 38, 0.04);
    --shadow-focus: 0 0 0 3px rgba(15, 118, 110, 0.25);

    /* ----------------------------------------------------------------------
       1.6 Semantic Tokens: LIGHT THEME (Default)
       ---------------------------------------------------------------------- */
    /* Surfaces */
    --color-bg-page: var(--palette-mineral-50);
    --color-surface-card: #ffffff;
    --color-surface-muted: var(--palette-mineral-100);
    --color-surface-subtle: #f8fafc;
    --color-surface-elevated: #ffffff;
    --color-surface-hover: var(--palette-spruce-50);
    --color-surface-active: var(--palette-spruce-100);

    /* Text */
    --color-text-primary: var(--palette-ink-900);
    --color-text-secondary: var(--palette-ink-600);
    --color-text-muted: var(--palette-ink-400);
    --color-text-subtle: var(--palette-ink-500);
    --color-text-inverse: #ffffff;

    /* Borders */
    --color-border-subtle: var(--palette-mineral-200);
    --color-border-default: var(--palette-mineral-300);
    --color-border-strong: var(--palette-ink-300);
    --color-border-focus: var(--palette-spruce-700);

    /* Primary Interactive Accent (Spruce) */
    --color-accent-primary: var(--palette-spruce-700);
    --color-accent-hover: var(--palette-spruce-800);
    --color-accent-active: var(--palette-spruce-900);
    --color-accent-subtle: var(--palette-spruce-100);
    --color-accent-contrast: #ffffff;
    --color-accent-text: var(--palette-spruce-900);

    /* Secondary Brand (Slate) */
    --color-brand-secondary: var(--palette-ink-800);
    --color-brand-secondary-hover: var(--palette-ink-950);

    /* Feedback & Status Panels */
    --color-status-info-bg: var(--palette-spruce-100);
    --color-status-info-border: var(--palette-spruce-200);
    --color-status-info-text: var(--palette-spruce-900);
    --color-status-info-icon: var(--palette-spruce-700);

    --color-status-warning-bg: var(--palette-amber-100);
    --color-status-warning-border: var(--palette-amber-200);
    --color-status-warning-text: var(--palette-amber-800);
    --color-status-warning-icon: var(--palette-amber-700);

    --color-status-error-bg: var(--palette-rose-50);
    --color-status-error-border: var(--palette-rose-200);
    --color-status-error-text: var(--palette-rose-800);
    --color-status-error-icon: var(--palette-rose-700);

    --color-status-success-bg: var(--palette-emerald-50);
    --color-status-success-border: var(--palette-emerald-200);
    --color-status-success-text: var(--palette-emerald-800);
    --color-status-success-icon: var(--palette-emerald-700);

    /* Backward compatibility aliases */
    --nord-dark: var(--color-text-primary);
    --nord-blue: var(--color-brand-secondary);
    --nord-light: var(--color-bg-page);
    --nord-spruce: var(--color-accent-primary);
    --nord-gray: var(--color-text-secondary);
    --nord-subtext: var(--color-text-subtle);
    --nord-border: var(--color-border-subtle);
    --nord-accent: var(--color-accent-primary);
    --nord-surface: var(--color-surface-card);
    --nord-text: var(--color-text-primary);
}

/* ==========================================================================
   2. Semantic Tokens: DARK THEME PREPARATION ([data-theme="dark"])
   (Overrides token values only; no component rules altered)
   ========================================================================== */
[data-theme="dark"] {
    --color-bg-page: #090e1a;
    --color-surface-card: #111a2e;
    --color-surface-muted: #16223b;
    --color-surface-subtle: #1a2744;
    --color-surface-elevated: #1f2e50;
    --color-surface-hover: #162f3e;
    --color-surface-active: #193d50;

    --color-text-primary: #f8fafc;
    --color-text-secondary: #cbd5e1;
    --color-text-muted: #64748b;
    --color-text-subtle: #94a3b8;
    --color-text-inverse: #090e1a;

    --color-border-subtle: #1e2d4a;
    --color-border-default: #2a3c61;
    --color-border-strong: #3b517e;
    --color-border-focus: #2dd4bf;

    --color-accent-primary: #14b8a6;
    --color-accent-hover: #2dd4bf;
    --color-accent-active: #5eead4;
    --color-accent-subtle: rgba(20, 184, 166, 0.16);
    --color-accent-contrast: #042f2e;
    --color-accent-text: #5eead4;

    --color-brand-secondary: #334155;
    --color-brand-secondary-hover: #475569;

    --color-status-info-bg: rgba(20, 184, 166, 0.12);
    --color-status-info-border: rgba(20, 184, 166, 0.28);
    --color-status-info-text: #5eead4;
    --color-status-info-icon: #2dd4bf;

    --color-status-warning-bg: rgba(245, 158, 11, 0.12);
    --color-status-warning-border: rgba(245, 158, 11, 0.28);
    --color-status-warning-text: #fcd34d;
    --color-status-warning-icon: #fbbf24;

    --color-status-error-bg: rgba(244, 63, 94, 0.12);
    --color-status-error-border: rgba(244, 63, 94, 0.28);
    --color-status-error-text: #fda4af;
    --color-status-error-icon: #fb7185;

    --color-status-success-bg: rgba(34, 197, 94, 0.12);
    --color-status-success-border: rgba(34, 197, 94, 0.28);
    --color-status-success-text: #86efac;
    --color-status-success-icon: #4ade80;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.25);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.45);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.06);
    --shadow-card-hover: 0 8px 20px -2px rgba(0, 0, 0, 0.5), 0 2px 6px -1px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   3. Base Styles & Global Resets
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg-page);
    color: var(--color-text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

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

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    line-height: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 2px solid var(--color-accent-primary);
    outline-offset: 2px;
}

/* ==========================================================================
   4. Header & Top Navigation
   ========================================================================== */
.site-header {
    background-color: var(--color-surface-card);
    border-bottom: 1px solid var(--color-border-subtle);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-xs);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-decoration: none;
    color: var(--color-text-primary);
    font-family: var(--font-brand);
    font-weight: 800;
    font-size: 24px;
    letter-spacing: -0.02em;
    transition: opacity 0.15s ease;
}

.header-brand:hover {
    opacity: 0.9;
    color: var(--color-text-primary);
}

.header-logo {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    overflow: visible;
}

.atlas-mark-field,
.atlas-mark-crossbar {
    fill: none;
    stroke: var(--color-text-primary);
    stroke-width: 2.3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.atlas-mark-route {
    fill: none;
    stroke: var(--color-accent-primary);
    stroke-width: 2.3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.atlas-mark-point {
    fill: var(--color-surface-card);
    stroke: var(--color-accent-primary);
    stroke-width: 2.1;
}

.header-brand:hover .atlas-mark-route {
    stroke: var(--color-accent-hover);
}

.icon-sprite {
    display: none;
}

.ui-icon {
    width: 1em;
    height: 1em;
    display: inline-block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -0.125em;
}

.brand-accent {
    color: var(--color-accent-primary);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.nav-link-item {
    font-weight: 600;
    color: var(--color-text-secondary);
    font-size: 15px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-link-item:hover {
    color: var(--color-accent-primary);
    background-color: var(--color-surface-hover);
}

/* ==========================================================================
   5. Main Content Wrapper & Breadcrumbs
   ========================================================================== */
.content-wrapper {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    flex: 1 0 auto;
}

.main-content {
    padding: var(--spacing-lg) 0 var(--spacing-2xl);
}

.page-content {
    max-width: 1200px;
    margin: 0 auto;
}

.breadcrumbs-container {
    padding: var(--spacing-md) 0 var(--spacing-xs);
}

.breadcrumb-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 13px;
}

.breadcrumb-item-el {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--color-text-muted);
}

.breadcrumb-link {
    color: var(--color-text-secondary);
    transition: color 0.15s ease;
}

.breadcrumb-link:hover {
    color: var(--color-accent-primary);
}

.breadcrumb-current {
    font-weight: 600;
    color: var(--color-text-primary);
}

.breadcrumb-separator {
    color: var(--color-border-default);
    user-select: none;
    font-size: 11px;
}

/* ==========================================================================
   6. Shared Footer & Deerflow Attribution
   ========================================================================== */
.site-footer {
    background-color: var(--color-surface-card);
    border-top: 1px solid var(--color-border-subtle);
    padding: var(--spacing-xl) 0 var(--spacing-lg);
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-2xs);
}

.footer-brand {
    font-family: var(--font-brand);
    font-weight: 700;
    font-size: 20px;
    color: var(--color-text-primary);
    letter-spacing: -0.01em;
}

.footer-desc {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.45;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xs);
}

.footer-nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.15s ease;
}

.footer-nav-link:hover {
    color: var(--palette-spruce-700);
    text-decoration: underline;
}

.footer-meta {
    border-top: 1px solid var(--color-border-subtle);
    padding-top: var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    font-size: 13px;
    color: var(--color-text-muted);
}

.footer-copy {
    font-size: 13px;
    color: var(--color-text-muted);
}

.footer-attribution {
    display: flex;
    align-items: center;
}

.deerflow-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-subtle);
    opacity: 0.85;
    transition: opacity 0.15s ease, color 0.15s ease;
    text-decoration: none;
}

.deerflow-link:hover {
    opacity: 1;
    color: var(--color-accent-primary);
}

/* ==========================================================================
   7. Typography & Headings
   ========================================================================== */
.page-header {
    margin-bottom: var(--spacing-xl);
}

.page-header-spaced {
    margin-bottom: var(--spacing-md);
}

.page-title {
    font-family: var(--font-brand);
    font-size: 34px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--color-text-primary);
    margin: 0 0 var(--spacing-sm) 0;
}

.page-description {
    font-size: 16px;
    color: var(--color-text-secondary);
    max-width: 840px;
    line-height: 1.55;
    margin-bottom: var(--spacing-lg);
}

.section-title {
    font-family: var(--font-brand);
    font-weight: 700;
    font-size: 24px;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--color-text-primary);
    border-left: 4px solid var(--color-accent-primary);
    padding-left: 12px;
    margin-bottom: var(--spacing-md);
}

.section-subtitle {
    font-family: var(--font-brand);
    font-weight: 700;
    font-size: 20px;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-md);
}

.section-block {
    margin-bottom: var(--spacing-xl);
}

.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

/* ==========================================================================
   8. Cards, KPI Grids & Methodology Badges
   ========================================================================== */
.stats-grid,
.metrics-grid,
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.stat-card,
.metric-card {
    background-color: var(--color-surface-card);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-card);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.stat-card:hover,
.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--color-border-default);
}

.stat-card-highlighted {
    border-left: 4px solid var(--color-accent-primary);
}

.stat-card-spaced {
    margin-bottom: var(--spacing-xl);
}

.stat-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-sm);
}

.stat-value {
    font-size: 26px;
    font-family: var(--font-brand);
    font-weight: 800;
    color: var(--color-text-primary);
    letter-spacing: -0.02em;
}

.stat-value-accent {
    color: var(--color-accent-primary);
}

.stat-value-sub {
    font-size: 20px;
    margin-top: 4px;
}

.stat-value-compact {
    font-size: 18px;
}

.stat-value-muted {
    color: var(--color-text-muted);
}

.stat-subtext {
    font-size: 13px;
    color: var(--color-text-secondary);
    margin-top: var(--spacing-xs);
}

.card-subtitle {
    font-family: var(--font-brand);
    font-weight: 700;
    font-size: 16px;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-xs);
}

.card-info-text {
    color: var(--color-text-secondary);
    font-size: 14px;
    line-height: 1.45;
}

/* Salary detail summary */
.salary-details-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: var(--spacing-md);
}

.salary-details-grid > div {
    min-width: 0;
    padding: 0 var(--spacing-lg);
    border-left: 1px solid var(--color-border-subtle);
}

.salary-details-grid > div:first-child {
    padding-left: 0;
    border-left: 0;
}

.salary-details-grid > div:last-child {
    padding-right: 0;
}

.salary-details-grid .stat-label {
    min-height: 18px;
}

.tax-distribution-block {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs) var(--spacing-lg);
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-border-subtle);
    color: var(--color-text-secondary);
    font-size: 13px;
}

.tax-distribution-block strong {
    color: var(--color-text-primary);
}

/* Metrics Box (HH snapshot details) */
.metrics-box {
    background-color: var(--color-surface-card);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-card);
}

.metrics-box-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-md);
}

.metrics-box-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

.metric-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metric-item-label {
    font-size: 13px;
    color: var(--color-text-secondary);
}

.metric-item-value {
    font-weight: 700;
    font-size: 18px;
    color: var(--color-text-primary);
}

/* Methodology & Data Source Box */
.methodology-card,
.data-source-badge {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    background-color: var(--color-accent-subtle);
    border: 1px solid var(--palette-spruce-200);
    border-radius: var(--radius-md);
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-lg);
}

.methodology-icon {
    width: 18px;
    height: 18px;
    min-width: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--color-accent-primary);
}

.methodology-title {
    font-weight: 700;
    color: var(--color-accent-text);
    margin-bottom: var(--spacing-2xs);
}

.methodology-detail {
    font-size: 13px;
    color: var(--color-text-secondary);
    margin-top: var(--spacing-xs);
}

/* City Cards Grid */
.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--spacing-md);
}

.city-card-link {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    background-color: var(--color-surface-card);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--color-text-primary);
    box-shadow: var(--shadow-xs);
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.city-card-link:hover {
    transform: translateY(-2px);
    border-color: var(--color-accent-primary);
    box-shadow: var(--shadow-card-hover);
    color: var(--color-text-primary);
}

.city-card-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--color-accent-primary);
    display: block;
    margin-bottom: var(--spacing-xs);
}

.city-card-metrics {
    font-size: 13px;
    color: var(--color-text-secondary);
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.whole-region-card {
    border-left: 3px solid var(--color-accent-primary);
    background-color: var(--color-surface-card);
}

.whole-region-card-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: var(--radius-md);
}

.region-fallback-hint-wrapper {
    position: relative;
    z-index: 2;
}

.region-fallback-hint {
    background: var(--color-surface-muted);
    border: 1px solid var(--color-border-default);
    color: var(--color-text-secondary);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: help;
}

.region-fallback-tooltip-text {
    visibility: hidden;
    position: absolute;
    bottom: 125%;
    right: 0;
    background-color: var(--color-brand-secondary);
    color: #ffffff;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    box-shadow: var(--shadow-md);
}

.region-fallback-hint-wrapper:hover .region-fallback-tooltip-text,
.region-fallback-hint:focus + .region-fallback-tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* ==========================================================================
   9. Status Panels, Banners & Badges
   ========================================================================== */
.freshness-status-box {
    border-radius: var(--radius-md);
    padding: var(--spacing-md) var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-xs);
}

.freshness-status-box:not(.city-full-collection-status-box) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: var(--spacing-sm) var(--spacing-lg);
}

.freshness-status-box:not(.city-full-collection-status-box) .status-text-block {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.freshness-status-box:not(.city-full-collection-status-box) > div:not(.status-text-block):not(.refresh-progress-container),
.freshness-status-box:not(.city-full-collection-status-box) .quick-refresh-actions {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 0;
}

.freshness-status-box:not(.city-full-collection-status-box) .btn-refresh {
    width: auto;
}

.quick-cooldown-text {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 4px;
    line-height: 1.35;
    text-align: right;
}

.refresh-progress-container {
    grid-column: 2;
    grid-row: 2;
    display: grid;
    gap: 6px;
    min-width: 0;
}

.refresh-progress-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
    font-size: 14px;
    font-weight: 600;
}

.refresh-progress-track {
    height: 8px;
    overflow: hidden;
    border-radius: var(--radius-pill);
    background-color: color-mix(in srgb, var(--color-text-primary) 14%, transparent);
}

.refresh-progress-fill {
    height: 100%;
    border-radius: inherit;
    background-color: var(--color-accent-primary);
    transition: width 0.25s ease;
}

.refresh-progress-fill.progress-bar-indeterminate {
    animation: refresh-progress-indeterminate 1.2s ease-in-out infinite;
}

.refresh-progress-detail {
    color: var(--color-text-secondary);
    font-size: 13px;
    line-height: 1.35;
}

.refresh-progress-container.is-failed .refresh-progress-fill {
    background-color: var(--color-status-error-text);
}

@keyframes refresh-progress-indeterminate {
    0% { transform: translateX(-65%); }
    100% { transform: translateX(165%); }
}

.city-full-collection-status-box {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.status-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--spacing-sm) var(--spacing-lg);
    width: 100%;
}

.status-header-row .status-text-block {
    flex: 1 1 0;
    min-width: 0;
}

.full-collection-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 0;
    flex-shrink: 0;
}

.full-collection-btn-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.city-full-collection-status-box .btn-refresh,
.city-full-collection-status-box .btn-full-collection {
    width: auto;
}

.full-collection-progress-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid color-mix(in srgb, var(--color-text-primary) 12%, transparent);
    width: 100%;
}

.full-collection-status-row,
.full-collection-stage-info,
.full-collection-eta-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
    font-size: 13px;
}

.full-collection-status-row {
    font-weight: 600;
    font-size: 14px;
}

.full-collection-stage-info {
    color: var(--color-text-secondary);
}

.full-collection-progress-track {
    height: 8px;
    overflow: hidden;
    border-radius: var(--radius-pill);
    background-color: color-mix(in srgb, var(--color-text-primary) 14%, transparent);
}

.full-collection-progress-track.secondary-track {
    height: 6px;
}

.full-collection-progress-fill {
    height: 100%;
    border-radius: inherit;
    background-color: var(--color-accent-primary);
    transition: width 0.25s ease;
}

.full-collection-progress-fill.secondary-fill {
    background-color: var(--color-brand-secondary);
}

.full-collection-eta-info {
    color: var(--color-text-muted);
    font-size: 12px;
}

.status-info {
    background-color: var(--color-status-info-bg);
    border: 1px solid var(--color-status-info-border);
    color: var(--color-status-info-text);
}

.status-warning {
    background-color: var(--color-status-warning-bg);
    border: 1px solid var(--color-status-warning-border);
    color: var(--color-status-warning-text);
}

.status-error {
    background-color: var(--color-status-error-bg);
    border: 1px solid var(--color-status-error-border);
    color: var(--color-status-error-text);
}

.status-text-block {
    display: flex;
    flex-direction: column;
    font-size: 14px;
}

.status-title {
    font-weight: 700;
    font-size: 15px;
}

.status-time {
    font-size: 12px;
    opacity: 0.85;
    margin-top: 2px;
}

.status-detail {
    margin-top: 4px;
    font-size: 13.5px;
    line-height: 1.4;
}

/* Badges */
.ranking-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
}

.badge-direct {
    background-color: var(--palette-spruce-100);
    color: var(--palette-spruce-800);
    border: 1px solid var(--palette-spruce-200);
}

.badge-region {
    background-color: var(--palette-azure-100);
    color: var(--palette-azure-800);
    border: 1px solid var(--palette-azure-200);
}

.badge-nodata {
    background-color: var(--palette-mineral-100);
    color: var(--palette-ink-500);
    border: 1px solid var(--palette-mineral-200);
}

.professions-count-badge,
.badge,
.badge-count {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
    background-color: var(--color-accent-subtle);
    color: var(--color-accent-primary);
}

/* Empty States */
.empty-state-box,
.no-data-state {
    padding: var(--spacing-xl);
    text-align: center;
    border: 1px dashed var(--color-border-default);
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    font-size: 14px;
    background-color: var(--color-surface-card);
    margin: var(--spacing-md) 0;
}

/* Error Summary Box */
.error-summary {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--color-status-error-bg);
    border: 1px solid var(--color-status-error-border);
    border-radius: var(--radius-md);
    color: var(--color-status-error-text);
    font-size: 14px;
    margin-bottom: var(--spacing-md);
}

.error-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--palette-rose-700);
}

/* ==========================================================================
   10. Buttons & Interactive Controls
   ========================================================================== */
.btn-submit,
.btn-primary,
.admin-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-accent-primary);
    color: var(--color-accent-contrast);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.btn-submit:hover,
.btn-primary:hover,
.admin-btn-primary:hover {
    background-color: var(--color-accent-hover);
    box-shadow: var(--shadow-md);
    color: var(--color-accent-contrast);
}

.btn-submit:active,
.btn-primary:active,
.admin-btn-primary:active {
    transform: translateY(1px);
}

.btn-submit:disabled,
.btn-primary:disabled,
.admin-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-refresh,
.btn-full-collection,
.btn-cancel-collection,
.btn-retry-collection {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-xs);
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn-refresh,
.btn-full-collection,
.btn-retry-collection {
    background-color: var(--color-brand-secondary);
    color: #ffffff;
    border: 1px solid transparent;
}

.btn-refresh:hover,
.btn-full-collection:hover,
.btn-retry-collection:hover {
    background-color: var(--color-brand-secondary-hover);
}

.btn-cancel-collection {
    background-color: var(--color-surface-card);
    color: var(--color-status-error-text);
    border: 1px solid var(--color-status-error-border);
}

.btn-cancel-collection:hover {
    background-color: var(--color-status-error-bg);
}

.btn-refresh.disabled,
.btn-refresh:disabled,
.btn-full-collection:disabled,
.btn-cancel-collection:disabled,
.btn-retry-collection:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

/* Segmented Toggles (Median / Average) */
.profession-salary-toggle,
.statistics-mode-container,
.statistics-salary-toggle {
    display: inline-flex;
    background-color: var(--color-surface-muted);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-md);
    padding: 3px;
    gap: 2px;
}

.profession-toggle-btn,
.statistics-mode-button {
    border: none;
    background: transparent;
    color: var(--color-text-secondary);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.profession-toggle-btn:hover,
.statistics-mode-button:hover {
    color: var(--color-text-primary);
}

.profession-toggle-btn.active,
.profession-toggle-btn[aria-pressed="true"],
.statistics-mode-button.is-active,
.statistics-mode-button[aria-pressed="true"] {
    background-color: var(--color-surface-card);
    color: var(--color-text-primary);
    box-shadow: var(--shadow-xs);
}

/* Form Checkbox Filter Toggle */
.search-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 14px;
    color: var(--color-text-secondary);
}

.search-filter-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--color-accent-primary);
    cursor: pointer;
}

.search-filter-toggle label {
    cursor: pointer;
    user-select: none;
}

/* ==========================================================================
   11. Forms, Inputs & Autocomplete Listboxes
   ========================================================================== */
.form-control,
.ranking-filter-input,
.profession-ranking-search,
.search-input {
    width: 100%;
    height: 42px;
    padding: 8px 14px;
    font-size: 14.5px;
    border: 1px solid var(--color-border-default);
    border-radius: var(--radius-md);
    background-color: var(--color-surface-card);
    color: var(--color-text-primary);
    box-shadow: var(--shadow-xs);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus,
.ranking-filter-input:focus,
.profession-ranking-search:focus,
.search-input:focus {
    border-color: var(--color-border-focus);
    box-shadow: var(--shadow-focus);
    outline: none;
}

.form-control::placeholder,
.ranking-filter-input::placeholder,
.profession-ranking-search::placeholder,
.search-input::placeholder {
    color: var(--color-text-muted);
}

/* Autocomplete Container & Listbox */
.autocomplete-container {
    position: relative;
    width: 100%;
}

.autocomplete-listbox {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background-color: var(--color-surface-card);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 320px;
    overflow-y: auto;
    z-index: 1000;
}

.autocomplete-option {
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
    font-size: 14px;
    color: var(--color-text-primary);
    border-bottom: 1px solid var(--color-border-subtle);
    transition: background-color 0.12s ease;
}

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

.autocomplete-option:hover,
.autocomplete-option.active,
.autocomplete-option[aria-selected="true"] {
    background-color: var(--color-surface-hover);
    color: var(--color-accent-text);
}

.autocomplete-option-name {
    font-weight: 600;
}

.autocomplete-option-region {
    font-size: 12px;
    color: var(--color-text-muted);
}

/* Clear Buttons */
.clear-search-btn,
.btn-clear,
.btn-clear-city {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.clear-search-btn:hover,
.btn-clear:hover,
.btn-clear-city:hover {
    color: var(--color-text-primary);
    background-color: var(--color-surface-muted);
}

/* Search Box Wrappers */
.search-box,
.search-input-wrapper {
    position: relative;
    width: 100%;
}

.search-input-wrapper .search-icon {
    top: 50%;
    transform: translateY(-50%);
}

.country-regions-toolbar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

/* ==========================================================================
   12. Tables, Sorting & Heatbars
   ========================================================================== */
.table-responsive-container,
.table-responsive-wrapper,
.statistics-table-frame {
    width: 100%;
    overflow-x: auto;
    background-color: var(--color-surface-card);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    -webkit-overflow-scrolling: touch;
}

.data-table,
.statistics-table,
.profession-ranking-table,
.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14.5px;
}

.data-table thead,
.statistics-table thead,
.profession-ranking-table thead,
.admin-table thead {
    background-color: var(--color-surface-muted);
    border-bottom: 1px solid var(--color-border-default);
}

.data-table th,
.statistics-table th,
.profession-ranking-table th,
.admin-table th {
    padding: 12px 16px;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 13.5px;
    color: var(--color-text-secondary);
    letter-spacing: -0.01em;
    user-select: none;
    white-space: nowrap;
}

.data-table td,
.statistics-table td,
.profession-ranking-table td,
.admin-table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--color-border-subtle);
    color: var(--color-text-primary);
    vertical-align: middle;
}

.data-table tbody tr:last-child td,
.statistics-table tbody tr:last-child td,
.profession-ranking-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover,
.statistics-table tbody tr:hover,
.profession-ranking-table tbody tr:hover {
    background-color: var(--color-surface-hover);
}

.ranking-row,
.profession-ranking-row,
.statistics-data-row {
    cursor: pointer;
    transition: background-color 0.12s ease;
}

.ranking-row-link,
.profession-link {
    font-weight: 600;
    color: var(--color-text-primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

.ranking-row-link:hover,
.profession-link:hover {
    color: var(--color-accent-primary);
}

/* Sort Headers */
.sort-header-link,
.sort-header-btn,
.statistics-sort-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    font-weight: inherit;
    font-size: inherit;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s ease;
}

.sort-header-link:hover,
.sort-header-btn:hover,
.statistics-sort-button:hover {
    color: var(--color-accent-primary);
}

.sort-icon {
    font-size: 12px;
    opacity: 0.7;
}

/* Statistics Table & Heatbars */
.statistics-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.statistics-table-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: var(--spacing-md);
}

.full-ranking-link {
    font-weight: 600;
    font-size: 14px;
    color: var(--color-accent-primary);
    transition: color 0.15s ease;
}

.full-ranking-link:hover {
    color: var(--color-accent-hover);
}

.statistics-rank {
    display: inline-block;
    width: 24px;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text-muted);
}

.statistics-name {
    font-weight: 600;
    color: var(--color-text-primary);
}

.metric-cell-content,
[data-salary-cell] {
    position: relative;
    z-index: 1;
}

.statistics-heat-bar,
.profession-ranking-heat {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    background-color: var(--palette-spruce-100);
    opacity: 0.6;
    border-radius: var(--radius-xs);
    z-index: -1;
    transition: width 0.3s ease;
}

/* ==========================================================================
   13. Pagination Controls
   ========================================================================== */
.pager-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.pager-info {
    font-size: 14px;
    color: var(--color-text-secondary);
}

.pager-nav {
    display: flex;
}

.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 4px;
}

.page-item {
    display: inline-flex;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-sm);
    background-color: var(--color-surface-card);
    color: var(--color-text-primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

.page-link:hover {
    background-color: var(--color-surface-hover);
    border-color: var(--color-accent-primary);
    color: var(--color-accent-primary);
}

.page-item.active .page-link {
    background-color: var(--color-accent-primary);
    border-color: var(--color-accent-primary);
    color: var(--color-accent-contrast);
    font-weight: 700;
}

.page-item.disabled .page-link {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* ==========================================================================
   14. Vacancy Explorer Component
   ========================================================================== */
.vacancy-explorer {
    position: relative;
    transition: opacity 160ms ease;
}

.vacancy-explorer.is-loading > :not(.vacancy-async-status):not(.vacancy-async-error) {
    opacity: .58;
    pointer-events: none;
}

.vacancy-async-status {
    align-items: center;
    background: var(--color-surface-card);
    border: 1px solid var(--color-border-default);
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    display: none;
    font-size: 14px;
    gap: 8px;
    padding: 10px 16px;
    position: absolute;
    right: 16px;
    top: 16px;
    z-index: 10;
    box-shadow: var(--shadow-md);
}

.vacancy-explorer.is-loading .vacancy-async-status {
    display: flex;
}

.vacancy-async-status::before {
    animation: vacancy-spinner 700ms linear infinite;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    content: "";
    height: 14px;
    width: 14px;
}

.vacancy-async-error {
    background-color: var(--color-status-error-bg);
    border: 1px solid var(--color-status-error-border);
    border-radius: var(--radius-md);
    color: var(--color-status-error-text);
    margin-bottom: var(--spacing-md);
    padding: 12px 16px;
    font-size: 14px;
}

@keyframes vacancy-spinner {
    to { transform: rotate(360deg); }
}

.vacancies-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.vacancy-card {
    padding: var(--spacing-lg);
    background-color: var(--color-surface-card);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.vacancy-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--color-border-default);
}

.vacancy-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.vacancy-card-link:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--color-accent-primary) 40%, transparent);
    outline-offset: 3px;
}

.vacancy-card-link .vacancy-title {
    color: var(--color-accent-primary);
    font-weight: 700;
}

.vacancy-card-link:hover .vacancy-title {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

.vacancy-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.vacancy-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs) var(--spacing-sm);
    color: var(--color-text-secondary);
}

.vacancy-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.vacancy-title-link {
    font-weight: 700;
    font-size: 16.5px;
    color: var(--color-accent-primary);
    text-decoration: none;
    line-height: 1.35;
}

.vacancy-title-link:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

.vacancy-salary {
    font-weight: 800;
    font-size: 16.5px;
    color: var(--color-text-primary);
}

.vacancy-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    font-size: 13px;
    color: var(--color-text-secondary);
}

.vacancy-city-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--color-accent-primary);
    font-weight: 600;
}

.vacancy-city-link:hover {
    color: var(--color-accent-hover);
}

/* ==========================================================================
   15. RF Region SVG Map Component
   ========================================================================== */
.rf-map-section {
    margin-bottom: var(--spacing-2xl);
}

.rf-map-header {
    margin-bottom: var(--spacing-md);
}

.rf-map-container {
    position: relative;
    background-color: var(--color-surface-card);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-card);
}

#rf-region-svg {
    width: 100%;
    height: auto;
    max-height: 520px;
}

.rf-region-path {
    fill: #cbd5e1;
    stroke: #ffffff;
    stroke-width: 0.75;
    stroke-linejoin: round;
    cursor: pointer;
    transition: fill 0.2s ease 0.06s, stroke 0.2s ease 0.06s, stroke-width 0.2s ease 0.06s;
}

.rf-region-path:hover,
.rf-region-path.has-snapshot:hover,
.rf-region-path.has-data:hover {
    fill: #008080;
    stroke: #008080;
    stroke-width: 1.25;
}

.rf-region-path.has-snapshot,
.rf-region-path.has-data {
    fill: #93c5fd;
}

.rf-region-path.active {
    fill: url(#region-grad-active);
    stroke: #1d4ed8;
    stroke-width: 1.5;
}

.rf-region-path:focus {
    outline: none;
    box-shadow: none;
}

.rf-region-path:focus-visible {
    outline: none;
    box-shadow: none;
    fill: #008080;
    stroke: #008080;
    stroke-width: 1.5px;
}

.rf-map-tooltip {
    position: absolute;
    pointer-events: none;
    background-color: var(--color-brand-secondary);
    color: #ffffff;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    line-height: 1.4;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

.rf-map-tooltip.visible {
    opacity: 1;
    visibility: visible;
}

.rf-search-box {
    margin: var(--spacing-md) 0;
}

.rf-region-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--spacing-sm);
    max-height: 360px;
    overflow-y: auto;
    padding-right: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.rf-region-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background-color: var(--color-surface-card);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--color-text-primary);
    transition: all 0.12s ease;
}

.rf-region-list-item:hover {
    border-color: var(--color-accent-primary);
    background-color: var(--color-surface-hover);
    color: var(--color-accent-text);
}

.rf-map-fallback-section {
    margin-top: var(--spacing-xl);
}

.rf-fallback-toolbar {
    display: grid;
    grid-template-columns: auto minmax(220px, 1fr) auto;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.rf-fallback-title {
    margin: 0;
    font-family: var(--font-brand);
    font-size: 22px;
    line-height: 1.1;
}

.rf-fallback-summary {
    margin: 3px 0 0;
    color: var(--color-text-muted);
    font-size: 12px;
}

.rf-search-input {
    min-height: 38px;
    padding: 7px 12px;
}

.rf-region-filters {
    display: flex;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-sm);
    background: var(--color-surface-muted);
}

.rf-region-filter {
    border: 0;
    border-radius: 4px;
    padding: 6px 9px;
    color: var(--color-text-secondary);
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
}

.rf-region-filter.is-active {
    color: var(--color-text-primary);
    background: var(--color-surface-card);
    box-shadow: 0 1px 2px rgb(15 23 42 / 10%);
}

.rf-regions-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.rf-region-list-item {
    display: flex;
    min-height: 102px;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    padding: 6px 9px;
    border-radius: 8px;
    text-decoration: none;
}

.rf-region-list-item[hidden] {
    display: none !important;
}

.rf-region-list-item.has-data {
    border-top: 4px solid var(--color-accent-primary);
    padding-top: 3px;
}

.rf-region-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 5px;
}

.rf-region-item-name {
    font-family: var(--font-brand);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.15;
}

.rf-region-badge {
    flex: none;
    border-radius: 999px;
    padding: 4px 6px;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1;
    text-transform: uppercase;
}

.rf-region-badge.has-snapshot {
    color: var(--color-accent-text);
    background: var(--color-accent-subtle);
}

.rf-region-badge.no-snapshot {
    color: var(--color-text-secondary);
    background: var(--color-surface-muted);
}

.rf-region-card-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 4px 0;
    border-block: 1px solid var(--color-border-subtle);
}

.rf-region-card-metrics > span {
    padding: 4px 0;
}

.rf-region-card-metrics > span + span {
    padding-left: 8px;
    border-left: 1px solid var(--color-border-subtle);
}

.rf-region-card-metrics small,
.rf-region-card-metrics strong {
    display: block;
}

.rf-region-card-metrics small {
    color: var(--color-text-muted);
    font-size: 9px;
}

.rf-region-card-metrics strong {
    margin-top: 2px;
    font-size: 14px;
    line-height: 1.05;
}

.rf-region-card-pending {
    margin: 4px 0;
    padding-block: 4px;
    border-block: 1px solid var(--color-border-subtle);
    color: var(--color-text-secondary);
    font-size: 10px;
    line-height: 1.2;
}

.rf-region-card-meta {
    display: grid;
    grid-template-columns: 1fr 1.15fr auto;
    align-items: center;
    gap: 4px;
    color: var(--color-text-muted);
    font-size: 10px;
    line-height: 1.1;
}

.rf-region-card-meta > span:nth-child(2) {
    text-align: right;
}

.rf-region-card-meta strong {
    color: var(--color-text-primary);
    font-weight: 600;
}

.rf-region-card-arrow {
    color: var(--color-accent-primary);
    font-family: Georgia, serif;
    font-size: 18px;
}

.rf-region-empty {
    grid-column: 1 / -1;
    margin: 0;
    padding: var(--spacing-lg);
    border: 1px dashed var(--color-border-subtle);
    border-radius: var(--radius-sm);
    color: var(--color-text-secondary);
    text-align: center;
}

@media (max-width: 1100px) {
    .rf-regions-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .rf-fallback-toolbar { grid-template-columns: 1fr; gap: var(--spacing-sm); }
    .rf-search-box-wrapper { width: 100%; }
    .rf-region-filters { width: fit-content; }
    .rf-regions-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
    .rf-regions-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   16. Home Hero Section & Specialized Components
   ========================================================================== */
.hero-section {
    background: linear-gradient(135deg, var(--color-surface-card) 0%, var(--color-surface-muted) 100%);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl) var(--spacing-xl);
    margin-bottom: var(--spacing-2xl);
    box-shadow: var(--shadow-card);
    text-align: center;
}

.hero-title {
    font-family: var(--font-brand);
    font-size: 38px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-md);
}

.hero-benefit {
    font-size: 18px;
    color: var(--color-text-secondary);
    max-width: 680px;
    margin: 0 auto var(--spacing-xl);
    line-height: 1.5;
}

.search-form-hint {
    font-size: 13.5px;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-md);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) auto;
    gap: var(--spacing-md);
    align-items: flex-end;
    max-width: 860px;
    margin: 0 auto;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.form-group label {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.city-status-container {
    font-size: 12px;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 18px;
}

.city-navigator {
    background-color: var(--color-surface-card);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-card);
}

.city-navigator-field-group {
    display: flex;
    gap: var(--spacing-md);
    align-items: flex-end;
    flex-wrap: wrap;
}

.city-navigator-field {
    flex: 1;
    min-width: 240px;
}

.city-navigator-label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 6px;
}

.trust-block {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    background-color: var(--color-surface-card);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg) var(--spacing-xl);
    box-shadow: var(--shadow-card);
    margin-top: var(--spacing-2xl);
}

.trust-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 14px;
    color: var(--color-text-secondary);
    flex-wrap: wrap;
}

.trust-logo {
    font-weight: 700;
    color: var(--color-text-primary);
}

.trust-divider {
    color: var(--color-border-default);
}

.trust-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 14px;
    color: var(--color-accent-primary);
}

/* ==========================================================================
   17. Admin Console Styles
   ========================================================================== */
.admin-card {
    background-color: var(--color-surface-card);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-card);
}

.admin-login-wrapper {
    max-width: 440px;
    margin: 40px auto;
}

.admin-login-card {
    padding: var(--spacing-2xl);
}

.admin-form-group {
    margin-bottom: var(--spacing-lg);
}

.admin-form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-xs);
}

.admin-form-control {
    width: 100%;
    height: 44px;
    padding: 8px 14px;
    font-size: 15px;
    border: 1px solid var(--color-border-default);
    border-radius: var(--radius-md);
    background-color: var(--color-surface-card);
    color: var(--color-text-primary);
}

.admin-form-control:focus {
    border-color: var(--color-border-focus);
    box-shadow: var(--shadow-focus);
    outline: none;
}

.admin-form-actions {
    display: flex;
    justify-content: flex-end;
}

.admin-btn-lg {
    width: 100%;
    height: 46px;
    font-size: 16px;
}

/* ==========================================================================
   18. Utilities, Helpers & Accessibility
   ========================================================================== */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.text-center { text-align: center; }
.text-end { text-align: right; }
.text-muted { color: var(--color-text-muted) !important; }
.text-danger { color: var(--palette-rose-700) !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }
.d-none { display: none !important; }
.mb-2 { margin-bottom: var(--spacing-sm) !important; }
.mb-3 { margin-bottom: var(--spacing-md) !important; }
.mb-4 { margin-bottom: var(--spacing-lg) !important; }
.mt-4 { margin-top: var(--spacing-lg) !important; }

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

/* ==========================================================================
   19. Responsive Media Queries
   ========================================================================== */
@media (max-width: 992px) {
    .page-title { font-size: 30px; }
    .hero-title { font-size: 32px; }
    .salary-details-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .salary-details-grid > div:nth-child(3) {
        padding-left: 0;
        border-left: 0;
        margin-top: var(--spacing-lg);
    }
    .salary-details-grid > div:nth-child(4) { margin-top: var(--spacing-lg); }
}

@media (max-width: 768px) {
    .content-wrapper { padding: 0 var(--spacing-md); }
    .header-container { padding: 0 var(--spacing-md); height: 60px; }
    .header-brand { font-size: 20px; }
    .page-title { font-size: 26px; }
    .hero-title { font-size: 26px; }
    .hero-benefit { font-size: 16px; }
    .hero-section { padding: var(--spacing-xl) var(--spacing-md); }
    .form-grid { grid-template-columns: 1fr; }
    .stat-value { font-size: 22px; }
    .stats-grid, .metrics-grid { grid-template-columns: 1fr; }
    .freshness-status-box:not(.city-full-collection-status-box) { grid-template-columns: 1fr; }
    .freshness-status-box:not(.city-full-collection-status-box) .status-text-block,
    .freshness-status-box:not(.city-full-collection-status-box) > div:not(.status-text-block):not(.refresh-progress-container),
    .freshness-status-box:not(.city-full-collection-status-box) .quick-refresh-actions,
    .freshness-status-box:not(.city-full-collection-status-box) .btn-refresh,
    .refresh-progress-container,
    .status-header-row,
    .full-collection-actions {
        grid-column: 1;
        grid-row: auto;
        width: 100%;
    }
    .freshness-status-box:not(.city-full-collection-status-box) > div:not(.status-text-block):not(.refresh-progress-container),
    .freshness-status-box:not(.city-full-collection-status-box) .quick-refresh-actions,
    .full-collection-actions {
        align-items: stretch;
    }
    .freshness-status-box:not(.city-full-collection-status-box) .btn-refresh,
    .full-collection-btn-row,
    .btn-full-collection,
    .btn-cancel-collection,
    .btn-retry-collection {
        width: 100%;
    }
    .status-header-row {
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-sm);
    }
    .quick-cooldown-text {
        text-align: left;
    }
    .salary-details-grid { grid-template-columns: 1fr; }
    .salary-details-grid > div,
    .salary-details-grid > div:nth-child(3),
    .salary-details-grid > div:nth-child(4) {
        padding: var(--spacing-md) 0;
        margin-top: 0;
        border-top: 1px solid var(--color-border-subtle);
        border-left: 0;
    }
    .salary-details-grid > div:first-child {
        padding-top: 0;
        border-top: 0;
    }
    .salary-details-grid > div:last-child { padding-bottom: 0; }
    .footer-meta { flex-direction: column; align-items: flex-start; }
    .profession-mobile-sort { display: block; }
    .profession-ranking-toolbar { flex-direction: column; align-items: stretch; }
    .pager-container { flex-direction: column; align-items: stretch; }
    .pagination { justify-content: center; }
}

@media (max-width: 480px) {
    .page-title { font-size: 22px; }
    .section-title { font-size: 20px; }
    .stat-card, .metric-card { padding: var(--spacing-md); }
}
