/* =====================================================
   SahiHisab — Login/Registration Redesign
   Mobile-first (375px), high contrast, clear typography
   Uses body .class specificity. No !important.
   ===================================================== */


/* ─────────────────────────────────────────────────────
   1. LOGIN WRAPPER — Full-screen dark gradient
   ───────────────────────────────────────────────────── */

body .sh-login-wrap {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: linear-gradient(
    170deg,
    var(--primary-950) 0%,
    var(--primary-900) 45%,
    hsl(205, 70%, 14%) 100%
  );
  position: relative;
  overflow: hidden;
}

/* Subtle texture overlay */
body .sh-login-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 20% 80%,
    hsla(200, 80%, 44%, 0.08) 0%,
    transparent 50%
  ),
  radial-gradient(
    circle at 80% 20%,
    hsla(200, 80%, 44%, 0.05) 0%,
    transparent 40%
  );
  pointer-events: none;
}

body .sh-login-inner {
  width: 100%;
  max-width: 400px;
  position: relative;
  z-index: 1;
}


/* ─────────────────────────────────────────────────────
   2. BRANDING — Logo + Title
   ───────────────────────────────────────────────────── */

body .sh-login-brand {
  text-align: center;
  margin-bottom: 32px;
}

body .sh-login-logo {
  width: 64px;
  height: 64px;
  background: hsla(0, 0%, 100%, 0.06);
  border: 1.5px solid hsla(0, 0%, 100%, 0.1);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

body .sh-login-logo .material-symbols-rounded {
  font-size: 1.8rem;
  color: var(--primary-300);
}

body .sh-login-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: white;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

body .sh-login-subtitle {
  font-size: 0.88rem;
  color: hsla(0, 0%, 100%, 0.45);
  font-weight: 500;
}

body .sh-login-tagline {
  color: hsla(0, 0%, 100%, 0.55);
  font-size: 0.82rem;
  margin-top: 6px;
}


/* ─────────────────────────────────────────────────────
   3. AUTH CARD — The main login/register form
   ───────────────────────────────────────────────────── */

body .sh-auth-card {
  background: var(--card);
  border-radius: 20px;
  padding: 28px 22px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.25),
    0 4px 20px rgba(0, 0, 0, 0.1);
}

body .sh-auth-card h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 4px;
  color: var(--text-primary);
}

body .sh-auth-card .sh-auth-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 24px;
}


/* ─────────────────────────────────────────────────────
   4. FORM FIELDS — Large, clear, mobile-optimized
   ───────────────────────────────────────────────────── */

body .sh-auth-card .form-group {
  margin-bottom: 16px;
}

body .sh-auth-card .form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

body .sh-auth-card .form-control {
  height: 52px;
  font-size: 1.05rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  background: var(--background);
  color: var(--text-primary);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body .sh-auth-card .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--glow-primary);
  outline: none;
}

/* PIN input — centered, large, spaced */
body .sh-auth-card .sh-pin-input {
  font-size: 1.4rem;
  text-align: center;
  letter-spacing: 8px;
  font-weight: 700;
  padding: 12px;
}

/* Phone input — slightly larger */
body .sh-auth-card .sh-phone-input {
  font-size: 1.15rem;
  text-align: center;
  letter-spacing: 2px;
}


/* ─────────────────────────────────────────────────────
   5. BUTTONS — Large tap targets
   ───────────────────────────────────────────────────── */

body .sh-auth-card .btn-block {
  min-height: 52px;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: var(--radius-md);
}

body .sh-auth-card .sh-auth-link {
  text-align: center;
  font-size: 0.85rem;
  margin-top: 12px;
}

