/* ============================================================
   Devine Jewels & Diamonds — Main Stylesheet
   ============================================================ */

:root {
  --gold: #C9952A;
  --gold-light: #E8B84B;
  --gold-dark: #96710F;
  --gold-pale: #FDF6E3;
  --dark: #0D0D0D;
  --dark-2: #1A1A1A;
  --dark-3: #252525;
  --text-muted: #7a7a7a;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-md: 0 8px 30px rgba(0,0,0,0.12);
}

/* ── Base ───────────────────────────────────────────────────── */
body { font-family: 'Inter', sans-serif; color: #1a1a1a; background: #fff; }
h1,h2,h3,h4,h5 { font-family: 'Cormorant Garamond', serif; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
a { text-decoration: none; }

/* ── Navbar ─────────────────────────────────────────────────── */
.dj-navbar {
  background: linear-gradient(135deg, #0D0D0D 0%, #1c1408 100%);
  border-bottom: 1px solid rgba(201,149,42,0.3);
  padding: 12px 0;
}
.brand-icon { color: var(--gold-light); font-size: 22px; margin-right: 6px; }
.brand-name { font-family: 'Cormorant Garamond', serif; font-size: 20px; font-weight: 600; color: #fff; }
.brand-sub  { font-size: 12px; color: var(--gold-light); margin-left: 4px; }
.dj-navbar .nav-link { color: rgba(255,255,255,0.8); font-size: 14px; font-weight: 400; padding: 6px 10px; border-radius: 6px; transition: all 0.2s; }
.dj-navbar .nav-link:hover, .dj-navbar .nav-link.active { color: var(--gold-light); }
.btn-warning { background: var(--gold); border-color: var(--gold); color: #fff !important; font-weight: 500; }
.btn-warning:hover { background: var(--gold-dark); border-color: var(--gold-dark); }
.btn-outline-warning { border-color: var(--gold); color: var(--gold-light) !important; }
.btn-outline-warning:hover { background: var(--gold); color: #fff !important; }

/* ── Hero ────────────────────────────────────────────────────── */
.hero-section {
  background: linear-gradient(135deg, #0d0d0d 0%, #1c1408 60%, #2a1f05 100%);
  min-height: 88vh; display: flex; align-items: center; position: relative; overflow: hidden;
}
.hero-section::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='%23c9952a' 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");
}
.hero-badge { display: inline-block; background: rgba(201,149,42,0.15); border: 1px solid rgba(201,149,42,0.3); color: var(--gold-light); font-size: 13px; padding: 6px 16px; border-radius: 30px; margin-bottom: 20px; }
.hero-title { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 600; color: #fff; line-height: 1.15; }
.hero-title .gold-text { color: var(--gold-light); }
.hero-subtitle { color: rgba(255,255,255,0.7); font-size: 16px; line-height: 1.7; max-width: 500px; }

/* ── Section headings ───────────────────────────────────────── */
.section-label { font-size: 13px; font-weight: 500; color: var(--gold); text-transform: uppercase; letter-spacing: 0.1em; }
.section-title { font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 600; color: #0d0d0d; margin-top: 8px; }
.section-title .gold-text { color: var(--gold); }

/* ── Cards ───────────────────────────────────────────────────── */
.dj-card { background: #fff; border: 1px solid #f0e8d0; border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); transition: all 0.3s; }
.dj-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.dj-card-dark { background: var(--dark-2); border-color: rgba(201,149,42,0.2); color: #fff; }
.stat-card { text-align: center; padding: 30px 20px; }
.stat-icon { width: 56px; height: 56px; background: linear-gradient(135deg, var(--gold-pale), #f5e8c0); border-radius: 14px; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; font-size: 24px; color: var(--gold); }
.stat-value { font-family: 'Cormorant Garamond', serif; font-size: 2rem; font-weight: 600; color: var(--gold-dark); }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ── Plan table ─────────────────────────────────────────────── */
.plan-table th { background: var(--dark-2); color: var(--gold-light); font-weight: 500; font-size: 14px; border: none; }
.plan-table td { font-size: 14px; vertical-align: middle; border-color: #f5eed8; }
.plan-table tr:nth-child(even) td { background: #fdfaf2; }
.level-badge { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--gold); color: #fff; font-size: 12px; font-weight: 600; }

/* ── Product card ───────────────────────────────────────────── */
.product-card { border-radius: var(--radius); overflow: hidden; border: 1px solid #f0e8d0; transition: all 0.3s; }
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.product-card .product-img { aspect-ratio: 1; background: var(--gold-pale); display: flex; align-items: center; justify-content: center; color: var(--gold); font-size: 48px; }
.product-card img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.product-card .product-body { padding: 16px; }
.product-price { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; color: var(--gold-dark); font-weight: 600; }

/* ── Member / Admin Panel ───────────────────────────────────── */
.panel-sidebar {
  width: 250px; min-height: 100vh; background: var(--dark-2);
  border-right: 1px solid rgba(201,149,42,0.2); position: fixed; top: 0; left: 0; z-index: 100;
  display: flex; flex-direction: column;
}
.panel-sidebar .sidebar-brand { padding: 20px 20px 16px; border-bottom: 1px solid rgba(201,149,42,0.15); }
.panel-sidebar .sidebar-nav { padding: 12px 0; flex: 1; overflow-y: auto; }
.sidebar-nav .nav-item { padding: 2px 12px; }
.sidebar-nav .nav-link { color: rgba(255,255,255,0.65); font-size: 14px; padding: 9px 14px; border-radius: 8px; display: flex; align-items: center; gap: 10px; transition: all 0.2s; }
.sidebar-nav .nav-link i { font-size: 17px; }
.sidebar-nav .nav-link:hover, .sidebar-nav .nav-link.active { color: var(--gold-light); background: rgba(201,149,42,0.12); }
.sidebar-nav .nav-link.active { color: var(--gold-light); font-weight: 500; }
.sidebar-section-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(255,255,255,0.3); padding: 12px 26px 4px; }

.panel-main { margin-left: 250px; min-height: 100vh; background: #f9f7f2; }
.panel-topbar { background: #fff; border-bottom: 1px solid #eee; padding: 14px 28px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 50; }
.panel-content { padding: 28px; }

/* Panel stat cards */
.panel-stat { background: #fff; border: 1px solid #eee; border-radius: var(--radius); padding: 22px; display: flex; align-items: center; gap: 16px; }
.panel-stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.panel-stat-icon.gold { background: #fdf6e3; color: var(--gold); }
.panel-stat-icon.green { background: #e8f8e8; color: #28a745; }
.panel-stat-icon.blue  { background: #e8f0fb; color: #1a6bcc; }
.panel-stat-icon.purple{ background: #f0eaff; color: #7c3aed; }
.panel-stat-icon.red   { background: #fde8e8; color: #dc3545; }
.panel-stat-value { font-size: 1.5rem; font-weight: 600; color: #0d0d0d; line-height: 1; }
.panel-stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* Data tables */
.dj-table { width: 100%; background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid #eee; }
.dj-table thead th { background: #f8f8f6; font-size: 12px; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; padding: 12px 16px; border: none; border-bottom: 1px solid #eee; }
.dj-table tbody td { padding: 12px 16px; font-size: 14px; border: none; border-bottom: 1px solid #f5f5f5; vertical-align: middle; }
.dj-table tbody tr:last-child td { border-bottom: none; }
.dj-table tbody tr:hover td { background: #fdfaf2; }

/* Matrix level pills */
.matrix-pill { display: flex; align-items: center; justify-content: space-between; background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 10px 14px; margin-bottom: 6px; }
.matrix-pill .level-num { font-size: 12px; color: var(--text-muted); }
.matrix-pill .level-count { font-weight: 600; color: var(--gold-dark); }
.matrix-pill .level-bar { height: 4px; background: #f0e8d0; border-radius: 2px; flex: 1; margin: 0 12px; }
.matrix-pill .level-fill { height: 100%; background: var(--gold); border-radius: 2px; }

/* Downline tree */
.tree-node { border: 1px solid #eee; border-radius: 8px; padding: 10px 14px; background: #fff; font-size: 13px; }
.tree-node.tree-root { border-color: var(--gold); background: var(--gold-pale); }
.tree-children { border-left: 2px solid #f0e8d0; margin-left: 20px; padding-left: 16px; }

/* Reward progress */
.reward-milestone { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 8px; border: 1px solid #eee; background: #fff; margin-bottom: 8px; }
.reward-milestone.achieved { border-color: #c3e6cb; background: #f4fff7; }
.reward-milestone.locked { opacity: 0.55; }
.reward-icon { font-size: 22px; }

/* ── Footer ─────────────────────────────────────────────────── */
.dj-footer { background: var(--dark-2); color: rgba(255,255,255,0.8); }
.footer-link { color: rgba(255,255,255,0.55); font-size: 13px; display: block; margin-bottom: 6px; transition: color 0.2s; }
.footer-link:hover { color: var(--gold-light); }

/* ── Forms ───────────────────────────────────────────────────── */
.dj-form-card { background: #fff; border-radius: var(--radius); border: 1px solid #f0e8d0; padding: 36px; box-shadow: var(--shadow-md); }
.form-control:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,149,42,0.15); }
.form-label { font-size: 13px; font-weight: 500; color: #444; }

/* ── Utilities ───────────────────────────────────────────────── */
.text-gold { color: var(--gold); }
.text-gold-light { color: var(--gold-light); }
.bg-gold { background: var(--gold); }
.bg-gold-pale { background: var(--gold-pale); }
.badge.bg-gold { background: var(--gold) !important; }
.divider-gold { border: none; border-top: 1px solid rgba(201,149,42,0.25); }
.section-gap { padding: 80px 0; }
.section-gap-sm { padding: 50px 0; }

/* ── Responsive sidebar ─────────────────────────────────────── */
@media (max-width: 768px) {
  .panel-sidebar { transform: translateX(-100%); transition: transform 0.3s; }
  .panel-sidebar.open { transform: translateX(0); }
  .panel-main { margin-left: 0; }
  .panel-content { padding: 16px; }
}