/* ============================================================
   Greggs Staff Dashboard — design tokens
   Palette: deep navy panels, warm bakery gold accent, a mono
   "counter display" treatment for live numbers (on-shift counts,
   durations) — the one signature motif carried through every page.
   ============================================================ */

:root, [data-theme="dark"] {
  --bg-950: #0a0e1c;
  --bg-900: #10152b;
  --bg-800: #171d38;
  --bg-700: #232b4d;
  --bg-600: #323c68;

  /* Greggs blue — a real second brand colour, not just a dark background.
     Used for primary interactive accents (active nav, links, focus rings).
     Orange/gold stays reserved for "signature" moments — live counters,
     awards, the brand mark — so it keeps meaning instead of being
     used everywhere. */
  --blue: #1a4d8f;
  --blue-bright: #3b78c9;
  --blue-dim: #0d2f5c;

  --orange: #e8a939;
  --orange-bright: #f4c766;
  --cream: #f3eee2;
  --slate: #8a91b0;
  --slate-dim: #5c6386;

  --green: #4fbe83;
  --amber: #e2924a;
  --red: #e2604f;

  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow-card: 0 1px 2px rgba(0,0,0,0.24), 0 8px 24px -8px rgba(0,0,0,0.35);
  --shadow-pop: 0 4px 12px rgba(0,0,0,0.3), 0 16px 40px -12px rgba(0,0,0,0.45);
}

/* Light theme — same structure, inverted surfaces. Kept as variable overrides
   so no component CSS needs to know which theme is active. */
[data-theme="light"] {
  --bg-950: #f6f4ef;
  --bg-900: #ffffff;
  --bg-800: #f1eee6;
  --bg-700: #e2ddd1;
  --bg-600: #cfc8b8;

  --orange: #b8801f;
  --orange-bright: #96690f;
  --cream: #1d2237;
  --slate: #5c6386;
  --slate-dim: #8a91b0;

  --green: #2f8f5b;
  --amber: #b06d24;
  --red: #c0392b;

  --blue: #1a4d8f;
  --blue-bright: #2f66ab;
  --blue-dim: #dce8f7;

  --shadow-card: 0 1px 2px rgba(20,30,60,0.06), 0 8px 20px -10px rgba(20,30,60,0.12);
  --shadow-pop: 0 4px 14px rgba(20,30,60,0.10), 0 20px 44px -16px rgba(20,30,60,0.16);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-950);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

/* ---------- Layout shell ---------- */

.shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg-900);
  border-right: 1px solid var(--bg-700);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  color: var(--cream);
  padding: 0 8px 22px;
  letter-spacing: -0.01em;
}
.brand-mark { width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; box-shadow: var(--shadow-card); }
.brand span { color: var(--orange-bright); font-weight: 700; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--slate);
  font-size: 14px;
  font-weight: 500;
  border-left: 2px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.nav-link:hover { background: var(--bg-800); color: var(--cream); }
.nav-link.active {
  background: linear-gradient(90deg, var(--blue-dim) 0%, transparent 100%);
  color: var(--cream);
  border-left-color: var(--blue-bright);
  font-weight: 600;
}
[data-theme="light"] .nav-link.active { background: var(--blue-dim); }

.nav-badge {
  margin-left: auto;
  background: var(--orange);
  color: var(--bg-950);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--bg-700);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-footer img { width: 30px; height: 30px; border-radius: 50%; }
.sidebar-footer .who { flex: 1; min-width: 0; }
.sidebar-footer .who .name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-footer .who .role { font-size: 11px; color: var(--slate-dim); }
.sidebar-footer button {
  background: none;
  border: none;
  color: var(--slate-dim);
  cursor: pointer;
  font-size: 12px;
  padding: 4px;
}
.sidebar-footer button:hover { color: var(--red); }

.main {
  flex: 1;
  padding: 32px 40px;
  max-width: 1100px;
}

.page-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 4px;
}
.page-subtitle { color: var(--slate); margin: 0 0 28px; font-size: 14px; }

/* ---------- Counter strip (signature element) ---------- */

.counter-strip {
  display: flex;
  gap: 1px;
  background: var(--bg-700);
  border: 1px solid var(--bg-700);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 28px;
}
.counter-cell {
  flex: 1;
  background: var(--bg-900);
  padding: 16px 20px;
}
.counter-cell .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-dim);
  margin-bottom: 6px;
}
.counter-cell .value {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--orange-bright);
  font-variant-numeric: tabular-nums;
}
.counter-cell.status-green .value { color: var(--green); }
.counter-cell.status-amber .value { color: var(--amber); }

/* ---------- Cards ---------- */

.card {
  background: var(--bg-900);
  border: 1px solid var(--bg-700);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s;
}
.card h2 {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.005em;
}

.empty-state {
  color: var(--slate-dim);
  font-size: 13px;
  padding: 12px 0;
  font-style: italic;
}

