/* Color Palette */
:root {
    --primary: #27aae1; /* Blue */
    --secondary: #FE7501; /* Orange */
    --accent: #006d77; /* Teal */
    --success: #28a745; /* Green */
    --danger: #dc3545; /* Red */
    --text: #000000; /* Black */
    /* A pure-white canvas with pure-white cards on top of it reads as one
       glaring, undifferentiated white surface, especially over a long
       session -- softening both by a few points gives real depth/contrast
       between page and card while staying just as "clean". */
    --background: #eef1f4; /* Soft blue-grey page canvas, not stark white */
    --surface: #fbfcfd;    /* Near-white for cards/panels -- was pure #fff */
    --nav-bg: #fbfcfd;
    --border-radius: 8px;
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --text: #333;
}

/* General Styles */
body {
    margin: 0;
    font-family: 'Arial', sans-serif;
    color: var(--text);
    background-color: var(--background);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Pushes the footer to the bottom of the viewport on short pages instead
   of leaving it stranded right under a small amount of content. */
main {
    flex: 1 0 auto;
}

h1, h2, h3 {
    font-weight: bold;
}

h2 {
    color: var(--primary);
    font-size: 2.0rem;
    margin-bottom: 0.5rem;
}

h3 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Navigation Bar - Keep your existing styles */
.navbar {
    background-color: var(--nav-bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1rem 2rem;
    display: flex;
    /* Bootstrap's own .navbar component (loaded for its other widgets)
       sets flex-wrap: wrap at the same specificity; without an explicit
       value here that wins by default, silently dropping the nav-links
       block onto a second line under the logo whenever the row is borderline
       too narrow -- how borderline depends on the fallback font each
       browser substitutes for Arial (not installed on Linux), which is why
       this could wrap in Chrome but not Firefox at the same width. */
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
    /* .navbar-brand and .nav-links are the only other flex children when
       this is visible (nav-links collapses to display:none on the same
       breakpoint) -- space-between then pushes this to the far right. */
    order: 2;
}

.navbar-logo-link {
    display: inline-flex;
    line-height: 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.5rem;
}

.nav-links li {
    position: relative;
    /* Without this, a flex item can be squeezed narrower than its label's
       natural width, wrapping "Health Updates" etc. into two lines instead
       of the whole item moving to a new row (nav-links wraps as a unit via
       flex-wrap in the media queries below). */
    flex-shrink: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-size: 0.95rem;
    white-space: nowrap;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

/* Authorisation badges  */
.user-menu-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.pending-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background: #dc3545;
    color: #fff;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    font-size: 0.68rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
    box-shadow: 0 0 0 2px #fff;
    animation: badgePulse 2.4s ease-in-out infinite;
    pointer-events: none;   
    z-index: 10;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1);    box-shadow: 0 0 0 2px #fff; }
    50%       { transform: scale(1.12); box-shadow: 0 0 0 3px rgba(220,53,69,0.25); }
}

/* When count is 0 we hide it via Jinja — but just in case */
.pending-badge[data-count="0"] { display: none; }

.pending-menu-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #dc3545 !important;
    font-weight: 600;
    font-size: 0.88rem;
}
.pending-menu-item .pending-inline-badge {
    background: #dc3545;
    color: #fff;
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 0.72rem;
    font-weight: 700;
    margin-left: auto;
}

/* DROPDOWN MENU */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
}

.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-arrow,
.dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--nav-bg);
    max-width: 300px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    z-index: 100;
    border-radius: 5px;
    padding: 0.5rem 0;
    margin-top: 0; 
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Create invisible bridge to prevent dropdown from disappearing */
.dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 5px; /* Small bridge area */
    background: transparent;
    z-index: 99;
}

/* Keep dropdown visible when hovering over it */
.dropdown:hover .dropdown-content,
.dropdown-content:hover,
.dropdown.active .dropdown-content {
    display: block;
    animation: fadeIn 0.2s ease;
}

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

.scrollable-dropdown {
    max-height: 400px;
    overflow-y: auto;
}

/* Scrollbar Styling */
.scrollable-dropdown::-webkit-scrollbar {
    width: 6px;
}

.scrollable-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.scrollable-dropdown::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.scrollable-dropdown::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Dropdown Sections */
.dropdown-section {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0.5rem 1rem;
}

.dropdown-section:last-child {
    border-bottom: none;
}

