/* ============ REGISTER PAGE ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Outfit', sans-serif;
  min-height: 100vh;
  display: flex;
  background: #0c1222;
  overflow-x: hidden;
  overflow-y: auto;
}

/* LEFT PANEL — Branding */
.left-panel {
  flex: 1;
  background: linear-gradient(160deg, #0f172a 0%, #1e3a5f 40%, #1d4ed8 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  position: relative;
  overflow: hidden;
}
.left-panel::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(59,130,246,0.15);
  filter: blur(80px);
}
.left-panel::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -60px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(99,102,241,0.12);
  filter: blur(60px);
}
.left-logo {
  width: 140px; height: 140px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.left-title {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  text-align: center;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}
.left-subtitle {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  text-align: center;
  position: relative;
  z-index: 1;
  margin-bottom: 40px;
}
.left-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  z-index: 1;
}
.left-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.06);
}
.left-feature-icon {
  font-size: 20px;
  flex-shrink: 0;
}
.left-feature-text {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  font-weight: 500;
}

/* RIGHT PANEL — Register Form */
.right-panel {
  width: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: #fff;
}
.login-form {
  width: 100%;
  max-width: 360px;
}
.login-form h1 {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.login-form .sub {
  font-size: 14px;
  color: #94a3b8;
  margin-bottom: 32px;
}
.error-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.success-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  color: #0f172a;
  outline: none;
  transition: all 0.2s;
  background: #f8fafc;
}
.form-group input:focus {
  border-color: #3b82f6;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(59,130,246,0.1);
}
.btn-submit {
  width: 100%;
  padding: 14px;
  background: #1e3a5f;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 10px;
}
.btn-submit:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(29,78,216,0.25);
}

.register-link {
    display: block;
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    color: #64748b;
}
.register-link a {
    color: #3b82f6;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s;
}
.register-link a:hover {
    color: #1d4ed8;
}

/* Mobile Responsive */
@media (max-width: 900px) {
  body { flex-direction: column; }
  .left-panel { padding: 40px 20px; flex: none; min-height: 40vh; }
  .right-panel { width: 100%; padding: 40px 24px; flex: 1; }
  .left-logo { width: 90px; height: 90px; margin-bottom: 20px; }
  .left-title { font-size: 24px; }
  .left-features { display: none; }
}

