/* ==========================================================================
   Cleanboard design system
   One stylesheet, two apps. Tokens first, then shared components,
   then cleaner-app-only and admin-only sections at the bottom.
   ========================================================================== */

:root {
  /* brand */
  --teal-900: #0b3b31;
  --teal-800: #0a5c4b;
  --teal-700: #0e7c66;
  --teal-600: #12937a;
  --teal-100: #d6ece6;
  --teal-50: #e9f6f2;

  /* ink + surfaces */
  --ink: #0b1f1a;
  --ink-2: #3c5049;
  --muted: #6b7f78;
  --faint: #93a5a0;
  --card: #ffffff;
  --surface: #f6f8f7;
  --line: #e2e8e5;
  --line-strong: #cfd8d4;
  --navy: #0f172a;
  --navy-2: #1b2437;

  /* status */
  --ok: #16a34a;
  --ok-bg: #e8f6ec;
  --warn: #d97706;
  --warn-bg: #fdf3e3;
  --bad: #dc2626;
  --bad-bg: #fdecec;
  --info: #2563eb;
  --info-bg: #eaf0fe;
  --violet: #7c3aed;
  --violet-bg: #f3ecfe;

  /* shape */
  --r-xs: 6px;
  --r-sm: 9px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --shadow-1: 0 1px 2px rgba(11, 31, 26, 0.06), 0 1px 3px rgba(11, 31, 26, 0.04);
  --shadow-2: 0 10px 30px rgba(11, 31, 26, 0.1);
  --shadow-3: 0 24px 60px rgba(11, 31, 26, 0.18);

  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ul, ol, figure {
  margin: 0;
  padding: 0;
}

ul, ol {
  list-style: none;
}

a {
  color: var(--teal-700);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 0;
  background: none;
}

input, select, textarea {
  font: inherit;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

:focus-visible {
  outline: 2px solid var(--teal-600);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------- buttons */
.btn {
  --btn-bg: var(--card);
  --btn-fg: var(--ink);
  --btn-bd: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--btn-bd);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  transition: transform 0.06s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  box-shadow: var(--shadow-1);
}

.btn:active {
  transform: translateY(1px);
}

.btn[disabled] {
  opacity: 0.5;
  pointer-events: none;
}

.btn--primary {
  --btn-bg: var(--teal-700);
  --btn-fg: #fff;
  --btn-bd: var(--teal-700);
  box-shadow: 0 2px 6px rgba(14, 124, 102, 0.24);
}

.btn--primary:hover {
  --btn-bg: var(--teal-800);
}

.btn--dark {
  --btn-bg: var(--navy);
  --btn-fg: #fff;
  --btn-bd: var(--navy);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-bd: transparent;
  --btn-fg: var(--ink-2);
}

.btn--ghost:hover {
  --btn-bg: #eef3f1;
}

.btn--danger {
  --btn-bg: #fff;
  --btn-fg: var(--bad);
  --btn-bd: #f3c9c9;
}

.btn--danger-solid {
  --btn-bg: var(--bad);
  --btn-fg: #fff;
  --btn-bd: var(--bad);
}

.btn--block {
  width: 100%;
}

.btn--sm {
  min-height: 34px;
  padding: 0 11px;
  font-size: 13px;
  border-radius: var(--r-sm);
}

.btn--lg {
  min-height: 56px;
  font-size: 17px;
  border-radius: var(--r-lg);
}

.btn--icon {
  padding: 0;
  width: 40px;
  min-height: 40px;
  border-radius: 50%;
}

/* ---------------------------------------------------------------- chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.1px;
  line-height: 1.3;
  background: #eef2f0;
  color: var(--ink-2);
  white-space: nowrap;
}

.chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.chip--plain::before {
  display: none;
}

.chip--offer     { background: var(--warn-bg); color: #9a5b06; }
.chip--confirmed { background: var(--info-bg); color: #1d4ed8; }
.chip--progress  { background: var(--teal-50); color: var(--teal-800); }
.chip--submitted { background: var(--violet-bg); color: var(--violet); }
.chip--approved  { background: var(--ok-bg); color: #15803d; }
.chip--danger    { background: var(--bad-bg); color: var(--bad); }
.chip--muted     { background: #eef2f0; color: var(--muted); }

.chip--pulse::before {
  animation: pulse 1.8s ease-out infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(217, 119, 6, 0); }
  100% { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0); }
}

/* --------------------------------------------------------------- cards */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}

.card__pad { padding: 16px; }

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.row--between { justify-content: space-between; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.strong { font-weight: 650; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }

.upper {
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 11px;
  font-weight: 700;
  color: var(--faint);
}

.divider {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--teal-100);
  color: var(--teal-800);
  font-weight: 700;
  font-size: 13px;
  flex: none;
  border: 1px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
}

.avatar--sm { width: 28px; height: 28px; font-size: 11px; }
.avatar--lg { width: 52px; height: 52px; font-size: 17px; }

.avatar[data-tone="1"] { background: #e6eefc; color: #1d4ed8; }
.avatar[data-tone="2"] { background: #fdf0e2; color: #b45309; }
.avatar[data-tone="3"] { background: #f1ecfd; color: #6d28d9; }
.avatar[data-tone="4"] { background: #e7f6ef; color: #047857; }

/* ---------------------------------------------------------------- forms */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field > label,
.label {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink-2);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: #fff;
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.textarea {
  min-height: 84px;
  resize: vertical;
  line-height: 1.45;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--teal-600);
  box-shadow: 0 0 0 3px rgba(18, 147, 122, 0.16);
}

.hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

/* toggle switch */
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.switch__track {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #d5ddda;
  position: relative;
  transition: background 0.18s ease;
  flex: none;
}

.switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.18s ease;
}

.switch input:checked + .switch__track { background: var(--teal-700); }
.switch input:checked + .switch__track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--teal-600); outline-offset: 2px; }

/* ==========================================================================
   CLEANER APP - phone frame, screens, tab bar
   ========================================================================== */

body.app-cleaner {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px 40px;
  background:
    radial-gradient(1100px 520px at 12% -8%, #dff0ea 0%, rgba(223, 240, 234, 0) 62%),
    radial-gradient(900px 500px at 92% 108%, #e4eefb 0%, rgba(228, 238, 251, 0) 58%),
    #eef2f0;
}

.phone {
  width: 392px;
  max-width: 100%;
  height: 812px;
  max-height: calc(100vh - 68px);
  background: #0b1f1a;
  border-radius: 46px;
  padding: 11px;
  box-shadow: var(--shadow-3), 0 0 0 1px rgba(11, 31, 26, 0.55);
  position: relative;
}

.phone::after {
  /* notch pill */
  content: "";
  position: absolute;
  top: 19px;
  left: 50%;
  transform: translateX(-50%);
  width: 108px;
  height: 26px;
  background: #0b1f1a;
  border-radius: 0 0 16px 16px;
  z-index: 40;
  pointer-events: none;
}

.phone__inner {
  height: 100%;
  border-radius: 36px;
  background: var(--surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.statusbar {
  flex: none;
  height: 44px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink);
  background: var(--surface);
  z-index: 30;
}

.statusbar__right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sig {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 11px;
}

.sig i {
  width: 3px;
  background: var(--ink);
  border-radius: 1px;
  display: block;
}

.sig i:nth-child(1) { height: 4px; }
.sig i:nth-child(2) { height: 6px; }
.sig i:nth-child(3) { height: 8px; }
.sig i:nth-child(4) { height: 11px; }

.batt {
  width: 22px;
  height: 11px;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  position: relative;
  display: inline-block;
}

.batt::before {
  content: "";
  position: absolute;
  inset: 1.5px;
  width: 66%;
  background: var(--ink);
  border-radius: 1px;
}

.batt::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 3px;
  width: 2px;
  height: 4px;
  background: var(--ink);
  border-radius: 0 1px 1px 0;
}

.viewport {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
}

.screen {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 18px 108px;
  display: none;
  animation: screen-in 0.22s ease both;
}

.screen.is-active {
  display: block;
}

.screen--flush { padding-bottom: 0; }

@keyframes screen-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.screen::-webkit-scrollbar { width: 0; }
.screen { scrollbar-width: none; }

/* header inside a screen */
.screen-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0 16px;
}

.screen-head h1 {
  font-size: 22px;
  font-weight: 720;
  letter-spacing: -0.3px;
  line-height: 1.15;
}

.screen-head p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.screen-head__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.backlink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 10px 0 4px;
  margin-left: -4px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}

.backlink:hover { background: #eaf0ee; text-decoration: none; }

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 22px 2px 10px;
}

.section-title h2 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.1px;
}

