/* =======================================================
   SaniBook Dashboard Design System
   ======================================================= */


/* --- Fonts --- */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Montserrat:wght@700;900&display=swap');
:root {
    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed: 68px;
    --header-height: 64px;
    /* Colors */
    --color-bg: #f8fafc;
    --color-card: #ffffff;
    --color-border: rgba(226, 232, 240, 0.8);
    --color-border-light: #f1f5f9;
    --color-sidebar-bg: #0f172a;
    --color-sidebar-hover: rgba(255, 255, 255, 0.06);
    --color-sidebar-active: rgba(16, 185, 129, 0.15);
    --color-sidebar-text: #94a3b8;
    --color-sidebar-text-hover: #ffffff;
    --color-sidebar-divider: rgba(255, 255, 255, 0.08);
    --color-primary: #10b981;
    --color-primary-light: #ecfdf5;
    --color-primary-dark: #059669;
    --color-brand-navy: #0a3555;
    --color-brand-teal: #16758a;
    --color-brand-gold: #c9a448;
    --color-brand-terracotta: #c88272;
    --color-text-900: #0f172a;
    --color-text-700: #334155;
    --color-text-500: #64748b;
    --color-text-400: #94a3b8;
    --color-text-300: #cbd5e1;
    --color-header-bg: linear-gradient(135deg, #012a4a 0%, #013a5e 45%, #01497c 80%, #023e6e 100%);
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    /* Transitions */
    --transition-fast: 200ms ease;
    --transition-normal: 300ms ease;
}


/* --- Global Reset --- */

.dashboard-shell * {
    box-sizing: border-box;
}

.dashboard-shell {
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
    background-color: var(--color-bg);
    min-height: 100vh;
    color: var(--color-text-700);
    margin: 0;
    padding: 0;
}

body.dashboard-body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}


/* --- Scrollbar --- */

.dashboard-shell ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.dashboard-shell ::-webkit-scrollbar-track {
    background: transparent;
}

.dashboard-shell ::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.dashboard-shell ::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}


/* =====================
   SIDEBAR
   ===================== */

.dash-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: var(--color-sidebar-bg);
    color: #fff;
    z-index: 50;
    display: flex;
    flex-direction: column;
    transition: width var(--transition-normal);
    overflow: hidden;
}

.dash-sidebar.collapsed {
    width: var(--sidebar-collapsed);
}


/* Sidebar header */

.dash-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    height: var(--header-height);
    border-bottom: 1px solid var(--color-sidebar-divider);
    flex-shrink: 0;
    gap: 8px;
    position: relative;
}

.dash-sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    overflow: hidden;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.dash-sidebar-logo img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    flex-shrink: 0;
}

.dash-sidebar-logo span {
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.3px;
}

.collapsed .dash-sidebar-logo span {
    display: none;
}

.collapsed .dash-sidebar-logo {
    flex: none;
}


/* Toggle button: sits ON the border line, right side */

.dash-sidebar-toggle {
    position: absolute;
    right: 10px;
    bottom: -14px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-sidebar-bg);
    border: 1px solid var(--color-sidebar-divider);
    color: var(--color-sidebar-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    z-index: 2;
    transition: all var(--transition-fast);
}

.dash-sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}


/* Collapsed state: center the toggle */

.collapsed .dash-sidebar-header {
    justify-content: center;
    padding: 0 8px;
}

.collapsed .dash-sidebar-toggle {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
}


/* Sidebar navigation */

.dash-sidebar-nav {
    flex: 1;
    padding: 16px 8px;
    overflow-y: auto;
    overflow-x: hidden;
}

.dash-sidebar-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-500);
    font-weight: 500;
    padding: 0 12px;
    margin-bottom: 8px;
}

.collapsed .dash-sidebar-label {
    display: none;
}

.dash-sidebar-divider {
    height: 1px;
    background: var(--color-sidebar-divider);
    margin: 8px 12px;
}


/* Nav items */

.dash-nav-item {
    list-style: none;
    margin-bottom: 2px;
}

.dash-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-sidebar-text);
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.dash-nav-link:hover {
    background: var(--color-sidebar-hover);
    color: var(--color-sidebar-text-hover);
}

.dash-nav-link.active {
    background: var(--color-sidebar-active);
    color: var(--color-primary);
    font-weight: 600;
}

