/* Esto cambia el fondo de TODA la página */
body {
    background-color: #020617 !important; /* El color más oscuro */
    color: #f8fafc;
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Esto limpia el contenedor que envuelve las secciones */
.main-content {
    background-color: #020617 !important;
    min-height: 100vh;
    width: 100%;
    margin-top: 80px; /* Espacio para el header */
    padding: 20px;
    box-sizing: border-box;
}

/* Esto limpia el contenedor que envuelve las secciones */

.app-container { display: flex; width: 100%; min-height: 100vh; }

.logo-area { margin-bottom: 16px; line-height: 1.2; }
.logo {
    color: #60a5fa;
    letter-spacing: 3px;
    font-size: 20px;
    margin: 0 0 2px 0;
    font-weight: 700;
    white-space: nowrap;
}
.logo-area span {
    font-size: 10px;
    color: #60a5fa;
    text-transform: uppercase;
    margin: 0;
    display: block;
    font-weight: 600;
}
.logo-area .nombre-clinica {
    display: block;
    color: #94a3b8;
    font-size: 11px;
    margin-top: 2px;
    font-weight: 500;
    text-transform: none;
}

.menu-nav { display: flex; flex-direction: column; gap: 6px; }
.btn-nav {
    background: #1e293b; border: none; color: #94a3b8;
    padding: 10px 12px; text-align: left; cursor: pointer;
    border-radius: 8px; font-size: 15px; transition: 0.3s;
}
.btn-nav:hover, .btn-nav.active { background: #334155; color: white; }

/* Sidebar: todos los ítems del menú con el mismo aspecto (como Reportar Falla) */
.sidebar .menu-nav .btn-nav {
    min-height: 44px;
    display: flex;
    align-items: center;
    background: #1e293b;
    border: none;
    border-radius: 8px;
    color: #94a3b8;
    font-size: 15px;
    padding: 10px 12px;
    width: 100%;
    box-sizing: border-box;
    outline: none;
    box-shadow: none;
}
.sidebar .menu-nav .btn-nav:focus {
    outline: none;
    box-shadow: none;
    border: none;
}
.sidebar .menu-nav .btn-nav:hover,
.sidebar .menu-nav .btn-nav.active {
    background: #334155;
    color: white;
}
.sidebar .menu-nav .btn-nav.btn-salir {
    color: #ef4444;
}
.sidebar .menu-nav .btn-nav.btn-salir:hover {
    color: #fca5a5;
}

.main-content {
    background-color: #020617 !important;
    min-height: 100vh;
    width: 100%;
    margin-top: 80px; /* Espacio para el header */
    padding: 20px;
    box-sizing: border-box;
}

.tabla-contenedor th {
    background-color: #1e293b; /* Un tono más claro que el fondo total */
    color: #94a3b8;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
    padding: 15px 12px; /* Más espacio arriba y abajo */
    border-bottom: 2px solid #334155;
    text-align: left;
}

/* Tablas: encabezado centrado y ajustado al contenido (Inventario, Reportes Activos, Bitácora) */
#sec-inventario .tabla-contenedor table,
#sec-reportes .tabla-contenedor table,
#sec-bitacora .tabla-contenedor table {
    table-layout: auto;
}
#sec-inventario .tabla-contenedor th,
#sec-reportes .tabla-contenedor th,
#sec-bitacora .tabla-contenedor th {
    text-align: center;
    white-space: nowrap;
}
#sec-inventario .tabla-contenedor td,
#sec-reportes .tabla-contenedor td,
#sec-bitacora .tabla-contenedor td {
    text-align: center;
}
#sec-inventario .tabla-contenedor td:last-child,
#sec-reportes .tabla-contenedor td:last-child,
#sec-bitacora .tabla-contenedor td:last-child {
    justify-content: center;
}

/* Reportes Activos: columna Ticket más estrecha */
#sec-reportes .tabla-contenedor th:first-child,
#sec-reportes .tabla-contenedor td:first-child {
    max-width: 95px;
    width: 95px;
}

.tabla-contenedor td {
    padding: 14px 12px; /* Aumentamos el espacio interno de cada celda */
    vertical-align: middle;
    border-bottom: 1px solid #1e293b;
    font-size: 14px;
    color: #e2e8f0;
}

.tabla-contenedor tbody tr:hover {
    background-color: #334155; /* Efecto hover oscuro (Bitácora y resto) */
    transition: background-color 0.2s ease;
}
/* Inventario y Reportes Activos: hover con el mismo color de fondo de la tabla (tema oscuro) */
#sec-inventario .tabla-contenedor tbody tr:hover,
#sec-reportes .tabla-contenedor tbody tr:hover {
    background-color: #1e293b;
    transition: background-color 0.2s ease;
}

.modal-content img { max-width: 80%; border-radius: 10px; }
/* Estilos del Formulario */
.modal-content-form {
    display: flex;
    flex-direction: column;
    max-height: 85vh; /* Evita que choque con los bordes de la pantalla */
    overflow-y: auto; /* Permite el scroll de los campos */
    position: relative;
    padding: 0 !important; /* Quitamos padding general para controlar los bordes */
}

.modal-content-form h2 {
    padding: 25px 25px 10px 25px;
    margin: 0;
}

