/* Prosmash POS — tablet-first, high contrast, big touch targets. */

:root {
  --ink:        #0f172a;
  --ink-2:      #334155;
  --ink-3:      #64748b;
  --line:       #e2e8f0;
  --line-2:     #cbd5e1;
  --bg:         #f1f5f9;
  --surface:    #ffffff;
  --surface-2:  #f8fafc;

  --brand:      #0d9488;
  --brand-ink:  #0f766e;
  --brand-soft: #ccfbf1;
  --peak:       #b45309;
  --peak-soft:  #fef3c7;
  --paid:       #15803d;
  --paid-soft:  #dcfce7;
  --danger:     #b91c1c;
  --danger-soft:#fee2e2;

  --radius:     12px;
  --radius-sm:  8px;
  --shadow:     0 1px 2px rgba(15,23,42,.06), 0 8px 24px -12px rgba(15,23,42,.18);
  --tap:        44px;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

/* Class-based display rules must never beat the hidden attribute. */
[hidden] { display: none !important; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

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

/* ------------------------------------------------------------------ login */

.login {
  display: grid;
  place-items: center;
  min-height: 100%;
  background: linear-gradient(160deg, #0f172a, #134e4a);
  padding: 24px;
}

.login__card {
  width: min(360px, 100%);
  background: var(--surface);
  border-radius: 18px;
  padding: 32px 28px;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.5);
  text-align: center;
}

.login__logo  { font-size: 40px; }
.login__title { margin: 8px 0 2px; font-size: 24px; letter-spacing: -.02em; }
.login__sub   { margin: 0 0 20px; color: var(--ink-3); }

.login__pin {
  width: 100%;
  height: 56px;
  border: 2px solid var(--line-2);
  border-radius: var(--radius);
  text-align: center;
  font-size: 28px;
  letter-spacing: .4em;
  text-indent: .4em;
}
.login__pin:focus { outline: none; border-color: var(--brand); }

.login__error {
  color: var(--danger);
  margin: 12px 0 0;
  font-size: 14px;
}

/* ----------------------------------------------------------------- layout */

.app { display: flex; flex-direction: column; height: 100%; }

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
  letter-spacing: -.01em;
}
.topbar__logo { font-size: 20px; }
.topbar__right { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }

.tabs { display: flex; gap: 4px; }

.tab {
  border: 0;
  background: transparent;
  color: #cbd5e1;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  min-height: var(--tap);
  cursor: pointer;
  font-weight: 550;
}
.tab:hover { background: rgba(255,255,255,.09); color: #fff; }
.tab[aria-selected="true"] { background: var(--brand); color: #fff; }

.datenav {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,.1);
  border-radius: var(--radius-sm);
  padding: 3px;
}
.datenav__input {
  background: transparent;
  border: 0;
  color: #fff;
  padding: 6px;
  border-radius: 6px;
}
.datenav__input::-webkit-calendar-picker-indicator { filter: invert(1); opacity: .7; }

.conn {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #64748b;
  transition: background .3s;
}
.conn[data-live="1"] { background: #4ade80; }

.main {
  display: flex;
  flex: 1;
  min-height: 0;
}

.view {
  flex: 1;
  min-width: 0;
  overflow: auto;
  padding: 16px;
}

.cart {
  width: 340px;
  flex: none;
  border-left: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ------------------------------------------------------------------ notices */

.notices:empty { display: none; }

.notice {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 9px 16px;
  background: var(--peak-soft);
  color: var(--peak);
  border-bottom: 1px solid #fcd34d;
  font-size: 14px;
  font-weight: 550;
}
.notice--bad { background: var(--danger-soft); color: var(--danger); border-bottom-color: #fca5a5; }
.notice__dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

/* The mirror shows the numbers but offers none of the actions behind them. */
body[data-mode="mirror"] .cart,
body[data-mode="mirror"] .cart-fab { display: none !important; }

body[data-mode="mirror"] .grid__cell { cursor: default; }
body[data-mode="mirror"] .grid__cell:hover::after { content: none; }
body[data-mode="mirror"] .tab-card { cursor: default; }
body[data-mode="mirror"] .tab-card:hover { border-color: var(--line-2); box-shadow: none; }

/* ---------------------------------------------------------------- controls */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--tap);
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-weight: 550;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover:not(:disabled) { border-color: var(--ink-3); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn--primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn--primary:hover:not(:disabled) { background: var(--brand-ink); border-color: var(--brand-ink); }
.btn--danger  { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn--ghost   { background: transparent; border-color: transparent; color: inherit; }
.btn--ghost:hover:not(:disabled) { background: rgba(148,163,184,.2); border-color: transparent; }
.btn--icon    { min-width: var(--tap); padding: 0 10px; background: transparent; border-color: transparent; color: inherit; font-size: 20px; }
.btn--icon:hover { background: rgba(148,163,184,.2); }
.btn--block   { width: 100%; }
.btn--sm      { min-height: 34px; padding: 0 10px; font-size: 14px; }

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field > label { font-size: 13px; font-weight: 600; color: var(--ink-2); }

.input, .select {
  min-height: var(--tap);
  padding: 8px 11px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  width: 100%;
}
.input:focus, .select:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: var(--brand); }

.segment { display: flex; gap: 6px; flex-wrap: wrap; }
.segment button {
  flex: 1 1 auto;
  min-height: var(--tap);
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  font-weight: 600;
}
.segment button[aria-pressed="true"] {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-ink);
}

/* ------------------------------------------------------------------ panels */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  overflow: hidden;
}

.panel__head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.panel__title { margin: 0; font-size: 15px; font-weight: 650; }
.panel__body { padding: 16px; }
.panel__spacer { margin-left: auto; }

.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.num   { font-variant-numeric: tabular-nums; font-family: var(--mono); }

.empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--ink-3);
}

/* ---------------------------------------------------------------- calendar */

.grid-wrap {
  overflow: auto;
  /* Own both scroll axes so the time column and header row can stay stuck. */
  max-height: calc(100dvh - 152px);
}

.grid {
  display: grid;
  min-width: max-content;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.grid__head {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--surface-2);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line-2);
  padding: 9px 8px;
  text-align: center;
  font-weight: 650;
  font-size: 14px;
}
.grid__head--time { left: 0; z-index: 4; }
.grid__head small { display: block; font-weight: 400; color: var(--ink-3); }

