/*
  LEDGER — auth.css
  IndiaGPT exact theme: hero-bg gradient, white card, navy, saffron #FF9933.
*/

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

/* Hero gradient from indiagpt.in */
body {
  font-family: 'Poppins', 'IBM Plex Sans', system-ui, sans-serif;
  background: linear-gradient(135deg, #0A2540 0%, #1e3a8a 50%, #FF9933 100%);
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  -webkit-font-smoothing: antialiased;
}

.auth-page {
  width: 100%;
  max-width: 420px;
}

/* White card — same as IndiaGPT contact modal */
.auth-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 32px 28px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
  animation: fade-up 0.4s ease both;
}

/* ── Logo ──────────────────────────────────────── */
.auth-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.5rem;
  /* Gradient text like IndiaGPT */
  background: linear-gradient(90deg, #FF9933, #F4D35E, #138808);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.logo-symbol {
  animation: pulse 4s ease-in-out infinite;
  -webkit-text-fill-color: #FF9933;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: .4
  }
}

.auth-tagline {
  font-size: 0.75rem;
  color: #6b7280;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0A2540;
  margin-bottom: 20px;
  line-height: 1.2;
}

/* ── Alert banners ─────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 18px;
  line-height: 1.5;
  border: 1px solid;
}

.alert.hidden {
  display: none;
}

.alert.error {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}

.alert.success {
  background: #f0fdf4;
  border-color: #86efac;
  color: #166534;
}

/* ── Form fields ───────────────────────────────── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.84rem;
  font-weight: 600;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 8px;
}

.label-hint {
  font-size: 0.74rem;
  color: #9ca3af;
  font-weight: 400;
}

.field input {
  background: #f9fafb;
  border: 1.5px solid #d1d5db;
  border-radius: 999px;
  padding: 12px 18px;
  color: #111827;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  outline: none;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

.field input::placeholder {
  color: #9ca3af;
}

.field input:focus {
  border-color: #FF9933;
  box-shadow: 0 0 0 3px rgba(255, 153, 51, 0.15);
  background: #ffffff;
}

/* Password eye toggle */
.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 48px;
}

.toggle-pw {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  padding: 4px;
  display: flex;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
}

.toggle-pw:hover {
  color: #374151;
}

.eye-icon {
  width: 18px;
  height: 18px;
}

/* Password strength bar */
.pw-strength {
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}

.pw-bar {
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: width .3s, background .3s;
}

.pw-bar.weak {
  background: #ef4444;
}

.pw-bar.ok {
  background: #f59e0b;
}

.pw-bar.strong {
  background: #10b981;
}

/* ── Submit button ─────────────────────────────── */
.auth-btn {
  margin-top: 4px;
  background: #FF9933;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 14px;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 4px 14px rgba(255, 153, 51, 0.4);
}

.auth-btn:hover {
  background: #e8890d;
  box-shadow: 0 6px 18px rgba(255, 153, 51, 0.5);
}

.auth-btn:active {
  transform: scale(0.97);
}

.auth-btn:disabled {
  background: #d1d5db;
  color: #9ca3af;
  cursor: not-allowed;
  box-shadow: none;
}

/* Spinner */
.spinner {
  width: 17px;
  height: 17px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.hidden {
  display: none !important;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Switch link ───────────────────────────────── */
.auth-switch {
  text-align: center;
  font-size: 0.88rem;
  color: #6b7280;
  margin-top: 20px;
}

.auth-switch a {
  color: #FF9933;
  text-decoration: none;
  font-weight: 600;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* ── Trust strip ───────────────────────────────── */
.trust-strip {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #e5e7eb;
}

.trust-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.78rem;
  color: #6b7280;
  line-height: 1.5;
}

.trust-icon {
  font-size: 0.9rem;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Animations ────────────────────────────────── */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Auth Modals (Security) ────────────────────── */
.modal-layer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 70;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.5);
}

.modal-layer.visible {
  display: flex;
}

.modal-content {
  background: #ffffff;
  border-radius: 12px;
  padding: 28px;
  width: 100%;
  max-width: 550px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
  animation: fade-up 0.3s ease both;
}

.modal-content h2 {
  font-size: 1.3rem;
  margin-bottom: 16px;
  color: #0A2540;
}

.modal-content p,
.modal-content li {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 12px;
  color: #374151;
}

.modal-close {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 20px;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  color: #111827;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
}

.modal-close:hover {
  background: #e5e7eb;
}

.security-section {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e5e7eb;
}

.security-section:last-of-type {
  border-bottom: none;
  margin-bottom: 8px;
}

.modal-content h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.modal-content ul {
  padding-left: 20px;
}

.modal-content li {
  margin-bottom: 6px;
}