.dash-nav-link i,
.dash-nav-link .nav-icon {
    font-size: 18px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.dash-nav-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.collapsed .dash-nav-text {
    display: none;
}

.dash-nav-expand {
    font-size: 14px;
    transition: transform var(--transition-fast);
    flex-shrink: 0;
    color: var(--color-text-500);
}

.dash-nav-expand.open {
    transform: rotate(180deg);
}

.collapsed .dash-nav-expand {
    display: none;
}

.collapsed .dash-nav-link {
    justify-content: center;
    padding: 10px;
}


/* Sub navigation */

.dash-subnav {
    margin-left: 20px;
    padding-left: 12px;
    border-left: 1px solid var(--color-sidebar-divider);
    margin-top: 2px;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s ease;
}

.dash-subnav.open {
    max-height: 500px;
}

.collapsed .dash-subnav {
    display: none;
}

.dash-subnav .dash-nav-link {
    font-size: 13px;
    padding: 8px 12px;
    gap: 10px;
}

.dash-subnav .dash-nav-link i {
    font-size: 14px;
    width: 16px;
}


/* Sidebar footer */

.dash-sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--color-sidebar-divider);
    flex-shrink: 0;
}

.collapsed .dash-sidebar-footer {
    display: none;
}

.dash-sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dash-sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #0d9488);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.dash-sidebar-userinfo {
    min-width: 0;
}

.dash-sidebar-username {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-sidebar-userrole {
    font-size: 12px;
    color: var(--color-text-500);
}


/* =====================
   MAIN CONTENT
   ===================== */

.dash-main {
    margin-left: var(--sidebar-width);
    transition: margin-left var(--transition-normal);
    min-height: 100vh;
}

.dash-sidebar.collapsed~.dash-main,
.dashboard-shell.sidebar-collapsed .dash-main {
    margin-left: var(--sidebar-collapsed);
}


/* =====================
   HEADER BAR
   ===================== */

.dash-header {
    background: var(--color-header-bg);
    padding: 20px 24px;
    position: sticky;
    top: 0;
    z-index: 40;
}

.dash-header-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 22px;
    color: #fff;
    margin: 0;
    letter-spacing: -0.3px;
}

.dash-header-breadcrumb {
    font-size: 12px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dash-header-breadcrumb span {
    color: rgba(147, 197, 253, 0.7);
}

.dash-header-breadcrumb .separator {
    color: rgba(255, 255, 255, 0.3);
}

.dash-header-breadcrumb .current {
    color: #10b981;
    font-weight: 600;
}


/* =====================
   DASHBOARD CONTENT
   ===================== */

.dash-content {
    padding: 24px;
}


/* =====================
   STAT CARDS
   ===================== */

.dash-card {
    background: var(--color-card);
    border-radius: 16px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
}


/* Feature card variants (top row card 1 and 2) */

.dash-card-theme-wave {
    position: relative;
    overflow: hidden;
    border-color: rgba(120, 176, 198, 0.2);
    color: #fff;
    box-shadow: 0 12px 24px rgba(4, 26, 48, 0.2);
}

.dash-card-theme-wave::before,
.dash-card-theme-wave::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    z-index: 0;
}

.dash-card-theme-wave::before {
    right: -30px;
    top: -34px;
    width: 210px;
    height: 210px;
    opacity: 0.8;
}

.dash-card-theme-wave::after {
    right: -88px;
    top: -18px;
    width: 230px;
    height: 230px;
    opacity: 0.68;
    transform: rotate(-14deg);
}

