/* Colorful Modern theme */
:root {
  --accent-1: #6f42c1;
  --accent-2: #ff7ab6;
  --card-bg: #ffffff;
  --sidebar-text: #333333;
  --sidebar-bg-dark: #0d1117;
  --sidebar-text-dark: #e6edf3;
}

body {
  padding-top: 56px;
  background: linear-gradient(180deg, rgba(111,66,193,0.06), rgba(255,122,182,0.03));
  min-height: 100vh;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.navbar-brand strong { color: var(--accent-1); }

.card { border-radius: 12px; background: var(--card-bg); }

.sidebar .nav-link { color: var(--sidebar-text); padding: 10px; border-radius: 8px; }
.sidebar .nav-link.active, .sidebar .nav-link:hover { background: rgba(111,66,193,0.08); color: var(--accent-1); }

.display-6 { color: var(--accent-1); font-weight:700; }

/* Dark theme overrides */
[data-bs-theme="dark"] {
  background: linear-gradient(180deg, rgba(0,0,0,0.6), rgba(0,0,0,0.4));
  color: #e6edf3;
}

[data-bs-theme="dark"] .card {
  background: #0b1220;
  color: #e6edf3;
}

[data-bs-theme="dark"] .sidebar {
  background: #071124;
}

[data-bs-theme="dark"] .sidebar .nav-link {
  color: var(--sidebar-text-dark);
}

[data-bs-theme="dark"] .sidebar .nav-link:hover,
[data-bs-theme="dark"] .sidebar .nav-link.active {
  background: rgba(255,255,255,0.03);
  color: var(--accent-2);
}

/* responsive tweaks */
@media (max-width: 767px) {
  .sidebar { position: static; height: auto; }
  body { padding-top: 70px; }
}





/* ---------------------
   SIDEBAR DARK MODE FIX
---------------------- */

/* sfondo sidebar */
html[data-bs-theme="dark"] #sidebarMenu {
    background-color: #0f0f0f !important;
    border-color: #1f1f1f !important;
}

/* link */
html[data-bs-theme="dark"] #sidebarMenu .nav-link {
    color: #e6e6e6 !important;
    background: transparent !important;
}

/* hover */
html[data-bs-theme="dark"] #sidebarMenu .nav-link:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

/* active */
html[data-bs-theme="dark"] #sidebarMenu .nav-link.active {
    background: rgba(13, 110, 253, 0.25) !important;
    border-left: 4px solid #0d6efd;
    color: #ffffff !important;
    font-weight: 600;
}

/* icone */
html[data-bs-theme="dark"] #sidebarMenu .nav-link i {
    color: #e6e6e6 !important;
}

/* titoli sezione */
html[data-bs-theme="dark"] #sidebarMenu .small.text-muted {
    color: #bcbcbc !important;
}

/* elimina il viola su focus */
html[data-bs-theme="dark"] #sidebarMenu .nav-link:focus,
html[data-bs-theme="dark"] #sidebarMenu .nav-link:active {
    background: rgba(255, 255, 255, 0.10) !important;
    color: #ffffff !important;
    outline: none;
}
html[data-bs-theme="light"] #sidebarMenu {
    background-color: #f9fafb !important;
}
