/* ============================================================
   MeuDesejoVIP — Design System
   Suporta classes legadas (card, btn-primary, form-control, alert,
   dashboard-layout, dashboard-main, stat-card, sidebar-nav-item)
   ============================================================ */

/* ============================================================
   1. TOKENS
   ============================================================ */
:root {
  /* New tokens — paleta: preto puro + rosa neon */
  --bg-0: #050505; --bg-1: #0A0A0A; --bg-2: #101010;
  --surface: #121212; --surface-2: #1A1A1A;
  --border: rgba(255,255,255,.08); --border-2: rgba(255,255,255,.14);

  --rose: #FF1493; --rose-2: #FF4DB8; --rose-hover: #FF69C8; --rose-glow: rgba(255,20,147,.45); --neon-soft: rgba(255,20,147,.30);
  --gold: #d4af6a; --gold-2: #f4d294;
  --green: #00FF66; --blue: #4d9fff; --purple: #D946EF;
  --red: #ff3b5c; --orange: #ff9248;

  --text: #fafafa;
  --text-muted: #A0A0A0;
  --text-faint: rgba(255,255,255,.42);
  --white: #fff;

  /* Legacy aliases (so old class names that reference these still work) */
  --bg: var(--bg-0); --bg2: var(--bg-1); --bg3: var(--surface); --bg4: var(--surface-2);
  --muted: var(--text-muted); --muted2: var(--text-muted);

  --display: 'Fraunces','Cormorant Garamond',Georgia,serif;
  --body: 'Manrope',system-ui,-apple-system,sans-serif;
  --font: var(--body);

  --radius-sm: 8px; --radius: 12px; --radius-lg: 22px;
  --shadow-sm: 0 4px 12px -4px rgba(0,0,0,.4);
  --shadow:    0 8px 24px -8px rgba(0,0,0,.5);
  --shadow-lg: 0 20px 40px -12px rgba(0,0,0,.6);
}

/* ============================================================
   2. RESET + BASE
   ============================================================ */
* { box-sizing: border-box; }
*, *::before, *::after { margin: 0; padding: 0; }
html, body {
  background: var(--bg-0); color: var(--text);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-size: 14px; line-height: 1.5;
  min-height: 100vh; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--rose-2); }
button { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
input, select, textarea { font-family: inherit; }
h1, h2, h3, h4, h5 { font-family: var(--display); font-weight: 500; letter-spacing: -.01em; line-height: 1.2; }
h1 { font-size: 1.8rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
hr { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* Atmospheric body glow */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(50vw 50vh at 90% 0%, rgba(212,0,108,.07), transparent 60%),
    radial-gradient(40vw 40vh at 0% 70%, rgba(167,110,255,.04), transparent 65%);
}

/* ============================================================
   3. TOPBAR (rendered by includes/header.php)
   ============================================================ */
.topbar {
  position: sticky; top: 0; z-index: 100;
  padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(180deg, rgba(7,5,10,.92), rgba(7,5,10,.5));
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 600;
  font-size: 1.35rem; letter-spacing: -.02em;
  color: var(--text); text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand-crown {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--rose), var(--rose-2) 60%, var(--gold));
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M5 16L3 5l5.5 4L12 4l3.5 5L21 5l-2 11H5zm0 2h14v2H5v-2z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M5 16L3 5l5.5 4L12 4l3.5 5L21 5l-2 11H5zm0 2h14v2H5v-2z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.brand-vip { color: var(--rose-2); font-weight: 700; }

.topbar-nav { display: flex; gap: 26px; font-size: .9rem; font-weight: 500; }
.topbar-nav a { color: var(--text-muted); padding: 6px 0; position: relative; }
.topbar-nav a:hover, .topbar-nav a.active { color: var(--text); }
.topbar-nav a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -4px;
  height: 2px; background: var(--rose); border-radius: 2px;
}

.topbar-actions { display: flex; align-items: center; gap: 12px; }
.topbar-coins {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 13px 5px 5px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(212,175,106,.12), rgba(212,175,106,.04));
  border: 1px solid rgba(212,175,106,.25);
  font-weight: 600; font-size: .86rem; color: var(--gold-2);
}
.topbar-coins .icon {
  width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 800; color: #000;
}
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: all .15s; position: relative;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-2); }
.icon-btn .dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--rose); border: 2px solid var(--bg-0);
}
.user-pill {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 12px 5px 5px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; transition: all .15s;
  font-size: .86rem; font-weight: 500;
  color: var(--text); text-decoration: none;
}
.user-pill:hover { border-color: var(--border-2); }
.user-pill .avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface-2) center/cover;
  border: 1.5px solid var(--rose);
}

