/* ==========================================================================
   Auth shell — shared by signin/signup/otp/forgot-password/reset/etc.
   Light, Apple-style theme on top of design-system.css tokens.
   ========================================================================== */

body.auth-body { min-height: 100vh; display: flex; flex-direction: column; background: var(--surface); }

.site-nav { padding: 16px 32px; background: rgba(246,250,249,0.85); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.site-nav .nav-inner { max-width: 1100px; margin: 0 auto; width: 100%; display: flex; align-items: center; justify-content: space-between; }
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-900); }
.nav-logo { width: 36px; height: 36px; background: var(--teal-700); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.nav-logo.purple { background: var(--teal-900); }
.nav-logo .icon { width: 20px; height: 20px; }
.nav-title { font-size: 13.5px; font-weight: 700; color: var(--text-900); }
.nav-right { font-size: 13.5px; color: var(--text-600); display: flex; align-items: center; gap: 6px; }
.nav-right a { color: var(--teal-700); text-decoration: none; font-weight: 700; }
.back-link { font-size: 13.5px; color: var(--teal-700); text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.back-link .icon { width: 15px; height: 15px; }

.page-center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-card, .otp-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 44px 40px;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-lg);
}
.otp-card { max-width: 460px; text-align: center; padding: 48px 40px; }

.card-icon {
  width: 56px; height: 56px;
  background: var(--teal-100);
  color: var(--teal-700);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
}
.card-icon .icon { width: 26px; height: 26px; }
.card-icon.success { background: var(--success-bg); color: var(--success); }
.card-icon.danger { background: var(--danger-bg); color: var(--danger); }
.card-icon.purple { background: var(--teal-100); color: var(--teal-900); }
.card-icon.round { border-radius: 50%; width: 72px; height: 72px; margin: 0 auto 20px; }
.card-icon.round .icon { width: 32px; height: 32px; }

.card-title { font-size: 23px; font-weight: 800; margin-bottom: 7px; color: var(--text-900); }
.card-sub { font-size: 14.5px; color: var(--text-600); margin-bottom: 28px; line-height: 1.6; }

.name-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-group { margin-bottom: 17px; text-align: left; }
.field-label { display: block; font-size: 12.5px; font-weight: 700; color: var(--text-700); margin-bottom: 7px; }
.field-input {
  width: 100%;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px 15px;
  color: var(--text-900);
  font-size: 14.5px;
  font-family: var(--font);
  outline: none;
  transition: 0.15s;
}
.field-input:focus { border-color: var(--teal-600); box-shadow: var(--shadow-focus); }
.field-input::placeholder { color: var(--text-400); }
.field-hint { font-size: 12px; color: var(--text-400); margin-top: 6px; }

.field-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.remember-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-600); }
.remember-row input { accent-color: var(--teal-600); width: 15px; height: 15px; cursor: pointer; }
.forgot-link { font-size: 13px; color: var(--teal-700); text-decoration: none; font-weight: 600; }
.forgot-link:hover { color: var(--teal-900); }

.alert-error, .alert-info, .alert-warn, .alert-success {
  border-radius: var(--r-sm); padding: 12px 16px; margin-bottom: 18px;
  font-size: 13.5px; display: flex; gap: 9px; align-items: flex-start; text-align: left;
}
.alert-error { background: var(--danger-bg); color: var(--danger); }
.alert-info { background: var(--info-bg); color: var(--teal-800); }
.alert-warn { background: var(--warning-bg); color: var(--warning); }
.alert-success { background: var(--success-bg); color: var(--success); }
.alert-error .icon, .alert-info .icon, .alert-warn .icon, .alert-success .icon { margin-top: 1px; flex-shrink: 0; }

.submit-btn {
  width: 100%; padding: 14px; border-radius: var(--r-full);
  background: var(--accent); border: none; color: #fff;
  font-size: 14.5px; font-weight: 700; cursor: pointer; transition: 0.2s;
  font-family: var(--font); display: flex; align-items: center; justify-content: center; gap: 8px;
}
.submit-btn:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(201,122,74,0.3); }
.submit-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.submit-btn.secondary { background: var(--teal-700); }
.submit-btn.secondary:hover { background: var(--teal-800); }

