/* ============================================
   AUTH.CSS — Sign In & Sign Up Pages
   Liventra Interior Design | Dark Warm Theme
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Jost:wght@300;400;500;600;700&display=swap');

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

body {
  font-family: 'Jost', sans-serif;
  background: #1a0e0a;
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  overflow-x: hidden;
  position: relative;
}

/* ── BACKGROUND DECORATIONS ── */
.auth-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.auth-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
}

.auth-bg-orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #c0392b, transparent);
  top: -150px; left: -150px;
}

.auth-bg-orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #e8846a, transparent);
  bottom: -100px; right: -100px;
}

.auth-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(192,57,43,0.06) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* ── TWO-PANEL WRAPPER ── */
.auth-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* ── LEFT PANEL — BRANDING ── */
.auth-panel-left {
  flex: 1;
  background: linear-gradient(135deg, #2d1410 0%, #1a0e0a 40%, #3a1208 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  overflow: hidden;
}

.auth-panel-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 50%, rgba(192,57,43,0.15) 0%, transparent 60%);
}

.auth-panel-left::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(192,57,43,0.4), transparent);
}

.auth-panel-inner {
  position: relative;
  z-index: 1;
  max-width: 420px;
}

.auth-brand-quote { margin-bottom: 3rem; }

.auth-quote-mark {
  font-family: 'Cormorant Garamond', serif;
  font-size: 5rem;
  color: #c0392b;
  line-height: 0.6;
  margin-bottom: 1.5rem;
  opacity: 0.8;
}

.auth-quote-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.45rem;
  font-style: italic;
  color: #f0e0d5;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.auth-quote-by {
  font-size: 0.75rem;
  color: #c0392b;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
}

.auth-panel-features {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.auth-panel-feat {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: #c4a898;
  font-weight: 400;
}

.auth-panel-feat i { color: #c0392b; font-size: 0.85rem; }

/* ── RIGHT PANEL — FORM ── */
.auth-panel-right {
  width: 480px;
  flex-shrink: 0;
  background: #1e110d;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  overflow-y: auto;
}

/* ── AUTH CARD ── */
.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 2.5rem 2rem;
  background: #2a1812;
  border: 1px solid rgba(192,57,43,0.2);
  border-radius: 20px;
  position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #c0392b, #e8846a, #c0392b, transparent);
  border-radius: 0 0 2px 2px;
}

.auth-card-wide { max-width: 440px; }

/* Back link */
.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: #a08878;
  text-decoration: none;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  transition: color 0.2s;
}

.auth-back-link:hover { color: #c0392b; }
.auth-back-link i { font-size: 0.7rem; }

/* Logo */
.auth-logo-wrap {
  text-align: center;
  margin-bottom: 1.25rem;
}

.auth-logo-img {
  height: 110px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 12px rgba(192,57,43,0.3));
}

/* Card header */
.auth-card-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.auth-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 700;
  color: #f5ece6;
  letter-spacing: -0.01em;
  margin-bottom: 0.35rem;
  line-height: 1.2;
}

.auth-subtitle {
  font-size: 0.85rem;
  color: #a08878;
  font-weight: 400;
}

/* ── STEP INDICATOR ── */
.auth-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 1.75rem;
}

.auth-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.auth-step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(192,57,43,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: #7a5545;
  transition: all 0.3s ease;
  background: transparent;
}

.auth-step-label {
  font-size: 0.65rem;
  font-weight: 500;
  color: #7a5545;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.auth-step.active .auth-step-num {
  border-color: #c0392b;
  background: #c0392b;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(192,57,43,0.45);
}

.auth-step.active .auth-step-label { color: #c0392b; }

.auth-step.done .auth-step-num {
  border-color: #2e7d52;
  background: #2e7d52;
  color: #fff;
  font-size: 0;
  position: relative;
}

.auth-step.done .auth-step-num::after {
  content: '✓';
  font-size: 0.8rem;
  color: #fff;
}

.auth-step.done .auth-step-label { color: #2e7d52; }

.auth-step-line {
  flex: 1;
  height: 2px;
  background: rgba(192,57,43,0.15);
  min-width: 28px;
  max-width: 48px;
  margin: 0 5px 16px;
}

/* ── FORM ── */
.auth-form { display: flex; flex-direction: column; gap: 0; }

.auth-field { margin-bottom: 1rem; }

.auth-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.auth-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a08878;
  margin-bottom: 0.4rem;
}

.auth-input-wrap {
  position: relative;
}

.auth-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #7a5545;
  font-size: 0.8rem;
  pointer-events: none;
  transition: color 0.2s;
}

.auth-input-wrap input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(192,57,43,0.2);
  border-radius: 10px;
  font-family: 'Jost', sans-serif;
  font-size: 0.9rem;
  color: #f5ece6;
  outline: none;
  transition: all 0.25s ease;
}

