/* AUTH LAYOUT */
.auth-body { background: var(--bg); min-height: 100vh; }

.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* ── LEFT PANEL ── */
.auth-left {
  position: relative;
  background: #111c1a;
  overflow: hidden;
  display: flex; flex-direction: column;
}

/* Photo-style background for login */
.auth-left::before {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(160deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.55) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='800' height='900'%3E%3Crect width='800' height='900' fill='%23162220'/%3E%3Cellipse cx='350' cy='500' rx='280' ry='350' fill='%230d3d33' opacity='0.6'/%3E%3Cellipse cx='600' cy='200' rx='200' ry='180' fill='%230a2e27' opacity='0.4'/%3E%3C/svg%3E");
  background-size: cover; background-position: center;
  z-index: 0;
}

.auth-left--teal { background: var(--teal-dark); }
.auth-left--teal::before {
  background: linear-gradient(160deg, rgba(0,80,65,0.5) 0%, rgba(0,60,48,0.7) 100%);
}

.auth-left-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 60%);
}

.auth-left-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  height: 100%; padding: 2.5rem;
}

/* Logo */
.auth-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Sora', sans-serif; font-weight: 700; font-size: 1.2rem;
  color: white; margin-bottom: auto;
}
.auth-logo--white { color: white; }
.auth-logo-icon {
  width: 36px; height: 36px; background: rgba(255,255,255,0.15);
  border-radius: 10px; display: grid; place-items: center;
  backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.2);
}
.auth-logo-icon--white {
  background: white;
}

/* Hero text */
.auth-left-hero {
  margin-top: auto; padding-bottom: 1.5rem;
}
.auth-left-hero h1 {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 800; color: white; line-height: 1.1;
  margin-bottom: 1rem;
}
.auth-left-hero p {
  color: rgba(255,255,255,0.7);
  font-size: 1rem; line-height: 1.65; max-width: 340px;
}
.auth-left-hero--teal h1 { color: white; }
.auth-left-hero--teal p { color: rgba(255,255,255,0.75); }

/* Trust bar */
.auth-trust-bar {
  display: flex; align-items: center; gap: 12px;
  padding-top: 2rem; flex-wrap: wrap;
}
.trust-item {
  display: flex; align-items: center; gap: 6px;
  color: rgba(255,255,255,0.6); font-size: 0.82rem;
}
.trust-sep { color: rgba(255,255,255,0.25); }

/* Glowing orb */
.auth-orb {
  position: absolute; bottom: -80px; right: -60px;
  width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(13,158,130,0.4) 0%, transparent 70%);
  z-index: 1; animation: float 6s ease-in-out infinite;
}

/* Signup features */
.signup-features {
  display: flex; flex-direction: column; gap: 1.25rem;
  margin-top: 2rem;
}
.signup-feature {
  display: flex; gap: 12px; align-items: flex-start;
}
.sf-icon {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: rgba(255,255,255,0.15);
  display: grid; place-items: center;
  color: white; border: 1px solid rgba(255,255,255,0.2);
}
.signup-feature h4 {
  font-family: 'Sora', sans-serif; font-size: 0.9rem;
  font-weight: 700; color: white; margin-bottom: 3px;
}
.signup-feature p {
  font-size: 0.82rem; color: rgba(255,255,255,0.65); line-height: 1.5;
}

/* Signup image preview */
.signup-img-preview {
  margin-top: 2rem;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 1.25rem;
  display: flex; align-items: center; justify-content: center;
}
.sip-inner {
  display: flex; align-items: center; gap: 1rem;
}
.sip-qr {
  background: rgba(255,255,255,0.1); border-radius: 10px; padding: 12px;
}

/* ── RIGHT PANEL ── */
.auth-right {
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  padding: 3rem 2rem;
  overflow-y: auto;
}
.auth-form-wrap { width: 100%; max-width: 420px; }

.auth-form-header { margin-bottom: 2rem; }
.auth-form-header h2 {
  font-size: 2rem; font-weight: 700; margin-bottom: 0.4rem;
}
.auth-form-header p { color: var(--text-2); font-size: 0.95rem; }

/* Form elements */
.auth-form { display: flex; flex-direction: column; gap: 1.1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }

.form-label {
  font-size: 0.88rem; font-weight: 600; color: var(--text-2);
}

.input-wrap { position: relative; }
.input-wrap .form-input { padding-right: 3rem; }

.form-input {
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.82rem 1rem;
  font-family: 'DM Sans', sans-serif; font-size: 0.95rem; color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13,158,130,0.1);
}
.form-input::placeholder { color: var(--text-muted); }

.pw-label-row {
  display: flex; justify-content: space-between; align-items: center;
}
.forgot-link {
  font-size: 0.85rem; font-weight: 600; color: var(--teal);
  transition: opacity 0.2s;
}
.forgot-link:hover { opacity: 0.75; }

