/*
 * Civik India — Citizen Voice Against Corruption
 * Public awareness platform UI theme
 */

/* ==========================================================================
   Theme Variables
   ========================================================================== */
:root {
    --brand-900: #17321f;
    --brand-800: #1c472c;
    --brand-700: #0f5f2c;
    --brand-600: #138808;
    --brand-500: #287d3c;
    --india-saffron: #ff9933;
    --india-green: #138808;
    --india-navy: #000080;
    --accent-500: #ff9933;
    --warning-500: #b45309;
    --danger-500: #ef4444;
    --info-500: #075985;

    --bg-page: #f7f8f3;
    --bg-surface: #ffffff;
    --bg-surface-alt: #f0f5ec;
    --text-900: #1b1f1d;
    --text-700: #3f5146;
    --text-500: #5d6b63;
    --border-soft: #d9e2d7;

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;

    --shadow-sm: 0 4px 16px rgba(13, 42, 77, 0.08);
    --shadow-md: 0 10px 30px rgba(13, 42, 77, 0.14);
    --shadow-lg: 0 20px 50px rgba(13, 42, 77, 0.2);

    --font-heading: "Noto Sans", "Noto Sans Devanagari", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-body: "Noto Sans", "Noto Sans Devanagari", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ==========================================================================
   Base
   ========================================================================== */
html {
    scroll-padding-top: 5.5rem;
}

body {
    font-family: var(--font-body);
    color: var(--text-900);
    background-color: var(--bg-page);
    line-height: 1.6;
    font-size: 16px;
}

@media (prefers-reduced-motion: no-preference) {
    body {
        animation: fadeIn var(--transition-entrance) forwards;
    }
}

.site-shell {
    position: relative;
    overflow-x: clip;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    letter-spacing: 0;
}

.page-content {
    position: relative;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -100px;
    background: var(--brand-900);
    color: #fff;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    z-index: 1100;
    text-decoration: none;
}

.skip-link:focus {
    top: 16px;
    outline: 3px solid var(--india-saffron);
    outline-offset: 3px;
}

.text-accent {
    color: var(--india-saffron) !important;
}

.bg-surface-alt {
    background: var(--bg-surface-alt);
}

/* ==========================================================================
   Public Header and Navigation
   ========================================================================== */
.gov-header {
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(22, 41, 29, 0.08);
    position: relative;
    z-index: 1000;
}

.gov-tricolor {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    height: 4px;
    background:
        linear-gradient(
            to right,
            var(--india-saffron) 0 33.333%,
            #ffffff 33.333% 66.666%,
            var(--india-green) 66.666% 100%
        );
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.gov-topbar {
    background: #f7f7f2;
    color: #24342a;
    border-bottom: 1px solid var(--border-soft);
    font-size: 0.875rem;
    padding: 0.4rem 0;
}

.gov-topbar-item,
.gov-topbar-link {
    color: #24342a;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.gov-topbar-link {
    font-weight: 700;
    text-decoration: none;
}

.gov-topbar-link:hover {
    color: var(--brand-700);
    text-decoration: underline;
}

.gov-brand-strip {
    background: #ffffff;
    padding: 1rem 0;
}

.gov-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-900);
}

.national-emblem {
    width: 74px;
    min-width: 74px;
    min-height: 74px;
    border: 2px solid #c69c38;
    border-radius: 50%;
    color: #7a4f02;
    background: #fffdf5;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 4px #fff5d7;
}

.emblem-pillar {
    font-weight: 800;
    font-size: 1rem;
    line-height: 1;
}

.emblem-motto {
    font-size: 0.55rem;
    line-height: 1.1;
    margin-top: 0.25rem;
}

.gov-brand-copy {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}

.gov-brand-title {
    color: var(--text-900);
    font-weight: 800;
    font-size: clamp(1.05rem, 2vw, 1.55rem);
    line-height: 1.2;
}

.gov-brand-title-hi {
    color: var(--brand-700);
    font-weight: 700;
    line-height: 1.25;
}

.gov-brand-subtitle {
    color: var(--text-500);
    font-size: 0.9rem;
}

.gov-helpline-panel {
    border: 1px solid #f2cf9b;
    border-left: 5px solid var(--india-saffron);
    background: #fff8ef;
    color: #463015;
    display: grid;
    gap: 0.2rem;
    padding: 0.7rem 0.9rem;
    font-size: 0.92rem;
}

.gov-helpline-collapsible {
    width: 100%;
}

.gov-helpline-summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88rem;
    color: #463015;
    list-style: none;
}

.gov-helpline-summary::-webkit-details-marker {
    display: none;
}

.gov-helpline-panel-body {
    display: grid;
    gap: 0.2rem;
    margin-top: 0.45rem;
    font-size: 0.88rem;
}

.gov-topbar-compact-label {
    font-weight: 600;
}

.site-nav {
    background: var(--brand-800);
    box-shadow: none;
}

.navbar-brand {
    color: #fff !important;
    font-family: var(--font-heading);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 18px;
    background: linear-gradient(140deg, var(--india-saffron), var(--india-green));
    color: #fff;
    box-shadow: 0 8px 18px rgba(18, 185, 129, 0.28);
}

.brand-subtitle {
    font-size: 0.68rem;
    color: rgba(235, 246, 255, 0.78);
    line-height: 1.1;
}

.site-nav .navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.site-nav .nav-link {
    color: rgba(234, 245, 255, 0.86) !important;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.45rem 0.9rem !important;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.site-nav .nav-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.13);
}

.site-nav .nav-link.active {
    color: #fff !important;
    background: var(--india-green);
    box-shadow: inset 0 -3px 0 var(--india-saffron);
}

.nav-dropdown {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 0.4rem;
}

.nav-dropdown .dropdown-item {
    border-radius: 8px;
}

.nav-ghost-btn,
.nav-cta-btn {
    border-radius: 999px !important;
    font-weight: 700;
    padding: 0.42rem 0.95rem !important;
}

.nav-ghost-btn {
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.55) !important;
}

.nav-ghost-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-cta-btn {
    color: #1f1608 !important;
    background: var(--india-saffron) !important;
    border-color: var(--india-saffron) !important;
}

.nav-cta-btn:hover {
    background: #ffc071 !important;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.form-control:focus,
.form-select:focus,
.btn:focus-visible,
.nav-link:focus-visible,
.dropdown-item:focus-visible {
    outline: 3px solid var(--india-saffron) !important;
    outline-offset: 3px !important;
    box-shadow: none !important;
}

/* ==========================================================================
   Hero and Landing
   ========================================================================== */
.hero-section {
    min-height: 82vh;
    display: flex;
    align-items: center;
    background:
        radial-gradient(circle at 12% 10%, rgba(47, 127, 246, 0.14) 0%, rgba(47, 127, 246, 0) 42%),
        radial-gradient(circle at 88% 75%, rgba(18, 185, 129, 0.16) 0%, rgba(18, 185, 129, 0) 45%);
}

.hero-content {
    position: relative;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    background: rgba(11, 94, 215, 0.11);
    color: var(--brand-700);
    border: 1px solid rgba(11, 94, 215, 0.24);
    border-radius: 999px;
    padding: 0.45rem 0.95rem;
    font-size: 0.88rem;
    font-weight: 700;
}

.hero-panel {
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(244, 249, 255, 0.98));
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.trust-strip {
    gap: 0.65rem !important;
}

.trust-chip {
    display: inline-flex;
    align-items: center;
    font-size: 0.88rem;
    font-weight: 600;
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    padding: 0.42rem 0.8rem;
    box-shadow: var(--shadow-sm);
}

.stat-item {
    border: 1px solid var(--border-soft);
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: 0.95rem;
    text-align: center;
}

.stat-icon {
    font-size: 1.2rem;
    margin-bottom: 0.45rem;
}

.stat-number {
    color: var(--brand-700);
}

.stat-label {
    color: var(--text-500);
    font-size: 0.8rem;
    font-weight: 600;
}

.resolution-meter {
    border: 1px dashed rgba(18, 185, 129, 0.35);
    background: rgba(18, 185, 129, 0.06);
    border-radius: var(--radius-md);
}

.trust-band {
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 250, 255, 0.92));
}

.trust-band-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    height: 100%;
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
}

.trust-band-item i {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: rgba(11, 94, 215, 0.12);
    color: var(--brand-600);
}

/* ==========================================================================
   Home AI Chatbot
   ========================================================================== */
.home-ai-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 8% 12%, rgba(47, 127, 246, 0.12), rgba(47, 127, 246, 0) 45%),
        radial-gradient(circle at 94% 90%, rgba(18, 185, 129, 0.14), rgba(18, 185, 129, 0) 48%),
        linear-gradient(165deg, rgba(255, 255, 255, 0.97), rgba(244, 249, 255, 0.97));
    box-shadow: var(--shadow-md);
}

.home-ai-kicker {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(11, 94, 215, 0.26);
    background: rgba(11, 94, 215, 0.09);
    color: var(--brand-700);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
    padding: 0.35rem 0.7rem;
}

.home-ai-chat {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-sm);
    padding: 1rem;
}

.home-ai-thread {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 320px;
    overflow-y: auto;
    margin-bottom: 0.9rem;
    padding-right: 0.25rem;
    scroll-behavior: smooth;
    overscroll-behavior: contain;
}