.section-title .count {
  font-size: 12px;
  color: var(--faint);
  font-weight: 650;
}

/* ---------------------------------------------------------------- tab bar */
.tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 78px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding: 6px 6px 18px;
  z-index: 25;
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 12px;
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.1px;
  position: relative;
}

.tab svg { width: 22px; height: 22px; stroke-width: 1.9; }

.tab.is-active { color: var(--teal-700); }

.tab.is-active::after {
  content: "";
  position: absolute;
  top: 0;
  width: 22px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--teal-700);
}

.tab__badge {
  position: absolute;
  top: 4px;
  right: 50%;
  transform: translateX(20px);
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--warn);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
}

.tabbar[hidden] { display: none; }

/* ------------------------------------------------------------ hero / offer */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  padding: 20px;
  color: #fff;
  background: linear-gradient(145deg, var(--teal-800) 0%, var(--teal-700) 55%, #0f8b72 100%);
  box-shadow: 0 12px 28px rgba(10, 92, 75, 0.28);
}

.hero::after {
  content: "";
  position: absolute;
  right: -46px;
  top: -60px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
}

.hero::before {
  content: "";
  position: absolute;
  right: 26px;
  bottom: -70px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.hero__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: relative;
}

.hero__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  opacity: 0.72;
}

.hero__time {
  font-size: 34px;
  font-weight: 730;
  letter-spacing: -1px;
  line-height: 1.1;
  margin: 10px 0 2px;
  position: relative;
}