/* ---------- Roster rows (who's on shift) ---------- */

.roster-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--bg-700);
}
.roster-row:last-child { border-bottom: none; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot.green { background: var(--green); box-shadow: 0 0 8px var(--green); }
.dot.amber { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.roster-row .who { flex: 1; font-weight: 600; }
.roster-row .meta { color: var(--slate); font-size: 13px; }
.roster-row .dur { font-family: var(--font-mono); color: var(--orange-bright); font-size: 13px; }

/* ---------- Tables ---------- */

table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-dim);
  padding: 0 12px 10px;
  border-bottom: 1px solid var(--bg-700);
}
td { padding: 12px; border-bottom: 1px solid var(--bg-700); font-size: 14px; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
td.mono { font-family: var(--font-mono); color: var(--orange-bright); }
.rank-medal { font-size: 16px; margin-right: 4px; }

/* ---------- Badges ---------- */

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge.open { background: rgba(232, 169, 57, 0.15); color: var(--orange-bright); }
.badge.closed { background: rgba(138, 145, 176, 0.15); color: var(--slate); }
.badge.pending { background: rgba(232, 169, 57, 0.15); color: var(--orange-bright); }
.badge.approved { background: rgba(79, 190, 131, 0.15); color: var(--green); }
.badge.denied { background: rgba(226, 96, 79, 0.15); color: var(--red); }

.stars { color: var(--orange-bright); letter-spacing: 1px; font-size: 13px; }

/* ---------- Buttons & forms ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.15s, background 0.15s, border-color 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-approve { background: var(--green); color: var(--bg-950); }
.btn-deny { background: transparent; color: var(--red); border-color: var(--red); }
.btn-primary {
  background: linear-gradient(135deg, var(--orange-bright) 0%, var(--orange) 100%);
  color: var(--bg-950);
  box-shadow: 0 2px 8px -2px rgba(232,169,57,0.45);
}
.btn-primary:hover { box-shadow: 0 4px 14px -2px rgba(232,169,57,0.55); }

.decision-form { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.decision-form input[type="text"] {
  flex: 1;
  background: var(--bg-800);
  border: 1px solid var(--bg-700);
  border-radius: var(--radius);
  padding: 8px 12px;
  color: var(--cream);
  font-size: 13px;
}
.decision-form input[type="text"]::placeholder { color: var(--slate-dim); }

.promo-card { border-left: 3px solid var(--orange); }
.promo-meta { color: var(--slate); font-size: 13px; margin-bottom: 10px; }
.promo-reason { background: var(--bg-800); padding: 10px 14px; border-radius: var(--radius); font-size: 13px; margin-bottom: 4px; }

/* ---------- Login page ---------- */

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 0%, #171d38 0%, #0a0e1c 60%);
}
.login-card {
  background: var(--bg-900);
  border: 1px solid var(--bg-700);
  border-radius: 20px;
  padding: 48px 40px;
  width: 380px;
  text-align: center;
  box-shadow: var(--shadow-pop);
}
.login-mark {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--orange-bright);
  margin-bottom: 6px;
}
.login-sub { color: var(--slate); font-size: 14px; margin-bottom: 32px; }
.login-btn {
  display: block;
  background: var(--orange);
  color: var(--bg-950);
  font-weight: 700;
  padding: 12px;
  border-radius: var(--radius);
  font-size: 14px;
}
.login-btn:hover { background: var(--orange-bright); }
.login-error {
  background: rgba(226, 96, 79, 0.12);
  color: var(--red);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 20px;
}

/* ---------- Error page ---------- */
.error-box {
  background: var(--bg-900);
  border: 1px solid var(--red);
  border-radius: var(--radius);
  padding: 24px;
  color: var(--cream);
}

@media (max-width: 720px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; flex-direction: row; overflow-x: auto; }
  .sidebar-footer { display: none; }
  .main { padding: 20px; }
  .counter-strip { flex-wrap: wrap; }
}

/* ============================================================
   Bakery-counter login backdrop
   A warm ambient glow behind a slowly drifting field of pastry
   marks — the shop-window feeling without literal photography.
   ============================================================ */

.bakery-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  background:
    radial-gradient(ellipse 90% 60% at 50% 105%, rgba(232, 169, 57, 0.20) 0%, transparent 60%),
    radial-gradient(ellipse 80% 55% at 15% 0%, rgba(26, 77, 143, 0.35) 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(35, 43, 77, 0.9) 0%, transparent 65%),
    var(--bg-950);
}

.counter-glow {
  position: absolute;
  left: 50%;
  bottom: -22vh;
  width: 130vw;
  height: 55vh;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(244, 199, 102, 0.16) 0%, transparent 68%);
  filter: blur(48px);
  animation: warmth 9s ease-in-out infinite alternate;
}

