/* Jabor: one stylesheet, mobile first.
   World: the enamel house-number plate. Cobalt enamel owns the shell and every
   plate; marigold is kept for points; green, amber and red only mean state. */

@font-face { font-family: "Overpass"; font-weight: 400; font-display: swap; src: url("/fonts/overpass/overpass-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Overpass"; font-weight: 600; font-display: swap; src: url("/fonts/overpass/overpass-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Overpass"; font-weight: 700; font-display: swap; src: url("/fonts/overpass/overpass-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Overpass"; font-weight: 800; font-display: swap; src: url("/fonts/overpass/overpass-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Noto Sans Bengali"; font-weight: 400; font-display: swap; unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1; src: url("/fonts/noto-sans-bengali/noto-sans-bengali-bengali-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Noto Sans Bengali"; font-weight: 600; font-display: swap; unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1; src: url("/fonts/noto-sans-bengali/noto-sans-bengali-bengali-600-normal.woff2") format("woff2"); }

:root {
  --enamel-950: #0b1a4f;
  --enamel-900: #112463;
  --enamel-800: #172f80;
  --enamel-700: #1d3c9e;
  --enamel-600: #2b4fbd;
  --enamel-300: #9db1ea;
  --enamel-200: #c6d3f5;
  --enamel-100: #e4eafa;
  --enamel-50:  #f2f5fc;

  --ground: #f5f6f9;
  --surface: #ffffff;
  --surface-2: #eef1f7;
  --ink: #0e1631;
  --ink-2: #3a4563;
  --ink-3: #59627d;
  --line: #d5dbe8;
  --line-strong: #b4bdd2;
  --on-enamel: #ffffff;
  --on-enamel-2: #c9d4f4;

  --marigold: #f4ab00;
  --marigold-200: #ffd977;
  --marigold-100: #fff2cc;
  --marigold-ink: #3b2800;
  --marigold-text: #8a5800;

  --ok: #19744a;
  --ok-100: #e0f2e8;
  --warn: #9c4a00;
  --warn-100: #fde9d6;
  --bad: #b3261e;
  --bad-100: #fde7e4;

  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Bengali", "Nirmala UI", sans-serif;
  --font-sign: "Overpass", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Bengali", "Nirmala UI", sans-serif;
  --font-as: "Noto Sans Bengali", "Nirmala UI", "Vrinda", sans-serif;

  --step--1: 0.833rem;
  --step-0: 1rem;
  --step-1: 1.2rem;
  --step-2: 1.44rem;
  --step-3: 1.728rem;
  --step-4: 2.074rem;
  --step-5: 2.488rem;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --radius: 8px;
  --radius-plate: 14px;
  --tap: 48px;
  --shadow-1: 0 1px 2px rgba(14, 22, 49, 0.12), 0 2px 6px -2px rgba(14, 22, 49, 0.12);
  --shadow-plate: 0 1px 2px rgba(11, 26, 79, 0.35), 0 8px 18px -8px rgba(11, 26, 79, 0.55);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line-strong) var(--ground); }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--step-0);
  line-height: 1.5;
  caret-color: var(--enamel-700);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
::selection { background: var(--marigold-200); color: var(--marigold-ink); }
img, svg { max-width: 100%; }
h1, h2, h3 { font-family: var(--font-sign); line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: var(--step-3); font-weight: 800; }
h2 { font-size: var(--step-2); font-weight: 700; }
h3 { font-size: var(--step-1); font-weight: 700; }
p { margin: 0; }
a { color: var(--enamel-700); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--enamel-600); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--enamel-600); outline-offset: 2px; border-radius: 4px; }
.num, td.num, .tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: var(--step--1); }
.lead-text { color: var(--ink-2); margin-top: var(--space-3); max-width: 60ch; }
.gap-top { margin-top: var(--space-5); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Bilingual labels: English, Assamese under it. */
.bi { display: inline-flex; flex-direction: column; line-height: 1.2; gap: 1px; }
.bi-as { font-family: var(--font-as); font-size: 0.8em; font-weight: 400; color: inherit; opacity: 0.78; letter-spacing: 0; }
h1 .bi-as, h2 .bi-as { font-size: 0.55em; opacity: 0.7; }

/* ---------- Shell ---------- */
.shell {
  background: var(--enamel-900);
  color: var(--on-enamel);
  border-bottom: 3px solid var(--enamel-950);
}
.shell-inner {
  max-width: 76rem; margin: 0 auto;
  padding: var(--space-3) var(--space-4);
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5);
}
.wordmark { display: inline-flex; align-items: baseline; gap: var(--space-2); color: var(--on-enamel); text-decoration: none; }
.wordmark:hover { color: var(--on-enamel); }
.wordmark-en { font-family: var(--font-sign); font-weight: 800; font-size: var(--step-2); letter-spacing: 0.01em; }
.wordmark-as { font-family: var(--font-as); font-size: var(--step-0); color: var(--on-enamel-2); }
.ward { color: var(--on-enamel-2); font-size: var(--step--1); }
.nav { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); margin-left: auto; align-items: center; }
.nav a {
  color: var(--on-enamel); text-decoration: none; font-weight: 600;
  padding: var(--space-2) 0; border-bottom: 3px solid transparent; min-height: 40px; display: inline-flex; align-items: center;
}
.nav a:hover { color: var(--on-enamel); border-bottom-color: var(--enamel-300); }
.nav a[aria-current="page"] { border-bottom-color: var(--marigold); }
.nav form { margin: 0; }
/* Phones: one row of links that scrolls sideways instead of stacking. */
@media (max-width: 47.99rem) {
  .nav { margin-left: 0; width: 100%; flex-wrap: nowrap; overflow-x: auto; gap: var(--space-4); scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a, .nav .link-button { white-space: nowrap; flex: none; }
  .whoami { display: none; }
}
.nav .link-button { color: var(--on-enamel-2); }
.whoami { color: var(--on-enamel-2); font-size: var(--step--1); }

main { flex: 1; min-width: 0; }
/* Grid and flex children may shrink below their content, so wide tables scroll inside their wrap. */
.owner-grid > *, .how > *, .home-hero-inner > *, .owner-top > *, .coord-grid > *, .form-2 > * { min-width: 0; }
.page { max-width: 76rem; margin: 0 auto; padding: var(--space-5) var(--space-4) var(--space-8); }
.page-narrow { max-width: 34rem; }
.page-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-5); }
.page-head p { color: var(--ink-2); margin-top: var(--space-2); }
.section { margin-top: var(--space-7); }
.section > h2 { margin-bottom: var(--space-3); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-3); }

