/* Odin control-plane admin pages. Follows docs/design/ui-rules.md: separate bordered sections with a header bar,
   bold upper case category headers, full-width grids, button rows at the right edge, one column on a phone. */
:root { --bg:#f4f5f7; --panel:#fff; --ink:#1b1f24; --muted:#5a6572; --line:#c9d0d8; --edge:#8a95a3; --head:#e6eaef;
        --accent:#1f5fbf; --accent-ink:#fff; --bad:#b3261e; --ok:#1d7a3a; --sel:#dbe8fb; }
@media (prefers-color-scheme: dark) {
  :root { --bg:#14181d; --panel:#1d232a; --ink:#e8ecf0; --muted:#9aa6b3; --line:#34404c; --edge:#56667a; --head:#27303a;
          --accent:#5b9cf0; --accent-ink:#0b1117; --bad:#ff8a80; --ok:#6fd08c; --sel:#22364f; }
}
* { box-sizing: border-box; }
[hidden] { display:none !important; }
body { margin:0; background:var(--bg); color:var(--ink); font:15px/1.45 system-ui, sans-serif; }
.shell { display:grid; grid-template-columns: 230px minmax(0,1fr); min-height:100vh; }
nav.menu { background:var(--panel); border-right:2px solid var(--edge); padding:12px; }
nav.menu .brand { font-weight:700; font-size:16px; margin:4px 0 12px; }
.pillar-group { margin:14px 0 4px; font-size:12px; font-weight:800; letter-spacing:.06em; text-transform:uppercase;
                border-bottom:2px solid var(--ink); padding-bottom:3px; }
nav.menu a { display:block; padding:5px 8px; color:var(--ink); text-decoration:none; border-radius:4px; }
nav.menu a[aria-current="page"] { background:var(--sel); font-weight:600; }
nav.menu a.later::after { content:" (read-only stub)"; color:var(--muted); font-size:12px; }
.who { margin-top:18px; border-top:1px solid var(--line); padding-top:10px; font-size:13px; color:var(--muted); overflow-wrap:anywhere; }
main { padding:16px 20px 40px; min-width:0; }
h1 { margin:0 0 14px; font-size:22px; }
.card { background:var(--panel); border:2px solid var(--edge); border-radius:6px; margin:0 0 18px; min-width:0; }
.panel-head { display:flex; align-items:center; gap:20px; background:var(--head); padding:8px 12px; border-bottom:2px solid var(--edge); }
.panel-head h2 { flex:1; margin:0; font-size:15px; }
.panel-body { padding:12px; }
.panel.parked .panel-body { display:none; }
.card-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap:12px; }
.wide-form { display:grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap:10px 14px; }
.field { display:flex; flex-direction:column; gap:3px; min-width:0; }
.field label, .field .lab { font-size:12px; font-weight:600; color:var(--muted); }
input, select, textarea { font:inherit; color:var(--ink); background:var(--bg); border:1px solid var(--line); border-radius:4px; padding:6px 8px; min-width:0; width:100%; }
.checks { display:flex; flex-wrap:wrap; gap:6px 14px; }
.checks label { font-weight:400; color:var(--ink); display:flex; gap:5px; align-items:center; }
.checks input { width:auto; }
.section-title { grid-column:1/-1; font-weight:700; border-bottom:1px solid var(--line); padding-bottom:2px; margin-top:6px; }
.form-actions { display:flex; align-items:center; gap:20px; border-top:1px solid var(--line); margin-top:12px; padding-top:10px; }
.form-actions .status { flex:1; color:var(--muted); }
.form-actions .status.err { color:var(--bad); } .form-actions .status.good { color:var(--ok); }
button { font:inherit; padding:6px 14px; border-radius:4px; border:1px solid var(--edge); background:var(--panel); color:var(--ink); cursor:pointer; }
button.primary { background:var(--accent); color:var(--accent-ink); border-color:var(--accent); }
button:disabled { opacity:.5; cursor:not-allowed; }
.table-wrap { overflow-x:auto; }
table { border-collapse:collapse; width:100%; }
th { background:var(--head); text-align:left; font-size:12px; text-transform:uppercase; letter-spacing:.03em; }
th, td { padding:6px 10px; border-bottom:1px solid var(--line); vertical-align:top; }
tbody tr { cursor:pointer; }
tbody tr[aria-selected="true"] { background:var(--sel); outline:2px solid var(--accent); outline-offset:-2px; }
.results-actions { display:flex; align-items:center; gap:20px; padding:10px 12px; border-top:2px solid var(--edge); }
.results-actions .name { flex:1; color:var(--muted); overflow-wrap:anywhere; }
.count { padding:8px 12px; color:var(--muted); }
.note { color:var(--muted); }
.kv { display:grid; grid-template-columns: repeat(auto-fit, minmax(210px,1fr)); gap:8px 16px; }
.kv div b { display:block; font-size:12px; color:var(--muted); font-weight:600; }
.badge { display:inline-block; padding:1px 8px; border-radius:10px; background:var(--head); border:1px solid var(--line); font-size:12px; }
.signin { display:grid; place-items:center; min-height:100vh; padding:16px; }   /* centred on purpose: the sign-in form (ui-rules 23) */
.signin .card { width:min(420px,100%); }
.banner { padding:8px 12px; border:2px solid var(--edge); background:var(--head); border-radius:6px; margin-bottom:14px; }
@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0,1fr); }
  nav.menu { border-right:0; border-bottom:2px solid var(--edge); }
  nav.menu .links { display:flex; flex-wrap:wrap; gap:2px 6px; }
  .pillar-group { width:100%; }
  main { padding:12px 10px 30px; }
  .form-actions, .results-actions, .panel-head { flex-wrap:wrap; }
  .form-actions .status, .results-actions .name { flex-basis:100%; }
  .form-actions button, .results-actions button { margin-left:auto; }
}

