/* ============================================
   AUTH.CSS — Login/Signup Modal, Auth Components
   Vaivox Design System
   ============================================ */

/* ── Auth Screen ──────────────────────────── */
#auth-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
}
.auth-box {
  position: relative; z-index: 1;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255,255,255,1);
  box-shadow: 0 24px 80px rgba(0,0,0,0.15), 0 0 60px rgba(200,165,80,0.1);
  border-radius: 20px; padding: 40px 36px;
  width: 100%; max-width: 420px;
  color-scheme: light;
}
.auth-close {
  position: absolute; top: 14px; right: 18px;
  background: none; border: none; color: rgba(0,0,0,0.35);
  font-size: 1.6rem; cursor: pointer; line-height: 1;
  transition: color .2s;
}
.auth-close:hover { color: rgba(0,0,0,0.8); }
.auth-logo {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 6px;
}
.auth-logo span {
  font-family: var(--sans); font-size: 1.6rem; font-weight: 800;
  color: var(--text); letter-spacing: -0.5px;
}
.auth-subtitle {
  text-align: center; margin-bottom: 24px;
  font-family: var(--sans); font-size: 0.9rem;
  color: var(--muted);
}

/* ── Auth Tabs ─────────────────────────────── */
.auth-tabs {
  display: flex; margin-bottom: 24px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.auth-tab {
  flex: 1; padding: 10px; text-align: center; cursor: pointer;
  font-family: var(--sans); font-size: 0.85rem; font-weight: 600;
  color: var(--muted); border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: color .2s, border-color .2s;
}
.auth-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Google Login Button ───────────────────── */
.auth-google-btn {
  width: 100%; padding: 12px; margin-bottom: 0;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #f8fafc; color: #333; border: 1px solid rgba(0,0,0,0.06); border-radius: 12px;
  font-family: var(--sans); font-size: 0.9rem; font-weight: 600;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
  cursor: pointer; transition: background .2s, box-shadow .2s;
}
.auth-google-btn:hover { background: #ffffff; box-shadow: 0 4px 12px rgba(0,0,0,0.08); border-color: rgba(0,0,0,0.1); }

/* ── Auth Divider ──────────────────────────── */
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0;
  color: var(--muted); font-family: var(--sans); font-size: 0.78rem;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: rgba(0,0,0,0.08);
}

/* ── Auth Fields ───────────────────────────── */
.auth-field { margin-bottom: 16px; }
.auth-field label {
  display: block; margin-bottom: 6px;
  font-family: var(--sans); font-size: 0.8rem; font-weight: 600;
  color: var(--muted);
}
.auth-field input {
  width: 100%; padding: 12px 14px;
  background: rgba(0,0,0,0.06) !important; border: 1px solid rgba(0,0,0,0.15);
  border-radius: 12px; color: #1a1a2e !important;
  color-scheme: light;
  font-family: var(--sans); font-size: 0.9rem;
  outline: none; transition: border-color .2s, box-shadow .2s; box-shadow: inset 0 2px 4px rgba(0,0,0,0.03);
}
.auth-field input:focus {
  border-color: var(--accent); background: #ffffff;
  box-shadow: 0 0 0 4px rgba(200,165,80,0.1), 0 4px 15px rgba(200,165,80,0.08);
}
.auth-field input::placeholder { color: #94a3b8; }

/* ── Password Toggle (Eye) ─────────────────── */
.auth-input-wrap {
  position: relative;
}
.auth-input-wrap input { padding-right: 44px; }
.auth-eye {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: rgba(0,0,0,0.35);
  cursor: pointer; padding: 4px; display: flex; align-items: center;
  transition: color .2s;
}
.auth-eye:hover { color: rgba(0,0,0,0.8); }

/* ── Password Strength Meter ───────────────── */
.auth-strength {
  height: 3px; margin-top: 8px; border-radius: 3px;
  background: rgba(255,255,255,0.06); overflow: hidden;
}
.auth-strength-bar {
  height: 100%; width: 0; border-radius: 3px;
  transition: width .3s, background .3s;
}
.auth-strength-label {
  font-family: var(--sans); font-size: 0.7rem; font-weight: 500;
  margin-top: 4px; min-height: 16px;
  transition: color .3s;
}

/* ── Field Errors ──────────────────────────── */
.auth-field-error {
  font-family: var(--sans); font-size: 0.72rem; color: #f87171;
  margin-top: 4px; min-height: 0; display: none;
}
.auth-field-error.visible { display: block; }
.auth-field input.input-error {
  border-color: #f87171 !important;
  box-shadow: 0 0 0 3px rgba(248,113,113,0.15) !important;
}

/* ── Auth Submit Button ────────────────────── */
.auth-btn {
  width: 100%; margin-top: 20px; padding: 13px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; border: none; border-radius: 10px;
  font-family: var(--sans); font-size: 0.95rem; font-weight: 700;
  cursor: pointer; transition: opacity .2s, transform .1s;
}
.auth-btn:hover { opacity: .9; }
.auth-btn:active { transform: scale(0.98); }
.auth-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ── Auth Messages ─────────────────────────── */
.auth-msg {
  margin-top: 14px; text-align: center;
  font-family: var(--sans); font-size: 0.82rem; display: none;
}
.auth-msg.error { color: #f87171; }
.auth-msg.success { color: #4ade80; }
.auth-link {
  background: none; border: none; color: rgba(255,255,255,0.4);
  font-size: 0.82rem; cursor: pointer; font-family: var(--sans);
  transition: color .2s;
}
.auth-link:hover { color: var(--accent); }

/* ── Auth User Bar ─────────────────────────── */
.auth-user-bar {
  display: none; position: relative; z-index: 100;
  background:linear-gradient(160deg, rgba(28,18,45,0.98) 0%, rgba(10,8,16,0.99) 100%); border:1px solid rgba(200,165,80,0.18);
  border-top:1px solid rgba(200,165,80,0.4); box-shadow:0 2px 0 rgba(200,165,80,0.12), 0 8px 32px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.03); border-radius: 8px; padding: 8px 14px;
  font-family: var(--mono); font-size: 0.72rem; color: var(--muted);
  display: flex; align-items: center; gap: 12px;
}
.auth-user-email { color: #fff; }
.auth-logout-btn {
  background: none; border: none; color: var(--muted);
  cursor: pointer; font-family: var(--mono); font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 1px;
  transition: color .2s;
}
.auth-logout-btn:hover { color: var(--accent2); }

/* ── Upgrade modal ──────────────────────────── */
#upgrade-modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.85); backdrop-filter: blur(8px);
  align-items: center; justify-content: center; padding: 20px;
}
#upgrade-modal-overlay.open { display: flex; }
.upgrade-modal {
  background: linear-gradient(160deg, rgba(28,18,45,0.99) 0%, rgba(10,8,16,0.99) 100%);
  border: 1px solid rgba(200,165,80,0.25);
  border-top: 1px solid rgba(200,165,80,0.5);
  box-shadow: 0 0 60px rgba(200,165,80,0.2), 0 24px 48px rgba(0,0,0,0.7);
  border-radius: 20px; padding: 36px 32px; max-width: 480px; width: 100%;
  position: relative; animation: fadeUp .3s ease both;
}
.upgrade-modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; color: #64748b;
  font-size: 1.2rem; cursor: pointer; padding: 4px 8px;
  transition: color .2s;
}
.upgrade-modal-close:hover { color: #f1f5f9; }
.upgrade-modal-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: rgba(200,165,80,0.1); border: 1px solid rgba(200,165,80,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 16px;
}
.upgrade-modal-title {
  font-size: 1.3rem; font-weight: 800; color: #f1f5f9;
  letter-spacing: -0.03em; margin-bottom: 6px;
}
.upgrade-modal-sub {
  font-size: 0.85rem; color: #94a3b8; margin-bottom: 24px; line-height: 1.6;
}
.upgrade-plans {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px;
}
.upgrade-plan {
  border: 1px solid rgba(200,165,80,0.2);
  border-radius: 12px; padding: 16px; cursor: pointer;
  transition: all .2s; background: rgba(200,165,80,0.04);
}
.upgrade-plan:hover { border-color: rgba(200,165,80,0.5); background: rgba(200,165,80,0.08); }
.upgrade-plan.featured {
  border-color: rgba(200,165,80,0.5);
  background: rgba(200,165,80,0.08);
  position: relative;
}
.upgrade-plan-badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, #c8a550, #a07830);
  color: #fff; font-size: 0.6rem; font-weight: 700;
  padding: 3px 10px; border-radius: 20px; letter-spacing: 0.08em;
  text-transform: uppercase; white-space: nowrap;
}
.upgrade-plan-name {
  font-weight: 700; font-size: 0.9rem; color: #f1f5f9; margin-bottom: 4px;
}
.upgrade-plan-price {
  font-family: var(--mono); font-size: 1.2rem; font-weight: 700;
  color: var(--accent); margin-bottom: 6px;
}
.upgrade-plan-price span { font-size: 0.7rem; color: #64748b; font-weight: 400; }
.upgrade-plan-mins {
  font-size: 0.75rem; color: #94a3b8;
}
.upgrade-modal-cta {
  width: 100%; padding: 13px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #000; font-weight: 800; font-size: 0.95rem;
  border: none; border-radius: 10px; cursor: pointer;
  transition: all .2s; box-shadow: 0 0 20px rgba(200,165,80,0.3);
}
.upgrade-modal-cta:hover { transform: translateY(-1px); box-shadow: 0 0 30px rgba(200,165,80,0.5); }
.upgrade-modal-note {
  text-align: center; font-size: 0.72rem; color: #475569;
  margin-top: 12px; font-family: var(--mono);
}
