/* ============================================================
   Alpha Finance – Register  |  Matches Login design system
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body, * {
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}
input, textarea, select {
  user-select: text;
  -webkit-user-select: text;
  -ms-user-select: text;
}

:root {
  --brand:          #548C92;
  --brand-2:        #285260;
  --brand-soft:     rgba(84, 140, 146, 0.10);
  --border:         rgba(0, 0, 0, 0.08);
  --border-brand:   rgba(84, 140, 146, 0.35);
  --text-primary:   #1c1c1c;
  --text-secondary: rgba(26, 26, 26, 0.60);
  --text-muted:     rgba(26, 26, 26, 0.40);
  --bg:             rgb(255, 252, 255);
  --card-bg:        #ffffff;
  --transition:     0.2s ease;
}

body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background-color: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  opacity: 0;
  animation: af-fadein 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes af-fadein { to { opacity: 1; } }
a { text-decoration: none; color: inherit; }

/* ── Topbar ──────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 3000;
  backdrop-filter: blur(10px);
  background: rgba(255, 252, 255, 0.88);
  border-bottom: 1px solid var(--border);
  width: 100%;
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; gap: 16px; max-width: 1200px; margin: 0 auto;
  flex-wrap: nowrap; position: relative;
}
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; flex: 0 0 auto; }
.brand-logo {
  width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--border); box-shadow: 0 8px 28px rgba(0,0,0,0.08);
}
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: -0.02em; color: var(--text-primary); }
.af-nav {
  display: flex; gap: 14px; align-items: center;
  position: absolute; left: 50%; transform: translateX(-50%);
}
.af-nav__link {
  color: var(--text-secondary); font-size: 14px; font-weight: 600;
  padding: 8px 10px; border-radius: 12px; border: 1px solid transparent;
  transition: background var(--transition), color var(--transition);
}
.af-nav__link:hover { background: rgba(0,0,0,0.04); color: var(--text-primary); }
.af-nav__link.is-active { background: var(--brand-soft); color: var(--brand-2); border-color: var(--border-brand); }
.topbar-auth { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.af-btn {
  padding: 8px 18px; border-radius: 999px; font-size: 13px; font-weight: 600;
  cursor: pointer; border: 2px solid var(--brand); background: transparent; color: var(--brand);
  transition: all 0.22s ease; display: inline-flex; align-items: center;
}
.af-btn--ghost:hover { background: var(--brand); color: #fff; }

/* Hamburger */
.af-nav-toggle {
  display: none; background: rgba(255,255,255,0.7); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 10px; cursor: pointer; color: rgba(26,26,26,0.75);
  line-height: 1; flex-shrink: 0; backdrop-filter: blur(10px); transition: background var(--transition);
}
.af-nav-toggle:hover { background: rgba(0,0,0,0.05); }
.af-nav-mobile {
  display: none; flex-direction: column;
  padding: 8px 12px 12px; border-top: 1px solid var(--border);
  background: rgba(255,252,255,0.97); backdrop-filter: blur(10px);
}
.af-nav-mobile .af-nav__link { display: block; padding: 11px 10px; border-radius: 10px; font-size: 14px; }
.af-nav-mobile .af-nav__link--cta {
  color: var(--brand); margin-top: 4px; border-color: var(--border-brand);
  background: var(--brand-soft); text-align: center;
}
.topbar.is-open .af-nav-mobile { display: flex; }
.topbar.is-open .af-nav-toggle { border-color: var(--border-brand); }

/* ── Main layout ─────────────────────────────────────────── */
main {
  min-height: calc(100vh - 65px - 42px);
  display: flex; justify-content: center; align-items: center;
  padding: 36px 24px 60px;
}

.register-wrapper {
  display: flex; justify-content: center; align-items: center;
  width: 100%; gap: 52px;
}

/* ── Side panel ──────────────────────────────────────────── */
.register-side {
  display: flex; flex-direction: column; justify-content: center;
  max-width: 240px; padding-top: 4px; flex-shrink: 0;
}
.register-side__wordmark {
  font-size: 34px; font-weight: 700; letter-spacing: -0.035em;
  line-height: 1; color: var(--brand); margin-bottom: 3px;
}
.register-side__sub {
  font-size: 12.5px; color: var(--text-muted); letter-spacing: 0.01em; margin-bottom: 22px;
}
.register-side__tagline {
  font-size: 15px; font-weight: 600; color: var(--text-primary);
  line-height: 1.5; margin-bottom: 18px; letter-spacing: -0.01em;
}
.register-side__section-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px;
}
.register-side__features { display: flex; flex-direction: column; gap: 9px; }
.register-feat {
  display: flex; align-items: center; gap: 9px;
  font-size: 12.5px; color: var(--text-secondary); font-weight: 500;
}
.register-feat__dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--brand); flex-shrink: 0;
}
.register-feat__dot--alt { background: var(--brand-2); }

