/*
 * efr-pay — elbflorace internal payment tracker.
 * 60% black / 30% white / 10% orange, pure grays without blue tint.
 */

/* ─── DESIGN TOKENS ─────────────────────────────────────── */
:root {
  /* Surfaces — pure black/gray, no blue tint */
  --bg:   #0a0a0a;
  --s1:   #111111;   /* sidebar */
  --s2:   #161616;   /* card */
  --s3:   #1c1c1c;   /* elevated / hover */
  --s4:   #222222;   /* input, deepest */

  /* Borders */
  --b1: rgba(255,255,255,0.06);
  --b2: rgba(255,255,255,0.09);
  --b3: rgba(255,255,255,0.15);

  /* Text — pure grays, no blue tint */
  --t1: #f0f0f0;
  --t2: #888888;
  --t3: #505050;

  /* Accent */
  --orange:     #ff630f;
  --orange-dim: #c44e0b;
  --orange-bg:  rgba(255,99,15,0.08);
  --orange-glow:rgba(255,99,15,0.18);

  /* Semantic */
  --danger: #ef4444;
  --ok:     #22c55e;
  --info:   #3b82f6;
  --warn:   #f59e0b;
  --purple: #8b5cf6;

  /* Layout */
  --sidebar-w: 224px;

  /* Radii */
  --r-xs: 4px;
  --r-sm: 6px;
  --r:    10px;
  --r-lg: 14px;

  /* Shadows */
  --sh1: 0 1px 3px rgba(0,0,0,.4);
  --sh2: 0 4px 16px rgba(0,0,0,.5);
  --sh3: 0 10px 36px rgba(0,0,0,.6);

  /* Legacy compat — existing pages use these names inline */
  --black:        #0a0a0a;
  --black-soft:   #111111;
  --black-card:   #161616;
  --white:        #f0f0f0;
  --white-dim:    #c8c8c8;
  --white-faint:  #888888;
  --efr-orange:   #ff630f;
  --radius:       10px;
  --gap:          1rem;
  --maxw:         1400px;
}

/* ─── RESET ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--t1);
  font-family: "Inter", "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--t1);
  line-height: 1.2;
}
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
h4 { font-size: 0.875rem; }

/* ─── APP SHELL ──────────────────────────────────────────── */
.app-shell {
  display: flex;
  min-height: 100vh;
}
#sidebar-root {
  width: var(--sidebar-w);
  flex-shrink: 0;
}
.app-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.content {
  flex: 1;
  padding: 2rem 2.25rem;
  max-width: 1400px;
  width: 100%;
}

/* ─── SIDEBAR ────────────────────────────────────────────── */
.topbar-mobile { display: none; }
.sidebar-overlay { display: none; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--s1);
  border-right: 1px solid var(--b1);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}
.sb-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1.25rem 1rem 1rem;
  border-bottom: 1px solid var(--b1);
  flex-shrink: 0;
}
.sb-brand img { height: 26px; width: auto; }
.sb-brand-text { display: flex; flex-direction: column; }
.sb-brand-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--t1);
  letter-spacing: -0.01em;
}
.sb-brand-title span { color: var(--orange); }
.sb-brand-sub {
  font-size: 0.7rem;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.sb-section {
  padding: 1rem 0.75rem 0.25rem;
}
.sb-section.grow { flex: 1; }
.sb-section-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--t3);
  padding: 0 0.5rem;
  margin-bottom: 0.35rem;
  margin-top: 0.75rem;
}
.sb-section-label:first-child { margin-top: 0; }
.sb-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--r-sm);
  color: var(--t2);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: background 0.12s, color 0.12s;
  position: relative;
}
.sb-item:hover { background: rgba(255,255,255,0.04); color: var(--t1); }
.sb-item.active {
  background: var(--orange-bg);
  color: var(--orange);
}
.sb-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 60%;
  width: 2px;
  background: var(--orange);
  border-radius: 0 2px 2px 0;
}
.sb-item svg { flex-shrink: 0; opacity: 0.8; }
.sb-item.active svg { opacity: 1; }
.sb-footer {
  padding: 0.75rem;
  border-top: 1px solid var(--b1);
  flex-shrink: 0;
}
.sb-user-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.5rem;
  margin-bottom: 0.4rem;
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
  transition: background 0.15s;
}
a.sb-user-pill:hover { background: var(--s3); }
.sb-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--orange-bg);
  border: 1px solid var(--orange-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--orange);
  flex-shrink: 0;
}
.sb-user-info { min-width: 0; flex: 1; }
.sb-user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--t1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sb-user-email {
  font-size: 0.7rem;
  color: var(--t3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sb-user-balance {
  font-size: 0.7rem;
  color: var(--orange);
  font-weight: 600;
  margin-top: 0.1rem;
}

/* ─── PAGE HEADER ────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.page-header h1 { line-height: 1; }
.page-header .sub {
  color: var(--t2);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

/* ─── CARDS ──────────────────────────────────────────────── */
.card {
  background: var(--s2);
  border: 1px solid var(--b1);
  border-radius: var(--r);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  transition: border-color 0.15s;
}
.card:last-child { margin-bottom: 0; }
.card h2 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.card h3 { font-size: 0.95rem; }
.card-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--t2);
  margin-bottom: 1rem;
}

