/* ============================================
   AUTH PAGES — Modern Design System
   Login, Register, Forgot/Reset Password, Verify
   ============================================ */

/* ---------- Base ---------- */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f0fdfa;
  color: #0f172a;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Shell & Layout ---------- */
.auth-shell {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  background: linear-gradient(160deg, #f0fdfa 0%, #ffffff 40%, #f0fdfa 100%);
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

.auth-shell .container-fluid {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.auth-hero {
  position: relative;
  overflow: hidden;
}

.auth-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(15, 23, 42, 0.82) 0%,
    rgba(15, 23, 42, 0.45) 40%,
    rgba(15, 23, 42, 0.15) 70%,
    rgba(15, 23, 42, 0.05) 100%
  );
  z-index: 1;
}

/* Light gradient fallback when no image is set */
.auth-hero--no-image {
  background: linear-gradient(160deg, #e0f7f4 0%, #b2dfdb 30%, #80cbc4 60%, #e0f2f1 100%) !important;
}

.auth-hero--no-image::after {
  background: linear-gradient(160deg, rgba(224, 242, 241, 0.3) 0%, rgba(178, 223, 219, 0.2) 100%);
}

.auth-hero--no-image .auth-hero-content {
  color: #0f172a;
}

.auth-hero--no-image .auth-hero-badge {
  background: rgba(13, 148, 136, 0.12);
  color: #0d9488;
  border-color: rgba(13, 148, 136, 0.2);
}

.auth-hero--no-image .auth-hero-info-item {
  color: #334155;
}

.auth-hero--no-image .auth-hero-info-item i {
  color: #0d9488;
}

.auth-hero--no-image h1 {
  color: #0f172a;
}

.auth-hero--no-image p {
  color: #475569 !important;
}

.auth-hero > * { position: relative; z-index: 2; }

.auth-hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 3rem;
  z-index: 2;
  color: #fff;
}

.auth-panel {
  max-width: 520px;
}

/* ---------- Card ---------- */
.auth-card {
  background: #ffffff;
  border: 1px solid rgba(20, 184, 166, 0.12);
  border-radius: 0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 20px 50px -12px rgba(13, 148, 136, 0.08);
  padding: 28px 32px;
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #14b8a6, #5eead4, #14b8a6);
  background-size: 200% 100%;
  animation: auth-gradient-shift 3s ease infinite;
}

@keyframes auth-gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ---------- Typography ---------- */
.auth-title {
  font-weight: 700;
  color: #0f172a;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
}

/* ---------- Form ---------- */
.auth-form .mb-3 {
  margin-bottom: 1.25rem;
}

.auth-form .form-check-input {
  cursor: pointer;
  border-color: #cbd5e1;
  width: 18px;
  height: 18px;
  border-radius: 0;
}

.auth-form .form-check-input:checked {
  background-color: #14b8a6;
  border-color: #14b8a6;
}

.auth-form label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}

/* ---------- Inputs ---------- */
.auth-input {
  border: 1.5px solid #d1d5db;
  border-radius: 0;
  overflow: hidden;
  background: #ffffff !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input .input-group-text {
  border: 0;
  background: #ffffff !important;
  color: #94a3b8;
  min-height: 46px;
  padding: 0 12px 0 14px;
  font-size: 15px;
}

.auth-input .form-control,
.auth-input .ds-input {
  border: 0 !important;
  padding: 0.5rem 0.75rem 0.5rem 0 !important;
  min-height: 46px;
  font-size: 14px;
  color: #1e293b !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  box-shadow: none !important;
  transition: none;
}

.auth-input .form-control:focus,
.auth-input .ds-input:focus {
  box-shadow: none !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  outline: none !important;
}

/* ---------- Autofill Override ---------- */
.auth-input .form-control:-webkit-autofill,
.auth-input .form-control:-webkit-autofill:hover,
.auth-input .form-control:-webkit-autofill:focus,
.auth-input .form-control:-webkit-autofill:active,
.auth-input .ds-input:-webkit-autofill,
.auth-input .ds-input:-webkit-autofill:hover,
.auth-input .ds-input:-webkit-autofill:focus,
.auth-input .ds-input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  box-shadow: 0 0 0 1000px #ffffff inset !important;
  -webkit-text-fill-color: #1e293b !important;
  background-color: #ffffff !important;
  transition: background-color 5000s ease-in-out 0s;
}

.auth-input:focus-within {
  border-color: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

.auth-input:focus-within .input-group-text {
  color: #14b8a6;
}

/* ---------- Buttons ---------- */
.auth-cta {
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%) !important;
  border: none !important;
  border-radius: 0 !important;
  min-height: 46px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 14px rgba(20, 184, 166, 0.3);
  transition: all 0.2s ease;
  color: #fff !important;
}

.auth-cta:hover {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%) !important;
  box-shadow: 0 6px 20px rgba(20, 184, 166, 0.4);
  transform: translateY(-1px);
}

.auth-cta:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(20, 184, 166, 0.3);
}

.auth-cta-alt {
  border: 1.5px dashed #e2e8f0;
  border-radius: 0;
  padding: 14px;
  transition: border-color 0.2s ease;
}

