:root {
  color-scheme: light;
  --blue: #3456d1;
  --blue-dark: #243ca6;
  --purple: #7647ae;
  --ink: #172033;
  --muted: #657087;
  --line: #dfe4ef;
  --surface: rgba(255, 255, 255, 0.97);
  --success: #147a4b;
  --danger: #b42318;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(22px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 5%, rgba(104, 164, 255, 0.55), transparent 38%),
    radial-gradient(circle at 95% 90%, rgba(242, 175, 113, 0.5), transparent 42%),
    linear-gradient(145deg, #456dd8, #7053b0 58%, #d68d70);
  overflow-x: hidden;
}

button, input { font: inherit; }

.shell {
  width: calc(100vw - 32px);
  max-width: 480px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #fff;
  margin: 8px 0 18px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 30px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
}

h1, h2, p { margin-top: 0; }
.brand h1 { margin: 0; font-size: 25px; }
.brand p { margin: 2px 0 0; opacity: .86; }

.card, .status, .security-note {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.48);
  border-radius: 19px;
  box-shadow: 0 15px 38px rgba(23, 32, 51, 0.2);
}

.card { padding: 22px; margin-bottom: 14px; }
.card h2 { margin-bottom: 7px; font-size: 21px; }
.card > p { color: var(--muted); font-size: 14px; line-height: 1.45; }

.status {
  padding: 12px 15px;
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.4;
}
.status.info { color: #214a91; background: #edf5ff; }
.status.success { color: #11643f; background: #e9f9f0; }
.status.error { color: #8f2018; background: #fff0ef; }

.step-label {
  display: inline-flex;
  padding: 4px 9px;
  margin-bottom: 8px;
  border-radius: 999px;
  color: var(--blue-dark);
  background: #eaf0ff;
  font-size: 12px;
  font-weight: 750;
}
.success-label { color: var(--success); background: #e5f8ed; }

label {
  display: block;
  margin: 15px 0 7px;
  font-size: 14px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 51px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
  outline: none;
}
input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(52,86,209,.13); }

button {
  min-height: 49px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 750;
}
button:disabled { cursor: wait; opacity: .58; }
.primary {
  width: 100%;
  margin-top: 15px;
  padding: 12px 16px;
  color: #fff;
  background: linear-gradient(115deg, var(--blue), var(--purple));
  box-shadow: 0 8px 20px rgba(52, 86, 209, .22);
}
.secondary {
  width: 100%;
  margin-top: 13px;
  color: #39445b;
  background: #eef1f6;
}

.hint { margin: 6px 0 0 !important; font-size: 12px !important; }
.recaptcha { min-height: 0; margin-top: 13px; overflow: hidden; }
.account { padding: 10px 12px; border-radius: 10px; background: #eef7ff; color: #245086; }

.or { display: flex; align-items: center; gap: 10px; color: #8b94a7; font-size: 12px; margin-top: 15px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

.quick-days {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 11px;
}
.quick-days button { min-height: 40px; color: #3c465b; background: #edf0f5; }
.quick-days button.selected { color: #fff; background: var(--blue); }
.grant { margin-top: 17px; }

.session-row { display: flex; justify-content: space-between; align-items: start; gap: 15px; }
.countdown { padding: 7px 9px; border-radius: 9px; background: #edf2ff; color: var(--blue-dark); font-variant-numeric: tabular-nums; font-weight: 800; }

.result { margin-top: 15px; padding: 13px; border-radius: 12px; line-height: 1.5; white-space: pre-line; }
.result.success { color: #105c3b; background: #e7f8ee; border: 1px solid #a9dfbf; }
.result.error { color: var(--danger); background: #fff0ef; border: 1px solid #efb3ae; }

.security-note { padding: 15px 17px; font-size: 13px; color: #33405a; }
.security-note p { margin: 5px 0 0; line-height: 1.45; }
footer { padding: 15px 16px 5px; color: rgba(255,255,255,.9); text-align: center; font-size: 12px; line-height: 1.5; }

.hidden { display: none !important; }

@media (max-width: 370px) {
  .card { padding: 18px; }
  .quick-days { grid-template-columns: repeat(2, 1fr); }
}
