:root {
  color-scheme: light;
  --bg: #eef3f8;
  --bg-soft: #f4f7fb;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --surface-hover: #f4f7fc;
  --text: #17202b;
  --muted: #687789;
  --line: #dce4ed;
  --accent: #477cff;
  --accent-2: #2f6fea;
  --accent-soft: #eaf1ff;
  --danger: #cf3551;
  --success: #16845e;
  --shadow: 0 18px 55px rgba(42, 61, 85, .14);
  --radius: 20px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #151515;
  --bg-soft: #1b1b1b;
  --surface: #222222;
  --surface-strong: #292929;
  --surface-hover: #2d2d2d;
  --text: #f0f0f0;
  --muted: #a4a4a4;
  --line: #393939;
  --accent: #4c9dff;
  --accent-2: #64adff;
  --accent-soft: #193450;
  --danger: #ff7185;
  --success: #65d8a3;
  --shadow: 0 20px 60px rgba(0, 0, 0, .34);
}

:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  transition: color .25s var(--ease), background .25s var(--ease);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 50%, transparent);
  outline-offset: 2px;
}

.aurora { display: none; }
.aurora i { position: absolute; border-radius: 50%; filter: blur(110px); opacity: .1; animation: drift 22s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { width: 34vw; height: 34vw; left: -12vw; top: -16vw; background: #477cff; }
.aurora i:nth-child(2) { width: 30vw; height: 30vw; right: -10vw; top: 20vh; background: #6bc8ff; animation-delay: -6s; }
.aurora i:nth-child(3) { width: 24vw; height: 24vw; left: 42vw; bottom: -18vw; background: #91aaff; animation-delay: -11s; }
@keyframes drift { to { transform: translate3d(4vw, 5vh, 0) scale(1.14); } }

.app-shell { position: relative; z-index: 1; min-height: 100vh; }
.boot-card, .auth-card { width: min(460px, calc(100% - 32px)); margin: 12vh auto; }
.boot-card { padding: 36px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); backdrop-filter: blur(24px); }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; overflow: hidden; border-radius: 14px; background: var(--surface); box-shadow: 0 8px 24px rgba(42, 76, 145, .16); }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.skeleton { height: 16px; width: 65%; margin-top: 16px; border-radius: 20px; background: linear-gradient(90deg, var(--line), var(--accent-soft), var(--line)); background-size: 200% 100%; animation: shine 1.4s infinite; }
.skeleton.wide { width: 90%; height: 30px; margin-top: 32px; }
@keyframes shine { to { background-position: -200% 0; } }

.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 max(20px, calc((100vw - 1120px) / 2)); border-bottom: 1px solid var(--line); background: var(--surface); }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: -.02em; }
.brand small { display: block; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.top-search { position: absolute; left: 50%; display: flex; align-items: center; gap: 8px; width: min(280px, 30vw); height: 38px; padding: 0 13px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: var(--bg-soft); transform: translateX(-50%); }
.top-search-icon { color: var(--muted); font-size: 20px; line-height: 1; }
.top-search-placeholder { overflow: hidden; font-size: 14px; white-space: nowrap; text-overflow: ellipsis; }
.top-actions { display: flex; align-items: center; gap: 9px; }
.icon-button { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: var(--surface); cursor: pointer; transition: background .2s; }
.icon-button:hover { background: var(--surface-hover); }
.profile-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 3px 9px 3px 4px; border-radius: 22px; color: var(--text); font-size: 13px; font-weight: 700; }
.profile-chip:hover { background: var(--surface-hover); }
.profile-chip img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }

.layout { display: grid; grid-template-columns: 166px minmax(0, 1fr) 260px; gap: 18px; align-items: start; width: min(1120px, calc(100% - 40px)); margin: 20px auto 72px; }
.sidebar { position: sticky; top: 84px; align-self: start; display: grid; gap: 3px; }
.nav-link { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border-radius: 8px; color: var(--muted); font-size: 14px; font-weight: 650; transition: .2s var(--ease); }
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.active { color: #245fd3; background: var(--accent-soft); }
.nav-icon { display: inline-grid; place-items: center; width: 24px; color: currentColor; font-size: 18px; line-height: 1; opacity: .9; }
.nav-separator { height: 1px; margin: 12px 10px; background: var(--line); }
.content { min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); animation: enter .35s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } }

