/* public/css/custom.css */

/* GENERALES */

body {
    font-size: 0.875rem !important;
}

.btn {
    font-size: 0.875rem !important;
}

.fa {
    font-size: 0.875rem !important;
}

.avatar-notification {
    width: 40px !important;
    height: 40px !important;
    margin-right: 20px !important;
}

.dropdown-menu {
    font-size: 0.875rem !important;
}

/* TABLAS */

th,
td {
    padding: 5px !important;
}

/* TABS */

.tab-content .tab-pane:not(.active) {
    display: none !important;
    visibility: hidden !important;
}

/* Fuerza la visibilidad de los paneles activos y mostrados */
.tab-content .tab-pane.active.show {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Puede que también necesitemos esto para la transición */
.tab-content .tab-pane.fade {
    transition: opacity 0.15s linear;
    /* o el valor que use Bootstrap por defecto */
}

/* FORMULARIOS */

fieldset {
    border: 1px solid rgb(108, 117, 125) !important;
    padding: 10px !important;
    border-radius: 10px !important;
}

/* MENU */

.nav-treeview .nav-item a {
    padding-left: 25px !important;
}

/* SELECT2 */

body.dark-mode .select2-container--bootstrap4 .select2-selection--single,
body.dark-mode .select2-container--bootstrap4 .select2-selection--multiple {
    background-color: #343a40 !important;
    /* AdminLTE dark background */
    border-color: #6c757d !important;
    /* AdminLTE dark border */
    color: #f8f9fa !important;
    /* Light text */
}

body.dark-mode .select2-container--bootstrap4 .select2-selection__placeholder {
    color: #ced4da !important;
    /* Podrías necesitar ajustar padding/line-height aquí también si el tamaño es el problema */
    /* line-height: 2.5 !important; */
    /* Ejemplo, ajusta según sea necesario */
    /* padding-top: 0.375rem !important; */
    /* padding-bottom: 0.375rem !important; */
}

body.dark-mode .select2-container--bootstrap4 .select2-selection__arrow b {
    border-top-color: #f8f9fa !important;
    /* Color de la flecha en dark mode */
    /* Asegúrate de que display y width/height sean los correctos si está oculta o mal posicionada */
    /* display: inline-block !important; */
    /* width: 0 !important; height: 0 !important; */
    /* margin-left: -0.2em !important; */
    /* margin-top: -0.2em !important; */
}

body.dark-mode .select2-search__field {
    border: 1px solid #6c757d !important;
    background-color: #495057 !important;
    color: #f8f9fa !important;
}

body.dark-mode .select2-container--bootstrap4 .select2-dropdown {
    background-color: #343a40 !important;
    border-color: #6c757d !important;
}

body.dark-mode .select2-container--bootstrap4 .select2-results__option {
    color: #f8f9fa !important;
}

body.dark-mode .select2-container--bootstrap4 .select2-results__option--highlighted {
    background-color: #007bff !important;
    /* Color de resaltado */
    color: #ffffff !important;
}

/* DATETIME PICKER */

/* Estilos para dark mode */
[data-theme="dark"] .tempusdominus-bootstrap-4 .datetimepicker-days .table-condensed td.day,
[data-theme="dark"] .tempusdominus-bootstrap-4 .datetimepicker-months .table-condensed td.month,
[data-theme="dark"] .tempusdominus-bootstrap-4 .datetimepicker-years .table-condensed td.year {
    color: #fff !important;
}

[data-theme="dark"] .tempusdominus-bootstrap-4 .datetimepicker-days .table-condensed td.day:hover,
[data-theme="dark"] .tempusdominus-bootstrap-4 .datetimepicker-months .table-condensed td.month:hover,
[data-theme="dark"] .tempusdominus-bootstrap-4 .datetimepicker-years .table-condensed td.year:hover {
    background-color: #007bff !important;
    color: #fff !important;
}

[data-theme="dark"] .tempusdominus-bootstrap-4 .datetimepicker-days .table-condensed td.day.active,
[data-theme="dark"] .tempusdominus-bootstrap-4 .datetimepicker-months .table-condensed td.month.active,
[data-theme="dark"] .tempusdominus-bootstrap-4 .datetimepicker-years .table-condensed td.year.active {
    background-color: #007bff !important;
    color: #fff !important;
}

[data-theme="dark"] .tempusdominus-bootstrap-4 .datetimepicker-hours .table-condensed td.hour,
[data-theme="dark"] .tempusdominus-bootstrap-4 .datetimepicker-minutes .table-condensed td.minute {
    color: #fff !important;
}

[data-theme="dark"] .tempusdominus-bootstrap-4 .datetimepicker-hours .table-condensed td.hour:hover,
[data-theme="dark"] .tempusdominus-bootstrap-4 .datetimepicker-minutes .table-condensed td.minute:hover {
    background-color: #007bff !important;
    color: #fff !important;
}

[data-theme="dark"] .tempusdominus-bootstrap-4 .datetimepicker-hours .table-condensed td.hour.active,
[data-theme="dark"] .tempusdominus-bootstrap-4 .datetimepicker-minutes .table-condensed td.minute.active {
    background-color: #007bff !important;
    color: #fff !important;
}

[data-theme="dark"] .tempusdominus-bootstrap-4 .datetimepicker-days .table-condensed th.prev,
[data-theme="dark"] .tempusdominus-bootstrap-4 .datetimepicker-days .table-condensed th.next,
[data-theme="dark"] .tempusdominus-bootstrap-4 .datetimepicker-months .table-condensed th.prev,
[data-theme="dark"] .tempusdominus-bootstrap-4 .datetimepicker-months .table-condensed th.next,
[data-theme="dark"] .tempusdominus-bootstrap-4 .datetimepicker-years .table-condensed th.prev,
[data-theme="dark"] .tempusdominus-bootstrap-4 .datetimepicker-years .table-condensed th.next {
    color: #fff !important;
}

[data-theme="dark"] .tempusdominus-bootstrap-4 .datetimepicker-days .table-condensed th.dow {
    color: #fff !important;
}

[data-theme="dark"] .tempusdominus-bootstrap-4 .datetimepicker-days .table-condensed th.datepicker-switch {
    color: #fff !important;
}

[data-theme="dark"] .tempusdominus-bootstrap-4 .datetimepicker-days .table-condensed th.datepicker-switch:hover {
    background-color: #007bff !important;
    color: #fff !important;
}

[data-theme="dark"] .tempusdominus-bootstrap-4 .datetimepicker-days .table-condensed th.today {
    background-color: #28a745 !important;
    color: #fff !important;
}

[data-theme="dark"] .tempusdominus-bootstrap-4 .datetimepicker-days .table-condensed th.today:hover {
    background-color: #218838 !important;
    color: #fff !important;
}

[data-theme="dark"] .tempusdominus-bootstrap-4 .datetimepicker-days .table-condensed th.clear {
    background-color: #dc3545 !important;
    color: #fff !important;
}

[data-theme="dark"] .tempusdominus-bootstrap-4 .datetimepicker-days .table-condensed th.clear:hover {
    background-color: #c82333 !important;
    color: #fff !important;
}

[data-theme="dark"] .tempusdominus-bootstrap-4 .datetimepicker-days .table-condensed th.close {
    background-color: #6c757d !important;
    color: #fff !important;
}

[data-theme="dark"] .tempusdominus-bootstrap-4 .datetimepicker-days .table-condensed th.close:hover {
    background-color: #5a6268 !important;
    color: #fff !important;
}

[data-theme="dark"] .tempusdominus-bootstrap-4 .datetimepicker-days .table-condensed th.today:before {
    border-bottom-color: #fff !important;
}

[data-theme="dark"] .tempusdominus-bootstrap-4 .datetimepicker-days .table-condensed th.clear:before {
    border-bottom-color: #fff !important;
}

[data-theme="dark"] .tempusdominus-bootstrap-4 .datetimepicker-days .table-condensed th.close:before {
    border-bottom-color: #fff !important;
}

/* Estilos para los botones del datetime picker */
.tempusdominus-bootstrap-4 .datetimepicker-days .table-condensed th.today,
.tempusdominus-bootstrap-4 .datetimepicker-days .table-condensed th.clear,
.tempusdominus-bootstrap-4 .datetimepicker-days .table-condensed th.close {
    padding: 8px 12px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    border-radius: 4px !important;
    margin: 2px !important;
}

.tempusdominus-bootstrap-4 .datetimepicker-days .table-condensed th.today {
    background-color: #28a745 !important;
    color: white !important;
}

.tempusdominus-bootstrap-4 .datetimepicker-days .table-condensed th.clear {
    background-color: #dc3545 !important;
    color: white !important;
}

.tempusdominus-bootstrap-4 .datetimepicker-days .table-condensed th.close {
    background-color: #6c757d !important;
    color: white !important;
}

.tempusdominus-bootstrap-4 .datetimepicker-days .table-condensed th.today:hover {
    background-color: #218838 !important;
}

.tempusdominus-bootstrap-4 .datetimepicker-days .table-condensed th.clear:hover {
    background-color: #c82333 !important;
}

.tempusdominus-bootstrap-4 .datetimepicker-days .table-condensed th.close:hover {
    background-color: #5a6268 !important;
}


/* FRONTEND CONTROL DE ACCESO */

.access-control-container {
    min-height: 100vh;
    background: white;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Header principal */
.accesscontrol-header {
    margin-bottom: 10px;
}

.logo-section {
    color: #333;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.clock-display {
    padding: 30px;
    text-align: center;
}

.time-display {
    font-size: 4rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.date-display {
    font-size: 1.2rem;
    color: #666;
    font-weight: 300;
}

/* Formulario */
.form-section {
    margin-bottom: 40px;
}

.form-container {
    background: white;
    padding: 20px;
}

.welcome-text {
    text-align: center;
    color: #333;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    color: #667eea;
    font-size: 1.2rem;
    z-index: 2;
}

.form-input {
    width: 100%;
    padding: 18px 20px 18px 50px;
    border: 2px solid #e1e5e9;
    border-radius: 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input::placeholder {
    color: #adb5bd;
}

/* Botones de acción */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.btn-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
}

.btn-arrival {
    background: linear-gradient(135deg, #0056b3, #007bff);
}

.btn-departure {
    background: linear-gradient(135deg, #007bff, #0056b3);
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-action i {
    font-size: 1.5rem;
}

/* Estadísticas */
.stats-section {
    margin-top: 40px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.stat-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    border: 2px solid #e9ecef;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    color: #333;
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #667eea;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    font-weight: 300;
}

/* Responsive */
@media (max-width: 768px) {
    .access-control-container {
        padding: 15px;
    }

    .time-display {
        font-size: 3rem;
    }

    .company-name {
        font-size: 1.5rem;
    }

    .app-title {
        font-size: 1.2rem;
    }

    .form-container {
        padding: 20px;
    }

    .action-buttons {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-number {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .time-display {
        font-size: 2.5rem;
    }

    .clock-display {
        padding: 20px;
    }
}

/* Botones deshabilitados para control de acceso */
.btn-action.btn-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #6c757d !important;
    transform: none !important;
    box-shadow: none !important;
}

.btn-action.btn-disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

.btn-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #6c757d !important;
}

/* Alerts para control de acceso - solo separación y transparencia */
.access-alert {
    margin-top: 20px;
}

/* VISTA DE LLEGADA */

.page-title {
    color: #333;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

/* Grid de empleados */
.employees-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.employee-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.employee-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #007bff;
}

.employee-card.selected {
    border-color: #007bff;
    background: #f8f9ff;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.2);
}

.employee-photo {
    margin-bottom: 15px;
}

.employee-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e9ecef;
    transition: all 0.3s ease;
}

.employee-card.selected .employee-image {
    border-color: #007bff;
}

.employee-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #f8f9fa;
    border: 3px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 2rem;
    color: #adb5bd;
}

.employee-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.employee-schedule {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

/* Modal de teclado numérico */
.password-display {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    letter-spacing: 8px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.selected-employee-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #007bff;
}

.keypad {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.keypad-row {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.keypad-btn {
    width: 60px;
    height: 60px;
    border: 2px solid #007bff;
    background: white;
    color: #007bff;
    border-radius: 10px;
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.keypad-btn:hover {
    background: #007bff;
    color: white;
    transform: scale(1.05);
}

.keypad-btn:active {
    transform: scale(0.95);
}

.keypad-clear {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

.keypad-clear:hover {
    background: #c82333;
    border-color: #c82333;
}

.keypad-confirm {
    background: #28a745;
    border-color: #28a745;
}

.keypad-confirm:hover {
    background: #218838;
    border-color: #218838;
}

/* Responsive para la vista de llegada */
@media (max-width: 768px) {
    .employees-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }

    .employee-image,
    .employee-placeholder {
        width: 80px;
        height: 80px;
    }

    .employee-name {
        font-size: 1rem;
    }

    .keypad-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .password-display {
        font-size: 1.5rem;
        letter-spacing: 6px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .employees-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .employee-card {
        padding: 15px;
    }

    .employee-image,
    .employee-placeholder {
        width: 60px;
        height: 60px;
    }

    .keypad-btn {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

/* ALERTS PARA CONTROL DE ACCESO */
.access-alert {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    min-width: 300px;
    max-width: 600px;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: none;
    backdrop-filter: blur(10px);
    border-left: 4px solid;
    animation: slideDown 0.4s ease-out;
}

.access-alert.alert-success {
    border-left-color: #28a745;
    color: #000000;
    background: rgba(40, 167, 69, 0.9);
    font-weight: bold;
}

.access-alert.alert-danger {
    border-left-color: #dc3545;
    color: #ffffff;
    background: rgba(220, 53, 69, 0.9);
    font-weight: bold;
}

.access-alert .btn-close {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.access-alert .btn-close:hover {
    opacity: 1;
}

.access-alert i {
    font-size: 1.1rem;
}

/* Animación de entrada */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Responsive para alerts */
@media (max-width: 768px) {
    .access-alert {
        top: 15px;
        left: 20px;
        right: 20px;
        transform: none;
        min-width: auto;
        max-width: none;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Estilos para el botón de cierre del modal */
.custom-close-btn {
    background: none;
    border: none;
    font-size: 24px !important;
    font-weight: bold !important;
    color: #6c757d !important;
    padding: 0 12px !important;
    border-radius: 4px !important;
    transition: all 0.3s ease !important;
    cursor: pointer;
    line-height: 1;
}

.custom-close-btn:hover {
    background-color: #f8f9fa;
    color: #495057;
    transform: scale(1.1);
}

.custom-close-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(108, 117, 125, 0.25);
}

.custom-close-btn span {
    display: inline-block;
    vertical-align: middle;
}

.btn-access-control {
    padding: 15px 30px;
    font-size: 1rem !important;
    font-weight: 600 !important;
}

/* Estilos para filas de eventos coloreadas */
.event-colored-row td {
    font-weight: 500;
}


/* Estilos personalizados para el calendario */
#calendar {
    height: 1300px;
    /* Altura aumentada para mostrar más horas sin scroll */
    transition: all 0.3s ease;
    /* Transición suave para cambios de tamaño */
}

/* Transición suave para el contenedor del calendario */
.fc {
    transition: all 0.3s ease;
}

/* Transición suave para las celdas del calendario */
.fc-daygrid-day,
.fc-timegrid-slot {
    transition: all 0.3s ease;
}

/* Adaptaciones para dark mode */
body.dark-mode .fc {
    color: #c2c7d0;
}

body.dark-mode .fc-theme-standard .fc-popover {
    background-color: #343a40;
    border-color: #495057;
}

body.dark-mode .fc-theme-standard .fc-popover-header {
    background-color: #495057;
    border-color: #6c757d;
    color: #fff;
}

body.dark-mode .fc-theme-standard td,
body.dark-mode .fc-theme-standard th {
    border-color: #495057;
}

body.dark-mode .fc-theme-standard .fc-scrollgrid {
    border-color: #495057;
}

body.dark-mode .fc-button-primary {
    background-color: #007bff;
    border-color: #007bff;
}

body.dark-mode .fc-button-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

body.dark-mode .fc-button-primary:disabled {
    background-color: #6c757d;
    border-color: #6c757d;
}

body.dark-mode .fc-daygrid-day {
    background-color: transparent;
}

body.dark-mode .fc-daygrid-day:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Mejorar contraste de eventos */
.fc-event {
    border-radius: 4px;
    padding: 2px 4px;
    font-size: 12px;
    font-weight: 500;
}

/* Estilos para diferentes vistas */
.fc-timeGridWeek-view .fc-event,
.fc-timeGridDay-view .fc-event {
    border-radius: 2px;
}

/* Responsive */
@media (max-width: 768px) {
    #calendar {
        height: 500px;
    }
}


.form-fieldset {
    border: 1px solid #ddd !important;
    padding: 15px;
    margin: 10px 0;
}

.form-legend {
    font-size: 1.1em;
    font-weight: bold;
    color: #495057;
    margin-bottom: 0;
    padding: 0 10px;
}

.dark-mode .form-legend {
    color: #ced4da;
}

.table th,
.table td {
    vertical-align: middle;
}

.badge {
    font-size: 0.75em;
}

/* Form fieldsets */
.form-fieldset {
    padding: 15px;
    margin-bottom: 20px;
}

.form-legend {
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0;
}

/* Info boxes for statistics */
.info-box {
    display: block;
    min-height: 90px;
    background: #fff;
    width: 100%;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .1);
    border-radius: .25rem;
    margin-bottom: 15px;
}

.info-box .info-box-icon {
    border-radius: .25rem 0 0 .25rem;
    display: block;
    float: left;
    height: 90px;
    width: 90px;
    text-align: center;
    font-size: 45px;
    line-height: 90px;
    background: rgba(0, 0, 0, .2);
    color: white;
}

.info-box .info-box-content {
    padding: 5px 10px;
    margin-left: 90px;
}

.info-box .info-box-number {
    display: block;
    font-weight: 700;
    font-size: 18px;
}

.info-box .info-box-text {
    display: block;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-menu {
    font-size: 0.875rem !important;
    overflow: hidden !important;
}

/* Breadcrumbs */

.breadcrumb {
    font-size: 0.7rem !important;
}

.dark-mode .select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered {
    color: #fff !important;
}

input:required,
textarea:required,
select:required {
    border: 2px solid #e53935 !important;
    /* borde rojo siempre que tenga required */
}

/* Remember inputs overrides */

/* Dark mode: Autofill (Chrome / Blink / Safari) */
body.dark-mode input:-webkit-autofill,
body.dark-mode textarea:-webkit-autofill,
body.dark-mode select:-webkit-autofill,
body.dark-mode input:-webkit-autofill:hover,
body.dark-mode textarea:-webkit-autofill:hover,
body.dark-mode select:-webkit-autofill:hover,
body.dark-mode input:-webkit-autofill:focus,
body.dark-mode textarea:-webkit-autofill:focus,
body.dark-mode select:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #343a40 inset !important;
    box-shadow: 0 0 0 1000px #343a40 inset !important;
    -webkit-text-fill-color: #ffffff !important;
    color: #ffffff !important;
    background-color: #343a40 !important;
    background-image: none !important;
    -webkit-background-clip: padding-box !important;
    transition: background-color 5000s ease-in-out 0s !important;
    font-family: inherit !important;
}

body.dark-mode input:-webkit-autofill::first-line,
body.dark-mode textarea:-webkit-autofill::first-line {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-family: inherit !important;
}

body.dark-mode input:-moz-autofill,
body.dark-mode textarea:-moz-autofill,
body.dark-mode select:-moz-autofill {
    box-shadow: 0 0 0 1000px #343a40 inset !important;
    -moz-text-fill-color: #ffffff !important;
    font-family: inherit !important;
}

/* Light mode: Autofill (Chrome / Blink / Safari) */
body:not(.dark-mode) input:-webkit-autofill,
body:not(.dark-mode) textarea:-webkit-autofill,
body:not(.dark-mode) select:-webkit-autofill,
body:not(.dark-mode) input:-webkit-autofill:hover,
body:not(.dark-mode) textarea:-webkit-autofill:hover,
body:not(.dark-mode) select:-webkit-autofill:hover,
body:not(.dark-mode) input:-webkit-autofill:focus,
body:not(.dark-mode) textarea:-webkit-autofill:focus,
body:not(.dark-mode) select:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    box-shadow: 0 0 0 1000px #ffffff inset !important;
    -webkit-text-fill-color: #111111 !important;
    color: #111111 !important;
    background-color: #ffffff !important;
    background-image: none !important;
    -webkit-background-clip: padding-box !important;
    transition: background-color 5000s ease-in-out 0s !important;
    font-family: inherit !important;
}

body:not(.dark-mode) input:-webkit-autofill::first-line,
body:not(.dark-mode) textarea:-webkit-autofill::first-line {
    color: #111111 !important;
    -webkit-text-fill-color: #111111 !important;
    font-family: inherit !important;
}

body:not(.dark-mode) input:-moz-autofill,
body:not(.dark-mode) textarea:-moz-autofill,
body:not(.dark-mode) select:-moz-autofill {
    box-shadow: 0 0 0 1000px #ffffff inset !important;
    -moz-text-fill-color: #111111 !important;
    font-family: inherit !important;
}