/* Mehadrin Team: app and sign-in styles.
   Black & gold theme. Colours, type, spacing and radii come from the shared tokens. */
/* Mehadrin Team design tokens: black & gold.
   One source for every stylesheet (app, Freezer, Checklists, station, share);
   build.mjs puts this block where a stylesheet says @tokens. */
:root {
  color-scheme: dark;

  /* Surfaces */
  --bg: #0b0b0d;
  --surface: #141417;
  --surface-2: #1b1b1f;
  --surface-3: #26262b;
  --line: #2b2b31;
  --line-strong: #3d3d45;
  --overlay: rgba(0, 0, 0, .72);
  --bar-bg: linear-gradient(180deg, #151517, #0f0f11);
  --hero-bg: linear-gradient(145deg, #1d1912, #100f0d);
  --hero-on-bg: linear-gradient(145deg, #13261c, #0d1410);
  --hero-break-bg: linear-gradient(145deg, #2a2010, #14110a);

  /* Text */
  --text: #f3eee6;
  --text-2: #bab3a7;
  --text-3: #8f897f;

  /* Gold accent (7.9:1 on --surface) */
  --gold: #c9a45c;
  --gold-hi: #dcbd7c;
  --gold-soft: rgba(201, 164, 92, .14);
  --gold-line: rgba(201, 164, 92, .4);
  --on-gold: #17130b;
  --gold-grad: linear-gradient(145deg, #dcbd7c, #a8853f);

  /* Status */
  --ok: #72c79a;
  --ok-bg: rgba(114, 199, 154, .13);
  --ok-line: rgba(114, 199, 154, .42);
  --ok-solid: #2e7a55;
  --warn: #e7b25b;
  --warn-bg: rgba(231, 178, 91, .13);
  --warn-line: rgba(231, 178, 91, .45);
  --warn-solid: #96661a;
  --bad: #ee7d72;
  --bad-bg: rgba(238, 125, 114, .13);
  --bad-line: rgba(238, 125, 114, .45);
  --bad-solid: #b3423a;
  --info: #a3bcdb;
  --info-bg: rgba(163, 188, 219, .12);
  --info-line: rgba(163, 188, 219, .35);
  --on-solid: #ffffff;

  /* Type: a compact, refined scale (6 Nov 2026: "slightly smaller") — every font size in every page is one of these */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --t-2xs: 11px;
  --t-xs: 12px;
  --t-sm: 13px;
  --t-md: 14px;
  --t-base: 15px;
  --t-lg: 17px;
  --t-xl: 20px;
  --t-2xl: 24px;
  --t-3xl: 28px;

  /* Spacing */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 10px;
  --s-4: 14px;
  --s-5: 18px;
  --s-6: 22px;
  --s-8: 28px;

  /* Shape */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;
  --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-2: 0 10px 30px rgba(0, 0, 0, .55);

  /* Control heights (touch targets stay 40px or more) */
  --h-sm: 40px;
  --h-md: 44px;
  --h-lg: 52px;
  --h-xl: 56px;
  --tap: var(--h-md);
}


/* Base */
* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font: var(--t-base)/1.45 var(--font);
  background: var(--bg);
  color: var(--text);
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--gold);
  overflow-wrap: anywhere;
}

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

/* Line icons (ico() in core.js): one stroke weight, coloured by the text around them */
.ico {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -.25em;
}

/* Header */
header.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bar-bg);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: calc(var(--s-3) + env(safe-area-inset-top)) max(var(--s-4), calc((100% - 720px) / 2 + var(--s-4))) var(--s-3);
  border-bottom: 1px solid var(--gold-line);
}

header.top h1 {
  font-size: var(--t-lg);
  margin: 0;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  letter-spacing: .02em;
}

header.top .back {
  background: none;
  border: 0;
  color: var(--gold);
  font-size: var(--t-2xl);
  padding: 0 6px 0 0;
  line-height: 1;
}

.bell {
  position: relative;
  background: none;
  border: 0;
  color: var(--text-2);
  padding: 4px;
  display: flex;
}

.bell .ico {
  width: 22px;
  height: 22px;
}

.bell b {
  position: absolute;
  top: 0;
  right: -2px;
  background: var(--gold);
  color: var(--on-gold);
  border-radius: var(--r-sm);
  font-size: var(--t-2xs);
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  padding: 0 4px;
  font-weight: 700;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--s-5) var(--s-4);
}

