/* Clinic booking — single stylesheet, RTL-first (logical properties only).
   No webfonts, no images, no external requests. Dark neutral palette, AA. */

/* Dark is the brand default; the toggle in the header sets data-theme.
   With no stored choice we follow prefers-color-scheme, so a patient whose
   phone is in light mode is not dropped into a black page. */
:root {
  color-scheme: dark;
  --bg: #101418;
  --panel: #181d23;
  --panel-2: #1f262e;
  --line: #323a45;
  --control-line: #5d6b7a;
  --fg: #e9eef4;
  --muted: #a9b4c1;
  --accent: #6fdcc0;
  --accent-ink: #06231b;
  --accent-soft: #123a31;
  --accent-soft-ink: #b8f5e4;
  --danger: #ff9d9d;
  --danger-bg: #2a1719;
  --warn: #f5c26b;
  --warn-bg: #2b2416;
  --ok: #8ce5a9;
  --radius: 12px;
  --tap: 44px;
}


:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f3ec;
  --panel: #fffdf9;
  --panel-2: #efe8dc;
  --line: #d5cbbb;
  --control-line: #7a6f62;
  --fg: #2a2622;
  --muted: #6b6258;
  --accent: #0f6b5c;
  --accent-ink: #ffffff;
  --accent-soft: #ddeee7;
  --accent-soft-ink: #0a4a3f;
  --danger: #b3261e;
  --danger-bg: #fce9e6;
  --warn: #8a5a00;
  --warn-bg: #fff6e5;
  --ok: #1f6b43;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f7f3ec;
    --panel: #fffdf9;
    --panel-2: #efe8dc;
    --line: #d5cbbb;
    --control-line: #7a6f62;
    --fg: #2a2622;
    --muted: #6b6258;
    --accent: #0f6b5c;
    --accent-ink: #ffffff;
    --accent-soft: #ddeee7;
    --accent-soft-ink: #0a4a3f;
    --danger: #b3261e;
    --danger-bg: #fce9e6;
    --warn: #8a5a00;
    --warn-bg: #fff6e5;
    --ok: #1f6b43;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Segoe UI", "Noto Sans Arabic", "Noto Kufi Arabic", Tahoma, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1;
}

html[lang="ar"] body { line-height: 1.85; }

[hidden] { display: none !important; }

.bar-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-inline-size: 0; }

.wrap {
  max-inline-size: 640px;
  margin-inline: auto;
  padding-inline: 16px;
  padding-block-end: 40px;
}

body.admin .wrap { max-inline-size: 1000px; }

.bar {
  position: sticky;
  inset-block-start: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 12px;
  background: var(--bg);
  border-block-end: 1px solid var(--line);
}

.brand { color: var(--muted); font-size: 13px; }

h1 { font-size: 24px; margin: 2px 0 0; line-height: 1.25; font-weight: 700; overflow-wrap: anywhere; }
h2 { font-size: 19px; margin: 0 0 12px; font-weight: 700; }
/* Step headings are focused for screen readers; the default full-width ring
   reads as an empty input on mobile. Keep the focus, drop the box. */
h2[tabindex="-1"]:focus { outline: none; }
h3 { font-size: 16px; margin: 20px 0 8px; color: var(--muted); font-weight: 600; }

p { margin: 0 0 12px; overflow-wrap: anywhere; }

