﻿.register-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 1.1fr);
  gap: 24px;
  align-items: start;
}

.register-context {
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(255, 153, 51, 0.18), transparent 48%),
    radial-gradient(120% 120% at 100% 100%, rgba(19, 136, 8, 0.16), transparent 45%),
    linear-gradient(145deg, #071a39 0%, #0b2b59 55%, #123f7a 100%);
  color: #e8f2ff;
  border-color: rgba(191, 215, 248, 0.45);
}

.register-context .eyebrow {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(204, 222, 247, 0.4);
  color: #fff;
}

.register-context h2 {
  margin: 14px 0 10px;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.15;
  font-weight: 900;
  color: #fff;
}

.register-context p {
  margin: 0 0 16px;
  color: #d9e7fb;
  font-weight: 500;
}

.register-point-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.register-point-list li {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(188, 210, 240, 0.33);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  color: #eef4ff;
  font-weight: 600;
}

.register-point-list li b {
  color: #fff;
}

.register-form-shell {
  padding: 26px;
}

.register-form-shell h3 {
  margin: 0 0 8px;
  font-size: 30px;
  color: #0d2d55;
  font-weight: 900;
}

.register-form-shell .register-subtitle {
  margin: 0 0 14px;
  color: #405a7d;
  font-weight: 500;
}

.register-form {
  display: grid;
  gap: 12px;
}

.register-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.register-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #34506f;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.register-input {
  width: 100%;
  height: 44px;
  border-radius: 11px;
  border: 1px solid #cddcf4;
  background: #fbfdff;
  color: #132c4b;
  padding: 0 12px;
  font-size: 15px;
  font-weight: 600;
}

.register-input:focus {
  outline: 3px solid rgba(79, 140, 255, 0.22);
  border-color: #7aa9ef;
}

.register-textarea {
  width: 100%;
  min-height: 82px;
  border-radius: 11px;
  border: 1px solid #cddcf4;
  background: #fbfdff;
  color: #132c4b;
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 600;
  resize: vertical;
}

.register-textarea:focus {
  outline: 3px solid rgba(79, 140, 255, 0.22);
  border-color: #7aa9ef;
}

.register-hint {
  margin-top: 5px;
  font-size: 12px;
  color: #416289;
  font-weight: 600;
}

.register-hidden {
  display: none;
}

.register-hint.bad {
  color: #c53a38;
}

.register-note {
  background: #f2f7ff;
  border: 1px solid #d4e3fb;
  border-radius: 12px;
  padding: 10px 12px;
  color: #294468;
  font-size: 13px;
  font-weight: 600;
}

.register-terms {
  display: flex;
  align-items: start;
  gap: 10px;
  margin-top: 2px;
  color: #304a6c;
  font-size: 13px;
  font-weight: 600;
}

.register-terms input {
  margin-top: 3px;
}

/* ── Phase 3: split-consent group (stacks Terms + Marketing cleanly) ── */
.register-consent-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
  width: 100%;
}
.register-consent-group .register-terms { margin-top: 0; }