.grupo-input { margin-bottom: 15px; display: flex; flex-direction: column; }
.grupo-input label { font-size: 13px; font-weight: bold; margin-bottom: 5px; color: #64748b; }
.grupo-input input { padding: 10px; border: 1px solid #cbd5e1; border-radius: 6px; }

.grupo-select { margin-bottom: 15px; display: flex; flex-direction: column; }
.grupo-select label { font-size: 13px; font-weight: bold; margin-bottom: 5px; color: #64748b; }

.flex-inputs { display: flex; gap: 10px; }
.flex-inputs .grupo-input { flex: 1; }

.botones-form { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.btn-secundario { background: #e2e8f0; color: #111827; border: none; padding: 10px 20px; border-radius: 8px; cursor: pointer; }
.btn-pdf {
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: 0.2s;
    color: #111827;
}

.btn-pdf:hover {
    background-color: #1e293b;
    color: #fff;
}
input[type="file"] {
    padding: 8px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}
.btn-eliminar {
    background-color: #fee2e2; /* Rojo muy clarito */
    color: #991b1b; /* Rojo oscuro */
    border: 1px solid #fca5a5;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 16px;
}

.btn-eliminar:hover {
    background-color: #ef4444;
    color: white;
}
.btn-editar {
    background-color: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #93c5fd;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 16px;
    margin-right: 6px;
}
.btn-editar:hover {
    background-color: #3b82f6;
    color: white;
}
/* Botón Finalizar (Reportes Activos): mismo diseño que botones de acción del inventario, color verde */
.btn-finalizar-reporte {
    background-color: #10b981;
    color: #fff;
    border: 1px solid #059669;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 14px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-finalizar-reporte:hover {
    background-color: #059669;
    color: #fff;
}
/* Columna ACCIÓN en Reportes Activos: centrar el botón Finalizar (horizontal y vertical) */
#sec-reportes .tabla-contenedor td:last-child {
    justify-content: center;
}
.select-tabla {
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #d1d5db;
    background-color: #f9fafb;
    font-size: 14px;
    cursor: pointer;
    width: 100%;
}

.select-tabla:focus {
    outline: none;
    border-color: #2563eb;
}
/* Botón de control en la esquina */
/* Sidebar con transición suave */
/* El Sidebar ahora estará "encima" de la pantalla */
/* El Sidebar ahora está escondido a la izquierda por defecto */
.sidebar {
    width: 260px;
    height: 100vh;
    background-color: #111827;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    transform: translateX(-100%); /* Lo manda fuera de la pantalla */
    transition: transform 0.3s ease;
}

/* Cuando le agregamos esta clase, el menú aparece */
.sidebar {
    width: 260px;
    height: 100vh;
    background-color: #111827;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 2200;
    padding: 80px 12px 20px 12px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-sizing: border-box;
}

.sidebar.active {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,0.3);
}

/* EL CONTENIDO (TU TABLA) */
.main-content {
    margin-left: 0; /* Siempre ocupa toda la pantalla */
    width: 100%;
    padding: 80px 20px; /* Espacio arriba para el botón */
    transition: all 0.3s ease;
}

/* Botón Menú: mismo estilo que los ítems del sidebar, texto en azul del inicio */
.btn-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 2500;
    background: #1e293b;
    color: #60a5fa;
    border: none;
    padding: 12px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    box-shadow: none;
    transition: background 0.2s, color 0.2s;
}
.btn-toggle:hover {
    background: #334155;
    color: white;
}
/* Estilo anterior para los dropdowns */
.select-tabla {
    padding: 6px 10px;
    border: 1px solid #1e293b;
    border-radius: 6px;
    background-color: #1e293b;
    color: #374151;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.select-tabla:focus {
    border-color: #3b82f6;
    outline: none;
}
/* Esto hará que ambos resalten igual */
.select-tabla {
    padding: 6px 12px;
    border: 2px solid #1e293b; /* Línea resaltada */
    border-radius: 8px;        /* Bordes redondeados como el de ubicación */
    background-color: #ffffffc4;
    color: #1f2937;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    appearance: none; /* Quita el estilo por defecto del sistema */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 1em;
}

/* Efecto cuando pasas el mouse o das clic */
.select-tabla:hover {
    border-color: #3b82f6; /* Cambia a azul al resaltar */
}

.select-tabla:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
/* Colores para los estados en la tabla */
.estado-operativo {
    background-color: #dcfce7; /* Verde claro */
    color: #166534;            /* Verde oscuro */
    border: 1px solid #166534;
    border-radius: 4px;
    padding: 2px 5px;
    font-weight: bold;
}

.estado-en-mantenimiento {
    background-color: #fef9c3; /* Amarillo/Naranja claro */
    color: #854d0e;            /* Café/Naranja oscuro */
    border: 1px solid #854d0e;
    border-radius: 4px;
    padding: 2px 5px;
    font-weight: bold;
}

.estado-fuera-de-servicio {
    background-color: #fee2e2; /* Rojo claro */
    color: #991b1b;            /* Rojo oscuro */
    border: 1px solid #991b1b;
    border-radius: 4px;
    padding: 2px 5px;
    font-weight: bold;
}

.estado-dado-de-baja {
    background-color: #f3f4f6; /* Gris claro */
    color: #1f2937;            /* Gris oscuro */
    border: 1px solid #1f2937;
    border-radius: 4px;
    padding: 2px 5px;
    font-weight: bold;
}
/* Contenedor corregido */
/* El estilo de botón "Pestaña" que te gustó */
.btn-menu-tab {
    background-color: #e5e7eb; /* Gris claro de la imagen */
    color: #111827;            /* Texto oscuro */
    border: 1px solid #9ca3af; /* Borde sutil marcado */
    border-radius: 4px;        /* Rectangular con toque suave */
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    width: auto;               /* Solo mide lo que mide el texto */
    box-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

.btn-menu-tab:hover {
    background-color: #d1d5db;
}

/* Estilo cuando estás en esa sección */
.btn-menu-tab.active {
    background-color: #ffffff; /* Fondo blanco */
    border-color: #3b82f6;     /* Borde azul */
    border-left: 4px solid #3b82f6; /* Línea de realce */
}
/* Contenedor con scroll vertical para tablas largas (Inventario, Bitácora) */
.tabla-scroll-wrapper {
    max-height: 65vh;
    overflow-y: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    border-radius: 8px;
    border: 1px solid #334155;
}

.tabla-contenedor {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}
.tabla-contenedor table {
    width: 100%;
    min-width: 800px; /* Permite scroll horizontal en móvil */
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 10px;
}
.modulo {
    background-color: #1e293b; /* Un tono arriba del fondo */
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    border: 1px solid #334155;
}

/* El contenedor del formulario de reporte */
.form-reporte-contenedor {
    background-color: #0f172a; /* Un azul un poco más claro para resaltar */
    width: 90%;
    max-width: 1000px;
    padding: 40px;
    border-radius: 15px;
    border: 1px solid #1e293b;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.grid-reporte {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

.campo label {
    display: block;
    background: linear-gradient(to right, #1e3a8a, #3b82f6);
    color: #ffffff;
    padding: 5px 15px;
    border-radius: 4px;
    text-align: center;
    margin-bottom: 5px;
    font-size: 14px;
}

.campo input, .campo select, .campo-full textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #f3f4f5;
    border-radius: 6px;
    background: rgba(255,255,255,0.8);
    color: #111827;
}
.form-reporte-contenedor .campo select,
.form-reporte-contenedor .campo select option,
.form-reporte-contenedor .campo input {
    color: #111827;
}
.form-reporte-contenedor .campo-full textarea {
    color: #111827;
}
.form-reporte-contenedor .campo-full textarea::placeholder {
    color: #6b7280;
}

.campo-full { margin-top: 20px; text-align: center; }

.btn-reportar-final {
    background: linear-gradient(to right, #ef4444, #ef4444);
    color: #ffffffc4;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

/* Reportar falla: optimizado para móviles */
@media (max-width: 767px) {
    #sec-reportar-falla {
        padding: 16px 12px 24px !important;
        box-sizing: border-box;
    }
    .form-reporte-contenedor {
        width: 100% !important;
        max-width: 100% !important;
        padding: 16px 20px !important;
        margin: 0;
        box-sizing: border-box;
    }
    .form-reporte-contenedor .header-reporte h2 {
        font-size: 1rem !important;
        line-height: 1.3;
        padding: 0 4px;
    }
    .grid-reporte {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    .form-reporte-contenedor .campo label,
    .form-reporte-contenedor .campo input,
    .form-reporte-contenedor .campo select {
        min-height: 44px !important;
        font-size: 16px !important; /* Evita zoom en iOS al enfocar */
    }
    .form-reporte-contenedor .campo select,
    .form-reporte-contenedor .campo input {
        padding: 12px 14px !important;
        width: 100% !important;
        box-sizing: border-box;
    }
    .form-reporte-contenedor .form-group,
    .form-reporte-contenedor .form-group .form-control {
        min-height: 44px !important;
        font-size: 16px !important;
        padding: 12px 14px !important;
        box-sizing: border-box;
    }
    .form-reporte-contenedor .campo-full {
        margin-top: 20px !important;
        width: 100% !important;
        padding: 0 !important;
    }
    .form-reporte-contenedor .campo-full label {
        font-size: 14px !important;
        padding: 8px 16px !important;
    }
    .form-reporte-contenedor .campo-full textarea {
        min-height: 120px !important;
        padding: 14px !important;
        font-size: 16px !important;
        box-sizing: border-box;
        width: 100% !important;
    }
    .form-reporte-contenedor .botones-reporte {
        flex-direction: column !important;
        gap: 12px !important;
        margin-top: 24px !important;
        width: 100% !important;
    }
    .form-reporte-contenedor .botones-reporte .btn-reportar-final,
    .form-reporte-contenedor .botones-reporte .btn-secundario {
        width: 100% !important;
        min-height: 48px !important;
        font-size: 16px !important;
        padding: 14px 20px !important;
    }
}

/* Asegura que la sección ocupe todo el ancho disponible y centre su contenido */
/* ÁREA BLANCA DONDE SE CENTRA EL FORMULARIO */
#sec-reportar-falla {
    display: none; /* Se activa con JS */
    justify-content: center;
    align-items: flex-start;
    background-color: #020617; /* Fondo oscuro igual al body */
}
/* EL NUEVO HEADER SUPERIOR */
.header-top {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: #111827; /* Azul oscuro de tus capturas */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    z-index: 2000;
    box-sizing: border-box;
    border-bottom: 2px solid #1e293b;
}

.header-logo {
    line-height: 1.1;
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Alinea subtítulo y organización con el final de BernCore Medical */
}

.header-logo h2 {
    color: #60a5fa;
    margin: 0 0 2px 0;
    letter-spacing: 1px;
    font-size: 24px;
    font-weight: 700;
    text-align: right;
}

.header-logo p {
    color: #60a5fa;
    margin: 0;
    font-size: 13px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    text-align: right;
}

.header-logo .nombre-clinica {
    color: #94a3b8;
    font-size: 12px;
    margin: 1px 0 0 0;
    font-weight: 500;
    text-transform: none;
    text-align: right;
}

.header-menu {
    display: flex;
    gap: 10px;
}

.header-top.header-solo-logo {
    justify-content: flex-end;
    padding-right: 30px;
    padding-left: 20px;
}

/* AJUSTE DEL CONTENIDO PARA QUE NO QUEDE DEBAJO DEL HEADER */
.main-content {
    margin-top: 100px; /* Importante: deja espacio para el header fijo */
    width: 100%;
    padding: 20px;
}

/* BOTONES DEL MENÚ EN VERSIÓN HORIZONTAL */
.btn-menu-tab {
    background-color: #1e293b;
    color: white;
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-menu-tab:hover {
    background-color: #334155;
}

.btn-menu-tab.active {
    background-color: #3b82f6; /* Azul brillante para la sección activa */
    border-color: #60a5fa;
}
/* Asegura que el modal esté por encima de TODO */
.modal-overlay {
    display: none !important; /* Oculto por defecto */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
    background-color: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
}

.modal-overlay.mostrar {
    display: flex !important;
}

.modal-content-form {
    /* Si tenías un margin-top de 40px o 60px, bájalo a 0 o 10px */
    margin: 10px auto !important; 
    
    position: relative;
    background-color: #1e293b;
    border-radius: 12px;
    padding: 25px;
    width: 90%;
    max-width: 600px;
}

/* Cambia los inputs del modal a oscuro */
.modal-content-form input, 
.modal-content-form select {
    background-color: #1e293b !important;
    color: white !important;
    border: 1px solid #334155 !important;
}

/* Dropdowns Ubicación y Estado: mismo fondo y texto que los inputs (Marca, Modelo, etc.) */
.modal-content-form select.select-form-equipo {
    background-color: #ffffffc4 !important;
    color: #334155 !important;
    border: 1px solid #334155 !important;
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
}
/* Input contraseña modal bitácora: mismo estilo que inputs del registro de equipos, texto negro */
#bitacora-pass-confirmar,
input.input-estilo-registro#bitacora-pass-confirmar {
    background-color: #ffffffc4 !important;
    color: #000 !important;
    border: 1px solid #334155 !important;
    width: 100%;
    padding: 10px;
    border-radius: 8px;
}
#bitacora-pass-confirmar::placeholder {
    color: #64748b;
}
body.tema-claro .modal-content-form select.select-form-equipo {
    background-color: #f8fafc !important;
    color: #1e293b !important;
    border-color: #cbd5e1 !important;
}
body.tema-claro #bitacora-pass-confirmar {
    background-color: #f8fafc !important;
    color: #000 !important;
    border-color: #cbd5e1 !important;
}

/* Registrar usuario: correo y contraseña igual que nombre (fondo claro, texto oscuro) */
#nuevo-usuario-correo,
#nuevo-usuario-pass,
#nuevo-usuario-pass-confirm,
#editar-usuario-correo,
#editar-usuario-pass {
    background-color: #ffffffc4 !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
}
/* Dropdown Rol en Registrar/Editar usuario: mismo color que los inputs del formulario */
#nuevo-usuario-rol,
#editar-usuario-rol {
    background-color: #ffffffc4 !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    padding: 10px 12px !important;
    box-sizing: border-box !important;
    appearance: auto;
}
#nuevo-usuario-rol option,
#editar-usuario-rol option {
    background-color: #ffffff;
    color: #334155;
}
#nuevo-usuario-correo::placeholder,
#nuevo-usuario-pass::placeholder,
#nuevo-usuario-pass-confirm::placeholder,
#editar-usuario-correo::placeholder,
#editar-usuario-pass::placeholder {
    color: #64748b;
}
input[type="text"], 
/* Estilo específico para el campo de fecha */
input[type="date"], 
#rep-ext-fecha {
    background-color: #ffffffc4 !important; /* El mismo azul de los otros campos */
    color: #334155 !important;
    border: 1px solid #334155 !important;
    padding: 10px;
    border-radius: 0 0 6px 6px; /* Para que encaje con el label azul de arriba */
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
}

