:root {
  color-scheme: light;
  --ink: #17213b;
  --muted: #68738b;
  --soft: #97a1b5;
  --line: #e5e9f2;
  --surface: #ffffff;
  --canvas: #f4f6fb;
  --sidebar: #101c3a;
  --sidebar-soft: #aeb9d2;
  --primary: #5368ed;
  --primary-dark: #3e51cd;
  --primary-soft: #edf0ff;
  --success: #17a77e;
  --warning: #ef9b36;
  --danger: #df4d63;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 12px 36px rgba(27, 43, 82, 0.08);
  --sidebar-width: 250px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--ink); background: var(--canvas); }
button, input, select { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid rgba(83, 104, 237, 0.25); outline-offset: 2px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.eyebrow { display: inline-block; margin-bottom: 7px; color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: 0.17em; }
.eyebrow-light { color: #b9c5ff; }

.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; font-size: 17px; font-weight: 750; text-decoration: none; letter-spacing: 0.01em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; color: #fff; background: linear-gradient(145deg, #6e7df1, #4459d8); box-shadow: 0 8px 22px rgba(44, 64, 172, 0.34); font-family: Georgia, serif; font-size: 21px; font-style: italic; font-weight: 700; }
.brand-light { color: #fff; }

.auth-shell { display: grid; grid-template-columns: minmax(360px, 1.05fr) minmax(500px, 0.95fr); min-height: 100vh; }
.auth-intro { position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 42px clamp(44px, 6vw, 100px); color: #fff; background: radial-gradient(circle at 75% 30%, rgba(97, 119, 241, 0.36), transparent 28%), radial-gradient(circle at 10% 80%, rgba(48, 204, 174, 0.14), transparent 24%), linear-gradient(145deg, #101b3c 5%, #172b60 62%, #233c75); }
.auth-intro::before, .auth-intro::after { position: absolute; content: ""; border: 1px solid rgba(255,255,255,.07); border-radius: 50%; }
.auth-intro::before { width: 420px; height: 420px; right: -180px; top: -120px; }
.auth-intro::after { width: 300px; height: 300px; left: -160px; bottom: -110px; }
.auth-copy { position: relative; z-index: 1; max-width: 590px; margin: auto 0; padding: 80px 0; }
.auth-copy h1 { margin: 0; font-size: clamp(42px, 5.4vw, 72px); line-height: 1.13; letter-spacing: -0.055em; }
.auth-copy > p { max-width: 520px; margin: 26px 0 36px; color: #c7d0e9; font-size: 17px; line-height: 1.85; }
.feature-row { display: flex; flex-wrap: wrap; gap: 14px; }
.feature-row span { display: inline-flex; align-items: center; gap: 8px; padding: 10px 13px; border: 1px solid rgba(255,255,255,.11); border-radius: 99px; color: #e0e6f7; background: rgba(255,255,255,.05); font-size: 13px; }
.feature-row svg { width: 16px; height: 16px; color: #93a4ff; }
.auth-foot { position: relative; z-index: 1; margin: 0; color: #8592b1; font-size: 12px; }
.auth-panel { display: grid; place-items: center; padding: 42px clamp(28px, 6vw, 90px); background: #fff; }
.auth-card { width: min(100%, 440px); }
.mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 46px; font-weight: 750; }
.auth-heading h2 { margin: 0 0 9px; font-size: 32px; letter-spacing: -0.035em; }
.auth-heading p { margin: 0; color: var(--muted); line-height: 1.65; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin: 34px 0 27px; padding: 5px; border-radius: 12px; background: #f1f3f8; }
.auth-tab { padding: 10px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; cursor: pointer; font-weight: 650; transition: .2s ease; }
.auth-tab.is-active { color: var(--ink); background: #fff; box-shadow: 0 3px 11px rgba(20,35,69,.08); }
.auth-form { display: grid; gap: 19px; }
.field { display: grid; gap: 8px; color: #3c4660; font-size: 13px; font-weight: 650; }
.field input, .field select, .inline-form input, .search-field input, .toolbar select, .generator-form select { width: 100%; min-height: 45px; border: 1px solid var(--line); border-radius: 11px; padding: 0 13px; color: var(--ink); background: #fff; transition: .2s ease; }
.field input::placeholder, .inline-form input::placeholder, .search-field input::placeholder { color: #abb3c3; }
.field input:focus, .field select:focus, .inline-form input:focus, .search-field:focus-within, .toolbar select:focus { border-color: #8795ed; box-shadow: 0 0 0 3px rgba(83,104,237,.1); outline: none; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 58px; }
.text-button { border: 0; color: var(--primary); background: transparent; cursor: pointer; font-size: 12px; font-weight: 700; }
.password-toggle { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); }
.auth-note { margin: 20px 0 0; color: var(--soft); font-size: 11px; line-height: 1.7; text-align: center; }

.button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 43px; padding: 0 17px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 700; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .55; transform: none; }
.button svg { width: 17px; height: 17px; }
.button-primary { color: #fff; background: linear-gradient(135deg, #6577ef, #4d61dd); box-shadow: 0 9px 20px rgba(69,86,202,.2); }
.button-primary:hover { box-shadow: 0 11px 25px rgba(69,86,202,.28); }
.button-secondary { border-color: var(--line); color: #49556c; background: #fff; }
.button-ghost { color: var(--muted); background: transparent; }
.button-danger { color: #fff; background: var(--danger); }
.button-danger-soft { color: #c23e52; background: #fff0f2; }
.button-block { width: 100%; min-height: 48px; margin-top: 3px; }
.button-compact { min-height: 38px; padding: 0 13px; }
.button.is-loading { pointer-events: none; }
.button.is-loading { color: transparent; }
.button.is-loading::after { position: absolute; width: 16px; height: 16px; border: 2px solid #637087; border-right-color: transparent; border-radius: 50%; content: ""; animation: spin .65s linear infinite; }
.button-primary.is-loading::after, .button-danger.is-loading::after { border-color: rgba(255,255,255,.92); border-right-color: transparent; }
.icon-button { display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--line); border-radius: 10px; color: #637087; background: #fff; cursor: pointer; }
.icon-button svg { width: 18px; height: 18px; }
.icon-button-dark { border-color: rgba(255,255,255,.08); color: #aebad3; background: rgba(255,255,255,.04); }

.portal-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; flex-direction: column; width: var(--sidebar-width); padding: 25px 18px 17px; color: #fff; background: var(--sidebar); }
.sidebar-brand { padding: 0 7px 23px; border-bottom: 1px solid rgba(255,255,255,.07); }
.sidebar-nav { flex: 1; min-height: 0; overflow-y: auto; padding-top: 13px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.nav-label { margin: 18px 12px 7px; color: #697797; font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.nav-item { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 43px; margin: 3px 0; padding: 0 12px; border: 0; border-radius: 10px; color: var(--sidebar-soft); background: transparent; cursor: pointer; font-size: 13px; font-weight: 620; text-align: left; transition: .18s ease; }
.nav-item svg { width: 18px; height: 18px; opacity: .85; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.055); }
.nav-item.is-active { color: #fff; background: linear-gradient(105deg, rgba(97,119,239,.27), rgba(97,119,239,.08)); box-shadow: inset 3px 0 #7183f2; }
.nav-badge { margin-left: auto; min-width: 22px; padding: 2px 6px; border-radius: 99px; color: #dce2ff; background: rgba(113,131,242,.2); font-size: 10px; text-align: center; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 14px 5px 0; border-top: 1px solid rgba(255,255,255,.07); }
.avatar { display: grid; flex: 0 0 auto; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: #fff; background: linear-gradient(145deg, #6f80ee, #4358cc); font-weight: 750; }
.sidebar-user-copy { display: grid; flex: 1; min-width: 0; gap: 2px; }
.sidebar-user-copy strong, .sidebar-user-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-copy strong { font-size: 12px; }
.sidebar-user-copy span { color: #7887a7; font-size: 10px; }
.sidebar-user .icon-button { width: 34px; height: 34px; }
.content-shell { min-height: 100vh; margin-left: var(--sidebar-width); }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; min-height: 78px; padding: 13px clamp(22px, 3.2vw, 48px); border-bottom: 1px solid rgba(224,228,238,.8); background: rgba(255,255,255,.91); backdrop-filter: blur(15px); }
.topbar-title { flex: 1; }
.topbar-title p { margin: 0 0 3px; color: #9aa4b6; font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.topbar-title h1 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.topbar-time { color: var(--muted); font-size: 12px; }
.mobile-menu { display: none; margin-right: 12px; }
.page-container { width: min(100%, 1500px); margin: 0 auto; padding: clamp(23px, 3vw, 42px) clamp(20px, 3.2vw, 48px) 64px; }
.page { animation: pageIn .25s ease both; }
.page-heading { margin-bottom: 24px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.section-heading h2, .section-heading h3 { margin: 0; letter-spacing: -.025em; }
.section-heading h2 { font-size: 25px; }
.section-heading h3 { font-size: 17px; }
.section-heading p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.text-link { display: inline-flex; align-items: center; gap: 4px; border: 0; color: var(--primary); background: transparent; cursor: pointer; font-size: 12px; font-weight: 700; }
.text-link svg { width: 15px; height: 15px; }

.welcome-banner { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 174px; overflow: hidden; margin-bottom: 21px; padding: 30px clamp(26px, 4vw, 47px); border-radius: var(--radius-lg); color: #fff; background: radial-gradient(circle at 86% 15%, rgba(129,148,255,.56), transparent 23%), linear-gradient(120deg, #1b2b56, #344b91); box-shadow: 0 16px 38px rgba(32,49,98,.16); }
.welcome-banner::after { position: absolute; right: 5%; bottom: -73px; width: 220px; height: 220px; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; content: ""; }
.welcome-banner h2 { margin: 0 0 10px; font-size: clamp(23px, 3vw, 32px); letter-spacing: -.035em; }
.welcome-banner p { margin: 0; color: #c5cfea; font-size: 13px; }
.welcome-orbit { position: relative; z-index: 1; width: 115px; height: 115px; margin-right: 35px; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; animation: orbit 14s linear infinite; }
.welcome-orbit::before, .welcome-orbit::after { position: absolute; inset: 18px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; content: ""; }
.welcome-orbit::after { inset: 41px; background: rgba(255,255,255,.1); }
.welcome-orbit span { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: #90a1ff; box-shadow: 0 0 16px #90a1ff; }
.welcome-orbit span:nth-child(1) { top: -4px; left: 50%; }
.welcome-orbit span:nth-child(2) { right: 3px; bottom: 20px; width: 6px; height: 6px; }
.welcome-orbit span:nth-child(3) { left: 14px; bottom: 9px; width: 5px; height: 5px; background: #78ddc2; }
.stat-grid { display: grid; gap: 17px; }
.user-stat-grid { grid-template-columns: repeat(3, 1fr); margin-bottom: 21px; }
.stat-card { display: flex; align-items: center; gap: 16px; min-width: 0; padding: 21px; border: 1px solid rgba(229,233,242,.85); border-radius: var(--radius); background: var(--surface); box-shadow: 0 7px 24px rgba(22,37,77,.045); }
.stat-card > div:last-child { display: grid; min-width: 0; }
.stat-card span { color: var(--muted); font-size: 12px; }
.stat-card strong { margin: 3px 0 1px; overflow: hidden; font-size: 25px; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.stat-card small { color: var(--soft); font-size: 10px; }
.stat-icon { display: grid; flex: 0 0 auto; place-items: center; width: 46px; height: 46px; border-radius: 14px; }
.stat-icon svg { width: 21px; height: 21px; }
.stat-icon-blue { color: #4d65e1; background: #eef1ff; }
.stat-icon-violet { color: #8a5bcf; background: #f5edff; }
.stat-icon-mint { color: #149d7a; background: #e7f8f3; }
.stat-icon-orange { color: #dd8b27; background: #fff3e4; }
.dashboard-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 21px; margin-bottom: 21px; }
.panel { border: 1px solid rgba(229,233,242,.9); border-radius: var(--radius); background: var(--surface); box-shadow: 0 8px 27px rgba(22,37,77,.045); }
.activation-panel, .api-key-panel { padding: 25px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.panel-heading h3 { margin: 0 0 6px; font-size: 18px; letter-spacing: -.025em; }
.panel-heading p { max-width: 500px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.panel-icon { display: grid; flex: 0 0 auto; place-items: center; width: 43px; height: 43px; border-radius: 13px; color: var(--primary); background: var(--primary-soft); }
.panel-icon-key { color: #9a6a22; background: #fff4dc; }
.inline-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 25px; }
.inline-form input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.api-key-summary { display: flex; align-items: center; gap: 11px; min-height: 50px; margin-top: 18px; padding: 10px 13px; border-radius: 11px; background: #f7f8fb; }
.api-key-summary > div { display: grid; gap: 3px; }
.api-key-summary strong { font-size: 12px; }
.api-key-summary small { color: var(--soft); font-size: 10px; }
.status-dot { display: inline-block; flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--soft); box-shadow: 0 0 0 4px rgba(151,161,181,.12); }
.status-dot-online { background: var(--success); box-shadow: 0 0 0 4px rgba(23,167,126,.12); }
.status-dot-offline { background: var(--soft); box-shadow: 0 0 0 4px rgba(151,161,181,.12); }
.status-dot-pending { background: var(--warning); box-shadow: 0 0 0 4px rgba(239,155,54,.14); }
.status-dot-danger { background: var(--danger); box-shadow: 0 0 0 4px rgba(223,77,99,.12); }
.button-row { display: flex; gap: 9px; margin-top: 14px; }
.recent-panel { padding: 24px 25px 13px; }
.compact-account-list { margin-top: 15px; }
.compact-account-item { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-top: 1px solid #edf0f5; }
.compact-account-item:first-child { border-top: 0; }
.account-avatar { display: grid; flex: 0 0 auto; place-items: center; width: 40px; height: 40px; overflow: hidden; border-radius: 12px; color: #fff; background: linear-gradient(145deg, #7182ec, #4e62d8); font-weight: 750; }
.account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.compact-account-copy { display: grid; flex: 1; gap: 2px; min-width: 0; }
.compact-account-copy strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.compact-account-copy span { color: var(--soft); font-size: 10px; }
.status-label { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 11px; }
.panel-toolbar { margin-bottom: 18px; }
.search-field { display: flex; align-items: center; width: min(100%, 360px); min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.search-field svg { flex: 0 0 auto; width: 17px; height: 17px; color: #9ba6b9; }
.search-field input { min-height: 40px; padding: 0 0 0 9px; border: 0; background: transparent; box-shadow: none !important; }
.toolbar select { width: auto; min-width: 130px; min-height: 42px; padding: 0 34px 0 12px; }
.account-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.account-card { position: relative; min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 7px 24px rgba(22,37,77,.04); transition: .2s ease; }
.account-card:hover { transform: translateY(-2px); border-color: #d7dcf0; box-shadow: var(--shadow); }
.account-card-head { display: flex; align-items: center; gap: 12px; }
.account-card-head .account-avatar { width: 46px; height: 46px; border-radius: 14px; }
.account-title { display: grid; flex: 1; min-width: 0; gap: 3px; }
.account-title strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.account-title span { color: var(--muted); font-size: 11px; }
.account-card-status { margin: 16px 0; padding: 10px 12px; border-radius: 10px; background: #f7f8fb; }
.account-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-bottom: 16px; }
.account-meta div { display: grid; gap: 2px; }
.account-meta span { color: var(--soft); font-size: 10px; }
.account-meta strong { overflow: hidden; font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.account-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 15px; border-top: 1px solid #edf0f5; }
.account-actions .button { min-height: 36px; padding: 0 9px; font-size: 11px; box-shadow: none; }
.account-actions .danger-action { grid-column: 2; color: var(--danger); }
.empty-state { grid-column: 1 / -1; display: grid; place-items: center; min-height: 260px; padding: 35px; border: 1px dashed #d9deea; border-radius: var(--radius); color: var(--muted); background: rgba(255,255,255,.55); text-align: center; }
.empty-state.compact { min-height: 110px; border: 0; background: transparent; }
.empty-state p { margin: 8px 0 0; font-size: 12px; }
.empty-illustration { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: #8b98b2; background: #eef1f7; font-size: 23px; }

.docs-heading { align-items: flex-end; }
.version-badge { padding: 7px 10px; border-radius: 8px; color: var(--primary); background: var(--primary-soft); font-size: 11px; font-weight: 800; }
.docs-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: start; gap: 20px; }
.docs-toc { position: sticky; top: 98px; display: grid; gap: 4px; padding: 17px; }
.docs-toc strong { margin: 3px 7px 8px; font-size: 11px; }
.docs-toc button { padding: 9px 10px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; cursor: pointer; font-size: 11px; text-align: left; white-space: nowrap; }
.docs-toc button:hover { color: var(--primary); background: var(--primary-soft); }
.docs-content { display: grid; gap: 17px; min-width: 0; }
.doc-section { position: relative; scroll-margin-top: 100px; padding: 26px; }
.doc-section h3 { margin: 0 0 10px; font-size: 19px; }
.doc-section > p { margin: 0 0 17px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.doc-section code { padding: 2px 5px; border-radius: 5px; color: #475bd1; background: #f0f2ff; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
.doc-number { position: absolute; top: 22px; right: 25px; color: #eef0f5; font-size: 36px; font-weight: 850; }
.callout { display: flex; gap: 12px; padding: 14px; border: 1px solid #dfe4fa; border-radius: 11px; color: #485675; background: #f7f8ff; }
.callout svg { flex: 0 0 auto; width: 19px; height: 19px; color: var(--primary); }
.callout p { margin: 0; font-size: 11px; line-height: 1.7; }
.code-block { overflow: hidden; border-radius: 12px; color: #d8e0f3; background: #111b34; }
.code-toolbar { display: flex; align-items: center; justify-content: space-between; min-height: 38px; padding: 0 13px; border-bottom: 1px solid rgba(255,255,255,.07); color: #8592ae; font-size: 10px; }
.code-toolbar button { display: inline-flex; align-items: center; gap: 5px; border: 0; color: #9ba8c3; background: transparent; cursor: pointer; font-size: 10px; }
.code-toolbar svg { width: 13px; height: 13px; }
.code-block pre { overflow-x: auto; margin: 0; padding: 18px; }
.code-block code { padding: 0; color: inherit; background: transparent; font-size: 11px; line-height: 1.8; }
.endpoint-list { display: grid; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.endpoint-detail { margin-top: 13px; }
.endpoint-row { display: grid; grid-template-columns: 50px minmax(220px, .8fr) 1fr; align-items: center; gap: 13px; padding: 14px; border-top: 1px solid var(--line); }
.endpoint-row:first-child { border-top: 0; }
.endpoint-row > code { overflow: auto; color: #45516a; background: transparent; white-space: nowrap; }
.endpoint-row > div { display: grid; gap: 2px; }
.endpoint-row strong { font-size: 11px; }
.endpoint-row small { color: var(--soft); font-size: 10px; }
.method { padding: 4px 5px; border-radius: 5px; font-family: ui-monospace, monospace; font-size: 9px; font-weight: 800; text-align: center; }
.method-get { color: #167c63; background: #e3f7f1; }
.method-post { color: #4c5fd2; background: #ebeeff; }
.method-delete { color: #b73c50; background: #ffedf0; }
.error-table { display: grid; grid-template-columns: 50px 1fr; gap: 0; margin-top: 15px; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.error-table > span, .error-table > p { margin: 0; padding: 12px; border-top: 1px solid var(--line); }
.error-table > span:nth-child(-n+2), .error-table > p:nth-child(-n+2) { border-top: 0; }
.error-table > span { color: var(--danger); background: #fff8f9; font-family: ui-monospace, monospace; font-size: 11px; font-weight: 800; }
.error-table p { display: grid; gap: 2px; }
.error-table strong { font-size: 11px; }
.error-table small { color: var(--soft); font-size: 10px; }

.admin-stat-grid { grid-template-columns: repeat(4, 1fr); margin-bottom: 20px; }
.admin-overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.admin-overview-grid > .panel { padding: 23px; }
.progress-list, .activity-list { display: grid; gap: 15px; margin-top: 19px; }
.progress-item { display: grid; grid-template-columns: 1fr auto; gap: 7px; }
.progress-item span, .progress-item strong { font-size: 11px; }
.progress-item span { color: var(--muted); }
.progress-bar { grid-column: 1 / -1; width: 100%; height: 6px; overflow: hidden; border: 0; border-radius: 99px; appearance: none; background: #eef1f6; }
.progress-bar::-webkit-progress-bar { border-radius: 99px; background: #eef1f6; }
.progress-bar::-webkit-progress-value { border-radius: 99px; background: linear-gradient(90deg, #5c70e8, #7f8ff3); }
.progress-bar::-moz-progress-bar { border-radius: 99px; background: linear-gradient(90deg, #5c70e8, #7f8ff3); }
.activity-item { display: flex; gap: 11px; }
.activity-item::before { flex: 0 0 auto; width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: #7586ec; box-shadow: 0 0 0 4px #eef0ff; content: ""; }
.activity-item div { display: grid; gap: 3px; }
.activity-item strong { font-size: 11px; }
.activity-item span { color: var(--soft); font-size: 10px; }
.generator-panel { margin-bottom: 18px; padding: 23px; }
.generator-form { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 13px; margin-top: 20px; }
.generator-form .button { min-height: 45px; }
.table-panel { overflow: hidden; padding: 19px 20px 11px; }
.table-panel > .toolbar { margin-bottom: 15px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 11px; text-align: left; }
th { padding: 11px 12px; color: #8994a8; background: #f8f9fc; font-size: 9px; font-weight: 800; letter-spacing: .05em; white-space: nowrap; }
td { padding: 13px 12px; border-bottom: 1px solid #edf0f5; color: #4a566c; white-space: nowrap; }
td strong { color: var(--ink); }
.table-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.table-user { display: flex; align-items: center; gap: 9px; }
.table-user .avatar { width: 30px; height: 30px; border-radius: 9px; font-size: 11px; }
.table-empty { min-height: 180px; border: 0; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 99px; font-size: 9px; font-weight: 750; }
.badge-success { color: #167c63; background: #e5f8f2; }
.badge-warning { color: #a56316; background: #fff3df; }
.badge-muted { color: #68738b; background: #eef1f5; }
.badge-danger { color: #b73c50; background: #ffedf0; }
.badge-primary { color: #4659ca; background: #eaedff; }

.dialog { max-width: none; max-height: none; padding: 0; border: 0; color: var(--ink); background: transparent; }
.dialog::backdrop { background: rgba(12, 21, 45, .56); backdrop-filter: blur(5px); }
.dialog-card { position: relative; width: min(calc(100vw - 32px), 480px); max-height: calc(100vh - 40px); overflow-y: auto; padding: 31px; border: 1px solid rgba(255,255,255,.5); border-radius: 20px; background: #fff; box-shadow: 0 26px 70px rgba(12,23,53,.24); }
.dialog-close { position: absolute; top: 16px; right: 16px; z-index: 2; border: 0; background: #f5f6f9; }
.dialog-heading { padding-right: 37px; }
.dialog-heading.centered { padding-right: 0; text-align: center; }
.dialog-heading h2 { margin: 0 0 8px; font-size: 22px; letter-spacing: -.035em; }
.dialog-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.dialog-actions { display: flex; justify-content: center; gap: 9px; margin-top: 21px; }
.dialog-actions.split { display: grid; grid-template-columns: 1fr 1fr; }
.qr-frame { display: grid; place-items: center; width: 224px; height: 224px; overflow: hidden; margin: 24px auto 16px; padding: 10px; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: 0 9px 28px rgba(25,39,74,.08); }
.qr-frame img { width: 100%; height: 100%; object-fit: contain; }
.qr-skeleton { display: grid; place-items: center; gap: 10px; color: var(--soft); font-size: 10px; }
.qr-skeleton svg { width: 45px; height: 45px; }
.qr-state { display: flex; align-items: center; justify-content: center; gap: 9px; color: #4d596f; font-size: 11px; }
.qr-state small { color: var(--soft); }
.dialog-data .dialog-card { width: min(calc(100vw - 32px), 640px); }
.dialog-data-body { min-height: 90px; margin-top: 21px; }
.data-value { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #f8f9fc; }
.data-value code { overflow-wrap: anywhere; color: #3648b5; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.data-table { max-height: 360px; overflow: auto; border: 1px solid var(--line); border-radius: 11px; }
.data-table table { min-width: 460px; }
.data-note { margin: 12px 2px 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.generated-codes { display: grid; max-height: 340px; overflow: auto; border: 1px solid var(--line); border-radius: 11px; }
.generated-codes > div { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 9px; padding: 10px 12px; border-top: 1px solid var(--line); }
.generated-codes > div:first-child { border-top: 0; }
.generated-codes span { color: var(--soft); font-size: 9px; }
.generated-codes code { overflow-wrap: anywhere; color: #3448ba; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.muted-copy { color: var(--soft); font-size: 9px; }
.stack-form { display: grid; gap: 16px; margin-top: 23px; }
.one-time-icon, .confirm-icon { display: grid; place-items: center; width: 54px; height: 54px; margin: 2px auto 15px; border-radius: 17px; color: #8b641e; background: #fff2d9; }
.one-time-icon svg, .confirm-icon svg { width: 25px; height: 25px; }
.confirm-icon { color: var(--danger); background: #ffedf0; }
.secret-box { display: flex; align-items: center; gap: 10px; margin: 21px 0 15px; padding: 12px; border: 1px dashed #aab3df; border-radius: 12px; background: #f7f8ff; }
.secret-box code { flex: 1; overflow-wrap: anywhere; color: #3448ba; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.secret-box .icon-button { flex: 0 0 auto; }
.acknowledge { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 17px; color: var(--muted); cursor: pointer; font-size: 11px; line-height: 1.5; }
.acknowledge input { margin: 1px 0 0; accent-color: var(--primary); }

.toast-region { position: fixed; z-index: 100; right: 22px; bottom: 22px; display: grid; width: min(calc(100vw - 44px), 360px); gap: 9px; pointer-events: none; }
.clipboard-fallback { position: fixed; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 13px 15px; border: 1px solid rgba(255,255,255,.25); border-radius: 12px; color: #fff; background: #1a2749; box-shadow: 0 15px 38px rgba(12,23,53,.2); animation: toastIn .25s ease both; pointer-events: auto; }
.toast.is-success { background: #146f5a; }
.toast.is-error { background: #a6384b; }
.toast svg { flex: 0 0 auto; width: 17px; height: 17px; }
.toast div { display: grid; gap: 2px; }
.toast strong { font-size: 11px; }
.toast span { color: rgba(255,255,255,.75); font-size: 10px; line-height: 1.5; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes pageIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 1180px) {
  .account-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .generator-form { grid-template-columns: 1fr 1fr auto; }
}

@media (max-width: 920px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-intro { display: none; }
  .auth-panel { min-height: 100vh; }
  .mobile-brand { display: flex; }
  .sidebar { transform: translateX(-100%); transition: transform .24s ease; }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 25; display: block; background: rgba(12,21,45,.48); }
  .content-shell { margin-left: 0; }
  .mobile-menu { display: inline-grid; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-toc { position: static; display: flex; overflow-x: auto; white-space: nowrap; }
  .docs-toc strong { display: none; }
}

@media (max-width: 680px) {
  .topbar { min-height: 68px; padding: 10px 16px; }
  .topbar-time, #refresh-button span { display: none; }
  .topbar-actions { gap: 6px; }
  .topbar .button { width: 38px; min-height: 38px; padding: 0; }
  .topbar-title h1 { font-size: 16px; }
  .page-container { padding: 20px 15px 50px; }
  .welcome-banner { min-height: 160px; padding: 24px; }
  .welcome-orbit { display: none; }
  .user-stat-grid, .admin-stat-grid { grid-template-columns: 1fr; }
  .stat-card { padding: 17px; }
  .stat-card strong { font-size: 22px; }
  .section-heading.page-heading { align-items: flex-start; }
  .section-heading.page-heading:not(.docs-heading) { flex-direction: column; }
  .panel-heading { gap: 11px; }
  .panel-icon { width: 38px; height: 38px; }
  .inline-form { grid-template-columns: 1fr; }
  .account-grid { grid-template-columns: 1fr; }
  .panel-toolbar { align-items: stretch; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .search-field { width: 100%; }
  .toolbar select { width: 100%; }
  .docs-heading { align-items: flex-start; }
  .endpoint-row { grid-template-columns: 48px minmax(0, 1fr); gap: 8px; }
  .endpoint-row > div { grid-column: 1 / -1; padding-left: 56px; }
  .admin-overview-grid { grid-template-columns: 1fr; }
  .generator-form { grid-template-columns: 1fr; }
  .generator-form .button { grid-column: auto; }
  .dialog-card { padding: 26px 20px; }
  .dialog-close { top: 12px; right: 12px; }
  .qr-frame { width: 205px; height: 205px; }
}

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