/* AdSoft Care central. One restrained blue accent; severity always carries a word. */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --text: #1c2430;
  --muted: #5d6877;
  --border: #dde1e7;
  --accent: #1d5fd1;
  --accent-text: #ffffff;
  --ok-bg: #e3f4ea; --ok-text: #17603a;
  --warn-bg: #fdf1dc; --warn-text: #7a4b00;
  --bad-bg: #fde4e4; --bad-text: #9b1c1c;
  --info-bg: #e6eefc; --info-text: #1b4aa0;
  --muted-bg: #eceef2; --muted-text: #4b5563;
  --sev-critical-bg: #7f1d1d; --sev-critical-text: #ffffff;
  --sev-high-bg: #fde4e4; --sev-high-text: #9b1c1c;
  --sev-medium-bg: #fdf1dc; --sev-medium-text: #7a4b00;
  --sev-low-bg: #eef3d9; --sev-low-text: #4d5b0f;
  --sev-info-bg: #eceef2; --sev-info-text: #4b5563;
  --radius: 8px;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161c; --surface: #1a2029; --text: #e4e8ee; --muted: #9aa5b4; --border: #2d3540;
    --accent: #6b9eff; --accent-text: #0d1420;
    --ok-bg: #173826; --ok-text: #8fdcaf;
    --warn-bg: #3a2c12; --warn-text: #f5c97a;
    --bad-bg: #3d1c1c; --bad-text: #f4a6a6;
    --info-bg: #1c2b47; --info-text: #a9c4ff;
    --muted-bg: #262d37; --muted-text: #b4bdc9;
    --sev-critical-bg: #b91c1c; --sev-critical-text: #ffffff;
    --sev-high-bg: #3d1c1c; --sev-high-text: #f4a6a6;
    --sev-medium-bg: #3a2c12; --sev-medium-text: #f5c97a;
    --sev-low-bg: #2c3314; --sev-low-text: #d5e39a;
    --sev-info-bg: #262d37; --sev-info-text: #b4bdc9;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
h1 { font-size: 1.5rem; margin: 0 0 .25rem; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
h3 { font-size: .95rem; margin: 1rem 0 .25rem; }
code, .mono { font-family: var(--mono); font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.strong { font-weight: 600; }
.break { word-break: break-all; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.topbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem;
  padding: .75rem 16px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; color: var(--text); text-decoration: none; }
.nav { display: flex; gap: 1rem; }
.nav a { color: var(--muted); text-decoration: none; padding: .25rem 0; }
.nav a[aria-current="page"], .nav a:hover { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.topbar-end { margin-left: auto; display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.user { max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { max-width: 1200px; margin: 0 auto; padding: 1.5rem 16px 3rem; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.25rem; }
.page-head p { margin: 0; }
.head-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.section { margin-top: 1.75rem; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: .75rem; }
.card.narrow { max-width: 28rem; margin: 2rem auto; }
.card.empty { text-align: center; padding: 2rem; }
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: .75rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); gap: .75rem; align-items: start; }
@media (max-width: 480px) { .grid-2 { grid-template-columns: 1fr; } }
.stat h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1rem; margin: .5rem 0 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

.button {
  display: inline-block; padding: .45rem .9rem; border-radius: 6px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; text-decoration: none; cursor: pointer;
}
.button:hover { border-color: var(--accent); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.button.danger { color: var(--bad-text); border-color: var(--bad-text); }
.button.small { padding: .25rem .6rem; font-size: .85rem; }
.button[disabled] { opacity: .5; cursor: not-allowed; }
.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; }
.link.active { color: var(--text); font-weight: 700; }
form.inline { display: inline-flex; gap: .5rem; align-items: center; margin: 0; }

.form { display: grid; gap: .35rem; }
.form label { font-weight: 600; margin-top: .5rem; }
.form input:not([type="radio"]):not([type="checkbox"]), .form select, .scan-form select {
  width: 100%; padding: .5rem .6rem; border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--text); font: inherit;
}
.scan-form select { width: auto; }
.form fieldset { border: 0; padding: 0; margin: .5rem 0 0; }
.form legend { font-weight: 600; padding: 0; }
.form .radio { font-weight: 400; display: block; margin: .25rem 0; }
.form [aria-invalid="true"] { border-color: var(--bad-text); }
.field-error { color: var(--bad-text); margin: 0; font-size: .9rem; }
.help { color: var(--muted); font-size: .9rem; margin: .25rem 0; }
.form-actions { display: flex; gap: 1rem; align-items: center; margin-top: 1rem; }
.update-line { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .4rem; }
.revoke { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .75rem; }

.notice { padding: .65rem .9rem; border-radius: 6px; margin-bottom: 1rem; }
.notice-ok { background: var(--ok-bg); color: var(--ok-text); }
.notice-error { background: var(--bad-bg); color: var(--bad-text); }
.notice-warn { background: var(--warn-bg); color: var(--warn-text); }

.pills { display: flex; flex-wrap: wrap; gap: .3rem; }
.pill { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.pill-ok { background: var(--ok-bg); color: var(--ok-text); }
.pill-warn { background: var(--warn-bg); color: var(--warn-text); }
.pill-bad { background: var(--bad-bg); color: var(--bad-text); }
.pill-info { background: var(--info-bg); color: var(--info-text); }
.pill-muted { background: var(--muted-bg); color: var(--muted-text); }
.sev-critical { background: var(--sev-critical-bg); color: var(--sev-critical-text); }
.sev-high { background: var(--sev-high-bg); color: var(--sev-high-text); }
.sev-medium { background: var(--sev-medium-bg); color: var(--sev-medium-text); }
.sev-low { background: var(--sev-low-bg); color: var(--sev-low-text); }
.sev-info { background: var(--sev-info-bg); color: var(--sev-info-text); }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); }
.table th, .table td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.table.compact th, .table.compact td { padding: .35rem .5rem; }
.table-wrap > .table { border: 1px solid var(--border); border-radius: var(--radius); }
.actions { text-align: right; white-space: nowrap; }

details > summary { cursor: pointer; font-weight: 600; list-style-position: outside; }
details.card > summary { margin: -.25rem 0; }
details[open] > summary { margin-bottom: .75rem; }
.finding summary { display: flex; flex-wrap: wrap; gap: .5rem; align-items: baseline; }
.finding-title { flex: 1 1 16rem; }
.finding-body p { margin: .25rem 0 .5rem; max-width: 70ch; }

.code {
  font-family: var(--mono); font-size: .85rem; background: var(--muted-bg); color: var(--text);
  padding: .75rem; border-radius: 6px; overflow-x: auto; white-space: pre; margin: .5rem 0;
}
.steps li { margin-bottom: .5rem; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: .2rem 0; }

@media (max-width: 640px) {
  .table.responsive thead { display: none; }
  .actions { text-align: left; }
}
