/* Parent Child Charts - Main Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --primary: #7C3AED;
  --primary-light: #A78BFA;
  --primary-dark: #5B21B6;
  --secondary: #EC4899;
  --gold: #F59E0B;
  --gold-light: #FDE68A;
  --bg-dark: #0F0A1A;
  --bg-card: rgba(255,255,255,0.06);
  --bg-card-hover: rgba(255,255,255,0.10);
  --text-primary: #F8F4FF;
  --text-secondary: #C4B5FD;
  --text-muted: #8B7EC4;
  --border: rgba(167,139,250,0.2);
  --border-hover: rgba(167,139,250,0.5);
  --success: #10B981;
  --error: #EF4444;
  --warning: #F59E0B;
  --radius: 16px;
  --shadow: 0 4px 24px rgba(124,58,237,0.25);
  --shadow-lg: 0 8px 48px rgba(124,58,237,0.35);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Stars background */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(124,58,237,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(236,72,153,0.10) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(245,158,11,0.08) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }
.container-sm { max-width: 720px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* ── NAVBAR ── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15,10,26,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.navbar-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.navbar-brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--text-primary);
}
.navbar-logo { width: 44px; height: 44px; }
.brand-text { font-family: 'Playfair Display', serif; font-size: 1.3rem; font-weight: 700; }
.brand-sub { font-size: 0.7rem; color: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase; }

