/**
 * JD Crimson Theme Bridge
 * Cuando body tiene la clase .jd-light-theme, remapea las variables del tema
 * oscuro a sus equivalentes claros. Así todas las páginas existentes se adaptan
 * solas sin tocar nada de su HTML ni sus clases.
 */

body.jd-light-theme {
    /* Fondos principales */
    --jd-bg-body:        var(--jd-light-bg-body);
    --jd-bg-main:        var(--jd-light-bg-main);
    --jd-bg-card:        var(--jd-light-bg-card);
    --jd-bg-card-hover:  var(--jd-light-bg-card-hover);
    --jd-bg-header:      var(--jd-light-bg-header);

    /* Bordes */
    --jd-border-color:       var(--jd-light-border-color);
    --jd-border-color-hover: var(--jd-light-border-color-hover);
    --jd-border-color-light: var(--jd-light-border-color-light);

    /* Texto */
    --jd-text-primary:   var(--jd-light-text-primary);
    --jd-text-secondary: var(--jd-light-text-secondary);
    --jd-text-muted:     var(--jd-light-text-muted);
    --jd-text-label:     var(--jd-light-text-label);
    --jd-text-disabled:  var(--jd-light-text-disabled);

    /* Sombras */
    --jd-shadow-sm:      var(--jd-light-shadow-sm);
    --jd-shadow-md:      var(--jd-light-shadow-md);
    --jd-shadow-lg:      var(--jd-light-shadow-lg);
    --jd-shadow-crimson: var(--jd-light-shadow-crimson);

    background-color: var(--jd-light-bg-body);
    color: var(--jd-light-text-secondary);
}

/* Inputs que dark.css colorea con valor literal (#1a1a1a) */
body.jd-light-theme input.bg-dark,
body.jd-light-theme select.bg-dark,
body.jd-light-theme textarea.bg-dark {
    background:       #ebebeb !important;
    background-color: #ebebeb !important;
    color:            var(--jd-light-text-primary) !important;
}

body.jd-light-theme .input-group-text {
    background:       #dbdbdb;
    background-color: #dbdbdb;
    color:            var(--jd-light-text-primary);
}

body.jd-light-theme #contador-servicios-encontrados {
    color:            var(--jd-light-text-primary) !important;
}

/* .form-control y .form-select tienen background literal en dark.css */
body.jd-light-theme .form-control,
body.jd-light-theme .form-select {
    background:       #ebebeb;
    background-color: #ebebeb;
    color:            var(--jd-light-text-primary);
}
body.jd-light-theme .form-control:focus,
body.jd-light-theme .form-select:focus {
    background:       #ebebeb;
    background-color: #ebebeb;
    color:            var(--jd-light-text-primary);
}
body.jd-light-theme .form-control::placeholder {
    color: var(--jd-light-text-label);
}

/* Sidebar */
body.jd-light-theme .admin-sidebar {
    background:   var(--jd-light-bg-header);
    border-right: 1px solid var(--jd-light-border-color);
}
body.jd-light-theme .sidebar-brand,
body.jd-light-theme .sidebar-nav-link,
body.jd-light-theme .sidebar-accordion-button,
body.jd-light-theme .sidebar-submenu-link {
    color: var(--jd-light-text-secondary);
}
body.jd-light-theme .sidebar-nav-link:hover,
body.jd-light-theme .sidebar-accordion-button:hover,
body.jd-light-theme .sidebar-submenu-link:hover {
    background: rgba(255, 77, 109, 0.08);
    color:      var(--jd-crimson);
}
body.jd-light-theme .sidebar-nav-link.active {
    background: rgba(255, 77, 109, 0.12);
    color:      var(--jd-crimson);
}
body.jd-light-theme .sidebar-accordion-body,
body.jd-light-theme .sidebar-accordion-item {
    background: transparent;
}
body.jd-light-theme .text-muted {
    color: var(--jd-light-text-muted) !important;
}

/* Modal */
body.jd-light-theme .modal-content {
    background: var(--jd-light-bg-card);
    color:      var(--jd-light-text-primary);
}
body.jd-light-theme .modal-header,
body.jd-light-theme .modal-footer {
    border-color: var(--jd-light-border-color);
}
body.jd-light-theme .modal-body {
    color: var(--jd-light-text-secondary);
}
body.jd-light-theme .btn-close {
    filter: none;
}