.register-terms-optional { opacity: .92; font-weight: 500; }
.register-terms-version  { color: #7a92b4; font-weight: 500; font-size: 11px; margin-left: 2px; }
.register-terms-optional-badge { color: #8a9db8; font-weight: 500; font-size: 11px; margin-left: 2px; }

.register-policy-footer {
  margin-top: 6px;
  text-align: center;
  font-size: 11px;
  color: #8a9db8;
  opacity: .9;
  width: 100%;
}
.register-policy-footer a { color: #7a92b4; text-decoration: none; }
.register-policy-footer a:hover { text-decoration: underline; }
/* When the policy footer sits inside .register-actions grid, kill its margin */
.register-actions > .register-policy-footer { margin-top: 0; }

/* ── Additive: terms summary block (additive UI, additive CSS) ── */
.register-terms-block {
  display: block;
  width: 100%;
  margin-top: 10px;
  border: 1px solid #d8e2f1;
  border-radius: 12px;
  background: #f8fbff;
  padding: 10px 12px;
  box-sizing: border-box;
}
.register-terms-meta {
  font-size: 11.5px;
  color: #5a6f8a;
  font-weight: 600;
  margin: 0 0 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: baseline;
}
.register-terms-meta strong { color: #1f3556; }
.register-terms-summary { margin: 0; }
.register-terms-summary > summary {
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: #1f3556;
  list-style: none;
  user-select: none;
}
.register-terms-summary > summary::-webkit-details-marker { display: none; }
.register-terms-summary > summary::before {
  content: '▸ ';
  display: inline-block;
  transition: transform .15s ease;
}
.register-terms-summary[open] > summary::before { content: '▾ '; }
.register-terms-scroll {
  margin-top: 8px;
  max-height: 160px;
  overflow-y: auto;
  font-size: 12px;
  color: #2c3e57;
  line-height: 1.55;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #e3ebf6;
  border-radius: 8px;
}
.register-terms-scroll ul { margin: 0; padding-left: 18px; }
.register-terms-scroll li + li { margin-top: 4px; }
@media (max-width: 480px) {
  .register-terms-scroll { max-height: 140px; font-size: 11.5px; }
}

.register-actions {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.register-btn {
  border: 0;
  border-radius: 12px;
  height: 46px;
  padding: 0 14px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.3px;
  color: #fff;
  background: linear-gradient(135deg, #0f4ba2, #145bbf);
  box-shadow: 0 12px 24px rgba(20, 91, 191, 0.22);
  cursor: pointer;
}

.register-btn:hover {
  transform: translateY(-1px);
}

.register-btn:disabled {
  background: #8ca5ca;
  box-shadow: none;
  cursor: not-allowed;
}

.register-message {
  border-radius: 12px;
  border: 1px solid transparent;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  display: none;
}

.register-message.error {
  border-color: #f4c8c4;
  background: #fff0ef;
  color: #9f3029;
}

.register-message.success {
  border-color: #bde7c7;
  background: #ebfff1;
  color: #157246;
}

.register-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  font-weight: 700;
  margin-top: 8px;
}

.register-links a {
  color: #0f4ba2;
  text-decoration: none;
}

.register-links a:hover {
  text-decoration: underline;
}

.register-hint-light {
  font-size: 13px;
  color: #475569;
  margin-bottom: 16px;
  line-height: 1.55;
}

/* ── OTP optional section ── */
.otp-section {
  border: 1px solid rgba(20, 91, 191, 0.18);
  border-radius: 10px;
  padding: 12px 14px;
  background: rgba(20, 91, 191, 0.04);
}
.otp-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.otp-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #1a3a6e;
}
.otp-badge-optional {
  font-weight: 500;
  color: #5a7bb5;
  font-size: 12px;
}
.otp-skip-btn {
  background: none;
  border: 0;
  font-size: 12px;
  color: #6b7280;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.otp-skip-btn:hover {
  color: #374151;
}
.otp-mobile-preview {
  font-size: 14px;
  font-weight: 600;
  color: #1e3a5f;
  flex: 1 1 0;
  padding: 0 4px;
}
.otp-step {
  margin-top: 4px;
}
.otp-verified-badge {
  display: inline-block;
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
}

/* ── OTP row flex ── */
.register-mobile-otp-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.register-mobile-otp-row .register-input {
  flex: 1 1 0;
  min-width: 0;
}
.register-btn-sendotp {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  color: #fff;
  background: linear-gradient(135deg, #17863c, #1fa84a);
  box-shadow: 0 6px 14px rgba(23,134,60,0.22);
  cursor: pointer;
}
.register-btn-sendotp:disabled {
  background: #8cbfa0;
  box-shadow: none;
  cursor: not-allowed;
}
.register-btn-sendotp:hover:not(:disabled) {
  transform: translateY(-1px);
}
.register-btn-resendotp {
  background: linear-gradient(135deg, #5a6a8a, #7080a0);
  box-shadow: 0 4px 10px rgba(90,106,138,0.18);
}

@media (max-width: 1080px) {
  .register-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .register-form-shell {
    padding: 18px;
  }

  .register-form-shell h3 {
    font-size: 24px;
  }

  .register-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .register-input,
  .register-btn {
    height: 42px;
    font-size: 14px;
  }

  .register-textarea {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  /* Timer row stacks on very small screens */
  .otp-timer-row { flex-direction: column; gap: 2px; }
  /* Result cards reduce padding */
  .reg-success-card, .reg-existing-card { padding: 1.2rem; }
}

/* ── Registration UX polish — banking/gov portal standard ─────────────── */

/* Change D: spinner */
.reg-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: reg-spin 0.6s linear infinite;
  margin-right: 6px;
  vertical-align: middle;
}
@keyframes reg-spin { to { transform: rotate(360deg); } }

/* Change C: dual OTP timer row */
.otp-timer-row { display: flex; justify-content: space-between; font-size: 12px; color: #888; margin-top: 8px; }

/* Change A: success card */
.reg-success-card { text-align: center; padding: 2rem; background: rgba(30,134,73,0.08); border-radius: 12px; border: 1px solid rgba(30,134,73,0.2); margin-top: 8px; }
.reg-success-card__icon {
  font-size: 48px;
  margin-bottom: 12px;
  line-height: 1;
}
.reg-success-card__title {
  margin: 0 0 8px;
  color: #1e8449;
  font-size: 1.25rem;
  font-weight: 800;
}
.reg-success-card__lead {
  margin: 0 0 6px;
  color: #555;
  font-size: 14px;
}
.reg-success-card .reg-success-mobile {
  margin: 0 0 20px;
  font-size: 13px;
  color: #888;
}
.reg-success-card__hint {
  margin: 12px 0 0;
  font-size: 12px;
  color: #999;
}

/* Change B: already-registered info card */
.reg-existing-card { text-align: center; padding: 1.5rem; background: rgba(52,152,219,0.08); border-radius: 12px; border: 1px solid rgba(52,152,219,0.2); margin-top: 8px; }
.reg-existing-card__icon {
  font-size: 36px;
  margin-bottom: 8px;
  line-height: 1;
}
.reg-existing-card__title {
  margin: 0 0 8px;
  color: #2980b9;
  font-size: 1.15rem;
  font-weight: 800;
}
.reg-existing-card__lead {
  margin: 0 0 16px;
  color: #555;
  font-size: 14px;
  line-height: 1.45;
}
.reg-existing-card > .idsa-btn {
  margin-bottom: 4px;
}
.reg-existing-card__footer {
  margin: 12px 0 0;
  font-size: 12px;
  color: #999;
}
.reg-existing-card__footer a {
  color: #2980b9;
  font-weight: 600;
  text-decoration: none;
}
.reg-existing-card__footer a:hover {
  text-decoration: underline;
}

/* Email registration path — idsa-page-contract step strip (public register only) */
.idsa-steps { display: flex; gap: 8px; flex-wrap: wrap; }
.idsa-step {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}
.idsa-step.is-active {
  color: #0b4bb3;
  border-color: #93c5fd;
  background: #dbeafe;
}
.idsa-step.is-done {
  color: #15803d;
  border-color: #86efac;
  background: #dcfce7;
}
