@font-face {
  font-family: "Vazirmatn";
  src: url("/fonts/Vazirmatn.woff2") format("woff2-variations"), url("/fonts/Vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #f0ede6;
  --text: #1f2a2a;
  --muted: #66706d;
  --border: #e2ddd3;
  --primary: #2f6f6a;
  --primary-ink: #ffffff;
  --primary-soft: #e3efed;
  --danger: #b4443a;
  --danger-soft: #f8e6e3;
  --warn: #9a6a12;
  --warn-soft: #fbf0d9;
  --ok: #2e7d4f;
  --ok-soft: #e2f2e8;
  --shadow: 0 1px 2px rgba(30, 40, 40, 0.06), 0 4px 16px rgba(30, 40, 40, 0.06);
  --radius: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141918;
    --surface: #1c2322;
    --surface-2: #232c2b;
    --text: #e7ecea;
    --muted: #9aa6a3;
    --border: #2f3a38;
    --primary: #5fb3aa;
    --primary-ink: #0d1615;
    --primary-soft: #1f3533;
    --danger: #e0786d;
    --danger-soft: #3a2422;
    --warn: #e2b154;
    --warn-soft: #3a3020;
    --ok: #6cc391;
    --ok-soft: #1e3427;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Vazirmatn", Tahoma, "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.7;
}
[hidden] { display: none !important; }
a { color: var(--primary); }
h1, h2, h3 { line-height: 1.4; margin: 0 0 0.5rem; }
h1 { font-size: 1.35rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.ltr { direction: ltr; unicode-bidi: embed; display: inline-block; }

/* ---------- controls ---------- */
button, .btn {
  font: inherit;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  padding: 0.5rem 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-decoration: none;
  min-height: 40px;
  transition: background 0.15s, border-color 0.15s;
}
button:hover, .btn:hover { border-color: var(--primary); }
button:disabled { opacity: 0.55; cursor: default; }
button.primary, .btn.primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
button.danger { color: var(--danger); border-color: var(--danger-soft); }
button.ghost { background: transparent; border-color: transparent; }
button.ghost:hover { background: var(--surface-2); }
button.sm { min-height: 32px; padding: 0.2rem 0.65rem; font-size: 0.88rem; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 2px; }

label { display: block; font-size: 0.88rem; color: var(--muted); margin-bottom: 0.25rem; }
input, select, textarea {
  font: inherit;
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  min-height: 42px;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.8; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.field { margin-bottom: 0.9rem; }
.row { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
.row > .grow { flex: 1 1 160px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.8rem; }
.date-picker { display: grid; grid-template-columns: 1fr 1.6fr 1.2fr; gap: 0.4rem; }
.time-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; direction: ltr; }
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--surface);
  border-inline-start: 1px solid var(--border);
  padding: 1.2rem 0.8rem;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.brand { font-weight: 700; font-size: 1.05rem; padding: 0 0.6rem 1rem; display: flex; align-items: center; gap: 0.5rem; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.nav a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
}
.nav a:hover { background: var(--surface-2); }
.nav a.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav svg { width: 20px; height: 20px; flex: none; }
.sidebar .who { margin-top: auto; padding: 0.6rem; font-size: 0.85rem; color: var(--muted); }
main { padding: 1.5rem clamp(1rem, 3vw, 2.2rem) 6rem; max-width: 1100px; width: 100%; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.page-head h1 { margin: 0; }

@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    bottom: 0;
    top: auto;
    inset-inline: 0;
    height: auto;
    flex-direction: row;
    padding: 0.35rem 0.4rem calc(0.35rem + env(safe-area-inset-bottom));
    border-inline-start: none;
    border-top: 1px solid var(--border);
    z-index: 20;
  }
  .brand, .sidebar .who { display: none; }
  .nav { display: flex; width: 100%; justify-content: space-around; }
  .nav a { flex-direction: column; gap: 0.1rem; font-size: 0.72rem; padding: 0.35rem 0.4rem; }
}

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow); }
.card + .card { margin-top: 1rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.8rem; margin-bottom: 1.2rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.9rem 1rem; }
.stat .label { color: var(--muted); font-size: 0.85rem; }
.stat .value { font-size: 1.35rem; font-weight: 700; margin-top: 0.15rem; }
.stat .value.bad { color: var(--danger); }