.grid__time {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--surface-2);
  border-right: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line);
  padding: 2px 8px;
  font-size: 12px;
  color: var(--ink-3);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.grid__time--peak { background: var(--peak-soft); color: var(--peak); font-weight: 600; }

.grid__cell {
  position: relative;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  min-width: 130px;
}
.grid__cell:hover::after {
  content: "+";
  position: absolute;
  inset: 2px;
  display: grid;
  place-items: center;
  border: 2px dashed var(--brand);
  border-radius: var(--radius-sm);
  color: var(--brand);
  font-size: 20px;
  font-weight: 700;
  background: var(--brand-soft);
  opacity: .55;
}
.grid__cell--peak { background: #fffbeb; }
.grid__cell--closed { background: repeating-linear-gradient(45deg, #f8fafc, #f8fafc 6px, #eef2f7 6px, #eef2f7 12px); cursor: not-allowed; }
.grid__cell--closed:hover::after { content: none; }

.booking {
  position: relative;
  z-index: 1;
  margin: 2px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--brand);
  border-left: 4px solid var(--brand);
  background: var(--brand-soft);
  color: var(--brand-ink);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  font-size: 13px;
}
.booking:hover { filter: brightness(.97); }
.booking--paid { border-color: var(--paid); border-left-color: var(--paid); background: var(--paid-soft); color: var(--paid); }
.booking__name { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.booking__meta { font-size: 11px; opacity: .85; font-variant-numeric: tabular-nums; }
.booking__tag  {
  align-self: flex-start;
  margin-top: auto;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255,255,255,.75);
}

.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* -------------------------------------------------------------------- till */

.cat-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }

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

.product {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 84px;
  padding: 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}
.product:hover { border-color: var(--brand); background: var(--brand-soft); }
.product:active { transform: scale(.98); }
.product__name { font-weight: 600; line-height: 1.25; }
.product__price { margin-top: auto; font-variant-numeric: tabular-nums; color: var(--brand-ink); font-weight: 650; }
.product__sku { font-size: 11px; color: var(--ink-3); font-family: var(--mono); }

/* -------------------------------------------------------------------- cart */

.cart__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.cart__title { margin: 0; font-size: 15px; font-weight: 650; }
.cart__count {
  background: var(--brand);
  color: #fff;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 12px;
  font-weight: 700;
}
.cart__items { flex: 1; overflow: auto; padding: 8px; }

.line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  margin-bottom: 8px;
  background: var(--surface-2);
}
.line__name { font-weight: 600; }
.line__meta { grid-column: 1; font-size: 12px; color: var(--ink-3); }
.line__price { grid-row: 1; grid-column: 2; font-variant-numeric: tabular-nums; font-weight: 650; }
.line__qty { grid-column: 2; display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.line__qty button {
  width: 30px; height: 30px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
}

.cart__foot { border-top: 1px solid var(--line); padding: 14px 16px; background: var(--surface-2); }

.totals { margin-bottom: 12px; }
.totals__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
  font-variant-numeric: tabular-nums;
}
.totals__row--grand {
  font-size: 20px;
  font-weight: 700;
  border-top: 1px solid var(--line-2);
  margin-top: 6px;
  padding-top: 8px;
}