.dropdown-header {
    display: block;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    color: var(--secondary);
    font-size: 1rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.dropdown-header:hover {
    background-color: rgba(39, 170, 225, 0.1);
    color: var(--primary);
    border-left-color: var(--primary);
}

/* Submenu Items */
.dropdown-submenu {
    padding-left: 0;
}

.dropdown-submenu a {
    display: block;
    padding: 0.6rem 1.25rem 0.6rem 2.5rem;
    font-size: 0.9rem;
    color: #666;
    transition: all 0.2s ease;
    position: relative;
}

.dropdown-submenu a::before {
    content: "›";
    position: absolute;
    left: 1.5rem;
    color: var(--primary);
    font-size: 1.1rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.dropdown-submenu a:hover {
    background-color: rgba(39, 170, 225, 0.08);
    color: var(--primary);
    padding-left: 2.75rem;
}

.dropdown-submenu a:hover::before {
    opacity: 1;
}

/* Tablet/small-laptop range: the hamburger stays phone-only (see the
   max-width:768px block below), so instead of collapsing, let the nav row
   wrap onto a second line with tighter spacing. This is what keeps the
   authenticated nav (up to 9 items) from overflowing/getting clipped on
   laptop-width screens without hiding it behind a toggle. Goes up to 1500px
   because with nav-links a now forced to white-space:nowrap (so labels
   never wrap mid-word), the full unwrapped row needs more room than it used
   to before it comfortably fits on common 1366/1440px laptop widths. */
@media (min-width: 769px) and (max-width: 1500px) {
    .nav-links {
        flex-wrap: wrap;
        row-gap: 0.5rem;
        gap: 0.5rem 1rem;
        justify-content: flex-end;
    }

    .nav-links a {
        font-size: 0.88rem;
    }
}

/* Mobile Responsiveness -- the hamburger toggle only ever appears at
   phone widths; tablets/laptops use the wrapping row above instead. */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--nav-bg);
        flex-direction: column;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        padding: 1rem 0;
        gap: 0;
        max-height: calc(100vh - 100%);
        overflow-y: auto;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li {
        width: 100%;
    }
    
    .nav-links a {
        display: block;
        padding: 1rem 2rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .dropdown::after {
        display: none;
    }
    
    .dropdown-content {
        position: static;
        box-shadow: none;
        margin-top: 0;
        border-left: 3px solid var(--primary);
        margin-left: 1rem;
    }

    .dropdown-content.scrollable-dropdown {
        max-height: 200px;
    }

    .dropdown:hover .dropdown-content {
        display: none;
    }
    
    .dropdown.active .dropdown-content {
        display: block;
    }
}

/* Hero section */
.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

.logo-icon {
    width: clamp(110px, 15vw, 180px); /* Responsive width */
    height: auto;
    flex-shrink: 1;
  }

 .hero {
    text-align: center;
    padding: 40px 20px;
    background: var(--primary);
    color: white;
    margin: -40px -4px -40px -4px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: bold;
    color: var(--text);
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    color: white;
    margin-bottom: 4px;
}



/* Main content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: calc(100vh - 160px);
}

/* Content sections */
.contentindex-section {
    background: var(--surface);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
} 

.content-section {
    background: var(--surface);
    padding: 40px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: -5rem;

}

.content-section h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #27aae1;
    font-weight: bold;
}

.content-section h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #333;
    font-weight: bold;
}



/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.card {
    background: var(--surface);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    font-weight: bold;
}