.home-ai-msg {
    display: flex;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.home-ai-msg.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.home-ai-msg-assistant {
    justify-content: flex-start;
}

.home-ai-msg-user {
    justify-content: flex-end;
}

.home-ai-bubble {
    max-width: 92%;
    border-radius: 14px;
    padding: 0.68rem 0.85rem;
    font-size: 0.92rem;
    line-height: 1.45;
    white-space: pre-wrap;
}

.home-ai-msg-assistant .home-ai-bubble {
    border: 1px solid #dbe8fb;
    background: #f4f8ff;
    color: var(--text-900);
}

.home-ai-msg-user .home-ai-bubble {
    border: 1px solid transparent;
    background: linear-gradient(132deg, var(--brand-600), var(--brand-500));
    color: #fff;
    box-shadow: 0 8px 16px rgba(11, 94, 215, 0.22);
}

.home-ai-msg-typing .home-ai-bubble {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.home-ai-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    display: inline-block;
    background: #6f87a7;
    animation: homeAiPulse 1.05s infinite ease-in-out;
}

.home-ai-dot:nth-child(2) {
    animation-delay: 0.15s;
}

.home-ai-dot:nth-child(3) {
    animation-delay: 0.3s;
}

@media (prefers-reduced-motion: no-preference) {
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    @keyframes slideUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    @keyframes slideLeft {
        from {
            opacity: 0;
            transform: translateX(20px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
    @keyframes slideRight {
        from {
            opacity: 0;
            transform: translateX(-20px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
    @keyframes scaleUp {
        from {
            opacity: 0;
            transform: scale(0.95);
        }
        to {
            opacity: 1;
            transform: scale(1);
        }
    }
    @keyframes popSpring {
        0% {
            opacity: 0;
            transform: scale(0.8);
        }
        70% {
            transform: scale(1.05);
        }
        100% {
            opacity: 1;
            transform: scale(1);
        }
    }
    @keyframes successIconIntro {
        0% {
            opacity: 0;
            transform: scale(0.5) rotate(-45deg);
        }
        70% {
            transform: scale(1.1) rotate(10deg);
        }
        100% {
            opacity: 1;
            transform: scale(1) rotate(0deg);
        }
    }
    @keyframes trackingCopyPulse {
        0%, 100% {
            transform: scale(1);
        }
        50% {
            transform: scale(1.03);
        }
    }
    @keyframes pulseBroadcast {
        0% {
            box-shadow: 0 0 0 0 rgba(21, 128, 61, 0.4);
        }
        70% {
            box-shadow: 0 0 0 8px rgba(21, 128, 61, 0);
        }
        100% {
            box-shadow: 0 0 0 0 rgba(21, 128, 61, 0);
        }
    }
    @keyframes shakeLogin {
        0%, 100% { transform: translateX(0); }
        10%, 30%, 50%, 70%, 90% { transform: translateX(-6px); }
        20%, 40%, 60%, 80% { transform: translateX(6px); }
    }
    @keyframes heroGradientScroll {
        0% {
            background-position: 0% 50%;
        }
        50% {
            background-position: 100% 50%;
        }
        100% {
            background-position: 0% 50%;
        }
    }
    @keyframes shieldRotateIntro {
        from {
            opacity: 0;
            transform: scale(0.8) rotate(-180deg);
        }
        to {
            opacity: 1;
            transform: scale(1) rotate(0deg);
        }
    }
    @keyframes floatHeroCard {
        0%, 100% {
            transform: translateY(0);
        }
        50% {
            transform: translateY(-8px);
        }
    }
    @keyframes chatWindowPop {
        from {
            opacity: 0;
            transform: scale(0.92) translateY(12px);
        }
        to {
            opacity: 1;
            transform: scale(1) translateY(0);
        }
    }
    @keyframes chatDotBounce {
        0%, 80%, 100% {
            transform: translateY(0);
            opacity: 0.4;
        }
        40% {
            transform: translateY(-6px);
            opacity: 1;
        }
    }
}

@keyframes homeAiPulse {
    0%,
    80%,
    100% {
        transform: scale(0.8);
        opacity: 0.35;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.home-ai-prompts .btn {
    font-size: 0.78rem;
    letter-spacing: 0;
    padding: 0.38rem 0.68rem;
}

.home-ai-form .form-control {
    background: #fff;
}

/* ==========================================================================
   Submit Page
   ========================================================================== */
.submit-page-shell {
    background:
        radial-gradient(circle at 8% 12%, rgba(47, 127, 246, 0.11), rgba(47, 127, 246, 0) 34%),
        radial-gradient(circle at 91% 86%, rgba(18, 185, 129, 0.12), rgba(18, 185, 129, 0) 36%),
        linear-gradient(180deg, #f4f8ff 0%, #edf4ff 100%);
}

.submit-hero-card {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 82% 22%, rgba(18, 185, 129, 0.12), rgba(18, 185, 129, 0) 42%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.97), rgba(245, 250, 255, 0.96));
    box-shadow: var(--shadow-md);
}

.submit-hero-kicker {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(11, 94, 215, 0.25);
    background: rgba(11, 94, 215, 0.1);
    color: var(--brand-700);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
    padding: 0.35rem 0.8rem;
}

.submit-hero-stats {
    display: grid;
    gap: 0.55rem;
}

.submit-hero-stat {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    border: 1px solid #d9e7fb;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.93);
    padding: 0.55rem 0.72rem;
    color: var(--text-700);
    font-size: 0.88rem;
    font-weight: 700;
}

.submit-hero-stat i {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(11, 94, 215, 0.1);
    color: var(--brand-600);
}

.submit-form-card {
    overflow: hidden;
}

.submit-form-header {
    background: linear-gradient(130deg, #0f5bcb, #1f74ed) !important;
}

.submit-block {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem;
}

.submit-progress-track {
    background: #e0ebfb;
}

.submit-ai-card {
    background: linear-gradient(180deg, rgba(244, 249, 255, 0.95), rgba(239, 246, 255, 0.96));
}

.submit-ai-response {
    white-space: pre-wrap;
    max-height: 280px;
    overflow-y: auto;
}

.submit-privacy-notice {
    border-style: dashed;
}

.submit-side-card {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-sm);
    padding: 1rem;
}

.submit-side-sticky {
    position: sticky;
    top: 98px;
}

.submit-side-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.55rem;
    padding-bottom: 0.52rem;
    margin-bottom: 0.52rem;
    border-bottom: 1px dashed #dce7f7;
}

.submit-side-item:last-of-type {
    border-bottom: 0;
    padding-bottom: 0;
    margin-bottom: 0;
}

.submit-checklist {
    padding-left: 1.15rem;
    display: grid;
    gap: 0.5rem;
}

.submit-step-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
}

.submit-step {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    background: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-500);
}

.submit-step span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    background: var(--bg-surface-alt);
    font-size: 0.75rem;
}

.submit-step.is-active {
    border-color: var(--brand-600);
    color: var(--brand-700);
    background: #eef8ef;
}

.submit-step.is-active span {
    background: var(--brand-600);
    color: #fff;
}

.submission-summary-card {
    border: 1px solid var(--border-soft) !important;
}

.chart-canvas-wrap.is-loading {
    position: relative;
    min-height: 220px;
}

.chart-canvas-wrap.is-loading canvas {
    opacity: 0.35;
}

.submit-checklist li {
    color: var(--text-700);
    font-size: 0.9rem;
}

/* ==========================================================================
   Components
   ========================================================================== */
.card,
.process-card,
.dept-card {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-sm);
    background: var(--bg-surface);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover,
.process-card:hover,
.dept-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.process-icon {
    width: 76px;
    height: 76px;
}

.dept-card {
    border-top: 3px solid rgba(11, 94, 215, 0.3);
}

.feature-icon {
    border: 1px solid var(--border-soft);
}

.cta-card {
    background: linear-gradient(145deg, #153f6d 0%, #0f5fad 48%, #119d86 100%);
    box-shadow: var(--shadow-lg);
}

.cta-badge {
    display: inline-block;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    color: #f3f9ff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
    padding: 0.35rem 0.75rem;
}

/* ==========================================================================
   Login Page
   ========================================================================== */
.login-shell {
    background:
        radial-gradient(circle at 0% 15%, rgba(47, 127, 246, 0.12), rgba(47, 127, 246, 0) 35%),
        radial-gradient(circle at 100% 85%, rgba(18, 185, 129, 0.12), rgba(18, 185, 129, 0) 35%);
}

.login-wrap {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-soft);
    background: #fff;
}

.login-info-panel {
    display: flex;
    flex-direction: column;
    background: linear-gradient(155deg, #102c4a 0%, #11406d 55%, #0f587f 100%);
    color: #f4f8ff;
}

.login-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.12);
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.login-info-grid {
    display: grid;
    gap: 0.95rem;
}

.login-info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.08);
}

.login-info-item i {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.14);
}

.login-info-item h6 {
    color: #fff;
}

.login-info-item p {
    color: rgba(234, 245, 255, 0.86);
    font-size: 0.87rem;
}

.login-form-panel {
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.login-logo {
    width: 62px;
    height: 62px;
    margin: 0 auto;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #fff;
    background: linear-gradient(130deg, var(--brand-600), var(--accent-500));
    box-shadow: 0 10px 24px rgba(11, 94, 215, 0.26);
}

.login-form .input-group-text {
    background: #eef4ff;
}

.login-form .btn-outline-secondary {
    border-color: #d4def0;
}

.mini-tip {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.7rem;
    font-size: 0.85rem;
    background: #fff;
}

/* ==========================================================================
   Dashboard
   ========================================================================== */
.dashboard-shell {
    background: transparent;
}

.dashboard-hero {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft);
    background: linear-gradient(155deg, #ffffff, #f1f7ff);
    box-shadow: var(--shadow-md);
}

.dashboard-live {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(22, 163, 74, 0.32);
    background: rgba(22, 163, 74, 0.12);
    font-size: 0.86rem;
    font-weight: 700;
    padding: 0.4rem 0.85rem;
}

.dashboard-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(11, 94, 215, 0.28);
    background: rgba(11, 94, 215, 0.1);
    color: var(--brand-700);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
    padding: 0.35rem 0.8rem;
}

.dashboard-pills {
    gap: 0.5rem !important;
}

.dashboard-mini-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid #d6e6fa;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-700);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.35rem 0.72rem;
}

.dashboard-actions {
    border-radius: var(--radius-md);
    border: 1px solid #dbe8fb;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-sm);
}

.dashboard-updated {
    color: var(--text-500);
}

.dashboard-filter-card {
    border-style: dashed;
    border-color: #d6e4fa;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 255, 0.95));
}

.dashboard-filter-actions .btn {
    min-width: 90px;
}

.metric-card {
    height: 100%;
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    text-align: center;
    padding: 1.5rem 1rem;
}

.metric-card-left {
    text-align: left;
    padding: 1.05rem 0.95rem;
}

.metric-card-left .metric-icon {
    margin: 0 0 0.65rem;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    font-size: 1.12rem;
}

.metric-label {
    color: var(--text-500);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.metric-value {
    color: var(--brand-700);
}

.metric-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    margin: 0 auto 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.dashboard-insight {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-sm);
    padding: 1rem;
}

.dashboard-insight-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.34rem 0;
    border-bottom: 1px dashed #deebfa;
}

.dashboard-insight-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.dashboard-insight-title {
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
    margin-bottom: 0.45rem;
}

.dashboard-insight-value {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.dashboard-insight-danger {
    border-color: rgba(239, 68, 68, 0.25);
    background: linear-gradient(180deg, rgba(255, 248, 248, 0.96), rgba(255, 242, 242, 0.95));
}

.dashboard-insight-danger .dashboard-insight-title {
    color: #b91c1c;
}

.dashboard-insight-neutral {
    border-color: rgba(100, 116, 139, 0.28);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.97), rgba(241, 245, 249, 0.95));
}

.dashboard-insight-neutral .dashboard-insight-title {
    color: #475569;
}

.dashboard-insight-success {
    border-color: rgba(16, 185, 129, 0.28);
    background: linear-gradient(180deg, rgba(245, 255, 251, 0.97), rgba(236, 253, 245, 0.95));
}

.dashboard-insight-success .dashboard-insight-title {
    color: #047857;
}

.dashboard-insight-warning {
    border-color: rgba(245, 158, 11, 0.3);
    background: linear-gradient(180deg, rgba(255, 251, 235, 0.98), rgba(255, 247, 219, 0.96));
}

.dashboard-insight-warning .dashboard-insight-title {
    color: #b45309;
}

.chart-card {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.chart-canvas-wrap {
    position: relative;
    min-height: 300px;
}

.chart-canvas-wrap-short {
    min-height: 230px;
}

.chart-canvas-wrap canvas {
    position: relative;
    z-index: 1;
    width: 100% !important;
    height: 100% !important;
}

.chart-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-700);
    font-size: 0.95rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 251, 255, 0.95));
    z-index: 2;
}

.chart-error {
    color: #9f1239;
    background: linear-gradient(180deg, rgba(255, 241, 242, 0.95), rgba(255, 228, 230, 0.95));
}

.chart-empty-hint {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-6);
    color: var(--neutral-600, var(--neutral-700));
    font-size: var(--text-sm);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 250, 251, 0.98));
    z-index: 3;
}

.how-it-timeline {
    position: relative;
    margin: 0;
    padding: 0 0 0 3rem;
    list-style: none;
}

.how-it-timeline::before {
    content: '';
    position: absolute;
    left: 1.15rem;
    top: 0.35rem;
    bottom: 0.35rem;
    width: 3px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--gov-green-light), var(--gov-green));
    opacity: 0.85;
}

.how-it-step {
    position: relative;
    padding-bottom: var(--space-8);
}

.how-it-step:last-child {
    padding-bottom: 0;
}

.how-it-step-icon {
    position: absolute;
    left: -3rem;
    top: 0;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gov-green);
    color: var(--white);
    font-size: 1.1rem;
    box-shadow: 0 0 0 4px var(--white), 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 1;
}

.how-it-step-body {
    background: var(--white);
    border: 1px solid var(--neutral-300);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
}

.how-it-step-title {
    font-size: var(--text-lg);
    font-weight: var(--fw-bold);
    color: var(--gov-navy);
    margin-bottom: var(--space-2);
}

.admin-zero-stats-callout {
    border: 1px dashed var(--neutral-300);
    border-radius: var(--radius-lg);
    background: var(--gov-green-light);
    padding: var(--space-5);
    margin-bottom: var(--space-5);
}

.admin-zero-stats-callout h2 {
    font-size: var(--text-lg);
    color: var(--gov-navy);
    margin-bottom: var(--space-2);
}

.admin-zero-stats-callout code {
    font-size: var(--text-sm);
    word-break: break-all;
}

.dept-rank-card {
    border: 1px solid #dce8f9;
    border-radius: var(--radius-md);
    background: linear-gradient(175deg, rgba(255, 255, 255, 0.96), rgba(244, 249, 255, 0.95));
    box-shadow: var(--shadow-sm);
    padding: 0.9rem;
}

.dept-rank-head {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
}

.dept-rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    border-radius: 999px;
    border: 1px solid rgba(11, 94, 215, 0.24);
    background: rgba(11, 94, 215, 0.09);
    color: var(--brand-700);
    font-size: 0.74rem;
    font-weight: 800;
    padding: 0.2rem 0.58rem;
}

.dept-rank-stat {
    border: 1px solid #e2ebf9;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.45rem 0.3rem;
}

.dept-rank-stat-success {
    border-color: rgba(16, 185, 129, 0.28);
    background: rgba(236, 253, 245, 0.7);
}

.dept-rank-stat-danger {
    border-color: rgba(239, 68, 68, 0.28);
    background: rgba(254, 242, 242, 0.7);
}

/* ==========================================================================
   Geo Heatmap
   ========================================================================== */
.geo-heatmap-hero {
    border: 1px solid #d8e6fb !important;
    background: linear-gradient(125deg, #f8fbff 0%, #eef5ff 56%, #f7fbff 100%);
}

.geo-hero-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.geo-hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #d6e4fa;
    color: var(--text-700);
    font-size: 0.82rem;
    font-weight: 700;
}

.geo-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px dashed #dce8f9;
}

.geo-stat-row.mb-0 {
    border-bottom: 0;
    padding-bottom: 0;
}

.geo-legend-row {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.geo-legend-row.mb-0 {
    margin-bottom: 0;
}

.geo-heatmap-container {
    width: 100%;
    min-height: 600px;
    border-radius: var(--radius-md);
}

.geo-heatmap-state {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-700);
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    z-index: 650;
}

.geo-heatmap-error {
    color: #9f1239;
    background: rgba(255, 241, 242, 0.95);
}

.geo-heatmap-info {
    color: var(--neutral-700);
    background: rgba(243, 244, 246, 0.96);
}

.geo-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 999px;
}

.geo-local-basemap-tile {
    position: relative;
    width: 256px;
    height: 256px;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(26, 43, 74, 0.055) 1px, transparent 1px),
        linear-gradient(180deg, rgba(26, 43, 74, 0.055) 1px, transparent 1px),
        linear-gradient(135deg, #e9f4fb 0%, #f6fbff 52%, #e5f2f8 100%);
    background-size: 64px 64px, 64px 64px, auto;
    border-right: 1px solid rgba(26, 43, 74, 0.06);
    border-bottom: 1px solid rgba(26, 43, 74, 0.06);
}

.geo-local-basemap-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 26%, rgba(255, 255, 255, 0.45), transparent 34%),
        radial-gradient(circle at 70% 70%, rgba(0, 107, 60, 0.045), transparent 28%);
    pointer-events: none;
}

.geo-local-grid-line {
    position: absolute;
    background: rgba(26, 43, 74, 0.08);
}

.geo-local-grid-line-x {
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
}

.geo-local-grid-line-y {
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
}

