:root {
  --page: #f3f1ec;
  --surface: #fcfbf7;
  --surface-raised: #fffef9;
  --surface-muted: #efede7;
  --surface-hover: #e9eee8;
  --ink: #20251f;
  --ink-secondary: #434a41;
  --muted: #5e665c;
  --border: rgba(32, 37, 31, 0.12);
  --border-soft: rgba(32, 37, 31, 0.075);
  --border-strong: #888f84;
  --accent: #286544;
  --accent-hover: #1f5438;
  --accent-soft: #e4eee6;
  --accent-soft-strong: #cbdccb;
  --on-accent: #fbfdf9;
  --success: #286544;
  --success-soft: #e4eee6;
  --danger: #9a3d32;
  --danger-hover: #823127;
  --danger-soft: #f7e9e5;
  --warning: #735510;
  --warning-soft: #f5edda;
  --on-dark: #f2f4ed;
  --on-dark-muted: #b9c1b5;
  --dark-line: rgba(242, 244, 237, 0.16);
  --log-bg: #1d251f;
  --log-text: #e7eee6;
  --log-muted: #a7b5a8;
  --log-line: rgba(231, 238, 230, 0.1);
  --backdrop: rgba(23, 29, 24, 0.48);
  --shadow: 0 1px 2px rgba(30, 39, 31, 0.05);
  --dialog-shadow: 0 24px 64px -24px rgba(24, 32, 26, 0.28);
  --focus-ring: 0 0 0 3px rgba(40, 101, 68, 0.18);
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 0; background: var(--page); color: var(--ink); font-family: var(--font-sans); }
body { margin: 0; min-width: 0; min-height: 100vh; min-height: 100dvh; background: var(--page); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled, input:disabled, textarea:disabled { cursor: not-allowed; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button svg, a svg { pointer-events: none; }
p, h1, h2, h3, h4, dl, dd, figure { margin: 0; }
ul, ol { margin: 0; }
h1, h2, h3, h4 { line-height: 1.25; text-wrap: balance; }
p { text-wrap: pretty; }
code { font-family: var(--font-mono); font-size: 0.92em; overflow-wrap: anywhere; }
::selection { background: var(--accent-soft-strong); color: var(--ink); }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
input:focus-visible, textarea:focus-visible { outline: 0; border-color: var(--accent); box-shadow: var(--focus-ring); }
[tabindex="-1"]:focus { outline: none; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); }
.numeric { text-align: right; font-variant-numeric: tabular-nums; }

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}
.button:hover:not(:disabled) { background: var(--surface-hover); }
.button:disabled { opacity: 0.52; }
.button-primary { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.button-primary:hover:not(:disabled) { border-color: var(--accent-hover); background: var(--accent-hover); }
.button-secondary { border-color: var(--border); background: var(--surface-raised); color: var(--ink-secondary); box-shadow: var(--shadow); }
.button-secondary:hover:not(:disabled) { border-color: var(--border-strong); background: var(--surface-raised); color: var(--ink); }
.button-quiet { border-color: transparent; color: var(--ink-secondary); }
.button-quiet:hover:not(:disabled) { border-color: var(--border); background: var(--surface-muted); }
.button-danger { border-color: var(--danger); background: var(--danger); color: var(--on-accent); }
.button-danger:hover:not(:disabled) { border-color: var(--danger-hover); background: var(--danger-hover); }
.button-danger-quiet { border-color: var(--border); background: var(--surface-raised); color: var(--danger); }
.button-danger-quiet:hover:not(:disabled) { border-color: var(--danger); background: var(--danger-soft); }
.button-small { min-height: 36px; padding: 7px 10px; font-size: 12px; }
.button-block { width: 100%; }
.button.is-loading::before, .sidebar-logout.is-loading::before {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  animation: spin 700ms linear infinite;
}
.button.is-loading .icon, .sidebar-logout.is-loading .icon { display: none; }
.icon-button {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-secondary);
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}
.icon-button:hover:not(:disabled) { border-color: var(--border); background: var(--surface-muted); color: var(--ink); }
.icon-button:disabled { opacity: 0.42; }

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 13px;
}
.alert > .icon { margin-top: 1px; }
.alert > p { flex: 1; min-width: 0; }
.alert > .button { margin: -4px -4px -4px auto; }
.alert-danger { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
.inline-spinner { width: 16px; height: 16px; flex: 0 0 auto; border: 2px solid var(--accent-soft-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin 700ms linear infinite; }
.inline-error { margin-top: 14px; padding: 10px 12px; border: 1px solid var(--danger); border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger); font-size: 12px; overflow-wrap: anywhere; }
.inline-error strong { display: block; margin-bottom: 3px; }

.boot-view { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; color: var(--muted); }
.boot-mark, .brand-mark { display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: var(--on-accent); }
.boot-mark { width: 44px; height: 44px; border-radius: var(--radius-md); }
.boot-mark .icon { width: 23px; height: 23px; }
.loading-line { position: relative; width: 120px; height: 2px; overflow: hidden; background: var(--accent-soft-strong); }
.loading-line::after { position: absolute; inset: 0; background: var(--accent); content: ""; transform: translateX(-100%); animation: loading-line 1.2s ease-in-out infinite; }

.login-view { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login-frame { width: min(100%, 1020px); min-height: 620px; display: grid; grid-template-columns: 1.05fr 1fr; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--dialog-shadow); }
.login-intro { display: flex; flex-direction: column; padding: 36px; background: var(--ink); color: var(--on-dark); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 14px; font-weight: 650; letter-spacing: -0.01em; }
.brand-mark { width: 34px; height: 34px; flex: 0 0 auto; border-radius: var(--radius-sm); }
.brand-mark .icon { width: 19px; height: 19px; }
.brand-copy { display: flex; flex-direction: column; min-width: 0; }
.brand-copy small { margin-top: 1px; color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: 0; }
.brand-login .brand-mark { background: var(--on-dark); color: var(--accent-hover); }
.login-intro-copy { margin: auto 0; padding: 48px 0; }
.kicker, .section-label { color: var(--accent-soft-strong); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; }
.login-intro-copy h2 { margin-top: 14px; font-size: 36px; font-weight: 650; letter-spacing: -0.035em; line-height: 1.22; }
.login-intro-copy > p:last-child { max-width: 340px; margin-top: 18px; color: var(--on-dark-muted); font-size: 14px; line-height: 1.75; }
.login-facts { border-top: 1px solid var(--dark-line); }
.login-facts > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--dark-line); font-size: 12px; }
.login-facts dt { color: var(--on-dark-muted); }
.login-facts dd { text-align: right; }
.login-panel { display: flex; flex-direction: column; min-width: 0; }
.login-panel-inner { width: 100%; max-width: 400px; margin: auto; padding: 40px; }
.section-label { color: var(--accent); }
.login-panel h1 { margin-top: 8px; font-size: 26px; letter-spacing: -0.025em; }
.login-lead { margin: 10px 0 28px; font-size: 13px; line-height: 1.7; }
.login-security { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 20px; color: var(--muted); font-size: 11px; }
.login-security .icon { width: 14px; height: 14px; color: var(--accent); }
.login-footer { display: flex; justify-content: space-between; gap: 16px; padding: 16px 24px; border-top: 1px solid var(--border-soft); color: var(--muted); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; }