.pw-toggle {
  position: absolute; right: 0.85rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); display: flex; align-items: center;
  padding: 0; transition: color 0.2s;
}
.pw-toggle:hover { color: var(--teal); }

/* Remember me */
.remember-row {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
}
.remember-check {
  width: 18px; height: 18px; border-radius: 4px;
  accent-color: var(--teal); cursor: pointer;
}
.remember-label { font-size: 0.9rem; color: var(--text-2); }

/* Submit */
.auth-submit {
  width: 100%; justify-content: center;
  padding: 0.9rem; font-size: 1rem;
  margin-top: 0.5rem;
}

/* Password strength */
.pw-hint {
  font-size: 0.78rem; color: var(--text-muted); margin-top: 4px;
  transition: color 0.3s;
}
.pw-strength {
  height: 4px; background: var(--border); border-radius: 2px; margin-top: 6px; overflow: hidden;
}
.pw-bar {
  height: 100%; border-radius: 2px;
  width: 0%; transition: width 0.3s, background 0.3s;
}

/* Terms */
.auth-terms {
  font-size: 0.82rem; color: var(--text-muted); text-align: center;
  line-height: 1.6;
}
.auth-terms a { color: var(--teal); font-weight: 500; }

/* Switch link */
.auth-switch {
  text-align: center; margin-top: 1.5rem;
  font-size: 0.9rem; color: var(--text-2);
}
.auth-switch a {
  color: var(--teal); font-weight: 700;
  transition: opacity 0.2s;
}
.auth-switch a:hover { opacity: 0.75; }

/* Status */
.auth-status {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin-top: 2rem; font-size: 0.82rem; color: var(--text-muted);
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--teal);
  animation: pulse 2s ease infinite;
}

/* Responsive */
@media (max-width: 768px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-left { display: none; }
  .auth-right { min-height: 100vh; }
}

/* ══════════════════════════════════════════
   AUTH — Mobile & Tablet
   ══════════════════════════════════════════ */

@media (max-width: 900px) {
  .auth-layout { grid-template-columns: 45% 55%; }
  .auth-left-hero h1 { font-size: 1.8rem; }
  .signup-features { gap: 1rem; }
  .signup-feature p { display: none; } /* hide long text on tablet */
}

@media (max-width: 768px) {
  .auth-layout { grid-template-columns: 1fr; min-height: 100vh; }
  .auth-left { display: none; }
  .auth-right {
    padding: 2rem 1.25rem;
    align-items: flex-start; padding-top: 3rem;
  }
  .auth-form-wrap { max-width: 100%; }
  .auth-form-header h2 { font-size: 1.6rem; }

  /* Show a mini brand header on mobile */
  .auth-right::before {
    content: 'FIRTA';
    display: block;
    font-family: 'Sora', sans-serif;
    font-weight: 800; font-size: 1.5rem;
    color: var(--teal); margin-bottom: 1.5rem;
  }
}

@media (max-width: 480px) {
  .auth-right { padding: 1.5rem 1rem; padding-top: 2.5rem; }
  .contact-buttons { flex-direction: column; }
}

/* ══════════════════════════════════════════
   AUTH MOBILE FIXES
   ══════════════════════════════════════════ */

/* Fix "FIRTAWelcome back" merging on mobile */
@media (max-width: 768px) {
  /* Hide the left panel completely on mobile */
  .auth-left { display: none !important; }

  /* Right panel takes full screen */
  .auth-layout {
    grid-template-columns: 1fr !important;
    min-height: 100vh;
  }
  .auth-right {
    padding: 2.5rem 1.25rem;
    align-items: flex-start;
    padding-top: 3rem;
    min-height: 100vh;
  }
  .auth-form-wrap {
    max-width: 100%;
    width: 100%;
  }

  /* Remove the ::before pseudo element that shows "FIRTA" */
  .auth-right::before {
    content: none !important;
  }

  /* Add a proper mobile header */
  .auth-mobile-logo {
    display: flex !important;
    align-items: center;
    gap: 10px;
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--teal);
    margin-bottom: 2rem;
  }
  .auth-mobile-logo .logo-icon {
    width: 36px; height: 36px;
    background: var(--teal);
    border-radius: 10px;
    display: grid; place-items: center;
  }

  .auth-form-header h2 { font-size: 1.5rem; }

  /* Fix two-column fields on mobile */
  .settings-field-row--2 { grid-template-columns: 1fr !important; }

  /* Better button sizing */
  .auth-submit { font-size: 0.95rem; padding: 0.85rem; }
}

@media (max-width: 400px) {
  .auth-right { padding: 2rem 1rem; padding-top: 2.5rem; }
  .auth-form-header h2 { font-size: 1.3rem; }
}

/* Show mobile logo only on mobile */
@media (max-width: 768px) {
  .auth-mobile-logo { display: flex !important; }
}
