:root {
  --paper: #f7f5f0;
  --surface: #fbfaf7;
  --ink: #362d26;
  --muted: #83776c;
  --line: #e3ddd3;
  --accent: #a65d3d;
  --accent-hover: #8d4a30;
  --success: #536b4d;
  --error: #9e453a;
  --radius: 12px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 14px; line-height: 1.65; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
button, input { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, p { margin: 0; }
h1 { font-family: "Iowan Old Style", "Palatino Linotype", "Songti SC", "STSong", serif; font-weight: 500; font-size: clamp(30px, 4vw, 39px); letter-spacing: -.8px; line-height: 1.3; }
h2 { font-size: 16px; font-weight: 600; letter-spacing: .2px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.eyebrow { display: block; font-size: 10px; letter-spacing: 2.1px; color: var(--muted); margin-bottom: 13px; }
.title-dot { color: var(--accent); }
.console-shell { max-width: 1100px; margin: 0 auto; padding: 58px 40px 25px; }
.page-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 39px; }
.page-header p { margin-top: 10px; }
.header-tools { display: flex; align-items: center; gap: 22px; }
.account-name { color: var(--muted); max-width: 180px; overflow-wrap: anywhere; }
.text-button { background: none; border: 0; padding: 4px 0; color: var(--muted); }
.text-button:hover { color: var(--accent); }
.text-button span { margin-left: 7px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(275px, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.settings-panel { padding: 30px 32px; }
.status-panel { padding: 30px 28px; border-left: 1px solid var(--line); background: #f4f1eb; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.dirty-label { color: var(--accent); font-size: 11px; }
fieldset { min-width: 0; padding: 0; margin: 0; border: 0; }
.field-heading { display: flex; justify-content: flex-end; align-items: center; margin-bottom: 12px; gap: 12px; }
legend { float: left; font-weight: 500; }
legend .small, label .small { margin-left: 6px; font-weight: 400; }
.course-list { display: flex; flex-direction: column; gap: 8px; min-height: 72px; max-height: 250px; overflow-y: auto; padding: 2px; }
.course-option { display: flex; align-items: flex-start; gap: 11px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; background: transparent; transition: border-color .15s, background .15s; }
.course-option:has(input:checked) { border-color: #c8b7a7; background: #f1ece4; }
.course-option input { margin: 5px 0 0; width: 15px; height: 15px; accent-color: var(--accent); flex-shrink: 0; }
.course-option span { overflow-wrap: anywhere; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 27px; }
.field label, .login-panel label { display: block; margin-bottom: 9px; font-weight: 500; }
.field input, .login-panel input { width: 100%; min-width: 0; background: #fffefa; border: 1px solid var(--line); border-radius: 7px; padding: 10px 12px; color: var(--ink); height: 44px; }
.schedule-field { margin-top: 23px; }
.field-help { color: var(--muted); font-size: 12px; line-height: 1.7; margin-top: 8px; }
.settings-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 25px; margin-top: 25px; border-top: 1px solid var(--line); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 42px; border: 1px solid transparent; border-radius: 7px; padding: 9px 17px; font-weight: 500; transition: background .15s; }
.primary { background: var(--accent); color: #fffaf4; }
.primary:hover:enabled { background: var(--accent-hover); }
.secondary { background: transparent; border-color: #d9d0c3; color: var(--ink); }
.secondary:hover:enabled { background: #eee8df; }
.state-line { display: flex; align-items: center; gap: 11px; font-size: 24px; font-family: "Songti SC", "STSong", serif; margin-top: 29px; }
.state-dot { width: 9px; height: 9px; border-radius: 50%; background: #a89b8b; flex-shrink: 0; }
.state-dot.running { background: var(--success); box-shadow: 0 0 0 4px #536b4d12; }
.state-dot.waiting { background: var(--accent); }
.state-dot.error { background: var(--error); }
.state-detail { font-size: 12px; min-height: 40px; margin-top: 7px; }
.metrics { display: grid; grid-template-columns: 1fr 1fr; padding: 22px 0; margin: 16px 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metrics dt { font-size: 12px; color: var(--muted); }
.metrics dd { font-size: 29px; line-height: 1.3; margin: 7px 0 0; font-variant-numeric: tabular-nums; }
.last-scan { display: flex; justify-content: space-between; gap: 10px; padding-top: 14px; }
.task-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 26px; }
.task-actions .primary { grid-column: 1 / -1; }
.temporary-button { padding: 8px 0; text-align: right; font-size: 12px; }
.action-help { margin-top: 12px; }
.persistent-note { display: flex; gap: 8px; color: var(--muted); font-size: 11px; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 20px; }
.logs-panel { margin-top: 30px; padding: 25px 0 0; }
.logs-panel .section-heading { margin-bottom: 15px; }
.log-list { border-top: 1px solid var(--line); max-height: 370px; overflow-y: auto; }
.log-row { display: grid; grid-template-columns: 143px 42px minmax(0, 1fr); gap: 14px; padding: 11px 0; border-bottom: 1px solid #e8e2d9; align-items: start; font-size: 12px; }
.log-time { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.log-level { color: var(--muted); }
.log-level.success { color: var(--success); }
.log-level.warning { color: var(--accent); }
.log-level.error { color: var(--error); }
.log-message { overflow-wrap: anywhere; white-space: pre-wrap; }
.empty-logs { text-align: center; padding: 35px 12px; font-size: 12px; }
.page-footer { display: flex; justify-content: space-between; gap: 16px; padding-top: 28px; color: #978b7f; font-size: 10px; letter-spacing: .2px; }
.notice { padding: 12px 16px; margin-bottom: 20px; border: 1px solid; border-radius: 7px; font-size: 13px; overflow-wrap: anywhere; }
.error-notice { color: var(--error); background: #f9eee9; border-color: #e7c9bf; }
.success-notice { color: var(--success); background: #eff2e9; border-color: #d4ddca; }
.error-message { color: var(--error); margin-top: 10px; overflow-wrap: anywhere; }
.login-shell { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 22px; }
.login-panel { width: 100%; max-width: 360px; }
.login-panel h1 { margin-bottom: 12px; }
.login-panel form { margin-top: 32px; }
.login-panel .button { width: 100%; justify-content: space-between; margin-top: 20px; }
.login-footer { color: #a39486; font-size: 11px; margin-top: 60px; }
.boot-view { display: flex; align-items: center; justify-content: center; min-height: 100svh; color: var(--muted); }
@media (max-width: 760px) {
  .console-shell { padding: 32px 20px 22px; }
  .page-header { align-items: flex-start; margin-bottom: 28px; gap: 15px; }
  .header-tools { flex-direction: column; align-items: flex-end; gap: 7px; padding-top: 5px; }
  .account-name { max-width: 110px; font-size: 11px; }
  .header-tools .text-button { font-size: 12px; white-space: nowrap; }
  .workspace { grid-template-columns: 1fr; }
  .settings-panel, .status-panel { padding: 24px 22px; }
  .status-panel { border-left: 0; border-top: 1px solid var(--line); }
  .state-line { margin-top: 12px; }
  .state-detail { min-height: 0; }
  .metrics { margin-top: 20px; }
  .task-actions { grid-template-columns: 1fr 1fr; }
  .log-row { grid-template-columns: 110px 33px minmax(0, 1fr); gap: 8px; font-size: 11px; }
  .log-time { white-space: normal; }
  .logs-panel .section-heading { gap: 8px; }
  .logs-panel .section-heading .small { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