.auth-input-wrap input::placeholder { color: #5a3a30; }

.auth-input-wrap input:focus {
  border-color: #c0392b;
  background: rgba(192,57,43,0.08);
  box-shadow: 0 0 0 3px rgba(192,57,43,0.12);
}

.auth-input-wrap input:focus ~ .auth-input-icon,
.auth-input-wrap:focus-within .auth-input-icon { color: #c0392b; }

.auth-input-wrap input:disabled,
.auth-input-wrap input[readonly] { opacity: 0.45; cursor: not-allowed; }

/* Eye button */
.auth-eye-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #7a5545;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
  width: auto;
  margin: 0;
}

.auth-eye-btn:hover { color: #c0392b; background: none; transform: translateY(-50%); box-shadow: none; }

/* Forgot */
.auth-forgot {
  text-align: right;
  margin-bottom: 0.75rem;
}

.auth-forgot a {
  font-size: 0.78rem;
  color: #a08878;
  text-decoration: none;
  transition: color 0.2s;
}

.auth-forgot a:hover { color: #c0392b; }

/* ── MAIN BUTTON ── */
.auth-btn {
  width: 100%;
  padding: 0.85rem 1.5rem;
  background: linear-gradient(135deg, #c0392b 0%, #e8846a 55%, #c0392b 100%);
  color: #ffffff !important;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-family: 'Jost', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(192,57,43,0.35);
}

.auth-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(192,57,43,0.55);
  background: none;
  background: linear-gradient(135deg, #e74c3c 0%, #f1948a 55%, #e74c3c 100%);
}

.auth-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0;
  color: #5a3a30;
  font-size: 0.75rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(192,57,43,0.15);
}

/* WhatsApp button */
.auth-wa-btn {
  width: 100%;
  padding: 0.8rem 1.5rem;
  background: rgba(37,211,102,0.1);
  border: 1px solid rgba(37,211,102,0.3);
  border-radius: 50px;
  color: #4ade80;
  font-family: 'Jost', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.25s ease;
  cursor: pointer;
}

.auth-wa-btn:hover {
  background: rgba(37,211,102,0.18);
  border-color: rgba(37,211,102,0.55);
  transform: translateY(-1px);
}

/* ── OTP ── */
.auth-verified-summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  background: rgba(192,57,43,0.08);
  border: 1px solid rgba(192,57,43,0.2);
  border-radius: 10px;
  color: #c4a898;
  font-size: 0.82rem;
  margin-bottom: 0.5rem;
  word-break: break-all;
}

.auth-verified-summary i { color: #c0392b; flex-shrink: 0; }

.auth-otp-hint {
  font-size: 0.8rem;
  color: #a08878;
  text-align: center;
  margin-bottom: 0.5rem;
}

.otp-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 1rem 0;
}

.otp-digit {
  width: 46px; height: 54px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(192,57,43,0.2);
  border-radius: 10px;
  outline: none;
  font-size: 1.4rem;
  font-weight: 700;
  color: #f5ece6;
  text-align: center;
  caret-color: #c0392b;
  transition: all 0.2s ease;
  font-family: 'Jost', sans-serif;
}

.otp-digit:focus {
  border-color: #c0392b;
  background: rgba(192,57,43,0.1);
  box-shadow: 0 0 0 3px rgba(192,57,43,0.15);
}

.otp-digit:not(:placeholder-shown) {
  border-color: rgba(192,57,43,0.5);
  color: #e8846a;
}

.otp-dash { color: #5a3a30; font-size: 1.1rem; margin: 0 2px; user-select: none; }

.resend-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 0.75rem;
  min-height: 22px;
}

.resend-timer { font-size: 0.75rem; color: #7a5545; }

.link-btn {
  background: none; border: none;
  color: #c0392b; cursor: pointer;
  font-size: 0.8rem; font-weight: 500;
  padding: 0; width: auto; margin: 0;
  text-decoration: underline;
  font-family: 'Jost', sans-serif;
  transition: color 0.2s;
}

.link-btn:hover { color: #e74c3c; background: none; transform: none; box-shadow: none; }

.back-btn {
  background: none; border: none;
  color: #7a5545; cursor: pointer;
  font-size: 0.78rem; padding: 0;
  width: auto; margin: 0.75rem auto 0;
  display: block; font-family: 'Jost', sans-serif;
  transition: color 0.2s;
}

.back-btn:hover { color: #c0392b; background: none; transform: none; box-shadow: none; }

/* ── PASSWORD STRENGTH ── */
.strength-bar {
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  margin-top: 6px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  transition: width 0.35s ease, background 0.35s ease;
}

.strength-label {
  font-size: 0.7rem;
  font-weight: 500;
  margin-top: 4px;
  min-height: 16px;
  color: #a08878;
}

.pw-rules {
  font-size: 0.7rem;
  color: #7a5545;
  margin-top: 4px;
}

.match-label {
  font-size: 0.7rem;
  font-weight: 500;
  margin-top: 5px;
  min-height: 16px;
}

/* Verified badge */
.auth-verified-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: rgba(46,125,82,0.1);
  border: 1px solid rgba(46,125,82,0.3);
  border-radius: 10px;
  color: #4ade80;
  font-size: 0.82rem;
  font-weight: 500;
}

/* ── ERROR BANNER ── */
.auth-error {
  margin-top: 0.75rem;
  padding: 0.65rem 0.875rem;
  background: rgba(220,60,60,0.1);
  border: 1px solid rgba(220,60,60,0.28);
  border-radius: 10px;
  color: #f87;
  font-size: 0.8rem;
  text-align: center;
  animation: fadeSlide 0.2s ease;
}

/* Keep old IDs working with new class */
.error-banner { margin-top: 0.75rem; padding: 0.65rem 0.875rem; background: rgba(220,60,60,0.1); border: 1px solid rgba(220,60,60,0.28); border-radius: 10px; color: #f87; font-size: 0.8rem; text-align: center; }

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hidden { display: none !important; }

/* ── FOOTER LINK ── */
.auth-footer-link {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.83rem;
  color: #a08878;
}

.auth-footer-link a {
  color: #c0392b;
  font-weight: 600;
  text-decoration: none;
  margin-left: 4px;
  transition: color 0.2s;
}

.auth-footer-link a:hover { color: #e74c3c; }

/* ── RECOVER / RESET pages (simple centered card) ── */
.container {
  background: #2a1812;
  padding: 2.5rem 2rem;
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  border: 1px solid rgba(192,57,43,0.2);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
  margin: auto;
}

.container::before {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #c0392b, #e8846a, #c0392b, transparent);
}

/* Old h1 used in recover/reset */
h1 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.9rem;
  color: #f5ece6;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.company_name {
  font-size: 0.78rem;
  color: #c0392b;
  font-family: 'Jost', sans-serif;
  font-weight: 400;
  margin-top: 4px;
}

.subtitle {
  text-align: center;
  color: #a08878;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* Old input styles for recover/reset */
.input-group { margin-bottom: 1rem; }
.input-row { display: flex; gap: 0.75rem; }

input:not(.otp-digit) {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(192,57,43,0.2);
  border-radius: 10px;
  outline: none;
  font-size: 0.9rem;
  font-family: 'Jost', sans-serif;
  transition: all 0.25s ease;
  color: #f5ece6;
}

input:not(.otp-digit)::placeholder { color: #5a3a30; }

input:not(.otp-digit):focus {
  border-color: #c0392b;
  background: rgba(192,57,43,0.08);
  box-shadow: 0 0 0 3px rgba(192,57,43,0.12);
}

.password-wrapper { position: relative; }
.password-wrapper input { padding-right: 48px; }

.toggle-pw {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  cursor: pointer;
  color: #7a5545;
  padding: 4px;
  width: auto; margin: 0;
  display: flex; align-items: center;
  transition: color 0.2s;
}

.toggle-pw:hover { color: #c0392b; background: none; transform: translateY(-50%); box-shadow: none; }

/* Old button for recover/reset */
button:not(.toggle-pw):not(.link-btn):not(.back-btn):not(.auth-btn):not(.auth-eye-btn) {
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, #c0392b 0%, #e8846a 55%, #c0392b 100%);
  color: #ffffff;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-family: 'Jost', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(192,57,43,0.35);
}

button:not(.toggle-pw):not(.link-btn):not(.back-btn):not(.auth-btn):not(.auth-eye-btn):hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(192,57,43,0.55);
}

button:not(.toggle-pw):not(.link-btn):not(.back-btn):not(.auth-btn):not(.auth-eye-btn):disabled {
  opacity: 0.4; cursor: not-allowed; transform: none;
}

.forgot { text-align: right; margin-bottom: 0.875rem; }
.forgot a { font-size: 0.78rem; color: #a08878; text-decoration: none; transition: color 0.2s; }
.forgot a:hover { color: #c0392b; }

.link { text-align: center; margin-top: 1.25rem; font-size: 0.83rem; color: #a08878; }
.link a { color: #c0392b; font-weight: 600; text-decoration: none; margin-left: 4px; transition: color 0.2s; }
.link a:hover { color: #e74c3c; }

.error-banner { display: none; }
.error-banner:not(.hidden) { display: block; }

/* Auth logo for recover/reset */
.auth-logo-link {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
  text-decoration: none;
}

.auth-logo-link img {
  height: 100px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 12px rgba(192,57,43,0.3));
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .auth-panel-left { display: none; }
  .auth-panel-right { width: 100%; }
}

@media (max-width: 480px) {
  body { align-items: flex-start; }
  .auth-panel-right { padding: 1.5rem 1rem; align-items: flex-start; }
  .auth-card { padding: 2rem 1.25rem; border-radius: 16px; }
  .auth-logo-img { height: 90px; }
  .auth-title { font-size: 1.65rem; }
  .auth-field-row { grid-template-columns: 1fr; gap: 0; }
  .otp-digit { width: 38px; height: 48px; font-size: 1.2rem; }
  .auth-step-label { font-size: 0.58rem; }
  .auth-step-line { min-width: 18px; }
  .container { padding: 2rem 1.25rem; border-radius: 16px; }
}

@media (max-width: 360px) {
  .auth-card { padding: 1.5rem 1rem; }
  .otp-digit { width: 34px; height: 44px; font-size: 1.1rem; }
}
