* { padding: 0; margin: 0; border: none; outline: 0; box-sizing: border-box; }

:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
  --text: #040f43;
  --muted: #8187a1;
  --blue: #3464ff;
  --blue-dark: #003bfc;
  --border: #e1e6f0;
  --white: #ffffff;
  --ok: #0d7a3e;
  --ok-bg: #e8f5ee;
  --warn-bg: #fff8e8;
  --warn-text: #8a6a00;
}

html {
  min-height: 100%;
  background: linear-gradient(160deg, #ebf0fb 0%, #e0f1fb 100%);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font: 15px/1.55 var(--font);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  background-image: url("assets/login_reg_bg.png");
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
}

a { color: var(--blue); }

.site-header {
  flex-shrink: 0;
  background: linear-gradient(289deg, #14258d 0%, #051044 85%, #040f41 100%);
  box-shadow: 0 2px 12px rgba(4, 15, 67, 0.18);
}

.header-bar {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 16px;
  padding-top: calc(16px + env(safe-area-inset-top, 0));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
}

.logo {
  height: 32px;
  width: auto;
  display: block;
}

main {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 16px;
}

.card {
  background: var(--white);
  border-radius: 10px;
  padding: 28px 22px 24px;
  box-shadow: 0 10px 36px rgba(5, 17, 71, 0.08);
  border: 1px solid rgba(225, 230, 240, 0.9);
}

h1 {
  font-size: 22px;
  line-height: 1.3;
  font-weight: 600;
}

.lede {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

.lede + .lede { margin-top: 10px; }

.info-grid {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.info-card {
  padding: 16px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #f8faff 0%, #f3f6fd 100%);
}

.info-card-muted {
  background: #fafbfe;
}

.info-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--blue-dark);
}

.info-card p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.action-link-primary {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  color: #fff;
}

.box {
  margin-top: 18px;
  padding: 16px 18px;
  background: #f7f9ff;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.55;
}

.box p + p { margin-top: 10px; }

.box h2 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

label.field-label {
  display: block;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

input[type="email"],
input[type="text"],
textarea {
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: 15px var(--font);
  color: var(--text);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(52, 100, 255, 0.12);
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}

.check-row input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.option-list {
  margin-top: 16px;
}

.option-item {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafbfe;
}

.option-item + .option-item { margin-top: 10px; }

.option-item strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.option-item span {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.btn {
  display: block;
  width: 100%;
  min-height: 46px;
  margin-top: 18px;
  padding: 0 20px;
  background: var(--blue-dark);
  color: #fff;
  border-radius: 6px;
  font: 600 15px var(--font);
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.btn:hover { opacity: 0.92; }

.btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  margin-top: 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.feedback {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
}

.feedback-error {
  background: #fff0f0;
  border: 1px solid #f0caca;
  color: #9b2c2c;
}

.feedback-ok {
  background: var(--ok-bg);
  border: 1px solid #b8dfc8;
  color: var(--ok);
}

.spinner-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 12px 0 4px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e1e6f0;
  border-top-color: var(--blue-dark);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.ok-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--ok-bg);
  color: var(--ok);
  font-size: 26px;
  line-height: 52px;
  text-align: center;
  font-weight: 700;
}

.hidden { display: none; }

.text-center { text-align: center; }

.hint {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.site-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0));
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.footer-copy {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
}

.footer-links a {
  min-height: 40px;
  line-height: 40px;
  padding: 0 2px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-links a.is-active {
  color: var(--text);
  font-weight: 600;
}

@media (min-width: 641px) {
  .logo { height: 36px; }
  main { padding: 32px 20px 24px; }
  .card { padding: 32px 28px 28px; }
  h1 { font-size: 24px; }
  .info-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 380px) {
  .footer-links { flex-direction: column; gap: 0; }
}