.card-icon.primary { background-color: #27aae1; }
.card-icon.secondary { background-color: #FE7501; }
.card-icon.success { background-color: #28a745; }
.card-icon.warning { background-color: #dc3545; }

.card h3 {
    margin-bottom: 15px;
    color: #333;
    font-weight: bold;
}

/* Footer */
.footer {
    background-color: #006d77;
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
    flex-shrink: 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-section h3 {
    margin-bottom: 20px;
    color: #27aae1;
    font-weight: bold;
}

.footer-section p,
.footer-section a {
    color: #e0e0e0;
    text-decoration: none;
    margin-bottom: 10px;
    display: block;
}

.footer-section a:hover {
    color: #FE7501;
}

.footer-bottom {
    text-align: center;
    margin-top: 90px;
    padding-top: 10px;
    border-top: 1px solid #004d57;
    color: #b0b0b0;
}


/* UPDATES SECTION */
 .filters {
    background: var(--surface);
    padding: 0.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 0.5rem;
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: end;
}

.filter-row {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}


.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 200px;
    text-align: center;
}

.filter-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group select {
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: var(--surface);
    color: var(--text);
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(39, 170, 225, 0.1);
}

.filter-group select:hover {
    border-color: var(--primary);
}

.kpi-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.thresh-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.kpi-card {
    background: var(--background);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position:absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background:var(--secondary);
}

.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.kpi-card h3 {
    color: var(--secondary);
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.kpi-card p {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.kpi-card .kpi-icon {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.kpi-card .kpi-sub {
    font-size: 0.72rem;
    color:var(--secondary);
    margin-top: 2px;
    min-height: 20px;
}

.kpi-delta {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    margin-top: 4px;
}

.kpi-delta.up   { background: rgba(40,167,69,0.12);  color: var(--success); }
.kpi-delta.down { background: rgba(220,53,69,0.12);  color: var(--danger); }
.kpi-delta.flat { background: rgba(56,183,175,0.12); color: var(--accent); }

.species-pill {
    display: inline-flex;
    align-items: center;
    gap:6px;
    background: var(--secondary);
    border: 1px solid rgba(255,255,255,0.35);
    color: var(--text);
    border-radius:   20px;
    padding:         4px 14px;
    font-size:       0.8rem;
    font-weight:     600;
    backdrop-filter: blur(4px);
}
.species-pill .sp-pct {
    background:    rgba(255,255,255,0.25);
    border-radius: 10px;
    padding:       1px 7px;
    font-size:     0.72rem;
}

/* Recency badge in hero */
.recency-badge {
    display:       inline-block;
    font-size:     0.8rem;
    background:   var(--secondary);
    color:         var(--text);
    border-radius: 20px;
    padding:         4px 14px;
    margin-top:    6px;
    font-weight:   500;
}

/* Sub-county table row colouring by CFR */
.cfr-high  { color: #dc3545; font-weight: 700; }
.cfr-mid   { color: #fd7e14; font-weight: 600; }
.cfr-low   { color: #28a745; }
/* Charts Section */
.charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    width: 100%;
    box-sizing: border-box;
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    width: 100% !important;
    box-sizing: border-box;
}



@media (max-width: 768px) {
    .charts {
        grid-template-columns: 1fr;
    }
    .chart-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tab Content Sections - NATIONAL */
.tab-content-section {
    display: none;
}

.tab-content-section.active {
    display: block;
}


/* VACCINATION COVERAGE STYLES  */
.vaccine-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.section-header {
    background: var(--surface);
    padding: 20px;
    margin-bottom: 0;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    box-shadow: var(--card-shadow);
}

.section-header h1 {
    color: var(--primary);
    margin: 0;
}
.filter-root-badge {
    display: inline-block;
    background: #e8f4fd;
    color: #1874CD;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 4px;
    vertical-align: middle;
    letter-spacing: 0.02em;
}

.coverage-metric-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e8f4fd;
    color: #1874CD;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    margin-left: 8px;
    vertical-align: middle;
}

.vacc-kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.vacc-kpi-card {
    background: var(--surface);
    border-radius: 10px;
    padding: 1rem 1.1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    border-left: 4px solid #27aae1;
    text-align: center;
}

.vacc-kpi-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #0a3d62;
    line-height: 1.1;
}

.vacc-kpi-label {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.3rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Sub-Navigation for Vaccine Coverage */
.vaccine-sub-nav {
    display: flex;
    gap: 0;
    background-color: var(--primary);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
    overflow: hidden;
}

.vaccine-sub-nav a {
    flex: 1;
    text-decoration: none;
    color: white;
    font-size: 1rem;
    padding: 1rem 1.5rem;
    text-align: center;
    transition: background-color 0.3s, color 0.3s;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 500;
}

.vaccine-sub-nav a:last-child {
    border-right: none;
}

.vaccine-sub-nav a:hover {
    background-color: var(--accent);
}

.vaccine-sub-nav a.active {
    background-color: var(--secondary);
    font-weight: bold;
}

.filtersvacc-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.filtervacc-group {
    display: flex;
    flex-direction: column;
}

.filtervacc-group label {
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--text);
    font-size: 0.95rem;
}

.filtervacc-group select,
.filtervacc-group input {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    background: var(--surface);
    transition: border-color 0.3s;
}

.filtervacc-group select:focus,
.filtervacc-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.content-wrapper {
    background: var(--surface);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
}

.section-title {
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary);
}


.maps-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.map-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: var(--border-radius);
    border: 1px solid #e0e0e0;
}

.map-box h3 {
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.map-container {
    height: 600px;
    width: 100%;
    position: relative;
    background: var(--surface);
    border-radius: var(--border-radius);
}

.chart-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: var(--border-radius);
    border: 1px solid #e0e0e0;
    margin-bottom: 30px;
}

.chart-box h3 {
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.table-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: var(--border-radius);
    border: 1px solid #e0e0e0;
    overflow-x: auto;
}

.table-box h3 {
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background: var(--surface);
}

.summary-table th,
.summary-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.summary-table th {
    background: var(--primary);
    color: white;
    font-weight: bold;
    position: sticky;
    top: 0;
}

.summary-table tr:hover {
    background: #f5f5f5;
}

.summary-table td.number-cell {
    font-weight: 600;
    position: relative;
}

.yearly-maps-section {
    margin-top: 40px;
}

.yearly-maps-title {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text);
    font-size: 1.8rem;
    font-weight: bold;
}

.yearly-maps-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.yearly-map-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: var(--border-radius);
    border: 1px solid #e0e0e0;
}

.yearly-map-box h4 {
    color: var(--primary);
    margin-top: 0;
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 1.2rem;
    text-align: center;
}

.yearly-map-box p {
    color: var(--accent);
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.0rem;
    text-align: center;
}

.yearly-map-container {
    height: 500px;
    width: 100%;
    background: var(--surface);
    border-radius: var(--border-radius);
}

.loading-spinner {
    text-align: center;
    padding: 40px;
    color: var(--primary);
    font-size: 1.1rem;
}

.loading-spinner i {
    font-size: 2rem;
    animation: spin 1s linear infinite;
}

/* PRIORITY DISEASES */
.table-section,
.about-section,
.chart-section {
    margin-bottom: 2rem;
    width: 100%;
}

.chart-container,
.table-container,
.about-container {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    box-sizing: border-box;
    width: 100%;
    margin-bottom: 1rem;
}

.chart-container:hover,
.table-container:hover,
.about-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.chart-container h1,
.table-container h1,
.about-container h1 {
    color: var(--text);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
}

.chart-container h4,
.table-container h4 {
    color: var(--text);
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 1rem;
    font-style: italic;
}

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

.trend-header-title {
    margin: 0;
    font-size: 0.9rem;
    font-style: italic;
    color: var(--text);
}

.year-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.year-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    border: 1.5px solid #dbe1e6;
    background: var(--background);
    color: var(--text);
    font-size: 0.8rem;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
}

.year-chip:hover {
    border-color: var(--primary);
}

.year-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    font-weight: 600;
}

/* Leaflet spot map (priority-diseases / national / updates) -- neutral
   fallback shown for the instant before tiles finish loading, so there's
   no flash of stark white. */
.leaflet-container {
    background: #eef1f4;
}

#kenyamap, #kenyamapmonth {
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid #E6E9E3;
}

.about-container h3 {
    color: var(--primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.5rem;
}

.about-container h4 {
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 500;
    margin: 1rem 0 0.5rem;
    text-align: left;
}

.about-container p {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.about-container ul {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 1rem;
}

.about-container ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: var(--text);
}

.about-container ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-size: 1.2rem;
    line-height: 1.6;
}

.about-container a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.about-container a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.about-container strong {
    font-weight: 600;
    color: var(--primary);
}

.time-period-card {
    min-width: 120px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    margin: 5px;
}

.time-period-card:hover {
    background-color: #f0f0f0;
    transform: scale(1.05);
}

.time-period-card.active {
    background-color: #007bff;
    color: white;
    border-color: #0056b3;
}

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

.table-bordered {
    border: 1px solid #dee2e6;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid #dee2e6;
    padding: 8px;
}

#map-instruction {
    text-align: center;
    color: var(--text);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.data-source {
    margin-top: 2rem;
    text-align: center;
}

/* ── About Disease Card ─────────────────────────────────────────────────── */
.about-disease-card {
    background: var(--surface);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-top: 2rem;
    overflow: hidden;
}

.about-disease-header {
    background: var(--primary);
    color: #fff;
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.about-disease-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    flex: 1;
}

.about-disease-header .toggle-icon {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.about-disease-header.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

/* Quick-fact pills */
.disease-quick-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem 0 0;
    background: #f8f9fa;
    border-bottom: 4px solid transparent;
}

.fact-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--surface);
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 0.3rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #495057;
}