/* Tablas */
body.jd-light-theme .table-dark {
    --bs-table-color:       var(--jd-light-text-primary);
    --bs-table-bg:          #ffffff;
    --bs-table-border-color: var(--jd-light-border-color);
    --bs-table-striped-bg:  rgba(0, 0, 0, 0.02);
    --bs-table-hover-bg:    rgba(255, 77, 109, 0.04);
    color: var(--jd-light-text-secondary);
}
body.jd-light-theme .table-dark thead th {
    background:   rgba(255, 77, 109, 0.06);
    border-color: var(--jd-light-border-color);
}
body.jd-light-theme .table-dark tbody td {
    border-color: var(--jd-light-border-color);
    color:        var(--jd-light-text-secondary);
}

/* Dropdown Bootstrap */
body.jd-light-theme .dropdown-menu {
    background-color: #ffffff;
    border-color:     var(--jd-light-border-color);
}
body.jd-light-theme .dropdown-item {
    color: var(--jd-light-text-secondary);
}
body.jd-light-theme .dropdown-item:hover {
    background-color: rgba(255, 77, 109, 0.06);
    color:            var(--jd-crimson);
}

/* Accordion Bootstrap */
body.jd-light-theme .accordion-item {
    background:   #ffffff;
    border-color: var(--jd-light-border-color);
}
body.jd-light-theme .accordion-button {
    background: #ffffff;
    color:      var(--jd-light-text-primary);
}
body.jd-light-theme .accordion-button:not(.collapsed) {
    background: rgba(255, 77, 109, 0.06);
}

/* Colores base del body y titulares */
body.jd-light-theme h1,
body.jd-light-theme h2,
body.jd-light-theme h3,
body.jd-light-theme h4,
body.jd-light-theme h5,
body.jd-light-theme h6 {
    color: var(--jd-light-text-primary);
}

/* Paneles flotantes del header (notificaciones, chat, tareas) */
body.jd-light-theme #notif-panel,
body.jd-light-theme #chat-panel,
body.jd-light-theme #tareas-panel {
    background-color: #ffffff;
    border-color:     rgba(0, 0, 0, 0.08);
    box-shadow:       -4px 4px 20px rgba(0, 0, 0, 0.15);
}

/* Scrollbars de los paneles */
body.jd-light-theme #notif-lista-panel,
body.jd-light-theme #tareas-lista-panel,
body.jd-light-theme #chat-lista-contactos {
    scrollbar-color: var(--jd-crimson) #e0e0e0;
}
body.jd-light-theme #notif-lista-panel::-webkit-scrollbar-track,
body.jd-light-theme #tareas-lista-panel::-webkit-scrollbar-track,
body.jd-light-theme #chat-lista-contactos::-webkit-scrollbar-track { background: #e8e8e8; }