.dash-card-theme-wave-gold {
    background: linear-gradient(132deg, #03233f 0%, #0a3555 56%, #145072 100%);
}

.dash-card-theme-wave-gold::before {
    background: rgba(52, 143, 171, 0.42);
}

.dash-card-theme-wave-gold::after {
    background: #c9a448;
}

.dash-card-theme-wave-coral {
    background: linear-gradient(132deg, #06213b 0%, #103756 54%, #186076 100%);
}

.dash-card-theme-wave-coral::before {
    background: rgba(44, 145, 175, 0.36);
}

.dash-card-theme-wave-coral::after {
    background: #c88272;
}

.dash-card-theme-wave .dash-card-header,
.dash-card-theme-wave .dash-card-title,
.dash-card-theme-wave .dash-card-subtitle,
.dash-card-theme-wave .dash-card-label,
.dash-card-theme-wave .dash-card-value {
    position: relative;
    z-index: 1;
}

.dash-card-theme-wave .dash-chart-container,
.dash-card-theme-wave .dash-map-stats,
.dash-card-theme-wave canvas {
    position: relative;
    z-index: 2;
}

.dash-card-theme-wave .dash-card-title,
.dash-card-theme-wave .dash-card-value {
    color: #ffffff;
}

.dash-card-theme-wave .dash-card-subtitle,
.dash-card-theme-wave .dash-card-label {
    color: rgba(255, 255, 255, 0.8);
}

.dash-card-theme-wave .dash-card-divider {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.2);
}

.dash-card-theme-wave .dash-card-icon {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.dash-card-micro-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.82);
    position: relative;
    z-index: 1;
}

.dash-trend-pill {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    position: relative;
    z-index: 1;
}

.dash-trend-pill.up {
    color: #bbf7d0;
    background: rgba(10, 80, 55, 0.52);
    border: 1px solid rgba(134, 239, 172, 0.25);
}

.dash-trend-pill.down {
    color: #fecaca;
    background: rgba(120, 27, 49, 0.5);
    border: 1px solid rgba(252, 165, 165, 0.26);
}

.dash-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.dash-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.dash-card-icon.emerald {
    background: #ecfdf5;
    color: #10b981;
}

.dash-card-icon.blue {
    background: #eff6ff;
    color: #3b82f6;
}

.dash-card-icon.amber {
    background: #fffbeb;
    color: #f59e0b;
}

.dash-card-icon.purple {
    background: #faf5ff;
    color: #8b5cf6;
}

.dash-card-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-500);
}

.dash-card-value {
    font-size: 30px;
    font-weight: 700;
    color: var(--color-text-900);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.dash-card-divider {
    height: 1px;
    background: var(--color-border-light);
    margin: 20px 0;
}

.dash-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-900);
    margin-bottom: 2px;
}

.dash-card-subtitle {
    font-size: 12px;
    color: var(--color-text-400);
}


/* Stats card row */

.dash-stats-row {
    display: grid;
    grid-template-columns: 3fr 4fr 5fr;
    gap: 20px;
    margin-bottom: 24px;
}


/* Chart container */

.dash-chart-container {
    flex: 1;
    min-height: 0;
    position: relative;
}


/* Geographical reach card treatment */

.dash-card-map-soft {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #fafdff 0%, #f2f9fc 100%);
    border: 1px solid rgba(84, 117, 140, 0.5);
    box-shadow: 0 14px 28px rgba(4, 26, 48, 0.12);
}

.dash-card-map-soft::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 100% 0%, rgba(201, 164, 72, 0.24) 0%, rgba(201, 164, 72, 0) 45%), radial-gradient(circle at 0% 100%, rgba(22, 117, 138, 0.16) 0%, rgba(22, 117, 138, 0) 50%);
    pointer-events: none;
}

.dash-card-map-soft::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45), inset 0 0 0 2px rgba(10, 53, 85, 0.08);
    pointer-events: none;
}

.dash-card-map-soft>* {
    position: relative;
    z-index: 1;
}

.dash-card-map-soft .dash-map-stats {
    border-top: 1px solid rgba(84, 117, 140, 0.34);
}

.dash-card-map-soft .dash-map-stat-label {
    color: #5e768c;
}

.dash-card-map-soft #dashKenyaMapDiv {
    border-radius: 10px;
    border: 1px solid rgba(84, 117, 140, 0.34);
    background: rgba(239, 246, 252, 0.62);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}


/* Trend + leaderboard card treatments */

.dash-card-trend-soft,
.dash-card-leader-soft {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(96, 128, 149, 0.42);
    box-shadow: 0 12px 24px rgba(4, 26, 48, 0.09);
}

