:root {
  --navy: #0a235f;
  --blue: #2f6fed;
  --bg: #0f1420;
  --card: #ffffff;
  --text: #1a2233;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bad: #dc2626;
  --good: #16a34a;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(160deg, #0f1420, #1b2440);
  color: var(--text);
  min-height: 100vh;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 24px 16px 48px;
}
.card {
  background: var(--card);
  width: 100%; max-width: 460px;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  padding: 24px;
}
.head { text-align: center; margin-bottom: 8px; }
.logo { height: 34px; margin-bottom: 6px; }
h1 { font-size: 20px; margin: 6px 0 0; }
h2 { font-size: 18px; margin: 10px 0 6px; }
.muted { color: var(--muted); font-size: 14px; line-height: 1.45; }
.state { padding-top: 8px; }
.hidden { display: none !important; }

.intro { font-size: 15px; margin: 14px 0 10px; }
.summary { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 18px; }
.summary .row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.summary .row:last-child { border-bottom: 0; }
.summary .k { color: var(--muted); font-size: 13px; }
.summary .v { font-weight: 600; font-size: 14px; text-align: right; }

.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.field em { font-style: normal; opacity: .7; }
.field input {
  width: 100%; padding: 12px 14px; font-size: 16px;
  border: 1px solid var(--line); border-radius: 10px; outline: none;
}
.field input:focus { border-color: var(--blue); }
.field input.invalid { border-color: var(--bad); }

.pad-wrap { margin: 8px 0 6px; position: relative; }
.pad-label { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.pad {
  width: 100%; height: 200px; background: #fff;
  border: 1px dashed #b8c0cf; border-radius: 12px; touch-action: none; display: block;
}
.link-btn { background: none; border: 0; color: var(--blue); font-size: 14px; padding: 8px 2px; cursor: pointer; }
.consent { margin: 10px 0 16px; }

.primary {
  width: 100%; padding: 15px; font-size: 16px; font-weight: 600;
  color: #fff; background: var(--blue); border: 0; border-radius: 12px; cursor: pointer;
}
.primary:disabled { background: #b8c6e8; cursor: not-allowed; }

.spinner {
  width: 34px; height: 34px; margin: 8px auto 14px;
  border: 3px solid var(--line); border-top-color: var(--blue);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.state { text-align: center; }
#state-sign { text-align: left; }
.icon-bad, .icon-good {
  width: 52px; height: 52px; border-radius: 50%; margin: 6px auto 4px;
  display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700; color: #fff;
}
.icon-bad { background: var(--bad); }
.icon-good { background: var(--good); }
