/* WP Sentinel Console — design system (recreated from the hi-fi handoff).
   Fonts: Inter / Inter Tight preferred if present on the system; no external font
   fetch (keeps the strict CSP and avoids third-party requests on a security tool). */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
::selection { background: rgba(11,87,208,.18); }

:root {
  --bg:#f5f7fb; --surface:#ffffff; --surface-2:#f0f3f9; --surface-3:#e7ecf4;
  --ink:#16212e; --mut:#5b6b7c; --faint:#95a2b3; --line:#e2e8f0; --line-2:#d3dbe6;
  --brand:#0b57d0; --brand-ink:#ffffff; --brand-weak:#e8f0fe; --brand-line:#c5d9fb;
  --ok:#0a7d33; --ok-bg:#e6f4ea; --ok-line:#bfe3c9;
  --amber:#9a6a00; --amber-bg:#fff3d6; --amber-line:#f0dca3;
  --hi:#b3261e; --hi-bg:#fbe9e7; --hi-line:#f2c6c1;
  --shadow: 0 1px 2px rgba(16,33,53,.06), 0 10px 30px rgba(16,33,53,.08);
  --shadow-sm: 0 1px 2px rgba(16,33,53,.08);
  --font: 'Inter','Segoe UI',system-ui,-apple-system,Roboto,Helvetica,Arial,sans-serif;
  --font-tight: 'Inter Tight','Inter','Segoe UI',system-ui,sans-serif;
  --mono: ui-monospace, Menlo, Consolas, monospace;
}
:root[data-theme="dark"] {
  --bg:#000000; --surface:#0b0b0d; --surface-2:#151517; --surface-3:#1f1f22;
  --ink:#f2f3f5; --mut:#9a9ba1; --faint:#6a6b71; --line:#232326; --line-2:#303034;
  --brand:#5b93ff; --brand-ink:#050505; --brand-weak:#0f1a30; --brand-line:#274068;
  --ok:#4ade80; --ok-bg:#0c1a12; --ok-line:#193324;
  --amber:#f4c65c; --amber-bg:#1c1708; --amber-line:#3a2f12;
  --hi:#ff7368; --hi-bg:#1f0e0c; --hi-line:#4a2019;
  --shadow: 0 1px 2px rgba(0,0,0,.6), 0 8px 24px rgba(0,0,0,.55);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.6);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:#000000; --surface:#0b0b0d; --surface-2:#151517; --surface-3:#1f1f22;
    --ink:#f2f3f5; --mut:#9a9ba1; --faint:#6a6b71; --line:#232326; --line-2:#303034;
    --brand:#5b93ff; --brand-ink:#050505; --brand-weak:#0f1a30; --brand-line:#274068;
    --ok:#4ade80; --ok-bg:#0c1a12; --ok-line:#193324;
    --amber:#f4c65c; --amber-bg:#1c1708; --amber-line:#3a2f12;
    --hi:#ff7368; --hi-bg:#1f0e0c; --hi-line:#4a2019;
    --shadow: 0 1px 2px rgba(0,0,0,.6), 0 8px 24px rgba(0,0,0,.55);
    --shadow-sm: 0 1px 2px rgba(0,0,0,.6);
  }
}

body {
  background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 14px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1,h2,h3 { font-family: var(--font-tight); font-weight: 700; letter-spacing: -.02em; margin: 0; }
.mono { font-family: var(--mono); }
.mut { color: var(--mut); } .faint { color: var(--faint); }
.small { font-size: 12.5px; } .center { text-align: center; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }
@keyframes barmove { 0%{background-position:0 0} 100%{background-position:28px 0} }
@keyframes fadeup { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:none} }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center;
  gap: 14px; flex-wrap: wrap; padding: 9px 18px; background: var(--surface);
  border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.logo { display: flex; align-items: center; gap: 9px; margin-right: 6px; }
.logo-tile { width: 26px; height: 26px; border-radius: 8px; background: var(--brand);
  display: flex; align-items: center; justify-content: center; }
.logo-word { font-family: var(--font-tight); font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.theme-toggle { margin-left: auto; display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink); font: inherit; font-size: 13px;
  font-weight: 500; cursor: pointer; }
.theme-toggle .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }
.topnav { display:flex; gap:4px; flex-wrap:wrap; }
.topnav a { padding:6px 11px; border-radius:8px; font-size:13px; font-weight:500; color:var(--mut); }
.topnav a:hover { background:var(--surface-2); text-decoration:none; }

/* ---------- layout wrappers ---------- */
.wrap { max-width: 920px; margin: 26px auto; padding: 0 18px; }
.auth-wrap { min-height: calc(100vh - 49px); display: flex; align-items: center;
  justify-content: center; padding: 40px 20px; }