.navbar-links { display: flex; align-items: center; gap: 8px; }
.navbar-links a {
  color: var(--text-secondary); text-decoration: none; padding: 8px 16px;
  border-radius: 8px; font-size: 0.9rem; font-weight: 500;
  transition: all 0.2s;
}
.navbar-links a:hover { color: var(--text-primary); background: var(--bg-card); }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: 10px; font-size: 0.95rem; font-weight: 600; cursor: pointer; border: none; text-decoration: none; transition: all 0.25s; white-space: nowrap; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; box-shadow: 0 4px 15px rgba(124,58,237,0.4); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 25px rgba(124,58,237,0.55); }
.btn-outline { background: transparent; color: var(--primary-light); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--primary-light); background: var(--bg-card); }
.btn-gold { background: linear-gradient(135deg, #F59E0B, #EF4444); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; border-radius: 8px; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; border-radius: 12px; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ── CARDS ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  backdrop-filter: blur(10px);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.card:hover { border-color: var(--border-hover); box-shadow: var(--shadow); }
.card-glow { box-shadow: var(--shadow); border-color: var(--border-hover); }

/* ── HERO ── */
.hero {
  padding: 100px 0 80px;
  text-align: center;
  position: relative;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(124,58,237,0.2); border: 1px solid rgba(124,58,237,0.4);
  padding: 6px 18px; border-radius: 100px; font-size: 0.85rem; color: var(--primary-light);
  margin-bottom: 24px;
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700; line-height: 1.2;
  background: linear-gradient(135deg, #fff 0%, var(--primary-light) 50%, var(--gold-light) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 20px;
}
.hero p { font-size: 1.2rem; color: var(--text-secondary); max-width: 600px; margin: 0 auto 40px; }

/* ── FORM STYLES ── */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 0.88rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; letter-spacing: 0.03em; }
.form-control {
  width: 100%; padding: 13px 16px; border-radius: 10px;
  background: rgba(255,255,255,0.06); border: 1.5px solid var(--border);
  color: var(--text-primary); font-size: 0.95rem; font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
}
.form-control:focus { outline: none; border-color: var(--primary-light); background: rgba(255,255,255,0.09); }
.form-control::placeholder { color: var(--text-muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media(max-width:600px) { .form-row { grid-template-columns: 1fr; } }
.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 5px; }
.form-error { font-size: 0.82rem; color: var(--error); margin-top: 5px; }

/* ── SECTION DIVIDER ── */
.section-label {
  display: flex; align-items: center; gap: 12px; margin-bottom: 24px;
}
.section-label span {
  font-family: 'Playfair Display', serif; font-size: 1.3rem; font-weight: 600; color: var(--text-primary);
}
.section-label::before, .section-label::after {
  content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--border));
}

/* ── PRICE TAG ── */
.price-badge {
  display: inline-flex; flex-direction: column; align-items: center;
  background: linear-gradient(135deg, rgba(124,58,237,0.3), rgba(236,72,153,0.2));
  border: 1px solid rgba(167,139,250,0.4);
  border-radius: 16px; padding: 20px 32px;
}
.price-badge .amount { font-size: 2.5rem; font-weight: 700; color: var(--gold-light); font-family: 'Playfair Display', serif; }
.price-badge .label { font-size: 0.85rem; color: var(--text-muted); }

/* ── REPORT SECTIONS ── */
.report-section {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 20px; overflow: hidden;
}
.report-section-header {
  display: flex; align-items: center; gap: 14px; padding: 20px 24px;
  background: rgba(124,58,237,0.12); border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.report-section-icon { font-size: 1.6rem; }
.report-section-title { font-family: 'Playfair Display', serif; font-size: 1.2rem; font-weight: 600; }
.report-section-body { padding: 24px; }
.report-section-body p { color: var(--text-secondary); margin-bottom: 14px; }
.report-section-body ul { list-style: none; }
.report-section-body ul li { padding: 6px 0; color: var(--text-secondary); display: flex; align-items: flex-start; gap: 10px; }
.report-section-body ul li::before { content: '✦'; color: var(--gold); flex-shrink: 0; margin-top: 2px; }

/* ── CHART WHEEL ── */
.chart-wheel-container { position: relative; }
.planet-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.planet-table th { text-align: left; padding: 8px 12px; color: var(--text-muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--border); }
.planet-table td { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); color: var(--text-secondary); }
.planet-table tr:last-child td { border-bottom: none; }
.planet-symbol { font-size: 1.1rem; }
.sign-badge { display: inline-block; padding: 2px 10px; border-radius: 100px; font-size: 0.78rem; font-weight: 600; background: rgba(124,58,237,0.2); color: var(--primary-light); }
.retro-badge { color: var(--error); font-size: 0.75rem; }

/* ── ALERTS ── */
.alert { padding: 14px 18px; border-radius: 10px; margin-bottom: 20px; font-size: 0.92rem; display: flex; align-items: flex-start; gap: 10px; }
.alert-success { background: rgba(16,185,129,0.15); border: 1px solid rgba(16,185,129,0.3); color: #6EE7B7; }
.alert-error { background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.3); color: #FCA5A5; }
.alert-info { background: rgba(124,58,237,0.15); border: 1px solid rgba(124,58,237,0.3); color: var(--primary-light); }
.alert-warning { background: rgba(245,158,11,0.15); border: 1px solid rgba(245,158,11,0.3); color: #FDE68A; }

/* ── TABS ── */
.tabs { display: flex; gap: 4px; background: rgba(255,255,255,0.04); padding: 4px; border-radius: 12px; margin-bottom: 24px; }
.tab-btn { flex: 1; padding: 10px; border: none; background: transparent; color: var(--text-muted); font-size: 0.9rem; font-weight: 500; cursor: pointer; border-radius: 9px; transition: all 0.2s; font-family: inherit; }
.tab-btn.active { background: rgba(124,58,237,0.4); color: var(--text-primary); }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border); margin-top: 80px;
  padding: 60px 0 30px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
@media(max-width:768px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media(max-width:480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h4 { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); margin-bottom: 16px; letter-spacing: 0.05em; text-transform: uppercase; }
.footer-col p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.7; }
.footer-col a { display: block; font-size: 0.88rem; color: var(--text-muted); text-decoration: none; padding: 4px 0; transition: color 0.2s; }
.footer-col a:hover { color: var(--primary-light); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; border-top: 1px solid var(--border); font-size: 0.82rem; color: var(--text-muted); }

/* ── GDPR POPUP ── */
.gdpr-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 9999; padding: 20px; backdrop-filter: blur(4px);
}
.gdpr-popup {
  background: #1A1030; border: 1px solid var(--border);
  border-radius: 20px 20px 0 0; max-width: 1000px; width: 100%;
  padding: 32px; display: flex; gap: 24px; align-items: flex-start;
}
@media(max-width:600px) { .gdpr-popup { flex-direction: column; border-radius: 20px; } }
.gdpr-popup h3 { font-family: 'Playfair Display', serif; font-size: 1.1rem; margin-bottom: 10px; }
.gdpr-popup p { font-size: 0.88rem; color: var(--text-secondary); }
.gdpr-popup a { color: var(--primary-light); }
.gdpr-actions { display: flex; gap: 12px; flex-shrink: 0; align-items: center; }
@media(max-width:600px) { .gdpr-actions { width: 100%; } }

/* ── AUTH FORMS ── */
.auth-page { min-height: 100vh; display: flex; align-items: center; padding: 60px 0; }
.auth-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 24px; padding: 48px; max-width: 480px; margin: 0 auto; width: 100%; backdrop-filter: blur(10px); }
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo h2 { font-family: 'Playfair Display', serif; font-size: 1.8rem; margin-top: 12px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-divider span { font-size: 0.8rem; color: var(--text-muted); }

/* ── DASHBOARD ── */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }
.report-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; transition: all 0.2s; }
.report-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow); transform: translateY(-2px); }
.report-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.report-names { font-family: 'Playfair Display', serif; font-size: 1.1rem; }
.report-date { font-size: 0.8rem; color: var(--text-muted); }
.status-badge { display: inline-block; padding: 3px 12px; border-radius: 100px; font-size: 0.78rem; font-weight: 600; }
.status-completed { background: rgba(16,185,129,0.2); color: #6EE7B7; }
.status-pending { background: rgba(245,158,11,0.2); color: var(--gold-light); }
.status-processing { background: rgba(124,58,237,0.2); color: var(--primary-light); }
.status-failed { background: rgba(239,68,68,0.2); color: #FCA5A5; }

/* ── ZODIAC ICONS ── */
.zodiac-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.zodiac-item { text-align: center; padding: 12px; border-radius: 10px; background: var(--bg-card); }
.zodiac-item .symbol { font-size: 1.8rem; display: block; margin-bottom: 4px; }
.zodiac-item .name { font-size: 0.75rem; color: var(--text-muted); }

/* ── COMPATIBILITY SCORE ── */
.compat-score { text-align: center; padding: 24px; }
.compat-score .number { font-size: 4rem; font-weight: 700; font-family: 'Playfair Display', serif; color: var(--gold-light); }
.compat-score .label { color: var(--text-muted); font-size: 0.9rem; }
.score-bar { height: 8px; background: rgba(255,255,255,0.1); border-radius: 100px; overflow: hidden; margin: 12px 0; }
.score-bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--gold)); border-radius: 100px; transition: width 1.5s ease; }