/* Bottom navigation */
nav.tabs {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: rgba(14, 14, 16, .97);
  border-top: 1px solid var(--line);
  display: flex;
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  padding: 0 max(0px, calc((100% - 720px) / 2)) env(safe-area-inset-bottom);
}

nav.tabs a {
  flex: 1;
  text-align: center;
  padding: 8px 2px 7px;
  color: var(--text-3);
  text-decoration: none;
  font-size: var(--t-xs);
  position: relative;
  letter-spacing: .02em;
}

nav.tabs a .i {
  display: flex;
  justify-content: center;
  height: 26px;
  align-items: center;
}

nav.tabs a .i .ico {
  width: 22px;
  height: 22px;
}

nav.tabs a.on {
  color: var(--gold);
  font-weight: 600;
}

nav.tabs a b {
  position: absolute;
  top: 4px;
  left: 56%;
  background: var(--gold);
  color: var(--on-gold);
  border-radius: var(--r-sm);
  font-size: var(--t-2xs);
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  padding: 0 4px;
  font-weight: 700;
}

/* Cards & layout helpers */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--s-4) var(--s-5);
  margin: 0 0 var(--s-4);
}

.card h2 {
  font-size: var(--t-md);
  margin: 0 0 var(--s-3);
  font-weight: 600;
  color: var(--text);
  letter-spacing: .02em;
}

.card h3 {
  font-size: var(--t-md);
  margin: 12px 0 6px;
  font-weight: 600;
  color: var(--text);
}

.muted {
  color: var(--text-2);
}

.small {
  font-size: var(--t-sm);
}

.tiny {
  font-size: var(--t-xs);
}

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

.row.wrap {
  flex-wrap: wrap;
}

.right {
  text-align: right;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list>li {
  padding: var(--s-3) 0;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.list>li:first-child {
  border-top: 0;
}

.list>li.tap {
  cursor: pointer;
}

.chev {
  color: var(--text-3);
  font-size: var(--t-xl);
}

/* Menu lists (More, Settings): one icon column, one text column, the chevron */
.list.menu>li {
  flex-wrap: nowrap;
  gap: var(--s-3);
  min-height: 52px;
  padding: var(--s-2) 0;
}

.list.menu .mi {
  flex: 0 0 28px;
  display: flex;
  justify-content: center;
  color: var(--gold);
}

.list.menu .mi .ico {
  width: 20px;
  height: 20px;
}

.list.menu .grow {
  font-weight: 500;
}

.list.menu .tiny {
  font-weight: 400;
  margin-top: 2px;
}

.sechead {
  margin: var(--s-6) var(--s-1) var(--s-3);
  font-size: var(--t-2xs);
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-3);
}

.sechead:first-child {
  margin-top: var(--s-1);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: var(--r-md);
  padding: var(--s-3) var(--s-4);
  background: var(--gold);
  color: var(--on-gold);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  min-height: var(--tap);
  letter-spacing: .01em;
  transition: background-color .15s, opacity .15s;
}

.btn.big {
  width: 100%;
  font-size: var(--t-lg);
  min-height: var(--h-lg);
  border-radius: var(--r-lg);
}

.btn.block {
  width: 100%;
}

.btn.sec {
  background: var(--surface-3);
  color: var(--text);
  border: 1px solid var(--line-strong);
}

.btn.ghost {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold-line);
}

.btn.ok {
  background: var(--ok-solid);
  color: var(--on-solid);
}

.btn.bad {
  background: var(--bad-solid);
  color: var(--on-solid);
}

.btn.warn {
  background: var(--warn-solid);
  color: var(--on-solid);
}

.btn.sm {
  padding: 7px 11px;
  min-height: var(--h-sm);
  font-size: var(--t-sm);
  border-radius: var(--r-sm);
}

.btn:disabled {
  opacity: .45;
}

.btn.soft-bad {
  background: var(--bad-bg);
  color: var(--bad);
  border: 1px solid var(--bad-line);
}

/* Button rows: equal widths, at most two per row on a phone (an odd last button takes the full row) */
.btns {
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
  margin-top: var(--s-3);
}

.btns>.btn {
  flex: 1 1 150px;
}

/* Stacked full-width buttons keep one even gap; a button that opens a screen sits above its content */
.btn.big,
.btn.block {
  margin-top: var(--s-3);
}

.btn.big:first-child,
.btn.block:first-child,
.btns>.btn {
  margin-top: 0;
}

#view>.btn:first-child {
  margin-bottom: var(--s-3);
}

/* Forms */
label.f {
  display: block;
  margin: var(--s-3) 0 var(--s-1);
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: .03em;
}