/* ── Form card ───────────────────────────────────────────── */
.register-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 20px; box-shadow: 0 18px 44px rgba(0,0,0,0.09);
  padding: 36px 36px 30px; width: 100%; max-width: 460px;
  animation: card-drop 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes card-drop {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Step indicator ──────────────────────────────────────── */
.step-indicator {
  display: flex; align-items: center; gap: 0;
  margin-bottom: 8px;
}
.step-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border); border: 2px solid var(--border);
  transition: background 0.3s ease, border-color 0.3s ease;
  flex-shrink: 0;
}
.step-dot.active { background: var(--brand); border-color: var(--brand); }
.step-dot.done   { background: var(--brand); border-color: var(--brand); opacity: 0.45; }
.step-line {
  flex: 1; height: 2px; background: var(--border);
  margin: 0 6px; border-radius: 1px; max-width: 32px;
  transition: background 0.3s ease;
}
.step-line.done { background: var(--brand); }

.step-label {
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 14px;
}

/* ── Card headings ───────────────────────────────────────── */
.register-card__title {
  font-size: 21px; font-weight: 700; letter-spacing: -0.025em;
  color: var(--text-primary); margin-bottom: 4px;
}
.register-card__subtitle {
  font-size: 13.5px; color: var(--text-secondary); margin-bottom: 22px;
}

/* ── Form steps ──────────────────────────────────────────── */
.form-step { display: none; }
.form-step.active { display: block; }

.form-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 0;
}

/* ── Form groups ─────────────────────────────────────────── */
.form-group {
  display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px;
}
.form-group label {
  font-size: 12.5px; font-weight: 600; color: var(--text-secondary);
}
.form-group input,
.form-group select {
  padding: 10px 13px; border-radius: 12px;
  border: 1.5px solid var(--border);
  background: rgba(0,0,0,0.018);
  font-size: 13.5px; font-family: inherit; color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  width: 100%; appearance: none; -webkit-appearance: none;
}
.form-group input::placeholder { color: var(--text-muted); }
.form-group input:focus,
.form-group select:focus {
  outline: none; border-color: var(--brand); background: #fff;
  box-shadow: 0 0 0 3px rgba(84,140,146,0.13);
}

/* Valid / invalid field states */
.form-group input.valid   { border-color: rgba(24,128,56,0.5); }
.form-group input.invalid { border-color: rgba(217,48,37,0.45); }

/* ── Password toggle ─────────────────────────────────────── */
.password-container { position: relative; display: flex; align-items: center; width: 100%; }
.password-container input { padding-right: 44px !important; }
.toggle-password {
  position: absolute; right: 11px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 4px;
  width: 28px; height: 28px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition); z-index: 2; color: var(--text-muted);
}
.toggle-password:hover { background: rgba(0,0,0,0.05); color: var(--text-secondary); }
.toggle-password svg {
  width: 17px; height: 17px; stroke: currentColor;
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease;
}
.icon-eye-open  { opacity: 1; }
.icon-eye-closed { opacity: 0; }
.toggle-password.active .icon-eye-open  { opacity: 0; }
.toggle-password.active .icon-eye-closed { opacity: 1; }

/* ── Terms ───────────────────────────────────────────────── */
.terms-group {
  margin-top: 4px; margin-bottom: 14px;
}
.terms-label {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 12.5px; color: var(--text-secondary); cursor: pointer; line-height: 1.5;
}
.terms-label input[type="checkbox"] {
  width: 15px; height: 15px; margin-top: 1px;
  accent-color: var(--brand); cursor: pointer; flex-shrink: 0;
  padding: 0 !important;
}
.terms-link {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--brand); font-weight: 600; font-size: inherit;
  font-family: inherit; transition: color var(--transition);
}
.terms-link:hover { color: var(--brand-2); }

/* ── Error message ───────────────────────────────────────── */
.register-error {
  display: none; font-size: 12.5px; font-weight: 500;
  padding: 10px 13px; border-radius: 10px; margin-bottom: 14px;
  background: rgba(217,48,37,0.06); color: #c0392b;
  border: 1px solid rgba(217,48,37,0.14); line-height: 1.55;
}
.register-error.is-success {
  background: rgba(24,128,56,0.07); color: #1a7a3a;
  border-color: rgba(24,128,56,0.16);
}
.register-error.is-info {
  background: rgba(84,140,146,0.08); color: var(--brand-2);
  border-color: rgba(84,140,146,0.25);
}

