/* Tenancy Check — brand from flp4it.com: near-black #050709, lime #8EC740, Outfit. Tokens match the TeamBoard portal. */
@font-face {
  font-family: "Outfit Variable"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(vendor/outfit/outfit-latin-wght-normal.woff2) format("woff2-variations");
}
:root {
  --brand-black: #050709;
  --brand-lime: #8ec740;
  --bg: #f3f5f1; --surface: #ffffff; --surface-2: #f1f3ee;
  --ink: #050709; --ink-2: #4f5860; --ink-3: #69727d; --line: #e2e6de;
  --accent: #8ec740; --accent-ink: #050709; --accent-text: #4a7a16; --accent-soft: #edf6e1;
  --ok: #3f7d12; --ok-soft: #e8f4da;
  --warn: #a35a00; --warn-soft: #fcf0dc;
  --bad: #c0264f; --bad-soft: #fbe6ec;
  --radius: 14px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(5, 7, 9, .05), 0 8px 24px rgba(5, 7, 9, .06);
  --font: "Outfit Variable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #050709; --surface: #0e1317; --surface-2: #151b20; --ink: #f2f5ef; --ink-2: #aab3ba; --ink-3: #7d8790;
    --line: #222a31; --accent-text: #9fd552; --accent-soft: #18240f;
    --ok: #9fd552; --ok-soft: #1a2810; --warn: #f2b45a; --warn-soft: #33240e; --bad: #ff6b8e; --bad-soft: #3a1420;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #050709; --surface: #0e1317; --surface-2: #151b20; --ink: #f2f5ef; --ink-2: #aab3ba; --ink-3: #7d8790;
  --line: #222a31; --accent-text: #9fd552; --accent-soft: #18240f;
  --ok: #9fd552; --ok-soft: #1a2810; --warn: #f2b45a; --warn-soft: #33240e; --bad: #ff6b8e; --bad-soft: #3a1420;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15.5px; line-height: 1.5; }
body { min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-text); }
h1, h2, h3 { margin: 0; line-height: 1.1; }
h2 { font-size: 1.45rem; font-weight: 800; text-transform: uppercase; letter-spacing: .005em; }
h3 { font-size: 1.02rem; font-weight: 700; }
code, .mono { font-family: var(--mono); font-size: .88em; }
code { background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
.boot { padding: 40px; text-align: center; color: var(--ink-3); }
.muted { color: var(--ink-2); }
.small { font-size: .85rem; }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- top bar (always brand black, like flp4it.com) ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--brand-black); color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.topbar-inner { max-width: 1400px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 22px; height: 72px; }
.brand { display: flex; align-items: center; gap: 14px; white-space: nowrap; text-decoration: none; color: inherit; }
.brand-logo { height: 38px; width: auto; display: block; }
.brand-tag { font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--brand-lime);
  padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, .2); line-height: 1.2; }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav a { text-decoration: none; color: rgba(255, 255, 255, .72); padding: 10px 14px; border-radius: 999px; font-weight: 500; white-space: nowrap; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.nav a.active { color: var(--brand-black); background: var(--brand-lime); font-weight: 600; }
.top-actions { display: flex; gap: 6px; }
.icon-btn { background: transparent; border: 1px solid rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .8); border-radius: 999px;
  height: 36px; padding: 0 14px; font: inherit; font-size: .85rem; cursor: pointer; white-space: nowrap; }
.icon-btn:hover { color: #fff; border-color: rgba(255, 255, 255, .4); }

/* ---------- hero: dark band with a green glow and curved bottom edge ---------- */
.hero { position: relative; background: var(--brand-black); color: #fff; overflow: hidden; padding: 34px 20px 92px; }
.hero::before { content: ""; position: absolute; inset: 0;
  background: radial-gradient(900px 340px at 85% -10%, rgba(142, 199, 64, .42), transparent 65%),
              linear-gradient(115deg, transparent 55%, rgba(142, 199, 64, .14) 55.2%, transparent 78%); }
.hero::after { content: ""; position: absolute; left: -10%; right: -10%; bottom: -1px; height: 70px; background: var(--bg);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.hero-inner { position: relative; z-index: 1; max-width: 1400px; margin: 0 auto; }
.eyebrow { font-size: .76rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--brand-lime); }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); font-weight: 800; text-transform: uppercase; margin: 6px 0 4px; }
.hero p { margin: 0; color: rgba(255, 255, 255, .72); max-width: 760px; }
.stats { position: relative; z-index: 2; max-width: 1400px; margin: -72px auto 0; padding: 0 20px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px;
  cursor: pointer; text-align: left; font: inherit; color: inherit; border-top: 4px solid var(--line); }