input.i,
select.i,
textarea.i {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface-2);
  min-height: var(--tap);
  color: var(--text);
}

textarea.i {
  min-height: 90px;
  resize: vertical;
}

input.i:focus,
select.i:focus,
textarea.i:focus {
  outline: 2px solid var(--gold-line);
  border-color: var(--gold);
  outline-offset: 1px;
}

.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.two>div {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
}

/* Badges, stats & hero panel */
.badge {
  display: inline-block;
  font-size: var(--t-xs);
  font-weight: 600;
  border-radius: var(--r-pill);
  padding: 2px 9px;
  background: var(--surface-3);
  color: var(--text-2);
  white-space: nowrap;
  letter-spacing: .02em;
}

.badge.ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.badge.warn {
  background: var(--warn-bg);
  color: var(--warn);
}

.badge.bad {
  background: var(--bad-bg);
  color: var(--bad);
}

.badge.blue {
  background: var(--info-bg);
  color: var(--info);
}

.badge.tm {
  background: var(--info-bg);
  color: var(--info);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex: none;
  background: var(--ok);
}

.dot.brk {
  background: var(--gold);
}

.dot.bad {
  background: var(--bad);
}

.dot.idle {
  background: var(--text-3);
}

.t-bad {
  color: var(--bad);
}

.t-ok {
  color: var(--ok);
}

.t-warn {
  color: var(--warn);
}

.i.search {
  margin-bottom: var(--s-3);
}

.chips.filt {
  margin-bottom: var(--s-4);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-3);
  margin-bottom: var(--s-5);
}

.stats.s4 {
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-2);
}

.stats.s2 {
  grid-template-columns: 1fr 1fr;
}

