/* ═══════════════════════════════════════════════════════════
   AUTH SYSTEM — vibrationalidentity.com
   ═══════════════════════════════════════════════════════════ */

/* ── Sidebar Toggle ───────────────────────────────────────── */
.sidebar-toggle {
  position: fixed; top: 18px; left: 18px; z-index: 1100;
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.13);
  color: #fff; cursor: pointer;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px;
  transition: all 0.2s; backdrop-filter: blur(10px);
}
.sidebar-toggle:hover { background: rgba(135,22,217,0.3); border-color: rgba(135,22,217,0.5); }
.hamburger-line { width: 18px; height: 2px; background: #fff; border-radius: 2px; transition: all 0.3s; }
.sidebar-toggle.open .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sidebar-toggle.open .hamburger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.sidebar-toggle.open .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Sidebar Backdrop ─────────────────────────────────────── */
.sidebar-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1099;
  opacity: 0; pointer-events: none; transition: opacity 0.3s; backdrop-filter: blur(4px);
}
.sidebar-backdrop.visible { opacity: 1; pointer-events: all; }

/* ── Sidebar Panel ────────────────────────────────────────── */
.sidebar-panel {
  position: fixed; top: 0; left: 0; height: 100vh; width: 300px; max-width: 85vw;
  background: linear-gradient(160deg, #0e0328 0%, #1a0a3e 60%, #0a0220 100%);
  border-right: 1px solid rgba(135,22,217,0.25); z-index: 1101;
  transform: translateX(-100%); transition: transform 0.35s cubic-bezier(0.25,0.46,0.45,0.94);
  overflow-y: auto; box-shadow: 6px 0 40px rgba(0,0,0,0.5);
  display: flex; flex-direction: column;
}
.sidebar-panel.open { transform: translateX(0); }
.sidebar-panel::-webkit-scrollbar { width: 4px; }
.sidebar-panel::-webkit-scrollbar-thumb { background: rgba(135,22,217,0.35); border-radius: 2px; }

/* Sidebar user header */
.sidebar-user-header {
  padding: 72px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex; align-items: center; gap: 12px;
}
.sidebar-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #8716d9, #5a2da0);
  border: 2px solid rgba(135,22,217,0.5);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { font-size: 14px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-email { font-size: 11px; color: rgba(255,255,255,0.4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-logout-btn {
  background: none; border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.45); border-radius: 8px; padding: 4px 10px;
  font-size: 11px; cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.sidebar-logout-btn:hover { color: #ff6b6b; border-color: rgba(255,107,107,0.4); }

/* Sidebar guest prompt */
.sidebar-guest-header {
  padding: 72px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.sidebar-guest-header p { font-size: 13px; color: rgba(255,255,255,0.45); margin-bottom: 12px; line-height: 1.5; }
.sidebar-login-btn {
  display: block; width: 100%; padding: 10px;
  background: linear-gradient(135deg, #8716d9, #5a2da0);
  border: none; border-radius: 10px; color: #fff;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: opacity 0.2s; font-family: inherit;
}
.sidebar-login-btn:hover { opacity: 0.85; }

/* Sidebar section */
.sidebar-section { border-bottom: 1px solid rgba(255,255,255,0.06); }
.sidebar-section-header {
  display: flex; align-items: center; gap: 9px;
  padding: 14px 18px 10px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(135,22,217,0.9); cursor: pointer; user-select: none; transition: color 0.2s;
}
.sidebar-section-header:hover { color: #a855f7; }
.sidebar-section-chevron { margin-left: auto; font-size: 10px; transition: transform 0.25s; }
.sidebar-section.collapsed .sidebar-section-chevron { transform: rotate(-90deg); }
.sidebar-section-body { padding: 0 12px 12px; overflow: hidden; max-height: 2000px; transition: max-height 0.35s ease; }
.sidebar-section.collapsed .sidebar-section-body { max-height: 0 !important; padding: 0; overflow: hidden; }

/* Sidebar dashboard card */
.sidebar-dashboard-card {
  background: rgba(135,22,217,0.08);
  border: 1px solid rgba(135,22,217,0.2); border-radius: 12px; padding: 14px;
}
.sidebar-py-display { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.sidebar-py-number {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, #8716d9, #5a2da0);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.sidebar-py-info { flex: 1; }
.sidebar-py-name { font-size: 14px; font-weight: 600; color: #fff; }
.sidebar-py-label { font-size: 11px; color: rgba(255,255,255,0.4); }
.sidebar-view-btn {
  display: block; width: 100%; padding: 8px;
  background: rgba(135,22,217,0.18); border: 1px solid rgba(135,22,217,0.35);
  border-radius: 8px; color: rgba(255,255,255,0.85); font-size: 12px;
  font-weight: 600; cursor: pointer; transition: all 0.2s; text-align: center; font-family: inherit;
}
.sidebar-view-btn:hover { background: rgba(135,22,217,0.32); color: #fff; }

/* Sidebar profile items */
.sidebar-profile-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 10px;
  cursor: pointer; transition: background 0.2s;
  border: 1px solid transparent;
}
.sidebar-profile-item:hover { background: rgba(135,22,217,0.1); border-color: rgba(135,22,217,0.2); }
.sidebar-profile-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, rgba(135,22,217,0.4), rgba(90,45,160,0.4));
  border: 1px solid rgba(135,22,217,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.sidebar-profile-info { flex: 1; min-width: 0; }
.sidebar-profile-name { font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-profile-dob { font-size: 11px; color: rgba(255,255,255,0.35); }
.sidebar-profile-delete {
  background: none; border: none; color: rgba(255,255,255,0.2);
  cursor: pointer; font-size: 15px; padding: 4px; border-radius: 4px; transition: all 0.2s; flex-shrink: 0;
}
.sidebar-profile-delete:hover { color: #ff6b6b; background: rgba(255,107,107,0.1); }
.sidebar-empty-state { text-align: center; padding: 16px 8px; color: rgba(255,255,255,0.28); font-size: 12px; line-height: 1.6; }
.sidebar-empty-state .empty-icon { display: block; font-size: 26px; margin-bottom: 6px; }

/* ── Auth Modal ───────────────────────────────────────────── */
.auth-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.72);
  z-index: 10000; display: flex; align-items: center; justify-content: center;
  padding: 20px; backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.auth-overlay.visible { opacity: 1; pointer-events: all; }
.auth-modal {
  background: linear-gradient(160deg, #12042e 0%, #1e0a44 100%);
  border: 1px solid rgba(135,22,217,0.3); border-radius: 24px;
  padding: 36px; width: 100%; max-width: 440px; position: relative;
  box-shadow: 0 0 80px rgba(135,22,217,0.2), 0 40px 80px rgba(0,0,0,0.5);
}
.auth-modal::before {
  content: ''; position: absolute; inset: 0; border-radius: 24px;
  background: radial-gradient(circle at 50% 0%, rgba(135,22,217,0.15) 0%, transparent 60%);
  pointer-events: none;
}
.auth-modal__close {
  position: absolute; top: 16px; right: 16px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6); border-radius: 8px;
  width: 32px; height: 32px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.auth-modal__close:hover { background: rgba(255,255,255,0.1); color: #fff; }
.auth-logo { text-align: center; font-size: 30px; margin-bottom: 4px; }
.auth-title { text-align: center; font-size: 22px; font-weight: 800; color: #fff; margin-bottom: 4px; font-family: 'Outfit', sans-serif; }
.auth-subtitle { text-align: center; font-size: 13px; color: rgba(255,255,255,0.4); margin-bottom: 22px; }
.auth-tabs {
  display: flex; background: rgba(255,255,255,0.04);
  border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 22px;
}
.auth-tab {
  flex: 1; padding: 9px; border: none; border-radius: 8px;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.25s;
  color: rgba(255,255,255,0.5); background: transparent; font-family: inherit;
}
.auth-tab.active {
  background: linear-gradient(135deg, #8716d9, #5a2da0);
  color: #fff; box-shadow: 0 4px 15px rgba(135,22,217,0.4);
}
.auth-form-group { margin-bottom: 15px; }
.auth-label {
  display: block; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: rgba(255,255,255,0.5); margin-bottom: 7px;
}
.auth-input {
  width: 100%; padding: 12px 15px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px; color: #fff; font-size: 15px; font-family: inherit;
  transition: all 0.2s; box-sizing: border-box;
}
.auth-input:focus { outline: none; border-color: rgba(135,22,217,0.6); background: rgba(135,22,217,0.07); box-shadow: 0 0 0 3px rgba(135,22,217,0.15); }
.auth-input::placeholder { color: rgba(255,255,255,0.2); }
.auth-submit-btn {
  display: block; width: 100%; padding: 14px;
  background: linear-gradient(135deg, #8716d9, #5a2da0);
  border: none; border-radius: 12px; color: #fff;
  font-size: 15px; font-weight: 700; cursor: pointer; transition: all 0.25s;
  margin-top: 8px; box-shadow: 0 8px 24px rgba(135,22,217,0.35); font-family: inherit;
}
.auth-submit-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(135,22,217,0.5); }
.auth-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.auth-error {
  background: rgba(255,50,50,0.1); border: 1px solid rgba(255,80,80,0.3);
  border-radius: 10px; padding: 10px 14px; font-size: 13px; color: #ff8080;
  margin-bottom: 14px; display: none;
}
.auth-error.visible { display: block; }
.auth-success {
  background: rgba(50,200,100,0.1); border: 1px solid rgba(50,200,100,0.3);
  border-radius: 10px; padding: 10px 14px; font-size: 13px; color: #6ee7a0;
  margin-bottom: 14px; display: none; line-height: 1.5;
}
.auth-success.visible { display: block; }

/* Header auth button */
.header-auth-btn {
  background: rgba(135,22,217,0.15); border: 1px solid rgba(135,22,217,0.35);
  color: rgba(255,255,255,0.85); border-radius: 10px; padding: 7px 16px;
  font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s; white-space: nowrap; font-family: inherit;
}
.header-auth-btn:hover { background: rgba(135,22,217,0.3); color: #fff; }
.unlocked-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(50,200,100,0.1); border: 1px solid rgba(50,200,100,0.25);
  border-radius: 20px; padding: 4px 10px; font-size: 11px; font-weight: 600; color: #6ee7a0;
}
#header-auth-area { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* ── Unlock Code Modal ────────────────────────────────────── */
.unlock-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.72);
  z-index: 2001; display: flex; align-items: center; justify-content: center;
  padding: 20px; backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.unlock-overlay.visible { opacity: 1; pointer-events: all; }
.unlock-modal {
  background: linear-gradient(160deg, #12042e 0%, #1e0a44 100%);
  border: 1px solid rgba(135,22,217,0.3); border-radius: 24px;
  padding: 36px; width: 100%; max-width: 400px; text-align: center; position: relative;
  box-shadow: 0 0 80px rgba(135,22,217,0.2), 0 40px 80px rgba(0,0,0,0.5);
}
.unlock-close-btn {
  position: absolute; top: 16px; right: 16px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6); border-radius: 8px;
  width: 32px; height: 32px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.unlock-close-btn:hover { color: #fff; background: rgba(255,255,255,0.1); }
.unlock-icon { font-size: 48px; margin-bottom: 12px; display: block; }
.unlock-title { font-size: 22px; font-weight: 800; color: #fff; margin-bottom: 6px; font-family: 'Outfit', sans-serif; }
.unlock-sub { font-size: 13px; color: rgba(255,255,255,0.42); margin-bottom: 22px; line-height: 1.6; }
.unlock-input-row { display: flex; gap: 10px; margin-bottom: 10px; }
.unlock-code-input {
  flex: 1; padding: 12px 16px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px; color: #fff; font-size: 16px; font-family: inherit;
  letter-spacing: 0.1em; text-align: center; transition: all 0.2s;
}
.unlock-code-input:focus { outline: none; border-color: rgba(135,22,217,0.6); box-shadow: 0 0 0 3px rgba(135,22,217,0.15); }
.unlock-submit-btn {
  padding: 12px 20px; background: linear-gradient(135deg, #8716d9, #5a2da0);
  border: none; border-radius: 12px; color: #fff; font-size: 14px;
  font-weight: 700; cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.unlock-submit-btn:hover { transform: translateY(-1px); }
.unlock-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.unlock-error { color: #ff8080; font-size: 13px; margin-bottom: 8px; min-height: 18px; }
.unlock-success-msg { color: #6ee7a0; font-size: 14px; font-weight: 600; display: none; }

/* ── Paywall Lock ─────────────────────────────────────────── */
.paywall-wrapper { position: relative; }
.paywall-lock {
  position: absolute; inset: 0;
  background: rgba(8,2,22,0.88); backdrop-filter: blur(8px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 10; gap: 10px; padding: 20px; border-radius: inherit;
}
.paywall-lock__icon { font-size: 36px; }
.paywall-lock__title { font-size: 16px; font-weight: 700; color: #fff; text-align: center; }
.paywall-lock__sub { font-size: 13px; color: rgba(255,255,255,0.45); text-align: center; line-height: 1.5; }
.paywall-unlock-btn {
  padding: 10px 24px; background: linear-gradient(135deg, #8716d9, #5a2da0);
  border: none; border-radius: 10px; color: #fff; font-size: 14px;
  font-weight: 700; cursor: pointer; transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(135,22,217,0.4); font-family: inherit; margin-top: 4px;
}
.paywall-unlock-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(135,22,217,0.5); }

/* Nav lock indicator */
.nav-tab.nav-locked { position: relative; opacity: 0.6; cursor: default; }
.nav-tab.nav-locked::after { content: ' 🔒'; font-size: 10px; }

/* ── Save Profile Button ──────────────────────────────────── */
.save-profile-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px;
  background: rgba(135,22,217,0.1); border: 1px solid rgba(135,22,217,0.3);
  border-radius: 12px; color: rgba(255,255,255,0.75); font-size: 13px;
  font-weight: 600; cursor: pointer; transition: all 0.2s; font-family: inherit;
  margin: 0 auto 16px; text-align: center;
}
.save-profile-btn:hover { background: rgba(135,22,217,0.22); color: #fff; border-color: rgba(135,22,217,0.5); }
.save-profile-btn.saved { color: #6ee7a0; border-color: rgba(50,200,100,0.35); background: rgba(50,200,100,0.07); cursor: default; }

/* ── Save Prompt Modal ────────────────────────────────────── */
.save-prompt-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.65);
  z-index: 1998; display: flex; align-items: center; justify-content: center;
  padding: 20px; backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.save-prompt-overlay.visible { opacity: 1; pointer-events: all; }
.save-prompt-modal {
  background: linear-gradient(160deg, #12042e 0%, #1e0a44 100%);
  border: 1px solid rgba(135,22,217,0.3); border-radius: 20px;
  padding: 30px; width: 100%; max-width: 380px; text-align: center;
  box-shadow: 0 0 60px rgba(135,22,217,0.15), 0 30px 60px rgba(0,0,0,0.5);
}
.save-prompt-icon { font-size: 40px; margin-bottom: 8px; display: block; }
.save-prompt-title { font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 5px; font-family: 'Outfit', sans-serif; }
.save-prompt-sub { font-size: 13px; color: rgba(255,255,255,0.42); margin-bottom: 6px; line-height: 1.5; }
.save-prompt-name { font-size: 15px; font-weight: 700; color: #a855f7; display: block; margin-bottom: 18px; }
.save-prompt-actions { display: flex; gap: 10px; }
.save-prompt-yes {
  flex: 1; padding: 11px; background: linear-gradient(135deg, #8716d9, #5a2da0);
  border: none; border-radius: 10px; color: #fff; font-size: 14px;
  font-weight: 700; cursor: pointer; transition: opacity 0.2s; font-family: inherit;
}
.save-prompt-yes:hover { opacity: 0.85; }
.save-prompt-no {
  flex: 1; padding: 11px; background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12); border-radius: 10px;
  color: rgba(255,255,255,0.55); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.save-prompt-no:hover { background: rgba(255,255,255,0.09); color: #fff; }

/* ── Toast Notifications ──────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 3000;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  background: rgba(14,5,32,0.96); border: 1px solid rgba(135,22,217,0.3);
  border-radius: 12px; padding: 12px 20px; font-size: 14px; font-weight: 600; color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4); backdrop-filter: blur(10px);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards; pointer-events: auto;
}
.toast.toast-success { border-color: rgba(50,200,100,0.35); color: #6ee7a0; }
.toast.toast-error { border-color: rgba(255,80,80,0.35); color: #ff8080; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-8px); } }
