
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&display=swap');
body {
    font-family: 'Rajdhani', sans-serif;
    -webkit-font-smoothing: antialiased;
    font-size: 1.1rem;
}
body.catalog-loaded {
    overflow: auto;
}

#loader {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
    background-size: cover;
    background-position: center;
}
#loader.hidden {
    opacity: 0;
    pointer-events: none;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}
.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.logo {
    width: 2.5rem;
    height: 2.5rem;
    background: #00FFC6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite ease-in-out;
    box-shadow: 0 0 8px rgba(0, 255, 198, 0.5);
}
.app-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: clamp(1rem, 3vw, 1.4rem);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: linear-gradient(to right, #52C5DC, #3F7ABD);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 4px rgba(0, 255, 198, 0.2);
    white-space: nowrap;
}
@media (max-width: 640px) {
    .app-title {
        font-size: 1.1rem !important;
    }
}
@media (max-width: 480px) {
    .app-title {
        font-size: 0.9rem;
    }
}
.app-title1 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem) !important;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: linear-gradient(to right, #52C5DC, #3F7ABD);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 4px rgba(0, 255, 198, 0.2);
    white-space: nowrap;
}
.app-title2 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: linear-gradient(to right, #52C5DC, #3F7ABD);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 4px rgba(0, 255, 198, 0.2);
    white-space: nowrap;
}
@media (max-width: 640px) {
    .app-title1 {
        font-size: 0.7rem !important;
    }
}
@media (max-width: 480px) {
    .app-title1 {
        font-size: 0.9rem;
    }
}
@media (max-width: 1000px) and (orientation: landscape) {
body:not(.catalog-loaded) {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: auto;
}
body:not(.catalog-loaded)::before {
        content: "Por favor gira tu dispositivo a modo vertical para seleccionar un catálogo";
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(30, 30, 45, 0.95);
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 2rem;
        font-size: 1.2rem;
        color: white;
        z-index: 1000;
    }
    
    body.catalog-loaded header .container > div {
        flex-direction: row !important;
        gap: 1rem !important;
    }
    
    body.catalog-loaded .relative.w-full.max-w-md {
        width: auto !important;
        max-width: 300px !important;
        flex-shrink: 0;
    }
    
    body.catalog-loaded .logo-container {
        flex-shrink: 0;
    }
}
/* Base card style */
.card {
    background: linear-gradient(180deg, #1e1e24 0%, #09090b 100%) !important;
    border: 1px solid #7900b0 !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    box-shadow: 2px 2px 6px #9700ff87, -2px -2px 6px #9700ff87;
    display: flex;
    flex-direction: column;
    height: auto;
    padding-top: 0.5rem;
    cursor: pointer;
    /* ... todo lo que ya tenías ... */
    
    /* 1. RENDIMIENTO EXTREMO: */
    /* Esto le dice al navegador que lo que pasa dentro de la tarjeta
       NO afecta al resto de la web. Evita recálculos masivos. */
    contain: layout paint style;
    
    /* 2. PREPARAR EL MOTOR GRÁFICO: */
    /* Avisamos al navegador de qué propiedades van a cambiar
       para que las tenga cargadas en la memoria de la GPU. */
    will-change: transform, box-shadow, border-color;
    
    /* Asegúrate de mantener esto que ya tenías */
    transform: translateZ(0); /* Fuerza la aceleración de hardware */
}

@media (max-width: 768px) {
    .card {
        will-change: transform;
    }
}
@media (max-width: 768px) {
    .card.marked::after {
        content: none !important; /* elimina el pseudo-elemento */
    }
}
@media (max-width: 768px) {
    /* Tarjeta marcada: fondo más brillante y contrastado */
    .card.marked {
        background: linear-gradient(145deg, rgb(51, 51, 92) 0%, rgb(0, 0, 0) 100%) !important;
        border: 0.8px solid rgba(255, 255, 255, 0.7) !important;
        position: relative; /* para el indicador lateral */
        transition: background 0.3s ease; /* suaviza el cambio de fondo */
    }

    /* Barra lateral izquierda como indicador más visible */
    .card.marked::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        
        border-radius: 4px 0 0 4px;
        pointer-events: none;
    }
}

h2.text-catalogo-w1 {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 1rem !important;
    box-sizing: border-box !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    white-space: normal !important;
}
.card.expanded {
    height: auto;
    transform: translateY(-4px);
    z-index: 10;
}
.qr-slot {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.card.expanded .qr-slot {
    max-height: 100px;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 0, 255, 0) 0%, rgba(255, 0, 255, 0.5) 50%, rgba(255, 0, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 0, 255, 0.5);
    box-shadow: 0 10px 20px rgba(255, 0, 255, 0.1);
}
.card:hover::before {
    opacity: 1;
}
/* Toggle switch styles */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}
header .toggle-switch {
    margin-left: 0.5rem;
}
#hiddenButtonsContainer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}
#hiddenButtonsContainer.hidden {
    opacity: 0;
    pointer-events: none;
}
#toggleButtonsBtn {
    margin-left: 0.5rem;
    display: none; /* Oculto por defecto */
}
@media (max-width: 768px) {
    #hiddenButtonsContainer {
        position: absolute;
        right: 0;
        top: 100%;
        margin-top: 0.5rem;
        background: rgba(30, 30, 45, 0.95);
        backdrop-filter: blur(10px);
        border-radius: 0.5rem;
        padding: 0.5rem;
        border: 1px solid #3f7abd;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        display: none;
    }
    
    #hiddenButtonsContainer:not(.hidden) {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }
#toggleButtonsBtn {
        display: flex; /* Visible solo en móvil */
    }
}
.toggle-switch .toggle-checkbox {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #2a2a3a;
    border: 1px solid rgba(255, 0, 255, 0.3);
    transition: .4s;
    border-radius: 20px;
}
.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 1px;
    bottom: 1px;
background-color: #ff00ff;
    transition: .4s;
    border-radius: 50%;
}
.toggle-checkbox:checked + .toggle-slider {
    background-color: rgb(0 0 0 / 38%);
    border-color: rgb(63 122 189);
}
.toggle-checkbox:checked + .toggle-slider:before {
    transform: translateX(18px);
    background-color: #3F7ABD;
    box-shadow: 0 0 5px #3F7ABD;
}
.toggle-checkbox:checked ~ .card {
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.5);
}