@keyframes warmth {
  from { opacity: 0.75; transform: translateX(-50%) scale(1); }
  to   { opacity: 1;    transform: translateX(-50%) scale(1.07); }
}

/* The counter edge — a single hairline of light near the base */
.counter-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16vh;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232, 169, 57, 0.42) 22%, rgba(232, 169, 57, 0.42) 78%, transparent);
}

.pastry-field { position: absolute; inset: 0; }

.pastry {
  position: absolute;
  left: calc((var(--i) * 7.3%) - 4%);
  bottom: -12vh;
  width: 34px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(150deg, rgba(244, 199, 102, 0.30), rgba(201, 138, 34, 0.16));
  transform: rotate(-20deg);
  opacity: 0;
  animation: rise linear infinite;
  animation-duration: calc(26s + (var(--i) * 2.4s));
  animation-delay: calc(var(--i) * -2.9s);
}

.pastry.p2 { width: 26px; height: 15px; }
.pastry.p3 { width: 42px; height: 24px; }
.pastry.p4 { width: 30px; height: 13px; }

@keyframes rise {
  0%   { opacity: 0;    transform: translateY(0) rotate(-20deg) scale(0.85); }
  12%  { opacity: 0.5; }
  85%  { opacity: 0.28; }
  100% { opacity: 0;    transform: translateY(-118vh) rotate(16deg) scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
  .pastry, .counter-glow { animation: none; }
  .pastry { opacity: 0.22; }
}

/* ---------- Login / verify cards ---------- */

.login-shell { position: relative; }
.login-card { position: relative; z-index: 1; backdrop-filter: blur(2px); }
.login-mark { margin-bottom: 10px; }

.login-title {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 700;
  color: var(--cream);
  margin: 0 0 4px;
  letter-spacing: -0.015em;
}

.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: background 0.15s, transform 0.1s;
}
.login-btn:active { transform: translateY(1px); }
.login-btn.roblox { background: var(--cream); color: var(--bg-950); }
.login-btn.roblox:hover { background: #fff; }

.login-alt { margin-top: 18px; font-size: 13px; color: var(--slate-dim); }
.login-alt a { color: var(--orange-bright); font-weight: 600; }
.login-alt a:hover { text-decoration: underline; }

/* ---------- Verify flow ---------- */

.verify-card { width: 420px; }

.verify-steps { text-align: left; margin: 24px 0 22px; display: flex; flex-direction: column; gap: 12px; }

.vstep { display: flex; gap: 12px; align-items: flex-start; opacity: 0.45; }
.vstep.current, .vstep.done { opacity: 1; }

.vstep-num {
  width: 26px; height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--bg-600);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 700;
  color: var(--slate);
}
.vstep.current .vstep-num { border-color: var(--orange); color: var(--orange-bright); }
.vstep.done .vstep-num { background: var(--green); border-color: var(--green); color: var(--bg-950); }

.vstep-title { font-size: 14px; font-weight: 600; }
.vstep-meta { font-size: 12px; color: var(--slate-dim); margin-top: 1px; }

.verify-success {
  text-align: left;
  background: var(--bg-800);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 22px 0 16px;
}
.vs-row { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; }
.vs-row span { color: var(--slate-dim); }
.verify-note { font-size: 12px; color: var(--slate-dim); margin: 0; }

/* ---------- Nav sections ---------- */

.nav-section {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--slate-dim);
  padding: 16px 12px 6px;
  font-weight: 700;
}

/* ---------- Banners ---------- */

.banner {
  padding: 11px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 18px;
  font-weight: 500;
}
.banner.error { background: rgba(226, 96, 79, 0.12); color: var(--red); }
.banner.success { background: rgba(79, 190, 131, 0.12); color: var(--green); }

/* ---------- Forms ---------- */

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-dim);
  margin-bottom: 6px;
  font-weight: 700;
}
.field input[type="text"], .field textarea, .field select {
  width: 100%;
  background: var(--bg-800);
  border: 1.5px solid var(--bg-700);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 14px;
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--blue-bright);
  box-shadow: 0 0 0 3px rgba(59,120,201,0.18);
}
.field-row { display: flex; gap: 14px; }
.field-row .field { flex: 1; }

/* ---------- Vacancy items ---------- */

.vac-item {
  border: 1px solid var(--bg-700);
  border-left: 3px solid var(--orange);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 12px;
}
.vac-item.is-closed { border-left-color: var(--slate-dim); opacity: 0.6; }

.vac-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.vac-title { font-weight: 700; font-size: 15px; }
.vac-dept { color: var(--slate); font-size: 13px; margin-left: 8px; }
.vac-tags { display: flex; gap: 6px; flex-shrink: 0; }
.vac-desc { color: var(--slate); font-size: 13px; margin-bottom: 12px; line-height: 1.55; }
.vac-actions { display: flex; gap: 8px; }
.inline-form { display: inline; }

