/* ── SeatPlan shared styles ─────────────────────────
   Tokens follow docs/design/seatplan-ui-spec.md ("Option A" system shared with
   testgen). Fonts are vendored locally — the CSP forbids remote assets. */

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400 1000;
  src: url('../vendor/fonts/dm-sans-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400 1000;
  src: url('../vendor/fonts/dm-sans-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400 800;
  src: url('../vendor/fonts/jetbrains-mono-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400 800;
  src: url('../vendor/fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Tokens ─────────────────────────────────────── */
:root, :root[data-theme='dark'] {
  --bg: #0B1120;
  --panel: #131D31;
  --field: #1A2438;
  --line: #22304C;
  --text: #E6EBF4;
  --muted: #8494AD;
  --faint: #5C6B85;
  --accent: #14B8A6;
  --accent-deep: #0F766E;
  --accent-tint: #14B8A626;
  --accent-strong: #2DD4BF;   /* hover text/icons, from testgen */
  --accent-ink: #06201C;      /* text on top of --accent */
  --amber: #E8A33D;
  --amber-tint: #E8A33D26;

  --font-ui: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --r-modal: 16px;
  --r-card: 10px;
  --r-btn: 8px;

  --shadow-modal: 0 18px 50px rgba(0, 0, 0, 0.45);
}
:root[data-theme='light'] {
  --bg: #F4F6F9;
  --panel: #FFFFFF;
  --field: #EEF2F7;
  --line: #E4E8EF;
  --text: #17202B;
  --muted: #667085;
  --faint: #98A2B3;
  --accent: #0D9488;
  --accent-deep: #0F766E;
  --accent-tint: #D9F2EF;
  --accent-strong: #0D9488;
  --accent-ink: #FFFFFF;
  --amber: #B45309;
  --amber-tint: #FEF3E2;

  --shadow-modal: 0 18px 50px rgba(23, 32, 43, 0.18);
}

/* ── Base ───────────────────────────────────────── */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-weight: 700; }
a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }

.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }

/* Small uppercase mono section labels (LAYOUTS, FURNITURE, …) */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--faint);
}

/* ── Buttons ────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  border-radius: var(--r-btn); border: 1px solid transparent;
  padding: 0.5rem 0.95rem; font-size: 0.88rem; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-secondary { background: var(--field); color: var(--text); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent-strong); }
.btn-ghost { background: transparent; color: var(--muted); border-color: var(--line); }
.btn-ghost:hover { color: var(--text); border-color: var(--faint); }
.btn-danger { background: transparent; color: var(--amber); border-color: var(--line); }
.btn-danger:hover { border-color: var(--amber); background: var(--amber-tint); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn .icon { width: 14px; height: 14px; flex: none; }
.btn-block { width: 100%; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: var(--r-btn);
  background: transparent; border: 1px solid transparent; color: var(--muted);
  cursor: pointer; padding: 0;
}
.icon-btn:hover { color: var(--text); background: var(--field); }
.icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.icon-btn .icon { width: 15px; height: 15px; }

/* ── Fields ─────────────────────────────────────── */
.input, .select, .textarea {
  width: 100%; background: var(--field); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--r-btn);
  padding: 0.5rem 0.7rem; font-size: 0.88rem; font-family: inherit;
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-tint);
}

/* ── Chips & pills ──────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 0.3rem;
  border-radius: 999px; padding: 0.15rem 0.6rem;
  font-size: 0.75rem; font-weight: 600;
  background: var(--accent-tint); color: var(--accent-strong);
}
.chip-amber { background: var(--amber-tint); color: var(--amber); }
.chip-neutral { background: var(--field); color: var(--muted); border: 1px solid var(--line); }

.count-badge {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600;
  background: var(--accent-tint); color: var(--accent-strong);
  border-radius: 999px; padding: 0.05rem 0.5rem;
}

/* ── Toggle switch ──────────────────────────────── */
.switch { position: relative; display: inline-block; width: 36px; height: 20px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch-track {
  position: absolute; inset: 0; border-radius: 999px;
  background: var(--field); border: 1px solid var(--line); transition: background 0.15s;
}
.switch-track::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--muted); transition: transform 0.15s, background 0.15s;
}
.switch input:checked + .switch-track { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(16px); background: var(--accent-ink); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Modal ──────────────────────────────────────── */
.modal-scrim {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(4, 8, 18, 0.65);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
}
.modal {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-modal); box-shadow: var(--shadow-modal);
  width: 100%; max-width: 560px; max-height: calc(100vh - 4rem);
  display: flex; flex-direction: column; overflow: hidden;
}
.modal-head {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 1.1rem 1.3rem 0.9rem;
}
.modal-head h2 { font-size: 1.15rem; flex: 1; }
.modal-body { padding: 0 1.3rem 1.1rem; overflow-y: auto; }
.modal-foot {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.9rem 1.3rem; border-top: 1px solid var(--line);
}
.modal-foot .spacer { flex: 1; }

/* ── App header ─────────────────────────────────── */
.app-header {
  display: flex; align-items: center; gap: 1rem;
  height: 56px; padding: 0 1rem;
  background: var(--panel); border-bottom: 1px solid var(--line);
}
.brand {
  display: flex; align-items: center; gap: 0.5rem;
  font-weight: 700; font-size: 1.02rem; color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand .icon { width: 22px; height: 22px; color: var(--accent); }
.breadcrumb { display: flex; align-items: center; gap: 0.45rem; font-size: 0.9rem; color: var(--muted); }
.breadcrumb strong { color: var(--text); font-weight: 600; }
.breadcrumb .sep { color: var(--faint); }
.header-spacer { flex: 1; }

.avatar-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 700; font-size: 0.8rem; border: none; cursor: pointer;
}

/* ── Icons ──────────────────────────────────────── */
.icon { display: inline-block; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-fill { fill: currentColor; stroke: none; }

/* The hidden attribute must win over display rules on components. */
[hidden] { display: none !important; }

.status-pill .icon, .conflict-pill .icon { width: 14px; height: 14px; flex: none; }
.chip .icon { width: 11px; height: 11px; }