.card.marked::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 16px;
    border: 2px solid rgba(63, 122, 189, 0.3);
    pointer-events: none;
    animation: glow 2s infinite alternate;
}
@keyframes glow {
    from {
        box-shadow: 0 0 5px rgba(55, 148, 255, 0.3);
    }
    to {
        box-shadow: 0 0 20px rgba(55, 148, 255, 0.6);
    }
}
span.bg-green-500 {
    box-shadow: 0 0 4px rgba(16, 185, 129, 0.8);
}
span.bg-red-500 {
    box-shadow: 0 0 4px rgba(239, 68, 68, 0.8);
}
/* Icon colors */
i[data-feather] {
    color: #3F7ABD !important;
}
i[data-feather="map-pin"] {
    color: #3F7ABD !important;
}
i[data-feather="hash"] {
    color: #3F7ABD !important;
}
/* Text sizes */
.text-lg {
    font-size: 0.6rem;
}
.text-lg-x {
    font-size: 1.7rem;
}
/* Rarity accents */
.rarity-common { border-color: rgba(148, 163, 184, 0.2); }
.rarity-uncommon { border-color: rgba(16, 185, 129, 0.4); box-shadow: 0 10px 20px rgba(16, 185, 129, 0.08); }
.rarity-rare { border-color: rgba(56, 189, 248, 0.4); box-shadow: 0 10px 20px rgba(56, 189, 248, 0.08); }
.rarity-epic { border-color: rgba(168, 85, 247, 0.4); box-shadow: 0 10px 20px rgba(168, 85, 247, 0.08); }
.rarity-legendary { border-color: rgba(234, 179, 8, 0.5); box-shadow: 0 10px 20px rgba(234, 179, 8, 0.12); }
/* Highlight codes */
.code-highlight {
    color: #ffffff;
}
.ceco-highlight {
    color: #ff00ffb3;
    background-color: #000000;
    border: 1px solid #ff00ff;
    border-radius: 4px;
    padding: 2px 6px;
    display: inline-block;
    font-size: 0.9em;
}
.text-menu-icons-background {
          background: linear-gradient(145deg, #000000 0%, #1e1e2d 100%);
    border: 1px solid #3f7abd;
    transition: all 0.3s ease;
    box-shadow: 0 2px 24px rgba(0, 0, 0, 0.22);
}
.text-letras-logo-selector {
      line-height: 3.1rem;
}
.text-letras-logo-main {
      font-size: 2.5rem !important;
}
.text-gray-descripcion {
    color: #ffffff !important;
    font-size: 1.3rem !important;
}
.text-gray-00 {
  font-size: 2rem !important;
}
.text-gray-000 {
  font-size: 1.3rem !important;
}
.text-gray-0000 {
  font-size: 4rem !important;
}
.porcentaje-tarjetas-marcadas {
  border-color: rgb(255 0 255 / 0.4);
  margin-bottom: 1rem;
}
.borde-estadisticas-incidencia {
  border-color: rgb(249 115 22 / 0.4);
  margin-bottom: 1rem;
}
.borde-estadisticas-baul {
  border-color: #3f7abd;
  margin-bottom: 1rem;
}
.yy-777 {
  margin-bottom: 5rem;
}
.calcresolve-bg {

}
.py-666 {
    padding-top: 0rem;
    padding-bottom: 0rem;
}
.calcresolve-border {
  border-color: rgb(255 255 255);
}
.borde-sync-pedidos {
    border-color: #3f7abd;
}
.bg-circulo-qr-pedidos {
    background-color: #3f7abd;
}
.bg-cajon-blanco-ceco-mensaje {
    background-color: #ffffff;
}
.border-cajon-ceco-qr-pedidos {
    border-color: #3f7abd;
}
.texto-azul-cajon-fotos {
    --tw-text-opacity: 1;
    color: #3794ff;
    font-size: 1.1rem !important;
}
.texto-azul-tareas {
    color: #3794ff;
}
.borde-tareas-blanco {
  border-color: #fff;
}
.borde-tareas-azul:hover {
  border-color: #3794ff;
}
.text-gray-100 {
    color: rgb(255 255 255) !important;
}
.text-gray-200,
.text-gray-300 {
    color: #ffffff !important;
    font-size: 1.2rem !important;
}
.text-gray-400 {
    color: #ffffff !important;
    font-size: 1.2rem !important;
}


/* Clear confirmation modal styles */
.fixed.inset-0 {
    animation: fadeIn 0.2s ease-out;
}
.fixed.inset-0 > div {
    animation: slideUp 0.3s ease-out;
}
@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
#clearCurrentBtn {
    transition: all 0.2s ease;
}
#clearCurrentBtn:hover {
    background-color: rgba(59, 130, 246, 0.2) !important;
}
#clearAllBtn {
    transition: all 0.2s ease;
}
#clearAllBtn:hover {
    background-color: rgba(239, 68, 68, 0.2) !important;
}
#cancelClearBtn {
    transition: all 0.2s ease;
}
#cancelClearBtn:hover {
    background-color: rgba(107, 114, 128, 0.2) !important;
}
#toggleRedCardsBtn:hover {
    transform: translateY(-2px);
    border-color: rgba(63, 122, 189, 0.5);
    box-shadow: 0 10px 20px rgba(63, 122, 189, 0.1);
    background: linear-gradient(145deg, #2a2a3a 0%, #242434 100%);
}
#toggleRedCardsBtn svg {
    transition: stroke 0.3s ease;
}
#clearMarkedBtn:hover {
    transform: translateY(-2px);
    border-color: rgba(63, 122, 189, 0.5);
    box-shadow: 0 10px 20px rgba(63, 122, 189, 0.1);
    background: linear-gradient(145deg, #2a2a3a 0%, #242434 100%);
}
#settingsBtn:hover {
    transform: translateY(-2px);
    border-color: rgba(63, 122, 189, 0.5);
    box-shadow: 0 10px 20px rgba(255, 0, 255, 0.1);
    background: linear-gradient(145deg, #2a2a3a 0%, #242434 100%);
}
#scanQrBtn:hover {
    transform: translateY(-2px);
    border-color: rgba(63, 122, 189, 0.5);
    box-shadow: 0 10px 20px rgba(63, 122, 189, 0.1);
    background: linear-gradient(145deg, #2a2a3a 0%, #242434 100%);
}
#calcToggleBtn:hover {
    transform: translateY(-2px);
    border-color: rgba(63, 122, 189, 0.5);
    box-shadow: 0 10px 20px rgba(63, 122, 189, 0.1);
    background: linear-gradient(145deg, #2a2a3a 0%, #242434 100%);
}
#statsToggleBtn:hover {
    transform: translateY(-2px);
    border-color: rgba(63, 122, 189, 0.5);
    box-shadow: 0 10px 20px rgba(63, 122, 189, 0.1);
    background: linear-gradient(145deg, #2a2a3a 0%, #242434 100%);
}
#viewToggleBtn:hover {
    transform: translateY(-2px);
    border-color: rgba(63, 122, 189, 0.5);
    box-shadow: 0 10px 20px rgba(63, 122, 189, 0.1);
    background: linear-gradient(145deg, #2a2a3a 0%, #242434 100%);  
}
#receiverToggleBtn:hover {
    transform: translateY(-2px);
    border-color: rgba(63, 122, 189, 0.5);
    box-shadow: 0 10px 20px rgba(63, 122, 189, 0.1);
    background: linear-gradient(145deg, #2a2a3a 0%, #242434 100%);  
}
#commsToggleBtn:hover {
    transform: translateY(-2px);
    border-color: rgba(63, 122, 189, 0.5);
    box-shadow: 0 10px 20px rgba(63, 122, 189, 0.1);
    background: linear-gradient(145deg, #2a2a3a 0%, #242434 100%);  
}
#galleryToggleBtn:hover {
    transform: translateY(-2px);
    border-color: rgba(63, 122, 189, 0.5);
    box-shadow: 0 10px 20px rgba(63, 122, 189, 0.1);
    background: linear-gradient(145deg, #2a2a3a 0%, #242434 100%);  
}
#tasksToggleBtn:hover {
    transform: translateY(-2px);
    border-color: rgba(63, 122, 189, 0.5);
    box-shadow: 0 10px 20px rgba(63, 122, 189, 0.1);
    background: linear-gradient(145deg, #2a2a3a 0%, #242434 100%); 
}
#changecatalogBtn:hover {
    transform: translateY(-2px) !important;
    border-color: rgba(63, 122, 189, 0.5) !important;
    box-shadow: 0 10px 20px rgba(63, 122, 189, 0.1) !important;
    background: linear-gradient(145deg, #2a2a3a 0%, #242434 100%) !important;
}
#changeCatalogBtn:hover svg {
  stroke: red;
}
/* Settings menu styles */
#settingsMenu {
    animation: fadeIn 0.2s ease-out;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 0, 255, 0.1);
}
#settingsMenu button {
    transition: all 0.2s ease;
}
#settingsMenu button:hover {
    background-color: rgba(63, 122, 189, 0.1) !important;
}
#importFileInput {
    display: none;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.notes-textarea {
    min-height: 60px;
    resize: vertical;
    transition: all 0.2s ease;
    font-size: 1rem;
    margin-top: auto;
    background-color: rgba(30, 30, 45, 0.5) !important;
    border: 1px solid #3f7abd6e !important;
    border-radius: 0.6rem !important;
}
.notes-textarea.empty-notes {
    background-color: rgba(30, 30, 45, 0.5) !important;
    border: 1px dashed rgba(255, 0, 255, 0.3) !important;
    border-radius: 0.6rem !important;
}
.notes-textarea:not(:placeholder-shown), .notes-textarea.has-notes {
    background-color: #1a1a28 !important;
    border: 1px solid #3F7ABD !important;
    box-shadow: 0 0 10px #3F7ABD;
    border-radius: 0.6rem !important;
}
@media (max-width: 768px) {
  #notes-textarea:not(:placeholder-shown), #notes-textarea.has-notes {
    background-color: #1a1a28 !important;
    border: 1px solid #3F7ABD !important;
    box-shadow: 0 0 10px #3F7ABD;
    border-radius: 0.6rem !important;
  }
} 
.notes-textarea:focus {
    background-color: #1a1a28 !important;
    border: 1px solid rgba(255, 0, 255, 0.5);
    box-shadow: 0 0 12px rgba(255, 0, 255, 0.3);
}
.card div[class*="border-arcprimary"] {
    transition: border-color 0.2s ease;
    flex-grow: 1;
    margin-top: 0.5rem;
}
.card:hover div[class*="border-arcprimary"] {
    border-color: rgba(255, 0, 255, 0.5);
}
i[data-feather] {
    color: #3F7ABD !important;
}
.card .absolute.top-2.right-2 {
    top: 0.8rem;
    right: 1rem;
    transform: translateY(8px);
}
.glow {
    text-shadow: 0 0 5px rgba(74, 222, 128, 0.7);
}
#statusBar {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    border-color: #ff00ff80 !important;
    background-color: rgba(0, 0, 0, 0.9) !important;
    color: white !important;
    max-width: 80%;
    width: max-content;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: all 0.3s ease;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    text-align: center;
    font-size: 1rem !important;
}
#statusBar.show {
    opacity: 1;
}
#statusBar.error {
    animation: shake 0.5s ease;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}
