:root {
  color-scheme: dark;
  --bg: #0f172a;
  --surface: #172033;
  --surface-2: #1d2940;
  --border: #334155;
  --text: #f8fafc;
  --muted: #aebdd0;
  --primary: #7c3aed;
  --primary-hover: #6d28d9;
  --lime: #58cc02;
  --danger: #fb7185;
}

* { box-sizing: border-box; }
body { min-height: 100vh; margin: 0; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.5; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.hidden { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.topbar { position: sticky; top: 0; z-index: 10; display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 16px; padding: 12px max(20px, calc((100vw - 880px) / 2)); border-bottom: 1px solid var(--border); background: rgba(15, 23, 42, 0.96); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); font-weight: 800; text-decoration: none; }
.brand img { border-radius: 9px; box-shadow: 0 5px 16px rgba(0, 0, 0, 0.35); }
.shell { width: min(880px, calc(100% - 32px)); margin: 0 auto; padding: 58px 0 80px; }
.intro { max-width: 690px; margin-bottom: 34px; }
.eyebrow, .step { margin: 0 0 6px; color: #c4b5fd; font-size: 12px; font-weight: 800; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(34px, 7vw, 58px); line-height: 1.04; letter-spacing: 0; }
h2 { margin: 0; font-size: 22px; letter-spacing: 0; }
.intro > p:last-child { max-width: 620px; margin: 18px 0 0; color: var(--muted); font-size: 17px; }

.panel { margin-top: 18px; border: 1px solid var(--border); border-radius: 8px; padding: 26px; background: var(--surface); box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.secure-label, .account-label { color: var(--muted); font-size: 13px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 12px; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 700; }
input { width: 100%; min-height: 46px; border: 1px solid var(--border); border-radius: 6px; outline: none; padding: 10px 12px; background: #0f172a; color: var(--text); }
input:focus { border-color: #a78bfa; box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2); }
.button { min-height: 44px; border: 0; border-radius: 6px; padding: 10px 16px; color: var(--text); font-weight: 800; }
.button:disabled { cursor: not-allowed; opacity: 0.45; }
.primary { background: var(--primary); }
.primary:hover:not(:disabled) { background: var(--primary-hover); }
.secondary, .google { border: 1px solid var(--border); background: var(--surface-2); }
.google { width: 100%; }
.wide { width: 100%; margin-top: 16px; }
.separator { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--muted); font-size: 12px; }
.separator::before, .separator::after { height: 1px; flex: 1; background: var(--border); content: ""; }
.fine-print { margin: 12px 0 0; color: var(--muted); font-size: 13px; }

.mode-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 18px; border: 1px solid var(--border); border-radius: 6px; padding: 4px; background: #0f172a; }
.mode-tab { min-height: 42px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-weight: 800; }
.mode-tab.active { background: var(--surface-2); color: var(--text); }
.drop-zone { display: grid; width: 100%; min-height: 210px; place-content: center; gap: 7px; border: 2px dashed #52647d; border-radius: 8px; padding: 26px; background: #111b2d; color: var(--text); text-align: center; }
.drop-zone:hover, .drop-zone.dragging { border-color: #a78bfa; background: rgba(124, 58, 237, 0.1); }
.drop-zone span, .drop-zone small { color: var(--muted); }
.selected-file { margin-top: 12px; border-left: 3px solid var(--lime); padding: 10px 12px; background: rgba(88, 204, 2, 0.08); font-size: 14px; }
.progress-wrap { margin-top: 20px; }
.progress-copy { display: flex; justify-content: space-between; margin-bottom: 8px; color: var(--muted); font-size: 13px; }
progress { width: 100%; height: 10px; border: 0; border-radius: 5px; overflow: hidden; background: #0f172a; }
progress::-webkit-progress-bar { background: #0f172a; }
progress::-webkit-progress-value { background: var(--lime); }
progress::-moz-progress-bar { background: var(--lime); }
.status { margin-bottom: 18px; border-left: 4px solid var(--lime); border-radius: 4px; padding: 13px 15px; background: rgba(88, 204, 2, 0.09); }
.status.error { border-left-color: var(--danger); background: rgba(251, 113, 133, 0.09); }
.jobs-list { display: grid; gap: 10px; }
.job { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; border-bottom: 1px solid var(--border); padding: 13px 0; }
.job:last-child { border-bottom: 0; }
.job strong, .job span { overflow-wrap: anywhere; }
.job-meta, .empty { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.job-status { align-self: start; border: 1px solid var(--border); border-radius: 999px; padding: 4px 9px; color: var(--muted); font-size: 12px; font-weight: 800; }
.job-status.completed { border-color: rgba(88, 204, 2, 0.45); color: #9bea62; }
.job-status.failed { border-color: rgba(251, 113, 133, 0.5); color: #fda4af; }
footer { display: flex; width: min(880px, calc(100% - 32px)); margin: 0 auto; gap: 20px; border-top: 1px solid var(--border); padding: 24px 0 40px; color: var(--muted); font-size: 13px; }

@media (max-width: 720px) {
  .shell { padding-top: 38px; }
  .panel { padding: 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .panel-heading { align-items: flex-start; flex-direction: column; }
  .drop-zone { min-height: 180px; }
}