/* ── Navigation buttons ──────────────────────────────────── */
.form-navigation {
  display: flex; gap: 10px; margin-bottom: 18px;
}
.nav-btn {
  flex: 1; padding: 11px 16px; border-radius: 999px; border: none;
  font-size: 14px; font-weight: 700; font-family: inherit;
  cursor: pointer; transition: background 0.22s ease, box-shadow 0.22s ease, transform 0.15s ease;
  letter-spacing: -0.01em;
}
.nav-btn--back {
  background: transparent; color: var(--text-secondary);
  border: 1.5px solid var(--border); flex: 0 0 auto; padding: 11px 20px;
}
.nav-btn--back:hover { background: rgba(0,0,0,0.04); color: var(--text-primary); }
.nav-btn--next,
.nav-btn--submit {
  background: var(--brand); color: #fff;
  box-shadow: 0 4px 14px rgba(84,140,146,0.28);
  position: relative; overflow: hidden;
}
.nav-btn--next::after,
.nav-btn--submit::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.10), transparent);
  pointer-events: none;
}
.nav-btn--next:hover,
.nav-btn--submit:hover {
  background: var(--brand-2); box-shadow: 0 6px 20px rgba(40,82,96,0.28);
  transform: translateY(-1px);
}
.nav-btn--next:active,
.nav-btn--submit:active { transform: translateY(0); }

/* ── Login / resend rows ─────────────────────────────────── */
.login-divider {
  display: flex; align-items: center; gap: 12px; margin-bottom: 12px;
}
.login-divider::before, .login-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.login-divider span { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

.login-row {
  text-align: center; font-size: 13.5px; margin-bottom: 8px;
}
.login-row a { color: var(--brand); font-weight: 700; transition: color var(--transition); }
.login-row a:hover { color: var(--brand-2); }

.resend-row {
  text-align: center; font-size: 12px;
}
.resend-row a { color: var(--text-muted); font-weight: 500; transition: color var(--transition); }
.resend-row a:hover { color: var(--brand); }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  position: fixed; bottom: 0; left: 0; right: 0; width: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 8px 24px 14px; background: var(--bg);
  border-top: 1px solid var(--border); z-index: 100;
}
.footer-links { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.footer-link { color: var(--text-muted); font-weight: 600; letter-spacing: 0.2px; transition: color var(--transition); }
.footer-link:hover { color: var(--brand); }
.footer-separator { width: 1px; height: 14px; background: rgba(0,0,0,0.12); display: inline-block; }

/* ── Modals ──────────────────────────────────────────────── */
.af-modal {
  display: none; position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,0.35); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; padding: 20px;
}
.af-modal.open { display: flex; }

.af-modal__content {
  background: #fff; border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.18);
  width: 100%; max-width: 560px; max-height: 80vh;
  display: flex; flex-direction: column;
  animation: modal-in 0.3s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.af-modal__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 16px; border-bottom: 1px solid var(--border);
}
.af-modal__header h3 {
  font-size: 16px; font-weight: 700; letter-spacing: -0.02em; color: var(--text-primary);
}
.af-modal__close {
  background: none; border: none; cursor: pointer; font-size: 22px;
  color: var(--text-muted); line-height: 1; padding: 2px 6px; border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}
.af-modal__close:hover { color: var(--text-primary); background: rgba(0,0,0,0.05); }

.af-modal__body {
  padding: 20px 24px 24px; overflow-y: auto; font-size: 13.5px;
  color: var(--text-secondary); line-height: 1.65;
}
.af-modal__body h4 {
  font-size: 13px; font-weight: 700; color: var(--text-primary);
  margin-top: 18px; margin-bottom: 6px; letter-spacing: -0.01em;
}
.af-modal__body h4:first-child { margin-top: 0; }
.af-modal__body p { margin-bottom: 8px; }
.af-modal__body ul { padding-left: 18px; margin-bottom: 8px; }
.af-modal__body li { margin-bottom: 3px; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 820px) {
  .register-side { display: none; }
  .register-wrapper { justify-content: center; }
}

@media (max-width: 600px) {
  .af-nav      { display: none; }
  .topbar-auth { display: none; }
  .af-nav-toggle { display: flex; align-items: center; justify-content: center; }
}

