/* HC OPS local preview. Classes: shell, topbar, brand, mark, who, content,
   tabbar, tab, flash, card, stack, row, btn, field, hint, banner, chip,
   appt-card, appt-time, money, muted, kicker, choice, day-head, empty. */

:root {
  color-scheme: dark;
  --ink: #f4f1ea;
  --muted: #f4f1ea;
  --paper: #d90103;
  --card: #111111;
  --panel: #0c0c0c;
  --line: rgba(215, 164, 65, 0.45);
  --gold: #d7a441;
  --gold-soft: #f0d7a2;
  --focus: #3d8bff;
  --edge-blue: #0060d0;
  --copper: #d7a441;
  --copper-dark: #f0d7a2;
  --cream: #1a140c;
  --ok: #8ee0b0;
  --warn: #f0c36a;
  --danger: #ff8a8a;
  --shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html { color-scheme: dark; background: #d90103; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  position: relative;
  z-index: 0;
  background: transparent;
  color: #f4f1ea;
  font: 600 17px/1.4 "Avenir Next", "Segoe UI", sans-serif;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: #d90103 url("/static/brand/field-tracks.png?v=brand23") center / cover no-repeat;
}
@media (prefers-color-scheme: light) {
  html, body { color-scheme: dark; background: #d90103; color: #f4f1ea; }
}

a { color: #f0d7a2; }
button, input, select, textarea { font: inherit; }
.shell { min-height: 100vh; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) 14px calc(16px + env(safe-area-inset-left));
  background: #0c0c0c;
  color: #f4f1ea;
  border-bottom: 1px solid rgba(215, 164, 65, 0.45);
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.16em;
}
.mark {
  background: var(--copper);
  color: white;
  border-radius: 8px;
  padding: 4px 7px;
  letter-spacing: 0;
}
.brand { white-space: nowrap; min-width: 0; }
.who { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; min-width: 0; flex: 1 1 auto; color: #f3efe8; font-size: 0.92rem; }
.who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.who form, .who button { flex: 0 0 auto; }
.content {
  width: min(100%, 480px);
  min-width: 0;
  margin: 0 auto;
  padding: 16px 16px calc(32px + env(safe-area-inset-bottom));
}
body.role-guest .content { padding-bottom: calc(140px + env(safe-area-inset-bottom)); }
body.role-guest #address { scroll-margin-bottom: calc(140px + env(safe-area-inset-bottom)); }
body.role-admin .content,
body.role-technician .content { width: min(100%, 640px); }
body.role-admin .content,
body.role-technician .content { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
body.role-customer .content { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  background: #0c0c0c;
  border-top: 1px solid rgba(215, 164, 65, 0.45);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  z-index: 5;
}
.tab {
  flex: 1 0 auto;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  color: #f4f1ea;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 10px 8px;
  border-radius: 12px;
}
.tab.on { background: #0c2344; color: #f4f1ea; box-shadow: inset 0 0 0 1px #3d8bff; }
h1 { font-size: 1.7rem; line-height: 1.15; margin: 0 0 6px; letter-spacing: -0.03em; font-weight: 800; }
h2 { font-size: 1.15rem; margin: 0 0 6px; font-weight: 750; }
h3 { font-weight: 750; }
.kicker { color: #f0d7a2; font-size: 0.9rem; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 6px; }
.muted { color: #f4f1ea; margin: 0; font-weight: 650; }
.hint { color: #f4f1ea; font-size: 1rem; font-weight: 650; margin: 8px 0 0; }
.push-line { max-width: 100%; min-width: 0; overflow-wrap: anywhere; }
.push-inline {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #f0d7a2;
  font: inherit;
  font-weight: 750;
  text-decoration: underline;
  cursor: pointer;
}
.page-head { margin-bottom: 16px; }
.stack { display: grid; gap: 12px; }
.row { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; min-width: 0; }
.card, .appt-card, .choice {
  background: var(--card);
  border: 1px solid rgba(215, 164, 65, 0.45);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.card { padding: 16px; }
.appt-card { display: block; padding: 16px; text-decoration: none; color: inherit; }
.appt-card-link { display: block; text-decoration: none; color: inherit; }
.booking-finder { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 8px 0 12px; }
.booking-finder .field { flex: 1 1 12rem; margin: 0; }
.appt-card + .appt-card, .stack > .appt-card + .appt-card { margin-top: 0; }
.appt-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.appt-time { font-weight: 750; color: var(--copper-dark); letter-spacing: -0.02em; }
.money { font-weight: 700; margin: 8px 0 0; }
.day-head { margin: 14px 0 8px; color: #f4f1ea; font-size: 1rem; font-weight: 750; }
.month-head { margin: 4px 0 0; color: #eeeeee; font-size: 1.35rem; font-weight: 750; letter-spacing: -0.03em; }
.week-letters, .week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.week-letters { margin-top: 14px; }
.week-letters span { text-align: center; font-size: 0.9rem; font-weight: 750; color: #f4f1ea; }
.week-day { display: flex; align-items: center; justify-content: center; min-height: 36px; text-decoration: none; color: #eeeeee; }
.week-day span { display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: 8px; font-weight: 750; }
.week-day.is-selected span { background: #0c2344; color: #f4f1ea; box-shadow: inset 0 0 0 2px #3d8bff; }
.week-day.is-today span { box-shadow: inset 0 0 0 2px #d7a441; }
.week-day.is-selected.is-today span { background: #0c2344; color: #f4f1ea; box-shadow: inset 0 0 0 2px #3d8bff, 0 0 0 2px #d7a441; }
.week-day:focus-visible { outline: 2px solid #3d8bff; outline-offset: 2px; }
.calendar-pin {
  position: static;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin: 0 0 8px;
  padding: 8px 10px;
  background: #0c0c0c;
  color: #f4f1ea;
  border: 1px solid rgba(215, 164, 65, 0.45);
  border-radius: 12px;
  max-width: 100%;
  min-width: 0;
}
.calendar-pin p,
.calendar-pin a { margin: 0; min-width: 0; max-width: 100%; }
.calendar-bar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 4px 0;
  background: #0c0c0c;
}
.calendar-month {
  flex: 1 1 100%;
  min-width: 0;
  max-width: 100%;
}
.calendar-month > summary {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin: 0 0 6px;
  cursor: pointer;
  list-style: none;
}
.calendar-month > summary::-webkit-details-marker { display: none; }
.calendar-month-body { min-width: 0; max-width: 100%; }
.calendar-month:not([open]) > .calendar-month-body { display: none; }
@media (min-width: 900px) {
  .calendar-month > summary { display: none; }
  .calendar-month:not([open]) > .calendar-month-body { display: block; }
}
.month-grid {
  flex: 1 1 100%;
  align-self: stretch;
  display: grid;
  gap: 2px;
  min-width: 0;
  max-width: 100%;
}
.month-grid-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}
.month-grid-title {
  flex: 1 1 8rem;
  margin: 0;
  color: #f4f1ea;
  font-size: 1rem;
  font-weight: 750;
}
.month-grid-nav .btn { min-width: 0; white-space: normal; }
.month-grid-letters,
.month-grid-week {
  display: grid;
  grid-template-columns: auto repeat(7, minmax(0, 1fr));
  gap: 2px;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}
.month-grid-letters span {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 750;
  color: #f4f1ea;
}
.month-week,
.month-day {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 32px;
  padding: 0 1px;
  border-radius: 6px;
  color: #f4f1ea;
  font-size: 0.82rem;
  font-weight: 750;
  text-decoration: none;
  overflow: hidden;
}
.month-week { color: #f0d7a2; font-size: 0.68rem; }
.month-day.is-outside { color: #8f8f8f; }
.month-day.is-week { background: rgba(12, 35, 68, 0.55); }
.month-day.is-selected { background: #0c2344; box-shadow: inset 0 0 0 2px #3d8bff; }
.month-day.is-today { box-shadow: inset 0 0 0 2px #d7a441; }
.month-day.is-selected.is-today { background: #0c2344; box-shadow: inset 0 0 0 2px #3d8bff, 0 0 0 2px #d7a441; }
.month-grid-week.is-displayed { outline: 1px solid #3d8bff; border-radius: 6px; }
.month-day:focus-visible, .month-week:focus-visible { outline: 2px solid #3d8bff; outline-offset: 1px; }
.calendar-today-mark { color: #d7a441; font-weight: 750; }
.calendar-week {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  min-width: 0;
  max-width: 100%;
}
.calendar-days { flex: 1 1 16rem; min-width: 0; max-width: 100%; }
.calendar-week > .btn { flex: 1 1 8rem; }
.calendar-page .page-head { margin-bottom: 6px; }
.calendar-page h1 { font-size: 1.35rem; margin: 0; }
.calendar-page .month-head { font-size: 1.05rem; margin: 0; }
.calendar-page .week-letters { margin-top: 4px; }
.calendar-page .calendar-pin { gap: 6px; padding: 6px 8px; }
.calendar-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
}
.calendar-nav .btn,
.calendar-nav .book-launch {
  min-height: 40px;
  padding: 6px 10px;
  font-size: 0.92rem;
  border-radius: 10px;
}
.calendar-jump {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.calendar-jump .btn { min-height: 40px; padding: 6px 10px; font-size: 0.92rem; }
.booking-finder-compact { flex: 1 1 12rem; margin: 0; gap: 6px; }
.booking-finder-compact .btn { min-height: 40px; padding: 6px 10px; font-size: 0.92rem; }
.agenda-week { margin: 2px 0 0; min-width: 0; max-width: 100%; }
.agenda-day-head {
  margin: 8px 0 2px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #111111;
  color: #f4f1ea;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.25;
}
.agenda-empty,
.agenda-note {
  margin: 0 0 2px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #161616;
  font-size: 0.92rem;
  line-height: 1.3;
  color: #f4f1ea;
}
.agenda-row {
  display: block;
  margin: 0 0 4px;
  padding: 4px 8px 4px 10px;
  border-radius: 6px;
  background: #161616;
  border: 1px solid rgba(215, 164, 65, 0.28);
  border-left: 3px solid #d90103;
  box-shadow: inset 4px 0 0 #0060d0;
  min-width: 0;
  max-width: 100%;
}
.agenda-open {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
.agenda-name {
  font-weight: 750;
  font-size: 1.05rem;
  line-height: 1.25;
  color: #f4f1ea;
  overflow-wrap: anywhere;
}
.agenda-time,
.agenda-ticket,
.agenda-status {
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.25;
  color: #c8c8c8;
  overflow-wrap: anywhere;
}
.agenda-status { color: #f0d7a2; }
.agenda-row .agenda-address,
.agenda-row a.directions-address {
  display: block;
  flex: none;
  min-height: 0;
  margin: 1px 0 0;
  padding: 1px 0 0;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.3;
  color: #d7d7d7;
  overflow-wrap: anywhere;
}
.agenda-row a.directions-address { text-decoration: underline; text-underline-offset: 2px; }
.calendar-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  margin-top: 12px;
  min-width: 0;
  max-width: 100%;
}
.calendar-picker .field { flex: 1 1 12rem; min-width: 0; margin: 0; }
.calendar-picker input { width: 100%; max-width: 100%; min-width: 0; }
.assign-week { margin-top: 8px; }
.assign-day { margin: 16px 0 6px; color: #eeeeee; font-size: 1rem; font-weight: 750; }
.assign-row { display: block; margin: 0 0 6px; padding: 7px 10px 7px 12px; border-radius: 8px; background: #111111; border: 1px solid rgba(215, 164, 65, 0.55); border-left: 3px solid #d90103; box-shadow: inset 5px 0 0 #0060d0; text-decoration: none; color: inherit; }
.assign-when, .assign-name, .assign-place, .assign-tech { margin: 0; }
.assign-when { color: #eeeeee; font-weight: 750; font-size: 0.92rem; }
.assign-name { font-weight: 650; font-size: 0.95rem; }
.assign-place, .assign-tech { color: #f4f1ea; font-size: 0.95rem; font-weight: 650; line-height: 1.3; }
.open-slot { display: block; margin: 0 0 6px; padding: 7px 10px 7px 12px; border-radius: 8px; background: #111111; border: 1px solid rgba(215, 164, 65, 0.45); border-left: 3px solid #d90103; box-shadow: inset 5px 0 0 #0060d0; text-decoration: none; color: inherit; }
body.role-admin .tabbar { flex-wrap: wrap; align-items: stretch; }
body.role-admin .tab-pair { flex: 1 0 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
body.role-admin .tab-rest {
  flex: 1 0 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  overflow: visible;
}
body.role-admin .tab-rest .tab { white-space: normal; min-height: 44px; line-height: 1.15; }
body.role-admin .tab-main {
  min-height: 48px;
  border: 1px solid #d7a441;
  background: #111111;
  color: #f4f1ea;
  font-weight: 750;
  font-size: 0.95rem;
}
body.role-admin .tab-main.on { background: #0c2344; color: #f4f1ea; border-color: #3d8bff; box-shadow: inset 0 0 0 1px #3d8bff; }
.coverage-list { margin: 8px 0 0; padding-left: 18px; }
.coverage-list li { margin: 0 0 6px; font-size: 0.92rem; }
.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.9rem;
  font-weight: 750;
  background: #333333;
  color: #eeeeee;
  border: 1px solid rgba(244, 241, 234, 0.38);
}
.pay-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 750;
  line-height: 1.2;
  background: #1c1c1c;
  color: #f4f1ea;
  border: 1px solid rgba(244, 241, 234, 0.45);
}
.pay-badge-paid { background: #14532d; color: #ecfdf3; border-color: #22c55e; }
.pay-badge-partial { background: #3f2a08; color: #fef3c7; border-color: #d7a441; }
.pay-badge-unpaid { background: #3f1010; color: #fee2e2; border-color: #e10600; }
.pay-badge-draft { background: #1c1c1c; color: #f4f1ea; border-color: rgba(244, 241, 234, 0.45); }
.pay-badge-void, .pay-badge-refunded { background: #2a2a2a; color: #d6d3d1; border-color: #737373; }
.pay-meta { margin: 0; font-size: 0.85rem; text-align: right; }
.chip-requested { background: #3a2e14; color: #f0c36a; }
.chip-scheduled { background: #1c2c44; color: #c5d8f5; }
.chip-en_route { background: #163244; color: #b7ddf5; }
.chip-arrived { background: #143832; color: #b7ebe0; }
.chip-in_progress { background: #3a1c12; color: #ffb199; }
.chip-waiting_for_parts { background: #3a2e14; color: #f0c36a; }
.chip-completed { background: #143322; color: #8ee0b0; }
.chip-cancelled { background: #333333; color: #b7b7b7; }
.btn, button.btn {
  appearance: none;
  border: 1px solid #4e4e4e;
  border-radius: 12px;
  min-height: 48px;
  padding: 12px 14px;
  background: #2a2a2a;
  color: #f4f1ea;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.btn-primary {
  background: #070707;
  color: #f7f1e4;
  border: 1px solid #d7a441;
  box-shadow: inset 0 0 0 1px rgba(215, 164, 65, 0.35);
}
.btn-ghost { background: #2a2a2a; color: #f4f1ea; border: 1px solid #4e4e4e; }
.btn-primary:focus-visible, .btn-ghost:focus-visible, .btn:focus-visible {
  outline: 2px solid #3d8bff;
  outline-offset: 2px;
}
.btn-danger { background: #140c0c; color: #f4f1ea; border: 1px solid #d90103; }
.btn-small { min-height: 44px; padding: 8px 12px; font-size: 0.85rem; }
.directions-block { margin-top: 8px; }
.directions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.directions-address {
  margin: 0;
  flex: 1 1 12rem;
  min-width: 0;
  color: #eeeeee;
}
a.directions-address {
  text-decoration: underline;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.directions-offer { margin: 0; }
.directions-offer > summary {
  list-style: none;
  cursor: pointer;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.directions-offer > summary::-webkit-details-marker { display: none; }
.directions-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
}
.directions-choices .btn,
.directions-block form .btn { min-height: 44px; }
.directions-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 0;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
}
.directions-get {
  font-size: 0.85rem;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.directions-compact { display: block; width: 100%; margin: 1px 0 0; }
.agenda-row .directions-compact > summary {
  min-height: 44px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.agenda-row .directions-address { text-decoration: underline; text-underline-offset: 2px; }
.directions-block form { margin: 8px 0 0; }
.directions-verify,
.directions-closed {
  margin: 8px 0 0;
  color: #eeeeee;
}
.directions-verify { font-weight: 700; }
.btn-block { width: 100%; }
.calendar-scopes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.book-launch { font-weight: 800; min-height: 48px; }
.book-panel {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.55);
  padding:
    env(safe-area-inset-top)
    env(safe-area-inset-right)
    env(safe-area-inset-bottom)
    env(safe-area-inset-left);
}
.book-panel[hidden] { display: none !important; }
body.book-panel-open { overflow: hidden; }
.book-panel-card {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  margin: 8px;
  margin-bottom: calc(8px + var(--keyboard, 0px));
  max-height: calc(100dvh - var(--keyboard, 0px) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 16px);
  background: #111111;
  color: #f4f1ea;
  border: 1px solid rgba(215, 164, 65, 0.5);
  border-radius: 16px;
  overflow: hidden;
}
.book-panel-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(215, 164, 65, 0.35);
}
.book-panel-head h2 { margin: 0; }
.book-panel-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 12px 12px 8px;
}
.book-panel-bar {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: #0c0c0c;
  border-top: 1px solid rgba(215, 164, 65, 0.45);
}
.book-panel-bar .btn { flex: 1 1 30%; min-height: 48px; }
.book-panel [hidden] { display: none !important; }
#book-saved[hidden] { display: none !important; }
.availability-dock {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  background: rgba(0, 0, 0, 0.55);
}
.availability-dock[hidden] { display: none !important; }
body.availability-open { overflow: hidden; }
.availability-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: 88dvh;
  min-height: 0;
  background: #111111;
  color: #f4f1ea;
  border-top: 1px solid rgba(215, 164, 65, 0.5);
  border-radius: 16px 16px 0 0;
}
.availability-head,
.availability-nav {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
}
.availability-head { justify-content: space-between; border-bottom: 1px solid rgba(215, 164, 65, 0.35); }
.availability-head h2,
.availability-week { margin: 0; }
.availability-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 12px 12px 24px;
}
.availability-day { margin: 0 0 16px; }
.availability-day h3 { margin: 0 0 6px; }
.availability-window {
  display: block;
  width: 100%;
  margin: 0 0 6px;
  text-align: left;
  white-space: normal;
}
.ticket-count { margin-left: 4px; font-variant-numeric: tabular-nums; }
.calendar-count-range {
  margin: 2px 0 4px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #111111;
  color: #f4f1ea;
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.3;
}
.date-scopes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
  min-width: 0;
  max-width: 100%;
}
.date-scopes .btn {
  min-height: 40px;
  min-width: 0;
}
.ticket-menu {
  margin: 0 0 8px;
  min-width: 0;
  max-width: 100%;
  background: #161616;
  border: 1px solid rgba(215, 164, 65, 0.55);
  border-radius: 10px;
}
.ticket-menu > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  min-height: 44px;
  padding: 8px 12px;
  cursor: pointer;
  list-style: none;
}
.ticket-menu > summary::-webkit-details-marker { display: none; }
.ticket-menu > summary::before { content: "▸ "; color: #d7a441; }
.ticket-menu[open] > summary::before { content: "▾ "; }
.ticket-menu > summary:focus-visible { outline: 2px solid #3d8bff; outline-offset: 2px; }
.ticket-menu-kicker {
  color: #d7a441;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ticket-menu-current {
  color: #f4f1ea;
  font-size: 1rem;
  font-weight: 750;
  overflow-wrap: anywhere;
}
.ticket-menu-panel {
  display: grid;
  grid-template-columns: 1fr;
  min-width: 0;
  max-width: 100%;
  border-top: 1px solid rgba(215, 164, 65, 0.35);
}
.ticket-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 12px;
  color: #f4f1ea;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.ticket-option.is-selected {
  background: #0c2344;
  color: #f4f1ea;
  box-shadow: inset 3px 0 0 #d7a441;
}
.day-group {
  margin: 14px 0 6px;
  text-align: left;
  color: #eeeeee;
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.agenda-week .agenda-day-head {
  margin: 8px 0 2px;
  color: #f4f1ea;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.25;
}
.job-compact {
  display: block;
  margin: 0 0 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid rgba(215, 164, 65, 0.55);
  border-left: 3px solid #d90103;
  box-shadow: inset 5px 0 0 #0060d0, var(--shadow);
  text-decoration: none;
  color: inherit;
}
.job-compact p { margin: 0; }
.job-compact .job-meta, .job-meta { font-size: 0.86rem; line-height: 1.35; color: #c8c8c8; }
.job-page h1 { font-size: 1.28rem; margin: 0; }
.job-page .page-head { margin-bottom: 8px; }
.job-page .card { padding: 10px 12px; border-radius: 12px; }
.job-page p, .job-page ul { margin: 0 0 2px; }
.job-page .hint, .job-page .muted { font-size: 1rem; font-weight: 650; margin: 2px 0 0; }
.job-page .stack { gap: 8px; }
.job-summary { padding: 10px 12px; }
.job-summary h1 { font-size: 1.25rem; }
.job-when { margin: 2px 0; font-size: 1rem; font-weight: 750; }
.job-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; align-items: stretch; }
.job-actions .btn, .job-actions form { flex: 1 1 148px; }
.job-actions .btn { min-height: 44px; padding: 8px 10px; }
.job-actions form { margin: 0; }
.job-actions form .btn { width: 100%; }
.ticket-controls { display: grid; gap: 8px; margin-top: 8px; min-width: 0; max-width: 100%; }
.ticket-status-menu,
.ticket-action-menu { display: grid; gap: 6px; min-width: 0; max-width: 100%; }
.ticket-status-menu label,
.ticket-action-menu label { display: grid; gap: 4px; min-width: 0; font-weight: 750; }
.ticket-status-menu .btn,
.ticket-action-menu .btn { justify-self: start; min-width: 0; }
.return-locked {
  display: grid;
  gap: 2px;
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #161616;
  color: #f4f1ea;
}
.return-locked p { margin: 0; }
.job-page > .hint,
.job-page > .job-meta,
.job-page > .job-blocked,
.job-page > [data-vehicle-empty],
.job-page > .service-location,
.job-page .service-location {
  background: #111111;
  color: #f4f1ea;
  border: 1px solid rgba(215, 164, 65, 0.45);
  border-radius: 12px;
  padding: 10px 12px;
}
.job-blocked { display: grid; gap: 4px; margin: 0 0 10px; }
.job-columns { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
.job-columns > * { min-width: 0; }
.chat-btn { gap: 6px; }
.chat-icon { flex: 0 0 auto; }
.push-card { margin: 0 0 12px; }
.push-card[hidden] { display: none !important; }
.push-card h2 { margin-bottom: 6px; }
.push-card > details > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 750;
}
.push-card .row { justify-content: flex-start; }
.push-card .row .btn { flex: 0 1 auto; min-height: 44px; }
.push-steps { color: #eeeeee; }
.push-steps ol { margin: 8px 0 0; padding-left: 1.2rem; }
.push-help {
  margin: 8px 0 12px;
  padding: 12px;
  border: 1px solid rgba(215, 164, 65, 0.45);
  border-radius: 12px;
  background: #111111;
  display: grid;
  gap: 8px;
}
.push-help p, .push-help h2 { margin: 0; }
#push-how[hidden],
#push-how [hidden],
.push-help[hidden],
.push-steps[hidden],
#push-line[hidden],
#push-line [hidden],
.push-inline[hidden] { display: none !important; }
.push-ready { margin: 0 0 12px; }
#enable-notifications:focus, #push-not-now:focus, #disable-notifications:focus { outline: 2px solid #3d8bff; outline-offset: 2px; }
.unread-badge {
  display: inline-flex;
  min-width: 1.25rem;
  height: 1.25rem;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 999px;
  background: #b42318;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 750;
  align-items: center;
  justify-content: center;
}
details.fold {
  background: var(--card);
  border: 1px solid rgba(215, 164, 65, 0.45);
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin: 0;
}
details.fold > summary {
  cursor: pointer;
  font-weight: 750;
  font-size: 0.98rem;
  padding: 10px 12px;
  min-height: 44px;
  list-style: none;
}
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary:focus-visible { outline: 2px solid #3d8bff; outline-offset: 2px; }
details.fold > summary::before { content: "▸ "; color: var(--copper-dark); }
details.fold[open] > summary::before { content: "▾ "; }
details.fold .fold-body { padding: 0 12px 12px; display: grid; gap: 8px; }
.fold-count { font-weight: 750; color: #f4f1ea; }
.job-page [id] { scroll-margin-bottom: 220px; }
.btn[disabled], button:disabled { opacity: 0.45; cursor: not-allowed; color: #b7b7b7; }
.field { display: grid; gap: 6px; font-weight: 650; font-size: 0.92rem; }
.mandatory { margin-left: 6px; color: var(--danger); font-size: 0.9rem; font-weight: 750; }
.field-error { margin: 0; color: var(--danger); font-weight: 650; font-size: 0.92rem; }
.save-status {
  min-height: 44px;
  margin: 0;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: default;
}
.save-status[hidden] { display: none; }
.save-status[data-state="saved"] { color: var(--ok); }
.save-status[data-state="error"] {
  color: var(--danger);
  text-decoration: underline;
  cursor: pointer;
}
.field-error[hidden], .exit-confirm[hidden] { display: none; }
.exit-booking { margin-top: 12px; }
.exit-booking .btn, .exit-confirm .btn { min-height: 48px; }
input, select, textarea {
  width: 100%;
  border: 1px solid #3a3a3a;
  background: #141414;
  border-radius: 12px;
  padding: 12px;
  min-height: 48px;
  color: #f4f1ea;
  font-size: 16px;
}
textarea { min-height: 96px; resize: vertical; }
::placeholder { color: #d5d0c6; opacity: 1; }
input:disabled, select:disabled, textarea:disabled {
  color: #d0d0d0;
  background: #161616;
  border-color: #333333;
  opacity: 1;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid #3d8bff;
  outline-offset: 1px;
  border-color: #3d8bff;
}
input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
  -webkit-text-fill-color: #eeeeee;
  caret-color: #eeeeee;
  box-shadow: 0 0 0 1000px #1a1a1a inset;
}
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid transparent; }
.choice:has(input:checked) { border-color: #3d8bff; background: #0c2344; box-shadow: inset 0 0 0 1px #3d8bff; }
.choice input { width: auto; min-height: 22px; min-width: 22px; margin-top: 4px; }
.agreement-check { width: 22px; height: 22px; min-width: 22px; min-height: 22px; }
.terms-scroll {
  max-height: 16rem;
  overflow: auto;
  white-space: pre-wrap;
  -webkit-overflow-scrolling: touch;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
}
.flash, .banner { border-radius: 14px; padding: 12px 14px; margin: 0 0 12px; }
.flash-error, .flash-error { background: #3a1616; color: #ffb4b4; }
.flash-ok { background: #143322; color: #b7ebc9; }
.banner-test { background: #3a2e14; color: #f0c36a; border: 1px solid #6d5420; }
.empty { padding: 8px 0; text-align: left; color: #f4f1ea; font-weight: 650; }
.footer-note { color: #f4f1ea; font-size: 0.95rem; font-weight: 650; margin-top: 12px; }
.status-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.settings-link {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
}
.note { padding: 10px 0; border-top: 1px solid var(--line); }
.note-drop {
  background: #141414;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  margin: 8px 0;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.note-drop > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  min-height: 44px;
  min-width: 0;
  cursor: pointer;
  color: #ffffff;
  font-weight: 750;
  list-style: none;
}
.note-drop > summary::-webkit-details-marker { display: none; }
.note-drop > summary::before { content: "▸"; color: #ffffff; }
.note-drop[open] > summary::before { content: "▾"; }
.note-drop > summary:focus-visible { outline: 2px solid #3d8bff; outline-offset: 2px; }
.note-drop-label { flex: 0 0 auto; color: #ffffff; }
.note-drop-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
  color: #ffffff;
}
.note-drop-body { padding: 4px 12px 12px; display: grid; gap: 8px; }
.note-drop-text,
.note-drop-meta,
.note-drop .alert-issue,
.note-drop .alert-latest,
.note-drop .alert-update {
  margin: 0;
  color: #ffffff;
  line-height: 1.45;
}
.note-drop-text { white-space: pre-wrap; }
.note-drop .muted { color: #ffffff; }
.note-unread {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 1.25rem;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: #b42318;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 750;
}
.note-drop .note-unread { margin-left: auto; }
.topbar .btn-ghost { color: white; border-color: rgba(255,255,255,.25); }

.brand-logo { width: auto; height: 40px; max-width: 148px; border-radius: 0; object-fit: contain; background: transparent; }
.login-mark { display: flex; justify-content: center; margin: 12px 0 8px; }
.login-mark img { width: min(100%, 420px); height: auto; max-height: 220px; border-radius: 0; object-fit: contain; background: transparent; }
.login-title { text-align: center; font-size: 2rem; letter-spacing: 0.04em; }
.hero-banner { display: block; width: calc(100% + 32px); max-width: none; height: 176px; margin: 0 -16px 4px; object-fit: cover; border-radius: 0; background: #d90103; }
.section-tabs { display: flex; gap: 8px 16px; overflow-x: auto; padding: 12px 16px 12px 0; position: sticky; top: 0; background: #0c0c0c; z-index: 2; border-bottom: 1px solid rgba(215, 164, 65, 0.35); }
.section-tabs a { color: #eeeeee; text-decoration: none; font-weight: 700; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
.identity { display: flex; gap: 14px; align-items: center; margin: 8px 0 12px; }
.identity-logo { width: auto; height: 72px; max-width: 180px; border-radius: 0; object-fit: contain; background: transparent; }
.identity h1 { margin: 0; }
.identity-line { margin: 6px 0; }
.policy-panel, .review { background: #111111; color: #f4f1ea; border: 1px solid rgba(215, 164, 65, 0.5); border-radius: 16px; padding: 16px; margin: 16px 0; box-shadow: var(--shadow); }
.policy-dialog {
  position: fixed; inset: 0; z-index: 25; background: rgba(0,0,0,.45);
  display: grid; align-items: end; padding: 16px 16px 108px;
}
.policy-dialog[hidden] { display: none; }
.policy-dialog .policy-panel { margin: 0; }
.policy-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.policy-panel p, #about p { white-space: pre-line; }
.service-row, .person-row {
  display: flex; gap: 12px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid #333;
  color: inherit; text-decoration: none;
  min-width: 0;
}
.service-row > span { min-width: 0; }
.service-row img { width: 54px; height: 54px; flex: 0 0 54px; border-radius: 8px; object-fit: cover; }
.service-row span, .person-row { display: grid; }
.person-row { display: flex; align-items: center; }
.avatar {
  width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center;
  background: #3a3a3a; font-weight: 700;
}
.chat-bubble {
  position: fixed;
  z-index: 6;
  right: 16px;
  bottom: calc(80px + env(safe-area-inset-bottom));
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #070707;
  color: #f7f1e4;
  border: 2px solid #d7a441;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
}
.chat-bubble .chat-icon { width: 28px; height: 28px; }
.chat-bubble .unread-badge { position: absolute; top: -4px; right: -4px; margin-left: 0; }
.chat-bubble:focus-visible, #chat-panel-close:focus-visible { outline: 2px solid #3d8bff; outline-offset: 2px; }
.chat-panel {
  position: fixed;
  inset: 0;
  z-index: 18;
  background: rgba(0,0,0,.55);
  display: grid;
  align-items: end;
}
.chat-panel[hidden] { display: none; }
.chat-panel-card {
  margin: 12px 12px calc(var(--composer-bottom, 16px) + 8px);
  max-height: min(70vh, 640px, calc(100dvh - var(--keyboard, 0px) - var(--composer-bottom, 16px) - 36px));
  background: #111111;
  color: #f4f1ea;
  border: 1px solid rgba(215, 164, 65, 0.5);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 16px;
  display: grid;
  gap: 12px;
  overflow: auto;
}
.chat-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chat-panel-card h2, .chat-panel-card p { margin: 0; }
#chat-panel-close {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: #eeeeee;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.chat-log { overflow: auto; max-height: 36vh; display: flex; flex-direction: column; gap: 8px; }
.chat-panel-card .btn { min-height: 44px; }
.book-dock {
  position: fixed; z-index: 6; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(220px, 72vw); min-height: 52px;
  display: flex; align-items: center; justify-content: center;
  background: #070707; color: #f7f1e4; text-decoration: none; font-weight: 700;
  border: 1px solid #d7a441; border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(215, 164, 65, 0.35), 0 8px 18px rgba(0, 0, 0, 0.35);
}
body.role-guest .book-dock { bottom: calc(20px + env(safe-area-inset-bottom)); }
.install-prompt { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 20; display: grid; align-items: end; }
.install-prompt[hidden] { display: none; }
.install-card { margin: 16px; background: #111111; color: #f4f1ea; border: 1px solid rgba(215, 164, 65, 0.5); border-radius: 16px; padding: 16px; display: grid; gap: 12px; box-shadow: var(--shadow); }
.install-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.install-card h2, .install-card p { margin: 0; }
.install-close {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  margin: -8px -8px 0 0;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: #eeeeee;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.install-card .btn-ghost { color: #eeeeee; }
.install-icon { width: 72px; height: 72px; border-radius: 16px; object-fit: cover; background: #9b1b1b; }
.install-steps { margin: 0; padding-left: 1.2rem; display: grid; gap: 6px; }
.install-steps[hidden] { display: none !important; }
.install-card .row .btn { flex: 1; min-height: 44px; }
button.tab { border: 0; background: transparent; cursor: pointer; font: inherit; }
@media (display-mode: standalone) {
  .js-install-open, #install-prompt { display: none !important; }
}
.settings-menu { display: grid; background: #111111; border: 1px solid rgba(215, 164, 65, 0.45); border-radius: 16px; box-shadow: var(--shadow); }
.settings-menu a { padding: 16px; border-bottom: 1px solid #333333; text-decoration: none; color: #eeeeee; font-weight: 650; }
.brand-preview { display: grid; gap: 8px; }
.brand-preview img:first-child { width: min(100%, 280px); height: auto; max-height: 140px; border-radius: 0; object-fit: contain; }
.brand-preview img:last-child { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; }
.menu-button, .menu-close {
  border: 1px solid #d7a441; background: #070707; color: #f7f1e4; cursor: pointer;
  border-radius: 8px; font-weight: 750;
}
.menu-button {
  width: auto; min-width: 44px; min-height: 44px; height: auto;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 6px 12px;
}
.menu-button .unread-badge { margin-left: 2px; }
.office-link {
  margin-left: auto;
  flex: 0 0 auto;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}
.call-link {
  margin-left: 4px; min-width: 0; flex: 0 1 auto; color: inherit; text-decoration: none;
  font-weight: 700; white-space: nowrap; font-size: clamp(0.82rem, 3.5vw, 1rem);
}
body[data-auth="1"] .book-dock { display: none; }
body[data-auth="1"] .content { padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
.guest-menu {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(12, 12, 12, 0.28);
  color: #f4f1ea;
}
.guest-menu[hidden] { display: none; }
.guest-menu-panel {
  position: absolute;
  top: calc(58px + env(safe-area-inset-top));
  left: 8px;
  width: min(22rem, calc(100vw - 16px));
  max-height: min(70dvh, 34rem);
  display: flex;
  flex-direction: column;
  background: #111111;
  border: 1px solid #d7a441;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.guest-menu-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-bottom: 1px solid rgba(215, 164, 65, 0.45);
}
.guest-menu-mark { width: auto; height: 28px; max-width: 72px; object-fit: contain; }
.guest-menu-title { margin: 0; flex: 1 1 auto; font-weight: 800; letter-spacing: 0.04em; }
.menu-close {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
}
.guest-menu-scroll {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  display: grid;
  gap: 6px;
  padding: 8px;
}
.guest-menu-scroll .btn { justify-content: flex-start; text-align: left; min-height: 44px; width: 100%; }
.menu-group { margin: 6px 2px 0; color: #f0d7a2; font-size: 0.78rem; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; }
body .guest-menu a.menu-link.on { background: #0c2344; color: #f4f1ea; border-color: #3d8bff; box-shadow: inset 0 0 0 1px #3d8bff; }
.office-pages {
  margin: 0 0 12px;
  background: #111111;
  border: 1px solid rgba(215, 164, 65, 0.45);
  border-radius: 12px;
}
.office-pages summary {
  min-height: 44px;
  padding: 10px 12px;
  font-weight: 750;
  cursor: pointer;
}
.office-pages nav { padding: 0 12px 8px; }
[data-new-unit][hidden] { display: none !important; }
[data-unit-list] > [data-unit-card]:first-child [data-remove-unit] { display: none; }
.unit-summary ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; }
.unit-summary li { font-weight: 650; }
.unit-card summary { font-weight: 750; }
.guest-menu-scroll form { width: 100%; margin: 0; }
body .guest-menu .btn-ghost { color: #f4f1ea; border-color: #4e4e4e; background: #2a2a2a; }
body .guest-menu .btn-primary { color: #f7f1e4; background: #070707; border: 1px solid #d7a441; }
.footer-signin { margin: 18px 0 0; }
.gallery-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 8px; }
.gallery-grid img { width: 100%; height: clamp(140px, 42vw, 220px); object-fit: cover; border-radius: 12px; background: #111; }

@media (max-width: 767px) {
  body.role-admin .topbar,
  body.role-technician .topbar,
  body.role-customer .topbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "menu brand"
      "who who";
    align-items: center;
    row-gap: 8px;
  }
  body.role-admin .topbar .menu-button,
  body.role-technician .topbar .menu-button,
  body.role-customer .topbar .menu-button { grid-area: menu; }
  body.role-admin .topbar .brand,
  body.role-technician .topbar .brand,
  body.role-customer .topbar .brand {
    grid-area: brand;
    letter-spacing: 0.04em;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body.role-admin .brand-logo,
  body.role-technician .brand-logo,
  body.role-customer .brand-logo {
    height: 32px;
    max-width: 96px;
    flex: 0 0 auto;
  }
  body.role-admin .topbar .who,
  body.role-technician .topbar .who,
  body.role-customer .topbar .who {
    grid-area: who;
    width: 100%;
    justify-content: flex-start;
  }
  body.role-admin .who span,
  body.role-technician .who span,
  body.role-customer .who span {
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .section-tabs { flex-wrap: wrap; overflow: visible; }
}

@media (min-width: 768px) {
  .topbar { padding: 16px 28px; }
  body.role-guest .content,
  body.role-customer .content { width: min(720px, calc(100% - 48px)); }
  body.role-admin .content,
  body.role-technician .content { width: min(860px, calc(100% - 48px)); }
  .hero-banner { width: 100%; height: 240px; margin: 0 0 8px; border-radius: 12px; }
  .gallery-grid img { height: 240px; }
  .tabbar {
    left: 50%; right: auto; transform: translateX(-50%);
    width: min(720px, calc(100% - 32px));
    border-radius: 16px 16px 0 0;
  }
  body.role-admin .tabbar,
  body.role-technician .tabbar { width: min(860px, calc(100% - 32px)); }
  body.role-admin .tab-rest { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  body.role-admin .content,
  body.role-technician .content { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .book-dock { width: min(280px, 46vw); }
  .availability-dock { align-items: stretch; }
  .availability-card {
    width: min(420px, 46vw);
    max-height: none;
    height: 100%;
    border-top: 0;
    border-left: 1px solid rgba(215, 164, 65, 0.5);
    border-radius: 0;
  }
  .policy-dialog, .install-prompt { align-items: center; padding: 24px; }
  .policy-dialog .policy-panel, .install-card { width: min(520px, calc(100% - 32px)); margin-inline: auto; }
  .status-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .job-columns { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}

@media (min-width: 1100px) {
  body.role-guest .content,
  body.role-customer .content { width: min(840px, calc(100% - 64px)); }
  body.role-admin .content,
  body.role-technician .content { width: min(960px, calc(100% - 64px)); }
  .hero-banner { height: 280px; }
  .gallery-grid img { height: 280px; }
  .tabbar { width: min(840px, calc(100% - 48px)); }
  body.role-admin .tabbar,
  body.role-technician .tabbar { width: min(960px, calc(100% - 48px)); }
}

body.role-guest, body.role-customer {
  background: transparent;
  color: #f4f1ea;
}
body.role-guest .topbar, body.role-customer .topbar,
body.role-guest .tabbar, body.role-customer .tabbar,
body.role-guest .section-tabs { background: #0c0c0c; }
body.role-guest .tabbar, body.role-customer .tabbar { border-top-color: rgba(215, 164, 65, 0.45); }
body.role-guest a, body.role-customer a { color: #f0d7a2; }
body.role-guest .tab, body.role-customer .tab { color: #f4f1ea; font-weight: 700; }
body.role-guest .tab.on, body.role-customer .tab.on {
  background: #0c2344;
  color: #f4f1ea;
  box-shadow: inset 0 0 0 1px #3d8bff;
}
body.role-guest .card, body.role-customer .card,
body.role-guest .choice, body.role-customer .choice,
body.role-guest details.fold, body.role-customer details.fold {
  background: #111111;
  color: var(--text, #f4f1ea);
  border: 1px solid rgba(215, 164, 65, 0.45);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}
body.role-guest .appt-card, body.role-customer .appt-card,
body.role-guest .job-compact, body.role-customer .job-compact {
  background: #111111;
  color: var(--text, #f4f1ea);
  border: 1px solid rgba(215, 164, 65, 0.55);
  border-left: 3px solid #d90103;
  box-shadow: inset 5px 0 0 #0060d0, 0 8px 18px rgba(0, 0, 0, 0.28);
}
body.role-customer .day-group, body.role-customer .job-meta { color: #e6e6e6; }
body.role-guest .muted, body.role-customer .muted,
body.role-guest .hint, body.role-customer .hint,
body.role-guest .footer-note, body.role-customer .footer-note { color: #f4f1ea; }
body.role-guest .kicker, body.role-customer .kicker { color: #f0d7a2; }
body.role-guest input, body.role-guest select, body.role-guest textarea,
body.role-customer input, body.role-customer select, body.role-customer textarea {
  background: #141414; color: var(--text, #f4f1ea); border-color: #3a3a3a;
}
body.role-guest .btn-ghost, body.role-customer .btn-ghost {
  background: #2a2a2a; color: var(--text, #f4f1ea); border-color: #4e4e4e;
}
body.role-guest .choice:has(input:checked), body.role-customer .choice:has(input:checked) {
  border-color: #3d8bff; background: #0c2344; box-shadow: inset 0 0 0 1px #3d8bff;
}

body.role-admin, body.role-technician { background: transparent; color: #f4f1ea; }
body.role-admin .topbar, body.role-technician .topbar {
  background: #0c0c0c; color: #f4f1ea; border-bottom: 1px solid rgba(215, 164, 65, 0.45);
}
body.role-admin .brand, body.role-technician .brand,
body.role-admin .who, body.role-technician .who { color: #f4f1ea; }
body.role-admin .topbar .btn-ghost, body.role-technician .topbar .btn-ghost {
  background: #2a2a2a; color: #f4f1ea; border-color: #4e4e4e;
}
body.role-admin .tabbar, body.role-technician .tabbar {
  background: #0c0c0c; border-top-color: rgba(215, 164, 65, 0.45);
}
body.role-admin .card, body.role-technician .card {
  background: #111111; color: #f4f1ea;
  border: 1px solid rgba(215, 164, 65, 0.45);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}
body.role-admin .appt-card, body.role-technician .appt-card,
body.role-admin .job-compact, body.role-technician .job-compact,
body.role-admin .assign-row, body.role-technician .assign-row {
  background: #111111; color: #f4f1ea;
  border: 1px solid rgba(215, 164, 65, 0.55);
  border-left: 3px solid #d90103;
  border-radius: 12px;
  box-shadow: inset 5px 0 0 #0060d0, 0 8px 18px rgba(0, 0, 0, 0.28);
}
body.role-admin .day-head, body.role-technician .day-head { color: #f4f1ea; font-weight: 750; }
body.role-admin .month-head, body.role-technician .month-head,
body.role-admin .assign-day, body.role-technician .assign-day,
body.role-admin .assign-when, body.role-technician .assign-when,
body.role-admin .week-day, body.role-technician .week-day { color: #f4f1ea; }
body.role-admin .btn-primary, body.role-technician .btn-primary,
body.role-guest .btn-primary, body.role-customer .btn-primary {
  background: #070707;
  color: #f7f1e4;
  border: 1px solid #d7a441;
  border-radius: var(--radius, 6px);
  box-shadow: inset 0 0 0 1px rgba(215, 164, 65, 0.35);
}

.customer-picker { display: grid; gap: 8px; }
.customer-picker [hidden] { display: none; }
.customer-search-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
}
.customer-search-row > .field {
  flex: 1 1 16rem;
  min-width: min(100%, 16rem);
}
.customer-add-launch {
  flex: 1 1 11rem;
  white-space: nowrap;
}
.customer-create-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 5.5rem 6.5rem;
  gap: 8px;
}
.customer-create-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.customer-create-actions .btn { flex: 1 1 9rem; }
.customer-results {
  display: grid;
  gap: 6px;
  max-height: 16rem;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.customer-option {
  appearance: none;
  width: 100%;
  min-height: 48px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #1e1e1e;
  color: #eeeeee;
  padding: 10px 12px;
  display: grid;
  gap: 2px;
  cursor: pointer;
  font: inherit;
  touch-action: manipulation;
}
.customer-option[aria-selected="true"],
.customer-option:focus {
  outline: 2px solid #3d8bff;
  border-color: #3d8bff;
  background: #0c2344;
}
.customer-option-name { font-weight: 700; }
.customer-option-contact { color: #f4f1ea; font-size: 1rem; font-weight: 650; }
.existing-tickets { display: grid; gap: 8px; }
.existing-ticket {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
}
.existing-ticket p { margin: 0; }
.existing-ticket.is-selected { outline: 2px solid #3d8bff; }
.existing-ticket-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.existing-ticket-actions .btn,
.existing-tickets > [data-existing-list] > .btn { min-height: 44px; }
[data-service-location] [hidden] { display: none; }
.service-address-heading { margin: 0; font-weight: 750; }
.service-place { font-size: 1.2rem; font-weight: 750; line-height: 1.35; }
.service-place p { margin: 0; }
.service-phone { font-weight: 750; }
.service-location .btn { min-height: 48px; }

.chip-assigned { background: #1c2c44; color: #c5d8f5; }
.chip-parts_ordered { background: #2c2140; color: #ddc8f5; }
.chip-installed { background: #143322; color: #8ee0b0; }
.chip-ready_for_invoice { background: #3a1c12; color: #ffb199; }
button.ticket-status-toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  cursor: pointer;
  min-height: 44px;
  padding: 0;
  font-size: 1rem;
  font-weight: 750;
  color: inherit;
}
button.ticket-status-toggle .chip {
  min-height: 44px;
  padding: 8px 14px;
  font-size: 1rem;
  font-weight: 750;
}
.ticket-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.ticket-card-actions form { margin: 0; }
.ticket-card-actions .btn { min-height: 44px; }
.ticket-assign-form {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.ticket-assign-form[hidden],
.ticket-assign-form [hidden] { display: none; }
.ticket-return-form {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.ticket-return-form[hidden],
.ticket-return-form [hidden] { display: none; }
.booking-cancel { margin-top: 8px; }
.booking-cancel > summary {
  list-style: none;
  width: fit-content;
  max-width: 100%;
}
.booking-cancel > summary::-webkit-details-marker { display: none; }
.booking-cancel form {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  max-width: 28rem;
}
.booking-cancel .hint { margin: 0; }
.ticket-panel { margin-top: 8px; }
.ticket-status-choices,
.ticket-parts-panel,
.ticket-parts-form,
.ticket-part,
.ticket-order-fields {
  display: grid;
  gap: 8px;
}
.ticket-panel[hidden],
.ticket-order-fields[hidden],
.ticket-part-count[hidden],
.ticket-card-note[hidden] { display: none; }
.ticket-status-choices .btn,
.ticket-form-actions .btn { min-height: 44px; }
.ticket-form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ticket-part { padding-top: 8px; border-top: 1px solid var(--line); }
.ticket-part p { margin: 0; }
.ticket-part-edit > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 750;
}
.ticket-card-note { margin: 8px 0 0; font-weight: 650; }
article[data-ticket-card] { color: inherit; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
details.more {
  background: #111111;
  color: #f4f1ea;
  border: 1px solid rgba(215, 164, 65, 0.45);
  border-radius: 12px;
  margin: 8px 0 0;
}
details.more > summary {
  cursor: pointer;
  font-weight: 750;
  font-size: 1rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  list-style: none;
}
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "▸ "; color: #f0d7a2; }
details.more[open] > summary::before { content: "▾ "; }
details.more > summary:focus-visible { outline: 2px solid #3d8bff; outline-offset: 2px; }
details.more p { margin: 0; padding: 0 12px 12px; font-weight: 650; color: #f4f1ea; font-size: 1rem; }
.history-blocks { display: grid; gap: 8px; }
.history-block {
  background: #111111;
  color: #f4f1ea;
  border: 1px solid rgba(215, 164, 65, 0.45);
  border-radius: 14px;
}
.history-block > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 12px 14px;
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
}
.history-block > summary::-webkit-details-marker { display: none; }
.history-block > summary::before { content: "▸ "; color: #f0d7a2; }
.history-block[open] > summary::before { content: "▾ "; }
.history-block > summary:focus-visible { outline: 2px solid #3d8bff; outline-offset: 2px; }
.history-count {
  min-width: 1.8rem;
  height: 1.8rem;
  padding: 0 6px;
  border-radius: 999px;
  background: #0c2344;
  color: #f4f1ea;
  border: 1px solid #3d8bff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}
.history-helper {
  margin: 0 2px 4px;
  color: #f4f1ea;
  font-weight: 650;
  font-size: 1rem;
}
.history-body { padding: 0 12px 12px; display: grid; gap: 8px; }
.thread-screen {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #111111;
  color: #f4f1ea;
  border: 1px solid rgba(215, 164, 65, 0.45);
  border-radius: 16px;
  padding: 12px;
}
.thread-head h1, .thread-head p { margin: 0; }
.thread-ticket { color: #f0d7a2; font-weight: 750; font-size: 1rem; }
.thread-log, .chat-log { display: flex; flex-direction: column; gap: 8px; }
.thread-log::before, .chat-log::before { content: ""; margin-top: auto; }
body[data-thread-page] .thread-screen {
  position: fixed;
  z-index: 2;
  top: var(--thread-top, 72px);
  bottom: calc(var(--composer-bottom, 16px) + var(--composer-block, 108px));
  left: 0;
  right: 0;
  width: min(448px, calc(100% - 24px));
  margin: 0 auto;
  overflow: hidden;
}
body.role-admin[data-thread-page] .thread-screen,
body.role-technician[data-thread-page] .thread-screen {
  width: min(608px, calc(100% - 24px));
}
body[data-thread-page] .thread-log {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding-bottom: 8px;
}
.bubble-row { display: flex; flex-direction: column; max-width: min(85%, 28rem); gap: 2px; }
.bubble-row.theirs { align-self: flex-start; align-items: flex-start; }
.bubble-row.mine { align-self: flex-end; align-items: flex-end; }
.bubble-name { margin: 0; color: #f0d7a2; font-size: 0.95rem; font-weight: 750; }
.bubble-text {
  margin: 0;
  padding: 10px 12px;
  font-weight: 650;
  font-size: 1rem;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.bubble-row.theirs .bubble-text {
  background: #2a2a2a;
  color: #f4f1ea;
  border-left: 3px solid #d90103;
  border-radius: 4px 16px 16px 16px;
}
.bubble-row.mine .bubble-text {
  background: #0c2344;
  color: #f4f1ea;
  border: 1px solid #d7a441;
  border-right: 3px solid #3d8bff;
  border-radius: 16px 4px 16px 16px;
}
.bubble-time { margin: 0; color: #f4f1ea; font-size: 0.9rem; font-weight: 650; }
.thread-day {
  align-self: center;
  margin: 6px 0 0;
  padding: 4px 10px;
  background: #0c0c0c;
  color: #f0d7a2;
  font-weight: 750;
  font-size: 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(215, 164, 65, 0.45);
}
.thread-empty { margin: 0; color: #f4f1ea; font-weight: 650; }
.earlier {
  align-self: center;
  min-height: 44px;
  background: #2a2a2a;
  color: #f4f1ea;
  border: 1px solid #d7a441;
  border-radius: 12px;
  font: inherit;
  font-weight: 750;
  padding: 8px 14px;
  cursor: pointer;
}
.thread-field { display: block; min-width: 0; position: relative; }
.thread-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}
.thread-compose textarea { min-height: 48px; max-height: 120px; }
.thread-compose .btn { min-height: 48px; }
body[data-thread-page],
body.role-admin[data-thread-page] {
  --composer-bottom: calc(12px + env(safe-area-inset-bottom));
}
body[data-thread-page] .book-dock,
body[data-thread-page] #chat-bubble { display: none; }
body[data-thread-page] .thread-compose {
  position: fixed;
  z-index: 7;
  left: 50%;
  transform: translateX(-50%);
  width: min(448px, calc(100% - 24px));
  bottom: var(--composer-bottom);
  background: #0c0c0c;
  border: 1px solid rgba(215, 164, 65, 0.55);
  border-radius: 16px;
  padding: 8px;
}
body.role-admin[data-thread-page] .thread-compose,
body.role-technician[data-thread-page] .thread-compose {
  width: min(608px, calc(100% - 24px));
}
body[data-thread-page] { overflow: hidden; }
.directory-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  margin: 0 0 12px;
}
.directory-search {
  display: flex;
  flex: 1 1 16rem;
  gap: 8px;
  align-items: end;
  margin: 0;
  min-width: 0;
}
.directory-search .field { flex: 1 1 8rem; margin: 0; min-width: 0; }
.directory-tools > details.fold {
  flex: 1 1 calc(50% - 8px);
  min-width: 9.5rem;
  margin: 0;
  background: #111111;
}
.directory-tools > details.fold[open] { flex-basis: 100%; }
.directory-tools .hint { margin: 0; font-size: 0.9rem; }
.directory-tools h2 { font-size: 1rem; margin: 8px 0 0; }
.directory-form { display: grid; gap: 8px; }
.customer-list { display: grid; gap: 8px; }
.customer-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 8px;
  row-gap: 2px;
  align-items: start;
  padding: 8px 10px;
  background: #111111;
  color: #f4f1ea;
  border: 1px solid rgba(215, 164, 65, 0.45);
  border-left: 3px solid #d90103;
  border-radius: 12px;
  box-shadow: inset 5px 0 0 #0060d0;
}
.customer-open {
  grid-column: 1;
  min-width: 0;
  display: grid;
  gap: 1px;
  color: #f4f1ea;
  text-decoration: none;
}
.customer-name {
  font-size: 1.05rem;
  font-weight: 750;
  line-height: 1.25;
  color: #f4f1ea;
}
.customer-meta, .customer-service {
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.35;
  color: #f4f1ea;
  overflow-wrap: anywhere;
}
.customer-service { color: #f0d7a2; }
.customer-delete { grid-column: 2; justify-self: end; }
.customer-delete > summary {
  list-style: none;
  cursor: pointer;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #d90103;
  border-radius: 8px;
  background: #140c0c;
  color: #f4f1ea;
  font-weight: 750;
  font-size: 0.9rem;
}
.customer-delete > summary::-webkit-details-marker { display: none; }
.customer-delete > summary:focus-visible,
.customer-open:focus-visible,
.customer-type select:focus-visible { outline: 2px solid #3d8bff; outline-offset: 2px; }
.customer-delete[open] { grid-column: 1 / -1; justify-self: stretch; }
.customer-delete[open] > summary { margin-left: auto; width: fit-content; }
.customer-delete form { display: grid; gap: 6px; margin-top: 6px; }
.customer-delete form p { margin: 0; font-size: 0.9rem; }
.customer-type {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 2px 0 0;
}
.customer-type label {
  display: flex;
  flex: 1 1 12rem;
  gap: 6px;
  align-items: center;
  min-width: 0;
  font-size: 0.86rem;
  font-weight: 650;
}
.customer-type select {
  flex: 1 1 8rem;
  min-width: 0;
  min-height: 44px;
  padding: 4px 8px;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  background: #141414;
  color: #f4f1ea;
}
.customer-type .btn { min-height: 44px; padding: 6px 12px; font-size: 0.9rem; }
@media (max-width: 700px) {
  .directory-search { flex-basis: 100%; }
}
@media (min-width: 720px) {
  .directory-tools > details.fold { flex: 0 1 auto; }
  .directory-tools > details.fold[open] { flex-basis: 100%; }
  .directory-form { grid-template-columns: 1fr 1fr; }
  .directory-form .span-2 { grid-column: 1 / -1; }
}
.address-suggestions {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #111111;
  color: #f4f1ea;
  border: 1px solid rgba(215, 164, 65, 0.45);
  border-radius: 8px;
}
.address-suggestions button {
  display: block;
  width: 100%;
  text-align: left;
  min-height: 44px;
  background: transparent;
  color: inherit;
  border: 0;
  padding: 8px 12px;
}
.address-entry { display: grid; gap: 8px; }
.address-entry .hint { margin: 0; }
.address-entry .field { margin: 0; }
.address-parts {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(4.5rem, 0.7fr) minmax(6rem, 0.9fr);
  gap: 8px;
}
.address-parts .address-street { grid-column: 1 / -1; }
.address-detail-fields { display: grid; gap: 8px; margin-top: 8px; }
.address-details summary {
  min-height: 44px;
  display: flex;
  align-items: center;
}
.address-entry textarea { min-height: 72px; }
.customer-save {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.customer-save .btn { min-height: 44px; }
.customer-save .hint { flex: 1 1 100%; margin: 0; }
.directory-form .address-entry,
.directory-form .customer-save { grid-column: 1 / -1; }
@media (max-width: 520px) {
  .address-parts { grid-template-columns: minmax(0, 1fr) 4.2rem 5.6rem; }
}
.invoice-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  background: #111111;
  color: #f4f1ea;
  border: 1px solid rgba(215, 164, 65, 0.45);
  border-radius: 12px;
  padding: 12px;
}
.invoice-summary h1,
.invoice-summary p { margin: 0; }
.invoice-summary h1 { font-size: 1.35rem; }
.invoice-summary-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.invoice-send { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0; }
.invoice-send form { margin: 0; }
.send-error {
  margin: 0;
  flex: 1 1 12rem;
  background: #111111;
  color: #f4f1ea;
  border: 1px solid rgba(215, 164, 65, 0.55);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.92rem;
}
.invoice-note {
  background: #111111;
  color: #f4f1ea;
  border-radius: 10px;
  padding: 8px 10px;
}
.line-edit { border-bottom: 1px solid rgba(215, 164, 65, 0.25); }
.line-edit > summary {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
  padding: 8px 0;
  cursor: pointer;
  list-style: none;
}
.line-edit > summary::-webkit-details-marker { display: none; }
.line-edit-text { flex: 1 1 auto; min-width: 0; }
.line-edit-qty, .line-edit-amount { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.line-edit-body { padding: 0 0 10px; }
.needs-action-flag {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  margin: 0 0 2px;
  color: #ff4d4d;
  font-weight: 750;
  line-height: 1.2;
}
.agenda-open .needs-action-flag { flex: 1 0 100%; }
.needs-action-mark {
  display: inline-block;
  width: 0.7em;
  height: 0.9em;
  background: #e10600;
  clip-path: polygon(0 0, 100% 0, 100% 68%, 50% 100%, 0 68%);
}
.availability-state { margin: 0 0 6px; font-weight: 750; }
.alert-row { display: flex; gap: 8px; align-items: flex-start; }
.alert-copy { flex: 1 1 auto; min-width: 0; }
.alert-copy p, .alert-update { margin: 0 0 2px; }
.alert-who { font-weight: 750; }
.alert-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-left: auto; }
.alert-actions form { margin: 0; }
.alert-details { margin-top: 6px; }
.alert-details > summary { cursor: pointer; font-weight: 700; }
.existing-ticket-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
@media (max-width: 700px) {
  .calendar-bar { position: static; }
  .calendar-month[open] > .calendar-month-body {
    max-height: 50vh;
    overflow: auto;
  }
  .agenda-row { scroll-margin-top: 8px; }
  .invoice-summary { flex-direction: row; align-items: flex-start; }
  .invoice-summary-side { flex-direction: column; align-items: flex-end; margin-left: auto; }
  .alert-row { flex-wrap: wrap; }
  .alert-actions { width: 100%; }
}
.fold-body .thread-log { max-height: 50vh; overflow-y: auto; }
.fold-body .thread-compose,
body[data-thread-page] .chat-panel .thread-compose,
.chat-panel .thread-compose {
  position: static;
  width: auto;
  transform: none;
  left: auto;
  bottom: auto;
  background: transparent;
  border: 0;
  padding: 0;
}
