:root {
  color-scheme: light;
  --ink: #18201f;
  --muted: #687471;
  --surface: #ffffff;
  --canvas: #f3f5f2;
  --line: #dce3df;
  --brand: #12664f;
  --brand-soft: #e4f2ec;
  --danger: #a43c32;
  --danger-soft: #fbe9e7;
  --shadow: 0 20px 60px rgba(23, 42, 36, 0.09);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--canvas); color: var(--ink); }
a { color: inherit; }
button, input, select { font: inherit; }
.topbar { height: 68px; padding: 0 5vw; display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 10; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; text-decoration: none; }
.brand-mark { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: var(--brand); color: white; font-weight: 800; letter-spacing: -.04em; box-shadow: 0 10px 30px rgba(18,102,79,.25); }
.brand-mark.small { width: 34px; height: 34px; border-radius: 10px; font-size: 13px; }
.top-actions { display: flex; align-items: center; gap: 16px; }
.top-actions form { margin: 0; }
.text-link { color: var(--brand); font-weight: 650; text-decoration: none; }
.container { width: min(1100px, 90vw); margin: 0 auto; padding: 48px 0 72px; }
.hero { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end; margin-bottom: 30px; }
h1, h2 { margin: 0; letter-spacing: -.035em; }
h1 { font-size: clamp(36px, 5.5vw, 64px); line-height: 1.02; max-width: 800px; }
h2 { font-size: 25px; }
.eyebrow { margin: 0 0 8px; text-transform: uppercase; letter-spacing: .14em; font-size: 11px; font-weight: 800; color: var(--brand); }
.hero-copy { max-width: 720px; margin: 18px 0 0; color: var(--muted); font-size: 17px; line-height: 1.65; }
.status-badge { white-space: nowrap; background: var(--brand-soft); color: var(--brand); border-radius: 999px; padding: 9px 13px; font-size: 13px; font-weight: 700; }
.status-badge span { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2aa879; margin-right: 7px; }
.status-badge.offline { color: var(--danger); background: var(--danger-soft); }
.status-badge.offline span { background: var(--danger); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 28px; margin-bottom: 24px; }
.panel-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 22px; }
.muted { color: var(--muted); font-weight: 450; }
.compact { margin: 0; font-size: 13px; }
.drop-zone { min-height: 230px; border: 1.5px dashed #9fb8ae; border-radius: 18px; background: linear-gradient(145deg, #f7fbf9, #eff5f1); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; cursor: pointer; transition: .2s ease; text-align: center; padding: 30px; }
.drop-zone:hover, .drop-zone.dragging, .drop-zone:focus-visible { border-color: var(--brand); background: var(--brand-soft); outline: none; transform: translateY(-1px); }
.drop-zone strong { font-size: 20px; }
.drop-zone span, .drop-zone small { color: var(--muted); }
.upload-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: white; color: var(--brand); font-size: 28px; box-shadow: 0 8px 24px rgba(28,68,55,.10); margin-bottom: 6px; }
.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 20px; }
label { display: grid; gap: 8px; font-size: 13px; font-weight: 700; }
select, input[type=password] { width: 100%; border: 1px solid var(--line); border-radius: 11px; background: white; padding: 12px 13px; color: var(--ink); }
select:focus, input:focus { outline: 2px solid rgba(18,102,79,.2); border-color: var(--brand); }
.selected-file, .progress-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 20px; padding: 16px; border-radius: 14px; background: #f7f9f7; border: 1px solid var(--line); }
.selected-file > div, .progress-meta > div { display: grid; gap: 4px; min-width: 0; }
.selected-file strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 15px; border: 1px solid transparent; border-radius: 10px; font-weight: 750; text-decoration: none; cursor: pointer; background: transparent; }
.button.primary { color: white; background: var(--brand); }
.button.secondary { color: var(--brand); background: var(--brand-soft); }
.button.ghost { border-color: var(--line); background: white; color: var(--ink); }
.button:disabled { opacity: .55; cursor: not-allowed; }
.progress-card { display: block; }
.progress-meta { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 12px; }
.progress-track, .job-progress { height: 7px; background: #e4e9e6; border-radius: 99px; overflow: hidden; }
.progress-bar, .job-progress > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), #32a77e); transition: width .25s ease; }
.jobs-list { display: grid; gap: 10px; }
.job-row { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(120px, .55fr) 90px auto; align-items: center; gap: 18px; padding: 15px 0; border-top: 1px solid var(--line); }
.job-row:first-child { border-top: 0; }
.job-main { display: grid; gap: 3px; min-width: 0; }
.job-main strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job-stage { font-size: 12px; }
.job-status { justify-self: start; text-transform: capitalize; font-size: 12px; font-weight: 800; border-radius: 99px; padding: 6px 9px; background: #edf0ee; }
.status-completed { color: var(--brand); background: var(--brand-soft); }
.status-failed { color: var(--danger); background: var(--danger-soft); }
.status-processing { color: #735514; background: #fbf1d5; }
.job-actions { display: flex; gap: 8px; justify-content: end; }
.empty-state { padding: 34px; border: 1px dashed var(--line); border-radius: 14px; text-align: center; color: var(--muted); }
.alert { padding: 12px 14px; border-radius: 10px; margin-top: 14px; }
.alert.error { color: var(--danger); background: var(--danger-soft); border: 1px solid #f1c4bf; }
.hidden { display: none !important; }
.login-page { min-height: 100vh; background: radial-gradient(circle at 20% 10%, #dceee6 0, transparent 34%), radial-gradient(circle at 80% 90%, #d8e2df 0, transparent 33%), #f3f5f2; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(440px, 100%); background: white; border: 1px solid var(--line); border-radius: 24px; padding: 36px; box-shadow: var(--shadow); }
.login-card h1 { font-size: 40px; margin: 18px 0 10px; }
.login-card .muted { line-height: 1.55; }
.stack { display: grid; gap: 14px; margin-top: 26px; }
@media (max-width: 780px) {
  .topbar { padding: 0 20px; }
  .container { width: min(94vw, 680px); padding-top: 30px; }
  .hero { grid-template-columns: 1fr; align-items: start; }
  .status-badge { justify-self: start; }
  .options-grid { grid-template-columns: 1fr; }
  .job-row { grid-template-columns: 1fr 90px; }
  .job-progress { grid-column: 1 / -1; order: 3; }
  .job-status { justify-self: end; }
  .job-actions { grid-column: 1 / -1; justify-content: start; }
  .panel { padding: 20px; border-radius: 18px; }
}
