/* SwitchLogix console. Layout from docs/ mockup; colours and type from the brand kit
   (branding/06_Brand_Tokens). Change the tokens here, not in components. */
@font-face { font-family: "Open Sans"; src: url("fonts/OpenSans-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("fonts/OpenSans-Semibold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("fonts/OpenSans-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --cobalt: #003FF0;
  --cobalt-dark: #0032C0;
  --sky: #3AA8FE;
  --ink: #1C2228;
  --slate: #2A3443;
  --midnight: #0B1220;
  --mist: #EFF4FF;
  --white: #FFFFFF;
  --reverse-sky: #8DD2FF;

  --bg: #F4F6FA;
  --surface: #FFFFFF;
  --border: #DFE4EC;
  --line: #ECEFF4;
  --control: #CDD4DF;
  --muted: #586274;
  --soft: #3A4352;
  --head-bg: #F8FAFC;
  --hover: #EEF2F8;

  --ok: #1F7A3A;
  --warn: #B4480C;
  --warn-bg: #FBEDE3; --warn-border: #F0CDB4;
  --danger: #B42318;
  --danger-bg: #FDECEA; --danger-border: #F2C1BB;
  --danger-line: #E8B4AE;

  --font: "Open Sans", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, "Liberation Mono", monospace;
  --radius: 12px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--font); }
a { color: var(--cobalt); }
a:hover { color: var(--cobalt-dark); }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 16px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; }
p { margin: 0; }
code, .mono { font-family: var(--mono); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
h1:focus, h1:focus-visible { outline: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Shell */
.shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
/* The menu: dark, grouped, in place while the page scrolls (it scrolls on its own only when taller
   than the window). What needs you is at the top; Settings and sign-out at the foot. */
.nav { position: sticky; top: 0; align-self: flex-start; height: 100vh; overflow-y: auto; flex: 1 1 232px; max-width: 256px; padding: 20px 12px; background: var(--midnight); color: #C9D3E3; display: flex; flex-direction: column; gap: 18px; }
.nav .brand { display: flex; align-items: center; padding: 0 10px; }
.nav .brand img { height: 28px; width: auto; }
.nav .workspace { margin: -6px 10px 0; font-size: 12px; color: #9AA8BD; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav .group { display: flex; flex-direction: column; gap: 2px; }
.nav .group-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8494AD; padding: 0 10px 4px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: #C9D3E3; text-decoration: none; font-size: 14px; font-weight: 600; }
.nav a:hover { background: #172033; color: var(--white); }
.nav a.active { background: #1F2C47; color: var(--white); }
.nav svg { width: 18px; height: 18px; flex: none; }
.nav .count { margin-left: auto; background: #FFB020; color: var(--ink); border-radius: 999px; font-size: 12px; font-weight: 700; padding: 0 8px; }
.nav .count.bad { background: #D93A2E; color: var(--white); }
.nav .foot { margin-top: auto; padding-top: 12px; border-top: 1px solid #1F2C47; display: flex; flex-direction: column; gap: 4px; }
.nav .foot form { padding: 4px 10px; }
.nav .foot button { background: none; border: 0; padding: 0; color: #9AA8BD; font: 600 13px var(--font); cursor: pointer; }
.nav .foot button:hover { color: var(--white); }
.main { flex: 999 1 560px; min-width: 0; padding: 32px 40px 56px; }
.page { max-width: 1160px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }

@media (max-width: 820px) {
  .shell { flex-direction: column; flex-wrap: nowrap; }
  .nav { position: static; height: auto; align-self: auto; max-width: none; flex: none; flex-direction: row; align-items: center; overflow-x: auto; padding: 10px 12px; gap: 2px; }
  .nav .group, .nav .foot { flex-direction: row; gap: 2px; margin: 0; padding: 0; border: 0; }
  .nav .group-label, .nav .workspace, .nav .foot form { display: none; }
  .nav .brand { padding: 0 8px 0 0; }
  .nav .brand img { height: 24px; }
  .nav a { white-space: nowrap; padding: 8px 10px; }
  .nav a span.label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav a.active span.label { position: static; width: auto; height: auto; clip: auto; }
  .main { padding: 20px 16px 48px; }
  h1 { font-size: 24px; }
}

/* Page header */
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.head .lede, .lede { margin-top: 6px; color: var(--muted); font-size: 15px; }
.eyebrow { font-size: 13px; color: var(--muted); font-weight: 600; }
.crumbs { font-size: 14px; color: var(--muted); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 8px; font: 600 14px var(--font); cursor: pointer; text-decoration: none; border: 1px solid var(--control); background: var(--surface); color: var(--ink); }
.btn:hover { background: var(--hover); color: var(--ink); }
.btn.pri, .btn-primary { background: var(--cobalt); border-color: var(--cobalt); color: var(--white); }
.btn.pri:hover, .btn-primary:hover { background: var(--cobalt-dark); color: var(--white); }
.btn.danger { color: var(--danger); border-color: var(--danger-line); }
.btn.sm { min-height: 32px; padding: 0 12px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-link { background: none; border: 0; color: var(--cobalt); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }
.pill { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 600; text-decoration: none; color: var(--soft); border: 1px solid var(--control); background: var(--surface); }
.pill.active { background: var(--midnight); border-color: var(--midnight); color: var(--white); }
.pill.dashed { border-style: dashed; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; min-width: 0; }
.card > .card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.card > .card-head p { margin-top: 4px; font-size: 13px; color: var(--muted); }
.card > .card-body { padding: 16px 20px; }
.card > .card-foot { padding: 14px 20px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
.row-split { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.row-split > .wide { flex: 3 1 440px; }
.row-split > .narrow { flex: 2 1 320px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.stat .k { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat .v { font-size: 32px; font-weight: 700; margin-top: 6px; }
.stat .n { font-size: 13px; color: var(--muted); margin-top: 4px; }
@media (max-width: 980px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 340px) { .stats { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .stat { padding: 14px; } .stat .v { font-size: 26px; } }

/* Lists */
.list-row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .t { font-weight: 600; }
.list-row .s { font-size: 13px; color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--ok); }
.dot.warn { background: var(--warn); } .dot.bad { background: var(--danger); }
.kind { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--cobalt); }
.kind.bad { color: var(--danger); }
.empty { padding: 28px 20px; color: var(--muted); text-align: center; }

/* Tables */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 14px; white-space: nowrap; vertical-align: top; }
.tbl th { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: var(--head-bg); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .sub { font-size: 12px; color: var(--muted); }
.yes, .ok { color: var(--ok); font-weight: 600; }
.no { color: #8A91A0; }
.held { color: var(--warn); font-weight: 600; }
/* "Needs approval" in grant tables: allowed, with a quiet note that it waits for you. */
.gate { color: #7A5A1E; font-weight: 400; }
.gate::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 6px 1px 0; border-radius: 50%; background: #D9A441; vertical-align: middle; }
.deny, .bad { color: var(--danger); font-weight: 600; }
.muted { color: var(--muted); }
.tag { display: inline-block; padding: 2px 8px; margin: 0 4px 4px 0; border-radius: 6px; background: var(--mist); font-size: 12px; font-weight: 600; color: var(--slate); }

/* Forms */
.fld { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.fld input, .fld select, .fld textarea, .form-control, .form-select, .input { min-height: 40px; padding: 8px 10px; border: 1px solid var(--control); border-radius: 8px; font: 14px var(--font); color: var(--ink); background: var(--surface); width: 100%; }
.fld textarea { min-height: 160px; font-family: var(--mono); font-size: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end; }
.check { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.check:last-child { border-bottom: 0; }
.check input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--cobalt); flex: none; }
.check .s { color: var(--muted); font-size: 13px; }
.inline-check { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--soft); }
.inline-check input { width: 18px; height: 18px; accent-color: var(--cobalt); }

/* Notices */
.notice { display: flex; gap: 14px; align-items: flex-start; padding: 14px 18px; border-radius: 10px; background: var(--mist); border: 1px solid #C9D7FB; font-size: 14px; line-height: 1.55; }
.notice.warn { background: var(--warn-bg); border-color: var(--warn-border); }
.notice.bad { background: var(--danger-bg); border-color: var(--danger-border); }
.notice.ok { background: #E8F5EC; border-color: #B9DEC5; }
.secret { font-family: var(--mono); font-size: 14px; padding: 12px 14px; background: var(--midnight); color: var(--reverse-sky); border-radius: 8px; word-break: break-all; }

/* Agent connect panel */
.dark { background: var(--midnight); color: var(--white); border: 0; }
.dark .card-head { border-color: var(--slate) !important; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab { min-height: 36px; padding: 0 14px; border-radius: 8px; border: 0; font: 600 13px var(--font); cursor: pointer; background: transparent; color: #C9CDD4; }
.tab.active { background: var(--slate); color: var(--white); }
.code { margin: 0; padding: 20px; font: 13px/1.7 var(--mono); color: #D5E6FF; overflow-x: auto; white-space: pre; }
.dark ol { margin: 0; padding: 8px 20px 16px 40px; color: #E4E7EB; line-height: 1.6; }
.dark .card-foot { color: #C9CDD4; border-color: var(--slate); }
.dark a { color: var(--reverse-sky); }
.tool { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); font-size: 14px; }
.tool .name { flex: 1; font-family: var(--mono); font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
dl.facts { margin: 0; padding: 4px 20px 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
dl.facts > div { padding: 12px 0; border-bottom: 1px solid var(--line); }
dl.facts dt { color: var(--muted); font-size: 13px; }
dl.facts dd { margin: 2px 0 0; font-weight: 600; }

/* Approvals */
.queue-item { display: block; width: 100%; text-align: left; padding: 14px 18px; border: 0; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; background: var(--surface); font: inherit; color: var(--ink); cursor: pointer; }
.queue-item:hover { background: var(--head-bg); }
.queue-item.active { background: var(--mist); border-left-color: var(--cobalt); }
.kv { display: flex; gap: 12px; font-size: 14px; padding: 6px 0; }
.kv dt { width: 96px; flex: none; color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.payload { padding: 20px 24px; font-size: 15px; line-height: 1.65; border-bottom: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; }
.excerpt { padding: 12px 14px; background: var(--head-bg); border: 1px solid var(--line); border-radius: 8px; font: 13px var(--mono); }

/* Sign-in pages (Identity) */
.auth { min-height: 100vh; padding: 48px 20px; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.auth .brand img { height: 34px; }
.auth-card { width: 100%; max-width: 560px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.auth-card h1 { font-size: 24px; }
.auth-card h2 { font-size: 15px; color: var(--muted); font-weight: 600; }
.auth-card hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.auth-card .row { display: flex; flex-direction: column; gap: 20px; }
.auth-card .form-floating { display: flex; flex-direction: column-reverse; gap: 6px; margin-bottom: 14px; }
.auth-card .form-floating label, .auth-card .form-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.auth-card .checkbox, .auth-card .form-check { margin-bottom: 12px; }
.auth-card .w-100 { width: 100%; }
.auth-card .btn-lg { min-height: 44px; }
.text-danger, .validation-message { color: var(--danger); font-size: 13px; }
.alert { padding: 12px 14px; border-radius: 8px; background: var(--mist); border: 1px solid #C9D7FB; font-size: 14px; }
.alert-danger { background: var(--danger-bg); border-color: var(--danger-border); }
.alert-success { background: #E8F5EC; border-color: #B9DEC5; }
.alert-warning { background: var(--warn-bg); border-color: var(--warn-border); }
.mb-3 { margin-bottom: 14px; } .mt-3 { margin-top: 14px; }
.nav-pills { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 16px; }
.nav-pills .nav-link { display: inline-flex; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--control); color: var(--soft); text-decoration: none; font-weight: 600; font-size: 13px; }
.nav-pills .nav-link.active { background: var(--midnight); color: var(--white); border-color: var(--midnight); }
.manage { display: flex; flex-direction: column; gap: 16px; }
.manage .row { display: flex; flex-direction: column; gap: 16px; }

#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; padding: 10px 16px; background: var(--warn-bg); border-top: 1px solid var(--warn-border); z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 12px; top: 8px; }
.blazor-error-boundary { padding: 12px 16px; background: var(--danger-bg); border: 1px solid var(--danger-border); border-radius: 8px; }
.blazor-error-boundary::after { content: "Something went wrong on this page."; }

/* Authenticator setup */
.mfa { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 32px; align-items: start; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.mfa-qr { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 16px; border-radius: 12px; background: var(--mist); }
.mfa-qr img { width: 208px; height: 208px; image-rendering: pixelated; border-radius: 8px; background: #fff; padding: 8px; }
.mfa-key { width: 208px; font-size: 13px; }
.mfa-key summary { cursor: pointer; color: var(--cobalt); font-weight: 600; text-align: center; }
.mfa-key[open] { display: flex; flex-direction: column; gap: 6px; }
.mfa-key kbd { display: block; margin-top: 8px; padding: 8px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; font-size: 14px; color: var(--ink); overflow-wrap: anywhere; text-align: center; }
.mfa-steps h2 { font-size: 20px; margin-bottom: 12px; }
.mfa-steps ol { margin: 0 0 20px; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; line-height: 1.55; }
.mfa-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.mfa-code { width: 180px !important; min-height: 44px; font: 600 20px var(--mono) !important; letter-spacing: .12em; text-align: center; }
.mfa-form .btn { min-height: 44px; }
.mfa-form .text-danger { flex-basis: 100%; }
.mfa-note { margin-top: 16px; font-size: 13px; }
@media (max-width: 720px) { .mfa { grid-template-columns: 1fr; justify-items: center; padding: 16px; } .mfa-steps { width: 100%; } }
.manage > .nav-pills { margin-bottom: 4px; }
.mfa-code::placeholder { color: #B5BCC8; font-weight: 400; }
/* On a phone the QR code is on the same screen as the app: offer the otpauth link instead. */
.mfa-open { display: none; width: 208px; }
@media (max-width: 720px), (pointer: coarse) { .mfa-open { display: inline-flex; } }

/* OAuth consent: who is asking, what it may do, one Authorize button. */
.consent-pair { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 4px 0 2px; }
.consent-app { width: 52px; height: 52px; border-radius: 14px; background: var(--midnight); color: var(--white); display: grid; place-items: center; font-weight: 700; font-size: 18px; letter-spacing: .5px; }
.consent-app.bad { background: var(--danger); }
.consent-link { width: 40px; border-top: 2px dashed var(--border); }
.consent-logo { width: 52px; height: 52px; padding: 9px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.auth-card h1.consent-title { text-align: center; font-size: 22px; }
.consent-lede { text-align: center; margin: 0; color: var(--ink); }
.consent-who { text-align: center; margin: 0; font-size: 13px; color: var(--muted); }
.consent-box { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.auth-card .consent-box h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 4px 0 0; }
.consent-form { display: flex; flex-direction: column; gap: 14px; }
.consent-box .consent-form, form.consent-form .input { width: 100%; }
.consent-as { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.consent-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.consent-list li { position: relative; padding-left: 26px; line-height: 1.45; }
.consent-list li::before { position: absolute; left: 0; top: 0; font-weight: 700; }
.consent-list.can li::before { content: "\2713"; color: var(--ok); }
.consent-list.cannot li::before { content: "\2715"; color: var(--danger); }
.consent-accounts { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.consent-account { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.consent-account:hover { background: var(--hover); }
.consent-account input { margin-top: 3px; }
.consent-caps { display: block; font-size: 12px; color: var(--muted); }
.consent-agents { display: flex; flex-direction: column; gap: 6px; }
.consent-agent { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 14px; }
.consent-agent:has(input:checked) { border-color: var(--cobalt); background: var(--hover); }
.consent-length { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.consent-length .input { max-width: 200px; }
.consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.consent-foot { font-size: 12px; color: var(--muted); text-align: center; margin: 0; line-height: 1.5; }

/* Consent type scale: 22 title, 15 lede, 14 body, 13 secondary, 12 labels and fine print. */
.consent-lede { font-size: 15px; line-height: 1.5; }
.consent-box { font-size: 14px; }
.consent-box .muted, .consent-account .muted { font-size: 13px; }
.consent-as strong.mono, .consent-agent strong.mono { font-family: var(--font); }
.consent-account strong.mono { font-family: var(--font); font-size: 14px; font-weight: 600; }
.auth-card .consent-box h2 { font-size: 12px; font-weight: 700; }
.consent-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.consent-length { font-size: 13px; font-weight: 600; color: var(--muted); }
.consent-length .input { width: auto; min-width: 180px; min-height: 36px; padding: 6px 10px; }
.consent-actions .btn, .consent-form > .btn { min-height: 44px; font-size: 15px; }
.consent-foot { font-size: 12px; }

/* Tables: a cell marked .wrap may wrap; tags wrap inside their cell; actions sit at the right. */
.tbl td.wrap { white-space: normal; }
.tbl .tags { display: flex; flex-wrap: wrap; gap: 4px; max-width: 420px; }
.tbl .tags .tag { margin: 0; }
.tbl td.actions-cell { text-align: right; width: 1%; }
.tbl td.actions-cell form, .tbl td.actions-cell .btn { margin-left: 6px; }
.accounts-tbl td { vertical-align: middle; }

.linkish { background: none; border: 0; padding: 0; color: var(--cobalt); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; }

/* Console redesign (2026-11-21): badges, segmented tabs, the "needs you" list, small stat tiles,
   and grouped tables. Colours keep 4.5:1 on their backgrounds. */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--mist); color: #0030B8; }
.badge.ok { background: #E7F6EC; color: #0B5E30; }
.badge.warn { background: #FFF4DB; color: #7A4F00; }
.badge.bad { background: var(--danger-bg); color: #A3231A; }
.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; color: #0B5E30; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #1A9E55; flex: none; }
.status.warn { color: #7A4F00; } .status.warn::before { background: #E0A100; }
.status.bad { color: #A3231A; } .status.bad::before { background: #D93A2E; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: #E9EDF4; border-radius: 10px; }
.seg button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; font: 600 13px var(--font); color: var(--soft); cursor: pointer; }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(11,18,32,.08); }
.underline-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--border); }
.underline-tabs button { min-height: 40px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; font: 14px var(--font); color: var(--soft); cursor: pointer; }
.underline-tabs button[aria-selected="true"] { border-bottom-color: var(--cobalt); color: var(--ink); font-weight: 700; }
.underline-tabs .n { color: var(--muted); margin-left: 4px; }
.underline-tabs .n.bad { color: #A3231A; font-weight: 700; }
.needs-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.needs-row:last-child { border-bottom: 0; }
.needs-row .grow { flex: 1 1 320px; min-width: 0; }
.needs-row .t { font-weight: 600; overflow-wrap: anywhere; }
.needs-row .s { font-size: 13px; color: var(--muted); }
.needs-row .btns { display: flex; gap: 8px; }
.btn.go { background: #0F7B3F; border-color: #0F7B3F; color: var(--white); }
.btn.go:hover { background: #0B5E30; color: var(--white); }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tile .k { font-size: 13px; color: var(--muted); }
.tile .v { font-size: 26px; font-weight: 700; }
.tile .n { font-size: 12px; color: var(--muted); }
.tile .v.bad { color: #A3231A; }
@media (max-width: 980px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.attention { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 16px; border-radius: 10px; background: #FFF8EC; border: 1px solid #F0D79A; font-size: 14px; }
.attention strong { color: #7A4F00; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar .search { display: flex; align-items: center; gap: 8px; flex: 1 1 240px; max-width: 340px; min-height: 36px; padding: 0 12px; background: var(--surface); border: 1px solid var(--control); border-radius: 8px; }
.toolbar .search input { flex: 1; min-width: 0; border: 0; outline: none; font: 13px var(--font); color: var(--ink); background: transparent; }
.toolbar .pick { display: flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 4px 0 10px; background: var(--surface); border: 1px solid var(--control); border-radius: 8px; font-size: 13px; color: var(--muted); }
.toolbar .pick select { border: 0; background: transparent; font: 600 13px var(--font); color: var(--ink); min-height: 34px; cursor: pointer; }
.tbl tr.group-row td { background: #F3F6FB; padding: 8px 16px; border-top: 1px solid var(--border); }
.tbl tr.group-row button { border: 0; background: transparent; padding: 0; font: 700 13px var(--font); color: var(--ink); cursor: pointer; }
.tbl tr.group-row .sum { font-weight: 400; color: var(--muted); }
.tbl tr.group-row .sum.bad { color: #A3231A; } .tbl tr.group-row .sum.warn { color: #7A4F00; }
.tbl tr.row-bad td { background: #FFF9F8; } .tbl tr.row-warn td { background: #FFFCF4; }
.tbl .chip { display: inline-block; padding: 2px 8px; margin: 0 4px 2px 0; border-radius: 6px; background: #EEF1F6; font-size: 12px; }
.queue-item .top { display: flex; align-items: center; gap: 8px; }
.queue-item .when { margin-left: auto; font-size: 12px; color: var(--muted); }

/* Sign-in pages, split (2026-11-21): the form on the left, a quiet picture of what SwitchLogix does
   on the right. Under 900px the picture goes and the form fills the screen. */
.split { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); background: var(--surface); }
.split-form { display: flex; flex-direction: column; justify-content: center; gap: 28px; padding: 48px 24px; width: 100%; max-width: 420px; margin: 0 auto; box-sizing: border-box; }
.split-form .brand img { height: 30px; width: auto; }
.split .auth-card { max-width: none; padding: 0; border: 0; border-radius: 0; background: transparent; gap: 16px; }
.split .auth-card h1 { font-size: 26px; }
.split-foot { font-size: 12px; color: var(--muted); }
.split-hero { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 40px; padding: 48px; background: radial-gradient(120% 90% at 70% 20%, #E3ECFF 0%, #EFF4FF 45%, #F7F9FD 100%); border-left: 1px solid var(--line); }
.hero-copy { text-align: center; max-width: 520px; }
.hero-copy h2 { font-size: 34px; line-height: 1.18; font-weight: 700; letter-spacing: -.02em; color: var(--midnight); }
.hero-copy h2 span { color: var(--cobalt); }
.hero-copy p { margin-top: 14px; font-size: 15px; color: var(--soft); }
.hero-art { position: relative; width: 100%; max-width: 520px; }
.hub { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 28px; border-radius: 20px; background: rgba(255,255,255,.7); border: 1px solid #D9E3F7; box-shadow: 0 24px 48px -24px rgba(0,63,240,.25); }
.lane { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.node { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font: 600 13px var(--mono); color: var(--slate); }
.node.svc { font-family: var(--font); background: var(--mist); border-color: #C9D7FB; color: #0030B8; }
.hero-gate { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 14px; background: var(--midnight); color: var(--white); font-weight: 700; position: relative; }
.hero-gate img { width: 26px; height: 26px; filter: brightness(0) invert(1); }
.hero-gate::before, .hero-gate::after { content: ""; position: absolute; left: 50%; width: 2px; height: 22px; background: repeating-linear-gradient(#8FA9E8 0 4px, transparent 4px 8px); }
.hero-gate::before { bottom: 100%; } .hero-gate::after { top: 100%; }
.float { position: absolute; display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 12px 28px -12px rgba(11,18,32,.25); font-size: 13px; max-width: 250px; }
.float strong { display: block; font-size: 13px; }
.float small { display: block; color: var(--muted); font-size: 12px; }
.float .dot { margin-top: 5px; }
.float.f1 { right: -24px; top: -28px; }
.float.f2 { left: -24px; bottom: -30px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split-hero { display: none; } }
/* The sign-in form itself. */
.signin-sub { color: var(--muted); font-size: 14px; margin-top: -8px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--soft); }
.field input { min-height: 44px; padding: 8px 12px; border: 1px solid var(--control); border-radius: 8px; font: 14px var(--font); color: var(--ink); background: var(--surface); }
.field input:focus { border-color: var(--cobalt); outline: 3px solid #C9D7FB; outline-offset: 0; }
.field-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.ext-buttons { display: flex; flex-direction: column; gap: 10px; }
.ext-buttons .btn { min-height: 44px; width: 100%; gap: 10px; }
.ext-buttons svg { width: 18px; height: 18px; }
