/* =====================================================================
   Mysuru Dasara 2026 – visual theme
   Design rules follow the UI UX Pro Max "Accessible & Ethical" system for
   government apps (4.5:1 contrast, 44px touch targets, visible focus,
   reduced motion) dressed in the Dasara palette: palace maroon, howdah gold,
   marigold and deep night blue.
   ===================================================================== */
:root {
    --dasara-gold: #F9B208;
    --dasara-red: #9B111E;
    --dasara-dark-red: #65000B;
    --dasara-night: #140820;
    --marigold: #F57C00;
    --mango-leaf: #2E7D32;
    --paper: #FBF7F0;
    --ink: #1F1A17;
    --muted-ink: #5C5249;
    --ring: #F9B208;
}

body {
    background-color: var(--paper);
    color: var(--ink);
    font-family: "Noto Sans Kannada", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
}

/* ---- Background: Mysuru City Police logo watermark + illuminated palace, low opacity ---- */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url("../img/mcp-logo.png") center 45% / min(78vw, 560px) auto no-repeat;
    opacity: 0.07;
    pointer-events: none;
    z-index: -1;
}
body::after {
    content: "";
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: 42vh;
    background: url("../img/mysore-palace-band.jpg") center bottom / cover no-repeat;   /* illuminated Mysuru Palace photo */
    opacity: 0.14;
    pointer-events: none;
    z-index: -1;
    -webkit-mask-image: linear-gradient(to top, #000 55%, transparent);
            mask-image: linear-gradient(to top, #000 55%, transparent);
}

/* ---- Header: marigold & mango-leaf toran hanging below ---- */
.header-dasara { position: sticky; }
.header-dasara::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -20px;
    height: 20px;
    background: url("../img/toran.svg") left top / 64px 24px repeat-x;
    pointer-events: none;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,.18));
}
.header-dasara + * , .header-dasara ~ .container:first-of-type { margin-top: 14px; }
.header-title { font-family: "Tiro Kannada", "Noto Sans Kannada", serif; font-weight: 400 !important; letter-spacing: .3px; font-size: 1.1rem; }

/* ---- Hero banner used on login + dashboards ---- */
.dasara-hero {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    min-height: 170px;
    margin-bottom: 16px;
    color: #fff;
    background: var(--dasara-night) url("../img/mysore-palace.jpg") center 78% / cover no-repeat;
    box-shadow: 0 10px 24px rgba(20, 8, 32, .28);
    isolation: isolate;
}
.dasara-hero::before {
    content: "";
    position: absolute; inset: 0;
    /* dark on the left so the white text stays readable, palace shows through on the right */
    background: linear-gradient(180deg, rgba(12,6,16,.72) 0%, rgba(12,6,16,.35) 45%, rgba(12,6,16,0) 70%);
    z-index: -1;
}
.dasara-hero .hero-body { padding: 16px 18px 70px; max-width: 100%; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.dasara-hero .hero-kicker { font-size: .75rem; letter-spacing: 1.2px; text-transform: uppercase; color: var(--dasara-gold); font-weight: 700; }
.dasara-hero .hero-title { font-family: "Tiro Kannada", "Noto Sans Kannada", serif; font-size: 1.45rem; line-height: 1.25; margin: 4px 0 6px; color: #FFF6E0; }
.dasara-hero .hero-sub { font-size: .88rem; color: #F3E6D8; margin: 0; }
.dasara-hero .hero-elephant {
    position: absolute; right: 8px; bottom: 0;
    width: 132px; height: auto;
    filter: drop-shadow(0 6px 10px rgba(0,0,0,.45));
}
.dasara-hero .hero-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.dasara-hero .hero-chip { background: rgba(249,178,8,.18); border: 1px solid rgba(249,178,8,.55); color: #FFF3C4; font-size: .75rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
@media (min-width: 768px) {
    .dasara-hero { min-height: 260px; }
    .dasara-hero .hero-body { padding-bottom: 110px; }
    .dasara-hero .hero-title { font-size: 1.9rem; }
    .dasara-hero .hero-elephant { width: 190px; right: 24px; }
}
@media (max-width: 380px) {
    .dasara-hero .hero-body { max-width: 64%; }
    .dasara-hero .hero-elephant { width: 110px; }
}

/* ---- Cards: warm paper with a thin gold accent ---- */
.card-dasara {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #EFE4D2 !important;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(101, 0, 11, 0.06);
}
.card-dasara-header { border-bottom: 1px solid #F1E7D6 !important; background: linear-gradient(90deg, #FFF8E8, #FFFFFF) !important; }
.card-dasara-header::before { content: ""; display: inline-block; width: 4px; height: 16px; background: var(--dasara-gold); border-radius: 2px; margin-right: 8px; vertical-align: -2px; }

/* ---- Accessibility & interaction (UI UX Pro Max checklist) ---- */
a, button, [role="button"], .btn, .nav-link, .form-check-input, select { cursor: pointer; }
.btn, .form-control, .form-select { min-height: 44px; }
.btn-sm { min-height: 36px; }
.btn, .nav-link, .menu-link, .bottom-nav-link, .mg-card, .form-control, .form-select {
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.mg-card:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(101,0,11,.12); }
:focus-visible { outline: 3px solid var(--ring) !important; outline-offset: 2px; }
.form-control:focus, .form-select:focus { border-color: var(--dasara-gold); box-shadow: 0 0 0 .2rem rgba(249,178,8,.28); }
.text-muted { color: var(--muted-ink) !important; }
.bottom-nav { background: rgba(255,255,255,.97); backdrop-filter: saturate(1.2) blur(6px); }
.bottom-nav-link { min-height: 44px; justify-content: center; }
.bottom-nav-link.active { color: var(--dasara-red); }
.bottom-nav-link.active i { transform: translateY(-1px); }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 3000; background: #fff; color: var(--dasara-red); padding: 8px 12px; border-radius: 8px; font-weight: 700; }
.skip-link:focus { left: 8px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
    body::before, body::after, .header-dasara::after, .bottom-nav, #alertStack { display: none !important; }
}
