/* HRC leave app: tokens, base, layout and shared components.
   Phone first; the desktop layout starts at 960px. Colours only through the tokens below,
   so dark mode is a token swap. Leave types: .t-vac .t-sick .t-fam .t-res, grey .t-away. */

:root {
  color-scheme: light dark;
  --font: system-ui, -apple-system, "Segoe UI", "Noto Sans Hebrew", "Arial Hebrew", Arial, sans-serif;

  --bg: #f4f3ef;
  --surface: #ffffff;
  --surface-2: #f8f7f3;
  --surface-3: #eeece6;
  --line: #e3e0d8;
  --line-strong: #c9c5bb;
  --ink: #1c2530;
  --ink-2: #47525e;
  --ink-3: #5d6670;

  --accent: #1f5f6b;
  --accent-hover: #184d57;
  --accent-ink: #ffffff;
  --accent-soft: #e2eef0;
  --accent-text: #1b5761;
  --focus: #2a6fdb;

  --danger: #b3261e;
  --danger-hover: #93201a;
  --danger-ink: #ffffff;
  --danger-soft: #fbe9e7;
  --warn: #7f4d00;
  --warn-soft: #fdf1dc;
  --warn-line: #efd29b;
  --ok: #1d7044;
  --ok-soft: #e3f3e9;
  --badge: #c4362c;
  --badge-ink: #ffffff;

  /* Leave types: solid colour, soft background, letter colour on the solid colour */
  --t-vac: #2563c4;
  --t-vac-soft: #e5edfb;
  --t-sick: #c2352c;
  --t-sick-soft: #fbe7e5;
  --t-fam: #8b3d9f;
  --t-fam-soft: #f3e8f7;
  --t-res: #5d6a1c;
  --t-res-soft: #eef1db;
  --t-away: #5f6873;
  --t-away-soft: #eceef0;
  --t-on: #ffffff;

  /* Calendar days, for the calendar view */
  --day-closed: #2f3a45;
  --day-closed-ink: #f4f3ef;
  --day-eve: #f7edd7;
  --day-today: #e2eef0;

  --shadow-1: 0 1px 2px rgb(28 37 48 / 0.06), 0 1px 1px rgb(28 37 48 / 0.04);
  --shadow-2: 0 12px 32px rgb(28 37 48 / 0.18);
  --backdrop: rgb(16 22 28 / 0.45);

  --radius: 14px;
  --radius-sm: 10px;
  --header-h: 56px;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101418;
    --surface: #181e24;
    --surface-2: #1e252c;
    --surface-3: #262e36;
    --line: #2a333c;
    --line-strong: #3d4853;
    --ink: #e7ebee;
    --ink-2: #b4bec8;
    --ink-3: #939ea9;

    --accent: #62b2bd;
    --accent-hover: #7cc2cc;
    --accent-ink: #0b1d21;
    --accent-soft: #19343a;
    --accent-text: #86c8d1;
    --focus: #8ab8ff;

    --danger: #f2877d;
    --danger-hover: #f6a39b;
    --danger-ink: #2a0d0a;
    --danger-soft: #3a1d1b;
    --warn: #f0c272;
    --warn-soft: #33281a;
    --warn-line: #5a4423;
    --ok: #74d29c;
    --ok-soft: #18301f;
    --badge: #f07a6f;
    --badge-ink: #2a0d0a;

    --t-vac: #6fa1f2;
    --t-vac-soft: #1b2a42;
    --t-sick: #f07a6f;
    --t-sick-soft: #3b1f1d;
    --t-fam: #c98ddb;
    --t-fam-soft: #322139;
    --t-res: #b4c35d;
    --t-res-soft: #2a2f17;
    --t-away: #a3adb7;
    --t-away-soft: #262d34;
    --t-on: #0f1418;

    --day-closed: #3a4653;
    --day-closed-ink: #f1f4f6;
    --day-eve: #2e2717;
    --day-today: #19343a;

    --shadow-1: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow-2: 0 12px 32px rgb(0 0 0 / 0.55);
    --backdrop: rgb(0 0 0 / 0.6);
  }
}