.footer { color: var(--ink-3); font-size: var(--step--1); border-top: 1px solid var(--line); }
.footer-inner { max-width: 76rem; margin: 0 auto; padding: var(--space-4); display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); justify-content: space-between; }

/* ---------- The plate ---------- */
.plate {
  position: relative;
  display: inline-flex; flex-direction: column; justify-content: center;
  background: var(--enamel-700);
  color: var(--on-enamel);
  border-radius: var(--radius-plate);
  padding: 18px 40px 16px;
  box-shadow: var(--shadow-plate);
  min-width: 11rem;
  isolation: isolate;
}
/* white keyline fired into the enamel */
.plate::before {
  content: ""; position: absolute; inset: 6px; z-index: -1;
  border: 2px solid rgba(255, 255, 255, 0.92); border-radius: 9px; pointer-events: none;
}
/* two screw heads */
.plate::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 19px 50%, #eef2fb 0 3px, #7c8db8 3.5px 4.5px, transparent 5px),
    radial-gradient(circle at calc(100% - 19px) 50%, #eef2fb 0 3px, #7c8db8 3.5px 4.5px, transparent 5px);
}
.plate-number { font-family: var(--font-sign); font-weight: 800; font-size: var(--step-4); line-height: 1; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; padding-top: 0.08em; }
.plate-name { font-family: var(--font-sign); font-weight: 600; font-size: var(--step-0); color: var(--on-enamel-2); margin-top: 6px; }
.plate-name .bi-as { color: var(--on-enamel-2); }
.plate--lg { padding: 26px 56px 22px; }
.plate--lg .plate-number { font-size: clamp(3rem, 14vw, 5.5rem); }
.plate--lg .plate-name { font-size: var(--step-2); }
.plate--lg::after {
  background:
    radial-gradient(circle at 24px 50%, #eef2fb 0 4px, #7c8db8 4.5px 6px, transparent 6.5px),
    radial-gradient(circle at calc(100% - 24px) 50%, #eef2fb 0 4px, #7c8db8 4.5px 6px, transparent 6.5px);
}
/* inline plate for lists and tables */
.chip-plate {
  display: inline-block; position: relative;
  background: var(--enamel-700); color: var(--on-enamel);
  font-family: var(--font-sign); font-weight: 800; font-size: 0.9rem; letter-spacing: 0.02em;
  line-height: 1; padding: 6px 9px 4px; border-radius: 5px;
  box-shadow: inset 0 0 0 2px var(--enamel-700), inset 0 0 0 3px rgba(255, 255, 255, 0.85);
  white-space: nowrap; text-decoration: none; font-variant-numeric: tabular-nums;
}
a.chip-plate:hover { color: var(--on-enamel); background: var(--enamel-600); box-shadow: inset 0 0 0 2px var(--enamel-600), inset 0 0 0 3px #fff; }

/* ---------- Points (marigold only) ---------- */
.points {
  display: inline-flex; align-items: baseline; gap: 0.3em;
  background: var(--marigold); color: var(--marigold-ink);
  font-family: var(--font-sign); font-weight: 800; font-variant-numeric: tabular-nums;
  padding: 0.12em 0.45em 0.02em; border-radius: 5px; line-height: 1.25; white-space: nowrap;
}
.points small { font-weight: 700; font-size: 0.62em; }
.points--plain { background: var(--marigold-100); }
.points-text { color: var(--marigold-text); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--enamel-700); --btn-fg: #fff; --btn-border: var(--enamel-700);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--tap); padding: 10px 20px;
  background: var(--btn-bg); color: var(--btn-fg);
  border: 2px solid var(--btn-border); border-radius: var(--radius);
  font: 600 var(--step-0)/1.2 var(--font-ui); text-align: center; text-decoration: none;
  cursor: pointer; touch-action: manipulation;
  transition: background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), transform 120ms var(--ease-out);
}
.btn:hover { --btn-bg: var(--enamel-600); --btn-border: var(--enamel-600); color: var(--btn-fg); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { --btn-bg: var(--surface-2); --btn-fg: var(--ink-3); --btn-border: var(--line); cursor: not-allowed; transform: none; }
.btn--quiet { --btn-bg: var(--surface); --btn-fg: var(--enamel-700); --btn-border: var(--enamel-200); }
.btn--quiet:hover { --btn-bg: var(--enamel-50); --btn-fg: var(--enamel-700); --btn-border: var(--enamel-600); }
.btn--on-enamel { --btn-bg: #fff; --btn-fg: var(--enamel-900); --btn-border: #fff; }
.btn--on-enamel:hover { --btn-bg: var(--enamel-100); --btn-fg: var(--enamel-900); --btn-border: var(--enamel-100); }
.btn--danger { --btn-bg: var(--surface); --btn-fg: var(--bad); --btn-border: #e9b4ae; }
.btn--danger:hover { --btn-bg: var(--bad-100); --btn-fg: var(--bad); --btn-border: var(--bad); }
.btn--big { min-height: 64px; font-size: var(--step-1); padding: 12px 24px; }
.btn--block { display: flex; width: 100%; }
.btn .bi-as { opacity: 0.85; }
.btn.is-busy { position: relative; color: transparent; }
.btn.is-busy::after {
  content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 3px solid currentColor; border-color: var(--btn-fg) transparent var(--btn-fg) transparent;
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.link-button { background: none; border: 0; padding: var(--space-2) 0; font: inherit; font-weight: 600; color: var(--enamel-700); cursor: pointer; min-height: 40px; }
.link-button:hover { text-decoration: underline; }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.actions-stack { display: grid; gap: var(--space-3); }

/* ---------- Forms ---------- */
.form { display: grid; gap: var(--space-4); }
.field { display: grid; gap: 6px; }
.field > label, .label { font-weight: 600; color: var(--ink); }
.hint { color: var(--ink-3); font-size: var(--step--1); }
.input, .select, .textarea {
  width: 100%; min-height: var(--tap);
  padding: 10px 12px;
  background: var(--surface); color: var(--ink);
  border: 1.5px solid var(--line-strong); border-radius: var(--radius);
  font: 400 var(--step-0)/1.3 var(--font-ui);
  transition: border-color 150ms var(--ease-out), box-shadow 150ms var(--ease-out);
}
.textarea { min-height: 6rem; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: #6b7390; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--enamel-700); box-shadow: 0 0 0 3px var(--enamel-200); }
.input[aria-invalid="true"] { border-color: var(--bad); }
.input--big { min-height: 60px; font-size: var(--step-2); font-variant-numeric: tabular-nums; }
.input--code { font-family: var(--font-sign); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.select { appearance: none; padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%; background-size: 6px 6px; background-repeat: no-repeat; }
.choice-row { display: grid; gap: var(--space-2); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-weight: 600; padding: 0; margin-bottom: var(--space-2); }

/* Role picker: three large radio choices. */
.roles { display: grid; gap: var(--space-2); }
.role-option { position: relative; display: block; }
.role-option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.role-option span.role-card {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  min-height: 64px; padding: var(--space-3) var(--space-4);
  border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface);
  font-weight: 600; transition: border-color 150ms var(--ease-out), background-color 150ms var(--ease-out);
}
.role-option input:hover + span.role-card { border-color: var(--enamel-300); }
.role-option input:focus-visible + span.role-card { outline: 3px solid var(--enamel-600); outline-offset: 2px; }
.role-option input:checked + span.role-card { border-color: var(--enamel-700); background: var(--enamel-50); box-shadow: inset 0 0 0 1px var(--enamel-700); }
.role-tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; }
.role-option input:checked + span.role-card .role-tick { border: 7px solid var(--enamel-700); }
/* The login page's role choice is three links, so it works without JavaScript. */
a.role-link { color: var(--ink); text-decoration: none; border-radius: var(--radius); }
a.role-link:hover span.role-card { border-color: var(--enamel-300); }
a.role-link[aria-current="page"] span.role-card { border-color: var(--enamel-700); background: var(--enamel-50); box-shadow: inset 0 0 0 1px var(--enamel-700); }
a.role-link[aria-current="page"] .role-tick { border: 7px solid var(--enamel-700); }
.otp-input { letter-spacing: 0.3em; text-align: center; font-size: var(--step-3); }

/* ---------- Messages ---------- */
.notice, .error-box {
  display: grid; gap: 4px;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius); border: 1px solid;
}
.notice { background: var(--ok-100); border-color: #a9d8bf; color: #0f4d30; }
.notice strong { color: var(--ok); }
.error-box { background: var(--bad-100); border-color: #f2b8b1; color: #7d1a14; }
.error-box ul { margin: 0; padding-left: 1.2em; }
.warn-box { padding: var(--space-3) var(--space-4); border-radius: var(--radius); background: var(--warn-100); border: 1px solid #f3c49a; color: #6a3300; }
.empty { padding: var(--space-5) var(--space-4); border: 1.5px dashed var(--line-strong); border-radius: var(--radius); color: var(--ink-2); background: var(--surface); }
.empty strong { display: block; color: var(--ink); margin-bottom: 2px; }

/* ---------- Status tags ---------- */
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: var(--step--1); font-weight: 700; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tag--ok { color: var(--ok); background: var(--ok-100); }
.tag--warn { color: var(--warn); background: var(--warn-100); }
.tag--bad { color: var(--bad); background: var(--bad-100); }
.tag--info { color: var(--enamel-700); background: var(--enamel-100); }
.tag--quiet { color: var(--ink-2); background: var(--surface-2); }

/* ---------- Panels, tables, figures ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-4); }
.panel + .panel { margin-top: var(--space-4); }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: var(--step--1); font-weight: 700; color: var(--ink-2); background: var(--surface-2); white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--enamel-50); }
.table td.num, .table th.num { text-align: right; white-space: nowrap; }
.table tfoot td { font-weight: 700; border-top: 2px solid var(--line-strong); border-bottom: 0; background: var(--surface-2); }

/* Key figures: a labelled row, not a grid of cards. */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.figure { padding: var(--space-4); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: -1px; margin-right: -1px; }
.figure dt { color: var(--ink-2); font-size: var(--step--1); font-weight: 600; }
.figure dd { margin: 6px 0 0; font-family: var(--font-sign); font-weight: 800; font-size: var(--step-3); line-height: 1.1; font-variant-numeric: tabular-nums; }
.figure dd small { display: block; font-family: var(--font-ui); font-weight: 400; font-size: var(--step--1); color: var(--ink-3); margin-top: 4px; }

.list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.list > li { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); display: flex; gap: var(--space-3); align-items: center; justify-content: space-between; flex-wrap: wrap; }
.list > li:last-child { border-bottom: 0; }
.list .meta { color: var(--ink-3); font-size: var(--step--1); }

.thumb { display: block; width: 72px; height: 54px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); }
.thumb-link { display: inline-block; border-radius: 6px; flex: none; }

/* ---------- Home ---------- */
.home-hero { background: var(--enamel-800); color: var(--on-enamel); }
.home-hero-inner {
  max-width: 76rem; margin: 0 auto; padding: var(--space-6) var(--space-4) var(--space-7);
  display: grid; gap: var(--space-6);
}
.home-hero .plate { align-self: start; justify-self: start; background: var(--enamel-600); }
.home-hero .plate .plate-number { letter-spacing: 0.01em; }
.home-hero h1 { font-size: clamp(1.9rem, 7vw, 3.4rem); font-weight: 800; max-width: 15ch; margin-top: var(--space-5); letter-spacing: -0.02em; }
.home-hero h1 .bi-as { font-size: 0.42em; font-weight: 600; color: var(--on-enamel-2); opacity: 1; margin-top: var(--space-2); }
.home-hero .lede { color: var(--on-enamel-2); max-width: 46ch; margin-top: var(--space-4); font-size: var(--step-1); line-height: 1.45; }
.home-logins { display: grid; gap: var(--space-2); margin-top: var(--space-5); max-width: 26rem; }
.home-logins .btn { justify-content: space-between; text-align: left; }
.home-register { margin-top: var(--space-4); color: var(--on-enamel-2); }
.home-register a { color: #fff; font-weight: 700; }
.home-register a:hover { color: var(--marigold-200); }

/* the weighing slip: what a sack of scrap is worth */
.slip {
  background: var(--surface); color: var(--ink);
  border-radius: var(--radius); padding: var(--space-5) var(--space-4);
  box-shadow: 0 2px 4px rgba(11, 26, 79, 0.25), 0 22px 40px -18px rgba(11, 26, 79, 0.7);
  align-self: start; max-width: 30rem;
}
.slip h2 { font-size: var(--step-1); }
.slip-row { display: grid; grid-template-columns: 1fr 8rem; gap: var(--space-3); margin-top: var(--space-4); }
.slip-result { margin-top: var(--space-5); padding-top: var(--space-4); border-top: 2px dashed var(--line-strong); display: grid; gap: var(--space-2); }
.slip-points { font-size: var(--step-4); justify-self: start; }
.slip h2 .bi-as { font-size: 0.72em; }
.slip-rupees { font-size: var(--step-1); font-weight: 600; }
.slip-foot { margin-top: var(--space-4); color: var(--ink-3); font-size: var(--step--1); }

.how { display: grid; gap: var(--space-6); margin-top: var(--space-5); }
.how-step { display: grid; gap: var(--space-3); align-content: start; }
.how-step h3 { display: flex; gap: var(--space-3); align-items: baseline; }
.how-step h3 .step-no { font-family: var(--font-sign); color: var(--enamel-700); font-weight: 800; }
.how-step p { color: var(--ink-2); max-width: 40ch; }
.how-visual { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-4); }
.sticker { display: flex; align-items: center; gap: var(--space-4); }
.sticker svg { width: 84px; height: 84px; flex: none; }
.mini-lines { display: grid; gap: 6px; font-variant-numeric: tabular-nums; }
.mini-lines div { display: flex; justify-content: space-between; gap: var(--space-3); }
.mini-lines .sum { border-top: 1px solid var(--line); padding-top: 6px; font-weight: 700; }
.bill-math { display: grid; gap: 6px; font-variant-numeric: tabular-nums; }
.bill-math div { display: flex; justify-content: space-between; gap: var(--space-3); }
.bill-math .due { border-top: 2px solid var(--ink); padding-top: 6px; font-weight: 800; font-family: var(--font-sign); font-size: var(--step-1); }

.rates-table td:first-child { font-weight: 600; }

/* ---------- Login, register, passwords ---------- */
.password-row { display: flex; gap: var(--space-2); }
.password-row .input { flex: 1 1 auto; min-width: 0; }
.password-toggle { flex: none; padding-left: 14px; padding-right: 14px; }
.password-toggle[aria-pressed="true"] { --btn-bg: var(--enamel-50); --btn-border: var(--enamel-600); }
.reset-form { max-width: 40rem; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.9em; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
.page-form { max-width: 42rem; }
.form-2 { display: grid; gap: var(--space-4); }
.demo-accounts summary { cursor: pointer; font-weight: 600; color: var(--enamel-700); min-height: 40px; display: flex; align-items: center; }
.demo-accounts .table-wrap { margin-top: var(--space-2); }
.map { height: 300px; border-radius: var(--radius); border: 1.5px solid var(--line-strong); background: var(--surface-2); z-index: 0; }
.map:focus-visible { outline: 3px solid var(--enamel-600); }
.map-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-2); }
.map-pin span {
  display: block; width: 28px; height: 28px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--enamel-700); box-shadow: inset 0 0 0 3px var(--enamel-700), inset 0 0 0 5px #fff, 0 2px 6px rgba(11, 26, 79, 0.45);
}
.leaflet-container { font-family: var(--font-ui); }
.leaflet-container a { color: var(--enamel-700); }

/* ---------- Gate sticker (printable) ---------- */
.sticker-sheet { margin-top: var(--space-6); display: flex; justify-content: center; }
.gate-sticker {
  width: min(100%, 30rem);
  background: #fff; border: 2px dashed var(--line-strong); border-radius: 12px;
  padding: var(--space-5); display: grid; gap: var(--space-5); justify-items: center;
}
.gate-plate { width: 100%; align-items: center; text-align: center; padding: 22px 48px 18px; }
.gate-plate .plate-number { font-size: clamp(2.6rem, 12vw, 4.2rem); }
.gate-plate .plate-name { font-size: var(--step-1); color: #fff; }
.gate-code { display: grid; grid-template-columns: auto 1fr; gap: var(--space-4); align-items: center; width: 100%; }
.gate-qr svg { display: block; width: 156px; height: 156px; }
.gate-text { display: grid; gap: 6px; }
.gate-token { font-family: var(--font-sign); font-weight: 800; font-size: var(--step-2); letter-spacing: 0.06em; color: var(--ink); white-space: nowrap; }
.gate-ward { font-weight: 600; color: var(--ink-2); }
.gate-help { color: var(--ink-3); font-size: var(--step--1); }
.gate-help[lang="as"] { font-family: var(--font-as); }

/* ---------- Picker ---------- */
.h-small { font-size: var(--step-1); margin-bottom: var(--space-2); }
.scan-cta { margin-top: var(--space-2); }
.figures--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.figures--3 .figure { padding: var(--space-3); }
.figures--3 .figure dd { font-size: var(--step-2); }
@media (min-width: 48rem) { .figures--3 .figure { padding: var(--space-4); } .figures--3 .figure dd { font-size: var(--step-3); } }
.list-main { display: flex; align-items: center; gap: var(--space-3); min-width: 0; flex: 1 1 14rem; }
.list-main .chip-plate { flex: none; }

.scanner { position: relative; aspect-ratio: 3 / 4; max-height: 62vh; width: 100%; background: var(--enamel-950); border-radius: var(--radius-plate); overflow: hidden; }
.scanner video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanner-frame { position: absolute; inset: 18%; border-radius: 16px; box-shadow: 0 0 0 999px rgba(11, 26, 79, 0.45); outline: 3px solid #fff; outline-offset: -3px; pointer-events: none; }
.scanner-idle { position: absolute; inset: 0; display: grid; place-items: center; background: var(--enamel-900); }
.scanner-idle[hidden] { display: none; }
.scan-status { margin-top: var(--space-3); color: var(--ink-2); min-height: 3em; }
.scan-fallbacks { display: grid; gap: var(--space-4); margin-top: var(--space-4); }
.file-button { position: relative; }

.house-head { display: flex; justify-content: center; }
.plate--house { width: 100%; align-items: center; text-align: center; padding: 22px 48px 18px; }
.plate--house .plate-number { font-size: clamp(2.6rem, 13vw, 3.6rem); }
.plate--house .plate-name { color: #fff; font-size: var(--step-1); }
.status-list { list-style: none; padding: 0; margin: var(--space-4) 0 0; display: grid; gap: var(--space-3); }
.status-list > li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.status-list .tag { font-size: var(--step-0); padding: 6px 10px; }
.status-list .tag .bi-as { font-size: 0.78em; }
.request-box { display: grid; gap: 6px; width: 100%; padding: var(--space-3) var(--space-4); background: var(--enamel-50); border: 1px solid var(--enamel-200); border-radius: var(--radius); }
.request-box .tag { justify-self: start; }

.collect-head { margin-bottom: var(--space-3); }
.collect-head p { display: flex; align-items: center; gap: var(--space-2); }
.collect-form { gap: var(--space-6); margin-top: var(--space-4); }
.collect-step { display: grid; gap: var(--space-3); }
.collect-step h2 { display: flex; align-items: flex-start; gap: var(--space-3); }
.step-no { display: inline-grid; place-items: center; flex: none; width: 1.7em; height: 1.7em; border-radius: 6px; background: var(--enamel-700); color: #fff; font-family: var(--font-sign); font-weight: 800; font-size: 0.8em; padding-top: 0.1em; }
.how-step h3 .step-no { width: auto; height: auto; background: none; color: var(--enamel-700); font-size: 1em; padding: 0; }
.photo-drop {
  display: grid; place-items: center; min-height: 12rem; cursor: pointer; overflow: hidden;
  border: 2px dashed var(--enamel-300); border-radius: var(--radius-plate); background: var(--enamel-50);
  transition: border-color 150ms var(--ease-out), background-color 150ms var(--ease-out);
}
.photo-drop:hover { border-color: var(--enamel-700); background: var(--enamel-100); }
.photo-drop:focus-within { outline: 3px solid var(--enamel-600); outline-offset: 2px; }
.photo-empty { display: inline-flex; align-items: center; gap: var(--space-3); color: var(--enamel-800); font-weight: 700; font-size: var(--step-1); }
.photo-empty[hidden], .photo-preview[hidden] { display: none; }
.photo-preview { width: 100%; max-height: 22rem; object-fit: contain; background: var(--ink); }
.line-entry { display: grid; grid-template-columns: 1fr; gap: var(--space-3); align-items: end; }
.line-add { min-height: 60px; }
.field-error { color: var(--bad); font-weight: 600; }
.field-error[hidden] { display: none; }
.lines { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); counter-reset: line; }
.lines:empty { display: none; }
.line { display: grid; grid-template-columns: 1fr auto auto 44px; align-items: center; gap: var(--space-3); padding: 6px 6px 6px var(--space-4); border-bottom: 1px solid var(--line); animation: line-in 220ms var(--ease-out); }
.line:last-child { border-bottom: 0; }
.line-name { font-weight: 600; }
.line-kg { color: var(--ink-2); text-align: right; }
.line-points { text-align: right; min-width: 5.5em; }
.line-remove { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: var(--ink-3); border-radius: 6px; cursor: pointer; }
.line-remove:hover { background: var(--bad-100); color: var(--bad); }
@keyframes line-in { from { opacity: 0; transform: translateY(-4px); } }
.lines-empty[hidden] { display: none; }
.lines-empty { padding: var(--space-3) var(--space-4); }
.total-bar {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap;
  margin: 0 calc(-1 * var(--space-4)); padding: var(--space-3) var(--space-4) calc(var(--space-3) + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -8px 20px -14px rgba(14, 22, 49, 0.45);
}
.total-bar { flex-wrap: nowrap; }
.total-figure { display: grid; gap: 2px; flex: none; }
.total-label { font-weight: 600; color: var(--ink-2); font-size: var(--step--1); }
.total-label .bi { flex-direction: row; gap: 6px; align-items: baseline; }
.total-points { font-size: var(--step-2); transform-origin: left center; }
.total-points.bump { animation: bump 320ms var(--ease-out); }
@keyframes bump { 30% { transform: scale(1.08); background: var(--marigold-200); } }
.total-bar .btn { flex: 1 1 auto; min-width: 0; padding-left: 12px; padding-right: 12px; }
@media (min-width: 30rem) { .total-points { font-size: var(--step-3); } }

@media (min-width: 30rem) {
  .line-entry { grid-template-columns: 1fr 9rem auto; }
}

/* ---------- Owner ---------- */
.gap-small { margin-top: var(--space-3); }
.owner-top { display: grid; gap: var(--space-4); }
.owner-figures .figure dd .points { font-size: 0.95em; }
.owner-grid { display: grid; gap: 0 var(--space-6); }
.bill-card { display: grid; gap: var(--space-2); }
.bill-card-head { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-sign); font-size: var(--step-1); }
.details-summary { cursor: pointer; font-weight: 600; color: var(--enamel-700); min-height: 40px; display: flex; align-items: center; }
.details-summary + .list, .details-summary + .empty { margin-top: var(--space-2); }
.day-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day { position: relative; display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 58px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--surface); }
.day-num { font-family: var(--font-sign); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.day-mark .icon { width: 20px; height: 20px; }
.day--done { background: var(--enamel-700); border-color: var(--enamel-700); box-shadow: inset 0 0 0 2px var(--enamel-700), inset 0 0 0 3.5px rgba(255, 255, 255, 0.85); }
.day--done .day-num, .day--done .day-mark { color: #fff; }
.day--missed { border-style: dashed; border-color: var(--line-strong); }
.day--missed .day-mark::after { content: ""; display: block; width: 14px; height: 2px; background: var(--warn); border-radius: 2px; margin-top: 8px; }
.day--before { background: var(--surface-2); border-color: transparent; }
.day--before .day-num { color: var(--ink-3); opacity: 0.6; }
.sales .list-main { flex-basis: 16rem; }

@media (min-width: 48rem) {
  .owner-top { grid-template-columns: minmax(16rem, 22rem) 1fr; align-items: stretch; }
  .owner-top .plate--house { height: 100%; }
  .owner-grid { grid-template-columns: 1fr 1fr; }
  .day-strip { grid-template-columns: repeat(14, 1fr); }
}

/* ---------- Coordinator ---------- */
.coord-grid { display: grid; gap: 0 var(--space-6); }
.section-first { margin-top: var(--space-2); }
.figure .of { font-size: 0.6em; color: var(--ink-3); font-weight: 700; }
.chip-cloud { display: flex; flex-wrap: wrap; gap: var(--space-2); padding: var(--space-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.nowrap { white-space: nowrap; }
.btn--small { min-height: 36px; padding: 4px 12px; font-size: var(--step--1); border-width: 1.5px; }
.inline-form { display: flex; align-items: center; gap: var(--space-2); margin: 0; flex-wrap: wrap; }
.input--narrow { width: 7.5rem; min-height: 40px; padding: 6px 10px; }
.rates-edit td { vertical-align: middle; }
.rates-edit tr.is-retired td { color: var(--ink-3); background: var(--surface-2); }
.filters { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); align-items: end; }
.filters-actions { display: flex; gap: var(--space-2); }
.result-count { margin: var(--space-4) 0 var(--space-2); color: var(--ink-2); }
.pickup-table td { vertical-align: top; }
.mini-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-variant-numeric: tabular-nums; }
.photo-audit summary { list-style: none; cursor: zoom-in; border-radius: 6px; }
.photo-audit summary::-webkit-details-marker { display: none; }
.photo-audit[open] summary { cursor: zoom-out; }
.photo-audit[open] summary .thumb { outline: 3px solid var(--enamel-600); }
.photo-audit figure { margin: var(--space-2) 0 0; width: min(28rem, 70vw); }
.photo-audit figure img { display: block; width: 100%; border-radius: 6px; border: 1px solid var(--line); background: var(--ink); }
.photo-audit figcaption { margin-top: 6px; font-size: var(--step--1); color: var(--ink-2); }
.month-picker { display: flex; flex-wrap: wrap; align-items: end; gap: var(--space-3); }
.month-picker .field { min-width: 12rem; }
.billing-table tr.is-billed td { background: var(--surface-2); }
.billing-table tr.is-billed:hover td { background: var(--enamel-50); }
.generate { margin-top: var(--space-4); display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; justify-content: space-between; border-color: var(--enamel-200); background: var(--enamel-50); }
.generate p { margin-top: 4px; max-width: 60ch; }

@media (min-width: 60rem) {
  .coord-grid { grid-template-columns: 1fr 1fr; }
}

@media print {
  @page { margin: 12mm; }
  body { background: #fff; display: block; }
  .shell, .footer, .no-print { display: none !important; }
  .page { padding: 0; }
  .sticker-sheet { margin-top: 0; }
  .gate-sticker { width: 120mm; break-inside: avoid; }
  .plate, .chip-plate { -webkit-print-color-adjust: exact; print-color-adjust: exact; box-shadow: none; }
}

@media (min-width: 48rem) {
  .page { padding-top: var(--space-6); }
  h1 { font-size: var(--step-4); }
  .roles { grid-template-columns: repeat(3, 1fr); }
  .form-2 { grid-template-columns: 1fr 1fr; }
  .how { grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
}
@media (min-width: 60rem) {
  .home-hero-inner { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); align-items: start; gap: var(--space-7); padding-top: var(--space-6); padding-bottom: var(--space-7); }
  .home-hero h1 { max-width: 20ch; margin-top: var(--space-5); }
  .home-hero .plate--lg { padding: 20px 48px 16px; }
  .home-hero .plate--lg .plate-number { font-size: 4.2rem; }
  .home-logins { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: none; }
  .home-logins .btn--big { min-height: 72px; padding: 10px 16px; font-size: var(--step-0); }
  .slip { justify-self: end; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