.auth-col { width: 100%; max-width: 400px; animation: fadeup .4s ease; }
.auth-col.wide { max-width: 420px; }
.brandmark { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 26px; }
.brand-hero { width: 52px; height: 52px; border-radius: 15px; background: var(--brand);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 22px rgba(11,87,208,.35); }
.brand-title { font-family: var(--font-tight); font-size: 22px; font-weight: 700; letter-spacing: -.02em; text-align:center; }
.brand-sub { color: var(--mut); font-size: 14px; margin-top: 3px; text-align:center; }
.auth-foot { text-align: center; margin-top: 18px; font-size: 12px; color: var(--faint); line-height: 1.5; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 15px;
  padding: 24px; box-shadow: var(--shadow-sm); margin-bottom: 18px; }
.card.pad-lg { padding: 30px 28px; }
.card.auth { border-radius: 16px; padding: 26px; box-shadow: var(--shadow); }
.page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap:14px; }
h1.page { font-size: 27px; } h2.sec { font-size: 17px; margin: 26px 0 12px; }

/* ---------- forms ---------- */
label.fld { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 7px; }
label.fld:first-child { margin-top: 0; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], select {
  width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 14px;
}
input:focus, select:focus, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 1px;
}
input::placeholder { color: var(--faint); }
.row { display: flex; gap: 12px; flex-wrap: wrap; } .row > div { flex: 1; min-width: 140px; }
.forgot-row { display: flex; justify-content: space-between; align-items: baseline; margin: 14px 0 7px; }
.forgot-row a { font-size: 12.5px; font-weight: 500; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 16px; border: none; border-radius: 10px; background: var(--brand);
  color: var(--brand-ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.btn:hover { text-decoration: none; filter: brightness(1.05); }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.btn.block { width: 100%; }
.btn.hero { box-shadow: 0 8px 22px rgba(11,87,208,.28); }
.btn.ghost { background: transparent; color: var(--brand); border: 1px solid var(--line-2); }
.btn.secondary { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: var(--hi); color: #fff; }
.btn.sm { padding: 8px 12px; font-size: 13px; }

/* ---------- pills / badges ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px;
  border-radius: 99px; font-size: 12px; font-weight: 600; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.neutral { color: var(--mut); background: var(--surface-2); }
.pill.working { color: var(--brand); background: var(--brand-weak); }
.pill.hi { color: var(--hi); background: var(--hi-bg); }
.pill.ok { color: var(--ok); background: var(--ok-bg); }
.pill.amber { color: var(--amber); background: var(--amber-bg); }
.badge { display:inline-block; padding:2px 9px; border-radius:99px; font-size:12px; font-weight:600; }
.badge.high { background: var(--hi-bg); color: var(--hi); }
.badge.medium { background: var(--amber-bg); color: var(--amber); }
.badge.low, .badge.review { background: var(--surface-2); color: var(--mut); }
.badge.ok { background: var(--ok-bg); color: var(--ok); }

/* ---------- notices ---------- */
.notice { border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; font-size: 13.5px;
  border: 1px solid; display: flex; gap: 10px; align-items: flex-start; }
.notice .ic { flex: none; }
.notice.info { background: var(--brand-weak); border-color: var(--brand-line); color: var(--ink); }
.notice.ok { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.notice.amber { background: var(--amber-bg); border-color: var(--amber-line); color: var(--amber); }
.notice.err { background: var(--hi-bg); border-color: var(--hi-line); color: var(--hi); }
.flash { background: var(--ok-bg); border: 1px solid var(--ok-line); color: var(--ok);
  border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; font-size: 13.5px; }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--faint); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); }
td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--surface-2); }
.card.table-card { padding: 6px 4px; }
.site-name { font-weight: 600; font-size: 14.5px; }
.site-url { font-size: 12.5px; color: var(--mut); }

/* ---------- toggle switch ---------- */
.switch { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 40px; height: 23px; border-radius: 99px; background: var(--line-2);
  position: relative; transition: background .15s; flex: none; }
