/* ==================== TABLAS - MODO CLARO Y OSCURO ==================== */

/* ========== MODO CLARO ========== */
[data-bs-theme="light"] #requisitosTable td,
[data-bs-theme="light"] #usuariosTable td,
[data-bs-theme="light"] #rolesTable td,
[data-bs-theme="light"] #citasTable td,
[data-bs-theme="light"] #tipoTramitesTable td,
[data-bs-theme="light"] #oficinasTable td,
[data-bs-theme="light"] #tramitesTable td,
[data-bs-theme="light"] #solicitantesTable td,
[data-bs-theme="light"] #productosTable td,
[data-bs-theme="light"] #categoriasTable td,
[data-bs-theme="light"] #proveedoresTable td,
[data-bs-theme="light"] #inventarioTable td,
[data-bs-theme="light"] #kardexTable td,
[data-bs-theme="light"] #entradasTable td,
[data-bs-theme="light"] #salidasTable td,
[data-bs-theme="light"] #solicitudesTable td,
[data-bs-theme="light"] #serviciosTable td,
[data-bs-theme="light"] #historialAccesosTable td,
[data-bs-theme="light"] .dataTables_wrapper td,
[data-bs-theme="light"] .table td {
    color: #181C32 !important;
}

[data-bs-theme="light"] .table thead th {
    color: #181C32 !important;
    background-color: #F9F9F9 !important;
}

[data-bs-theme="light"] .table tbody tr {
    background-color: #FFFFFF !important;
}

[data-bs-theme="light"] .table tbody tr:hover {
    background-color: #F5F8FA !important;
}

[data-bs-theme="light"] .table-bordered {
    border-color: #E4E6EF !important;
}

[data-bs-theme="light"] .table-bordered td,
[data-bs-theme="light"] .table-bordered th {
    border-color: #E4E6EF !important;
}

/* ========== MODO OSCURO ========== */
[data-bs-theme="dark"] #requisitosTable td,
[data-bs-theme="dark"] #usuariosTable td,
[data-bs-theme="dark"] #rolesTable td,
[data-bs-theme="dark"] #citasTable td,
[data-bs-theme="dark"] #tipoTramitesTable td,
[data-bs-theme="dark"] #oficinasTable td,
[data-bs-theme="dark"] #tramitesTable td,
[data-bs-theme="dark"] #solicitantesTable td,
[data-bs-theme="dark"] #productosTable td,
[data-bs-theme="dark"] #categoriasTable td,
[data-bs-theme="dark"] #proveedoresTable td,
[data-bs-theme="dark"] #inventarioTable td,
[data-bs-theme="dark"] #kardexTable td,
[data-bs-theme="dark"] #entradasTable td,
[data-bs-theme="dark"] #salidasTable td,
[data-bs-theme="dark"] #solicitudesTable td,
[data-bs-theme="dark"] #serviciosTable td,
[data-bs-theme="dark"] #historialAccesosTable td,
[data-bs-theme="dark"] .dataTables_wrapper td,
[data-bs-theme="dark"] .table td {
    color: #FFFFFF !important;
    background-color: #1E1E2D !important;
}

[data-bs-theme="dark"] .table thead th {
    color: #FFFFFF !important;
    background-color: #1A1A27 !important;
}

[data-bs-theme="dark"] .table tbody tr {
    background-color: #1E1E2D !important;
    border-color: #2B2B40 !important;
}

[data-bs-theme="dark"] .table tbody tr:hover {
    background-color: #252532 !important;
}

[data-bs-theme="dark"] .table-bordered {
    border-color: #2B2B40 !important;
}

[data-bs-theme="dark"] .table-bordered td,
[data-bs-theme="dark"] .table-bordered th {
    border-color: #2B2B40 !important;
}

/* ========== DATATABLES - CONTROLES ========== */

/* Modo Claro */
[data-bs-theme="light"] .dataTables_wrapper .dataTables_length,
[data-bs-theme="light"] .dataTables_wrapper .dataTables_filter,
[data-bs-theme="light"] .dataTables_wrapper .dataTables_info,
[data-bs-theme="light"] .dataTables_wrapper .dataTables_paginate {
    color: #181C32 !important;
}

[data-bs-theme="light"] .dataTables_wrapper .dataTables_length label,
[data-bs-theme="light"] .dataTables_wrapper .dataTables_filter label {
    color: #181C32 !important;
}

