/* --------------------------------------------------------
   ELARA THEME SYSTEM  (GLOBAL FOR CMS + ARTIST PORTAL)
   Dark/Light theming + shared components
-------------------------------------------------------- */

/* Smooth transitions */
* {
  transition: background 0.25s ease,
              color 0.25s ease,
              border-color 0.25s ease;
}

/* ----------------------------- */
/* DARK THEME (Default)         */
/* ----------------------------- */
body.theme-dark {
  --bg: #020617;
  --surface: #0b1120;
  --sidebar: #020617;

  --text: #f9fafb;
  --muted: #94a3b8;

  --border: #1f2937;

  --primary: #38bdf8;
  --accent: #a855f7;

  --card-shadow: 0 18px 45px rgba(15,23,42,0.85);
}

/* Global background (dark mode) */
body.theme-dark {
  background:
    radial-gradient(circle at top left, #0b1120, transparent 55%),
    radial-gradient(circle at bottom right, #111827, #020617 60%);
}

/* --------------------------------------- */
/* PREMIUM LIGHT THEME (Blue Frosted Mode) */
/* --------------------------------------- */
body.theme-light {
  --bg: #e8f0fb;
  --surface: rgba(255, 255, 255, 0.62);
  --sidebar: rgba(236, 243, 255, 0.72);

  --text: #0f172a;
  --muted: #475569;

  --border: rgba(148, 163, 184, 0.35);

  --primary: #0ea5e9;
  --accent: #6366f1;

  --card-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

/* Global background (light mode) */
body.theme-light {
  background:
    radial-gradient(circle at top left, #f3f7ff, transparent 60%),
    radial-gradient(circle at bottom right, #dfe8f9, #e8f0fb 70%);
}

/* Frosted effect for light mode */
body.theme-light .card,
body.theme-light .sidebar,
body.theme-light .settings-card {
  backdrop-filter: blur(12px);
}

/* ----------------------------- */
/* GLOBAL COMPONENT VARIABLES    */
/* ----------------------------- */

:root {
  --radius: 16px;
}

/* ----------------------------- */
/* COMPONENT: CARDS              */
/* ----------------------------- */

.card,
.settings-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
}

/* ----------------------------- */
/* TYPOGRAPHY                    */
/* ----------------------------- */

body {
  color: var(--text);
  font-family: "Inter", sans-serif;
}

/* ----------------------------- */
/* BUTTONS                       */
/* ----------------------------- */

.btn,
.btn-primary,
.btn-secondary {
  font-family: inherit;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: 0.2s ease;
}

.btn-primary {
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #020617;
  border: none;
  font-weight: 600;
  box-shadow: 0 10px 26px rgba(0,0,0,0.25);
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-secondary {
  padding: 8px 14px;
  background: rgba(15,23,42,0.85);
  color: var(--muted);
  border: 1px solid var(--border);
}

body.theme-light .btn-secondary {
  background: rgba(255,255,255,0.45);
}

.btn-secondary:hover {
  color: var(--text);
  border-color: var(--primary);
}

/* ----------------------------- */
/* INPUTS                        */
/* ----------------------------- */

input,
select,
textarea {
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 0.84rem;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
}

/* ----------------------------- */
/* TABLES                        */
/* ----------------------------- */

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  padding: 8px;
}

td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
}

/* ----------------------------- */
/* STATUS PILLS                  */
/* ----------------------------- */

.pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  border: 1px solid var(--border);
  color: var(--muted);
}

.pill-green { color: #4ade80; border-color: rgba(34,197,94,0.7); }
.pill-amber { color: #facc15; border-color: rgba(245,158,11,0.7); }
.pill-red   { color: #f87171; border-color: rgba(239,68,68,0.7); }

/* ----------------------------- */
/* SIDEBAR BASE                  */
/* ----------------------------- */

.sidebar {
  background: var(--sidebar);
  border-right: 1px solid var(--border);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--muted);
  border: 1px solid transparent;
}

.nav-link:hover {
  border-color: var(--primary);
  color: var(--text);
  background: rgba(56,189,248,0.08);
}

.nav-link.active {
  background: rgba(56,189,248,0.15);
  border-color: rgba(56,189,248,0.6);
  color: var(--text);
  font-weight: 500;
}

/* ----------------------------- */
/* UTILITIES                     */
/* ----------------------------- */

.text-muted   { color: var(--muted); }
.text-primary { color: var(--primary); }
.rounded      { border-radius: var(--radius); }
