/* DevControl Next / one and only one active visual system (R54).
   Shared byte-for-byte by Web, account Console, and Identity Auth.
   No legacy color themes, no third-party visual design. */
:root {
  color-scheme: dark;
  --canvas: #090f18;
  --surface: #101b2a;
  --raised: #172538;
  --lift: #1e3047;
  --border: #2b3d53;
  --text: #f2f7fc;
  --muted: #b2c1d0;
  --subtle: #879bae;
  --accent: #7bd4f0;
  --action: #d9edf8;
  --positive: #7adbb5;
  --warning: #efd49a;
  --danger: #f6a3ab;
  --max: 1180px;
  --read: 1020px;
  --radius: 16px;
  font-family: Inter, "Noto Sans SC", "Segoe UI", system-ui, sans-serif;
  line-height: 1.6;
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.next-site { background: radial-gradient(ellipse 56vw 340px at 50% -170px, #1b4154, transparent 78%), var(--canvas); color: var(--text); min-height: 100vh; margin: 0; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.next-header { width: 100%; border-bottom: 1px solid var(--border); background: #0b1420f0; }
.next-header-inner { max-width: var(--max); min-height: 72px; display: flex; align-items: center; gap: 26px; padding: 0 24px; margin: 0 auto; }
.next-logo { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; font-size: 17px; font-weight: 750; letter-spacing: -.03em; color: var(--text); }
.next-logo:hover { text-decoration: none; }
.next-logo b { color: var(--accent); }
.next-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 1px solid #3f7691; background: #173b52; color: #e3f7ff; }
.next-header nav { min-width: 0; margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.next-header nav a { color: var(--muted); font-size: 13px; font-weight: 620; white-space: nowrap; border-radius: 9px; padding: 9px 11px; }
.next-header nav a:hover { background: var(--raised); color: var(--text); text-decoration: none; }
.next-header nav a.next-nav-action { background: var(--action); color: #09283a; font-weight: 750; }
.next-version { padding-left: 16px; border-left: 1px solid var(--border); white-space: nowrap; font-size: 11px; color: var(--subtle); }
.next-container { max-width: var(--max); margin: auto; padding: 28px 24px 72px; }
.next-banner { display: flex; align-items: baseline; gap: 14px; padding: 12px 16px; background: #192435; border: 1px solid var(--border); border-radius: 12px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.next-banner strong { color: var(--warning); white-space: nowrap; }
.next-main { margin-top: 32px; min-width: 0; }
.next-main--guide { display: flex; flex-direction: column; gap: 29px; align-items: center; }
.next-main--console { display: grid; grid-template-columns: 218px minmax(0, 1fr); align-items: start; gap: 34px; }
.next-aside { min-width: 0; }
.next-main--guide .next-aside { width: min(100%, var(--read)); }
.next-main--guide .next-aside-heading { display: none; }
.next-main--console .next-aside { position: sticky; top: 24px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); padding: 16px; }
.next-aside-heading { color: var(--subtle); font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; padding: 8px 11px 15px; }
.next-progress { margin: 0; padding: 8px; list-style: none; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; border: 1px solid var(--border); background: var(--surface); border-radius: 12px; }
.next-progress li { margin: 0; min-width: 0; }
.next-progress a { display: flex; justify-content: center; align-items: center; min-height: 46px; padding: 7px 9px; text-align: center; border-radius: 8px; background: #1a2d43; color: #d6e4f0; font-size: 12px; font-weight: 660; line-height: 1.4; }
.next-progress a:hover { background: var(--lift); text-decoration: none; }
.next-side { display: grid; gap: 4px; }
.next-side a { display: block; border-radius: 9px; padding: 11px 13px; color: #c0cfdd; font-weight: 620; font-size: 13px; }
.next-side a:hover { text-decoration: none; color: #fff; background: var(--lift); }
.next-content { width: 100%; min-width: 0; }
.next-main--guide .next-content { max-width: var(--read); margin: 0 auto; }
.next-main--guide .next-eyebrow, .next-main--guide .next-content > h1, .next-main--guide .next-content > .next-lede { text-align: center; margin-left: auto; margin-right: auto; }
.next-eyebrow { font-size: 11px; color: var(--accent); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.next-content h1, .next-auth-card h1 { font-size: clamp(29px, 3.3vw, 44px); letter-spacing: -.045em; line-height: 1.18; margin: 12px 0 16px; overflow-wrap: anywhere; color: #f6faff; }
.next-lede { max-width: 740px; margin: 0 0 30px; color: var(--muted); font-size: clamp(14px, 1.5vw, 17px); line-height: 1.7; }
.next-panel, .next-card, .next-auth-card { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.next-panel { margin: 0 0 20px; padding: clamp(21px, 3vw, 31px); }
.next-panel h2 { margin: 0 0 13px; font-size: 18px; letter-spacing: -.015em; line-height: 1.4; }
.next-panel h2:not(:first-child) { margin-top: 29px; }
.next-panel p, .next-card p, .next-auth-card p { color: var(--muted); line-height: 1.75; font-size: 15px; }
.next-panel li { color: var(--muted); line-height: 1.8; margin: 7px 0; }
.next-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin: 20px 0; }
.next-card { display: block; padding: 24px; background: linear-gradient(145deg,#152439,var(--surface)); }
.next-card h2, .next-card h3 { margin: 5px 0 10px; font-size: 17px; color: #edf5fb; line-height: 1.4; }
.next-card p { margin: 0 0 12px; font-size: 14px; }
.next-index { color: var(--accent); font-size: 11px; font-weight: 800; }
.next-featured { border-color: #497b91; background: #153146; }
.next-link-card { color: inherit; transition: border-color .15s, background .15s, transform .15s; }
.next-link-card:hover { color: inherit; background: var(--lift); border-color: #559dbc; text-decoration: none; transform: translateY(-2px); }
.next-actions { margin: 23px 0 0; display: flex; gap: 11px; flex-wrap: wrap; align-items: center; }
.next-button, button.next-button { display: inline-flex; align-items: center; justify-content: center; text-align: center; min-height: 46px; max-width: 100%; padding: 10px 17px; border: 1px solid var(--action); border-radius: 11px; background: var(--action); color: #0b293d; font-size: 13px; font-family: inherit; font-weight: 760; line-height: 1.45; cursor: pointer; }
.next-button:hover { background: #fff; color: #0b293d; text-decoration: none; }
.next-button.secondary { background: #21354a; border-color: #39516b; color: #dceaf5; }
.next-button.secondary:hover { background: #2b4560; color: #fff; }
.next-chip { display: inline-block; border-radius: 999px; background: #1c394c; border: 1px solid #355e72; padding: 5px 10px; font-size: 11px; color: #c4e7f4; font-weight: 670; }
.next-code, pre { overflow-x: auto; max-width: 100%; border-radius: 11px; padding: 17px; background: #091521; border: 1px solid var(--border); color: #c9e7f1; }
code { overflow-wrap: anywhere; }
.next-info { border-left: 3px solid var(--warning); border-radius: 0 9px 9px 0; background: #2b2921; color: #e2d3b2; font-size: 12px; padding: 14px 16px; line-height: 1.8; margin: 23px 0; overflow-wrap: anywhere; }
.next-checks { display: grid; gap: 11px; list-style: none; margin: 0; padding: 0; counter-reset: next-step; }
.next-checks li { counter-increment: next-step; display: grid; gap: 5px; padding: 14px 17px; border: 1px solid var(--border); border-radius: 11px; background: var(--raised); margin: 0; }
.next-checks li::before { content: counter(next-step,decimal-leading-zero); color: var(--accent); font-weight: 760; font-size: 11px; }
.next-checks li b { color: var(--text); }
.next-checks li span { font-size: 13px; }
.next-space { border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 13px; }
.next-space span { color: var(--subtle); }
.next-empty { text-align: center; color: var(--muted); border-radius: 11px; border: 1px dashed #496177; padding: 25px; background: var(--raised); }
.next-footer { max-width: var(--max); margin: 0 auto; padding: 26px 24px 38px; display: flex; justify-content: center; gap: 17px; flex-wrap: wrap; border-top: 1px solid var(--border); font-size: 12px; color: var(--subtle); }
.next-footer a { color: var(--muted); }
.next-auth-shell { max-width: var(--auth-width,440px); margin: 0 auto; padding: clamp(42px,9vh,100px) 16px 80px; }
.next-auth-card { padding: clamp(25px,4vw,34px); }
.next-auth-card h1 { font-size: clamp(27px,4.2vw,36px); }
.next-auth-card p { margin: 10px 0 23px; }
.next-auth-card .next-button { width: 100%; }
/* R109: whole-row, keyboard-accessible Next device picker; one visual system. */
.next-auth-card .next-device-fieldset {
 display: grid; gap: 10px; min-width: 0; border: 1px solid var(--border);
 background: var(--raised); border-radius: 12px; padding: 12px;
 margin: 0 0 19px;
}
.next-auth-card .next-device-fieldset legend {
 color: var(--muted); font-size: 13px; font-weight: 710; padding: 0 6px;
}
.next-auth-card .next-device-choice {
 display: flex; gap: 12px; align-items: center; min-height: 54px;
 border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px;
 background: var(--surface); color: var(--text); font-size: 13px;
 line-height: 1.55; overflow-wrap: anywhere; cursor: pointer;
}
.next-auth-card .next-device-choice:has(input:checked) {
 border-color: #70bcd8; background: #1a3447;
}
.next-auth-card .next-device-choice:focus-within {
 outline: 3px solid var(--accent); outline-offset: 2px;
}
.next-auth-card .next-device-choice input {
 flex: 0 0 auto; margin: 0; width: 18px; height: 18px;
 accent-color: var(--accent); cursor: pointer;
}
.next-auth-card .g_id_signin { min-height: 44px; display: flex; justify-content: center; margin: 16px auto 24px; max-width: 100%; }
.next-auth-card .g_id_signin > div { max-width: 100%; }
.next-auth-back { margin-top: 27px; padding-top: 18px; border-top: 1px solid var(--border); }
.next-auth-card .next-info { margin: 18px 0; }
.next-console-shell { max-width: var(--max); margin: 0 auto; padding: 38px 24px 80px; }
.next-console-shell .next-content { max-width: 100%; }
.next-console-shell > .next-content { padding: 0; }
.next-console-shell h1 { text-align: left; }
.next-console-shell form { margin-top: 22px; }
.next-console-shell ul { color: var(--muted); line-height: 1.9; }
.next-auth-card .next-lede { margin-bottom: 26px; }
@media (max-width: 1080px) {
 .next-header-inner { flex-wrap: wrap; gap: 0 20px; padding-top: 13px; padding-bottom: 13px; }
 .next-header nav { order: 3; width: 100%; margin: 7px 0 0; }
 .next-version { margin-left: auto; }
}
@media (max-width: 850px) {
 .next-main--console { display: block; }
 .next-main--console .next-aside { position: static; margin-bottom: 26px; }
 .next-main--console .next-side { display: flex; gap: 5px; flex-wrap: wrap; }
 .next-main--console .next-side a { font-size: 12px; }
}
@media (max-width: 600px) {
 .next-header-inner { padding: 13px 16px; display: grid; grid-template-columns: 1fr auto; gap: 10px; }
 .next-logo { font-size: 16px; }
 .next-version { font-size: 10px; padding-left: 0; border: 0; text-align: right; }
 .next-header nav {
   grid-column: 1 / -1; display: flex; flex-wrap: nowrap; gap: 7px;
   width: 100%; min-width: 0; margin: 0; overflow-x: auto;
   overscroll-behavior-x: contain; scrollbar-width: thin; padding-bottom: 4px;
 }
 .next-header nav a {
   display: inline-flex; align-items: center; justify-content: center;
   flex: 0 0 auto; min-height: 44px; padding: 9px 12px;
   text-align: center; white-space: nowrap; background: var(--surface);
   border: 1px solid var(--border); font-size: 12px;
 }
 .next-header nav a.next-nav-action { margin: 0; }
 .next-container { padding: 18px 15px 52px; }
 .next-main { margin-top: 20px; }
 .next-main--guide { gap: 19px; }
 .next-progress {
   display: flex; flex-wrap: nowrap; gap: 7px; min-width: 0;
   overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin;
 }
 .next-progress li { flex: 0 0 147px; }
 .next-progress a { min-height: 43px; padding: 8px; }
 .next-main--guide .next-content > .next-lede { margin-bottom: 22px; }
 .next-banner { font-size: 12px; padding: 11px 13px; }
 .next-grid { grid-template-columns: minmax(0,1fr); gap: 12px; }
 .next-banner { display: grid; gap: 5px; }
 .next-content h1 { font-size: clamp(27px,8.1vw,35px); }
 .next-panel { padding: 20px; }
 .next-card { padding: 20px; }
 .next-actions .next-button { flex: 1 1 190px; }
 .next-auth-shell { padding: 32px 15px 60px; }
 .next-console-shell { padding: 27px 16px 60px; }
 .next-footer { padding: 24px 16px 37px; }
}
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important; transition:none!important; } }

/* R55 — signed-in account and device console; same Next visual system. */
.next-side a[aria-current="page"], .next-header nav a[aria-current="page"] {
  background: #224159; color: #f2faff; border-color: #416782;
}
.next-account-id { margin: 17px 0 0; font-size: 13px; color: var(--muted); }
.next-workspaces { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 11px; }
.next-workspaces li { min-width: 0; padding: 17px 20px; background: var(--raised); border: 1px solid var(--border); border-radius: 12px; font-size: 14px; }
.next-workspaces li a { font-weight: 760; margin-right: 9px; overflow-wrap: anywhere; }
.next-workspaces li:hover { border-color: #4f829c; }
.next-help { font-size: 13px !important; color: var(--subtle) !important; line-height: 1.72; }
.next-facts { margin: 17px 0 0; }
.next-facts > div { padding: 15px 18px; border: 1px solid var(--border); border-radius: 10px; background: var(--raised); display: grid; gap: 6px; overflow-wrap: anywhere; }
.next-facts span { color: var(--subtle); font-size: 12px; }
.next-facts strong { font-size: 15px; font-weight: 760; }
.next-stat { display: flex; align-items: baseline; flex-wrap: wrap; gap: 14px; margin: 21px 0 18px; }
.next-stat-number { font-size: clamp(42px, 6vw, 64px); line-height: 1; color: var(--text); font-weight: 790; font-variant-numeric: tabular-nums; }
.next-stat span { color: var(--muted); font-size: 14px; }
.next-panel h2:only-child { margin-bottom: 0; }
@media (max-width: 600px) {
  .next-workspaces li { padding: 15px; }
  .next-stat { gap: 10px; }
  .next-stat span { flex: 1; }
  .next-console-shell + .next-footer { text-align: center; }
}

/* Signed-in mobile console: keep the main content above the fold.
 * Horizontal section tabs instead of a second, wrapping navigation grid. */
@media (max-width: 850px) {
 .next-main--console .next-aside { padding: 7px; margin-bottom: 18px; }
 .next-main--console .next-aside-heading { display: none; }
 .next-main--console .next-side {
   display: flex; flex-wrap: nowrap; gap: 5px; overflow-x: auto;
   overscroll-behavior-x: contain; scrollbar-width: thin; padding: 2px;
 }
 .next-main--console .next-side a {
   flex: 0 0 auto; display: inline-flex; align-items: center;
   min-height: 42px; padding: 9px 12px; white-space: nowrap;
 }
}

/* R56 — real tenant-scoped, read-only registered device cards. */
.next-device-list { display: grid; gap: 12px; margin: 22px 0; }
.next-device-card { margin: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px 20px; align-items: center; }
.next-device-card h3 { margin: 0; font-size: 16px; overflow-wrap: anywhere; }
.next-device-card .next-device-meta { color: var(--muted); font-size: 12px; grid-column: 1 / -1; }
.next-device-card .next-chip { white-space: nowrap; }
@media (max-width:600px) { .next-device-card { padding: 18px; } }

/* R96: signed-in console is a task-first product, not a database/debug page. */
body[data-next-surface="account-console"] .next-header-inner,
body[data-next-surface="account-console"] .next-container,
body[data-next-surface="account-console"] .next-footer {max-width:1440px}
body[data-next-surface="account-console"] .next-main--console {grid-template-columns:216px minmax(0,1fr);gap:30px;margin-top:12px}
body[data-next-surface="account-console"] .next-content {max-width:none}
.next-aside-foot {margin:18px 10px 2px;padding-top:14px;border-top:1px solid var(--border);font-size:13px}
.next-console-hero {display:flex;align-items:center;justify-content:space-between;gap:22px;flex-wrap:wrap;padding:32px 36px;margin-bottom:22px;background:linear-gradient(115deg,#162d42,#121d2c);border:1px solid #315168;border-radius:var(--radius)}
.next-console-hero h1 {margin:8px 0;font-size:36px}
.next-console-hero .next-lede {margin:0 0 18px}
.next-context {color:var(--muted);font-size:13px}
.next-context strong {color:var(--text)}
.next-dashboard-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:24px}
.next-dashboard-grid .next-card {min-height:222px;display:flex;flex-direction:column;padding:25px}
.next-dashboard-grid .next-card h2 {margin:14px 0 5px;font-size:19px}
.next-dashboard-grid .next-card p {margin:0}
.next-card-action {margin-top:auto;padding-top:14px;color:var(--accent);font-size:13px;font-weight:760}
.next-action-icon {display:grid;place-items:center;width:44px;height:44px;background:#22445a;border-radius:12px;color:var(--accent);font-size:26px}
.next-console-help {display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:22px 2px;border-top:1px solid var(--border);font-size:13px;color:var(--muted)}
.next-text-button {font:inherit;color:var(--muted);background:none;border:0;cursor:pointer;padding:10px}
.next-text-button:hover {color:var(--text);text-decoration:underline}
.next-workspace-role {color:var(--muted);font-size:13px}
.next-technical-details {grid-column:1/-1;color:var(--subtle);font-size:12px}
.next-technical-details summary {cursor:pointer}
.next-technical-details code {display:block;margin-top:7px}
@media(max-width:1050px) {.next-dashboard-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:850px) {body[data-next-surface="account-console"] .next-main--console{display:block}.next-console-hero{padding:25px}}
@media(max-width:600px) {.next-dashboard-grid{grid-template-columns:1fr}.next-dashboard-grid .next-card{min-height:168px}.next-console-hero{padding:22px}.next-console-hero .next-button{width:100%}}

/* Next OAuth mobile confirmation must respond visually before a slow callback. */
.next-consent-submitting {
  position: fixed;
  z-index: 9999;
  inset: auto 12px 20px;
  padding: 17px 22px;
  border-radius: 14px;
  border: 1px solid #80bcdd;
  background: #142a3c;
  color: #f4fbff;
  box-shadow: 0 12px 34px rgba(0,0,0,.45);
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  pointer-events: none;
}
.next-auth-card form[aria-busy="true"] button[type="submit"] {
  opacity: .7;
  cursor: progress;
}
@media (min-width: 720px) {
  .next-consent-submitting { inset: auto calc(50% - 280px) 30px; }
}