[data-bs-theme="light"] .dataTables_wrapper input[type="search"] {
    background-color: #FFFFFF !important;
    color: #181C32 !important;
    border-color: #E4E6EF !important;
}

[data-bs-theme="light"] .dataTables_wrapper select {
    background-color: #FFFFFF !important;
    color: #181C32 !important;
    border-color: #E4E6EF !important;
}

[data-bs-theme="light"] .dataTables_wrapper .dataTables_paginate .paginate_button {
    color: #181C32 !important;
}

[data-bs-theme="light"] .dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #009EF7 !important;
    border-color: #009EF7 !important;
    color: #FFFFFF !important;
}

[data-bs-theme="light"] .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #F5F8FA !important;
    border-color: #E4E6EF !important;
    color: #181C32 !important;
}

/* Modo Oscuro */
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_length,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_info,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate {
    color: #FFFFFF !important;
}

[data-bs-theme="dark"] .dataTables_wrapper .dataTables_length label,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter label {
    color: #FFFFFF !important;
}

[data-bs-theme="dark"] .dataTables_wrapper input[type="search"] {
    background-color: #1E1E2D !important;
    color: #FFFFFF !important;
    border-color: #2B2B40 !important;
}

[data-bs-theme="dark"] .dataTables_wrapper input[type="search"]::placeholder {
    color: #7E8299 !important;
}

[data-bs-theme="dark"] .dataTables_wrapper select {
    background-color: #1E1E2D !important;
    color: #FFFFFF !important;
    border-color: #2B2B40 !important;
}

[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button {
    color: #FFFFFF !important;
    background-color: #1E1E2D !important;
    border-color: #2B2B40 !important;
}

[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #009EF7 !important;
    border-color: #009EF7 !important;
    color: #FFFFFF !important;
}

[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #252532 !important;
    border-color: #2B2B40 !important;
    color: #FFFFFF !important;
}

[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    color: #5E6278 !important;
}

/* ========== DATATABLES - PROCESANDO ========== */
[data-bs-theme="light"] .dataTables_processing {
    background-color: #FFFFFF !important;
    color: #181C32 !important;
    border-color: #E4E6EF !important;
}

[data-bs-theme="dark"] .dataTables_processing {
    background-color: #1E1E2D !important;
    color: #FFFFFF !important;
    border-color: #2B2B40 !important;
}

/* ========== DATATABLES - SIN DATOS ========== */
[data-bs-theme="light"] .dataTables_empty {
    color: #A1A5B7 !important;
}

[data-bs-theme="dark"] .dataTables_empty {
    color: #7E8299 !important;
}

/* ========== BADGES - MANTENER COLORES ESPECÍFICOS ========== */
.badge {
    color: #FFFFFF !important;
}

.badge-light {
    background-color: #E4E6EF !important;
    color: #181C32 !important;
}

[data-bs-theme="dark"] .badge-light {
    background-color: #2B2B40 !important;
    color: #FFFFFF !important;
}

.badge-light-primary {
    background-color: #E1F0FF !important;
    color: #009EF7 !important;
}

[data-bs-theme="dark"] .badge-light-primary {
    background-color: #1A3A52 !important;
    color: #6DD3FF !important;
}

.badge-light-success {
    background-color: #E8FFF3 !important;
    color: #50CD89 !important;
}

[data-bs-theme="dark"] .badge-light-success {
    background-color: #1C3D2E !important;
    color: #66FF99 !important;
}

.badge-light-warning {
    background-color: #FFF8DD !important;
    color: #FFC700 !important;
}

[data-bs-theme="dark"] .badge-light-warning {
    background-color: #4D3D1F !important;
    color: #FFD666 !important;
}

.badge-light-danger {
    background-color: #FFF5F8 !important;
    color: #F1416C !important;
}

[data-bs-theme="dark"] .badge-light-danger {
    background-color: #4D1F2E !important;
    color: #FF6666 !important;
}

.badge-light-info {
    background-color: #F1FAFF !important;
    color: #7239EA !important;
}

[data-bs-theme="dark"] .badge-light-info {
    background-color: #2A1F4D !important;
    color: #A366FF !important;
}

/* ========== ICONOS EN TABLAS ========== */
.ki-solid.ki-cross-circle {
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
}

.ki-solid.ki-cross-circle:hover {
    color: #F1416C;
    transform: scale(1.2);
}

.ki-solid {
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
}

.ki-solid:hover {
    color: #009EF7;
    transform: scale(1.2);
}

[data-bs-theme="dark"] .ki-solid {
    color: #A1A5B7;
}

[data-bs-theme="dark"] .ki-solid:hover {
    color: #009EF7;
}

.ki-pencil {
    margin-left: 10px;
}

/* ========== PRIORIDADES ========== */
.priority-high {
    color: #F1416C !important;
}

.priority-medium {
    color: #009EF7 !important;
}

.priority-low {
    color: #50CD89 !important;
}

/* ========== ESTADOS COMO ETIQUETAS ========== */
.estado-pendiente {
    background-color: #009EF7;
    color: #FFFFFF;
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
}

.estado-en-proceso {
    background-color: #FFC700;
    color: #1E1E2D;
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
}

.estado-entregado {
    background-color: #7239EA;
    color: #FFFFFF;
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
}

.estado-observado {
    background-color: #F1416C;
    color: #FFFFFF;
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
}

.estado-conforme {
    background-color: #50CD89;
    color: #FFFFFF;
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
}

/* ========== MODALES ========== */
.modal-lg {
    max-width: 90% !important;
}

.table-responsive {
    overflow-x: auto;
}

.table {
    margin-bottom: 0;
}

/* ==================== TARJETAS EN MODO OSCURO ==================== */
[data-bs-theme="dark"] .card {
    background-color: #1E1E2D !important;
    border-color: #2B2B40 !important;
}

[data-bs-theme="dark"] .card-header {
    background-color: #1A1A27 !important;
    border-color: #2B2B40 !important;
}

[data-bs-theme="dark"] .card-footer {
    background-color: #1A1A27 !important;
    border-color: #2B2B40 !important;
}

[data-bs-theme="dark"] .card-title {
    color: #FFFFFF !important;
}

/* ==================== FORMULARIOS EN MODO OSCURO ==================== */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: #1E1E2D !important;
    color: #FFFFFF !important;
    border-color: #2B2B40 !important;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background-color: #1E1E2D !important;
    color: #FFFFFF !important;
    border-color: #009EF7 !important;
    box-shadow: 0 0 0 0.25rem rgba(0, 158, 247, 0.25) !important;
}

