/* Dark Mode Styles v2 - by Jules */

html.dark-mode body,
html.dark-mode #content-wrapper {
  background-color: #1a1c23 !important; /* Sfondo principale leggermente più scuro */
  color: #d1d3e2;
}

/* Card e sfondi bianchi */
html.dark-mode .card,
html.dark-mode .bg-white {
  background-color: #27293d !important; /* Sfondo delle card più chiaro per contrasto */
  border-color: #44475a !important;
}

/* Sidebar e Footer */
html.dark-mode .sidebar,
html.dark-mode .sticky-footer {
  background-color: #111827 !important;
  background-image: none !important;
}

/* Testo */
html.dark-mode,
html.dark-mode .text-gray-800,
html.dark-mode .text-gray-900,
html.dark-mode .h1, html.dark-mode .h2, html.dark-mode .h3, html.dark-mode .h4, html.dark-mode .h5, html.dark-mode .h6 {
    color: #f8f9fc !important;
}

html.dark-mode .text-gray-600,
html.dark-mode .text-muted,
html.dark-mode p {
    color: #d1d3e2 !important;
}

html.dark-mode footer.sticky-footer .copyright span {
    color: #d1d3e2 !important;
}

/* Tabelle */
html.dark-mode .table {
    color: #d1d3e2;
}

html.dark-mode .table th,
html.dark-mode .table td {
    color: #f8f9fc; /* Testo bianco per massima leggibilità */
}

html.dark-mode .table-bordered,
html.dark-mode .table-bordered td,
html.dark-mode .table-bordered th {
    border: 1px solid #44475a;
}

html.dark-mode .thead-light th {
    color: #f8f9fc;
    background-color: #323545;
    border-color: #44475a;
}

html.dark-mode .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Dropdown e Menu a tendina */
html.dark-mode .dropdown-menu {
    background-color: #27293d;
    border-color: #44475a;
}

html.dark-mode .dropdown-item {
    color: #d1d3e2;
}

html.dark-mode .dropdown-item:hover,
html.dark-mode .dropdown-item:focus {
    color: #ffffff;
    background-color: #4e73df;
}

html.dark-mode .dropdown-divider {
    border-top-color: #44475a;
}

/* Modals */
html.dark-mode .modal-content {
    background-color: #27293d;
    border-color: #44475a;
}

/* Form */
html.dark-mode .form-control {
    background-color: #323545;
    color: #f8f9fc;
    border-color: #44475a;
}

html.dark-mode .form-control:focus {
    border-color: #4e73df;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

html.dark-mode .form-control::placeholder {
    color: #9a9ca5;
}

html.dark-mode .form-control-plaintext {
    color: #f8f9fc;
}

/* Card Header e Footer */
html.dark-mode .card-header,
html.dark-mode .card-footer {
    background-color: #323545;
    border-color: #44475a;
}

/* FIX specifici dallo screenshot */

/* Voce attiva nella sidebar */
html.dark-mode .sidebar .nav-item .collapse .collapse-inner .collapse-item.active {
    background-color: #4e73df !important;
    color: #fff !important;
}
html.dark-mode .sidebar .nav-item .nav-link:not(.collapsed) {
    background-color: rgba(255, 255, 255, 0.1);
}
html.dark-mode .sidebar-dark .nav-item.active .nav-link {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Contenitore dei sottomenu della sidebar */
html.dark-mode .sidebar .collapse .collapse-inner {
    background-color: rgba(0,0,0,0.2) !important;
}

/* Switch del tema */
html.dark-mode .custom-control-label::before {
    background-color: #44475a;
    border-color: #6c6e7e;
}

html.dark-mode .custom-switch .custom-control-input:checked ~ .custom-control-label::before {
    background-color: #4e73df;
}

/* Stili Dark Mode per Pagina Login */
html.dark-mode .login-container {
    background-color: #27293d !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.4) !important;
}

/* Stili Dark Mode per Wizard */
html.dark-mode .step-title {
    color: #8a9ff9;
    border-bottom-color: #8a9ff9;
}
html.dark-mode .progress {
    background-color: #44475a;
}
html.dark-mode .wizard-nav .nav-link {
    background-color: #323545;
    border-color: #44475a;
    color: #d1d3e2;
}
html.dark-mode .wizard-nav .nav-link.active {
    background-color: #4e73df;
    border-color: #4e73df;
    color: #fff;
}

/* Stili Dark Mode per Budget */
html.dark-mode .budget-input.is-valid {
    border-color: #1cc88a !important; /* Assicura che il verde sia visibile */
}