/* Este truco vuelve blanco el icono del calendario */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(0); /* Mismo tono que el texto dd/mm/aaaa (oscuro) */
    cursor: pointer;
    opacity: 0.7;
}

input:focus, select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

/* Para que el calendario del input date se vea bien */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(0);
    opacity: 0.7;
}
.form-label-custom {
    display: block;
    background: linear-gradient(to right, #1e3a8a, #3b82f6);
    color: #1e293b;
    padding: 5px 15px;
    border-radius: 4px;
    text-align: center;
    margin-bottom: 5px;
    font-size: 14px;
}
/* Alineación de filtros a la izquierda y botón a la derecha */
.controles-inventario {
    display: flex;
    justify-content: space-between; /* Empuja el botón al extremo derecho */
    align-items: center;
    margin-bottom: 25px;
    gap: 15px;
}

.grupo-filtros {
    display: flex;
    gap: 15px;
    flex: 1; /* Permite que los filtros usen el espacio restante */
}

/* El botón azul con el estilo de Berny */
.btn-azul-nuevo {
    position: relative;
    background: linear-gradient(to right, #1e3a8a, #3b82f6); /* Azul degradado */
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
position: relative; /* Obligatorio para que el z-index funcione */
    z-index: 10;        /* Lo pone por encima de la tabla y fondos */
position: relative;
}

.btn-azul-nuevo:hover {
    filter: brightness(1.2);
    transform: translateY(-2px);
}

.btn-limpiar {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    background: #334155;
    color: #94a3b8;
    cursor: pointer;
}
/* DISEÑO PREMIUM PARA EL BOTÓN GUARDAR */
/* AJUSTE DE TAMAÑO SIMÉTRICO PARA BOTONES DEL MODAL */
#form-registro-equipo .botones-form button[type="submit"],

/* EFECTO HOVER MÁS SUTIL */
/* DISEÑO PREMIUM PARA EL BOTÓN GUARDAR */
/* AJUSTE DE TAMAÑO SIMÉTRICO PARA BOTONES DEL MODAL */
#form-registro-equipo .botones-form button[type="submit"],
.modal-content-form .botones-form .btn-guardar-registro {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%) !important;
    color: white !important;
    padding: 10px 25px !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3) !important;
    transition: 0.3s !important;
}
.btn-guardar-registro:hover {
    filter: brightness(1.2);
    transform: translateY(-1px);
}
/* Botones Guardar/Agendar en Ajustes y Agendar mantenimiento: mismo aspecto que botón guardar */
.form-ajustes .btn-guardar-registro,
#form-agendar-mtto .btn-guardar-registro {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%) !important;
    color: white !important;
    padding: 10px 25px !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3) !important;
    transition: 0.3s !important;
    display: inline-block;
}
.form-ajustes .btn-guardar-registro:hover,
#form-agendar-mtto .btn-guardar-registro:hover {
    filter: brightness(1.2);
    transform: translateY(-1px);
}
.btn-cancelar-registro {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
    padding: 10px 25px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
}
/* EFECTO HOVER MÁS SUTIL */
.botones-form {
    position: sticky;
    bottom: 0;
    background-color: #1e293b; /* El mismo azul oscuro del modal */
    padding: 20px 25px;
    border-top: 1px solid #334155; /* Línea divisoria elegante */
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    z-index: 100; /* Para que siempre esté por encima de los campos */
}