/* Stat tiles (statBox in core.js): a thin uppercase label over one calm number */
.stat {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: var(--s-4) var(--s-3);
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.stat .lbl {
  font-size: var(--t-2xs);
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat b {
  font-size: var(--t-3xl);
  line-height: 1.05;
  font-weight: 300;
  color: var(--text);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.stats.s4 .stat {
  padding: var(--s-3) var(--s-2);
}

.stats.s4 .stat b {
  font-size: clamp(13px, 3.9vw, 20px);
  font-weight: 400;
}

a.stat:active,
a.tile:active {
  background: var(--surface-2);
}

/* Tiles: the Home language — a quiet surface, no outline; gold is kept for the icons */
.stat,
.tile {
  background: var(--surface);
  border-radius: var(--r-lg);
}

/* Home greeting: the date as a small gold eyebrow, one light line under it */
.greet {
  margin: var(--s-2) var(--s-1) var(--s-6);
}

.greet .eyebrow {
  font-size: var(--t-2xs);
  color: var(--gold);
  letter-spacing: .16em;
  text-transform: uppercase;
}

.greet h2 {
  margin: var(--s-2) 0 0;
  font-size: var(--t-2xl);
  font-weight: 300;
  letter-spacing: .01em;
}

/* Home quick actions: equal square tiles, 3 across (gold line icon, label, an optional small note) */
.qa {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-3);
  margin-bottom: var(--s-5);
}

.qa a {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: var(--s-2);
  color: var(--text);
  font-size: var(--t-sm);
  font-weight: 500;
  letter-spacing: .01em;
  text-align: center;
  text-decoration: none;
}

.qa a .ico {
  width: 26px;
  height: 26px;
  color: var(--gold);
  stroke-width: 1.4;
}

.qa a small {
  font-size: var(--t-2xs);
  color: var(--text-3);
  margin-top: -4px;
}

.qa a small:empty {
  display: none;
}

.qa a.warn small {
  color: var(--warn);
}

@media (min-width: 700px) {
  .qa {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* Home: the one slim "needs a look" line (opens #/alerts) */
.alertline {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-height: var(--h-md);
  padding: var(--s-2) var(--s-4);
  margin: calc(-1 * var(--s-2)) 0 var(--s-5);
  border-radius: var(--r-lg);
  background: var(--warn-bg);
  color: var(--text);
  font-size: var(--t-sm);
  font-weight: 500;
  text-decoration: none;
}

.alertline .ico,
.alertline .chev {
  color: var(--warn);
}

.hero {
  border-radius: var(--r-xl);
  padding: var(--s-5);
  color: var(--text);
  background: var(--hero-bg);
  margin-bottom: var(--s-3);
  border: 1px solid var(--gold-line);
}

.hero.on {
  background: var(--hero-on-bg);
  border-color: var(--ok-line);
}

.hero.brk {
  background: var(--hero-break-bg);
  border-color: var(--warn-line);
}

.hero .big:not(.btn) { /* the big line of text; a .btn.big in the hero keeps the button's own look */
  font-size: var(--t-3xl);
  font-weight: 600;
  margin: 4px 0;
  color: var(--gold-hi);
  letter-spacing: .01em;
}

.hero .muted {
  color: var(--text-2);
}

.hero.on .muted {
  color: var(--text-2);
}

/* CrossChex send status on a shift (Clock, My hours, the shift sheet, the factory tablet) */
.ccst {
  display: inline-block;
  margin-top: var(--s-2);
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--text-2);
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
}

.ccst.ok {
  color: var(--ok);
  background: var(--ok-bg);
  border-color: var(--ok-line);
}

.ccst.warn {
  color: var(--warn);
  background: var(--warn-bg);
  border-color: var(--warn-line);
}

/* Tasks, chips & segmented controls */
.task {
  border-left: 3px solid var(--ok);
}

.tacts {
  display: flex;
  gap: var(--s-2);
  margin-top: var(--s-3);
}

.tnote {
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: 6px 9px;
  margin-top: var(--s-1);
}

.task.red {
  border-left-color: var(--bad);
}

.task.amber {
  border-left-color: var(--warn);
}

.task.done {
  opacity: .6;
}

.task .t {
  font-weight: 700;
}

.tick {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: var(--surface-2);
  font-size: var(--t-lg);
  flex: none;
  cursor: pointer;
}

.tick.on {
  background: var(--ok-solid);
  border-color: var(--ok-solid);
  color: var(--on-solid);
}

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

.chip {
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  border-radius: var(--r-pill);
  padding: 8px 13px;
  cursor: pointer;
  font-size: var(--t-md);
  color: var(--text);
}

.chip.on {
  background: var(--gold-soft);
  color: var(--gold);
  border-color: var(--gold-line);
}

.seg {
  display: flex;
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: 3px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
}

.seg button {
  flex: 1;
  border: 0;
  background: none;
  padding: 9px 4px;
  border-radius: var(--r-sm);
  font-weight: 600;
  color: var(--text-2);
  font-size: var(--t-md);
}

.seg button.on {
  background: var(--surface-3);
  color: var(--gold);
  box-shadow: inset 0 0 0 1px var(--gold-line);
}

.pnav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.pnav .grow {
  text-align: center;
  font-weight: 700;
}

/* Chat */
.chat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 84px;
}

.msg {
  max-width: 82%;
  padding: 8px 11px;
  border-radius: var(--r-lg);
  background: var(--surface-2);
  border: 1px solid var(--line);
  align-self: flex-start;
  word-wrap: break-word;
  white-space: pre-wrap;
  position: relative;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.msg.me {
  align-self: flex-end;
  background: var(--gold-soft);
  border-color: var(--gold-line);
}

.msg .who {
  font-size: var(--t-xs);
  font-weight: 700;
  color: var(--gold);
}

.msg .when {
  font-size: var(--t-2xs);
  color: var(--text-2);
  text-align: right;
}

.msg img {
  max-width: 100%;
  border-radius: var(--r-sm);
  display: block;
  margin-top: 4px;
}

.composer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(58px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 8px;
  display: flex;
  gap: 8px;
  z-index: 55;
}

.composer textarea {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  resize: none;
  background: var(--surface-2);
  color: var(--text);
}

.composer .btn {
  min-height: 44px;
  padding: 0 14px;
}

/* Tables, toasts & sheets */
table.t {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--t-md);
}

table.t th,
table.t td {
  padding: 7px 5px;
  border-top: 1px solid var(--gold-line);
  text-align: left;
}

table.t th {
  font-size: var(--t-xs);
  color: var(--text-3);
  font-weight: 600;
  letter-spacing: .03em;
}

table.t td.n,
table.t th.n {
  text-align: right;
}

table.t tr.off td {
  color: var(--text-3);
}

.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(90px + env(safe-area-inset-bottom));
  background: var(--surface-3);
  color: var(--text);
  padding: 11px 16px;
  border-radius: var(--r-md);
  z-index: 10300;
  max-width: 90%;
  font-size: var(--t-md);
  box-shadow: var(--shadow-2);
  border: 1px solid var(--gold-line);
}

.toast.bad {
  background: var(--bad-solid);
  color: var(--on-solid);
  border-color: var(--bad-solid);
}

.modal .sheet h2 {
  margin: 0 0 8px;
  font-size: var(--t-lg);
  color: var(--gold);
  font-weight: 600;
}

/* Maps & routes */
#map,
.map {
  height: 340px;
  border-radius: var(--r-lg);
  border: 1px solid var(--gold-line);
  margin-bottom: 12px;
  z-index: 1;
}

.leaflet-container,
#map,
.map,
[id$="map"].leaflet-container {
  position: relative;
  z-index: 0;
  isolation: isolate;
}

.stop {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.stop .num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--on-gold);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.stop.delivered .num {
  background: var(--ok-solid);
  color: var(--on-solid);
}

.stop.failed .num {
  background: var(--bad-solid);
  color: var(--on-solid);
}

.help {
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
  border-radius: var(--r-md);
  padding: 12px;
  font-size: var(--t-md);
}

.warnbox {
  background: var(--warn-bg);
  border: 1px solid var(--warn);
  border-radius: var(--r-md);
  padding: 12px;
  font-size: var(--t-md);
}

.qr svg {
  width: 100%;
  max-width: 260px;
  height: auto;
  display: block;
  margin: 8px auto;
}

.scan {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 10px auto;
  border: 4px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  animation: pulse 1.4s infinite;
}

@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(201, 164, 92, .6)}70%{box-shadow:0 0 0 22px rgba(201, 164, 92, 0)}100%{box-shadow:0 0 0 0 rgba(201, 164, 92, 0)} }