/* ----------------------------------------------------------- player picker */

.picker__search { display: flex; gap: 8px; margin-bottom: 10px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px 6px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-ink);
  border: 1px solid var(--brand);
  font-weight: 600;
  font-size: 14px;
}
.chip button {
  width: 22px; height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.7);
  color: inherit;
  cursor: pointer;
  line-height: 1;
  font-size: 12px;
}
.chip--ghost { background: transparent; border-style: dashed; border-color: var(--line-2); color: var(--ink-3); font-weight: 400; padding-right: 12px; }
.chip--full  { background: var(--surface-2); border-color: var(--line-2); color: var(--ink-3); font-weight: 400; padding-right: 12px; }

.results {
  max-height: 210px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.results:empty { display: none; }

.result {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: var(--tap);
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}
.result:last-child { border-bottom: 0; }
.result:hover { background: var(--brand-soft); }
.result__name { font-weight: 600; }
.result__meta { color: var(--ink-3); font-size: 13px; }
.result .badge { margin-left: auto; }

.split {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: var(--surface-2);
}
.split__head {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  flex-wrap: wrap;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

/* -------------------------------------------------------------------- tabs */

.tab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.tab-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}
.tab-card:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.tab-card__name { font-weight: 650; font-size: 16px; }
.tab-card__meta { font-size: 13px; color: var(--ink-3); }
.tab-card__total {
  margin-top: 4px;
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--brand-ink);
}

.player-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.player-row:last-child { border-bottom: 0; }
.player-row__name { font-weight: 600; }
.player-row__share { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 650; }

/* ------------------------------------------------------------ status checks */

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.check:last-of-type { border-bottom: 0; }

