/* ============================================================================
   Drimystic Records — Mystic Emerald & Gold theme
   Pure CSS (no build step) for shared hosting. Works with Bootstrap 5.
   ============================================================================ */

:root {
  /* Brand palette */
  --emerald: #059669;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --teal: #14b8a6;
  --teal-600: #0d9488;
  --gold: #f59e0b;
  --gold-400: #fbbf24;
  --cyan: #06b6d4;

  /* Semantic tokens (light) */
  --bg: #f7fbf9;
  --fg: #0c1f17;
  --card: #ffffff;
  --muted: #6b7d75;
  --border: #e2ece7;
  --primary: var(--emerald);
  --primary-fg: #ffffff;

  /* Gradients */
  --brand-grad: linear-gradient(135deg, #059669 0%, #14b8a6 50%, #f59e0b 100%);
  --brand-grad-soft: linear-gradient(135deg, rgba(5,150,105,0.12), rgba(20,184,166,0.12), rgba(245,158,11,0.12));

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(5, 80, 60, 0.06);
  --shadow: 0 4px 16px rgba(5, 80, 60, 0.08);
  --shadow-lg: 0 12px 40px rgba(5, 80, 60, 0.12);

  --radius: 0.75rem;
}

[data-bs-theme="dark"] {
  --bg: #0a1612;
  --fg: #eaf5f0;
  --card: #11201a;
  --muted: #8ba79a;
  --border: rgba(255,255,255,0.08);
  --primary: #10b981;
  --primary-fg: #0a1612;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow: 0 4px 16px rgba(0,0,0,0.35);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
}

* { box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }

a { color: var(--emerald); text-decoration: none; }
a:hover { color: var(--teal-600); }

/* ---- Brand helpers ---- */
.brand-gradient { background: var(--brand-grad) !important; color: #fff !important; }
.brand-text {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.btn-brand {
  background: var(--brand-grad);
  color: #fff;
  border: none;
  font-weight: 600;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s;
  box-shadow: var(--shadow);
}
.btn-brand:hover { color:#fff; transform: translateY(-1px); box-shadow: var(--shadow-lg); opacity:.95; }
.btn-brand:active { transform: translateY(0); }
.btn-brand:disabled { opacity:.6; cursor:not-allowed; }

.btn-outline-brand {
  background: transparent;
  color: var(--emerald);
  border: 1.5px solid var(--emerald);
  font-weight: 600;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius);
  transition: all .15s;
}
.btn-outline-brand:hover { background: var(--emerald); color:#fff; }

/* ---- Cards ---- */
.card-drim {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  transition: transform .2s, box-shadow .2s;
}
.card-drim.hover-lift:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.glass {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
[data-bs-theme="dark"] .glass {
  background: rgba(17,32,26,0.6);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* ---- Navbar ---- */
.navbar-drim {
  background: transparent;
  transition: all .25s;
  padding: 0.85rem 0;
}
.navbar-drim.scrolled {
  background: var(--glass-bg, rgba(255,255,255,0.85));
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
}
[data-bs-theme="dark"] .navbar-drim.scrolled { background: rgba(10,22,18,0.85); }
.navbar-drim .nav-link { color: var(--fg); font-weight: 500; }
.navbar-drim .nav-link:hover { color: var(--emerald); }
.navbar-drim .navbar-brand { font-weight: 800; }

/* ---- Hero / aurora ---- */
.aurora { position: relative; overflow: hidden; }
.aurora::before, .aurora::after {
  content: '';
  position: absolute;
  border-radius: 9999px;
  filter: blur(80px);
  opacity: 0.55;
  z-index: 0;
  animation: floaty 14s ease-in-out infinite;
}
.aurora::before {
  width: 420px; height: 420px;
  background: radial-gradient(circle at 30% 30%, #10b981, transparent 70%);
  top: -120px; left: -80px;
}
.aurora::after {
  width: 480px; height: 480px;
  background: radial-gradient(circle at 70% 70%, #14b8a6, transparent 70%);
  bottom: -160px; right: -100px;
  animation-delay: -7s;
}
@keyframes floaty {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(40px,-30px) scale(1.12); }
}

/* ---- Sound wave EQ bars ---- */
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 20px; }
.eq .bar {
  width: 3px; border-radius: 9999px;
  background: linear-gradient(to top, var(--emerald), var(--gold));
  animation: eq 1.1s ease-in-out infinite;
}
.eq .bar:nth-child(2) { animation-delay: .15s; }
.eq .bar:nth-child(3) { animation-delay: .3s; }
.eq .bar:nth-child(4) { animation-delay: .45s; }
.eq .bar:nth-child(5) { animation-delay: .6s; }
@keyframes eq { 0%,100% { height: 20%; } 50% { height: 100%; } }

/* ---- Artwork cover (gradient + initials) ---- */
.artwork {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  aspect-ratio: 1 / 1;
  background: var(--brand-grad);
}
.artwork::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.3), transparent 60%);
  mix-blend-mode: overlay;
}
.artwork .eq-mini {
  position: absolute; bottom: 8px; left: 8px; height: 14px; opacity: .7;
}

/* ---- Status badge ---- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.status-badge .dot { width: 6px; height: 6px; border-radius: 50%; }

/* ---- Stat card ---- */
.stat-card { display:flex; justify-content:space-between; align-items:flex-start; }
.stat-card .stat-value { font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.stat-card .stat-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  background: var(--brand-grad);
  box-shadow: var(--shadow);
}

/* ---- Sidebar (dashboard/admin) ---- */
.layout-shell { display:flex; min-height:100vh; }
.sidebar {
  width: 260px; flex-shrink:0;
  background: var(--card);
  border-right: 1px solid var(--border);
  padding: 1rem 0.75rem;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .nav-link-drim {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  border-radius: 0.5rem;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
  transition: all .15s;
}
.sidebar .nav-link-drim:hover { background: rgba(16,185,129,0.1); color: var(--emerald); }
.sidebar .nav-link-drim.active { background: var(--emerald); color: #fff; }
.sidebar .nav-link-drim .badge-count {
  margin-left: auto;
  background: #f43f5e; color:#fff;
  font-size: 0.65rem; padding: 0.1rem 0.4rem;
  border-radius: 9999px; font-weight: 700;
}

.main-area { flex: 1; min-width: 0; display:flex; flex-direction:column; }
.topbar {
  height: 64px; position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 1rem;
  padding: 0 1.5rem;
  background: var(--glass-bg, rgba(255,255,255,0.8));
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
[data-bs-theme="dark"] .topbar { background: rgba(10,22,18,0.8); }

.page-content { padding: 1.5rem; }
@media (min-width: 992px) { .page-content { padding: 2rem; } }

/* ---- Charts (Chart.js containers) ---- */
.chart-wrap { position: relative; height: 280px; }

/* ---- Footer ---- */
.footer-drim {
  margin-top: auto;
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
}

/* ---- Misc ---- */
.text-muted-2 { color: var(--muted) !important; }
.divider { height:1px; background: var(--border); margin: 1.5rem 0; }
.scroll-y { max-height: 24rem; overflow-y: auto; }
.scroll-y::-webkit-scrollbar { width: 8px; }
.scroll-y::-webkit-scrollbar-thumb { background: rgba(16,185,129,0.3); border-radius: 9999px; }

/* Marquee */
.marquee { display:flex; gap: 3rem; animation: marquee 28s linear infinite; white-space: nowrap; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Stepper */
.stepper { display:flex; align-items:center; gap:0; flex-wrap:wrap; }
.stepper .step { display:flex; flex-direction:column; align-items:center; gap:.35rem; position:relative; }
.stepper .step .circle {
  width:36px; height:36px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-weight:700; font-size:.85rem;
  background: var(--border); color: var(--muted);
  border: 2px solid transparent;
  z-index:1;
}
.stepper .step.done .circle { background: var(--emerald); color:#fff; }
.stepper .step.current .circle { background: var(--teal); color:#fff; border-color: var(--emerald); }
.stepper .step.rejected .circle { background:#ef4444; color:#fff; }
.stepper .step .label { font-size:.7rem; color:var(--muted); text-align:center; }
.stepper .step.done .label, .stepper .step.current .label { color: var(--fg); font-weight:600; }
.stepper .line { flex:1; height:2px; background: var(--border); min-width: 24px; }
.stepper .line.done { background: var(--emerald); }

/* Toast */
.toast-drim {
  position: fixed; top: 1rem; right: 1rem; z-index: 9999;
  background: var(--card); border:1px solid var(--border);
  border-left: 4px solid var(--emerald);
  padding: .85rem 1.1rem; border-radius: .6rem;
  box-shadow: var(--shadow-lg); max-width: 360px;
  display:none;
}
.toast-drim.show { display:block; animation: slideIn .25s ease; }
.toast-drim.error { border-left-color: #ef4444; }
@keyframes slideIn { from { transform: translateX(120%); } to { transform: translateX(0); } }