.switch .knob { position: absolute; top: 2px; left: 2px; width: 19px; height: 19px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: left .15s; }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track .knob { left: 18px; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs a { padding: 10px 14px; font-size: 14px; font-weight: 600; color: var(--mut);
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { text-decoration: none; }
.tabs a.active { color: var(--brand); border-bottom-color: var(--brand); }

/* ---------- stepper ---------- */
.stepper { display: flex; gap: 0; overflow-x: auto; padding: 4px 2px 2px; }
.stepper .step { flex: 1; min-width: 82px; display: flex; flex-direction: column;
  align-items: center; gap: 7px; position: relative; }
.stepper .step::before { content: ""; position: absolute; top: 16px; left: -50%; width: 100%;
  height: 2px; background: var(--line-2); z-index: 0; }
.stepper .step:first-child::before { display: none; }
.stepper .step .circle { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--line-2); color: var(--faint); }
.stepper .step .lbl { font-size: 11.5px; color: var(--faint); text-align: center; white-space: nowrap; }
.stepper .step.done .circle { background: var(--brand); border-color: var(--brand); color: #fff; }
.stepper .step.done::before { background: var(--brand); }
.stepper .step.done .lbl { color: var(--mut); }
.stepper .step.active .circle { background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: 0 0 0 4px var(--brand-weak); }
.stepper .step.active .lbl { color: var(--ink); font-weight: 600; }
.stepper .step.fail .circle { background: var(--hi); border-color: var(--hi); color: #fff; }
.stepper .step.fail .lbl { color: var(--hi); }

/* ---------- wizard step panel ---------- */
.eyebrow { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--brand); font-weight: 700; }
.eyebrow .gate { background: var(--brand-weak); color: var(--brand); border-radius: 99px;
  padding: 2px 8px; margin-left: 8px; letter-spacing: .04em; }
.step-title { font-size: 23px; margin: 8px 0 4px; }
.step-help { color: var(--mut); font-size: 14px; margin: 0 0 18px; }

/* progress bar */
.progress { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin: 12px 0; }
.progress > span { display: block; height: 100%; background: var(--brand);
  background-image: linear-gradient(45deg, rgba(255,255,255,.25) 25%, transparent 25%,
    transparent 50%, rgba(255,255,255,.25) 50%, rgba(255,255,255,.25) 75%, transparent 75%);
  background-size: 28px 28px; animation: barmove .6s linear infinite; transition: width .2s; }

/* running rows / check rows */
.run-row { display: flex; align-items: center; gap: 11px; padding: 9px 0; font-size: 14px; }
.run-row .spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2);
  border-top-color: var(--brand); animation: spin .7s linear infinite; flex: none; }
.check-row { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; margin-bottom: 8px; }
.check-row .ic { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 13px; flex: none; }
.check-row .ic.ok { background: var(--ok-bg); color: var(--ok); }
.check-row .ic.bad { background: var(--hi-bg); color: var(--hi); }
.check-row .meta { flex: 1; } .check-row .meta .reason { color: var(--hi); font-size: 12.5px; }

/* findings + plan list */
.finding { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-bottom: 1px solid var(--line); }
.finding:last-child { border-bottom: none; }
.finding .body .path { font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
.finding .body .desc { color: var(--mut); font-size: 13px; margin-top: 2px; }
.summary-bar { background: var(--surface-2); border-radius: 10px; padding: 10px 14px;
  font-size: 13.5px; font-weight: 600; margin-bottom: 12px; }

/* console log */
#log { display: none; background: #0d141d; color: #cfe3ff; font-family: var(--mono); font-size: 12.5px;
  padding: 12px; border-radius: 10px; max-height: 320px; overflow: auto; white-space: pre-wrap; margin-top: 14px; }
:root[data-theme="dark"] #log { background: #05070a; }

/* ---------- modal ---------- */
.scrim { position: fixed; inset: 0; background: rgba(10,18,30,.5); display: flex;
  align-items: center; justify-content: center; padding: 20px; z-index: 100; }
.modal { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow);
  max-width: 430px; width: 100%; padding: 24px; }
.modal h3 { font-size: 19px; margin-bottom: 10px; }
.modal p { color: var(--mut); font-size: 14px; margin: 0 0 20px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; }
[hidden] { display: none !important; }

/* ---------- client report sheet ---------- */
.sheet { background: #fff; color: #16212e; border: 1px solid #e2e8f0; border-radius: 12px;
  padding: 34px; box-shadow: var(--shadow); }
.sheet h1,.sheet h2,.sheet h3 { color: #16212e; }
.sheet .rpt-head { display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 3px solid var(--brand); padding-bottom: 14px; margin-bottom: 20px; }
.sheet .rpt-brand { font-family: var(--font-tight); font-weight: 700; font-size: 20px; color: var(--brand); }
.sheet .rpt-status { display: inline-block; padding: 10px 16px; border-radius: 8px; font-weight: 700; margin: 6px 0 18px; }
.sheet .rpt-status.ok { background: #e6f4ea; color: #0a7d33; }
.sheet .rpt-status.hi { background: #fbe9e7; color: #b3261e; }
.sheet .tiles { display: flex; gap: 12px; flex-wrap: wrap; margin: 14px 0; }
.sheet .tile { flex: 1; min-width: 130px; border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px 16px; }
.sheet .tile b { display: block; font-family: var(--font-tight); font-size: 26px; }
.sheet .tile span { color: #5b6b7c; font-size: 12.5px; }
.sheet table td, .sheet table th { border-color: #e2e8f0; color: #16212e; }
.sheet .risks { border: 1px solid #f0dca3; border-radius: 10px; overflow: hidden; margin: 14px 0; }
.sheet .risks h3 { background: #fff3d6; color: #9a6a00; padding: 10px 16px; font-size: 15px; }
.sheet .risks ul { margin: 0; padding: 12px 16px 12px 34px; }
.sheet .rpt-foot { margin-top: 20px; padding-top: 14px; border-top: 1px solid #e2e8f0; color: #5b6b7c; font-size: 12px; }

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  .row { flex-direction: column; }
  .page-head { flex-direction: column; align-items: stretch; }
  .stepper .step .lbl { display: none; }
  .stepper .step { min-width: 44px; }
}