/* Sign-in */
.login {
  max-width: 420px;
  margin: 0 auto;
  padding: var(--s-8) var(--s-5);
}

.login .logo {
  width: 64px;
  height: 64px;
  border-radius: var(--r-xl);
  background: var(--gold-grad);
  color: var(--on-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--t-3xl);
  margin: 0 auto 10px;
  box-shadow: 0 6px 24px rgba(201, 164, 92, .25);
}

.center {
  text-align: center;
}

.empty {
  text-align: center;
  color: var(--text-2);
  padding: 24px 8px;
}

@media print {
  header.top,
  nav.tabs,
  .noprint {
    display: none!important;
  }
  body {
    padding: 0;
    background: #fff;
  }
  .card {
    box-shadow: none;
    border: 0;
  }
}

@media(min-width:760px) {
  body {
    padding-bottom: 90px;
  }
}

/* Chat extras */
.typing {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(58px + 60px + env(safe-area-inset-bottom));
  padding: 6px 14px 4px;
  font-size: var(--t-sm);
  color: var(--text-3);
  z-index: 54;
  background: linear-gradient(rgba(11, 11, 13, 0), var(--bg) 45%);
  font-style: italic;
}

.typing .dots {
  display: inline-flex;
  gap: 3px;
  vertical-align: middle;
  margin-right: 4px;
}

.typing .dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-3);
  animation: tdot 1.2s infinite;
}

.typing .dots i:nth-child(2) {
  animation-delay: .2s;
}

.typing .dots i:nth-child(3) {
  animation-delay: .4s;
}

@keyframes tdot { 0%,60%,100%{opacity:.3;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)} }

.msg.adm:not(.me) {
  border-color: var(--info-line);
  background: var(--info-bg);
}

.chip.own {
  background: var(--gold-soft);
  color: var(--gold);
  border-color: var(--gold-line);
}

/* Overflow guards & photos */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

img,
video,
canvas,
iframe {
  max-width: 100%;
}

img {
  height: auto;
}

.card {
  min-width: 0;
  max-width: 100%;
}

#view {
  min-width: 0;
  max-width: min(100%, 1100px);
}

.grow {
  flex: 1;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
}

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

a.thumb {
  display: inline-block;
  width: 84px;
  height: 84px;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface-3);
  flex: none;
  vertical-align: top;
  line-height: 0;
}

a.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin: 0;
  border-radius: 0;
}

.msg a.thumb {
  width: auto;
  height: auto;
  max-width: 220px;
  margin-top: 4px;
}

.msg a.thumb img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 220px;
  object-fit: cover;
}

.small a.thumb,
.task a.thumb {
  margin-top: 4px;
}

.ppv {
  display: block;
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: var(--r-sm);
  margin: 4px 0 6px;
}

.modal {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 10100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
}

.modal .sheet {
  background: var(--surface);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  overflow: auto;
  position: relative;
  width: 100%;
  max-width: min(640px,100vw);
  box-sizing: border-box;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  color: var(--text);
  border-top: 1px solid var(--gold-line);
}

/* Photo viewer */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 10400;
  background: rgba(0,0,0,.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}