/* ─── BALANCE HERO (user dashboard) ──────────────────────── */
.balance-hero {
  text-align: center;
  padding: 2.25rem 1rem;
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, rgba(255,99,15,0.06) 0%, transparent 70%),
    var(--s2);
}
.balance-hero .label {
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 600;
}
.balance-hero .amount {
  color: var(--orange);
  font-size: 3.5rem;
  font-weight: 700;
  margin: 0.4rem 0;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.balance-hero .due {
  color: var(--t2);
  font-size: 0.95rem;
}
/* Two-number hero: "due now" (closed periods) + "this month" (accruing).
   Flex-wrap stacks the blocks on narrow screens. */
.balance-hero .hero-split {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 1rem 3rem;
  flex-wrap: wrap;
}
.balance-hero .hero-stat { flex: 0 1 auto; min-width: 150px; }
.balance-hero .hero-stat .amount { font-size: 2.75rem; }
.balance-hero .hero-stat .amount.neutral { color: var(--t1); }

/* Recurring vs one-off food-order tag (user + admin pages). */
.order-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--t2);
  background: var(--s3);
  border: 1px solid var(--b1);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  vertical-align: middle;
}
.order-type-badge.oneoff {
  color: var(--orange);
  background: var(--orange-bg);
  border-color: var(--orange-glow);
}

/* ─── TABLES ─────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--b1);
  font-size: 0.875rem;
}
th {
  color: var(--t3);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--s2);
}
td { color: var(--t2); }
td strong, td .t1 { color: var(--t1); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.015); }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }
th.center, td.center { text-align: center; }
td.amount { color: var(--orange); font-weight: 600; }

/* ─── BUTTONS ────────────────────────────────────────────── */
button, .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.12s, border-color 0.12s, box-shadow 0.12s, transform 0.08s;
  text-decoration: none;
  white-space: nowrap;
  background: var(--orange);
  color: #000;
  border-color: var(--orange);
  font-family: inherit;
}
button:hover, .btn:hover {
  background: var(--orange-dim);
  border-color: var(--orange-dim);
  box-shadow: 0 0 0 3px var(--orange-glow);
}
button:active, .btn:active { transform: scale(0.98); }
button.secondary, .btn.secondary {
  background: var(--s3);
  color: var(--t1);
  border-color: var(--b2);
}
button.secondary:hover, .btn.secondary:hover {
  background: var(--s4);
  border-color: var(--b3);
  box-shadow: none;
}
button.danger, .btn.danger {
  background: rgba(220,38,38,0.15);
  color: var(--danger);
  border-color: rgba(220,38,38,0.35);
}
button.danger:hover, .btn.danger:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.2);
}
button:disabled, .btn.disabled {
  background: var(--s3);
  color: var(--t3);
  border-color: var(--b1);
  cursor: not-allowed;
  box-shadow: none;
}
button:disabled:hover { transform: none; background: var(--s3); }

/* ─── FORMS & INPUTS ─────────────────────────────────────── */
label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--t2);
  margin-bottom: 0.35rem;
  letter-spacing: 0.02em;
}
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="url"], input[type="search"],
input[type="tel"], input[type="datetime-local"], select, textarea {
  width: 100%;
  background: var(--s4);
  color: var(--t1);
  border: 1px solid var(--b2);
  border-radius: var(--r-sm);
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-glow);
}
input::placeholder, textarea::placeholder { color: var(--t3); }
input:disabled { opacity: 0.5; cursor: not-allowed; }
textarea { resize: vertical; min-height: 80px; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}
input[type="search"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 0.75rem center;
  padding-left: 2.25rem;
}
input[type="checkbox"] {
  width: 1rem; height: 1rem; cursor: pointer;
  accent-color: var(--orange);
}
code {
  background: var(--s3);
  color: var(--t1);
  padding: 0.1rem 0.4rem;
  border-radius: var(--r-xs);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
}

