/* styles.css - Diseño Corporativo Logístico */

:root {
    --bg-body: #F3F4F6;       /* Gris claro */
    --bg-nav: #1E293B;        /* Azul Noche */
    --bg-card: #FFFFFF;       /* Blanco */
    --primary: #2563EB;       /* Azul Rey (Botones/Links) */
    --primary-dark: #1D4ED8;  /* Azul oscuro (Hover) */
    --accent: #F97316;        /* Naranja (Acciones Fuertes) */
    --text-main: #111827;     /* Negro suave */
    --text-muted: #6B7280;    /* Gris texto secundario */
    --border: #E2E8F0;        /* Color de bordes */

    /* Semántica */
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
}

/* Reset y configuración base */

/* Página de Bienvenida */
.welcome-page {
    min-height: calc(100vh - 120px);
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.welcome-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%232563eb" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.welcome-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.welcome-card {
    background: rgba(30, 58, 138, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(37, 99, 235, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2563eb 0%, #3b82f6 50%, #2563eb 100%);
}

.welcome-header {
    text-align: center;
    margin-bottom: 40px;
}

.welcome-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
}

.welcome-icon i {
    font-size: 32px;
    color: white;
}

.welcome-title {
    font-family: 'Exo 2', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.welcome-subtitle {
    font-family: 'Rajdhani', sans-serif;
    font-size: 16px;
    color: #e2e8f0;
    margin: 0;
    font-weight: 500;
}

.welcome-form {
    width: 100%;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: flex;
    align-items: center;
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-label i {
    margin-right: 8px;
    color: #2563eb;
    width: 16px;
}

.form-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid rgba(37, 99, 235, 0.5);
    border-radius: 10px;
    font-size: 16px;
    font-family: 'Rajdhani', sans-serif;
    transition: all 0.3s ease;
    background: rgba(30, 58, 138, 0.8);
    color: #ffffff;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(30, 64, 175, 0.9);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
    transform: translateY(-2px);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

/* Contenedor para campos de contraseña con ícono del ojo */
.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-container .form-input {
    padding-right: 50px; /* Espacio para el ícono del ojo */
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    transition: color 0.3s ease;
    z-index: 10;
}

.password-toggle:hover {
    color: #2563eb;
}

.password-toggle:focus {
    outline: none;
    color: #2563eb;
}

.password-toggle i {
    transition: transform 0.3s ease;
}

.password-toggle:hover i {
    transform: scale(1.1);
}

/* Estilos para el generador masivo de etiquetas */
.btn-cantidad {
    transition: all 0.3s ease;
    font-weight: bold;
}

.btn-cantidad:hover {
    background: #2980b9 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-cantidad.active {
    background: #e67e22 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(230, 126, 34, 0.4);
}

#vistaPreviaSeries {
    border: 2px solid #e67e22;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

#listaSeriesGeneradas {
    line-height: 1.4;
    word-break: break-all;
}

/* Estilos para etiquetas de impresión - Horizontal 30mm x 20mm */
.etiqueta-impresion {
    width: 30mm;
    height: 20mm;
    border: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    page-break-after: always;
    margin: 0;
    padding: 0.5mm;
    background: white;
    position: relative;
    box-sizing: border-box;
}

.contenido-centrado {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.etiqueta-impresion .barcode-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.etiqueta-impresion .barcode {
    width: 100%;
    max-width: 28mm;
    height: 16mm;
    image-rendering: pixelated;
}

/* Media query para impresión - Orientación horizontal para Zebra */
@media print {
    .etiqueta-impresion {
        width: 30mm !important;
        height: 20mm !important;
        margin: 0 !important;
        padding: 0.5mm !important;
        border: none !important;
        page-break-after: always !important;
    }
    
    .contenido-centrado {
        width: 100% !important;
        height: 100% !important;
    }
    
    .etiqueta-impresion .barcode-container {
        width: 100% !important;
        height: 100% !important;
    }
    
    .etiqueta-impresion .barcode {
        width: 100% !important;
        max-width: 28mm !important;
        height: 16mm !important;
    }
    
    /* Optimización específica para impresoras Zebra */
    @page {
        size: 30mm 20mm;
        margin: 0;
    }
    
    body {
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
        width: 30mm !important;
        height: 20mm !important;
    }
}

/* Estilos para botón de imagen del repuesto */
.btn-imagen-repuesto {
    user-select: none;
}

.btn-imagen-repuesto:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4) !important;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%) !important;
    border-color: #2563eb !important;
}

.btn-imagen-repuesto:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5) !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
}

.btn-eliminar-imagen:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3) !important;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%) !important;
    border-color: #3b82f6 !important;
    color: #ff6b7a !important;
}

.btn-eliminar-imagen:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5) !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
}

.welcome-btn {
    width: 100%;
    padding: 18px 30px;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-family: 'Exo 2', sans-serif;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
    margin-top: 10px;
}

.welcome-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(37, 99, 235, 0.4);
    background: linear-gradient(135deg, #d4000f 0%, #ff3742 100%);
}

.welcome-btn:active {
    transform: translateY(-1px);
}

.welcome-btn i {
    font-size: 20px;
}

.welcome-footer {
    margin-top: 30px;
    text-align: center;
}

.welcome-info {
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    color: #e2e8f0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.welcome-info i {
    color: #2563eb;
}

.forgot-password {
    margin-bottom: 15px;
    text-align: center;
}