/* ============================================================
   4. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 20px; border-radius: 999px;
  font-size: .88rem; font-weight: 600;
  font-family: var(--body); cursor: pointer;
  background: var(--surface); border: 1px solid var(--border-2);
  color: var(--text); transition: all .15s;
  text-decoration: none;
}
.btn:hover { background: var(--surface-2); border-color: var(--text); color: var(--text); }
.btn-sm  { padding: 7px 14px; font-size: .8rem; }
.btn-lg  { padding: 13px 26px; font-size: .94rem; }
.btn-block { width: 100%; }

.btn-primary {
  background: linear-gradient(135deg, var(--rose), var(--rose-2));
  border-color: transparent; color: #fff;
  box-shadow: 0 8px 24px -10px var(--rose-glow);
}
.btn-primary:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, var(--rose-2), var(--rose));
  border-color: transparent; color: #fff;
}

.btn-secondary {
  background: transparent; border-color: var(--border-2);
  color: var(--text-muted);
}
.btn-secondary:hover { border-color: var(--text); color: var(--text); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  border-color: transparent; color: #000;
}

.btn-danger {
  background: rgba(255,59,92,.1); border-color: rgba(255,59,92,.4);
  color: var(--red);
}
.btn-danger:hover { background: rgba(255,59,92,.18); color: var(--red); }

.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: 50%; }

/* ============================================================
   5. CARDS
   ============================================================ */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  margin-bottom: 16px;
  transition: border-color .15s;
}
.card:hover { border-color: var(--border-2); }
.card-title {
  font-family: var(--display); font-size: 1.05rem; font-weight: 500;
  margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.card-rose   { border-color: rgba(212,0,108,.25);   background: linear-gradient(135deg, rgba(212,0,108,.04), var(--surface)); }
.card-gold   { border-color: rgba(212,175,106,.3);  background: linear-gradient(135deg, rgba(212,175,106,.04), var(--surface)); }
.card-purple { border-color: rgba(167,110,255,.3);  background: linear-gradient(135deg, rgba(167,110,255,.04), var(--surface)); }
.card-green  { border-color: rgba(0,210,120,.3);    background: linear-gradient(135deg, rgba(0,210,120,.04), var(--surface)); }

/* Stat card */
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  display: flex; align-items: center; gap: 14px;
}
.stat-card-icon {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  background: linear-gradient(135deg, var(--rose), var(--rose-2)); color: #fff;
  box-shadow: 0 8px 20px -8px var(--rose-glow);
}
.stat-card-body { flex: 1; min-width: 0; }
.stat-card .label, .stat-card .stat-label {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-faint); font-weight: 600; margin-bottom: 4px;
}
.stat-card .value, .stat-card .stat-value {
  font-family: var(--display); font-size: 1.5rem; font-weight: 500;
  letter-spacing: -.02em; line-height: 1.1; color: var(--text);
}
.stat-card .sub { font-size: .76rem; color: var(--text-muted); margin-top: 3px; }

/* ============================================================
   6. FORMS
   ============================================================ */
.form-group { margin-bottom: 14px; }
.form-group label {
  display: block; margin-bottom: 6px;
  font-size: .82rem; font-weight: 500;
  color: var(--text-muted);
}
.form-control {
  width: 100%; padding: 11px 14px;
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text); font-family: var(--body); font-size: .9rem;
  transition: all .15s;
}
.form-control:focus {
  outline: none; border-color: var(--rose-2);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(212,0,108,.12);
}
.form-control::placeholder { color: var(--text-faint); }
select.form-control {
  appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23888' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
}
textarea.form-control { min-height: 100px; resize: vertical; line-height: 1.5; }
.form-control:disabled { opacity: .5; cursor: not-allowed; }

/* Checkbox / radio */
input[type="checkbox"], input[type="radio"] {
  accent-color: var(--rose-2); width: 16px; height: 16px;
}

/* ============================================================
   7. ALERTS
   ============================================================ */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: .9rem; margin-bottom: 14px;
  border: 1px solid;
}
.alert-success { background: rgba(0,210,120,.08);  border-color: rgba(0,210,120,.3); color: var(--green); }
.alert-info    { background: rgba(77,159,255,.08); border-color: rgba(77,159,255,.3); color: var(--blue); }
.alert-warning { background: rgba(255,146,72,.08); border-color: rgba(255,146,72,.3); color: var(--orange); }
.alert-danger  { background: rgba(255,59,92,.08);  border-color: rgba(255,59,92,.3);  color: var(--red); }

/* ============================================================
   8. DASHBOARD LAYOUT (legacy support)
   ============================================================ */
.dashboard-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 65px);
  align-items: start;
  position: relative; z-index: 1;
}
.dashboard-sidebar {
  background: linear-gradient(180deg, var(--bg-1), var(--bg-0));
  border-right: 1px solid var(--border);
  min-height: calc(100vh - 65px);
  padding: 18px 0;
  position: sticky; top: 65px;
}
.dashboard-main { padding: 28px; min-width: 0; max-width: 100%; }

.sidebar-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 22px;
  font-size: .88rem; font-weight: 500;
  color: var(--text-muted);
  transition: all .15s;
  position: relative;
  text-decoration: none;
  border-left: 3px solid transparent;
}
.sidebar-nav-item:hover {
  background: rgba(255,255,255,.03);
  color: var(--text);
}
.sidebar-nav-item.active {
  background: linear-gradient(90deg, rgba(212,0,108,.15), rgba(212,0,108,.02));
  color: var(--rose-2);
  border-left-color: var(--rose-2);
}
.sidebar-nav-item span[style] {
  margin-left: auto !important;
}

