/* rijal-alfajr: tokens from the handoff (§2). Mobile-first, 390px design width. */
@font-face {
  font-family: "Thmanyah Serif Display";
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/thmanyah-display.woff2") format("woff2");
}
@font-face {
  font-family: "Readex Pro";
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/readex-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+FE70-FEFF, U+200C-200F;
}
@font-face {
  font-family: "Readex Pro";
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/readex-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2010-2027;
}
@font-face {
  font-family: "Amiri";
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/amiri-arabic.woff2") format("woff2");
}

:root {
  --ink: #141a3a;
  --ink-2: #2e3863;
  --text-2: #4e5470;
  --muted: #646a85;
  --gold: #f2c46d;
  --bg: #f4f1ec;
  --surface: #fff;
  --hairline: rgb(20 26 58 / 8%);
  --input-line: rgb(20 26 58 / 16%);
  --cream: #fbf3e4;
  --cream-2: rgb(251 243 228 / 82%);
  --success-bg: #e3ede6;
  --success: #1e5a3a;
  --wa-bg: #e3f2e9;
  --wa: #1e7a4a;
  --danger: #9a3b3b;
  --soft: #e9e6ec;
  --dawn: linear-gradient(180deg, #141a3a 0%, #2e3863 35%, #6b7090 65%, #a9a7b0 85%, #cfd4da 100%);
  --shadow: 0 8px 24px rgb(20 26 58 / 12%);
  --display: "Thmanyah Serif Display", "Readex Pro", serif;
  --tab-h: 72px;
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.22s;
}

/* RTL: the next tab sits to the left, so it slides in from the left. */
html[data-dir="next"]::view-transition-old(root) {
  animation-name: out-to-right;
}
html[data-dir="next"]::view-transition-new(root) {
  animation-name: in-from-left;
}
html[data-dir="prev"]::view-transition-old(root) {
  animation-name: out-to-left;
}
html[data-dir="prev"]::view-transition-new(root) {
  animation-name: in-from-right;
}

@keyframes out-to-left {
  to {
    transform: translateX(-30%);
    opacity: 0;
  }
}
@keyframes in-from-right {
  from {
    transform: translateX(30%);
    opacity: 0;
  }
}
@keyframes out-to-right {
  to {
    transform: translateX(30%);
    opacity: 0;
  }
}
@keyframes in-from-left {
  from {
    transform: translateX(-30%);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}

* {
  box-sizing: border-box;
}

/* Mobile first: the page never pans sideways. The rules below keep every
   element inside the width; the clip is the safety net, not the fix. */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Readex Pro", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* The tab strip: the current page and, while dragging, its neighbour beside it.
   Vertical scrolling stays with the browser; app.js handles the sideways drag. */
.views {
  position: relative;
  overflow-x: clip;
  touch-action: pan-y;
}

.view--peer {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  pointer-events: none;
}

/* Long names, addresses and emails wrap instead of widening their row. */
b,
span,
p,
a,
label,
h1,
h2,
h3 {
  overflow-wrap: anywhere;
}

img,
svg,
input,
select,
textarea,
button {
  max-width: 100%;
}

/* Dates and numbers inside RTL text stay in one piece. */
bdi {
  white-space: nowrap;
  overflow-wrap: normal;
}

body:not(.is-admin) {
  padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom));
}

a {
  color: var(--ink);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.3;
}

h2 {
  font-size: 26px;
}

h3 {
  font-size: 20px;
}

p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--ink-2);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

.ltr {
  direction: ltr;
  unicode-bidi: isolate;
}

/* Visually hidden, still reachable. Kept in place (no side offset) and clipped,
   so it can never widen an RTL page. */
.sr,
.field input.sr {
  position: absolute;
  inset-inline-start: 0;
  width: 1px;
  min-height: 0;
  height: 1px;
  padding: 0;
  margin: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  opacity: 0;
}