/* ─── ALERTS ─────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  border-radius: var(--r-sm);
  margin-bottom: 1rem;
  font-size: 0.875rem;
  border: 1px solid transparent;
}
.alert:last-child { margin-bottom: 0; }
.alert.error  { background: rgba(220,38,38,0.1);  color: #fca5a5; border-color: rgba(220,38,38,0.3); }
.alert.ok     { background: rgba(22,163,74,0.1);  color: #86efac; border-color: rgba(22,163,74,0.3); }
.alert.info   { background: rgba(37,99,235,0.08); color: #93c5fd; border-color: rgba(37,99,235,0.25); }

/* ─── BADGES ─────────────────────────────────────────────── */
.badge-paid {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #86efac;
  background: rgba(22,163,74,0.14);
  border: 1px solid rgba(22,163,74,0.35);
  border-radius: 999px;
  vertical-align: middle;
  cursor: help;
}
.flag {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 600;
  border-radius: 999px;
  vertical-align: middle;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.flag.admin   { color: var(--orange); background: var(--orange-bg); border: 1px solid rgba(255,99,15,0.3); }
.flag.partial { color: var(--t2); background: var(--s3); border: 1px solid var(--b2); }

.badge-active   { background: var(--orange-bg); color: var(--orange); border: 1px solid rgba(255,99,15,0.3); padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.badge-inactive { background: var(--s3); color: var(--t2); border: 1px solid var(--b2); padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.7rem; font-weight: 600; }
.badge-past     { background: rgba(220,38,38,0.14); color: #fca5a5; border: 1px solid rgba(220,38,38,0.3); padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }

/* ─── PER-CATEGORY BARS ──────────────────────────────────── */
.cat-row { display: flex; align-items: center; gap: 0.75rem; margin: 0.5rem 0; }
.cat-row .name {
  width: 100px;
  color: var(--t2);
  text-transform: capitalize;
  font-size: 0.85rem;
  font-weight: 500;
}
.cat-row .bar  {
  flex: 1;
  height: 8px;
  background: var(--s3);
  border-radius: 4px;
  overflow: hidden;
}
.cat-row .bar > div {
  height: 100%;
  background: var(--orange);
  border-radius: 4px;
  transition: width 0.4s ease;
}
.cat-row .val  {
  width: 90px;
  text-align: right;
  color: var(--t1);
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  font-weight: 600;
}

/* ─── ROW ACTIONS ────────────────────────────────────────── */
.row-actions {
  display: inline-flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.row-actions button, .row-actions .btn {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}
td.actions { text-align: right; white-space: nowrap; }

/* ─── FILTER BAR ─────────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 0.85rem;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: var(--s3);
  border: 1px solid var(--b1);
  border-radius: var(--r-sm);
}
.filter-bar .field { display: flex; flex-direction: column; min-width: 160px; }
.filter-bar label { margin: 0 0 0.25rem; font-size: 0.72rem; }
.filter-bar select, .filter-bar input { width: auto; }
.filter-bar .spacer { flex: 1; }
.filter-bar .summary {
  color: var(--t3);
  font-size: 0.78rem;
  align-self: center;
  font-variant-numeric: tabular-nums;
}

/* ─── BULK BAR ───────────────────────────────────────────── */
.bulk-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  background: var(--s3);
  border: 1px solid var(--b2);
  border-radius: var(--r-sm);
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.bulk-bar .count { color: var(--t1); font-weight: 600; font-size: 0.85rem; }
.bulk-bar .muted { font-size: 0.8rem; }
.bulk-bar.disabled { opacity: 0.45; pointer-events: none; }

th.check, td.check { width: 36px; text-align: center; padding-right: 0; }

/* ─── GROUP HEADER ROW ───────────────────────────────────── */
tr.group-row td {
  background: var(--s3);
  color: var(--t1);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--b1);
}
tr.group-row td .muted {
  text-transform: none;
  letter-spacing: 0;
  margin-left: 0.5rem;
  font-weight: 400;
  color: var(--t3);
}

/* ─── SCROLLABLE LIST ────────────────────────────────────── */
.scroll-list {
  max-height: 520px;
  overflow-y: auto;
  border: 1px solid var(--b1);
  border-radius: var(--r-sm);
  background: var(--s2);
}
.scroll-list table { margin-top: 0; }
.scroll-list thead th {
  position: sticky;
  top: 0;
  background: var(--s3);
  z-index: 1;
}
.user-id {
  font-variant-numeric: tabular-nums;
  color: var(--orange);
  font-weight: 600;
  font-size: 0.82rem;
}
.user-id::before { content: "U"; color: var(--t3); font-weight: 400; }

/* ─── SETTLE-UP CARD ─────────────────────────────────────── */
.settle-wrap {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  flex-wrap: wrap;
}
.settle-qr {
  background: var(--white);
  padding: 8px;
  border-radius: var(--r-sm);
  flex-shrink: 0;
  line-height: 0;
}
.settle-qr svg { width: 220px; height: 220px; display: block; }
.settle-meta { min-width: 0; word-break: break-all; }
.settle-meta a { color: var(--orange); font-weight: 500; }
.settle-ref, .settle-manual {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--b1);
}
.settle-ref input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95rem;
  max-width: 360px;
}

/* ─── MUTED / EMPTY / DIVIDERS ───────────────────────────── */
.muted { color: var(--t2); font-size: 0.85rem; }
.empty { color: var(--t3); text-align: center; padding: 2.5rem 1rem; font-size: 0.9rem; }
.divider { height: 1px; background: var(--b1); margin: 1rem 0; }

/* ─── LOGIN / PUBLIC SHELL ───────────────────────────────── */
.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 80% 60% at 20% 120%, rgba(255,99,15,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 0%,   rgba(255,99,15,0.04) 0%, transparent 70%),
    var(--bg);
  padding: 2rem 1rem;
}
.login-card {
  background: var(--s2);
  border: 1px solid var(--b1);
  border-radius: var(--r-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--sh3);
}
.login-logo {
  display: block;
  margin: 0 auto 1.5rem;
  height: 60px;
  width: auto;
}
.login-title {
  text-align: center;
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.login-sub {
  text-align: center;
  color: var(--t2);
  font-size: 0.85rem;
  margin-bottom: 1.75rem;
}

/* ─── EVENT PUBLIC PAGE ──────────────────────────────────── */
.event-meta { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.25rem; margin: 1rem 0; font-size: 0.9rem; }
.event-meta dt { color: var(--t3); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; align-self: center; }
.event-meta dd { margin: 0; color: var(--t1); }
.ref-row { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.ref-row code { background: var(--s3); padding: 0.4rem 0.7rem; border-radius: var(--r-sm); font-size: 1rem; letter-spacing: 0.05em; border: 1px solid var(--b1); }
.qty-row { display: flex; gap: 1rem; align-items: end; flex-wrap: wrap; margin: 1rem 0; }
.qty-row label { font-size: 0.78rem; }
.qty-row input { width: 6rem; }
.total-line {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.pay-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  background: var(--orange);
  color: #000;
  border-radius: var(--r-sm);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid var(--orange);
  transition: background 0.12s, box-shadow 0.12s;
}
.pay-btn:hover {
  background: var(--orange-dim);
  box-shadow: 0 0 0 3px var(--orange-glow);
}
.deadline-banner {
  padding: 1.5rem;
  background: rgba(220,38,38,0.08);
  border: 1px solid rgba(220,38,38,0.35);
  border-radius: var(--r);
  color: var(--t1);
}
.deadline-banner h2 { color: var(--danger); margin-top: 0; }
.desc { white-space: pre-wrap; color: var(--t2); }

/* ─── DANGER CARD ────────────────────────────────────────── */
.card.danger-zone, .card[style*="border-color:var(--danger)"] {
  border-color: rgba(220,38,38,0.3);
}
.card.danger-zone h2 { color: var(--danger); }

/* ─── ANIMATIONS ─────────────────────────────────────────── */
@keyframes fade-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shimmer  {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.skeleton {
  background: linear-gradient(90deg, var(--s3) 25%, var(--s4) 50%, var(--s3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--r-sm);
  color: transparent;
  user-select: none;
}

.fade-in { animation: fade-in 0.2s ease; }
.slide-up { animation: slide-up 0.25s ease; }

/* ─── STATS-SPECIFIC ─────────────────────────────────────── */
.stats-grid th, .stats-grid td { text-align: right; font-variant-numeric: tabular-nums; }
.stats-grid th:first-child, .stats-grid td:first-child { text-align: left; }
.stats-grid td.muted-cell { color: var(--t3); }
.delta-up   { color: #ff7a47; font-weight: 600; }
.delta-down { color: #4ade80; font-weight: 600; }
.delta-zero { color: var(--t3); }
.qty-pill {
  display: inline-block;
  min-width: 2.2rem;
  text-align: center;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: var(--s3);
  color: var(--t1);
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid var(--b1);
}

.chart-wrap { width: 100%; overflow-x: auto; position: relative; }
.chart-wrap svg { display: block; width: 100%; min-width: 540px; height: auto; }
.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--s2);
  color: var(--t1);
  border: 1px solid var(--orange);
  border-radius: var(--r-sm);
  padding: 0.4rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: var(--sh2);
  opacity: 0;
  transform: translate(-50%, calc(-100% - 8px));
  transition: opacity 0.08s;
  z-index: 5;
}
.chart-tooltip.show { opacity: 1; }
.chart-axis text { fill: var(--t3); font-size: 11px; }
.chart-axis line { stroke: var(--b1); }
.chart-gridline { stroke: var(--b1); stroke-dasharray: 2 3; }
.chart-bar:hover { opacity: 0.85; }
.chart-legend {
  display: flex; gap: 1rem; flex-wrap: wrap;
  margin-top: 0.75rem; justify-content: center;
  font-size: 0.82rem; color: var(--t2);
}
.chart-legend .swatch {
  display: inline-block; width: 12px; height: 12px;
  border-radius: 3px; vertical-align: -1px; margin-right: 0.35rem;
}
.chart-metric { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin-bottom: 0.75rem; }
.chart-metric button {
  padding: 0.3rem 0.75rem; font-size: 0.78rem;
  background: var(--s3); color: var(--t2);
  border: 1px solid var(--b2);
}
.chart-metric button:hover {
  background: var(--s4); color: var(--t1);
  box-shadow: none;
}
.chart-metric button.active {
  background: var(--orange); color: #000;
  border-color: var(--orange);
}

/* ─── PERIOD BLOCK (manage-user history) ─────────────────── */
.period-block {
  border: 1px solid var(--b1);
  border-radius: var(--r-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  background: var(--s3);
}
.period-block[open] { border-color: var(--b2); }
.period-block summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  list-style: none;
  color: var(--t1);
}
.period-block summary::-webkit-details-marker { display: none; }
.period-block summary::before {
  content: "▸";
  color: var(--t3);
  font-size: 0.7rem;
  transition: transform 0.15s;
}
.period-block[open] summary::before { transform: rotate(90deg); }

/* ─── SHARE LINK (events page) ───────────────────────────── */
.share-link { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.share-link code {
  background: var(--s3);
  border: 1px solid var(--b1);
  padding: 0.3rem 0.55rem;
  border-radius: var(--r-xs);
  font-size: 0.82rem;
  word-break: break-all;
}

/* ─── FORM GRID ──────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.form-grid .full { grid-column: 1 / -1; }

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .content { padding: 1.5rem 1.25rem; }
}

@media (max-width: 768px) {
  #sidebar-root { width: 0; }
  .sidebar {
    left: -100%;
    transition: left 0.25s ease;
    z-index: 300;
  }
  .sidebar.open { left: 0; }
  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 299;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
  }
  .sidebar-overlay.visible { opacity: 1; pointer-events: auto; }
  .app-body { padding-top: 52px; }
  .topbar-mobile {
    display: flex;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 52px;
    background: var(--s1);
    border-bottom: 1px solid var(--b1);
    align-items: center;
    padding: 0 1rem;
    gap: 1rem;
    z-index: 200;
  }
  .topbar-mobile .mb-brand {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--t1);
  }
  .topbar-mobile .mb-brand span { color: var(--orange); }
  .topbar-mobile .mb-brand img { height: 22px; }
  .hamburger {
    background: none;
    border: none;
    padding: 0.4rem;
    cursor: pointer;
    color: var(--t2);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .hamburger:hover { color: var(--t1); box-shadow: none; background: none; }

  .content { padding: 1rem 0.85rem; }
  .card { padding: 1rem; }
  h1 { font-size: 1.3rem; }
  h2 { font-size: 1.05rem; }

  .filter-bar { flex-direction: column; align-items: stretch; gap: 0.5rem; padding: 0.75rem; }
  .filter-bar .field { min-width: 0; width: 100%; }
  .filter-bar select, .filter-bar input { width: 100%; }
  .filter-bar .spacer { display: none; }
  .filter-bar .summary { align-self: stretch; }

  .bulk-bar { gap: 0.5rem; }
  .bulk-bar button { flex: 1 1 auto; }

  .form-grid { grid-template-columns: 1fr; }
  section.card > div[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }

  .balance-hero { padding: 1.5rem 0.5rem; }
  .balance-hero .amount { font-size: 2.5rem; }
  .balance-hero .hero-stat .amount { font-size: 2.25rem; }

  .settle-wrap { flex-direction: column; align-items: stretch; }
  .settle-qr { align-self: center; }
  .settle-qr svg { width: 180px; height: 180px; }
  .settle-ref input { max-width: 100%; }

  .row-actions { width: 100%; justify-content: flex-start; }
  .row-actions button, .row-actions .btn { flex: 1 1 auto; min-width: 0; }

  .scroll-list { max-height: 70vh; }
  .hide-mobile { display: none !important; }
  th, td { padding: 0.5rem 0.55rem; }
}

@media (max-width: 600px) {
  /* Tables opt-in to mobile-card mode via the cards-on-mobile class. */
  table.cards-on-mobile,
  table.cards-on-mobile thead,
  table.cards-on-mobile tbody,
  table.cards-on-mobile tr,
  table.cards-on-mobile td {
    display: block;
    width: 100%;
  }
  table.cards-on-mobile thead { position: absolute; left: -9999px; top: -9999px; }
  table.cards-on-mobile tr {
    border: 1px solid var(--b1);
    border-radius: var(--r-sm);
    background: var(--s3);
    margin-bottom: 0.6rem;
    padding: 0.65rem 0.85rem;
  }
  .scroll-list table.cards-on-mobile tr { background: var(--s2); }
  table.cards-on-mobile td {
    border-bottom: none;
    padding: 0.25rem 0;
    text-align: left;
    font-size: 0.88rem;
  }
  table.cards-on-mobile td.num { text-align: left; }
  table.cards-on-mobile td[data-label]::before {
    content: attr(data-label);
    display: inline-block;
    min-width: 7rem;
    color: var(--t3);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 0.5rem;
    vertical-align: middle;
    font-weight: 600;
  }

  table.cards-on-mobile tr.group-row {
    padding: 0.45rem 0.65rem;
    background: var(--s3);
    border: none;
    border-radius: var(--r-sm);
    margin-bottom: 0.4rem;
  }
  table.cards-on-mobile tr.group-row td {
    background: transparent;
    padding: 0;
  }
  table.cards-on-mobile tr.group-row td .muted {
    display: block;
    margin-left: 0;
    margin-top: 0.2rem;
  }

  table.cards-on-mobile td.check { padding-bottom: 0.3rem; }
  table.cards-on-mobile td.actions { padding-top: 0.5rem; text-align: left; }
  table.cards-on-mobile td input[type="text"],
  table.cards-on-mobile td input[type="number"] {
    width: 100% !important;
    max-width: none !important;
  }

  .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-scroll table { min-width: 600px; }

  .login-card { padding: 1.75rem 1.25rem; }
}

/* ─── MERCH ─────────────────────────────────────────────── */
.merch-order .alert.warn {
  background: rgba(245, 158, 11, 0.10);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #f4c26a;
}
.merch-items {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  margin-top: 1rem;
}
.merch-item {
  background: var(--s3);
  border: 1px solid var(--b1);
  border-radius: var(--r-sm);
  padding: 0.75rem;
  display: grid;
  grid-row: span 4;
  grid-template-rows: subgrid;
  align-content: start;
}
.merch-item .merch-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--r-xs);
  background: var(--s4);
}
.merch-item .merch-img.placeholder {
  background: repeating-linear-gradient(45deg, var(--s4), var(--s4) 8px, var(--s3) 8px, var(--s3) 16px);
}
.merch-item-top {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-self: start;
}
.merch-item-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}
.merch-item-head .name { font-weight: 600; }
.merch-item-head .price { color: var(--orange); font-weight: 600; }
.merch-item-desc {
  font-size: 0.85rem;
  color: var(--t2);
}
.merch-sizes {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.merch-size-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: space-between;
}
.merch-size-row .size-label { font-size: 0.9rem; }
.merch-size-row input[type="number"] {
  width: 5rem;
  padding: 0.35rem 0.5rem;
  text-align: right;
}
.merch-desc a { color: var(--orange); text-decoration: underline; }
.merch-item-desc a { color: var(--orange); text-decoration: underline; }
.merch-admin-total {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.5rem 1rem;
  align-items: center;
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--b1);
}
.merch-admin-total:last-child { border-bottom: none; }
.merch-admin-total .qty { color: var(--t2); font-variant-numeric: tabular-nums; }
.merch-admin-total .money { color: var(--orange); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ─── CHIPS (toggle pills for tag-like multi-selects) ─────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  background: var(--s4);
  color: var(--t1);
  border: 1px solid var(--b2);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  font-family: inherit;
}
.chip:hover { background: var(--s3); border-color: var(--b3); box-shadow: none; }
.chip.selected {
  background: var(--orange-bg);
  color: var(--orange);
  border-color: rgba(255,99,15,0.35);
}
.chip.selected:hover { background: var(--orange-bg); border-color: rgba(255,99,15,0.5); }
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