.geo-local-grid-label {
    position: absolute;
    right: 8px;
    bottom: 7px;
    z-index: 1;
    color: rgba(26, 43, 74, 0.48);
    font-family: var(--font-mono);
    font-size: 10px;
    background: rgba(255, 255, 255, 0.72);
    border-radius: var(--radius-sm);
    padding: 1px 5px;
}

.geo-location-label {
    pointer-events: none;
}

.geo-location-label span,
.geo-location-label strong {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    white-space: nowrap;
}

.geo-location-label span {
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 5px 8px;
    border: 1px solid rgba(26, 43, 74, 0.16);
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-sm);
    color: var(--gov-navy);
    font-size: var(--text-xs);
    font-weight: var(--fw-semibold);
}

.geo-location-label strong {
    min-width: 20px;
    height: 20px;
    justify-content: center;
    margin-left: -6px;
    border-radius: var(--radius-full);
    background: var(--gov-saffron);
    color: var(--white);
    font-size: 10px;
    box-shadow: var(--shadow-sm);
}

.geo-heatmap-container.geo-local-basemap-active {
    background:
        radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.72), transparent 30%),
        radial-gradient(circle at 78% 78%, rgba(0, 107, 60, 0.08), transparent 28%),
        linear-gradient(135deg, #e8f2f8 0%, #f7fbff 50%, #e5f2f8 100%);
}

.geo-heatmap-container.geo-local-basemap-active::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(26, 43, 74, 0.055) 1px, transparent 1px),
        linear-gradient(180deg, rgba(26, 43, 74, 0.055) 1px, transparent 1px);
    background-size: 80px 80px;
}

.geo-local-status-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 3px 8px;
    border-radius: var(--radius-full);
    background: rgba(255, 240, 230, 0.92);
    border: 1px solid rgba(255, 98, 0, 0.24);
    color: var(--gov-navy);
    font-size: 11px;
    font-weight: var(--fw-semibold);
}

.geo-india-outline {
    filter: drop-shadow(0 6px 12px rgba(26, 43, 74, 0.08));
}

.geo-india-state-line {
    mix-blend-mode: multiply;
}

.geo-india-map-label {
    pointer-events: none;
}

.geo-india-map-label span {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: 3px 7px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(26, 43, 74, 0.1);
    color: rgba(26, 43, 74, 0.76);
    font-size: 10px;
    font-weight: var(--fw-semibold);
    box-shadow: 0 1px 2px rgba(26, 43, 74, 0.08);
}

.geo-india-map-label-country span {
    padding: 5px 12px;
    background: rgba(255, 240, 230, 0.9);
    border-color: rgba(255, 98, 0, 0.22);
    color: var(--gov-navy);
    font-size: var(--text-sm);
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.geo-india-map-label-water span {
    background: rgba(232, 245, 238, 0.58);
    border-color: rgba(0, 107, 60, 0.12);
    color: rgba(0, 107, 60, 0.62);
    font-style: italic;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 700;
    letter-spacing: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(130deg, var(--brand-600), var(--brand-500));
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(11, 94, 215, 0.28);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(130deg, #0954c2, #256ef0);
    border-color: transparent;
}

.btn-outline-primary {
    border-color: rgba(11, 94, 215, 0.38);
    color: var(--brand-700);
}

.btn-outline-primary:hover {
    background: rgba(11, 94, 215, 0.08);
    color: var(--brand-800);
    border-color: rgba(11, 94, 215, 0.48);
}

.btn-audit-warning {
    color: var(--status-pending);
    border: 1.5px solid var(--status-pending);
    background: var(--status-pending-bg);
    box-shadow: none;
}

.btn-audit-warning:hover,
.btn-audit-warning:focus {
    color: var(--white);
    background: var(--status-pending);
    border-color: var(--status-pending);
}

/* ==========================================================================
   Forms
   ========================================================================== */
.form-control,
.form-select {
    border-radius: var(--radius-sm);
    border: 1px solid #d9e5f8;
    padding: 0.65rem 0.95rem;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(11, 94, 215, 0.58);
    box-shadow: 0 0 0 3px rgba(11, 94, 215, 0.14);
}

.input-group-text {
    background-color: #f5f9ff;
    border-color: #d9e5f8;
}

/* ==========================================================================
   Badges and Status
   ========================================================================== */
.badge {
    font-weight: 700;
    border-radius: 999px;
    padding: 0.45em 0.7em;
}

.badge-pending,
.bg-badge-pending {
    background-color: var(--warning-500) !important;
    color: #1f2937 !important;
}

.badge-review,
.bg-badge-review {
    background-color: var(--info-500) !important;
    color: #fff !important;
}

.badge-action,
.bg-badge-action {
    background-color: var(--brand-600) !important;
    color: #fff !important;
}

.badge-delayed,
.bg-badge-delayed {
    background-color: var(--danger-500) !important;
    color: #fff !important;
}

.badge-reopened,
.bg-badge-reopened {
    background-color: #64748b !important;
    color: #fff !important;
}

.badge-closed,
.bg-badge-closed {
    background-color: var(--accent-500) !important;
    color: #fff !important;
}

/* ==========================================================================
   Tables and Alerts
   ========================================================================== */
.table {
    font-size: 0.93rem;
}

.table th {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.73rem;
    letter-spacing: 0;
    color: var(--text-500);
}

.table-hover tbody tr:hover {
    background-color: rgba(11, 94, 215, 0.04);
}

.alert {
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
}

.alert-info {
    background-color: rgba(6, 182, 212, 0.11);
    border-color: rgba(6, 182, 212, 0.26);
    color: #0d7490;
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.27);
    color: #975a16;
}

/* ==========================================================================
   Tracking and Progress
   ========================================================================== */
.tracking-id {
    font-family: "Courier New", monospace;
    letter-spacing: 0;
}

.tracking-card {
    background: linear-gradient(135deg, #f8fbff, #eaf2ff);
    border: 2px dashed rgba(11, 94, 215, 0.5);
}

.sitemap-section {
    border-left: 4px solid var(--india-green);
    background: #ffffff;
    padding: 1rem;
}

.progress {
    border-radius: 999px;
    background-color: #e1ebfa;
}

.progress-bar {
    border-radius: 999px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    color: #f4f8ff;
    background: #14241a;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-muted {
    color: #d2ded4 !important;
}

.footer-emblem {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-right: 0.5rem;
    border-radius: 50%;
    background: #fff7e9;
    color: #7a4f02;
    font-size: 0.68rem;
    font-weight: 800;
    vertical-align: middle;
}

.footer-meta li + li {
    margin-top: 0.35rem;
}

.footer-links li + li {
    margin-top: 0.45rem;
}

.footer-links a,
.footer-link {
    color: #e3efe5;
    text-decoration: none;
}

.footer-links a:hover,
.footer-link:hover {
    color: #ffffff !important;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid rgba(226, 236, 226, 0.22);
}

.footer-pill {
    background: rgba(255, 255, 255, 0.11);
    color: #e9f4ff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   Utilities
   ========================================================================== */
.min-vh-75 {
    min-height: 75vh;
}

.bg-gradient-primary {
    background: linear-gradient(130deg, var(--brand-600), var(--brand-500));
}

.text-gradient {
    background: linear-gradient(130deg, var(--brand-700), var(--accent-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================================================
   Reveal Animations
   ========================================================================== */
[data-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    will-change: opacity, transform;
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Critical layouts: never keep hero/dashboard tiles invisible if reveal JS fails */
.home-hero-v2 [data-reveal],
.dashboard-shell [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
}

/* ==========================================================================
   Print
   ========================================================================== */
@media print {
    .gov-header,
    .navbar,
    .site-footer,
    .btn,
    .breadcrumb,
    .alert {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
        font-size: 12pt;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 90%;
    }

    .card {
        box-shadow: none;
        border: 1px solid #d4dce8;
    }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 991px) {
    .hero-section {
        min-height: auto;
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    .display-4 {
        font-size: 2.2rem;
    }

    .site-nav .navbar-collapse {
        margin-top: 0.8rem;
        padding: 0.9rem;
        border-radius: var(--radius-md);
        border: 1px solid rgba(255, 255, 255, 0.17);
        background: #183821;
    }

    .nav-cta-btn,
    .nav-ghost-btn {
        width: 100%;
        margin-top: 0.45rem;
    }

    .chart-canvas-wrap {
        min-height: 260px;
    }

    .dashboard-actions {
        margin-top: 0.3rem;
    }

    .dashboard-pill {
        font-size: 0.7rem;
    }

    .dashboard-filter-actions .btn {
        width: 100%;
    }

    .login-wrap {
        border-radius: var(--radius-md);
    }

    .geo-heatmap-container {
        min-height: 460px;
    }

    .geo-hero-pills {
        gap: 0.4rem;
    }

    .home-ai-thread {
        max-height: 280px;
    }

    .submit-side-sticky {
        position: static;
    }
}

@media (max-width: 575px) {
    .national-emblem {
        width: 62px;
        min-width: 62px;
        min-height: 62px;
    }

    .gov-brand {
        align-items: flex-start;
    }

    .gov-helpline-panel {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .display-4 {
        font-size: 1.95rem;
    }

    .mobile-data-page {
        padding-top: 1rem !important;
        padding-bottom: 1.25rem !important;
    }

    .mobile-data-page .container {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    .mobile-data-page .mb-5 {
        margin-bottom: 1.1rem !important;
    }

    .mobile-data-page .mb-4 {
        margin-bottom: 0.85rem !important;
    }

    .mobile-data-page .card-header {
        padding: 0.65rem 0.8rem !important;
    }

    .mobile-data-page .card-body {
        padding: 0.75rem 0.8rem;
    }

    .mobile-data-page .card-body.p-0 {
        padding: 0 !important;
    }

    .mobile-data-page .card:hover {
        transform: none;
        box-shadow: var(--shadow-sm);
    }

    .mobile-data-page .alert {
        padding: 0.55rem 0.65rem;
        font-size: 0.83rem;
    }

    .mobile-data-page .mobile-data-table {
        font-size: 0.82rem;
    }

    .mobile-data-page .mobile-data-table thead {
        display: none;
    }

    .mobile-data-page .mobile-data-table th,
    .mobile-data-page .mobile-data-table td {
        padding: 0.42rem 0.6rem;
        vertical-align: middle;
        border: 0;
    }

    .mobile-data-page .mobile-data-table code {
        font-size: 0.74rem;
    }

    .mobile-data-page .mobile-data-table tbody {
        display: block;
    }

    .mobile-data-page .mobile-data-table tr {
        display: block;
        background: #ffffff;
        border: 1px solid var(--border-soft);
        border-radius: var(--radius-md);
        padding: 0.25rem 0.5rem 0.5rem;
        margin-bottom: 0.75rem;
        box-shadow: var(--shadow-sm);
    }

    .mobile-data-page .mobile-data-table tr:last-child {
        margin-bottom: 0;
    }

    .mobile-data-page .mobile-data-table td {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 0.18rem 0.75rem;
        align-items: center;
    }

    .mobile-data-page .mobile-data-table td .badge-status {
        justify-self: start;
    }

    .mobile-data-page .mobile-data-table td::before {
        content: attr(data-label);
        color: var(--text-500);
        font-size: 0.73rem;
        font-weight: 600;
    }

    .mobile-data-page .mobile-data-table td:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }

    .mobile-data-page .mobile-data-table .d-none.d-md-table-cell,
    .mobile-data-page .mobile-data-table .d-none.d-lg-table-cell,
    .mobile-data-page .mobile-data-table .d-none.d-xl-table-cell {
        display: block !important;
    }

    /* Only hide responsive utility on table cells, not inner spans (e.g. submitted date) */
    .mobile-data-page .mobile-data-table > tbody > tr > td.d-md-none,
    .mobile-data-page .mobile-data-table > tbody > tr > td.d-lg-none,
    .mobile-data-page .mobile-data-table > tbody > tr > td.d-xl-none {
        display: none !important;
    }

    .mobile-data-page .mobile-data-table .btn-group {
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 0.35rem;
    }

    .mobile-data-page .mobile-data-table .table-empty-state td {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 0.2rem;
        color: var(--text-500);
        padding: 0.8rem 0.35rem 0.5rem;
    }

    .mobile-data-page .mobile-data-table .table-empty-state td::before {
        content: none;
    }

    .mobile-data-page .mobile-compact-list .list-group-item {
        padding: 0.6rem 0.75rem;
    }

    .mobile-data-page .pagination .page-link {
        padding: 0.3rem 0.55rem;
        font-size: 0.78rem;
    }

    .mobile-data-page h4 {
        font-size: 1.1rem;
    }

    .mobile-data-page .badge.fs-6 {
        font-size: 0.72rem !important;
        padding: 0.35rem 0.55rem !important;
    }

    .mobile-data-page .btn-sm {
        font-size: 0.76rem;
    }

    .trust-chip {
        width: 100%;
        justify-content: center;
    }

    .metric-card {
        padding: 1.25rem 0.9rem;
    }

    .chart-canvas-wrap,
    .chart-canvas-wrap-short {
        min-height: 230px;
    }

    .mobile-data-page .chart-canvas-wrap,
    .mobile-data-page .chart-canvas-wrap-short {
        min-height: 185px;
    }

    .geo-heatmap-container {
        min-height: 360px;
    }

    .geo-hero-pill {
        width: 100%;
        justify-content: space-between;
    }

    .home-ai-prompts .btn {
        width: 100%;
    }

    .home-ai-bubble {
        max-width: 100%;
    }

    .dashboard-mini-pill {
        width: 100%;
        justify-content: flex-start;
    }

    .metric-card-left {
        text-align: center;
    }

    .metric-card-left .metric-icon {
        margin: 0 auto 0.65rem;
    }

    .mobile-data-page .metric-card {
        padding: 0.9rem 0.7rem;
    }

    .mobile-data-page .metric-card small {
        font-size: 0.72rem;
    }

    .mobile-data-page .metric-value {
        font-size: 1.2rem;
    }

    .dashboard-filter-actions .btn {
        min-width: 0;
    }

    .dashboard-filter-actions.d-sm-flex .btn {
        width: 100%;
    }

    .submit-hero-card h1,
    .submit-hero-card h2 {
        font-size: 1.95rem;
    }

    .submit-block {
        padding: 0.85rem;
    }

    .submit-hero-stat {
        font-size: 0.84rem;
    }

    .gov-topbar {
        padding-top: 0.35rem;
        padding-bottom: 0.35rem;
    }

    .gov-brand-strip {
        padding-top: 0.65rem;
        padding-bottom: 0.65rem;
    }

    .gov-brand-title {
        font-size: clamp(1rem, 4.5vw, 1.25rem);
    }

    .national-emblem {
        width: 3.1rem;
        height: 3.1rem;
    }

    .geo-heatmap-layout {
        display: flex;
        flex-direction: column;
    }

    .geo-heatmap-map-col {
        order: 1;
    }

    .geo-heatmap-side-col {
        order: 2;
    }

    .geo-heatmap-container {
        min-height: 320px;
    }

    .geo-heatmap-hero .geo-hero-pills {
        margin-bottom: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
/* ==========================================================================
   Civik India UI/UX Upgrade Layer
   ========================================================================== */

.gov-header-v2 {
  background: var(--white);
  z-index: 1020;
}

.gov-identity-bar {
  min-height: 36px;
  background: var(--gov-navy);
  color: var(--white);
  font-size: var(--text-sm);
}

.gov-identity-bar .container {
  min-height: 36px;
}

.gov-identity-left {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}

.gov-emblem {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: var(--radius-full);
  font-size: 9px;
  font-weight: var(--fw-bold);
}

.identity-separator {
  opacity: 0.5;
}

.gov-language-pills {
  display: inline-flex;
  gap: var(--space-1);
  align-items: center;
}

.gov-language-pills a {
  color: var(--white);
  text-decoration: none;
  border-radius: var(--radius-full);
  padding: 2px 8px;
  font-weight: var(--fw-semibold);
  opacity: 0.75;
}

.gov-language-pills a.active {
  opacity: 1;
  box-shadow: inset 0 -2px 0 var(--gov-saffron);
}

.portal-header {
  position: sticky;
  top: 0;
  background: var(--white);
  border-bottom: 1px solid var(--neutral-300);
  box-shadow: var(--shadow-sm);
  z-index: 1019;
}

@media (prefers-reduced-motion: no-preference) {
  .portal-header, .site-nav, .portal-nav {
    animation: slideDown var(--transition-slow) forwards;
  }
}

.portal-header-inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 260px;
  text-decoration: none;
}

.portal-shield,
.footer-shield {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius-lg);
  background: var(--gov-green);
  color: var(--white);
  font-size: 1.5rem;
  flex: 0 0 auto;
}

.brand-logo-shell {
  background: var(--white);
  border: 1px solid rgba(26, 43, 74, 0.16);
  border-radius: var(--radius-full);
  overflow: hidden;
  padding: 2px;
  box-shadow: var(--shadow-sm);
}

.brand-logo-shell img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: var(--radius-full);
}

.portal-shield.large {
  width: 72px;
  height: 72px;
  font-size: 2.25rem;
  background: rgba(255,255,255,0.14);
}

.portal-shield.large.brand-logo-shell {
  background: var(--white);
  padding: 3px;
}

.portal-copy {
  display: grid;
  gap: 1px;
}

.portal-title {
  color: var(--gov-navy);
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  line-height: 1.2;
}

.portal-title-hi {
  color: var(--gov-saffron);
  font-size: var(--text-sm);
}

.portal-subtitle {
  color: var(--neutral-500);
  font-size: var(--text-xs);
}

.portal-helplines {
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--neutral-700);
  white-space: nowrap;
}

.portal-helplines .sep {
  color: var(--neutral-300);
}

.portal-helplines-inline {
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--neutral-600, var(--neutral-700));
  white-space: normal;
}

.portal-helplines-inline strong {
  color: var(--gov-navy);
}

@media (min-width: 768px) {
  .portal-header-inner {
    flex-wrap: wrap;
    row-gap: var(--space-2);
  }

  .portal-nav.collapse.d-md-flex {
    flex: 1 1 100%;
    width: 100%;
    justify-content: flex-start;
    border-top: 1px solid var(--neutral-200);
    margin-top: var(--space-1);
    padding-top: var(--space-2);
  }

  .portal-nav-list {
    flex-wrap: wrap;
    width: 100%;
    justify-content: flex-start;
    row-gap: var(--space-1);
  }
}

/* v2 hardening: tokens must win over older Bootstrap-era focus styles. */
.form-control:focus,
.form-select:focus,
.input-group:focus-within .form-control,
.input-group:focus-within .input-group-text {
  border-color: var(--gov-green) !important;
  box-shadow: 0 0 0 3px rgba(0, 107, 60, 0.12) !important;
  outline: none !important;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.dropdown-item:focus-visible {
  outline: 3px solid rgba(0, 107, 60, 0.34) !important;
  outline-offset: 2px !important;
  box-shadow: none !important;
}

.badge,
.badge-status,
.badge-role-admin,
.badge-role-officer {
  display: inline-flex !important;
  width: auto !important;
  max-width: max-content !important;
  align-items: center;
}

.mobile-helplines summary {
  list-style: none;
  color: var(--gov-green);
  font-weight: var(--fw-semibold);
  cursor: pointer;
}

.mobile-helplines summary::-webkit-details-marker {
  display: none;
}

.mobile-helplines div {
  position: absolute;
  right: var(--space-4);
  top: 72px;
  background: var(--white);
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--space-3);
  display: grid;
  gap: var(--space-2);
  z-index: 20;
}

.portal-menu-toggle {
  border: 1px solid var(--neutral-300);
  background: var(--white);
  color: var(--gov-navy);
  border-radius: var(--radius-md);
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  font-size: 1.4rem;
}

.portal-nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
  margin: 0;
}

.portal-nav-list a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--neutral-700);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  padding: 8px 10px;
  border-radius: var(--radius-md);
  border-bottom: 2px solid transparent;
}

.portal-nav-list a:hover {
  color: var(--gov-green);
  border-bottom-color: var(--gov-saffron);
}

.portal-nav-list a.active {
  background: var(--gov-green);
  color: var(--white) !important;
  border-bottom: 0;
}

.portal-nav-list a.active:hover {
  background: var(--gov-green-mid);
  color: var(--white) !important;
}

.drawer-helplines {
  padding: var(--space-4);
  border-top: 1px solid var(--neutral-300);
  color: var(--neutral-700);
}

.gov-footer {
  background: var(--white);
  color: var(--neutral-700);
}

.gov-footer-top {
  padding: var(--space-8) 0;
  background: var(--white);
  border-top: 1px solid var(--neutral-300);
}

.gov-footer-top h2 {
  color: var(--gov-navy);
}

.footer-helpline {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-4);
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-md);
  background: var(--neutral-50);
}

.footer-helpline span {
  font-size: var(--text-xs);
  color: var(--neutral-500);
  text-transform: uppercase;
  font-weight: var(--fw-semibold);
}

.footer-helpline strong {
  color: var(--gov-navy);
  font-size: var(--text-sm);
  line-height: 1.35;
  word-break: break-word;
}

.footer-brand-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
}