@media (max-width: 980px) {
  .dashboard-layout { grid-template-columns: 1fr; }
  .dashboard-sidebar {
    position: fixed; left: -260px; top: 65px; z-index: 90;
    width: 260px; transition: left .25s;
    height: calc(100vh - 65px); overflow-y: auto;
  }
  .dashboard-sidebar.open { left: 0; box-shadow: var(--shadow-lg); }
  .dashboard-main { padding: 20px 16px; }
}

/* ============================================================
   9. PUBLIC PAGE WRAPPER
   ============================================================ */
.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px 60px;
  position: relative; z-index: 1;
}

/* ============================================================
   10. TABLES
   ============================================================ */
.table {
  width: 100%; border-collapse: collapse;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.table thead { background: var(--bg-1); }
.table th {
  text-align: left; padding: 12px 16px;
  font-size: .72rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-faint); font-weight: 600;
}
.table td { padding: 14px 16px; font-size: .88rem; border-top: 1px solid var(--border); }
.table tbody tr:hover { background: rgba(255,255,255,.02); }

/* ============================================================
   11. PILLS / BADGES / CHIPS
   ============================================================ */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: 999px;
  font-size: .76rem; font-weight: 500;
  background: rgba(255,255,255,.05); border: 1px solid var(--border);
  color: var(--text-muted);
}
.pill-rose   { background: rgba(212,0,108,.1);    border-color: rgba(212,0,108,.25);   color: var(--rose-2); }
.pill-gold   { background: rgba(212,175,106,.1);  border-color: rgba(212,175,106,.3);  color: var(--gold-2); }
.pill-green  { background: rgba(0,210,120,.1);    border-color: rgba(0,210,120,.3);    color: var(--green); }
.pill-blue   { background: rgba(77,159,255,.1);   border-color: rgba(77,159,255,.3);   color: var(--blue); }
.pill-red    { background: rgba(255,59,92,.1);    border-color: rgba(255,59,92,.3);    color: var(--red); }
.pill-purple { background: rgba(167,110,255,.1);  border-color: rgba(167,110,255,.3);  color: var(--purple); }

/* ============================================================
   12. UTILITIES
   ============================================================ */
.text-center { text-align: center; }
.text-rose { color: var(--rose-2); }
.text-gold { color: var(--gold-2); }
.text-muted { color: var(--text-muted); }
.text-faint { color: var(--text-faint); }
.text-display { font-family: var(--display); font-weight: 500; letter-spacing: -.01em; }
.gradient-text {
  background: linear-gradient(120deg, var(--rose-2), var(--gold-2));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 14px; } .mb-3 { margin-bottom: 20px; } .mb-4 { margin-bottom: 28px; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 14px; } .mt-3 { margin-top: 20px; } .mt-4 { margin-top: 28px; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 6px; } .gap-2 { gap: 10px; } .gap-3 { gap: 16px; } .gap-4 { gap: 22px; }
.flex-1 { flex: 1; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ============================================================
   13. FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-0);
  padding: 36px 24px 22px; margin-top: 60px;
  position: relative; z-index: 1;
}
.site-footer-inner { max-width: 1280px; margin: 0 auto; }
.site-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 28px; }
.site-footer-tagline { color: var(--text-muted); font-size: .86rem; line-height: 1.6; max-width: 280px; margin-top: 12px; }
.site-footer h4 {
  font-family: var(--body); font-size: .72rem; text-transform: uppercase;
  letter-spacing: .14em; color: var(--rose-2); margin-bottom: 12px; font-weight: 700;
}
.site-footer ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.site-footer ul a { font-size: .86rem; color: var(--text-muted); }
.site-footer ul a:hover { color: var(--text); }
.site-footer-bottom {
  padding-top: 22px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  font-size: .78rem; color: var(--text-faint);
}
.adult-badge {
  display: inline-flex; padding: 3px 9px; border-radius: 4px;
  background: var(--rose); color: #fff; font-weight: 700; font-size: .7rem;
}
@media (max-width: 768px) { .site-footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; } }
/* Hide footer on dashboard pages */
.dashboard-layout ~ .site-footer { display: none; }

/* ============================================================
   14. RESPONSIVE TOPBAR
   ============================================================ */
@media (max-width: 980px) {
  .topbar { padding: 12px 16px; }
  .topbar-nav { display: none; }
  .topbar-actions .btn span.hide-mobile { display: none; }
  .user-pill .meta { display: none; }
}

/* ============================================================
   15. MOBILE MENU TOGGLE
   ============================================================ */
.menu-toggle {
  display: none; background: var(--surface); border: 1px solid var(--border);
  width: 38px; height: 38px; border-radius: 50%;
  color: var(--text); font-size: 1.1rem; align-items: center; justify-content: center;
}
@media (max-width: 980px) { .menu-toggle { display: inline-flex; } }