/* ---------------------------------------------------------------- base */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}
html.has-sheet { overflow: hidden; }

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 650; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.0625rem; }
p { margin: 0; }
a { color: var(--accent-text); text-underline-offset: 3px; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}
:focus:not(:focus-visible) { outline: none; }

.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;
}

/* Numbers, phones and times inside Hebrew text */
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: 0.875rem; }
.nowrap { white-space: nowrap; }

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

/* ---------------------------------------------------------------- shell */

.shell { min-height: 100dvh; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--header-h);
  padding-inline: 12px 4px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.hdr-start { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.hdr-end { display: flex; align-items: center; gap: 2px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; flex: none; }
.brand-name { display: none; font-weight: 650; font-size: 1rem; }
.page-title {
  font-size: 1.0625rem;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
/* Focus moves here on every screen change, for screen readers; no ring for a heading. */
.page-title:focus { outline: none; }
.hdr-back { margin-inline-start: -8px; }

.app-main {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding: 16px 16px calc(var(--nav-h) + var(--safe-b) + 24px);
}
.app-main:focus { outline: none; }

.view { display: grid; gap: 16px; min-width: 0; }

.app-nav {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 30;
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.nav-main { display: flex; height: var(--nav-h); margin: 0; padding: 0; list-style: none; }
.nav-main > li { flex: 1 1 0; min-width: 0; }
.nav-more-list { display: none; }

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  height: 100%;
  padding: 6px 2px 4px;
  border: 0;
  background: none;
  color: var(--ink-3);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 550;
  line-height: 1.2;
}
.nav-ico {
  position: relative;
  display: grid;
  place-items: center;
  width: 56px;
  height: 30px;
  border-radius: 999px;
  transition: background-color 160ms var(--ease);
}
.nav-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item[aria-current="page"] { color: var(--accent-text); }
.nav-item[aria-current="page"] .nav-ico { background: var(--accent-soft); }
.nav-item:active .nav-ico { background: var(--surface-3); }
.nav-ico .badge { position: absolute; top: -4px; inset-inline-end: 6px; }

.nav-group-title {
  margin: 16px 12px 4px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-3);
}

.update-bar {
  position: fixed;
  inset-inline: 12px;
  bottom: calc(var(--nav-h) + var(--safe-b) + 12px);
  z-index: 40;
  max-width: 520px;
  margin-inline: auto;
}

@media (min-width: 600px) {
  .app-main { padding-inline: 24px; }
}

@media (min-width: 960px) {
  .shell {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    grid-template-rows: var(--header-h) minmax(0, 1fr);
    grid-template-areas: "header header" "nav main";
  }
  .app-header { grid-area: header; padding-inline: 20px 12px; }
  .brand { width: 216px; }
  .brand-name { display: inline; }
  .hdr-back { order: 2; margin-inline-start: 0; }
  .page-title { order: 3; }
  .app-main { grid-area: main; padding: 24px 32px 48px; }
  .app-nav {
    grid-area: nav;
    position: sticky;
    top: var(--header-h);
    height: calc(100dvh - var(--header-h));
    padding: 12px 8px;
    overflow-y: auto;
    scrollbar-width: thin;
    border-top: 0;
    border-inline-end: 1px solid var(--line);
    background: var(--surface-2);
  }
  .nav-main, .nav-more-list { display: block; height: auto; margin: 0; padding: 0; list-style: none; }
  .nav-main > li.nav-more-btn { display: none; }
  .nav-item {
    position: relative;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    height: 44px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    color: var(--ink-2);
  }
  .nav-ico { position: static; width: 24px; height: 24px; background: none !important; }
  .nav-ico .badge { top: 50%; inset-inline-end: 12px; transform: translateY(-50%); box-shadow: none; }
  .nav-item:hover { background: var(--surface-3); }
  .nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); font-weight: 650; }
  .update-bar { bottom: 16px; }
}