.field { min-width: 0; }
.field > label { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 7px; color: var(--ink-secondary); font-size: 13px; font-weight: 600; }
.required { color: var(--danger); }
.label-meta { color: var(--muted); font-size: 12px; font-weight: 400; }
input, textarea, select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}
input:hover:not(:disabled), textarea:hover:not(:disabled), select:hover:not(:disabled) { border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:disabled, textarea:disabled, select:disabled { border-color: var(--border); background: var(--surface-muted); color: var(--muted); opacity: 1; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); background: var(--danger-soft); }
textarea { min-height: 132px; resize: vertical; font-family: var(--font-mono); font-size: 12px; line-height: 1.65; }
input[type="checkbox"] { width: 16px; height: 16px; min-height: 0; padding: 0; accent-color: var(--accent); }
.password-control { position: relative; }
.password-control input { padding-right: 82px; }
.password-toggle { position: absolute; top: 50%; right: 3px; min-width: 70px; min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 4px 8px; transform: translateY(-50%); border: 0; border-radius: var(--radius-xs); background: transparent; color: var(--accent); font-size: 12px; font-weight: 600; }
.password-toggle:hover:not(:disabled) { background: var(--accent-soft); }
.password-toggle .icon { width: 15px; height: 15px; }
.field-help, .field-error { margin-top: 6px; font-size: 12px; line-height: 1.5; }
.field-help { color: var(--muted); }
.field-error { color: var(--danger); }

