/* Lead Desk — one stylesheet, three themes (Auto Lab light, Jax dark, admin neutral). */
:root {
  --brand: #2F6FEB;
  --ink: #15171C;
  --bg: #F3F3F1;
  --surface: #FFFFFF;
  --surface-2: #F8F8F6;
  --line: #E3E2DE;
  --text: #17181B;
  --muted: #676A72;
  --good: #16824A;
  --good-bg: #E6F4EC;
  --warn: #A35F00;
  --warn-bg: #FFF3DC;
  --bad: #B42318;
  --bad-bg: #FDECEA;
  --radius: 10px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
[data-brand="jax"] {
  --bg: #0E0E10;
  --surface: #17171B;
  --surface-2: #1E1E23;
  --line: #2C2C33;
  --text: #EDEAE3;
  --muted: #9C9AA2;
  --good: #4CC38A;
  --good-bg: #133022;
  --warn: #F0B44C;
  --warn-bg: #33270F;
  --bad: #F27C70;
  --bad-bg: #3A1915;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: 1.5rem; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; }
h3 { font-size: .95rem; }
p { margin: .25rem 0 .75rem; }
small, .muted { color: var(--muted); }
code, .mono { font-family: var(--mono); font-size: .85em; }

/* top bar */
.topbar { background: var(--ink); color: #fff; border-bottom: 3px solid var(--brand); }
[data-brand="jax"] .topbar { background: #000; }
.topbar .in { max-width: 1120px; margin: 0 auto; padding: .7rem 1rem; display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.mark { display: flex; align-items: baseline; gap: .5rem; text-decoration: none; }
.mark b { font-size: 1.05rem; letter-spacing: .02em; text-transform: uppercase; }
.mark span { font-size: .75rem; opacity: .65; text-transform: uppercase; letter-spacing: .12em; }
.nav { display: flex; gap: .2rem; flex-wrap: wrap; flex: 1; }
.nav a { color: #fff; text-decoration: none; opacity: .75; padding: .3rem .6rem; border-radius: 6px; font-size: .9rem; }
.nav a:hover, .nav a.on { opacity: 1; background: rgba(255,255,255,.1); }
.who { font-size: .85rem; opacity: .8; display: flex; gap: .75rem; align-items: center; }
.who a { color: #fff; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.grid { display: grid; gap: 1rem; }
.cols-2 { grid-template-columns: 1fr 1fr; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.side { grid-template-columns: 2fr 1fr; }
@media (max-width: 820px) { .cols-2, .cols-3, .side { grid-template-columns: 1fr; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.card > h2 { display: flex; align-items: center; gap: .5rem; }
.row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.stack > * + * { margin-top: .6rem; }

/* status hero */
.hero { border-radius: var(--radius); padding: 1.25rem 1.3rem; display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; border: 1px solid var(--line); background: var(--surface); }
.hero.on { border-left: 6px solid var(--good); }
.hero.off { border-left: 6px solid var(--muted); }
.hero .state { font-size: 1.35rem; font-weight: 700; display: flex; align-items: center; gap: .55rem; }
.dot { width: .7rem; height: .7rem; border-radius: 50%; display: inline-block; background: var(--muted); }
.dot.on { background: var(--good); box-shadow: 0 0 0 4px var(--good-bg); }
.dot.off { background: var(--bad); }

/* buttons */
button, .btn { font: inherit; font-weight: 600; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); padding: .5rem .95rem; border-radius: 8px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; }
button:hover, .btn:hover { filter: brightness(.97); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
[data-brand="jax"] .btn-primary { color: #111; }
.btn-big { padding: .8rem 1.4rem; font-size: 1.05rem; }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-good { background: var(--good); border-color: var(--good); color: #fff; }
.btn-sm { padding: .25rem .6rem; font-size: .85rem; }
form.inline { display: inline; margin: 0; }

/* forms */
label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .25rem; }
label small { font-weight: 400; }
input[type=text], input[type=password], input[type=number], input[type=time], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 8px; padding: .5rem .65rem;
}
textarea { min-height: 6rem; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.field { margin-bottom: .85rem; }
.checks { display: flex; flex-wrap: wrap; gap: .4rem .9rem; }
.checks label { font-weight: 500; display: flex; align-items: center; gap: .35rem; margin: 0; }

/* lists */
.alert-item { border: 1px solid var(--line); border-radius: 8px; padding: .75rem .85rem; background: var(--surface-2); }
.alert-item.ah { border-left: 4px solid var(--brand); }
.alert-item .top { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.alert-item .name { font-weight: 700; }
.pill { display: inline-block; font-size: .75rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.pill.good { background: var(--good-bg); color: var(--good); border-color: transparent; }
.pill.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.pill.bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.pill.brand { background: var(--brand); color: #fff; border-color: transparent; }
[data-brand="jax"] .pill.brand { color: #111; }
.count { background: var(--brand); color: #fff; border-radius: 999px; padding: 0 .5rem; font-size: .8rem; }
[data-brand="jax"] .count { color: #111; }

table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: .4rem .5rem; border-bottom: 1px solid var(--line); }
td { padding: .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.scroll { overflow-x: auto; }
.ev-in { color: var(--text); }
.ev-out { color: var(--good); }
.ev-skip { color: var(--muted); }
.ev-error { color: var(--bad); }

.flash { border-radius: 8px; padding: .65rem .9rem; margin-bottom: 1rem; font-weight: 600; }
.flash.ok { background: var(--good-bg); color: var(--good); }
.flash.warn { background: var(--warn-bg); color: var(--warn); }
.banner { border-radius: 8px; padding: .65rem .9rem; margin-bottom: 1rem; background: var(--bad-bg); color: var(--bad); font-weight: 600; }
.banner.warn { background: var(--warn-bg); color: var(--warn); }

.tabs { display: flex; gap: .35rem; margin-bottom: 1rem; flex-wrap: wrap; }
.tabs a { text-decoration: none; padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: .9rem; }
.tabs a.on { background: var(--brand); border-color: var(--brand); color: #fff; }
[data-brand="jax"] .tabs a.on { color: #111; }

.kill { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.kill.active { background: var(--bad-bg); border-color: var(--bad); }
.toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.toggle button { border: 0; border-radius: 0; padding: .3rem .8rem; background: var(--surface-2); color: var(--muted); }
.toggle button.sel-on { background: var(--good); color: #fff; }
.toggle button.sel-off { background: var(--muted); color: #fff; }

pre.prompt { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: .8rem; font: .82rem/1.45 var(--mono); max-height: 26rem; overflow: auto; }
.bubble { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; white-space: pre-wrap; }
.copy { display: flex; gap: .4rem; }
.copy input { font-family: var(--mono); font-size: .8rem; }
.stat { font-size: 1.6rem; font-weight: 800; }
.login { max-width: 380px; margin: 9vh auto; }
.login .brandname { font-size: 1.6rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--brand); }
