:root {
  --ink: #0f233b;
  --ink-soft: #56616e;
  --paper: #f0f6f6;
  --surface: #ffffff;
  --line: #d7e2e3;
  --brand: #3daaa2;
  --brand-dark: #0f233b;
  --brand-soft: #dff3f1;
  --accent: #f0a34b;
  --danger: #d56158;
  --shadow: 0 22px 55px rgba(15, 35, 59, 0.12);
  --radius: 18px;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--paper); }

body { min-height: 100vh; margin: 0; background: var(--paper); }

button, input, select { font: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

h1, h2, h3, p { margin-top: 0; }

a { color: inherit; }

.eyebrow {
  margin-bottom: 8px;
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.muted { color: var(--ink-soft); }

.button {
  min-height: 42px;
  border: 0;
  border-radius: 11px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 750;
}

.button-primary { color: white; background: var(--brand); }
.button-primary:hover { background: #318f89; }
.button-quiet { color: var(--brand); background: var(--brand-soft); }
.button-quiet:hover { background: #cceae7; }

.brand-mark {
  display: inline-grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 13px;
  color: white;
  background: var(--brand);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.brand-mark-large { width: 58px; height: 58px; border-radius: 17px; }

.login-page {
  display: grid;
  place-items: center;
  padding: 36px;
  background:
    radial-gradient(circle at 15% 20%, rgba(61, 170, 162, 0.2), transparent 32%),
    linear-gradient(135deg, #0f233b 0 44%, #f0f6f6 44% 100%);
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 440px);
  width: min(1050px, 100%);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 35px 90px rgba(15, 35, 59, 0.25);
}

.login-brand {
  min-height: 610px;
  padding: 64px;
  color: white;
  background:
    linear-gradient(rgba(15, 35, 59, 0.86), rgba(15, 35, 59, 0.97)),
    radial-gradient(circle at 80% 15%, #3daaa2, transparent 38%);
}

.login-brand .eyebrow { margin-top: 145px; color: #8ce0d9; }
.login-brand h1 { max-width: 620px; margin-bottom: 20px; font-size: clamp(2.25rem, 5vw, 4.25rem); line-height: 0.98; letter-spacing: -0.05em; }
.login-brand > p:last-child { max-width: 500px; color: #d6e4df; font-size: 1.05rem; line-height: 1.65; }

.login-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 54px;
}

.login-card h2 { margin-bottom: 9px; font-size: 2rem; letter-spacing: -0.03em; }

.login-form { display: grid; gap: 18px; margin-top: 28px; }
.login-form label { display: grid; gap: 8px; color: var(--ink-soft); font-size: 0.84rem; font-weight: 750; }
.login-form input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0 14px;
  color: var(--ink);
  background: #fafbf9;
  outline: none;
}
.login-form input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(36, 91, 78, 0.12); }
.form-error { margin-top: 20px; border-radius: 10px; padding: 12px 14px; color: #7e3333; background: #fbe9e9; font-size: 0.88rem; }
.login-help { margin: 25px 0 0; color: var(--ink-soft); font-size: 0.78rem; line-height: 1.5; }

.upload-page { display: grid; place-items: center; padding: 30px; }
.upload-shell { width: min(640px, 100%); }
.upload-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 42px; background: var(--surface); box-shadow: var(--shadow); }
.upload-card h1 { margin-bottom: 10px; font-size: 2rem; letter-spacing: -0.03em; }
.upload-guardrails { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0; }
.upload-guardrails span { border-radius: 999px; padding: 7px 11px; color: var(--brand); background: var(--brand-soft); font-size: 0.76rem; font-weight: 750; }
.upload-status { min-height: 44px; margin-top: 20px; border-radius: 10px; padding: 12px 14px; font-size: 0.88rem; }
.upload-status:empty { display: none; }
.upload-status.is-working { color: var(--ink-soft); background: #eef1ee; }
.upload-status.is-success { color: var(--brand-dark); background: var(--brand-soft); }
.upload-status.is-error { color: #7e3333; background: #fbe9e9; }
.upload-progress { margin-top: 20px; }
.upload-progress progress { display: block; width: 100%; height: 16px; overflow: hidden; border: 0; border-radius: 999px; background: #dfe5e1; accent-color: var(--brand); }
.upload-progress progress::-webkit-progress-bar { border-radius: 999px; background: #dfe5e1; }
.upload-progress progress::-webkit-progress-value { border-radius: 999px; background: var(--brand); transition: width 160ms ease; }
.upload-progress progress::-moz-progress-bar { border-radius: 999px; background: var(--brand); }
.upload-progress-meta { margin-top: 8px; color: var(--ink-soft); font-size: 0.78rem; font-variant-numeric: tabular-nums; text-align: right; }
.upload-card button:disabled { cursor: wait; opacity: 0.65; }

@media (max-width: 800px) {
  .login-page { padding: 16px; background: var(--paper); }
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { min-height: auto; padding: 36px; }
  .login-brand .eyebrow { margin-top: 60px; }
  .login-brand h1 { font-size: 2.4rem; }
  .login-card { padding: 36px; }
  .upload-page { padding: 16px; }
  .upload-card { padding: 28px; }
}