.note {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.lead {
  font-size: 16px;
  line-height: 1.85;
}

/* ---- Dawn header ---- */
.dawn {
  position: relative;
  background: var(--dawn);
  color: var(--cream);
  overflow: hidden;
}

.dawn--home {
  height: 410px;
}

.dawn--inner {
  height: 250px;
}

.dawn--done {
  height: 420px;
}

.dawn__photo {
  position: absolute;
  inset: auto 0 0;
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: 38% 22%;
  mask-image: linear-gradient(180deg, transparent 0, #000 70px);
}

.dawn--inner .dawn__photo {
  height: 120px;
}

.dawn--done .dawn__photo {
  height: 220px;
}

.brand {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  padding: 16px 20px;
}

.brand__name {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  color: var(--cream);
  text-decoration: none;
}

.brand__place {
  font-size: 13px;
  color: var(--cream-2);
}

.back {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-inline-start: -10px;
  color: var(--cream);
}

.ptitle {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 20px;
}

.ptitle h1 {
  font-size: 40px;
}

.ptitle span {
  font-size: 14px;
  color: var(--cream-2);
}

.countdown {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  text-align: center;
}

.countdown span {
  font-size: 14px;
  color: var(--cream-2);
}

.countdown b {
  font-size: 60px;
  font-weight: 600;
  line-height: 1;
  direction: ltr;
  font-variant-numeric: tabular-nums;
}

.done {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-top: 72px;
  text-align: center;
}

.done h1 {
  font-size: 40px;
}

.done span {
  color: var(--cream-2);
}

.done__mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
}

.done__mark svg {
  width: 30px;
  height: 30px;
}

/* ---- Page body ---- */
.page {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 16px 24px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sec {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 28px;
}

.sec__head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
}

.card {
  padding: 18px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.empty {
  color: var(--muted);
  text-align: center;
  font-size: 14px;
  padding: 12px;
}

/* ---- Floating prayer card ---- */
.float {
  position: relative;
  margin-top: -64px;
  padding: 20px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.float--preview {
  margin-top: 0;
}

.float__head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.float__head .muted {
  font-size: 13px;
}

.float__mosque {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
}

.tiles {
  display: flex;
  gap: 12px;
  font-variant-numeric: tabular-nums;
}

.tiles > div,
.tile {
  flex: 1 1 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tiles .muted {
  font-size: 13px;
}

.tiles b {
  font-size: 24px;
  font-weight: 600;
}

/* ---- Steps ---- */
.steps {
  margin: 0;
  list-style: none;
  gap: 16px;
}

.steps li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.steps li > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 6px;
}

.steps b {
  font-size: 16px;
  font-weight: 500;
}

.steps li span:not(.steps__n) {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2);
}

.steps__n {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--gold);
  font-size: 15px;
  font-weight: 600;
}

/* ---- Buttons ---- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn--gold {
  background: var(--gold);
  color: var(--ink);
}

.btn--ink {
  background: var(--ink);
  color: var(--cream);
}

.btn--line {
  min-height: 48px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  color: var(--ink);
  font-size: 15px;
  font-weight: 400;
}

.btn--wa {
  background: var(--wa-bg);
  color: var(--wa);
  font-weight: 500;
}

.btn--sm {
  min-height: 44px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 12px;
}

.danger {
  color: var(--danger);
}

.link {
  align-self: center;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border: 0;
  background: none;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  text-decoration: underline;
  cursor: pointer;
}

/* ---- Floating install bar (above the tab bar, on every public page) ---- */
.installbar {
  position: fixed;
  inset-inline: 12px;
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 10px);
  z-index: 15;
  max-width: 536px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 6px 10px 12px;
  padding-inline: 12px 6px;
  border-radius: 18px;
  background: var(--ink);
  color: var(--cream);
  box-shadow: 0 10px 28px rgb(20 26 58 / 28%);
  animation: bar-in 0.35s cubic-bezier(0.22, 0.8, 0.24, 1);
}

@keyframes bar-in {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .installbar {
    animation: none;
  }
}

.installbar__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 11px;
}

.installbar__text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.installbar__text b {
  font-size: 14px;
  font-weight: 600;
}

.installbar__text span {
  font-size: 12px;
  line-height: 1.45;
  color: var(--cream-2);
}

/* Very narrow phones: the title and the button are enough (iPhone keeps its
   instruction line, since it has no button). */
@media (max-width: 374px) {
  .installbar:has([data-install-btn]:not([hidden])) .installbar__text span {
    display: none;
  }
}

.installbar .btn--sm {
  flex-shrink: 0;
  min-height: 40px;
  padding: 0 14px;
}

.installbar__close {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-inline-start: -4px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--cream-2);
  cursor: pointer;
}

