/* Soumya's Fitness Club — team console.
   Sunrise to Sundown: plum shell, dawn-rose and apricot sky, state in leaf / amber / rose-red.
   Phone first; the desktop layout is the phone layout given room. */

:root {
  --ground: #fff7f4;
  --surface: #ffffff;
  --surface-2: #fbeee9;
  --surface-3: #f6e3dc;
  --ink: #2a1730;
  --ink-2: #4e3a52;
  --muted: #7a6177;
  --line: #efdcd5;
  --line-strong: #e2c6bd;

  --plum: #5b2a5e;
  --plum-deep: #45204a;
  --plum-ink: #fff3ef;
  --rose: #f2a7a0;
  --rose-strong: #c4545a;
  --apricot: #f6c28b;
  --sun: #f4a259;

  --ok: #2c7458;      --ok-bg: #e2f2e9;
  --wait: #93530f;    --wait-bg: #fcebd5;
  --bad: #ad3542;     --bad-bg: #fbe2e1;
  --off: #6e6070;     --off-bg: #f1e9ec;

  --focus: #c4545a;
  --shadow-1: 0 1px 2px rgba(69, 32, 74, 0.06), 0 2px 10px rgba(69, 32, 74, 0.05);
  --shadow-2: 0 6px 24px rgba(69, 32, 74, 0.12), 0 2px 6px rgba(69, 32, 74, 0.06);
  --radius: 18px;
  --radius-sm: 12px;
  --tabbar-h: 64px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #1e1424;
    --surface: #2a1c31;
    --surface-2: #34243c;
    --surface-3: #3f2c48;
    --ink: #f7ecef;
    --ink-2: #dccbd8;
    --muted: #b6a3bf;
    --line: #43304b;
    --line-strong: #5a4262;

    --plum: #f2a7a0;          /* at night the primary action turns dawn-rose */
    --plum-deep: #e8908a;
    --plum-ink: #2a1730;
    --rose-strong: #f2a7a0;

    --ok: #8fd6b5;      --ok-bg: #1d3a33;
    --wait: #f6c28b;    --wait-bg: #43301f;
    --bad: #ff9fa3;     --bad-bg: #44233a;
    --off: #c3adc4;     --off-bg: #3a2a40;

    --focus: #f6c28b;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-2: 0 10px 30px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}

/* ── Base ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--rose); color: #2a1730; }
a { color: var(--plum); text-decoration-thickness: 1px; text-underline-offset: 3px; }
@media (prefers-color-scheme: dark) { a { color: var(--rose); } }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.1rem); line-height: 1.12; letter-spacing: -0.025em; margin: 0; font-weight: 750; }
h2 { font-size: 1.12rem; line-height: 1.3; letter-spacing: -0.012em; margin: 0 0 12px; font-weight: 700; }
h3 { font-size: 1rem; margin: 0 0 6px; font-weight: 650; }
p { margin: 0 0 12px; }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.86em; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
.num, td.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.2em; height: 1.2em; flex: none; vertical-align: -0.22em; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 10px; z-index: 50; }
.skip:focus { left: 8px; }
* { scrollbar-color: var(--line-strong) transparent; scrollbar-width: thin; }

/* ── Shell: plum top bar, phone tab bar ───────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(180deg, #5b2a5e, #4c2350);
  color: #fff3ef;
  padding-top: env(safe-area-inset-top);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 6px 18px rgba(69, 32, 74, 0.18);
}
.topbar-inner {
  max-width: 1160px; margin: 0 auto; height: 56px; padding: 0 16px;
  display: flex; align-items: center; gap: 18px;
}
.brand {
  display: flex; align-items: center; gap: 9px; color: #fff3ef; text-decoration: none;
  font-family: var(--font-display); font-weight: 750; letter-spacing: -0.015em; font-size: 1.02rem;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand-mark { width: 38px; height: 38px; border-radius: 50%; background: #fff3ef; padding: 2px; box-shadow: 0 0 0 1px rgba(255, 243, 239, 0.3); }
.brand-full { display: none; }
.brand-sub {
  font-size: 0.72rem; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase;
  color: #2a1730; background: #f6c28b; padding: 2px 7px; border-radius: 999px;
}
.topnav { display: none; }
.me { margin-left: auto; display: flex; align-items: center; gap: 8px; color: #fff3ef; text-decoration: none; }
.me:hover { text-decoration: none; }
.me-name { display: none; font-size: 0.92rem; color: #f3dfe3; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: #f2a7a0; color: #45204a; font-weight: 750; font-size: 0.95rem;
  box-shadow: 0 0 0 2px rgba(255, 243, 239, 0.25);
}

.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  height: var(--tabbar-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); text-decoration: none; font-size: 0.72rem; font-weight: 600; position: relative;
}
.tabbar .icon { width: 24px; height: 24px; }
.tabbar a[aria-current="page"] { color: var(--plum); }
.tabbar a .icon { padding: 3px 14px; box-sizing: content-box; border-radius: 999px; transition: background 160ms; }
.tabbar a[aria-current="page"] .icon { background: color-mix(in srgb, var(--rose) 38%, transparent); }

.page {
  max-width: 1160px; margin: 0 auto;
  padding: 20px 16px calc(var(--tabbar-h) + 28px + env(safe-area-inset-bottom));
}

@media (min-width: 900px) {
  .brand-full { display: inline; }
  .brand-short { display: none; }
  .topnav { display: flex; gap: 2px; margin-left: 12px; }
  .topnav a {
    color: #f3dfe3; text-decoration: none; padding: 7px 12px; border-radius: 999px; font-size: 0.93rem; font-weight: 550;
  }
  .topnav a:hover { background: rgba(255, 243, 239, 0.1); }
  .topnav a[aria-current="page"] { background: #fff3ef; color: #45204a; }
  .me-name { display: inline; }
  .tabbar { display: none; }
  .page { padding: 32px 24px 64px; }
}

/* ── Page heads ───────────────────────────────────────────────────────── */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 20px; }
.head p { color: var(--muted); margin: 6px 0 0; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: 0.92rem; margin-bottom: 10px; min-height: 32px; }
.back:hover { color: var(--ink); text-decoration: none; }

