:root {
  --bg: #f4f6fa;
  --surface: #fff;
  --surface-2: #f8fafc;
  --surface-3: #eef3f9;
  --ink: #182033;
  --muted: #687386;
  --muted-2: #8c96a7;
  --line: #dde3ec;
  --line-strong: #cbd4e1;
  --blue: #1769d2;
  --blue-dark: #1057b4;
  --blue-soft: #eaf2ff;
  --green: #14795d;
  --green-soft: #e3f5ee;
  --amber: #946200;
  --amber-soft: #fff3d3;
  --red: #b42318;
  --red-soft: #feecea;
  --violet: #6741c2;
  --violet-soft: #f0ebff;
  --shadow-sm: 0 1px 2px rgba(17, 31, 52, .04), 0 5px 18px rgba(17, 31, 52, .04);
  --shadow-md: 0 16px 42px rgba(17, 31, 52, .12);
  --radius: 13px;
  --sidebar: 216px;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); font-size: 14px; }
body { margin: 0; color: var(--ink); background: var(--bg); font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, .button, input, textarea, select { min-height: 44px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid rgba(23,105,210,.25); outline-offset: 2px; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 1000; padding: 9px 13px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.skip-link:focus { top: 12px; }

.app-frame { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 20px 14px 14px; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: #fbfcfe; }
.brand { height: 48px; padding: 0 8px; display: flex; align-items: center; gap: 11px; color: var(--ink); }
.brand-mark { width: 34px; height: 34px; display: grid; flex: 0 0 34px; place-items: center; color: #fff; border-radius: 10px; background: linear-gradient(145deg, #2179e4, #165bbd); box-shadow: 0 7px 16px rgba(23,105,210,.2); }
.brand-mark svg { width: 23px; height: 23px; }
.brand > span:last-child { display: grid; line-height: 1.25; }
.brand strong { font-size: 15px; letter-spacing: -.01em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.side-nav { margin-top: 26px; display: grid; gap: 5px; }
.side-nav a { min-height: 44px; padding: 0 11px; display: flex; align-items: center; gap: 11px; color: #536074; border-radius: 9px; font-weight: 600; }
.side-nav a:hover { color: var(--ink); background: var(--surface-3); }
.side-nav a.active { color: var(--blue); background: var(--blue-soft); }
.side-nav svg { width: 19px; height: 19px; }
.sidebar-note { margin: auto 6px 12px; padding: 11px; display: flex; align-items: center; gap: 9px; color: var(--muted); border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.sidebar-note div, .sidebar-user > div { min-width: 0; display: grid; line-height: 1.3; }
.sidebar-note strong { color: var(--ink); font-size: 12px; }
.sidebar-note small, .sidebar-user small { margin-top: 2px; font-size: 11px; }
.live-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #25a475; box-shadow: 0 0 0 4px rgba(37,164,117,.12); }
.sidebar-user { min-height: 54px; padding: 8px 7px; display: grid; grid-template-columns: 34px minmax(0,1fr) 36px; align-items: center; gap: 8px; border-top: 1px solid var(--line); }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; color: #31547b; border-radius: 10px; background: #e8eef6; font-weight: 750; }
.sidebar-user strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.sidebar-user small { color: var(--muted); }
.icon-button { width: 36px; min-height: 36px; padding: 0; display: inline-grid; place-items: center; color: var(--muted); border: 0; border-radius: 8px; background: transparent; cursor: pointer; }
.icon-button:hover { color: var(--ink); background: var(--surface-3); }
.icon-button svg { width: 18px; height: 18px; }

.workspace { min-width: 0; }
.mobile-bar { display: none; }
.content-shell { width: min(1220px, calc(100% - 44px)); margin: 0 auto; padding: 32px 0 64px; }
.notice { margin-bottom: 18px; padding: 11px 14px; display: flex; align-items: center; gap: 9px; color: #174f84; border: 1px solid #b8d4f4; border-radius: 10px; background: #edf6ff; box-shadow: var(--shadow-sm); }
.notice svg { width: 18px; height: 18px; flex: 0 0 18px; }
.page-heading { margin-bottom: 22px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.page-heading h1, .auth-card h1 { margin: 3px 0 3px; font-size: clamp(25px, 3vw, 30px); line-height: 1.2; letter-spacing: -.035em; }
.page-heading p, .section-heading p { margin: 0; color: var(--muted); }
.compact-heading { margin-bottom: 20px; }
.detail-heading { margin-top: 9px; }
.eyebrow { color: var(--blue); font-size: 11px; font-weight: 760; letter-spacing: .11em; text-transform: uppercase; }
.muted { color: var(--muted); }
.back-link { min-height: 36px; display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; font-weight: 620; }
.back-link:hover { color: var(--blue); }
.back-link svg { width: 17px; height: 17px; }

.panel { margin-bottom: 16px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.section-heading > div { display: flex; align-items: center; gap: 10px; }
.section-heading h2, .prompt-panel h2 { margin: 0; font-size: 16px; letter-spacing: -.01em; }
.section-heading small { color: var(--muted); }
.section-index { width: 27px; height: 27px; display: inline-grid; place-items: center; color: var(--blue); border-radius: 8px; background: var(--blue-soft); font-size: 11px; font-weight: 800; }
.form-stack { display: grid; gap: 17px; }
.form-stack.compact { align-content: start; }
label { display: grid; gap: 6px; color: #374257; font-size: 13px; font-weight: 650; }
input, textarea, select { width: 100%; padding: 9px 11px; color: var(--ink); border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); font-weight: 450; transition: border-color .15s ease, box-shadow .15s ease; }
input:hover, textarea:hover, select:hover { border-color: #abb8c8; }
input:focus, textarea:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,105,210,.1); outline: none; }
textarea { resize: vertical; line-height: 1.6; }
.helper { color: var(--muted); font-size: 12px; font-weight: 450; }
.field-block { display: grid; gap: 8px; }
.field-label-row { display: flex; justify-content: space-between; gap: 12px; }
.field-label-row label { display: block; }
.field-label-row span { color: var(--muted); font-size: 12px; }
.form-grid { display: grid; grid-template-columns: minmax(0,1fr) 156px; gap: 14px; }
.preset-toolbar { display: grid; grid-template-columns: minmax(160px, 1fr) auto auto; gap: 8px; }
.preset-toolbar select { min-height: 38px; }
.composer-grid { display: grid; grid-template-columns: minmax(0, 1fr) 272px; align-items: start; gap: 18px; }
.composer-main { min-width: 0; }
.composer-aside { position: sticky; top: 24px; }
.guidance-card { overflow: hidden; background: linear-gradient(160deg, #fff 45%, #f3f7fd); }
.guidance-icon { width: 38px; height: 38px; display: grid; place-items: center; color: var(--blue); border-radius: 11px; background: var(--blue-soft); }
.guidance-icon svg { width: 22px; height: 22px; }
.guidance-card h2 { margin: 15px 0 6px; font-size: 16px; }
.guidance-card > p { margin: 0; color: var(--muted); font-size: 13px; }
.guidance-card ol { margin: 18px 0 0; padding: 0; display: grid; gap: 13px; list-style: none; }
.guidance-card li { display: flex; align-items: center; gap: 9px; color: #4a5669; font-size: 12px; }
.guidance-card li span { width: 23px; height: 23px; display: grid; flex: 0 0 23px; place-items: center; color: var(--blue); border: 1px solid #bcd3ef; border-radius: 50%; background: #fff; font-size: 11px; font-weight: 700; }
.mini-note { padding: 15px; color: #4d5b6f; border: 1px solid var(--line); border-radius: var(--radius); background: #eef3f8; }
.mini-note strong { font-size: 12px; }
.mini-note p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

.button { min-height: 42px; padding: 9px 14px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; color: var(--ink); border: 1px solid transparent; border-radius: 9px; background: transparent; cursor: pointer; font-weight: 680; line-height: 1.2; transition: background .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.button svg { width: 18px; height: 18px; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: #fff; background: var(--blue); box-shadow: 0 5px 13px rgba(23,105,210,.15); }
.button.primary:hover { background: var(--blue-dark); }
.button.secondary { color: #364154; border-color: var(--line-strong); background: var(--surface); }
.button.secondary:hover, .button.ghost:hover { border-color: #aeb9c8; background: var(--surface-2); }
.button.ghost { color: #465268; border-color: transparent; background: transparent; }
.button.warning { color: #fff; background: #a86d00; }
.button.danger { color: #fff; background: var(--red); }
.button.danger.ghost { color: var(--red); border-color: #efbeb9; background: #fff9f8; }
.button.small { min-height: 36px; padding: 7px 10px; font-size: 12px; }
.button.full { width: 100%; }
.button:disabled { opacity: .46; cursor: not-allowed; transform: none; box-shadow: none; }
.link-button { min-height: 34px; padding: 4px 0; color: var(--blue); border: 0; background: transparent; cursor: pointer; font-weight: 650; }
.inline-form { display: inline; }
.action-row, .form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.form-actions { justify-content: flex-end; }
.form-actions.left { justify-content: flex-start; margin-top: 13px; }
.detail-actions { margin-bottom: 14px; justify-content: flex-end; }

.step-rail { margin-bottom: 16px; padding: 12px 17px; display: grid; grid-template-columns: auto minmax(24px,1fr) auto minmax(24px,1fr) auto; align-items: center; gap: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.7); }
.step-rail > div { display: flex; align-items: center; gap: 8px; }
.step-rail > div > span { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; background: #fff; font-size: 11px; font-weight: 750; }
.step-rail > div > div { display: grid; line-height: 1.25; }
.step-rail strong { color: #526075; font-size: 12px; }
.step-rail small { margin-top: 2px; font-size: 10px; }
.step-rail .active > span { color: #fff; border-color: var(--blue); background: var(--blue); }
.step-rail .active strong { color: var(--ink); }
.step-rail i { height: 1px; background: var(--line); }
.drop-zone { min-height: 142px; padding: 18px; display: grid; grid-template-columns: 44px minmax(0,1fr) auto; align-items: center; gap: 14px; border: 1.5px dashed #aab7c9; border-radius: 11px; background: var(--surface-2); cursor: pointer; }
.drop-zone:hover, .drop-zone.is-dragging { border-color: var(--blue); background: #f3f8ff; box-shadow: inset 0 0 0 1px rgba(23,105,210,.08); }
.drop-zone.has-file { border-style: solid; border-color: #9fc5ef; background: #f4f9ff; }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.drop-icon { width: 44px; height: 44px; display: grid; place-items: center; color: var(--blue); border-radius: 12px; background: var(--blue-soft); }
.drop-icon svg { width: 23px; height: 23px; }
.drop-copy { min-width: 0; display: grid; gap: 3px; }
.drop-copy strong { color: var(--ink); font-size: 14px; }
.drop-copy small { color: var(--muted); font-size: 12px; font-weight: 450; }
.file-chip { max-width: 225px; padding: 7px 10px; overflow: hidden; color: var(--muted); border: 1px solid var(--line); border-radius: 8px; background: #fff; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 600; }
.drop-zone.has-file .file-chip { color: #17548b; border-color: #bfd6ef; }
.field-error { padding: 9px 11px; color: var(--red); border: 1px solid #f0c2bd; border-radius: 8px; background: var(--red-soft); font-size: 12px; }
.field-error.success-message { color: var(--green); border-color: #afd9ca; background: var(--green-soft); }
.folder-example { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; color: var(--muted); font-size: 12px; }
.folder-example code { padding: 6px 8px; color: #3e4d62; border-radius: 7px; background: var(--surface-3); }
.upload-progress { padding: 12px 14px; border: 1px solid #bcd5ef; border-radius: 10px; background: #f3f8ff; }
.upload-progress > div { margin-bottom: 7px; display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; }
.upload-progress progress { width: 100%; height: 8px; display: block; accent-color: var(--blue); }

.launch-console { margin-bottom: 23px; padding: 17px 18px; display: grid; grid-template-columns: minmax(300px,1fr) auto auto; align-items: center; gap: 24px; color: #3e4b60; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); }
.launch-console.has-ready { border-color: #b6cfea; background: linear-gradient(110deg, #f7fbff, #fff 62%); box-shadow: 0 8px 25px rgba(26,86,151,.08); }
.launch-primary { display: flex; align-items: center; gap: 13px; }
.launch-icon { width: 42px; height: 42px; display: grid; flex: 0 0 42px; place-items: center; color: var(--blue); border-radius: 12px; background: var(--blue-soft); }
.launch-icon svg { width: 22px; height: 22px; }
.launch-primary h2 { margin: 2px 0 1px; color: var(--ink); font-size: 18px; letter-spacing: -.02em; }
.launch-primary p { margin: 0; color: var(--muted); font-size: 12px; }
.queue-stats { display: flex; gap: 19px; }
.queue-stats span { display: grid; color: var(--muted); text-align: center; font-size: 11px; }
.queue-stats strong { color: var(--ink); font-size: 18px; font-variant-numeric: tabular-nums; }
.launch-button { min-width: 124px; }
.list-heading { margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
.list-heading > div { display: flex; align-items: center; gap: 8px; }
.list-heading h2 { margin: 0; font-size: 16px; }
.list-heading span { color: var(--muted); font-size: 12px; }
.list-heading small { color: var(--muted); }
.batch-list { display: grid; gap: 10px; }
.batch-row { padding: 15px 17px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-sm); transition: border-color .15s ease, box-shadow .15s ease; }
.batch-row:hover { border-color: #c0cad8; box-shadow: 0 7px 22px rgba(17,31,52,.07); }
.batch-status-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.batch-status-line time { color: var(--muted-2); font-size: 11px; }
.batch-main { margin-top: 9px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 20px; }
.batch-main h3 { margin: 0; font-size: 15px; }
.batch-main h3 a { color: var(--ink); }
.batch-main h3 a:hover { color: var(--blue); }
.batch-main p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.batch-metrics { display: flex; gap: 22px; }
.batch-metrics span { display: grid; min-width: 42px; color: var(--muted); text-align: right; font-size: 10px; }
.batch-metrics strong { color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.danger-text strong { color: var(--red); }
.batch-progress { height: 3px; margin: 12px 0 10px; overflow: hidden; border-radius: 5px; background: #edf0f4; }
.batch-progress i { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, var(--blue), #42a0e7); }
.batch-footer { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.prompt-excerpt { min-width: 0; margin: 0; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.download-button { color: var(--blue); }

.status { min-height: 24px; padding: 3px 8px; display: inline-flex; align-items: center; color: #536074; border-radius: 999px; background: #edf0f4; font-size: 11px; font-weight: 740; white-space: nowrap; }
.status.large { min-height: 30px; padding: 5px 10px; font-size: 12px; }
.status-preview { color: var(--violet); background: var(--violet-soft); }
.status-ready { color: #245ba5; background: #e4efff; }
.status-pending, .status-queued { color: var(--amber); background: var(--amber-soft); }
.status-running { color: #175b98; background: #e1f1ff; }
.status-completed { color: var(--green); background: var(--green-soft); }
.status-failed, .status-partial_failed { color: var(--red); background: var(--red-soft); }
.status-cancelled { color: #697386; background: #edf0f4; }
.preview-console, .staged-banner, .download-panel { margin-bottom: 15px; padding: 17px 19px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid #b9d1ec; border-radius: 13px; background: linear-gradient(115deg, #f3f8ff, #fff); box-shadow: var(--shadow-sm); }
.preview-console > div, .staged-banner > div, .download-panel > div { display: flex; align-items: center; gap: 12px; }
.preview-console h2 { margin: 2px 0; font-size: 17px; }
.preview-console p, .staged-banner p, .download-panel p { margin: 0; color: var(--muted); font-size: 12px; }
.staged-banner svg, .download-panel svg { width: 27px; height: 27px; flex: 0 0 27px; color: var(--blue); }
.staged-banner strong, .download-panel strong { font-size: 14px; }
.summary-strip { margin-bottom: 14px; display: grid; grid-template-columns: repeat(6,1fr); gap: 9px; }
.summary-strip div { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 1px 2px rgba(17,31,52,.03); }
.summary-strip span { display: block; color: var(--muted); font-size: 11px; }
.summary-strip strong { font-size: 19px; font-variant-numeric: tabular-nums; }
.table-wrap { margin-bottom: 16px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-sm); }
.table-wrap.flush { margin: 0; border-width: 1px 0; border-radius: 0; box-shadow: none; }
table { width: 100%; min-width: 720px; border-collapse: collapse; }
th, td { padding: 11px 12px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
th { color: #566276; background: var(--surface-2); font-size: 11px; letter-spacing: .025em; }
td { font-size: 12px; }
tbody tr:last-child td { border-bottom: 0; }
.check-col { width: 48px; }
input[type="checkbox"] { width: 18px; min-height: 18px; }
.message-cell { max-width: 330px; color: var(--muted); font-size: 11px; }
.empty-cell { padding: 28px; text-align: center; color: var(--muted); }
.thumb { width: 52px; height: 68px; display: block; object-fit: cover; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-3); }
.result-thumb { display: inline-block; }
.prompt-panel { padding: 0; overflow: hidden; }
.prompt-panel summary, .compact-details summary { min-height: 46px; padding: 12px 16px; display: flex; align-items: center; cursor: pointer; font-weight: 650; }
.prompt-panel p { margin: 0; padding: 0 16px 16px; color: #4d596d; white-space: pre-wrap; font-size: 12px; }
.compact-details ul { margin-bottom: 0; color: var(--muted); }

.health-grid { margin-bottom: 16px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.health-card { min-height: 122px; padding: 15px; display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: var(--shadow-sm); }
.health-card.ok { border-top: 3px solid var(--green); }
.health-card.blocked { border-top: 3px solid var(--amber); }
.health-card span, .health-card small { color: var(--muted); font-size: 11px; }
.health-card strong { font-size: 15px; }
.account-layout { display: grid; grid-template-columns: minmax(250px,330px) 1fr; gap: 22px; }
.account-list { display: grid; gap: 9px; }
.account-list article { padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.account-list article > div:first-child { margin-bottom: 8px; display: flex; flex-direction: column; }
.account-list article span { color: var(--muted); font-size: 11px; }
.password-row { margin-top: 8px; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.password-row input { min-height: 38px; }
.empty-state { padding: 60px 22px; text-align: center; border: 1px dashed #acb8c8; border-radius: 13px; background: rgba(255,255,255,.65); }
.empty-state h2 { margin: 12px 0 4px; font-size: 17px; }
.empty-state p { margin: 0 0 17px; color: var(--muted); }
.empty-icon { width: 43px; height: 43px; display: inline-grid; place-items: center; color: var(--blue); border-radius: 12px; background: var(--blue-soft); }

.workbench-banner { margin: -10px 0 22px; padding: 15px 18px 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(120deg, #fff, #f4f8fd); box-shadow: var(--shadow-sm); }
.workbench-banner h1 { margin: 0; font-size: 18px; letter-spacing: -.025em; }
.workbench-banner p { margin: 3px 0 15px; color: var(--muted); font-size: 11px; }
.mode-tabs { align-self: stretch; display: flex; align-items: flex-end; gap: 2px; }
.mode-tabs a { min-width: 96px; min-height: 46px; padding: 13px 15px 11px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); border-bottom: 3px solid transparent; font-size: 12px; font-weight: 720; }
.mode-tabs a:hover { color: var(--ink); }
.mode-tabs a.active { color: var(--blue); border-bottom-color: var(--blue); }
.module-heading { margin-bottom: 15px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.module-heading h2 { margin: 2px 0 1px; font-size: 24px; letter-spacing: -.035em; }
.module-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.detail-module-heading { margin-top: 5px; align-items: center; }

.queue-command { margin-bottom: 12px; padding: 15px 16px; display: grid; grid-template-columns: 42px minmax(220px, 1fr) auto auto; align-items: center; gap: 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); }
.queue-command.has-ready { border-color: #b9d1ec; background: linear-gradient(110deg, #f4f9ff, #fff 64%); }
.queue-command.is-paused { border-color: #ead3a1; background: linear-gradient(110deg, #fffaf0, #fff 64%); }
.queue-state-icon { width: 42px; height: 42px; display: grid; place-items: center; color: var(--blue); border-radius: 11px; background: var(--blue-soft); }
.queue-command.is-paused .queue-state-icon { color: var(--amber); background: var(--amber-soft); }
.queue-state-copy h3 { margin: 1px 0; font-size: 16px; letter-spacing: -.02em; }
.queue-state-copy p { margin: 0; color: var(--muted); font-size: 11px; }
.queue-kpis { display: flex; gap: 14px; }
.queue-kpis span { min-width: 38px; display: grid; color: var(--muted); text-align: center; font-size: 10px; }
.queue-kpis strong { color: var(--ink); font-size: 17px; font-variant-numeric: tabular-nums; }
.queue-command-actions { display: flex; align-items: center; gap: 6px; }
.queue-command-actions form { margin: 0; }
.runtime-overview { margin-bottom: 16px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.runtime-status { min-height: 52px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.75); }
.runtime-status > div { min-width: 0; display: grid; }
.runtime-status strong { font-size: 11px; }
.runtime-status small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.signal { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--muted-2); box-shadow: 0 0 0 4px rgba(140,150,167,.1); }
.signal.ok { background: var(--green); box-shadow: 0 0 0 4px rgba(20,121,93,.1); }
.signal.blocked { background: #d58b00; box-shadow: 0 0 0 4px rgba(213,139,0,.11); }

.queue-panel, .runtime-log-panel { margin-bottom: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); }
.queue-panel-header, .runtime-log-panel > header { min-height: 66px; padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); background: #fbfcfe; }
.queue-panel-header > div { display: flex; align-items: baseline; gap: 8px; }
.queue-panel-header h2, .runtime-log-panel h2 { margin: 0; font-size: 15px; }
.queue-panel-header span, .runtime-log-panel p { margin: 0; color: var(--muted); font-size: 11px; }
.queue-filters { display: grid; grid-template-columns: minmax(180px, 270px) 170px auto; align-items: center; gap: 7px; }
.queue-filters select, .queue-filters input, .log-tools select { min-height: 36px; padding-top: 7px; padding-bottom: 7px; font-size: 12px; }
.search-field { position: relative; display: block; }
.search-field svg { position: absolute; left: 10px; top: 9px; width: 17px; height: 17px; color: var(--muted); }
.search-field input { padding-left: 34px; }
.selection-toolbar { min-height: 47px; padding: 7px 14px; display: flex; align-items: center; gap: 13px; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--surface-2); font-size: 11px; }
.check-label { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 650; }
.selection-spacer { flex: 1; }
.app-queue-list { display: grid; }
.app-task-card { padding: 14px 16px; display: grid; grid-template-columns: 25px minmax(0,1fr); gap: 8px; border-bottom: 1px solid var(--line); transition: background .15s ease; }
.app-task-card:last-child { border-bottom: 0; }
.app-task-card:hover { background: #fbfdff; }
.task-select { padding-top: 2px; }
.task-card-body { min-width: 0; }
.task-card-top { display: flex; justify-content: space-between; gap: 12px; }
.task-card-top time { color: var(--muted-2); font-size: 10px; }
.task-card-main { margin-top: 8px; display: grid; grid-template-columns: minmax(180px,1fr) auto; align-items: center; gap: 18px; }
.task-identity h3 { margin: 0; font-size: 14px; }
.task-identity p { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.task-card-counts { display: flex; gap: 16px; }
.task-card-counts span { min-width: 38px; display: grid; color: var(--muted); text-align: right; font-size: 9px; }
.task-card-counts strong { color: var(--ink); font-size: 14px; font-variant-numeric: tabular-nums; }
.task-meta-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 6px; }
.task-meta-grid span { color: #4a5669; font-size: 10px; }
.task-meta-grid small { display: block; color: var(--muted-2); font-size: 9px; }
.task-card-bottom { margin-top: 10px; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px dashed #e1e6ee; }
.task-card-bottom .prompt-excerpt { flex: 1; }
.task-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.expiry-note { color: var(--muted); font-size: 10px; }
.queue-footer-actions { padding: 10px 14px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); background: var(--surface-2); }
.queue-footer-actions form { margin: 0; }

.runtime-log-panel > header > div:first-child { display: grid; }
.log-tools { display: flex; align-items: center; gap: 7px; }
.log-tools form { margin: 0; }
.runtime-log { max-height: 340px; overflow: auto; background: #111925; color: #dce4ef; font-family: "SF Mono", Menlo, Consolas, monospace; }
.log-line { min-height: 38px; padding: 8px 12px; display: grid; grid-template-columns: 132px 48px minmax(0,1fr); align-items: start; gap: 9px; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 10px; }
.log-line time { color: #7f8da1; font-variant-numeric: tabular-nums; }
.log-line p { margin: 0; color: #d7e0ec; font-size: 10px; overflow-wrap: anywhere; }
.log-line strong { color: #fff; }
.log-kind { color: #86b9f5; font-weight: 700; }
.log-task_failed .log-kind, .log-dispatcher_error .log-kind, .log-archive_error .log-kind { color: #ff9e96; }
.log-task_completed .log-kind, .log-result_archived .log-kind { color: #6fd7b4; }
.log-empty { padding: 28px; color: #8b98aa; text-align: center; font-size: 11px; }
.detail-timebar { margin-bottom: 10px; padding: 10px 13px; display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.detail-timebar div { display: grid; }
.detail-timebar small { color: var(--muted); font-size: 9px; }
.detail-timebar strong { font-size: 11px; font-weight: 650; }
.task-selection-toolbar { border: 1px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; }
.task-detail-table small { color: var(--muted); font-size: 10px; }
.download-panel.expired { border-color: var(--line); background: var(--surface-2); }
.detail-log-panel { margin-top: 16px; }
.status-expired { color: #697386; background: #edf0f4; }

.preset-dialog { width: min(800px, calc(100% - 30px)); padding: 0; overflow: hidden; color: var(--ink); border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow-md); }
.preset-dialog::backdrop { background: rgba(20,30,48,.4); backdrop-filter: blur(3px); }
.dialog-title { padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.dialog-title h2 { margin: 2px 0 0; font-size: 18px; }
.preset-manager { min-height: 420px; display: grid; grid-template-columns: 220px minmax(0,1fr); }
.preset-manager > aside { padding: 14px; border-right: 1px solid var(--line); background: var(--surface-2); }
.preset-list { margin-top: 10px; display: grid; gap: 5px; }
.preset-list button { min-height: 42px; padding: 8px 9px; overflow: hidden; color: #475468; border: 1px solid transparent; border-radius: 8px; background: transparent; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.preset-list button:hover, .preset-list button.active { color: var(--blue); border-color: #c9ddf4; background: #eef6ff; }
.preset-list-empty { padding: 18px 5px; color: var(--muted); text-align: center; font-size: 12px; }
.preset-editor { padding: 18px; display: grid; align-content: start; gap: 13px; }
.dialog-actions { display: grid; grid-template-columns: auto 1fr auto auto; gap: 8px; align-items: center; }

.auth-shell { min-height: 100vh; padding: 28px; display: grid; place-items: center; background: radial-gradient(circle at 20% 10%, #e7f0fc, transparent 34%), var(--bg); }
.auth-card { width: min(420px, 100%); padding: 28px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: var(--shadow-md); }
.auth-card > p { margin: 0 0 20px; }
.auth-card .form-stack { margin-top: 18px; }

@media (max-width: 1040px) {
  .composer-grid { grid-template-columns: minmax(0,1fr) 240px; }
  .launch-console { grid-template-columns: minmax(270px,1fr) auto; gap: 16px; }
  .launch-console form { grid-column: 1 / -1; }
  .launch-button { width: 100%; }
  .summary-strip { grid-template-columns: repeat(3,1fr); }
  .queue-command { grid-template-columns: 42px minmax(200px,1fr) auto; }
  .queue-command-actions { grid-column: 2 / -1; justify-content: flex-end; }
  .task-meta-grid { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 850px) {
  .app-frame { display: block; }
  .sidebar { display: none; }
  .mobile-bar { height: 58px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(10px); }
  .mobile-brand { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 750; }
  .mobile-brand .brand-mark { width: 28px; height: 28px; flex-basis: 28px; }
  .mobile-bar nav { display: flex; gap: 4px; }
  .mobile-bar nav a { min-height: 36px; padding: 8px 10px; color: var(--muted); border-radius: 8px; }
  .mobile-bar nav a:hover { background: var(--surface-3); }
  .content-shell { width: min(100% - 30px, 1220px); padding-top: 24px; }
  .composer-grid { grid-template-columns: 1fr; }
  .composer-aside { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .health-grid { grid-template-columns: 1fr; }
  .account-layout { grid-template-columns: 1fr; }
  .workbench-banner { margin-top: 0; }
  .queue-panel-header { align-items: stretch; flex-direction: column; }
  .queue-filters { grid-template-columns: minmax(0,1fr) 160px auto; }
  .runtime-overview { grid-template-columns: 1fr; }
  .task-card-main { grid-template-columns: 1fr; }
  .task-card-counts span { text-align: left; }
}
@media (max-width: 620px) {
  html { font-size: 14px; }
  input, textarea, select { font-size: 16px; }
  .content-shell { width: min(100% - 22px,1220px); padding: 18px 0 44px; }
  .page-heading, .preview-console, .staged-banner, .download-panel { align-items: stretch; flex-direction: column; }
  .page-heading .button, .preview-console .button, .download-panel .button { width: 100%; }
  .page-heading h1 { font-size: 26px; }
  .panel { padding: 16px; }
  .form-grid, .preset-toolbar { grid-template-columns: 1fr; }
  .preset-toolbar { grid-template-columns: 1fr 1fr; }
  .preset-toolbar select { grid-column: 1 / -1; }
  .composer-aside { display: block; }
  .step-rail { grid-template-columns: repeat(3,1fr); gap: 5px; }
  .step-rail i { display: none; }
  .step-rail > div { justify-content: center; }
  .step-rail > div > div small { display: none; }
  .drop-zone { grid-template-columns: 40px minmax(0,1fr); }
  .file-chip { max-width: none; grid-column: 1 / -1; }
  .launch-console { grid-template-columns: 1fr; }
  .queue-stats { justify-content: space-around; }
  .launch-console form { grid-column: auto; }
  .batch-main { grid-template-columns: 1fr; }
  .batch-metrics { justify-content: flex-start; }
  .batch-metrics span { text-align: left; }
  .batch-footer { align-items: stretch; flex-direction: column; }
  .prompt-excerpt { white-space: normal; }
  .batch-footer .action-row { justify-content: flex-end; }
  .summary-strip { grid-template-columns: repeat(2,1fr); }
  .preset-dialog { width: calc(100% - 18px); }
  .preset-manager { grid-template-columns: 1fr; }
  .preset-manager > aside { border-right: 0; border-bottom: 1px solid var(--line); }
  .preset-list { max-height: 150px; overflow-y: auto; }
  .dialog-actions { grid-template-columns: 1fr 1fr; }
  .dialog-actions span { display: none; }
  .workbench-banner { padding: 14px 14px 0; align-items: stretch; flex-direction: column; gap: 0; }
  .workbench-banner p { margin-bottom: 8px; }
  .mode-tabs a { flex: 1; min-width: 0; }
  .module-heading { align-items: stretch; flex-direction: column; }
  .module-heading .button { width: 100%; }
  .queue-command { grid-template-columns: 42px minmax(0,1fr); }
  .queue-kpis, .queue-command-actions { grid-column: 1 / -1; justify-content: space-around; flex-wrap: wrap; }
  .queue-command-actions form, .queue-command-actions .button { flex: 1; }
  .queue-filters { grid-template-columns: 1fr; }
  .task-card-main { gap: 10px; }
  .task-card-counts { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
  .task-meta-grid { grid-template-columns: repeat(2,1fr); }
  .task-card-bottom { align-items: stretch; flex-direction: column; }
  .task-actions { justify-content: flex-start; }
  .selection-toolbar { flex-wrap: wrap; }
  .log-line { grid-template-columns: 1fr auto; }
  .log-line p { grid-column: 1 / -1; }
  .detail-timebar { grid-template-columns: repeat(2,1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