/* Items de notificaciones */
body.jd-light-theme .notif-item {
    background: rgba(0, 0, 0, 0.03);
}
body.jd-light-theme .notif-item.notif-no-leida {
    background: linear-gradient(135deg, #f5f5f5 0%, #efefef 100%);
}
body.jd-light-theme .notif-item:hover {
    background: rgba(255, 77, 109, 0.06);
}
body.jd-light-theme .notif-titulo {
    color: var(--jd-light-text-primary);
}
body.jd-light-theme .notif-mensaje {
    color: var(--jd-light-text-muted);
}
body.jd-light-theme .notif-tiempo {
    color: var(--jd-light-text-muted);
}

/* Items de tareas */
body.jd-light-theme .tarea-item {
    background: rgba(0, 0, 0, 0.03);
}
body.jd-light-theme .tarea-item:hover {
    background: rgba(255, 77, 109, 0.06);
}
body.jd-light-theme .tarea-titulo {
    color: var(--jd-light-text-primary);
}
body.jd-light-theme .tarea-fecha,
body.jd-light-theme .tarea-descripcion,
body.jd-light-theme .tarea-asignado {
    color: var(--jd-light-text-muted);
}
body.jd-light-theme .tarea-footer {
    border-top-color: rgba(255, 77, 109, 0.15);
}

/* Items del chat */
body.jd-light-theme .chat-contacto-item {
    background: rgba(0, 0, 0, 0.03);
}
body.jd-light-theme .chat-contacto-item:hover {
    background: rgba(255, 77, 109, 0.06);
}
body.jd-light-theme .chat-contacto-item.active {
    background: rgba(255, 77, 109, 0.1);
}

/* Textos blancos hardcodeados que deben ser oscuros en light */
body.jd-light-theme .text-light,
body.jd-light-theme .text-white {
    color: var(--jd-light-text-primary) !important;
}
body.jd-light-theme .bg-dark {
    background-color: #f0f0f0 !important;
    color:            var(--jd-light-text-primary) !important;
}

/* Paginación Bootstrap — override de variables BS + reglas explícitas */
body.jd-light-theme {
    --bs-pagination-color:                  var(--jd-light-text-secondary);
    --bs-pagination-bg:                     #ffffff;
    --bs-pagination-border-color:           var(--jd-light-border-color);
    --bs-pagination-hover-color:            var(--jd-crimson);
    --bs-pagination-hover-bg:               rgba(255, 77, 109, 0.06);
    --bs-pagination-hover-border-color:     var(--jd-crimson);
    --bs-pagination-active-color:           #ffffff;
    --bs-pagination-active-bg:              var(--jd-crimson);
    --bs-pagination-active-border-color:    var(--jd-crimson);
    --bs-pagination-disabled-color:         var(--jd-light-text-disabled);
    --bs-pagination-disabled-bg:            #f5f5f5;
    --bs-pagination-disabled-border-color:  var(--jd-light-border-color);
    --bs-pagination-focus-color:            var(--jd-crimson);
    --bs-pagination-focus-bg:               rgba(255, 77, 109, 0.06);
    --bs-pagination-focus-box-shadow:       0 0 0 0.2rem rgba(255, 77, 109, 0.25);
}
/* Reglas explícitas para ganar contra jd-crimson-dark.css con !important */
body.jd-light-theme .pagination .page-link {
    background-color: #ffffff !important;
    border-color:     var(--jd-light-border-color) !important;
    color:            var(--jd-light-text-secondary) !important;
}
body.jd-light-theme .pagination .page-link:hover {
    background-color: rgba(255, 77, 109, 0.08) !important;
    border-color:     var(--jd-crimson) !important;
    color:            var(--jd-crimson) !important;
}
body.jd-light-theme .pagination .page-item.disabled .page-link {
    background-color: #f5f5f5 !important;
    border-color:     var(--jd-light-border-color) !important;
    color:            var(--jd-light-text-disabled) !important;
}
body.jd-light-theme .pagination .page-item.active .page-link {
    background:   var(--jd-crimson-gradient) !important;
    border-color: transparent !important;
    color:        #fff !important;
}

/* Canvas de gráficas — fondo transparente en light */
body.jd-light-theme canvas {
    background: transparent !important;
}

/* Titulos (h5 inline color:#fff) dentro de los paneles del header */
body.jd-light-theme #notif-panel  h5,
body.jd-light-theme #chat-panel   h5,
body.jd-light-theme #tareas-panel h5,
body.jd-light-theme #notif-panel  h6,
body.jd-light-theme #chat-panel   h6,
body.jd-light-theme #tareas-panel h6 {
    color: var(--jd-light-text-primary) !important;
}

/* btn-outline-light: en dark.css tiene color:#fff hardcodeado */
body.jd-light-theme .btn-outline-light {
    border-color: var(--jd-light-border-color);
    color:        var(--jd-light-text-secondary);
    background:   transparent;
}
body.jd-light-theme .btn-outline-light:hover {
    background:   rgba(255, 77, 109, 0.08);
    border-color: var(--jd-crimson);
    color:        var(--jd-crimson);
}