.viewer img {
  max-width: 100vw;
  max-height: 100vh;
  max-height: 100dvh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.viewer .vx {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, .16);
  color: var(--text);
  font-size: var(--t-xl);
  line-height: 44px;
  z-index: 2;
}

details.past summary {
  cursor: pointer;
  list-style: revert;
  padding: 2px 0;
}

details.past .list {
  margin-top: 8px;
}

.list li.rt {
  border-left: 5px solid var(--bad);
  padding-left: 10px;
  border-radius: var(--r-xs);
}

.list li.rt.done {
  border-left-color: var(--ok);
}

.rule {
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.rule:first-of-type {
  border-top: 0;
}

.days7 {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 6px;
  margin: 8px 0;
}

.days7 .i {
  padding: 6px 4px;
  min-height: 38px;
}

.hero .steps {
  list-style: none;
  padding: 0;
  margin: 8px 0 4px;
  font-size: var(--t-md);
}

.hero .steps li {
  padding: 3px 0;
  opacity: .9;
}

.hero .steps li.done {
  opacity: 1;
  font-weight: 600;
}

.hero .pill {
  display: inline-block;
  background: rgba(255,255,255,.2);
  border-radius: var(--r-xl);
  padding: 4px 12px;
  font-size: var(--t-md);
  margin: 4px 0;
  font-weight: 600;
}

.hero .refuse {
  background: var(--bad-bg);
  color: var(--bad);
  border-radius: var(--r-md);
  padding: 10px 12px;
  margin-top: 10px;
  font-size: var(--t-md);
  font-weight: 600;
  border: 1px solid var(--bad-line);
}

.list>li>.grow {
  flex: 1 1 120px;
  min-width: 120px;
}

.list>li>.grow.full {
  flex-basis: 100%;
}

.list>li>.acts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  flex-basis: 100%;
  min-width: 0;
}

.list>li>.acts>.btn {
  flex: 1 1 100px;
}

.list>li>select {
  min-width: 120px;
  flex: 1 1 140px;
  max-width: 100%;
}

.list .tiny .badge {
  white-space: nowrap;
}

.msg.cont {
  margin-top: -4px;
}

.msg .mmore {
  position: absolute;
  top: 2px;
  right: 2px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-size: var(--t-lg);
  line-height: 1;
  padding: 4px 6px;
  min-height: 0;
  cursor: pointer;
}

.msg:has(.mmore) {
  padding-right: 26px;
}

.msg.del,
.msg.del.adm {
  opacity: .55;
  background: var(--surface);
  border-style: dashed;
  border-color: var(--line-strong);
  color: var(--text-3);
}

.msg .delby {
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--text-3);
  margin-top: 3px;
}

table.t.hrs {
  font-size: var(--t-sm);
}

table.t.hrs th,
table.t.hrs td {
  padding: 7px 3px;
}

table.t.hrs td.n,
table.t.hrs th.n {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

table.t.hrs td.nm {
  overflow-wrap: anywhere;
  word-break: break-word;
}

table.t.hrs td.nm .badge {
  white-space: normal;
}

table.t.hrs tr.zhead td {
  color: var(--text-2);
  font-weight: 600;
  cursor: pointer;
  padding-top: 10px;
}

@media (max-width:380px) {
  table.t.hrs {
    font-size: var(--t-xs);
  }
  table.t.hrs th,
  table.t.hrs td {
    padding: 7px 2px;
  }
}

/* People picker */
.pkf {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  padding: 8px 10px;
  background: var(--surface-2);
  cursor: pointer;
  margin-bottom: 6px;
}

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

.pkph {
  color: var(--text-2);
  font-size: var(--t-md);
  flex: 1;
}

.pkarr {
  color: var(--text-2);
  font-size: var(--t-md);
}

.pkchips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pkc {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--gold-soft);
  color: var(--gold);
  border-radius: var(--r-pill);
  padding: 3px 4px 3px 10px;
  font-size: var(--t-sm);
  max-width: 100%;
}

.pkc button {
  border: 0;
  background: none;
  color: var(--gold);
  font-size: var(--t-base);
  line-height: 1;
  padding: 0 6px;
  cursor: pointer;
}

.pkc.more {
  padding-right: 10px;
  background: var(--surface-3);
  color: var(--text-2);
}

.pkn {
  font-size: var(--t-xs);
  color: var(--text-2);
  margin-top: 5px;
}

.modal .sheet.pksheet {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 0;
  height: calc(100dvh - 48px);
  max-height: calc(100dvh - 48px);
}

.pkhead {
  flex: none;
}