.forgot-link {
    color: #2563eb;
    text-decoration: none;
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.forgot-link:hover {
    color: #3b82f6;
    text-decoration: underline;
}

.forgot-link i {
    font-size: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .welcome-page {
        padding: 20px 15px;
        text-align: center;
    }
    
    .welcome-container {
        max-width: 100%;
        margin: 0 auto;
    }
    
    .welcome-card {
        padding: 30px 25px;
        margin: 0 auto;
    }
    
    .welcome-title {
        font-size: 24px;
    }
    
    .welcome-icon {
        width: 60px;
        height: 60px;
    }
    
    .welcome-icon i {
        font-size: 24px;
    }
    
    .logo-top-right .toshiba-logo-image {
        max-width: 430px;
        max-height: 100px;
        background: transparent;
    }
    
    .header-content {
        padding: 12px;
        padding-top: 80px;
        gap: 12px;
    }
    
    /* Reorganización del header para tablets */
    .logo-top-right {
        position: static;
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }
    
    .user-section {
        position: static !important;
        width: 100%;
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px !important;
    }
    
    .user-section #authStatus {
        font-size: 0.85rem;
        text-align: center;
        max-width: 100%;
        flex-basis: 100%;
        order: 1;
        padding: 10px;
        background: rgba(37, 99, 235, 0.1);
        border-radius: 6px;
        border: 1px solid rgba(37, 99, 235, 0.3);
    }
    
    .user-section #authStatus div {
        text-align: center !important;
    }
    
    .user-section #authStatus div:first-child {
        font-size: 0.9rem;
        margin-bottom: 4px;
    }
    
    .user-section #authStatus div:last-child {
        font-size: 0.75rem;
        justify-content: center;
    }
    
    #languageSelector {
        order: 2;
        justify-content: center;
    }
    
    .user-section button {
        order: 3;
        font-size: 0.75rem;
        padding: 8px 12px;
    }
    
    .header-main-content {
        margin-top: 10px;
    }
    
    .main-title {
        font-size: 1.2rem;
        text-align: center;
    }
    
    .title-text {
        word-break: break-word;
    }
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Exo 2', 'Rajdhani', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #1e3a8a 100%);
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Contenedor principal */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* Header moderno estilo ZTOREMAX */
.modern-header {
    position: relative;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #1e3a8a 100%);
    min-height: 190px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-bottom: 3px solid #3b82f6;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    cursor: default;
}

/* Barra de navegación bajo el header */
.top-nav {
    background: linear-gradient(180deg, rgba(30, 58, 138, 0.95) 0%, rgba(30, 64, 175, 0.9) 100%);
    border-bottom: 1px solid rgba(37, 99, 235, 0.3);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.top-nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    gap: 10px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(37, 99, 235, 0.2);
    border: 1px solid rgba(37, 99, 235, 0.4);
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* Cursor personalizado para el encabezado */
.modern-header:hover {
    cursor: default;
}

.modern-header::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.8) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.modern-header:hover::after {
    opacity: 1;
    animation: cursorGlow 2s ease-in-out infinite;
}

@keyframes cursorGlow {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0.4;
    }
}

.header-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(37, 99, 235, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.15) 0%, transparent 50%),
        linear-gradient(45deg, #1e3a8a 0%, #1e40af 50%, #1e3a8a 100%);
    overflow: hidden;
}

/* Partículas flotantes animadas */
.header-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(37, 99, 235, 0.8), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(37, 99, 235, 0.6), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(37, 99, 235, 0.9), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(37, 99, 235, 0.7), transparent),
        radial-gradient(2px 2px at 160px 30px, rgba(37, 99, 235, 0.5), transparent),
        radial-gradient(1px 1px at 200px 60px, rgba(37, 99, 235, 0.8), transparent),
        radial-gradient(2px 2px at 240px 20px, rgba(37, 99, 235, 0.6), transparent),
        radial-gradient(1px 1px at 280px 70px, rgba(37, 99, 235, 0.9), transparent),
        radial-gradient(2px 2px at 320px 40px, rgba(37, 99, 235, 0.7), transparent),
        radial-gradient(1px 1px at 360px 80px, rgba(37, 99, 235, 0.5), transparent);
    background-repeat: repeat;
    background-size: 400px 100px;
    animation: particleFloat 20s linear infinite;
    opacity: 0.6;
}

/* Líneas de conexión estilo Matrix */
.header-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, transparent 0%, rgba(37, 99, 235, 0.1) 25%, transparent 50%, rgba(37, 99, 235, 0.1) 75%, transparent 100%),
        linear-gradient(0deg, transparent 0%, rgba(37, 99, 235, 0.05) 25%, transparent 50%, rgba(37, 99, 235, 0.05) 75%, transparent 100%);
    background-size: 200px 200px, 150px 150px;
    animation: matrixLines 15s linear infinite;
    opacity: 0.4;
}

/* Animación de partículas flotantes */
@keyframes particleFloat {
    0% { transform: translateY(0px) translateX(0px); }
    25% { transform: translateY(-10px) translateX(5px); }
    50% { transform: translateY(-5px) translateX(-3px); }
    75% { transform: translateY(-15px) translateX(8px); }
    100% { transform: translateY(0px) translateX(0px); }
}

/* Animación de líneas Matrix */
@keyframes matrixLines {
    0% { transform: translateX(0px) translateY(0px); }
    100% { transform: translateX(200px) translateY(200px); }
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.3) 100%);
}

.header-pattern {
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(37, 99, 235, 0.03) 10px,
            rgba(37, 99, 235, 0.03) 20px
        );
    opacity: 0.3;
    animation: patternPulse 8s ease-in-out infinite;
}