.footer-brand-links a {
  color: var(--gov-green);
  font-weight: var(--fw-semibold);
  text-decoration: none;
}

.footer-brand-links a:hover {
  color: var(--gov-green-mid);
  text-decoration: underline;
}

.footer-disclaimer {
  max-width: 42rem;
  color: var(--neutral-700);
  font-size: var(--text-sm);
}

.gov-footer-links {
  padding: var(--space-8) 0;
  background: var(--neutral-50);
  border-top: 1px solid var(--neutral-300);
}

.gov-footer-links h3 {
  font-size: var(--text-sm);
  color: var(--gov-navy);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.gov-footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-2);
  font-size: var(--text-sm);
}

.gov-footer-links a {
  color: var(--neutral-700);
  text-decoration: none;
}

.gov-footer-links a:hover {
  color: var(--gov-green);
  text-decoration: underline;
}

.gov-footer-bottom {
  background: var(--gov-navy);
  color: var(--white);
  padding: var(--space-3) 0;
  font-size: var(--text-sm);
}

.home-hero-v2 {
  min-height: 85vh;
  display: flex;
  align-items: center;
  padding: var(--space-16) 0;
  background: linear-gradient(-45deg, var(--gov-navy) 0%, var(--gov-navy-mid) 50%, var(--gov-green) 100%);
  background-size: 400% 400%;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  .home-hero-v2 {
    animation: heroGradientScroll 15s ease infinite;
  }
}

.home-hero-v2 > .container {
  position: relative;
  z-index: 1;
}

.home-hero-v2 h1 {
  color: var(--white);
  font-size: var(--text-4xl);
  line-height: 1.1;
  margin: var(--space-4) 0;
}

.home-hero-v2 h1 span {
  display: block;
}

.home-hero-v2 .hero-accent {
  color: var(--gov-saffron);
}

.hero-subtitle {
  color: rgba(255,255,255,0.86);
  font-size: var(--text-lg);
  max-width: 520px;
}

.hero-kicker,
.hero-trust-pills span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.12);
  color: var(--white);
  padding: 6px var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
}

.hero-trust-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-5) 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.hero-primary,
.hero-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 52px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-weight: var(--fw-semibold);
  text-decoration: none;
  transition: background var(--transition-fast), transform var(--transition-spring-btn), box-shadow var(--transition-fast);
}

.hero-primary {
  background: var(--gov-saffron);
  color: var(--white) !important;
}

.hero-primary:hover,
.hero-primary:focus {
  background: var(--gov-saffron-light) !important;
  color: var(--gov-saffron) !important;
  transform: scale(1.04);
}

.hero-secondary {
  border: 2px solid rgba(255,255,255,0.8);
  color: var(--white) !important;
}

.hero-secondary:hover,
.hero-secondary:focus {
  background: rgba(255, 255, 255, 0.15) !important;
  transform: scale(1.04);
}

.home-hero-v2 .hero-kicker,
.home-hero-v2 .hero-trust-pills span,
.home-hero-v2 .hero-subtitle,
.home-hero-v2 .hero-actions,
.home-hero-v2 .hero-stats-grid {
  opacity: 1;
  visibility: visible;
}

.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
  max-width: 620px;
}

.hero-stats-grid div,
.hero-service-card {
  background: rgba(255,255,255,0.96);
  color: var(--neutral-900);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.hero-stats-grid div {
  padding: var(--space-3);
  display: grid;
  gap: var(--space-1);
}

.hero-stats-grid strong {
  font-size: var(--text-2xl);
  color: var(--gov-navy);
}

.hero-stats-grid span {
  font-size: var(--text-xs);
  color: var(--neutral-700);
}

.hero-service-card {
  padding: var(--space-8);
}

.home-hero-v2 .hero-service-card h2,
.home-hero-v2 .hero-service-card .text-uppercase,
.home-hero-v2 .hero-service-card .small {
  color: var(--neutral-900);
}

.home-hero-v2 .hero-service-card .text-muted {
  color: var(--neutral-700) !important;
}

.mini-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.mini-metrics div {
  background: var(--neutral-50);
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}

.mini-metrics span {
  display: block;
  font-size: var(--text-xs);
  color: var(--neutral-500);
}

.mini-metrics strong {
  font-size: var(--text-xl);
  color: var(--gov-navy);
}

.home-section {
  padding: var(--space-16) 0;
}

.section-heading span {
  color: var(--gov-green);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
}

.section-heading h2 {
  color: var(--gov-navy);
  margin-top: var(--space-2);
}

.how-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
  position: relative;
}

.how-steps article,
.report-card {
  background: var(--white);
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-card);
}

.how-steps article {
  text-align: center;
}

.how-steps i,
.report-card i {
  color: var(--gov-green);
  font-size: 2rem;
}

.step-number {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius-full);
  background: var(--gov-green);
  color: var(--white);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-3);
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

.report-card {
  color: inherit;
  text-decoration: none;
}

.report-card h3 {
  font-size: var(--text-lg);
  margin-top: var(--space-3);
}

.report-card p {
  margin-bottom: 0;
  color: var(--neutral-700);
}

.accountability-strip {
  background: var(--gov-navy-mid);
  color: var(--white);
  padding: var(--space-10) 0;
}

.accountability-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
  text-align: center;
}

.accountability-grid strong {
  display: block;
  font-size: var(--text-3xl);
  color: var(--white);
}

.accountability-grid span {
  color: rgba(255,255,255,0.76);
}

.track-card-header {
  background: var(--gov-navy);
  color: var(--white);
  padding: var(--space-6);
}

.track-card-header h1 {
  color: var(--white);
  font-size: var(--text-2xl);
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.track-card-header p {
  color: rgba(255,255,255,0.76);
  margin-bottom: 0;
}

.status-timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
}

.status-node {
  position: relative;
  display: grid;
  gap: var(--space-1);
  color: var(--neutral-500);
}

.status-node span {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  border: 2px solid var(--neutral-300);
  background: var(--white);
}

.status-node.is-complete span {
  border-color: var(--gov-green);
  background: var(--gov-green);
}

.status-node strong {
  color: var(--neutral-900);
  font-size: var(--text-sm);
}