.pkhead .i {
  margin: 0 0 8px;
}

.pklist {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  margin: 0 -16px;
  padding: 0 16px;
}

.pksec {
  font-size: var(--t-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--gold);
  padding: 10px 0 4px;
}

.pkrow {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  font-size: var(--t-md);
}

.pkrow input {
  width: 22px;
  height: 22px;
  flex: none;
  accent-color: var(--gold);
  margin: 0;
}

.pknone {
  padding: 18px 0;
  text-align: center;
}

.pkfoot {
  flex: none;
  display: flex;
  gap: 8px;
  padding: 10px 0 calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.pkfoot .btn {
  flex: 1;
  padding-left: 6px;
  padding-right: 6px;
  white-space: nowrap;
  font-size: var(--t-md);
}

.pkfoot #pkall {
  flex: 1.5;
}

.hide {
  display: none!important;
}

/* Home: "Checklists today" (a whole-card link) */
.clcard {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  color: inherit;
  text-decoration: none;
}

.clcard>.ic {
  color: var(--gold);
  display: flex;
}

.clcard>.ic .ico {
  width: 26px;
  height: 26px;
}

.card.hcard {
  padding: 4px 14px 12px;
}

/* Hours list */
.hlist {
  display: flex;
  flex-direction: column;
}