/* Ondas de energía que se propagan */
.header-energy-waves {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.energy-wave {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(37, 99, 235, 0.6);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: energyPulse 3s ease-out infinite;
}

.energy-wave:nth-child(2) {
    animation-delay: 1s;
    border-color: rgba(37, 99, 235, 0.4);
}

.energy-wave:nth-child(3) {
    animation-delay: 2s;
    border-color: rgba(37, 99, 235, 0.2);
}

/* Efectos de brillo dinámico */
.header-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 30% 20%, rgba(37, 99, 235, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(37, 99, 235, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(37, 99, 235, 0.08) 0%, transparent 60%);
    animation: glowPulse 6s ease-in-out infinite;
    opacity: 0.7;
}

/* Circuitos electrónicos complejos con nodos */
.header-circuits {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        /* Líneas horizontales principales */
        linear-gradient(90deg, transparent 0%, rgba(37, 99, 235, 0.15) 1%, transparent 2%),
        linear-gradient(90deg, transparent 0%, rgba(37, 99, 235, 0.1) 0.5%, transparent 1%),
        /* Líneas verticales principales */
        linear-gradient(0deg, transparent 0%, rgba(37, 99, 235, 0.15) 1%, transparent 2%),
        linear-gradient(0deg, transparent 0%, rgba(37, 99, 235, 0.1) 0.5%, transparent 1%),
        /* Líneas diagonales */
        linear-gradient(45deg, transparent 0%, rgba(37, 99, 235, 0.08) 0.5%, transparent 1%),
        linear-gradient(-45deg, transparent 0%, rgba(37, 99, 235, 0.08) 0.5%, transparent 1%),
        /* Líneas de conexión secundarias */
        linear-gradient(30deg, transparent 0%, rgba(37, 99, 235, 0.05) 0.3%, transparent 0.6%),
        linear-gradient(-30deg, transparent 0%, rgba(37, 99, 235, 0.05) 0.3%, transparent 0.6%);
    background-size: 120px 120px, 60px 60px, 120px 120px, 60px 60px, 80px 80px, 80px 80px, 40px 40px, 40px 40px;
    animation: circuitFlow 15s linear infinite;
    opacity: 0.4;
}

/* Nodos de conexión brillantes */
.header-circuit-nodes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(3px 3px at 20px 30px, rgba(37, 99, 235, 0.9), transparent),
        radial-gradient(2px 2px at 60px 80px, rgba(37, 99, 235, 0.8), transparent),
        radial-gradient(4px 4px at 100px 20px, rgba(37, 99, 235, 0.7), transparent),
        radial-gradient(2px 2px at 140px 70px, rgba(37, 99, 235, 0.9), transparent),
        radial-gradient(3px 3px at 180px 40px, rgba(37, 99, 235, 0.6), transparent),
        radial-gradient(2px 2px at 220px 90px, rgba(37, 99, 235, 0.8), transparent),
        radial-gradient(4px 4px at 260px 10px, rgba(37, 99, 235, 0.7), transparent),
        radial-gradient(2px 2px at 300px 60px, rgba(37, 99, 235, 0.9), transparent),
        radial-gradient(3px 3px at 340px 30px, rgba(37, 99, 235, 0.5), transparent),
        radial-gradient(2px 2px at 380px 80px, rgba(37, 99, 235, 0.8), transparent);
    background-repeat: repeat;
    background-size: 400px 100px;
    animation: nodePulse 8s ease-in-out infinite;
    opacity: 0.7;
}

/* Efectos de datos fluyendo */
.header-data-flow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(90deg, transparent 0%, rgba(37, 99, 235, 0.3) 20%, transparent 40%),
        linear-gradient(0deg, transparent 0%, rgba(37, 99, 235, 0.2) 20%, transparent 40%),
        linear-gradient(45deg, transparent 0%, rgba(37, 99, 235, 0.15) 20%, transparent 40%),
        linear-gradient(-45deg, transparent 0%, rgba(37, 99, 235, 0.15) 20%, transparent 40%);
    background-size: 200px 200px, 200px 200px, 150px 150px, 150px 150px;
    animation: dataFlow 10s linear infinite;
    opacity: 0.3;
}

/* Efectos de conexión entre nodos */
.header-connections {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(90deg, transparent 0%, rgba(37, 99, 235, 0.1) 1%, transparent 2%),
        linear-gradient(0deg, transparent 0%, rgba(37, 99, 235, 0.1) 1%, transparent 2%),
        linear-gradient(45deg, transparent 0%, rgba(37, 99, 235, 0.08) 1%, transparent 2%),
        linear-gradient(-45deg, transparent 0%, rgba(37, 99, 235, 0.08) 1%, transparent 2%);
    background-size: 80px 80px, 80px 80px, 60px 60px, 60px 60px;
    animation: connectionFlow 12s linear infinite;
    opacity: 0.2;
}

/* Animaciones */
@keyframes patternPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.02); }
}

@keyframes energyPulse {
    0% {
        width: 20px;
        height: 20px;
        opacity: 1;
    }
    100% {
        width: 400px;
        height: 400px;
        opacity: 0;
    }
}

@keyframes glowPulse {
    0%, 100% { 
        opacity: 0.7;
        transform: scale(1);
    }
    50% { 
        opacity: 1;
        transform: scale(1.05);
    }
}

@keyframes circuitFlow {
    0% { transform: translateX(0px) translateY(0px); }
    100% { transform: translateX(120px) translateY(120px); }
}