/* ─── ICON BUTTONS (row actions) ─────────────────────────── */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
  background: transparent;
  border: 1px solid var(--b2);
  border-radius: var(--r-xs);
  color: var(--t1);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  min-width: 32px;
  min-height: 32px;
  line-height: 0;
}
.icon-btn:hover {
  background: var(--s3);
  border-color: var(--b3);
  box-shadow: none;
}
.icon-btn.primary { color: var(--orange); border-color: rgba(255,99,15,0.35); }
.icon-btn.primary:hover { background: var(--orange-bg); border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-glow); }
.icon-btn.danger  { color: var(--danger); border-color: rgba(220,38,38,0.35); }
.icon-btn.danger:hover  { background: rgba(220,38,38,0.14); border-color: var(--danger); color: #fca5a5; box-shadow: 0 0 0 3px rgba(220,38,38,0.2); }
.icon-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Regular buttons carrying a leading SVG icon. */
.btn-with-icon { display: inline-flex; align-items: center; gap: 0.4rem; }
.btn-with-icon svg { flex-shrink: 0; }

/* ─── FAB (floating action button) ───────────────────────── */
.fab {
  position: absolute;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: var(--orange);
  color: #000;
  border: 1px solid var(--orange);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  z-index: 5;
  box-shadow: 0 4px 14px rgba(0,0,0,0.45), 0 0 0 4px rgba(255,99,15,0.12);
  will-change: width, transform;
  transition:
    width 0.22s cubic-bezier(0.4,0,0.2,1),
    padding 0.22s cubic-bezier(0.4,0,0.2,1),
    background 0.12s,
    box-shadow 0.18s,
    transform 0.08s;
}
.fab svg { width: 22px; height: 22px; flex-shrink: 0; }
.fab .fab-label {
  width: 0;
  overflow: hidden;
  opacity: 0;
  white-space: nowrap;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  padding-left: 0;
  transition:
    width 0.22s cubic-bezier(0.4,0,0.2,1),
    opacity 0.16s ease 0.06s,
    padding-left 0.22s cubic-bezier(0.4,0,0.2,1);
}
.fab:hover,
.fab:focus-visible {
  background: var(--orange-dim);
  border-color: var(--orange-dim);
  box-shadow: 0 6px 20px rgba(0,0,0,0.5), 0 0 0 6px var(--orange-glow);
  width: 160px;
  padding: 0 1.1rem 0 0.9rem;
}
.fab:hover .fab-label,
.fab:focus-visible .fab-label {
  width: 90px;
  padding-left: 0.45rem;
  opacity: 1;
}
.fab:active { transform: scale(0.96); }
/* Prevent the FAB from covering long item lists — pad the bottom of the card
   that hosts it so the button never sits on top of an item row. */
.card.has-fab { padding-bottom: 6rem; }
/* Touch devices: always show the expanded/labelled state */
@media (hover: none) {
  .fab {
    width: auto;
    padding: 0 1.1rem 0 0.9rem;
    will-change: transform;
    transition: background 0.12s, box-shadow 0.18s, transform 0.08s;
  }
  .fab .fab-label {
    width: auto;
    padding-left: 0.45rem;
    opacity: 1;
    transition: none;
  }
}

.card { position: relative; }

/* ─── MERCH GENDER + CART LINE LIST ──────────────────────── */
.merch-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: flex-end;
}
.merch-controls .field { display: flex; flex-direction: column; min-width: 0; flex: 1 1 90px; }
.merch-controls label {
  font-size: 0.7rem;
  margin-bottom: 0.2rem;
}
.merch-controls select,
.merch-controls input[type="number"] {
  padding: 0.35rem 0.5rem;
  font-size: 0.85rem;
}
.merch-controls .add-line-btn {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
}
.merch-line-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  align-self: start;
  align-content: start;
}
.merch-line-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0.55rem;
  background: var(--s4);
  border: 1px solid var(--b1);
  border-radius: var(--r-xs);
  font-size: 0.85rem;
}
.merch-line-list .line-label { color: var(--t1); }
.merch-line-list .line-qty { color: var(--t2); font-variant-numeric: tabular-nums; }
.merch-line-list .remove-line-btn {
  background: transparent;
  border: none;
  color: var(--t3);
  padding: 0.2rem;
  border-radius: var(--r-xs);
  cursor: pointer;
  line-height: 0;
  min-width: 0;
}
.merch-line-list .remove-line-btn:hover {
  background: rgba(220,38,38,0.14);
  color: var(--danger);
  box-shadow: none;
}
.merch-item-controls {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-self: start;
}

