/* Design Tokens & Theme Variables */
:root {
    /* Fonts */
    --font-primary: 'Cairo', 'Tajawal', sans-serif;
    
    /* Common Accents */
    --color-developing: #2ec4b6; /* Mint Green */
    --color-developed: #ffb703;  /* Gold */
    --color-pilgrims: #8338ec;   /* Purple */
    --color-accent-blue: #48cae4;
    --color-accent-pink: #ff006e;
    --color-white: #ffffff;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* Dark Theme Variables */
body.dark-theme {
    --bg-app: #0b0f14;
    --bg-sidebar: #0f151c;
    --bg-card: rgba(21, 28, 36, 0.85);
    --border-color: rgba(255, 255, 255, 0.06);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-inverse: #0f172a;
    --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.3);
    --shadow-sidebar: 5px 0 25px rgba(0, 0, 0, 0.2);
    --card-glow: 0 0 15px rgba(46, 196, 182, 0.03);
    --bg-hover: rgba(255, 255, 255, 0.05);
    --table-header-bg: #141c25;
    --table-row-even: #121921;
}

/* Light Theme Variables */
body.light-theme {
    --bg-app: #f4f6f9;
    --bg-sidebar: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.9);
    --border-color: rgba(0, 0, 0, 0.08);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-inverse: #f8fafc;
    --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    --shadow-sidebar: -5px 0 25px rgba(0, 0, 0, 0.05);
    --card-glow: 0 0 15px rgba(0, 0, 0, 0.01);
    --bg-hover: rgba(0, 0, 0, 0.03);
    --table-header-bg: #f8fafc;
    --table-row-even: #f1f5f9;
}

/* Basic Reset & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-app);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-app);
}
::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-developed);
}

/* App Container Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling (RTL: Placed on the right) */
.sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    border-left: 1px solid var(--border-color);
    box-shadow: var(--shadow-sidebar);
    display: flex;
    flex-direction: column;
    z-index: 100;
    position: sticky;
    top: 0;
    height: 100vh;
    flex-shrink: 0;
    transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.sidebar-brand {
    padding: 30px 24px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid var(--border-color);
}

.brand-icon {
    font-size: 24px;
    color: var(--color-developed);
    background: rgba(255, 183, 3, 0.1);
    width: 45px;
    height: 45px;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: morphIcon 6s ease-in-out infinite;
}

@keyframes morphIcon {
    0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    50% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; }
}

.brand-text h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.brand-text span {
    font-size: 11px;
    color: var(--text-muted);
}

.sidebar-menu {
    flex-grow: 1;
    padding: 24px 16px;
}

.sidebar-menu ul {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 8px;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.sidebar-menu li a i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    transition: transform var(--transition-fast);
}

.sidebar-menu li:hover a {
    color: var(--text-main);
    background-color: var(--bg-hover);
}

.sidebar-menu li:hover a i {
    transform: scale(1.1);
}

.sidebar-menu li.active a {
    color: var(--text-inverse);
    background: linear-gradient(135deg, var(--color-developed) 0%, #ff8c00 100%);
    box-shadow: 0 4px 15px rgba(255, 183, 3, 0.3);
}

.sidebar-menu li.active a i {
    color: var(--text-inverse);
}

.sidebar-footer {
    padding: 24px;
    border-top: 1px solid var(--border-color);
}

/* Theme Toggle */
.theme-toggle-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.toggle-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-toggle-btn {
    background-color: var(--bg-hover);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 10px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
    background-color: var(--border-color);
}

.theme-toggle-btn i {
    font-size: 15px;
    transition: transform var(--transition-normal);
}

body.dark-theme .light-icon,
body.light-theme .dark-icon {
    display: none;
}

.sidebar-info-box {
    background-color: var(--bg-hover);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.sidebar-info-box i {
    color: var(--color-accent-blue);
    font-size: 14px;
    margin-top: 2px;
}

.sidebar-info-box p {
    font-size: 11px;
    line-height: 1.5;
    color: var(--text-muted);
}

/* Main Content Layout */
.main-content {
    flex-grow: 1;
    padding: 24px 30px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    height: 100vh;
}

/* Global Header Styling */
.app-header {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-card);
    padding: 20px 24px;
    border-radius: var(--radius-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.header-title-area h1 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.header-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 500;
}

.header-meta-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.meta-item {
    background-color: var(--bg-hover);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
}

.meta-item i {
    color: var(--color-developed);
}

.globe-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    padding: 0;
    justify-content: center;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.globe-icon:hover {
    transform: rotate(30deg);
}

/* Tab Switching Control logic */
.tab-pane {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Key Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.metric-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--card-color);
    opacity: 0.8;
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.15);
}