@keyframes nodePulse {
    0%, 100% { 
        opacity: 0.7;
        transform: scale(1);
    }
    50% { 
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes dataFlow {
    0% { transform: translateX(0px) translateY(0px); }
    100% { transform: translateX(200px) translateY(200px); }
}

@keyframes connectionFlow {
    0% { transform: translateX(0px) translateY(0px); }
    100% { transform: translateX(80px) translateY(80px); }
}

/* Efectos de interfaz digital */
.header-digital-interface {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        /* Iconos de interfaz simulados */
        radial-gradient(8px 8px at 50px 50px, rgba(37, 99, 235, 0.6), transparent),
        radial-gradient(6px 6px at 150px 80px, rgba(37, 99, 235, 0.5), transparent),
        radial-gradient(8px 8px at 250px 30px, rgba(37, 99, 235, 0.7), transparent),
        radial-gradient(6px 6px at 350px 70px, rgba(37, 99, 235, 0.4), transparent),
        radial-gradient(8px 8px at 450px 20px, rgba(37, 99, 235, 0.6), transparent),
        radial-gradient(6px 6px at 550px 90px, rgba(37, 99, 235, 0.5), transparent);
    background-repeat: repeat;
    background-size: 600px 120px;
    animation: interfacePulse 6s ease-in-out infinite;
    opacity: 0.4;
}

/* Efectos de mano digital */
.header-digital-hand {
    position: absolute;
    top: 20%;
    right: 15%;
    width: 100px;
    height: 100px;
    background-image: 
        radial-gradient(2px 2px at 20px 20px, rgba(37, 99, 235, 0.8), transparent),
        radial-gradient(2px 2px at 40px 30px, rgba(37, 99, 235, 0.6), transparent),
        radial-gradient(2px 2px at 60px 20px, rgba(37, 99, 235, 0.7), transparent),
        radial-gradient(2px 2px at 80px 40px, rgba(37, 99, 235, 0.5), transparent),
        radial-gradient(2px 2px at 30px 60px, rgba(37, 99, 235, 0.8), transparent),
        radial-gradient(2px 2px at 50px 70px, rgba(37, 99, 235, 0.6), transparent),
        radial-gradient(2px 2px at 70px 60px, rgba(37, 99, 235, 0.7), transparent),
        radial-gradient(2px 2px at 90px 80px, rgba(37, 99, 235, 0.5), transparent);
    background-repeat: no-repeat;
    background-size: 100px 100px;
    animation: handGlow 4s ease-in-out infinite;
    opacity: 0.6;
    pointer-events: none;
}

/* Efectos de conexión de datos */
.header-data-streams {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(90deg, transparent 0%, rgba(37, 99, 235, 0.2) 10%, transparent 20%),
        linear-gradient(0deg, transparent 0%, rgba(37, 99, 235, 0.15) 10%, transparent 20%),
        linear-gradient(45deg, transparent 0%, rgba(37, 99, 235, 0.1) 10%, transparent 20%),
        linear-gradient(-45deg, transparent 0%, rgba(37, 99, 235, 0.1) 10%, transparent 20%);
    background-size: 300px 300px, 300px 300px, 200px 200px, 200px 200px;
    animation: streamFlow 8s linear infinite;
    opacity: 0.3;
}

@keyframes interfacePulse {
    0%, 100% { 
        opacity: 0.4;
        transform: scale(1);
    }
    50% { 
        opacity: 0.7;
        transform: scale(1.05);
    }
}

@keyframes handGlow {
    0%, 100% { 
        opacity: 0.6;
        filter: brightness(1);
    }
    50% { 
        opacity: 0.9;
        filter: brightness(1.5);
    }
}

@keyframes streamFlow {
    0% { transform: translateX(0px) translateY(0px); }
    100% { transform: translateX(300px) translateY(300px); }
}

.header-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 24px 16px;
    padding-top: 120px;
    gap: 16px;
    animation: headerBreathe 8s ease-in-out infinite;
}

.header-main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 16px;
}

@keyframes headerBreathe {
    0%, 100% { 
        transform: scale(1);
        filter: brightness(1);
    }
    50% { 
        transform: scale(1.01);
        filter: brightness(1.05);
    }
}

.logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 8px;
    background: transparent;
}

.logo-top-right {
    position: absolute;
    top: 16px;
    left: 16px;
    width: auto;
    margin-bottom: 0;
    z-index: 3;
    background: transparent;
}

.logo-top-right .toshiba-logo-image {
    height: auto;
    width: auto;
    max-width: 720px;
    max-height: 144px;
    object-fit: contain;
    background: transparent;
    filter: none !important;
    transition: all 0.3s ease;
}

.toshiba-logo-image {
    height: auto;
    width: 100%;
    max-width: 900px;
    max-height: 180px;
    object-fit: contain;
    background: transparent;
    filter: none !important;
    transition: all 0.3s ease;
}

.toshiba-logo-image:hover {
    transform: scale(1.05);
    filter: drop-shadow(2px 2px 8px rgba(0, 0, 0, 0.3)) !important;
}


.title-section {
    width: 100%;
    text-align: center;
    position: relative;
}

.main-title {
    font-size: 1.6rem;
    font-weight: 900;
    color: #ffffff;
    margin: 0;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.title-icon {
    color: #2563eb;
    font-size: 1.8rem;
    display: flex;
    gap: 10px;
}

/* Ícono del título sin animación (estático) */
.title-icon i {
    animation: none;
}

.title-text {
    color: #ffffff;
    background: none;
    background-size: initial;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: initial;
    background-clip: initial;
    animation: titlePulse 4s ease-in-out infinite;
    position: relative;
}

.title-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(37, 99, 235, 0.1) 50%, transparent 70%);
    animation: titleShine 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes titlePulse {
    0%, 100% { 
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    }
    50% { 
        text-shadow: 2px 2px 8px rgba(37, 99, 235, 0.6), 0 0 20px rgba(37, 99, 235, 0.3);
    }
}

@keyframes titleShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.subtitle-modern {
    font-size: 1.1rem;
    color: #e2e8f0;
    font-weight: 300;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.title-accent {
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #2563eb, #2563eb);
    margin: 0 auto;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.5);
}

/* Contenido principal */
.main-content {
    padding: 40px 0;
    position: relative;
}

/* Secciones del formulario */
.form-section {
    background: rgba(30, 58, 138, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(37, 99, 235, 0.4);
    border-radius: 12px;
    padding: 22px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    max-width: 100%;
    width: 100%;
    color: #ffffff;
}

.form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #2563eb, #2563eb);
}

.section-header {
    background: linear-gradient(135deg, #2563eb 0%, #2563eb 100%);
    color: white;
    padding: 15px 25px;
    margin: -30px -30px 25px -30px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.section-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    font-family: 'Exo 2', 'Rajdhani', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h2 i {
    color: #ffffff;
    font-size: 1.1rem;
}

.section-header .btn {
    font-size: 0.85rem;
    padding: 8px 16px;
    min-width: auto;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    transition: all 0.3s ease;
}

.section-header .btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.section-header .btn i {
    margin-right: 6px;
}

/* Formulario */
.form-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-bottom: 30px;
}

/* Grid para los 4 subcuadros del formulario de ingreso */
.ingreso-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 16px;
}

/* Subpanel genérico inspirado en el diseño de la imagen */
.subpanel {
    border: 2px solid rgba(37, 99, 235, 0.5);
    border-radius: 10px;
    padding: 12px;
    background: rgba(30, 58, 138, 0.7);
}