.submission-summary {
  background: var(--neutral-50);
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}

.submission-summary h3 {
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gov-green);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.detail-grid div {
  background: var(--neutral-50);
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}

.detail-grid span {
  display: block;
  color: var(--neutral-500);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.submit-hero-card,
.submit-form-card {
  background: var(--white);
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.submit-hero-kicker,
.submit-anonymous-strip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--gov-green);
  color: var(--white);
  padding: 6px var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.submit-anonymous-strip {
  display: block;
  border-radius: 0;
  padding: var(--space-2) var(--space-6);
}

.submit-form-header {
  background: var(--white) !important;
  color: var(--gov-navy) !important;
  border-bottom: 1px solid var(--neutral-300);
}

.submit-block {
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  background: var(--white);
}

.submit-side-card,
.home-ai-card {
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.dashboard-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}

.dashboard-page-header h1 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--gov-navy);
  font-size: var(--text-2xl);
  margin-bottom: var(--space-1);
}

.dashboard-page-header p {
  margin-bottom: 0;
  color: var(--neutral-700);
}

.dashboard-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
}

.chart-panel {
  padding: var(--space-5);
}

.chart-panel h2,
.table-card-header h2 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--gov-navy);
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
}

.chart-panel canvas {
  min-height: 240px;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-3);
}

.quick-actions-grid a {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-4);
  background: var(--white);
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--neutral-700);
  box-shadow: var(--shadow-card);
}

.quick-actions-grid i {
  color: var(--gov-green);
  font-size: 1.4rem;
}

.quick-actions-grid strong {
  color: var(--neutral-900);
}

.quick-actions-grid span {
  font-size: var(--text-xs);
}

.table-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--neutral-300);
}

.table-card-header h2 {
  margin-bottom: 0;
}

.filter-toolbar {
  background: var(--white);
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-4);
}

.today-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: space-between;
  background: var(--gov-green-light);
  border: 1px solid #BBF7D0;
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  color: var(--gov-green);
}

.priority-queue {
  border-left: 4px solid var(--status-delayed);
}

.rti-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  background: var(--gov-saffron-light);
  border: 1px solid #FED7AA;
  border-radius: var(--radius-lg);
  color: var(--status-pending);
  padding: var(--space-4);
}

.rti-notice span {
  color: var(--neutral-700);
}

.escalation-level-1 {
  background: var(--status-resolved-bg);
  color: var(--status-resolved);
}

.escalation-level-2 {
  background: var(--status-pending-bg);
  color: var(--status-pending);
}

.escalation-level-3,
.escalation-level-4 {
  background: var(--status-delayed-bg);
  color: var(--status-delayed);
}

.department-card .card-header {
  border-bottom: 1px solid var(--neutral-300);
}

.department-card h2 {
  color: var(--gov-navy);
}

.department-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
  margin: 0 0 var(--space-4);
}

.department-stats div {
  background: var(--neutral-50);
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  text-align: center;
}

.department-stats dt {
  color: var(--neutral-500);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
}

.department-stats dd {
  color: var(--gov-navy);
  font-size: var(--text-xl);
  font-weight: var(--fw-bold);
  margin: 0;
}

.department-card .list-group-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
}

.complaint-detail-card {
  border-left: 5px solid var(--gov-green);
}

.complaint-detail-card.priority-high {
  border-left-color: var(--status-delayed);
}

.officer-action-card {
  border-top: 4px solid var(--gov-green);
}

.officer-action-card .card-header {
  background: var(--gov-green) !important;
  color: var(--white);
}

.officer-action-card .card-header h2,
.officer-action-card .card-header h6 {
  color: var(--white);
}

.staff-login-page {
  min-height: calc(100vh - 118px);
  display: grid;
  grid-template-columns: 3fr 2fr;
  background: var(--white);
}

.login-left-panel {
  background: linear-gradient(135deg, var(--gov-navy), var(--gov-navy-mid));
  color: var(--white);
  display: flex;
  align-items: center;
  padding: var(--space-16);
}

.login-left-panel h1 {
  color: var(--white);
  font-size: var(--text-4xl);
  margin-top: var(--space-5);
}

.login-left-panel p,
.login-left-panel li {
  color: rgba(255,255,255,0.82);
}

.login-left-panel ul {
  list-style: none;
  padding: 0;
  margin: var(--space-6) 0;
  display: grid;
  gap: var(--space-3);
}

.login-left-panel li {
  display: flex;
  gap: var(--space-2);
}

.login-helplines {
  color: rgba(255,255,255,0.82);
  font-size: var(--text-sm);
  border-top: 1px solid rgba(255,255,255,0.18);
  padding-top: var(--space-4);
}

.login-right-panel {
  display: grid;
  place-items: center;
  padding: var(--space-8);
}

.login-form-wrap {
  width: min(100%, 430px);
}

.login-form-wrap h2 {
  color: var(--gov-navy);
}

.citizen-login-link {
  border-top: 1px solid var(--neutral-300);
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
  color: var(--neutral-700);
}

.citizen-login-link a {
  color: var(--gov-green);
  font-weight: var(--fw-semibold);
  text-decoration: none;
}

.static-page-hero,
.page-hero-card {
  background: var(--gov-navy);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  margin-bottom: var(--space-6);
}

.static-page-hero .page-hero-icon,
.page-hero-card .page-hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.12);
  color: var(--gov-saffron);
  font-size: 1.75rem;
  margin-bottom: var(--space-3);
}

.static-page-hero h1,
.static-page-hero h2,
.page-hero-card h1,
.page-hero-card h2 {
  color: var(--white);
}

.static-page-hero p,
.page-hero-card p {
  color: rgba(255, 255, 255, 0.88);
}

.static-page-content h2 {
  color: var(--gov-navy);
  font-size: var(--text-xl);
  font-weight: var(--fw-bold);
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 3px solid var(--gov-green-light);
}

.static-page-content p {
  color: var(--neutral-700);
  line-height: 1.75;
  margin-bottom: var(--space-4);
}

.geo-heatmap-container,
#geoHeatmapContainer,
#heatmap-container {
  width: 100%;
  min-height: 450px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--neutral-300);
  overflow: hidden;
}

.dashboard-hero {
  background: var(--gov-navy) !important;
  color: var(--white);
  min-height: 120px;
  border-radius: var(--radius-lg);
}

.dashboard-hero h1,
.dashboard-hero h2,
.dashboard-hero h3,
.dashboard-hero .dashboard-pill {
  color: var(--white) !important;
}

.dashboard-hero .text-muted,
.dashboard-hero p {
  color: rgba(255,255,255,0.78) !important;
}

.metric-card {
  background: var(--white);
  border: 1px solid var(--neutral-300);
  border-left: 4px solid var(--gov-green);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.chart-card,
.dashboard-insight {
  border: 1px solid var(--neutral-300) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-card) !important;
}

.geo-hero-pills,
.geo-stat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.geo-hero-pill,
.geo-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 6px var(--space-3);
  border-radius: var(--radius-full);
  background: var(--neutral-50);
  border: 1px solid var(--neutral-300);
  color: var(--neutral-700);
  font-size: var(--text-sm);
}

.alert-danger,
.alert-warning,
.alert-success,
.alert-info {
  border-radius: var(--radius-md);
}

.badge {
  width: auto !important;
}

.badge-status {
  width: auto !important;
  max-width: max-content !important;
  flex: 0 0 auto !important;
}

@media (max-width: 1199px) {
  .portal-header-inner {
    min-height: 72px;
  }

  .portal-title {
    font-size: var(--text-base);
  }
}

@media (max-width: 991px) {
  .portal-header-inner {
    flex-wrap: wrap;
    padding: var(--space-2) 0;
  }

  .portal-brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .quick-actions-grid,
  .how-steps,
  .report-grid,
  .accountability-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .staff-login-page {
    grid-template-columns: 1fr;
  }

  .login-left-panel {
    display: none;
  }

  .gov-identity-left {
    font-size: var(--text-xs);
  }

  .identity-separator,
  .gov-identity-left [lang="hi"] {
    display: none;
  }

  .portal-shield {
    width: 40px;
    height: 40px;
  }

  .portal-title {
    font-size: var(--text-sm);
  }

  .portal-title-hi,
  .portal-subtitle {
    display: none;
  }

  .home-hero-v2 {
    min-height: auto;
    padding: var(--space-10) 0;
  }

  .home-hero-v2 h1 {
    font-size: var(--text-3xl);
  }

  .hero-stats-grid,
  .mini-metrics,
  .quick-actions-grid,
  .how-steps,
  .report-grid,
  .accountability-grid,
  .detail-grid,
  .status-timeline {
    grid-template-columns: 1fr;
  }

  .dashboard-page-header {
    flex-direction: column;
  }

  .geo-heatmap-container,
  #geoHeatmapContainer,
  #heatmap-container {
    min-height: 400px;
  }
}

@media (max-width: 767px) {
  .portal-nav {
    flex-basis: 100%;
    width: 100%;
  }

  .portal-nav-list {
    align-items: stretch;
    flex-direction: column;
    padding: var(--space-4) 0;
    min-height: calc(100vh - 108px);
  }

  .portal-nav-list a {
    width: 100%;
    font-size: var(--text-lg);
    padding: var(--space-3) var(--space-2);
  }
}

/* ==========================================================================
   Accessibility Controls
   ========================================================================== */
.gov-accessibility-controls {
  display: inline-flex;
  gap: var(--space-1);
  align-items: center;
}

.btn-identity {
  background: transparent;
  color: var(--white);
  border: none;
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  opacity: 0.7;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: opacity var(--transition-fast), background var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
}

.btn-identity:hover,
.btn-identity:focus {
  opacity: 1;
  background: rgba(255, 255, 255, 0.15);
}

.btn-identity.active {
  opacity: 1;
  background: rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 -2px 0 var(--gov-saffron);
}

/* Font scale controls */
html[data-font-scale="small"] {
  font-size: 88% !important;
}

html[data-font-scale="medium"] {
  font-size: 100% !important;
}

html[data-font-scale="large"] {
  font-size: 112% !important;
}

html[data-font-scale="xlarge"] {
  font-size: 124% !important;
}

/* High Contrast Theme Override - Premium Dark Slate Mode */
html[data-theme="contrast"] {
  --white: #1e293b;
  --neutral-900: #f8fafc;
  --neutral-700: #e2e8f0;
  --neutral-500: #94a3b8;
  --neutral-300: #475569;
  --neutral-100: #0f172a;
  --neutral-50: #020617;
  
  --gov-navy: #1e293b;
  --gov-navy-mid: #334155;
  --gov-green: #10b981; /* bright high contrast emerald */
  --gov-green-mid: #34d399;
  --gov-green-light: #064e3b;
  
  --status-pending-bg: #451a03;
  --status-pending: #f59e0b;
  --status-resolved-bg: #064e3b;
  --status-resolved: #34d399;
  --status-delayed-bg: #7f1d1d;
  --status-delayed: #f87171;
  --status-normal-bg: #1e3a8a;
  --status-normal: #60a5fa;
}

html[data-theme="contrast"] body {
  background-color: var(--neutral-100);
  color: var(--neutral-900);
}

/* Typography & General Text overrides */
html[data-theme="contrast"] .portal-brand,
html[data-theme="contrast"] .portal-brand-title,
html[data-theme="contrast"] .portal-title,
html[data-theme="contrast"] .portal-subtitle,
html[data-theme="contrast"] .portal-helplines span,
html[data-theme="contrast"] .portal-helplines-inline span,
html[data-theme="contrast"] .empty-state-title {
  color: var(--neutral-900) !important;
}

html[data-theme="contrast"] .text-muted,
html[data-theme="contrast"] .text-secondary {
  color: var(--neutral-700) !important; /* #e2e8f0 */
}

html[data-theme="contrast"] .gov-breadcrumb {
  background: var(--neutral-50) !important;
  border-bottom: 1px solid var(--neutral-300) !important;
}

html[data-theme="contrast"] .gov-breadcrumb a {
  color: var(--gov-green) !important;
}

html[data-theme="contrast"] .gov-breadcrumb .breadcrumb-item.active {
  color: var(--neutral-900) !important;
}

/* Form and inputs overrides */
html[data-theme="contrast"] .bg-light {
  background-color: var(--neutral-100) !important;
}

html[data-theme="contrast"] .form-control:focus,
html[data-theme="contrast"] .form-select:focus {
  border-color: var(--gov-green) !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25) !important;
}

/* Button overrides for contrast */
html[data-theme="contrast"] .btn-gov-primary,
html[data-theme="contrast"] .btn-primary {
  background: var(--gov-green) !important;
  color: #020617 !important;
  border-color: var(--gov-green) !important;
}

html[data-theme="contrast"] .btn-gov-primary:hover,
html[data-theme="contrast"] .btn-primary:hover {
  background: var(--gov-green-mid) !important;
  border-color: var(--gov-green-mid) !important;
  color: #020617 !important;
}

html[data-theme="contrast"] .btn-gov-secondary {
  color: var(--gov-green) !important;
  border-color: var(--gov-green) !important;
  background: transparent !important;
}

html[data-theme="contrast"] .btn-gov-secondary:hover {
  background: var(--gov-green-light) !important;
}

html[data-theme="contrast"] .btn-outline-primary {
  color: var(--gov-green) !important;
  border-color: var(--gov-green) !important;
}

html[data-theme="contrast"] .btn-outline-primary:hover {
  background-color: var(--gov-green-light) !important;
  color: var(--neutral-900) !important;
}

html[data-theme="contrast"] .btn-outline-secondary {
  color: var(--neutral-900) !important;
  border-color: var(--neutral-300) !important;
}