.btn-cancelar-registro:hover {
    background-color: #e2e8f0 !important;
}

/* IGUALAMOS EL BOTÓN CANCELAR PARA QUE SEAN HERMANOS */
#form-registro-equipo .botones-form button[type="button"],
.btn-cancelar-registro {
    background-color: #f1f5f9 !important; /* Un gris muy claro para que resalte el azul */
    color: #475569 !important;
    padding: 10px 25px !important;
    min-width: 120px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    transition: 0.3s !important;
    cursor: pointer !important;
}

.btn-cancelar-registro:hover {
    background-color: #e2e8f0 !important;
}
.tabla-contenedor tbody tr:hover td {
    background-color: rgba(59, 130, 246, 0.05); /* Un azul muy sutil (Bitácora y resto) */
    color: #ffffff;
    transition: background-color 0.2s ease;
}
/* Inventario y Reportes Activos: hover = fondo de la tabla (tema oscuro) */
#sec-inventario .tabla-contenedor tbody tr:hover td,
#sec-reportes .tabla-contenedor tbody tr:hover td {
    background-color: #1e293b;
    color: #e2e8f0;
    transition: background-color 0.2s ease;
}
.tabla-contenedor img {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #334155;
}
.tabla-contenedor td:last-child {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
    align-items: center;
}
/* Quitar línea/contorno al hacer foco o clic en celdas (Inventario y Reportes Activos, ambos temas) */
#sec-inventario .tabla-contenedor td:focus,
#sec-inventario .tabla-contenedor td:focus-within,
#sec-inventario .tabla-contenedor td:focus-visible,
#sec-inventario .tabla-contenedor td:active,
#sec-inventario .tabla-contenedor td *:focus,
#sec-inventario .tabla-contenedor td *:focus-visible,
#sec-inventario .tabla-contenedor td *:active,
#sec-reportes .tabla-contenedor td:focus,
#sec-reportes .tabla-contenedor td:focus-within,
#sec-reportes .tabla-contenedor td:focus-visible,
#sec-reportes .tabla-contenedor td:active,
#sec-reportes .tabla-contenedor td *:focus,
#sec-reportes .tabla-contenedor td *:focus-visible,
#sec-reportes .tabla-contenedor td *:active {
    outline: none !important;
    outline: 0 !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
}
#sec-inventario .tabla-contenedor input,
#sec-inventario .tabla-contenedor button,
#sec-inventario .tabla-contenedor select,
#sec-reportes .tabla-contenedor input,
#sec-reportes .tabla-contenedor button,
#sec-reportes .tabla-contenedor select {
    outline: none !important;
    outline: 0 !important;
    -webkit-tap-highlight-color: transparent !important;
}
/* Color para las letras dentro de los encabezados azules */
.label-encabezado {
    color: #ffffff !important; /* Blanco puro */
    font-weight: 700 !important; /* Negrita */
    font-size: 13px !important;
    text-transform: uppercase; /* Mayúsculas para que se vea más profesional */
    display: block;
    text-align: center; /* Centra el texto en la barra azul */
}
/* Este es el contenedor oscuro que envuelve tu formulario */
/* Busca la clase que contiene el formulario blanco/oscuro */
.modal-content {
    max-height: 85vh;          /* Limita la altura al 85% de la ventana */
    overflow-y: auto;          /* Activa el scroll vertical si es necesario */
    display: block;            /* Asegura que el contenido fluya hacia abajo */
    padding-top: 20px;         /* Espacio arriba para que el título respire */
    position: relative;
}

/* Estilizar la barra de scroll para que combine con BernCore Medical */
.modal-content::-webkit-scrollbar {
    width: 8px;
}
.modal-content::-webkit-scrollbar-thumb {
    background: #3b82f6;       /* Color azul como tus botones */
    border-radius: 10px;
}
/* Busca el estilo de tu modal y agrega estas líneas */
#modal-registro .modal-content {
    max-height: 90vh; /* No permite que el formulario ocupe más del 90% de la altura de la pantalla */
    overflow-y: auto; /* Agrega scroll si el contenido es muy largo */
    padding-bottom: 20px;
    border-radius: 12px;
}
/* Ajustamos el espacio entre grupos de entrada */
.grupo-input {
    margin-bottom: 12px !important; /* Espacio más pequeño entre cada campo */
}