#closeStatusBtn {
    opacity: 0.7;
    transition: all 0.2s ease;
}
#closeStatusBtn:hover {
    opacity: 1;
    transform: rotate(90deg);
}
/* Utility */
.line-clamp-2 {
display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;  
    overflow: hidden;
}
 /* Rotación suave del logo */
.spin-container {
    display: inline-block;
    transition: transform 0.8s ease-in-out;
}
#catalogLogoIcon {
    display: block; /* Asegura que el logo se muestre correctamente */
    pointer-events: none; /* Evita problemas de interacción */
}
.border-arcprimary\/30 {
    border-color: #3F7ABD !important;
}
.borde-bloc-notas {
    border-color: #da70d64d !important;
}
.border-b {
    border-bottom-width: 0px !important;
}
.text-catalogo-w1 {
    
    font-family: 'Orbitron', sans-serif;
    font-weight: 400 !important;
    font-size: 1rem !important;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: linear-gradient(to right, #ffffff, #ffffff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 4px rgba(0, 255, 198, 0.2);
    white-space: nowrap;
}
.w-32 {
    width: -webkit-fill-available !important;
}
.w-full3{
  width: 100%;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.2rem !important;
  font-weight: 50 !important;
}
.w-full{
  font-size: 1.1rem !important;
}
.mb-2 {
    margin-bottom: 1rem !important;
}
.text-sm {
    font-size: 1.2rem !important;
}
header .toggle-switch {
    width: 40px !important;
    flex: 0 0 40px !important;
}
.toggle-slider:before {
    left: 2px !important; /* antes 1px */
    bottom: 1px !important; /* opcional si quieres centrar completamente */
}
.border-morado {
    border-color: #3F7ABD !important;
    border-width: 1.6px !important;
}


.left-2 {
    left: 1.3rem !important;
}
.text-blue-500 {
    color: #ff00ff !important;
}
.max-w-md {
    max-width: 38rem !important;
}
#catalogOptions {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 500px;
    max-height: 70vh;
    overflow-y: auto;
    background: #1e1e2d;
    border: 1px solid #3F7ABD;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 100;
    padding: 0.5rem;
}

#catalogOptions div {
    padding: 0.75rem 1rem;
    margin: 0.25rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

#catalogOptions div:hover {
    background-color: #2a2a3a !important;
    color: #3F7ABD;
    cursor: pointer;
}

#catalogOptions::-webkit-scrollbar {
    width: 8px;
}

#catalogOptions::-webkit-scrollbar-track {
    background: #1e1e2d;
    border-radius: 0 12px 12px 0;
}

#catalogOptions::-webkit-scrollbar-thumb {
    background: #3F7ABD;
    border-radius: 4px;
}

#catalogOptions::-webkit-scrollbar-thumb:hover {
    background: #52C5DC;
}
#catalogArrow {
  transition: transform 0.25s ease;
}
#catalogButton.expanded #catalogArrow {
  transform: rotate(180deg);
}
.qr-container canvas {
    border-radius: 6px;
}
#statusBar {
    pointer-events: none; /* Ignora todos los clics */
}
.bg-blur-fallback {
    position: fixed;
    inset: 0;
    z-index: -3;
    background-image: url("https://huggingface.co/deepsite/_next/image?url=https%3A%2F%2Fhuggingface.co%2Fspaces%2FGeremys%2Fhcm-almacenes%2Fresolve%2Fmain%2Fimages%2Fimage.jpg&w=128&q=75"); /* imagen ya desenfocada */
    background-size: cover;
    background-position: center;
}
.moving-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image: url("https://huggingface.co/deepsite/_next/image?url=https%3A%2F%2Fhuggingface.co%2Fspaces%2FGeremys%2Fhcm-almacenes%2Fresolve%2Fmain%2Fimages%2Fimage.jpg&w=128&q=75");
    background-size: cover;
    background-repeat: repeat;
    animation: moveDiagonal 60s linear infinite;
}
@keyframes moveDiagonal {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 2000px 2000px;
    }
}
.bg-blur-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
}
/* Todos los botones dentro del settings menu */
#settingsMenu button {
    position: relative; /* necesario para los pseudo-elementos */
    overflow: hidden;   /* para que las líneas no se salgan */
}

/* 1️⃣ Exportar por CECO: línea debajo */
#exportCecoBtn::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px; /* línea muy fina */
    background-color: #3F7ABD;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

/* 2️⃣ Exportar: línea arriba y abajo */
#exportBtn::before,
#exportBtn::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #3F7ABD;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}
#exportBtn::before { top: 0; }
#exportBtn::after { bottom: 0; }

/* 3️⃣ Importar: línea arriba */
#importBtn::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background-color: #3F7ABD;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

/* Hover: mostrar las líneas */
#settingsMenu button:hover::before,
#settingsMenu button:hover::after {
    transform: scaleX(1);
}

/* Primer elemento: línea abajo con desvanecimiento */
#catalogOptions > div:first-child::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, #3F7ABD, transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

#catalogOptions > div:first-child:hover::after {
    opacity: 1;
}

/* Último elemento: línea arriba con desvanecimiento */
#catalogOptions > div:last-child::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, #3F7ABD, transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

#catalogOptions > div:last-child:hover::before {
    opacity: 1;
}

/* Elementos intermedios: línea arriba y abajo con desvanecimiento */
#catalogOptions > div:not(:first-child):not(:last-child)::before,
#catalogOptions > div:not(:first-child):not(:last-child)::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, #3F7ABD, transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

#catalogOptions > div:not(:first-child):not(:last-child)::before {
    top: 0;
}

#catalogOptions > div:not(:first-child):not(:last-child)::after {
    bottom: 0;
}