a { color: var(--accent); text-underline-offset: 3px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-block-size: var(--tap);
  min-inline-size: var(--tap);
  padding-inline: 18px;
  padding-block: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  color: var(--fg);
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  max-inline-size: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.btn:hover { border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
/* Async actions keep their label and gain a spinner; the text is still the
   accessible name, aria-busy tells assistive tech what is happening. */
.btn.is-busy { cursor: progress; opacity: .72; }
.btn.is-busy::after {
  content: "";
  inline-size: 14px;
  block-size: 14px;
  border: 2px solid currentColor;
  border-inline-end-color: transparent;
  border-radius: 50%;
  animation: busy-spin .8s linear infinite;
}
@keyframes busy-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .btn.is-busy::after { animation: none; opacity: .65; }
}
/* Tab refreshes use a small in-place spinner; the panel stays readable while
   the request is in flight instead of looking frozen. */
[role="tabpanel"][aria-busy="true"] { opacity: .72; }
[role="tabpanel"][aria-busy="true"]::before {
  content: "";
  display: block;
  inline-size: 14px;
  block-size: 14px;
  margin-block: 8px;
  border: 2px solid var(--accent);
  border-inline-end-color: transparent;
  border-radius: 50%;
  animation: busy-spin .8s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  [role="tabpanel"][aria-busy="true"]::before { animation: none; }
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

.btn--ghost { background: transparent; }
.btn--sm { min-block-size: var(--tap); min-inline-size: var(--tap); padding-inline: 12px; font-size: 14px; }
.btn--danger { border-color: var(--danger); color: var(--danger); background: transparent; }
.danger-text { color: var(--danger); }

.btn:focus-visible, .chip:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.link-btn { display: inline-flex; align-items: center; min-block-size: var(--tap); margin-block-start: 2px; padding: 0; border: 0; background: transparent; color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; }
.link-btn:hover, .link-btn:focus-visible { text-decoration: underline; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-block-start: 8px; min-inline-size: 0; }
.field, .stack, .row, .card, .scroller { min-inline-size: 0; }
.actions .btn--primary { flex: 1 1 160px; }

.step { padding-block: 16px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-block-end: 14px;
}

/* Login and recovery stay narrow on the 1000px desktop shell; otherwise the
   keypad floats at one edge of a nearly full-width card. */
#login-form, #recover-form { max-inline-size: 440px; margin-inline: auto; }
#login h2 { text-align: center; }

.chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-block-size: 64px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--fg);
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.chip:hover { border-color: var(--muted); }
.chip[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.chip[aria-pressed="true"] .t { color: var(--accent-soft-ink); }
.chip[disabled] {
  opacity: 1;
  background: var(--panel-2);
  border-style: dashed;
  color: var(--muted);
  cursor: not-allowed;
}
.chip--empty .t, .chip--empty .s { color: var(--muted); }
.chip .t { font-weight: 600; }
.chip .s { color: var(--muted); font-size: 13px; }
.chip--time { align-items: center; min-block-size: 56px; font-variant-numeric: tabular-nums; }

.field { margin-block-end: 14px; }
.field label { display: block; margin-block-end: 6px; font-size: 14px; color: var(--muted); }

input[type="text"], input[type="tel"], input[type="search"], input[type="number"], input[type="date"],
input[type="time"], input[type="datetime-local"], input[type="password"], input[type="file"], select, textarea {
  inline-size: 100%;
  max-inline-size: 100%;
  min-inline-size: 0;
  min-block-size: var(--tap);
  padding-inline: 12px;
  padding-block: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--fg);
  font: inherit;
}
input[type="search"] { appearance: none; -webkit-appearance: none; }

input[dir="ltr"] { text-align: end; }

input[type="time"], input[type="datetime-local"], select {
  background: var(--panel-2);
  border-color: var(--control-line);
  cursor: pointer;
}
/* Only the native clock affordance is accented; the whole field stays neutral
   so it does not read as a filled/selected value. */
#p-settings input[type="time"] {
  background: var(--panel-2);
  border-color: var(--control-line);
}
#p-settings input[type="time"]:hover,
#p-settings input[type="time"]:focus-visible {
  border-color: var(--accent);
}
#p-settings input[type="time"]::-webkit-calendar-picker-indicator {
  background: var(--accent-soft);
  border-radius: 6px;
  padding: 4px;
  margin-inline-start: 6px;
}
input[type="time"]:hover, input[type="time"]:focus-visible {
  border-color: var(--accent);
}
input[type="time"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: .9;
}

p.notice--warm {
  color: var(--warn);
  background: var(--warn-bg);
  border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent);
  border-radius: 10px;
  padding: 10px 12px;
}

.radio-row { display: flex; gap: 10px; flex-wrap: wrap; }

.plain-fieldset { border: 0; padding: 0; margin: 0 0 14px; }

.radio-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-block-size: var(--tap);
  padding-inline: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--fg);
  cursor: pointer;
}
.radio-row input:checked + span { color: var(--accent); font-weight: 700; }