.btn-small { padding: 5px 12px; font-size: 12px; }
.btn-danger-outline { background: transparent; color: var(--red); border-color: var(--red); }
.btn:not(.btn-primary):not(.btn-approve):not(.btn-deny):not(.btn-danger-outline) {
  background: var(--bg-700);
  color: var(--cream);
}

@media (max-width: 720px) {
  .field-row { flex-direction: column; gap: 0; }
  .verify-card, .login-card { width: 100%; max-width: 92vw; padding: 32px 24px; }
  .vac-head { flex-direction: column; }
}

/* ============================================================
   Phase 1 + 2 components
   ============================================================ */

.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 24px; }
.page-head .page-title, .page-head .page-subtitle { margin-bottom: 2px; }

.back-link { display: inline-block; color: var(--slate); font-size: 13px; margin-bottom: 14px; }
.back-link:hover { color: var(--orange-bright); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }

.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.subtle { color: var(--slate-dim); font-size: 12px; }
.muted { color: var(--slate-dim); }
.pre-wrap { white-space: pre-wrap; line-height: 1.6; }
.truncate { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Quick actions ---------- */

.quick-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.qa {
  background: var(--bg-900);
  border: 1px solid var(--bg-700);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  transition: border-color 0.15s, transform 0.1s;
}
.qa:hover { border-color: var(--orange); transform: translateY(-1px); }

/* ---------- Stat lines ---------- */

.stat-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--bg-700);
  font-size: 13px;
}
.stat-line:last-child { border-bottom: none; }
.stat-line span { color: var(--slate); }
.mono.warn { color: var(--amber); }

/* ---------- Activity feed ---------- */

.activity-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--bg-700);
  font-size: 13px;
}
.activity-row:last-child { border-bottom: none; }
.act-badge {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 700;
  background: var(--bg-700);
  color: var(--slate);
  flex-shrink: 0;
}
.act-badge.dashboard { background: rgba(232, 169, 57, 0.15); color: var(--orange-bright); }
.act-body { flex: 1; color: var(--slate); }
.act-body strong { color: var(--cream); }
.act-time { color: var(--slate-dim); font-size: 11px; flex-shrink: 0; }

/* ---------- Filter bar ---------- */

.filter-bar { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; align-items: center; }
.filter-bar input[type="text"], .filter-bar select {
  background: var(--bg-900);
  border: 1px solid var(--bg-700);
  border-radius: var(--radius);
  padding: 9px 13px;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 13px;
}
.filter-bar input[type="text"] { flex: 1; min-width: 220px; }
.filter-bar input:focus, .filter-bar select:focus { outline: none; border-color: var(--blue-bright); box-shadow: 0 0 0 3px rgba(59,120,201,0.18); }

/* ---------- Tables ---------- */

tr.clickable { cursor: pointer; transition: background 0.12s; }
tr.clickable:hover { background: var(--bg-800); }

.member-cell { display: flex; align-items: center; gap: 10px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; }
.member-name { font-weight: 600; }
.member-sub { font-size: 11px; color: var(--slate-dim); }
.clip { color: var(--slate-dim); font-size: 11px; margin-left: 6px; }

/* ---------- Badges: severity + tier ---------- */

.badge.tier { background: var(--bg-700); color: var(--slate); }
.badge.sev-low { background: rgba(138, 145, 176, 0.18); color: var(--slate); }
.badge.sev-medium { background: rgba(226, 146, 74, 0.18); color: var(--amber); }
.badge.sev-high { background: rgba(226, 96, 79, 0.18); color: var(--red); }
.badge.sev-critical { background: var(--red); color: #fff; }

.count-pill {
  background: var(--bg-700);
  color: var(--slate);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 20px;
  font-weight: 700;
}

/* ---------- Profile ---------- */

.profile-head { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 24px; }
.profile-avatar { width: 72px; height: 72px; border-radius: 50%; border: 2px solid var(--bg-700); }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }

.note-block {
  background: var(--bg-800);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 13px;
  margin-top: 12px;
  white-space: pre-wrap;
}

/* ---------- Case rows ---------- */

.case-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--bg-700);
}
.case-row:last-child { border-bottom: none; }
.case-row:hover .case-main strong { color: var(--orange-bright); }
.case-main { flex: 1; font-size: 13px; }
.case-reason { color: var(--slate); font-size: 12px; margin-top: 2px; }

.detail-block { margin-top: 16px; }
.detail-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-dim);
  font-weight: 700;
  margin-bottom: 5px;
}

.note-item {
  background: var(--bg-800);
  border-radius: var(--radius);
  padding: 13px 15px;
  margin-bottom: 10px;
  font-size: 13px;
}
.note-head { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; font-size: 12px; }

/* ---------- Dropzone ---------- */