.skip-link { position: fixed; top: 8px; left: 8px; z-index: 120; padding: 10px 14px; transform: translateY(-160%); border-radius: var(--radius-sm); background: var(--ink); color: var(--on-dark); text-decoration: none; }
.skip-link:focus { transform: translateY(0); }
.app-shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 240px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; z-index: 30; height: 100vh; height: 100dvh; display: flex; flex-direction: column; padding: 20px 16px 16px; overflow-y: auto; border-right: 1px solid var(--border); background: var(--surface); }
.sidebar > .brand { padding: 0 8px 24px; }
.sidebar-section-label { padding: 0 10px 8px; color: var(--muted); font-size: 11px; font-weight: 600; }
.side-nav { display: grid; gap: 4px; }
.side-nav button { position: relative; min-height: 44px; display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 12px; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--ink-secondary); text-align: left; font-size: 13px; font-weight: 550; }
.side-nav button:hover { background: var(--surface-muted); color: var(--ink); }
.side-nav button[aria-current="page"] { border-color: var(--accent-soft-strong); background: var(--accent-soft); color: var(--accent-hover); font-weight: 650; }
.side-nav button .icon { width: 19px; height: 19px; }
.nav-count { min-width: 22px; margin-left: auto; padding: 1px 6px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 11px; text-align: center; font-variant-numeric: tabular-nums; }
.unsaved-dot { width: 7px; height: 7px; flex: 0 0 auto; margin-left: auto; border-radius: 50%; background: var(--warning); }
.sidebar-spacer { flex: 1; min-height: 32px; }
.session-card { padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-muted); }
.session-heading { display: flex; align-items: center; gap: 7px; color: var(--ink-secondary); font-size: 12px; font-weight: 600; }
.session-tag { margin-left: auto; color: var(--muted); font-size: 10px; font-weight: 500; }
.session-card p { margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.status-dot { width: 7px; height: 7px; display: inline-block; flex: 0 0 auto; border-radius: 50%; background: var(--muted); }
.status-dot.is-live { background: var(--accent); }
.status-dot.is-error { background: var(--danger); }
.sidebar-logout { min-height: 44px; display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 12px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink-secondary); font-size: 13px; text-align: left; }
.sidebar-logout:hover:not(:disabled) { background: var(--surface-muted); color: var(--danger); }
.sidebar-version { padding: 16px 8px 0; color: var(--muted); font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.04em; }
.mobile-header, .mobile-nav { display: none; }
.app-main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 28px; border-bottom: 1px solid var(--border); background: var(--page); }
.breadcrumb { display: flex; align-items: center; gap: 7px; min-width: 0; color: var(--muted); font-size: 12px; }
.breadcrumb .icon { width: 13px; height: 13px; }
.breadcrumb strong { color: var(--ink-secondary); font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.sync-status { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.content { width: 100%; max-width: 1600px; margin: 0 auto; padding: 24px 28px 40px; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.page-header > div:first-child { min-width: 0; }
.page-header h1 { font-size: 24px; font-weight: 680; letter-spacing: -0.025em; }
.page-header h1 + p { margin-top: 6px; color: var(--muted); font-size: 13px; }
.page-actions, .panel-header-actions, .detail-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.panel { min-width: 0; margin-bottom: 16px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow); }
.panel-header { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 20px; border-bottom: 1px solid var(--border-soft); }
.panel-header h2 { font-size: 15px; font-weight: 650; }
.panel-header h2 + p { margin-top: 4px; color: var(--muted); font-size: 12px; }
.panel-meta { color: var(--muted); font-family: var(--font-mono); font-size: 11px; white-space: nowrap; }

.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-card { min-width: 0; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.stat-icon { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent); }
.stat-icon .icon { width: 17px; height: 17px; }
.stat-code { color: var(--muted); font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.06em; }
.stat-card > p { color: var(--muted); font-size: 12px; }
.stat-value { display: block; margin-top: 3px; font-size: 28px; font-weight: 700; letter-spacing: -0.035em; line-height: 1.25; font-variant-numeric: tabular-nums; }
.stat-card[aria-busy="true"] .stat-value { animation: pulse 1.2s ease-in-out infinite; }
.stat-meta { display: block; margin-top: 5px; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.stat-flag { padding: 2px 7px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 10px; }
.stat-flag.is-active { border-color: var(--accent-soft-strong); background: var(--accent-soft); color: var(--accent); }

.current-job-panel > #overview-job-content { padding: 18px 20px 20px; }
.job-progress-heading, .detail-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.job-progress-heading { margin-bottom: 10px; }
.job-progress-heading code { min-width: 0; color: var(--ink-secondary); font-size: 12px; }
.job-progress-heading strong, .detail-section-heading > strong { font-size: 18px; font-variant-numeric: tabular-nums; }
progress { width: 100%; height: 8px; display: block; overflow: hidden; appearance: none; border: 0; border-radius: var(--radius-xs); background: var(--surface-muted); color: var(--accent); }
progress::-webkit-progress-bar { background: var(--surface-muted); }
progress::-webkit-progress-value { background: var(--accent); transition: width 180ms ease; }
progress::-moz-progress-bar { background: var(--accent); }
.progress-caption { display: flex; justify-content: space-between; gap: 16px; margin-top: 8px; color: var(--muted); font-size: 11px; }
.progress-caption strong { color: var(--ink-secondary); font-weight: 600; font-variant-numeric: tabular-nums; }
.job-result-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(150px, 1.4fr); gap: 12px; align-items: center; margin-top: 18px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-muted); }
.job-result-strip > div { display: flex; align-items: baseline; gap: 8px; }
.job-result-strip span { color: var(--muted); font-size: 11px; }
.job-result-strip strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.job-result-strip > button { min-height: 36px; display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 4px; border: 0; background: transparent; color: var(--accent); font-size: 12px; font-weight: 600; }
.job-result-strip > button .icon { width: 15px; height: 15px; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 20px; text-align: center; }
.empty-icon { width: 30px; height: 30px; margin-bottom: 12px; color: var(--muted); }
.empty-state h3 { font-size: 14px; }
.empty-state p { max-width: 440px; margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.empty-state .button { margin-top: 16px; }
.compact-skeleton { display: grid; gap: 12px; padding: 22px 20px; }
.compact-skeleton span, .skeleton-block, .skeleton-line { display: block; border-radius: var(--radius-xs); background: var(--surface-muted); animation: pulse 1.2s ease-in-out infinite; }
.compact-skeleton span { height: 12px; }
.compact-skeleton span:first-child { width: 45%; height: 18px; }
.compact-skeleton span:last-child { width: 72%; }

.table-wrap { max-width: 100%; overflow: auto; border-radius: 0 0 var(--radius-md) var(--radius-md); }
.table-wrap:focus-visible { outline-offset: -2px; }
table { width: 100%; border-collapse: collapse; border-spacing: 0; text-align: left; }
th { padding: 11px 16px; background: var(--surface-muted); color: var(--muted); font-size: 11px; font-weight: 600; white-space: nowrap; }
td { padding: 12px 16px; border-top: 1px solid var(--border-soft); color: var(--ink-secondary); font-size: 12px; vertical-align: middle; }
tbody tr:hover { background: var(--surface-muted); }
th.numeric, td.numeric { text-align: right; font-variant-numeric: tabular-nums; }
td code { color: var(--ink); font-size: 11px; }
.table-id { display: inline-block; max-width: 170px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; white-space: nowrap; }
.table-progress { min-width: 110px; }
.table-progress progress { width: 76px; height: 5px; margin-top: 5px; }
.table-progress span { font-size: 11px; font-variant-numeric: tabular-nums; }
.table-empty { padding: 28px 16px; text-align: center; }
.table-empty p { color: var(--muted); }
.table-empty strong { display: block; margin-bottom: 5px; color: var(--ink-secondary); font-size: 13px; }
.table-empty .button { margin-top: 12px; }
.skeleton-table-cell { height: 12px; border-radius: var(--radius-xs); background: var(--surface-muted); animation: pulse 1.2s ease-in-out infinite; }

.status-badge { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 8px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-muted); color: var(--ink-secondary); font-size: 11px; font-weight: 600; line-height: 1.35; white-space: nowrap; }
.status-badge::before { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: currentColor; content: ""; }
.status-running, .status-success { border-color: var(--accent-soft-strong); background: var(--success-soft); color: var(--success); }
.status-danger { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
.status-warning { border-color: var(--warning); background: var(--warning-soft); color: var(--warning); }
.status-neutral { color: var(--muted); }

.jobs-layout { display: grid; gap: 16px; align-items: start; }
.jobs-layout .panel { margin-bottom: 0; }
.jobs-list-panel { min-width: 0; overflow: hidden; }
.job-list { min-height: 180px; max-height: 620px; padding: 8px; overflow-y: auto; list-style: none; }
.job-list > li + li { margin-top: 4px; }
.job-list-item { width: 100%; display: block; padding: 12px; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--ink-secondary); text-align: left; }
.job-list-item:hover { background: var(--surface-muted); }
.job-list-item[aria-pressed="true"] { border-color: var(--accent-soft-strong); background: var(--accent-soft); }
.job-list-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.job-list-top code { max-width: 145px; overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.job-list-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 9px; color: var(--muted); font-size: 10px; }
.job-list-item progress { height: 4px; margin-top: 8px; }
.job-list-empty { padding: 22px 12px; color: var(--muted); text-align: center; font-size: 12px; }
.job-list-empty strong { display: block; margin-bottom: 5px; color: var(--ink-secondary); font-size: 13px; }
.job-list-empty .button { margin-top: 12px; }
.job-list-skeleton { padding: 12px; }
.job-list-skeleton .skeleton-line { height: 12px; }
.job-list-skeleton .skeleton-line + .skeleton-line { width: 65%; margin-top: 10px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; color: var(--muted); font-size: 11px; }
.pagination > div { display: flex; gap: 6px; }
.pagination-list { justify-content: center; border-top: 1px solid var(--border-soft); }
.pagination-list span { min-width: 92px; text-align: center; font-variant-numeric: tabular-nums; }
.detail-empty { min-height: 360px; }
.detail-loading { display: grid; gap: 16px; min-height: 360px; padding: 24px; }
.skeleton-block { width: 70%; height: 18px; }
.skeleton-block.wide { width: 100%; height: 44px; }
.skeleton-block.tall { width: 100%; height: 180px; }
.detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px; }
.detail-header > div:first-child { min-width: 0; }
.detail-title-line { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.detail-title-line h3 { font-size: 15px; }
.detail-header code { display: block; color: var(--muted); font-size: 11px; }
.detail-section { padding: 20px; border-top: 1px solid var(--border-soft); }
.detail-section-heading { margin-bottom: 12px; }
.detail-section-heading h4 { font-size: 13px; font-weight: 650; }
.detail-section-heading p { margin-top: 3px; color: var(--muted); font-size: 11px; }
.metadata-grid { display: grid; gap: 14px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border-soft); }
.metadata-grid dt { color: var(--muted); font-size: 11px; }
.metadata-grid dd { margin-top: 3px; color: var(--ink-secondary); font-size: 12px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.logs-heading { align-items: flex-start; }
.log-actions { display: flex; align-items: center; gap: 2px; }
.log-actions .icon-button { width: 34px; height: 34px; }
.log-actions .icon-button .icon { width: 15px; height: 15px; }
#scroll-logs-latest .icon { transform: rotate(90deg); }
.check-label { min-height: 36px; display: inline-flex; align-items: center; gap: 6px; margin-right: 4px; color: var(--muted); font-size: 11px; cursor: pointer; }
.log-viewer { height: 280px; margin-top: 12px; overflow: auto; border-radius: var(--radius-sm); background: var(--log-bg); color: var(--log-text); scrollbar-color: var(--log-muted) var(--log-bg); }
.log-viewer ol { padding: 10px 0; list-style: none; }
.log-viewer li { display: grid; grid-template-columns: 42px minmax(0, 1fr); min-height: 22px; padding: 2px 12px 2px 0; font-family: var(--font-mono); font-size: 11px; line-height: 1.65; }
.log-viewer li:hover { background: var(--log-line); }
.log-line-number { padding-right: 10px; color: var(--log-muted); text-align: right; user-select: none; }
.log-line-text { color: var(--log-text); white-space: pre-wrap; overflow-wrap: anywhere; }
.logs-state { min-height: 278px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px; color: var(--log-muted); text-align: center; font-size: 12px; }
.logs-state .icon { width: 24px; height: 24px; }
.logs-state .button { margin-top: 6px; color: var(--log-text); }
.accounts-section { padding: 20px 0 0; }
.accounts-section > .detail-section-heading { padding: 0 20px; }
.security-note { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; }
.security-note .icon { width: 14px; height: 14px; }
.accounts-table-wrap { margin-top: 12px; border-top: 1px solid var(--border-soft); border-radius: 0; }
.accounts-table-wrap table { min-width: 1180px; }
.accounts-table-wrap td { height: 56px; padding-top: 10px; padding-bottom: 10px; }
.cell-primary { display: block; max-width: 220px; overflow: hidden; color: var(--ink-secondary); text-overflow: ellipsis; white-space: nowrap; }
.cell-secondary { display: block; max-width: 220px; margin-top: 3px; overflow: hidden; color: var(--muted); font-family: var(--font-mono); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.key-cell { min-width: 225px; }
.key-value-line { display: flex; align-items: center; gap: 4px; }
.key-text { max-width: 130px; overflow: hidden; color: var(--ink-secondary); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.key-text.is-masked { color: var(--muted); letter-spacing: 0.08em; }
.key-actions { display: inline-flex; gap: 0; }
.key-actions .icon-button { width: 30px; height: 30px; }
.key-actions .icon { width: 14px; height: 14px; }
.error-cell { max-width: 190px; overflow: hidden; color: var(--danger); text-overflow: ellipsis; white-space: nowrap; }
.accounts-section > .pagination { border-top: 1px solid var(--border-soft); }

.save-state { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.save-state.is-dirty { border-color: var(--warning); background: var(--warning-soft); color: var(--warning); }
.save-state.is-saved { border-color: var(--accent-soft-strong); background: var(--accent-soft); color: var(--accent); }
.config-layout { display: grid; gap: 16px; align-items: start; }
.config-main { min-width: 0; }
.config-section { overflow: hidden; }
.config-section-header { padding: 18px 20px; border-bottom: 1px solid var(--border-soft); }
.config-section-header h2 { font-size: 15px; font-weight: 650; }
.config-section-header p { margin-top: 5px; color: var(--muted); font-size: 12px; }
.form-grid { display: grid; gap: 18px 16px; padding: 20px; }
.field-full { grid-column: 1 / -1; }
.config-error-summary { align-items: flex-start; }
.config-error-summary strong { display: block; margin-bottom: 5px; }
.config-error-summary ul { padding-left: 18px; }
.config-error-summary li + li { margin-top: 3px; }
.config-error-summary button { padding: 0; border: 0; background: transparent; color: var(--danger); font-size: 12px; text-align: left; text-decoration: underline; text-underline-offset: 2px; }
.config-action-bar { position: sticky; bottom: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--dialog-shadow); }
.config-action-bar > p { color: var(--muted); font-size: 11px; }
.config-action-bar > div { display: flex; gap: 8px; }
.config-check-card { padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow); }
.config-check-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.config-check-heading h2 { font-size: 14px; }
.check-summary { color: var(--muted); font-size: 10px; }
.check-summary.has-errors { color: var(--danger); }
.config-check-card > p { margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.config-check-list { margin-top: 14px; list-style: none; }
.config-check-list li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 12px 0; border-top: 1px solid var(--border-soft); }
.check-symbol { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); background: var(--surface-muted); color: var(--muted); }
.check-symbol .icon { width: 13px; height: 13px; }
.config-check-list li.is-pass .check-symbol { background: var(--success-soft); color: var(--success); }
.config-check-list li.is-block .check-symbol { background: var(--danger-soft); color: var(--danger); }
.config-check-list li.is-advisory .check-symbol { background: var(--warning-soft); color: var(--warning); }
.config-check-list strong { display: block; color: var(--ink-secondary); font-size: 12px; font-weight: 600; }
.config-check-list p { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; }
.config-check-list li > button { min-height: 28px; padding: 2px 0 2px 6px; border: 0; background: transparent; color: var(--accent); font-size: 11px; }
.config-check-list li.is-block > button { color: var(--danger); }
.launch-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; padding: 11px; border-radius: var(--radius-sm); background: var(--surface-muted); color: var(--muted); }
.launch-note .icon { width: 15px; height: 15px; margin-top: 2px; }
.launch-note p { font-size: 11px; line-height: 1.6; }
.clipboard-fallback { position: fixed; top: -1000px; left: -1000px; width: 1px; height: 1px; opacity: 0; }