body .sh-auth-card .sh-auth-link a {
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

body .sh-auth-card .sh-auth-link a:active {
  color: var(--primary-700);
}


/* ─────────────────────────────────────────────────────
   6. OTP SUCCESS BANNER
   ───────────────────────────────────────────────────── */

body .sh-otp-success {
  background: var(--success-light);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 20px;
  text-align: center;
  border: 1px solid hsla(142, 70%, 45%, 0.15);
}

body .sh-otp-success p {
  margin: 0;
  color: hsl(142, 72%, 29%);
  font-size: 0.85rem;
  font-weight: 500;
}


/* ─────────────────────────────────────────────────────
   7. ERROR BANNER
   ───────────────────────────────────────────────────── */

body .sh-auth-error {
  padding: 12px 14px;
  background: var(--danger-light);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: hsl(0, 72%, 38%);
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid hsla(0, 72%, 51%, 0.1);
}


/* ─────────────────────────────────────────────────────
   8. PLAN CARDS (below login)
   ───────────────────────────────────────────────────── */

body .sh-plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 20px;
}

body .sh-plan-card {
  background: hsla(0, 0%, 100%, 0.06);
  border: 1px solid hsla(0, 0%, 100%, 0.08);
  border-radius: 14px;
  padding: 14px 10px;
  text-align: center;
  backdrop-filter: blur(8px);
}

body .sh-plan-card.featured {
  border-color: var(--primary-400);
  background: hsla(200, 80%, 44%, 0.1);
}

body .sh-plan-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: hsla(0, 0%, 100%, 0.85);
  margin-bottom: 4px;
}

body .sh-plan-card.featured .sh-plan-name {
  color: var(--primary-300);
}

body .sh-plan-price {
  font-size: 0.78rem;
  color: hsla(0, 0%, 100%, 0.45);
  margin-bottom: 4px;
}

body .sh-plan-desc {
  font-size: 0.72rem;
  color: hsla(0, 0%, 100%, 0.35);
}


/* ─────────────────────────────────────────────────────
   9. REGISTRATION FORM EXTRAS
   ───────────────────────────────────────────────────── */

body .sh-flipix-banner {
  background: var(--primary-50);
  border: 1px solid var(--primary-200);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

body .sh-flipix-banner .material-symbols-rounded {
  font-size: 1.2rem;
  color: var(--primary);
}

body .sh-flipix-banner p {
  font-size: 0.82rem;
  color: var(--primary-700);
  margin: 0;
}

body .sh-step-indicator {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

body .sh-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray-200);
  transition: background 0.2s ease, transform 0.2s ease;
}

body .sh-step-dot.active {
  background: var(--primary);
  transform: scale(1.3);
}

body .sh-step-dot.done {
  background: var(--success);
}


/* ─────────────────────────────────────────────────────
   10. OFFLINE SCREEN
   ───────────────────────────────────────────────────── */

body .sh-offline-wrap {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(
    180deg,
    var(--primary-950) 0%,
    var(--primary-900) 60%,
    hsl(205, 70%, 16%) 100%
  );
}

body .sh-offline-content {
  width: 100%;
  max-width: 400px;
  text-align: center;
}

body .sh-offline-icon {
  width: 68px;
  height: 68px;
  background: hsla(0, 0%, 100%, 0.08);
  border: 1.5px solid hsla(0, 0%, 100%, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}


/* ─────────────────────────────────────────────────────
   11. DESKTOP ENHANCEMENTS (768px+)
   ───────────────────────────────────────────────────── */

@media (min-width: 768px) {
  body .sh-login-wrap {
    padding: 40px;
  }

  body .sh-login-logo {
    width: 72px;
    height: 72px;
    border-radius: 22px;
  }

  body .sh-login-title {
    font-size: 2rem;
  }

  body .sh-auth-card {
    padding: 36px 32px;
    border-radius: 24px;
  }

  body .sh-auth-card .form-control {
    height: 56px;
    font-size: 1.1rem;
  }
}


/* ─────────────────────────────────────────────────────
   12. DARK MODE OVERRIDES
   ───────────────────────────────────────────────────── */

html[data-theme="dark"] body .sh-auth-card {
  background: var(--card);
  border: 1px solid var(--border);
}

html[data-theme="dark"] body .sh-auth-card .form-control {
  background: var(--surface-muted);
  border-color: var(--border);
}
