a:link {
  text-decoration: none;  
  color: #006eff; 
  font-weight: 500;    
  transition: color 0.3s ease;
}

a:hover {
  color: #00b4ad;  
  font-weight: 500;     
  text-decoration: none;
  cursor: pointer;
}

a:visited{
  text-decoration: none;  
  font-weight: 500;    
}
/* VARIABILI */
:root {
  --sidebar-width: 250px;
  --topbar-height: 70px;
  --sidebar-bg: #1e293b;
  --sidebar-active: #3b82f6;
  --bs-primary: #3b82f6;
  --bs-body-bg: #f3f4f6;
  --bs-body-color: #000;
}

html.dark {
  --sidebar-bg: #0f172a;
  --bs-body-bg: #0f172a;
  --bs-body-color: #fff;
}

/* LAYOUT */
body {
  overflow: hidden;
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
  transition: background-color 0.3s, color 0.3s;
}

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background-color: var(--sidebar-bg);
  position: fixed;
  left: 0;
  top: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
  z-index: 1000;
}

.sidebar-header {
  background-color: rgba(59, 130, 246, 0.1);
  padding: 1.5rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link {
  color: rgba(255, 255, 255, 0.7);
  padding: 0.75rem 1rem;
  margin-bottom: 0.25rem;
  border-radius: 0.5rem;
  transition: all 0.3s;
  font-size: 0.95rem;
}

.sidebar .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.sidebar .nav-link.active {
  background-color: var(--sidebar-active);
  color: #fff;
  font-weight: 500;
}

.sidebar-footer {
  margin-top: auto;
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* MAIN CONTENT */
.main-content {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* TOPBAR */
.topbar {
  height: var(--topbar-height);
  background-color: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  transition: all 0.3s;
}

html.dark .topbar {
  background-color: #1e293b;
  border-bottom-color: #334155;
}

.topbar h5 {
  color: #111827;
}

html.dark .topbar h5 {
  color: #f9fafb;
}

.topbar .breadcrumb {
  background: transparent;
  padding: 0;
  margin: 0;
}

.topbar .breadcrumb-item a {
  color: #6b7280;
  text-decoration: none;
}

html.dark .topbar .breadcrumb-item a {
  color: #9ca3af;
}

.topbar .breadcrumb-item.active {
  color: #374151;
}

html.dark .topbar .breadcrumb-item.active {
  color: #d1d5db;
}

.topbar .breadcrumb-item + .breadcrumb-item::before {
  color: #9ca3af;
}

html.dark .topbar .breadcrumb-item + .breadcrumb-item::before {
  color: #6b7280;
}

/* CONTENT AREA */
.content-area {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
}

/* CARDS */
.card {
  background-color: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.3s;
}

html.dark .card {
  background-color: #1e293b;
  border-color: #334155;
}

.card-header {
  border-bottom: 1px solid #e5e7eb;
}

html.dark .card-header {
  border-bottom-color: #334155;
}

.card-header h5 {
  color: #111827;
}

html.dark .card-header h5 {
  color: #f9fafb;
}

.stat-card {
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

html.dark .stat-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.stat-card .text-muted {
  color: #6b7280 !important;
}

html.dark .stat-card .text-muted {
  color: #9ca3af !important;
}

.stat-card h3 {
  color: #111827;
}

html.dark .stat-card h3 {
  color: #f9fafb;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* TABLE */
.table {
  color: #374151;
}

html.dark .table {
  color: #f9fafb;
}

.table thead th {
  border-bottom: 2px solid #e5e7eb;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
}

html.dark .table thead th {
  border-bottom-color: #334155;
  color: #9ca3af;
}

.table tbody td {
  vertical-align: middle;
  border-bottom: 1px solid #e5e7eb;
  color: #374151;
}

html.dark .table tbody td {
  border-bottom-color: #334155;
  color: #e5e7eb;
}

.table-hover tbody tr:hover {
  background-color: #f9fafb;
}

html.dark .table-hover tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

/* BADGES */
.badge {
  padding: 0.35rem 0.75rem;
  font-weight: 500;
  font-size: 0.75rem;
}

/* DROPDOWN */
html.dark .dropdown-menu {
  background-color: #1e293b;
  border-color: #334155;
}

html.dark .dropdown-item {
  color: #fff;
}

html.dark .dropdown-item:hover {
  background-color: #334155;
}

html.dark .dropdown-divider {
  border-color: #334155;
}

/* BUTTONS */
.btn-link {
  color: #374151;
  text-decoration: none;
}

html.dark .btn-link {
  color: #d1d5db;
}

.btn-link:hover {
  color: #3b82f6;
}

html.dark .btn-outline-secondary {
  border-color: #475569;
  color: #94a3b8;
}

html.dark .btn-outline-secondary:hover {
  background-color: #334155;
  border-color: #475569;
  color: #fff;
}

.dropdown-toggle {
  color: #374151;
}

html.dark .dropdown-toggle {
  color: #f9fafb;
}

.dropdown-toggle:hover {
  color: #3b82f6;
}

html.dark .dropdown-toggle:hover {
  color: #60a5fa;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  :root {
    --sidebar-width: 0;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    width: 100%;
  }

  .content-area {
    padding: 1rem;
  }

  .topbar {
    padding: 1rem;
  }
}

/* SCROLLBAR */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.content-area::-webkit-scrollbar {
  width: 8px;
}

.content-area::-webkit-scrollbar-track {
  background: transparent;
}

.content-area::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

html.dark .content-area::-webkit-scrollbar-thumb {
  background: #475569;
}

.content-area::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

html.dark .content-area::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

#toggle-dark {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 2000;
}
/* FORM CONTROLS - DARK MODE */
html.dark .form-control {
  background-color: #1e293b;
  border-color: #475569;
  color: #f1f5f9;
}

html.dark .form-control:focus {
  background-color: #1e293b;
  border-color: #3b82f6;
  color: #f1f5f9;
  box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25);
}

html.dark .form-control::placeholder {
  color: #94a3b8;
  opacity: 1;
}

html.dark .form-label {
  color: #e2e8f0;
}

html.dark .form-text {
  color: #94a3b8 !important;
}

/* ALERTS - DARK MODE */
html.dark .alert-info {
  background-color: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

html.dark .alert-danger {
  background-color: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

html.dark .alert-success {
  background-color: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.3);
  color: #86efac;
}