:root {
  color-scheme: light;
  --ink: #17213a;
  --muted: #61708a;
  --line: #d8dfec;
  --surface: #ffffff;
  --canvas: #f3f6fb;
  --brand: #5146e5;
  --brand-dark: #3930bd;
  --success: #0f7a43;
  --danger: #b42318;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: radial-gradient(circle at 10% 10%, #e7e5ff 0, transparent 30rem), var(--canvas);
  font: 16px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, select { font: inherit; }

.shell, .workspace { width: min(100% - 2rem, 760px); margin: 0 auto; }
.shell { min-height: 100vh; display: grid; align-content: center; gap: 2rem; padding: 3rem 0; }
.compact-shell { width: min(100% - 2rem, 480px); }
.workspace { padding: 3rem 0 5rem; }

.topbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 4vw; background: #10182b; color: white; }
.brand { color: inherit; display: inline-flex; align-items: center; gap: .65rem; font-weight: 800; text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; width: 2.55rem; height: 2.55rem; border-radius: .8rem; color: white; background: linear-gradient(135deg, #6f63ff, #4638d7); font-size: .82rem; font-weight: 900; letter-spacing: .05em; box-shadow: 0 12px 24px #5146e540; }
.account { display: flex; align-items: center; gap: 1rem; font-size: .88rem; }

.hero { max-width: 620px; }
.workspace-hero { margin-bottom: 2rem; }
.eyebrow { margin: 0 0 .6rem; color: var(--brand); font-size: .78rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
h1, h2 { line-height: 1.12; letter-spacing: -.035em; }
h1 { margin: 0; font-size: clamp(2.2rem, 6vw, 3.7rem); }
h2 { margin: 0 0 1.5rem; font-size: 1.6rem; }
.lede { margin: 1rem 0 0; color: var(--muted); font-size: 1.08rem; }

.card { border: 1px solid var(--line); border-radius: 1.25rem; background: var(--surface); box-shadow: 0 24px 70px #1f2d4d12; }
.login-card, .status-card { padding: clamp(1.5rem, 5vw, 2.5rem); }
.upload-card { padding: clamp(1.25rem, 3vw, 2.25rem); }
.status-card { text-align: center; }
.status-card .brand-mark { margin-bottom: 1.5rem; }

form { display: grid; gap: 1.15rem; }
label { display: grid; gap: .5rem; font-size: .94rem; font-weight: 700; }
input, select { width: 100%; min-height: 3rem; padding: .7rem .85rem; border: 1px solid #b9c5d8; border-radius: .65rem; color: var(--ink); background: #fff; }
input:focus, select:focus, button:focus-visible { outline: 3px solid #9c96ff80; outline-offset: 2px; border-color: var(--brand); }
button { min-height: 3rem; padding: .7rem 1rem; border: 0; border-radius: .7rem; color: white; background: var(--brand); cursor: pointer; font-weight: 800; transition: background .15s ease, transform .15s ease; }
button:hover:not(:disabled) { background: var(--brand-dark); transform: translateY(-1px); }
button:disabled { cursor: wait; opacity: .65; }
.quiet-button { min-height: auto; padding: .25rem 0; border-radius: 0; background: transparent; color: #d7dded; font-weight: 700; }
.quiet-button:hover { color: white; background: transparent; }
.hint { margin: -.35rem 0 0; color: var(--muted); font-size: .88rem; }
.message { min-height: 1.5rem; margin: 0; color: var(--muted); }
.message.success { color: var(--success); }
.message.error { color: var(--danger); }
.banner { margin-bottom: 1rem; padding: 0 1rem; }

fieldset { min-width: 0; margin: 0; padding: 0; border: 0; display: grid; gap: .75rem; }
legend { margin-bottom: 1rem; font-size: 1.15rem; font-weight: 800; }
.dropzone { padding: 1.2rem; border: 1px dashed #94a6c6; border-radius: .85rem; background: #fafbff; cursor: pointer; }
.dropzone span { color: var(--muted); font-size: .88rem; font-weight: 500; }
.dropzone input { min-height: unset; padding: 0; border: 0; border-radius: 0; background: transparent; }
.file-rows { display: grid; gap: .85rem; }
.file-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(10rem, .75fr); gap: .75rem; padding: .9rem; border: 1px solid var(--line); border-radius: .75rem; background: #fbfcff; }
.file-name { overflow: hidden; align-self: center; font-size: .9rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.file-row label { font-size: .8rem; }

@media (max-width: 650px) {
  .topbar { align-items: flex-start; padding: 1rem; }
  .account { align-items: flex-end; flex-direction: column; gap: .25rem; text-align: right; }
  .account span { max-width: 11rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .file-row { grid-template-columns: 1fr; }
}