html[data-theme="contrast"] .btn-outline-secondary:hover {
  background-color: var(--neutral-300) !important;
  color: var(--neutral-50) !important;
}

/* Identity controls and header fixes */
html[data-theme="contrast"] .btn-identity {
  color: var(--neutral-900) !important;
}

html[data-theme="contrast"] .gov-header-v2 .btn-identity,
html[data-theme="contrast"] .gov-identity-bar .btn-identity {
  color: #ffffff !important;
}

html[data-theme="contrast"] .gov-footer-bottom {
  border-top: 1px solid var(--neutral-300);
}

html[data-theme="contrast"] .gov-identity-bar {
  border-bottom: 1px solid var(--neutral-300);
}

/* Homepage Hero & Stats Premium Dark Mode Upgrades */
html[data-theme="contrast"] .home-hero-v2 {
  background: linear-gradient(135deg, #020617 0%, #0f172a 100%) !important;
  color: #f8fafc !important;
}

html[data-theme="contrast"] .home-hero-v2 h1,
html[data-theme="contrast"] .home-hero-v2 h1 span {
  color: #ffffff !important;
}

html[data-theme="contrast"] .home-hero-v2 .hero-subtitle {
  color: #e2e8f0 !important;
}

html[data-theme="contrast"] .home-hero-v2 .hero-kicker,
html[data-theme="contrast"] .home-hero-v2 .hero-trust-pills span {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
}

html[data-theme="contrast"] .hero-primary {
  background: var(--gov-saffron) !important;
  color: #ffffff !important;
}

html[data-theme="contrast"] .hero-secondary {
  border-color: #ffffff !important;
  color: #ffffff !important;
}

html[data-theme="contrast"] .hero-stats-grid div {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  color: #f8fafc !important;
}

html[data-theme="contrast"] .hero-stats-grid strong {
  color: var(--gov-green) !important;
}

html[data-theme="contrast"] .hero-stats-grid span {
  color: #94a3b8 !important;
}

html[data-theme="contrast"] .hero-service-card {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
}

html[data-theme="contrast"] .home-hero-v2 .hero-service-card h2,
html[data-theme="contrast"] .home-hero-v2 .hero-service-card .text-uppercase,
html[data-theme="contrast"] .home-hero-v2 .hero-service-card .small {
  color: #f8fafc !important;
}

html[data-theme="contrast"] .home-hero-v2 .hero-service-card .text-muted {
  color: #94a3b8 !important;
}

html[data-theme="contrast"] .mini-metrics div {
  background: #0f172a !important;
  border-color: #334155 !important;
}

html[data-theme="contrast"] .mini-metrics span,
html[data-theme="contrast"] .mini-metrics strong {
  color: #f8fafc !important;
}

/* Chatbot bubbles and styling details */
html[data-theme="contrast"] .home-ai-bubble {
  border: 1px solid var(--neutral-300);
}

html[data-theme="contrast"] .home-ai-msg-user .home-ai-bubble {
  background: var(--gov-green-light) !important;
  color: var(--neutral-900) !important;
}

html[data-theme="contrast"] .home-ai-msg-assistant .home-ai-bubble {
  background: var(--white) !important;
  color: var(--neutral-900) !important;
}

/* Leaflet maps integration for dark theme */
html[data-theme="contrast"] .leaflet-tile-container {
  filter: invert(96%) hue-rotate(180deg) brightness(85%) contrast(110%);
}

html[data-theme="contrast"] .leaflet-container {
  background: #0f172a !important;
}

html[data-theme="contrast"] .leaflet-popup-content-wrapper,
html[data-theme="contrast"] .leaflet-popup-tip {
  background: var(--white) !important;
  color: var(--neutral-900) !important;
  border: 1px solid var(--neutral-300);
}

html[data-theme="contrast"] .leaflet-popup-content-wrapper strong {
  color: var(--neutral-900) !important;
}

html[data-theme="contrast"] .leaflet-popup-content-wrapper a {
  color: var(--gov-green) !important;
}

html[data-theme="contrast"] .leaflet-container a.leaflet-popup-close-button {
  color: var(--neutral-900) !important;
}

/* Table sorting and hover effects */
html[data-theme="contrast"] .mibsp-table thead {
  background: var(--neutral-50) !important;
  border-bottom: 2px solid var(--neutral-300);
}

html[data-theme="contrast"] .mibsp-table thead th {
  color: var(--neutral-900) !important;
}

html[data-theme="contrast"] .mibsp-table tbody tr:hover {
  background: var(--gov-green-light) !important;
}

html[data-theme="contrast"] .empty-state-icon {
  color: var(--neutral-500) !important;
}

/* Modal and dispatch dashboard */
html[data-theme="contrast"] .modal-header,
html[data-theme="contrast"] .modal-footer {
  border-color: var(--neutral-300) !important;
}

/* KPI cards & timeline items overrides */
html[data-theme="contrast"] .kpi-card {
  background: var(--white) !important;
  border-color: var(--neutral-300) !important;
}

html[data-theme="contrast"] .kpi-value {
  color: var(--neutral-900) !important;
}

html[data-theme="contrast"] .kpi-label,
html[data-theme="contrast"] .kpi-sub {
  color: var(--neutral-500) !important;
}

html[data-theme="contrast"] .timeline-dot {
  color: #020617 !important;
}

html[data-theme="contrast"] .timeline-item::before {
  background: var(--neutral-300) !important;
}

html[data-theme="contrast"] .verify-progress-bar {
  background-color: var(--neutral-300) !important;
}

html[data-theme="contrast"] .tracking-id {
  background-color: var(--neutral-50) !important;
  color: var(--gov-green) !important;
  border: 1px solid var(--neutral-300);
}

/* --- High Contrast Theme Extra Hardening --- */

/* 1. Global Heading Override */
html[data-theme="contrast"] h1,
html[data-theme="contrast"] h2,
html[data-theme="contrast"] h3,
html[data-theme="contrast"] h4,
html[data-theme="contrast"] h5,
html[data-theme="contrast"] h6,
html[data-theme="contrast"] .h1,
html[data-theme="contrast"] .h2,
html[data-theme="contrast"] .h3,
html[data-theme="contrast"] .h4,
html[data-theme="contrast"] .h5,
html[data-theme="contrast"] .h6 {
  color: var(--neutral-900) !important;
}

/* 2. Dropdown Menus & Items */
html[data-theme="contrast"] .dropdown-menu {
  background-color: var(--white) !important; /* #1e293b */
  border: 1px solid var(--neutral-300) !important; /* #475569 */
}
html[data-theme="contrast"] .dropdown-item {
  color: var(--neutral-900) !important; /* #f8fafc */
}
html[data-theme="contrast"] .dropdown-item:hover,
html[data-theme="contrast"] .dropdown-item:focus {
  background-color: var(--neutral-300) !important; /* #475569 */
  color: var(--neutral-900) !important;
}
html[data-theme="contrast"] .dropdown-divider {
  border-top: 1px solid var(--neutral-300) !important;
}

/* 3. Staff Login Left Panel (keep white text on the dark navy/slate gradient) */
html[data-theme="contrast"] .login-left-panel h1 {
  color: #ffffff !important;
}
html[data-theme="contrast"] .login-left-panel p,
html[data-theme="contrast"] .login-left-panel li,
html[data-theme="contrast"] .login-left-panel .login-helplines {
  color: rgba(255, 255, 255, 0.88) !important;
}

/* 4. Staff Login Right Panel & Inputs */
html[data-theme="contrast"] label,
html[data-theme="contrast"] .form-label {
  color: var(--neutral-900) !important;
}
html[data-theme="contrast"] .input-group-text {
  background-color: var(--white) !important;
  color: var(--neutral-900) !important;
  border-color: var(--neutral-300) !important;
}
html[data-theme="contrast"] .form-control::placeholder,
html[data-theme="contrast"] textarea::placeholder {
  color: var(--neutral-500) !important; /* #94a3b8 */
  opacity: 0.8;
}

/* Override browser autofill styles */
html[data-theme="contrast"] input:-webkit-autofill,
html[data-theme="contrast"] input:-webkit-autofill:hover, 
html[data-theme="contrast"] input:-webkit-autofill:focus, 
html[data-theme="contrast"] input:-webkit-autofill:active {
  -webkit-background-clip: text;
  -webkit-text-fill-color: var(--neutral-900) !important;
  transition: background-color 5000s ease-in-out 0s;
  box-shadow: inset 0 0 0 50px var(--white) !important;
}

/* 5. Badges & Role Tags */
html[data-theme="contrast"] .badge-priority-critical {
  background-color: #f97316 !important; /* bright orange */
  color: #020617 !important; /* dark slate */
}
html[data-theme="contrast"] .badge-priority-high {
  background-color: var(--status-delayed-bg) !important; /* #7f1d1d */
  color: var(--status-delayed) !important; /* #f87171 */
}
html[data-theme="contrast"] .badge-role-admin {
  background-color: #a855f7 !important; /* bright purple */
  color: #020617 !important;
}
html[data-theme="contrast"] .badge-role-officer {
  background-color: #3b82f6 !important; /* bright blue */
  color: #020617 !important;
}

/* 6. Utility Overrides */
html[data-theme="contrast"] .bg-white {
  background-color: var(--white) !important; /* #1e293b */
}
html[data-theme="contrast"] .portal-nav-list a.active {
  background-color: var(--gov-green) !important;
  color: #020617 !important;
}
html[data-theme="contrast"] .portal-nav-list a.active:hover {
  background-color: var(--gov-green-mid) !important;
  color: #020617 !important;
}

/* 7. Dashboard KPI / Metric Cards */
html[data-theme="contrast"] .metric-card {
  background-color: var(--white) !important; /* #1e293b */
  border-color: var(--neutral-300) !important; /* #475569 */
}
html[data-theme="contrast"] .metric-card .metric-label {
  color: var(--neutral-500) !important; /* #94a3b8 */
}
html[data-theme="contrast"] .metric-card .metric-value {
  color: var(--neutral-900) !important; /* #f8fafc */
}
html[data-theme="contrast"] .metric-card small {
  color: var(--neutral-500) !important; /* #94a3b8 */
}

/* 8. Dashboard Insight Cards */
html[data-theme="contrast"] .dashboard-insight {
  border: 1px solid var(--neutral-300) !important;
}
html[data-theme="contrast"] .dashboard-insight-row {
  border-bottom: 1px dashed var(--neutral-300) !important;
}
html[data-theme="contrast"] .dashboard-insight-danger {
  border-color: var(--status-delayed) !important; /* #f87171 */
  background: var(--status-delayed-bg) !important; /* #7f1d1d */
}
html[data-theme="contrast"] .dashboard-insight-danger .dashboard-insight-title {
  color: var(--status-delayed) !important;
}
html[data-theme="contrast"] .dashboard-insight-neutral {
  border-color: var(--neutral-300) !important;
  background: var(--white) !important; /* #1e293b */
}
html[data-theme="contrast"] .dashboard-insight-neutral .dashboard-insight-title {
  color: var(--neutral-500) !important;
}
html[data-theme="contrast"] .dashboard-insight-success {
  border-color: var(--status-resolved) !important; /* #34d399 */
  background: var(--status-resolved-bg) !important; /* #064e3b */
}
html[data-theme="contrast"] .dashboard-insight-success .dashboard-insight-title {
  color: var(--status-resolved) !important;
}
html[data-theme="contrast"] .dashboard-insight-warning {
  border-color: var(--status-pending) !important; /* #f59e0b */
  background: var(--status-pending-bg) !important; /* #451a03 */
}
html[data-theme="contrast"] .dashboard-insight-warning .dashboard-insight-title {
  color: var(--status-pending) !important;
}

/* 9. Chart Cards */
html[data-theme="contrast"] .chart-card {
  background-color: var(--white) !important; /* #1e293b */
  border-color: var(--neutral-300) !important;
}

/* 10. Scoreboard Grid Cards */
html[data-theme="contrast"] .dept-rank-card {
  border-color: var(--neutral-300) !important;
  background: var(--white) !important; /* #1e293b */
}
html[data-theme="contrast"] .dept-rank-badge {
  border-color: var(--neutral-300) !important;
  background: var(--neutral-100) !important; /* #0f172a */
  color: var(--neutral-900) !important; /* #f8fafc */
}
html[data-theme="contrast"] .dept-rank-stat {
  border-color: var(--neutral-300) !important;
  background: var(--neutral-100) !important; /* #0f172a */
}
html[data-theme="contrast"] .dept-rank-stat small {
  color: var(--neutral-500) !important; /* #94a3b8 */
}

/* 11. Dashboard Hero & Action Box */
html[data-theme="contrast"] .dashboard-hero {
  background: var(--white) !important; /* #1e293b */
  color: #ffffff !important;
  border: 1px solid var(--neutral-300) !important;
}
html[data-theme="contrast"] .dashboard-hero h1,
html[data-theme="contrast"] .dashboard-hero h2,
html[data-theme="contrast"] .dashboard-hero h3,
html[data-theme="contrast"] .dashboard-hero .dashboard-pill,
html[data-theme="contrast"] .dashboard-hero .dashboard-mini-pill {
  color: #ffffff !important;
  background-color: transparent !important;
}
html[data-theme="contrast"] .dashboard-hero p,
html[data-theme="contrast"] .dashboard-hero .text-muted {
  color: rgba(255, 255, 255, 0.88) !important;
}
html[data-theme="contrast"] .dashboard-actions {
  background: var(--neutral-100) !important; /* #0f172a */
  border-color: var(--neutral-300) !important;
}
html[data-theme="contrast"] .dashboard-filter-card {
  background: var(--white) !important;
  border-color: var(--neutral-300) !important;
}
html[data-theme="contrast"] .dashboard-mini-pill,
html[data-theme="contrast"] .dashboard-live {
  background: var(--neutral-100) !important; /* #0f172a */
  color: var(--neutral-900) !important; /* #f8fafc */
  border: 1px solid var(--neutral-300) !important;
}

/* 12. Global Table Overrides */
html[data-theme="contrast"] .table thead,
html[data-theme="contrast"] .table-light {
  background-color: var(--neutral-50) !important;
  border-bottom: 2px solid var(--neutral-300) !important;
}
html[data-theme="contrast"] .table thead th,
html[data-theme="contrast"] .table-light th {
  color: var(--neutral-900) !important;
  background-color: var(--neutral-50) !important;
}
html[data-theme="contrast"] .table tbody tr,
html[data-theme="contrast"] .table th,
html[data-theme="contrast"] .table td,
html[data-theme="contrast"] .table tbody td,
html[data-theme="contrast"] .table tbody th {
  background-color: var(--white) !important; /* #1e293b */
  color: var(--neutral-900) !important; /* #f8fafc */
  border-bottom: 1px solid var(--neutral-300) !important;
}
html[data-theme="contrast"] .table tbody tr:hover td,
html[data-theme="contrast"] .table tbody tr:hover th {
  background-color: var(--neutral-300) !important;
}

/* 13. Form calendar / date picker indicator color */
html[data-theme="contrast"] input::-webkit-calendar-picker-indicator {
  filter: invert(1) !important;
}

/* 14. General Portal Cards Overrides */
html[data-theme="contrast"] .process-card,
html[data-theme="contrast"] .dept-card,
html[data-theme="contrast"] .hero-service-card,
html[data-theme="contrast"] .report-card,
html[data-theme="contrast"] .cta-card,
html[data-theme="contrast"] .home-ai-card,
html[data-theme="contrast"] .submit-form-card,
html[data-theme="contrast"] .submit-ai-card,
html[data-theme="contrast"] .submit-side-card,
html[data-theme="contrast"] .submission-summary-card,
html[data-theme="contrast"] .tracking-card,
html[data-theme="contrast"] .complaint-detail-card,
html[data-theme="contrast"] .officer-action-card,
html[data-theme="contrast"] .page-hero-card,
html[data-theme="contrast"] .submit-hero-card,
html[data-theme="contrast"] .anonymous-callout,
html[data-theme="contrast"] .hero-panel,
html[data-theme="contrast"] .trust-band,
html[data-theme="contrast"] .trust-band-item,
html[data-theme="contrast"] .submit-hero-stat,
html[data-theme="contrast"] .submit-privacy-notice {
  background: var(--white) !important; /* #1e293b */
  border-color: var(--neutral-300) !important; /* #475569 */
}

/* 15. Global Bootstrap Card & List Group overrides */
html[data-theme="contrast"] .card {
  background-color: var(--white) !important; /* #1e293b */
  border-color: var(--neutral-300) !important; /* #475569 */
  color: var(--neutral-900) !important;
}
html[data-theme="contrast"] .card-header,
html[data-theme="contrast"] .card-footer {
  background-color: var(--neutral-100) !important; /* #0f172a */
  border-color: var(--neutral-300) !important;
  color: var(--neutral-900) !important;
}
html[data-theme="contrast"] .list-group-item {
  background-color: var(--white) !important; /* #1e293b */
  border-color: var(--neutral-300) !important; /* #475569 */
  color: var(--neutral-900) !important; /* #f8fafc */
}
html[data-theme="contrast"] .list-group-item:hover,
html[data-theme="contrast"] .list-group-item-action:hover {
  background-color: var(--neutral-300) !important;
  color: var(--neutral-900) !important;
}

/* 16. bg-white Override to avoid white blocks */
html[data-theme="contrast"] .bg-white,
html[data-theme="contrast"] [class*="bg-white"] {
  background-color: var(--white) !important; /* #1e293b */
  color: var(--neutral-900) !important;
}

/* 17. Code & Tracking ID Overrides */
html[data-theme="contrast"] code,
html[data-theme="contrast"] .tracking-id {
  background-color: var(--neutral-100) !important; /* #0f172a */
  color: var(--gov-green-mid) !important; /* #34d399 */
  border: 1px solid var(--neutral-300) !important; /* #475569 */
  padding: 2px 6px !important;
  border-radius: var(--radius-sm) !important;
}

/* 18. Chart Loader, Error, and Empty Hint Overrides */
html[data-theme="contrast"] .chart-loading {
  background: var(--white) !important;
  color: var(--neutral-900) !important;
}
html[data-theme="contrast"] .chart-empty-hint {
  background: var(--white) !important;
  color: var(--neutral-700) !important;
}
html[data-theme="contrast"] .chart-error {
  background: var(--status-delayed-bg) !important; /* #7f1d1d */
  color: var(--status-delayed) !important; /* #f87171 */
}

/* 19. Geo Heatmap Page Specific Overrides */
html[data-theme="contrast"] .geo-heatmap-hero {
  background: var(--white) !important;
  border: 1px solid var(--neutral-300) !important;
}
html[data-theme="contrast"] .geo-hero-pill {
  background-color: var(--neutral-100) !important; /* #0f172a */
  border-color: var(--neutral-300) !important;
  color: var(--neutral-900) !important;
}
html[data-theme="contrast"] .geo-stat-row {
  border-bottom-color: var(--neutral-300) !important;
}
html[data-theme="contrast"] .geo-heatmap-state {
  background: rgba(15, 23, 42, 0.96) !important;
  color: var(--neutral-900) !important;
}
html[data-theme="contrast"] .geo-heatmap-error {
  background: var(--status-delayed-bg) !important;
  color: var(--status-delayed) !important;
}
html[data-theme="contrast"] .geo-heatmap-info {
  background: var(--neutral-100) !important;
  color: var(--neutral-700) !important;
}
html[data-theme="contrast"] .geo-location-label span {
  background: var(--white) !important;
  color: var(--neutral-900) !important;
  border-color: var(--neutral-300) !important;
}
html[data-theme="contrast"] .geo-location-label strong {
  background: var(--gov-green) !important;
  color: #020617 !important;
}
html[data-theme="contrast"] .geo-india-map-label span {
  background: var(--white) !important;
  color: var(--neutral-900) !important;
  border-color: var(--neutral-300) !important;
}

/* Admin Review Inbox Styling */
.review-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 12px;
}
.review-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1) !important;
}
.complaint-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #4a5568;
    max-height: 120px;
    overflow-y: auto;
    background-color: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid #cbd5e1;
}