.metric-icon {
    width: 48px;
    height: 48px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--card-color);
}

.metric-info {
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 4px;
}

.metric-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
}

.metric-unit {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Dashboard Grid Rows */
.dashboard-row {
    margin-bottom: 24px;
}

.row-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.row-3col-alt {
    display: grid;
    grid-template-columns: 2fr 1.2fr;
    gap: 20px;
}

.row-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.row-bottom-cards {
    display: grid;
    grid-template-columns: 1fr 1.3fr 1.8fr 1.1fr;
    gap: 20px;
}

.row-4col-gauges {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.row-3col-footer {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 20px;
}

.row-2col-pyramid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 20px;
}

.row-3col-age {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1.1fr;
    gap: 20px;
}

.row-fullwidth {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.span-2 {
    grid-column: span 2;
}

.span-1 {
    grid-column: span 1;
}

/* Card Widget Styles */
.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: var(--shadow-card), var(--card-glow);
    transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.chart-header {
    margin-bottom: 20px;
}

.chart-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
}

.chart-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
    display: block;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 250px;
}

.large-line-chart {
    height: 320px;
}

/* Leaflet Map customization styling */
.map-container-wrapper {
    width: 100%;
    height: 280px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

#worldMap {
    width: 100%;
    height: 100%;
    background-color: var(--bg-app);
}

/* Custom styled popup for Leaflet */
.leaflet-popup-content-wrapper {
    background-color: var(--bg-sidebar) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: var(--font-primary) !important;
}

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