.dash-card-trend-soft {
    background: linear-gradient(180deg, #fbfdff 0%, #f4fafd 100%);
}

.dash-card-leader-soft {
    background: linear-gradient(180deg, #fffdfa 0%, #f8fcff 100%);
}

.dash-card-trend-soft::before,
.dash-card-leader-soft::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.dash-card-trend-soft::before {
    background: radial-gradient(circle at 100% 0%, rgba(22, 117, 138, 0.2) 0%, rgba(22, 117, 138, 0) 44%), radial-gradient(circle at 0% 100%, rgba(10, 53, 85, 0.14) 0%, rgba(10, 53, 85, 0) 48%);
}

.dash-card-leader-soft::before {
    background: radial-gradient(circle at 100% 0%, rgba(201, 164, 72, 0.24) 0%, rgba(201, 164, 72, 0) 45%), radial-gradient(circle at 0% 100%, rgba(22, 117, 138, 0.12) 0%, rgba(22, 117, 138, 0) 52%);
}

.dash-card-trend-soft::after,
.dash-card-leader-soft::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45), inset 0 0 0 2px rgba(10, 53, 85, 0.07);
    pointer-events: none;
}

.dash-card-trend-soft>*,
.dash-card-leader-soft>* {
    position: relative;
    z-index: 1;
}

.dash-card-trend-soft .dash-chart-container {
    border-radius: 10px;
    border: 1px solid rgba(96, 128, 149, 0.28);
    background: rgba(244, 250, 253, 0.58);
    padding: 8px 10px 4px;
}

.dash-card-leader-soft .dash-lb-bar {
    background: rgba(96, 128, 149, 0.24);
}


/* Map quick stats */

.dash-map-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border-light);
}

.dash-map-stat {
    text-align: center;
}

.dash-map-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-900);
}

.dash-map-stat-value.emerald {
    color: var(--color-primary);
}

.dash-map-stat-label {
    font-size: 10px;
    color: var(--color-text-400);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 2px;
}


/* =====================
   SUBMISSIONS TABLE
   ===================== */

.dash-table-card {
    background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
    border-radius: 16px;
    border: 1px solid rgba(148, 176, 194, 0.34);
    box-shadow: 0 10px 22px rgba(4, 26, 48, 0.08);
    overflow: hidden;
}


/* Table top bar */

.dash-table-topbar {
    padding: 16px 24px;
    border-bottom: 1px solid var(--color-border-light);
    background: linear-gradient(90deg, rgba(10, 53, 85, 0.03) 0%, rgba(22, 117, 138, 0.02) 55%, rgba(201, 164, 72, 0.06) 100%);
}

.dash-table-topbar-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.dash-table-title {
    font-size: 16px;
    font-weight: 700;
    color: #113a5a;
}

.dash-table-count {
    font-size: 12px;
    color: #5f7388;
    margin-top: 2px;
}

.dash-table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}


/* Search input */

.dash-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(120, 149, 168, 0.34);
    border-radius: 12px;
    padding: 8px 12px;
    width: 220px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.dash-search:focus-within {
    border-color: var(--color-brand-teal);
    box-shadow: 0 0 0 3px rgba(22, 117, 138, 0.16);
}

.dash-search i {
    color: var(--color-text-400);
    font-size: 14px;
    flex-shrink: 0;
}

.dash-search input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: var(--color-text-700);
    width: 100%;
    font-family: inherit;
}

.dash-search input::placeholder {
    color: var(--color-text-400);
}


/* Filter button */

.dash-filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid rgba(120, 149, 168, 0.32);
    background: rgba(255, 255, 255, 0.96);
    color: #4b6278;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.dash-filter-btn:hover {
    background: rgba(22, 117, 138, 0.08);
    border-color: rgba(22, 117, 138, 0.34);
    color: #124f65;
}

.dash-filter-btn.active {
    background: rgba(22, 117, 138, 0.14);
    border-color: rgba(22, 117, 138, 0.4);
    color: #0f4e63;
}

.dash-filter-badge {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-brand-terracotta);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* Filter panel */

.dash-filter-panel {
    display: none;
    padding: 16px 24px;
    border-top: 1px solid var(--color-border-light);
    background: linear-gradient(180deg, rgba(22, 117, 138, 0.04) 0%, rgba(10, 53, 85, 0.02) 100%);
}

.dash-filter-panel.open {
    display: block;
}

.dash-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.dash-filter-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #536a80;
    margin-bottom: 4px;
}

.dash-filter-group select,
.dash-filter-group input[type="date"],
.dash-filter-group input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid rgba(120, 149, 168, 0.34);
    border-radius: 8px;
    background: #ffffff;
    font-size: 14px;
    color: var(--color-text-700);
    outline: none;
    transition: border-color var(--transition-fast);
    font-family: inherit;
    appearance: auto;
}

