/* Al-Haqq: app stylesheet (admin dashboard, pilgrim portal, sign-in, feedback form).
   Same navy + gold as the website. Light and dark themes. */

/* ---------- Fonts (all SIL Open Font License, self-hosted) ---------- */
@font-face { font-family: "Marcellus"; src: url("../fonts/marcellus-latin.woff2") format("woff2"); font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20B9, U+2122, U+2212; }
@font-face { font-family: "Marcellus"; src: url("../fonts/marcellus-latin-ext.woff2") format("woff2"); font-display: swap; unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: "Hind"; font-weight: 400; src: url("../fonts/hind-latin-400.woff2") format("woff2"); font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20B9, U+2122; }
@font-face { font-family: "Hind"; font-weight: 500; src: url("../fonts/hind-latin-500.woff2") format("woff2"); font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20B9, U+2122; }
@font-face { font-family: "Hind"; font-weight: 600; src: url("../fonts/hind-latin-600.woff2") format("woff2"); font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20B9, U+2122; }
@font-face { font-family: "Hind"; font-weight: 400; src: url("../fonts/hind-devanagari-400.woff2") format("woff2"); font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: "Hind"; font-weight: 600; src: url("../fonts/hind-devanagari-600.woff2") format("woff2"); font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: "Noto Sans Telugu"; font-weight: 400; src: url("../fonts/noto-telugu-400.woff2") format("woff2"); font-display: swap; unicode-range: U+0951-0952, U+0964-0965, U+0C00-0C7F, U+1CDA, U+200C-200D, U+25CC; }
@font-face { font-family: "Noto Sans Telugu"; font-weight: 600; src: url("../fonts/noto-telugu-600.woff2") format("woff2"); font-display: swap; unicode-range: U+0951-0952, U+0964-0965, U+0C00-0C7F, U+1CDA, U+200C-200D, U+25CC; }
@font-face { font-family: "Noto Nastaliq Urdu"; font-weight: 400; src: url("../fonts/noto-nastaliq-400.woff2") format("woff2"); font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }

:root {
  --navy: #082341;
  --navy-2: #12355f;
  --gold: #f5b41a;
  --gold-text: #8a5f00;
  --bg: #f2f4f1;
  --surface: #ffffff;
  --surface-2: #f7f8f6;
  --ink: #18253a;
  --ink-soft: #536074;
  --line: #d9dee5;
  --ok: #1e7a4c;
  --ok-bg: #e5f4ec;
  --warn: #8a5f00;
  --warn-bg: #fff4d6;
  --bad: #b3261e;
  --bad-bg: #fde8e6;
  --info-bg: #e8eef7;

  --font-display: "Marcellus", Georgia, serif;
  --font-body: "Hind", "Noto Sans Telugu", system-ui, "Segoe UI", sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --side: 15.5rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .app--admin {
    --bg: #0a1626;
    --surface: #102238;
    --surface-2: #142a44;
    --ink: #e6ebf2;
    --ink-soft: #a3b0c2;
    --line: #22395a;
    --gold-text: #f5c64f;
    --ok: #6fd39b; --ok-bg: #12382a;
    --warn: #f5c64f; --warn-bg: #3a2f10;
    --bad: #ff8a80; --bad-bg: #3d1a19;
    --info-bg: #17304f;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.55 var(--font-body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1.15; }
p { margin: 0 0 .75rem; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 200; background: var(--gold); color: var(--navy); padding: .6rem 1rem; border-radius: var(--radius-sm); font-weight: 600; }
.skip-link:focus { top: 1rem; }
.muted { color: var(--ink-soft); }
.small { font-size: .92rem; }
.lead { font-size: 1.05rem; max-width: 46rem; margin-bottom: 1.25rem; }
.icon { flex: none; }
.no-scroll { overflow: hidden; }
.inline { display: inline; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 2.75rem; padding: .55rem 1.1rem; border: 1.5px solid transparent; border-radius: 999px;
  font: 600 .98rem/1.1 var(--font-body); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn--sm { min-height: 2.25rem; padding: .35rem .85rem; font-size: .9rem; }
.btn--lg { min-height: 3.25rem; font-size: 1.05rem; }
.btn--block { width: 100%; }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover:not(:disabled) { background: var(--navy-2); }
.btn--gold { background: var(--gold); color: var(--navy); }
.btn--gold:hover { background: #ffc642; }
.btn--ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn--ghost:hover:not(:disabled) { border-color: var(--ink-soft); }
.btn--danger { background: transparent; border-color: var(--bad); color: var(--bad); }
.btn--danger:hover { background: var(--bad-bg); }
.btn--icon { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink-soft); cursor: pointer; }
.btn--icon:hover { background: var(--bad-bg); color: var(--bad); }
.app--admin .btn--navy { box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.link-btn { background: none; border: 0; padding: 0; color: var(--ink-soft); text-decoration: underline; cursor: pointer; font-size: .9rem; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1rem; }
.form--wide { max-width: 52rem; }
.form--narrow { max-width: 28rem; }
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 1rem; }
.form legend { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: .25rem; color: var(--ink); }
.field { display: grid; gap: .35rem; min-width: 0; }
.field > span:first-child { font-size: .92rem; font-weight: 500; color: var(--ink-soft); }
.field-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; }
.field-row > .field { flex: 1 1 10rem; }
.field--grow { flex: 2 1 14rem !important; }
.field--sm { flex: 0 1 7rem !important; }
input, select, textarea {
  width: 100%; min-height: 2.75rem; padding: .55rem .8rem;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font: 400 1rem/1.4 var(--font-body);
}
textarea { min-height: auto; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: auto; min-height: 0; accent-color: var(--navy); }
input[type="file"] { padding: .45rem; background: var(--surface-2); }
input[type="date"] { color-scheme: inherit; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(245,180,26,.35); }
.app--admin input:focus { border-color: var(--gold); }
.form__actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.form--inline { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; margin-top: 1rem; }
.form--inline .field { flex: 1 1 8rem; }
.form--inline .panel__title { flex-basis: 100%; }
.check { display: inline-flex; gap: .55rem; align-items: flex-start; font-size: .95rem; cursor: pointer; }
.check input { margin-top: .3rem; }
.check--big { font-weight: 500; font-size: 1rem; }
.input-sm { min-height: 2.25rem; padding: .3rem .55rem; font-size: .93rem; }
.input-num { width: 7rem; text-align: right; }
.input-xs { width: 5rem; }
.pw { position: relative; display: block; }
.pw input { padding-right: 2.9rem; }
.pw__toggle { position: absolute; right: .3rem; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 2.3rem; height: 2.3rem; border: 0; background: none; color: var(--ink-soft); border-radius: 50%; cursor: pointer; }
.pw__toggle.is-on { color: var(--navy); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.file-current { display: flex; gap: 1rem; align-items: center; margin-bottom: .35rem; }
.file-current a { display: inline-flex; gap: .35rem; align-items: center; }
.copy-field { display: flex; gap: .5rem; margin-bottom: .75rem; }
.copy-field input { font-size: .9rem; }

/* ---------- Alerts, pills, stars ---------- */
.alert { padding: .8rem 1rem; border-radius: var(--radius-sm); margin: 0 0 1rem; border: 1px solid transparent; }
.alert--success { background: var(--ok-bg); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.alert--error { background: var(--bad-bg); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.alert--info { background: var(--info-bg); color: var(--ink); }
.alert p { margin-bottom: .5rem; }
.credentials { font-size: 1rem; color: var(--ink); background: var(--surface); padding: .6rem .8rem; border-radius: var(--radius-sm); line-height: 1.7; }
.credentials code { font-size: 1.1rem; letter-spacing: .04em; background: var(--warn-bg); padding: .05rem .35rem; border-radius: 4px; }
.pill { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 600; line-height: 1.6; white-space: nowrap; vertical-align: middle; background: var(--surface-2); color: var(--ink-soft); }
.pill--approved, .pill--ongoing { background: var(--ok-bg); color: var(--ok); }
.pill--pending, .pill--planned { background: var(--warn-bg); color: var(--warn); }
.pill--rejected, .pill--cancelled { background: var(--bad-bg); color: var(--bad); }
.pill--completed, .pill--draft { background: var(--surface-2); color: var(--ink-soft); border: 1px solid var(--line); }
.stars { color: var(--gold); letter-spacing: .05em; }
.stars__off { color: var(--line); }
.due { color: var(--bad); font-size: .85rem; font-weight: 600; }

/* ---------- Auth pages ---------- */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem 1rem; background: var(--navy); background-image: radial-gradient(circle at 80% -10%, rgba(245,180,26,.18), transparent 45%); }
.auth-card { width: min(100%, 26rem); background: #fff; color: var(--ink); border-radius: 18px; padding: 2rem 1.75rem; box-shadow: 0 30px 60px -30px rgba(0,0,0,.5); }
.auth-card--wide { width: min(100%, 34rem); }
.auth-card__logo { width: 84px; margin: 0 auto 1.25rem; }
.auth-card h1 { font-family: var(--font-display); font-size: 1.9rem; color: var(--navy); text-align: center; margin-bottom: .35rem; }
.auth-card > .muted { text-align: center; margin-bottom: 1.25rem; }
.auth-card__foot { margin-top: 1.25rem; text-align: center; font-size: .93rem; color: var(--ink-soft); }
.auth-card__foot a { color: var(--navy); }

/* ---------- Admin shell ---------- */
.app--admin { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.topbar { display: none; }
.sidebar {
  position: sticky; top: 0; height: 100vh; align-self: start; overflow-y: auto;
  display: flex; flex-direction: column; gap: 1rem; padding: 1.1rem .8rem;
  background: var(--navy); color: #fff;
}
.sidebar__brand { display: flex; align-items: center; gap: .6rem; padding: .25rem .5rem 1rem; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar__brand span { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.1; }
.sidebar__brand small { display: block; font-family: var(--font-body); font-size: .8rem; color: var(--gold); }
.sidebar nav { display: grid; gap: .15rem; }
.nav-link { display: flex; align-items: center; gap: .7rem; padding: .6rem .7rem; border-radius: var(--radius-sm); text-decoration: none; color: rgba(255,255,255,.82); font-weight: 500; }
.nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-link.is-active { background: rgba(245,180,26,.14); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
.nav-link.is-active .icon { color: var(--gold); }
.nav-link--button { width: 100%; background: none; border: 0; cursor: pointer; text-align: left; }
.sidebar__foot { margin-top: auto; display: grid; gap: .15rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar__user { padding: 0 .7rem .5rem; font-weight: 600; margin: 0; }
.sidebar__user small { display: block; font-weight: 400; color: rgba(255,255,255,.6); }

.main { padding: clamp(1rem, 3vw, 2.25rem); min-width: 0; max-width: 84rem; }
.page-title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.25rem; }
.page-title h1 { font-family: var(--font-display); font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.3rem); }
.page-title p { margin: .35rem 0 0; }
.page-title__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.crumbs { font-size: .9rem; color: var(--ink-soft); margin-bottom: .35rem; }
.crumbs a { color: inherit; }

@media (max-width: 900px) {
  .app--admin { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; align-content: start; }
  .topbar { display: flex; align-items: center; gap: .5rem; position: sticky; top: 0; z-index: 40; padding: .5rem .75rem; background: var(--navy); color: #fff; }
  .topbar__menu { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; background: none; border: 0; color: #fff; cursor: pointer; }
  .topbar__brand { display: flex; align-items: center; gap: .5rem; text-decoration: none; font-family: var(--font-display); font-size: 1.15rem; }
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 60; width: min(80vw, 18rem); translate: -100% 0; transition: translate .2s ease; box-shadow: 0 0 0 100vmax rgba(0,0,0,0); }
  .sidebar.is-open { translate: 0 0; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); }
}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }

/* ---------- Panels, stats, lists, tables ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1rem, 2.5vw, 1.5rem); margin-bottom: 1.25rem; }
.panel__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem 1rem; margin-bottom: 1rem; }
.panel__head h2, .panel__title { font-family: var(--font-display); font-size: 1.3rem; }
.panel__title { margin-bottom: .75rem; }
.panel__head a { font-size: .92rem; color: var(--ink-soft); display: inline-flex; align-items: center; gap: .3rem; }
.panel__sub { font-family: var(--font-display); font-size: 1.1rem; margin: 1.5rem 0 .5rem; }
.empty-state { color: var(--ink-soft); }
.empty-state a { color: var(--ink); font-weight: 600; }
.stack { display: grid; gap: 0; align-content: start; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.25rem; }
.grid-2--wide-left { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
@media (max-width: 1000px) { .grid-2, .grid-2--wide-left { grid-template-columns: minmax(0, 1fr); } }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stats--sm { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
.stat { display: grid; gap: .1rem; padding: 1rem 1.15rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
a.stat:hover { border-color: var(--ink-soft); }
.stat__value { font-family: var(--font-display); font-size: 1.85rem; line-height: 1.1; color: var(--ink); font-variant-numeric: lining-nums; }
.stat__label { font-weight: 600; }
.stat__sub { font-size: .87rem; color: var(--ink-soft); }
.stat--alert { border-color: var(--gold); box-shadow: inset 4px 0 0 var(--gold); }

.list { display: grid; }
.list__row { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .75rem 0; border-top: 1px solid var(--line); }
.list__row:first-child { border-top: 0; padding-top: 0; }
.list__row > a { display: grid; gap: .05rem; text-decoration: none; min-width: 0; }
.list__row > a:has(> .icon) { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.list__row > a:hover strong { text-decoration: underline; }
.list__row--stack { flex-direction: column; align-items: flex-start; gap: .25rem; }
.list__meta { display: flex; gap: .5rem; align-items: center; color: var(--ink-soft); font-size: .92rem; white-space: nowrap; }
.quote { color: var(--ink); font-size: .95rem; }

.table-wrap { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap.panel { padding: 0; }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { padding: .7rem .9rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-weight: 600; font-size: .85rem; color: var(--ink-soft); background: var(--surface-2); white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table a { text-decoration: none; }
.table a:hover { text-decoration: underline; }
.table--roster td { vertical-align: middle; }
.row-actions { display: flex; gap: .35rem; align-items: center; justify-content: flex-end; white-space: nowrap; }

.tabs { display: flex; gap: .25rem; margin-bottom: 1rem; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { padding: .55rem .9rem; text-decoration: none; color: var(--ink-soft); border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 500; }
.tabs a.is-active { color: var(--ink); border-bottom-color: var(--gold); }
.search { display: flex; gap: .5rem; align-items: center; margin-bottom: 1rem; max-width: 40rem; }
.search a { color: var(--ink-soft); font-size: .92rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; }
.card { display: flex; flex-direction: column; gap: .3rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; }
.card__head { display: flex; justify-content: space-between; align-items: center; }
.card__title { font-family: var(--font-display); font-size: 1.35rem; }
.card__price { font-family: var(--font-display); font-size: 1.5rem; color: var(--gold-text); margin: 0; }
.card__actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; padding-top: .75rem; }

.add-pilgrim { display: grid; gap: .5rem; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.add-pilgrim summary { cursor: pointer; font-weight: 600; padding: .35rem 0; }
.danger-zone { margin: 2rem 0 1rem; padding-top: 1.25rem; border-top: 1px dashed var(--line); }

.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .9rem; }
.doc-slot { display: grid; gap: .45rem; align-content: start; padding: 1rem; border: 1.5px dashed var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.doc-slot--approved { border-style: solid; border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); background: var(--surface); }
.doc-slot--pending { border-style: solid; border-color: var(--gold); background: var(--surface); }
.doc-slot--rejected { border-style: solid; border-color: var(--bad); }
.doc-slot__label { font-weight: 600; margin: 0; }
.doc-slot__file { display: inline-flex; gap: .35rem; align-items: center; }
.doc-slot__review { display: grid; gap: .4rem; }

.feedback-list { display: grid; gap: 0; }
.feedback-item__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; }
.feedback-item__actions { display: flex; gap: .35rem; align-items: center; }
.feedback-item__text { margin: .75rem 0; font-size: 1.05rem; max-width: 60ch; }
.feedback-item__text[lang="ur"] { font-family: "Noto Nastaliq Urdu", serif; line-height: 2.2; }
.feedback-item__scores { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; font-size: .88rem; }
.feedback-item__scores dt { color: var(--ink-soft); }

/* ---------- Roll-call ---------- */
.pick-list { display: grid; gap: .75rem; max-width: 36rem; }
.pick { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.pick strong { font-size: 1.1rem; }
.pick span { color: var(--ink-soft); display: flex; gap: .5rem; align-items: center; }
.rollcall { max-width: 40rem; }
.rollcall__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.rollcall h1 { font-family: var(--font-display); font-size: 1.6rem; margin-bottom: .75rem; }
.sync-pill { margin: 0; padding: .25rem .75rem; border-radius: 999px; font-size: .85rem; font-weight: 600; background: var(--surface-2); color: var(--ink-soft); }
.sync-pill[data-kind="ok"] { background: var(--ok-bg); color: var(--ok); }
.sync-pill[data-kind="local"] { background: var(--warn-bg); color: var(--warn); }
.sync-pill[data-kind="error"] { background: var(--bad-bg); color: var(--bad); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { padding: .4rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); cursor: pointer; font-size: .92rem; }
.chip:hover { border-color: var(--ink-soft); }
.rollcall__bar { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: .75rem 0 .5rem; background: var(--bg); }
@media (max-width: 900px) { .rollcall__bar { top: 3.75rem; } }
.rollcall__bar h1 { margin-bottom: .1rem; font-size: 1.35rem; }
.rollcall__count { margin: 0; font-size: 1.05rem; }
.rollcall__count span:first-child { font-family: var(--font-display); font-size: 1.6rem; }
.rollcall__missing { color: var(--bad); font-weight: 600; margin-left: .5rem; }
.progress { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; margin: .4rem 0 1rem; }
.progress span { display: block; height: 100%; width: 0; background: var(--gold); border-radius: inherit; transition: width .25s ease; }
.rollcall__search { margin-bottom: 1rem; }
.rollcall__group { font-family: var(--font-body); font-weight: 600; font-size: .9rem; color: var(--ink-soft); margin: 1rem 0 .5rem; }
.roster { display: grid; gap: .5rem; }
.roster li { display: flex; gap: .5rem; align-items: stretch; }
.roster__item {
  flex: 1; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .9rem; align-items: center;
  min-height: 3.75rem; padding: .7rem 1rem; text-align: left; cursor: pointer;
  background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); border-radius: var(--radius); font: inherit;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.roster__tick { grid-row: 1 / 3; width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 2px solid var(--line); position: relative; }
.roster__name { font-size: 1.08rem; font-weight: 600; }
.roster__meta { grid-column: 2; font-size: .85rem; color: var(--ink-soft); }
.roster__item.is-here { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.roster__item.is-here .roster__tick { background: var(--ok); border-color: var(--ok); }
.roster__item.is-here .roster__tick::after { content: ""; position: absolute; left: .55rem; top: .3rem; width: .45rem; height: .85rem; border: solid #fff; border-width: 0 3px 3px 0; rotate: 45deg; }
.roster__call { display: grid; place-items: center; padding: 0 1rem; border-radius: var(--radius); background: var(--surface); border: 1.5px solid var(--line); text-decoration: none; font-weight: 600; color: var(--ink); }
.roster__empty { padding: 1rem; color: var(--ink-soft); }
.roster--here .roster__item { min-height: 3rem; }

/* ---------- Portal ---------- */
.app--portal { padding-bottom: calc(4.25rem + env(safe-area-inset-bottom)); }
.portal-bar { position: sticky; top: 0; z-index: 30; display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .55rem 1rem; background: var(--navy); color: #fff; }
.portal-bar__brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; }
.portal-bar__brand span { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.1; }
.portal-bar__brand small { display: block; font-family: var(--font-body); font-size: .78rem; color: var(--gold); }
.portal-bar__out .nav-link { padding: .45rem .6rem; font-size: .9rem; }
.net-status { margin: 0; padding: .2rem .7rem; border-radius: 999px; background: var(--gold); color: var(--navy); font-size: .8rem; font-weight: 600; }
.tabbar { position: fixed; inset: auto 0 0 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar__item { display: grid; justify-items: center; gap: .1rem; padding: .55rem .25rem .5rem; text-decoration: none; color: var(--ink-soft); font-size: .74rem; font-weight: 500; }
.tabbar__item.is-active { color: var(--navy); }
.tabbar__item.is-active .icon { color: var(--gold-text); }
@media (min-width: 900px) {
  .app--portal { padding-bottom: 0; }
  .tabbar { position: sticky; top: 3.4rem; inset: auto; grid-template-columns: repeat(5, auto); justify-content: center; gap: .5rem; border-top: 0; border-bottom: 1px solid var(--line); z-index: 20; }
  .tabbar__item { grid-auto-flow: column; gap: .4rem; font-size: .95rem; padding: .75rem 1rem; border-bottom: 2px solid transparent; }
  .tabbar__item.is-active { border-bottom-color: var(--gold); }
}
.main--portal { max-width: 44rem; margin: 0 auto; padding: 1.25rem 1rem 2rem; }
.portal-hello { margin: .5rem 0 1.25rem; }
.portal-hello h1 { font-family: var(--font-display); font-size: 1.85rem; color: var(--navy); }
.countdown { margin: .4rem 0 0; color: var(--ink-soft); }
.countdown strong { font-family: var(--font-display); font-size: 1.5rem; color: var(--gold-text); font-weight: 400; }
.trip-card { position: relative; overflow: hidden; margin-bottom: 1.25rem; padding: 1.4rem 1.4rem 1.5rem; border-radius: 16px; background: var(--navy); color: #fff; }
.trip-card::after { content: ""; position: absolute; right: -4rem; top: -1.5rem; width: 8rem; height: 10rem; border: 1.5px solid rgba(245,180,26,.35); border-radius: 50% 50% 0 0 / 35% 35% 0 0; pointer-events: none; }
.trip-card__type { color: var(--gold); font-size: .9rem; margin: 0; }
.trip-card__name { font-family: var(--font-display); font-size: 1.55rem; margin: .15rem 0 1rem; max-width: 80%; }
.trip-card__facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); gap: .75rem 1rem; }
.trip-card__facts dt { font-size: .82rem; color: rgba(255,255,255,.65); }
.trip-card__facts dd { font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.tile { display: grid; gap: .2rem; align-content: start; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.tile .icon { width: 26px; height: 26px; color: var(--gold-text); margin-bottom: .3rem; }
.tile span { font-size: .87rem; color: var(--ink-soft); }
.doc-list { display: grid; gap: .5rem; margin-top: 1rem; }
.doc-list__item { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center; padding: .8rem .9rem; border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; }
.doc-list__item:hover { border-color: var(--ink-soft); }
.doc-list__item small { display: block; color: var(--ink-soft); font-size: .85rem; }
.doc-list__icon { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 8px; background: var(--warn-bg); color: var(--gold-text); }
.doc-list__saved { display: inline-flex; gap: .25rem; align-items: center; font-size: .8rem; font-weight: 600; color: var(--ok); white-space: nowrap; }
.doc-list__saved .icon { width: 16px; height: 16px; }
.upload-list { display: grid; }
.upload-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem 0; border-top: 1px solid var(--line); }
.upload-row:first-child { border-top: 0; }
.upload-row__info { display: grid; gap: .25rem; justify-items: start; }
.upload-row__note { font-size: .88rem; color: var(--bad); }
.upload-row__ok { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--ok-bg); color: var(--ok); }
.upload-btn { cursor: pointer; position: relative; }
.upload-btn.is-busy { opacity: .6; pointer-events: none; }
.upload-btn:focus-within { outline: 3px solid var(--gold); outline-offset: 2px; }

.checklist__summary { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; position: sticky; top: 3.4rem; z-index: 10; }
.checklist__summary p { margin: 0; }
.checklist__summary .progress { flex: 1 1 10rem; margin: 0; }
@media (min-width: 900px) { .checklist__summary { top: 6.6rem; } }
.checklist__group h2 { font-family: var(--font-display); font-size: 1.25rem; margin-bottom: .5rem; }
.tick { display: flex; gap: .8rem; align-items: center; padding: .65rem 0; border-top: 1px solid var(--line); cursor: pointer; }
li:first-child > .tick { border-top: 0; }
.tick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tick__box { display: grid; place-items: center; flex: none; width: 1.6rem; height: 1.6rem; border: 2px solid var(--line); border-radius: 6px; color: transparent; transition: background-color .15s, border-color .15s; }
.tick__box .icon { width: 16px; height: 16px; stroke-width: 3; }
.tick input:checked + .tick__box { background: var(--navy); border-color: var(--navy); color: var(--gold); }
.tick input:checked + .tick__box .icon { animation: tick-pop .25s ease-out; }
.tick input:checked ~ .tick__text { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: var(--gold); }
.tick input:focus-visible + .tick__box { outline: 3px solid var(--gold); outline-offset: 2px; }
@keyframes tick-pop { from { scale: .3; } 70% { scale: 1.2; } to { scale: 1; } }
@media (prefers-reduced-motion: reduce) { .tick input:checked + .tick__box .icon { animation: none; } .progress span { transition: none; } }

/* ---------- Umrah guide (shared with public page) ---------- */
.steps { display: grid; gap: 1.5rem; counter-reset: none; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 1rem; }
.step__num { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--navy); color: var(--gold); font-family: var(--font-display); font-size: 1.25rem; }
.step__title { font-family: var(--font-display); font-size: 1.35rem; margin: .35rem 0 .6rem; color: var(--ink); }
.step__tips { display: grid; gap: .3rem; margin-top: .5rem; }
.step__tips li { position: relative; padding-left: 1.4rem; color: var(--ink-soft); font-size: .95rem; }
.step__tips li::before { content: "✤"; position: absolute; left: 0; color: var(--gold); }
.step__video { margin: .25rem 0 .9rem; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden; background: #000; }
.step__video iframe { width: 100%; height: 100%; border: 0; }
.video-facade { width: 100%; height: 100%; border: 0; cursor: pointer; background-size: cover; background-position: center; display: grid; place-items: center; }
.video-facade__play { width: 4rem; height: 4rem; border-radius: 50%; background: rgba(8,35,65,.85); position: relative; }
.video-facade__play::after { content: ""; position: absolute; left: 1.6rem; top: 1.25rem; border-style: solid; border-width: .75rem 0 .75rem 1.2rem; border-color: transparent transparent transparent var(--gold); }
.guide-note { margin-top: 1.5rem; padding: 1rem 1.2rem; border-left: 3px solid var(--gold); background: var(--warn-bg); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* ---------- Public feedback form ---------- */
.public-form { min-height: 100vh; background: var(--bg); }
.public-form__bar { display: flex; justify-content: center; padding: .85rem; background: var(--navy); }
.public-form__card { width: min(100% - 2rem, 38rem); margin: 1.5rem auto 3rem; padding: clamp(1.25rem, 4vw, 2.25rem); background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.public-form__card h1 { font-family: var(--font-display); font-size: clamp(1.7rem, 1.3rem + 1.5vw, 2.2rem); color: var(--navy); margin-bottom: .5rem; }
.lang-switch { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1.5rem; }
.lang-switch a { padding: .35rem .8rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: .95rem; color: var(--ink); }
.lang-switch a.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
.lang-switch a.lang-ur { font-family: "Noto Nastaliq Urdu", serif; font-size: .9rem; line-height: 2.4; padding: 0 .9rem; display: inline-flex; align-items: center; }
.trip-tag { display: inline-block; padding: .3rem .8rem; border-radius: 999px; background: var(--warn-bg); color: var(--gold-text); font-weight: 600; font-size: .92rem; margin: .5rem 0 1.25rem; }
.rate { border: 0; margin: 0; padding: 0; }
.rate legend { font-weight: 600; margin-bottom: .35rem; padding: 0; }
.rate--main legend { font-size: 1.1rem; }
.rate__stars { display: inline-flex; flex-direction: row-reverse; gap: .15rem; direction: ltr; }
.rate__stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rate__stars label { font-size: 2.3rem; line-height: 1; color: var(--line); cursor: pointer; padding: 0 .1rem; transition: color .1s; }
.rate--main .rate__stars label { font-size: 2.8rem; }
.rate__stars input:checked ~ label, .rate__stars label:hover, .rate__stars label:hover ~ label { color: var(--gold); }
.rate__stars input:focus-visible + label { outline: 3px solid var(--navy); border-radius: 6px; }
.more-ratings { padding: .75rem 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); display: grid; gap: .75rem; }
.more-ratings summary { cursor: pointer; font-weight: 600; color: var(--ink-soft); }
.more-ratings[open] { gap: 1rem; }
.more-ratings .rate__stars label { font-size: 1.9rem; }
.yesno { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.yesno legend { font-weight: 600; margin-bottom: .4rem; padding: 0; width: 100%; }
.yesno label { display: inline-flex; gap: .45rem; align-items: center; padding: .45rem .9rem; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.yesno label:has(input:checked) { border-color: var(--navy); background: var(--info-bg); }
.thanks { text-align: center; padding: 1.5rem 0; }
.thanks__mark { display: inline-grid; place-items: center; width: 4rem; height: 4rem; border-radius: 50%; background: var(--ok-bg); color: var(--ok); margin-bottom: 1rem; }
.thanks__mark .icon { width: 30px; height: 30px; stroke-width: 2.5; }
.thanks p { margin: .5rem 0 1.5rem; font-size: 1.1rem; }
.lang-ur { font-family: "Noto Nastaliq Urdu", "Hind", serif; line-height: 2.1; }
.lang-ur h1 { font-family: "Noto Nastaliq Urdu", serif; line-height: 2; font-size: 1.8rem; }
.lang-ur input, .lang-ur textarea, .lang-ur .btn { font-family: "Noto Nastaliq Urdu", "Hind", serif; }
.lang-ur .btn { line-height: 2; }
.lang-ur legend, .lang-ur .yesno legend, .lang-ur .rate legend, .lang-ur summary, .lang-ur .field > span:first-child, .lang-ur .btn { font-weight: 400; }
.lang-ur .rate--main legend { font-size: 1.15rem; }
.lang-te { font-family: "Noto Sans Telugu", "Hind", sans-serif; }
.lang-te h1 { font-family: "Noto Sans Telugu", sans-serif; font-weight: 600; font-size: 1.7rem; line-height: 1.4; }
.lang-hi h1 { font-family: "Hind", sans-serif; font-weight: 600; font-size: 1.8rem; line-height: 1.35; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 5.5rem; z-index: 300; translate: -50% 0; background: var(--navy); color: #fff; padding: .7rem 1.1rem; border-radius: 999px; box-shadow: 0 10px 30px -10px rgba(0,0,0,.4); font-weight: 500; }

@media (max-width: 600px) {
  .stats, .stats--sm { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .stat { padding: .8rem .9rem; }
  .stat__value { font-size: 1.45rem; }
  .stat__sub { display: none; }
}

/* ---------- v3: sample data, getting started, tour ---------- */
.sample-banner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: 1rem; padding: .7rem 1rem; border-radius: var(--radius-sm); background: var(--warn-bg); color: var(--warn); border: 1px dashed var(--gold); }
.sample-banner span { display: inline-flex; gap: .45rem; align-items: center; }
.getting-started { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 1.5rem 2rem; align-items: start; border-color: var(--gold); }
@media (max-width: 900px) { .getting-started { grid-template-columns: minmax(0, 1fr); } }
.setup-steps { display: grid; gap: .25rem; counter-reset: s; }
.setup-steps li { display: flex; gap: .8rem; align-items: flex-start; padding: .6rem 0; border-top: 1px solid var(--line); }
.setup-steps li:first-child { border-top: 0; }
.setup-steps div { display: grid; }
.setup-steps a { text-decoration: none; }
.setup-steps a:hover strong { text-decoration: underline; }
.setup-steps span:not(.setup-steps__mark) { color: var(--ink-soft); font-size: .92rem; }
.setup-steps__mark { display: grid; place-items: center; flex: none; width: 1.7rem; height: 1.7rem; border-radius: 50%; border: 2px solid var(--line); color: transparent; }
.setup-steps__mark .icon { width: 14px; height: 14px; stroke-width: 3; }
.setup-steps li.is-done .setup-steps__mark { background: var(--ok); border-color: var(--ok); color: #fff; }
.setup-steps li.is-done strong { color: var(--ink-soft); text-decoration: line-through; }

.tour { position: fixed; inset: 0; z-index: 500; }
.tour__spot { position: fixed; border-radius: 10px; box-shadow: 0 0 0 9999px rgba(5, 18, 34, .62); outline: 2px solid var(--gold); transition: all .2s ease; pointer-events: none; }
.tour--center { background: rgba(5, 18, 34, .62); }
.tour__card { position: fixed; width: min(22rem, calc(100vw - 24px)); padding: 1.15rem 1.2rem 1rem; background: #fff; color: #18253a; border-radius: 14px; box-shadow: 0 20px 50px -15px rgba(0,0,0,.5); }
.tour--center .tour__card { top: 50%; left: 50%; translate: -50% -50%; }
.tour__count { margin: 0 0 .25rem; font-size: .8rem; font-weight: 600; color: #8a5f00; }
.tour__title { font-family: var(--font-display); font-size: 1.3rem; margin: 0 0 .4rem; color: #082341; }
.tour__text { margin: 0 0 1rem; color: #4a5668; font-size: .97rem; }
.tour__actions { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.tour__nav { display: flex; gap: .4rem; }
.tour .btn--ghost { background: #fff; color: #18253a; border-color: #d6dce4; }
@media (prefers-reduced-motion: reduce) { .tour__spot { transition: none; } }

/* ---------- Groups explainer, families ---------- */
.explainer { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.25rem; padding: 1rem 1.2rem; border-radius: var(--radius); background: var(--info-bg); }
.explainer__icon { display: grid; place-items: center; flex: none; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--navy); color: var(--gold); }
.explainer p { margin-bottom: .4rem; max-width: 62rem; }
.family-list { display: grid; gap: .3rem; margin: 0 0 .75rem; }
.family-list a { font-weight: 600; }
.family-tag { display: inline-flex; align-items: center; gap: .3rem; margin-top: .2rem; font-size: .8rem; color: var(--gold-text); font-weight: 600; }
.family-tag .icon { width: 14px; height: 14px; }
.choice { display: grid; gap: .9rem; }
.choice__item { display: grid; gap: .6rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.choice__item p { margin: 0; }

/* ---------- Airlines, package pictures ---------- */
.airline-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .75rem; }
.airline { display: grid; gap: .2rem; justify-items: start; padding: .85rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.airline__logo { display: grid; place-items: center; width: 100%; height: 3.4rem; margin-bottom: .35rem; border-radius: 6px; background: #fff; border: 1px solid var(--line); }
.airline__logo img { max-height: 2.6rem; max-width: 85%; object-fit: contain; }
.airline__fallback { color: var(--ink-soft); }
.airline__actions { display: flex; gap: .9rem; margin-top: .3rem; }
.upload-link { cursor: pointer; position: relative; }
.card__img { width: calc(100% + 2.4rem); max-width: none; margin: -1.2rem -1.2rem .6rem; aspect-ratio: 3 / 1.6; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }
.image-pick { border: 0; padding: 0; margin: 0; display: grid; gap: .75rem; }
.image-pick legend { font-size: .92rem; font-weight: 500; color: var(--ink-soft); margin-bottom: .35rem; font-family: var(--font-body); }
.image-pick__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .6rem; }
.image-pick__opt { position: relative; display: grid; gap: .25rem; cursor: pointer; font-size: .85rem; color: var(--ink-soft); }
.image-pick__opt input { position: absolute; opacity: 0; }
.image-pick__opt img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 8px; border: 3px solid transparent; }
.image-pick__opt input:checked + img { border-color: var(--gold); }
.image-pick__opt input:focus-visible + img { outline: 3px solid var(--navy); }

/* ---------- Portal: family ---------- */
.avatar { display: grid; place-items: center; flex: none; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--warn-bg); color: var(--gold-text); font-family: var(--font-display); font-size: 1.15rem; }
.avatar--sm { width: 1.7rem; height: 1.7rem; font-size: .9rem; }
.trip-card__people { display: grid; gap: .55rem; margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.15); }
.trip-card__people li { display: flex; gap: .7rem; align-items: center; }
.trip-card__people .avatar { background: rgba(245,180,26,.18); color: var(--gold); }
.trip-card__people small { display: block; color: rgba(255,255,255,.7); font-size: .85rem; }
.member-list { display: grid; gap: .5rem; }
.member { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center; padding: .75rem .85rem; border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; }
.member:hover { border-color: var(--ink-soft); }
.member__info { display: grid; gap: .2rem; min-width: 0; }
.member__info small { color: var(--ink-soft); font-size: .87rem; }
.member__info .progress { margin: .2rem 0 0; height: 5px; }
.member__count { font-family: var(--font-display); font-size: 1.1rem; color: var(--ink-soft); }
.member-tabs { display: flex; gap: .4rem; overflow-x: auto; margin: -.25rem 0 .75rem; padding-bottom: .25rem; }
.member-tabs a { display: inline-flex; align-items: center; gap: .4rem; flex: none; padding: .3rem .75rem .3rem .3rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .92rem; }
.member-tabs a small { color: var(--ink-soft); font-weight: 400; }
.member-tabs a.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
.member-tabs a.is-active small { color: rgba(255,255,255,.7); }
.member-tabs a.is-active .avatar { background: var(--gold); color: var(--navy); }
.member-now { margin: 0 0 .5rem; padding: .5rem .75rem; border-radius: var(--radius-sm); background: var(--info-bg); }
.empty-illus { display: grid; justify-items: center; gap: .5rem; text-align: center; color: var(--ink-soft); }
.empty-illus img { width: 10rem; height: auto; mix-blend-mode: multiply; }
.portal-banner { width: 100%; border-radius: var(--radius); margin-bottom: 1rem; aspect-ratio: 3 / 1.4; object-fit: cover; }
.checklist__group h2 { display: flex; align-items: center; }

.thanks__art { width: 11rem; height: auto; margin: 0 auto .5rem; mix-blend-mode: multiply; }

/* v4: Outfit for the dashboard and portal, a touch larger */
@font-face { font-family: "Outfit"; font-weight: 100 900; src: url("../fonts/outfit-latin-var.woff2") format("woff2"); font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20B9, U+2122, U+2191, U+2193, U+2212; }
:root { --font-body: "Outfit", "Hind", "Noto Sans Telugu", system-ui, sans-serif; }
body { font-size: 1.0625rem; }
.app--portal { font-size: 1.125rem; }
.app--portal .muted.small, .app--portal .small { font-size: 1rem; }
.tabbar__item { font-size: .82rem; }
.field > span:first-child { font-size: .98rem; }

/* ---------- v5: tutorial mode (English / Arabic) ---------- */
@font-face { font-family: "Noto Naskh Arabic"; font-weight: 400; src: url("../fonts/noto-naskh-arabic-400.woff2") format("woff2"); font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }
@font-face { font-family: "Noto Naskh Arabic"; font-weight: 600; src: url("../fonts/noto-naskh-arabic-600.woff2") format("woff2"); font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }
[lang="ar"] { font-family: "Noto Naskh Arabic", "Outfit", serif; }
.tour__card[lang="ar"] .tour__title, .page-help[lang="ar"] .page-help__title { font-family: "Noto Naskh Arabic", serif; font-weight: 600; }
.tour__card[lang="ar"] .tour__text, .page-help[lang="ar"] .page-help__text { font-size: 1.12rem; line-height: 1.9; }

.page-help { display: flex; gap: 1rem; align-items: flex-start; margin: 0 0 1.25rem; padding: 1rem 1.2rem; border-radius: var(--radius); background: var(--warn-bg); border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent); color: var(--ink); }
.page-help__icon { display: grid; place-items: center; flex: none; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--navy); color: var(--gold); font-weight: 700; font-size: 1.15rem; }
.page-help__title { margin: 0 0 .25rem; font-weight: 600; color: var(--gold-text); }
.page-help__text { margin: 0 0 .75rem; max-width: 62rem; }
.page-help__actions { display: flex; flex-wrap: wrap; gap: .5rem .9rem; align-items: center; }
.page-help .btn--ghost { background: transparent; }

.tutorial-controls { display: grid; gap: .45rem; padding: .6rem 0 .35rem; margin-bottom: .25rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.tutorial-switch { display: flex; align-items: center; gap: .65rem; padding: .45rem .7rem; background: none; border: 0; color: rgba(255,255,255,.88); font: 500 .98rem var(--font-body); cursor: pointer; text-align: left; }
.tutorial-switch__track { position: relative; flex: none; width: 2.4rem; height: 1.35rem; border-radius: 999px; background: rgba(255,255,255,.25); transition: background-color .2s; }
.tutorial-switch__track::after { content: ""; position: absolute; top: .18rem; left: .2rem; width: 1rem; height: 1rem; border-radius: 50%; background: #fff; transition: transform .2s; }
.tutorial-switch[aria-checked="true"] .tutorial-switch__track { background: var(--gold); }
.tutorial-switch[aria-checked="true"] .tutorial-switch__track::after { transform: translateX(1.02rem); }
.tutorial-lang { display: grid; grid-template-columns: 1fr 1fr; margin: 0 .7rem; border: 1px solid rgba(255,255,255,.25); border-radius: 6px; overflow: hidden; }
.tutorial-lang button { padding: .4rem .5rem; background: none; border: 0; color: rgba(255,255,255,.8); font: 500 .92rem var(--font-body); cursor: pointer; }
.tutorial-lang button[lang="ar"] { font-family: "Noto Naskh Arabic", serif; font-size: 1rem; }
.tutorial-lang button[aria-pressed="true"] { background: var(--gold); color: var(--navy); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .tutorial-switch__track, .tutorial-switch__track::after { transition: none; } }

.portal-help { display: inline-flex; align-items: center; gap: .35rem; margin-left: auto; padding: .4rem .7rem; background: none; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; color: #fff; font: 500 .92rem var(--font-body); cursor: pointer; }
.portal-help .icon { width: 18px; height: 18px; }
.portal-bar__out { margin-left: .25rem; }
.role-note { display: flex; gap: .55rem; align-items: flex-start; padding: .6rem .8rem; margin: 0 0 .9rem; border-radius: var(--radius-sm); background: var(--info-bg); font-size: .95rem; }
.role-note .icon { flex: none; margin-top: .15rem; color: var(--navy); }
.who-sees { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .9rem; margin-bottom: 1.25rem; }
.who-sees > div { padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.who-sees h2 { display: flex; align-items: center; gap: .45rem; font-family: var(--font-display); font-size: 1.2rem; margin-bottom: .35rem; }
.who-sees h2 .icon { color: var(--gold-text); }
.who-sees p { margin: 0; color: var(--ink-soft); font-size: .97rem; }
.tour [hidden] { display: none !important; }

/* ---------- Money fields (₹ with live Indian commas) ---------- */
.money { position: relative; display: block; }
.money__sign { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--ink-soft); font-weight: 600; pointer-events: none; }
.money input { padding-left: 1.75rem; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.money input.input-sm { padding-left: 1.45rem; }
.money input.input-sm + .money__sign, .money .input-sm ~ .money__sign { left: .55rem; }
td .money { display: inline-block; }
td .money .money__sign { left: .55rem; font-size: .9rem; }
.money__words { display: block; min-height: 1.2em; margin-top: .2rem; font-size: .85rem; color: var(--ink-soft); }
.money__words.is-warn { color: var(--bad); font-weight: 600; }
.field > small { display: block; margin-top: .25rem; font-size: .85rem; }

/* ---------- Payments on the group page ---------- */
.pill--paid { background: var(--ok-bg); color: var(--ok); }
.pill--due { background: var(--bad-bg); color: var(--bad); }
.paybar { display: block; height: .45rem; margin-top: .45rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.paybar > span { display: block; height: 100%; background: var(--ok); border-radius: inherit; }
.roster-help { margin: 0 0 .75rem; padding: .65rem .85rem; border-radius: var(--radius-sm); background: var(--info-bg); color: var(--ink); }
.table--roster tr.is-changed td { background: var(--warn-bg); }
.table--roster tr.is-changed .row-actions .btn--ghost { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(245,180,26,.35); }
.table--roster select.input-sm { width: auto; max-width: 13rem; }

/* ---------- Add a pilgrim: two-way switch ---------- */
.add-pilgrim .panel__sub { margin-top: 0; }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin-top: .35rem; }
.seg__btn { display: grid; grid-template-columns: auto 1fr; column-gap: .55rem; align-items: center; text-align: left; padding: .75rem .9rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: 600 1rem/1.3 var(--font-body); cursor: pointer; }
.seg__btn svg { grid-row: span 2; width: 1.25rem; height: 1.25rem; }
.seg__btn small { grid-column: 2; font-weight: 400; font-size: .85rem; color: var(--ink-soft); }
.seg__btn:hover { border-color: var(--navy-2); }
.seg__btn.is-on { border-color: var(--gold); background: var(--warn-bg); box-shadow: inset 0 0 0 1px var(--gold); }
.seg__btn:focus-visible { outline: 3px solid rgba(245,180,26,.6); outline-offset: 2px; }
.seg__panel { padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); margin-top: .5rem; }
.seg__panel[hidden] { display: none !important; }
.form__note { flex-basis: 100%; margin: 0; }
@media (max-width: 560px) { .seg { grid-template-columns: minmax(0, 1fr); } }

/* ---------- New travel group: name preview ---------- */
.group-name-preview { display: grid; gap: .15rem; padding: .8rem 1rem; border-left: 4px solid var(--gold); background: var(--surface-2); border-radius: var(--radius-sm); }
.group-name-preview strong { font-family: var(--font-display); font-size: 1.2rem; font-weight: 400; color: var(--ink); }

/* ---------- Date picker ---------- */
.dp { position: relative; display: flex; align-items: center; }
.dp__field { display: flex; align-items: center; gap: .55rem; width: 100%; min-height: 2.9rem; padding: .55rem .8rem; padding-right: 2.4rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: 400 1rem/1.4 var(--font-body); text-align: left; cursor: pointer; }
.dp__field:hover { border-color: var(--navy-2); }
.dp__field:focus-visible, .dp.is-open .dp__field { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245,180,26,.35); }
.dp__ico { flex: none; width: 1.1rem; height: 1.1rem; border: 2px solid currentColor; border-top-width: 4px; border-radius: 3px; color: var(--gold-text); }
.dp__ph { color: var(--ink-soft); }
.dp__clear { position: absolute; right: .35rem; width: 2rem; height: 2rem; border: 0; border-radius: 50%; background: transparent; color: var(--ink-soft); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.dp__clear:hover { background: var(--surface-2); color: var(--ink); }
.dp__pop { position: absolute; z-index: 60; top: calc(100% + .4rem); left: 0; width: 19.5rem; max-width: calc(100vw - 1.5rem); padding: .8rem; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: var(--radius); box-shadow: 0 18px 40px -12px rgba(8,35,65,.45); }
.dp__pop--right { left: auto; right: 0; }
.dp__pop[hidden] { display: none; }
.dp__head { display: grid; grid-template-columns: 2.2rem 1fr auto 2.2rem; gap: .35rem; align-items: center; margin-bottom: .55rem; }
.dp__head select { min-height: 2.2rem; padding: .2rem .4rem; font-size: .95rem; font-weight: 600; }
.dp__nav { height: 2.2rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--ink); font-size: 1.35rem; line-height: 1; cursor: pointer; }
.dp__nav:hover { border-color: var(--gold); }
.dp__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .15rem; }
.dp__dow { padding: .2rem 0; text-align: center; font-size: .78rem; font-weight: 600; color: var(--ink-soft); }
.dp__day { aspect-ratio: 1; border: 0; border-radius: 50%; background: transparent; color: var(--ink); font: 500 .95rem/1 var(--font-body); font-variant-numeric: tabular-nums; cursor: pointer; }
.dp__day:hover:not(:disabled) { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.dp__day:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.dp__day.is-today { box-shadow: inset 0 0 0 1.5px var(--gold); font-weight: 700; }
.dp__day.is-sel { background: var(--navy); color: #fff; box-shadow: none; font-weight: 700; }
.dp__day:disabled { opacity: .3; cursor: not-allowed; }
.dp__foot { display: flex; justify-content: space-between; margin-top: .5rem; padding-top: .5rem; border-top: 1px solid var(--line); }
.dp__link { border: 0; background: none; color: var(--gold-text); font: 600 .95rem var(--font-body); cursor: pointer; padding: .25rem .4rem; border-radius: 6px; }
.dp__link:hover { background: var(--surface-2); }
.dp__link:disabled { opacity: .4; cursor: not-allowed; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .app--admin .dp__day.is-sel { background: var(--gold); color: #082341; }
}
.seg__panel.form--inline { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); align-items: start; gap: .85rem 1rem; }
.seg__panel.form--inline > .field--grow:first-of-type { grid-column: span 2; }
.seg__panel.form--inline > .btn { grid-column: 1 / -1; justify-self: start; }
.seg__panel.form--inline > p { grid-column: 1 / -1; }
@media (max-width: 560px) { .seg__panel.form--inline > .field--grow:first-of-type { grid-column: auto; } }