/* Bare layout: login, privacy notice, join page */
.bare {
  min-height: 100dvh;
  display: grid;
  align-content: start;
  justify-items: center;
  padding: 32px 16px calc(32px + var(--safe-b));
}
.bare-inner { width: 100%; max-width: 440px; display: grid; gap: 20px; }
.bare-brand { display: flex; align-items: center; gap: 12px; justify-content: center; }
.bare-brand .brand-title { font-size: 1.25rem; font-weight: 700; }
@media (min-width: 600px) { .bare { align-content: center; } }

.splash { min-height: 70dvh; display: grid; place-items: center; }

/* ---------------------------------------------------------------- surfaces */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  padding: 16px;
  min-width: 0;
}
.card > * + * { margin-top: 12px; }
.card-title { font-size: 1.0625rem; font-weight: 650; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-head > * + * { margin-top: 0; }
.card-link { display: block; color: inherit; text-decoration: none; }
.card-link:hover { border-color: var(--line-strong); }

.section-title {
  font-size: 0.875rem;
  font-weight: 650;
  color: var(--ink-3);
  margin: 4px 2px -4px;
}

.stack { display: grid; gap: 12px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grow { flex: 1; min-width: 0; }

.list { margin: 0; padding: 0; list-style: none; }
.list > li + li { border-top: 1px solid var(--line); }
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 4px;
  color: inherit;
  text-decoration: none;
}
a.list-item:hover { background: var(--surface-2); }

hr.sep { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 140ms var(--ease), border-color 140ms var(--ease);
}
.btn:hover { background: var(--line); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-danger { background: var(--danger); color: var(--danger-ink); }
.btn-danger:hover { background: var(--danger-hover); }
.btn-ghost { background: transparent; color: var(--accent-text); }
.btn-ghost:hover { background: var(--accent-soft); }
.btn-outline { background: var(--surface); border-color: var(--line-strong); }
.btn-outline:hover { background: var(--surface-2); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 0.9375rem; }
.btn-block { display: flex; width: 100%; }
.btn.is-busy { position: relative; color: transparent !important; }
.btn.is-busy::after {
  content: "";
  position: absolute;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2.5px solid currentColor;
  border-color: var(--accent-ink) var(--accent-ink) transparent transparent;
  animation: spin 0.8s linear infinite;
}
.btn:not(.btn-primary).is-busy::after { border-color: var(--ink-2) var(--ink-2) transparent transparent; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  text-decoration: none;
}
.icon-btn:hover { background: var(--surface-3); }
.icon-btn .badge { position: absolute; top: 4px; inset-inline-end: 2px; }

.badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--badge);
  color: var(--badge-ink);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 2px var(--surface);
}

.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions > .btn { flex: 1 1 auto; }
@media (min-width: 600px) { .actions > .btn { flex: 0 0 auto; } }

/* ---------------------------------------------------------------- forms */

.field { display: grid; gap: 6px; min-width: 0; }
.field-label { font-size: 0.9375rem; font-weight: 600; }
.field-hint { font-size: 0.875rem; color: var(--ink-3); }
.field-error { font-size: 0.875rem; color: var(--danger); font-weight: 550; }

.input, .select, .textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); opacity: 1; }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 0;
  border-color: transparent;
}
.input[readonly] { background: var(--surface-2); color: var(--ink-2); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.input-ltr { direction: ltr; text-align: right; }
.input-time { width: 7.5em; text-align: center; font-variant-numeric: tabular-nums; }

/* Password with a show button. The input is LTR inside an RTL page, so the sides are physical. */
.input-wrap { position: relative; }
.input-wrap > .input { padding-left: 52px; text-align: right; }
.input-wrap > .icon-btn { position: absolute; left: 2px; top: 2px; }

.check {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 4px 2px;
  cursor: pointer;
}
.check input[type="checkbox"], .check input[type="radio"] {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--accent);
}
.check.is-fixed { cursor: default; color: var(--ink-3); }
.check-text { flex: 1; min-width: 0; }
.check-note { font-size: 0.8125rem; color: var(--ink-3); }

/* Segmented control */
.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface-3);
}
.seg-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 40px;
  padding: 4px 6px;
  line-height: 1.2;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 0.9375rem;
}
.seg-btn[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }

/* Chips (quick buttons) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 0.9375rem;
  font-weight: 550;
}
.chip:hover { background: var(--surface-2); }
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }

/* Password checklist */
.pw-rules { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 0.875rem; color: var(--ink-3); }
.pw-rules li { display: flex; align-items: center; gap: 8px; }
.pw-rules li svg { flex: none; }
.pw-rules li.is-ok { color: var(--ok); }
.pw-rules li.is-bad { color: var(--danger); }

/* ---------------------------------------------------------------- leave marks */

.t-vac { --tc: var(--t-vac); --tc-soft: var(--t-vac-soft); }
.t-sick { --tc: var(--t-sick); --tc-soft: var(--t-sick-soft); }
.t-fam { --tc: var(--t-fam); --tc-soft: var(--t-fam-soft); }
.t-res { --tc: var(--t-res); --tc-soft: var(--t-res-soft); }
.t-away { --tc: var(--t-away); --tc-soft: var(--t-away-soft); }

.tb {
  display: inline-grid;
  place-items: center;
  flex: none;
  min-width: 24px;
  height: 24px;
  padding: 0 5px;
  border: 1.5px solid var(--tc);
  border-radius: 7px;
  background: var(--tc);
  color: var(--t-on);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1;
}
.tb.is-pending { background: var(--tc-soft); color: var(--tc); border-style: dashed; }
.tb-wrap { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.tb-label { font-weight: 600; }

.chip-away {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--t-away-soft);
  color: var(--t-away);
  font-size: 0.8125rem;
  font-weight: 650;
  white-space: nowrap;
}

.mark { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.mark-time { font-size: 0.875rem; color: var(--ink-2); white-space: nowrap; }
.mark-eye { color: var(--ink-3); }

/* ---------------------------------------------------------------- feedback */

.banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
}
.banner > svg { flex: none; margin-top: 1px; }
.banner-text { flex: 1; min-width: 0; }
.banner .btn { flex: none; }
.banner-info { background: var(--accent-soft); border-color: transparent; }
.banner-info > svg { color: var(--accent-text); }
.banner-warn { background: var(--warn-soft); border-color: var(--warn-line); }
.banner-warn > svg { color: var(--warn); }
.banner-error { background: var(--danger-soft); border-color: transparent; }
.banner-error > svg { color: var(--danger); }
.banner-ok { background: var(--ok-soft); border-color: transparent; }
.banner-ok > svg { color: var(--ok); }
.update-bar .banner { box-shadow: var(--shadow-2); }

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 120px;
  color: var(--ink-3);
}
.spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px solid var(--line-strong);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 32px 16px;
  text-align: center;
  color: var(--ink-3);
}
.empty > svg { color: var(--line-strong); }
.empty .btn { margin-top: 6px; }

.toasts {
  position: fixed;
  inset-inline: 12px;
  bottom: calc(var(--nav-h) + var(--safe-b) + 12px);
  z-index: 100;
  display: grid;
  justify-items: center;
  gap: 8px;
  pointer-events: none;
}
.toast {
  max-width: 480px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--bg);
  box-shadow: var(--shadow-2);
  font-size: 0.9375rem;
  font-weight: 550;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms var(--ease), transform 180ms var(--ease);
}
.toast.is-in { opacity: 1; transform: none; }
.toast-error { background: var(--danger); color: var(--danger-ink); }
.toast-ok { background: var(--ok); color: var(--surface); }
@media (min-width: 960px) { .toasts { bottom: 24px; } }