/* Admin counters table. */
.stats {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.stats th,
.stats td {
  padding: 10px 4px;
  border-bottom: 1px solid var(--hairline);
  text-align: start;
  vertical-align: top;
}

.stats thead th {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.stats tbody th {
  font-weight: 400;
}

.stats td {
  width: 64px;
  font-weight: 600;
  text-align: center;
}

.stats tbody tr:first-child th,
.stats tbody tr:first-child td {
  color: var(--success);
  font-weight: 600;
}

/* Attendance: which day is being managed. */
.daypick {
  display: flex;
  align-items: center;
  gap: 8px;
}

.daypick__field {
  flex: 1 1 auto;
  min-width: 0;
}

.daypick input {
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--input-line);
  background: var(--surface);
  font: inherit;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  text-align: center;
}

.daypick .iconbtn {
  width: 48px;
  height: 48px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--hairline);
}

.iconbtn.is-disabled {
  opacity: 0.35;
}

.pastday {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fbf0d9;
  color: #7a5900;
  font-size: 14px;
  font-weight: 500;
}

.pastday a {
  color: #7a5900;
  font-weight: 600;
}

/* Admin: no tab bar, so the bar sits at the bottom edge. */
.installbar--admin {
  bottom: calc(12px + env(safe-area-inset-bottom));
}

body.is-admin.has-installbar {
  padding-bottom: calc(env(safe-area-inset-bottom) + 92px);
}

/* Room for the bar so it never covers the end of the page. */
body.has-installbar {
  padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 92px);
}

/* ---- Heroes ---- */
.hero {
  flex-direction: row;
  align-items: center;
  gap: 14px;
}

.hero__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-grow: 1;
}

.hero__text b {
  font-size: 17px;
  font-weight: 500;
}

.hero__text .muted {
  font-size: 13px;
}

.hero--col {
  flex-direction: column;
  text-align: center;
  gap: 8px;
}

.hero--col b {
  font-size: 15px;
  font-weight: 500;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hphoto {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--soft);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  object-fit: cover;
}

.hphoto--big {
  width: 72px;
  height: 72px;
}

.badge {
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--bg);
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
}

.badge--ink {
  padding: 6px 10px;
  background: var(--ink);
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
}

/* ---- Hadith ---- */
.hadith {
  margin: 0;
  gap: 8px;
}

.hadith blockquote {
  margin: 0;
  font-family: "Amiri", serif;
  font-size: 20px;
  line-height: 1.9;
}

/* ---- Forms ---- */
.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label,
.label {
  font-size: 14px;
  font-weight: 500;
}

.field input:not([type="checkbox"], [type="radio"]),
.field select,
.search {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--input-line);
  background: var(--surface);
  font: inherit;
  font-size: 16px;
  color: var(--ink);
}

.field input[dir="ltr"] {
  text-align: start;
}

input[type="tel"][dir="ltr"] {
  text-align: right;
}

.field input[aria-invalid] {
  border-color: var(--danger);
}

.field__err {
  font-size: 12px;
  color: var(--danger);
}

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-height: 44px;
  font-size: 14px;
  line-height: 1.6;
  cursor: pointer;
}

.consent input {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: var(--ink);
}

/* The honeypot: hidden in place. Never offset it sideways: on an RTL page a far
   left offset widens the page and phones zoom out to a blank screen. */
.hp {
  position: absolute;
  inset-inline-start: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.alert {
  padding: 12px 14px;
  border-radius: 12px;
  background: #f6e7e7;
  color: var(--danger);
  font-size: 14px;
}

.ok {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--success-bg);
  color: var(--success);
  font-size: 14px;
  font-weight: 500;
}

.row2 {
  display: flex;
  gap: 12px;
}

.row2 > * {
  flex: 1 1 0;
  min-width: 0;
}

/* ---- Bottom tab bar ---- */
.tabbar {
  position: fixed;
  inset: auto 0 0;
  z-index: 10;
  display: flex;
  padding: 0 8px env(safe-area-inset-bottom);
  background: var(--surface);
  border-top: 1px solid var(--hairline);
  view-transition-name: tabbar;
}