.list { display: flex; flex-direction: column; }
.item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 0.2rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  text-align: start;
  background: none;
  border-radius: 0;
  border-inline: none;
  border-top: none;
  width: 100%;
  min-height: 0;
  justify-content: flex-start;
}
.item:last-child { border-bottom: none; }
.item:hover { background: var(--surface-2); border-color: var(--border); }
.item .main { flex: 1; min-width: 0; }
.item .title { font-weight: 600; }
.item .sub { color: var(--muted); font-size: 0.85rem; }
.item .end { text-align: end; flex: none; }
.time-badge { flex: none; min-width: 64px; text-align: center; font-weight: 700; color: var(--primary); background: var(--primary-soft); border-radius: 10px; padding: 0.35rem 0.4rem; }
.day-head { font-weight: 700; margin: 1.2rem 0 0.3rem; color: var(--muted); font-size: 0.9rem; }
.day-head:first-child { margin-top: 0; }

.chip { display: inline-block; font-size: 0.78rem; padding: 0.05rem 0.6rem; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.chip.scheduled { background: var(--primary-soft); color: var(--primary); }
.chip.completed { background: var(--ok-soft); color: var(--ok); }
.chip.no_show { background: var(--warn-soft); color: var(--warn); }
.chip.cancelled { background: var(--danger-soft); color: var(--danger); }
.chip.owed { background: var(--danger-soft); color: var(--danger); }

.empty { text-align: center; color: var(--muted); padding: 2rem 1rem; }
.tabs { display: flex; gap: 0.3rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; overflow-x: auto; }
.tabs button { border: none; border-radius: 0; background: none; border-bottom: 2px solid transparent; padding: 0.5rem 0.8rem; }
.tabs button.active { border-bottom-color: var(--primary); color: var(--primary); font-weight: 600; }
.search { max-width: 320px; }
.notice { background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 0.7rem 0.9rem; margin-bottom: 1rem; font-size: 0.9rem; }
.notice.info { background: var(--primary-soft); color: var(--primary); }
.lock { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.8rem; color: var(--muted); }
.lock svg { width: 14px; height: 14px; }

/* ---------- dialog ---------- */
dialog {
  border: none;
  border-radius: 18px;
  padding: 0;
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100vh - 32px);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
dialog::backdrop { background: rgba(10, 20, 20, 0.45); }
dialog .dlg-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.2rem 0.4rem; }
dialog .dlg-head h2 { margin: 0; }
dialog .dlg-body { padding: 0.6rem 1.2rem 1.2rem; overflow-y: auto; max-height: calc(100vh - 140px); }
dialog .dlg-foot { display: flex; gap: 0.5rem; justify-content: flex-end; padding-top: 0.6rem; flex-wrap: wrap; }

