:root {
  --ink: #122033;
  --muted: #5c6b7a;
  --line: #e6ebf1;
  --soft: #f6f8fb;
  --card: #ffffff;
  --navy: #12304a;
  --navy-2: #0c2236;
  --blue: #1d6fe8;
  --blue-dark: #1558c0;
  --ok: #0f7a45;
  --ok-bg: #e8f7ef;
  --err: #9f1d2a;
  --err-bg: #fdecee;
  --warn: #8a5a12;
  --warn-bg: #fff6e6;
  --shadow: 0 24px 60px rgba(18, 48, 74, .10);
  --radius: 22px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(900px 420px at 0% -10%, rgba(29, 111, 232, .12), transparent 60%),
    radial-gradient(700px 380px at 100% 0%, rgba(18, 48, 74, .08), transparent 55%),
    #eef2f6;
}
a { color: var(--blue); }
button, input, select { font: inherit; }

.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
}
.auth-card {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  background: var(--card);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.auth-side {
  position: relative;
  padding: 48px 42px;
  color: #fff;
  background:
    radial-gradient(420px 220px at 90% 10%, rgba(255,255,255,.14), transparent 60%),
    linear-gradient(165deg, #1a4568 0%, var(--navy-2) 72%);
}
.auth-side::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -90px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  font-family: "Space Grotesk", Inter, sans-serif;
  font-weight: 700;
  letter-spacing: -.04em;
}
.kicker {
  margin: 28px 0 10px;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.72);
}
.auth-side h1 {
  margin: 0;
  max-width: 12ch;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: -.04em;
}
.auth-side p {
  margin: 18px 0 0;
  max-width: 32ch;
  color: rgba(255,255,255,.78);
  line-height: 1.55;
}
.steps { margin: 36px 0 0; padding: 0; list-style: none; }
.steps li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 14px;
  color: rgba(255,255,255,.86);
  font-size: 14px;
  line-height: 1.4;
}
.num {
  flex: 0 0 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.12);
  font-size: 12px;
  font-weight: 700;
}
.auth-panel { padding: 48px 40px; }
.auth-panel h2 {
  margin: 0;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 30px;
  letter-spacing: -.03em;
}
.lead { margin: 8px 0 22px; color: var(--muted); line-height: 1.5; }
.field { margin-bottom: 14px; }
label {
  display: block;
  margin: 0 0 7px;
  font-size: 13px;
  font-weight: 600;
  color: #314455;
}
input, select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus {
  border-color: #9ec0f5;
  box-shadow: 0 0 0 4px rgba(29, 111, 232, .12);
}
input:disabled { background: var(--soft); color: #607080; }
.otp {
  height: 58px;
  text-align: center;
  font-size: 26px;
  letter-spacing: .42em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary { width: 100%; background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-line {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-line:hover { background: var(--soft); }
.linkish {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
}
.linkish:hover { color: var(--ink); }
.alert {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
}
.alert-err { background: var(--err-bg); color: var(--err); }
.alert-ok { background: var(--ok-bg); color: var(--ok); }

.bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 72px;
  padding: 0 28px;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(18, 48, 74, .06);
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  text-decoration: none;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-weight: 700;
  letter-spacing: -.03em;
  font-size: 20px;
}
.who { margin-left: auto; color: var(--muted); font-size: 14px; }
.page { width: min(1040px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 64px; }
.panel {
  background: var(--card);
  border: 1px solid rgba(18, 48, 74, .06);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(18, 48, 74, .04);
  padding: 28px;
}
.panel + .panel { margin-top: 18px; }
.panel-head { margin-bottom: 8px; }
.panel h1, .auth-panel h2, .panel h2 {
  font-family: "Space Grotesk", Inter, sans-serif;
}
.panel h1 {
  margin: 0;
  font-size: 32px;
  letter-spacing: -.035em;
  line-height: 1.1;
}
.block-title {
  margin: 22px 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #7b8b9a;
}
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.full { grid-column: 1 / -1; }
.span-row { display: flex; justify-content: flex-end; margin-top: 18px; }
.span-row .btn-primary { width: auto; min-width: 180px; }

.doc-list { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.doc-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.doc-card.is-on { border-color: #cfe8da; background: linear-gradient(180deg, #f7fcf9, #fff 48%); }
.doc-card h3 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
.doc-card .hint { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.pill {
  display: inline-flex;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--warn-bg);
  color: var(--warn);
}
.is-on .pill { background: var(--ok-bg); color: var(--ok); }
.file-link {
  display: inline-flex;
  margin-top: 8px;
  color: var(--navy);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}
.file-link:hover { text-decoration: underline; }
.doc-actions { display: flex; flex-direction: column; gap: 8px; }
.file-ui { display: flex; gap: 8px; align-items: center; }
.file-ui input[type=file] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}
.picked {
  min-width: 0;
  flex: 1;
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pass { -webkit-text-security: disc; letter-spacing: .12em; }
.saved { color: var(--ok); font-size: 12px; font-weight: 700; }

@media (max-width: 860px) {
  .auth-card, .grid, .doc-card { grid-template-columns: 1fr; }
  .auth-side { padding: 32px 24px; }
  .auth-side h1 { font-size: 32px; max-width: none; }
  .auth-panel, .panel { padding: 24px 18px; }
  .bar { padding: 0 16px; }
  .who { display: none; }
  .span-row .btn-primary, .doc-actions .btn-primary { width: 100%; }
}