@media (max-width: 480px) {
  main { padding: 20px 14px 80px; align-items: flex-start; padding-top: 28px; }
  .register-card { padding: 24px 18px 20px; border-radius: 16px; }
  .register-card__title { font-size: 19px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .site-footer { padding: 6px 16px 10px; }
  .footer-links { gap: 8px; font-size: 11.5px; flex-wrap: wrap; justify-content: center; }
  .footer-separator { height: 12px; }
}

/* ── Custom Date Picker ──────────────────────────────────── */
.date-picker { position: relative; width: 100%; }

.date-picker__btn {
  width: 100%; display: flex; align-items: center; gap: 8px;
  padding: 10px 13px; border-radius: 12px;
  border: 1.5px solid var(--border);
  background: rgba(0,0,0,0.018);
  font-size: 13.5px; font-family: inherit; color: var(--text-muted);
  cursor: pointer; text-align: left;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.date-picker__btn.has-value { color: var(--text-primary); }
.date-picker__btn:focus,
.date-picker__btn.open {
  outline: none; border-color: var(--brand); background: #fff;
  box-shadow: 0 0 0 3px rgba(84,140,146,0.13);
}
.date-picker__btn svg { flex-shrink: 0; color: var(--text-muted); }

.dp-dropdown {
  display: none; position: absolute; top: calc(100% + 6px); left: 0;
  width: 260px; background: #fff;
  border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.12); z-index: 500;
  padding: 12px; animation: dp-in 0.18s cubic-bezier(0.22,1,0.36,1) both;
}
.dp-dropdown.open { display: block; }
@keyframes dp-in {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.dp-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px; gap: 6px;
}
.dp-arrow {
  width: 28px; height: 28px; border: none; background: none; cursor: pointer;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); transition: background var(--transition);
  flex-shrink: 0;
}
.dp-arrow:hover { background: var(--brand-soft); color: var(--brand); }

.dp-selects { display: flex; gap: 6px; flex: 1; justify-content: center; }
.dp-sel {
  border: 1px solid var(--border); border-radius: 8px;
  padding: 4px 24px 4px 8px; font-size: 12.5px; font-family: inherit;
  color: var(--text-primary); cursor: pointer;
  font-weight: 600;
  appearance: none; -webkit-appearance: none;
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 16 16' fill='none' stroke='%23999' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4,6 8,10 12,6'/%3E%3C/svg%3E")
    no-repeat right 6px center;
  transition: border-color var(--transition);
}
.dp-sel:focus { outline: none; border-color: var(--brand); }
#dp-month { min-width: 112px; }
#dp-year  { min-width: 82px; }

.dp-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  text-align: center; margin-bottom: 4px;
}
.dp-weekdays span {
  font-size: 10.5px; font-weight: 700; color: var(--text-muted);
  padding: 2px 0; letter-spacing: 0.03em;
}

.dp-days {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
}
.dp-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 500; border-radius: 7px; cursor: pointer;
  color: var(--text-primary); border: none; background: none;
  transition: background var(--transition), color var(--transition);
}
.dp-day:hover:not(.dp-day--empty):not(.dp-day--disabled) {
  background: var(--brand-soft); color: var(--brand);
}
.dp-day--today { font-weight: 700; color: var(--brand); }
.dp-day--selected { background: var(--brand) !important; color: #fff !important; border-radius: 7px; }
.dp-day--disabled { color: var(--text-muted); opacity: 0.4; cursor: default; }
.dp-day--empty { cursor: default; }

/* ── Styled select (gender) ──────────────────────────────── */
.form-group select {
  padding: 10px 36px 10px 13px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: rgba(0,0,0,0.018)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4,6 8,10 12,6'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  font-size: 13.5px; font-family: inherit; color: var(--text-primary);
  width: 100%; appearance: none; -webkit-appearance: none; cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
}
.form-group select:focus {
  outline: none; border-color: var(--brand); background-color: #fff;
  box-shadow: 0 0 0 3px rgba(84,140,146,0.13);
}
.form-group select option[value=""] { color: var(--text-muted); }

/* ── University partner banner (register form) ───────────── */
.reg-uni-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f0faf5;
  border: 1.5px solid #a8dfc0;
  border-radius: 14px;
  padding: 12px 14px;
  margin-top: -4px;
  margin-bottom: 4px;
  animation: af-fadein 0.3s ease forwards;
}
.reg-uni-banner__logo-wrap {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  display: flex; align-items: center; justify-content: center;
}
.reg-uni-banner__logo-wrap img {
  width: 100%; height: 100%; object-fit: contain;
}
.uni-initial-reg {
  font-size: 16px; font-weight: 700; color: var(--brand-2);
}
.reg-uni-banner__body {
  flex: 1;
  display: flex; flex-direction: column; gap: 3px;
}
.reg-uni-banner__name {
  font-size: 12.5px; font-weight: 700; color: #1a5c3a;
  line-height: 1.2;
}
.reg-uni-banner__badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 600; color: #1a7a3a;
}
.reg-uni-banner__chip {
  flex: 0 0 auto;
  background: #1a7a3a;
  color: #fff;
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 999px;
}
/* end of register.css */