.banner {
  position: relative;
  max-inline-size: 560px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  padding: 12px 14px;
  margin-block-end: 14px;
  font-size: 15px;
}

.banner--error { border-color: var(--danger); background: var(--danger-bg); color: var(--danger); }
.banner--ok { border-color: var(--ok); color: var(--ok); }
.banner .btn { margin-block-start: 8px; }
.banner-close { position: absolute; inset-block-start: 6px; inset-inline-end: 8px; border: 0; background: transparent; color: inherit; font-size: 20px; line-height: 34px; inline-size: 34px; block-size: 34px; border-radius: 8px; cursor: pointer; }
.banner-close:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.banner--toast {
  position: fixed;
  inset-block-start: 16px;
  inset-inline: 16px;
  z-index: 30;
  margin: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

.timer { font-variant-numeric: tabular-nums; }
.clock { direction: ltr; unicode-bidi: isolate; white-space: nowrap; }

dl.summary { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0 0 14px; }
dl.summary dt { color: var(--muted); font-size: 14px; }
dl.summary dd { margin: 0; }

.code {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: .14em;
  direction: ltr;
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums;
}

.link-list { display: grid; gap: 10px; }
.link-list .btn { justify-content: space-between; }

.sub { color: var(--muted); font-size: 14px; }

pre { overflow: auto; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin: 10px 0 0; max-block-size: 260px; }

ul { padding-inline-start: 20px; margin: 6px 0 0; }
.small { font-size: 13px; color: var(--muted); }
.sr-only {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- admin ---------- */

.tabs--sub { margin-block-start: 4px; margin-block-end: 14px; padding-block-end: 6px; }
.tabs--sub .tab { font-size: 14px; padding-block: 6px; }
.tabs {
  display: flex;
  max-inline-size: 100%;
  min-inline-size: 0;
  flex-wrap: wrap;
  gap: 10px;
  padding-block: 14px;
  border-block-end: 1px solid var(--line);
  margin-block-end: 18px;
}

.svg-sprite { position: absolute; inline-size: 0; block-size: 0; overflow: hidden; }
.ico { inline-size: 1.1em; block-size: 1.1em; flex: 0 0 auto; vertical-align: -0.15em; }
.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-block-size: var(--tap);
  padding-inline: 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

.tab[aria-selected="true"] { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-inline-size: 20px;
  block-size: 20px;
  padding-inline: 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-soft-ink);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

#gaps-table { table-layout: fixed; min-inline-size: 70rem; }
#hours-table { table-layout: fixed; min-inline-size: 34rem; }
#hours-table .time-cell { padding-inline: 3px; }
#hours-table .time-cell select { inline-size: 100%; min-inline-size: 0; padding-inline: 2px; text-align: center; direction: ltr; }
#hours-table th:nth-child(1), #hours-table td:nth-child(1) { inline-size: 7rem; }
#hours-table th:nth-child(8), #hours-table td:nth-child(8) { inline-size: 3rem; }
#gaps-table .time-control { min-inline-size: 13.5rem; }
#gaps-table th, #gaps-table td { white-space: normal; }
#gaps-table th:nth-child(1), #gaps-table td:nth-child(1) { inline-size: 8rem; }
#gaps-table th:nth-child(2), #gaps-table td:nth-child(2) { inline-size: 7.5rem; }
#gaps-table th:nth-child(3), #gaps-table td:nth-child(3),
#gaps-table th:nth-child(4), #gaps-table td:nth-child(4) { inline-size: 14.5rem; }
#gaps-table th:nth-child(5), #gaps-table td:nth-child(5),
#gaps-table th:nth-child(6), #gaps-table td:nth-child(6) { inline-size: 5.5rem; }
#gaps-table th:nth-child(7), #gaps-table td:nth-child(7) { inline-size: 4rem; }
#gaps-table select, #gaps-table input[type="time"], #gaps-table input[type="number"] { min-inline-size: 0; }
#hours-table select, #gaps-table select { font-variant-numeric: tabular-nums; }
#hours-table input[type="checkbox"], #gaps-table input[type="checkbox"], #policy-fields input[type="checkbox"] { inline-size: 20px; block-size: 20px; accent-color: var(--accent); }
@media (max-width: 640px) { #gaps-table { min-inline-size: 70rem; } #hours-table { min-inline-size: 34rem; } }

#log-table { table-layout: fixed; min-inline-size: 640px; }
#log-table th, #log-table td { white-space: normal; }
#log-table th:nth-child(1), #log-table td:nth-child(1) { inline-size: 11rem; }
#log-table th:nth-child(2), #log-table td:nth-child(2) { inline-size: 6rem; }
#log-table th:nth-child(3), #log-table td:nth-child(3) { inline-size: 9rem; }
#log-table th:nth-child(5), #log-table td:nth-child(5) { inline-size: 9rem; }
#log-table td:nth-child(4) { max-inline-size: 22rem; overflow-wrap: anywhere; }

.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-inline-size: 300px; margin-inline: auto; }
.keypad .btn { min-block-size: 58px; font-size: 20px; font-variant-numeric: tabular-nums; }

.pin-input { inline-size: 100%; text-align: center; letter-spacing: .35em; font-size: 24px; }
.pin-display {
  min-block-size: var(--tap);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 24px;
  letter-spacing: .4em;
  direction: ltr;
  unicode-bidi: isolate;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  margin-block-end: 12px;
  min-inline-size: 160px;
}

.scroller {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--muted) var(--panel-2);
  scrollbar-gutter: stable;
}
.scroller::-webkit-scrollbar { block-size: 10px; inline-size: 10px; }
.scroller::-webkit-scrollbar-track { background: var(--panel-2); border-radius: 999px; }
.scroller::-webkit-scrollbar-thumb { background: var(--muted); border-radius: 999px; border: 2px solid var(--panel-2); }
.scroller::-webkit-scrollbar-thumb:hover { background: var(--fg); }

table { border-collapse: collapse; inline-size: 100%; font-size: 14px; }
th, td { text-align: start; padding: 10px 12px; border-block-end: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; white-space: nowrap; }
td.nums { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate;
  /* a time RANGE is one token: letting it wrap puts the separator at the start
     of the next line, which reads as a leading dash in RTL */
  white-space: nowrap; }

.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.appt-filter { gap: 12px; margin-block: 2px 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.appt-filter > label { display: inline-flex; align-items: center; gap: 8px; }
.appt-filter > label > select, .appt-filter > label > input { min-block-size: var(--tap); }
.history-search { margin-block: 12px 14px; }
.history-pager { justify-content: center; margin-block: 16px 4px; }
.scroller { margin-block-start: 12px; }
.row > * { flex: 0 1 auto; }
.block-when select { flex: 1 1 0; min-inline-size: 0; }
.grow { flex: 1 1 160px; }

.status { font-size: 13px; color: var(--muted); }
.status--confirmed { color: var(--ok); }

.stack > * + * { margin-block-start: 10px; }

@media (max-width: 640px) {
  .wrap { padding-inline: 12px; }
  .card { padding: 14px; }
  .actions .btn { flex: 1 1 140px; }

  /* Appointment tables become stacked cards: a 5-column table cannot stay
     readable at a phone width, and horizontal scrolling hid the actions. */
  .appt-filter { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 12px; }
  .appt-filter > label { justify-content: space-between; inline-size: 100%; }
  .appt-filter > label > select, .appt-filter > label > input { flex: 1 1 auto; min-inline-size: 0; }
  .appt-filter > .btn, .appt-filter > .small { inline-size: 100%; }
  .appt-filter > .small { text-align: center; }

  .appt-table, .appt-table tbody, .appt-table tr, .appt-table td { display: block; inline-size: 100%; }
  .appt-table thead { display: none; }
  .appt-table tr {
    margin-block-end: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
  }
  .appt-table td {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 0;
    border: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .appt-table td::before {
    content: attr(data-label);
    flex: 0 0 5rem;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
  }
  .appt-table td[data-label] { min-inline-size: 0; }
  .appt-table td:last-child { display: block; }
  .appt-table td:last-child::before { display: block; margin-block-end: 6px; }
  .appt-table td .row { inline-size: 100%; }
  .appt-table td .btn { flex: 1 1 9rem; white-space: normal; overflow-wrap: normal; text-align: center; }
  .appt-table td .btn--sm { min-block-size: var(--tap); }
}

@media (max-width: 420px) {
  .chips { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  h1 { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .btn:active { transform: none; }
}

@media print {
  .bar, .tabs, .actions { display: none !important; }
}

/* Admin at 320-420px: six tab pills plus the session countdown take ~140px of
   header when they wrap. Scroll the row instead of stacking it. */
@media (max-width: 420px) {
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
  .tabs > * { flex: 0 0 auto; }
}

/* Inline text button (the "edit" affordance on review). Keeps the visual weight of
   a link while staying a real <button> for keyboard and screen-reader users. */
.linkbtn { background: none; border: 0; padding: 0; margin-inline-start: 4px;
  font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }

.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper input[type="number"] { inline-size: 5.5rem; text-align: center; }
.stepper .btn { padding-inline: 8px; }
.time-control { display: inline-flex; align-items: center; gap: 4px; inline-size: 100%; }
.time-control .time-hour, .time-control .time-minute { flex: 1 1 0; min-inline-size: 3.6rem; padding-inline: 6px; text-align: center; font-variant-numeric: tabular-nums; }
.time-control .time-ampm { flex: 0 0 auto; inline-size: auto; min-inline-size: 4rem; padding-inline: 6px; }
.mfa-qr { inline-size: 180px; max-inline-size: 100%; background: #fff; padding: 8px; border-radius: 8px; }
.mfa-qr svg { display: block; inline-size: 100%; block-size: auto; }

.outbox-row { justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

.modal {
  inline-size: min(32rem, calc(100vw - 2rem));
  max-block-size: calc(100dvh - 2rem);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem;
  background: var(--panel);
  color: var(--fg);
  box-shadow: 0 24px 80px rgb(0 0 0 / .45);
}
.modal::backdrop { background: rgb(0 0 0 / .55); }
.modal h2 { margin-block-start: 0; }
.modal p { white-space: pre-line; overflow-wrap: anywhere; }
.modal .actions { justify-content: flex-end; margin-block-start: 1.25rem; }

#exports-table { table-layout: fixed; min-inline-size: 40rem; }
#exports-table th:nth-child(1), #exports-table td:nth-child(1) { inline-size: 42%; overflow-wrap: anywhere; }
#exports-table th:nth-child(2), #exports-table td:nth-child(2) { inline-size: 34%; white-space: nowrap; font-variant-numeric: tabular-nums; }
#exports-table th:nth-child(3), #exports-table td:nth-child(3) { inline-size: 24%; text-align: end; }

/* Consistent notification surface: stays in view, bounded width, auto-dismissed. */
#alert {
  position: fixed;
  inset-block-start: var(--alert-top, 72px);
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  inline-size: min(46rem, calc(100vw - 2rem));
  max-block-size: min(60vh, 12rem);
  overflow: auto;
  overflow-wrap: anywhere;
  padding-inline-end: 48px;
  z-index: 60;
  margin: 0 auto 14px;
  box-shadow: 0 12px 40px rgb(0 0 0 / .35);
}
#alert[hidden] { display: none; }
#login-form .actions { margin-block: 14px; }
#forgot { display: block; margin-block-start: 14px; }
#hours-table tr.row--closed .time-cell { opacity: .45; }
#hours-table tr.row--closed .time-cell select { cursor: not-allowed; }
#gaps-table .stepper { inline-size: 100%; flex-wrap: nowrap; gap: 2px; }
#gaps-table .stepper input[type="number"] { inline-size: 3.4rem; min-inline-size: 0; padding-inline: 2px; }
#gaps-table .stepper .btn { padding-inline: 5px; min-inline-size: 26px; }
#gaps-table th:nth-child(5), #gaps-table td:nth-child(5),
#gaps-table th:nth-child(6), #gaps-table td:nth-child(6) { inline-size: 8.5rem; }
#s-done .card .code-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
#s-done .card .code-row .code { margin: 0; }
#s-done #copy-code { min-inline-size: 6.5rem; }
#my-days { margin-block-end: 12px; }
#my-times { margin-block-start: 10px; }
.telegram-help { white-space: pre-line; }