.fact-pill i { color: #27aae1; font-size: 0.75rem; }
.fact-pill.zoonotic  { border-color: #dc3545; color: #dc3545; }
.fact-pill.zoonotic i { color: #dc3545; }
.fact-pill.notifiable { border-color: #fd7e14; color: #fd7e14; }
.fact-pill.notifiable i { color: #fd7e14; }

/* Tab nav */
.about-tab-nav {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.about-tab-btn {
    padding: 0.75rem 1.2rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: #6c757d;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s, border-color 0.2s;
    margin-bottom: -2px;
}

.about-tab-btn:hover  { color: #27aae1; }
.about-tab-btn.active { color: var(--background); border-bottom-color: #27aae1; background:var(--secondary); }

/* Tab panels */
.about-tab-panels { padding: 1.5rem; }

.about-tab-panel { display: none; }
.about-tab-panel.active { display: block; }

/* Prose inside panels */
.about-tab-panel h4 {
    color: #0a3d62;
    font-size: 0.95rem;
    font-weight: 700;
    margin: 1.2rem 0 0.4rem;
    padding-bottom: 4px;
    border-bottom: 2px solid #e8f4fd;
}

.about-tab-panel h4:first-child { margin-top: 0; }

.about-tab-panel p  { color: #495057; font-size: 0.9rem; line-height: 1.7; margin-bottom: 0.75rem; }
.about-tab-panel ul { padding-left: 1.2rem; margin-bottom: 0.75rem; }
.about-tab-panel li { color: #495057; font-size: 0.9rem; line-height: 1.7; margin-bottom: 0.25rem; }
.about-tab-panel em { color: #555; }

/* External links row */
.about-links-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.about-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--surface);
    border: 1.5px solid var(--primary);
    border-radius: 6px;
    padding: 0.35rem 0.65rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #27aae1;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.about-link-btn:hover { background: var(--secondary); color: var(--background); text-decoration: none; }
.about-link-btn i { font-size: 0.75rem; }

/* Loading placeholder */
.about-loading {
    padding: 2rem;
    text-align: center;
    color: #6c757d;
}

/* NATIONAL - SUMMARY REPORTS  */
.chart-subtitle {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Representativeness map container — full width, responsive height */
#representativeness_map {
    width: 100%;
    height: 600px;
    max-width: 100%;
}

.map-legend {
    font-size: 0.8rem;
    flex-wrap: wrap;
}

.legend-dot {
    width: 12px;
    height: 12px;
    display: inline-block;
    border-radius: 2px;
    margin-right: 4px;
}

/* Coverage trend and gap analysis charts */
#coverage_trend_chart,
#gap_analysis_chart {
    width: 100%;
    height: 400px;
}

/* Heatmap and monthly rhythm charts */
#consistency_heatmap,
#monthly_rhythm_chart {
    width: 100%;
    height: 450px;
}

/* Large tablets */
@media (max-width: 1200px) {
    #representativeness_map {
        height: 500px;
    }
    
    #coverage_trend_chart,
    #gap_analysis_chart {
        height: 380px;
    }

    .reporting-analytics {
        margin-top: 1.5rem;
    }
}

/* Tablets */
@media (max-width: 992px) {
    #representativeness_map {
        height: 420px;
    }
    #coverage_trend_chart,
    #gap_analysis_chart,
    #consistency_heatmap,
    #monthly_rhythm_chart {
        height: 350px;
    }

    /* Stack chart-grid to single column on tablets */
    .chart-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Mobile */
@media (max-width: 768px) {
    #representativeness_map {
        height: 320px;
    }
    #coverage_trend_chart,
    #gap_analysis_chart,
    #consistency_heatmap,
    #monthly_rhythm_chart {
        height: 280px;
    }

    /* Gap analysis bar chart needs more height on mobile 
       because counties stack vertically */
    #gap_analysis_chart {
        height: 600px;
    }
}

/* Small phones */
@media (max-width: 480px) {
    #representativeness_map {
        height: 260px;
    }
    #coverage_trend_chart,
    #consistency_heatmap,
    #monthly_rhythm_chart {
        height: 240px;
    }
    #gap_analysis_chart {
        height: 700px;
    }
}

/* Surveillance -NATIONAL TAB*/
/* Sub-Navigation for Animal Surveillance */
.sub-nav {
    display: flex;
    gap: 1rem;
    padding: 1rem 2rem;
    background-color: var(--primary);
    border-bottom: 1px solid var(--accent);
}

.sub-nav a {
    text-decoration: none;
    color: var(--text);
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
}

.sub-nav a:hover {
    background-color: var(--accent);
    color: #ffffff;
}

.sub-nav a.active {
    background-color: var(--secondary);
    color: #ffffff;
}

/* Redirect tab selection */
.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}


/* Animal surveillance - Reporters summary stats */
/* Reporters Summary styles */
.executive_summary {
    padding: 0;
    max-width: 1200px;
    margin: 0 auto;
}

.summary-header {
    background: var(--background);
    color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: var(--card-shadow);
}

.summary-header h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text);
}

.summary-header p {
    margin: 0;
    font-size: 1rem;
    color: var(--text);
}

.summary-intro {
    margin: 0;
    font-size: 1rem;
}

.summary-intro strong {
    font-weight: 600;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 2px;
}

/* Coverage Cards */
.summary-coverage {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.coverage-card {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 4px solid var(--secondary);
    transition: transform 0.2s, box-shadow 0.2s;
}

.coverage-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.coverage-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--secondary), #ff9533);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

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

.coverage-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.coverage-label {
    font-size: 0.875rem;
    color: var(--text);
    margin-top: 0.25rem;
}


/* Main Statistics Grid */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    border-top: 4px solid;
}

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

