/* Custom Tabler overrides for Energy Dashboard */

.navbar-brand { font-weight:600; }
.nav-link.active, .dropdown-menu .dropdown-item.active { font-weight:600; }
/* Highlight active top-level with subtle underline */
.nav-link.active { position:relative; }
.nav-link.active::after { content:""; position:absolute; left:0.75rem; right:0.75rem; bottom:4px; height:3px; border-radius:2px; background:linear-gradient(90deg,#ffb347,#ffdd55); }

/* Card grid adjustments (reuse existing .cards but adapt spacing) */
.cards { gap:1.25rem; }
.cards .card { border:1px solid var(--tblr-border-color,#e2e8f0); box-shadow:var(--tblr-shadow-card,0 2px 4px rgba(0,0,0,.04)); }

/* Matrix table integrate Tabler palette */
.matrix th { background:#f1f5f9; }
.matrix td.empty { color:#94a3b8; }

/* Comparison wide table adapt fonts */
.compare-wide-table { font-size:.7rem; }

/* Embedded mode (no navbar) spacing */
body.embed .page { padding-top:0 !important; }
body.embed .container-xl { padding-top:0.5rem; }

/* Dark mode placeholder (future) */
@media (prefers-color-scheme: dark){
  .compare-wide-table { background:#1e293b; }
  .compare-wide-table th, .compare-wide-table td { border-color:#334155; }
}

/* =============================================================
   Decorative Background (light)
   Subtle layered gradients + faint grid; does not affect embed mode
   ============================================================= */
body:not(.embed) {
  background:
    radial-gradient(circle at 25% 18%, rgba(99,102,241,0.12), rgba(99,102,241,0) 55%),
    radial-gradient(circle at 80% 30%, rgba(14,165,233,0.12), rgba(14,165,233,0) 60%),
    linear-gradient(120deg,#f8fafc 0%, #eef2f7 100%);
  background-attachment: fixed;
}
body:not(.embed)::before {
  content:"";
  position:fixed; inset:0; pointer-events:none; z-index:-1;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,0.015) 0 1px, transparent 1px 80px),
    repeating-linear-gradient(0deg, rgba(0,0,0,0.015) 0 1px, transparent 1px 80px);
  mask: linear-gradient(to bottom, rgba(0,0,0,0.35), rgba(0,0,0,0.05));
}

html[data-bs-theme='dark'] body:not(.embed) {
  background:
    radial-gradient(circle at 20% 20%, rgba(99,102,241,0.25), rgba(99,102,241,0) 55%),
    radial-gradient(circle at 78% 28%, rgba(14,165,233,0.25), rgba(14,165,233,0) 60%),
    linear-gradient(120deg,#0f172a 0%, #1e293b 100%);
}
html[data-bs-theme='dark'] body:not(.embed)::before {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 80px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 80px);
  mask: linear-gradient(to bottom, rgba(0,0,0,0.5), rgba(0,0,0,0.05));
}
