/* PhotoFlix portal. One stylesheet, no build step, light and dark from the same
   tokens. The BMS and the AMS use a copy of this file with a different accent —
   they are separate repositories and deploy on their own, so a shared package
   would buy less than it costs. */
:root {
  color-scheme: light dark;
  --accent: #2f6fe4;
  --accent-ink: #ffffff;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f0f2f8;
  --ink: #141822;
  --ink-dim: #5c6478;
  --line: #e2e6ef;
  --good: #108a4a;
  --warn: #9a5b00;
  --bad: #c0362c;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0f16;
    --surface: #141924;
    --surface-2: #1b2230;
    --ink: #eef1f7;
    --ink-dim: #96a0b5;
    --line: #242c3b;
    --good: #43c47d;
    --warn: #e0a243;
    --bad: #f0675c;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  --bg: #0c0f16; --surface: #141924; --surface-2: #1b2230;
  --ink: #eef1f7; --ink-dim: #96a0b5; --line: #242c3b;
  --good: #43c47d; --warn: #e0a243; --bad: #f0675c; --shadow: none;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
h1, h2, h3 { letter-spacing: -0.015em; margin: 0 0 .4em; }
h1 { font-size: 28px; font-weight: 650; }
h2 { font-size: 19px; font-weight: 620; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0 0 1em; }
.muted { color: var(--ink-dim); }
.small { font-size: 13px; }

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

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 18px;
  padding: 0 24px; height: 60px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 9px; font-weight: 650; letter-spacing: -0.02em; }
.logo .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.topbar nav { display: flex; gap: 4px; margin-left: 10px; flex-wrap: wrap; }
.topbar nav button {
  background: none; border: 0; padding: 8px 13px; border-radius: 8px;
  color: var(--ink-dim); font: inherit; font-weight: 520; cursor: pointer;
}
.topbar nav button:hover { background: var(--surface-2); color: var(--ink); }
.topbar nav button[aria-current="page"] { background: var(--surface-2); color: var(--ink); }
.topbar .spacer { flex: 1; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 28px 24px 80px; }
.page { display: none; }
.page.active { display: block; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }

.grid { display: grid; gap: 14px; }
.grid.cols { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 2px; }
.card .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

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

button, .btn {
  font: inherit; font-weight: 550;
  border-radius: 9px; padding: 9px 15px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  cursor: pointer;
}
button:hover { background: var(--surface-2); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button.primary:hover { filter: brightness(1.07); }
button.ghost { border-color: transparent; background: none; color: var(--ink-dim); }
button.ghost:hover { background: var(--surface-2); color: var(--ink); }
button.danger { color: var(--bad); }
button.small { padding: 5px 10px; font-size: 13px; }

input, select, textarea {
  font: inherit; width: 100%;
  padding: 9px 12px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
label { display: block; font-size: 13px; font-weight: 550; color: var(--ink-dim); margin-bottom: 5px; }
.field { margin-bottom: 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-dim);
  font-size: 12px; font-weight: 600;
}
.pill.good { background: color-mix(in srgb, var(--good) 15%, transparent); color: var(--good); }
.pill.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.pill.bad  { background: color-mix(in srgb, var(--bad) 15%, transparent); color: var(--bad); }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-dim); font-weight: 600; }
tr:last-child td { border-bottom: 0; }

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

/* --- sign in ---------------------------------------------------------- */

.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card .logo { justify-content: center; margin-bottom: 18px; font-size: 19px; }
.tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 10px; margin-bottom: 18px; }
.tabs button { flex: 1; border: 0; background: none; border-radius: 7px; }
.tabs button[aria-pressed="true"] { background: var(--surface); box-shadow: var(--shadow); }

.notice { padding: 11px 14px; border-radius: 9px; font-size: 14px; margin-bottom: 14px; }
.notice.error { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }
.notice.info { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }

/* --- public queue page ------------------------------------------------ */

.q-page { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.q-card { width: 100%; max-width: 420px; text-align: center; }
.q-number { font: 700 64px/1 "Inter", system-ui, sans-serif; letter-spacing: -0.03em; margin: 8px 0; }
.q-serving { font: 600 34px/1 "Inter", system-ui, sans-serif; color: var(--ink-dim); }
.q-ahead { font-size: 17px; }

@media (max-width: 640px) {
  .wrap { padding: 20px 16px 64px; }
  .topbar { padding: 0 16px; height: auto; flex-wrap: wrap; gap: 8px; padding-bottom: 10px; padding-top: 10px; }
  .field-row { grid-template-columns: 1fr; }
}
