/* SRL web panel: one design system for every page.
   Pages link this first and only add their own layout on top. */
:root {
  /* surfaces */
  --bg:#0c0f13; --panel:#131820; --panel2:#1a212b; --panel3:#222b37;
  --line:#2a3440; --line2:#384453;
  /* text */
  --fg:#e8ecf1; --muted:#93a0af; --dim:#5f6b79;
  /* accents and states */
  --acc:#e10600; --acc-soft:rgba(225,6,0,.14);
  --ok:#2fd27a; --warn:#f5a623; --bad:#ff8a80; --blue:#3fa7ff; --yellow:#ffd23f;
  --gold:#ffd23f; --silver:#c9d1db; --bronze:#d9925b;
  /* type */
  --font:'Bahnschrift','Segoe UI Variable','Segoe UI',system-ui,sans-serif;
  --mono:ui-monospace,'Cascadia Mono',Consolas,monospace;
  --fs-xs:11px; --fs-sm:12px; --fs:13px; --fs-md:14px; --fs-lg:16px; --fs-xl:20px;
  /* shape */
  --r-sm:6px; --r:10px; --r-pill:20px;
  --header-h:56px;
  color-scheme:dark;
}
* { box-sizing:border-box; }
html, body { height:100%; }
body { margin:0; background:var(--bg); color:var(--fg); font:var(--fs)/1.45 var(--font); }
a { color:var(--blue); text-decoration:none; }
a:hover { text-decoration:underline; }
code { font:var(--fs-sm) var(--mono); background:var(--panel2); border:1px solid var(--line); border-radius:4px; padding:0 5px; }
::-webkit-scrollbar { width:10px; height:10px; }
::-webkit-scrollbar-thumb { background:var(--line2); border-radius:5px; border:2px solid var(--bg); }
::-webkit-scrollbar-track { background:transparent; }

/* ---------- header (same on every page) ---------- */
header { height:var(--header-h); display:flex; align-items:center; gap:12px; padding:0 16px;
         background:linear-gradient(180deg,#151b23,#11161c); border-bottom:1px solid var(--line); }
.logo { display:inline-block; background:var(--acc); color:#fff; font-weight:800; letter-spacing:.06em; padding:4px 7px;
        border-radius:4px; transform:skewX(-10deg); font-size:var(--fs-md); line-height:1.2; }
header .title { font-size:var(--fs-lg); font-weight:700; letter-spacing:.01em; white-space:nowrap; }

/* ---------- controls ---------- */
button, input, select, textarea { font:inherit; color:inherit; }
button { cursor:pointer; border:1px solid var(--line2); background:var(--panel2); border-radius:var(--r-sm);
         padding:6px 12px; line-height:1.35; white-space:nowrap; }
button:hover:not(:disabled) { border-color:var(--muted); }
button:disabled { opacity:.4; cursor:default; }
button.primary { background:var(--acc); border-color:var(--acc); color:#fff; font-weight:600; }
button.primary:hover:not(:disabled) { filter:brightness(1.1); border-color:var(--acc); }
button.go { background:#15361f; border-color:#2a7a46; color:#9ff0bf; font-weight:600; }
button.ghost { background:transparent; border-color:transparent; color:var(--muted); }
button.ghost:hover:not(:disabled) { color:var(--fg); border-color:var(--line2); }
button.danger { color:var(--bad); }
button.sm { padding:3px 8px; font-size:var(--fs-sm); }
a > button { color:var(--fg); }
input[type=text], input[type=number], input[type=email], input[type=date], input[type=datetime-local],
input:not([type]), select, textarea {
  background:var(--bg); border:1px solid var(--line2); border-radius:var(--r-sm); padding:6px 8px; min-width:0; }
input:focus, select:focus, textarea:focus { outline:none; border-color:var(--blue); }
input:disabled, select:disabled { opacity:.6; }
input[type=checkbox] { accent-color:var(--blue); width:15px; height:15px; }
textarea { font:var(--fs-sm)/1.45 var(--mono); width:100%; }

/* ---------- text ---------- */
h1 { font-size:var(--fs-xl); margin:0 0 6px; }
h2 { font-size:var(--fs-xl); margin:0 0 6px; }
h3, .section { font-size:var(--fs-xs); font-weight:700; text-transform:uppercase; letter-spacing:.09em; color:var(--muted); margin:18px 0 8px; }
.hint { color:var(--dim); font-size:var(--fs-sm); margin:6px 0; }
.muted { color:var(--muted); }
.sub { color:var(--dim); font-size:var(--fs-xs); display:block; }
.empty { padding:32px 16px; text-align:center; color:var(--muted); }

/* ---------- surfaces ---------- */
.card { background:var(--panel); border:1px solid var(--line); border-radius:var(--r); }
.card.pad { padding:14px 16px; }

/* ---------- tables ---------- */
table { width:100%; border-collapse:collapse; font-variant-numeric:tabular-nums; }
th, td { text-align:left; padding:8px 10px; border-bottom:1px solid var(--line); }
th { color:var(--muted); font-size:var(--fs-sm); font-weight:600; }
tr:last-child td { border-bottom:0; }
td.n, th.n { text-align:right; }

/* ---------- pills / status ---------- */
.pill { display:inline-block; font-size:var(--fs-xs); font-weight:600; padding:2px 9px; border-radius:var(--r-pill);
        border:1px solid var(--line2); color:var(--muted); white-space:nowrap; line-height:1.4; }
.pill.ok, .pill.open, .pill.current { color:var(--ok); border-color:rgba(47,210,122,.55); background:rgba(47,210,122,.08); }
.pill.warn, .pill.closed, .pill.missing { color:var(--warn); border-color:rgba(245,166,35,.5); background:rgba(245,166,35,.08); }
.pill.bad { color:var(--bad); border-color:rgba(255,138,128,.5); background:rgba(255,80,70,.1); }
.pill.info, .pill.next { color:var(--blue); border-color:rgba(63,167,255,.55); background:rgba(63,167,255,.08); }
.pill.finished { color:var(--fg); }
.pill.planned { border-style:dashed; }

/* ---------- tabs ---------- */
.tabs { display:flex; gap:4px; border-bottom:1px solid var(--line); }
.tabs button { border:0; border-radius:0; background:none; color:var(--muted); padding:10px 14px; font-weight:600;
               border-bottom:2px solid transparent; }
.tabs button:hover:not(:disabled) { color:var(--fg); }
.tabs button.on { color:var(--fg); border-bottom-color:var(--acc); }

/* ---------- toast ---------- */
#toast { position:fixed; bottom:18px; left:50%; transform:translateX(-50%) translateY(20px); opacity:0; pointer-events:none;
         background:#1e2732; border:1px solid var(--line2); padding:10px 16px; border-radius:8px; z-index:80;
         box-shadow:0 10px 30px rgba(0,0,0,.5); transition:.2s; max-width:70vw; }
#toast.show { opacity:1; transform:translateX(-50%); }
#toast.good { border-color:#2a7a46; color:#9ff0bf; }
#toast.bad { border-color:#7a2a2a; color:#ffb3ad; }
