/* Shared look for the admin console, provider panels and the captive portal.
   The palette is set at runtime from /api/public/brand (or the provider's theme):
     --brand    primary: buttons, active navigation, headings
     --brand-2  secondary: header strip, highlights, card edges
     --accent   small details: the diagonal slash, focus rings
   theme.js derives anything a brand leaves out, and picks readable text colours. */
:root {
  --brand: #0f766e;
  --brand-2: var(--brand);
  --accent: var(--brand-2);
  --on-brand: #fff;
  --brand-ink: var(--brand);          /* brand colour used as text */
  --bg: #f5f6f8;
  --panel: #ffffff;
  --ink: #16191d;
  --muted: #5b6470;
  --line: #e1e5ea;
  --ok: #15803d;
  --warn: #b45309;
  --bad: #b91c1c;
  --radius: 10px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1216; --panel: #171b21; --ink: #e8ebef; --muted: #9aa4b1; --line: #2a3038;
    --brand-ink: color-mix(in srgb, var(--brand) 62%, #fff);
    --ok: #4ade80; --warn: #fbbf24; --bad: #f87171;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; }
a { color: var(--brand-ink); }
h1, h2, h3 { letter-spacing: -.01em; }

/* Brand strip: the three logo colours, split by a diagonal slash. */
.strip { height: 4px; background: linear-gradient(100deg, var(--brand-2) 0 34%, var(--accent) 34% 38%, var(--brand) 38% 100%); }
.slash { display: inline-block; width: 5px; height: .9em; margin-right: 10px; background: var(--accent);
  transform: skewX(-20deg); border-radius: 1px; vertical-align: -1px; }

/* Logo lockup: logo | TAGLINE, as on the printed logo. */
.lockup { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lockup img { display: block; height: 40px; width: auto; max-width: 100%; }
.lockup .tag { border-left: 1px solid var(--line); padding-left: 12px; max-width: 150px; }
.tag { font-size: 10.5px; line-height: 1.35; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); font-weight: 500; }
.wordmark { font-weight: 800; font-size: 18px; color: var(--brand-ink); line-height: 1.15; }

button, .btn { font: inherit; font-weight: 600; border: 1px solid var(--brand); background: var(--brand); color: var(--on-brand);
  padding: 8px 14px; border-radius: 8px; cursor: pointer; text-decoration: none; display: inline-block;
  transition: filter .12s, background-color .12s; }
button:hover:not(:disabled), .btn:hover { filter: brightness(1.08); }
button.ghost, .btn.ghost { background: transparent; color: var(--brand-ink); border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); }
button.ghost:hover:not(:disabled), .btn.ghost:hover { background: color-mix(in srgb, var(--brand) 8%, transparent); filter: none; }
button.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-2);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-2) 22%, transparent); }
input[type="color"] { padding: 2px; height: 38px; cursor: pointer; }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.muted { color: var(--muted); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1 1 160px; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; border: 1px solid var(--line); }
.pill.ok { color: var(--ok); border-color: currentColor; }
.pill.warn { color: var(--warn); border-color: currentColor; }
.pill.bad { color: var(--bad); border-color: currentColor; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
tbody tr:hover td { background: color-mix(in srgb, var(--brand-2) 5%, transparent); }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
pre.cmd { white-space: pre-wrap; word-break: break-all; background: var(--bg); border: 1px dashed var(--line);
  padding: 12px; border-radius: 8px; margin: 8px 0; }
.toast { position: fixed; right: 16px; bottom: 16px; max-width: 360px; padding: 12px 14px; border-radius: 8px;
  background: var(--ink); color: var(--bg); box-shadow: 0 6px 24px rgba(0,0,0,.2); border-left: 4px solid var(--brand-2); }
.toast.bad { background: var(--bad); color: #fff; border-left-color: rgba(0,0,0,.25); }