.hero__place {
  font-size: 16px;
  font-weight: 650;
  position: relative;
}

.hero__addr {
  font-size: 13px;
  opacity: 0.78;
  margin-top: 2px;
  position: relative;
}

.hero__meta {
  display: flex;
  gap: 14px;
  margin-top: 16px;
  font-size: 12.5px;
  font-weight: 600;
  opacity: 0.9;
  position: relative;
}

.hero__meta span { display: inline-flex; align-items: center; gap: 5px; }

.hero .chip {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  backdrop-filter: blur(4px);
}

.hero__btn {
  margin-top: 16px;
  width: 100%;
  position: relative;
  background: #fff;
  color: var(--teal-800);
  border-color: #fff;
  min-height: 48px;
  font-size: 15px;
}

.hero__btn:hover { background: #f2fbf8; }

.offer {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--warn);
  border-radius: var(--r-lg);
  padding: 14px 14px 14px 15px;
  box-shadow: var(--shadow-1);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.offer:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
.offer:active { transform: none; }

.offer__time {
  font-size: 17px;
  font-weight: 720;
  letter-spacing: -0.2px;
}

.offer__place {
  font-size: 13.5px;
  color: var(--ink-2);
  margin-top: 1px;
}

.offer__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.countdown {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: #9a5b06;
  background: var(--warn-bg);
  padding: 4px 8px;
  border-radius: 7px;
}

.countdown.is-urgent { color: var(--bad); background: var(--bad-bg); }

/* ----------------------------------------------------------- shift rows */
.shiftrow {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 13px 13px 13px 12px;
  box-shadow: var(--shadow-1);
  transition: box-shadow 0.12s ease;
}

.shiftrow:hover { box-shadow: var(--shadow-2); }

.shiftrow__time {
  text-align: center;
  border-right: 1px solid var(--line);
  padding-right: 8px;
}

.shiftrow__start {
  display: block;
  font-size: 15px;
  font-weight: 720;
  letter-spacing: -0.2px;
}

.shiftrow__end {
  display: block;
  font-size: 11.5px;
  color: var(--faint);
  font-weight: 600;
}

.shiftrow__title {
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -0.1px;
}

.shiftrow__sub {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}

.shiftrow__chev { color: var(--faint); }

.shiftrow--past { opacity: 0.92; }

.shiftrow--flat { box-shadow: none; }

/* --------------------------------------------------------------- week */
.weekstrip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 6px;
  box-shadow: var(--shadow-1);
}

.day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 0 6px;
  border-radius: 11px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
}