#catalogOptions > div:not(:first-child):not(:last-child):hover::before,
#catalogOptions > div:not(:first-child):not(:last-child):hover::after {
    opacity: 1;
}

/* Base de los elementos del dropdown de usuarios */
#revisorOptions li {
    position: relative;
    padding: 0.5rem 1rem;
    cursor: pointer;
    overflow: hidden; /* necesario para que las líneas no se salgan */
}

/* Líneas arriba y abajo con degradado */
#revisorOptions li::before,
#revisorOptions li::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, #3F7ABD, transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

#revisorOptions li::before { top: 0; }
#revisorOptions li::after { bottom: 0; }

/* Mostrar líneas al hacer hover */
#revisorOptions li:hover::before,
#revisorOptions li:hover::after {
    opacity: 1;
}

/* Opcional: degradado más sutil en primer y último elemento */
#revisorOptions li:first-child::before { background: linear-gradient(to right, transparent, #3F7ABD, transparent); }
#revisorOptions li:last-child::after  { background: linear-gradient(to right, transparent, #3F7ABD, transparent); }

menu, ol, ul {
    text-align: -webkit-center !important;
}

/* Aparición holográfica */
@keyframes holoAppear {
    0% {
        opacity: 0;
        transform: scale(0.7) translateY(20px);
        filter: blur(8px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0px);
    }
}

/* Efecto pulsante RGB */
@keyframes holoRGB {
    0%   { box-shadow: 0 0 16px #ff00ff; }
    33%  { box-shadow: 0 0 16px #00ffff; }
    66%  { box-shadow: 0 0 16px #00ff88; }
    100% { box-shadow: 0 0 16px #ff00ff; }
}

/* Scanlines holográficas */
.modal-holo::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255,255,255,0.05) 0px,
        rgba(255,255,255,0.04) 2px,
        rgba(0,0,0,0.15) 4px
    );
    pointer-events: none;
    animation: holoScan 8s linear infinite;
    opacity: 0.25;
}

@keyframes holoScan {
    0%   { transform: translateY(0); }
    100% { transform: translateY(100%); }
}

/* Barrido glitch */
.modal-holo::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    pointer-events: none;

    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255,0,255,0.2) 50%,
        transparent 100%
    );

    animation: holoGlitch 2.3s infinite;
}

@keyframes holoGlitch {
    0%   { transform: translateX(-100%); opacity: 0.1; }
    40%  { opacity: 0.5; }
    50%  { transform: translateX(100%); opacity: 0.15; }
    60%  { opacity: 0.5; }
    100% { transform: translateX(-100%); opacity: 0.1; }
}

/* Borde animado RGB */
.modal-holo {
    animation: holoRGB 4s infinite linear;
}
/* RESPONSIVE: Modal holográfico en móviles */
@media (max-width: 480px) {
    .modal-holo {
        min-width: 0 !important;
        width: 85% !important;
        padding: 1.25rem !important;
    }

    .modal-holo::before,
    .modal-holo::after {
        border-radius: inherit;
    }
}

/* También ayuda a evitar que se expanda más del 90% */
.modal-holo {
    max-width: 90vw;
}

#aviso-camara {
    position: fixed;        /* Se queda fijo en la pantalla */
    top: 50%;               /* Centrado vertical */
    left: 50%;              /* Centrado horizontal */
    transform: translate(-50%, -50%); /* Ajuste fino del centro */
    
    background-color: rgba(220, 20, 60, 0.9); /* Rojo intenso con un poco de transparencia */
    color: white;           /* Letras blancas */
    font-size: 18px;        /* Tamaño grande */
    font-weight: bold;      /* Negrita */
    
    padding: 20px 30px;     /* Espacio interior */
    border-radius: 12px;    /* Bordes redondeados */
    box-shadow: 0 4px 15px rgba(0,0,0,0.5); /* Sombra para que destaque */
    z-index: 9999;          /* Asegura que esté ENCIMA de todo (video, menús...) */
    text-align: center;
    pointer-events: none;   /* Permite tocar la pantalla "a través" del aviso */
}

/* Animación para cuando el micrófono está escuchando */
.mic-active {
    color: #ef4444 !important; /* Rojo */
    animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}


/* ========================================= */
/* ESTILO "GREAT BAT" ADAPTADO (HCM)         */
/* ========================================= */

.card {
    /* Fondo oscuro y elegante */
    background: #171717; 
    border-radius: 20px;
    border: 1px solid #333;
    /* Efecto de profundidad */
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center; /* Todo centrado */
    padding: 1.5rem;
    position: relative;
    overflow: visible; /* Para que brillos no se corten */
}

/* El círculo central (Donde va el icono de caja) */
.card-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(145deg, #1e1e2d, #000);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:  5px 5px 10px #0b0b0b, 
                 -5px -5px 10px #252535;
    margin-bottom: 10px;
    border: 1px solid #3F7ABD;
}

.card-avatar i {
    width: 28px;
    height: 28px;
    color: #3F7ABD;
    filter: drop-shadow(0 0 5px rgba(63, 122, 189, 0.8));
}

/* Título (Descripción del artículo) */
.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #f3f4f6;
    text-align: center;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

/* Etiquetas pequeñas (CECO, Ubicación) */
.card-badge {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #ffffff;
    margin-bottom: 4px;
}

/* Datos numéricos (Código, Cantidad) */
.card-stat {
    font-family: 'Orbitron', sans-serif;
    color: #3F7ABD;
    font-weight: bold;
    letter-spacing: 1px;
}

/* Mantenemos el estilo de marcado (sobreescribe lo anterior) */
.card.marked {
    border-width: 1px !important;
    border-style: solid !important;
    border-color: rgb(105, 192, 255) !important;
    background: linear-gradient(145deg, rgb(51, 51, 92) 0%, rgb(0, 0, 0) 100%);
    box-shadow: 0 0 0 1px rgb(0 119 255), 0 0 15px #5696df;
}

.card.marked .card-avatar {
    border-color: #ff00ff;
    box-shadow: 0 0 15px rgba(225, 0, 255, 0.547);
}

.card.marked .card-avatar i {
    color: #22c55e;
    filter: drop-shadow(0 0 8px #22c55e);
}

/* Circulo verde y rojo, tamaño */
.w-2 {
    width: 0.8rem !important;
}
.h-2 {
    height: 0.8rem !important;
}
.bottom-0 {
    bottom: 6px !important;
}
.text-xs {
    font-size: 1.2rem !important;
    line-height: 1.3rem !important;
}

/* ================================================= */
/* ESTILOS DE INCIDENCIA (NARANJA) - IMPORTANTE      */
/* ================================================= */

/* 1. La Tarjeta cuando tiene incidencia */
.card.incidence {
    border: 2px solid #f59e0b !important; /* Borde Naranja */
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.15) 0%, #000000 100%) !important; /* Fondo con tinte naranja */
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4) !important; /* Resplandor */
}

/* 2. El Toggle de abajo cuando está activo (se pone naranja) */
.toggle-checkbox.incidence:checked + .toggle-slider {
    background-color: #f59e0b !important;
    border-color: #f59e0b !important;
}
/* La bolita del toggle */
.toggle-checkbox.incidence:checked + .toggle-slider:before {
    background-color: white !important;
    box-shadow: none !important;
}

/* 3. El Micrófono grande y cómodo */
.btn-mic-large {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1f2937;
    border: 1px solid #374151;
    border-radius: 50%;
    color: #9ca3af;
    transition: all 0.2s;
}
.btn-mic-large:active {
    background-color: #3F7ABD;
    color: white;
    transform: scale(0.95);
}