.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 0.6rem 1.1rem;
  border-radius: 12px;
  z-index: 100;
  box-shadow: var(--shadow);
  max-width: calc(100vw - 32px);
}
.toast.error { background: var(--danger); color: #fff; }

/* ---------- login ---------- */
.center-page { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem 16px; }
.login-card { width: min(420px, 100%); }
.login-card h1 { text-align: center; }
.login-card .lead { text-align: center; color: var(--muted); margin-bottom: 1.4rem; }
.login-card button.primary { width: 100%; min-height: 48px; font-size: 1rem; }
.divider { text-align: center; color: var(--muted); margin: 1.2rem 0; font-size: 0.85rem; }
input[type="checkbox"] { width: auto; min-height: 0; accent-color: var(--primary); }
label.row { color: var(--text); font-size: 0.95rem; }
a.item { color: inherit; text-decoration: none; }
.item .title, .item .sub { display: block; }
.item .sub .ltr { display: inline; }
.time-preview { margin-top: 0.4rem; font-size: 0.88rem; color: var(--primary); }
.time-preview.past { color: var(--danger); }
.code-input { font-size: 1.6rem; letter-spacing: 0.5em; text-align: center; font-variant-numeric: tabular-nums; }
.center-row { justify-content: center; margin-top: 0.6rem; }
.emergency { margin-top: 1.4rem; }

/* ---------- home ---------- */
.next-card { border: 2px solid var(--primary); }
.next-label { color: var(--primary); font-weight: 600; font-size: 0.9rem; }
.next-name { font-size: 1.5rem; margin: 0.2rem 0; }
.next-when { margin-bottom: 1rem; }
.next-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-bottom: 0.4rem; }
.big-btn { min-height: 52px; font-size: 1.02rem; }
@media (max-width: 520px) { .next-actions { grid-template-columns: 1fr; } }
.empty-next p { margin: 0.4rem 0 0; }
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin: 1rem 0; }
.quick-actions button { min-height: 48px; }
.quick-grid { display: grid; gap: 0.6rem; }
.big-choice { justify-content: flex-start; min-height: 56px; font-size: 1.02rem; }
.big-choice svg { width: 24px; height: 24px; color: var(--primary); }
.chip.pending_payment { background: var(--warn-soft); color: var(--warn); }
.chip.expired, .chip.void { background: var(--surface-2); color: var(--muted); text-decoration: line-through; }
.chip.paid { background: var(--ok-soft); color: var(--ok); }
.chip.partial { background: var(--warn-soft); color: var(--warn); }
.chip.unpaid { background: var(--danger-soft); color: var(--danger); }
.invoice-row { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.item .end.row { flex-wrap: nowrap; }

/* ---------- booking settings ---------- */
.day-row { display: grid; grid-template-columns: 90px 1fr auto; gap: 0.6rem; align-items: start; padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.day-row:last-child { border-bottom: none; }
.day-name { font-weight: 600; padding-top: 0.5rem; }
.day-ranges { display: flex; flex-direction: column; gap: 0.4rem; }
.day-ranges .muted { padding-top: 0.5rem; }
.range { display: flex; align-items: center; gap: 0.4rem; }
.range select { width: auto; min-width: 92px; }
.link-box { background: var(--surface-2); border-radius: 10px; padding: 0.6rem 0.8rem; margin-bottom: 0.6rem; overflow-wrap: anywhere; }
.sticky-save { position: sticky; bottom: 0; padding: 0.8rem 0; background: linear-gradient(transparent, var(--bg) 30%); }
.sticky-save button { width: 100%; min-height: 48px; }
@media (max-width: 820px) { .sticky-save { bottom: 64px; } }
@media (max-width: 520px) { .day-row { grid-template-columns: 1fr auto; } .day-ranges { grid-column: 1 / -1; } }
.day-actions { display: flex; flex-direction: column; gap: 0.2rem; align-items: stretch; }
.pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.3rem 1rem; margin-bottom: 0.8rem; }
@media (max-width: 520px) { .day-actions { flex-direction: row; grid-column: 1 / -1; } }
.amount-box { display: flex; align-items: center; gap: 0.5rem; }
.amount-box input { flex: 1; min-width: 0; }
.amount-unit { color: var(--muted); white-space: nowrap; font-size: 0.92rem; }
.share-booking {
  width: 100%; justify-content: flex-start; gap: 0.9rem; margin-top: 1rem; padding: 0.9rem 1rem; min-height: 64px;
  background: var(--primary-soft); border: 1.5px dashed var(--primary); border-radius: var(--radius); text-align: start; color: var(--text);
}
.share-booking strong { display: block; color: var(--primary); font-size: 1.05rem; }
.share-booking .sub { display: block; color: var(--muted); font-size: 0.85rem; }
.share-icon { flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; }
.share-icon svg { width: 22px; height: 22px; }
.notice-card { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap;
  background: var(--warn-soft); border: 1px solid var(--warn); border-radius: var(--radius); padding: 0.8rem 1rem; margin-bottom: 0.8rem; }
.notice-text { flex: 1 1 240px; }
.pkg-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-bottom: 1rem; }
.pkg-choice { flex-direction: column; min-height: 72px; gap: 0.2rem; }
.pkg-choice span { color: var(--muted); font-size: 0.9rem; }
.pkg-choice.selected { border: 2px solid var(--primary); background: var(--primary-soft); }
.pkg-summary { display: flex; justify-content: space-between; align-items: center; font-size: 1.05rem; margin-bottom: 0.4rem; }
.pkg-summary strong { font-size: 1.3rem; color: var(--primary); }
.pkg-summary strong.bad { color: var(--danger); }