.right-rail { position: sticky; top: 84px; display: grid; gap: 2px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.right-rail-title { margin: 0 0 3px; padding: 11px 12px; border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 750; }
.rail-link { display: flex; align-items: center; min-height: 38px; padding: 0 12px; border-radius: 8px; color: var(--text); font-size: 13px; font-weight: 600; }
.rail-link:hover { background: var(--surface-hover); }
.rail-link.active { color: var(--accent-2); background: var(--accent-soft); }

.eyebrow { margin: 0 0 10px; color: var(--accent-2); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(32px, 4vw, 46px); line-height: 1.08; letter-spacing: -.04em; }
h2 { margin: 0; font-size: clamp(22px, 3vw, 30px); letter-spacing: -.03em; }
h3 { margin: 0; font-size: 17px; }
.lede { max-width: 720px; margin: 16px 0 0; color: var(--muted); font-size: 17px; line-height: 1.65; }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 42px 0 16px; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 30px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { position: relative; padding: 24px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.card.interactive { transition: border-color .2s, background .2s; }
.card.interactive:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--surface-hover); }
.card p { margin: 10px 0 0; color: var(--muted); line-height: 1.55; }
.metric { margin-top: 22px; font-size: 32px; font-weight: 850; letter-spacing: -.04em; }
.metric small { color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: 0; }
.status { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 999px; color: var(--success); background: color-mix(in srgb, var(--success) 12%, transparent); font-size: 12px; font-weight: 750; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 14px currentColor; }
.memo { display: flex; gap: 14px; margin: 26px 0 0; padding: 18px 20px; border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); border-radius: 18px; background: var(--accent-soft); }
.memo strong { display: block; margin-bottom: 4px; }
.memo p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

