/* ===== AUTH PAGE STYLES ===== */

.auth-body {
  min-height: 100vh;
  display: flex;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

/* ===== BACKGROUND ===== */
.auth-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #2d8c7640, transparent 70%);
  top: -150px;
  left: -100px;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #f0b42930, transparent 70%);
  bottom: -100px;
  left: 20%;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #2563eb20, transparent 70%);
  top: 30%;
  left: 45%;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(26,107,90,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,107,90,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ===== LEFT PANEL ===== */
.auth-left {
  flex: 0 0 52%;
  background: linear-gradient(145deg, var(--brand-dark) 0%, var(--brand) 50%, var(--brand-light) 100%);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.auth-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.auth-left .brand-mark {
  position: relative;
  z-index: 2;
}

.auth-left .brand-icon {
  color: rgba(255,255,255,0.9);
}

.auth-left .brand-name {
  color: white;
  font-size: 1.5rem;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3rem);
  color: white;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero-headline em {
  font-style: italic;
  color: var(--accent);
}

.hero-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.7;
  max-width: 380px;
  margin-bottom: 2rem;
}

.hero-stats {
  display: flex;
  gap: 1rem;
}

.stat-pill {
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1.25rem;
  gap: 2px;
}

.stat-num {
  font-size: 1.35rem;
  font-weight: 700;
  color: white;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.65);
  font-weight: 500;
}

/* Floating cards */
.floating-cards {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 0.85rem;
  align-items: flex-end;
}

.float-card {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-lg);
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: floatCard 4s ease-in-out infinite;
}

.float-card:nth-child(2) { animation-delay: 1.3s; }
.float-card:nth-child(3) { animation-delay: 2.6s; }

@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.card-label {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.float-card .card-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  letter-spacing: -0.01em;
}

.card-tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  width: fit-content;
}

.card-tag.income    { background: rgba(22,163,74,0.3); color: #86efac; }
.card-tag.expense   { background: rgba(220,38,38,0.3); color: #fca5a5; }
.card-tag.savings   { background: rgba(37,99,235,0.3); color: #93c5fd; }

/* ===== RIGHT PANEL ===== */
.auth-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  animation: slideUp 0.5s var(--ease-spring) both;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== AUTH TABS ===== */
.auth-tabs {
  display: flex;
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 4px;
  position: relative;
  margin-bottom: 1.75rem;
}

.tab-btn {
  flex: 1;
  padding: 0.55rem;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s var(--ease);
  position: relative;
  z-index: 1;
}

.tab-btn.active {
  color: var(--text-primary);
}

.tab-indicator {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: var(--surface);
  border-radius: calc(var(--radius) - 3px);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease-spring);
}

/* ===== AUTH FORM ===== */
.auth-form {
  display: none;
  flex-direction: column;
  gap: 1rem;
  animation: fadeIn 0.3s ease;
}

.auth-form.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.form-header h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.form-header p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Toggle password */
.toggle-pass {
  position: absolute;
  right: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.toggle-pass:hover { color: var(--text-primary); }

.toggle-pass svg {
  width: 17px;
  height: 17px;
}

/* Form options row */
.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.forgot-link {
  font-size: 0.85rem;
  color: var(--brand);
  font-weight: 500;
  transition: opacity 0.2s;
}

.forgot-link:hover { opacity: 0.75; }

/* Auth button */
.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  color: white;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.25s var(--ease);
  box-shadow: 0 4px 15px var(--brand-glow);
  margin-top: 0.25rem;
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-brand);
}

.auth-btn:active {
  transform: translateY(0);
}

.auth-btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s var(--ease);
}

.auth-btn:hover svg {
  transform: translateX(3px);
}

.auth-btn.loading {
  opacity: 0.8;
  pointer-events: none;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Social buttons */
.social-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.65rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface);
  transition: all 0.2s var(--ease);
}

.social-btn:hover {
  background: var(--surface-2);
  border-color: var(--brand);
  color: var(--text-primary);
}

.social-btn svg {
  width: 18px;
  height: 18px;
}

/* Password strength */
.strength-bar {
  height: 4px;
  background: var(--surface-3);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 4px;
}

.strength-fill {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-full);
  transition: width 0.3s var(--ease), background 0.3s var(--ease);
}

.strength-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.terms-link {
  color: var(--brand);
  font-weight: 500;
}

.terms-link:hover {
  text-decoration: underline;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 860px) {
  .auth-left {
    display: none;
  }

  .auth-right {
    padding: 1.5rem 1rem;
    align-items: flex-start;
    padding-top: 3rem;
  }

  .auth-card {
    box-shadow: none;
    border: none;
    padding: 0;
  }
}

@media (max-width: 400px) {
  .auth-card {
    max-width: 100%;
  }
}