:root {
    --bg: #f3f5f8;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --text: #111827;
    --muted: #667085;
    --border: #e5e9ef;
    --primary: #111827;
    --accent: #ff3158;
    --success: #0f9f6e;
    --warning: #b7791f;
    --danger: #c92a3d;
    --shadow: 0 18px 45px rgba(17, 24, 39, .08);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); min-height: 100vh; }
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }
.topbar { height: 76px; padding: 0 max(24px, calc((100vw - 1240px)/2)); display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--border); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--primary); color: white; font-size: 21px; box-shadow: 0 8px 20px rgba(17,24,39,.2); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: -.01em; }
.brand small { color: var(--muted); font-size: 12px; margin-top: 2px; }
.page-shell { width: min(1240px, calc(100% - 32px)); margin: 0 auto; padding: 54px 0 36px; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
.hero h1 { max-width: 770px; margin: 8px 0 13px; font-size: clamp(32px, 4.3vw, 58px); line-height: 1.02; letter-spacing: -.055em; }
.hero p { color: var(--muted); max-width: 680px; line-height: 1.7; margin: 0; font-size: 16px; }
.eyebrow { font-size: 11px; letter-spacing: .16em; font-weight: 800; color: var(--accent); }
.health-badge { white-space: nowrap; padding: 11px 14px; border-radius: 999px; background: white; border: 1px solid var(--border); font-size: 12px; font-weight: 700; display: flex; gap: 8px; align-items: center; box-shadow: 0 8px 25px rgba(17,24,39,.04); }
.health-badge span { width: 8px; height: 8px; border-radius: 50%; background: #aab2bf; }
.health-badge.healthy span { background: var(--success); box-shadow: 0 0 0 5px rgba(15,159,110,.12); }
.health-badge.unhealthy span { background: var(--danger); box-shadow: 0 0 0 5px rgba(201,42,61,.12); }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(320px, .75fr); gap: 24px; align-items: start; }
.card { background: var(--surface); border: 1px solid rgba(229,233,239,.95); border-radius: 22px; box-shadow: var(--shadow); }
.composer-card { padding: 26px; }
.status-card { padding: 24px; position: sticky; top: 100px; }
.field-label, label { display: block; font-size: 13px; font-weight: 700; }
input[type="url"], input[type="password"], input[type="text"], select { width: 100%; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-2); min-height: 48px; padding: 0 15px; color: var(--text); outline: none; transition: .18s; }
input:focus, select:focus { border-color: #9aa5b4; background: white; box-shadow: 0 0 0 4px rgba(17,24,39,.06); }
.url-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 9px; }
.button { border: 0; min-height: 44px; padding: 0 18px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; cursor: pointer; transition: .18s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.button.primary { color: white; background: var(--primary); box-shadow: 0 10px 22px rgba(17,24,39,.16); }
.button.secondary { color: white; background: var(--accent); }
.button.ghost { background: white; border: 1px solid var(--border); color: var(--text); }
.button.small { min-height: 36px; padding: 0 14px; }
.button.full { width: 100%; }
.form-options { margin-top: 17px; display: grid; grid-template-columns: 170px 1fr; align-items: end; gap: 18px; }
.form-options select { margin-top: 7px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; color: #3f4855; line-height: 1.45; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); flex: 0 0 auto; }
.legal-check { min-height: 48px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-2); }
.check.compact { font-size: 12px; white-space: nowrap; }
.alert { padding: 13px 15px; border-radius: 12px; margin-top: 18px; font-size: 13px; line-height: 1.5; border: 1px solid transparent; }
.alert.error { color: #8d1730; background: #fff0f3; border-color: #ffd5de; }
.alert.warning { color: #7b5311; background: #fff9e8; border-color: #fae7ad; }
.alert.success { color: #087a53; background: #ecfdf5; border-color: #b8f2d8; }
.hidden { display: none !important; }
.preview { margin-top: 26px; border-top: 1px solid var(--border); padding-top: 22px; }
.preview-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.preview-head small, .status-head small { font-weight: 800; letter-spacing: .12em; color: var(--muted); font-size: 10px; }
.preview h2, .status-card h2 { margin: 5px 0 3px; font-size: 20px; letter-spacing: -.025em; }
.preview-head p { margin: 0; color: var(--muted); font-size: 12px; }
.entries { margin-top: 16px; max-height: 470px; overflow: auto; border: 1px solid var(--border); border-radius: 15px; }
.entry { display: grid; grid-template-columns: 20px 96px 1fr; gap: 12px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--border); cursor: pointer; }
.entry:last-child { border-bottom: 0; }
.entry:hover { background: var(--surface-2); }
.entry input { width: 17px; height: 17px; accent-color: var(--primary); }
.entry img { width: 96px; height: 54px; border-radius: 8px; object-fit: cover; background: #e9edf2; }
.entry-copy { min-width: 0; }
.entry-copy strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry-copy small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.preview-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; }
.preview-footer span { color: var(--muted); font-size: 12px; font-weight: 700; }
.status-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; }
.pill { padding: 7px 10px; border-radius: 999px; background: #eef1f5; color: #5b6472; font-size: 10px; text-transform: uppercase; font-weight: 900; letter-spacing: .08em; }
.pill.running, .pill.queued { background: #fff3d5; color: #8b5b00; }
.pill.complete { background: #dcfce7; color: #087a53; }
.pill.failed { background: #ffe4e8; color: #9e2037; }
.empty-status { min-height: 240px; display: grid; place-content: center; text-align: center; color: var(--muted); }
.empty-status span { width: 54px; height: 54px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: 24px; margin: 0 auto 8px; }
.empty-status p { margin: 0; font-size: 13px; }
.job-status { padding: 26px 0 8px; }
.job-status h3 { margin: 0; font-size: 16px; line-height: 1.35; }
.job-status > p { margin: 8px 0 18px; color: var(--muted); font-size: 12px; line-height: 1.5; min-height: 18px; }
.progress-track { height: 9px; background: #edf0f4; border-radius: 999px; overflow: hidden; }
.progress-track div { width: 0; height: 100%; background: linear-gradient(90deg, var(--primary), #465467); border-radius: inherit; transition: width .35s; }
.progress-meta { display: flex; justify-content: space-between; margin: 8px 0 18px; font-size: 11px; color: var(--muted); }
.progress-meta strong { color: var(--text); }
.job-status .button + .button { margin-top: 9px; }
.status-card hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
.info-list { display: grid; gap: 12px; }
.info-list div { display: flex; justify-content: space-between; gap: 16px; font-size: 12px; }
.info-list span { color: var(--muted); }
.info-list strong { font-weight: 800; }
.legal-note { margin: 22px 2px 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.install-body { display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top, #ffffff 0, #f3f5f8 42%, #edf0f4 100%); }
.install-shell { width: min(460px, 100%); }
.install-card { padding: 30px; }
.install-card h1 { margin: 26px 0 8px; font-size: 28px; letter-spacing: -.04em; }
.install-card .muted { color: var(--muted); font-size: 13px; line-height: 1.6; }
.install-card form { margin-top: 20px; display: grid; gap: 15px; }
.install-card label input { margin-top: 7px; }
.install-card details { border: 1px solid var(--border); border-radius: 13px; padding: 12px 14px; }
.install-card summary { cursor: pointer; font-weight: 800; font-size: 13px; }
.install-card details label { margin-top: 13px; }
@media (max-width: 900px) {
    .hero { align-items: flex-start; flex-direction: column; }
    .grid-main { grid-template-columns: 1fr; }
    .status-card { position: static; }
}
@media (max-width: 620px) {
    .page-shell { width: min(100% - 20px, 1240px); padding-top: 30px; }
    .topbar { padding: 0 14px; }
    .brand small { display: none; }
    .composer-card, .status-card { padding: 18px; border-radius: 17px; }
    .url-row { grid-template-columns: 1fr; }
    .form-options { grid-template-columns: 1fr; }
    .entry { grid-template-columns: 20px 74px 1fr; gap: 9px; }
    .entry img { width: 74px; height: 43px; }
    .preview-footer { align-items: stretch; flex-direction: column; }
    .preview-footer .button { width: 100%; }
}

/* V1.1.0 multi-job queue */
.health-badge.warning span { background: var(--warning); box-shadow: 0 0 0 5px rgba(183,121,31,.12); }
.queue-card { max-height: calc(100vh - 118px); overflow: hidden; display: flex; flex-direction: column; }
.worker-state { margin-top: 18px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; background: var(--surface-2); }
.worker-state .worker-dot { width: 9px; height: 9px; border-radius: 50%; background: #aab2bf; }
.worker-state.online .worker-dot { background: var(--success); box-shadow: 0 0 0 5px rgba(15,159,110,.12); }
.worker-state.offline .worker-dot { background: var(--danger); box-shadow: 0 0 0 5px rgba(201,42,61,.1); }
.worker-state strong, .worker-state small { display: block; }
.worker-state strong { font-size: 12px; }
.worker-state small { color: var(--muted); font-size: 10px; line-height: 1.45; margin-top: 3px; }
.button.tiny { min-height: 30px; padding: 0 10px; font-size: 10px; border-radius: 9px; }
.queue-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0; }
.queue-stats div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 9px 6px; text-align: center; }
.queue-stats strong, .queue-stats span { display: block; }
.queue-stats strong { font-size: 16px; }
.queue-stats span { color: var(--muted); font-size: 9px; margin-top: 2px; }
.compact-empty { min-height: 150px; }
.jobs-list { display: grid; gap: 10px; overflow-y: auto; overflow-x: hidden; padding-right: 4px; min-height: 0; }
.job-card { border: 1px solid var(--border); border-radius: 15px; padding: 13px; background: white; overflow: hidden; min-width: 0; }
.job-card.running { border-color: #f1d99d; background: #fffdf7; }
.job-card.complete { border-color: #bfe9d3; background: #fbfffd; }
.job-card.failed { border-color: #f2c4ce; background: #fffafb; }
.job-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.job-card-head > div { min-width: 0; }
.job-card h3 { margin: 0; font-size: 13px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job-card-head small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.job-card-message { margin: 10px 0; color: var(--muted); font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
.job-card .progress-track { height: 7px; }
.job-card .progress-meta { margin-bottom: 0; gap: 8px; min-width: 0; }
.job-card .progress-meta span { min-width: 0; text-align: right; overflow-wrap: anywhere; }
.job-actions { display: flex; gap: 8px; margin-top: 10px; }
.button.small-action { min-height: 34px; padding: 0 12px; font-size: 10px; flex: 1; }
.queue-help { margin-top: 20px; padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); display: grid; gap: 5px; }
.queue-help strong { font-size: 12px; }
.queue-help span { color: var(--muted); font-size: 11px; line-height: 1.55; }
@media (max-width: 900px) {
    .queue-card { max-height: none; }
    .jobs-list { max-height: 650px; }
}
@media (max-width: 620px) {
    .queue-stats { grid-template-columns: repeat(2, 1fr); }
    .worker-state { grid-template-columns: 10px 1fr; }
    .worker-state .button { grid-column: 1 / -1; width: 100%; }
}

/* V1.2.0 Windows Local Worker */
.pill.uploading { background: #e8efff; color: #3457a4; }
.job-card.uploading { border-color: #bfcdf2; background: #fbfcff; }
.job-card.uploading .progress-track div { background: linear-gradient(90deg, #5875bd, #354f8d); }
