:root {
  --auth-accent: var(--color-primary, #f57f4b);
  --auth-accent-soft: rgba(245, 127, 75, 0.08);
  --auth-accent-light: rgba(245, 127, 75, 0.15);
}

/* ── Card ── */
.auth-card {
  max-width: 620px;
  margin: 0 auto;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.06);
}

.auth-card-header {
  background: linear-gradient(135deg, var(--auth-accent) 0%, #e06a2e 100%);
  padding: 28px 36px 22px;
  text-align: center;
}

.auth-card-header h4 {
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}

.auth-card-header p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  margin: 6px 0 0;
}

.auth-card-body {
  padding: 36px;
}

/* ── Tabs ── */
.auth-tabs {
  display: flex;
  background: var(--bg-light, #f5f6fa);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 28px;
  border: none;
}

.auth-tabs .nav-link {
  flex: 1;
  text-align: center;
  border: none;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-medium, #8d8d8d);
  background: transparent;
  transition: all 0.25s ease;
  cursor: pointer;
}

.auth-tabs .nav-link i {
  display: block;
  font-size: 22px;
  margin-bottom: 4px;
}

.auth-tabs .nav-link.active {
  background: #fff;
  color: var(--auth-accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.auth-tabs .nav-link:not(.active):hover {
  color: var(--color-dark, #2b3138);
}

/* ── Tab panels ── */
.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.tab-pane.slide-in {
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Icon inputs ── */
.input-icon-wrap {
  position: relative;
}

.input-icon-wrap .input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-medium, #8d8d8d);
  font-size: 15px;
  z-index: 2;
  pointer-events: none;
  transition: color 0.2s;
}

.input-icon-wrap .form-control {
  padding-left: 44px;
  height: 52px;
  font-size: 14px;
  border: 1.5px solid var(--border-color, #eaeaea);
  border-radius: 10px;
  background: var(--bg-light, #f5f6fa);
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background 0.2s;
}

.input-icon-wrap .form-control:focus {
  background: #fff;
  border-color: var(--auth-accent);
  box-shadow: 0 0 0 3px var(--auth-accent-soft);
}

.input-icon-wrap .form-control.is-invalid {
  border-color: var(--color-red, #eb4c4c);
  box-shadow: 0 0 0 3px rgba(235, 76, 76, 0.08);
}

.input-icon-wrap:focus-within .input-icon {
  color: var(--auth-accent);
}

/* ── Password toggle ── */
.password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-medium, #8d8d8d);
  cursor: pointer;
  font-size: 15px;
  padding: 4px;
  z-index: 2;
}

.password-toggle:hover {
  color: var(--color-dark, #2b3138);
}

/* ── Password strength ── */
.password-strength {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.password-strength .bar {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: var(--border-color, #eaeaea);
  transition: background 0.3s;
}

.password-strength .bar.active.weak {
  background: var(--color-red, #eb4c4c);
}

.password-strength .bar.active.medium {
  background: var(--color-yellow, #fdc040);
}

.password-strength .bar.active.strong {
  background: var(--color-green, #00d5ae);
}

.password-strength-label {
  font-size: 12px;
  margin-top: 4px;
  text-align: right;
}

/* ── OTP ── */
.otp-boxes {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 16px 0 8px;
}

.otp-boxes input {
  width: 48px;
  height: 52px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  border: 1.5px solid var(--border-color, #eaeaea);
  border-radius: 10px;
  background: var(--bg-light, #f5f6fa);
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.otp-boxes input:focus {
  border-color: var(--auth-accent);
  box-shadow: 0 0 0 3px var(--auth-accent-soft);
  background: #fff;
}

.otp-boxes input.filled {
  border-color: var(--color-green, #00d5ae);
  background: rgba(0, 213, 174, 0.05);
}

/* ── OTP actions row ── */
.otp-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.otp-actions .btn-otp {
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  padding: 10px 20px;
  border: none;
  transition: all 0.2s;
  min-width: 120px;
}

.btn-send-otp {
  background: var(--auth-accent-soft, rgba(245, 127, 75, 0.08));
  color: var(--auth-accent);
}

.btn-send-otp:hover:not(:disabled) {
  background: var(--auth-accent-light, rgba(245, 127, 75, 0.15));
}

.btn-send-otp:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-verify-otp {
  background: var(--auth-accent);
  color: #fff;
}

.btn-verify-otp:hover:not(:disabled) {
  filter: brightness(0.92);
}

.btn-verify-otp:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-verified {
  background: var(--color-green, #00d5ae) !important;
  color: #fff !important;
  pointer-events: none;
}

.otp-status {
  font-size: 13px;
  font-weight: 500;
  margin-top: 6px;
  text-align: center;
}

/* ── Submit ── */
.btn-submit {
  height: 52px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  border: none;
  background: var(--auth-accent);
  color: #fff;
  transition: all 0.25s;
}

.btn-submit:hover:not(:disabled) {
  filter: brightness(0.92);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245, 127, 75, 0.25);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Footer links ── */
.auth-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color, #eaeaea);
  font-size: 14px;
  color: var(--color-medium, #8d8d8d);
}

.auth-footer a {
  color: var(--auth-accent);
  font-weight: 600;
}

/* ── Error messages ── */
.input-error {
  font-size: 12.5px;
  color: var(--color-red, #eb4c4c);
  margin-top: 6px;
  padding-left: 2px;
}

/* ── Phone Verified Badge & Readonly Lock ── */
.phone-verified-badge {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 213, 174, 0.1);
  color: var(--color-green, #00d5ae);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 3;
  pointer-events: none;
  animation: badgeScaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  box-shadow: 0 2px 8px rgba(0, 213, 174, 0.15);
}

.phone-verified-badge i {
  font-size: 13px;
}

.input-icon-wrap input[readonly] {
  background-color: rgba(0, 213, 174, 0.02) !important;
  border-color: var(--color-green, #00d5ae) !important;
  color: var(--color-dark, #2b3138) !important;
  cursor: not-allowed;
  box-shadow: none !important;
  padding-right: 100px; /* Make space for the badge */
}

@keyframes badgeScaleIn {
  0% {
    opacity: 0;
    transform: translateY(-50%) scale(0.7);
  }
  100% {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}
