:root {
  --bg: #f5f6f8; --surface: #fff; --text: #1d2330; --muted: #6b7280; --border: #e3e6eb;
  --accent: #1f4e8c; --accent-soft: #e8eef8; --ok: #16794c; --ok-soft: #e4f4ec;
  --warn: #9a5b00; --warn-soft: #fdf1dc; --bad: #b42318; --bad-soft: #fde8e6;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.45; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; margin: 0 0 1rem; display: flex; align-items: center; gap: .5rem; }
h2 { font-size: 1.05rem; margin: 0 0 .75rem; }
main { max-width: 1440px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 1rem; }

.topbar { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; background: #14233b;
  color: #fff; padding: .6rem 1rem; }
.topbar a { color: #dbe4f3; }
.brand a { color: #fff; font-weight: 700; }
.brand span { font-weight: 400; color: #9fb2cf; margin-left: .35rem; }
.topbar nav { display: flex; gap: .25rem; flex: 1; flex-wrap: wrap; }
.topbar nav a { padding: .35rem .7rem; border-radius: 6px; }
.topbar nav a.on, .topbar nav a:hover { background: #24395c; color: #fff; text-decoration: none; }
.logout { display: flex; align-items: center; gap: .6rem; margin: 0; }
.who { color: #9fb2cf; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 1rem 1.1rem; margin-bottom: 1rem; overflow-x: auto; }
.card.flush { padding: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1rem; }
.grid2 > .card { margin-bottom: 1rem; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem;
  margin-bottom: 1rem; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: .9rem 1rem; display: flex; flex-direction: column; gap: .15rem; }
/* a tile whose whole body is a link still stacks label / value / sub */
.tile > a { display: flex; flex-direction: column; gap: .15rem; color: inherit;
  text-decoration: none; }
.tile > a:hover .value { color: var(--accent); }
.tile .label { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.tile .value { font-size: 1.7rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.tile .small-value { font-size: 1.05rem; }
.tile .sub { color: var(--muted); font-size: .85rem; }
.heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.heading .actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.count { font-size: .85rem; font-weight: 500; color: var(--muted); background: var(--border);
  border-radius: 999px; padding: .05rem .55rem; }
.crumbs { color: var(--muted); margin: 0 0 .4rem; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .5rem .7rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted);
  background: #fafbfc; white-space: nowrap; }
tbody tr:hover { background: #fafbfd; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.val { max-width: 320px; overflow-wrap: anywhere; font-size: .85rem; }
.pre { white-space: pre-line; }
.muted { color: var(--muted); }
.small { font-size: .8rem; }

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

.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.filters .grow { flex: 1 1 280px; }
input, select, button, .button { font: inherit; border: 1px solid var(--border); border-radius: 6px;
  padding: .45rem .65rem; background: #fff; color: var(--text); }
button, .button { cursor: pointer; display: inline-block; }
.button:hover { text-decoration: none; }
.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.primary:hover { background: #183f73; }
button[disabled] { opacity: .5; cursor: not-allowed; }
button.link { background: none; border: none; color: #dbe4f3; padding: 0; }
button.link:hover { text-decoration: underline; }

.tag { display: inline-block; background: var(--accent-soft); color: var(--accent); border-radius: 4px;
  padding: 0 .4rem; margin: 0 .25rem .2rem 0; font-size: .78rem; white-space: nowrap; }
.badge { display: inline-block; border-radius: 999px; padding: .05rem .55rem; font-size: .78rem;
  font-weight: 600; background: var(--border); color: var(--text); white-space: nowrap; text-transform: capitalize; }
.b-active, .b-success, .b-complete, .b-done, .b-clear, .b-created, .b-reactivated, .b-never-blocked, .b-running { background: var(--ok-soft); color: var(--ok); }
.b-partial, .b-queued, .b-cooldown, .b-budget-exhausted, .b-directory-only, .b-disabled, .b-updated, .b-stopped { background: var(--warn-soft); color: var(--warn); }
.b-inactive, .b-failed, .b-protected, .b-deactivated, .b-error, .b-failure-ratio, .b-snapshot-expired { background: var(--bad-soft); color: var(--bad); }
.b-enabled { background: var(--accent-soft); color: var(--accent); }

.alert { border-radius: 8px; padding: .65rem .9rem; margin: 0 0 1rem; border: 1px solid; }
.alert.error { background: var(--bad-soft); color: var(--bad); border-color: #f5c2bd; }
.alert.warn { background: var(--warn-soft); color: var(--warn); border-color: #f3d9a8; }
.alert.info { background: var(--accent-soft); color: var(--accent); border-color: #c8d6ee; }
.empty { text-align: center; color: var(--muted); padding: 2rem 1rem; }
.empty h2 { color: var(--text); }
.pager { display: flex; justify-content: center; gap: 1rem; align-items: center; margin: .5rem 0 1rem; }

.login { max-width: 380px; margin: 3rem auto; }
.login form { display: flex; flex-direction: column; gap: .8rem; }
.login label { display: flex; flex-direction: column; gap: .3rem; color: var(--muted); }
.login input { width: 100%; }

@media (max-width: 640px) {
  .brand span { display: none; }
  .tile .value { font-size: 1.4rem; }
}

.tiles.compact { margin-bottom: 0; }
.tiles.compact .tile { background: #fafbfc; }
.tiles.compact .value { font-size: 1.35rem; }
.review-actions { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.review-actions input[type=text] { width: 11rem; }
.tabs { display: flex; gap: .5rem; margin-bottom: .75rem; }
.tabs a { padding: .3rem .7rem; border-radius: 6px; border: 1px solid var(--border); background: #fff; }
.tabs a.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.b-approved { background: var(--ok-soft); color: var(--ok); }
.b-rejected, .b-no-match { background: var(--bad-soft); color: var(--bad); }
.b-match { background: var(--ok-soft); color: var(--ok); }
.b-review, .b-pending { background: var(--warn-soft); color: var(--warn); }
form.inline { display: inline-block; margin-left: .5rem; }
.b-protected { background: var(--bad-soft); color: var(--bad); }
.b-cancelled, .b-stopped { background: var(--border); color: var(--text); }

/* ---------------------------------------------------------------- dashboard (2026-10-09) */
:root { --blue: #2563eb; --green: #059669; --violet: #7c3aed; --amber: #d97706;
  --teal: #0d9488; --rose: #e11d48; --grey: #cbd2dc; }
.topbar { background: linear-gradient(90deg, #0f1e36, #1a3358); box-shadow: 0 1px 0 rgba(0,0,0,.08); }
.count.accent { background: #ede9fe; color: var(--violet); }

.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem;
  flex-wrap: wrap; margin-bottom: 1.25rem; }
.hero h1 { margin: 0 0 .25rem; font-size: 1.6rem; }
.hero-sub { margin: 0; color: var(--muted); }
.hero .actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem;
  margin-bottom: 1rem; }
/* six cards: one row on a wide screen, two even rows below that - never a row of five + one */
@media (min-width: 1360px) { .kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 720px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 440px) { .kpis { grid-template-columns: 1fr; } }
.kpi { position: relative; display: flex; flex-direction: column; gap: .2rem; color: inherit;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 1rem 1.1rem 1rem 1.1rem; overflow: hidden; transition: transform .12s, box-shadow .12s; }
.kpi::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--kc); }
a.kpi:hover { text-decoration: none; transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(20, 35, 59, .08); }
.kpi .kpi-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: var(--ks); color: var(--kc); margin-bottom: .35rem; }
.kpi .label { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.kpi .value { font-size: 1.85rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi .value small { font-size: 1rem; color: var(--muted); font-weight: 500; }
.kpi .sub { color: var(--muted); font-size: .82rem; }
.k-blue { --kc: var(--blue); --ks: #dbeafe; }
.k-green { --kc: var(--green); --ks: #d1fae5; }
.k-violet { --kc: var(--violet); --ks: #ede9fe; }
.k-amber { --kc: var(--amber); --ks: #fef3c7; }
.k-teal { --kc: var(--teal); --ks: #ccfbf1; }
.k-rose { --kc: var(--rose); --ks: #ffe4e6; }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; }

.grid3 { display: grid; grid-template-columns: 1fr; gap: 0 1rem; }
@media (min-width: 1100px) { .grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.grid3 > .card { margin-bottom: 1rem; }
.panel { border-radius: 12px; }
.panel .heading h2 { margin: 0; }
.panel .heading { margin-bottom: .8rem; }
.note { color: var(--muted); font-size: .82rem; margin: .8rem 0 0; }

.ring-row { display: flex; align-items: center; gap: 1.25rem; }
.ring-wrap { position: relative; width: 112px; height: 112px; flex: none; }
.ring { width: 112px; height: 112px; }
.ring circle { fill: none; stroke-width: 3.6; }
.ring-bg { stroke: #eef1f5; }
.ring-fg { stroke-linecap: round; }
.r-blue .ring-fg { stroke: var(--blue); }
.r-green .ring-fg { stroke: var(--green); }
.r-violet .ring-fg { stroke: var(--violet); }
.ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.ring-label small { font-size: .7rem; font-weight: 500; color: var(--muted); text-transform: uppercase;
  letter-spacing: .04em; }
dl.legend { display: grid; grid-template-columns: 1fr auto; gap: .35rem 1rem; margin: 0; flex: 1; }
dl.legend dt { color: var(--muted); display: flex; align-items: center; gap: .4rem; }
dl.legend dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.d-blue { background: var(--blue); } .d-green { background: var(--green); }
.d-violet { background: var(--violet); } .d-grey { background: var(--grey); }

.bar { width: 100%; height: 8px; display: block; }
.bar-bg { fill: #eef1f5; }
.bar-fg { fill: var(--blue); }
.bar.b-wca .bar-fg { fill: var(--teal); }
.bar.b-jctrans .bar-fg { fill: var(--amber); }
.source-figures { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-bottom: .7rem; }
.source-figures > div { display: flex; flex-direction: column; }
.source-figures .big { font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.source-figures .big small { font-size: .9rem; color: var(--muted); font-weight: 500; }
.source .bar { margin-bottom: 1rem; }
.s-wca { border-top: 3px solid var(--teal); }
.s-jctrans { border-top: 3px solid var(--amber); }

table.regions td.wide, table.regions th.wide { width: 38%; }
.bar-cell { display: flex; align-items: center; gap: .6rem; }
.bar-cell .bar { flex: 1; }
.bar-cell .num { min-width: 4.5rem; font-weight: 600; }

ol.steps { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .55rem; }
ol.steps li { padding-left: .2rem; }
ol.steps li::marker { color: var(--accent); font-weight: 700; }

@media (max-width: 640px) {
  .ring-row { flex-direction: column; align-items: stretch; }
  .ring-wrap { margin: 0 auto; }
  .kpi .value { font-size: 1.5rem; }
}

/* ------------------------------------------------------------ motion (dashboard.js adds .motion) */
.motion .kpi, .motion .panel, .motion #regions, .motion .hero {
  animation: rise .55s cubic-bezier(.2, .7, .2, 1) both; }
.motion .kpis > :nth-child(2) { animation-delay: .05s; }
.motion .kpis > :nth-child(3) { animation-delay: .10s; }
.motion .kpis > :nth-child(4) { animation-delay: .15s; }
.motion .kpis > :nth-child(5) { animation-delay: .20s; }
.motion .kpis > :nth-child(6) { animation-delay: .25s; }
.motion .grid3 > :nth-child(1) { animation-delay: .20s; }
.motion .grid3 > :nth-child(2) { animation-delay: .27s; }
.motion .grid3 > :nth-child(3) { animation-delay: .34s; }
.motion .grid2 .panel, .motion #regions { animation-delay: .35s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.ring-fg { transition: stroke-dasharray 1.3s cubic-bezier(.2, .7, .2, 1); }
.motion .bar-fg { transform-box: fill-box; transform-origin: left center;
  animation: grow 1.1s cubic-bezier(.2, .7, .2, 1) .3s both; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* icons breathe a little on hover; whole cards and rows are links */
.kpi .kpi-icon { transition: transform .2s ease, box-shadow .2s ease; }
a.kpi:hover .kpi-icon { transform: scale(1.08) rotate(-4deg);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--kc) 30%, transparent); }
a.kpi:focus-visible, .is-clickable:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a.kpi:active { transform: translateY(0) scale(.99); }
.is-clickable { cursor: pointer; }
.panel.is-clickable { transition: transform .15s ease, box-shadow .15s ease; }
.panel.is-clickable:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(20, 35, 59, .08); }
tr.is-clickable { transition: background .15s ease; }
tr.is-clickable:hover { background: var(--accent-soft); }
tr.is-clickable:hover .bar-fg { fill: #1d4ed8; }
dl.legend dt a { color: inherit; display: inline-flex; align-items: center; gap: .4rem; }
dl.legend dt a:hover { color: var(--accent); text-decoration: none; }
.panel .heading a { font-weight: 500; }
.panel .heading a:hover { text-decoration: none; transform: translateX(2px); display: inline-block; }
.button { transition: background .15s ease, box-shadow .15s ease, transform .1s ease; }
.button:hover { box-shadow: 0 2px 8px rgba(20, 35, 59, .10); }
.button:active { transform: scale(.98); }
.hero h1 { background: linear-gradient(90deg, #14233b, #2563eb); -webkit-background-clip: text;
  background-clip: text; color: transparent; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.topbar nav a.new-app { background: linear-gradient(90deg, #2563eb, #7c3aed); color: #fff; font-weight: 600; }
.topbar nav a.new-app:hover { filter: brightness(1.1); }

/* ------------------------------------------------------------------- sign-in page (2026-10-09) */
body.auth { margin: 0; min-height: 100vh; background: #f4f6fb; }
.auth-shell { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: 100vh;
  max-width: none; padding: 0; margin: 0; }
.auth-brand { position: relative; overflow: hidden; color: #dbe6ff; padding: 3.5rem;
  display: flex; align-items: center;
  background: radial-gradient(1200px 600px at -10% -20%, #3b6cf6 0%, transparent 55%),
              radial-gradient(900px 600px at 120% 120%, #7c3aed 0%, transparent 55%),
              linear-gradient(160deg, #0f1e36 0%, #13284a 60%, #1a2f5a 100%); }
.auth-globe { position: absolute; right: -120px; bottom: -120px; width: 520px; height: 520px;
  fill: none; stroke: rgba(255, 255, 255, .09); stroke-width: 1.2; animation: auth-spin 90s linear infinite; }
@keyframes auth-spin { to { transform: rotate(360deg); } }
.auth-brand-inner { position: relative; max-width: 520px; animation: auth-rise .6s ease-out both; }
.auth-brand h1 { color: #fff; font-size: 2.4rem; line-height: 1.15; margin: 2rem 0 1rem; font-weight: 700;
  letter-spacing: -.02em; display: block; }
.auth-brand p { font-size: 1.05rem; color: #b8c7e6; margin: 0 0 1.8rem; }
.auth-brand ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.auth-brand li { display: flex; align-items: center; gap: .7rem; color: #dbe6ff; }
.auth-dot { width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, #60a5fa, #a78bfa);
  box-shadow: 0 0 0 4px rgba(96, 165, 250, .15); flex: none; }
.auth-logo { display: inline-flex; align-items: center; gap: .65rem; font-weight: 700; color: #fff; font-size: 1.05rem; }
.auth-logo span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: #fff;
  background: linear-gradient(135deg, #3b6cf6, #7c3aed); box-shadow: 0 8px 20px rgba(59, 108, 246, .35); }
.auth-logo-small { display: none; color: #0f1e36; margin-bottom: 1.5rem; }

.auth-panel { display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; }
.auth-card { width: 100%; max-width: 400px; background: #fff; border: 1px solid #e6eaf2; border-radius: 20px;
  padding: 2.25rem 2rem; box-shadow: 0 30px 60px -30px rgba(15, 30, 54, .25); animation: auth-rise .5s .1s ease-out both; }
.auth-card h2 { font-size: 1.6rem; margin: 0 0 .3rem; color: #0f1e36; letter-spacing: -.01em; }
.auth-sub { margin: 0 0 1.5rem; color: #64748b; }
.auth-error { background: #fef2f2; color: #b42318; border: 1px solid #fecaca; border-radius: 12px;
  padding: .65rem .85rem; margin: 0 0 1rem; font-size: .9rem; animation: auth-shake .35s ease-in-out; }
.auth-field { display: block; margin-bottom: 1rem; }
.auth-field > span:first-child { display: block; font-size: .85rem; font-weight: 600; color: #334155; margin-bottom: .4rem; }
.auth-input { position: relative; display: flex; align-items: center; }
.auth-input > svg { position: absolute; left: .8rem; width: 18px; height: 18px; fill: none; stroke: #94a3b8;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.auth-input input { width: 100%; font: inherit; font-size: .95rem; padding: .75rem .9rem .75rem 2.5rem;
  border: 1px solid #dbe2ee; border-radius: 12px; background: #f8fafc; color: #0f1e36;
  transition: border-color .15s, box-shadow .15s, background .15s; }
.auth-input input:focus { outline: none; background: #fff; border-color: #3b6cf6; box-shadow: 0 0 0 4px #dbe7ff; }
.auth-input input[type=password], .auth-input input[data-password] { padding-right: 2.8rem; }
.auth-eye { position: absolute; right: .45rem; border: 0; background: none; padding: .35rem; border-radius: 8px;
  cursor: pointer; color: #94a3b8; display: grid; place-items: center; }
.auth-eye:hover, .auth-eye[aria-pressed=true] { color: #3b6cf6; background: #eef4ff; }
.auth-eye svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.auth-submit { width: 100%; margin-top: .5rem; padding: .85rem 1rem; border: 0; border-radius: 12px; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 1rem; color: #fff;
  background: linear-gradient(90deg, #2557e8, #6d4af0); box-shadow: 0 10px 24px -10px rgba(37, 87, 232, .7);
  transition: transform .1s, box-shadow .15s, filter .15s; }
.auth-submit:hover { filter: brightness(1.06); box-shadow: 0 14px 28px -10px rgba(37, 87, 232, .8); }
.auth-submit:active { transform: scale(.99); }
.auth-submit.is-busy { opacity: .8; pointer-events: none; }
.auth-foot { margin: 1.25rem 0 0; font-size: .8rem; color: #94a3b8; text-align: center; }
@keyframes auth-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes auth-shake { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-logo-small { display: inline-flex; }
}

.auth-notice { background: #eef4ff; color: #1c45c2; border: 1px solid #c7d7fe; border-radius: 12px;
  padding: .65rem .85rem; margin: 0 0 1rem; font-size: .9rem; }
.auth-switch { margin: 1rem 0 0; text-align: center; font-size: .9rem; color: #64748b; }
.auth-switch a { color: #2557e8; font-weight: 600; }
.auth-field small { font-weight: 400; color: #94a3b8; }
.auth-input-domain input { padding-right: 9.5rem; }
.auth-input-domain em { position: absolute; right: .8rem; font-style: normal; font-size: .9rem; color: #64748b; pointer-events: none; }
.auth-done { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 1rem;
  background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 10px 24px -10px rgba(5, 150, 105, .7); }
.auth-done svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.auth-link-button { display: block; text-align: center; text-decoration: none; }
.auth-link-button:hover { text-decoration: none; }