/* Badge secondary y dark — fondos claros en light */
body.jd-light-theme .badge.bg-secondary {
    background: linear-gradient(135deg, #e0e0e0 0%, #c8c8c8 100%) !important;
    color:      #444 !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
body.jd-light-theme .badge.bg-dark,
body.jd-light-theme .badge-dark {
    background: linear-gradient(135deg, #e0e0e0 0%, #c8c8c8 100%) !important;
    color:      #444 !important;
    border:     none;
}

/* Kanban — cards y columnas con colores hardcodeados */
body.jd-light-theme .kanban-column {
    background: linear-gradient(135deg, #f5f5f5 0%, #ececec 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
body.jd-light-theme .kanban-column-header {
    color:        var(--jd-light-text-primary);
    border-color: rgba(0, 0, 0, 0.08);
}
body.jd-light-theme .kanban-card {
    background:   linear-gradient(135deg, #ffffff 0%, #f7f0f0 100%);
    border-color: rgba(255, 77, 109, 0.2);
    box-shadow:   0 2px 6px rgba(0, 0, 0, 0.07);
}
body.jd-light-theme .kanban-card:hover {
    box-shadow:   0 6px 16px rgba(255, 77, 109, 0.18);
    border-color: var(--jd-crimson);
}
body.jd-light-theme .kanban-card-title {
    color: var(--jd-light-text-primary);
}
body.jd-light-theme .kanban-card-client {
    color: var(--jd-light-text-secondary);
}
body.jd-light-theme .kanban-card-info {
    color: var(--jd-light-text-muted);
}
body.jd-light-theme .kanban-card-footer {
    border-top-color: rgba(0, 0, 0, 0.08);
}
body.jd-light-theme .kanban-column-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.04);
}

/* ── Panel headers: border-bottom e h5/h6 inline ─────────────────────────── */
body.jd-light-theme #notif-panel  > div:first-child,
body.jd-light-theme #tareas-panel > div:first-child,
body.jd-light-theme #chat-panel   > div:first-child {
    border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}
/* h5 con style="color:#fff" inline → necesita !important */
body.jd-light-theme #notif-panel  h5,
body.jd-light-theme #tareas-panel h5,
body.jd-light-theme #chat-panel   h5,
body.jd-light-theme #chat-ventana h5 {
    color: var(--jd-light-text-primary) !important;
}
/* Tabs del chat (botones inline style="color:#fff") */
body.jd-light-theme #chat-panel [style*="color: #fff"],
body.jd-light-theme #chat-panel [style*="color:#fff"] {
    color: var(--jd-light-text-secondary) !important;
}
/* Tab border divisor */
body.jd-light-theme #chat-panel [style*="border-bottom: 1px solid rgba(255, 255, 255"] {
    border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}
/* Mensajes vacíos (style="color:#999") */
body.jd-light-theme #chat-panel   [style*="color: #999"],
body.jd-light-theme #tareas-panel [style*="color: #999"],
body.jd-light-theme #notif-panel  [style*="color: #999"] {
    color: var(--jd-light-text-muted) !important;
}
/* Botón de volver en chat (style="color:#fff") */
body.jd-light-theme #chat-ventana [style*="color:#fff"],
body.jd-light-theme #chat-ventana [style*="color: #fff"] {
    color: var(--jd-light-text-secondary) !important;
}

/* ── Chat – tabs ──────────────────────────────────────────────────────────── */
body.jd-light-theme .chat-tab-btn {
    color: var(--jd-light-text-secondary);
    background: rgba(0, 0, 0, 0.04);
}
body.jd-light-theme .chat-tab-btn.active {
    color: var(--jd-light-text-primary);
}

body.jd-light-theme .btn-crimson {
    color: white;
}

body.jd-light-theme .dropdown-menu-dark {
    background-color: #ffffff !important;
    border-color:     var(--jd-light-border-color) !important;
}

body.jd-light-theme .modal-footer,
body.jd-light-theme .modal-content,
body.jd-light-theme .modal-header,
body.jd-light-theme .modal-body,
body.jd-light-theme .card,
body.jd-light-theme .card-body {
    background-color: #ffffff !important;
}

body.jd-light-theme .card-form {
    background:   #ffffff !important;
    border-color: var(--jd-light-border-color) !important;
    color:        var(--jd-light-text-primary) !important;
}