.dropzone {
  position: relative;
  border: 1.5px dashed var(--bg-600);
  border-radius: var(--radius);
  padding: 26px 20px;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
}
.dropzone.compact { padding: 16px; }
.dropzone:hover, .dropzone.dragging { border-color: var(--orange); background: rgba(232, 169, 57, 0.05); }
.dropzone input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.dz-inner { pointer-events: none; font-size: 13px; color: var(--slate); }
.dz-icon { font-size: 24px; margin-bottom: 6px; }
.dz-hint { font-size: 11px; color: var(--slate-dim); margin-top: 4px; }
.dz-files { list-style: none; padding: 0; margin: 12px 0 0; font-size: 12px; color: var(--orange-bright); pointer-events: none; }
.dz-files li { padding: 2px 0; font-family: var(--font-mono); }

/* ---------- Evidence gallery ---------- */

.evidence-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.ev-item { background: var(--bg-800); border-radius: var(--radius); overflow: hidden; }
.ev-thumb {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 110px;
  background: var(--bg-950);
  overflow: hidden;
}
.ev-thumb img, .ev-thumb video { width: 100%; height: 100%; object-fit: cover; }
.ev-file { font-size: 34px; }
.ev-meta { padding: 9px 11px 4px; }
.ev-name { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-sub { font-size: 11px; color: var(--slate-dim); }
.ev-actions { display: flex; gap: 6px; padding: 6px 11px 11px; }

/* ---------- Toasts ---------- */

.toast-stack {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 999;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: var(--bg-800);
  border: 1px solid var(--bg-600);
  border-left-width: 3px;
  border-radius: var(--radius);
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--cream);
  box-shadow: 0 6px 24px rgba(0,0,0,0.35);
  animation: toast-in 0.25s ease-out;
  max-width: 340px;
}
.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }
.toast.out { animation: toast-out 0.4s ease-in forwards; }

@keyframes toast-in { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px); } }

/* ---------- Icon buttons ---------- */

.icon-btn {
  background: none; border: none;
  color: var(--slate-dim);
  cursor: pointer; font-size: 14px; padding: 4px;
  line-height: 1;
}
.icon-btn:hover { color: var(--orange-bright); }

@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; }
  .profile-head { flex-direction: column; }
  .truncate { max-width: 160px; }
}

/* ============================================================
   Phase 3 — logs, search, command palette
   ============================================================ */

/* ---------- Sidebar search trigger ---------- */

.search-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: var(--bg-800);
  border: 1px solid var(--bg-700);
  border-radius: var(--radius);
  padding: 8px 12px;
  margin-bottom: 14px;
  color: var(--slate);
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.search-trigger:hover { border-color: var(--orange); color: var(--cream); }
.search-trigger kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--bg-700);
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--slate-dim);
}

/* ---------- Activity sparkline ---------- */

.sparkline-card { padding: 16px 20px 12px; }
.sparkline {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 52px;
}
.spark-col { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.spark-bar {
  width: 100%;
  background: linear-gradient(180deg, var(--orange) 0%, rgba(232,169,57,0.35) 100%);
  border-radius: 2px 2px 0 0;
  transition: opacity 0.15s;
}
.spark-col:hover .spark-bar { opacity: 0.65; }
.sparkline-label { font-size: 11px; color: var(--slate-dim); margin-top: 8px; text-align: right; }

/* ---------- Tabs ---------- */

.tab-row { display: flex; gap: 4px; margin-bottom: 16px; flex-wrap: wrap; }
.tab {
  padding: 7px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--slate);
  background: var(--bg-900);
  border: 1px solid transparent;
}
.tab:hover { color: var(--cream); border-color: var(--bg-700); }
.tab.active { background: var(--bg-800); color: var(--orange-bright); border-color: var(--orange); }

/* ---------- Log entries ---------- */

.log-entry { border-bottom: 1px solid var(--bg-700); }
.log-entry:last-child { border-bottom: none; }
.log-entry[open] { background: var(--bg-800); border-radius: var(--radius); }

.log-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  cursor: pointer;
  list-style: none;
  font-size: 13px;
}
.log-summary::-webkit-details-marker { display: none; }
.log-summary:hover { background: var(--bg-800); border-radius: var(--radius); }

.log-cat {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  flex-shrink: 0;
  min-width: 74px;
  text-align: center;
}
.cat-moderation { background: rgba(226, 96, 79, 0.16); color: var(--red); }
.cat-message { background: rgba(232, 169, 57, 0.16); color: var(--orange-bright); }
.cat-member { background: rgba(79, 190, 131, 0.16); color: var(--green); }
.cat-role { background: rgba(155, 89, 182, 0.18); color: #a97fd0; }
.cat-channel { background: rgba(52, 152, 219, 0.16); color: #5dade2; }
.cat-voice { background: rgba(138, 145, 176, 0.18); color: var(--slate); }
.cat-command { background: var(--bg-700); color: var(--slate); }

.log-text { flex: 1; color: var(--cream); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-time { font-size: 11px; color: var(--slate-dim); flex-shrink: 0; }

.log-body { padding: 4px 14px 16px 14px; }
.log-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px 20px;
  font-size: 12px;
  padding-bottom: 12px;
}
.log-meta-grid > div { display: flex; flex-direction: column; gap: 2px; }
.log-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--slate-dim);
  font-weight: 700;
}
.log-detail {
  background: var(--bg-950);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.65;
  max-height: 320px;
  overflow-y: auto;
}
.log-actions { display: flex; gap: 8px; margin-top: 12px; }