/* Admin: items list gets its own recessed panel so the order-header actions
   (Edit / Delete / Remind unpaid / Show summary) aren't mistaken for buttons
   on the first item row. */
.items-section {
  margin-top: 1.5rem;
  padding: 1rem 1.1rem 1.1rem;
  background: var(--s1);
  border: 1px solid var(--b1);
  border-radius: var(--r-sm);
}
.items-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.6rem;
  margin-bottom: 0.6rem;
  border-bottom: 1px solid var(--b1);
}
.items-section-header h4 {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--t2);
}
.items-section-header .count {
  font-size: 0.75rem;
  color: var(--t3);
  font-variant-numeric: tabular-nums;
}
.items-section .merch-admin-item:first-child { padding-top: 0; }
.items-section .merch-admin-item:last-child  { border-bottom: none; padding-bottom: 0; }

/* Admin merch list — summary card grid. */
.merch-order-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.5rem 0;
}
.merch-order-summary h3 { margin: 0; }
.merch-order-summary .meta {
  color: var(--t2);
  font-size: 0.85rem;
  margin-top: 0.35rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.merch-order-summary .meta span { display: inline-flex; align-items: center; gap: 0.3rem; }
.merch-order-summary .meta .dot { color: var(--t3); }

/* Quantity stepper — [-] [n] [+] used on user cart lines and the add-line row. */
.qty-stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--b2);
  border-radius: var(--r-xs);
  overflow: hidden;
  background: var(--s4);
}
.qty-stepper button {
  background: transparent;
  border: none;
  color: var(--t1);
  padding: 0.25rem 0.5rem;
  border-radius: 0;
  cursor: pointer;
  min-width: 28px;
  line-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.qty-stepper button:hover { background: var(--s3); box-shadow: none; }
.qty-stepper button:disabled { opacity: 0.4; cursor: not-allowed; }
.qty-stepper input,
.qty-stepper .qty-val {
  background: transparent;
  border: none;
  border-left: 1px solid var(--b1);
  border-right: 1px solid var(--b1);
  color: var(--t1);
  width: 3rem;
  text-align: center;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  padding: 0.25rem 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.qty-stepper input:focus { outline: none; box-shadow: none; border-color: var(--b1); }
.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-stepper input[type="number"] { appearance: textfield; -moz-appearance: textfield; }

/* Gender chip shown when the item exposes only one gender (or unisex). */
.gender-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--s3);
  border: 1px solid var(--b2);
  color: var(--t1);
  font-size: 0.8rem;
  font-weight: 600;
}
.gender-chip.men    { color: #7dd3fc; border-color: rgba(56,189,248,0.35); background: rgba(56,189,248,0.10); }
.gender-chip.women  { color: #f9a8d4; border-color: rgba(236,72,153,0.35); background: rgba(236,72,153,0.10); }
.gender-chip.unisex { color: var(--t1); }

/* Live balance in the merch-order card. */
.merch-balance {
  text-align: right;
}
.merch-balance .balance-amount {
  font-size: 1.4rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: color 0.12s;
}
.merch-balance .unsaved-tag {
  display: none;
  margin-top: 0.15rem;
  padding: 0.1rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--warn);
  background: rgba(245,158,11,0.10);
  border: 1px solid rgba(245,158,11,0.35);
  border-radius: 999px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.merch-balance .unsaved-tag.on { display: inline-block; }

/* ─── DASHBOARD: food history rows ─────────────────────────── */
.food-history-row {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--b1);
}
.food-history-row:last-child { border-bottom: none; }
.food-history-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.food-history-lines {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.food-history-lines li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--t2);
}

/* ─── DASHBOARD: merch order cards ─────────────────────────── */
.merch-dashboard-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.merch-dashboard-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.85rem 1rem;
  background: var(--s3);
  border: 1px solid var(--b1);
  border-radius: var(--r-sm);
  color: var(--t1);
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s, transform 0.12s;
}
.merch-dashboard-card:hover {
  background: var(--s4);
  border-color: var(--b3);
  transform: translateY(-1px);
}
.merch-dashboard-title {
  font-weight: 600;
  font-size: 0.95rem;
}
.merch-dashboard-deadline { font-size: 0.8rem; }
.merch-dashboard-balance {
  margin-top: 0.35rem;
  color: var(--orange);
  font-weight: 700;
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
}
.merch-dashboard-cta {
  margin-top: 0.15rem;
  font-size: 0.8rem;
  color: var(--orange);
}