.dialog { width: min(calc(100% - 32px), 460px); max-width: 460px; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--ink); box-shadow: var(--dialog-shadow); }
.dialog::backdrop { background: var(--backdrop); }
.dialog form { padding: 24px; }
.dialog-icon { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; border-radius: var(--radius-md); background: var(--accent-soft); color: var(--accent); }
.dialog-icon.danger { background: var(--danger-soft); color: var(--danger); }
.dialog h2 { font-size: 20px; letter-spacing: -0.02em; }
.dialog h2 + p { margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.dialog code { color: var(--ink-secondary); }
.dialog-summary { margin-top: 16px; padding: 12px; border-radius: var(--radius-sm); background: var(--surface-muted); color: var(--ink-secondary); font-size: 12px; line-height: 1.7; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }

.toast-region { position: fixed; top: 16px; right: 16px; z-index: 110; width: min(380px, calc(100% - 32px)); display: grid; gap: 8px; pointer-events: none; }
.toast { display: grid; grid-template-columns: 20px minmax(0, 1fr) 34px; gap: 10px; align-items: start; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-raised); box-shadow: var(--dialog-shadow); color: var(--ink-secondary); pointer-events: auto; animation: toast-in 180ms ease-out; }
.toast > .icon { margin-top: 1px; color: var(--accent); }
.toast.is-error > .icon { color: var(--danger); }
.toast p { padding-top: 1px; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.toast .icon-button { width: 30px; height: 30px; margin: -5px -5px 0 0; }
.toast .icon-button .icon { width: 14px; height: 14px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 0.46; } 50% { opacity: 1; } }
@keyframes loading-line { 0% { transform: translateX(-100%); } 50%, 100% { transform: translateX(100%); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

@media (min-width: 560px) {
  .metadata-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  .stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .metadata-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .app-shell { grid-template-columns: 248px minmax(0, 1fr); }
  .content { padding: 28px 32px 44px; }
  .topbar { padding-right: 32px; padding-left: 32px; }
  .jobs-layout { grid-template-columns: 310px minmax(0, 1fr); }
  .jobs-list-panel { position: sticky; top: 80px; }
  .job-list { max-height: calc(100vh - 252px); max-height: calc(100dvh - 252px); }
  .config-layout { grid-template-columns: minmax(0, 820px) minmax(250px, 300px); justify-content: space-between; }
  .config-check-card { position: sticky; top: 80px; }
}
@media (min-width: 1500px) {
  .jobs-layout { grid-template-columns: 330px minmax(0, 1fr); }
}

@media (max-width: 1023px) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .mobile-header { position: sticky; top: 0; z-index: 31; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 16px; border-bottom: 1px solid var(--border); background: var(--surface); }
  .mobile-header .brand-mark { width: 30px; height: 30px; }
  .topbar { top: 56px; min-height: 52px; padding: 7px 16px; }
  .breadcrumb > span, .breadcrumb > .icon { display: none; }
  .content { padding: 20px 16px 104px; }
  .mobile-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 40; min-height: 64px; display: grid; grid-template-columns: repeat(3, 1fr); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--border); background: var(--surface); }
  .mobile-nav button { position: relative; min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 0; background: transparent; color: var(--muted); font-size: 11px; }
  .mobile-nav button[aria-current="page"] { color: var(--accent); font-weight: 650; }
  .mobile-nav button[aria-current="page"]::before { position: absolute; top: 0; width: 32px; height: 2px; background: var(--accent); content: ""; }
  .mobile-nav .icon { width: 20px; height: 20px; }
  .mobile-nav .unsaved-dot { position: absolute; top: 11px; left: calc(50% + 12px); margin: 0; }
  .config-action-bar { bottom: 72px; }
  .config-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .login-view { padding: 16px; }
  .login-frame { min-height: 0; grid-template-columns: 1fr; }
  .login-intro { padding: 24px; }
  .login-intro-copy { padding: 36px 0 12px; }
  .login-intro-copy h2 { font-size: 28px; }
  .login-intro-copy > p:last-child { max-width: none; }
  .login-facts { display: none; }
  .login-panel-inner { max-width: 480px; padding: 32px 28px; }
  .login-footer { padding: 14px 24px; }
  .detail-header { flex-direction: column; }
  .detail-actions { width: 100%; }
}
@media (max-width: 600px) {
  .page-header { flex-wrap: wrap; gap: 14px; }
  .page-header h1 { font-size: 22px; }
  .page-header > .button, .page-actions { width: 100%; }
  .page-header > .button { align-self: flex-start; }
  .page-actions .button { flex: 1; }
  .panel-header { padding: 14px 16px; }
  .panel-header-actions { justify-content: flex-end; }
  .current-job-panel > #overview-job-content { padding: 16px; }
  .job-result-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .job-result-strip > button { grid-column: 1 / -1; justify-content: flex-start; min-height: 40px; border-top: 1px solid var(--border); }
  .progress-caption { flex-direction: column; gap: 3px; }
  .detail-header, .detail-section { padding-right: 16px; padding-left: 16px; }
  .detail-actions .button { flex: 1; }
  .logs-heading { flex-direction: column; }
  .log-actions { width: 100%; justify-content: flex-end; }
  .log-actions .check-label { margin-right: auto; }
  .accounts-section { padding-right: 0; padding-left: 0; }
  .accounts-section > .detail-section-heading { padding: 0 16px; }
  .security-note { display: none; }
  .config-section-header, .form-grid { padding-right: 16px; padding-left: 16px; }
  .config-action-bar { flex-direction: column; align-items: stretch; gap: 10px; }
  .config-action-bar > div { display: grid; grid-template-columns: 1fr 1fr; }
  .config-action-bar .button { width: 100%; }
  .metadata-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toast-region { top: 10px; right: 10px; width: calc(100% - 20px); }
}
@media (max-width: 480px) {
  .login-view { padding: 0; }
  .login-frame { min-height: 100vh; min-height: 100dvh; grid-template-rows: auto 1fr; border: 0; border-radius: 0; box-shadow: none; }
  .login-intro { padding: 20px; }
  .login-intro-copy { display: none; }
  .login-panel-inner { padding: 32px 20px; }
  .login-footer { padding: 14px 20px; }
  .stat-card { padding: 12px; }
  .stat-code { display: none; }
  .stat-value { font-size: 24px; }
  .stat-meta { font-size: 10px; }
  .sync-status { display: none; }
  .topbar-actions { gap: 4px; }
  .page-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .page-actions .button { padding-right: 8px; padding-left: 8px; }
  .panel-header { align-items: flex-start; }
  .panel-header > .panel-meta { padding-top: 3px; }
  .config-action-bar > div { grid-template-columns: 1fr; }
  .dialog form { padding: 20px; }
  .dialog-actions { flex-direction: column; }
  .dialog-actions .button { width: 100%; }
  .pagination { flex-wrap: wrap; }
}
@media (max-width: 359px) {
  .content { padding-right: 12px; padding-left: 12px; }
  .mobile-header, .topbar { padding-right: 12px; padding-left: 12px; }
  .stats-grid { gap: 8px; }
  .stat-card { padding: 10px; }
  .stat-icon { width: 28px; height: 28px; }
  .stat-value { font-size: 22px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .field-full { grid-column: auto; }
  .detail-actions { display: grid; grid-template-columns: 1fr; }
}
@media (pointer: coarse) {
  .button-small { min-height: 44px; }
  .icon-button, .log-actions .icon-button, .key-actions .icon-button { width: 44px; height: 44px; }
  .key-actions .icon-button { margin-top: -7px; margin-bottom: -7px; }
  .password-toggle { min-height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
@media (forced-colors: active) {
  .status-badge, .stat-flag, .save-state { border: 1px solid currentColor; }
  .status-dot, .unsaved-dot, .status-badge::before { forced-color-adjust: none; }
  .mobile-nav button[aria-current="page"]::before { background: currentColor; }
}