/* ---------- Pagination ---------- */

.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 20px; }
.page-info { font-size: 13px; color: var(--slate-dim); }

/* ---------- Search results ---------- */

.search-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--bg-700);
  font-size: 13px;
}
.search-row:last-child { border-bottom: none; }
.search-row:hover { background: var(--bg-800); border-radius: var(--radius); }
.sr-main { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sr-sub { color: var(--slate); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-go { color: var(--slate-dim); }

/* ---------- Command palette ---------- */

.palette-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 18, 0.72);
  backdrop-filter: blur(3px);
  z-index: 1000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14vh;
}
.palette-overlay.show { display: flex; }

.palette {
  width: 540px;
  max-width: 92vw;
  background: var(--bg-900);
  border: 1px solid var(--bg-600);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  overflow: hidden;
  animation: palette-in 0.14s ease-out;
}
@keyframes palette-in { from { opacity: 0; transform: translateY(-8px) scale(0.99); } to { opacity: 1; transform: none; } }

.palette input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--bg-700);
  padding: 16px 20px;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 15px;
}
.palette input:focus { outline: none; }
.palette input::placeholder { color: var(--slate-dim); }

.palette-list { max-height: 340px; overflow-y: auto; padding: 6px; }
.palette-list a {
  display: block;
  padding: 9px 14px;
  border-radius: var(--radius);
  font-size: 13.5px;
  color: var(--slate);
}
.palette-list a:hover, .palette-list a.active { background: var(--bg-800); color: var(--cream); }
.palette-search { border-top: 1px solid var(--bg-700); margin-top: 6px; padding-top: 12px !important; color: var(--orange-bright) !important; }
.palette-search strong { color: var(--orange-bright); }

.palette-hint {
  padding: 9px 16px;
  border-top: 1px solid var(--bg-700);
  font-size: 11px;
  color: var(--slate-dim);
  font-family: var(--font-mono);
}

/* Date inputs need explicit colour handling in dark mode */
.filter-bar input[type="date"] {
  background: var(--bg-900);
  border: 1px solid var(--bg-700);
  border-radius: var(--radius);
  padding: 8px 12px;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 13px;
}
[data-theme="dark"] .filter-bar input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.7); }

@media (max-width: 720px) {
  .log-summary { flex-wrap: wrap; }
  .log-text { width: 100%; white-space: normal; }
  .tab-row { overflow-x: auto; flex-wrap: nowrap; }
}

/* ============================================================
   Phase 4 — performance & awards
   ============================================================ */

.spark-bar.alt { background: linear-gradient(180deg, #5dade2 0%, rgba(93,173,226,0.3) 100%); }

/* ---------- Score bars ---------- */

.score-cell { display: flex; align-items: center; gap: 10px; }
.score-bar {
  flex: 1;
  min-width: 60px;
  height: 6px;
  background: var(--bg-700);
  border-radius: 20px;
  overflow: hidden;
}
.score-bar.large { height: 10px; margin-bottom: 18px; }
.score-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--orange) 0%, var(--orange-bright) 100%);
  border-radius: 20px;
  transition: width 0.4s ease-out;
}