.subpanel-header {
    font-weight: 800;
    font-size: 0.9rem;
    color: #ffffff;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-left: 4px solid #3b82f6;
    padding-left: 8px;
}

.subpanel-body {
    padding: 6px 2px 2px 2px;
}

/* Ubicación de cada subcuadro para un layout 2x2 */
.subpanel-ingreso { grid-column: 1 / span 1; grid-row: 1 / span 2; }
.subpanel-diagnostico { grid-column: 2 / span 1; grid-row: 1 / span 1; }
.subpanel-reparacion { grid-column: 2 / span 1; grid-row: 2 / span 1; }
.subpanel-salida { grid-column: 3 / span 1; grid-row: 1 / span 2; }

/* Colores específicos para cada etapa según la guía de paleta */
/* Etapa Ingreso: Azul (#2563EB) */
.subpanel-ingreso {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
}

.subpanel-ingreso .subpanel-header {
    border-left-color: var(--primary);
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    padding: 8px;
    border-radius: 4px;
}

/* Diagnóstico: Gris (#6B7280) */
.subpanel-diagnostico {
    border-color: var(--text-muted);
    background: rgba(107, 114, 128, 0.1);
}

.subpanel-diagnostico .subpanel-header {
    border-left-color: var(--text-muted);
    color: var(--text-muted);
    background: rgba(107, 114, 128, 0.1);
    padding: 8px;
    border-radius: 4px;
}

/* Etapa Salida: Naranja (#F97316) */
.subpanel-salida {
    border-color: var(--accent);
    background: rgba(249, 115, 22, 0.1);
}

.subpanel-salida .subpanel-header {
    border-left-color: var(--accent);
    color: var(--accent);
    background: rgba(249, 115, 22, 0.1);
    padding: 8px;
    border-radius: 4px;
}

/* Colores para movimientos según la guía de paleta */
/* Ingresos: Verde (#10B981) */
.movimiento-ingreso,
tr.movimiento-ingreso,
.movimiento-ingreso td {
    background-color: rgba(16, 185, 129, 0.1) !important;
    border-left: 4px solid var(--success) !important;
}

.movimiento-ingreso .badge-ingreso,
.badge-ingreso {
    background-color: var(--success);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
}

/* Descuentos: Rojo (#EF4444) */
.movimiento-descuento,
tr.movimiento-descuento,
.movimiento-descuento td {
    background-color: rgba(239, 68, 68, 0.1) !important;
    border-left: 4px solid var(--danger) !important;
}

.movimiento-descuento .badge-descuento,
.badge-descuento {
    background-color: var(--danger);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
}

/* Estilos para estadísticas - usar variables CSS */
.stat-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-main) !important;
}

.stat-card h3 {
    color: var(--primary) !important;
}

.stat-value {
    color: var(--primary) !important;
}

.stat-label {
    color: var(--text-muted) !important;
}

.chart-container {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
}

.chart-container h3 {
    color: var(--primary) !important;
}

.chart-container p {
    color: var(--text-muted) !important;
}

@media (max-width: 1024px) {
    .ingreso-grid { grid-template-columns: 1fr; }
    .subpanel-ingreso, .subpanel-diagnostico, .subpanel-reparacion, .subpanel-salida { grid-column: auto; grid-row: auto; }
}

/* Botones del formulario */
.form-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-row label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-row input,
.form-row select {
    padding: 9px 12px;
    border: 2px solid rgba(37, 99, 235, 0.5);
    border-radius: 6px;
    background: rgba(30, 58, 138, 0.8);
    color: #ffffff;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.form-row input:focus,
.form-row select:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(30, 64, 175, 0.9);
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.4);
}

.form-row input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Estilos específicos para campos datetime-local */
.form-row input[type="datetime-local"] {
    color-scheme: dark;
}

.form-row input[type="datetime-local"]:invalid {
    border-color: rgba(37, 99, 235, 0.5);
}

.form-row input[type="datetime-local"]:required:invalid {
    border-color: rgba(37, 99, 235, 0.7);
}

.form-row input[type="datetime-local"]:required:valid {
    border-color: rgba(40, 167, 69, 0.5);
}

.form-row select option {
    background: #1e3a8a;
    color: #ffffff;
}

/* Botones */
.btn {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 140px;
    position: relative;
    overflow: hidden;
    flex: 1;
    max-width: 200px;
    text-decoration: none;
    color: inherit;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6);
}

.btn-outline {
    background: transparent;
    color: #2563eb;
    border: 2px solid #2563eb;
}

.btn-outline:hover {
    background: #2563eb;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    animation: buttonPulse 1.5s ease-in-out infinite;
}

/* Botón de peligro (eliminar) - rojo sólido */
.btn-danger {
    background: linear-gradient(135deg, #2563eb 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6);
}

/* Botón secundario (uso general, no solo en formularios) */
.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.6);
}

@keyframes buttonPulse {
    0%, 100% { 
        box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    }
    50% { 
        box-shadow: 0 6px 25px rgba(37, 99, 235, 0.6), 0 0 30px rgba(37, 99, 235, 0.3);
    }
}

/* Estilos específicos para botones del formulario */
.form-actions .btn {
    min-width: 130px;
    max-width: 170px;
    flex: 1;
}

.form-actions .btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.form-actions .btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.form-actions .btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
}

/* Contenedor de serie y QR */
.serie-qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    margin-top: 30px;
}

.serie-display {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.3) 0%, rgba(30, 58, 138, 0.5) 100%);
    border: 2px solid #3b82f6;
    border-radius: 10px;
    padding: 18px;
    text-align: center;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.serie-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #2563eb, #2563eb);
}

