:root {
  color-scheme: dark;
  --bg: #141415;
  --deep: #0f0f10;
  --card: #19191b;
  --raised: #232325;
  --line: rgba(237,237,237,.09);
  --line-strong: rgba(237,237,237,.16);
  --text: #ededed;
  --secondary: #a1a1a6;
  --muted: #85858b;
  --accent: #d99a38;
  --accent-ink: #201506;
  --danger: #e5484d;
  --positive: #4cc38a;
  --input: #141415;
  --scene: #111112;
  --grid: rgba(237,237,237,.06);
  --shadow: none;
  font-family: "IBM Plex Sans", "Microsoft YaHei UI", "Segoe UI", sans-serif;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f4ee;
  --deep: #eee9df;
  --card: #fdfbf7;
  --raised: #e8e2d7;
  --line: rgba(31,27,22,.09);
  --line-strong: rgba(31,27,22,.17);
  --text: #1f1b16;
  --secondary: #5e554a;
  --muted: #746b60;
  --accent: #9a5b08;
  --accent-ink: #fffaf0;
  --danger: #c9343a;
  --positive: #137a43;
  --input: #f7f4ee;
  --scene: #eee9df;
  --grid: rgba(31,27,22,.07);
  --shadow: 0 16px 48px rgba(31,27,22,.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { min-width: 320px; }
button, input { font: inherit; }
button { color: inherit; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, .78fr) minmax(520px, 1.22fr); }
.login-panel { min-height: 100vh; padding: 32px clamp(40px,6vw,96px); display: flex; flex-direction: column; background: var(--deep); border-right: 1px solid var(--line); }
.login-header { height: 36px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-size: 17px; font-weight: 600; text-decoration: none; }
.brand-mark { width: 20px; height: 20px; padding: 3px; display: flex; align-items: end; gap: 2px; border: 1px solid var(--line-strong); border-radius: 6px; }
.brand-mark span { width: 3px; border-radius: 1px; background: var(--secondary); }
.brand-mark span:nth-child(1) { height: 7px; }
.brand-mark span:nth-child(2) { height: 12px; background: var(--accent); }
.brand-mark span:nth-child(3) { height: 9px; }
.icon-button { width: 36px; height: 36px; padding: 9px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--raised); cursor: pointer; }
.icon-button svg { width: 16px; height: 16px; stroke-width: 1.5; }
.login-copy { margin-top: auto; padding-top: 64px; }
.eyebrow { margin: 0 0 12px; color: var(--accent); font: 12px/16px "IBM Plex Mono", Consolas, monospace; }
h1 { margin: 0 0 12px; font-size: clamp(36px,4vw,52px); line-height: 1.05; font-weight: 500; letter-spacing: -.03em; }
.login-copy > p:last-child { max-width: 420px; margin: 0; color: var(--secondary); font-size: 15px; line-height: 24px; }
form { margin: 48px 0 auto; }
.field { display: grid; gap: 8px; color: var(--secondary); font-size: 13px; }
.field + .field { margin-top: 20px; }
.field > input, .password-field { width: 100%; height: 44px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--input); }
.field > input, .password-field input { padding: 0 12px; outline: 0; color: var(--text); }
.field > input:focus, .password-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); }
.password-field { display: grid; grid-template-columns: 1fr auto; align-items: center; }
.password-field input { min-width: 0; height: 42px; border: 0; background: transparent; }
.password-field button { height: 32px; margin-right: 6px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; }
.password-field button:hover { background: var(--raised); color: var(--text); }
.form-error { margin: 12px 0 0; color: var(--danger); font-size: 13px; }
.login-button { width: 100%; height: 44px; margin-top: 24px; border: 1px solid var(--accent); border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-weight: 500; cursor: pointer; transition: filter 140ms cubic-bezier(.22,1,.36,1), transform 100ms cubic-bezier(.22,1,.36,1); }
.login-button:hover { filter: brightness(1.05); }
.login-button:active { transform: scale(.99); }
.login-button:disabled { opacity: .65; cursor: wait; }
footer { min-height: 36px; margin-top: 48px; padding-top: 16px; display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--positive); }
.evidence-scene { min-height: 100vh; padding: 32px; display: flex; flex-direction: column; overflow: hidden; background: var(--scene); }
.scene-head { height: 36px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; }
.mono { font-family: "IBM Plex Mono", Consolas, monospace; }
.trace-map { width: 100%; max-width: 820px; margin: auto; }
.grid-line { fill: none; stroke: var(--grid); stroke-width: 1; }
.trace-muted { fill: none; stroke: var(--line-strong); stroke-width: 1.5; stroke-dasharray: 4 8; }
.trace-main { fill: none; stroke: var(--accent); stroke-width: 2; }
.node circle { fill: var(--scene); stroke: var(--secondary); stroke-width: 2; }
.node.hot circle { fill: var(--accent); stroke: var(--accent); }
.node text { fill: var(--muted); font: 12px "IBM Plex Mono", Consolas, monospace; text-anchor: middle; }
.scene-note { width: min(480px,100%); margin: 0 auto; padding: 16px; display: grid; grid-template-columns: 3px 1fr; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.evidence-line { background: var(--accent); border-radius: 2px; }
.scene-note strong, .scene-note small { display: block; }
.scene-note strong { margin-bottom: 4px; font-size: 13px; font-weight: 500; }
.scene-note small { color: var(--muted); font-size: 12px; line-height: 18px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-panel { min-height: 100vh; border-right: 0; }
  .evidence-scene { display: none; }
}
@media (max-width: 520px) {
  .login-panel { padding: 24px; }
  .login-copy { padding-top: 48px; }
  form { margin-top: 40px; }
}