.map-popup-title {
    font-weight: 700;
    font-size: 13px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.map-popup-row {
    font-size: 11px;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
}

.map-popup-row strong {
    color: var(--color-developed);
}

/* Donut center absolute overlays */
.donut-wrapper {
    height: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.donut-center-text {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.donut-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
}

.donut-label {
    font-size: 10px;
    color: var(--text-muted);
}

.donut-wrapper-small {
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.donut-center-text-small {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.donut-value-small {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-main);
}

.donut-label-small {
    font-size: 9px;
    color: var(--text-muted);
}

.donut-wrapper-legend {
    height: 180px;
}

/* Tables styling */
.table-card {
    height: 370px;
}

.table-wrapper {
    flex-grow: 1;
    overflow-y: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11.5px;
    text-align: right;
}

.data-table th {
    background-color: var(--table-header-bg);
    color: var(--text-muted);
    font-weight: 700;
    padding: 10px 12px;
    position: sticky;
    top: 0;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    font-weight: 500;
}

.data-table tbody tr {
    transition: background-color var(--transition-fast);
}

.data-table tbody tr:nth-child(even) {
    background-color: var(--table-row-even);
}

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

.badge-status {
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
}

.badge-developing {
    background: rgba(46, 196, 182, 0.1);
    color: var(--color-developing);
    border: 1px solid rgba(46, 196, 182, 0.2);
}

.badge-developed {
    background: rgba(255, 183, 3, 0.1);
    color: var(--color-developed);
    border: 1px solid rgba(255, 183, 3, 0.2);
}

.country-flag-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.country-flag-cell span {
    font-size: 15px;
}

/* Filter controls card */
.filter-card {
    justify-content: center;
}

.filter-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

.filter-select {
    background-color: var(--bg-hover);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 10px 12px;
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color var(--transition-fast);
}

.filter-select option {
    color: #000;
    background-color: #fff;
}

.filter-select:focus {
    border-color: var(--color-developed);
}

/* Summary Box Text Card */
.summary-bullets {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bullet-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.bullet-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.green-bullet .bullet-dot { background-color: var(--color-developing); box-shadow: 0 0 8px var(--color-developing); }
.gold-bullet .bullet-dot { background-color: var(--color-developed); box-shadow: 0 0 8px var(--color-developed); }

.bullet-content h4 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 2px;
}

.bullet-content p {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.5;
}

.bullet-content p strong {
    color: var(--text-main);
}

/* Top 5 pilgrim countries cards grid */
.top-5-card {
    justify-content: flex-start;
}

.top-5-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    flex-grow: 1;
    align-items: center;
}

.top5-profile-card {
    background-color: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform var(--transition-fast);
}

.top5-profile-card:hover {
    transform: translateY(-2px);
    border-color: var(--color-developed);
}

.top5-flag {
    font-size: 20px;
    margin-bottom: 4px;
}

.top5-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.top5-val {
    font-size: 12px;
    font-weight: 800;
    color: var(--color-developed);
    margin-top: 4px;
}

.top5-sub {
    font-size: 9px;
    color: var(--text-muted);
}

/* Tab 2 specific: Gauges & satisfactions */
.flex-center-card {
    justify-content: center;
    align-items: center;
}

.badge-status-update {
    position: absolute;
    top: 15px;
    left: 15px; /* In RTL, place update badge on top-left */
    background-color: rgba(46, 196, 182, 0.08);
    border: 1px solid rgba(46, 196, 182, 0.15);
    color: var(--color-developing);
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge-status-update .badge-dot {
    width: 6px;
    height: 6px;
    background-color: var(--color-developing);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 6px var(--color-developing);
    animation: pulse 1.5s infinite alternate;
}

@keyframes pulse {
    0% { transform: scale(0.8); opacity: 0.6; }
    100% { transform: scale(1.2); opacity: 1; }
}

.gauge-container {
    position: relative;
    width: 160px;
    height: 100px;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gauge-value {
    position: absolute;
    bottom: 12px;
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
}

.gauge-limits {
    position: absolute;
    bottom: -15px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: var(--text-muted);
    font-weight: 600;
    padding: 0 10px;
}

/* Dual stats card layout */
.dual-stats-card {
    justify-content: space-between;
}

.dual-stats-wrapper {
    display: flex;
    gap: 15px;
    flex-grow: 1;
    align-items: center;
}

.sub-stat-card {
    flex: 1;
    background-color: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform var(--transition-fast);
}

.sub-stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon-wrapper {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.stat-details h3 {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-main);
}

.stat-details p {
    font-size: 9.5px;
    color: var(--text-muted);
    margin-top: 2px;
    font-weight: 600;
}

/* Tab 3 specific: Age grids & pyramids */
.pyramid-wrapper {
    height: 300px;
}

.stats-grid-card {
    justify-content: flex-start;
}

.age-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    flex-grow: 1;
}

.age-stat-item {
    background-color: var(--bg-hover);
    border-right: 3px solid var(--border-color); /* Right border for RTL! */
    border-radius: 4px var(--radius-md) var(--radius-md) 4px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform var(--transition-fast);
}

.age-stat-item:hover {
    transform: translateX(-2px); /* Translate left in RTL on hover */
}

.age-stat-item.border-green { border-right-color: var(--color-developing); }
.age-stat-item.border-cyan { border-right-color: var(--color-accent-blue); }
.age-stat-item.border-gold { border-right-color: var(--color-developed); }
.age-stat-item.border-purple { border-right-color: var(--color-pilgrims); }

.age-stat-main {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}

.age-stat-number {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
}

.age-stat-label {
    font-size: 9.5px;
    font-weight: 700;
    color: var(--text-muted);
}

.age-stat-desc {
    font-size: 9.5px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Responsive Overrides (Media Queries) */
@media (max-width: 1400px) {
    .row-bottom-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .top-5-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    .metrics-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .row-4col-gauges {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1100px) {
    .sidebar {
        width: 80px;
    }
    .sidebar-brand .brand-text, 
    .sidebar-menu span, 
    .sidebar-footer .theme-toggle-container span,
    .sidebar-footer .sidebar-info-box {
        display: none;
    }
    .sidebar-brand {
        padding: 24px 10px;
        justify-content: center;
    }
    .sidebar-menu {
        padding: 20px 8px;
    }
    .sidebar-menu li a {
        justify-content: center;
        padding: 12px;
    }
    .theme-toggle-btn {
        justify-content: center;
        padding: 10px;
    }
    .row-3col, .row-3col-alt, .row-2col, .row-3col-footer, .row-2col-pyramid, .row-3col-age {
        grid-template-columns: 1fr;
    }
    .span-2 {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .app-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .header-meta-area {
        width: 100%;
        justify-content: flex-start;
    }
    .main-content {
        padding: 15px;
    }
    .row-bottom-cards {
        grid-template-columns: 1fr;
    }
    .top-5-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .age-stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    .top-5-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