.score-breakdown { display: flex; flex-direction: column; gap: 9px; }
.sb-row { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.sb-label { width: 88px; color: var(--slate); text-transform: capitalize; flex-shrink: 0; }
.sb-track { flex: 1; height: 5px; background: var(--bg-700); border-radius: 20px; overflow: hidden; }
.sb-fill { height: 100%; background: var(--slate); border-radius: 20px; }
.sb-val { width: 24px; text-align: right; color: var(--slate-dim); flex-shrink: 0; }

/* ---------- Award cards ---------- */

.award-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.award-card {
  background: var(--bg-800);
  border: 1px solid var(--bg-700);
  border-top-width: 3px;
  border-radius: var(--radius);
  padding: 16px 14px 12px;
  text-align: center;
}
.award-card.inactive { opacity: 0.45; }
.award-card.tier-bronze { border-top-color: #b87333; }
.award-card.tier-silver { border-top-color: #b9c2cc; }
.award-card.tier-gold { border-top-color: var(--orange); }
.award-card.tier-special { border-top-color: #9b59b6; }

.award-emoji { font-size: 30px; line-height: 1; margin-bottom: 8px; }
.award-name { font-weight: 700; font-size: 13.5px; margin-bottom: 4px; }
.award-desc { font-size: 11.5px; color: var(--slate); line-height: 1.45; min-height: 32px; }
.award-meta { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; font-size: 11px; }
.award-actions { display: flex; gap: 6px; justify-content: center; margin-top: 10px; }

/* ---------- Award chips (on profiles) ---------- */

.award-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.award-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-800);
  border: 1px solid var(--bg-700);
  border-left-width: 3px;
  border-radius: 20px;
  padding: 5px 12px 5px 10px;
  font-size: 12px;
  font-weight: 600;
}
.award-chip.tier-bronze { border-left-color: #b87333; }
.award-chip.tier-silver { border-left-color: #b9c2cc; }
.award-chip.tier-gold { border-left-color: var(--orange); }
.award-chip.tier-special { border-left-color: #9b59b6; }
.ac-emoji { font-size: 14px; }
.ac-remove {
  background: none;
  border: none;
  color: var(--slate-dim);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 0 0 0 2px;
}
.ac-remove:hover { color: var(--red); }

@media (max-width: 720px) {
  .award-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .sb-label { width: 66px; }
}

/* ============================================================
   Phase 5 — announcements, live updates, heatmap, bulk actions
   ============================================================ */

/* ---------- Live indicator ---------- */

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--slate-dim);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
}
.ld-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: live-pulse 2.4s ease-in-out infinite;
}
.live-indicator.stale .ld-dot { background: var(--slate-dim); animation: none; }
@keyframes live-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(79,190,131,0.5); }
  50% { opacity: 0.6; box-shadow: 0 0 0 5px rgba(79,190,131,0); }
}

.live-badge { font-size: 10px; color: var(--slate-dim); font-weight: 400; text-transform: none; letter-spacing: 0; }

.counter-cell .value.pulse { animation: value-pop 0.5s ease-out; }
@keyframes value-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.14); color: var(--cream); }
  100% { transform: scale(1); }
}

/* ---------- Announcement builder ---------- */

.announce-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.preview-card { position: sticky; top: 20px; }

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

