html, body { height: 100%; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background: linear-gradient(135deg, #1a2a6c 0%, #4a6fa5 55%, #c8dff5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ════════════════════════════════
   DESKTOP: two-column wrapper
════════════════════════════════ */
.page-wrapper {
  width: 100%;
  max-width: 980px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  padding: 40px 48px;
}

/* ── Left: decorative branding ── */
.left-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 32px;
}

/* ── Right: stepped card ── */
.right-panel {
  width: 380px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Portal cards ── */
.portal-card {
  background: rgba(255,255,255,0.97);
  border-radius: 18px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  border: 2px solid transparent;
  box-shadow: 0 4px 20px rgba(0,0,0,0.13);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.portal-card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,0.18); }
.portal-card:active { transform: scale(0.98); }
.portal-card.admin:hover    { border-color: #93aef5; }
.portal-card.assessor:hover { border-color: #fcd34d; }

/* ── Form card ── */
.form-card {
  background: rgba(255,255,255,0.97);
  border-radius: 18px;
  padding: 26px 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.13);
}

/* ── Steps ── */
#step-portal { display: flex; flex-direction: column; gap: 10px; }
#step-form   { display: none; }
#step-otp    { display: none; }
#step-reset  { display: none; }

.otp-inputs { display: flex; gap: 8px; justify-content: center; margin: 18px 0 20px; }
.otp-input {
  width: 42px; height: 48px; border: 1.5px solid #e2e8f0;
  background: #f8faff; border-radius: 10px; text-align: center;
  font-size: 1.05rem; font-weight: 700; color: #1e293b;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.otp-input:focus {
  outline: none; border-color: #1a2a6c; background: #fff;
  box-shadow: 0 0 0 3px rgba(26,42,108,0.08);
}
.otp-input.is-invalid { border-color: #dc2626; background: #fef2f2; }
.otp-note { color: #1e293b; font-size: 0.75rem; line-height: 1.6; margin: 0; text-align: center; }
.resend-link {
  color: #1e293b; font-size: 0.75rem; font-weight: 700; background: none;
  border: none; cursor: pointer; padding: 0; transition: color 0.2s;
}
.resend-link:hover { color: #152059; text-decoration: underline; }
.resend-link:disabled { color: #94a3b8; cursor: not-allowed; text-decoration: none; }
.password-hint { color: #1e293b; font-size: 0.75rem; line-height: 1.5; margin: 5px 0 0; }

/* ── Animations ── */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.anim-up { animation: slideUp 0.32s cubic-bezier(0.22,1,0.36,1) both; }

/* ── Role badge ── */
.role-badge {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 11px; padding: 8px 13px; margin-bottom: 16px;
}
.role-badge.admin    { background: #eef1fb; }
.role-badge.assessor { background: #fef3c7; }

/* ── Input ── */
.sti-input {
  width: 100%;
  border: 1.5px solid #e2e8f0;
  background: #f8faff;
  border-radius: 12px;
  padding: 11px 14px 11px 38px;
  font-size: 0.82rem;
  color: #1e293b;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
/* The page has its own show/hide button; hide the browser's built-in one (Edge/IE) so it isn't doubled. */
.sti-input::-ms-reveal, .sti-input::-ms-clear { display: none; }
.sti-input:focus {
  outline: none; border-color: #1a2a6c;
  background: #fff; box-shadow: 0 0 0 3px rgba(26,42,108,0.08);
}
.sti-input:disabled { background: #f1f5f9; color: #cbd5e1; cursor: not-allowed; }

/* ── Buttons ── */
.btn-primary {
  width: 100%; padding: 13px; border: none; border-radius: 12px;
  font-weight: 700; font-size: 0.82rem; letter-spacing: 0.1em;
  text-transform: uppercase; cursor: pointer; color: white;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
}
.btn-primary.admin    { background: #1a2a6c; }
.btn-primary.admin:hover  { background: #152059; box-shadow: 0 8px 24px rgba(26,42,108,0.35); }
.btn-primary.admin:active { transform: scale(0.98); }
.btn-primary.assessor { background: #b45309; }
.btn-primary.assessor:hover { background: #b45309; box-shadow: 0 8px 24px rgba(180,83,9,0.35); }
.btn-primary.assessor:active { transform: scale(0.98); }

/* ── Back link ── */
.back-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.75rem; font-weight: 600; color: #1e293b;
  background: none; border: none; cursor: pointer; padding: 0;
  margin-bottom: 14px; transition: color 0.2s;
}
.back-link:hover { color: #1a2a6c; }

/* ── Input wrap ── */
.input-wrap { position: relative; }
.input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; }
.eye-btn { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: #94a3b8; padding: 0; transition: color 0.2s; }
.eye-btn:hover { color: #1a2a6c; }



/* ── Step dots ── */
.step-dots { display: flex; align-items: center; justify-content: center; gap: 6px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.3); transition: background 0.3s, transform 0.3s; }
.dot.active { background: white; transform: scale(1.3); }

/* ════════════════════════════════
   MOBILE (≤ 680px): single column,
   same step logic, no left panel
════════════════════════════════ */
@media (max-width: 680px) {
  body { align-items: flex-start; }

  .page-wrapper {
    flex-direction: column;
    align-items: stretch;
    padding: 36px 18px 40px;
    gap: 16px;
    min-height: 100vh;
  }

  /* Hide decorative left panel on mobile */
  .left-panel { display: none; }

  /* Right panel becomes full width */
  .right-panel { width: 100%; }

  /* Show mobile header instead */
  .mobile-header { display: flex !important; }
}
