:root {
    /* Header Dark Theme */
    --header-bg: #0D1B3E;
    --header-border: rgba(255, 255, 255, 0.12);
    --header-text: #FFFFFF;
    --header-text-dim: rgba(255, 255, 255, 0.65);

    /* Body Light Theme */
    --bg-main: #EEF2F7;
    --card-bg: #FFFFFF;
    --card-border: rgba(226, 232, 240, 0.8);
    --accent-blue: #2563EB;
    --accent-navy: #0D1B3E;
    --accent-gold: #C9A84C;
    --text-main: #0F172A;
    --text-muted: #64748B;
    --text-dim: #94A3B8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body, html {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden; /* Prevent scrolling strictly on desktop */
    background-color: var(--bg-main);
    color: var(--text-main);
}

.dashboard-container {
    height: 100vh;
    height: 100dvh; /* Modern mobile-friendly height */
    width: 100vw;
    display: flex;
    flex-direction: column;
}

/* =========================================================
   HEADER — Premium 3-Band Design
========================================================= */
.dashboard-header {
    background: linear-gradient(135deg, #0D1B3E 0%, #0A2560 100%);
    color: #FFFFFF;
    padding: 0;
    display: flex;
    flex-direction: column;
    border-bottom: 3px solid #C9A84C; /* Gold accent bottom border */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* BAND 1 — Two Logos Side by Side */
.header-band-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3vw;
    padding: 1.2vh 3vw;
    border-bottom: 1px solid rgba(201, 168, 76, 0.3); /* Subtle gold separator */
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-logo {
    height: 6vh;
    min-height: 40px;
    max-height: 60px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.logo-caption {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.logo-caption-main {
    font-size: clamp(1.3rem, 2.8vh, 2rem);
    font-weight: 900;
    color: #FFFFFF;
    letter-spacing: 2px;
    line-height: 1;
}

.logo-caption-top {
    font-size: clamp(0.8rem, 1.6vh, 1.05rem);
    font-weight: 600;
    color: #C9A84C;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* Vertical gold divider between logos */
.header-logo-divider {
    width: 1px;
    height: 7vh;
    min-height: 45px;
    background: linear-gradient(to bottom, transparent, #C9A84C, transparent);
}

/* BAND 2 — Full-Width Centered Title */
.header-band-title {
    padding: 1vh 4vw;
    text-align: center;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(201, 168, 76, 0.2);
}

.header-band-title h2 {
    font-size: clamp(1.1rem, 2.2vh, 1.6rem);
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.3;
    opacity: 0.95;
}

/* BAND 3 — Controls Row */
.header-band-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8vh 2vw;
}

.dropdowns-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Services Dropdown */
.services-dropdown {
    position: relative;
    display: inline-block;
}

.services-dropdown-btn {
    background: rgba(255, 255, 255, 0.05); /* Same as year-selector bg */
    border: 1px solid var(--header-border);
    color: var(--header-text-dim);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    font-family: inherit;
    max-width: 100%;
}

.dropdown-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 350px;
}

.dropdown-badge {
    background-color: #10B981;
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 12px;
    margin-left: 2px;
    margin-right: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(16, 185, 129, 0.4);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dropdown-badge.white-badge {
    background-color: #FFFFFF;
    color: #0A2560;
    border: 1px solid #E2E8F0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.growth-badge {
    background-color: #10B981;
    color: white;
    font-size: 1.2rem; /* Increased from 0.95rem */
    font-weight: 900;
    padding: 6px 18px; /* Increased padding */
    border-radius: 20px;
    margin-left: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    0% { transform: translateX(-10px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes popIn {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.services-dropdown-btn:hover, .services-dropdown.open .services-dropdown-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
}

.services-dropdown-btn i {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.services-dropdown.open .services-dropdown-btn .chevron {
    transform: rotate(180deg);
}

.services-dropdown-content {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: #FFFFFF;
    color: #0D1B3E;
    min-width: 480px;
    max-width: 90vw;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    padding: 12px 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.services-dropdown.open .services-dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.service-item {
    padding: 10px 20px;
    font-size: 0.88rem;
    line-height: 1.4;
    border-bottom: 1px solid #EEF2F7;
    display: flex;
    gap: 10px;
    color: #334155;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

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

.service-item:hover {
    background: #F8FAFC;
    color: #2563EB;
}

.service-item .service-index {
    font-weight: 800;
    color: #C9A84C;
    min-width: 18px;
}

.new-badge {
    background: #10B981;
    color: #FFFFFF !important;
    font-size: 0.65rem !important;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    text-transform: uppercase;
    min-width: auto !important;
    vertical-align: middle;
    font-weight: 700 !important;
}

.new-service-highlight {
    background: rgba(16, 185, 129, 0.04);
}
.new-service-highlight:hover {
    background: rgba(16, 185, 129, 0.1);
}

/* Controls */
.year-selector {
    display: flex;
    gap: 6px;
    background: rgba(255,255,255,0.05);
    padding: 4px;
    border-radius: 30px;
    border: 1px solid var(--header-border);
}

.year-btn {
    background: transparent;
    border: none;
    color: var(--header-text-dim);
    padding: 6px 22px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.year-btn.active {
    background: #FFFFFF;
    color: var(--header-bg);
}

/* Main Content — Light Premium Section */
.main-content-section {
    flex: 1;
    padding: 1.2vh 2vw;
    display: flex;
    flex-direction: column;
    gap: 1.2vh;
    background: #EEF2F7;
    overflow-y: auto; /* Enable scroll for content */
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-gold) transparent;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr 1fr;
    gap: 1.8vh;
    align-content: start; /* Allow content to start from top and grow */
    align-items: stretch;
}

/* Grid Spanning */
.residents-card { grid-column: span 1; height: 100%; }
.grid-column-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.8vh;
    height: 100%;
}

/* =========================================================
   CARDS — Premium Redesign
========================================================= */
.glass-card {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 2vh 2vw;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 1.5vh;
    box-shadow: 0 2px 12px rgba(13, 27, 62, 0.08);
    border: none;
    border-left: 5px solid #0A2560; /* Navy left accent */
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 80px; height: 80px;
    background: radial-gradient(circle at top right, rgba(201, 168, 76, 0.08), transparent 70%);
    pointer-events: none;
}

.glass-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(13, 27, 62, 0.14);
}

/* Accent left border colors per card type */
.residents-card  { border-left-color: #0A2560; }
.services-card   { border-left-color: #F59E0B; } /* Orange */
.production-card { border-left-color: #C9A84C; } /* Gold */
.jobs-card       { border-left-color: #1DA462; } /* Green */
.export-card     { border-left-color: #2563EB; } /* Blue */

/* Card Header */
.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 1vh;
    border-bottom: 1px solid #F1F5F9;
}

.card-header i {
    width: 20px;
    height: 20px;
    color: #0A2560;
    flex-shrink: 0;
}

.card-header span {
    font-size: clamp(0.7rem, 1.3vh, 0.88rem);
    font-weight: 800;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* Main Number Display */
.main-stat h2 {
    font-size: clamp(2rem, 5vh, 4rem);
    font-weight: 900;
    color: #0D1B3E;
    line-height: 1;
    margin: 0.5vh 0 0.2vh;
    letter-spacing: -1px;
}

/* "та" suffix — large numbers */
.stat-suffix {
    font-size: 0.35em;
    font-weight: 700;
    color: #C9A84C;
    vertical-align: middle;
    margin-left: 6px;
    letter-spacing: 0;
}

/* "та" suffix — small sub-stat values */
.stat-suffix-sm {
    font-size: 0.7em;
    font-weight: 700;
    color: #C9A84C;
    margin-left: 3px;
    letter-spacing: 0;
}

.main-stat p {
    font-size: clamp(0.75rem, 1.4vh, 0.9rem);
    color: #64748B;
    font-weight: 600;
    margin-bottom: 0.8vh;
}

/* Sub stats list */
.sub-stats {
    display: flex;
    flex-direction: column;
    gap: 0.8vh;
}

.sub-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9vh 1vw;
    background: #F8FAFC;
    border-radius: 10px;
    border-left: 3px solid transparent;
    transition: background 0.2s;
}

.sub-stat-item:hover { background: #EEF2F7; }

.sub-stat-item.highlight {
    border-left: 3px solid #C9A84C;
    background: #FFFBEF;
}

.sub-stat-item .label {
    font-size: clamp(0.7rem, 1.25vh, 0.85rem);
    color: #64748B;
    font-weight: 600;
}

.sub-stat-item .value {
    font-weight: 900;
    font-size: clamp(0.95rem, 1.8vh, 1.25rem);
    color: #0D1B3E;
}

.small-text {
    font-size: clamp(0.7rem, 1.3vh, 0.85rem);
    color: #94A3B8;
    text-align: center;
    margin-top: 1vh;
    font-style: italic;
}

/* Removed split-layout-wrapper as it is no longer used */

.services-summary { flex: 1.1; padding-right: 1.5vw; }
.economic-summary { flex: 0.9; padding-left: 1vw; }

.split-divider {
    width: 2px;
    background: #E2E8F0;
    margin: 1vh 0;
}

.col-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2vh;
}
.col-header i {
    color: #2563EB;
    width: 22px;
    height: 22px;
}
.col-header span {
    font-size: clamp(0.75rem, 1.4vh, 0.95rem);
    font-weight: 800;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.services-main-list {
    display: flex;
    flex-direction: column;
    gap: 0.8vh;
    padding-right: 4px;
}

.main-service-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9vh 0.8vw;
    background: #F8FAFC;
    border-radius: 8px;
    border-left: 3px solid transparent;
    cursor: pointer;
    transition: background 0.2s;
}

.main-service-row:hover {
    background: #EEF2F7;
    border-left-color: #2563EB;
}

.main-service-row.new-row-highlight {
    border-left-color: #C9A84C;
    background: #FFFBEF;
}

.ms-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ms-index {
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748B;
}
.ms-icon {
    width: 15px;
    height: 15px;
    color: #2563EB;
}
.new-row-highlight .ms-icon { color: #C9A84C; }

.ms-name {
    font-size: clamp(0.68rem, 1.3vh, 0.85rem);
    font-weight: 600;
    color: #1E293B;
}

.ms-right .new-badge {
    padding: 3px 6px;
    font-size: 0.65rem;
    margin-left: 5px;
}

.production-breakdown { flex: 1; }

.breakdown-item { margin-bottom: 1.5vh; }

.row-flex {
    display: flex;
    justify-content: space-between;
    font-size: clamp(0.85rem, 1.6vh, 1rem);
    margin-bottom: 6px;
    font-weight: 700;
    color: #1E293B;
}

.breakdown-bar {
    height: 10px;
    background: #EEF2F7;
    border-radius: 20px;
    overflow: hidden;
}

.progress-bar {
    height: 10px;
    background: #EEF2F7;
    border-radius: 20px;
    overflow: hidden;
    margin: 1.5vh 0;
}

.bar-fill, .progress-fill {
    height: 100%;
    border-radius: 20px;
    transition: width 0.8s ease;
}

.bar-fill.domestic { background: linear-gradient(90deg, #0A2560, #2563EB); }
.bar-fill.export   { background: linear-gradient(90deg, #C9A84C, #F0D080); }
.progress-fill     { background: linear-gradient(90deg, #1DA462, #34D399); }

.usd-text { color: #C9A84C; font-size: 0.85em; font-weight: 700; margin-left: 4px; }

/* =========================================================
   Export Countries Card
========================================================= */
.countries-list {
    display: flex;
    flex-direction: column;
    gap: 0.8vh;
    flex: 1;
    margin-top: 1vh;
}

.country-pill {
    padding: 0.8vh 1vw;
    background: #F8FAFC;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(0.9rem, 1.7vh, 1.05rem);
    font-weight: 700;
    color: #0D1B3E;
    border-left: 3px solid #2563EB;
    transition: background 0.2s;
}

.country-pill:hover { background: #EEF2F7; }

.country-flag-img {
    width: 24px;
    height: auto;
    border-radius: 3px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    object-fit: contain;
}

/* =========================================================
   Sectors Header — "17 та фаолият соҳалари сони"
========================================================= */
.sectors-header {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 0.6vh;
    margin-bottom: 0.4vh;
}

.sectors-count {
    font-size: clamp(1.4rem, 3vh, 2.2rem);
    font-weight: 900;
    color: #0A2560;
    line-height: 1;
    letter-spacing: -0.5px;
}

.sectors-label {
    font-size: clamp(0.65rem, 1.2vh, 0.78rem);
    font-weight: 700;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =========================================================
   Sectors List — Residents Card
========================================================= */
.sectors-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6vh 0.6vw;
    margin-top: 0.8vh;
    overflow-y: auto;
    max-height: 22vh;
    padding-right: 2px;
}

.main-content-section::-webkit-scrollbar {
    width: 6px;
}
.main-content-section::-webkit-scrollbar-track {
    background: transparent;
}
.main-content-section::-webkit-scrollbar-thumb {
    background: var(--accent-gold);
    border-radius: 10px;
    opacity: 0.5;
}
.main-content-section::-webkit-scrollbar-thumb:hover {
    background: #A88B3A;
}

.sectors-list::-webkit-scrollbar {
    width: 3px;
}
.sectors-list::-webkit-scrollbar-track { background: transparent; }
.sectors-list::-webkit-scrollbar-thumb {
    background: #C9A84C;
    border-radius: 10px;
}

.sector-tag {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0.75vh 0.8vw;
    background: #F8FAFC;
    border-radius: 8px;
    font-size: clamp(0.72rem, 1.35vh, 0.88rem);
    font-weight: 600;
    color: #1E293B;
    border-left: 3px solid #2563EB;
    transition: background 0.18s;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sector-tag:hover {
    background: #EEF2F7;
    border-left-color: #C9A84C;
}

.sector-tag i {
    width: 14px;
    height: 14px;
    color: #2563EB;
    flex-shrink: 0;
}

.sector-tag:hover i {
    color: #C9A84C;
}


/* =========================================================
   Jobs Card Visual Graphics
========================================================= */
.jobs-content-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding-right: 1vw;
}

.jobs-content-flex .main-stat {
    flex: 1;
}

.number-with-icon {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0.2vh;
    margin-top: 0.5vh;
}

.number-with-icon h2 {
    margin: 0 !important;
}

.stat-icon-wrapper i {
    color: #2563EB;
    width: 48px;
    height: 48px;
    background: #E0E7FF;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(37,99,235, 0.2);
}

.jobs-illustration-box {
    width: 14vh;
    min-width: 120px;
    height: 14vh;
    min-height: 120px;
    flex-shrink: 0;
    margin-left: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.colored-illustration {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.08));
    animation: floatIllustration 5s ease-in-out infinite;
}

@keyframes floatIllustration {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* News Ticker */
.news-ticker-container {
    height: 4vh;
    min-height: 30px;
    background: #FFFFFF;
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.ticker-badge {
    background: var(--accent-blue);
    color: #FFFFFF;
    padding: 0 1.5vw;
    height: 100%;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.ticker-wrap {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
}

.ticker-move {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    height: 100%;
    padding-left: 100%;
    animation: ticker 90s linear infinite;
}

.ticker-move:hover {
    animation-play-state: paused;
}

.ticker-item {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    display: inline-block;
    padding: 0 2vw;
    position: relative;
}

.ticker-item::after {
    content: "•";
    position: absolute;
    right: -3px;
    color: var(--accent-blue);
    font-weight: 900;
}

.ticker-item:last-child::after {
    display: none;
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Footer */
.dashboard-footer {
    height: 4vh;
    min-height: 28px;
    background: #FFFFFF;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-dim);
    font-weight: 600;
    border-top: 1px solid var(--card-border);
}

/* =========================================================
   Modal Overlay
========================================================= */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(13, 27, 62, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 90%;
    max-width: 450px;
    background: #FFFFFF;
    border-radius: 12px;
    padding: 24px;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border-left: 5px solid #2563EB;
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-header-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #E2E8F0;
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.modal-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-title-group i {
    color: #2563EB;
    width: 24px;
    height: 24px;
}

.modal-header-custom h3 {
    font-size: 1.25rem;
    color: #0D1B3E;
    font-weight: 800;
}

.modal-close {
    background: transparent;
    border: none;
    color: #94A3B8;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    display: flex;
    padding: 4px;
}

.modal-close:hover {
    color: #EF4444;
    transform: rotate(90deg);
}

.modal-body p {
    font-size: 0.95rem;
    color: #334155;
    line-height: 1.6;
    font-weight: 500;
}

/* =========================================================
   RESPONSIVE DESIGN (Moslashuvchanlik)
   1. Computer (> 1400px) - Base CSS (above)
   2. Laptop (< 1400px)
   3. Tablet / Flanshet (< 1024px)
   4. Phone / Mobil (< 768px)
========================================================= */

/* 2. LAPTOP */
@media (max-width: 1400px) {
    .dropdown-text { max-width: 250px; }
    
    .logo-caption-main { font-size: clamp(1.1rem, 2.2vh, 1.6rem); }
    .header-band-title h2 { font-size: clamp(0.95rem, 1.8vh, 1.4rem); }
    .main-stat h2 { font-size: clamp(1.6rem, 4vh, 2.8rem) !important; }
    
    .stats-grid { gap: 1.2vh; }
    .glass-card { padding: 1.5vh 1.5vw; }
}

/* 3. TABLET (Flanshet) */
@media (max-width: 1024px) {
    .header-band-logos {
        gap: 2vw;
        padding: 1.5vh 3vw;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }

    .residents-card, .grid-column-wrapper {
        grid-column: span 1;
    }
    .grid-column-wrapper:last-child {
        grid-column: span 2;
    }
    
    /* Removed split layout reset for tablet */
}

/* 4. PHONE (Mobile) */
@media (max-width: 768px) {
    body, html {
        overflow-y: auto;
        overflow-x: hidden;
    }
    .dashboard-container {
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
    }
    .main-content-section {
        overflow: visible;
        height: auto;
        flex: none;
    }

    .header-band-logos {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .logo-group { flex-direction: column; gap: 8px; }
    .header-logo-divider { display: none; }
    
    .header-band-controls {
        flex-direction: column;
        gap: 12px;
    }
    
    .dropdowns-group { 
        width: 100%; 
        justify-content: center; 
        flex-direction: column;
    }
    
    .dropdown-text { max-width: 150px; text-transform: none; }
    
    .stats-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }
    
    .residents-card, .grid-column-wrapper, .grid-column-wrapper:last-child {
        grid-column: span 1;
        grid-row: auto;
    }
    
    .jobs-illustration-box {
        display: none; /* Hide large illustrations on narrow phones to save space */
    }
    
    .services-main-list {
        max-height: none; /* Auto-expand */
    }
    
    .news-ticker-container { min-height: 48px; }
}