/* ── LOADING ── */
.spinner { width: 40px; height: 40px; border: 3px solid rgba(167,139,250,0.2); border-top-color: var(--primary-light); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay { position: fixed; inset: 0; background: rgba(15,10,26,0.85); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 9998; gap: 20px; backdrop-filter: blur(4px); }
.loading-text { color: var(--primary-light); font-size: 1.1rem; }

/* ── ADMIN ── */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar { width: 260px; background: rgba(255,255,255,0.04); border-right: 1px solid var(--border); padding: 24px 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; flex-shrink: 0; }
.admin-content { flex: 1; padding: 32px; overflow-x: hidden; }
.admin-nav-item { display: flex; align-items: center; gap: 12px; padding: 12px 24px; color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; transition: all 0.2s; border-left: 3px solid transparent; }
.admin-nav-item:hover { color: var(--text-primary); background: var(--bg-card); }
.admin-nav-item.active { color: var(--primary-light); background: rgba(124,58,237,0.12); border-left-color: var(--primary-light); }
.admin-nav-group { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); padding: 16px 24px 6px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.stat-card .stat-value { font-size: 2rem; font-weight: 700; color: var(--text-primary); font-family: 'Playfair Display', serif; }
.stat-card .stat-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.data-table th { text-align: left; padding: 12px 16px; color: var(--text-muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--border); }
.data-table td { padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.04); color: var(--text-secondary); }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ── STARS ANIMATION ── */
.stars-bg { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; overflow: hidden; }
.star { position: absolute; background: #fff; border-radius: 50%; animation: twinkle var(--dur, 3s) ease-in-out infinite var(--delay, 0s); }
@keyframes twinkle { 0%,100% { opacity: 0.1; } 50% { opacity: 0.8; } }

/* ── RESPONSIVE NAVBAR ── */
.nav-toggle { display: none; background: none; border: none; color: var(--text-primary); font-size: 1.5rem; cursor: pointer; padding: 8px; }
@media(max-width:768px) {
  .nav-toggle { display: block; }
  .navbar-links { display: none; position: absolute; top: 72px; left: 0; right: 0; background: rgba(15,10,26,0.98); border-bottom: 1px solid var(--border); padding: 16px 24px; flex-direction: column; align-items: stretch; }
  .navbar-links.open { display: flex; }
  .navbar-links a { padding: 12px 16px; }
}

/* ── MISC ── */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-gold { color: var(--gold-light); }
.text-primary-c { color: var(--primary-light); }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.gap-2 { gap: 16px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media(max-width:600px) { .grid-2 { grid-template-columns: 1fr; } }
.hidden { display: none !important; }

/* Print report */
@media print {
  .navbar, footer, .btn, .gdpr-overlay { display: none !important; }
  body { background: white; color: black; }
  .card, .report-section { border: 1px solid #ddd; break-inside: avoid; }
}