[data-bs-theme="dark"] .form-control::placeholder {
    color: #7E8299 !important;
}

[data-bs-theme="dark"] .form-label {
    color: #FFFFFF !important;
}

[data-bs-theme="dark"] .form-text {
    color: #A1A5B7 !important;
}

/* ==================== MODALES EN MODO OSCURO ==================== */
[data-bs-theme="dark"] .modal-content {
    background-color: #1E1E2D !important;
    border-color: #2B2B40 !important;
}

[data-bs-theme="dark"] .modal-header {
    border-color: #2B2B40 !important;
    background-color: #1A1A27 !important;
}

[data-bs-theme="dark"] .modal-footer {
    border-color: #2B2B40 !important;
    background-color: #1A1A27 !important;
}

[data-bs-theme="dark"] .modal-title {
    color: #FFFFFF !important;
}

[data-bs-theme="dark"] .modal-body {
    color: #FFFFFF !important;
}

/* ==================== TEXTOS EN MODO OSCURO ==================== */
[data-bs-theme="dark"] .text-muted {
    color: #A1A5B7 !important;
}

[data-bs-theme="dark"] .text-gray-600 {
    color: #A1A5B7 !important;
}

[data-bs-theme="dark"] .text-gray-800 {
    color: #E4E6EF !important;
}

[data-bs-theme="dark"] .text-dark {
    color: #FFFFFF !important;
}

[data-bs-theme="dark"] h1, 
[data-bs-theme="dark"] h2, 
[data-bs-theme="dark"] h3, 
[data-bs-theme="dark"] h4, 
[data-bs-theme="dark"] h5, 
[data-bs-theme="dark"] h6 {
    color: #FFFFFF !important;
}

[data-bs-theme="dark"] p {
    color: #E4E6EF !important;
}

/* ==================== SEPARADORES ==================== */
[data-bs-theme="dark"] .separator {
    border-color: #2B2B40 !important;
}

[data-bs-theme="dark"] hr {
    border-color: #2B2B40 !important;
    opacity: 1 !important;
}

/* ==================== DROPDOWNS EN MODO OSCURO ==================== */
[data-bs-theme="dark"] .dropdown-menu {
    background-color: #1E1E2D !important;
    border-color: #2B2B40 !important;
}

