/* ===== About page ===== */
.about-intro {
    margin-bottom: 1rem;
    border-left: 4px solid #FD6159;
    padding-left: 1.25rem;
}
.about-intro p {
    margin: 0 0 0.6rem 0;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #000;
}
.about-section {
    margin-bottom: 1rem;
}
.about-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #000;
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #FD6159;
}
.about-section p {
    font-size: 0.9rem;
    line-height: 1.75;
    color: #000;
    margin: 0 0 0.75rem 0;
}
.about-section a {
    color: #FD6159;
    text-decoration: none;
}
.about-section a:hover { text-decoration: underline; }
.about-list {
    font-size: 0.9rem;
    line-height: 1.75;
    color: #000;
    margin: 0 0 0.75rem 0;
    padding-left: 1.4rem;
}
.about-list li { margin-bottom: 0.4rem; }

/* ===== Nav collapsible groups ===== */
.nav-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    margin-top: 0.25rem;
    cursor: pointer;
    border-radius: 6px;
    user-select: none;
    list-style: none;
}
.nav-group-header:hover { background: #f0f0f0; }
.nav-group-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #000;
}
.nav-group-chevron {
    width: 14px;
    height: 14px;
    color: #000;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.nav-group-header.collapsed .nav-group-chevron {
    transform: rotate(-90deg);
}
.nav-group-items {
    list-style: none;
    padding: 0;
    margin: 0 0 0.25rem 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
}
.nav-group-items.collapsed {
    max-height: 0 !important;
}
.nav-group-items .nav-item {
    padding-left: 1.25rem;
}
.nav-subgroup-header {
    padding-left: 1.25rem;
    margin-top: 0;
}
.nav-subgroup-header .nav-group-label {
    font-size: 0.68rem;
    color: #000;
}
.nav-item-nested {
    padding-left: 2rem !important;
}
/* Hide group labels/chevrons in icon-only collapsed sidebar */
@media (min-width: 769px) {
    .sidebar-collapsed .nav-group-label,
    .sidebar-collapsed .nav-group-chevron {
        display: none;
    }
    .sidebar-collapsed .nav-group-header {
        justify-content: center;
        padding: 0.4rem;
    }
    .sidebar-collapsed .nav-group-items {
        max-height: none !important;
    }
    .sidebar-collapsed .nav-group-items .nav-item {
        padding-left: 0;
    }
}

/* ===== Tab switching ===== */
.irs-tab-content { display: none; }
.irs-tab-content.active { display: block; }

