@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --color-cliente: #38bdf8;
    }

    html,
    body {
        background-color: #111827;
        color: #e5e7eb;
    }

    .min-h-screen.bg-gray-100,
    .bg-gray-100 {
        background-color: #111827 !important;
    }

    header.bg-white,
    nav.bg-white,
    .MenuCliente {
        background-color: #1f2937 !important;
        border-color: #374151 !important;
        color: #e5e7eb;
    }

    .bg-white.shadow,
    .bg-white.overflow-hidden,
    .bg-white.shadow-xl,
    .bg-white.shadow-md,
    .relative.bg-white,
    .bg-white:not(.Btn):not(.BotonSecundario):not(button):not(.swal2-styled),
    .Cliente_FondoForm,
    .FondoLogin {
        background-color: #1f2937 !important;
        color: #e5e7eb;
    }

    .text-gray-800,
    .text-gray-900,
    .text-gray-700 {
        color: #f3f4f6 !important;
    }

    .text-gray-500,
    .text-gray-600 {
        color: #d1d5db !important;
    }

    h1, h2, h3, h4, h5, h6 {
        color: #f3f4f6;
    }

    .Form label {
        color: #d1d5db;
    }

    a:not(.Btn):not(.BotonPrincipal):not(.BotonSecundario):not(.btn) {
        color: #93c5fd;
    }

    nav a,
    nav button {
        color: #d1d5db;
    }

    nav a:hover,
    nav button:hover {
        color: #f9fafb;
    }

    nav .inline-flex.rounded-md > button,
    nav button.bg-white {
        background-color: #374151 !important;
        color: #f3f4f6 !important;
    }

    .border-b,
    .border-t {
        border-color: #374151 !important;
    }

    .Tabla,
    table {
        color: #d1d5db;
    }

    .Tabla thead,
    table thead {
        background-color: #374151 !important;
        color: #e5e7eb !important;
    }

    .TablaCliente > tbody > tr:nth-of-type(odd) > * {
        background-color: #1f2937 !important;
        --bs-table-bg-type: #1f2937 !important;
    }

    .ResaltarRow,
    .ResaltarRow th,
    .ResaltarRow td {
        background-color: #1f2937 !important;
        color: #f9fafb !important;
    }

    input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="hidden"]):not([type="file"]),
    select,
    textarea,
    .Form input[type='text'],
    .Form input[type='number'],
    .Form input[type='date'],
    .Form input[type='email'],
    .Form input[type='password'],
    .Form select,
    .Form textarea,
    .input_file,
    .form-control,
    .form-select {
        background-color: #111827 !important;
        border-color: #4b5563 !important;
        color: #f9fafb !important;
        color-scheme: dark;
    }

    input::placeholder,
    textarea::placeholder {
        color: #9ca3af !important;
    }

    .Form input[type="text"]:disabled,
    .Form textarea:disabled,
    .form-control:disabled,
    .select-none {
        background-color: #374151 !important;
        color: #9ca3af !important;
    }

    input[type="checkbox"],
    input[type="radio"] {
        background-color: #374151;
        border-color: #6b7280;
    }

    .BotonSecundario,
    .btnUpload {
        background-color: #374151 !important;
        border-color: #4b5563 !important;
        color: #e5e7eb !important;
    }

    .BotonSecundario:hover,
    .btnUpload:hover {
        background-color: #4b5563 !important;
        color: #fff !important;
    }

    .Form .is-invalid {
        background-color: #7f1d1d !important;
        border-color: #ef4444 !important;
        color: #fecaca !important;
    }

    .Form .error,
    .text-danger {
        color: #f87171 !important;
    }

    [id^="dropdown"] {
        background-color: #1f2937 !important;
        color: #e5e7eb;
    }

    .select2-container--default .select2-selection--single,
    .select2-dropdown,
    .select2-container--default .select2-search--dropdown .select2-search__field,
    .Form .select2-selection {
        background-color: #111827 !important;
        border-color: #4b5563 !important;
        color: #f9fafb !important;
    }

    .select2-container--default .select2-results__option,
    .select2-container--default .select2-selection--single .select2-selection__rendered {
        color: #f9fafb !important;
    }

    .select2-container--default .select2-results__option--highlighted[aria-selected] {
        background-color: #2563eb !important;
    }

    .swal2-popup {
        background: #1f2937 !important;
        color: #e5e7eb !important;
    }

    .swal2-html-container,
    .swal2-title,
    .swal-eliminar .swal2-html-container {
        color: #e5e7eb !important;
    }

    .swal-eliminar .swal2-actions button.swal-btn-eliminar-no {
        background-color: #374151 !important;
        color: #e5e7eb !important;
        border-color: #4b5563 !important;
    }

    .BorderDocs,
    .CardDocs {
        border-bottom-color: #374151 !important;
    }

    .Paginadorcliente .text-gray-500 {
        background-color: #374151 !important;
        color: #e5e7eb !important;
    }

    .TituloDocs,
    .tituloDoc {
        color: #f9fafb;
    }

    .VerHistorial {
        color: #38bdf8;
    }

    .CuadroArchivo {
        border-color: #4b5563;
        background-color: #111827;
    }

    .MenuFormulario a {
        color: #e5e7eb;
    }

    .timeline-item::after {
        border-color: #1f2937;
    }

    .navbar,
    .navbar.MenuCliente {
        background-color: #1f2937 !important;
    }

    .table,
    .table > :not(caption) > * > * {
        background-color: transparent;
        color: #e5e7eb;
        border-color: #374151;
    }

    .odd\:bg-white:nth-child(odd) {
        background-color: #1f2937 !important;
    }

    .even\:bg-gray-50:nth-child(even),
    .even\:bg-gray-100:nth-child(even),
    .odd\:bg-gray-50:nth-child(odd) {
        background-color: #111827 !important;
    }

    .AvisoAutoGuardado {
        background: #8a8218 !important;
        color: #111827 !important;
    }
}