/* =====================================================================
   Compact, refined layout: less empty space, finer controls, phone first.
   ===================================================================== */
body { font-size: 14px; line-height: 1.65; }
h1 { font-size: 1.2rem; }
h2 { font-size: 1rem; margin-bottom: 0.4rem; }
h3 { font-size: 0.95rem; margin-bottom: 0.3rem; }

button, .btn {
  min-height: 36px; padding: 0.35rem 0.85rem; border-radius: 9px; font-size: 0.9rem;
  box-shadow: 0 1px 1px rgba(20, 30, 30, 0.04);
}
button.primary, .btn.primary { box-shadow: 0 1px 2px rgba(47, 111, 106, 0.25), 0 2px 8px rgba(47, 111, 106, 0.12); font-weight: 600; }
button.primary:hover, .btn.primary:hover { filter: brightness(1.06); }
button:active, .btn:active { transform: translateY(1px); }
button.sm { min-height: 30px; padding: 0.15rem 0.6rem; font-size: 0.82rem; border-radius: 8px; }
button.ghost { box-shadow: none; }

input, select, textarea { min-height: 38px; padding: 0.4rem 0.65rem; border-radius: 9px; font-size: 0.92rem; }
textarea { min-height: 96px; }
label { font-size: 0.82rem; margin-bottom: 0.15rem; }
.field { margin-bottom: 0.65rem; }