/* Hacemos que los títulos de los campos no ocupen tanto espacio */
#modal-registro label {
    margin-bottom: 4px !important;
    font-size: 13px !important;
}
#modal-registro {
    display: none !important;
    position: fixed;
    /* ... tus otros estilos ... */
}
body.modal-open {
    overflow: hidden !important; /* Quita el scroll del fondo */
    height: 100vh;
}
/* Esto asegura que el modal sea el que mande en el scroll */
.modal {
    overflow-y: auto !important;
}
.modal-body-scroll::-webkit-scrollbar {
    width: 6px;
}
.modal-body-scroll::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 10px;
}

/* Ajustes */
.ajustes-fila {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    align-items: stretch;
    margin-bottom: 35px;
}
.ajustes-fila .ajustes-col {
    flex: 1 1 0;
    min-width: 260px;
    max-width: 100%;
    margin-bottom: 0;
    padding: 24px 0;
    border-bottom: 1px solid #334155;
    display: flex;
    flex-direction: column;
}
.ajustes-fila .ajustes-col:last-child {
    border-bottom: 1px solid #334155;
}
.ajustes-bloque {
    margin-bottom: 35px;
    padding: 20px 0;
    border-bottom: 1px solid #334155;
}
.ajustes-bloque:last-child {
    border-bottom: none;
}
.ajustes-subtitulo {
    color: #94a3b8;
    font-size: 1.1rem;
    margin-bottom: 10px;
    margin-top: 0;
}
.ajustes-aviso {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 16px;
    margin-top: 0;
    min-height: 1.35em;
}
/* Formularios de la fila Mis datos / Cambiar contraseña / Apariencia: mismo ancho y alineación */
.ajustes-fila .form-ajustes-col {
    max-width: 400px;
    width: 100%;
}
.ajustes-fila .form-ajustes-col .grupo-input {
    max-width: none;
}
.form-ajustes .grupo-input {
    max-width: 400px;
    margin-bottom: 18px;
}
.form-ajustes .grupo-input label {
    color: #94a3b8;
}
.form-ajustes input {
    background-color: #0f172a;
    border: 1px solid #334155;
    color: #f8fafc;
    border-radius: 8px;
    padding: 10px 12px;
}
.form-ajustes input:focus {
    border-color: #3b82f6;
    outline: none;
}
/* Input Nombre en Mis datos (modo oscuro): mismo estilo que dropdown Rol en Administrar usuarios */
#ajustes-nombre,
.form-ajustes #ajustes-nombre {
    background-color: #ffffffc4 !important;
    color: #1f2937 !important;
    border: 1px solid #1e293b !important;
}

/* Estadísticas: filtros y gráfica */
.estadisticas-filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
    margin-bottom: 24px;
}
.estadisticas-filtros .estadisticas-dropdown {
    min-width: 220px;
    max-width: 320px;
    margin-bottom: 0;
}
.estadisticas-filtros select {
    background-color: #ffffff !important;
    color: #111827 !important;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 12px;
    width: 100%;
    font-size: 14px;
}
.estadisticas-resumen {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 24px;
    color: #e2e8f0;
    font-size: 0.95rem;
}
.estadisticas-grafica-contenedor {
    position: relative;
    height: 320px;
    max-width: 700px;
    margin-bottom: 20px;
    padding: 16px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 12px;
}
body.tema-claro .estadisticas-resumen,
body.tema-claro .estadisticas-grafica-contenedor {
    background: #f8fafc;
    border-color: #e2e8f0;
}
body.tema-claro .estadisticas-resumen {
    color: #334155;
}

/* Modo oscuro: inputs y dropdowns de Ajustes mismo estilo que dropdown Rol en Administrar usuarios (#ffffffc4, #1f2937). Administrar usuarios se mantiene igual. */
body:not(.tema-claro) #ajustes-tema,
body:not(.tema-claro) #ajustes-tema option {
    background-color: #ffffffc4 !important;
    color: #1f2937 !important;
    border: 1px solid #1e293b !important;
}
body:not(.tema-claro) .form-ajustes input {
    background-color: #ffffffc4 !important;
    color: #1f2937 !important;
    border: 1px solid #1e293b !important;
}
body:not(.tema-claro) #ajustes-area-select,
body:not(.tema-claro) #ajustes-area-select option,
body:not(.tema-claro) #ajustes-servicio-select,
body:not(.tema-claro) #ajustes-servicio-select option {
    background-color: #ffffffc4 !important;
    color: #1f2937 !important;
    border: 1px solid #1e293b !important;
}

#ajustes-tema {
    border: 1px solid #334155 !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    min-height: 38px !important;
    font-size: 14px !important;
}
#ajustes-tema:focus {
    border-color: #3b82f6 !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25) !important;
}
body.tema-claro #ajustes-tema,
body.tema-claro #ajustes-tema option {
    background-color: #ffffff !important;
    color: #111827 !important;
}
body.tema-claro #ajustes-tema {
    border: 1px solid #CBD5E1 !important;
}
body.tema-claro #ajustes-tema:focus {
    border-color: #2563EB !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15) !important;
}

/* Tema claro: dropdowns de áreas y servicios legibles */
body.tema-claro #ajustes-area-select,
body.tema-claro #ajustes-area-select option,
body.tema-claro #ajustes-servicio-select,
body.tema-claro #ajustes-servicio-select option {
    background-color: #ffffff !important;
    color: #111827 !important;
}

/* Dropdowns en Agendar mantenimiento: texto negro y fondo claro para leer bien */
#form-agendar-mtto select,
#form-agendar-mtto select option {
    background-color: #ffffff !important;
    color: #111827 !important;
}
#form-agendar-mtto input {
    background-color: #ffffff !important;
    color: #111827 !important;
    border: 1px solid #d1d5db !important;
}

/* Mantenimientos */
.mantenimientos-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.calendario-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    max-width: 400px;
    margin-bottom: 20px;
}
.cal-dia-header {
    text-align: center;
    font-size: 11px;
    color: #94a3b8;
    font-weight: bold;
    padding: 6px 0;
}
.cal-dia {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
    border-radius: 6px;
    font-size: 14px;
    color: #e2e8f0;
    cursor: pointer;
    border: 1px solid #334155;
}
.cal-dia.vacio {
    background: transparent;
    border: none;
    cursor: default;
}
.cal-dia.tiene-mtto {
    background: #1e3a8a;
    color: #93c5fd;
    border-color: #3b82f6;
}
.cal-dia:hover:not(.vacio) {
    filter: brightness(1.2);
}
.lista-mtto-dia {
    padding: 10px 0;
}