.hrow {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

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

.hl1 {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  font-size: var(--t-base);
}

.hnm {
  min-width: 0;
  overflow-wrap: anywhere;
}

.hl2 {
  font-size: var(--t-sm);
  color: var(--text-2);
  margin-top: 4px;
  line-height: 1.6;
}

.hl2 span {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.hbank {
  display: inline-block;
  padding: 2px 0;
  font-weight: 600;
}

.hl3 {
  margin-top: 5px;
}

.hl3 .badge {
  white-space: normal;
}

.zhead {
  color: var(--text-2);
  font-weight: 600;
  cursor: pointer;
  padding: 14px 0 6px;
  border-bottom: 1px solid var(--line);
}

/* Export & pay period */
.xq {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 10px;
}

.xq .btn.on {
  background: var(--gold-soft);
  color: var(--gold);
  border-color: var(--gold-line);
}

.xdates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.xdates .i {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

#xgo.dis {
  opacity: .45;
}

.pstart {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 var(--s-4);
  font-size: var(--t-md);
}

.pstart label {
  font-weight: 600;
}

.pstart input.i {
  width: auto;
  flex: 0 1 170px;
  min-width: 0;
  padding: 6px 8px;
}


.pwarn {
  margin: 8px 0 12px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
}

/* Tablet */
.composer .tbrow2 {
  display: flex;
  gap: 8px;
  flex: 1;
  align-items: flex-end;
  min-width: 0;
}

.composer.tbcomp {
  flex-direction: column;
  gap: 8px;
}

.tbcomp .tbto {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tbcomp .tbl {
  font-weight: 700;
  margin-right: 2px;
}

.tbcomp .chip {
  font-size: var(--t-base);
  padding: 10px 16px;
  min-height: 44px;
}

.tbcomp .tbrow .i {
  width: 100%;
  min-height: 48px;
  font-size: var(--t-base);
}

.tbcomp textarea {
  font-size: var(--t-base);
  min-height: 52px;
}

.tbcomp .btn {
  min-height: 52px;
  padding: 0 22px;
  font-size: var(--t-base);
}

.tbcomp .btn:disabled {
  background: var(--surface-3);
  cursor: not-allowed;
  color: var(--text-3);
}

.tbhint {
  margin-top: -2px;
}

.chat.tbchat {
  padding-bottom: 250px;
}

.msg .tolin {
  font-size: var(--t-xs);
  color: var(--text-2);
  margin-top: 3px;
}

.msg .tolin b {
  color: var(--ok);
}

body.is-tablet .task .t {
  font-size: var(--t-xl);
}

.tbt .tbfor {
  font-size: var(--t-md);
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 4px;
}

.tbt .tbd {
  font-size: var(--t-base);
  margin: 6px 0;
  white-space: pre-wrap;
}

.tbt .btn.big {
  margin-top: 10px;
}

.tbt .tbdone {
  margin-top: 8px;
  font-weight: 700;
  color: var(--ok);
  font-size: var(--t-md);
}

.tbh {
  margin: 18px 4px 8px;
  color: var(--text-2);
  font-size: var(--t-md);
}

.tbempty {
  font-size: var(--t-lg);
  padding: 30px;
}

input.i.big {
  font-size: var(--t-xl);
  min-height: 54px;
}

@media (min-width:700px) {
  body.is-tablet #tabs a {
    font-size: var(--t-base);
  }
  body.is-tablet #tabs .i {
    font-size: var(--t-2xl);
  }
}

/* Ring alert */
body.is-tablet .sndbar {
  right: 12px;
  font-size: var(--t-base);
  min-height: 40px;
}

.ringov {
  position: fixed;
  inset: 0;
  z-index: 10200;
  background: rgba(18, 15, 9, .97);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: ringbg 1s ease-in-out infinite alternate;
}

@keyframes ringbg { from{background:rgba(18, 15, 9, .97)}to{background:rgba(42, 33, 16, .97)} }

.ringbox {
  width: 100%;
  max-width: 520px;
  text-align: center;
}

.ringic {
  font-size: 72px;
  animation: ringshake .5s ease-in-out infinite;
}

@keyframes ringshake { 0%,100%{transform:rotate(-12deg)}50%{transform:rotate(12deg)} }

.ringt {
  font-size: var(--t-xl);
  margin-top: 10px;
  line-height: 1.35;
}

.ringt b {
  font-size: var(--t-3xl);
}

.ringm {
  margin: 16px auto 0;
  background: var(--gold-soft);
  border-radius: var(--r-lg);
  padding: 12px 14px;
  font-size: var(--t-lg);
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 30vh;
  overflow: auto;
  border: 1px solid var(--gold-line);
}

.ringn {
  margin-top: 8px;
  opacity: .85;
}

.ringbtns {
  display: flex;
  gap: 14px;
  margin-top: 26px;
}

.ringbtns .btn {
  flex: 1;
  min-height: 64px;
  font-size: var(--t-xl);
  border-radius: var(--r-xl);
}

.btn.good {
  background: var(--ok-solid);
  color: var(--on-solid);
}

.ringbtns .btn.bad {
  background: var(--bad-solid);
  color: var(--on-solid);
}

/* Notifications */
.nx {
  border: 0;
  background: transparent;
  color: var(--text-3);
  font-size: var(--t-xl);
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
  margin: -8px -8px -8px 2px;
  cursor: pointer;
  border-radius: var(--r-sm);
  flex: none;
}

.nx:hover {
  background: var(--surface-3);
  color: var(--bad);
}

.nhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.badge.adm {
  background: var(--gold-soft);
  color: var(--gold);
}

/* Staff: bank & rates */
.bankbox {
  margin-top: 6px;
  padding: 8px 10px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.bankbox label.f {
  margin-top: 0;
}

.rwarn {
  margin-top: 10px;
  padding: 10px 12px;
  border: 2px solid var(--warn);
  background: var(--warn-bg);
  border-radius: var(--r-md);
}

.rwarn .btn {
  margin-top: 8px;
}

.hcash {
  font-weight: 700;
  color: var(--text);
}

.linkbtn {
  background: none;
  border: 0;
  color: var(--gold);
  text-decoration: underline;
  padding: 8px 0;
  margin: 2px 0 0;
  cursor: pointer;
  font: inherit;
}

.linkbtn.tiny {
  font-size: var(--t-md);
}

#newver {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 84px;
  z-index: 9999;
  background: var(--gold);
  color: var(--on-gold);
  border: 0;
  border-radius: var(--r-pill);
  padding: 12px 18px;
  font-size: var(--t-base);
  font-weight: 700;
  box-shadow: var(--shadow-2);
  cursor: pointer;
}

#ratefrom .chips {
  gap: 6px;
}

#ratefrom .chip {
  padding: 7px 11px;
  font-size: var(--t-md);
}

#srfbox {
  margin-top: 6px;
}

#srfh {
  margin-top: 6px;
}

.rnext {
  margin-top: 6px;
  padding: 6px 8px;
  background: var(--gold-soft);
  border-radius: var(--r-sm);
  color: var(--gold);
}

.ratehist {
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--surface-2);
  border-radius: var(--r-sm);
}

.ratehist ul {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
}

.ratehist li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: var(--t-md);
  padding: 3px 0;
  border-top: 1px solid var(--line);
}

.ratehist li:first-child {
  border-top: 0;
}

.ratehist .rhd {
  min-width: 118px;
  color: var(--text-2);
}

.ratehist .rhdel {
  padding: 2px 8px;
  margin: 0 0 0 auto;
  text-decoration: none;
  font-size: var(--t-base);
}

@media (max-width:600px) {
  .two.ratepair {
    grid-template-columns: 1fr;
  }
}