/* Admin Nav Badge */
.badge-nav {
    font-size: 0.7rem;
    padding: 0.25em 0.5em;
    border-radius: 50rem;
    vertical-align: top;
    margin-left: 2px;
}

/* Rejection & Under Review Notice Boxes */
.review-alert, .alert-review-info {
    border-left: 4px solid #0d6efd;
    background-color: #f0f7ff;
}
.reject-alert, .alert-reject-info {
    border-left: 4px solid #dc3545;
    background-color: #fff5f5;
}

/* ==========================================================================
   Civik India Animation Layer
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
    /* 4.2 — Direction-Aware Reveals inside Hero and Dashboard */
    [data-reveal-dir] {
        opacity: 0;
        transition: opacity var(--transition-slow), transform var(--transition-slow);
        will-change: opacity, transform;
    }
    [data-reveal-dir="up"] { transform: translateY(30px); }
    [data-reveal-dir="down"] { transform: translateY(-30px); }
    [data-reveal-dir="left"] { transform: translateX(-30px); }
    [data-reveal-dir="right"] { transform: translateX(30px); }
    [data-reveal-dir].is-visible {
        opacity: 1 !important;
        transform: none !important;
    }

    /* Fallback overrides for Hero & Dashboard reveals */
    .home-hero-v2 [data-reveal]:not(.is-visible),
    .dashboard-shell [data-reveal]:not(.is-visible) {
        opacity: 0 !important;
        transform: translateY(16px) !important;
    }
    .home-hero-v2 [data-reveal-dir="left"]:not(.is-visible) {
        opacity: 0 !important;
        transform: translateX(-30px) !important;
    }
    .home-hero-v2 [data-reveal-dir="right"]:not(.is-visible) {
        opacity: 0 !important;
        transform: translateX(30px) !important;
    }
    .home-hero-v2 [data-reveal-dir="up"]:not(.is-visible) {
        opacity: 0 !important;
        transform: translateY(30px) !important;
    }
    .home-hero-v2 [data-reveal-dir="down"]:not(.is-visible) {
        opacity: 0 !important;
        transform: translateY(-30px) !important;
    }
    .home-hero-v2 [data-reveal].is-visible,
    .dashboard-shell [data-reveal].is-visible {
        opacity: 1 !important;
        transform: none !important;
        transition: opacity var(--transition-slow), transform var(--transition-slow);
    }

    /* 4.3 — Hero trust pills staggered pop */
    .hero-trust-pills span[data-reveal]:not(.is-visible) {
        opacity: 0 !important;
        transform: scale(0.8) !important;
    }
    .hero-trust-pills span[data-reveal].is-visible {
        opacity: 1 !important;
        transform: scale(1) !important;
        animation: popSpring 0.5s var(--ease-spring) forwards;
    }

    /* 4.5 — Hero service card float animation */
    .hero-service-card {
        animation: floatHeroCard 6s ease-in-out infinite;
    }

    /* 4.6 — SLA bar animated fill */
    .sla-bar-fill {
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 1.2s var(--ease-reveal);
    }
    .is-visible .sla-bar-fill,
    .sla-bar-fill.is-visible,
    .col-lg-5.is-visible .sla-bar-fill {
        transform: scaleX(1);
    }

    /* 4.8 — How-it-works step number bounce */
    .how-steps article {
        transition: transform var(--transition-spring-btn);
    }
    .how-steps article:hover {
        transform: translateY(-6px);
    }
    .how-steps article:hover .step-number {
        animation: popSpring 0.4s var(--ease-spring) forwards;
    }

    /* 5.1 — Success Icon Entrance */
    .success-icon .rounded-circle {
        animation: popSpring 0.6s var(--ease-spring) forwards;
        transform-origin: center;
    }
    .success-icon i {
        display: inline-block;
        animation: successIconIntro 0.8s var(--ease-spring) forwards;
        transform-origin: center;
    }

    /* 5.2 — Tracking ID copy button pulse */
    .tracking-card button:hover,
    .tracking-card button:focus {
        animation: trackingCopyPulse 1.2s ease-in-out infinite;
    }

    /* 6.1 — Search card entrance */
    .track-card {
        animation: slideUp var(--transition-slow) forwards;
    }
    .track-card-header {
        animation: fadeIn var(--transition-slow) forwards;
    }

    /* 6.2 — Status timeline node completion */
    .status-node {
        transition: color var(--transition-normal);
    }
    .status-node.is-complete span {
        animation: popSpring 0.4s var(--ease-spring) forwards;
    }
    .status-node:nth-child(1) span { animation-delay: 100ms; }
    .status-node:nth-child(2) span { animation-delay: 250ms; }
    .status-node:nth-child(3) span { animation-delay: 400ms; }
    .status-node:nth-child(4) span { animation-delay: 550ms; }

    /* 6.3 — Result card animated entry */
    .complaint-status-card {
        animation: slideUp var(--transition-slow) forwards;
    }

    /* 7.1 — KPI cards stagger */
    .kpi-card {
        opacity: 0;
        animation: slideUp var(--transition-slow) forwards;
    }
    .row [class*="col-"]:nth-child(1) .kpi-card { animation-delay: 50ms; }
    .row [class*="col-"]:nth-child(2) .kpi-card { animation-delay: 120ms; }
    .row [class*="col-"]:nth-child(3) .kpi-card { animation-delay: 190ms; }
    .row [class*="col-"]:nth-child(4) .kpi-card { animation-delay: 260ms; }
    .row [class*="col-"]:nth-child(5) .kpi-card { animation-delay: 330ms; }

    /* 7.3 — Stat chips slide-in */
    .stat-chip {
        opacity: 0;
        animation: slideRight var(--transition-slow) forwards;
        transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    }
    .stat-chip:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-sm);
    }

    /* 8 — Admin review card */
    .review-card {
        opacity: 0;
        animation: slideUp var(--transition-slow) forwards;
        transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    }
    .review-card:hover {
        transform: translateY(-4px) !important;
        box-shadow: var(--shadow-lg) !important;
    }

    /* 9.1 — Card hover lift */
    .mibsp-card {
        transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    }
    .mibsp-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-lg);
    }

    /* 9.2 — Primary nav links sliding underline */
    .site-nav .nav-link,
    .portal-nav-list a {
        position: relative;
    }
    .site-nav .nav-link::after,
    .portal-nav-list a::after {
        content: '';
        position: absolute;
        bottom: -4px;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: var(--gov-saffron);
        transform: scaleX(0);
        transform-origin: right;
        transition: transform var(--transition-normal);
    }
    .site-nav .nav-link:hover::after,
    .site-nav .nav-link.active::after,
    .portal-nav-list a:hover::after,
    .portal-nav-list a.active::after {
        transform: scaleX(1);
        transform-origin: left;
    }

    /* 9.3 — Buttons universal spring */
    .btn-gov-primary,
    .btn-gov-secondary {
        transition: background var(--transition-fast), transform var(--transition-spring-btn), box-shadow var(--transition-fast) !important;
    }
    .btn-gov-primary:hover,
    .btn-gov-secondary:hover {
        transform: scale(1.03);
    }
    .btn-gov-primary:active,
    .btn-gov-secondary:active {
        transform: scale(0.97);
    }

    /* 9.4 — Badge status pills pop */
    .badge-status {
        animation: popSpring 0.4s var(--ease-spring) forwards;
    }

    /* 9.5 — Form input focus glow */
    .form-control,
    .form-select {
        transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
    }
    .form-control:focus,
    .form-select:focus {
        box-shadow: 0 0 0 4px rgba(0, 107, 60, 0.2) !important;
    }

    /* 9.6 — Flash messages slide-in */
    .alert {
        animation: slideDown var(--transition-slow) forwards;
    }

    /* 9.7 — Dropdown menus */
    .dropdown-menu {
        opacity: 0;
        transform: translateY(10px);
        transition: opacity var(--transition-normal), transform var(--transition-normal);
    }
    .dropdown-menu.show {
        opacity: 1;
        transform: translateY(0);
    }

    /* 9.8 — Table row hover */
    .mibsp-table tbody tr {
        transition: background-color var(--transition-normal), transform var(--transition-fast);
    }
    .mibsp-table tbody tr:hover {
        transform: scale(1.005);
        box-shadow: var(--shadow-sm);
    }

    /* 9.9 — Live Broadcast badge pulse */
    .badge-status:has(.bi-broadcast) {
        position: relative;
        animation: pulseBroadcast 2s infinite;
    }

    /* 10.1 — Login Left panel slide-in */
    .login-left-panel {
        animation: slideRight var(--transition-slow) forwards;
    }

    /* 10.2 — Login Right panel slide-in */
    .login-right-panel {
        animation: slideLeft var(--transition-slow) forwards;
    }

    /* 10.3 — Login Shield rotating entrance */
    .portal-shield.large {
        animation: shieldRotateIntro 1.2s var(--ease-spring) forwards;
    }

    /* 10.4 — Login button shake on error */
    .shake-login {
        animation: shakeLogin 0.5s ease-in-out;
    }

    /* 14 — will-change optimization cleanup */
    .login-left-panel,
    .login-right-panel,
    .kpi-card,
    .review-card,
    .track-card,
    .complaint-status-card,
    [data-reveal-dir] {
        will-change: transform, opacity;
    }
}