.list { display: grid; gap: 10px; }
.list-item { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.list-main { min-width: 0; }
.list-main strong { display: block; overflow-wrap: anywhere; }
.list-main small { display: block; margin-top: 5px; color: var(--muted); line-height: 1.45; }
.avatar { flex: 0 0 auto; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; color: white; font-weight: 850; background: var(--accent); }
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.top-gap { margin-top: 26px; }
.spacer { flex: 1; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 17px; border: 0; border-radius: 10px; color: white; background: var(--accent-2); cursor: pointer; font-weight: 750; transition: background .18s, opacity .18s; }
.button:hover { background: #245fd3; }
.button:active { transform: scale(.98); }
.button.secondary { color: var(--text); border: 1px solid var(--line); background: var(--surface-strong); box-shadow: none; }
.button.danger { color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 24%, transparent); background: color-mix(in srgb, var(--danger) 8%, transparent); box-shadow: none; }
.button.small { min-height: 36px; padding: 0 13px; border-radius: 11px; font-size: 13px; }
.button[disabled] { opacity: .5; pointer-events: none; }

.auth-wrap { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(420px, 46%) minmax(0, 1fr); min-height: 100vh; background: var(--surface); }
.auth-card { align-self: center; width: min(420px, calc(100% - 48px)); margin: 0 auto; padding: 44px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; animation: enter .3s var(--ease) both; }
.auth-card .brand { margin-bottom: 52px; }
.auth-card h1 { font-size: 34px; }
.auth-card .lede { margin-bottom: 26px; font-size: 15px; }
.auth-visual { position: relative; min-height: calc(100vh - 32px); margin: 16px; overflow: hidden; border-radius: 22px; color: #fff; background: #172238; }
.auth-visual::after { content: ""; position: absolute; width: 62%; aspect-ratio: 1; right: -12%; top: 2%; border-radius: 50%; background: #315fae; filter: blur(2px); opacity: .42; }
.auth-visual-grid { position: absolute; inset: 0; opacity: .15; background-image: linear-gradient(rgba(255,255,255,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.18) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(to bottom, #000, transparent 72%); }
.auth-visual-mark { position: absolute; z-index: 2; width: clamp(110px, 18vw, 220px); height: clamp(110px, 18vw, 220px); right: 10%; top: 16%; border-radius: 28%; box-shadow: 0 28px 70px rgba(0,0,0,.28); transform: rotate(5deg); }
.auth-visual-copy { position: absolute; z-index: 2; left: clamp(28px, 6vw, 76px); right: clamp(28px, 6vw, 76px); bottom: clamp(36px, 8vh, 88px); max-width: 560px; }
.auth-visual-copy .eyebrow { color: #a9c7ff; }
.auth-visual-copy h2 { font-size: clamp(28px, 4vw, 52px); line-height: 1.05; }
.auth-visual-copy p:last-child { max-width: 520px; margin: 18px 0 0; color: #c7d3e8; font-size: 16px; line-height: 1.6; }
.form { display: grid; gap: 17px; }
.field { display: grid; gap: 8px; }
.field label { color: var(--muted); font-size: 13px; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; min-height: 52px; padding: 0 15px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: var(--bg-soft); transition: border-color .2s, box-shadow .2s; }
.field textarea { min-height: 110px; padding-block: 13px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); outline: none; }
.form-note { color: var(--muted); font-size: 13px; line-height: 1.5; }
.auth-switch { margin-top: 24px; color: var(--muted); font-size: 14px; text-align: center; }
.auth-switch a, .text-link { color: var(--accent-2); font-weight: 700; }

.code { display: block; padding: 14px 16px; overflow-x: auto; white-space: pre; border: 1px solid var(--line); border-radius: 10px; color: color-mix(in srgb, var(--accent-2) 80%, var(--text)); background: var(--bg-soft); font: 13px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; }
.doc { max-width: 860px; }
.doc h2 { margin-top: 36px; }
.doc p, .doc li { color: var(--muted); line-height: 1.7; }
.doc-steps { display: grid; gap: 12px; margin: 22px 0; padding: 0; list-style: none; counter-reset: docs; }
.doc-steps li { position: relative; padding: 17px 18px 17px 54px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); counter-increment: docs; }
.doc-steps li::before { content: counter(docs); position: absolute; left: 17px; top: 15px; display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; color: #fff; background: var(--accent-2); font-weight: 800; }
.endpoint-list { display: grid; gap: 8px; margin-top: 18px; }
.endpoint { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.endpoint strong { color: var(--accent-2); font: 750 12px ui-monospace, SFMono-Regular, Consolas, monospace; }
.endpoint code { overflow-wrap: anywhere; font: 13px ui-monospace, SFMono-Regular, Consolas, monospace; }
.empty { padding: 46px 24px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; }
.empty strong { display: block; margin-bottom: 8px; color: var(--text); font-size: 18px; }
.toast-region { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: grid; gap: 10px; width: min(360px, calc(100% - 36px)); }
.toast { padding: 15px 17px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-strong); box-shadow: var(--shadow); animation: toast-in .25s var(--ease) both; }
.toast.error { border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.97); } }

@media (max-width: 800px) {
  .topbar { padding-inline: 16px; }
  .layout { display: block; width: min(100% - 24px, 680px); margin-top: 20px; }
  .sidebar { position: static; display: flex; gap: 6px; margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; }
  .nav-link { flex: 0 0 auto; min-height: 40px; padding-inline: 12px; background: var(--surface); }
  .nav-separator { display: none; }
  .content { padding: 20px; }
  .right-rail { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 16px; }
  .right-rail-title { grid-column: 1 / -1; }
  .grid, .grid.two { grid-template-columns: 1fr; }
  .section-title { align-items: start; flex-direction: column; }
  .list-item { align-items: flex-start; flex-wrap: wrap; }
  .auth-wrap { display: grid; grid-template-columns: 1fr; }
  .auth-visual { display: none; }
}

@media (max-width: 480px) {
  .brand-copy { display: none; }
  .top-search { position: static; width: 40px; padding: 0; border: 0; background: transparent; transform: none; }
  .top-search-placeholder { display: none; }
  .profile-chip span { display: none; }
  .card { padding: 20px; }
  .content { padding: 16px; }
  .auth-card { width: min(100% - 36px, 420px); padding-block: 28px; }
  h1 { font-size: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.site-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; width: min(1100px, calc(100% - 32px)); margin: 0 auto 34px; color: var(--muted); font-size: 11px; }
.site-footer a:hover { color: var(--text); }
.site-footer span { color: var(--text); font-weight: 700; }

/* Compact account entry: keep the product UI focused like a social account page. */
.auth-wrap {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px 16px;
  background: var(--bg);
}
.auth-card {
  width: min(440px, 100%);
  margin: 0;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.auth-card .brand { margin-bottom: 28px; }
.auth-card h1 { font-size: 30px; letter-spacing: -.025em; }
.auth-card .lede { margin-bottom: 22px; font-size: 15px; }
.auth-visual { display: none; }

@media (max-width: 480px) {
  .auth-wrap { padding: 16px 12px; }
  .auth-card { padding: 24px 20px; }
  .auth-card h1 { font-size: 27px; }
}

/* Nios shell: dense dark social-console layout inspired by familiar network UIs. */
:root {
  color-scheme: dark;
  --bg: #141414;
  --bg-soft: #1b1b1d;
  --surface: #222224;
  --surface-strong: #29292b;
  --surface-hover: #303034;
  --text: #e7e7e9;
  --muted: #8f929b;
  --line: #3a3a3e;
  --accent: #4da3ff;
  --accent-2: #65adff;
  --accent-soft: #203c5b;
  --danger: #ff7180;
  --success: #6bd39c;
  --shadow: 0 12px 32px rgba(0, 0, 0, .24);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #edeef0;
  --bg-soft: #e7e8eb;
  --surface: #fff;
  --surface-strong: #fff;
  --surface-hover: #f4f5f7;
  --text: #1f2022;
  --muted: #81858d;
  --line: #d8dadd;
  --accent: #267dcc;
  --accent-2: #398fe0;
  --accent-soft: #e1effc;
  --shadow: 0 12px 32px rgba(25, 35, 45, .12);
}

body { background: var(--bg); }
.topbar { position: sticky; top: 0; display: grid; height: 48px; grid-template-columns: 180px minmax(180px, 330px) 1fr; align-items: center; gap: 16px; padding: 0 max(16px, calc((100vw - 1100px) / 2)); border-bottom: 1px solid #303033; background: #202021; }
.topbar .brand { justify-content: flex-start; gap: 9px; color: #e6e6e8; }
.topbar .brand-mark { width: 28px; height: 28px; border-radius: 8px; box-shadow: none; }
.topbar .brand-copy { font-size: 16px; font-weight: 800; }
.topbar .brand-copy small { display: none; }
.top-search { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 7px; color: #9a9ba2; background: #3a3a3d; font-size: 13px; }
.top-search-icon { color: #aeb0b7; font-size: 20px; line-height: 1; }
.top-search-placeholder { opacity: .8; }
.top-actions { justify-self: end; gap: 8px; }
.top-actions .icon-button { width: 32px; height: 32px; border: 0; color: #aeb0b7; background: transparent; }
.top-actions .icon-button:hover { background: #373739; }
.profile-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 3px 7px 3px 3px; border-radius: 18px; color: #e8e8ea; font-size: 12px; font-weight: 700; }
.profile-chip:hover { background: #373739; }
.profile-chip img { width: 27px; height: 27px; border-radius: 50%; object-fit: cover; }

.layout { display: grid; grid-template-columns: 180px minmax(0, 610px) 250px; gap: 16px; width: min(1100px, calc(100% - 32px)); margin: 16px auto 60px; }
.sidebar { position: sticky; top: 64px; display: grid; align-content: start; gap: 2px; height: max-content; }
.nav-link { display: flex; align-items: center; gap: 11px; min-height: 38px; padding: 0 10px; border-radius: 7px; color: #b7b8bd; font-size: 13px; font-weight: 700; }
.nav-link:hover { color: #f1f1f2; background: #242426; }
.nav-link.active { color: #fff; background: #2e2e31; }
.nav-icon { display: grid; width: 21px; height: 21px; place-items: center; color: #63b1ff; font-size: 17px; font-weight: 500; }
.nav-dot { display: none; }
.content { min-width: 0; }
.content > header { padding: 7px 4px 14px; }
.eyebrow { margin-bottom: 7px; color: var(--accent-2); font-size: 11px; letter-spacing: .08em; }
h1 { color: var(--text); font-size: clamp(25px, 3vw, 32px); letter-spacing: -.035em; }
h2 { color: var(--text); font-size: 21px; }
.lede { max-width: 650px; margin-top: 9px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.grid { gap: 10px; margin-top: 12px; }
.grid.two { gap: 10px; }
.card { padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: none; }
.card.interactive:hover { border-color: #53799d; background: var(--surface-hover); }
.card p { margin-top: 7px; color: var(--muted); font-size: 13px; }
.metric { margin-top: 15px; color: var(--text); font-size: 26px; }
.metric small { color: var(--muted); font-size: 11px; }
.section-title { align-items: center; margin: 24px 0 10px; }
.section-title h2 { font-size: 18px; }
.memo { gap: 10px; margin: 14px 0; padding: 12px 14px; border: 1px solid #305476; border-radius: 8px; background: #1b2d40; }
.memo p { font-size: 12px; }
.list { gap: 7px; }
.list-item { padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.list-main small { margin-top: 3px; font-size: 11px; }
.avatar { width: 38px; height: 38px; border-radius: 9px; color: #fff; background: #3f8ed6; font-size: 15px; }
.status { padding: 5px 8px; font-size: 11px; }
.button { min-height: 36px; padding: 0 14px; border-radius: 7px; color: #fff; background: #398fe0; font-size: 12px; }
.button:hover { background: #4da3f1; }
.button.secondary { border-color: var(--line); color: #d6d7da; background: #2a2a2d; }
.button.secondary:hover { background: #36363a; }
.button.danger { color: #ff8b96; background: #3a2529; }
.button.small { min-height: 31px; padding-inline: 10px; border-radius: 6px; font-size: 11px; }
.right-rail { align-self: start; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.right-rail-title { padding: 8px 10px 10px; border-radius: 6px; color: #c7dfff; background: #303033; font-size: 12px; font-weight: 800; }
.rail-link { display: block; padding: 10px; border-radius: 6px; color: #d7d8dc; font-size: 12px; font-weight: 650; }
.rail-link:hover, .rail-link.active { color: #fff; background: #303034; }
.code { padding: 11px 12px; border-color: var(--line); border-radius: 7px; color: #a9d1ff; background: #19191b; font-size: 12px; }
.empty { padding: 32px 20px; border-color: var(--line); border-radius: 8px; background: var(--surface); }
.empty strong { font-size: 16px; }
.doc p, .doc li { font-size: 13px; }
.endpoint { padding: 9px 11px; border-color: var(--line); border-radius: 7px; background: var(--surface); }
.auth-wrap { background: var(--bg); }
.auth-card { color: var(--text); }
.auth-card .brand { justify-content: center; }

@media (max-width: 980px) {
  .layout { grid-template-columns: 170px minmax(0, 1fr); max-width: 760px; }
  .right-rail { display: none; }
}
@media (max-width: 700px) {
  .topbar { grid-template-columns: auto 1fr auto; gap: 8px; padding-inline: 12px; }
  .topbar .brand-copy { display: none; }
  .top-search { max-width: 220px; }
  .profile-chip span { display: none; }
  .layout { display: block; width: min(100% - 20px, 640px); margin-top: 10px; }
  .sidebar { position: static; display: flex; gap: 4px; margin: 0 -2px 12px; overflow-x: auto; scrollbar-width: none; }
  .sidebar::-webkit-scrollbar { display: none; }
  .nav-link { min-width: max-content; min-height: 34px; padding-inline: 9px; }
  .nav-icon { width: 18px; }
}

/* Compact Nios cabinet: light, neutral and information-first. */
:root {
  color-scheme: light;
  --bg: #eef0f3;
  --bg-soft: #f6f7f9;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --surface-hover: #f4f6f8;
  --text: #222529;
  --muted: #7a818a;
  --line: #dfe3e8;
  --accent: #4b83bd;
  --accent-2: #367ab8;
  --accent-soft: #eaf3fb;
  --danger: #c84b5c;
  --success: #25855b;
  --shadow: 0 2px 12px rgba(31, 45, 61, .08);
  --radius: 11px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #191a1c;
  --bg-soft: #222427;
  --surface: #26282b;
  --surface-strong: #2b2e31;
  --surface-hover: #303338;
  --text: #e8eaed;
  --muted: #9da3ab;
  --line: #3b3f44;
  --accent: #68a8df;
  --accent-2: #79b8ed;
  --accent-soft: #253d52;
  --danger: #ef7180;
  --success: #71d19e;
  --shadow: 0 2px 14px rgba(0, 0, 0, .22);
}

html, body { background: var(--bg); }
body { font-size: 14px; line-height: 1.45; }
.app-shell { min-height: 100vh; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 184px minmax(180px, 320px) 1fr;
  align-items: center;
  gap: 22px;
  height: 56px;
  padding: 0 max(18px, calc((100vw - 1140px) / 2));
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(31, 45, 61, .04);
}
.topbar .brand { justify-content: flex-start; gap: 9px; color: var(--text); }
.topbar .brand-mark { width: 30px; height: 30px; border-radius: 8px; box-shadow: none; }
.topbar .brand-copy { font-size: 16px; font-weight: 750; }
.topbar .brand-copy small { display: inline; margin-left: 5px; color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: 0; text-transform: none; }
.top-search {
  position: static;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--bg-soft);
  transform: none;
}
.top-search-icon { color: var(--muted); font-size: 18px; }
.top-search-placeholder { font-size: 13px; opacity: 1; }
.top-actions { justify-self: end; gap: 6px; }
.top-actions .icon-button { width: 34px; height: 34px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; }
.top-actions .icon-button:hover { color: var(--text); background: var(--surface-hover); }
.profile-chip { min-height: 34px; padding: 3px 8px 3px 3px; border-radius: 18px; color: var(--text); font-size: 13px; font-weight: 650; }
.profile-chip:hover { background: var(--surface-hover); }
.profile-chip img { width: 28px; height: 28px; }

.layout {
  display: grid;
  grid-template-columns: 184px minmax(0, 620px) 248px;
  gap: 22px;
  align-items: start;
  width: min(1140px, calc(100% - 36px));
  margin: 18px auto 54px;
}
.sidebar { position: sticky; top: 74px; display: grid; align-content: start; gap: 2px; height: max-content; }
.nav-link { min-height: 40px; padding: 0 11px; border-radius: 8px; color: var(--muted); font-size: 14px; font-weight: 650; }
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.active { color: var(--accent-2); background: var(--accent-soft); }
.nav-icon { width: 22px; color: currentColor; font-size: 17px; }
.nav-separator { margin: 9px 11px; background: var(--line); }
.content { min-width: 0; padding: 0; border: 0; border-radius: 0; background: transparent; animation: enter .25s var(--ease) both; }
.content > header { padding: 5px 2px 15px; }
.eyebrow { margin-bottom: 6px; color: var(--accent-2); font-size: 12px; font-weight: 700; letter-spacing: 0; text-transform: none; }
h1 { color: var(--text); font-size: clamp(25px, 3vw, 32px); line-height: 1.15; letter-spacing: -.025em; }
h2 { color: var(--text); font-size: 21px; letter-spacing: -.02em; }
h3 { color: var(--text); font-size: 15px; }
.lede { max-width: 620px; margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.section-title { align-items: center; margin: 24px 0 10px; }
.section-title h2 { font-size: 18px; }

.grid { gap: 10px; margin-top: 12px; }
.grid.two { gap: 10px; }
.card { padding: 17px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: none; }
.card.interactive { transition: border-color .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease); }
.card.interactive:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: var(--surface); box-shadow: var(--shadow); }
.card p { margin-top: 7px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.metric { margin-top: 14px; color: var(--text); font-size: 26px; }
.metric small { color: var(--muted); font-size: 11px; }
.status { padding: 5px 8px; border-radius: 999px; font-size: 11px; }
.status::before { box-shadow: none; }
.memo { gap: 10px; margin: 14px 0; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line)); border-radius: 9px; background: var(--accent-soft); }
.memo p { margin-top: 0; font-size: 12px; }
.list { gap: 7px; }
.list-item { padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.list-main small { margin-top: 3px; font-size: 11px; }
.avatar { width: 38px; height: 38px; border-radius: 9px; background: var(--accent); font-size: 15px; }
.button { min-height: 36px; padding: 0 14px; border-radius: 7px; background: var(--accent-2); font-size: 13px; box-shadow: none; }
.button:hover { background: var(--accent); }
.button.secondary { border-color: var(--line); color: var(--text); background: var(--surface); }
.button.secondary:hover { background: var(--surface-hover); }
.button.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, var(--line)); background: color-mix(in srgb, var(--danger) 7%, var(--surface)); }
.button.small { min-height: 31px; padding-inline: 10px; border-radius: 6px; font-size: 12px; }

.right-rail { position: sticky; top: 74px; align-self: start; display: grid; gap: 2px; padding: 7px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: none; }
.right-rail-title { margin: 0 0 2px; padding: 9px 10px; border-radius: 7px; color: var(--text); background: var(--bg-soft); font-size: 12px; font-weight: 750; }
.rail-link { min-height: 36px; padding: 0 10px; border-radius: 7px; color: var(--muted); font-size: 13px; font-weight: 600; }
.rail-link:hover { color: var(--text); background: var(--surface-hover); }
.rail-link.active { color: var(--accent-2); background: var(--accent-soft); }

.field { gap: 6px; }
.field label { color: var(--muted); font-size: 12px; font-weight: 650; }
.field input, .field select, .field textarea { min-height: 44px; padding: 0 12px; border-radius: 8px; color: var(--text); background: var(--bg-soft); }
.field textarea { min-height: 100px; padding-block: 11px; }
.form { gap: 14px; }
.form-note { font-size: 12px; }
.code { padding: 10px 11px; border-color: var(--line); border-radius: 7px; color: var(--accent-2); background: var(--bg-soft); font-size: 12px; }
.doc p, .doc li { font-size: 13px; }
.endpoint { padding: 9px 11px; border-color: var(--line); border-radius: 7px; background: var(--surface); }
.empty { padding: 32px 20px; border-color: var(--line); border-radius: 10px; background: var(--surface); }
.empty strong { font-size: 16px; }

/* Authentication stays focused and compact on every viewport. */
.auth-wrap { display: grid; grid-template-columns: 1fr; place-items: start center; min-height: 100vh; padding: 7vh 16px 40px; background: var(--bg); }
.auth-card { align-self: start; width: min(430px, 100%); margin: 0; padding: 30px 32px 28px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: var(--surface); box-shadow: var(--shadow); animation: enter .25s var(--ease) both; }
.auth-card .brand { justify-content: flex-start; margin-bottom: 27px; }
.auth-card .brand-mark { width: 32px; height: 32px; border-radius: 9px; box-shadow: none; }
.auth-card .brand-copy { font-size: 16px; }
.auth-card .brand-copy small { display: inline; margin-left: 4px; color: var(--muted); font-size: 11px; letter-spacing: 0; text-transform: none; }
.auth-card h1 { font-size: 27px; }
.auth-card .lede { margin-bottom: 21px; font-size: 14px; }
.auth-card .button { width: 100%; }
.auth-visual { display: none !important; }
.auth-switch { margin-top: 20px; font-size: 13px; }

.boot-card { width: min(430px, calc(100% - 32px)); margin: 15vh auto; padding: 30px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.brand-mark { box-shadow: none; }
.site-footer { width: min(1100px, calc(100% - 32px)); margin-bottom: 28px; font-size: 11px; }

@media (max-width: 980px) {
  .layout { grid-template-columns: 176px minmax(0, 1fr); max-width: 780px; }
  .right-rail { display: none; }
}

@media (max-width: 700px) {
  .topbar { grid-template-columns: auto 1fr auto; gap: 10px; padding-inline: 12px; }
  .topbar .brand-copy { display: none; }
  .top-search { max-width: 240px; }
  .profile-chip span { display: none; }
  .layout { display: block; width: min(100% - 20px, 640px); margin-top: 10px; }
  .sidebar { position: static; display: flex; gap: 4px; margin: 0 -2px 12px; overflow-x: auto; scrollbar-width: none; }
  .sidebar::-webkit-scrollbar { display: none; }
  .nav-link { min-width: max-content; min-height: 36px; padding-inline: 9px; background: transparent; }
  .nav-link.active { background: var(--accent-soft); }
  .nav-icon { width: 18px; }
  .content > header { padding-inline: 0; }
}

@media (max-width: 480px) {
  .top-search { max-width: 34px; padding: 0; border: 0; background: transparent; }
  .top-search-placeholder { display: none; }
  .auth-wrap { padding: 20px 12px 28px; }
  .auth-card { width: 100%; padding: 24px 20px 22px; }
  h1 { font-size: 28px; }
}