/* ===== ASO List / State Dist / Graphs ===== */
.aso-page-btn {
    padding: 0.4rem 0.7rem;
    border: 1px solid #e0e0e0;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
    color: #000;
}
.aso-page-btn:hover { background: #f5f5f5; }
.aso-page-btn.active { background: #FD6159; color: #fff; border-color: #FD6159; }
.aso-popup { min-width: 200px; }
.aso-popup-title { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.4rem; padding-bottom: 0.4rem; border-bottom: 1px solid #eee; }
.aso-popup-row { font-size: 0.82rem; color: #000; margin-bottom: 0.2rem; }
.aso-popup-row a { color: #FD6159; text-decoration: none; }
.aso-state-badge { display:inline-block; background:#fff0ef; color:#FD6159; border-radius:4px; padding:0.15rem 0.45rem; font-size:0.75rem; font-weight:600; }
.aso-ein-badge { font-family:monospace; font-size:0.75rem; background:#f5f5f5; padding:0.15rem 0.35rem; border-radius:3px; }

/* ===== IRS Overview Dashboard Styles ===== */

/* Section headers */
.irs-section-header-big {
    font-size: 1.25rem;
    font-weight: 700;
    color: #000;
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #FD6159;
}

/* Section description paragraph */
.irs-section-description {
    font-size: 0.9rem;
    color: #000;
    margin: -0.5rem 0 1.25rem 0;
    line-height: 1.6;
}

/* Chart grid layouts */
.chart-grid-3,
.chart-grid-2,
.chart-grid-1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Chart card */
.irs-chart-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    min-height: 320px;
}
.irs-chart-card.tall {
    min-height: 380px;
}

/* Chart card header row (title + buttons) */
.irs-chart-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.irs-chart-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #000;
}

/* Button group (CSV + IMG) aligned right in chart header */
.chart-header-buttons {
    display: flex;
    flex-direction: row;
    gap: 0.3rem;
    align-items: center;
    margin-left: auto;
    flex-shrink: 0;
}

/* CSV download button */
.btn-csv-download {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 500;
    color: #000;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.4;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    flex-shrink: 0;
}
.btn-csv-download:hover {
    background: #FD6159;
    color: #fff;
    border-color: #FD6159;
}

/* IMG download button */
.btn-img-download {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 500;
    color: #000;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.4;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    flex-shrink: 0;
}
.btn-img-download:hover {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

.irs-chart-subtitle {
    font-size: 0.78rem;
    color: #000;
    margin-bottom: 0.4rem;
}

/* Chart total badge */
.irs-chart-total {
    font-size: 0.78rem;
    color: #000;
    background: #f5f5f5;
    border-radius: 4px;
    padding: 0.2rem 0.5rem;
    display: inline-block;
    margin-bottom: 0.5rem;
}

/* Callout figure */
.irs-callout {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #f9f5f4;
    border-left: 3px solid #FD6159;
    border-radius: 6px;
    padding: 0.6rem 0.9rem;
    margin-bottom: 0.75rem;
}
.irs-callout-label {
    display: block;
    font-size: 0.78rem;
    color: #000;
    margin-bottom: 0.2rem;
}
.irs-callout-value {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: #FD6159;
    white-space: nowrap;
}

/* Canvas wrapper */
.canvas-wrap {
    position: relative;
    width: 100%;
    min-height: 260px;
}

/* Donut chart body: canvas left (75%) + legend right (25%), vertically centered */
.donut-body {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    flex: 1;
}
.donut-body .canvas-wrap {
    width: 75%;
    flex-shrink: 0;
    min-height: 340px;
}
.donut-body .pie-legend {
    width: 25%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0;
    align-self: center;
}

/* Pie / donut legend */
.pie-legend {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.75rem;
}
.pie-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: #000;
}
.pie-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.pie-legend-pct {
    margin-left: auto;
    font-weight: 600;
    color: #000;
    white-space: nowrap;
}

/* Top bar filter row */
.irs-filter-sticky {
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Filter layout: filters flex row + callout box */
.filter-callout-row {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

/* Filter grid: 4 cols desktop, 2 cols mobile */
.filter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem 1rem;
    margin-bottom: 0.6rem;
}
.filter-grid-last {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem 1rem;
}
.irs-filter-bar {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}
.irs-filter-bar .filter-group,
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.irs-filter-bar label,
.filter-group label {
    font-size: 0.8rem;
    color: #000;
}
.irs-filter-bar select,
.filter-group select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.85rem;
    background: #fff;
    width: 100%;
}
.irs-filter-bar .filter-count {
    font-size: 0.85rem;
    color: #000;
    padding-bottom: 0.5rem;
}

/* Data note */
.data-note {
    font-size: 0.75rem;
    color: #000;
    margin-top: 0.5rem;
    font-style: italic;
}
.data-note-prominent {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Loading state */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    font-size: 1.1rem;
    color: #000;
    gap: 0.75rem;
}
.loading-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #f0f0f0;
    border-top-color: #FD6159;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Chart card with adjacent table */
.irs-chart-card-inner {
    display: flex;
    gap: 0;
    min-height: 0;
}
.chart-side {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.chart-side canvas {
    max-height: 300px;
}
.table-side {
    flex: 0 0 190px;
    min-width: 0;
    border-left: 1px solid #f0f0f0;
    margin-left: 1rem;
    padding-left: 1rem;
    overflow-y: auto;
    max-height: 320px;
    align-self: flex-start;
}
.chart-with-table {
    display: flex;
    gap: 0;
    flex: 1;
    min-height: 0;
}
.chart-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}
.chart-data-table thead tr {
    background: #f7f7f7;
}
.chart-data-table thead th {
    position: sticky;
    top: 0;
    background: #f7f7f7;
    font-weight: 600;
    font-size: 0.72rem;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-align: left;
    padding: 0.4rem 0.6rem;
    border-bottom: 2px solid #e8e8e8;
    white-space: nowrap;
}
.chart-data-table thead th:last-child {
    text-align: right;
}
.chart-data-table tbody td {
    padding: 0.32rem 0.6rem;
    color: #000;
    border-bottom: 1px solid #f2f2f2;
    vertical-align: middle;
}
.chart-data-table tbody td:first-child {
    font-size: 0.77rem;
}
.chart-data-table tbody td:last-child {
    text-align: right;
    font-weight: 700;
    font-size: 0.82rem;
    color: #000;
    white-space: nowrap;
}
.chart-data-table tbody tr:last-child td {
    border-bottom: none;
}
.chart-data-table tbody tr:hover td {
    background: #fdf3f2;
}

/* Table card (paired with chart card) */
.irs-table-card {
    min-height: 200px;
    background: #ffffff;
    justify-content: flex-start;
}

@media (max-width: 900px) {
    .chart-grid-3 { grid-template-columns: 1fr; }
    .chart-grid-2 { grid-template-columns: 1fr; }
    .chart-grid-1 { grid-template-columns: 1fr; }
    .chart-with-table { flex-direction: column; }
    .table-side { flex: none; max-height: 180px; }

    /* Filters: 2-column grid on mobile */
    .filter-grid,
    .filter-grid-last {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Stack the callout box below the filters */
    .filter-callout-row {
        flex-direction: column;
        gap: 1rem;
    }
    /* Filters wrapper: fill full width when stacked */
    .filter-callout-row > div:first-child {
        width: 100%;
        flex: none;
    }
    .filter-org-callout {
        align-self: stretch !important;
        min-width: 0 !important;
        text-align: center;
    }

    /* Prevent horizontal overflow on charts and cards */
    .irs-chart-card,
    .canvas-wrap {
        max-width: 100%;
        overflow-x: hidden;
    }
    .canvas-wrap canvas {
        max-width: 100% !important;
    }

    /* Donut chart: stack canvas above legend on mobile */
    .donut-body {
        flex-direction: column;
        align-items: stretch;
    }
    .donut-body .canvas-wrap {
        width: 100%;
        min-height: 280px;
    }
    .donut-body .pie-legend {
        width: 100%;
    }
}

/* ===== Mobile hamburger / sidebar overlay ===== */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 6px;
    color: #000;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
}
.hamburger-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
}
body.sidebar-open .hamburger-btn span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
body.sidebar-open .hamburger-btn span:nth-child(2) {
    opacity: 0;
}
body.sidebar-open .hamburger-btn span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Dim overlay behind sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 199;
}
body.sidebar-open .sidebar-overlay {
    display: block;
}

@media (max-width: 900px) {
    .hamburger-btn {
        display: flex;
    }
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        width: 260px !important;
        padding: 1.5rem !important;
        z-index: 9999 !important;
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: none;
    }
    /* Show all text labels in mobile slide-out sidebar */
    .sidebar .nav-item span,
    .sidebar .nav-group-label,
    .sidebar .nav-group-chevron,
    .sidebar .nav-section-title,
    .sidebar .user-info {
        display: revert !important;
    }
    .sidebar .nav-item {
        justify-content: flex-start !important;
        padding: 0.75rem !important;
    }
    .nav-icon {
        width: 20px !important;
        height: 20px !important;
        flex-shrink: 0;
    }
    .nav-group-items .nav-item-nested {
        padding-left: 1.25rem !important;
    }
    body.sidebar-open .sidebar {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0,0,0,0.18);
    }
    .sidebar-overlay {
        z-index: 9998 !important;
    }
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        overflow-x: hidden;
    }
}

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

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            background: #f8f9fa;
            min-height: 100vh;
            color: #000;
            display: flex;
            overflow-x: hidden;
        }

        /* Sidebar */
        .sidebar {
            width: 260px;
            background: #fff;
            height: 100vh;
            position: fixed;
            left: 0;
            top: 0;
            padding: 1.5rem;
            display: flex;
            flex-direction: column;
            border-right: 1px solid #eee;
            z-index: 100;
            overflow-y: auto;
        }

        .sidebar-header {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            margin-bottom: 1.5rem;
            padding-bottom: 1rem;
            border-bottom: 1px solid #eee;
        }

        .logo {
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 100%;
        }

        .logo-icon {
            width: 100%;
            max-width: 180px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 0.5rem;
        }

        .logo-icon img {
            width: 100%;
            height: auto;
            object-fit: contain;
        }

        .logo-subtitle {
            font-size: 1.1rem;
            font-weight: 600;
            color: #000;
            text-align: center;
            letter-spacing: 2px;
        }

        .nav-section {
            margin-bottom: 1.5rem;
        }

        .nav-section-title {
            font-size: 0.7rem;
            font-weight: 600;
            color: #000;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 0.75rem;
            padding-left: 0.75rem;
        }

        .nav-menu {
            list-style: none;
        }

        .nav-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem;
            border-radius: 10px;
            color: #000;
            text-decoration: none;
            font-size: 0.9rem;
            font-weight: 500;
            transition: all 0.2s ease;
            cursor: pointer;
            margin-bottom: 0.25rem;
        }

        .nav-item:hover {
            background: #f5f5f5;
            color: #000;
        }

        .nav-item.active {
            background: #E8F4FF;
            color: #FD6159;
        }

        .nav-item.active .nav-icon {
            color: #FD6159;
        }

        .nav-icon {
            width: 20px;
            height: 20px;
            color: #000;
        }

        .nav-badge {
            margin-left: auto;
            background: #FD6159;
            color: #fff;
            padding: 0.2rem 0.5rem;
            border-radius: 10px;
            font-size: 0.7rem;
        }

        .sidebar-footer {
            margin-top: auto;
            border-top: 1px solid #eee;
            padding-top: 1rem;
        }

        .user-profile {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem;
            border-radius: 10px;
            cursor: pointer;
        }

        .user-profile:hover {
            background: #f5f5f5;
        }

        .user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: linear-gradient(135deg, #FD6159, #FFCC00);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            font-weight: 600;
        }

        .user-info {
            flex: 1;
        }

        .user-name {
            font-weight: 600;
            font-size: 0.9rem;
            color: #000;
        }

        .user-role {
            font-size: 0.75rem;
            color: #000;
        }

        /* Main Content */
        .main-content {
            flex: 1;
            margin-left: 260px;
            padding: 1.5rem 2rem;
            min-height: 100vh;
        }

        /* Top Bar */
        .top-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
        }

        .search-box {
            display: flex;
            align-items: center;
            background: #fff;
            border: 1px solid #e0e0e0;
            border-radius: 10px;
            padding: 0.6rem 1rem;
            width: 300px;
        }

        .search-box input {
            border: none;
            outline: none;
            flex: 1;
            font-family: inherit;
            font-size: 0.9rem;
            margin-left: 0.5rem;
        }

        .search-shortcut {
            background: #f5f5f5;
            padding: 0.2rem 0.5rem;
            border-radius: 5px;
            font-size: 0.75rem;
            color: #000;
        }

        .top-bar-right {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .icon-btn {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            border: 1px solid #e0e0e0;
            background: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            color: #000;
            transition: all 0.2s ease;
        }

        .icon-btn:hover {
            background: #f5f5f5;
        }

        .btn-export {
            background: #FD6159;
            color: #fff;
            border: none;
            padding: 0.7rem 1.2rem;
            border-radius: 10px;
            font-family: inherit;
            font-weight: 600;
            font-size: 0.85rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            transition: all 0.2s ease;
        }

        .btn-export:hover {
            background: #e55a2b;
        }

        /* Page Header */
        .page-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 1.5rem;
        }

        .page-title {
            font-size: 1.75rem;
            font-weight: 700;
            color: #000;
            margin-bottom: 0.25rem;
        }

        .page-subtitle {
            color: #000;
            font-size: 0.9rem;
        }

        .page-actions {
            display: flex;
            gap: 0.75rem;
        }

        .btn-outline {
            background: #fff;
            border: 2px solid #2196F3;
            padding: 0.55rem 1.5rem;
            border-radius: 50px;
            font-family: inherit;
            font-weight: 500;
            font-size: 0.85rem;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            color: #2196F3;
            transition: all 0.2s ease;
            white-space: nowrap;
        }

        .btn-outline:hover {
            background: #e8f4fd;
        }

        .btn-primary {
            background: #1a1a2e;
            color: #fff;
            border: none;
            padding: 0.6rem 1rem;
            border-radius: 10px;
            font-family: inherit;
            font-weight: 500;
            font-size: 0.85rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            transition: all 0.2s ease;
        }

        .btn-primary:hover {
            background: #2a2a3e;
        }

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

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

        /* Cards Grid */
        .cards-row {
            display: grid;
            grid-template-columns: 1.5fr 1fr 1fr;
            gap: 1rem;
            margin-bottom: 1rem;
        }

        .cards-row-4 {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 1rem;
            margin-bottom: 1rem;
        }

        .card {
            background: #fff;
            border-radius: 16px;
            padding: 1.25rem;
            box-shadow: 0 1px 3px rgba(0,0,0,0.04);
        }

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

        .card-title {
            font-size: 0.85rem;
            color: #000;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .info-icon {
            font-size: 14px;
            color: #000;
            cursor: pointer;
            transition: color 0.2s ease;
            flex-shrink: 0;
            padding: 2px;
        }

        .info-icon:hover {
            color: #FD6159;
        }

        .info-icon:focus {
            outline: 2px solid #FD6159;
            outline-offset: 2px;
            border-radius: 50%;
        }

        .info-icon:focus-visible {
            outline: 2px solid #FD6159;
            outline-offset: 2px;
            border-radius: 50%;
        }

        /* Screen reader only - visually hidden but accessible */
        .sr-only {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
        }

        /* Skip to main content link for keyboard users */
        .skip-link {
            position: absolute;
            top: -40px;
            left: 0;
            background: #FD6159;
            color: #fff;
            padding: 8px 16px;
            z-index: 10000;
            text-decoration: none;
            font-weight: 600;
        }

        .skip-link:focus {
            top: 0;
        }

        /* Accessibility Info Modal */
        .info-modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 1000;
        }

        .info-modal-overlay.visible {
            display: flex;
        }

        .info-modal {
            background: #fff;
            border-radius: 16px;
            padding: 1.5rem;
            max-width: 400px;
            width: 90%;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
            animation: modalFadeIn 0.2s ease;
        }

        @keyframes modalFadeIn {
            from {
                opacity: 0;
                transform: scale(0.95);
            }
            to {
                opacity: 1;
                transform: scale(1);
            }
        }

        .info-modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
            padding-bottom: 0.75rem;
            border-bottom: 1px solid #e0e0e0;
        }

        .info-modal-title {
            font-size: 1.1rem;
            font-weight: 600;
            color: #000;
        }

        .info-modal-close {
            background: none;
            border: none;
            font-size: 1.5rem;
            color: #000;
            cursor: pointer;
            padding: 0;
            line-height: 1;
        }

        .info-modal-close:hover {
            color: #FD6159;
        }

        .info-modal-content {
            color: #000;
            font-size: 0.95rem;
            line-height: 1.6;
        }

        .info-modal-content p {
            margin-bottom: 0.75rem;
        }

        .info-modal-content strong {
            color: #000;
        }

        .info-modal-source {
            margin-top: 1rem;
            padding-top: 0.75rem;
            border-top: 1px solid #e0e0e0;
            font-size: 0.8rem;
            color: #000;
        }

        .card-dropdown {
            background: #fff;
            border: 1px solid #e0e0e0;
            padding: 0.4rem 0.8rem;
            border-radius: 8px;
            font-family: inherit;
            font-size: 0.8rem;
            color: #000;
            cursor: pointer;
        }

        .card-value {
            font-size: 1.75rem;
            font-weight: 700;
            color: #000;
            margin-bottom: 0.5rem;
        }

        .card-value span {
            font-size: 0.85rem;
            font-weight: 400;
            color: #000;
            margin-left: 0.25rem;
        }

        .card-value-sm {
            font-size: 1.25rem;
        }

        .card-meta {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.8rem;
            color: #000;
        }

        .card-change {
            display: flex;
            align-items: center;
            gap: 0.25rem;
            font-weight: 500;
        }

        .card-change.positive {
            color: #22c55e;
        }

        .card-change.negative {
            color: #ef4444;
        }

        /* Product Tags */
        .product-tags {
            display: flex;
            gap: 0.5rem;
            margin-top: 1rem;
            flex-wrap: wrap;
        }

        .product-tag {
            padding: 0.5rem 1rem;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .product-tag.orange, .product-tag.primary {
            background: #FD6159;
            color: #fff;
        }

        .product-tag.orange-light, .product-tag.secondary {
            background: #E8F4FF;
            color: #3697FF;
        }

        .tag-count {
            background: rgba(255,255,255,0.3);
            padding: 0.1rem 0.4rem;
            border-radius: 10px;
            font-size: 0.7rem;
        }

        /* Stats Card with Bars */
        .stats-card {
            display: flex;
            align-items: center;
            gap: 1.5rem;
            flex: 1;
        }

        .stats-bars {
            display: flex;
            align-items: flex-end;
            gap: 6px;
            height: 100px;
            flex: 1;
        }

        .stats-bar {
            flex: 1;
            min-width: 16px;
            max-width: 28px;
            background: #FD6159;
            border-radius: 4px 4px 0 0;
            transition: all 0.3s ease;
        }

        .stats-bar:nth-child(odd) {
            background: #A8D4FF;
        }

        .stats-info {
            flex: 1;
        }

        /* Card with See Details at bottom */
        .card.stats-card-wrapper {
            display: flex;
            flex-direction: column;
        }

        .card.stats-card-wrapper .stats-card {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* Donut Chart Card */
        .donut-card {
            text-align: center;
            display: flex;
            flex-direction: column;
        }

        .donut-card-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        .donut-container {
            position: relative;
            width: 80px;
            height: 80px;
            margin: 0 auto 0.5rem;
        }

        .see-details {
            color: #000;
            font-size: 0.8rem;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.25rem;
            margin-top: auto;
            padding-top: 0.75rem;
            cursor: pointer;
        }

        .see-details:hover {
            color: #000;
        }

        /* Analytics Section */
        .analytics-row {
            display: grid;
            grid-template-columns: 2fr 1fr;
            gap: 1rem;
            margin-bottom: 1rem;
        }

        .analytics-card {
            padding: 1.5rem;
        }

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

        .analytics-title {
            font-size: 1rem;
            font-weight: 600;
            color: #000;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .analytics-filters {
            display: flex;
            gap: 0.5rem;
        }

        .analytics-stats {
            display: flex;
            gap: 3rem;
            margin-bottom: 1.5rem;
        }

        .analytics-stat-value {
            font-size: 1.5rem;
            font-weight: 700;
            color: #000;
        }

        .analytics-stat-value span {
            font-size: 0.85rem;
            font-weight: 400;
            color: #000;
            margin-left: 0.25rem;
        }

        .analytics-stat-label {
            font-size: 0.8rem;
            color: #000;
        }

        .chart-container {
            height: 200px;
            position: relative;
        }

        /* Performance Card */
        .performance-card {
            text-align: center;
        }

        .performance-donut {
            position: relative;
            width: 160px;
            height: 160px;
            margin: 0 auto 1rem;
        }

        .performance-legend {
            text-align: left;
            margin-top: 1rem;
        }

        .legend-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.5rem 0;
            font-size: 0.85rem;
            color: #000;
        }

        .legend-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            margin-right: 0.5rem;
        }

        .legend-dot.orange, .legend-dot.red {
            background: #FD6159;
        }

        .legend-dot.orange-light, .legend-dot.blue {
            background: #3697FF;
        }

        .legend-dot.yellow {
            background: #FFCC00;
        }

        /* Bottom Row */
        .bottom-row {
            display: grid;
            grid-template-columns: 1fr 1.5fr;
            gap: 1rem;
        }

        /* Visits Card */
        .visits-card {
            padding: 1.25rem;
        }

        .visits-header {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-bottom: 1rem;
        }

        .visits-icon {
            width: 48px;
            height: 48px;
            background: #E8F4FF;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #FD6159;
        }

        .visits-value {
            font-size: 1.5rem;
            font-weight: 700;
            color: #000;
        }

        .visits-chart {
            margin-top: 1rem;
        }

        .visits-row {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 0.5rem;
            font-size: 0.8rem;
            color: #000;
        }

        .visits-day {
            width: 30px;
            font-weight: 500;
        }

        .visits-bars {
            flex: 1;
            display: flex;
            gap: 4px;
        }

        .visit-bar {
            height: 28px;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.7rem;
            color: #fff;
            padding: 0 8px;
        }

        .visit-bar.orange, .visit-bar.red {
            background: #FD6159;
        }

        .visit-bar.orange-light, .visit-bar.blue {
            background: #3697FF;
            color: #fff;
        }

        .visit-bar.yellow {
            background: #FFCC00;
            color: #000;
        }

        .visit-bar.green {
            background: #22c55e;
        }

        /* Products Table Card */
        .products-card {
            padding: 1.25rem;
        }

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

        .products-title {
            font-size: 1rem;
            font-weight: 600;
            color: #000;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .see-details-link {
            color: #FD6159;
            font-size: 0.85rem;
            font-weight: 500;
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 0.25rem;
            cursor: pointer;
        }

        .products-content {
            display: grid;
            grid-template-columns: 1fr 2fr;
            gap: 1.5rem;
        }

        .product-highlight {
            background: #f8f9fa;
            border-radius: 12px;
            padding: 1rem;
            text-align: center;
        }

        .product-highlight-icon {
            width: 40px;
            height: 40px;
            background: #FD6159;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 0.75rem;
        }

        .product-highlight-name {
            font-weight: 600;
            color: #000;
            margin-bottom: 0.25rem;
            font-size: 0.85rem;
        }

        .product-highlight-value {
            font-size: 1.1rem;
            font-weight: 700;
            color: #000;
            margin-bottom: 0.5rem;
        }

        .product-highlight-progress {
            height: 4px;
            background: #e0e0e0;
            border-radius: 2px;
            margin-bottom: 0.25rem;
        }

        .product-highlight-progress-bar {
            height: 100%;
            background: #FD6159;
            border-radius: 2px;
        }

        .product-highlight-meta {
            font-size: 0.75rem;
            color: #000;
        }

        /* Tables */
        .data-table {
            width: 100%;
            border-collapse: collapse;
        }

        .data-table th {
            text-align: left;
            font-size: 0.75rem;
            font-weight: 500;
            color: #000;
            padding: 0.75rem 0.5rem;
            border-bottom: 1px solid #eee;
            white-space: nowrap;
        }

        .data-table td {
            padding: 0.75rem 0.5rem;
            font-size: 0.85rem;
            color: #000;
            border-bottom: 1px solid #f5f5f5;
        }

        .data-table tr:hover {
            background: #f8f9fa;
        }

        .status-badge {
            padding: 0.25rem 0.5rem;
            border-radius: 6px;
            font-size: 0.7rem;
            font-weight: 500;
        }

        .status-badge.active {
            background: #dcfce7;
            color: #22c55e;
        }

        .status-badge.state {
            background: #E8F4FF;
            color: #FD6159;
        }

        /* Organizations Tab */
        .orgs-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
        }

        .orgs-search {
            display: flex;
            gap: 0.75rem;
            align-items: center;
        }

        .orgs-search input {
            padding: 0.6rem 1rem;
            border: 1px solid #e0e0e0;
            border-radius: 10px;
            font-family: inherit;
            font-size: 0.85rem;
            width: 300px;
        }

        .orgs-table-container {
            background: #fff;
            border-radius: 16px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.04);
            max-height: calc(100vh - 300px);
            overflow-y: auto;
            overflow-x: auto;
        }

        .orgs-table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0;
        }

        .orgs-table thead tr th {
            text-align: left;
            font-size: 0.75rem;
            font-weight: 600;
            color: #000;
            padding: 0.75rem 1.25rem;
            border-bottom: 2px solid #eee;
            white-space: nowrap;
            background: #fff;
            cursor: pointer;
            position: sticky;
            top: 0;
            z-index: 10;
        }

        .orgs-table tbody tr:first-child td {
            padding-top: 0.75rem;
        }

        .orgs-table tbody tr:last-child td {
            padding-bottom: 1.25rem;
        }

        .orgs-table th:hover {
            color: #FD6159;
        }

        .orgs-table td {
            padding: 0.75rem 1.25rem;
            font-size: 0.8rem;
            color: #000;
            border-bottom: 1px solid #f5f5f5;
        }

        .orgs-table tr:hover {
            background: #F0F8FF;
        }

        .org-name {
            font-weight: 500;
            max-width: 250px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .ein-badge {
            font-family: monospace;
            font-size: 0.75rem;
            background: #f5f5f5;
            padding: 0.2rem 0.4rem;
            border-radius: 4px;
        }

        .pagination {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem 0;
            font-size: 0.85rem;
            color: #000;
        }

        .pagination-controls {
            display: flex;
            gap: 0.5rem;
        }

        .page-btn {
            padding: 0.5rem 0.75rem;
            border: 1px solid #e0e0e0;
            background: #fff;
            border-radius: 8px;
            cursor: pointer;
            font-family: inherit;
            font-size: 0.8rem;
        }

        .page-btn:hover {
            background: #f5f5f5;
        }

        .page-btn.active {
            background: #FD6159;
            color: #fff;
            border-color: #FD6159;
        }

        /* Footer */
        .footer {
            margin-top: 1.5rem;
            padding: 1rem 0;
            text-align: center;
            color: #000;
            font-size: 0.8rem;
        }

        /* Map Section Styles */
        .map-section {
            margin-bottom: 1rem;
        }

        .map-card {
            padding: 1.5rem;
        }

        .us-map-container {
            width: 100%;
            height: 500px;
            position: relative;
            background: #e9ecef;
            border-radius: 12px;
            overflow: hidden;
        }

        #leafletStateMap {
            width: 100%;
            height: 100%;
            border-radius: 12px;
        }

        .leaflet-container {
            background: #e9ecef;
            font-family: 'Inter', sans-serif;
        }

        .leaflet-control-zoom {
            border: none !important;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
        }

        .leaflet-control-zoom a {
            background: #fff !important;
            color: #1a1a2e !important;
            border: none !important;
        }

        .leaflet-control-zoom a:hover {
            background: #f5f5f5 !important;
        }

        .map-legend {
            background: white;
            padding: 12px 16px;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.15);
            font-size: 0.8rem;
        }

        .map-legend .legend-title {
            font-weight: 600;
            margin-bottom: 8px;
            color: #000;
            font-size: 0.85rem;
        }

        .map-legend .legend-item {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 4px;
        }

        .map-legend .legend-color {
            width: 18px;
            height: 12px;
            border-radius: 2px;
            flex-shrink: 0;
        }

        .map-legend .legend-label {
            color: #000;
            font-size: 0.75rem;
        }

        .legend-item-inline {
            display: flex;
            align-items: center;
            gap: 0.35rem;
            color: #000;
        }

        .legend-color {
            width: 16px;
            height: 16px;
            border-radius: 4px;
        }

        .legend-color.low {
            background: #3697FF;
        }

        .legend-color.medium {
            background: #FFCC00;
        }

        .legend-color.high {
            background: #FD6159;
        }

        /* State markers */
        .state-marker {
            background: transparent !important;
            border: none !important;
        }

        .state-marker-inner {
            background: #1a1a2e;
            border: 2px solid #fff;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 8px rgba(0,0,0,0.3);
            transition: transform 0.2s ease;
        }

        .state-marker-inner:hover {
            transform: scale(1.1);
        }

        .state-marker-inner span {
            color: #fff;
            font-size: 10px;
            font-weight: 600;
            font-family: 'Inter', sans-serif;
        }

        /* Leaflet popup styling */
        .leaflet-popup-content-wrapper {
            background: #1a1a2e;
            color: #fff;
            border-radius: 12px;
            padding: 0;
        }

        .leaflet-popup-content {
            margin: 0;
            font-family: 'Inter', sans-serif;
        }

        .leaflet-popup-tip {
            background: #1a1a2e;
        }

        .state-popup {
            padding: 1rem;
            min-width: 200px;
        }

        .state-popup-title {
            font-size: 1.1rem;
            font-weight: 600;
            margin-bottom: 0.75rem;
            padding-bottom: 0.5rem;
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }

        .state-popup-row {
            display: flex;
            justify-content: space-between;
            margin-bottom: 0.4rem;
            font-size: 0.85rem;
        }

        .state-popup-label {
            color: #000;
        }

        .state-popup-value {
            font-weight: 600;
            color: #FD6159;
        }

        /* Custom marker for state centers */
        .state-marker {
            background: #1a1a2e;
            border: 3px solid #fff;
            border-radius: 50%;
            box-shadow: 0 3px 10px rgba(0,0,0,0.3);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            font-weight: 600;
            font-size: 10px;
            font-family: 'Inter', sans-serif;
        }

        .state-label-marker {
            background: #1a1a2e;
            color: #fff;
            padding: 4px 8px;
            border-radius: 6px;
            font-size: 11px;
            font-weight: 600;
            font-family: 'Inter', sans-serif;
            white-space: nowrap;
            box-shadow: 0 2px 8px rgba(0,0,0,0.2);
        }

        /* State Data Section */
        .state-data-section {
            margin-top: 1rem;
        }

        .state-search {
            padding: 0.5rem 1rem;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            font-family: inherit;
            font-size: 0.85rem;
            width: 200px;
        }

        .state-table-container {
            max-height: 400px;
            overflow-y: auto;
        }

        .distribution-bar-container {
            width: 100px;
            height: 8px;
            background: #f0f0f0;
            border-radius: 4px;
            overflow: hidden;
        }

        .distribution-bar {
            height: 100%;
            background: linear-gradient(90deg, #FD6159, #FFCC00);
            border-radius: 4px;
            transition: width 0.8s ease-out;
        }

        /* Data labels on charts */
        .bar-label {
            font-size: 10px;
            font-weight: 600;
            fill: #1a1a2e;
            text-anchor: middle;
        }

        .donut-label {
            font-size: 11px;
            font-weight: 500;
            fill: #fff;
            text-anchor: middle;
            pointer-events: none;
        }

        /* Animations */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes fadeInLeft {
            from {
                opacity: 0;
                transform: translateX(-20px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        @keyframes scaleIn {
            from {
                opacity: 0;
                transform: scale(0.9);
            }
            to {
                opacity: 1;
                transform: scale(1);
            }
        }

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

        @keyframes shimmer {
            0% {
                background-position: -200% 0;
            }
            100% {
                background-position: 200% 0;
            }
        }

        .card {
            animation: fadeInUp 0.5s ease-out forwards;
            opacity: 0;
        }

        .cards-row .card:nth-child(1) { animation-delay: 0.1s; }
        .cards-row .card:nth-child(2) { animation-delay: 0.2s; }
        .cards-row .card:nth-child(3) { animation-delay: 0.3s; }

        .cards-row-4 .card:nth-child(1) { animation-delay: 0.05s; }
        .cards-row-4 .card:nth-child(2) { animation-delay: 0.1s; }
        .cards-row-4 .card:nth-child(3) { animation-delay: 0.15s; }
        .cards-row-4 .card:nth-child(4) { animation-delay: 0.2s; }

        .analytics-row .card:nth-child(1) { animation-delay: 0.35s; }
        .analytics-row .card:nth-child(2) { animation-delay: 0.4s; }

        .bottom-row .card:nth-child(1) { animation-delay: 0.45s; }
        .bottom-row .card:nth-child(2) { animation-delay: 0.5s; }

        .card-value {
            transition: all 0.3s ease;
        }

        .product-tag {
            animation: scaleIn 0.3s ease-out forwards;
            opacity: 0;
        }

        .product-tag:nth-child(1) { animation-delay: 0.5s; }
        .product-tag:nth-child(2) { animation-delay: 0.6s; }
        .product-tag:nth-child(3) { animation-delay: 0.7s; }

        .stats-bar {
            animation: growUp 0.8s ease-out forwards;
            transform-origin: bottom;
        }

        @keyframes growUp {
            from {
                transform: scaleY(0);
            }
            to {
                transform: scaleY(1);
            }
        }

        .stats-bar:nth-child(1) { animation-delay: 0.3s; }
        .stats-bar:nth-child(2) { animation-delay: 0.4s; }
        .stats-bar:nth-child(3) { animation-delay: 0.5s; }
        .stats-bar:nth-child(4) { animation-delay: 0.6s; }
        .stats-bar:nth-child(5) { animation-delay: 0.7s; }

        .product-highlight {
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .product-highlight:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 30px rgba(255, 107, 53, 0.2);
        }

        .product-highlight-progress-bar {
            transition: width 1s ease-out;
        }

        .nav-item {
            transition: all 0.2s ease;
        }

        .btn-export, .btn-primary, .btn-outline {
            transition: all 0.2s ease;
        }

        .btn-export:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 20px rgba(255, 107, 53, 0.3);
        }

        .icon-btn {
            transition: all 0.2s ease;
        }

        .icon-btn:hover {
            transform: scale(1.1);
        }

        /* Loading shimmer effect */
        .loading-shimmer {
            background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
            background-size: 200% 100%;
            animation: shimmer 1.5s infinite;
        }

        /* Responsive */
        /* IRS Form 990 Styling */
        .irs-form-990 {
            background: #fff;
            border: 2px solid #000;
            border-radius: 0;
            max-width: 1000px;
            margin: 0 auto;
            font-family: 'Times New Roman', Times, serif;
            box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        }

        .irs-form-header {
            display: flex;
            border-bottom: 2px solid #000;
            background: #f0f0f0;
        }

        .irs-form-header-left {
            padding: 0.75rem;
            border-right: 1px solid #000;
            min-width: 140px;
        }

        .irs-form-number {
            font-size: 0.9rem;
        }

        .irs-form-990-number {
            font-size: 2rem;
            font-weight: bold;
        }

        .irs-form-dept {
            font-size: 0.7rem;
            margin-top: 0.25rem;
            line-height: 1.3;
        }

        .irs-form-header-center {
            flex: 1;
            padding: 0.75rem;
            text-align: center;
            border-right: 1px solid #000;
        }

        .irs-form-title {
            font-size: 1.1rem;
            font-weight: bold;
            margin-bottom: 0.25rem;
        }

        .irs-form-subtitle {
            font-size: 0.75rem;
            color: #000;
        }

        .irs-form-header-right {
            padding: 0.75rem;
            text-align: center;
            min-width: 100px;
        }

        .irs-form-omb {
            font-size: 0.7rem;
            margin-bottom: 0.5rem;
        }

        .irs-form-year {
            font-size: 1.75rem;
            font-weight: bold;
            background: #000;
            color: #fff;
            padding: 0.25rem 0.75rem;
            display: inline-block;
        }

        .irs-section {
            border-bottom: 1px solid #ccc;
            padding: 0;
        }

        .irs-section:last-of-type {
            border-bottom: none;
        }

        .irs-section-header {
            background: #1a1a2e;
            color: #fff;
            padding: 0.5rem 1rem;
            font-weight: bold;
            font-size: 0.9rem;
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .irs-section-letter {
            background: #fff;
            color: #000;
            padding: 0.1rem 0.5rem;
            font-weight: bold;
            font-size: 0.8rem;
        }

        .irs-row {
            display: flex;
            border-bottom: 1px solid #ddd;
        }

        .irs-row:last-child {
            border-bottom: none;
        }

        .irs-field {
            flex: 1;
            padding: 0.75rem 1rem;
            border-right: 1px solid #ddd;
        }

        .irs-field:last-child {
            border-right: none;
        }

        .irs-field-label {
            font-size: 0.7rem;
            color: #000;
            text-transform: uppercase;
            margin-bottom: 0.25rem;
            font-family: 'Inter', sans-serif;
        }

        .irs-field-value {
            font-size: 1rem;
            font-weight: 600;
            color: #000;
            font-family: 'Inter', sans-serif;
        }

        .irs-ein {
            font-family: monospace;
            letter-spacing: 1px;
        }

        .irs-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.85rem;
        }

        .irs-table thead {
            background: #f5f5f5;
        }

        .irs-table th {
            padding: 0.5rem 0.75rem;
            text-align: left;
            font-weight: 600;
            border-bottom: 2px solid #000;
            font-size: 0.75rem;
            font-family: 'Inter', sans-serif;
        }

        .irs-table td {
            padding: 0.5rem 0.75rem;
            border-bottom: 1px solid #ddd;
            vertical-align: middle;
        }

        .irs-table tr:hover {
            background: #f8f9fa;
        }

        .irs-line-num {
            font-weight: bold;
            text-align: center;
            color: #000;
            background: #f0f0f0;
            width: 40px;
        }

        .irs-amount {
            text-align: right;
            font-family: monospace;
            font-size: 0.9rem;
        }

        .irs-total-row {
            background: #e8f4ff;
        }

        .irs-total-row td {
            border-top: 2px solid #000;
            font-weight: 600;
        }

        .irs-total {
            font-weight: bold;
            color: #000;
        }

        .irs-net-row {
            background: #fff3e0;
        }

        .irs-net-row td {
            border-top: 1px solid #000;
        }

        .irs-net {
            font-weight: bold;
        }

        .irs-net.positive {
            color: #22c55e;
        }

        .irs-net.negative {
            color: #ef4444;
        }

        .irs-form-footer {
            display: flex;
            justify-content: space-between;
            padding: 0.5rem 1rem;
            background: #f0f0f0;
            border-top: 2px solid #000;
            font-size: 0.7rem;
        }

        .irs-form-footer-form {
            font-size: 0.8rem;
        }

        @media (max-width: 1200px) {
            .cards-row {
                grid-template-columns: 1fr 1fr;
            }
            .cards-row .card:first-child {
                grid-column: span 2;
            }
            .cards-row-4 {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (min-width: 901px) and (max-width: 992px) {
            .sidebar {
                width: 70px;
                padding: 1rem 0.5rem;
            }
            .sidebar .logo-text,
            .sidebar .nav-section-title,
            .sidebar .nav-item span,
            .sidebar .nav-badge,
            .sidebar .user-info {
                display: none;
            }
            .sidebar .nav-item {
                justify-content: center;
                padding: 0.75rem;
            }
            .sidebar .nav-icon {
                width: 24px;
                height: 24px;
            }
            .main-content {
                margin-left: 70px;
            }
            .analytics-row,
            .bottom-row {
                grid-template-columns: 1fr;
            }
        }

        @media (max-width: 768px) {
            .cards-row,
            .cards-row-4 {
                grid-template-columns: 1fr;
            }
            .cards-row .card:first-child {
                grid-column: span 1;
            }
            .top-bar {
                flex-direction: column;
                gap: 1rem;
            }
            .search-box {
                width: 100%;
            }
        }

        /* Nav Divider */
        .nav-divider {
            height: 1px;
            background: #eee;
            margin: 0.75rem 0.5rem;
            list-style: none;
        }

        /* ASO Popup Styles - White background */
        .aso-popup {
            min-width: 220px;
            background: #fff;
            padding: 0.5rem;
            border-radius: 8px;
        }

        .aso-popup-title {
            font-weight: 600;
            font-size: 1rem;
            color: #000;
            margin-bottom: 0.5rem;
            padding-bottom: 0.5rem;
            border-bottom: 1px solid #eee;
        }

        .aso-popup-row {
            font-size: 0.85rem;
            color: #000;
            margin-bottom: 0.25rem;
            line-height: 1.4;
        }

        .aso-popup-row a {
            color: #3697FF;
            text-decoration: none;
        }

        .aso-popup-row a:hover {
            text-decoration: underline;
        }

        .aso-popup-row strong {
            color: #000;
        }

        /* Override Leaflet popup styles for ASO map */
        #leafletASOMap .leaflet-popup-content-wrapper {
            background: #fff;
            color: #000;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }

        #leafletASOMap .leaflet-popup-tip {
            background: #fff;
        }

        #leafletASOMap .leaflet-popup-content {
            margin: 0.75rem;
        }

        /* ASO Map Container */
        #asoMapContainer {
            border-radius: 8px;
            overflow: hidden;
        }

        #leafletASOMap {
            background: #f0f0f0;
        }

        /* Graph Card Styles */
        .graph-card-header {
            background: #00a86b;
            color: #fff;
            padding: 0.75rem 1rem;
            font-weight: 600;
            font-size: 1rem;
            text-align: center;
            border-radius: 8px 8px 0 0;
        }

        .graph-card-content {
            display: flex;
            padding: 1rem;
            gap: 1rem;
            min-height: 280px;
        }

        .donut-chart-container {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 0;
        }

        .bar-chart-container {
            width: 100%;
            height: 200px;
        }

        .graph-table-container {
            flex: 1;
            overflow-y: auto;
            max-height: 250px;
            min-width: 0;
        }

        .graph-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.85rem;
        }

        .graph-table thead {
            background: #f5f5f5;
            position: sticky;
            top: 0;
        }

        .graph-table th {
            padding: 0.5rem 0.75rem;
            text-align: left;
            font-weight: 600;
            border-bottom: 2px solid #ddd;
            font-size: 0.75rem;
            color: #000;
        }

        .graph-table td {
            padding: 0.4rem 0.75rem;
            border-bottom: 1px solid #eee;
            font-size: 0.8rem;
        }

        .graph-table tr:hover {
            background: #f8f9fa;
        }

        .graph-table .row-num {
            color: #000;
            width: 30px;
        }

        .graph-card-footer {
            padding: 0.75rem 1rem;
            background: #f9f9f9;
            border-top: 1px solid #eee;
            font-size: 0.75rem;
            color: #000;
            line-height: 1.4;
        }