/* Product page: the section-card layout and the blue container accent. */
.product-head { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin:0 0 18px; }
.product-head h1 { margin:0; font-size:26px; }
.product-head .sub { margin:4px 0 0; color:var(--muted); }
.score-wrap { display:flex; align-items:center; gap:10px; }
.score { width:64px; height:64px; border-radius:50%; display:grid; place-items:center;
  background:conic-gradient(var(--ok) calc(var(--score) * 1%), var(--line) 0); }
.score span { width:46px; height:46px; border-radius:50%; background:var(--panel); display:grid; place-items:center;
  font-weight:800; font-size:14px; }
.score.small { width:52px; height:52px; }
.score.small span { width:38px; height:38px; font-size:12px; }
.product-grid { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:18px; align-items:start; }
.product-rail { position:sticky; top:12px; }
.product-section { background:var(--panel); border:2px solid var(--edge); border-left:4px solid var(--accent);
  border-radius:6px; margin:0 0 14px; overflow:hidden; }
.product-section .section-head { display:flex; gap:12px; align-items:flex-start; padding:12px 14px; border-bottom:1px solid var(--line); }
.product-section .section-head h2 { margin:0; font-size:16px; }
.product-section .section-head .note { margin:2px 0 0; }
.product-section > div:not(.section-head) { padding:12px 14px; }
.section-icon { flex:0 0 36px; height:36px; border-radius:8px; background:var(--sel); color:var(--accent);
  display:grid; place-items:center; font-size:17px; }
.section-title { margin:12px 0 6px; font-size:13px; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); }
.media-grid { display:flex; gap:10px; flex-wrap:wrap; }
.media-tile { width:82px; height:82px; border:1px solid var(--line); border-radius:10px; background:var(--sel);
  color:var(--accent); display:grid; place-items:center; font-size:24px; position:relative; }
.media-tile.primary { border-color:var(--accent); box-shadow:0 0 0 2px var(--sel); }
.media-tile small { position:absolute; bottom:4px; font-size:9px; color:var(--muted); }
.media-tile.add { background:var(--panel); border-style:dashed; color:var(--muted); }
.link-row { margin:10px 0 0; }
.link-row a { color:var(--accent); font-weight:600; }
@media (max-width: 900px) { .product-grid { grid-template-columns:1fr; } .product-rail { position:static; } .product-head { flex-direction:column; } }

.oidc-box { margin:0 0 14px; }
.oidc-button { display:inline-block; padding:10px 18px; border-radius:6px; background:var(--accent); color:var(--accent-ink);
  font-weight:700; text-decoration:none; }
.or-line { margin:12px 0 0; color:var(--muted); font-size:13px; }