/* ── Chat – ventana de conversación ──────────────────────────────────────── */
body.jd-light-theme #chat-ventana {
    background-color: #ffffff;
    border-color:     rgba(0, 0, 0, 0.08);
    box-shadow:       -4px 4px 20px rgba(0, 0, 0, 0.12);
}
body.jd-light-theme #chat-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
body.jd-light-theme #chat-header-nombre {
    color: var(--jd-light-text-primary);
}
body.jd-light-theme #chat-header-rol {
    color: var(--jd-light-text-muted);
}
body.jd-light-theme #chat-mensajes-container {
    scrollbar-color: var(--jd-crimson) #e8e8e8;
}
body.jd-light-theme #chat-mensajes-container::-webkit-scrollbar-track {
    background: #f0f0f0;
}
/* Mensajes recibidos */
body.jd-light-theme .chat-mensaje-bubble {
    background: rgba(0, 0, 0, 0.05);
    color:      var(--jd-light-text-primary);
}
/* Mensajes enviados — mantienen el gradiente crimson */
body.jd-light-theme .chat-mensaje.enviado .chat-mensaje-bubble {
    background: var(--jd-crimson-gradient);
    color:      #ffffff;
}
body.jd-light-theme .chat-mensaje-info {
    color: var(--jd-light-text-muted);
}
body.jd-light-theme .chat-mensaje-check {
    color: #aaa;
}

/* ── Chat – input de mensaje ──────────────────────────────────────────────── */
body.jd-light-theme #chat-input-container {
    background:    rgba(0, 0, 0, 0.03);
    border-top:    1px solid rgba(255, 77, 109, 0.2);
}
body.jd-light-theme #chat-mensaje-input {
    background:   rgba(0, 0, 0, 0.05);
    border-color: rgba(255, 77, 109, 0.25);
    color:        var(--jd-light-text-primary);
}
body.jd-light-theme #chat-mensaje-input:focus {
    background:   rgba(0, 0, 0, 0.07);
    border-color: var(--jd-crimson);
}
body.jd-light-theme #chat-mensaje-input::placeholder {
    color: var(--jd-light-text-muted);
}

/* ── Chat – lista de contactos ────────────────────────────────────────────── */
body.jd-light-theme .chat-contacto-nombre {
    color: var(--jd-light-text-primary);
}
body.jd-light-theme .chat-contacto-rol,
body.jd-light-theme .chat-contacto-hora,
body.jd-light-theme .chat-contacto-preview {
    color: var(--jd-light-text-muted);
}
body.jd-light-theme .chat-separador {
    color:         var(--jd-light-text-muted);
    background:    rgba(255, 77, 109, 0.03);
    border-color:  rgba(255, 77, 109, 0.12);
}
/* ── Chat – grupos ────────────────────────────────────────────────────────── */
body.jd-light-theme .chat-grupo-nombre {
    color: var(--jd-light-text-primary);
}
body.jd-light-theme .chat-grupo-info,
body.jd-light-theme .chat-grupo-no-leidas,
body.jd-light-theme .chat-grupo-ultimo-mensaje {
    color: var(--jd-light-text-muted);
}
body.jd-light-theme .chat-grupo-item {
    color: var(--jd-light-text-secondary);
}
body.jd-light-theme .chat-grupo-item:hover {
    background:   rgba(255, 77, 109, 0.06);
    border-color: rgba(255, 77, 109, 0.2);
    color:        var(--jd-crimson);
}

/* ── Chat – botón cerrar panel ───────────────────────────────────────────── */
body.jd-light-theme .chat-btn-cerrar {
    background:   rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.12);
    color:        var(--jd-light-text-muted);
}
body.jd-light-theme .chat-btn-cerrar:hover {
    background: rgba(255, 77, 109, 0.1);
    color:      var(--jd-crimson);
}

/* ── Tareas – texto del panel ─────────────────────────────────────────────── */
body.jd-light-theme .tarea-titulo {
    color: var(--jd-light-text-primary) !important;
}
body.jd-light-theme .tarea-fecha,
body.jd-light-theme .tarea-descripcion,
body.jd-light-theme .tarea-asignado {
    color: var(--jd-light-text-muted) !important;
}

/* ── Notificaciones – texto del panel ────────────────────────────────────── */
body.jd-light-theme .notif-titulo {
    color: var(--jd-light-text-primary) !important;
}
body.jd-light-theme .notif-mensaje,
body.jd-light-theme .notif-tiempo {
    color: var(--jd-light-text-muted) !important;
}

