/* ════════════════════════════════════════════════════════════════════════════
   Shared theme for the scheduling app.

   The variable names and values match Server/public/style.css exactly, so this
   app looks like the rest of StarOrderBook and a theme chosen on the main site
   (persisted as `sl_theme` in localStorage) carries straight over. Only the
   themes are copied — none of the main app's layout CSS — so this file can be
   edited freely without any risk to the live dashboard.
   ══════════════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0f0f1a;
  --surface:   #16162a;
  --surface2:  #1e1e35;
  --border:    #2a2a46;
  --accent:    #27ae60;
  --accent2:   #3498db;
  --gold:      #f39c12;
  --danger:    #e74c3c;
  --text:      #dde1ee;
  --muted:     #6b7094;
  --orange:    #e67e22;
  --input-bg:  #0b0b16;
  --radius:    6px;
  --header-h:  52px;
}

[data-theme="light"] {
  --bg: #f0f2f7;  --surface: #ffffff; --surface2: #f5f7fb; --border: #d1d5e0;
  --accent: #1e8449; --accent2: #2980b9; --gold: #d68910; --danger: #c0392b;
  --orange: #d35400; --text: #1a1d2e; --muted: #7a82a0; --input-bg: #e8eaf0;
}
[data-theme="solarized"] {
  --bg: #002b36; --surface: #073642; --surface2: #0a4553; --border: #14515f;
  --accent: #859900; --accent2: #268bd2; --gold: #b58900; --danger: #dc322f;
  --orange: #cb4b16; --text: #93a1a1; --muted: #586e75; --input-bg: #001f27;
}
[data-theme="nord"] {
  --bg: #2e3440; --surface: #3b4252; --surface2: #434c5e; --border: #4c566a;
  --accent: #a3be8c; --accent2: #81a1c1; --gold: #ebcb8b; --danger: #bf616a;
  --orange: #d08770; --text: #eceff4; --muted: #7b88a1; --input-bg: #272c36;
}
[data-theme="dracula"] {
  --bg: #282a36; --surface: #343746; --surface2: #3d4152; --border: #4a4d61;
  --accent: #23a852; --accent2: #6272a4; --gold: #f1fa8c; --danger: #ff5555;
  --orange: #ffb86c; --text: #f8f8f2; --muted: #7f849c; --input-bg: #21222c;
}
[data-theme="midnight"] {
  --bg: #050a14; --surface: #0b1220; --surface2: #111a2e; --border: #1d2942;
  --accent: #0ea56a; --accent2: #1a6fdb; --gold: #d99a2b; --danger: #d64545;
  --orange: #cc7a29; --text: #c8d8f0; --muted: #5a6b8c; --input-bg: #03060d;
}
[data-theme="slate"] {
  --bg: #1a1d23; --surface: #22262e; --surface2: #2a2f38; --border: #363c47;
  --accent: #2ecc71; --accent2: #3b82f6; --gold: #eab308; --danger: #ef4444;
  --orange: #f97316; --text: #e2e8f0; --muted: #94a3b8; --input-bg: #15171c;
}
[data-theme="hc"] {
  --bg: #000000; --surface: #0d0d0d; --surface2: #1a1a1a; --border: #444444;
  --accent: #00a550; --accent2: #0088cc; --gold: #ffcc00; --danger: #ff3333;
  --orange: #ff8800; --text: #ffffff; --muted: #aaaaaa; --input-bg: #000000;
}
[data-theme="sepia"] {
  --bg: #f4efe6; --surface: #fffdf8; --surface2: #efe8db; --border: #d8ceba;
  --accent: #5a7a3a; --accent2: #5b7fa6; --gold: #b8860b; --danger: #a83232;
  --orange: #bf6516; --text: #2c2416; --muted: #857a63; --input-bg: #eae2d3;
}

/* ── Base ──────────────────────────────────────────────────────────────────── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent2); }

/* ── Controls ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface2); color: var(--text);
  font-size: 13px; font-weight: 500; font-family: inherit;
  cursor: pointer; transition: filter .12s, border-color .12s;
}
.btn:hover:not(:disabled) { filter: brightness(1.15); border-color: var(--muted); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-blue    { background: var(--accent2); border-color: var(--accent2); color: #fff; }
.btn-danger  { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-ghost   { background: transparent; }
.btn-sm      { padding: 5px 10px; font-size: 12px; }

input, select, textarea {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--input-bg); color: var(--text);
  font-size: 13px; font-family: inherit; width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent2);
}
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }

.field { margin-bottom: 12px; }
.row   { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 0; }

/* ── Surfaces ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
}
.muted { color: var(--muted); }
.mono  { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.pill {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.pill-ok      { background: rgba(39,174,96,.18);  color: var(--accent); }
.pill-warn    { background: rgba(243,156,18,.18); color: var(--gold); }
.pill-danger  { background: rgba(231,76,60,.18);  color: var(--danger); }
.pill-info    { background: rgba(52,152,219,.18); color: var(--accent2); }
.pill-muted   { background: var(--surface2);      color: var(--muted); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 12px 18px; border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0,0,0,.4);
  z-index: 9999; max-width: min(90vw, 420px); font-size: 13px;
}
.toast.err { border-left-color: var(--danger); }

.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--accent);
  animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty { text-align: center; color: var(--muted); padding: 40px 20px; font-size: 13px; }