/* estilos css ajustando colores de textos de las tarjetas */
.text-white {
    color: #ffffff !important;
}
.text-blue {
  color: #3F7ABD !important;
}
.text-red {
  color: #ff0000 !important;
}
.text-green {
  color: #22ff00 !important;
}
.text-3xl {
    font-size: 2rem !important;
}
.border-gray-800\/50 {
    border-color: #7900b08f !important;
}
.border-gray-700\/50 {
    border-color: #7900b08f !important;
}
.color-codigo-numero {
    color: #ffffff;
}

/* ================================================= */
/* ESTILO DEL AVATAR EN INCIDENCIAS                  */
/* ================================================= */

/* 1. El Círculo del Avatar (Borde y Sombra Naranja) */
.card.incidence .card-avatar {
    border-color: #ff0000;
    box-shadow: 0 0 15px rgb(255 0 0);
/* Opcional: Un fondo ligeramente rojizo/oscuro */
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.1), #000) !important;
}

/* ========================================= */
/* EFECTO DE BRILLO (HAZ DE LUZ)             */
/* ========================================= */
@keyframes shine-sweep {
    0% { left: -100%; opacity: 0; }
    50% { opacity: 0.5; }
    100% { left: 200%; opacity: 0; }
}

/* La clase que activa la animación */
/* Busca donde tenías .card.marked::before para el brillo y cámbialo por esto: */
.card.just-marked::before {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transform: skewX(-25deg);
    animation: shine-sweep 0.7s ease-out forwards;
}

/* IMPORTANTE: Para que el brillo no se salga de las esquinas */
.card {
    overflow: hidden; 
}

#settingsBtn {
    overflow: visible !important;
}
/* BARRA LATERAL SCROLLBAR */
/* Ancho de la barra */
::-webkit-scrollbar {
    width: 8px;
    height: 8px; /* Para scroll horizontal si hubiera */
}

/* El fondo de la barra (el carril) */
::-webkit-scrollbar-track {
    background: #09090b; 
}

/* La barra en sí (el pulgar) */
::-webkit-scrollbar-thumb {
    background: #3F7ABD; 
    border-radius: 4px;
    border: 1px solid #09090b; /* Espacio alrededor para que flote */
}

/* Al pasar el ratón se ilumina un poco */
::-webkit-scrollbar-thumb:hover {
    background: #3F7ABD; 
}

/* Cuando haces clic para escribir */
#searchInput:focus {
    /* Sombra verde suave */
    box-shadow: 0 0 15px rgba(0, 149, 255, 0.492); 
}

/* FONDO PANTALLA TECNICO */
/* 1. EL CUERPO */
body {
    background-color: #050505;
    min-height: 100vh;
    margin: 0;
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 0.5px;
    color: #fff;
    position: relative;
    z-index: 0;
    
    /* BORRA la línea de background-attachment: scroll aquí, no hace falta */
}

/* 2. EL FONDO FIJO (TÉCNICA ANTI-REBOTE MÓVIL) */
body::before {
    content: "";
    position: fixed;
    
    /* AQUÍ ESTÁ EL TRUCO: */
    /* Hacemos que el fondo mida el 120% de la altura de la pantalla */
    height: 120vh; 
    width: 100%;
    
    /* Lo subimos un poco para centrarlo. 
       Así, aunque la barra del móvil cambie el tamaño de la ventana,
       el borde del degradado siempre estará fuera de la vista. */
    top: -10vh; 
    left: 0;
    
    background-image: 
        radial-gradient(circle at 50% 50%, transparent 20%, #000 140%),
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
        
    background-size: 100% 100%, 30px 30px, 30px 30px;
    
    z-index: -1; 
    pointer-events: none;
    
    /* Esto ayuda a que el móvil no intente repintarlo a cada milisegundo */
    transform: translateZ(0); 
}

/* OPTIMIZACIÓN CRÍTICA PARA MÓVIL */
@media (max-width: 768px) {
    .card .light-layer,
    .card .lumen,
    .card .darken,
    .card .slit {
        /* Desactivamos el 3D en móvil para evitar lag */
        transform: none !important; 
        perspective: none !important;
        transform-style: flat !important;
    }

    /* Simplificamos la luz a un simple degradado que aparece */
    .card .lumen .min, 
    .card .lumen .mid, 
    .card .lumen .hi {
        transform: none !important;
        width: 100% !important;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    /* Al marcar, solo subimos la opacidad (sin giros 3D) */
    .card.marked .lumen .min,
    .card.marked .lumen .mid,
    .card.marked .lumen .hi {
        opacity: 0.5 !important;
    }
}

/* DEFINICIÓN DE LA ANIMACIÓN DE ENCENDIDO */
@keyframes encenderLuz {
    0% { opacity: 0; }
    100% { opacity: 0.6; } /* Ajusta este 0.6 a la intensidad que quieras */
}

@keyframes encenderSombra {
    0% { opacity: 0; }
    100% { opacity: 0.9; }
}

/* ESTADO BASE (Invisible pero presente) */
.card .lumen, 
.card .darken {
    opacity: 0;
    /* Quitamos transition, usaremos animation */
    transition: none !important; 
}

/* CUANDO SE MARCA LA TARJETA (.marked) */
.card.marked .lumen {
    /* OBLIGAMOS a ejecutar la animación */
    animation: encenderLuz 0.5s ease-out forwards;
}

.card.marked .darken {
    animation: encenderSombra 0.5s ease-out forwards;
}

/* OPTIMIZACIÓN MÓVIL (Mantiene la luz plana para no lagear) */
@media (max-width: 768px) {
    .card .light-layer, .card .slit, .card .lumen, .card .darken {
        transform: none !important;
        perspective: none !important;
    }
}

.mb-8 {
    margin-bottom: 1.5rem !important;
}

/* Empujamos el contenido principal hacia abajo para salvar el menú */
main {
    padding-top: 20px !important; /* Ajusta este número si sigue tapando */
    padding-bottom: 20px !important;
}

/* --- HEADER GLASS CON DESVANECIDO SUAVE --- */

/* 1. Contenedor: Transparente y sin bordes */
#mainHeader {
    background: transparent !important;
    border: none !important; 
    box-shadow: none !important;
    backdrop-filter: none !important; /* Importante quitarlo de aquí */
    
    /* Aseguramos que se superponga bien */
    position: sticky;
    top: 0;
    z-index: 50;
    
    /* Añadimos un poco de margen visual abajo para el efecto desvanecido */
    padding-bottom: 40px !important;
    margin-bottom: -20px !important; /* Compensamos el margen para no empujar el contenido */
}

/* 2. Capa de Cristal "Fantasma" */
#mainHeader::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Ocupa todo el header */
    
    /* AQUI ESTÁ TU ESTILO: */
    /* Fondo negro al 60% (ajusta 0.6 si lo quieres más claro/oscuro) */
    background-color: rgba(0, 0, 0, 0.8); 
    
    /* El desenfoque que te gusta */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px); /* Para Safari/iOS */
    
    /* LA MAGIA DEL CORTE SUAVE: */
    /* Hacemos que esta capa sea visible hasta el 70% y luego desaparezca */
    -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
    
    z-index: -1; /* Detrás del texto */
    pointer-events: none;
    
    /* Borde inferior muy sutil que también se desvanece (opcional) */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.shadow-md {
    --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 30%), 0 2px 4px -2px rgb(0 0 0 / 0.3) !important;
}

#hiddenButtonsContainer {
    /* Fondo borroso y transparente */
    background-color: rgba(20, 20, 25, 0.5); /* Base semitransparente */
    backdrop-filter: blur(10px);             /* Desenfoque */
    -webkit-backdrop-filter: blur(10px);     /* Safari */
    box-shadow: 0 0 20px rgba(0,0,0,0.6);         /* Sombra para profundidad */
    z-index: 9999;             /* Encima de todo */
}

.shadow-inner {
    /* --tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.05); */
    /* --tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color); */
    /* box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); */
    box-shadow: 2px 2px 8px #000000 !important;
}