[data-bs-theme="dark"] .dropdown-item {
    color: #FFFFFF !important;
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus {
    background-color: #252532 !important;
    color: #009EF7 !important;
}

[data-bs-theme="dark"] .dropdown-divider {
    border-color: #2B2B40 !important;
}

/* ==================== ALERTAS EN MODO OSCURO ==================== */
[data-bs-theme="dark"] .alert {
    border-color: #2B2B40 !important;
}

[data-bs-theme="dark"] .alert-info {
    background-color: #1E3A5F !important;
    color: #6DD3FF !important;
    border-color: #2A5580 !important;
}

[data-bs-theme="dark"] .alert-warning {
    background-color: #5F471E !important;
    color: #FFD666 !important;
    border-color: #80632A !important;
}

[data-bs-theme="dark"] .alert-danger {
    background-color: #5F1E1E !important;
    color: #FF6666 !important;
    border-color: #802A2A !important;
}

[data-bs-theme="dark"] .alert-success {
    background-color: #1E5F2E !important;
    color: #66FF99 !important;
    border-color: #2A803D !important;
}

/* ==================== TOOLTIPS EN MODO OSCURO ==================== */
[data-bs-theme="dark"] .tooltip-inner {
    background-color: #2B2B40 !important;
    color: #FFFFFF !important;
}

[data-bs-theme="dark"] .bs-tooltip-top .tooltip-arrow::before,
[data-bs-theme="dark"] .bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow::before {
    border-top-color: #2B2B40 !important;
}

/* ==================== BREADCRUMBS EN MODO OSCURO ==================== */
[data-bs-theme="dark"] .breadcrumb {
    background-color: transparent !important;
}

[data-bs-theme="dark"] .breadcrumb-item {
    color: #A1A5B7 !important;
}

[data-bs-theme="dark"] .breadcrumb-item.active {
    color: #FFFFFF !important;
}

[data-bs-theme="dark"] .breadcrumb-item + .breadcrumb-item::before {
    color: #7E8299 !important;
}

/* ==================== TABS EN MODO OSCURO ==================== */
[data-bs-theme="dark"] .nav-tabs {
    border-color: #2B2B40 !important;
}

[data-bs-theme="dark"] .nav-tabs .nav-link {
    color: #A1A5B7 !important;
}

[data-bs-theme="dark"] .nav-tabs .nav-link:hover {
    border-color: #2B2B40 !important;
    color: #FFFFFF !important;
}

[data-bs-theme="dark"] .nav-tabs .nav-link.active {
    background-color: #1E1E2D !important;
    border-color: #2B2B40 #2B2B40 #1E1E2D !important;
    color: #FFFFFF !important;
}

/* ==================== OTROS ELEMENTOS ==================== */
.simbolo-redondo {
    font-size: 60px;
    padding: 30px;
    border-radius: 50%;
}

.label-contraseña {
    width: 100%;
    text-align: left;
    font-weight: bold;
}

.logo {
    width: 300px;
}

.icono {
    width: 100px;
    text-align: center;
}

.image-container {
    position: relative;
    display: inline-block;
}

.image-container img {
    display: block;
}

.image-container:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

.caja-perfil {
    border: 1px solid #E4E6EF;
    margin: 10px;
    border-radius: 10px;
    padding: 15px;
}

[data-bs-theme="dark"] .caja-perfil {
    border-color: #2B2B40;
    background-color: #1E1E2D;
}

.label-input {
    font-weight: bold;
}

.detalle-historico {
    font-weight: bold;
    font-size: 11px;
}

.chart-container {
    display: flex;
    align-items: center;
}

.chart-legend {
    max-width: 200px;
}

.chart-legend h4 {
    margin-bottom: 0.5rem;
}

.rating-stars i {
    transition: all 0.2s ease;
    margin: 0 5px;
}

.rating-stars i:hover {
    transform: scale(1.2);
}

.star-rating {
    cursor: pointer !important;
}

canvas {
    max-height: 100% !important;
}

.card-body canvas {
    display: block !important;
    box-sizing: border-box !important;
}

/* ==================== SCROLL EN MODO OSCURO ==================== */
[data-bs-theme="dark"] ::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-track {
    background: #1E1E2D;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #2B2B40;
    border-radius: 6px;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #3F3F56;
}