.buscador-bitacora {
    margin-bottom: 14px;
}
.buscador-bitacora input {
    max-width: 320px;
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #334155;
    background: #0f172a;
    color: #f8fafc;
    box-sizing: border-box;
}
.buscador-bitacora input::placeholder {
    color: #64748b;
}

/* Dropdown Ubicación en Bitácora: aspecto claro, texto negro */
.bitacora-dropdown-ubicacion {
    min-width: 200px;
    margin-left: 12px;
    padding: 10px 36px 10px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #0f172a !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.bitacora-dropdown-ubicacion:hover {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}
.bitacora-dropdown-ubicacion:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}
.bitacora-dropdown-ubicacion option {
    color: #0f172a;
    background: #ffffff;
}

.bitacora-filtro-fechas {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
.bitacora-filtro-fechas label { color: #94a3b8; font-size: 13px; }
.bitacora-filtro-fechas input[type="date"] {
    max-width: 145px;
    width: 100%;
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid #334155;
    background: #0f172a;
    color: #f8fafc;
    box-sizing: border-box;
}

.dashboard-admin { max-width: 800px; margin: 0 auto; }
.dashboard-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; align-items: stretch; }
.dashboard-card {
    background: #1e293b;
    border-radius: 12px;
    padding: 24px;
    min-width: 180px;
    text-align: center;
    border: 1px solid #334155;
}
#dash-card-mtto {
    min-width: auto;
    flex-shrink: 0;
}
#dash-card-mtto .dashboard-numero {
    font-size: 1.5rem;
    white-space: nowrap;
}
#dash-card-mtto .dashboard-numero span {
    display: inline;
    margin-left: 8px;
    font-size: 0.85rem;
    color: #60a5fa;
    vertical-align: middle;
}
    border: 1px solid #334155;
}
.dashboard-card-clickable { cursor: pointer; transition: background-color 0.2s, border-color 0.2s; }
.dashboard-card-clickable:hover { background-color: #334155; border-color: #475569; }
.dashboard-numero { display: block; font-size: 2rem; font-weight: 700; color: #60a5fa; margin-bottom: 8px; }
.dashboard-label { font-size: 0.9rem; color: #94a3b8; }
.dash-proximo-mtto-lista {
    margin-top: 20px;
    padding: 16px;
    background: #0f172a;
    border-radius: 12px;
    border: 1px solid #334155;
    text-align: left;
}
.dash-proximo-mtto-item {
    padding: 12px;
    margin-bottom: 10px;
    background: #1e293b;
    border-radius: 8px;
    border: 1px solid #334155;
    font-size: 14px;
    color: #e2e8f0;
}
.dash-proximo-mtto-item:last-child { margin-bottom: 0; }

.popup-mtto-item {
    padding: 12px;
    margin-bottom: 10px;
    background: #0f172a;
    border-radius: 8px;
    border: 1px solid #334155;
}
.popup-mtto-item:last-child { margin-bottom: 0; }

/* ========== RESPONSIVE MOBILE-FIRST (mismo código web y móvil) ========== */
/* Base: móvil. Mejoras progresivas para tablet y desktop */
.tailwind-touch {
    min-height: 44px;
    min-width: 44px;
    padding: 12px 18px;
}
@media (max-width: 767px) {
    .main-content { padding: 12px; margin-top: 64px; }
    .modulo { padding: 16px; }
    .header-top { padding: 12px 16px; }
    .dashboard-card { min-width: 100%; }
    .dashboard-cards { gap: 12px; }
    .bitacora-filtro-fechas { flex-direction: column; align-items: stretch; }
    .bitacora-filtro-fechas input[type="date"] { min-height: 44px; }
    .btn-nav, .btn-toggle { min-height: 44px; padding: 12px 16px; }
    .grupo-input input, .grupo-input select, .grupo-input textarea {
        min-height: 44px;
        padding: 12px;
        font-size: 16px; /* Evita zoom en iOS al enfocar */
    }
    .tabla-contenedor th, .tabla-contenedor td { padding: 10px 8px; font-size: 13px; }
    .btn-editar, .btn-eliminar, .btn-pdf, .select-tabla { min-height: 44px; }
    #txt-bienvenida-gigante { font-size: 2rem !important; }
}
@media (min-width: 768px) {
    .main-content { padding: 20px; }
    .dashboard-card { min-width: 180px; }
}

/* ========== MODO CLARO (tema claro) — Estilo SaaS profesional ========== */

/* 1. Fondo del sistema */
body.tema-claro {
    background-color: #DCE6F2 !important;
    color: #1E293B;
    font-size: 14px;
}
body.tema-claro .main-content {
    background-color: #DCE6F2 !important;
    padding: 32px 20px;
}

/* 2. Tarjetas (contenedores principales) */
body.tema-claro .modulo {
    background: #FFFFFF !important;
    border: none !important;
    border-radius: 14px !important;
    padding: 24px !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08) !important;
    margin-bottom: 32px;
}
body.tema-claro .form-reporte-contenedor {
    background: #FFFFFF !important;
    border: none !important;
    border-radius: 14px !important;
    padding: 24px !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08) !important;
}

/* 3. Tipografía */
body.tema-claro .modulo h1,
body.tema-claro .header-flex h1 {
    font-size: 28px !important;
    font-weight: 600 !important;
    color: #1E293B !important;
}
body.tema-claro .ajustes-subtitulo,
body.tema-claro .form-ajustes .grupo-input label,
body.tema-claro .modal-content-form .grupo-input label {
    font-size: 16px !important;
    color: #64748B !important;
}
body.tema-claro .ajustes-aviso,
body.tema-claro .dashboard-label {
    font-size: 14px;
    color: #64748B !important;
}

/* 4. Inputs y formularios */
body.tema-claro .modal-content-form input,
body.tema-claro .modal-content-form select,
body.tema-claro .form-ajustes input,
body.tema-claro .form-ajustes select,
body.tema-claro .form-reporte-contenedor .campo input,
body.tema-claro .form-reporte-contenedor .campo select {
    background: #F8FAFC !important;
    border: 1px solid #CBD5E1 !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    color: #1E293B !important;
    font-size: 14px !important;
    min-height: 38px !important;
}
body.tema-claro .buscador-bitacora input,
body.tema-claro .bitacora-filtro-fechas input[type="date"],
body.tema-claro input[type="text"],
body.tema-claro input[type="date"],
body.tema-claro input[type="datetime-local"],
body.tema-claro input[type="email"],
body.tema-claro input[type="password"] {
    background: #F8FAFC !important;
    border: 1px solid #CBD5E1 !important;
    border-radius: 8px !important;
    min-height: 38px !important;
    padding: 8px 12px !important;
    color: #1E293B !important;
    font-size: 14px !important;
}
body.tema-claro .modal-content-form textarea {
    background: #F8FAFC !important;
    border: 1px solid #CBD5E1 !important;
    border-radius: 8px !important;
    min-height: 80px !important;
    padding: 8px 12px !important;
    color: #1E293B !important;
    font-size: 14px !important;
}
body.tema-claro .modal-content-form input:not([type="checkbox"]):not([type="radio"]),
body.tema-claro .modal-content-form select,
body.tema-claro .form-ajustes input:not([type="checkbox"]),
body.tema-claro .form-ajustes select,
body.tema-claro .form-reporte-contenedor .campo input,
body.tema-claro .form-reporte-contenedor .campo select,
body.tema-claro .buscador-bitacora input,
body.tema-claro .bitacora-filtro-fechas input[type="date"],
body.tema-claro input[type="text"],
body.tema-claro input[type="date"],
body.tema-claro input[type="datetime-local"],
body.tema-claro input[type="email"] {
    height: 38px !important;
}
body.tema-claro .modal-content-form input:focus,
body.tema-claro .modal-content-form select:focus,
body.tema-claro .form-ajustes input:focus,
body.tema-claro .form-ajustes select:focus,
body.tema-claro .form-reporte-contenedor .campo input:focus,
body.tema-claro .form-reporte-contenedor .campo select:focus,
body.tema-claro .form-reporte-contenedor .campo-full textarea:focus,
body.tema-claro .buscador-bitacora input:focus {
    border-color: #2563EB !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15) !important;
}
body.tema-claro .grupo-input {
    margin-bottom: 16px;
}
body.tema-claro #ajustes-nombre {
    background: #F8FAFC !important;
    color: #1E293B !important;
    border: 1px solid #CBD5E1 !important;
}