/* Define la animación de pulso */
@keyframes glowPulse {
  0%, 100% {
    color: #fff;
    text-shadow: 0 0 0px #3F7ABD;
  }
  50% {
    color: #3F7ABD;
    text-shadow: 0 0 15px #3F7ABD, 0 0 30px #3F7ABD;
  }
}

/* Clase que aplicaremos al número */
.glow-pulse {
  animation: glowPulse 4s infinite;
}

#searchMicBtn.mic-active {
    color: #ef4444 !important; /* Rojo */
    background-color: rgba(239, 68, 68, 0.15);
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
    animation: mic-pulse 1.5s infinite;
}

@keyframes mic-pulse {
    0% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.1); }
    100% { transform: translateY(-50%) scale(1); }
}

/* Estilos para el Módulo QR */
#qr-section .main-container {
    box-shadow: 0 0 30px rgba(63, 122, 189, 0.2);
}

#qr-gallery-area .gallery-item img {
    aspect-ratio: 1/1;
    object-fit: contain;
    padding: 8px;
}

#qr-input::placeholder {
    color: rgba(63, 122, 189, 0.4);
    letter-spacing: 2px;
}

/* Animación micrófono activo en QR */
#qr-mic-btn.listening i {
    color: #ef4444 !important;
    filter: drop-shadow(0 0 8px #ef4444);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Ocultar scrollbar en galería QR móvil */
#qr-gallery-area {
    scrollbar-width: none;
}
#qr-gallery-area::-webkit-scrollbar {
    display: none;
}

#qrBigModal {
    background-color: rgba(0, 0, 0, 0.95) !important; /* Más oscuro para tapar todo */
}

/* Evita que los efectos de "luz" de las tarjetas (light-layer) se vean sobre el modal */
.card .light-layer {
    z-index: 1;
}

#qrBigModal.flex {
    z-index: 999999 !important; /* Máximo nivel de prioridad */
}

.mt-120 {
    margin-top: 1.7rem;
}

.text-baul {
    color: #3F7ABD;
}

.bg-boton-x {
    --tw-bg-opacity: 1;
    background-color: #000000;
    border: 1px solid #4b5563;
}

/* color microfono pagina gen codigos qr */
.text-microfono-btn {
    --tw-text-opacity: 1;
    color: #3F7ABD;
}

/* Clase para botones desactivados en modo enfoque */
.btn-ui-disabled {
    opacity: 0.1 !important; /* Casi invisible */
    pointer-events: none !important; /* No se pueden pulsar */
    filter: grayscale(1) blur(1px); /* Gris y un poco borroso */
    transition: all 0.4s ease;
}

/* Brillo especial para el botón que queda activo (el de volver) */
.btn-ui-focus {
    box-shadow: 0 0 20px var(--arcprimary) !important;
    border-color: var(--arcprimary) !important;
    z-index: 100;
}

/* Animación del pulso neón */
@keyframes neon-pulse-white {
    0% {
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.4), 0 0 10px rgba(63, 197, 220, 0.2);
        border-color: rgba(255, 255, 255, 0.8);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 30px rgba(82, 197, 220, 0.6);
        border-color: #ffffff;
        transform: scale(1.1); /* Crece un poquito para llamar la atención */
    }
    100% {
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.4), 0 0 10px rgba(63, 197, 220, 0.2);
        border-color: rgba(255, 255, 255, 0.8);
        transform: scale(1);
    }
}

/* Clase que aplicaremos al botón cuando estemos en modo QR */
.btn-qr-active {
    animation: neon-pulse-white 2s infinite ease-in-out !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid white !important;
    z-index: 99999 !important; /* Asegura que esté por encima de la capa de oscurecimiento */
    opacity: 1 !important;
    pointer-events: auto !important;
}

#dash-bar-progress {
    /* Forzamos el color magenta neón */
    background: linear-gradient(90deg, #7000ff, #ff00ff) !important;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.7);
    width: 0%; /* Empezar en 0 para la animación */
    display: block !important;
    min-width: 2px; /* Un pequeño punto inicial para saber que existe */
}

#dashboard-section [data-feather] {
    color: inherit !important; /* Para que los iconos de las stats usen el color del texto (naranja, azul, etc) */
}

/* Efecto glitch sutil para los números grandes */
#dash-percent-text:hover {
    text-shadow: 2px 0 #ff00ff, -2px 0 #00ffff;
    cursor: default;
}

#dash-percent-text {
    min-width: 140px; /* Evita que el layout se mueva al cambiar de 9% a 10% */
    font-variant-numeric: tabular-nums; /* Hace que todos los números midan lo mismo */
}

@media (max-width: 768px) {
    #hiddenButtonsContainer {
        position: absolute !important;
        right: 0 !important;
        top: 110% !important;
        display: none !important; 
        grid-template-columns: repeat(3, 1fr) !important; 
        gap: 12px !important; 
        width: 200px !important; 
        padding: 15px !important;
        box-sizing: border-box !important;
        
        background: rgba(10, 10, 20, 0.4) !important; 
        backdrop-filter: blur(15px) saturate(180%) !important; 
        -webkit-backdrop-filter: blur(15px) saturate(180%) !important; 
        
        border: 2px solid #3f7abd !important; 
        border-radius: 15px !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
        z-index: 99999 !important;
    }
    
    #hiddenButtonsContainer:not(.hidden) {
        display: grid !important;
    }

    /* CAMBIO CLAVE: Usamos ">" para que SOLO afecte a los botones del menú principal */
    #hiddenButtonsContainer > button,
    #hiddenButtonsContainer > .toggle-switch {
        width: 50px !important;
        height: 50px !important;
        margin: 0 auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: rgba(63, 122, 189, 0.12) !important; 
        border: 1.5px solid #3f7abd !important; 
        border-radius: 12px !important;
        position: relative !important;
    }

    /* RESET PARA EL MENÚ DE SETTINGS: 
       Esto asegura que los botones de exportar/importar vuelvan a ser filas */
    #settingsMenu {
        width: 180px !important;
        right: 0 !important;
        background: rgba(20, 20, 30, 0.95) !important;
        border: 1px solid #3f7abd !important;
    }

    #settingsMenu button {
        width: 100% !important; /* Vuelven a ocupar todo el ancho */
        height: auto !important; /* Altura automática según el texto */
        padding: 12px 15px !important;
        display: flex !important;
        justify-content: flex-start !important; /* Alineados a la izquierda */
        border: none !important; /* Sin bordes cuadrados individuales */
        background: transparent !important;
        border-radius: 0 !important;
    }

    /* Ajuste del Toggle */
    #hiddenButtonsContainer .toggle-switch .toggle-slider {
        position: relative !important;
        width: 36px !important;
        height: 18px !important;
        margin: 0 !important;
    }

    #hiddenButtonsContainer .toggle-slider:before {
        height: 14px !important;
        width: 14px !important;
        left: 2px !important;
        bottom: 1px !important;
    }
}
@media (max-width: 768px) {
    /* Hacemos el porcentaje más imponente en móvil al estar solo */
    #dash-percent-text {
        display: block;
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
        margin-bottom: -10px; /* Ajuste para que la barra no quede muy lejos */
    }

    /* La barra de progreso más brillante en móvil */
    #dash-bar-progress {
        box-shadow: 0 0 25px var(--arcprimary), 0 0 10px #ffffff;
    }

    /* Espaciado extra en el dashboard para que no se pegue al menú superior 
    #dashboard-section {
        padding-top: 2rem;
    } */

    /* Ajuste de las tarjetas de incidencias y vault para que no sean tan altas en móvil */
    #dashboard-section .grid-cols-1 .p-6 {
        padding: 1.25rem;
    }
}