.dash-filter-group select:focus,
.dash-filter-group input:focus {
    border-color: var(--color-brand-teal);
    box-shadow: 0 0 0 3px rgba(22, 117, 138, 0.12);
}


/* Table */

.dash-table-wrap {
    overflow-x: auto;
}

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

.dash-table thead tr {
    background: linear-gradient(90deg, rgba(10, 53, 85, 0.06) 0%, rgba(22, 117, 138, 0.04) 100%);
}

.dash-table th {
    text-align: left;
    padding: 12px 24px;
    font-size: 12px;
    font-weight: 600;
    color: #51687d;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.dash-table td {
    padding: 14px 24px;
    font-size: 14px;
    color: var(--color-text-700);
    border-top: 1px solid rgba(120, 149, 168, 0.2);
}

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

.dash-table tbody tr:hover {
    background: rgba(22, 117, 138, 0.06);
}

.dash-table .td-num {
    color: var(--color-text-400);
    font-variant-numeric: tabular-nums;
    font-size: 13px;
}

.dash-table .td-title {
    font-weight: 500;
    color: var(--color-text-900);
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-table .td-action {
    text-align: center;
}

.dash-table .action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--color-text-400);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.dash-table .action-btn:hover {
    background: rgba(22, 117, 138, 0.11);
    color: #0f5468;
}


/* Empty state */

.dash-table-empty {
    padding: 48px 24px;
    text-align: center;
    color: var(--color-text-400);
    font-size: 14px;
}


/* Pagination */

.dash-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid rgba(120, 149, 168, 0.22);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, rgba(10, 53, 85, 0.03) 100%);
}

.dash-pagination-info {
    font-size: 12px;
    color: var(--color-text-400);
}

.dash-pagination-pages {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dash-page-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: #556d83;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    font-family: inherit;
    text-decoration: none;
}

.dash-page-btn:hover {
    background: rgba(22, 117, 138, 0.08);
    border-color: rgba(22, 117, 138, 0.26);
    color: #0f5468;
}

.dash-page-btn.active {
    background: #0f5f73;
    color: #fff;
    border-color: rgba(10, 53, 85, 0.35);
    box-shadow: 0 6px 12px rgba(10, 53, 85, 0.24);
}

.dash-page-btn:disabled,
.dash-page-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.dash-page-ellipsis {
    padding: 0 4px;
    color: var(--color-text-400);
    font-size: 14px;
}


/* =====================
   LEVEL 2/3 EXTRAS
   ===================== */


/* Sub-category overview cards */

.dash-subcat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.dash-subcat-card {
    background: linear-gradient(180deg, #ffffff 0%, #fdfefe 100%);
    border-radius: 12px;
    border: 1px solid rgba(148, 176, 194, 0.34);
    padding: 16px;
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-fast);
    display: block;
}

.dash-subcat-card:hover {
    border-color: rgba(22, 117, 138, 0.48);
    box-shadow: 0 10px 20px rgba(4, 26, 48, 0.1);
    transform: translateY(-1px);
}

.dash-subcat-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-700);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dash-subcat-card-title i {
    color: #0f6b80;
    font-size: 14px;
}

.dash-subcat-card-stats {
    font-size: 12px;
    color: var(--color-text-400);
}

.dash-subcat-card-stats strong {
    color: var(--color-text-900);
    font-weight: 700;
    font-size: 20px;
    display: block;
    margin-bottom: 2px;
}

.dash-subcat-bar {
    height: 4px;
    background: rgba(120, 149, 168, 0.24);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 10px;
}

.dash-subcat-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #16758a, #c9a448);
    border-radius: 2px;
    transition: width 0.8s ease;
}


/* Two-column row for trend + leaderboard */

.dash-two-col {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 20px;
    margin-bottom: 24px;
}


/* Org leaderboard */

.dash-leaderboard-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 9px 10px;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: background var(--transition-fast);
}

.dash-leaderboard-item:hover {
    background: rgba(22, 117, 138, 0.07);
}

.dash-leaderboard-item:hover .dash-lb-name {
    color: var(--color-primary);
}

.dash-leaderboard-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dash-lb-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-700);
    transition: color var(--transition-fast);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-lb-count {
    font-size: 13px;
    font-weight: 700;
    color: #0f5f73;
    flex-shrink: 0;
}