.auth-cta-alt:hover {
  border-color: #14b8a6;
}

/* ---------- Links ---------- */
.auth-link a,
.auth-card a {
  color: #0d9488;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease;
}

.auth-card a:hover {
  color: #14b8a6;
  text-decoration: underline;
}

.auth-meta {
  color: #94a3b8;
  font-size: 13px;
}

/* ---------- OTP Timer ---------- */
.auth-otp-timer {
  color: #374151;
  font-weight: 600;
}

#send-otp-btn.disabled,
#send-otp-btn:disabled {
  background: #94a3b8 !important;
  border-color: #94a3b8 !important;
  color: #fff !important;
  pointer-events: none;
  box-shadow: none;
  opacity: 0.7;
}

#send-otp-btn.disabled:hover,
#send-otp-btn:disabled:hover {
  background: #94a3b8 !important;
  border-color: #94a3b8 !important;
}

/* ---------- Logo Pill ---------- */
.auth-logo-pill {
  width: 72px;
  height: 72px;
  border-radius: 0;
  border: 1.5px solid rgba(20, 184, 166, 0.15);
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-logo-pill:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 32px rgba(13, 148, 136, 0.15);
}

/* ---------- Hero Badge ---------- */
.auth-hero-badge {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  border-radius: 999px;
  padding: 8px 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ---------- Hero Info Items ---------- */
.auth-hero-info {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 20px;
}

.auth-hero-info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
}

.auth-hero-info-item i {
  color: #5eead4;
  width: 18px;
  text-align: center;
}

/* ---------- Page Icon (secondary pages) ---------- */
.auth-page-icon {
  width: 56px;
  height: 56px;
  border-radius: 0;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.1) 0%, rgba(13, 148, 136, 0.05) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.auth-page-icon i {
  font-size: 22px;
  color: #14b8a6;
}

/* ---------- Divider ---------- */
.auth-divider {
  position: relative;
  text-align: center;
  margin: 24px 0;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e2e8f0;
}

.auth-divider span {
  position: relative;
  background: #fff;
  padding: 0 16px;
  color: #94a3b8;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

/* ---------- Form Status Messages ---------- */
.auth-card .alert {
  border-radius: 0;
  border: none;
  font-size: 13px;
  padding: 10px 16px;
}

.auth-card .alert-success {
  background: rgba(20, 184, 166, 0.08);
  color: #0d9488;
}

.auth-card .alert-danger {
  background: rgba(239, 68, 68, 0.08);
  color: #dc2626;
}

.auth-card .alert-warning {
  background: rgba(245, 158, 11, 0.08);
  color: #d97706;
}

/* ---------- Home Button ---------- */
.auth-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 0;
  background: rgba(20, 184, 166, 0.08);
  color: #0d9488;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(20, 184, 166, 0.15);
  transition: all 0.2s ease;
}

.auth-home-btn:hover {
  background: rgba(20, 184, 166, 0.15);
  color: #0f766e;
  text-decoration: none;
}

/* ---------- Footer ---------- */
.auth-footer {
  padding: 20px 0;
  text-align: center;
  color: #94a3b8;
  font-size: 12px;
}

.auth-footer a {
  color: #64748b;
  text-decoration: none;
}

.auth-footer a:hover {
  color: #14b8a6;
}

/* ---------- Select Input ---------- */
.auth-card select.form-select,
.auth-card select.ds-select {
  border: 1.5px solid #d1d5db;
  border-radius: 0;
  min-height: 46px;
  font-size: 14px;
  color: #1e293b;
  padding: 0 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-card select.form-select:focus,
.auth-card select.ds-select:focus {
  border-color: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .auth-card {
    padding: 28px 24px;
    border-radius: 0;
  }
  .auth-panel {
    max-width: 100%;
    padding: 16px !important;
  }
  .auth-title {
    font-size: 20px;
  }
}

@media (max-width: 575px) {
  .auth-card {
    padding: 24px 20px;
    border-radius: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  }
  .auth-logo-pill {
    width: 60px;
    height: 60px;
  }
}

/* ---------- Field Validation Errors ---------- */
.auth-field-error {
  margin-top: 6px;
  padding: 0;
  list-style: none;
}

.auth-field-error-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  margin-top: 4px;
  background: rgba(239, 68, 68, 0.06);
  border-left: 3px solid #ef4444;
  border-radius: 0 4px 4px 0;
  font-size: 12.5px;
  font-weight: 500;
  color: #dc2626;
  line-height: 1.4;
}

.auth-field-error-item i {
  font-size: 11px;
  color: #ef4444;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Rate-limit / lockout alert */
.auth-lockout-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
  background: rgba(239, 68, 68, 0.07);
  border: 1px solid rgba(239, 68, 68, 0.18);
  border-left: 4px solid #ef4444;
  border-radius: 0 6px 6px 0;
  font-size: 13px;
  font-weight: 500;
  color: #dc2626;
  line-height: 1.4;
}

.auth-lockout-alert i {
  font-size: 15px;
  color: #ef4444;
  flex-shrink: 0;
}
