/**
 * ESTILOS PARA MANTENIMIENTO DE CHOFERES
 */

/* ========================================
   TOGGLE SWITCH PARA BOTONES DE MODO
   ======================================== */

.mode-toggle-container {
    position: relative;
    display: inline-flex;
    background-color: #e9ecef;
    border-radius: 8px;
    padding: 4px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.mode-toggle-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.4);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.mode-toggle-slider.slide-right {
    transform: translateX(100%);
}

.mode-toggle-btn {
    position: relative;
    z-index: 2;
    padding: 10px 24px;
    border: none;
    background: transparent;
    color: #6c757d;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.3s ease;
    border-radius: 6px;
    white-space: nowrap;
    min-width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mode-toggle-btn:hover {
    color: #495057;
}

.mode-toggle-btn.active {
    color: #ffffff;
}

.mode-toggle-btn i {
    margin-right: 6px;
}

/* Botones de modo (mantener para compatibilidad) */
.btn.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.btn.active:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Tabla de choferes */
#tblchoferes {
    width: 100%;
}

#tblchoferes thead th {
    background-color: #3a6fad;
    color: white;
    padding: 12px;
    text-align: center;
    font-weight: 600;
}

#tblchoferes tbody td {
    padding: 10px;
    text-align: center;
    vertical-align: middle;
}

#tblchoferes tbody tr:hover {
    background-color: #f5f5f5;
}

/* Colores de advertencia para fechas próximas a vencer */
#tblchoferes tbody tr.bg-warning {
    background-color: #ffc107 !important;
}

#tblchoferes tbody tr.bg-danger {
    background-color: #dc3545 !important;
}

#tblchoferes tbody tr.bg-danger td {
    color: white !important;
}

/* Campos empresa 482 */
.campo-empresa-482 {
    transition: all 0.3s ease;
}

/* Formulario */
.form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Botones de acción */
.btn-sm {
    padding: 5px 10px;
    font-size: 14px;
}

.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
    border-color: #d39e00;
    color: #212529;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
    color: white;
}

/* ========================================
   TEMA OSCURO
   ======================================== */

/* Contenedores principales */
[data-theme="dark"] .bd.bgc-white {
    background-color: #20232a !important;
    color: #f9fafb;
}

[data-theme="dark"] .c-grey-800 {
    color: #f9fafb !important;
}

/* Formulario */
[data-theme="dark"] .form-label {
    color: #d1d5db !important;
}

[data-theme="dark"] .form-control {
    background-color: #374151 !important;
    border-color: #4b5563 !important;
    color: #f9fafb !important;
}

[data-theme="dark"] .form-control:focus {
    background-color: #374151 !important;
    border-color: #3b82f6 !important;
    color: #f9fafb !important;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25) !important;
}

[data-theme="dark"] .form-control::placeholder {
    color: #9ca3af !important;
}

/* Selects */
[data-theme="dark"] select.form-control {
    background-color: #374151 !important;
    border-color: #4b5563 !important;
    color: #f9fafb !important;
}

[data-theme="dark"] select.form-control option {
    background-color: #374151 !important;
    color: #f9fafb !important;
}

/* Tabla de choferes */
[data-theme="dark"] #tblchoferes {
    background-color: #20232a;
    color: #f9fafb;
}

[data-theme="dark"] #tblchoferes thead th {
    background-color: #1f2937 !important;
    color: #f9fafb !important;
    border-bottom-color: #4b5563 !important;
}

[data-theme="dark"] #tblchoferes tbody td {
    color: #d1d5db !important;
    border-bottom-color: #374151 !important;
}

[data-theme="dark"] #tblchoferes tbody tr {
    background-color: #20232a;
}

[data-theme="dark"] #tblchoferes tbody tr:hover {
    background-color: #374151 !important;
}

/* Colores de advertencia en tema oscuro */
[data-theme="dark"] #tblchoferes tbody tr.bg-warning {
    background-color: #f59e0b !important;
    color: #111827 !important;
}

[data-theme="dark"] #tblchoferes tbody tr.bg-warning td {
    color: #111827 !important;
}

[data-theme="dark"] #tblchoferes tbody tr.bg-danger {
    background-color: #dc2626 !important;
    color: #ffffff !important;
}

[data-theme="dark"] #tblchoferes tbody tr.bg-danger td {
    color: #ffffff !important;
}

/* Botones */
[data-theme="dark"] .btn-primary {
    background-color: #3b82f6 !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .btn-primary:hover {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
}

[data-theme="dark"] .btn-secondary {
    background-color: #6b7280 !important;
    border-color: #6b7280 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .btn-secondary:hover {
    background-color: #4b5563 !important;
    border-color: #4b5563 !important;
}

[data-theme="dark"] .btn-success {
    background-color: #059669 !important;
    border-color: #059669 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .btn-success:hover {
    background-color: #047857 !important;
    border-color: #047857 !important;
}

[data-theme="dark"] .btn.active {
    background-color: #3b82f6 !important;
    color: #ffffff !important;
    border-color: #3b82f6 !important;
}

[data-theme="dark"] .btn.active:hover {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
}

/* Toggle Switch en tema oscuro */
[data-theme="dark"] .mode-toggle-container {
    background-color: #374151 !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .mode-toggle-slider {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.5);
}

[data-theme="dark"] .mode-toggle-btn {
    color: #9ca3af !important;
}

[data-theme="dark"] .mode-toggle-btn:hover {
    color: #d1d5db !important;
}

[data-theme="dark"] .mode-toggle-btn.active {
    color: #ffffff !important;
}

/* Botones de acción */
[data-theme="dark"] .btn-warning {
    background-color: #f59e0b !important;
    border-color: #f59e0b !important;
    color: #111827 !important;
}

[data-theme="dark"] .btn-warning:hover {
    background-color: #d97706 !important;
    border-color: #d97706 !important;
    color: #111827 !important;
}

[data-theme="dark"] .btn-danger {
    background-color: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .btn-danger:hover {
    background-color: #b91c1c !important;
    border-color: #b91c1c !important;
    color: #ffffff !important;
}

/* Textos y títulos */
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4 {
    color: #f9fafb !important;
}

[data-theme="dark"] .text-danger {
    color: #f87171 !important;
}

/* Tabla responsive */
[data-theme="dark"] .table-responsive {
    background-color: #20232a;
}

[data-theme="dark"] .table {
    color: #f9fafb;
}

[data-theme="dark"] .table-bordered {
    border-color: #374151 !important;
}

[data-theme="dark"] .table-bordered th,
[data-theme="dark"] .table-bordered td {
    border-color: #374151 !important;
}

/* Responsive */
@media (max-width: 768px) {
    #tblchoferes {
        font-size: 12px;
    }
    
    #tblchoferes thead th,
    #tblchoferes tbody td {
        padding: 8px 4px;
    }
    
    .btn-sm {
        padding: 3px 6px;
        font-size: 12px;
    }
}