.serie-number {
    font-size: 1.6rem;
    font-weight: 900;
    font-family: 'Exo 2', 'Rajdhani', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    color: #ffffff;
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.qr-section {
    display: flex;
    justify-content: center;
    width: 100%;
}

.qr-container {
    background: rgba(30, 58, 138, 0.7);
    border-radius: 10px;
    padding: 20px;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 280px;
    margin: 15px auto 0 auto;
    backdrop-filter: blur(5px);
}

.qr-container img {
    max-width: 200px;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Contadores de Orden Lab */
.contadores-section {
    margin-top: 20px;
    margin-bottom: 15px;
    background: rgba(30, 58, 138, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(37, 99, 235, 0.4);
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    max-width: 100%;
    width: 100%;
}

.contadores-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #2563eb, #2563eb);
}

.historial-section {
    background: rgba(30, 58, 138, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(37, 99, 235, 0.4);
    border-radius: 12px;
    padding: 22px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    max-width: 100%;
    width: 100%;
    color: #ffffff;
}

.historial-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #2563eb, #2563eb);
}

.contador-card {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.9) 0%, rgba(30, 64, 175, 0.8) 100%);
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
    color: #ffffff;
    text-align: center;
    border: 1px solid rgba(37, 99, 235, 0.4);
}

.contador-header {
    margin-bottom: 15px;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    margin: -30px -30px 25px -30px;
    padding: 15px 25px;
    border-radius: 15px 15px 0 0;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    color: #ffffff;
}

.contador-header i {
    font-size: 1.2em;
    opacity: 0.9;
    flex-shrink: 0;
}

.contador-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    font-family: 'Exo 2', 'Rajdhani', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contador-content {
    display: flex;
    justify-content: center;
    gap: 25px;
}

.contador-item {
    flex: 0 0 auto;
    min-width: 100px;
    max-width: 140px;
    width: auto;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.8) 0%, rgba(192, 57, 43, 0.7) 100%);
    border-radius: 8px;
    padding: 12px 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(37, 99, 235, 0.4);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
    text-align: center;
}

.contador-number {
    font-size: 2.2em;
    font-weight: 900;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    color: #fff;
}