/* ==========================================================================
   15 — Global Floating Chatbot Layout
   ========================================================================== */
.chatbot-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1050;
    font-family: inherit;
}

.chatbot-trigger {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gov-green);
    color: var(--white);
    border: none;
    box-shadow: 0 4px 16px rgba(0, 107, 60, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    position: relative;
}

.chatbot-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--gov-saffron);
    color: var(--white);
    font-size: 11px;
    font-weight: var(--fw-bold);
    padding: 3px 6px;
    border-radius: 10px;
    border: 2px solid var(--white);
}

.chatbot-window {
    width: 370px;
    height: 520px;
    max-height: calc(100vh - 100px);
    border-radius: 16px;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    background-color: rgba(20, 26, 38, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-xl);
    position: absolute;
    bottom: 76px;
    right: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chatbot-header {
    padding: 16px;
    background: linear-gradient(135deg, var(--gov-green), rgba(0, 107, 60, 0.6));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--white);
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbot-header-shield {
    font-size: 22px;
    color: var(--gov-saffron);
    display: flex;
    align-items: center;
}

.chatbot-title {
    font-size: 15px;
    font-weight: var(--fw-bold);
    margin: 0;
    line-height: 1.2;
}

.chatbot-status {
    font-size: 11px;
    opacity: 0.85;
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #22c55e;
    display: inline-block;
    box-shadow: 0 0 8px #22c55e;
}

.chatbot-close-btn {
    background: none;
    border: none;
    color: var(--white);
    opacity: 0.7;
    font-size: 16px;
    cursor: pointer;
}

.chatbot-body {
    flex-grow: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chatbot-body::-webkit-scrollbar {
    width: 6px;
}
.chatbot-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
}
.chatbot-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.chatbot-welcome-message {
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--gov-saffron);
    border-radius: 6px;
    padding: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 4px;
}

.chatbot-welcome-message p:last-child {
    margin-bottom: 0;
}

.chatbot-msg {
    display: flex;
    flex-direction: column;
    max-width: 85%;
}

.chatbot-msg-user {
    align-self: flex-end;
}

.chatbot-msg-assistant {
    align-self: flex-start;
}

.chatbot-bubble {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.45;
    word-break: break-word;
}

.chatbot-msg-user .chatbot-bubble {
    background: var(--gov-green);
    color: var(--white);
    border-bottom-right-radius: 2px;
    box-shadow: 0 2px 6px rgba(0, 107, 60, 0.2);
}

.chatbot-msg-assistant .chatbot-bubble {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.95);
    border-bottom-left-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.chatbot-suggestions {
    padding: 8px 16px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    scrollbar-width: none;
}

.chatbot-suggestions::-webkit-scrollbar {
    display: none;
}

.btn-suggestion {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 11px;
    cursor: pointer;
}

.chatbot-input-form {
    padding: 12px 16px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.1);
}

.chatbot-input-form .input-group {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
}

.chatbot-input-form input {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--white) !important;
    font-size: 13px;
    padding: 10px 12px;
    flex-grow: 1;
}

.chatbot-input-form input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.btn-send {
    background: none;
    border: none;
    color: var(--gov-green);
    padding: 0 14px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.btn-send:disabled {
    color: rgba(255, 255, 255, 0.2) !important;
    cursor: not-allowed;
}

.chatbot-error {
    font-size: 11px;
    color: #f87171;
    margin-top: 6px;
    text-align: left;
}

.chatbot-msg-typing .chatbot-bubble {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    min-width: 52px;
    justify-content: center;
}

.chatbot-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.6);
    display: inline-block;
}

@media (max-width: 576px) {
    .chatbot-container {
        bottom: 16px;
        right: 16px;
    }
    .chatbot-window {
        width: calc(100vw - 32px);
        height: 480px;
        bottom: 68px;
    }
}

html[data-theme="contrast"] .chatbot-window {
    background-color: #000;
    border: 2px solid #fff;
    backdrop-filter: none;
}
html[data-theme="contrast"] .chatbot-trigger {
    background-color: #000;
    color: #fff;
    border: 2px solid #fff;
    box-shadow: none;
}
html[data-theme="contrast"] .chatbot-trigger:hover {
    background-color: #fff;
    color: #000;
}
html[data-theme="contrast"] .chatbot-header {
    background: #000;
    border-bottom: 2px solid #fff;
}
html[data-theme="contrast"] .chatbot-bubble {
    border: 1px solid #fff;
}
html[data-theme="contrast"] .chatbot-msg-user .chatbot-bubble {
    background: #000;
    color: #fff;
}
html[data-theme="contrast"] .btn-send {
    color: #fff;
}
html[data-theme="contrast"] .btn-suggestion {
    background: #000;
    color: #fff;
    border: 1px solid #fff;
}

/* ==========================================================================
   16 — Global Floating Chatbot Motion & Animations
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
    .chatbot-trigger {
        transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-normal);
    }
    .chatbot-trigger:hover {
        transform: scale(1.08) rotate(5deg);
        box-shadow: 0 6px 20px rgba(0, 107, 60, 0.5);
    }
    .chatbot-trigger:active {
        transform: scale(0.95);
    }
    .chatbot-window {
        transform-origin: bottom right;
        transition: opacity var(--transition-normal), transform var(--transition-normal);
        animation: chatWindowPop 250ms ease-out forwards;
    }
    .chatbot-close-btn {
        transition: opacity var(--transition-fast);
    }
    .chatbot-close-btn:hover {
        opacity: 1;
    }
    .chatbot-body {
        scroll-behavior: smooth;
    }
    .chatbot-body::-webkit-scrollbar-thumb {
        transition: background-color var(--transition-fast);
    }
    .chatbot-body::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.25);
    }
    .chatbot-msg {
        opacity: 0;
        transform: translateY(10px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
    .chatbot-msg.is-visible {
        opacity: 1;
        transform: translateY(0);
    }
    .btn-suggestion {
        transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
    }
    .btn-suggestion:hover {
        background: rgba(255, 255, 255, 0.12);
        border-color: var(--gov-saffron);
        color: var(--white);
    }
    .chatbot-input-form .input-group {
        transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
    }
    .btn-send {
        transition: color var(--transition-fast), transform var(--transition-fast);
    }
    .btn-send:hover {
        transform: scale(1.1);
    }
    .btn-send:active {
        transform: scale(0.9);
    }
    .chatbot-dot {
        animation: chatDotBounce 1.2s infinite ease-in-out;
    }
    .chatbot-dot:nth-child(2) {
        animation-delay: 0.2s;
    }
    .chatbot-dot:nth-child(3) {
        animation-delay: 0.4s;
    }
    .status-dot {
        animation: pulseBroadcast 2s infinite;
    }
    .chatbot-window,
    .chatbot-trigger,
    .chatbot-msg {
        will-change: transform, opacity;
    }
}

/* SLA Risk Warning Styles */
.sla-indicator-container {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sla-indicator-ring {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    vertical-align: middle;
}

.sla-ring-red {
    background-color: var(--status-delayed, #dc3545);
}

.sla-ring-orange {
    background-color: #fd7e14;
}

.sla-ring-green {
    background-color: var(--status-resolved, #198754);
}

.sla-ring-inactive {
    background-color: #6c757d;
}

.sla-bar-fill.sla-fill-red {
    background: var(--status-delayed, #dc3545) !important;
}

.sla-bar-fill.sla-fill-orange {
    background: #fd7e14 !important;
}

.sla-bar-fill.sla-fill-green {
    background: var(--status-resolved, #198754) !important;
}

.sla-bar-fill.sla-fill-inactive {
    background: #6c757d !important;
}

@media (prefers-reduced-motion: no-preference) {
    @keyframes pulse-ring-red {
        0% {
            box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
        }
        70% {
            box-shadow: 0 0 0 8px rgba(220, 53, 69, 0);
        }
        100% {
            box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
        }
    }
    @keyframes pulse-ring-orange {
        0% {
            box-shadow: 0 0 0 0 rgba(253, 126, 20, 0.7);
        }
        70% {
            box-shadow: 0 0 0 8px rgba(253, 126, 20, 0);
        }
        100% {
            box-shadow: 0 0 0 0 rgba(253, 126, 20, 0);
        }
    }
    @keyframes pulse-ring-green-slow {
        0% {
            box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.4);
        }
        70% {
            box-shadow: 0 0 0 6px rgba(25, 135, 84, 0);
        }
        100% {
            box-shadow: 0 0 0 0 rgba(25, 135, 84, 0);
        }
    }

    .sla-ring-red {
        animation: pulse-ring-red 2s infinite;
    }
    .sla-ring-orange {
        animation: pulse-ring-orange 2s infinite;
    }
    .sla-ring-green {
        animation: pulse-ring-green-slow 3s infinite;
    }
}

/* ==========================================================================
   Mobile UI/UX Enhancements (Anti-congestion overrides)
   ========================================================================== */
@media (max-width: 575px) {
    /* Headings & Typography */
    h1, .h1 {
        font-size: 1.55rem !important;
        line-height: 1.25 !important;
    }
    h2, .h2 {
        font-size: 1.25rem !important;
        line-height: 1.3 !important;
    }
    h3, .h3 {
        font-size: 1.125rem !important;
    }
    
    /* Global sections spacing to reduce huge gaps */
    .home-section {
        padding: var(--space-8) 0 !important;
    }
    .submit-page-shell,
    .py-5 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    
    /* Layout card padding improvements for max screen space */
    .card-body,
    .card-body.p-4,
    .card-body.p-md-5,
    .submit-form-card .card-body {
        padding: 1rem !important;
    }
    
    /* Top Identity Bar height reduction */
    .gov-identity-bar {
        min-height: 30px !important;
    }
    .gov-identity-bar .container {
        min-height: 30px !important;
        padding-top: 2px !important;
        padding-bottom: 2px !important;
    }
    .gov-accessibility-controls {
        gap: 0.15rem !important;
    }
    .gov-accessibility-controls .btn-identity {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.72rem !important;
        padding: 0 !important;
        display: inline-grid !important;
        place-items: center !important;
    }
    
    /* Grid anti-congestion overrides (2-column instead of huge vertical stack) */
    .hero-stats-grid,
    .accountability-grid,
    .report-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }
    
    .mini-metrics {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.5rem !important;
    }
    
    .mini-metrics div {
        padding: 0.5rem !important;
        text-align: center !important;
    }
    .mini-metrics strong {
        font-size: 1.15rem !important;
    }
    
    .hero-stats-grid div,
    .accountability-grid div {
        padding: 0.75rem !important;
    }
    .hero-stats-grid strong,
    .accountability-grid strong {
        font-size: 1.5rem !important;
    }
    
    /* Report card sizing */
    .report-card {
        padding: 1rem !important;
        text-align: center !important;
    }
    .report-card i {
        font-size: 1.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    .report-card h3 {
        font-size: 0.95rem !important;
        margin-bottom: 0.25rem !important;
    }
    .report-card p {
        font-size: 0.78rem !important;
        margin-bottom: 0 !important;
        line-height: 1.3 !important;
    }

    /* Submit Step list custom view for mobile */
    .submit-step {
        padding: 0.3rem 0.6rem !important;
        font-size: 0.75rem !important;
    }
    .submit-step span {
        width: 1.15rem !important;
        height: 1.15rem !important;
        font-size: 0.7rem !important;
    }

    /* Locate and other buttons standard tap size */
    .btn,
    .btn-lg,
    #submitBtn,
    #locateBtn {
        min-height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