.day__num {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.day.is-today { background: var(--teal-700); color: #fff; }
.day.is-today .day__num { color: #fff; }

.day__dots {
  display: flex;
  gap: 3px;
  height: 4px;
}

.day__dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--teal-600);
}

.day.is-today .day__dots i { background: rgba(255, 255, 255, 0.9); }

.dayhead {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 20px 2px 8px;
}

.dayhead h3 { font-size: 14px; font-weight: 700; }
.dayhead span { font-size: 12px; color: var(--faint); font-weight: 600; }

/* --------------------------------------------------------- shift detail */
.detail-hero {
  border-radius: var(--r-xl);
  background: #fff;
  border: 1px solid var(--line);
  padding: 18px;
  box-shadow: var(--shadow-1);
}

.detail-hero h1 {
  font-size: 21px;
  font-weight: 720;
  letter-spacing: -0.35px;
}

.detail-hero__time {
  font-size: 26px;
  font-weight: 730;
  letter-spacing: -0.8px;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

.detail-hero__addr {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.map {
  position: relative;
  height: 128px;
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-top: 12px;
  background:
    linear-gradient(0deg, rgba(14, 124, 102, 0.06), rgba(14, 124, 102, 0.06)),
    repeating-linear-gradient(0deg, #eef2f0 0 1px, #e6ebe9 1px 2px),
    #eaf0ee;
  border: 1px solid var(--line);
}

.map::before {
  /* fake roads */
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 22%, #dbe4e0 22%, #dbe4e0 24%, transparent 24%),
    linear-gradient(0deg, transparent 58%, #dbe4e0 58%, #dbe4e0 60%, transparent 60%),
    linear-gradient(56deg, transparent 46%, #dfe7e3 46%, #dfe7e3 48%, transparent 48%);
}

.map__pin {
  position: absolute;
  left: 44%;
  top: 40%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--teal-700);
  border: 3px solid #fff;
  box-shadow: 0 0 0 6px rgba(14, 124, 102, 0.18);
}

.map__nav {
  position: absolute;
  right: 10px;
  bottom: 10px;
}

.infoblock {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 15px 16px;
}

.infoblock h3 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.infoblock p {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.5;
}

.kv {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 0;
  font-size: 13.5px;
}

.kv + .kv { border-top: 1px solid var(--line); }
.kv dt { color: var(--muted); }
.kv dd { font-weight: 620; text-align: right; }

.access {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: var(--r-md);
  padding: 12px 14px;
  background: var(--teal-50);
  border: 1px dashed var(--teal-100);
}

.access__code {
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--teal-800);
}

.access--locked {
  background: #f3f5f4;
  border-color: var(--line);
  color: var(--muted);
  font-size: 13px;
}

.access--locked .access__code { color: var(--faint); letter-spacing: 3px; font-size: 20px; }

.comment {
  display: flex;
  gap: 10px;
  padding: 10px 0;
}

.comment + .comment { border-top: 1px solid var(--line); }

.comment__body {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-2);
}

.comment__who {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 2px;
}

.comment__who span { color: var(--faint); font-weight: 600; margin-left: 6px; }

/* ------------------------------------------------------------ checklist */
.progress {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px;
}

.ring {
  --p: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: conic-gradient(var(--teal-700) calc(var(--p) * 1%), #e6ecea 0);
  display: grid;
  place-items: center;
  flex: none;
  position: relative;
}

.ring::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #fff;
}

.ring b {
  position: relative;
  z-index: 1;
  font-size: 16px;
  font-weight: 730;
  font-variant-numeric: tabular-nums;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 13px 14px;
}

.check__box {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 2px solid var(--line-strong);
  background: #fff;
  display: grid;
  place-items: center;
  flex: none;
  margin-top: 1px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.check__box svg { width: 15px; height: 15px; opacity: 0; color: #fff; }

.check.is-done .check__box {
  background: var(--teal-700);
  border-color: var(--teal-700);
}

.check.is-done .check__box svg { opacity: 1; }

.check__body { flex: 1; min-width: 0; }

.check__label {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.check.is-done .check__label {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: rgba(107, 127, 120, 0.5);
}

.check__note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.photo-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  border: 1px dashed var(--line-strong);
  background: #fbfcfb;
  font-size: 12.5px;
  font-weight: 620;
  color: var(--ink-2);
}

.photo-btn:hover { border-color: var(--teal-600); color: var(--teal-800); }

.thumbs {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.thumb {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #cfe3dc, #9fc6bb);
  position: relative;
}

.thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---------------------------------------------------------------- sheets */
.sheet-layer {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: none;
}

.sheet-layer.is-open { display: block; }

.sheet-scrim {
  position: absolute;
  inset: 0;
  background: rgba(11, 31, 26, 0.48);
  animation: fade-in 0.18s ease both;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 90%;
  overflow-y: auto;
  background: #fff;
  border-radius: 26px 26px 0 0;
  padding: 10px 18px 26px;
  box-shadow: 0 -14px 40px rgba(11, 31, 26, 0.22);
  animation: sheet-up 0.26s cubic-bezier(0.2, 0.85, 0.3, 1) both;
}

@keyframes sheet-up {
  from { transform: translateY(100%); }
  to   { transform: none; }
}

.sheet__grip {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--line-strong);
  margin: 0 auto 16px;
}

.sheet h2 {
  font-size: 19px;
  font-weight: 720;
  letter-spacing: -0.3px;
}

.sheet__sub {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.45;
}

.sheet__body { margin-top: 16px; }

.sheet__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}

.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  width: 100%;
}

.choice:hover { border-color: var(--teal-600); background: #fafffd; }

.choice.is-selected {
  border-color: var(--teal-700);
  background: var(--teal-50);
}

.summarybox {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
}

/* --------------------------------------------------------------- toasts */
.toast {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 92px;
  z-index: 70;
  background: var(--navy);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  padding: 13px 16px;
  border-radius: 14px;
  box-shadow: var(--shadow-2);
  display: flex;
  align-items: center;
  gap: 9px;
  animation: toast-in 0.24s ease both;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.toast.is-leaving { animation: toast-out 0.2s ease both; }

@keyframes toast-out {
  to { opacity: 0; transform: translateY(10px); }
}

/* ------------------------------------------------------- onboarding bits */
.onboard {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 2px 26px;
}

.brandmark {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, var(--teal-700), var(--teal-800));
  color: #fff;
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.6px;
  box-shadow: 0 10px 22px rgba(10, 92, 75, 0.28);
}

.brandmark--sm { width: 40px; height: 40px; border-radius: 12px; font-size: 17px; }

.onboard h1 {
  font-size: 27px;
  font-weight: 740;
  letter-spacing: -0.7px;
  line-height: 1.16;
  margin-top: 22px;
}

.onboard p.lead {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 8px;
}

.onboard__invite {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  margin-top: 20px;
  box-shadow: var(--shadow-1);
}

.pinrow {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.pinrow input {
  width: 100%;
  height: 62px;
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  border: 1.5px solid var(--line-strong);
  border-radius: 15px;
  background: #fff;
  letter-spacing: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pinrow input:focus {
  outline: none;
  border-color: var(--teal-600);
  box-shadow: 0 0 0 3px rgba(18, 147, 122, 0.16);
}

.pinrow input.is-filled { border-color: var(--teal-700); background: #fbfffd; }

.notebox {
  display: flex;
  gap: 9px;
  padding: 11px 13px;
  border-radius: var(--r-md);
  background: var(--teal-50);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--teal-900);
}

.notebox--warn { background: var(--warn-bg); color: #7c4a05; }

/* ------------------------------------------------------------- misc rows */
.listrows {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}

.listrow {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 11px 14px;
  text-align: left;
  font-size: 14px;
  background: #fff;
}

.listrow + .listrow { border-top: 1px solid var(--line); }
.listrow:hover { background: #fbfdfc; }
.listrow__title { font-weight: 620; }
.listrow__sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.listrow__chev { color: var(--faint); margin-left: auto; }

.empty {
  text-align: center;
  padding: 34px 20px;
  color: var(--muted);
}

.empty__icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: #eef2f0;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  color: var(--faint);
}

.empty h3 { font-size: 15px; font-weight: 700; color: var(--ink); }
.empty p { font-size: 13px; margin-top: 4px; line-height: 1.45; }

/* fixed action bar inside the phone, above the tab bar */
.actionbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 18px 22px;
  background: linear-gradient(to top, #fff 62%, rgba(255, 255, 255, 0.86));
  border-top: 1px solid var(--line);
  z-index: 20;
}

.actionbar[hidden] { display: none; }

/* ==========================================================================
   ADMIN CONSOLE - desktop shell
   ========================================================================== */

body.app-admin {
  font-size: 14px;
  background: var(--surface);
}

.shell {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--navy);
  color: #b7c3d4;
  padding: 18px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 8px 20px;
  color: #fff;
}

.brand__text { min-width: 0; }
.brand__name { font-size: 15.5px; font-weight: 720; letter-spacing: -0.2px; line-height: 1.2; }
.brand__org { font-size: 11px; color: #8b9cb5; margin-top: 1px; }

.navgroup {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: #62748d;
  padding: 16px 10px 6px;
}

.navitem {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 9px;
  color: #b7c3d4;
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}

.navitem svg { width: 17px; height: 17px; flex: none; opacity: 0.85; }
.navitem:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }

.navitem.is-active {
  background: rgba(18, 147, 122, 0.2);
  color: #fff;
  box-shadow: inset 2px 0 0 var(--teal-600);
}

.navitem__count {
  margin-left: auto;
  min-width: 20px;
  height: 19px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(217, 119, 6, 0.9);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.sidebar__foot {
  margin-top: auto;
  padding: 14px 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  color: #62748d;
  line-height: 1.5;
}

.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 62px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 26px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar h1 { font-size: 16.5px; font-weight: 720; letter-spacing: -0.2px; }

.crumb { font-size: 12.5px; color: var(--muted); }

.searchbox {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  color: var(--muted);
  width: 250px;
}

.searchbox input {
  border: 0;
  outline: none;
  width: 100%;
  font-size: 13px;
  background: transparent;
}

.content {
  padding: 22px 26px 64px;
  max-width: 1360px;
  width: 100%;
}

.page-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.page-head h2 {
  font-size: 22px;
  font-weight: 730;
  letter-spacing: -0.4px;
}

.page-head p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}

.page-head__actions { margin-left: auto; display: flex; gap: 8px; }

/* ---------------------------------------------------------------- stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px 16px 14px;
  box-shadow: var(--shadow-1);
  position: relative;
  overflow: hidden;
}

.stat__label {
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat__value {
  font-size: 28px;
  font-weight: 740;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

.stat__foot { font-size: 12px; color: var(--muted); margin-top: 4px; }
.stat--warn { box-shadow: inset 0 0 0 1px #f2ddba, var(--shadow-1); }
.stat--warn .stat__value { color: #b45309; }
.stat--bad .stat__value { color: var(--bad); }

/* --------------------------------------------------------------- panels */
.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

.panel__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.panel__head h3 { font-size: 14px; font-weight: 700; letter-spacing: -0.1px; }
.panel__head .muted { font-size: 12px; }
.panel__body { padding: 14px 16px; }
.panel__body--flush { padding: 0; }

.section-gap { margin-top: 18px; }

/* --------------------------------------------------------------- tables */
.table { width: 100%; border-collapse: collapse; }

.table th {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--faint);
  font-weight: 700;
  text-align: left;
  padding: 9px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfb;
  white-space: nowrap;
}

.table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fafcfb; }
.table tbody tr.is-clickable { cursor: pointer; }

.cell-person { display: flex; align-items: center; gap: 9px; }
.cell-person__name { font-weight: 620; font-size: 13.5px; }

.table__actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ---------------------------------------------------------------- board */
.board-wrap { overflow-x: auto; }

.board {
  min-width: 900px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-1);
}

.board__head {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
  background: #fbfcfb;
}

.board__head-label {
  padding: 10px 14px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
  color: var(--faint);
  border-right: 1px solid var(--line);
}

.board__hours {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
}

.board__hour {
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
  padding: 10px 0 10px 5px;
  border-left: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}

.board__hour:first-child { border-left: 0; }

.board__row {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
}

.board__row:last-child { border-bottom: 0; }

.board__who {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-right: 1px solid var(--line);
  background: #fff;
}

.board__who-name { font-size: 13px; font-weight: 640; line-height: 1.2; }
.board__who-meta { font-size: 11px; color: var(--faint); }

.board__track {
  position: relative;
  height: 60px;
  background-image: repeating-linear-gradient(
    to right,
    var(--line) 0 1px,
    transparent 1px calc(100% / 11)
  );
}

.board__track.is-target {
  background-color: #f4fbf9;
  outline: 2px dashed var(--teal-600);
  outline-offset: -3px;
  cursor: copy;
}

.blk {
  position: absolute;
  top: 8px;
  height: 44px;
  border-radius: 9px;
  padding: 5px 9px;
  font-size: 12px;
  line-height: 1.25;
  text-align: left;
  overflow: hidden;
  border: 1px solid transparent;
  transition: transform 0.1s ease, box-shadow 0.12s ease;
}

.blk:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); z-index: 3; }
.blk__time { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 11.5px; }
.blk__name { font-size: 11.5px; opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.blk--confirmed { background: #e8f0fe; border-color: #c7d8fb; color: #1e3a8a; }
.blk--progress  { background: var(--teal-50); border-color: #b7e0d5; color: var(--teal-900); }
.blk--submitted { background: var(--violet-bg); border-color: #ddd0fb; color: #5b21b6; }
.blk--approved  { background: var(--ok-bg); border-color: #bfe6c9; color: #14532d; }
.blk--offered   { background: var(--warn-bg); border-color: #f3d9ae; color: #92400e; }
.blk--unstaffed { background: repeating-linear-gradient(135deg, #fff 0 7px, #f6f2ea 7px 14px); border: 1px dashed #d9b98a; color: #9a5b06; }
.blk--declined, .blk--expired, .blk--no_show { background: #f2f4f3; border-color: #e0e5e3; color: #6b7f78; }
.blk.is-focused { box-shadow: 0 0 0 2px var(--teal-600); }

/* -------------------------------------------- turnovers: checkout -> arrival */
.turnstrip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.turnstrip__card {
  flex: 0 0 236px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--faint);
  border-radius: var(--r-lg);
  padding: 11px 13px;
  box-shadow: var(--shadow-1);
}

.turnstrip__card--covered { border-left-color: #16a34a; }
.turnstrip__card--unscheduled,
.turnstrip__card--impossible { border-left-color: var(--bad); }
.turnstrip__card--late { border-left-color: #d97706; }
.turnstrip__card--missed { border-left-color: #9ca3af; }

/* Marks a block that covers (or was created for) a changeover. */
.blk--turnover::after {
  content: '';
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}

.board__now {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #dc2626;
  pointer-events: none;
  z-index: 4;
}

.board__now::after {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #dc2626;
}

/* ----------------------------------------------------------- unstaffed tray */
.tray { display: flex; flex-direction: column; gap: 8px; }

.traycard {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 1px dashed #d9b98a;
  border-radius: 11px;
  background: #fffdf9;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.traycard:hover { border-color: var(--warn); background: #fffaf1; }

.traycard.is-selected {
  border-style: solid;
  border-color: var(--warn);
  background: #fff7e8;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.14);
}

.traycard__time {
  font-size: 13px;
  font-weight: 720;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.traycard__place { font-size: 12.5px; color: var(--ink-2); }
.traycard__meta { font-size: 11px; color: var(--faint); margin-top: 1px; }

/* --------------------------------------------------------------- drawer */
.drawer-layer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
}

.drawer-layer.is-open { display: block; }

.drawer-scrim {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  animation: fade-in 0.16s ease both;
}

.drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(560px, 94vw);
  background: #fff;
  box-shadow: -18px 0 50px rgba(11, 31, 26, 0.2);
  display: flex;
  flex-direction: column;
  animation: drawer-in 0.24s cubic-bezier(0.2, 0.85, 0.3, 1) both;
}

@keyframes drawer-in {
  from { transform: translateX(30px); opacity: 0.6; }
  to   { transform: none; opacity: 1; }
}

.drawer__head {
  flex: none;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.drawer__body { flex: 1; overflow-y: auto; padding: 18px 20px 28px; }

.drawer__foot {
  flex: none;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  background: #fbfcfb;
  display: flex;
  gap: 8px;
}

.iconbtn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  flex: none;
}

.iconbtn:hover { background: #eef2f0; color: var(--ink); }

/* ------------------------------------------------------------- timeline */
.tl { position: relative; padding-left: 22px; }

.tl::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 10px;
  width: 2px;
  background: var(--line);
}

.tl__item { position: relative; padding-bottom: 16px; }
.tl__item:last-child { padding-bottom: 0; }

.tl__item::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--line-strong);
}

.tl__item--ok::before   { border-color: var(--ok); }
.tl__item--warn::before { border-color: var(--warn); }
.tl__item--bad::before  { border-color: var(--bad); }
.tl__item--now::before  { border-color: var(--teal-700); box-shadow: 0 0 0 4px rgba(14, 124, 102, 0.15); }

.tl__title { font-size: 13px; font-weight: 640; }
.tl__meta { font-size: 11.5px; color: var(--faint); margin-top: 1px; }

/* --------------------------------------------------------------- modules */
.modules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.module {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 15px 16px;
  background: #fff;
  overflow: hidden;
}

.module::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    135deg,
    rgba(246, 248, 247, 0) 0 12px,
    rgba(246, 248, 247, 0.9) 12px 24px
  );
  pointer-events: none;
  opacity: 0.5;
}

.module__top { display: flex; align-items: center; gap: 8px; position: relative; z-index: 1; }
.module__name { font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.module__desc { font-size: 12.5px; color: var(--muted); margin-top: 5px; line-height: 1.45; position: relative; z-index: 1; }

.module__lock {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: #eef2f0;
  padding: 3px 7px;
  border-radius: 6px;
}

/* --------------------------------------------------------------- reports */
.bars { display: flex; flex-direction: column; gap: 10px; }

.bar-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 52px;
  gap: 12px;
  align-items: center;
  font-size: 12.5px;
}

.bar-track {
  height: 9px;
  border-radius: 999px;
  background: #eef2f0;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal-600), var(--teal-700));
}

.bar-fill--warn { background: linear-gradient(90deg, #f0a543, var(--warn)); }

/* --------------------------------------------------------------- settings */
.settingrow {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.settingrow:last-child { border-bottom: 0; }
.settingrow__text { flex: 1; min-width: 0; }
.settingrow__title { font-size: 13.5px; font-weight: 640; }
.settingrow__desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.45; }

/* Business details form and the language picker. */
.fieldgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.field__error {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--bad);
}

.input.is-invalid,
.select.is-invalid,
.textarea.is-invalid { border-color: var(--bad); }

.langpick { display: flex; flex-wrap: wrap; gap: 8px; }

.langpick__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: #fff;
  font: inherit;
  font-size: 13.5px;
  font-weight: 620;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.langpick__btn span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--faint);
}

.langpick__btn:hover { border-color: var(--teal-600); }

.langpick__btn.is-active {
  border-color: var(--teal-700);
  background: var(--teal-50);
  color: var(--teal-800);
}

.langpick__btn.is-active span { color: var(--teal-700); }

.navitem__label { white-space: nowrap; }

/* ----------------------------------------------------------------- modal */
.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.42);
  animation: fade-in 0.16s ease both;
}

.modal-layer.is-open { display: grid; }

.modal {
  background: #fff;
  border-radius: 16px;
  width: min(620px, 100%);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-3);
  animation: screen-in 0.2s ease both;
}

.modal__head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal__head h3 { font-size: 16px; font-weight: 720; }
.modal__body { padding: 18px 20px; overflow-y: auto; }

.modal__foot {
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  background: #fbfcfb;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  border-radius: 0 0 16px 16px;
}

/* ------------------------------------------------------------- utilities */
.copyfield {
  display: flex;
  gap: 8px;
  align-items: center;
}

.copyfield input {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 12.5px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--ink-2);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 650;
  padding: 3px 8px;
  border-radius: 6px;
  background: #eef2f0;
  color: var(--ink-2);
}

.tag--teal { background: var(--teal-50); color: var(--teal-800); }
.tag--muted { background: #f2f4f3; color: var(--muted); }

.linkbtn {
  color: var(--teal-700);
  font-weight: 640;
  font-size: 12.5px;
}

.linkbtn:hover { text-decoration: underline; }

.danger-text { color: var(--bad); }
.fill-line { height: 1px; background: var(--line); margin: 14px 0; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .modules { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 10px 12px;
  }
  .brand { padding: 0 10px 0 2px; }
  .navgroup, .sidebar__foot, .navitem__count { display: none; }
  .navitem { width: auto; padding: 7px 10px; }
  .navitem svg { width: 15px; height: 15px; }
  .topbar { display: none; }
  .content { padding: 16px 14px 48px; }
  .searchbox { display: none; }
}

@media (max-width: 520px) {
  body.app-cleaner { padding: 0; background: #fff; }
  .phone {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
  }
  .phone::after { display: none; }
  .phone__inner { border-radius: 0; }
  .statusbar { display: none; }
}

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

@media print {
  .sidebar, .topbar, .tabbar, .actionbar, .page-head__actions { display: none !important; }
}

/* ------------------------------------------------------- admin console bits */
/* The board spans BOARD_START..BOARD_END (12 hours), so it needs 12 columns. */
.board__hours { grid-template-columns: repeat(12, 1fr); }

.board__track {
  background-image: repeating-linear-gradient(
    to right,
    var(--line) 0 1px,
    transparent 1px calc(100% / 12)
  );
}

.board__row--unassigned { background: #fffdf9; }

/* Fixed toast host so admin toasts sit in the corner, not inside a phone. */
.toast-host {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  pointer-events: none;
}

.toast-host .toast {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  max-width: 360px;
}

.drawer__meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.drawer__title { font-size: 16px; font-weight: 700; letter-spacing: -0.2px; }

.calnav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

/* ------------------------------------------- property administration */
.filterbar {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: #eef2f0;
  border-radius: var(--r-sm);
}

.filterbar__opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  padding: 5px 10px;
  border-radius: calc(var(--r-sm) - 3px);
  cursor: pointer;
}

.filterbar__opt:hover { color: var(--ink); }

.filterbar__opt.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(16, 40, 34, 0.12);
}

.filterbar__count { font-size: 11px; font-weight: 700; color: var(--faint); }
.filterbar__opt.is-active .filterbar__count { color: var(--teal-800); }

.card.is-archived {
  background: #fafbfa;
  border-style: dashed;
}

.card.is-archived .strong {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}