.check__mark {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.check--ok   .check__mark { background: var(--paid); }
.check--warn .check__mark { background: var(--peak); }
.check--bad  .check__mark { background: var(--danger); }

/* ------------------------------------------------------------------ tables */

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.table th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); background: var(--surface-2); }
.table td.r, .table th.r { text-align: right; font-variant-numeric: tabular-nums; }
.table tbody tr:last-child td { border-bottom: 0; }
.table--rows tbody tr:hover { background: var(--surface-2); }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  background: var(--line);
  color: var(--ink-2);
}
.badge--cash { background: var(--brand-soft); color: var(--brand-ink); }
.badge--card { background: #e0e7ff; color: #3730a3; }
.badge--void { background: var(--danger-soft); color: var(--danger); }
.badge--peak { background: var(--peak-soft); color: var(--peak); }

/* ------------------------------------------------------------------ report */

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}
.stat {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.stat__label { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.stat__value { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat--grand { background: var(--ink); color: #fff; border-color: var(--ink); }
.stat--grand .stat__label { color: #94a3b8; }

/* ------------------------------------------------------------------ modals */

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15,23,42,.5);
}
.modal-root[hidden] { display: none; }

.modal {
  width: min(520px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,.5);
}
.modal--wide { width: min(760px, 100%); }
.modal__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.modal__title { margin: 0; font-size: 17px; font-weight: 650; }
.modal__body { padding: 20px; }
.modal__foot {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

/* ------------------------------------------------------------------ toasts */

.toasts {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  font-weight: 550;
  animation: rise .18s ease-out;
}
.toast--error { background: var(--danger); }
.toast--ok    { background: var(--paid); }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ------------------------------------------------------------ narrow / iPad */

/* Wide screens keep the cart permanently docked; the button is only for narrow ones. */
.cart-fab { display: none; }
.cart__close { display: none; }

@media (max-width: 1000px) {
  .cart {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(380px, 92vw);
    z-index: 40;
    box-shadow: -12px 0 40px -20px rgba(0,0,0,.4);
  }
  .cart { display: none; }
  body[data-cart-open="1"] .cart { display: flex; }
  body[data-cart-open="1"] .cart-fab { display: none; }
  .cart__close { display: inline-flex; }

  .cart-fab {
    display: flex;
    align-items: center;
    gap: 8px;
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 45;
    min-height: 52px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-weight: 650;
    box-shadow: 0 10px 30px -8px rgba(13,148,136,.6);
    cursor: pointer;
  }
  .cart-fab[hidden] { display: none !important; }
  .cart-fab__count {
    background: rgba(255,255,255,.25);
    border-radius: 999px;
    padding: 1px 9px;
    font-size: 13px;
  }
  .cart-fab__total { font-variant-numeric: tabular-nums; }
}

@media (max-width: 720px) {
  .topbar { gap: 10px; }
  .tabs { order: 3; width: 100%; overflow-x: auto; }
  .topbar__right { width: 100%; }
}

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

/* ------------------------------------------------- sign-in with Google */

.login__or {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0 12px;
  color: #64748b; font-size: 13px;
}
.login__or::before, .login__or::after {
  content: ''; flex: 1; height: 1px; background: rgba(255,255,255,.18);
}
.btn--google {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: #fff; border-color: #fff; color: #1f2937;
  text-decoration: none; font-weight: 600;
}
.btn--google:hover { background: #f1f5f9; }
.login__hint {
  margin: 14px 0 0;
  color: #94a3b8; font-size: 12.5px; line-height: 1.5; text-align: center;
}

/* --------------------------------------------------- who is signed in */

.whoami {
  max-width: 150px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 12.5px; font-weight: 600;
}
.whoami[data-role="admin"] {
  background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink);
}

.tab__badge {
  display: inline-grid; place-items: center;
  min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px;
  border-radius: 999px;
  background: var(--danger); color: #fff;
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------- request queue */

.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2);
       border: 1px solid var(--line); border-radius: 999px; flex-wrap: wrap; }
.seg__btn {
  border: 0; background: transparent; cursor: pointer;
  padding: 6px 14px; border-radius: 999px;
  color: var(--ink-3); font-size: 13px; font-weight: 600;
}
.seg__btn.is-on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

.reqlist { display: grid; gap: 10px; margin-top: 4px; }

.req {
  display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--surface);
}
.req--pending  { border-left-color: var(--peak); background: #fffdf7; }
.req--approved { border-left-color: var(--paid); }
.req--declined { border-left-color: var(--line-2); opacity: .72; }

.req__main { flex: 1 1 240px; display: grid; gap: 3px; }
.req__top { display: flex; align-items: center; gap: 8px; }
.req__when { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.req__who { font-weight: 600; }
.req__contact, .req__note { color: var(--ink-3); }
.req__actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.pill {
  padding: 2px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
}
.pill--pending  { background: var(--peak-soft); color: var(--peak); }
.pill--approved { background: var(--paid-soft); color: var(--paid); }
.pill--declined { background: var(--line); color: var(--ink-3); }

.btn--danger-ghost { color: var(--danger); border-color: var(--line-2); background: #fff; }
.btn--danger-ghost:hover { background: var(--danger-soft); border-color: var(--danger); }

.stack { display: grid; gap: 12px; }

/* ---------------------------------------------------- admin: staff list */

.userlist { display: grid; gap: 8px; }
.userrow {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface);
}
.userrow--off { opacity: .6; }
.userrow__who { flex: 1 1 200px; display: grid; gap: 1px; min-width: 0; }
.userrow__email {
  font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.syncbox {
  display: grid; gap: 6px;
  padding: 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 14px;
}
.syncbox__state { font-weight: 600; }
.syncbox__state[data-ok="0"] { color: var(--danger); }
.syncbox__state[data-ok="1"] { color: var(--paid); }

.importlist {
  max-height: 320px; overflow-y: auto;
  display: grid; gap: 4px;
  font-size: 13px;
}
.importlist__row {
  display: flex; gap: 8px; justify-content: space-between;
  padding: 6px 8px; border-radius: 6px; background: var(--surface-2);
}
.importlist__row--skip { background: var(--danger-soft); color: var(--danger); }