.stat-card.stat-neutral {
    border-top-color: var(--accent);
}

.stat-card.stat-warning {
    border-top-color: var(--secondary);
}

.stat-card.stat-danger {
    border-top-color: var(--danger);
}

.stat-card.stat-success {
    border-top-color: var(--success);
}

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

.stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-badge {
    background: #f0f0f0;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

.stat-card.stat-warning .stat-badge {
    background: rgba(254, 117, 1, 0.1);
    color: var(--secondary);
}

.stat-card.stat-danger .stat-badge {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger);
}

.stat-card.stat-success .stat-badge {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success);
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
    line-height: 1;
}

/* Warning Alert (No Data) */
.alert.alert-warning {
    background: rgba(254, 117, 1, 0.1);
    border: 2px solid var(--secondary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text);
}

.alert.alert-warning svg {
    color: var(--secondary);
    flex-shrink: 0;
}

.reporting-analytics {
    margin-top: 2rem;
    width: 100%;
}

.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* ERROR PAGE STYLES */
.error-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--background) 0%, #e8f4f8 100%);
    padding: 2rem;
}

.error-container {
    background: var(--surface);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 3rem;
    max-width: 600px;
    width: 100%;
    text-align: center;
    animation: fadeInUp 0.5s ease;
}

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

.error-icon {
    font-size: 5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

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

.error-code {
    font-size: 6rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.error-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
}

.error-message {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.error-details {
    margin: 2rem 0;
}

.btn-details {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.btn-details:hover {
    background: #e56a00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(254, 117, 1, 0.3);
}

.details-content {
    display: none;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-top: 1rem;
    text-align: left;
    max-height: 300px;
    overflow-y: auto;
}

.details-content pre {
    margin: 0;
    font-size: 0.875rem;
    color: var(--danger);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.error-actions .btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.error-actions .btn-primary {
    background: var(--primary);
    color: white;
    border: none;
}

.error-actions .btn-primary:hover {
    background: #1e8cb8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 170, 225, 0.3);
}

.error-actions .btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
}

.error-actions .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.error-actions .btn-accent {
    background: var(--accent);
    color: white;
    border: none;
}

.error-actions .btn-accent:hover {
    background: #005662;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 109, 119, 0.3);
}

.error-help {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #dee2e6;
}

.error-help p {
    margin: 0.5rem 0;
    color: #666;
    font-size: 0.95rem;
}

.error-help a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.error-help a:hover {
    text-decoration: underline;
}

.error-help i {
    color: var(--secondary);
    margin-right: 0.5rem;
}



/* Mobile Responsiveness */
@media (max-width: 768px) {
    .error-container {
        padding: 2rem 1.5rem;
    }
    
    .error-code {
        font-size: 4rem;
    }
    
    .error-title {
        font-size: 1.5rem;
    }
    
    .error-message {
        font-size: 1rem;
    }
    
    .error-actions {
        flex-direction: column;
    }
    
    .error-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-coverage {
        grid-template-columns: 1fr;
    }
    
    .summary-header {
        padding: 1.5rem;
    }
    
    .summary-header h3 {
        font-size: 1.5rem;
    }
    
    .stat-value {
        font-size: 1.875rem;
    }

    .reporting-analytics {
        margin-top: 1rem;
    }

    .report-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1100px) {
    .report-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 992px) {
    .reporting-analytics {
        margin-top: 1.25rem;
    }

    .report-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .reporting-analytics {
        margin-top: 0.75rem;
    }

    .stat-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .coverage-value {
        font-size: 1.5rem;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-data-message {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .vaccine-sub-nav {
        flex-direction: column;
    }

    .vaccine-sub-nav a {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    .vaccine-sub-nav a:last-child {
        border-bottom: none;
    }

    .maps-row {
        grid-template-columns: 1fr;
    }
    
    .yearly-maps-row {
        grid-template-columns: 1fr;
    }
    
    .filters-row {
        grid-template-columns: 1fr;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-filter { 
        flex-direction: column; 
    } 
    
    .search-input, .filter-select { 
        min-width: 100%; 
    } 
    
    .container { 
        padding: 16px; 
    }
    
    .frontend-view {
        padding: 20px;
    }
    
    .sidebar {
        margin-bottom: 24px;
        position: static;
    }
    
    .pagination-container { 
        flex-direction: column; 
        gap: 16px; 
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
    }

    /* Nav collapse rules live in the single consolidated
       max-width:1300px block above -- kept here only for the
       navbar's own padding at this narrower width. */
    .navbar {
        padding: 1rem;
    }

    .filters {
        flex-direction: column;
        gap: 1rem;
    }

    .charts {
        grid-template-columns: 1fr;
    }

    .kpi-container {
        grid-template-columns: 1fr;
    }

    .sub-nav {
        flex-direction: column;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .chart-row {
        flex-direction: column;
    }
}


@media (max-width: 480px) {
    .navbar {
        padding: 0.75rem;
    }

    .nav-links a {
        font-size: 0.9rem;
    }

    .btn-primary {
        width: 100%;
        justify-content: center;
        margin-bottom: 12px;
    }
    
    .access-badge {
        align-self: flex-end;
    }
}

@media (max-width: 1400px) {
    .kpi-container {
        grid-template-columns: repeat(4, 1fr);
    }

    .thresh-container {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* Medium screens (tablets) */
@media (max-width: 992px) {

    .kpi-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .thresh-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .report-grid {
        grid-template-columns: 1fr;
    }

    .maps-row {
        grid-template-columns: 1fr;
    }

    .map-container {
        height: 450px;
    }

    .yearly-map-container {
        height: 350px;
    }
}


/* Small tablets / large phones */
@media (max-width: 768px) {

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .main-content {
        padding: 20px 15px;
    }

    .content-section,
    .contentindex-section {
        padding: 20px;
    }

    .card {
        padding: 20px;
    }

    .section-title {
        font-size: 1.4rem;
    }
}


/* Small phones */
@media (max-width: 480px) {

    .kpi-container,
    .thresh-container {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 25px 15px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .map-container {
        height: 300px;
    }

    .yearly-map-container {
        height: 250px;
    }

    .summary-table th,
    .summary-table td {
        font-size: 0.85rem;
        padding: 8px;
    }

    .error-code {
        font-size: 3rem;
    }
}

/* ==================== REPORTERS PERFORMANC E==================== */
.insight-panel {
    background: var(--surface);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.insight-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary);
    flex-wrap: wrap;
}

.insight-header i {
    color: var(--secondary);
    font-size: 1.1rem;
}

.insight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.insight-card {
    border-radius: var(--border-radius);
    padding: 1.25rem;
    border-left: 4px solid;
    background: #f8f9fa;
    transition: transform 0.2s, box-shadow 0.2s;
}

.insight-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.insight-card.border-success { border-left-color: #28a745; }
.insight-card.border-warning { border-left-color: #ffc107; }
.insight-card.border-info    { border-left-color: #17a2b8; }
.insight-card.border-danger  { border-left-color: #dc3545; }

.insight-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.insight-icon {
    font-size: 1.2rem;
}

.insight-card-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 0.4rem;
}

.insight-card-counties {
    font-size: 0.8rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    max-height: 80px;
    overflow-y: auto;
}

.insight-card-action {
    font-size: 0.82rem;
    color: #444;
    padding-top: 0.5rem;
    border-top: 1px solid #dee2e6;
    line-height: 1.5;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 992px) {
    .insight-grid {
        grid-template-columns: 1fr 1fr;
    }

    #reporter_dist_map,
    #perf_representativeness_map {
        height: 380px !important;
    }

    #dependency_risk_chart {
        height: 480px !important;
    }

    #org_heatmap,
    #role_composition_chart,
    #regularity_heatmap,
    #monthly_active_chart {
        height: 380px !important;
    }
}

@media (max-width: 768px) {
    .insight-grid {
        grid-template-columns: 1fr;
    }

    #reporter_dist_map,
    #perf_representativeness_map {
        height: 300px !important;
    }

    #dependency_risk_chart {
        height: 600px !important;
    }

    #regularity_heatmap {
        height: 400px !important;
    }

    #monthly_active_chart,
    #org_heatmap,
    #role_composition_chart {
        height: 300px !important;
    }
}

@media (max-width: 480px) {
    .insight-panel {
        padding: 1rem;
    }

    #reporter_dist_map,
    #perf_representativeness_map {
        height: 240px !important;
    }
}


/* ==================== ADMIN DASHBOARD ==================== */
.admin-dashboard {
    padding: 2rem;
    max-width: 1600px;
    margin: 0 auto;
    min-height: 80vh;
}

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

.dashboard-header h1 {
    color: var(--primary);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.admin-badge {
    background: linear-gradient(135deg, var(--secondary), #ff9533);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(254, 117, 1, 0.3);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.stat-info p {
    color: var(--text);
    margin: 0;
    font-size: 0.9rem;
}

/* Access Breakdown */
.access-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.breakdown-card {
    background: var(--primary);
    color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease;
}

.breakdown-card:hover {
    transform: translateY(-5px);
}

.breakdown-card-special {
    background: var(--secondary);
}

.breakdown-card h4 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.breakdown-value {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.breakdown-card p {
    margin: 0;
    color: var(--text);
    font-size: 1rem;
}

/* Users Section */
.users-section {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
}

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

.section-header h2 {
    color: var(--text);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-filter {
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--primary);
    background: var(--surface);
    color: var(--primary);
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-filter:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.btn-filter.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(39, 170, 225, 0.3);
}

.table-container {
    overflow-x: auto;
    margin-top: 1rem;
}

/* User Info */
.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Badges */
.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.badge-primary {
    background: rgba(39, 170, 225, 0.15);
    color: var(--primary);
}

.badge-secondary {
    background: rgba(254, 117, 1, 0.15);
    color: var(--secondary);
}

.badge-success {
    background: rgba(40, 167, 69, 0.15);
    color: var(--success);
}

.badge-danger {
    background: rgba(220, 53, 69, 0.15);
    color: var(--danger);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-action {
    padding: 0.5rem 0.8rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-action.btn-info {
    background: #17a2b8;
}

.btn-action.btn-primary {
    background: var(--primary);
}

/* Activities Section */
.activities-section {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--card-shadow);
}

.activities-section h2 {
    color: var(--text);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.activities-list {
    display: grid;
    gap: 1rem;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.activity-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--background);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary);
    transition: all 0.3s ease;
}

.activity-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.activity-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.activity-icon-login {
    background: var(--success);
}

.activity-icon-logout {
    background: #6c757d;
}

.activity-icon-upload {
    background: var(--info, #17a2b8);
}

.activity-icon-download {
    background: var(--secondary);
}

.activity-icon-view {
    background: var(--accent);
}

.activity-icon-user_update {
    background: var(--primary);
}

.activity-icon-user_delete {
    background: var(--danger);
}

.activity-details p {
    margin: 0.25rem 0;
}

.activity-details strong {
    color: var(--text);
}

/* Modal Styles */
.modal-content {
    border-radius: var(--border-radius);
    border: none;
}

.modal-header {
    background: var(--primary);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

/* Activity Timeline in Modal */
.activity-timeline {
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem 0;
}

.timeline-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 19px;
    top: 45px;
    width: 2px;
    height: calc(100% + 10px);
    background: #dee2e6;
}

.timeline-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    z-index: 1;
}

.timeline-icon-primary { background: var(--primary); }
.timeline-icon-success { background: var(--success); }
.timeline-icon-info { background: #17a2b8; }
.timeline-icon-warning { background: var(--secondary); }
.timeline-icon-secondary { background: var(--accent); }

.timeline-content {
    flex: 1;
    padding-top: 0.25rem;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--surface);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-success {
    border-left: 4px solid var(--success);
    color: var(--success);
}

.notification-info {
    border-left: 4px solid var(--primary);
    color: var(--primary);
}

/* DataTables Customization */
.dataTables_wrapper .dataTables_filter input {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 0.5rem 1rem;
    margin-left: 0.5rem;
}

.dataTables_wrapper .dataTables_filter input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-export {
    background: var(--success) !important;
    color: white !important;
    border: none !important;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius) !important;
    margin-right: 0.5rem !important;
}

.btn-export:hover {
    background: #218838 !important;
}

/* Scrollbar Styling */
.activities-list::-webkit-scrollbar,
.activity-timeline::-webkit-scrollbar {
    width: 6px;
}

.activities-list::-webkit-scrollbar-track,
.activity-timeline::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.activities-list::-webkit-scrollbar-thumb,
.activity-timeline::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.activities-list::-webkit-scrollbar-thumb:hover,
.activity-timeline::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-dashboard {
        padding: 1rem;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-buttons {
        width: 100%;
    }

    .btn-filter {
        flex: 1;
        justify-content: center;
    }

    .action-buttons {
        flex-direction: column;
    }

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

    .access-breakdown {
        grid-template-columns: 1fr;
    }
}

/* ── ROW 2: System Health Row ─────────────────────────────── */
.health-row {
    display: grid;
    grid-template-columns: 1fr 1fr 320px;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.health-card {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--card-shadow);
}

.health-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.75rem;
}

.health-card-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

/* ── Access Summary (compact 3-number layout) ─────────────── */
.access-summary-card {
    display: flex;
    flex-direction: column;
}

.access-summary {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 0.5rem;
    padding-top: 0.5rem;
}

.access-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.access-count {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
    min-width: 48px;
    text-align: right;
}

.access-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
    min-width: 90px;
}

.access-desc {
    font-size: 1rem;
    color: var(--text);
}

.access-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 0.1rem 0;
}

/* ── ROW 4: Compact Activity Strip ───────────────────────────*/
.activity-strip {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.strip-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}

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

.strip-item:hover {
    background: #f8f9fa;
    border-radius: 6px;
}

.strip-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* Reuse existing activity-icon color classes */
.strip-icon.activity-icon-login    { background: var(--success); }
.strip-icon.activity-icon-logout   { background: #6c757d; }
.strip-icon.activity-icon-upload   { background: #17a2b8; }
.strip-icon.activity-icon-download { background: var(--secondary); }
.strip-icon.activity-icon-view     { background: var(--accent); }
.strip-icon.activity-icon-user_update { background: var(--primary); }
.strip-icon.activity-icon-user_delete { background: var(--danger); }

.strip-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex-wrap: wrap;
}

.strip-type {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

.strip-resource {
    font-size: 0.9rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.strip-time {
    font-size: 0.9rem;
    color: var(--text);
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1200px) {
    .health-row {
        grid-template-columns: 1fr 1fr;
    }
    .access-summary-card {
        grid-column: 1 / -1;
    }
    .access-summary {
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
    }
    .access-divider {
        width: 1px;
        height: 40px;
        margin: 0 0.5rem;
    }
    .access-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .access-count {
        min-width: auto;
        text-align: center;
    }
    .access-label {
        min-width: auto;
    }
}

@media (max-width: 768px) {
    .health-row {
        grid-template-columns: 1fr;
    }
    .access-summary-card {
        grid-column: auto;
    }
    .strip-resource {
        display: none; /* hide resource name on small screens to keep strip tidy */
    }
}


/* Alert Tab styles */
.alert-form-section {
    background: rgba(255,255,255,0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.alert-form-section .section-intro {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-left: 4px solid #dc3545;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 26px;
}

.alert-form-section .section-intro i {
    color: #dc3545;
    font-size: 1.2rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.alert-form-section .section-intro p {
    font-size: 0.85rem;
    color: #555;
    margin: 0;
    line-height: 1.55;
}

.alert-form-section .section-intro strong {
    color: #842029;
}

/* "Other disease" reveal field */
#other_disease_group {
    display: none;
    animation: fadeIn 0.3s ease;
}

/* Manage alerts table inside the tab */
.manage-section {
    margin-top: 32px;
    border-top: 2px dashed #e2e8f0;
    padding-top: 24px;
}

.manage-section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #4a5568;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alerts-mgmt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.83rem;
}

.alerts-mgmt-table th {
    background: #dc3545;
    color: #fff;
    padding: 9px 12px;
    text-align: left;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.alerts-mgmt-table th:first-child { border-radius: 8px 0 0 0; }
.alerts-mgmt-table th:last-child  { border-radius: 0 8px 0 0; }

.alerts-mgmt-table td {
    padding: 9px 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.alerts-mgmt-table tr:hover td { background: #fff5f5; }

.badge-active {
    background: #d1fae5; color: #065f46;
    padding: 2px 8px; border-radius: 20px;
    font-size: 0.72rem; font-weight: 700;
}

.badge-inactive {
    background: #f3f4f6; color: #6b7280;
    padding: 2px 8px; border-radius: 20px;
    font-size: 0.72rem; font-weight: 700;
}

.btn-deactivate {
    background: none;
    border: 1px solid #dc3545;
    color: #dc3545;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.75rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-deactivate:hover { background: #dc3545; color: #fff; }

.btn-reactivate {
    background: none;
    border: 1px solid #28a745;
    color: #28a745;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.75rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-reactivate:hover { background: #28a745; color: #fff; }

.empty-state {
    text-align: center;
    color: #9ca3af;
    font-style: italic;
    padding: 20px;
}


/* ==========================================================================
   LANDING PAGE (public "/" home) - scoped under .landing-* so it can't
   bleed into the internal dashboard pages that reuse .hero/.card-grid/etc.
   ========================================================================== */

.landing-hero {
    position: relative;
    background:
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.14) 1px, transparent 0) 0 0/28px 28px,
        var(--primary);
    color: #fff;
    padding: 72px 40px 48px;
    margin: -40px -4px 0 -4px;
    overflow: hidden;
}

.landing-hero-inner {
    max-width: 780px;
    margin: 0 auto;
    text-align: center;
}

.landing-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    font-weight: 700;
    color: #bfe6f7;
    margin: 0 0 14px;
}

.landing-hero h1 {
    font-size: 2.9rem;
    line-height: 1.15;
    font-weight: 800;
    color: #fff;
    margin: 0 0 18px;
}

.landing-hero-lead {
    font-size: 1.1rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.88);
    max-width: 640px;
    margin: 0 auto;
}

.landing-hero-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.btn-landing {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn-landing-primary {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.btn-landing-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

.btn-landing-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.65);
}

.btn-landing-secondary:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

.landing-hero-note {
    margin: 14px 0 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.landing-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 46px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    flex-wrap: wrap;
}

.landing-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.landing-stat-value {
    font-size: 1.9rem;
    font-weight: 800;
    color: #fff;
}

.landing-stat-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 4px;
}

/* Partner strip */
.landing-partners {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
    background: var(--surface);
    padding: 22px 20px;
    margin: 0 -4px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.landing-partners-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: #8a95a1;
}

.landing-partners-logos {
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}

.landing-partners-logos img {
    height: 30px;
    width: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.65;
    transition: filter 0.2s ease, opacity 0.2s ease;
}

.landing-partners-logos img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* Shared max-width container for landing sections */
.landing-container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 56px 20px 20px;
}

.landing-section {
    margin-bottom: 64px;
}

.landing-section-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--secondary);
    margin: 0 0 8px;
}

.landing-section-title {
    font-size: 1.9rem;
    color: #1a2733;
    margin: 0 0 14px;
}

.landing-section-lead {
    max-width: 720px;
    color: #5b6773;
    font-size: 1.02rem;
    line-height: 1.65;
    margin: 0 0 34px;
}

/* Feature grid */
.landing-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 22px;
}

.landing-feature {
    display: block;
    text-align: left;
    background: var(--surface);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 10px;
    padding: 26px 24px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 10px rgba(20, 30, 40, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.landing-feature:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(20, 30, 40, 0.1);
    border-color: rgba(39, 170, 225, 0.35);
}

.landing-feature-icon {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: #fff;
    margin-bottom: 18px;
}

.landing-feature-icon.primary  { background: var(--primary); }
.landing-feature-icon.accent   { background: var(--accent); }
.landing-feature-icon.secondary{ background: var(--secondary); }
.landing-feature-icon.success  { background: var(--success); }

.landing-feature h3 {
    font-size: 1.15rem;
    color: #1a2733;
    margin: 0 0 10px;
}

.landing-feature p {
    font-size: 0.92rem;
    line-height: 1.55;
    color: #6b7580;
    margin: 0;
}

/* Mission / about */
.landing-mission {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 50px;
    background: var(--surface);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 42px;
}

.landing-mission-text p {
    color: #5b6773;
    line-height: 1.65;
    max-width: 560px;
}

.landing-checklist {
    list-style: none;
    margin: 22px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.landing-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #3a4550;
    font-size: 0.95rem;
}

.landing-checklist i {
    color: var(--success);
    margin-top: 4px;
    font-size: 0.85rem;
}

.landing-mission-links {
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    padding-left: 40px;
}

.landing-mission-links h3 {
    font-size: 1.05rem;
    color: #1a2733;
    margin: 0 0 16px;
}

.landing-mission-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #445;
    font-size: 0.92rem;
    padding: 9px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.landing-mission-links a:last-child { border-bottom: none; }

.landing-mission-links a i {
    font-size: 0.7rem;
    color: var(--primary);
}

.landing-mission-links a:hover {
    color: var(--primary);
    padding-left: 4px;
}

@media (max-width: 900px) {
    .landing-mission {
        grid-template-columns: 1fr;
        padding: 32px 24px;
    }

    .landing-mission-links {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        padding-top: 28px;
    }
}

@media (max-width: 768px) {
    .landing-hero {
        padding: 52px 22px 36px;
    }

    .landing-hero h1 {
        font-size: 2.1rem;
    }

    .landing-hero-lead {
        font-size: 1rem;
    }

    .landing-stats {
        gap: 30px;
    }

    .landing-container {
        padding: 40px 16px 10px;
    }

    .landing-section-title {
        font-size: 1.55rem;
    }
}

@media (max-width: 480px) {
    .landing-hero h1 {
        font-size: 1.7rem;
    }

    .landing-stats {
        gap: 22px;
    }

    .landing-stat-value {
        font-size: 1.5rem;
    }
}

/* ------------------------------------------------------------------ */
/* Page navigation transitions (native View Transitions API, see the  */
/* <meta name="view-transition"> tag in base.html). The old page      */
/* slides out to the left while fading, the new page slides in from   */
/* the right while fading -- a "turning page" feel between clicking a */
/* nav link and the next page appearing, instead of a blank flash.    */
/* Respects reduced-motion and is a no-op in unsupported browsers.    */
/* ------------------------------------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
    ::view-transition-old(root) {
        animation: page-turn-out 180ms cubic-bezier(0.4, 0, 1, 1) both;
    }
    ::view-transition-new(root) {
        animation: page-turn-in 220ms cubic-bezier(0, 0, 0.2, 1) both;
    }
}

@keyframes page-turn-out {
    to { opacity: 0; transform: translateX(-16px) scale(0.99); }
}

@keyframes page-turn-in {
    from { opacity: 0; transform: translateX(16px) scale(0.99); }
}








































