/* NPC Admin Helpdesk — mobile-first design. System fonts only (Android: Roboto + Noto Sans Devanagari). */
:root {
  --navy: #0b3d6e; --navy-2: #12528f; --navy-ink: #072a4d;
  --saffron: #f39c12; --saffron-soft: #fff4e0;
  --bg: #f3f6fa; --card: #ffffff; --line: #e3e8ef; --ink: #1c2430; --muted: #5d6878;
  --ok: #1e8e4e; --ok-soft: #e3f5ea; --warn: #b26a00; --warn-soft: #fff1d6;
  --bad: #c0392b; --bad-soft: #fde8e6; --info: #1f6fd1; --info-soft: #e5effc;
  --hold: #6b4fa3; --hold-soft: #efeaf8;
  --radius: 16px; --shadow: 0 2px 10px rgba(16, 40, 80, .08);
  --nav-h: 74px;
}
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", "Nirmala UI", sans-serif;
  font-size: 1.125rem; line-height: 1.45; color: var(--ink); background: var(--bg);
  padding-bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom));
}
a { color: var(--navy-2); }
.bi { width: 1.25em; height: 1.25em; fill: currentColor; vertical-align: -.22em; flex-shrink: 0; }
.bi-lg { width: 1.8em; height: 1.8em; }
.bi-xl { width: 2.6em; height: 2.6em; }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; }