/* 5. Botones principales (compactos) */
body.tema-claro .btn-azul-nuevo,
body.tema-claro .modal-content-form .botones-form .btn-guardar-registro,
body.tema-claro .form-ajustes .btn-guardar-registro,
body.tema-claro #form-agendar-mtto .btn-guardar-registro,
body.tema-claro #form-registro-equipo .botones-form button[type="submit"] {
    height: 40px !important;
    min-height: 40px !important;
    padding: 8px 18px !important;
    font-size: 14px !important;
    border-radius: 10px !important;
    background: #2563EB !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25) !important;
}
body.tema-claro .btn-azul-nuevo:hover,
body.tema-claro .btn-guardar-registro:hover,
body.tema-claro .modal-content-form .botones-form .btn-guardar-registro:hover {
    background: #1D4ED8 !important;
    transform: none !important;
    filter: none !important;
}

/* 6. Botones secundarios */
body.tema-claro .btn-editar {
    background: #F59E0B !important;
    color: white !important;
    padding: 8px 14px !important;
    height: 40px !important;
    min-height: 40px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
}
body.tema-claro .btn-editar:hover {
    background: #D97706 !important;
}
body.tema-claro .btn-eliminar {
    background: #EF4444 !important;
    color: white !important;
    padding: 8px 14px !important;
    height: 40px !important;
    min-height: 40px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
}
body.tema-claro .btn-eliminar:hover {
    background: #DC2626 !important;
}
body.tema-claro .btn-finalizar-reporte {
    background: #10b981 !important;
    color: white !important;
    padding: 8px 14px !important;
    height: 40px !important;
    min-height: 40px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    border: 1px solid #059669 !important;
}
body.tema-claro .btn-finalizar-reporte:hover {
    background: #059669 !important;
}
body.tema-claro .btn-cancelar-registro {
    height: 40px !important;
    padding: 8px 18px !important;
    font-size: 14px !important;
    border-radius: 10px !important;
    background: #F1F5F9 !important;
    color: #475569 !important;
    border: 1px solid #E2E8F0 !important;
}
body.tema-claro .botones-form {
    background-color: #FFFFFF !important;
    border-top: 1px solid #E2E8F0 !important;
    padding: 16px 24px !important;
}
body.tema-claro .btn-limpiar {
    height: 40px !important;
    padding: 8px 18px !important;
    font-size: 14px !important;
    border-radius: 10px !important;
    background: #64748B !important;
    color: white !important;
}

/* 7. Espaciado: separación entre secciones ya aplicada en .modulo (margin-bottom 32px) */

/* 8. Tablas */
body.tema-claro .tabla-scroll-wrapper {
    border-radius: 10px !important;
    border: 1px solid #E2E8F0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}
body.tema-claro .tabla-contenedor {
    background: #FFFFFF;
    border-radius: 10px;
}
body.tema-claro .tabla-contenedor th {
    background-color: #F8FAFC !important;
    color: #64748B !important;
    border-bottom: 1px solid #E2E8F0 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 12px 14px !important;
}
body.tema-claro #sec-inventario .tabla-contenedor th,
body.tema-claro #sec-reportes .tabla-contenedor th,
body.tema-claro #sec-bitacora .tabla-contenedor th {
    text-align: center !important;
}
body.tema-claro .tabla-contenedor td {
    color: #1E293B !important;
    border-bottom: 1px solid #F1F5F9 !important;
    background-color: #FFFFFF !important;
    padding: 12px 14px !important;
    font-size: 14px !important;
}
body.tema-claro .tabla-contenedor tbody tr:hover td {
    background-color: #F1F5F9 !important;
    color: #1E293B !important;
    transition: background-color 0.2s ease;
}
/* Inventario y Reportes Activos tema claro: hover = blanco de la tabla */
body.tema-claro #sec-inventario .tabla-contenedor tbody tr:hover,
body.tema-claro #sec-reportes .tabla-contenedor tbody tr:hover {
    background-color: #FFFFFF !important;
    transition: background-color 0.2s ease;
}
body.tema-claro #sec-inventario .tabla-contenedor tbody tr:hover td,
body.tema-claro #sec-reportes .tabla-contenedor tbody tr:hover td {
    background-color: #FFFFFF !important;
    color: #1E293B !important;
    transition: background-color 0.2s ease;
}
/* Mismo comportamiento que Bitácora: sin reglas extra de borde en Inventario/Reportes (evita la línea al seleccionar) */
body.tema-claro #sec-inventario .tabla-contenedor td:focus,
body.tema-claro #sec-inventario .tabla-contenedor td:focus-within,
body.tema-claro #sec-inventario .tabla-contenedor td:focus-visible,
body.tema-claro #sec-inventario .tabla-contenedor td:active,
body.tema-claro #sec-inventario .tabla-contenedor td *:focus,
body.tema-claro #sec-inventario .tabla-contenedor td *:focus-visible,
body.tema-claro #sec-inventario .tabla-contenedor td *:active,
body.tema-claro #sec-reportes .tabla-contenedor td:focus,
body.tema-claro #sec-reportes .tabla-contenedor td:focus-within,
body.tema-claro #sec-reportes .tabla-contenedor td:focus-visible,
body.tema-claro #sec-reportes .tabla-contenedor td:active,
body.tema-claro #sec-reportes .tabla-contenedor td *:focus,
body.tema-claro #sec-reportes .tabla-contenedor td *:focus-visible,
body.tema-claro #sec-reportes .tabla-contenedor td *:active {
    outline: none !important;
    outline: 0 !important;
    outline-width: 0 !important;
    outline-color: transparent !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
}
/* Chrome: quitar anillo de foco en inputs/buttons/select dentro de la tabla */
body.tema-claro #sec-inventario .tabla-contenedor input,
body.tema-claro #sec-inventario .tabla-contenedor button,
body.tema-claro #sec-inventario .tabla-contenedor select,
body.tema-claro #sec-reportes .tabla-contenedor input,
body.tema-claro #sec-reportes .tabla-contenedor button,
body.tema-claro #sec-reportes .tabla-contenedor select {
    outline: none !important;
    outline: 0 !important;
    -webkit-tap-highlight-color: transparent !important;
}
body.tema-claro #sec-inventario .tabla-contenedor tr,
body.tema-claro #sec-reportes .tabla-contenedor tr {
    outline: none !important;
}
/* Quitar borde/contorno negro al seleccionar texto en celdas (fondo claro) */
body.tema-claro #sec-inventario .tabla-contenedor td::selection,
body.tema-claro #sec-reportes .tabla-contenedor td::selection {
    background: rgba(59, 130, 246, 0.2);
}
body.tema-claro #sec-inventario .tabla-contenedor td *::selection,
body.tema-claro #sec-reportes .tabla-contenedor td *::selection {
    background: rgba(59, 130, 246, 0.2);
}

