:root {
  --bg: #0b0e14;
  --surface: #121722;
  --surface-2: #171d29;
  --line: #252d3c;
  --text: #edf1f7;
  --muted: #929db0;
  --accent: #b8f171;
  --accent-ink: #17220b;
  --danger: #ff8b8b;
  --warning: #ffd479;
  --radius: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(circle at 80% 0%, #1a2630 0, transparent 36%), var(--bg); color: var(--text); font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif; line-height: 1.6; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(420px, 100%); padding: 40px; background: #121722f2; border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 24px 80px #0006; }
.brand-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 22px; margin-bottom: 24px; }
.brand-mark.small { width: 32px; height: 32px; border-radius: 10px; font-size: 15px; margin: 0; }
.eyebrow { color: var(--accent); font-size: 11px; letter-spacing: .16em; font-weight: 700; margin: 0 0 8px; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.18; letter-spacing: -.04em; margin-bottom: 12px; }
h2 { font-size: 18px; letter-spacing: -.02em; margin-bottom: 2px; }
.login-card h1 { font-size: 30px; }
.muted, .hint { color: var(--muted); }
.muted { margin-bottom: 28px; }
.hint { font-size: 12px; margin: 8px 0 18px; }
label { display: block; font-size: 13px; font-weight: 600; margin: 18px 0 8px; }
input, textarea { width: 100%; color: var(--text); background: #0c111a; border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; outline: none; transition: border-color .2s, box-shadow .2s; }
select { width: 100%; color: var(--text); background: #0c111a; border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; outline: none; }
select:focus { border-color: #8dbb50; box-shadow: 0 0 0 3px #b8f17116; }
input:focus, textarea:focus { border-color: #8dbb50; box-shadow: 0 0 0 3px #b8f17116; }
textarea { resize: vertical; min-height: 140px; font-family: "Cascadia Code", Consolas, monospace; font-size: 12px; }
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent); flex: 0 0 auto; }
button { border: 0; border-radius: 10px; padding: 10px 16px; font-weight: 700; transition: transform .15s, background .2s; }
button:active { transform: translateY(1px); }
.primary { background: var(--accent); color: var(--accent-ink); }
.primary:hover { background: #c9fa90; }
.secondary { color: var(--text); background: var(--surface-2); border: 1px solid var(--line); }
.ghost { color: var(--muted); background: transparent; border: 1px solid transparent; }
.ghost:hover { color: var(--text); background: var(--surface-2); }
.full { width: 100%; margin-top: 20px; padding: 12px; }
.error { min-height: 20px; color: var(--danger); font-size: 13px; margin: 12px 0 0; }
.topbar { height: 72px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 max(24px, calc((100vw - 1240px) / 2)); background: #0b0e14cc; backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.clock { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; margin-right: 12px; }
.page { max-width: 1240px; margin: auto; padding: 48px 24px 32px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.page-heading .muted { margin-bottom: 0; }
.badge { border: 1px solid #b8f17144; background: #b8f1710d; color: var(--accent); font-size: 12px; border-radius: 999px; padding: 7px 12px; white-space: nowrap; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; display: flex; flex-direction: column; }
.stat span { color: var(--muted); font-size: 12px; }
.stat strong { font-size: 30px; line-height: 1.4; margin: 4px 0; }
.stat .state-text { font-size: 21px; }
.stat small { color: var(--muted); font-size: 11px; }
.layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1fr); gap: 24px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.panel-heading { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.panel-heading p { color: var(--muted); font-size: 12px; margin: 0; }
.step { color: #596579; font-family: monospace; font-size: 12px; }
.field-heading { display: flex; justify-content: space-between; align-items: center; }
.mode-switch { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; padding: 5px; background: #0c111a; border: 1px solid var(--line); border-radius: 12px; margin: 4px 0 22px; }
.mode-button { background: transparent; color: var(--muted); padding: 9px 5px; font-size: 12px; }
.mode-button.active { background: #263223; color: var(--accent); box-shadow: inset 0 0 0 1px #b8f17133; }
.region-grid { display: flex; flex-wrap: wrap; gap: 14px; margin: 8px 0 10px; }
.region-grid .check { margin: 0; }
.login-shot-wrap { margin-top: 14px; }
.login-shot-wrap img { display: block; width: 100%; border: 1px solid var(--line); border-radius: 10px; cursor: crosshair; background: #0c111a; }
.login-shot-wrap small { display: block; color: var(--muted); font-size: 10px; margin-top: 7px; }
.login-actions { display: flex; gap: 8px; margin-top: 12px; }
.login-actions .primary { flex: 1; }
.task-link { display: inline-block; margin-top: 10px; color: var(--accent); font-size: 12px; }
.field-heading label { margin-bottom: 8px; }
.lock-note { color: var(--accent); font-size: 11px; }
.capture-helper { margin: 22px 0; padding: 16px; border: 1px solid #b8f17133; border-radius: 12px; background: #b8f17108; }
.capture-helper strong { font-size: 13px; }
.capture-helper p { color: var(--muted); font-size: 12px; margin: 4px 0 12px; }
.capture-helper small { display: block; color: var(--muted); font-size: 10px; margin-top: 8px; }
.download-button { display: inline-block; padding: 8px 13px; background: var(--accent); color: var(--accent-ink); border-radius: 8px; font-size: 12px; font-weight: 700; }
.download-button:hover { background: #c9fa90; }
.advanced { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 16px; }
summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.check { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); font-weight: 400; line-height: 1.5; }
.side { display: grid; gap: 24px; }
.task-list { display: grid; gap: 12px; }
.empty { padding: 32px 12px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; font-size: 13px; }
.task { border: 1px solid var(--line); background: #0e131d; border-radius: 12px; padding: 16px; }
.task-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.task h3 { font-size: 14px; margin: 0 0 4px; }
.task-time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.status { font-size: 11px; padding: 3px 8px; border-radius: 999px; background: #263041; color: #bdc8d8; white-space: nowrap; }
.status.scheduled { color: var(--accent); background: #b8f17112; }
.status.running, .status.accepted { color: var(--warning); background: #ffd47912; }
.status.rejected, .status.failed { color: var(--danger); background: #ff8b8b12; }
.task-result { font-size: 12px; margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); overflow-wrap: anywhere; }
.task-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; color: var(--muted); font-size: 11px; }
.cancel { color: var(--danger); background: transparent; padding: 2px 0; font-size: 12px; }
.guide ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
.guide li { margin-bottom: 10px; }
.guide li:last-child { margin-bottom: 0; }
.log-panel { margin-top: 24px; }
.event-list { max-height: 300px; overflow: auto; font-family: "Cascadia Code", Consolas, monospace; font-size: 12px; }
.event { display: grid; grid-template-columns: 145px 70px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid #202735; }
.event time { color: #6f7c91; }
.event-type { color: var(--accent); }
.event-message { color: #b3bdcd; overflow-wrap: anywhere; }
.security-panel { margin-top: 24px; }
.password-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 16px; align-items: end; margin-top: 20px; }
.password-form label { margin-top: 0; }
footer { color: #606d82; font-size: 11px; text-align: center; padding: 32px 0 8px; }
.toast { position: fixed; right: 24px; bottom: 24px; max-width: min(420px, calc(100vw - 48px)); padding: 14px 18px; border-radius: 12px; border: 1px solid #b8f17155; background: #182216; color: #dfffc0; box-shadow: 0 12px 40px #0008; z-index: 30; font-size: 13px; }
.toast.error { background: #2a171b; border-color: #ff8b8b55; color: #ffd0d0; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } .stats { grid-template-columns: 1fr 1fr; } .stat:last-child { grid-column: 1 / -1; } .password-form { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .topbar { padding: 0 16px; height: 64px; }
  .clock { display: none; }
  .page { padding: 32px 16px; }
  .page-heading { align-items: flex-start; }
  .page-heading .badge { display: none; }
  .stats { grid-template-columns: 1fr; gap: 10px; }
  .stat:last-child { grid-column: auto; }
  .stat { padding: 16px; }
  .panel { padding: 18px; }
  .two-col { grid-template-columns: 1fr; gap: 0; }
  .event { grid-template-columns: 1fr; gap: 2px; }
  .event time { font-size: 10px; }
  .login-card { padding: 28px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