/* ── Surfaces ─────────────────────────────────────────────────────────── */
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-1); min-width: 0;
}
.panel + .panel { margin-top: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; }
.cols { display: grid; gap: 16px; }
.cols > .panel + .panel { margin-top: 0; }
@media (min-width: 900px) { .cols { grid-template-columns: 1fr 1fr; align-items: start; } }

/* ── Today card: sky tinted by the time of day in IST ─────────────────── */
.today {
  position: relative; overflow: hidden; border-radius: 24px; padding: 18px 18px 16px;
  color: #2a1730; box-shadow: var(--shadow-2); isolation: isolate;
}
.today.dawn  { background: linear-gradient(170deg, #fde3dc 0%, #f9c9c0 46%, #f7d4b0 100%); }
.today.day   { background: linear-gradient(170deg, #fff1df 0%, #fbd9b4 55%, #f8c6b4 100%); }
.today.dusk  { background: linear-gradient(170deg, #f7b9a9 0%, #e09aa8 55%, #b46a98 100%); }
.today.night { background: linear-gradient(170deg, #3a2a63 0%, #2a1f4d 55%, #1d163a 100%); color: #fbeff2; }
.today-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.today-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 750; letter-spacing: -0.025em; margin: 0; color: inherit; }
.today-time { font-variant-numeric: tabular-nums; font-weight: 650; font-size: 0.95rem; opacity: 0.8; }
.today-date { margin: 2px 0 0; font-size: 0.92rem; opacity: 0.78; }

.legs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.leg {
  display: flex; flex-direction: column; gap: 10px; min-width: 0;
  background: rgba(255, 255, 255, 0.62); border-radius: 16px; padding: 14px;
}
.leg-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.7); }
.today.night .leg-icon { background: rgba(255, 255, 255, 0.1); }
.today.dusk .leg { background: rgba(255, 255, 255, 0.55); }
.today.night .leg { background: rgba(255, 255, 255, 0.1); }
.leg .icon { width: 26px; height: 26px; color: #93530f; }
.today.night .leg .icon { color: #f6c28b; }
.leg-text { min-width: 0; }
.leg-name { font-size: 0.8rem; font-weight: 650; opacity: 0.8; display: block; }
.leg-name .t { white-space: nowrap; }
.leg-count { font-size: 1.25rem; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; display: block; }
.leg-state { font-size: 0.8rem; font-weight: 650; display: block; opacity: 0.85; }
.leg-state.done { color: #23634a; opacity: 1; }
.leg-state.failed { color: #9b2c39; opacity: 1; }
.leg-state.pending { color: #8a4c0b; opacity: 1; }
.today.night .leg-state.done { color: #9be0c0; }
.today.night .leg-state.failed { color: #ffb3b6; }
.today.night .leg-state.pending { color: #f6c28b; }
.today-alert {
  margin-top: 12px; display: flex; gap: 8px; align-items: center; font-size: 0.9rem; font-weight: 600;
  background: #fbe2e1; color: #7a2531; border-radius: 12px; padding: 10px 12px;
}
.today.night .today-alert { background: rgba(255, 159, 163, 0.16); color: #ffb3b6; }
.today-alert a { color: inherit; }
@media (max-width: 339px) { .legs { grid-template-columns: 1fr; } }

/* ── Quick links (counts as tappable tiles) ───────────────────────────── */
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
@media (min-width: 900px) { .quick { grid-template-columns: repeat(4, 1fr); } }
.quick a {
  display: flex; flex-direction: column; gap: 2px; padding: 14px 14px 12px; min-height: 96px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--ink); text-decoration: none; box-shadow: var(--shadow-1);
  transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 160ms;
}
.quick a:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); text-decoration: none; }
.quick .q-value { font-family: var(--font-display); font-size: 1.9rem; font-weight: 750; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.quick .q-label { font-weight: 650; font-size: 0.92rem; }
.quick .q-hint { color: var(--muted); font-size: 0.8rem; }
.quick a.attention { background: var(--wait-bg); border-color: transparent; }
.quick a.attention .q-value { color: var(--wait); }

/* ── Lists (phone-native rows) ────────────────────────────────────────── */
.list { list-style: none; margin: 0; padding: 0; }
.list > li + li { border-top: 1px solid var(--line); }
.row-link {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px;
  padding: 12px 6px; min-height: 64px; color: var(--ink); text-decoration: none;
}
a.row-link:hover { text-decoration: none; background: var(--surface-2); border-radius: 12px; }
.row-main { min-width: 0; }
.row-title { display: block; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { display: block; color: var(--muted); font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-side { display: flex; align-items: center; gap: 10px; }
.row-side .chev { width: 18px; height: 18px; color: var(--line-strong); }
.list-panel { padding: 6px 12px; }
.list-item { padding: 12px 6px; }

.day-marks { display: inline-flex; gap: 4px; }
.mark { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--off-bg); color: var(--off); }
.mark { position: relative; }
.mark .icon { width: 15px; height: 15px; }
.mark .badge { position: absolute; right: -3px; bottom: -3px; width: 13px; height: 13px; border-radius: 50%; display: grid; place-items: center; background: currentColor; box-shadow: 0 0 0 2px var(--surface); }
.mark .badge .icon { width: 9px; height: 9px; color: var(--surface); stroke-width: 3; }
.mark.sent { background: var(--ok-bg); color: var(--ok); }
.mark.pending, .mark.sending { background: var(--wait-bg); color: var(--wait); }
.mark.failed { background: var(--bad-bg); color: var(--bad); }
.mark.none { background: transparent; color: var(--line-strong); box-shadow: inset 0 0 0 1.5px var(--line); }

/* ── Pills ────────────────────────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 650; white-space: nowrap; background: var(--off-bg); color: var(--off);
}
.pill .icon { width: 14px; height: 14px; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.on { background: var(--plum); color: var(--plum-ink); }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.wait { background: var(--wait-bg); color: var(--wait); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.off { background: var(--off-bg); color: var(--off); }

/* ── Segmented filter + search ────────────────────────────────────────── */
.segmented {
  display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 999px;
  overflow-x: auto; scrollbar-width: none; margin-bottom: 12px;
}
.segmented::-webkit-scrollbar { display: none; }
.segmented a {
  flex: 1 0 auto; text-align: center; padding: 8px 14px; border-radius: 999px; min-height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-2); text-decoration: none; font-size: 0.9rem; font-weight: 600; white-space: nowrap;
}
.segmented a:hover { text-decoration: none; background: var(--surface-3); }
.segmented a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
@media (max-width: 459px) {
  .segmented { display: grid; grid-template-columns: 1fr 1fr; border-radius: 18px; }
  .segmented a { border-radius: 14px; }
}
.segmented .count { color: var(--muted); font-weight: 600; margin-left: 5px; font-variant-numeric: tabular-nums; }

.searchbar { position: sticky; top: calc(56px + env(safe-area-inset-top)); z-index: 5; margin: 0 -16px 8px; padding: 10px 16px 8px; background: var(--ground); }
@media (min-width: 900px) { .searchbar { position: static; margin: 0 0 12px; padding: 0; background: none; } }
.search { position: relative; display: flex; gap: 8px; }
.search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 20px; height: 20px; pointer-events: none; }
.search input[type=search] { padding-left: 44px; }

/* ── Forms and buttons ────────────────────────────────────────────────── */
label { display: block; font-size: 0.875rem; font-weight: 650; margin-bottom: 6px; color: var(--ink-2); }
input[type=text], input[type=search], select {
  width: 100%; min-height: 46px; font: inherit; font-size: 16px; /* 16px stops iOS zooming in */
  padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--line-strong);
  background: var(--surface); color: var(--ink); caret-color: var(--rose-strong);
  transition: border-color 140ms, box-shadow 140ms;
}
input::placeholder { color: var(--muted); opacity: 0.85; }
input:focus, select:focus { outline: none; border-color: var(--plum); box-shadow: 0 0 0 4px color-mix(in srgb, var(--rose) 35%, transparent); }
select {
  appearance: none; padding-right: 38px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 14px) 52%; background-size: 6px 6px; background-repeat: no-repeat;
}
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--plum); vertical-align: -4px; margin: 0 6px 0 0; }
.check { display: inline-flex; align-items: center; font-weight: 500; color: var(--ink-2); font-size: 0.9rem; margin: 0; min-height: 38px; }
.field { margin-bottom: 14px; }
.help { color: var(--muted); font-size: 0.82rem; margin: 6px 0 0; }
.form-row { display: grid; gap: 12px; }
@media (min-width: 700px) { .form-row { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: end; } .form-row .field { margin: 0; } }
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form select, .inline-form input[type=text] { width: auto; flex: 1; min-width: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 18px; border-radius: 999px;
  font: inherit; font-weight: 650; font-size: 0.95rem; line-height: 1.1; white-space: nowrap;
  border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink);
  cursor: pointer; text-decoration: none;
  transition: transform 120ms cubic-bezier(0.16, 1, 0.3, 1), background 140ms, box-shadow 140ms;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn .icon { width: 19px; height: 19px; }
.btn.primary { background: var(--plum); border-color: var(--plum); color: var(--plum-ink); box-shadow: 0 6px 16px color-mix(in srgb, var(--plum) 28%, transparent); }
.btn.primary:hover { background: var(--plum-deep); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, transparent); background: var(--surface); }
.btn.danger:hover { background: var(--bad-bg); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.quiet:hover { background: var(--surface-2); }
.btn.small { min-height: 38px; padding: 7px 14px; font-size: 0.875rem; }
.btn.block { width: 100%; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.actions form { margin: 0; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--plum); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ── Notices ──────────────────────────────────────────────────────────── */
.flash, .notice {
  display: flex; gap: 10px; align-items: flex-start; border-radius: 14px; padding: 12px 14px; margin-bottom: 16px;
  background: var(--surface-2); color: var(--ink); font-size: 0.95rem;
}
.flash .icon, .notice .icon { width: 20px; height: 20px; margin-top: 1px; }
.flash.success { background: var(--ok-bg); color: var(--ok); }
.flash.error, .notice.bad { background: var(--bad-bg); color: var(--bad); }
.notice.wait, .flash.info { background: var(--wait-bg); color: var(--wait); }
.flash { animation: flash-in 420ms cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes flash-in { from { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .flash { animation: none; } }
.notice a { color: inherit; font-weight: 650; }
.status { min-height: 1.5em; margin: 12px 0 0; color: var(--muted); font-size: 0.92rem; text-align: center; }
.status.error { color: var(--bad); }

/* ── Facts and tables ─────────────────────────────────────────────────── */
dl.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 18px; margin: 0; }
dl.facts dt { color: var(--muted); font-size: 0.92rem; }
dl.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; font-weight: 550; }
.by { color: var(--muted); font-weight: 400; font-size: 0.86rem; display: block; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 650; }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; }

/* Phone: tables become labelled stacks. */
@media (max-width: 699px) {
  table.stack-sm thead { display: none; }
  table.stack-sm, table.stack-sm tbody, table.stack-sm tr, table.stack-sm td { display: block; width: 100%; }
  table.stack-sm tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  table.stack-sm tbody tr:last-child { border-bottom: 0; }
  table.stack-sm td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: right; }
  table.stack-sm td::before { content: attr(data-label); color: var(--muted); font-size: 0.82rem; text-align: left; flex: none; }
  table.stack-sm td.lead { display: block; text-align: left; font-weight: 650; padding-bottom: 4px; }
  table.stack-sm td.lead::before { content: none; }
  table.stack-sm td.wide { display: block; text-align: left; }
  table.stack-sm td.wide::before { display: block; margin-bottom: 4px; }
}
.empty { color: var(--muted); padding: 20px 0; text-align: center; margin: 0; }

/* ── Group detail ─────────────────────────────────────────────────────── */
.client-head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.client-flag { font-size: 1.9rem; line-height: 1; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; background: var(--surface-2); flex: none; }
.client-head h1 { font-size: clamp(1.45rem, 1.1rem + 1.2vw, 1.95rem); }
.client-head .sub { color: var(--muted); font-size: 0.9rem; margin-top: 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.decision {
  display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line);
}
.decision p { margin: 0; color: var(--muted); font-size: 0.9rem; flex: 1 1 200px; }
.decision .inline-form { flex: 1 1 100%; }
@media (max-width: 699px) { .decision > form, .decision > form > .btn { width: 100%; } }

/* ── Auth pages ───────────────────────────────────────────────────────── */
body.auth { background: linear-gradient(175deg, #fde3dc 0%, #f9c9c0 38%, #f6c28b 78%, #f4a259 100%) fixed; min-height: 100vh; }
@media (prefers-color-scheme: dark) { body.auth { background: linear-gradient(175deg, #4a2a4f 0%, #33203a 60%, #1e1424 100%) fixed; } }
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 32px 16px calc(32px + env(safe-area-inset-bottom)); }
.auth-card {
  width: 100%; max-width: 420px; margin: 0 auto; background: var(--surface); border-radius: 28px;
  padding: 26px 24px 24px; box-shadow: 0 24px 60px rgba(69, 32, 74, 0.22);
}
.auth-logo { display: block; width: 148px; height: 148px; margin: -6px auto 6px; }
.auth-card h1 { text-align: center; font-size: 1.7rem; }
.auth-card .lead { text-align: center; color: var(--muted); margin: 8px 0 22px; }
.auth-foot { text-align: center; color: var(--muted); font-size: 0.85rem; margin: 18px 0 0; }
.auth-card .btn.primary { min-height: 54px; font-size: 1.02rem; }

/* ── WhatsApp QR ──────────────────────────────────────────────────────── */
.qr-frame { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 8px 0; text-align: center; }
.qr-frame img { width: min(280px, 78vw); height: auto; aspect-ratio: 1; background: #fff; border-radius: 18px; padding: 10px; box-shadow: var(--shadow-2); }
.steps { margin: 0; padding-left: 20px; color: var(--ink-2); text-align: left; }
.steps li + li { margin-top: 4px; }

/* ── More menu ────────────────────────────────────────────────────────── */
.menu { list-style: none; margin: 0; padding: 0; }
.menu li + li { border-top: 1px solid var(--line); }
.menu form { margin: 0; }
.menu a, .menu button {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 10px 6px;
  color: var(--ink); text-decoration: none; font: inherit; font-weight: 650; background: none; border: 0; cursor: pointer; text-align: left;
}
.menu a:hover, .menu button:hover { text-decoration: none; background: var(--surface-2); border-radius: 12px; }
.menu .m-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--surface-2); color: var(--plum); flex: none; }
.menu .m-icon .icon { width: 22px; height: 22px; }
.menu .m-text { flex: 1; min-width: 0; }
.menu .m-sub { display: block; font-size: 0.84rem; color: var(--muted); font-weight: 450; }
.menu .chev { width: 18px; height: 18px; color: var(--line-strong); }

/* ── Link-once ────────────────────────────────────────────────────────── */
.link-box { display: flex; gap: 8px; }
.link-box input { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.86rem; }
@media (max-width: 499px) { .link-box { flex-direction: column; } }

/* ── Utilities ────────────────────────────────────────────────────────── */
.mt { margin-top: 16px; }
.narrow { max-width: 520px; margin: 0 auto; }
.hide-sm { display: none; }
@media (min-width: 700px) { .hide-sm { display: revert; } }
