@charset "UTF-8";
/* User workspace uses the same green neutrals and software mascot as the website. */
:root {
  color-scheme: light;
  --bg: #f5f7f6; --bg-subtle: #eaf0ed; --surface: #fcfdfc; --surface-hover: #f0f5f2; --surface-active: #e6f2eb;
  --border: #dce5df; --border-strong: #b9cabe; --fg: #17291f; --fg-muted: #526b5c; --fg-subtle: #667e6e;
  --primary: #15734c; --primary-hover: #0a5837; --primary-fg: #ffffff; --primary-subtle: #e6f2eb; --primary-border: #a0cbb0;
  --success: #15734c; --success-subtle: #e6f2eb; --danger: #b53240; --danger-subtle: #fff0f1; --warning: #906017;
  --radius-sm: 9px; --radius: 16px; --radius-lg: 26px; --control-h: 44px; --rail-w: 236px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "Cascadia Code", Consolas, monospace; --shadow: 0 12px 38px rgb(23 41 31 / 7%);
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101615; --bg-subtle: #1d2b23; --surface: #17211d; --surface-hover: #203128; --surface-active: #233b2d;
  --border: #314239; --border-strong: #4c6556; --fg: #eaf3ed; --fg-muted: #a8b9ae; --fg-subtle: #a8b9ae;
  --primary: #8ad9ad; --primary-hover: #b3f1cb; --primary-fg: #123321; --primary-subtle: #233b2d; --primary-border: #4d7c60;
  --success: #8ad9ad; --success-subtle: #233b2d; --danger: #ff9aa4; --danger-subtle: #3c2428; --warning: #e7be7b;
  --shadow: 0 12px 38px rgb(0 0 0 / 16%);
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    color-scheme: dark;
    --bg: #101615; --bg-subtle: #1d2b23; --surface: #17211d; --surface-hover: #203128; --surface-active: #233b2d;
    --border: #314239; --border-strong: #4c6556; --fg: #eaf3ed; --fg-muted: #a8b9ae; --fg-subtle: #a8b9ae;
    --primary: #8ad9ad; --primary-hover: #b3f1cb; --primary-fg: #123321; --primary-subtle: #233b2d; --primary-border: #4d7c60;
    --success: #8ad9ad; --success-subtle: #233b2d; --danger: #ff9aa4; --danger-subtle: #3c2428; --warning: #e7be7b;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; min-width: 320px; min-height: 100%; }
body { background: var(--bg); color: var(--fg); font: 14px/1.65 var(--font); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, input, select { font: inherit; min-height: var(--control-h); }
button { min-width: 44px; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
button, select { padding: 0 16px; color: var(--fg); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); font-weight: 600; transition: background .18s, border-color .18s, transform .18s; }
button:hover:not(:disabled) { background: var(--surface-hover); border-color: var(--primary-border); }
button:active:not(:disabled) { transform: translateY(1px); }
input { width: 100%; min-width: 0; padding: 0 14px; color: var(--fg); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); }
input::placeholder { color: var(--fg-subtle); font-size: 13px; }
input:focus-visible { border-color: var(--primary); }
label { display: grid; gap: 8px; font-weight: 600; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.3; letter-spacing: -.035em; }
h1 { font-size: 30px; } h2 { font-size: 32px; } h3 { font-size: 16px; }
.muted, .section-description { color: var(--fg-muted); }
.mono { font-family: var(--mono); font-size: 12px; }
.ui-icon { width: 21px; height: 21px; flex-shrink: 0; fill: currentColor; vertical-align: middle; }
.button-primary { display: inline-flex; gap: 12px; align-items: center; justify-content: center; background: var(--primary); border-color: var(--primary); color: var(--primary-fg); }
.button-primary:hover:not(:disabled) { background: var(--primary-hover); border-color: var(--primary-hover); }
.button-danger { color: var(--danger); }
.button-danger:hover:not(:disabled) { background: var(--danger-subtle); }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; padding: 0; background: transparent; border-color: transparent; border-radius: 50%; }
.brand { display: inline-flex; gap: 11px; min-height: 44px; align-items: center; width: fit-content; }
.brand img { object-fit: contain; flex-shrink: 0; }
.brand > span { font-size: 17px; font-weight: 760; line-height: 1.2; letter-spacing: .055em; }
.brand small { display: block; font-size: 10px; font-weight: 500; letter-spacing: .12em; color: var(--fg-muted); margin-top: 5px; }
.eyebrow { font-size: 12px; font-weight: 600; color: var(--fg-muted); margin-bottom: 14px; }
.skip-link { position: fixed; top: 8px; left: 12px; z-index: 10; padding: 9px 16px; color: var(--primary-fg); background: var(--primary); border-radius: 8px; transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.portal-shell { display: flow-root; min-height: 100dvh; }
.login-surface { position: relative; display: grid; grid-template-columns: 1fr 1fr; width: min(1060px, calc(100% - 64px)); min-height: 608px; margin: max(32px, calc((100dvh - 608px) / 2)) auto; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.login-story { position: relative; display: flex; flex-direction: column; align-items: flex-start; padding: 38px 42px 26px; background: var(--bg-subtle); overflow: hidden; }
.login-story-copy { margin-top: 50px; z-index: 1; }
.login-story-copy h2 { font-size: clamp(30px, 3.2vw, 42px); line-height: 1.35; margin-bottom: 17px; }
.login-story-copy > p:last-child { font-size: 14px; color: var(--fg-muted); }
.mascot-stage { align-self: flex-end; position: relative; width: 240px; height: 240px; margin: 0 -12px -24px 0; }
.mascot-stage::before { content: ""; position: absolute; inset: 26px; border: 1px solid var(--border-strong); border-radius: 50%; box-shadow: 0 0 0 25px var(--bg-subtle), 0 0 0 26px var(--border); }
.mascot-stage img { position: relative; width: 100%; height: 100%; object-fit: contain; }
.text-link { min-height: 44px; display: inline-flex; align-items: center; gap: 9px; color: var(--fg-muted); font-size: 12px; }
.text-link:hover { color: var(--primary); }
.login-form-area { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 58px; }
.login-tools { z-index: 2; position: absolute; top: 18px; right: 18px; }
.login-form-inner { width: 100%; }
.login-form-inner h1 { margin-bottom: 12px; }
.login-form-inner .section-description { margin-bottom: 30px; font-size: 13px; }
.login-form-inner form { display: grid; gap: 20px; }
.login-form-inner input { height: 48px; }
.remember-choice { display: flex; align-items: center; gap: 9px; min-height: 44px; font-size: 13px; font-weight: 400; }
.remember-choice input { width: 16px; height: 16px; min-height: 16px; accent-color: var(--primary); }
.login-submit { height: 48px; justify-content: space-between; }
.login-footnote { font-size: 11px; color: var(--fg-muted); line-height: 1.8; margin-top: 25px; }
.form-error:empty { display: none; }
.form-error, [role="alert"] { color: var(--danger); overflow-wrap: anywhere; }
.application { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: 100dvh; }
.navigation-rail { position: relative; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--border); padding: 28px 20px 20px; min-width: 0; }
.navigation-rail .brand { margin: 0 4px; }
.rail-label { margin: 44px 14px 12px; font-size: 11px; color: var(--fg-muted); }
.navigation-rail nav { display: grid; gap: 7px; }
.navigation-rail nav button { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border-color: transparent; background: transparent; font-size: 13px; font-weight: 500; height: 46px; }
.navigation-rail nav button[aria-current="page"] { color: var(--primary); background: var(--primary-subtle); font-weight: 650; }
.rail-bottom { margin-top: auto; padding-top: 40px; }
.rail-site-link { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 12px; min-height: 44px; font-size: 12px; color: var(--fg-muted); }
.account-block { display: flex; align-items: center; gap: 10px; padding: 20px 10px 16px; border-top: 1px solid var(--border); margin-top: 18px; }
.account-avatar { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 12px; color: var(--primary); background: var(--primary-subtle); font-weight: 700; }
.account-block > div { min-width: 0; }
.account-name { font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.account-block small { font-size: 10px; color: var(--fg-muted); }
.logout-button { display: flex; align-items: center; gap: 12px; width: 100%; background: transparent; border-color: transparent; color: var(--fg-muted); font-size: 12px; }
.workspace { min-width: 0; display: flex; flex-direction: column; }
.workspace-bar { display: flex; align-items: center; justify-content: space-between; height: 82px; padding: 0 40px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.workspace-bar > div { display: flex; gap: 12px; align-items: center; }
.workspace-bar .ui-icon { width: 17px; height: 17px; }
.workspace-bar strong { font-size: 12px; font-weight: 600; }
.breadcrumb-root { color: var(--fg-muted); font-size: 12px; }
.workspace-actions { gap: 4px !important; }
.workspace-actions .ui-icon { width: 20px; height: 20px; }
.live-status { min-height: 24px; padding: 4px 40px 0; font-size: 11px; color: var(--fg-muted); }
.workspace-content { width: 100%; max-width: 1320px; margin: 0 auto; padding: 20px 40px 28px; flex: 1; min-height: 0; }
.page-heading { margin-bottom: 26px; }
.page-heading h2 { margin-bottom: 10px; }
.page-heading p:not(.eyebrow) { font-size: 13px; color: var(--fg-muted); }
.page-heading .eyebrow { margin-bottom: 7px; }
.state-panel { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; min-height: 96px; margin-bottom: 20px; padding: 22px; border: 1px dashed var(--border-strong); border-radius: var(--radius); color: var(--fg-muted); background: var(--surface); }
.loading-ring { width: 18px; height: 18px; flex-shrink: 0; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.metric-grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 14px; }
.metric-grid > div { position: relative; padding: 22px 24px; min-width: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.metric-grid dt { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--fg-muted); }
.metric-grid dt .ui-icon { color: var(--fg-subtle); width: 18px; height: 18px; }
.metric-grid dd { font-size: 35px; line-height: 1.1; letter-spacing: -.05em; font-weight: 600; font-variant-numeric: tabular-nums; margin: 16px 0 10px; }
.metric-caption { font-size: 10px; color: var(--fg-muted); }
.metric-grid .metric-feature { grid-row: span 2; background: var(--primary-subtle); border-color: var(--primary-border); display: flex; flex-direction: column; }
.metric-feature dd { margin-top: 30px; font-size: 78px; }
.metric-feature > .ui-icon { width: 72px; height: 72px; color: var(--primary); margin-top: auto; align-self: flex-end; opacity: .75; }
.metric-grid .metric-session { grid-column: 1 / -1; display: flex; align-items: center; gap: 20px; padding: 18px 24px; }
.metric-session dt { flex: 1; justify-content: flex-start; }
.metric-session dd { font-size: 28px; margin: 0; }
.overview-shortcuts { margin-top: 28px; }
.section-heading { display: flex; gap: 16px; align-items: baseline; margin-bottom: 14px; }
.section-heading h3 { font-size: 14px; }
.section-heading p { font-size: 11px; color: var(--fg-muted); }
.shortcut-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.shortcut { display: flex; align-items: center; gap: 14px; text-align: left; padding: 18px; border-color: var(--border); border-radius: var(--radius); }
.shortcut > .ui-icon:first-child { color: var(--primary); }
.shortcut > .ui-icon:last-child { margin-left: auto; width: 18px; }
.shortcut span { display: grid; gap: 5px; }
.shortcut strong { font-size: 13px; }
.shortcut small { font-size: 10px; color: var(--fg-muted); font-weight: 400; }
.filter-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.filter-row label { font-size: 11px; color: var(--fg-muted); min-width: 155px; }
.filter-row select { font-size: 12px; }
.activity-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.activity-list-panel { min-width: 0; }
.list-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.list-heading h3 { font-size: 13px; }
.list-heading > span { color: var(--fg-muted); font-size: 11px; }
[data-activity-list] { display: grid; gap: 9px; max-height: min(470px, calc(100dvh - 350px)); overflow-y: auto; padding: 3px; scrollbar-width: thin; }
.activity-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 12px; width: 100%; padding: 17px 18px; min-width: 0; text-align: left; white-space: normal; border-color: var(--border); border-radius: 12px; }
.activity-row[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-subtle); }
.activity-row-title { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.activity-row-meta { grid-column: 1 / -1; font-size: 10px; color: var(--fg-muted); font-weight: 400; overflow-wrap: anywhere; }
.status-badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 6px; font-size: 10px; white-space: nowrap; color: var(--fg-muted); background: var(--bg-subtle); }
.status-badge[data-tone="success"] { color: var(--success); background: var(--success-subtle); }
.status-badge[data-tone="danger"] { color: var(--danger); background: var(--danger-subtle); }
.card { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.card h3 { font-size: 14px; }
.detail-placeholder { min-height: 230px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; color: var(--fg-muted); }
.detail-placeholder .ui-icon { width: 42px; height: 42px; margin-bottom: 8px; color: var(--primary); }
.detail-placeholder small { font-size: 11px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 21px 14px; margin-top: 25px; }
.detail-grid > div { min-width: 0; }
.detail-wide { grid-column: 1 / -1; }
.detail-grid dt { font-size: 10px; color: var(--fg-muted); margin-bottom: 5px; }
.detail-grid dd { font-size: 12px; overflow-wrap: anywhere; }
[data-step-state] { margin-top: 18px; font-size: 11px; }
[data-session-list] { display: grid; gap: 14px; }
.session-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px 18px; align-items: center; padding: 23px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.session-summary { min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.session-row button { font-size: 12px; color: var(--danger); }
.notice-line { display: flex; align-items: flex-start; gap: 12px; color: var(--fg-muted); font-size: 12px; margin-bottom: 24px; }
.notice-line .ui-icon { color: var(--primary); }
.security-panel { display: flex; align-items: center; gap: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 30px; margin-bottom: 24px; }
.security-panel > .ui-icon { width: 36px; height: 36px; color: var(--primary); }
.security-panel > div { flex: 1; }
.security-panel h3 { margin-bottom: 8px; }
.security-panel p { font-size: 12px; color: var(--fg-muted); max-width: 50ch; }
.security-panel button { flex-shrink: 0; }
.workspace-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 40px 18px; font-size: 10px; color: var(--fg-muted); }
.workspace-footer a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
dialog { width: min(470px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow-y: auto; padding: 30px; color: var(--fg); border: 1px solid var(--border); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
dialog::backdrop { background: rgb(16 22 21 / 45%); backdrop-filter: blur(3px); }
dialog h2 { font-size: 23px; }
dialog form { display: grid; gap: 18px; }
dialog p { font-size: 12px; color: var(--fg-muted); }
dialog label { font-size: 12px; }
dialog menu { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin: 0; padding: 0; }
.stagger > div { animation: appear .35s ease-out both; }
@keyframes appear { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@media (min-width: 761px) and (max-height: 800px) {
  .login-surface { min-height: 550px; margin: 24px auto; }
  .login-story-copy { margin-top: 32px; }
  .mascot-stage { width: 195px; height: 195px; }
  .login-form-area { padding-block: 44px; }
  .workspace-bar { height: 64px; }
  .workspace-content { padding-top: 14px; padding-bottom: 18px; }
  .page-heading { margin-bottom: 18px; }
  .page-heading h2 { font-size: 28px; margin-bottom: 6px; }
  .metric-grid { gap: 10px; }
  .metric-grid > div { padding: 15px 20px; }
  .metric-grid dd { font-size: 30px; margin-block: 10px 6px; }
  .metric-feature dd { font-size: 64px; margin-top: 20px; }
  .metric-feature > .ui-icon { width: 48px; height: 48px; }
  .metric-grid .metric-session { padding-block: 12px; }
  .metric-session dd { font-size: 24px; margin: 0; }
  .overview-shortcuts { margin-top: 18px; }
  .shortcut { padding: 13px 18px; }
  .workspace-footer { padding-block: 10px; }
  [data-activity-list] { max-height: max(180px, calc(100dvh - 350px)); }
}
@media (max-width: 1100px) {
  :root { --rail-w: 205px; }
  .workspace-bar { padding: 0 28px; }
  .workspace-content { padding: 20px 28px 24px; }
  .live-status { padding-left: 28px; }
  .workspace-footer { padding-inline: 28px; }
  .metric-grid > div { padding: 20px; }
  .metric-feature dd { font-size: 62px; }
  .metric-caption { font-size: 10px; }
  .login-form-area { padding: 45px; }
}
@media (max-width: 760px) {
  .login-surface { width: calc(100% - 32px); max-width: 460px; min-height: 0; margin: 24px auto; grid-template-columns: 1fr; }
  .login-story { padding: 26px 30px 28px; }
  .login-story-copy { margin-top: 26px; }
  .login-story-copy h2 { font-size: 29px; margin-bottom: 0; }
  .login-story-copy > p:last-child, .login-story > .text-link { display: none; }
  .mascot-stage { position: absolute; width: 144px; height: 144px; right: 14px; bottom: 8px; margin: 0; opacity: .9; }
  .mascot-stage::before { display: none; }
  .login-form-area { padding: 34px 30px; }
  .login-form-inner h1 { font-size: 26px; }
  .login-form-inner .eyebrow { display: none; }
  .login-tools { top: 12px; right: 14px; }
  .application { grid-template-columns: 1fr; }
  .navigation-rail { padding: 15px 20px 12px; border-right: 0; border-bottom: 1px solid var(--border); }
  .navigation-rail .brand img { width: 35px; height: 35px; }
  .navigation-rail .brand { margin-bottom: 13px; }
  .rail-label, .rail-site-link, .account-block { display: none; }
  .navigation-rail nav { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .navigation-rail nav button { flex-direction: column; gap: 4px; padding: 8px 0; height: auto; font-size: 10px; }
  .navigation-rail nav .ui-icon { width: 20px; height: 20px; }
  .rail-bottom { margin: 0; padding: 0; position: absolute; right: 20px; top: 17px; }
  .logout-button { padding: 0 8px; width: auto; gap: 6px; }
  .workspace-bar { height: 66px; padding-inline: 24px; }
  .workspace-content { padding: 18px 24px 24px; }
  .live-status { padding-left: 24px; }
  .page-heading h2 { font-size: 28px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .metric-grid .metric-feature { grid-row: auto; grid-column: 1 / -1; min-height: 155px; }
  .metric-feature dd { font-size: 58px; margin-top: 20px; }
  .metric-feature > .ui-icon { position: absolute; right: 25px; top: 43px; }
  .metric-session .metric-caption { display: none; }
  .metric-grid .metric-session { padding: 20px; }
  .shortcut-grid, .activity-layout { grid-template-columns: 1fr; }
  .section-heading { display: block; }
  .section-heading p { margin-top: 5px; }
  .session-row { grid-template-columns: 1fr auto; }
  .session-summary { grid-column: 1 / -1; }
  .security-panel { flex-wrap: wrap; padding: 23px; gap: 16px; }
  .security-panel > div { flex-basis: calc(100% - 60px); }
  .security-panel button { width: 100%; }
  .workspace-footer { padding-inline: 24px; flex-wrap: wrap; }
}
@media (max-width: 370px) {
  .workspace-content { padding-inline: 16px; }
  .metric-grid > div { padding: 16px; }
  .login-story { padding-inline: 24px; }
  .login-story-copy h2 { font-size: 25px; }
  .mascot-stage { width: 116px; height: 116px; right: 4px; }
  .login-form-area { padding-inline: 24px; }
  .breadcrumb-root { display: none; }
  .filter-row { gap: 10px; }
  .filter-row label { min-width: 0; flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  :focus-visible { outline-color: Highlight; }
  button[aria-current="page"], button[aria-pressed="true"] { border: 2px solid Highlight; }
}
/* ============================================================
   SXFlash-style administration shell
   White header, 260px grouped rail, #f0f2f5 workspace and teal
   accent, matching the reference user center.
   ============================================================ */
:root {
  --bg: #f0f2f5; --bg-subtle: #f7f8fa; --surface: #ffffff; --surface-hover: #f7f8fa; --surface-active: #e8f9f7;
  --border: #e6e6e6; --border-strong: #d9d9d9; --fg: #4d5259; --fg-muted: #7a828e; --fg-subtle: #9aa4b2;
  --primary: #33cabb; --primary-hover: #2bb5a7; --primary-fg: #ffffff; --primary-subtle: #e8f9f7; --primary-border: #9fe3dc;
  --success: #33cabb; --success-subtle: #e8f9f7; --danger: #ff5722; --danger-subtle: #fff1ec; --warning: #ffb800;
  --radius-sm: 2px; --radius: 4px; --radius-lg: 6px; --control-h: 36px; --rail-w: 260px;
  --font: "Helvetica Neue", Helvetica, Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
  --shadow: 0 1px 2px rgb(0 0 0 / 3%);
}
html[data-theme="dark"] {
  --bg: #141a1f; --bg-subtle: #1b232a; --surface: #202930; --surface-hover: #26323a; --surface-active: #1f3a38;
  --border: #2f3b44; --border-strong: #41505b; --fg: #e6edf3; --fg-muted: #a5b1bc; --fg-subtle: #8a97a3;
  --primary: #4fd8cb; --primary-hover: #79e6db; --primary-fg: #102b29; --primary-subtle: #1f3a38; --primary-border: #3f776f;
  --success: #4fd8cb; --success-subtle: #1f3a38; --danger: #ff8a65; --danger-subtle: #3b2621; --warning: #ffcc66;
  --shadow: 0 1px 2px rgb(0 0 0 / 18%);
}
body { background: var(--bg); color: var(--fg); font: 13px/1.6 var(--font); }
h1 { font-size: 26px; } h2 { font-size: 20px; } h3 { font-size: 14px; }
button, input, select { min-height: var(--control-h); }
button { padding: 0 14px; border-color: var(--border); border-radius: 2px; background: var(--surface); font-size: 13px; font-weight: 400; }
button:hover:not(:disabled) { border-color: var(--primary); background: var(--surface-hover); }
.button-primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 500; }
.button-primary:hover:not(:disabled) { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
input { height: 36px; padding: 0 10px; border-color: var(--border); border-radius: 2px; background: var(--bg-subtle); font-size: 13px; }
input:focus-visible { border-color: var(--primary); outline: 2px solid var(--primary-subtle); outline-offset: 0; }
label { font-weight: 500; }
.ui-icon { width: 18px; height: 18px; }

.application { display: block; min-height: 100dvh; background: var(--bg); }
.navigation-rail { position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; flex-direction: column; width: var(--rail-w); padding: 0; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--border); box-shadow: 0 0 5px rgb(0 0 0 / 4%); }
.navigation-rail .brand { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 0; margin: 0; padding: 16px 10px 12px; text-align: center; }
.navigation-rail .brand img { width: 34px; height: 34px; border-radius: 6px; }
.navigation-rail .brand > span { color: var(--primary); font-size: 22px; font-weight: 600; line-height: 1.15; letter-spacing: 1px; }
.navigation-rail .brand small { margin-top: 5px; color: var(--fg-subtle); font-size: 12px; font-weight: 400; letter-spacing: 0; }
.rail-label { margin: 18px 20px 8px; color: var(--fg-subtle); font-size: 12px; font-weight: 400; }
.navigation-rail nav { display: block; }
.navigation-rail nav button { display: flex; gap: 10px; align-items: center; width: 100%; height: 46px; padding: 0 20px 0 40px; border: 0; border-radius: 0; background: transparent; color: var(--fg); font-size: 13px; font-weight: 400; text-align: left; }
.navigation-rail nav button .ui-icon { width: 17px; height: 17px; color: var(--fg-muted); }
.navigation-rail nav button:hover:not(:disabled) { color: var(--primary); background: var(--bg-subtle); }
.navigation-rail nav button[aria-current="page"] { color: #fff; background: var(--primary); font-weight: 500; }
.navigation-rail nav button[aria-current="page"] .ui-icon { color: #fff; }
.rail-bottom { margin-top: auto; padding: 18px 20px; }
.rail-site-link { display: flex; gap: 10px; align-items: center; justify-content: space-between; min-height: 40px; padding: 0 4px; color: var(--fg-muted); font-size: 12px; }
.rail-site-link:hover { color: var(--primary); }

.workspace { display: flex; flex-direction: column; min-height: 100dvh; margin-left: var(--rail-w); }
.workspace-bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; height: 50px; padding: 0 20px; background: var(--surface); border-bottom: 1px solid #f0f0f0; box-shadow: 0 1px 4px rgb(0 21 41 / 8%); }
.workspace-crumb { display: flex; gap: 8px; align-items: center; color: var(--fg-subtle); font-size: 12px; }
.workspace-crumb .ui-icon { width: 13px; height: 13px; }
.workspace-crumb strong { color: var(--fg); font-size: 12px; font-weight: 600; }
.workspace-actions { display: flex; gap: 2px; align-items: center; }
.workspace-actions .icon-button { width: 34px; height: 34px; min-width: 34px; padding: 0; border: 0; border-radius: 2px; background: transparent; color: var(--fg-muted); }
.workspace-actions .icon-button:hover { color: var(--primary); background: var(--bg-subtle); }
.workspace-actions .ui-icon { width: 17px; height: 17px; }
.header-divider { width: 1px; height: 18px; margin: 0 10px; background: var(--border); }
.account-block { display: flex; gap: 7px; align-items: center; margin: 0; padding: 0; border: 0; }
.account-avatar { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 2px; background: var(--primary-subtle); color: var(--primary); font-size: 12px; font-weight: 600; }
.account-name { color: var(--fg); font-size: 12px; font-weight: 500; }
.logout-button { display: flex; gap: 5px; align-items: center; width: auto; height: 34px; margin-left: 4px; padding: 0 8px; border: 0; background: transparent; color: var(--fg-muted); font-size: 12px; }
.logout-button:hover:not(:disabled) { color: var(--danger); background: var(--danger-subtle); }
.logout-button .ui-icon { width: 15px; height: 15px; }
.live-status { min-height: 18px; padding: 6px 20px 0; color: var(--fg-subtle); font-size: 11px; }
.workspace-content { width: 100%; max-width: 1400px; margin: 0 auto; padding: 18px 20px 24px; }
.page-heading { margin-bottom: 16px; }
.page-heading h2 { margin-bottom: 5px; color: var(--fg); font-size: 20px; font-weight: 600; }
.page-heading p:not(.eyebrow) { color: var(--fg-muted); font-size: 12px; }
.page-heading .eyebrow { margin-bottom: 3px; color: var(--fg-subtle); font-size: 12px; font-weight: 400; }
.workspace-footer { display: flex; gap: 12px; flex-wrap: wrap; justify-content: space-between; padding: 12px 20px; border-top: 1px solid var(--border); color: var(--fg-subtle); font-size: 11px; }

.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.metric-grid > div { min-width: 0; padding: 16px 18px; border: 1px solid var(--border); border-radius: 2px; background: var(--surface); box-shadow: none; }
.metric-grid dt { display: flex; gap: 8px; align-items: center; justify-content: space-between; color: var(--fg-muted); font-size: 12px; }
.metric-grid dt .ui-icon { width: 16px; height: 16px; color: var(--fg-subtle); }
.metric-grid dd { margin: 10px 0 5px; color: var(--fg); font-size: 28px; font-weight: 600; line-height: 1.1; letter-spacing: -.02em; }
.metric-caption { color: var(--fg-subtle); font-size: 10px; }
.metric-grid .metric-feature { grid-column: 1 / 3; grid-row: 1; display: flex; flex-direction: column; min-height: 108px; padding: 20px 22px; border-color: transparent; background: linear-gradient(135deg, #3fd0c2 0%, #33cabb 100%); color: #fff; }
.metric-feature dt, .metric-feature .metric-caption { color: rgb(255 255 255 / 85%); }
.metric-feature dt .ui-icon { color: rgb(255 255 255 / 70%); }
.metric-feature dd { margin: 7px 0 3px; color: #fff; font-size: 40px; }
.metric-feature > .ui-icon { align-self: flex-end; width: 52px; height: 52px; margin-top: auto; color: rgb(255 255 255 / 45%); }
.metric-grid .metric-session { grid-column: 3; grid-row: 1; display: flex; flex-direction: column; justify-content: center; min-height: 108px; padding: 20px 22px; border-color: transparent; background: linear-gradient(135deg, #61c77f 0%, #4caf68 100%); color: #fff; }
.metric-session dt, .metric-session .metric-caption { flex: initial; justify-content: flex-start; color: rgb(255 255 255 / 85%); }
.metric-session dt .ui-icon { color: rgb(255 255 255 / 70%); }
.metric-session dd { margin: 7px 0 3px; color: #fff; font-size: 40px; }
.overview-shortcuts { margin-top: 15px; }
.section-heading { display: flex; gap: 12px; align-items: baseline; margin-bottom: 10px; }
.section-heading h3 { color: var(--fg); font-size: 14px; font-weight: 600; }
.section-heading p { color: var(--fg-subtle); font-size: 11px; }
.shortcut-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.shortcut { display: flex; gap: 12px; align-items: center; padding: 15px 16px; border: 1px solid var(--border); border-radius: 2px; background: var(--surface); text-align: left; }
.shortcut:hover:not(:disabled) { border-color: var(--primary); background: var(--primary-subtle); }
.shortcut > .ui-icon:first-child { width: 20px; height: 20px; color: var(--primary); }
.shortcut > .ui-icon:last-child { width: 15px; height: 15px; margin-left: auto; color: var(--fg-subtle); }
.shortcut strong { font-size: 13px; font-weight: 500; }
.shortcut small { color: var(--fg-subtle); font-size: 11px; }

.filter-row { display: flex; gap: 15px; flex-wrap: wrap; margin-bottom: 15px; }
.filter-row label { min-width: 150px; color: var(--fg-muted); font-size: 12px; }
.filter-row select { height: 34px; padding: 0 8px; border-color: var(--border); border-radius: 2px; background: var(--surface); font-size: 12px; }
.activity-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 15px; align-items: start; }
.list-heading { margin-bottom: 10px; }
.list-heading h3 { font-size: 14px; }
.list-heading > span { color: var(--fg-subtle); font-size: 11px; }
[data-activity-list] { gap: 8px; max-height: min(520px, calc(100dvh - 300px)); padding: 0; }
.activity-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 2px; background: var(--surface); }
.activity-row:hover:not(:disabled) { border-color: var(--primary); background: var(--surface-hover); }
.activity-row[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-subtle); }
.activity-row-title { color: var(--fg); font-size: 13px; font-weight: 500; }
.activity-row-meta { color: var(--fg-subtle); font-size: 10px; }
.status-badge { padding: 2px 7px; border-radius: 2px; color: var(--fg-muted); background: var(--bg-subtle); font-size: 10px; }
.status-badge[data-tone="success"] { color: var(--primary); background: var(--primary-subtle); }
.status-badge[data-tone="danger"] { color: var(--danger); background: var(--danger-subtle); }
.card { padding: 18px; border: 1px solid var(--border); border-radius: 2px; background: var(--surface); }
.card h3 { padding-bottom: 11px; border-bottom: 1px solid var(--border); font-size: 14px; font-weight: 600; }
.detail-placeholder { min-height: 220px; color: var(--fg-subtle); }
.detail-placeholder .ui-icon { color: var(--primary); }
.detail-grid { gap: 16px 14px; margin-top: 16px; }
.detail-grid dt { color: var(--fg-subtle); }
.detail-grid dd { color: var(--fg); }
[data-step-state] { color: var(--fg-subtle); }
[data-session-list] { gap: 10px; }
.session-row { padding: 14px 16px; border: 1px solid var(--border); border-radius: 2px; background: var(--surface); }
.session-row button { color: var(--danger); }
.notice-line { gap: 9px; margin-bottom: 15px; color: var(--fg-muted); font-size: 12px; }
.notice-line .ui-icon { color: var(--primary); }
.security-panel { gap: 16px; padding: 18px; margin-bottom: 15px; border: 1px solid var(--border); border-radius: 2px; background: var(--surface); }
.security-panel > .ui-icon { color: var(--primary); }
.security-panel h3 { margin-bottom: 5px; }
.state-panel { min-height: 84px; margin-bottom: 15px; padding: 18px; border: 1px solid var(--border); border-radius: 2px; background: var(--surface); }
dialog { border-radius: 4px; }
dialog h2 { font-size: 18px; }

@media (max-width: 992px) {
  .navigation-rail { position: static; width: auto; max-height: none; overflow: visible; border-right: 0; border-bottom: 1px solid var(--border); }
  .navigation-rail .brand { flex-direction: row; gap: 10px; padding: 12px 16px; text-align: left; }
  .navigation-rail .brand > span { font-size: 18px; }
  .navigation-rail .brand small { display: none; }
  .rail-label { display: none; }
  .navigation-rail nav { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 12px 12px; }
  .navigation-rail nav button { flex: 1 1 45%; height: 40px; padding: 0 14px; border-radius: 2px; }
  .rail-bottom { display: none; }
  .workspace { margin-left: 0; }
  .workspace-bar { height: 50px; padding: 0 16px; }
  .workspace-content { padding: 16px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-grid .metric-feature { grid-column: 1 / -1; grid-row: auto; }
  .metric-grid .metric-session { grid-column: 1 / -1; grid-row: auto; min-height: 90px; }
  .activity-layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .metric-grid { grid-template-columns: 1fr; }
  .shortcut-grid { grid-template-columns: 1fr; }
  .account-name { display: none; }
  .header-divider { display: none; }
  .workspace-crumb .breadcrumb-root { display: none; }
  .workspace-crumb .ui-icon { display: none; }
}