/* Drawer "Agregar Card" del dashboard */
body.jd-light-theme .dash-drawer {
    background:   #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow:   -4px 4px 20px rgba(0, 0, 0, 0.12);
}
body.jd-light-theme .dash-drawer:hover {
    background:   #fafafa;
    border-color: rgba(0, 0, 0, 0.12);
}
body.jd-light-theme .dash-drawer-header,
body.jd-light-theme .dash-drawer-search,
body.jd-light-theme .dash-drawer-filters {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}
body.jd-light-theme .dash-drawer-title {
    color: var(--jd-light-text-primary);
}
body.jd-light-theme .dash-drawer-search input {
    background:    rgba(0, 0, 0, 0.05);
    border-color:  rgba(0, 0, 0, 0.1);
    color:         var(--jd-light-text-primary);
}
body.jd-light-theme .dash-drawer-search input::placeholder {
    color: var(--jd-light-text-muted);
}
body.jd-light-theme .dash-drawer-filter-btn {
    background:   rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.08);
    color:        var(--jd-light-text-secondary);
}
body.jd-light-theme .dash-drawer-filter-btn:hover,
body.jd-light-theme .dash-drawer-filter-btn.active {
    background:   rgba(255, 77, 109, 0.08);
    border-color: rgba(255, 77, 109, 0.25);
    color:        var(--jd-crimson);
}
body.jd-light-theme .dash-drawer-list {
    scrollbar-color: var(--jd-crimson) #e8e8e8;
}
body.jd-light-theme .dash-drawer-list::-webkit-scrollbar-track {
    background: #f0f0f0;
}

/* Analíticas — analytics.css + chart-container de admin_analytics_desings */
body.jd-light-theme .analytics-section {
    background:   linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
    border-color: var(--jd-light-border-color);
}
body.jd-light-theme .analytics-section .section-title {
    color: var(--jd-light-text-primary);
}
body.jd-light-theme .analytics-table th,
body.jd-light-theme .analytics-table td {
    border-color: var(--jd-light-border-color);
    color:        var(--jd-light-text-secondary);
}
body.jd-light-theme .rank-num {
    background: #e0e0e0;
    color:      var(--jd-light-text-secondary);
}
body.jd-light-theme .analytics-table-scroll .table-responsive {
    scrollbar-color: var(--jd-crimson) #e0e0e0;
}
body.jd-light-theme .analytics-table-scroll .table-responsive::-webkit-scrollbar-thumb {
    background: #bbb;
}
/* Cajas de costo repuestos/productos (inline style=#1a1a1a) */
body.jd-light-theme [style*="background:#1a1a1a"],
body.jd-light-theme [style*="background: #1a1a1a"] {
    background: #f0f0f0 !important;
    border-color: var(--jd-light-border-color) !important;
}
/* chart-container de admin_analytics_desings.php */
body.jd-light-theme .chart-container {
    background:   linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
    border-color: var(--jd-light-border-color);
}
/* Scrollbar del slider de piezas en admin_analytics_desings */
body.jd-light-theme .slider-horizontal::-webkit-scrollbar-track {
    background: #e0e0e0;
}
body.jd-light-theme .slider-horizontal::-webkit-scrollbar-thumb {
    background: #bbb;
}
body.jd-light-theme .slider-horizontal::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* movil_tecnicos.php — elementos con background:#1a1a1a hardcodeado */
body.jd-light-theme .buscar-fila input {
    background:   #ffffff;
    border-color: var(--jd-light-border-color);
    color:        var(--jd-light-text-primary);
}
body.jd-light-theme .buscar-fila input::placeholder {
    color: var(--jd-light-text-muted);
}
body.jd-light-theme .nota-file-link {
    background:   #f0f0f0;
    border-color: var(--jd-light-border-color);
    color:        var(--jd-light-text-secondary);
}
body.jd-light-theme .form-nota textarea {
    background:   #ffffff;
    border-color: var(--jd-light-border-color);
    color:        var(--jd-light-text-primary);
}
body.jd-light-theme .form-nota textarea::placeholder {
    color: var(--jd-light-text-muted);
}
body.jd-light-theme .btn-archivo {
    background:   #f0f0f0;
    border-color: var(--jd-light-border-color);
    color:        var(--jd-light-text-muted);
}
body.jd-light-theme .btn-archivo:hover {
    border-color: var(--jd-crimson);
    color:        var(--jd-crimson);
}
body.jd-light-theme .preview-item .file-icon {
    background: #f0f0f0;
    color:      var(--jd-light-text-muted);
}
body.jd-light-theme #banner-upload {
    background:    linear-gradient(135deg, #f5f5f5, #ebebeb);
    border-top:    2px solid var(--jd-crimson);
    color:         var(--jd-light-text-secondary);
    box-shadow:    0 -4px 16px rgba(0, 0, 0, 0.1);
}
body.jd-light-theme .btn-buscar:disabled {
    background: linear-gradient(135deg, #d0d0d0, #c0c0c0);
    color:      var(--jd-light-text-disabled);
}

/* Ajuste del switch en tema claro */
body.jd-light-theme .theme-switch-track {
    background:   rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 0, 0, 0.18);
}
body.jd-light-theme .sidebar-user-divider {
    border-color: rgba(0, 0, 0, 0.1) !important;
}