.tabbar a {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 0 8px;
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

.tabbar a.is-on {
  color: var(--ink);
  font-weight: 600;
}

.tabbar i {
  width: 20px;
  height: 3px;
  border-radius: 2px;
}

.tabbar a.is-on i {
  background: var(--gold);
}

/* ---- Admin ---- */
.ahead {
  padding: 16px 16px 20px;
  background: var(--ink);
  color: var(--cream);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ahead__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
}

.ahead__brand {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
}

.ahead__pill {
  padding: 4px 10px;
  border-radius: 6px;
  background: rgb(251 243 228 / 12%);
  font-size: 12px;
}

.ahead__title {
  font-size: 32px;
}

/* Five equal tabs that always fit: no sideways scrolling, even at 320px. */
.atabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
  background: rgb(251 243 228 / 10%);
}

.atabs a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 44px;
  padding: 0 2px;
  border-radius: 9px;
  color: var(--cream-2);
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  overflow-wrap: normal;
}

.atabs a.is-on {
  background: var(--gold);
  color: var(--ink);
  font-weight: 600;
}

/* The pending-requests count sits on the tab's corner, so the label keeps its width. */
.atabs__badge {
  position: absolute;
  top: -4px;
  inset-inline-end: -2px;
  min-width: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
}

.apage {
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.ahead2 {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.previewbox {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
  background: var(--soft);
}

.list {
  padding: 4px 14px;
  gap: 0;
}

.att,
.prow {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  border-bottom: 1px solid var(--hairline);
}

.list > :last-child {
  border-bottom: 0;
}

.att__text {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.att__text b,
.prow b {
  font-size: 15px;
  font-weight: 500;
}

.tick {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: transparent;
  cursor: pointer;
}

.tick::before {
  content: "";
  grid-area: 1 / 1;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1.5px solid var(--input-line);
  background: var(--surface);
}

.tick svg {
  grid-area: 1 / 1;
  z-index: 1;
}

.tick.is-on {
  color: var(--gold);
}

.tick.is-on::before {
  background: var(--ink);
  border-color: var(--ink);
}

.prow__main {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  color: inherit;
  text-decoration: none;
}

.prow__main > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.prow__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.hrow {
  border-bottom: 1px solid var(--hairline);
}

.iconbtn {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--bg);
  font-size: 22px;
  cursor: pointer;
}

.iconbtn--wa {
  background: var(--wa-bg);
  color: var(--wa);
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  color: var(--ink);
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.xsmall {
  font-size: 11px;
}

/* Participants: search + sort on one row, select-all, row checkboxes, bulk bar. */
/* Search and sort share a row; on very narrow phones the sort drops below. */
.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tools .search {
  flex: 1 1 170px;
  min-width: 0;
}

.sortby {
  flex: 0 1 auto;
}

.sortby select {
  width: 100%;
  min-height: 50px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid var(--input-line);
  background: var(--surface);
  font: inherit;
  font-size: 14px;
  color: var(--ink);
}

.selall {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding-inline-start: 14px;
  font-size: 14px;
  cursor: pointer;
}

.selall input,
.pick {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--ink);
  cursor: pointer;
}

.bulk {
  position: fixed;
  inset: auto 0 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--ink);
  color: var(--cream);
  box-shadow: 0 -8px 24px rgb(20 26 58 / 20%);
}

.bulk__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bulk__head .link {
  color: var(--cream);
  min-height: 36px;
}

/* Status buttons wrap onto two rows instead of scrolling sideways. */
.bulk__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bulk__actions .chip {
  flex: 1 1 auto;
  justify-content: center;
}

.bulk__actions .chip {
  min-height: 40px;
  border: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
}

body.has-bulk .apage {
  padding-bottom: 160px;
}

/* «ركّاب الباص فقط»: a toggle chip, a tick when on. */
.scope {
  align-self: flex-start;
  gap: 6px;
  min-height: 44px;
  font: inherit;
  font-size: 14px;
}

.scope svg {
  display: none;
}

.scope.is-on svg {
  display: block;
}

.chip.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.st {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg);
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
}

.st--pending {
  background: #fbf0d9;
  color: #7a5900;
}

.st--accepted {
  background: var(--success-bg);
  color: var(--success);
}

.st--rejected {
  background: #f6e7e7;
  color: var(--danger);
}

.st--waitlist {
  background: var(--soft);
  color: var(--ink-2);
}

.addrow {
  width: 100%;
  min-height: 56px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  text-align: start;
  cursor: pointer;
}

@media (min-width: 720px) {
  .dawn__photo {
    object-position: 38% 30%;
  }
}