/* ---------------------------------------------------------------- bottom sheet */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: var(--backdrop);
  animation: fade-in 160ms var(--ease);
}
.sheet {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: calc(100dvh - 32px);
  border-radius: 20px 20px 0 0;
  background: var(--surface);
  box-shadow: var(--shadow-2);
  padding-bottom: var(--safe-b);
  animation: sheet-up 220ms var(--ease);
}
.sheet:focus { outline: none; }
.sheet-handle {
  flex: none;
  width: 40px;
  height: 4px;
  margin: 8px auto 0;
  border-radius: 4px;
  background: var(--line-strong);
}
.sheet-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 4px 16px 4px 4px;
  padding-inline: 16px 4px;
}
.sheet-title { flex: 1; font-size: 1.125rem; font-weight: 650; }
.sheet-x { margin-inline-start: auto; }
.sheet-body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px 16px; }
.sheet-body > * + * { margin-top: 12px; }
.sheet-actions {
  flex: none;
  display: flex;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
}
.sheet-actions > .btn { flex: 1 1 0; }
.sheet-backdrop.is-out { animation: fade-out 160ms var(--ease) forwards; }
.sheet-backdrop.is-out .sheet { animation: sheet-down 160ms var(--ease) forwards; }

@media (min-width: 600px) {
  .sheet-backdrop { align-items: center; padding: 24px; }
  .sheet {
    max-width: 520px;
    max-height: calc(100dvh - 48px);
    border-radius: 18px;
    padding-bottom: 0;
    animation-name: pop-in;
  }
  .sheet.sheet-wide { max-width: 760px; }
  .sheet-handle { display: none; }
  .sheet-head { padding-top: 8px; }
  .sheet-actions { justify-content: flex-start; }
  .sheet-actions > .btn { flex: 0 0 auto; min-width: 120px; }
  .sheet-backdrop.is-out .sheet { animation-name: pop-out; }
}

@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes sheet-down { to { transform: translateY(100%); } }
@keyframes pop-in { from { opacity: 0; transform: scale(0.97); } }
@keyframes pop-out { to { opacity: 0; transform: scale(0.97); } }

/* Menu inside a sheet (the "עוד" sheet) */
.menu { margin: 0 -8px; padding: 0; list-style: none; }
.menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 52px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--ink);
  text-decoration: none;
  font-size: 1rem;
  text-align: start;
}
.menu-item:hover { background: var(--surface-2); }
.menu-item > svg { color: var(--ink-3); flex: none; }
.menu-item .badge { margin-inline-start: auto; }
.menu-title { margin: 12px 4px 2px; font-size: 0.8125rem; font-weight: 650; color: var(--ink-3); }
.menu-who { padding: 0 4px 4px; color: var(--ink-3); font-size: 0.9375rem; }

/* ---------------------------------------------------------------- person picker */

.picker { display: grid; gap: 12px; }
.picker-summary { font-size: 0.9375rem; color: var(--ink-2); }
.picker-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.picker-list > li { padding: 0 12px; }
.picker-list > li + li { border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------- responsive table */

.table-wrap { min-width: 0; }
.rtable { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.rtable caption { text-align: start; font-weight: 650; padding-bottom: 8px; }
.rtable th {
  text-align: start;
  font-size: 0.8125rem;
  font-weight: 650;
  color: var(--ink-3);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
.rtable td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.rtable tbody tr.is-link { cursor: pointer; }
.rtable tbody tr.is-link:hover td { background: var(--surface-2); }

@media (min-width: 760px) {
  .table-wrap {
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-1);
  }
  .rtable tbody tr:last-child td { border-bottom: 0; }
}

@media (max-width: 759.98px) {
  .rtable thead { display: none; }
  .rtable, .rtable tbody { display: block; }
  .rtable caption { display: block; }
  .rtable tr {
    display: grid;
    gap: 4px;
    margin-bottom: 10px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-1);
  }
  .rtable td { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; border: 0; }
  .rtable td::before { content: attr(data-label); color: var(--ink-3); font-size: 0.8125rem; flex: none; }
  .rtable td.is-primary { font-weight: 650; font-size: 1rem; }
  .rtable td.is-primary::before, .rtable td[data-label=""]::before { content: none; }
}

/* ---------------------------------------------------------------- QR */

.qr { width: 220px; max-width: 100%; aspect-ratio: 1; padding: 0; border-radius: 8px; background: #fff; }

/* ---------------------------------------------------------------- notice text */

.prose { display: grid; gap: 12px; color: var(--ink); }
.prose h3 { margin-top: 6px; }
.prose ul { margin: 0; padding-inline-start: 1.2em; display: grid; gap: 4px; }