/* ===== Disclaimer banner ===== */
/* Sticky at top; sidebar sits IN FRONT of it via higher z-index */
.disclaimer-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 300;
    background: #7a1a1a;
    color: #fff;
    text-align: center;
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.4;
}

/* Push body content below disclaimer */
body { padding-top: 38px; }

/* Sidebar sits below disclaimer vertically, but in front visually */
.sidebar {
    top: 38px !important;
    height: calc(100vh - 38px) !important;
    z-index: 9000 !important;
}

/* ===== Sidebar Hide/Show button — sits in the sidebar footer ===== */
#sidebarToggleBtn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 0.6rem;
    padding: 0.5rem 0.75rem;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
#sidebarToggleBtn:hover { background: #222; }

/* Hide on mobile — hamburger handles it */
@media (max-width: 900px) {
    #sidebarToggleBtn { display: none !important; }
}

/* ===== Fixed "Show" tab — appears at left edge when sidebar is hidden ===== */
#sidebarShowTab {
    display: none;   /* hidden by default; shown via body.sidebar-hidden on desktop */
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 9100;
    width: 22px;
    padding: 14px 4px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    writing-mode: vertical-lr;
    text-orientation: mixed;
    text-transform: uppercase;
}
#sidebarShowTab:hover { background: #222; }

@media (min-width: 901px) {
    body.sidebar-hidden #sidebarShowTab {
        display: flex;
    }
}

/* ===== Desktop: full sidebar by default, override narrow breakpoint ===== */
@media (min-width: 901px) {
    .hamburger-btn { display: none !important; }

    .sidebar {
        width: 260px !important;
        padding: 1.5rem 1rem !important;
        overflow: hidden !important;
        transition: transform 0.25s ease;
        transform: translateX(0);
    }
    .sidebar .nav-item span,
    .sidebar .nav-group-label,
    .sidebar .nav-group-chevron {
        display: revert !important;
    }
    .sidebar .nav-item {
        justify-content: flex-start !important;
        padding: 0.6rem 0.75rem !important;
    }
    .main-content {
        margin-left: 260px !important;
        transition: margin-left 0.25s ease;
    }

    /* ── Hidden: sidebar slides off-screen ── */
    body.sidebar-hidden .sidebar {
        transform: translateX(-260px);
    }
    body.sidebar-hidden .main-content {
        margin-left: 0 !important;
    }
}