/* Botones de lote dinámicos */
#dynamic-batches button:first-child {
    background: linear-gradient(145deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
}

#dynamic-batches button:first-child:active {
    border-color: var(--arcprimary);
    color: var(--arcprimary);
    background: rgba(255, 0, 255, 0.1);
}

/* Scrollbar técnica para los lotes */
#dynamic-batches::-webkit-scrollbar {
    width: 3px;
}
#dynamic-batches::-webkit-scrollbar-thumb {
    background: var(--arcprimary);
    border-radius: 10px;
}
.text-iconos-calculadora {
    font-size: 2.5rem;
}
/* Forzar texto blanco en el registro de la calculadora */
.calc-log-sync, .calc-log-sync span {
    color: #ffffff !important;
}

/* Excepto el timestamp que lo queremos más oscuro */
.calc-log-sync span.text-gray-500 {
    color: #6b7280 !important;
}

@media (max-width: 768px) {
    #hiddenButtonsContainer {
        /* 1. Posicionamiento */
        position: absolute !important;
        right: 0 !important;
        top: calc(100% + 10px) !important;
        
        /* 2. Cuadrícula de Precisión */
        display: none !important; 
        /* Creamos 3 columnas exactas de 50px */
        grid-template-columns: repeat(3, 50px) !important; 
        /* Centramos la cuadrícula entera dentro del contenedor */
        justify-content: center !important; 
        /* Centramos los iconos dentro de sus celdas */
        justify-items: center !important;
        align-items: center !important;
        gap: 15px !important; /* Espacio fijo entre botones */
        
        /* 3. Dimensiones (Auto-ajustable al contenido) */
        width: max-content !important; 
        padding: 20px !important;
        box-sizing: border-box !important;
        
        /* 4. Estética */
        background: rgba(10, 10, 20, 0.4) !important; 
        backdrop-filter: blur(20px) saturate(180%) !important; 
        -webkit-backdrop-filter: blur(20px) saturate(180%) !important; 
        border: 2px solid #3f7abd !important; 
        border-radius: 18px !important;
        box-shadow: 0 15px 35px rgba(0,0,0,0.7) !important;
        z-index: 99999 !important;
    }
    
    #hiddenButtonsContainer:not(.hidden) {
        display: grid !important;
    }

    /* 5. RESET TOTAL DE BOTONES Y TOGGLE */
    #hiddenButtonsContainer > button,
    #hiddenButtonsContainer > .toggle-switch {
        /* Tamaño fijo para que coincida con el grid */
        width: 50px !important;
        height: 50px !important;
        /* ELIMINAR CUALQUIER MARGEN DE TAILWIND (ml-2, etc) */
        margin: 0 !important; 
        padding: 0 !important;
        
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        
        background: rgba(63, 122, 189, 0.15) !important; 
        border: 1px solid #3f7abd !important; 
        border-radius: 12px !important;
        box-sizing: border-box !important;
    }

    /* 6. CORRECCIÓN DEL TOGGLE (Para que no se salga del cuadro azul) */
    #hiddenButtonsContainer > .toggle-switch .toggle-slider {
        position: relative !important;
        width: 34px !important;
        height: 18px !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
    }

    /* 7. AJUSTE DE ICONOS */
    #hiddenButtonsContainer button i, 
    #hiddenButtonsContainer button svg {
        width: 22px !important;
        height: 22px !important;
        display: block !important;
    }

        /* SELECCIÓN DE MÁXIMA PRIORIDAD PARA ESCONDER EL BOTÓN EN MÓVIL */
    html body #receiverToggleBtn {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
}

.hamburger {
  cursor: pointer;
}

.hamburger input {
  display: none;
}

.hamburger svg {
  height: 2.5rem;
  transition: transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.line {
  fill: none;
  stroke: #ffffff; /* Líneas blancas */
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
  transition: stroke-dasharray 600ms cubic-bezier(0.4, 0, 0.2, 1),
              stroke-dashoffset 600ms cubic-bezier(0.4, 0, 0.2, 1),
              stroke 0.3s ease;
}

.line-top-bottom {
  stroke-dasharray: 12 63;
}

.hamburger input:checked + svg {
  transform: rotate(-45deg);
}

.hamburger input:checked + svg .line-top-bottom {
  stroke-dasharray: 20 300;
  stroke-dashoffset: -32.42;
}

/* Color azul cuando se abre */
.hamburger input:checked + svg .line {
    stroke: #3f7abd;
}

@media (max-width: 768px) {
    /* ... (resto de tu código) ... */
/* 1. Aseguramos el tamaño fijo del carril */
    #hiddenButtonsContainer .toggle-switch .toggle-slider {
        width: 36px !important;
        height: 18px !important;
    }
    /* 1. AJUSTE DEL LADO IZQUIERDO (Punto de inicio) */
    #hiddenButtonsContainer .toggle-slider:before {
        height: 14px !important;
        width: 14px !important;
        left: 2px !important; /* Subimos de 2px a 2.5px para centrarlo mejor a la izquierda */
        bottom: 1px !important; /* Ajuste fino vertical si lo ves necesario */
        transition: transform 0.3s ease !important;
    }

    /* 2. COMPENSACIÓN DEL LADO DERECHO (Recorrido) */
    /* Como ahora empieza 0.5px más a la derecha, bajamos el recorrido de 17 a 16.5 */
    #hiddenButtonsContainer .toggle-checkbox:checked + .toggle-slider:before {
        transform: translateX(16px) !important; 
    }

        #heartbeat-container {
        /* En móvil ocupa las 3 columnas del grid */
        grid-column: span 3 !important; 
        width: 100% !important;
        margin: 0 0 10px 0 !important; /* Margen abajo para separar de los botones */
        padding: 10px !important;
        border: 1px solid rgba(63, 122, 189, 0.2) !important;
        background: rgba(0, 0, 0, 0.3) !important;
        border-radius: 12px !important;
        height: auto !important;
        justify-content: space-between !important;
    }

    #heartbeat-container .w-16 {
        width: 80px !important; /* Un poco más ancho en móvil para que se vea mejor */
    }
}

/* En PC quitamos el span y lo dejamos en fila */
@media (min-width: 769px) {
    #heartbeat-container {
        display: flex !important;
    }
}


/* AJUSTE MAESTRO DEL BUSCADOR + BOTONES EN ESCRITORIO */
@media (min-width: 769px) {
    /* 1. Contenedor del Buscador: que crezca todo lo posible */
    header .relative.w-full.max-w-md {
        max-width: 1100px !important; /* Aumentamos el límite máximo */
        flex: 1 !important; /* Le decimos que se estire */
        margin: 0 30px !important; /* Espacio lateral moderado */
        transition: all 0.3s ease;
    }

    /* 2. El input real: ancho total */
    #searchInput {
        width: 100% !important;
    }

    /* 3. BLOQUE DE BOTONES + HEARTBEAT: 
       Evitamos que se compriman y les damos prioridad de espacio */
    #hiddenButtonsContainer {
        display: flex !important;
        flex-shrink: 0 !important; /* ESTA ES LA CLAVE: prohíbe que el buscador lo aplaste */
        align-items: center !important;
        gap: 10px !important;
        min-width: max-content !important; /* Asegura que quepan todos los botones en fila */
    }

    /* 4. Monitor de Pulso en PC: 
       Aseguramos que respire dentro del menú */
    #heartbeat-container {
        display: flex !important;
        margin-right: 15px !important;
        border-right: 1px solid rgba(255, 255, 255, 0.1);
        padding-right: 15px !important;
        border-left: none !important; /* Quitamos el borde izquierdo si estorba */
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.animate-shake {
    animation: shake 0.2s ease-in-out 0s 2;
    border-color: #ff0000 !important;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5) !important;
}

#admin-pass-input::placeholder {
    color: rgba(239, 68, 68, 0.4);
    font-size: 9px;
}