main { padding: 1rem clamp(12px, 3vw, 1.8rem) 5.5rem; }
.page-head { margin-bottom: 0.8rem; gap: 0.6rem; }
.card { padding: 0.85rem 0.95rem; border-radius: 12px; }
.card + .card { margin-top: 0.7rem; }
.stats { gap: 0.55rem; margin-bottom: 0.8rem; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.stat { padding: 0.6rem 0.75rem; border-radius: 11px; }
.stat .label { font-size: 0.78rem; }
.stat .value { font-size: 1.1rem; }

.item { padding: 0.55rem 0.15rem; gap: 0.6rem; }
.item .sub { font-size: 0.8rem; }
.time-badge { min-width: 54px; padding: 0.2rem 0.35rem; border-radius: 8px; font-size: 0.88rem; }
.day-head { margin: 0.8rem 0 0.15rem; font-size: 0.82rem; }
.chip { font-size: 0.72rem; padding: 0 0.5rem; }
.tabs { margin-bottom: 0.6rem; }
.tabs button { padding: 0.35rem 0.6rem; min-height: 34px; box-shadow: none; }
.notice { padding: 0.55rem 0.75rem; font-size: 0.85rem; margin-bottom: 0.7rem; }

/* home */
.next-name { font-size: 1.25rem; margin: 0.1rem 0; }
.next-when { margin-bottom: 0.7rem; font-size: 0.9rem; }
.next-actions { gap: 0.45rem; }
.big-btn { min-height: 42px; font-size: 0.95rem; }
.share-booking { margin-top: 0.7rem; padding: 0.55rem 0.8rem; min-height: 50px; gap: 0.7rem; border-width: 1px; }
.share-booking strong { font-size: 0.95rem; }
.share-booking .sub { font-size: 0.78rem; }
.share-icon { width: 34px; height: 34px; }
.share-icon svg { width: 18px; height: 18px; }
.quick-actions { gap: 0.45rem; margin: 0.7rem 0; }
.quick-actions button { min-height: 40px; }
.notice-card { padding: 0.6rem 0.8rem; margin-bottom: 0.6rem; }
.big-choice { min-height: 46px; font-size: 0.95rem; }
.big-choice svg { width: 20px; height: 20px; }
.pkg-choice { min-height: 58px; }

/* dialogs */
dialog { border-radius: 14px; }
dialog .dlg-head { padding: 0.75rem 0.95rem 0.25rem; }
dialog .dlg-body { padding: 0.4rem 0.95rem 0.95rem; }

/* menu */
.nav a { padding: 0.45rem 0.6rem; }
@media (max-width: 820px) {
  .nav a { padding: 0.25rem 0.3rem; font-size: 0.68rem; }
  .nav svg { width: 19px; height: 19px; }
}

/* booking settings */
.day-row { padding: 0.45rem 0; gap: 0.45rem; }
.day-name { padding-top: 0.35rem; }
.range select { min-width: 84px; }
.sticky-save button { min-height: 42px; }

/* login */
.login-card button.primary { min-height: 42px; font-size: 0.95rem; }
.center-page { padding: 1rem 12px; }
@media (max-width: 520px) { .next-actions { grid-template-columns: 1fr 1fr; } }
.next-actions .big-btn { padding-inline: 0.5rem; }
.next-more { margin-top: 0.15rem; color: var(--muted); padding-inline: 0.2rem; }
.hold-left { color: var(--warn) !important; }
.hold-actions { display: flex; flex-direction: column; gap: 0.25rem; align-items: stretch; }
.share-row { display: flex; gap: 0.45rem; margin-top: 0.7rem; align-items: stretch; }
.share-row .share-booking { margin-top: 0; flex: 1; }
.copy-btn { flex-direction: column; gap: 0.1rem; min-width: 58px; padding: 0.3rem 0.5rem; border-radius: var(--radius); font-size: 0.75rem; color: var(--primary); }
.copy-btn svg { width: 18px; height: 18px; }
.next-links { justify-content: space-between; margin-top: 0.2rem; }
.next-links button { gap: 0.3rem; }
.next-links svg { width: 14px; height: 14px; }
.big-choice svg { flex: none; }
.offscreen { position: fixed; top: -1000px; opacity: 0; }
.copy-field { font-size: 0.85rem; }

/* Keep content in a comfortable, centered column on wide screens. */
main { max-width: 680px; margin-inline: auto; }
.sidebar { width: 200px; }
.app { grid-template-columns: 200px 1fr; }
@media (max-width: 820px) { .app { grid-template-columns: 1fr; } .sidebar { width: auto; } }
dialog { width: min(480px, calc(100vw - 24px)); }
.day-actions { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
dialog.narrow { width: min(340px, calc(100vw - 24px)); }
.tile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.45rem; }
.tile-choice {
  flex-direction: column; gap: 0.3rem; min-height: 78px; padding: 0.5rem 0.25rem;
  font-size: 0.78rem; line-height: 1.35; text-align: center; border-radius: 12px;
}
.tile-choice svg { width: 22px; height: 22px; color: var(--primary); flex: none; }
.tile-choice:hover { background: var(--primary-soft); }
.field-hint { display: block; color: var(--warn); font-size: 0.78rem; margin-top: 0.2rem; }

/* Online bookings: distinct colour; a bell while waiting for payment */
:root { --online: #6b4fbb; --online-soft: #eee8fb; --attn: #b86e00; --attn-soft: #fff3df; }
@media (prefers-color-scheme: dark) { :root { --online: #b7a3f2; --online-soft: #2b2540; --attn: #f0b453; --attn-soft: #3b2f1a; } }
.online-tag { display: inline-block; font-size: 0.68rem; font-weight: 600; padding: 0 0.45rem; border-radius: 99px; background: var(--online-soft); color: var(--online); vertical-align: middle; }
.bell { display: inline-flex; color: var(--attn); margin-inline-end: 0.3rem; vertical-align: -2px; animation: ring 2.4s ease-in-out infinite; transform-origin: 50% 0; }
.bell svg { width: 15px; height: 15px; }
h2 .bell svg { width: 17px; height: 17px; }
@keyframes ring { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(14deg); } 80% { transform: rotate(-12deg); } 85% { transform: rotate(8deg); } 90% { transform: rotate(-4deg); } }
@media (prefers-reduced-motion: reduce) { .bell { animation: none; } }
.item.attention { background: var(--attn-soft); border-radius: 10px; padding-inline: 0.5rem; border-bottom-color: transparent; margin-bottom: 0.25rem; }
.item.attention .time-badge { background: var(--attn); color: #fff; }
.attention-card { background: var(--attn-soft); border-color: var(--attn); }
.attention-card .item { border-bottom-color: color-mix(in srgb, var(--attn) 25%, transparent); }
.attention-card .time-badge { background: var(--attn); color: #fff; }
.nav a.has-badge { position: relative; }
.nav-badge { display: inline-flex; align-items: center; gap: 0.1rem; margin-inline-start: auto; background: var(--attn); color: #fff; border-radius: 99px; padding: 0 0.4rem; font-size: 0.7rem; line-height: 1.6; }
.nav-badge svg { width: 12px !important; height: 12px !important; }
@media (max-width: 820px) {
  .nav-badge { position: absolute; top: 0; inset-inline-start: 50%; margin: 0; padding: 0 0.3rem; }
}
.field-help { display: block; color: var(--muted); font-size: 0.74rem; margin-top: 0.15rem; }
input::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.phone-tail { font-size: 0.72em; font-weight: 400; color: var(--muted); direction: ltr; unicode-bidi: isolate; }
.grid2.keep-2 { grid-template-columns: 1fr 1fr; }
.name-help { margin: -0.4rem 0 0.6rem; }
.dup-card { padding: 0.6rem 0.8rem; margin-bottom: 0.6rem; }

/* admin, support mode, access codes */
.support-bar { position: sticky; top: 0; z-index: 40; grid-column: 1 / -1; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  background: #6b4fbb; color: #fff; padding: 0.5rem 1rem; font-size: 0.88rem; }
.support-bar button { margin-inline-start: auto; background: #fff; color: #6b4fbb; border: none; }
.admin-link { display: flex; align-items: center; gap: 0.8rem; text-decoration: none; color: inherit; border-color: var(--online); }
.admin-link svg { width: 28px; height: 28px; color: var(--online); flex: none; }
.admin-link .sub { display: block; color: var(--muted); font-size: 0.8rem; }
.code-box { background: var(--surface-2); border-radius: 10px; padding: 0.7rem; text-align: center; margin-bottom: 0.6rem; }
.code-value { font-size: 1.8rem; font-weight: 700; letter-spacing: 0.15em; direction: ltr; font-family: ui-monospace, Consolas, monospace; color: var(--primary); }
.access-input { text-transform: uppercase; letter-spacing: 0.12em; font-family: ui-monospace, Consolas, monospace; }
.signup-msg { white-space: pre-wrap; color: var(--text) !important; background: var(--surface-2); border-radius: 8px; padding: 0.3rem 0.5rem; margin-top: 0.2rem; }
@media (max-width: 820px) { .nav .desktop-only { display: none; } }