.dash-lb-bar {
    height: 4px;
    background: rgba(120, 149, 168, 0.24);
    border-radius: 2px;
    overflow: hidden;
}

.dash-lb-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #0a3555, #16758a);
    border-radius: 2px;
    transition: width 0.8s ease;
}


/* =====================
   RESPONSIVE
   ===================== */

@media (max-width: 1024px) {
    .dash-stats-row {
        grid-template-columns: 1fr 1fr;
    }
    .dash-two-col {
        grid-template-columns: 1fr;
    }
    .dash-content {
        padding: 16px;
    }
    .dash-subcat-row {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    /* Sidebar hidden by default on mobile */
    .dash-sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width) !important;
        transition: transform var(--transition-normal);
    }
    .dash-sidebar.mobile-open {
        transform: translateX(0);
    }
    /* Main content takes full width */
    .dash-main {
        margin-left: 0 !important;
    }
    /* Header: flush to edges, left padding for hamburger */
    .dash-header {
        padding: 14px 16px 14px 60px;
        border-radius: 0;
    }
    .dash-header-title {
        font-size: 18px;
    }
    /* Stats cards go single-column */
    .dash-stats-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    /* Content padding tighter */
    .dash-content {
        padding: 12px;
    }
    /* Cards smaller padding */
    .dash-card {
        padding: 16px;
    }
    .dash-card-value {
        font-size: 24px;
    }
    /* Search full width */
    .dash-search {
        width: 100%;
    }
    /* Table top bar stacks vertically */
    .dash-table-topbar-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .dash-table-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    .dash-table-topbar {
        padding: 12px 16px;
    }
    /* Table cells tighter */
    .dash-table th,
    .dash-table td {
        padding: 10px 12px;
        font-size: 13px;
    }
    .dash-table .td-title {
        max-width: 160px;
    }
    /* Pagination stacks */
    .dash-pagination {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
        align-items: center;
    }
    /* Filter grid columns */
    .dash-filter-grid {
        grid-template-columns: 1fr;
    }
    .dash-filter-panel {
        padding: 12px 16px;
    }
    /* Sub-category cards */
    .dash-subcat-row {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .dash-subcat-card {
        padding: 12px;
    }
    .dash-subcat-card-stats strong {
        font-size: 16px;
    }
    /* Map stats */
    .dash-map-stats {
        gap: 8px;
    }
    .dash-map-stat-value {
        font-size: 15px;
    }
    /* Mobile toggle visible */
    .dash-mobile-toggle {
        display: flex !important;
    }
    /* Overlay enabled */
    .dash-overlay {
        display: block !important;
    }
}

@media (max-width: 480px) {
    .dash-header {
        padding: 12px 12px 12px 52px;
    }
    .dash-header-title {
        font-size: 16px;
    }
    .dash-subcat-row {
        grid-template-columns: 1fr;
    }
    .dash-table .td-title {
        max-width: 120px;
    }
}


/* Mobile sidebar toggle – modern pill that blends into the header */

.dash-mobile-toggle {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 55;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all var(--transition-fast);
}

.dash-mobile-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.25);
}

.dash-mobile-toggle:active {
    transform: scale(0.93);
    background: rgba(255, 255, 255, 0.25);
}


/* Mobile overlay */

.dash-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 49;
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
}

.dash-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}


/* =====================
   MAP ZOOM CONTROLS
   ===================== */

.dash-map-zoom {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 5;
}

.dash-map-zoom button {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(120, 149, 168, 0.36);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    color: #4b6278;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.dash-map-zoom button:hover {
    background: rgba(22, 117, 138, 0.12);
    color: #0f5468;
    border-color: rgba(22, 117, 138, 0.48);
}

.dash-map-zoom button:active {
    transform: scale(0.92);
}


/* =====================
   ANIMATIONS
   ===================== */

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

.dash-animate {
    animation: fadeInUp 0.4s ease forwards;
}

.dash-animate-delay-1 {
    animation-delay: 0.05s;
    opacity: 0;
}

.dash-animate-delay-2 {
    animation-delay: 0.1s;
    opacity: 0;
}

.dash-animate-delay-3 {
    animation-delay: 0.15s;
    opacity: 0;
}