.contador-label {
    font-size: 0.85em;
    font-weight: 500;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* Responsive para contadores */
@media (max-width: 768px) {
    .contador-content {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .contador-item {
        min-width: 90px;
        max-width: 120px;
        padding: 10px 14px;
    }
    
    .contador-number {
        font-size: 2em;
    }
    
    .contador-card {
        padding: 15px;
    }
    
    .contador-header {
        margin: -15px -15px 15px -15px;
        padding: 12px 15px;
    }
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(37, 99, 235, 0.5);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(37, 99, 235, 0.5);
}

.modal-header h3 {
    font-size: 1.4rem;
    font-weight: 700;
    font-family: 'Exo 2', 'Rajdhani', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h3 i {
    font-size: 1.2rem;
    opacity: 0.9;
}

.modal-header .close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.modal-header .close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.modal-body {
    padding: 25px;
    color: #ffffff;
    overflow-y: auto;
    max-height: calc(90vh - 100px);
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(37, 99, 235, 0.6);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(37, 99, 235, 0.8);
}

/* Estilos específicos para modal de registro */
.modal-registro-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.modal-registro-item {
    background: rgba(30, 58, 138, 0.6);
    border: 1px solid rgba(37, 99, 235, 0.4);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.modal-registro-item:hover {
    background: rgba(30, 64, 175, 0.8);
    border-color: rgba(37, 99, 235, 0.6);
    transform: translateY(-2px);
}

.modal-registro-label {
    font-weight: 600;
    color: #2563eb;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-registro-value {
    color: #ffffff;
    font-size: 1rem;
    word-break: break-word;
    line-height: 1.4;
}

.modal-registro-value:empty::after {
    content: "Sin información";
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

/* Estilos específicos para modal de QR */
.modal-qr-content {
    text-align: center;
    padding: 20px 0;
}

.modal-qr-image {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    margin: 0 auto 25px auto;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    display: inline-block;
    max-width: 100%;
}

.modal-qr-image img {
    max-width: 250px;
    height: auto;
    border-radius: 8px;
}

.modal-qr-info {
    background: rgba(30, 58, 138, 0.6);
    border: 1px solid rgba(37, 99, 235, 0.4);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: left;
}

.modal-qr-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-qr-info-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.modal-qr-info-label {
    font-weight: 600;
    color: #2563eb;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-qr-info-value {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
}

.modal-qr-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.modal-qr-actions .btn {
    min-width: 120px;
    padding: 10px 15px;
    font-size: 0.85rem;
}

.modal-qr-actions .btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.modal-qr-actions .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.6);
}

/* Indicadores de validación de contraseña */
.password-requirements {
    margin-top: 10px;
    padding: 10px;
    background: rgba(30, 58, 138, 0.6);
    border-radius: 6px;
    border: 1px solid rgba(37, 99, 235, 0.4);
}

.requirement {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.requirement:last-child {
    margin-bottom: 0;
}

.requirement i {
    width: 12px;
    font-size: 0.8rem;
}

.requirement.valid {
    color: #28a745;
}

.requirement.valid i {
    color: #28a745;
}

.requirement.invalid {
    color: #dc3545;
}

.requirement.invalid i {
    color: #dc3545;
}

.password-match {
    margin-top: 8px;
    padding: 6px 10px;
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    border-radius: 4px;
    color: #28a745;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.password-match i {
    color: #28a745;
}

.password-match.error {
    background: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.3);
    color: #dc3545;
}

.password-match.error i {
    color: #dc3545;
}

/* Botón deshabilitado */
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Responsive para modales */
@media (max-width: 768px) {
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-header h3 {
        font-size: 1.2rem;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-registro-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .modal-qr-image img {
        max-width: 200px;
    }
    
    .modal-qr-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .modal-qr-actions .btn {
        width: 100%;
        max-width: 250px;
    }
    
    .password-requirements {
        padding: 8px;
    }
    
    .requirement {
        font-size: 0.8rem;
    }
}

/* Botones de Filtro por Estado */
.btn-filter {
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid rgba(37, 99, 235, 0.5);
    border-radius: 6px;
    background: rgba(30, 58, 138, 0.7);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-filter:hover {
    background: rgba(37, 99, 235, 0.2);
    border-color: rgba(37, 99, 235, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.btn-filter-active {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    border-color: #3b82f6;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.5);
    font-weight: 700;
}

.btn-filter-active:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    transform: translateY(-1px);
}

/* Historial */
.historial-container {
    margin-top: 20px;
    background: rgba(30, 58, 138, 0.8);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(37, 99, 235, 0.4);
}

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

.historial-table table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(30, 58, 138, 0.8);
}

/* Estilos para tabla resumida */
.historial-table th {
    background: linear-gradient(135deg, #2563eb 0%, #2563eb 100%);
    color: white;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.8rem;
    white-space: nowrap;
}

.historial-table td {
    padding: 10px 8px;
    border-bottom: 1px solid rgba(37, 99, 235, 0.3);
    color: #ffffff;
    font-size: 0.85rem;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: rgba(30, 58, 138, 0.8);
}

/* Tooltip para texto truncado */
.historial-table td[title] {
    cursor: help;
    position: relative;
}

.historial-table td[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Columna de acciones más ancha */
.historial-table td:last-child {
    max-width: 120px;
    text-align: center;
}

/* Responsive para tabla resumida */
@media (max-width: 1200px) {
    .historial-table th,
    .historial-table td {
        padding: 8px 6px;
        font-size: 0.8rem;
    }
    
    .historial-table td {
        max-width: 120px;
    }
}

@media (max-width: 992px) {
    .historial-table th,
    .historial-table td {
        padding: 6px 4px;
        font-size: 0.75rem;
    }
    
    .historial-table td {
        max-width: 100px;
    }
    
    .historial-table td:last-child {
        max-width: 100px;
    }
}

@media (max-width: 768px) {
    .historial-table {
        font-size: 0.7rem;
    }
    
    .historial-table th,
    .historial-table td {
        padding: 4px 2px;
    }
    
    .historial-table td {
        max-width: 80px;
    }
    
    .historial-table td:last-child {
        max-width: 80px;
    }
    
    .historial-table td:last-child .btn {
        padding: 4px 6px;
        font-size: 0.7rem;
    }
}

/* Celda de Orden Lab destacada en modo oscuro */
.historial-table td.orden-lab-cell {
    font-weight: 800;
    background: rgba(37, 99, 235, 0.3);
    color: #ffffff;
}

/* Forzar estilo oscuro también durante edición en línea */
.historial-table td[contenteditable="true"] {
    background: rgba(30, 64, 175, 0.6);
    outline: none;
    color: #ffffff;
}

.historial-table td[contenteditable="true"]:focus {
    background: rgba(37, 99, 235, 0.4);
    box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.7);
}

.historial-table tr:nth-child(even) {
    background: rgba(30, 64, 175, 0.6);
}

.historial-table tr:hover {
    background: rgba(37, 99, 235, 0.05);
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .main-title {
        font-size: 1.8rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .form-container {
        grid-template-columns: 1fr;
    }
    
    .serie-qr-container {
        gap: 20px;
    }
    
    .section-header {
        flex-direction: column;
        text-align: center;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .form-actions .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* Media queries mejoradas para móviles */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .modern-header {
        min-height: auto;
        padding-bottom: 15px;
    }
    
    .header-content {
        padding: 8px;
        padding-top: 60px;
        gap: 12px;
        flex-direction: column;
        align-items: center;
    }
    
    /* Logo reorganizado para móviles */
    .logo-top-right {
        position: static !important;
        top: auto;
        left: auto;
        width: 100%;
        text-align: center;
        margin-bottom: 8px;
        order: 1;
    }
    
    .logo-top-right .toshiba-logo-image {
        max-width: 260px;
        max-height: 65px;
        margin: 0 auto;
        background: transparent;
    }
    
    .toshiba-logo-modern {
        font-size: 1.5rem;
    }
    
    /* Sección de usuario reorganizada */
    .user-section {
        position: static !important;
        top: auto !important;
        right: auto !important;
        width: 100%;
        flex-direction: column;
        gap: 8px !important;
        align-items: center;
        order: 2;
        margin-bottom: 8px;
    }
    
    /* Mensaje de bienvenida centrado */
    .user-section #authStatus {
        font-size: 0.75rem;
        word-break: break-word;
        text-align: center;
        max-width: 100%;
        width: 100%;
        padding: 8px;
        background: rgba(37, 99, 235, 0.1);
        border-radius: 6px;
        border: 1px solid rgba(37, 99, 235, 0.3);
        display: block;
    }
    
    .user-section #authStatus div {
        text-align: center !important;
        width: 100%;
    }
    
    .user-section #authStatus div:first-child {
        font-size: 0.8rem;
        font-weight: 600;
        color: #fff;
        margin-bottom: 4px;
    }
    
    .user-section #authStatus div:last-child {
        font-size: 0.7rem;
        color: #ccc;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 4px;
    }
    
    /* Selector de idioma centrado */
    #languageSelector {
        justify-content: center;
        flex-wrap: nowrap;
        gap: 5px !important;
        width: 100%;
    }
    
    #languageSelector button {
        padding: 6px 12px !important;
        font-size: 11px !important;
        flex: 1;
        max-width: 60px;
    }
    
    /* Botones de acción en fila */
    .user-section button {
        font-size: 0.7rem;
        padding: 8px 12px;
        min-width: auto;
        width: 100%;
        max-width: 200px;
    }
    
    .user-section button i {
        margin-right: 4px;
    }
    
    /* Título principal reorganizado */
    .header-main-content {
        order: 3;
        width: 100%;
        margin-top: 8px;
    }
    
    .main-title {
        font-size: 0.95rem;
        margin-bottom: 4px;
        flex-wrap: wrap;
        gap: 5px;
        text-align: center;
        line-height: 1.3;
    }
    
    .title-icon {
        font-size: 1rem;
    }
    
    .title-text {
        font-size: 0.9rem;
        word-break: break-word;
        display: block;
        width: 100%;
    }
    
    .title-accent {
        width: 80px;
        margin: 8px auto 0;
    }
    
    .form-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .section-header {
        margin: -15px -15px 20px -15px;
        padding: 12px 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .section-header h2 {
        font-size: 1rem;
    }
    
    .form-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .form-row {
        width: 100%;
    }
    
    .form-row input,
    .form-row select {
        width: 100%;
        font-size: 16px; /* Evita zoom en iOS */
        padding: 12px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-actions .btn {
        width: 100%;
        max-width: 100%;
        padding: 12px;
        font-size: 0.9rem;
    }
    
    .subpanel {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .subpanel-header {
        font-size: 0.8rem;
    }
    
    .ingreso-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .top-nav-inner {
        padding: 8px 10px;
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .nav-link {
        padding: 8px 10px;
        font-size: 0.75rem;
        flex: 1 1 auto;
        min-width: calc(50% - 3px);
        text-align: center;
    }
    
    .serie-display {
        padding: 15px;
    }
    
    .serie-number {
        font-size: 1.3rem;
    }
    
    .qr-container {
        padding: 15px;
        min-height: 120px;
    }
    
    .qr-container img {
        max-width: 150px;
    }
    
    .contador-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .contador-item {
        width: 100%;
        max-width: 100%;
    }
    
    .contador-number {
        font-size: 1.8rem;
    }
    
    .historial-table {
        font-size: 0.7rem;
    }
    
    .historial-table th,
    .historial-table td {
        padding: 6px 4px;
        font-size: 0.7rem;
    }
    
    .historial-table td {
        max-width: 100px;
        word-break: break-word;
        white-space: normal;
    }
    
    .historial-table td:last-child {
        max-width: 80px;
    }
    
    .historial-table td:last-child .btn {
        padding: 4px 6px;
        font-size: 0.65rem;
        min-width: auto;
    }
    
    .btn {
        padding: 10px 14px;
        font-size: 0.8rem;
        min-width: 100px;
    }
    
    .btn-filter {
        padding: 6px 10px;
        font-size: 0.7rem;
        flex: 1 1 auto;
        min-width: calc(50% - 5px);
    }
    
    .modal-content {
        max-width: 95vw;
        margin: 10px;
    }
    
    .modal-header {
        padding: 12px 15px;
    }
    
    .modal-header h3 {
        font-size: 1rem;
    }
    
    .modal-body {
        padding: 15px;
        font-size: 0.9rem;
    }
    
    .modal-registro-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .modal-registro-label {
        font-size: 0.8rem;
    }
    
    .modal-registro-value {
        font-size: 0.9rem;
        word-break: break-word;
    }
    
    .welcome-card {
        padding: 25px 20px;
    }
    
    .welcome-title {
        font-size: 20px;
    }
    
    .welcome-subtitle {
        font-size: 14px;
    }
    
    .form-input {
        padding: 12px 15px;
        font-size: 16px; /* Evita zoom en iOS */
    }
    
    .welcome-btn {
        padding: 14px 20px;
        font-size: 16px;
    }
}

/* Media query para tablets */
@media (min-width: 481px) and (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .modern-header {
        min-height: 160px;
    }
    
    .header-content {
        padding: 16px 12px;
        padding-top: 100px;
    }
    
    .logo-top-right .toshiba-logo-image {
        max-width: 410px;
        max-height: 100px;
        background: transparent;
    }
    
    .main-title {
        font-size: 1.4rem;
    }
    
    .form-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ingreso-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-link {
        padding: 10px 12px;
        font-size: 0.8rem;
    }
    
    .historial-table th,
    .historial-table td {
        padding: 8px 6px;
        font-size: 0.75rem;
    }
}

/* Ajustes adicionales para textos que desbordan */
@media (max-width: 768px) {
    * {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .title-text {
        word-break: break-word;
    }
    
    .form-row label {
        font-size: 0.8rem;
        word-break: break-word;
    }
    
    .section-header h2 {
        word-break: break-word;
    }
    
    .subpanel-header {
        word-break: break-word;
    }
    
    /* Evitar que los botones se superpongan */
    .form-actions {
        flex-wrap: wrap;
    }
    
    .top-nav-inner {
        flex-wrap: wrap;
    }
    
    /* Asegurar que las tablas tengan scroll horizontal */
    .historial-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .historial-table table {
        min-width: 600px;
    }
    
    /* Mejorar espaciado en móviles */
    .main-content {
        padding: 20px 0;
    }
    
    .form-section {
        margin-bottom: 20px;
    }
    
    /* Ajustar modales */
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        max-width: 98vw;
    }
}

/* Badge para número de tarea */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb 0%, #c5000f 100%);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

.badge-success {
    color: #ffffff;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.badge-warning {
    color: #ffffff;
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
}

.badge-info {
    color: #ffffff;
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    box-shadow: 0 2px 4px rgba(23, 162, 184, 0.3);
}

/* Estilos para agrupación de tareas por Orden Lab */
.historial-table tbody tr[data-orden-lab] {
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.historial-table tbody tr[data-orden-lab]:hover {
    border-left-color: #2563eb;
    background: rgba(37, 99, 235, 0.05);
}

/* Resaltar el primer registro de cada Orden Lab */
.historial-table tbody tr[data-orden-lab]:first-child {
    border-left-color: #2563eb;
    background: rgba(37, 99, 235, 0.02);
}

/* Estilo para tareas múltiples del mismo Orden Lab */
.historial-table tbody tr[data-orden-lab] + tr[data-orden-lab] {
    border-top: 1px solid rgba(37, 99, 235, 0.2);
}

/* Badge especial para tarea 1 (original) */
.badge-original {
    color: #ffffff;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
    border: 2px solid #20c997;
}

/* Badge para tareas de edición */
.badge-edicion {
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb 0%, #c5000f 100%);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

/* Pie de página */
.site-footer {
    position: static;
    text-align: right;
    margin: 40px 16px 20px 16px;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.5px;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.site-footer:hover {
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.7);
}

.site-footer a:hover {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.7);
}