/* .bg-buscador → color blanco hardcodeado con !important */
body.jd-light-theme .bg-buscador {
    color:        var(--jd-light-text-primary) !important;
    border-color: var(--jd-light-border-color) !important;
}

/* .stat-box (páginas WMS) — background rgba oscuro hardcodeado */
body.jd-light-theme .stat-box {
    background:   #ffffff !important;
    border-color: var(--jd-light-border-color) !important;
}
body.jd-light-theme .stat-box .stat-label {
    color: var(--jd-light-text-secondary) !important;
}

/* .action-btn-large (admin_wms_inicio) — background rgba oscuro hardcodeado */
body.jd-light-theme .action-btn-large {
    background:   #f5f5f5 !important;
    border-color: var(--jd-light-border-color) !important;
    color:        var(--jd-light-text-primary) !important;
}
body.jd-light-theme .action-btn-large small {
    color: var(--jd-light-text-muted) !important;
}

/* Header flotante — misma transparencia, versión clara */
body.jd-light-theme header.admin-header-top {
    background-color: rgba(245, 245, 245, 0.72);
}
body.jd-light-theme .burbuja {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0) !important;
}
body.jd-light-theme .burbuja:hover {
    background:   rgba(0, 0, 0, 0.08) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
}
body.jd-light-theme .buscador-global {
    background:   rgba(0, 0, 0, 0.05) !important;
    border-color: transparent !important;
    color:        var(--jd-light-text-primary) !important;
}
body.jd-light-theme .buscador-global:focus {
    background:   rgba(0, 0, 0, 0.08) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
    color:        var(--jd-light-text-primary) !important;
}
body.jd-light-theme .buscador-global::placeholder {
    color: var(--jd-light-text-muted) !important;
}
body.jd-light-theme .navbar-nav .nav-link {
    color: var(--jd-light-text-secondary) !important;
}
body.jd-light-theme .navbar-nav .nav-link:hover {
    color: var(--jd-crimson) !important;
}
body.jd-light-theme .navbar-nav .dropdown-item {
    color: var(--jd-light-text-secondary) !important;
}
body.jd-light-theme .navbar-nav .dropdown-menu {
    background-color: #ffffff;
    box-shadow:       var(--jd-light-shadow-md);
}
body.jd-light-theme .notif-no-leida {
    background: linear-gradient(135deg, #f5f5f5 0%, #efefef 100%) !important;
}
body.jd-light-theme .notif-no-leida:hover {
    background: linear-gradient(135deg, #ebebeb 0%, #e4e4e4 100%) !important;
}

/* Hero de las páginas admin — literal en dark.css, override aquí */
body.jd-light-theme .admin-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f2e7e7 100%);
    border-color: var(--jd-light-border-color-hover);
}
body.jd-light-theme .admin-hero h1,
body.jd-light-theme .admin-hero h2,
body.jd-light-theme .admin-hero h3 {
    color: var(--jd-light-text-primary);
}
body.jd-light-theme .admin-subtitle {
    color: var(--jd-light-text-muted);
}