/* Privacy Notice consent (required to sign up) */
.consent-check { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 18px; font-size: 13px; line-height: 1.5; color: #475569; cursor: pointer; }
.consent-check input { flex: none; width: 17px; height: 17px; margin-top: 2px; accent-color: #3b82f6; cursor: pointer; }
.consent-check a { color: #3b82f6; font-weight: 600; text-decoration: none; }
.consent-check a:hover { text-decoration: underline; }
.consent-link { padding: 0; border: 0; background: none; font: inherit; color: #3b82f6; font-weight: 600; cursor: pointer; }
.consent-link:hover { text-decoration: underline; }

/* Privacy Notice text (includes/privacy_notice.php), in the pop-up or opened in place */
.privacy-notice { max-height: 60vh; overflow-y: auto; margin: 0 0 18px; padding: 4px 14px 4px 2px; text-align: left; font-size: 14px; line-height: 1.6; color: #475569; }
.swal2-html-container .privacy-notice { margin: 0; }
.privacy-notice h2 { margin: 18px 0 6px; font-size: 15px; color: #0f172a; }
.privacy-notice p { margin: 6px 0; }
.privacy-notice ul { margin: 4px 0; padding-left: 20px; }
.privacy-notice li { margin: 3px 0; }
.privacy-notice strong { color: #0f172a; }
.privacy-notice .updated { font-size: 12px; color: #64748b; }
.privacy-notice .summary { margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: #eff6ff; }
.privacy-notice .summary p { margin: 0; color: #1e3a8a; }

/* ============ Sign-up form, step 1 of 2 (register.php) ============ */
.login-form .sub { color: #64748b; margin-bottom: 24px; }
.step-pill { display: inline-block; margin-bottom: 12px; padding: 4px 10px; border-radius: 999px; background: #eff6ff;
  color: #1d4ed8; font-size: 12px; font-weight: 600; letter-spacing: .2px; }

/* Two sections: About you / Your account */
.form-section { padding: 18px 0 4px; border-top: 1px solid #e2e8f0; }
.form-section:first-of-type { border-top: 0; padding-top: 0; }
.section-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.section-num { flex: none; width: 26px; height: 26px; border-radius: 50%; background: #1e3a5f; color: #fff;
  font-size: 13px; font-weight: 700; display: grid; place-items: center; margin-top: 1px; }
.section-head h2 { font-size: 16px; font-weight: 700; color: #0f172a; margin-bottom: 3px; }
.section-head p { font-size: 12.5px; line-height: 1.5; color: #64748b; }

.name-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group label .optional { text-transform: none; letter-spacing: 0; font-weight: 500; color: #94a3b8; }
.form-group input::placeholder { color: #a3adbb; }
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  color: #0f172a;
  outline: none;
  background: #f8fafc;
  transition: all 0.2s;
}
.form-group select:focus { border-color: #3b82f6; background: #fff; box-shadow: 0 0 0 4px rgba(59,130,246,0.1); }
.form-group select:has(option[value=""]:checked) { color: #a3adbb; }

/* Errors under the field they belong to */
.form-group input.is-invalid, .form-group select.is-invalid { border-color: #ef4444; background: #fff; }
.form-group input.is-invalid:focus, .form-group select.is-invalid:focus { box-shadow: 0 0 0 4px rgba(239,68,68,0.12); }
.field-error { margin-top: 6px; font-size: 12.5px; line-height: 1.45; color: #b91c1c; font-weight: 500; }
.field-error a { color: #1d4ed8; font-weight: 700; }
.field-ok { margin-top: 6px; font-size: 12.5px; color: #15803d; font-weight: 500; }

/* Password: show/hide, strength bar, checklist always visible */
.input-wrap { position: relative; }
.input-wrap input { padding-right: 46px; }
.toggle-password { position: absolute; right: 6px; top: 50%; translate: 0 -50%; width: 36px; height: 36px; display: grid;
  place-items: center; border: 0; border-radius: 8px; background: none; color: #94a3b8; cursor: pointer; }
.toggle-password:hover { color: #475569; background: #f1f5f9; }
.toggle-password:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(59,130,246,0.35); }
.toggle-password svg { width: 20px; height: 20px; }
.pw-strength { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.pw-strength span { flex: 1; height: 4px; border-radius: 4px; background: #e2e8f0; transition: background .25s; }
.pw-strength em { flex: none; min-width: 58px; text-align: right; font-style: normal; font-size: 12px; font-weight: 600; color: #64748b; }
.pw-strength[data-level="1"] span:nth-child(-n+1) { background: #ef4444; }
.pw-strength[data-level="2"] span:nth-child(-n+2) { background: #f59e0b; }
.pw-strength[data-level="3"] span:nth-child(-n+3) { background: #3b82f6; }
.pw-strength[data-level="4"] span { background: #16a34a; }
.pw-rules { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; margin-top: 8px; font-size: 12.5px; color: #64748b; }
.pw-rules li { display: flex; gap: 6px; align-items: baseline; transition: color .2s; }
.pw-rules li::before { content: '○'; font-size: 11px; color: #cbd5e1; }
.pw-rules li.is-met { color: #15803d; }
.pw-rules li.is-met::before { content: '✔'; color: #16a34a; }
.pw-tip { margin-top: 6px; font-size: 12px; color: #64748b; }

/* Consent */
.consent-check.is-invalid span { color: #b91c1c; }
.consent-check.is-invalid input { outline: 2px solid #ef4444; outline-offset: 1px; }
.consent-check + .field-error { margin: -12px 0 14px 27px; }

/* Submit: busy while the account is created */
.btn-submit.is-busy { cursor: progress; opacity: .85; }
.btn-submit.is-busy .btn-arrow { display: none; }
.btn-submit.is-busy .btn-text::before { content: ''; display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: btn-spin .8s linear infinite; }
@keyframes btn-spin { to { transform: rotate(360deg); } }

@media (max-width: 420px) {
  .name-row { grid-template-columns: 1fr; gap: 0; }
  .pw-rules { grid-template-columns: 1fr; }
}

/* ============ Email code, step 2 of 2 (verify.php) ============ */
.otp-boxes { display: flex; gap: 8px; justify-content: space-between; }
.otp-boxes input { width: 100%; min-width: 0; height: 56px; padding: 0; text-align: center; font-size: 22px; font-weight: 700;
  border: 1.5px solid #e2e8f0; border-radius: 10px; background: #f8fafc; color: #0f172a; font-family: 'Outfit', sans-serif; outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s; }
.otp-boxes input:focus { border-color: #3b82f6; background: #fff; box-shadow: 0 0 0 4px rgba(59,130,246,0.1); }
.otp-boxes input.is-filled { background: #fff; border-color: #94a3b8; }
.otp-boxes.is-invalid input { border-color: #ef4444; }
.otp-hint { margin-top: 8px; font-size: 12.5px; color: #64748b; }
.resend-row { margin-top: 22px; text-align: center; font-size: 13px; color: #64748b; }
.resend-row a { color: #3b82f6; font-weight: 700; text-decoration: none; }
.resend-row a:hover { text-decoration: underline; }
.done-icon { width: 56px; height: 56px; border-radius: 50%; background: #dcfce7; color: #16a34a; display: grid; place-items: center; margin-bottom: 18px; }
.done-icon svg { width: 28px; height: 28px; }
.next-steps { margin: 4px 0 24px; padding: 14px 16px; border-radius: 10px; background: #f8fafc; border: 1px solid #e2e8f0; font-size: 13px; color: #475569; line-height: 1.6; }
.next-steps ol { padding-left: 18px; }
.btn-link-plain { display: block; text-align: center; text-decoration: none; }

/* "Did you mean …@gmail.com? Use it" under the email box (2026-11-13) */
.field-error .email-fix { margin-left: 4px; padding: 2px 10px; border: 1px solid currentColor; border-radius: 999px; background: transparent;
  color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
.field-error .email-fix:hover { background: rgba(220, 38, 38, .08); }