.discord-preview {
  background: #313338;
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #dbdee1;
}
[data-theme="light"] .discord-preview { background: #f2f3f5; color: #2e3338; }

.dp-ping { color: #c9cdfb; background: rgba(88,101,242,0.15); display: inline-block; padding: 1px 4px; border-radius: 3px; margin-bottom: 8px; font-weight: 500; }
.dp-embed { display: flex; background: #2b2d31; border-radius: 4px; overflow: hidden; }
[data-theme="light"] .dp-embed { background: #fff; }
.dp-embed.plain { background: transparent; }
.dp-bar { width: 4px; flex-shrink: 0; background: var(--orange); }
.dp-content { padding: 12px 14px; flex: 1; min-width: 0; }
.dp-title { font-weight: 700; margin-bottom: 6px; color: #f2f3f5; }
[data-theme="light"] .dp-title { color: #060607; }
.dp-title:empty { display: none; }
.dp-body { word-wrap: break-word; }
.dp-body code { background: rgba(0,0,0,0.3); padding: 1px 4px; border-radius: 3px; font-family: var(--font-mono); font-size: 12px; }
.dp-body pre { background: rgba(0,0,0,0.3); padding: 8px 10px; border-radius: 4px; font-family: var(--font-mono); font-size: 12px; overflow-x: auto; }
.dp-body blockquote { border-left: 3px solid #4f545c; padding-left: 10px; margin: 4px 0; color: #b5bac1; }
.dp-image { max-width: 100%; border-radius: 4px; margin-top: 10px; }

.template-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--bg-700); }
.template-row:last-of-type { border-bottom: none; }
.template-load {
  flex: 1; text-align: left; background: none; border: none; cursor: pointer;
  color: var(--cream); font-family: var(--font-body); font-size: 13px;
  display: flex; flex-direction: column; gap: 2px; padding: 4px 0;
}
.template-load:hover strong { color: var(--orange-bright); }
.link-summary { cursor: pointer; font-size: 13px; color: var(--orange-bright); }

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

.report-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--bg-700);
}
.report-row:last-child { border-bottom: none; }
.rr-main { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }

/* ---------- Ticket conversation ---------- */

.msg-list { max-height: 480px; overflow-y: auto; padding-right: 6px; }
.msg { display: flex; gap: 11px; padding: 9px 0; }
.msg-avatar { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; }
.msg-main { flex: 1; min-width: 0; }
.msg-head { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-bottom: 3px; }
.msg-body { font-size: 13.5px; line-height: 1.55; }
.msg.is-bot .msg-body { color: var(--slate); }
.msg-embed {
  border-left: 3px solid var(--orange);
  background: var(--bg-800);
  padding: 8px 12px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 12.5px;
  margin-top: 4px;
  color: var(--slate);
}
.msg-attach { display: inline-block; font-size: 12px; color: var(--orange-bright); margin-top: 4px; }

/* ---------- Heatmap ---------- */

.heatmap { display: flex; gap: 3px; overflow-x: auto; padding-bottom: 4px; }
.hm-week { display: flex; flex-direction: column; gap: 3px; }
.hm-cell { width: 11px; height: 11px; border-radius: 2px; background: var(--bg-800); flex-shrink: 0; }
.hm-cell.empty { background: transparent; }
.hm-cell.lvl-0 { background: var(--bg-800); }
.hm-cell.lvl-1 { background: rgba(232,169,57,0.28); }
.hm-cell.lvl-2 { background: rgba(232,169,57,0.5); }
.hm-cell.lvl-3 { background: rgba(232,169,57,0.75); }
.hm-cell.lvl-4 { background: var(--orange); }
.hm-legend { display: flex; align-items: center; gap: 4px; margin-top: 12px; font-size: 11px; }

/* ---------- Bulk actions ---------- */

.bulk-bar {
  display: none;
  align-items: center;
  gap: 10px;
  background: var(--bg-800);
  border: 1px solid var(--orange);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 13px;
  animation: bulk-in 0.16s ease-out;
}
.bulk-bar.show { display: flex; }
@keyframes bulk-in { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }

input[type="checkbox"] { accent-color: var(--orange); cursor: pointer; }
input[type="color"] {
  width: 100%; height: 38px; padding: 3px;
  background: var(--bg-800); border: 1px solid var(--bg-700);
  border-radius: var(--radius); cursor: pointer;
}
.filter-bar input[type="datetime-local"], .field input[type="datetime-local"] {
  background: var(--bg-800); border: 1px solid var(--bg-700);
  border-radius: var(--radius); padding: 9px 12px;
  color: var(--cream); font-family: var(--font-body); font-size: 14px; width: 100%;
}
[data-theme="dark"] input[type="datetime-local"]::-webkit-calendar-picker-indicator { filter: invert(0.7); }

@media (max-width: 1000px) {
  .announce-layout { grid-template-columns: 1fr; }
  .preview-card { position: static; }
}

/* ============================================================
   Greggs theming pass — carrying the blue/gold identity through
   every surface, not just the login screen.
   ============================================================ */

/* Sidebar gets a soft blue wash at the top, echoing the brand mark,
   so the navigation reads as branded rather than neutral chrome. */
.sidebar { position: relative; overflow: hidden; }
.sidebar-glow {
  position: absolute;
  top: -80px; left: -40px;
  width: 240px; height: 220px;
  background: radial-gradient(circle at 30% 30%, rgba(26,77,143,0.55) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.sidebar > *:not(.sidebar-glow) { position: relative; z-index: 1; }

/* Page headings pick up a small gold rule, tying every page back to the
   counter/bakery motif without shouting. */
.page-title {
  position: relative;
  padding-top: 12px;
}
.page-title::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 36px; height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--orange) 0%, var(--blue-bright) 100%);
}

/* Card headings get a subtle blue tick to the left. */
.card h2 { padding-left: 11px; position: relative; }
.card h2::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 15px;
  border-radius: 3px;
  background: var(--blue-bright);
}

/* Counter strip reads as a shop-counter display: blue field, gold numerals. */
.counter-strip {
  background: linear-gradient(135deg, var(--blue-dim) 0%, var(--bg-700) 100%);
  border-color: var(--blue);
}
[data-theme="light"] .counter-strip { background: var(--bg-800); }
.counter-cell { background: rgba(16, 21, 43, 0.82); }
[data-theme="light"] .counter-cell { background: var(--bg-900); }

/* Tabs pick up the blue accent when active. */
.tab.active { background: var(--blue-dim); color: var(--cream); border-color: var(--blue-bright); }

/* Table headers get a touch more presence. */
th { color: var(--slate); font-weight: 700; }
thead tr { border-bottom: 2px solid var(--bg-700); }

/* ---------- Activity feed avatars ---------- */

.act-avatar { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; }
.act-target { color: var(--slate-dim); }

/* ---------- Role picker ---------- */

.role-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-800);
  border: 1px solid var(--bg-700);
  border-radius: 20px;
  padding: 6px 13px 6px 10px;
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.role-chip:hover { border-color: var(--blue-bright); }
.role-chip:has(input:checked) { background: var(--blue-dim); border-color: var(--blue-bright); font-weight: 600; }
.role-chip input[type="checkbox"] { margin: 0; }
.role-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

/* ---------- Permissions matrix ---------- */

.perm-scroll { overflow-x: auto; }
.perm-table { min-width: 620px; }
.perm-table th:not(:first-child) { text-align: center; }
.perm-cell { text-align: center; }
.perm-cell .yes { color: var(--green); font-weight: 700; }
.perm-cell .no { color: var(--bg-600); }
code {
  background: var(--bg-800);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--orange-bright);
}