/* 9. Sidebar claro moderno */
body.tema-claro .sidebar {
    background-color: #F1F5F9 !important;
    border-right: 1px solid #E2E8F0 !important;
}
body.tema-claro .sidebar .menu-nav .btn-nav {
    background: transparent !important;
    color: #475569 !important;
}
body.tema-claro .sidebar .menu-nav .btn-nav:hover {
    background: #E2E8F0 !important;
    color: #1E293B !important;
}
body.tema-claro .sidebar .menu-nav .btn-nav.active {
    background: #2563EB !important;
    color: white !important;
}
body.tema-claro .sidebar .logo,
body.tema-claro .sidebar .logo-area span {
    color: #2563EB !important;
}
body.tema-claro .sidebar .logo-area .nombre-clinica {
    color: #64748B !important;
}
body.tema-claro .sidebar .menu-nav .btn-nav.btn-salir {
    color: #EF4444 !important;
}
body.tema-claro .sidebar .menu-nav .btn-nav.btn-salir:hover {
    background: #FEE2E2 !important;
    color: #DC2626 !important;
}

/* Header en tema claro */
body.tema-claro .header-top {
    background-color: #FFFFFF !important;
    border-bottom: 1px solid #E2E8F0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}
body.tema-claro .header-logo h2,
body.tema-claro .header-logo p {
    color: #2563EB !important;
}
body.tema-claro .header-logo .nombre-clinica {
    color: #64748B !important;
}

/* Dashboard / Inicio */
body.tema-claro .dashboard-card {
    background-color: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 14px !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08) !important;
}
body.tema-claro .dashboard-numero {
    color: #2563EB !important;
}
body.tema-claro .dashboard-label {
    color: #64748B !important;
}
body.tema-claro .dashboard-card-clickable:hover {
    background-color: #F1F5F9 !important;
    border-color: #CBD5E1 !important;
}
body.tema-claro .dash-proximo-mtto-lista {
    background: #F8FAFC !important;
    border-color: #E2E8F0 !important;
}
body.tema-claro .dash-proximo-mtto-item {
    background: #FFFFFF !important;
    border-color: #E2E8F0 !important;
    color: #1E293B !important;
}

/* Calendario mantenimientos */
body.tema-claro .cal-dia {
    background: #F1F5F9 !important;
    color: #334155 !important;
    border-color: #E2E8F0 !important;
}
body.tema-claro .cal-dia.tiene-mtto {
    background: #2563EB !important;
    color: #fff !important;
    border-color: #2563EB !important;
}
body.tema-claro .cal-dia-header {
    color: #64748B !important;
}

/* Ajustes bloques */
body.tema-claro .ajustes-bloque,
body.tema-claro .ajustes-fila .ajustes-col {
    border-bottom-color: #E2E8F0 !important;
}

/* Modal */
body.tema-claro .modal-content-form {
    background-color: #FFFFFF !important;
    border: none !important;
    border-radius: 14px !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08) !important;
}

/* Dropdown bitácora y selects en tema claro */
body.tema-claro .bitacora-dropdown-ubicacion {
    background: #F8FAFC !important;
    color: #1E293B !important;
    border: 1px solid #E2E8F0 !important;
}
body.tema-claro .select-form-equipo,
body.tema-claro .modal-content-form select.select-form-equipo {
    background: #F8FAFC !important;
    color: #1E293B !important;
    border: 1px solid #CBD5E1 !important;
}

/* Popup mantenimientos del día */
body.tema-claro .popup-mtto-item {
    background: #F8FAFC !important;
    border: 1px solid #CBD5E1 !important;
}

/* Botón toggle menú en tema claro: borde visible y texto azul como BernCore Medical */
body.tema-claro .btn-toggle {
    background: #F1F5F9 !important;
    color: #2563EB !important;
    border: 1px solid #CBD5E1 !important;
}

/* Mantenimiento: mes y año del calendario en negro en tema claro */
body.tema-claro #titulo-mes-calendario {
    color: #1E293B !important;
}

/* Mantenimiento: botones Calendario y Agendar mantenimiento — azul claro del fondo, texto negro */
body.tema-claro .btn-menu-tab {
    background: #DCE6F2 !important;
    color: #1E293B !important;
    border: 1px solid #94A3B8 !important;
}
body.tema-claro .btn-menu-tab:hover {
    background: #CBD5E1 !important;
    color: #1E293B !important;
}
body.tema-claro .btn-menu-tab.active {
    background: #DCE6F2 !important;
    color: #1E293B !important;
    border: 1px solid #2563EB !important;
    border-left: 4px solid #2563EB !important;
}

body.tema-claro #txt-bienvenida-gigante {
    color: #2563EB !important;
}
body.tema-claro .main-content p[style*="color: #94a3b8"] {
    color: #64748B !important;
}
body.tema-claro .estadisticas-resumen,
body.tema-claro .estadisticas-grafica-contenedor {
    color: #1E293B;
}
/* Borde visible del cuadro donde va la gráfica en Estadísticas */
body.tema-claro .estadisticas-grafica-contenedor {
    border: 1px solid #CBD5E1 !important;
    background: #FFFFFF !important;
}
body.tema-claro #ajustes-tema:focus {
    border-color: #2563EB;
}

/* Lightbox para ampliar foto del inventario */
.lightbox-foto-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.lightbox-foto-overlay.lightbox-foto-visible {
    opacity: 1;
    visibility: visible;
}
.lightbox-foto-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
.lightbox-foto-cerrar {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border: none;
    background: #334155;
    color: #f8fafc;
    font-size: 28px;
    line-height: 1;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s;
}
.lightbox-foto-cerrar:hover {
    background: #475569;
}
.lightbox-foto-cerrar:focus {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}