.stat:hover { transform: translateY(-1px); }
.stat.sel { outline: 2px solid var(--accent); outline-offset: -2px; }
.stat .n { font-size: 2.1rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .l { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.stat.total { border-top-color: var(--brand-black); }
.stat.enrolled { border-top-color: var(--bad); } .stat.enrolled .n { color: var(--bad); }
.stat.unverified { border-top-color: var(--warn); } .stat.unverified .n { color: var(--warn); }
.stat.clean { border-top-color: var(--accent); } .stat.clean .n { color: var(--ok); }

/* ---------- layout ---------- */
main { max-width: 1400px; margin: 0 auto; padding: 22px 20px 60px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px; border-bottom: 1px solid var(--line); }
.toolbar .grow { flex: 1; min-width: 200px; }
input[type=text], input[type=search], input[type=password], select, textarea {
  font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 9px 12px; width: 100%; }
select { width: auto; }
textarea { min-height: 80px; resize: vertical; }
.btn { font: inherit; font-weight: 600; border-radius: 999px; padding: 9px 18px; cursor: pointer; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 5px 12px; font-size: .85rem; }

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3);
  padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
td .sub { font-size: .82rem; color: var(--ink-3); }
.empty { padding: 50px 20px; text-align: center; color: var(--ink-3); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.enrolled { background: var(--bad-soft); color: var(--bad); }
.pill.clean { background: var(--ok-soft); color: var(--ok); }
.pill.unverified { background: var(--warn-soft); color: var(--warn); }
.tenant { font-weight: 600; margin-top: 3px; font-size: .88rem; }

/* ---------- device page ---------- */
.back { display: inline-block; margin-bottom: 14px; text-decoration: none; font-weight: 600; }
.dev-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: flex-end; margin-bottom: 16px; }
.dev-head h2 { font-size: 1.8rem; }
.verdict { border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px; border: 1px solid transparent; }
.verdict .big { font-size: 1.35rem; font-weight: 800; text-transform: uppercase; }
.verdict.enrolled { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.verdict.clean { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.verdict.unverified { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.verdict p { margin: 4px 0 0; color: var(--ink); }
.grid2 { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; align-items: start; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; margin: 0; }
.kv dt { color: var(--ink-3); font-size: .85rem; padding-top: 1px; }
.kv dd { margin: 0; word-break: break-word; }
.history { list-style: none; margin: 0; padding: 0; }
.history li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.history li:last-child { border-bottom: 0; }
.history .row1 { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
details summary { cursor: pointer; color: var(--accent-text); font-size: .85rem; margin-top: 6px; }
pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; overflow: auto; max-height: 420px; font-size: .8rem; }
.section-title { margin: 0 0 12px; }
.form-row { margin-bottom: 12px; }
.form-row label { display: block; font-size: .85rem; color: var(--ink-2); margin-bottom: 4px; }

/* ---------- setup page ---------- */
.steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.step h3 { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.step .num { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: inline-grid; place-items: center; font-weight: 800; flex: none; }
.step ol, .step ul { padding-left: 20px; margin: 8px 0; }
.step li { margin: 4px 0; }
.step .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.note { border-left: 3px solid var(--warn); background: var(--warn-soft); padding: 10px 14px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 10px 0; font-size: .92rem; }
.legend { display: grid; gap: 10px; }
.legend div { display: flex; gap: 12px; align-items: baseline; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; background: var(--brand-black); position: relative; overflow: hidden; padding: 20px; }
.login::before { content: ""; position: absolute; inset: 0; background: radial-gradient(800px 400px at 80% 0%, rgba(142, 199, 64, .38), transparent 65%); }
.login-card { position: relative; width: 100%; max-width: 380px; background: #0e1317; color: #f2f5ef; border: 1px solid #222a31; border-radius: 18px; padding: 30px; }
.login-card img { height: 48px; margin-bottom: 18px; }
.login-card h1 { font-size: 1.3rem; text-transform: uppercase; font-weight: 800; margin-bottom: 4px; }
.login-card p { color: #aab3ba; margin: 0 0 18px; }
.login-card input { background: #151b20; border-color: #222a31; color: #f2f5ef; margin-bottom: 12px; }
.login-card .btn { width: 100%; justify-content: center; }
.err { color: #ff6b8e; min-height: 1.4em; font-size: .9rem; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--brand-black); color: #fff; padding: 10px 18px;
  border-radius: 999px; box-shadow: var(--shadow); z-index: 50; font-size: .92rem; }

@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid2, .steps { grid-template-columns: 1fr; }
  .brand-tag { display: none; }
}
@media (max-width: 640px) {
  .topbar-inner { padding: 0 16px; gap: 12px; height: 62px; }
  .brand-logo { height: 30px; }
  #themeBtn { display: none; }
  .nav a { padding: 8px 12px; }
  .hero { padding: 24px 16px 86px; }
  .stats, main { padding-left: 16px; padding-right: 16px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .hide-sm { display: none; }
  td, th { padding: 10px; }
}