/* ---------------- app bar */
.appbar {
  position: sticky; top: 0; z-index: 1030; color: #fff;
  background: linear-gradient(135deg, var(--navy-ink), var(--navy) 55%, var(--navy-2));
  padding: .85rem 1rem; display: flex; align-items: center; gap: .75rem; box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.appbar .logo { width: 46px; height: 46px; border-radius: 10px; background: #fff; display: grid; place-items: center;
  color: var(--navy); font-weight: 800; font-size: .8rem; letter-spacing: .02em; flex-shrink: 0; }
.appbar .title { line-height: 1.15; font-weight: 700; font-size: 1.25rem; }
.appbar .title small { display: block; font-weight: 400; font-size: .9rem; opacity: .9; }
.appbar .back { color: #fff; margin-right: -.25rem; }
.appbar .spacer { flex: 1; }
.appbar .chip-btn { color: #fff; border: 1px solid rgba(255,255,255,.4); border-radius: 999px; padding: .45rem .9rem; min-height: 44px; display: inline-flex; align-items: center; gap: .3rem;
  font-size: 1rem; text-decoration: none; background: transparent; }

/* ---------------- bottom navigation (app-like) */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); background: #fff; border-top: 1px solid var(--line);
  display: flex; box-shadow: 0 -2px 10px rgba(16,40,80,.06);
}
.bottomnav a, .bottomnav button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; font-size: .85rem; font-weight: 600; color: var(--muted); text-decoration: none; background: none; border: 0; min-height: 56px; position: relative; }
.bottomnav .bi { width: 1.75em; height: 1.75em; }
.bottomnav .active::before { content: ""; position: absolute; top: 0; width: 36px; height: 4px; border-radius: 0 0 4px 4px; background: var(--saffron); }
.bottomnav .active { color: var(--navy); font-weight: 700; }
.bottomnav .fab { margin-top: -30px; }
.bottomnav .fab span.circle { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; color: #1a1a1a;
  background: linear-gradient(135deg, var(--saffron), #e67e22); box-shadow: 0 4px 12px rgba(230,126,34,.45); }
.bottomnav .fab .bi { width: 1.7em; height: 1.7em; }

main.container { max-width: 640px; padding-left: 14px; padding-right: 14px; }

/* ---------------- surfaces */
.card-x { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line);
  padding: 1.15rem; margin-bottom: 1rem; }
.section-title { font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700;
  margin: 1.2rem .2rem .5rem; display: flex; align-items: center; gap: .4rem; }
.hi { font-size: .88em; }
.muted { color: var(--muted); }

/* hero */
.hero { border-radius: var(--radius); color: #fff; padding: 1.2rem; margin-bottom: 1rem; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--navy-ink), var(--navy) 60%, var(--navy-2)); box-shadow: var(--shadow); }
.hero h1 { font-size: 1.7rem; font-weight: 800; margin: 0 0 .3rem; }
.hero p { margin: 0; opacity: .95; max-width: 64%; font-size: 1.05rem; }
.hero svg.art { position: absolute; right: -6px; bottom: -6px; width: 42%; max-width: 210px; opacity: .95; }
.hero .badge-live { display: inline-flex; gap: .35rem; align-items: center; background: rgba(255,255,255,.15);
  border-radius: 999px; padding: .2rem .6rem; font-size: .8rem; margin-bottom: .6rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #2ecc71; box-shadow: 0 0 0 3px rgba(46,204,113,.3); }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.tiles.two { grid-template-columns: repeat(2, 1fr); }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: .9rem .5rem; text-align: center;
  color: var(--ink); text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: .35rem;
  min-height: 124px; justify-content: center; box-shadow: var(--shadow); transition: transform .08s ease; position: relative; }
.tile:active { transform: scale(.97); }
.tile .ico { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--info-soft); color: var(--navy); }
.tile .ico .floor { font-weight: 800; font-size: 1.5rem; }
.tile .ico .bi-lg { width: 2em; height: 2em; }
.tile .t1 { font-weight: 700; font-size: 1.05rem; line-height: 1.2; }
.tile .t2 { font-size: .9rem; color: var(--muted); line-height: 1.15; }

/* tile-style radios (problem type, urgency, yes/no) */
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 2; }
.choice .tile { min-height: 96px; }
.choice input:checked + .tile { border: 2px solid var(--navy); background: var(--info-soft); }
.choice input:checked + .tile .ico { background: var(--navy); color: #fff; }
.choice input:focus-visible + .tile { outline: 3px solid var(--saffron); outline-offset: 2px; }
.choice.urgent input:checked + .tile { border-color: var(--bad); background: var(--bad-soft); }
.choice.urgent input:checked + .tile .ico { background: var(--bad); }
.choice.yes input:checked + .tile { border-color: var(--ok); background: var(--ok-soft); }
.choice.yes input:checked + .tile .ico { background: var(--ok); color: #fff; }
.choice.no input:checked + .tile { border-color: var(--bad); background: var(--bad-soft); }
.choice.no input:checked + .tile .ico { background: var(--bad); color: #fff; }

/* steps in a form */
.step { display: flex; align-items: center; gap: .6rem; margin: 0 0 .7rem; }
.step .num { width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: .9rem; flex-shrink: 0; }
.step h2 { font-size: 1.2rem; font-weight: 700; margin: 0; line-height: 1.2; }
.form-control, .form-select { border-radius: 14px; padding: .8rem .95rem; font-size: 1.1rem; min-height: 52px; border-color: #cfd7e2; }
.form-label { font-weight: 600; font-size: 1.02rem; margin-bottom: .3rem; }
.trap { position: absolute; left: -9999px; }

/* buttons */
.btn { border-radius: 14px; font-weight: 600; min-height: 44px; }
.btn-lg { min-height: 56px; font-size: 1.15rem; }
.btn-sm { min-height: 38px; }
.btn-primary { background: var(--navy); border-color: var(--navy); }
.btn-primary:hover, .btn-primary:focus { background: var(--navy-2); border-color: var(--navy-2); }
.btn-accent { background: linear-gradient(135deg, var(--saffron), #e67e22); color: #1a1a1a; border: 0; font-weight: 700; }  /* dark text: 8:1 contrast (GIGW) */
.btn-accent:hover { color: #1a1a1a; filter: brightness(1.05); }
.btn-wa { background: #1f9d55; color: #fff; }
.btn-wa:hover { color: #fff; background: #198a49; }
.sticky-submit { position: sticky; bottom: calc(var(--nav-h) + 10px + env(safe-area-inset-bottom)); z-index: 5; }
.sticky-submit .btn { box-shadow: 0 6px 16px rgba(11,61,110,.3); padding: .9rem; font-size: 1.1rem; }

/* status pills — colour AND text, never colour alone */
.pill { display: inline-flex; align-items: center; gap: .3rem; border-radius: 999px; padding: .3rem .75rem; font-size: .9rem; font-weight: 700; white-space: nowrap; }
.st-new { background: var(--info-soft); color: var(--info); }
.st-ack { background: #e7eaf7; color: #3949ab; }
.st-progress { background: var(--warn-soft); color: var(--warn); }
.st-hold_vendor, .st-hold_purchase { background: var(--hold-soft); color: var(--hold); }
.st-resolved, .st-closed { background: var(--ok-soft); color: var(--ok); }
.st-rejected { background: var(--bad-soft); color: var(--bad); }
.pill-urgent { background: var(--bad); color: #fff; }
.pill-it { background: #e0f2f1; color: #00695c; }
.pill-soft { background: #eef1f5; color: var(--muted); }

/* list cards (complaints, jobs) */
.item { display: flex; gap: .8rem; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 18px;
  padding: 1rem; margin-bottom: .6rem; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.item .ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--info-soft); color: var(--navy); flex-shrink: 0; }
.item .body { flex: 1; min-width: 0; }
.item .top { display: flex; justify-content: space-between; gap: .5rem; align-items: center; }
.item .num { font-weight: 800; font-size: 1.08rem; }
.item .desc { color: var(--muted); font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item.urgent { border-left: 5px solid var(--bad); }
.item .meta { font-size: .9rem; color: var(--muted); display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .25rem; }
.late { color: var(--bad); font-weight: 700; }

/* timeline */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 17px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 1rem 50px; }
.timeline .tdot { position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; }
.timeline .when { font-size: .8rem; color: var(--muted); }
.timeline .what { font-weight: 700; }

/* success */
.success-ring { width: 92px; height: 92px; border-radius: 50%; margin: .5rem auto 1rem; display: grid; place-items: center;
  background: var(--ok-soft); color: var(--ok); animation: pop .45s ease-out; }
.success-ring .bi { width: 52px; height: 52px; }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
.big-number { font-size: 2.1rem; font-weight: 800; letter-spacing: .04em; color: var(--navy); }

/* KPI tiles (staff) */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-bottom: 1rem; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .7rem; text-align: center; box-shadow: var(--shadow); }
.kpi .v { font-size: 1.9rem; font-weight: 800; color: var(--navy); line-height: 1; }
.kpi .l { font-size: .9rem; color: var(--muted); margin-top: .25rem; }
.kpi.dark { background: var(--navy); border-color: var(--navy); } .kpi.dark .v, .kpi.dark .l { color: #fff; }
.kpi.alert .v { color: var(--bad); }

/* rounds grid */
.rounds { width: 100%; border-collapse: separate; border-spacing: 4px; font-size: .85rem; }
.rounds th { color: var(--muted); font-weight: 600; text-align: center; }
.rounds td.name { font-weight: 600; }
.rc { text-align: center; border-radius: 8px; padding: .35rem .2rem; font-weight: 700; font-size: .78rem; }
.rc-done { background: var(--ok-soft); color: var(--ok); } .rc-missed { background: var(--bad); color: #fff; }
.rc-due { background: var(--warn-soft); color: var(--warn); } .rc-later { background: #eef1f5; color: var(--muted); }

/* banners */
.note { border-radius: 18px; padding: .95rem 1.05rem; display: flex; gap: .7rem; align-items: flex-start; margin-bottom: 1rem; font-size: .95rem; }
.note.warn { background: var(--warn-soft); color: #6b4300; } .note.bad { background: var(--bad-soft); color: #7d1f15; }
.note.info { background: var(--info-soft); color: #123f7a; } .note.ok { background: var(--ok-soft); color: #145c33; }
.install-bar { display: none; }
.install-bar.show { display: flex; }

/* yes/no rows on check form */
.qblock { margin-bottom: 1rem; }
.qblock .q { font-weight: 700; margin-bottom: .45rem; }

footer.site { font-size: .9rem; color: var(--muted); text-align: center; padding: 1rem 0 .5rem; }

/* stickers (print) */
@media print {
  .brand, .appbar, .bottomnav, footer, .no-print { display: none !important; }
  body { background: #fff; padding: 0; }
  .sticker { page-break-after: always; height: 190mm; box-shadow: none !important; }
}
.sticker { text-align: center; padding: 10mm 6mm; background: #fff; border-radius: 14px; border: 2px solid var(--navy); margin-bottom: 1rem; }
.sticker .band { background: var(--navy); color: #fff; border-radius: 10px; padding: 3mm; }
.sticker svg.qr { width: 70mm; height: 70mm; }
.sticker h2 { font-size: 24pt; margin: 4mm 0 2mm; font-weight: 800; color: var(--navy); }
.sticker .place { font-size: 18pt; font-weight: 800; }

/* layout fixes for narrow phones */
.note > div { min-width: 0; }
.item .num { white-space: nowrap; }
.item .top { flex-wrap: wrap; row-gap: .2rem; }
.photo-picker .btn { white-space: nowrap; }

/* canteen */
.stepper { display: flex; align-items: center; gap: .3rem; flex-shrink: 0; }
.stepper input { width: 3rem; font-size: 1.15rem; text-align: center; border: 1px solid var(--line); border-radius: 10px; padding: .25rem 0; font-weight: 700; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper .btn { width: 2.75rem; height: 2.75rem; min-height: 2.75rem; padding: 0; display: grid; place-items: center; border-radius: 10px; }
.stepper:not(.has-qty) input { color: var(--muted); }
.stars { display: inline-flex; flex-direction: row-reverse; gap: .2rem; }
.stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars label { cursor: pointer; color: #cfd7e2; }
.stars label .bi { width: 2.1rem; height: 2.1rem; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: var(--saffron); }
.stars input:focus-visible + label { outline: 3px solid var(--saffron); border-radius: 6px; }

/* hall booking day grid */
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.slot { border-radius: 10px; padding: .4rem .25rem; font-size: .9rem; text-align: center; line-height: 1.15; min-height: 44px; }
.slot span { display: block; font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot-free { background: var(--ok-soft); color: var(--ok); }
.slot-pending { background: var(--info-soft); color: var(--info); border: 1px dashed var(--info); }
.slot-busy { background: var(--navy); color: #fff; }
.slot-key { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; min-height: 0; padding: 0; }

/* store availability */
.av-ok { background: var(--ok-soft); color: var(--ok); }
.av-low { background: var(--warn-soft); color: var(--warn); }
.av-out { background: var(--bad); color: #fff; }
.qty-in { width: 4.5rem; text-align: center; }

/* app feel: no grey tap flash, press feedback, comfortable controls */
* { -webkit-tap-highlight-color: transparent; }
.tile, .btn, .bottomnav a { -webkit-user-select: none; user-select: none; }
.item { transition: transform .08s ease; }
a.item:active, .btn:active { transform: scale(.98); }
.form-check-input { width: 1.4em; height: 1.4em; margin-top: .1em; }
.form-check-label { padding-left: .3rem; }
.appbar { padding-top: calc(.85rem + env(safe-area-inset-top)); }

/* official brand band (GIGW style): emblem | NPC logo | name — scrolls away, the navy page bar stays */
.brand { background: #fff; border-bottom: 3px solid var(--saffron); padding: .45rem .9rem;
  padding-top: calc(.45rem + env(safe-area-inset-top)); }
.brand-link { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--navy-ink); max-width: 640px; margin: 0 auto; }
.brand .emblem { height: 46px; width: auto; }
.brand .npc { height: 46px; width: auto; }
.brand-sep { width: 1px; align-self: stretch; background: var(--line); margin: 2px 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text b { font-size: .98rem; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text b:first-child { font-size: .92rem; color: #8a4b08; }
.brand-text small { font-size: .7rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar { padding-top: .75rem; }
@media print { .brand { border-bottom-width: 2px; } }
.sticker-head { display: flex; align-items: center; justify-content: center; gap: 4mm; border-bottom: 2px solid var(--saffron); padding-bottom: 3mm; color: var(--navy); }
.tiles > * { min-width: 0; }
.tile { overflow-wrap: anywhere; hyphens: auto; }
.choice .tile { padding: .75rem .35rem; }
.choice .tile .t1 { font-size: .95rem; }
.choice .tile .t2 { font-size: .8rem; }

/* main call to action on home */
.cta { display: flex; align-items: center; gap: 1rem; padding: 1.15rem 1.2rem; border-radius: 22px; text-decoration: none; color: #fff;
  background: linear-gradient(135deg, var(--saffron), #e67e22); box-shadow: 0 8px 20px rgba(230,126,34,.35); font-size: 1.25rem; margin-bottom: .5rem; }
.cta b { font-size: 1.35rem; }
.cta .cta-ico { width: 58px; height: 58px; border-radius: 18px; background: rgba(255,255,255,.22); display: grid; place-items: center; flex-shrink: 0; }
.cta .cta-ico .bi { width: 2rem; height: 2rem; }
.cta > .bi:last-child { margin-left: auto; }
.cta:active { transform: scale(.98); }

/* language switch in the header */
.chip-btn.lang { font-weight: 700; margin-right: .35rem; text-decoration: none; }
.ico-text { font-weight: 800; width: 1.3em; text-align: center; color: var(--navy); }

/* tappable number boxes on the board */
a.kpi { text-decoration: none; color: inherit; display: block; }
a.kpi.dark { color: #fff; }

/* canteen menu: one section open at a time */
.menu-section > summary { cursor: pointer; list-style: none; padding: .5rem 0; }
.menu-section > summary::-webkit-details-marker { display: none; }
.menu-section > summary::after { content: ' ▾'; }
.menu-section[open] > summary::after { content: ' ▴'; }