.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--text-400); font-size: 12px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.card-footer { text-align: center; font-size: 13.5px; color: var(--text-600); margin-top: 20px; }
.card-footer a { color: var(--teal-700); text-decoration: none; font-weight: 700; }
.resend-btn, .resend-row a { display: inline-block; font-size: 12.5px; color: var(--teal-700); text-decoration: none; font-weight: 700; }
.resend-row { margin-top: 20px; font-size: 13px; color: var(--text-600); text-align: center; }

.login-required-banner {
  background: var(--warning-bg); color: var(--warning);
  border-radius: var(--r-sm); padding: 13px 16px; margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px; font-size: 13.5px; text-align: left;
}

.admin-footnote { text-align: center; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.admin-footnote a { color: var(--text-400); font-size: 12.5px; text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.admin-footnote a:hover { color: var(--teal-700); }

/* ---- Password strength ---- */
.strength-bar { height: 4px; border-radius: 3px; background: var(--surface-alt); margin-top: 9px; overflow: hidden; }
.strength-fill { height: 100%; border-radius: 3px; transition: width 0.3s, background 0.3s; width: 0; }
.strength-label { font-size: 11.5px; margin-top: 5px; color: var(--text-400); font-weight: 600; }

/* ---- Terms checkbox row ---- */
.terms-row { display: flex; align-items: flex-start; gap: 10px; font-size: 12.5px; color: var(--text-600); margin-bottom: 16px; margin-top: 4px; text-align: left; }
.terms-row input { accent-color: var(--teal-600); width: 14px; height: 14px; margin-top: 2px; flex-shrink: 0; cursor: pointer; }
.terms-row a { color: var(--teal-700); text-decoration: none; font-weight: 600; }

/* ---- Registering-as selectable cards ---- */
.type-option-card {
  padding: 14px; border-radius: var(--r-sm); border: 2px solid var(--border);
  background: var(--surface); text-align: center; transition: 0.15s; cursor: pointer;
}
.type-option-card .icon { color: var(--teal-700); margin: 0 auto 6px; }
.type-option-card .type-name { font-size: 13px; font-weight: 700; color: var(--text-900); }
.type-option-card .type-sub { font-size: 11px; color: var(--text-400); margin-top: 1px; }
.type-option-card.selected { border-color: var(--teal-600); background: var(--teal-100); }
.type-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }

/* ---- Steps bar (OTP page) ---- */
.steps-bar { display: flex; align-items: center; justify-content: center; gap: 0; margin-bottom: 36px; }
.step-dot { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.step-circle {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--text-400);
  background: var(--white);
}
.step-circle .icon { width: 13px; height: 13px; }
.step-circle.done { border-color: var(--teal-600); background: var(--teal-600); color: #fff; }
.step-circle.active { border-color: var(--accent); background: var(--accent); color: #fff; }
.step-label { font-size: 9.5px; color: var(--text-400); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.step-line { width: 40px; height: 1px; background: var(--border-strong); margin: 0 4px; margin-bottom: 20px; }

/* ---- OTP digit boxes ---- */
.otp-boxes { display: flex; gap: 10px; justify-content: center; margin-bottom: 26px; }
.otp-box {
  width: 50px; height: 60px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  text-align: center;
  font-size: 21px; font-weight: 800;
  color: var(--text-900);
  outline: none; transition: 0.15s;
  font-family: var(--font);
  caret-color: transparent;
}
.otp-box:focus { border-color: var(--teal-600); background: var(--white); box-shadow: var(--shadow-focus); }
.otp-box.filled { border-color: var(--teal-500); background: var(--white); }

.otp-title { font-size: 22px; font-weight: 800; margin-bottom: 8px; color: var(--text-900); }
.otp-subtitle { font-size: 14px; color: var(--text-600); margin-bottom: 30px; line-height: 1.6; }

@media (max-width: 480px) {
  .name-row, .type-row { grid-template-columns: 1fr; }
  .auth-card, .otp-card { padding: 32px 24px; }
}