/* --- MEJORA DE NITIDEZ PARA BOTONES ACTIVOS --- */
.btn-qr-active {
    animation: neon-pulse-white 2s infinite ease-in-out !important;
    background-color: rgba(255, 255, 255, 0.15) !important;
    border: 2px solid white !important;
    z-index: 99999 !important;
    opacity: 1 !important;
    pointer-events: auto !important;

    /* EL TRUCO PARA LA NITIDEZ: */
    -webkit-backface-visibility: hidden; /* Evita parpadeo en Chrome/Safari */
    backface-visibility: hidden;
    transform: translateZ(0); /* Fuerza al ordenador a usar la tarjeta gráfica para este botón */
    filter: blur(0) !important; /* Asegura que no herede el blur del menú */
}

/* Ajustamos la animación para que no emborrone el icono */
@keyframes neon-pulse-white {
    0% {
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.4);
        transform: scale(1) translateZ(0);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 30px rgba(63, 122, 189, 0.6);
        transform: scale(1.05) translateZ(0); /* Reducimos el escalado a 1.05 para que no pierda nitidez */
    }
    100% {
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.4);
        transform: scale(1) translateZ(0);
    }
}

/* Forzar que el SVG de Feather dentro del botón activo sea nítido */
.btn-qr-active svg {
    filter: drop-shadow(0 0 2px rgba(255,255,255,0.5)) !important;
    image-rendering: -webkit-optimize-contrast; /* Optimiza el renderizado de líneas */
}

/* --- HUD SCANNER PRO: ESTÉTICA DE COMBATE --- */

/* Línea láser de escaneo */
.scanner-laser {
    position: absolute;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, transparent, #ffffff, transparent);
    box-shadow: 0 0 15px #ffffff, 0 0 25px var(--arcprimary);
    z-index: 100;
    animation: laserMove 2.5s infinite ease-in-out;
    pointer-events: none;
}

@keyframes laserMove {
    0%, 100% { top: 5%; opacity: 0.2; }
    50% { top: 95%; opacity: 1; }
}

/* Decoraciones de las esquinas del visor */
.hud-corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 3px solid var(--arcprimary);
    opacity: 0.7;
}
.corner-tl { top: -10px; left: -10px; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.corner-tr { top: -10px; right: -10px; border-left: 0; border-bottom: 0; border-radius: 0 8px 0 0; }
.corner-bl { bottom: -10px; left: -10px; border-right: 0; border-top: 0; border-radius: 0 0 0 8px; }
.corner-br { bottom: -10px; right: -10px; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }

/* Texto técnico flotante */
.hud-data-text {
    position: absolute;
    font-family: 'Courier New', monospace;
    font-size: 8px;
    color: var(--text-color);
    text-shadow: 0 0 5px var(--text-color);
    letter-spacing: 1px;
    pointer-events: none;
    text-transform: uppercase;
}

/* --- HEARTBEAT STYLES --- */
.heartbeat-animation {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: hb-dash 3s linear infinite;
    filter: drop-shadow(0 0 5px currentColor);
}

@keyframes hb-dash {
    0% { stroke-dashoffset: 100; }
    100% { stroke-dashoffset: -100; }
}

/* Colores de estado */
.hb-stable { color: #00ff41 !important; stroke: #00ff41 !important; } /* Verde neón */
.hb-lag { color: #ffae00 !important; stroke: #ffae00 !important; }    /* Naranja neón */
.hb-lost { color: #ff003c !important; stroke: #ff003c !important; }   /* Rojo neón */

/* Ajuste para que se vea en el Header */
#heartbeat-container {
    transition: opacity 0.5s ease;
}

/* ================================================================
   SISTEMA DE CAPAS HCM - PRIORIDAD MÁXIMA AL MENÚ MÓVIL
   ================================================================ */

/* 1. EL CAJÓN DE TODOS LOS BOTONES (Móvil) */
/* Le damos un valor de un millón para que NADA lo atraviese */
@media (max-width: 768px) {
    #hiddenButtonsContainer {
        z-index: 1000000 !important;
        background: rgba(10, 10, 20, 0.98) !important; /* Casi opaco para que no se vea el error debajo */
    }
}

/* 2. EL BOTÓN HAMBURGUESA */
/* Debe estar por encima incluso del cajón para poder cerrarlo */
.hamburger {
    z-index: 1000001 !important;
}

/* 3. EL MENÚ DE OPCIONES (Settings - Importar/Exportar) */
/* Debe estar por encima de todo lo anterior */
#settingsMenu {
    z-index: 1000002 !important;
}

/* 4. SELECTORES DE LA SECCIÓN COMMS */
/* Los bajamos a un nivel básico (100) para que el menú (1.000.000) los tape siempre */

#customCommsUserSelector {
    position: relative !important;
    z-index: 200 !important; /* El de arriba tiene 200 */
}

#customCommsAlmacenSelector {
    position: relative !important;
    z-index: 100 !important; /* El de abajo tiene 100 */
}

/* 5. MENÚS DESPLEGABLES DE COMMS */
/* Les damos un pelín más que a su padre, pero siguen siendo mucho menores que el menú principal */
#commsUserOptions {
    z-index: 201 !important;
}

#commsAlmacenOptions {
    z-index: 101 !important;
}

/* 6. MODAL DE IMAGEN (El QR grande) */
/* Este es el único que debe tapar incluso al menú de iconos */
#qrBigModal {
    z-index: 2000000 !important;
}

/* ================================================================
   ARQUITECTURA DE CAPAS HCM (Z-INDEX MASTER) - CORREGIDO
   ================================================================ */

/* NIVEL 4: MODALES DE IMAGEN */
#qrBigModal, #itemModal {
    z-index: 9999999 !important;
}

/* NIVEL 3: NAVEGACIÓN (Header y Menú) */
header#mainHeader {
    z-index: 9000 !important;
}

.hamburger {
    z-index: 9999 !important;
}

/* --- CAMBIO CRÍTICO AQUÍ --- */
#hiddenButtonsContainer {
    z-index: 9500 !important;
}

/* Solo es absoluto en MÓVIL. En PC (escritorio) debe ser relativo para no romper el buscador */
@media (max-width: 768px) {
    #hiddenButtonsContainer {
        position: absolute !important;
        background: rgba(10, 10, 20, 0.98) !important;
    }
}
@media (min-width: 769px) {
    #hiddenButtonsContainer {
        position: relative !important; /* Mantiene el orden en PC */
        display: flex !important;
    }
}

#settingsMenu {
    z-index: 9999 !important;
}

/* NIVEL 2: CONTENIDO DE SECCIONES */
#qr-section, #dashboard-section, #calc-section, #receiver-section, #comms-section {
    position: relative !important;
    z-index: 10 !important;
}

/* NIVEL 1: SELECTORES INTERNOS (Dentro de Comms) */
#customCommsUserSelector {
    position: relative !important;
    z-index: 100 !important;
}

#customCommsAlmacenSelector {
    position: relative !important;
    z-index: 50 !important;
}

#commsUserOptions {
    z-index: 110 !important;
}

#commsAlmacenOptions {
    z-index: 60 !important;
}

/* NIVEL 0: FONDO */
.moving-bg, .bg-blur-overlay {
    z-index: -1 !important;
}

/* EFECTO DE CARGA DE IMÁGENES */
.gallery-img {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.gallery-img.loaded {
    opacity: 1;
}

/* Fondo animado mientras carga la foto */
.gallery-placeholder {
    background: linear-gradient(110deg, #1a1a1a 8%, #2a2a2a 18%, #1a1a1a 33%);
    background-size: 200% 100%;
    animation: shine-loading 1.5s linear infinite;
}

@keyframes shine-loading {
    to { background-position-x: -200%; }
}