* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #0D1A33 0%, #003C8F 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background: #0D1A33;
    color: #FFFFFF;
    padding: 30px;
    position: relative;
}

.header-content {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.logo {
    height: 60px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.header-content a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.header-content a:hover .logo {
    opacity: 0.8;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    text-align: left;
    padding-top: 8px;
}

main {
    padding: 30px;
    flex: 1;
}

.scanner-section {
    margin-bottom: 40px;
}

.scanner-container {
    background: #F5F5F5;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 20px;
}

#qr-reader {
    width: 100%;
    max-width: 500px;
    margin: 0 auto 20px;
    border-radius: 8px;
    overflow: hidden;
}

.scanner-controls {
    text-align: center;
}

.manual-input {
    background: #F5F5F5;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.manual-input h3 {
    margin-bottom: 15px;
    color: #333333;
    font-size: 1.2rem;
}

.manual-input input {
    width: 100%;
    max-width: 400px;
    padding: 12px;
    font-size: 1rem;
    border: 2px solid #8A8A8A;
    border-radius: 6px;
    margin-bottom: 10px;
}

.manual-input input:focus {
    outline: none;
    border-color: #003C8F;
}

.form-select {
    padding: 12px;
    font-size: 1rem;
    border: 2px solid #8A8A8A;
    border-radius: 6px;
    background: #FFFFFF;
    color: #333333;
    cursor: pointer;
    transition: border-color 0.3s;
}

.form-select:focus {
    outline: none;
    border-color: #003C8F;
}

.btn {
    padding: 12px 24px;
    font-size: 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #003C8F;
    color: #FFFFFF;
}

.btn-primary:hover {
    background: #0D1A33;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 60, 143, 0.3);
}

.btn-secondary {
    background: #8A8A8A;
    color: #FFFFFF;
}

.btn-secondary:hover {
    background: #333333;
}

.btn-danger {
    background: #dc3545;
    color: #FFFFFF;
    padding: 6px 12px;
    font-size: 0.9rem;
}

.btn-danger:hover {
    background: #c82333;
}

.inventario-section h2 {
    margin: 0;
    color: #0D1A33;
    font-size: 1.8rem;
}

.export-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.export-buttons {
    display: flex;
    gap: 10px;
}

.search-section {
    margin-bottom: 20px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 500px;
}

.search-box input {
    flex: 1;
    padding: 12px 40px 12px 15px;
    font-size: 1rem;
    border: 2px solid #8A8A8A;
    border-radius: 6px;
    transition: border-color 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #003C8F;
}

.btn-clear {
    position: absolute;
    right: 10px;
    background: #8A8A8A;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.btn-clear:hover {
    background: #333333;
}

.search-results-info {
    margin-top: 10px;
    padding: 10px;
    background: #E3F2FD;
    border-left: 4px solid #003C8F;
    border-radius: 4px;
    color: #003C8F;
    font-size: 0.95rem;
}

.inventario-item mark {
    background: #FFEB3B;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

.ver-todos-container {
    margin-top: 20px;
    text-align: center;
    padding: 20px;
}

.btn-block {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

/* Estilos para paginación */
.paginacion-container {
    margin-top: 30px;
    padding: 20px 0;
}

.paginacion {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-pagina {
    padding: 8px 14px;
    border: 2px solid #8A8A8A;
    background: white;
    color: #333333;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s;
    min-width: 40px;
}

.btn-pagina:hover:not(.disabled):not(.active) {
    background: #003C8F;
    color: white;
    border-color: #003C8F;
}

.btn-pagina.active {
    background: #0D1A33;
    color: white;
    border-color: #0D1A33;
    font-weight: 700;
}

.btn-pagina.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #F5F5F5;
    color: #8A8A8A;
}

.paginacion-ellipsis {
    padding: 8px 4px;
    color: #8A8A8A;
    font-weight: 600;
}

.paginacion-info {
    margin-left: 20px;
    color: #8A8A8A;
    font-size: 0.9rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .paginacion {
        gap: 5px;
    }
    
    .btn-pagina {
        padding: 6px 10px;
        font-size: 0.85rem;
        min-width: 35px;
    }
    
    .paginacion-info {
        margin-left: 10px;
        font-size: 0.8rem;
        width: 100%;
        text-align: center;
        margin-top: 10px;
    }
}

/* Estilos para sección de ubicación */
.ubicacion-section {
    margin-bottom: 30px;
    background: #F5F5F5;
    padding: 20px;
    border-radius: 8px;
}

.ubicacion-activa h3 {
    margin: 0 0 15px 0;
    color: #0D1A33;
    font-size: 1.3rem;
}

.ubicacion-info {
    margin-bottom: 15px;
    min-height: 60px;
}

.ubicacion-sin-seleccion {
    text-align: center;
    padding: 20px;
    color: #8A8A8A;
}

.ubicacion-sin-seleccion p {
    margin: 5px 0;
}

.ubicacion-sin-seleccion .subtle {
    font-size: 0.9rem;
    opacity: 0.8;
}

.ubicacion-seleccionada {
    background: #FFFFFF;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #003C8F;
}

.ubicacion-codigo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0D1A33;
    margin-bottom: 5px;
}

.ubicacion-nombre {
    color: #8A8A8A;
    font-size: 0.95rem;
}

.ubicacion-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ubicacion-buscar-container {
    margin-top: 15px;
    padding: 15px;
    background: #FFFFFF;
    border-radius: 6px;
}

.ubicacion-buscar-container input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    margin-bottom: 10px;
}

.ubicacion-resultados {
    max-height: 200px;
    overflow-y: auto;
}

.ubicacion-resultado-item {
    padding: 10px;
    border-bottom: 1px solid #F5F5F5;
    cursor: pointer;
    transition: background 0.2s;
}

.ubicacion-resultado-item:hover {
    background: #F5F5F5;
}

.ubicacion-resultado-item:last-child {
    border-bottom: none;
}

.ubicacion-resultado-codigo {
    font-weight: 600;
    color: #0D1A33;
    margin-bottom: 3px;
}

.ubicacion-resultado-nombre {
    font-size: 0.9rem;
    color: #8A8A8A;
}

.sin-resultados {
    padding: 10px;
    text-align: center;
    color: #8A8A8A;
    font-style: italic;
}

.admin-info {
    padding: 30px;
    background: #FFF3CD;
    border: 2px solid #FFC107;
    border-radius: 8px;
    margin: 20px 0;
    position: relative;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.admin-info.cerrado {
    display: none;
}

.info-message {
    position: relative;
}

.info-close-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #856404;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, transform 0.2s;
    z-index: 10;
    padding: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.info-close-btn:hover {
    background: #6c5403;
    transform: scale(1.1);
}

.info-close-btn:active {
    transform: scale(0.95);
}

.info-message h3 {
    color: #856404;
    margin-bottom: 15px;
    padding-right: 20px;
}

.info-message p {
    color: #856404;
    margin: 10px 0;
    line-height: 1.6;
}

.btn-warning {
    background: #ffc107;
    color: #0D1A33;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

.btn-warning:hover {
    background: #e0a800;
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #FFFFFF;
    border-radius: 12px;
    max-width: 650px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

.modal-content.modal-large {
    max-width: 95%;
    width: 1100px;
}

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

.modal-header {
    padding: 25px;
    border-bottom: 2px solid #F5F5F5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #F5F5F5 0%, #FFFFFF 100%);
}

.modal-header h3 {
    margin: 0;
    color: #0D1A33;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #8A8A8A;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
}

.modal-close:hover {
    color: #0D1A33;
}

.modal-body {
    padding: 25px;
}

.modal-body p {
    margin: 10px 0;
    color: #333333;
}

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

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #F5F5F5;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Estilos mejorados para modal de traslado */
.modal-trasladar-content {
    max-width: 600px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
}

.modal-trasladar-header {
    background: linear-gradient(135deg, #0D1A33 0%, #003C8F 100%);
    color: #FFFFFF;
    padding: 30px;
    border-bottom: none;
    position: relative;
}

.modal-trasladar-header .modal-header-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.modal-trasladar-header h3 {
    color: #FFFFFF;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.modal-trasladar-header .modal-close {
    color: rgba(255, 255, 255, 0.8);
    font-size: 32px;
    transition: all 0.2s ease;
}

.modal-trasladar-header .modal-close:hover {
    color: #FFFFFF;
    transform: rotate(90deg);
}

.modal-trasladar-body {
    padding: 30px;
    background: #FFFFFF;
}

.modal-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.modal-info-item {
    background: linear-gradient(135deg, #F5F5F5 0%, #FFFFFF 100%);
    padding: 18px 20px;
    border-radius: 10px;
    border: 1px solid rgba(13, 26, 51, 0.08);
    transition: all 0.3s ease;
}

.modal-info-item:hover {
    box-shadow: 0 4px 12px rgba(0, 60, 143, 0.1);
    transform: translateY(-2px);
}

.modal-info-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #8A8A8A;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.modal-info-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0D1A33;
    word-break: break-word;
}

.modal-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #E0E0E0, transparent);
    margin: 25px 0;
}

.modal-search-section {
    margin-top: 10px;
}

.modal-search-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #0D1A33;
    margin-bottom: 12px;
}

.modal-label-icon {
    font-size: 1.2rem;
}

.modal-search-container {
    position: relative;
}

.modal-search-input {
    width: 100%;
    padding: 14px 18px;
    font-size: 1rem;
    border: 2px solid #E0E0E0;
    border-radius: 10px;
    background: #FFFFFF;
    color: #333333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.modal-search-input:focus {
    outline: none;
    border-color: #003C8F;
    box-shadow: 0 4px 12px rgba(0, 60, 143, 0.15);
    transform: translateY(-1px);
}

.modal-search-input::placeholder {
    color: #B0B0B0;
}

.modal-ubicaciones-resultados {
    max-height: 280px;
    overflow-y: auto;
    margin-top: 12px;
    border: 2px solid #F5F5F5;
    border-radius: 10px;
    background: #FFFFFF;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.modal-ubicaciones-resultados .ubicacion-resultado-item {
    padding: 16px 18px;
    border-bottom: 1px solid #F5F5F5;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.modal-ubicaciones-resultados .ubicacion-resultado-item:hover {
    background: linear-gradient(90deg, rgba(0, 60, 143, 0.05) 0%, transparent 100%);
    border-left-color: #003C8F;
    transform: translateX(2px);
}

.modal-ubicaciones-resultados .ubicacion-resultado-item:last-child {
    border-bottom: none;
}

.modal-ubicaciones-resultados .ubicacion-resultado-item.selected {
    background: linear-gradient(135deg, #003C8F 0%, #0D1A33 100%);
    color: #FFFFFF;
    border-left-color: #FFFFFF;
}

.modal-ubicaciones-resultados .ubicacion-resultado-item.selected .ubicacion-resultado-codigo,
.modal-ubicaciones-resultados .ubicacion-resultado-item.selected .ubicacion-resultado-nombre {
    color: #FFFFFF;
}

.modal-ubicaciones-resultados .ubicacion-resultado-codigo {
    font-weight: 600;
    color: #0D1A33;
    margin-bottom: 4px;
    font-size: 1.05rem;
}

.modal-ubicaciones-resultados .ubicacion-resultado-nombre {
    font-size: 0.9rem;
    color: #8A8A8A;
}

.modal-ubicaciones-resultados .sin-resultados {
    padding: 30px 20px;
    text-align: center;
    color: #8A8A8A;
    font-style: italic;
}

.modal-trasladar-footer {
    padding: 20px 30px;
    background: #F5F5F5;
    border-top: 1px solid #E0E0E0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-radius: 0 0 12px 12px;
}

.btn-modal {
    padding: 12px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 120px;
}

.btn-modal:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-modal:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .modal-info-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .modal-trasladar-header {
        padding: 25px 20px;
    }
    
    .modal-trasladar-body {
        padding: 25px 20px;
    }
    
    .modal-trasladar-footer {
        padding: 18px 20px;
        flex-direction: column-reverse;
    }
    
    .btn-modal {
        width: 100%;
    }
}

.resumen-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.resumen-por-toma {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.resumen-toma {
    background: #F5F5F5;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #003C8F;
    transition: all 0.3s ease;
}

.resumen-toma-alerta {
    border-color: #dc3545;
    background: #FFF5F5;
}

.resumen-toma-alerta h3 {
    border-bottom-color: #dc3545;
    color: #dc3545;
}

.resumen-toma h3 {
    margin: 0 0 20px 0;
    color: #0D1A33;
    font-size: 1.5rem;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px solid #003C8F;
    transition: all 0.3s ease;
}

.resumen-toma-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.resumen-toma-paneles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.panel-registros,
.panel-unidades {
    background: linear-gradient(135deg, #003C8F 0%, #0D1A33 100%);
    color: #FFFFFF;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.panel-registros h4,
.panel-unidades h4 {
    margin: 0 0 20px 0;
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.panel-value {
    text-align: center;
}

.panel-value .total-registros {
    font-size: 3rem;
    font-weight: 700;
    margin: 15px 0;
    line-height: 1;
}

.panel-value .total-label {
    font-size: 1rem;
    opacity: 0.85;
    display: block;
    margin-top: 8px;
}

.unidades-detalle {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.unidad-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: background 0.2s ease;
}

.unidad-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.unidad-label {
    font-size: 0.95rem;
    font-weight: 600;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.unidad-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #FFFFFF;
}

@media (max-width: 768px) {
    .resumen-toma-paneles {
        grid-template-columns: 1fr;
    }
}

.resumen-card {
    background: linear-gradient(135deg, #003C8F 0%, #0D1A33 100%);
    color: #FFFFFF;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.resumen-toma .resumen-card {
    padding: 20px;
}

.resumen-toma-alerta .resumen-card {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.resumen-card h3 {
    margin: 0 0 15px 0;
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.resumen-card h4 {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.total-kilos,
.total-registros {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 10px 0;
    line-height: 1;
}

.resumen-toma .total-kilos,
.resumen-toma .total-registros {
    font-size: 2rem;
}

.total-label {
    font-size: 0.9rem;
    opacity: 0.8;
    display: block;
    margin-top: 5px;
}

.inventario-list {
    display: grid;
    gap: 15px;
}

.inventario-item {
    background: #F5F5F5;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #003C8F;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s ease;
}

.inventario-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.item-info {
    flex: 1;
}

.item-info h3 {
    color: #0D1A33;
    margin-bottom: 8px;
    font-size: 1.3rem;
}

.item-details {
    display: flex;
    gap: 20px;
    margin-top: 8px;
    color: #8A8A8A;
    font-size: 0.95rem;
}

.item-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #8A8A8A;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333333;
}

@media (max-width: 768px) {
    header {
        padding: 20px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .logo {
        height: 50px;
    }
    
    header h1 {
        font-size: 1.3rem;
        padding-top: 5px;
    }
    
    .inventario-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .item-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 15px;
    }
    
    .item-details {
        flex-direction: column;
        gap: 5px;
    }
    
    .resumen-section {
        grid-template-columns: 1fr;
    }
}

/* Estilos para Login */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0D1A33 0%, #003C8F 100%);
    padding: 20px;
}

.login-box {
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: 400px;
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    height: 80px;
    width: auto;
    margin-bottom: 20px;
}

.login-header h1 {
    color: #0D1A33;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.login-header p {
    color: #8A8A8A;
    font-size: 1rem;
}

.login-form {
    margin-top: 20px;
}

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

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #0D1A33;
    font-weight: 600;
    font-size: 0.95rem;
}

.label-icon {
    font-size: 1.1rem;
}

.form-group input {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    border: 2px solid #8A8A8A;
    border-radius: 6px;
    transition: border-color 0.3s;
}

.form-group input[readonly] {
    background-color: #F5F5F5;
    cursor: not-allowed;
}

.form-group input:focus {
    outline: none;
    border-color: #003C8F;
    box-shadow: 0 0 0 3px rgba(0, 60, 143, 0.1);
}

.form-help {
    display: block;
    margin-top: 6px;
    color: #8A8A8A;
    font-size: 0.85rem;
    font-style: italic;
}

.form-group select {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    border: 2px solid #8A8A8A;
    border-radius: 6px;
    transition: border-color 0.3s;
    background: #FFFFFF;
}

.form-group select:focus {
    outline: none;
    border-color: #003C8F;
    box-shadow: 0 0 0 3px rgba(0, 60, 143, 0.1);
}

.roles-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 15px;
    background: #F5F5F5;
    border-radius: 8px;
    border: 2px solid #F5F5F5;
    transition: border-color 0.3s;
}

.roles-checkbox-group:hover {
    border-color: #003C8F;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.2s;
    font-weight: normal;
    margin: 0;
}

.checkbox-label:hover {
    background: rgba(0, 60, 143, 0.05);
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #003C8F;
    margin: 0;
}

.checkbox-label span {
    color: #333333;
    font-weight: 500;
}

.checkbox-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #8A8A8A;
    transition: 0.3s;
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #003C8F;
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.switch-label {
    color: #333333;
    font-weight: 500;
    font-size: 0.95rem;
}

.btn-block {
    width: 100%;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    border-left: 4px solid #dc3545;
}

/* Header con usuario */
/* Menú hamburguesa para móviles */
.menu-toggle {
    display: none;
    flex-direction: column;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    position: absolute;
    top: 25px;
    right: 25px;
    z-index: 1001;
    gap: 5px;
}

.menu-toggle span {
    width: 28px;
    height: 3px;
    background: #FFFFFF;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.user-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.user-info {
    color: #FFFFFF;
    text-align: right;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    margin-bottom: 0;
}

.user-info .user-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0;
    cursor: default;
    position: relative;
}

.user-username-hover {
    opacity: 0;
    transition: opacity 0.3s ease;
    font-weight: 400;
    font-size: 0.85rem;
    margin-left: 6px;
}

.user-name:hover .user-username-hover {
    opacity: 0.7;
}

.menu-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.menu-link {
    text-decoration: none;
    padding: 8px 16px;
    white-space: nowrap;
}

.btn-logout {
    background: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Estilos para Administración */
.admin-actions {
    margin-bottom: 20px;
}

.usuarios-section h2 {
    margin-bottom: 20px;
    color: #0D1A33;
    font-size: 1.8rem;
}

.usuarios-list {
    display: grid;
    gap: 15px;
}

.usuario-item {
    background: #F5F5F5;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #003C8F;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.usuario-info h3 {
    color: #0D1A33;
    margin-bottom: 8px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.activo {
    background: #28a745;
    color: white;
}

.status-badge.inactivo {
    background: #dc3545;
    color: white;
}

.usuario-details {
    display: flex;
    gap: 20px;
    margin-top: 8px;
    color: #8A8A8A;
    font-size: 0.95rem;
    flex-wrap: wrap;
}

.usuario-actions {
    display: flex;
    gap: 10px;
}

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    border-bottom: 2px solid #F5F5F5;
    padding-bottom: 0;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #8A8A8A;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-tab:hover {
    color: #0D1A33;
    background: #F5F5F5;
}

.admin-tab.active {
    color: #003C8F;
    border-bottom-color: #003C8F;
    background: transparent;
}

.admin-tab-content {
    display: block;
}

.ubicaciones-section h2 {
    margin-bottom: 20px;
    color: #0D1A33;
    font-size: 1.8rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #F5F5F5;
}

.modal-header h3 {
    margin: 0;
    color: #0D1A33;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #8A8A8A;
    line-height: 1;
}

.modal-close:hover {
    color: #333333;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #F5F5F5;
}

@media (max-width: 768px) {
    .usuario-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .usuario-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 15px;
    }
    
    .usuario-details {
        flex-direction: column;
        gap: 5px;
    }
    
    .user-menu {
        position: static;
        margin-top: 15px;
        justify-content: center;
    }
    
    /* Mostrar botón hamburguesa en móviles */
    .menu-toggle {
        display: flex;
    }
    
    /* Menú móvil */
    .user-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        max-width: 85vw;
        height: 100vh;
        background: #0D1A33;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 80px 25px 25px;
        gap: 20px;
        transition: right 0.3s ease;
        z-index: 1000;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
        overflow-y: auto;
    }
    
    .user-menu.active {
        right: 0;
    }
    
    /* Overlay oscuro cuando el menú está abierto */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .menu-overlay.active {
        display: block;
    }
    
    .user-info {
        width: 100%;
        text-align: left;
        padding-bottom: 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .menu-buttons {
        flex-direction: column;
        width: 100%;
        gap: 12px;
        align-items: stretch;
    }
    
    .menu-buttons .btn,
    .menu-buttons .btn-logout {
        width: 100%;
        text-align: center;
        padding: 12px 16px;
        justify-content: center;
    }
    
    .menu-link {
        width: 100%;
        display: block;
    }
    
    header {
        padding-bottom: 80px;
    }
    
    .header-content {
        padding-right: 50px;
    }
}

/* Footer */
footer {
    background: #0D1A33;
    color: #FFFFFF;
    padding: 15px 30px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

footer p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.8;
    color: #F5F5F5;
}

@media (max-width: 768px) {
    footer {
        padding: 12px 20px;
        font-size: 0.8rem;
    }
}

/* Estadísticas */
.estadisticas-section {
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
}

.estadisticas-section h2 {
    color: #0D1A33;
    margin: 0 0 25px 0;
    font-size: 1.8rem;
    border-bottom: 2px solid #003C8F;
    padding-bottom: 15px;
}

.estadisticas-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid #F5F5F5;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 14px 24px;
    font-size: 0.95rem;
    color: #8A8A8A;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn span {
    font-size: 1.1rem;
}

.tab-btn:hover {
    color: #003C8F;
    background: rgba(0, 60, 143, 0.05);
}

.tab-btn.active {
    color: #003C8F;
    border-bottom-color: #003C8F;
    font-weight: 600;
    background: rgba(0, 60, 143, 0.05);
}

.tab-dropdown {
    position: relative;
}

.tab-dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    margin-top: 5px;
    z-index: 1000;
    overflow: hidden;
    border: 1px solid #E0E0E0;
}

.tab-dropdown-item {
    display: block;
    width: 100%;
    padding: 12px 20px;
    text-align: left;
    background: white;
    border: none;
    color: #333333;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border-bottom: 1px solid #F5F5F5;
}

.tab-dropdown-item:last-child {
    border-bottom: none;
}

.tab-dropdown-item:hover {
    background: rgba(0, 60, 143, 0.08);
    color: #003C8F;
}

.tab-dropdown-item.active {
    background: rgba(0, 60, 143, 0.1);
    color: #003C8F;
    font-weight: 600;
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #F5F5F5;
}

.admin-section-header h2 {
    margin: 0 0 8px 0;
    color: #0D1A33;
    font-size: 1.8rem;
    font-weight: 600;
}

.section-description {
    margin: 0;
    color: #8A8A8A;
    font-size: 0.95rem;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
}

.btn-icon span {
    font-size: 1.2rem;
    font-weight: 600;
}

.search-box-modern {
    margin-bottom: 25px;
}

.search-box-modern input {
    width: 100%;
    max-width: 400px;
    padding: 14px 18px;
    font-size: 0.95rem;
    border: 2px solid #F5F5F5;
    border-radius: 8px;
    background: #FFFFFF;
    transition: all 0.3s ease;
}

.search-box-modern input:focus {
    outline: none;
    border-color: #003C8F;
    box-shadow: 0 0 0 3px rgba(0, 60, 143, 0.1);
}

.table-container {
    background: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #F5F5F5;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.data-table thead {
    background: linear-gradient(135deg, #F5F5F5 0%, #FFFFFF 100%);
    border-bottom: 2px solid #F5F5F5;
}

.data-table th {
    padding: 16px 20px;
    text-align: left;
    color: #0D1A33;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #F5F5F5;
    color: #333333;
    font-size: 0.95rem;
}

.data-table tbody tr {
    transition: background 0.2s ease;
}

.data-table tbody tr:hover {
    background: rgba(0, 60, 143, 0.03);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table .btn-small {
    padding: 6px 14px;
    font-size: 0.85rem;
}

.csv-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.csv-upload-card {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #F5F5F5;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.csv-upload-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.csv-card-header h3 {
    margin: 0 0 8px 0;
    color: #0D1A33;
    font-size: 1.3rem;
    font-weight: 600;
}

.csv-description {
    margin: 0 0 25px 0;
    color: #8A8A8A;
    font-size: 0.9rem;
}

.csv-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.file-input-wrapper {
    position: relative;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.file-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border: 2px dashed #8A8A8A;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #F5F5F5;
}

.file-label:hover {
    border-color: #003C8F;
    background: rgba(0, 60, 143, 0.05);
}

.file-icon {
    font-size: 1.5rem;
}

.file-text {
    color: #333333;
    font-weight: 500;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.estadistica-header-buttons {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
    padding-top: 10px;
}

.estadistica-content {
    min-height: 200px;
}

.loading-estadisticas,
.error-estadisticas,
.empty-state-estadisticas {
    text-align: center;
    padding: 40px;
    color: #8A8A8A;
    font-size: 1.1rem;
}

.error-estadisticas {
    color: #dc3545;
    background: #fee;
    border-left: 4px solid #dc3545;
    border-radius: 6px;
}

.estadisticas-kilos-ubicacion {
    width: 100%;
}

.estadisticas-table-container {
    overflow-x: visible;
    width: 100%;
    margin: 20px 0;
}

.estadisticas-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    table-layout: fixed;
}

.estadisticas-table thead {
    background: #0D1A33;
    color: white;
}

.estadisticas-table th {
    padding: 8px 4px;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.estadisticas-table th.text-right {
    text-align: right;
}

.estadisticas-table th.text-center {
    text-align: center;
}

.estadisticas-table th.estadistica-columna-separadora,
.estadisticas-table td.estadistica-columna-separadora {
    border-right: 2px solid #8A8A8A;
}

.estadisticas-table tr.estadistica-fila-concuerda {
    background-color: #d4edda;
}

.estadisticas-table tr.estadistica-fila-concuerda:hover {
    background-color: #c3e6cb;
}

.estadisticas-table tr.estadistica-fila-ubicacion:hover {
    background-color: rgba(0, 60, 143, 0.05);
    transition: background-color 0.2s ease;
}

.estadisticas-table td {
    padding: 6px 4px;
    border-bottom: 1px solid #F5F5F5;
    color: #333333;
    font-size: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.estadisticas-table tbody tr:hover {
    background: #F5F5F5;
}

.estadisticas-table tbody tr:last-child td {
    border-bottom: none;
}

.estadisticas-table td.text-right {
    text-align: right;
}

.ubicacion-nombre-estadistica {
    font-size: 0.85rem;
    color: #8A8A8A;
    font-weight: normal;
}

.color-diferencia-positivo {
    color: #28a745;
}

.color-diferencia-negativo {
    color: #dc3545;
}

.color-diferencia-neutro {
    color: #333333;
}

/* Gráfica de estadísticas */
.modal-grafica-content {
    max-width: 900px;
    width: 90%;
}

.grafica-wrapper {
    padding: 20px;
    background: #FFFFFF;
    min-height: 400px;
    max-height: 70vh;
    position: relative;
}

.grafica-mensaje-error {
    padding: 20px;
}

#grafica-kilos-ubicacion {
    max-height: 60vh;
}

@media (max-width: 768px) {
    .estadisticas-section {
        padding: 20px;
    }
    
    .estadisticas-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    .tab-dropdown-content {
        min-width: 200px;
        right: 0;
        left: auto;
    }
    
    .admin-section-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .admin-section-header .btn {
        width: 100%;
    }
    
    .csv-sections {
        grid-template-columns: 1fr;
    }
    
    .csv-upload-card {
        padding: 20px;
    }
    
    .data-table {
        font-size: 0.85rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 12px 15px;
    }
    
    .admin-container {
        padding: 0 10px;
    }
    
    .estadisticas-table {
        font-size: 0.85rem;
    }
    
    .estadisticas-table th,
    .estadisticas-table td {
        padding: 10px 8px;
    }
}

/* Estilos para página de Backups */
.backups-section {
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
}

.backups-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.backups-header h2 {
    color: #0D1A33;
    margin: 0;
    font-size: 1.8rem;
}

.backups-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.backups-info {
    background: #F5F5F5;
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.backups-list {
    margin-top: 20px;
}

.backups-table {
    width: 100%;
    border-collapse: collapse;
    background: #FFFFFF;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.backups-table thead {
    background: #003C8F;
    color: white;
}

.backups-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
}

.backups-table td {
    padding: 15px;
    border-bottom: 1px solid #F5F5F5;
}

.backups-table tbody tr:hover {
    background: #F5F5F5;
}

.backups-table tbody tr:last-child td {
    border-bottom: none;
}

.acciones-backup {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #8A8A8A;
    font-size: 1.1rem;
}

.error-state {
    text-align: center;
    padding: 40px;
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    font-size: 1rem;
}

.warning-text {
    color: #dc3545;
    font-weight: 600;
    margin: 10px 0;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #8A8A8A;
}

.empty-state h3 {
    color: #333333;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.empty-state p {
    color: #8A8A8A;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .backups-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .backups-actions {
        width: 100%;
    }
    
    .backups-actions .btn {
        flex: 1;
        min-width: 150px;
    }
    
    .backups-table {
        font-size: 0.85rem;
    }
    
    .backups-table th,
    .backups-table td {
        padding: 10px 8px;
    }
    
    .acciones-backup {
        flex-direction: column;
    }
}

.auditoria-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.auditoria-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #F5F5F5;
}

.auditoria-header h2 {
    margin: 0 0 8px 0;
    color: #0D1A33;
    font-size: 1.8rem;
    font-weight: 600;
}

.auditoria-table {
    width: 100%;
    border-collapse: collapse;
    background: #FFFFFF;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.auditoria-table thead {
    background: #0D1A33;
    color: white;
}

.auditoria-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auditoria-table td {
    padding: 14px 20px;
    border-bottom: 1px solid #F5F5F5;
    color: #333333;
    font-size: 0.95rem;
}

.auditoria-table tbody tr {
    transition: background 0.2s ease;
}

.auditoria-table tbody tr:hover {
    background: rgba(0, 60, 143, 0.03);
}

.auditoria-table tbody tr:last-child td {
    border-bottom: none;
}

.accion-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.accion-badge.eliminar {
    background: #fee;
    color: #dc3545;
    border: 1px solid #dc3545;
}

.accion-badge.trasladar {
    background: #fff4cd;
    color: #856404;
    border: 1px solid #ffc107;
}

.accion-badge.crear,
.accion-badge.registrar {
    background: #d4edda;
    color: #155724;
    border: 1px solid #28a745;
}

.detalles-cell {
    font-size: 0.9rem;
    color: #8A8A8A;
    max-width: 300px;
}

@media (max-width: 768px) {
    .auditoria-container {
        padding: 10px;
    }
    
    .auditoria-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .auditoria-table {
        font-size: 0.85rem;
    }
    
    .auditoria-table th,
    .auditoria-table td {
        padding: 10px 12px;
        width: 100%;
    }
    
    .acciones-backup .btn {
        width: 100%;
    }
}

.comparacion-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.comparacion-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.comparacion-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #F5F5F5;
}

.comparacion-header h2 {
    margin: 0 0 8px 0;
    color: #0D1A33;
    font-size: 1.8rem;
    font-weight: 600;
}

.comparacion-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #003C8F 0%, #0D1A33 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-card h3 {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
}

.comparacion-section {
    margin-bottom: 40px;
}

.section-title {
    background: #0D1A33;
    color: white;
    padding: 15px 20px;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0;
    border-radius: 8px 8px 0 0;
}

.section-title.solo-toma1 {
    background: #dc3545;
}

.section-title.solo-toma2 {
    background: #28a745;
}

.section-title.diferentes {
    background: #ff9800;
    color: white;
}

.comparacion-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    border: 1px solid #F5F5F5;
    background: #FFFFFF;
}

.comparacion-table thead {
    background: #003C8F;
}

.comparacion-table th {
    color: white;
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comparacion-table td {
    padding: 12px 20px;
    border-bottom: 1px solid #F5F5F5;
    color: #333333;
}

.comparacion-table tbody tr {
    transition: background 0.2s ease;
}

.comparacion-table tbody tr:hover {
    background: rgba(0, 60, 143, 0.03);
}

.comparacion-table .text-right {
    text-align: right;
}

.diferencia-row {
    background: #FFFFFF !important;
}

.diferencia-row.first-diff-row td {
    border-top: 3px solid #ffc107;
}

.diferencia-row.last-diff-row td {
    border-bottom: 3px solid #ffc107;
}

.no-diferencias {
    text-align: center;
    padding: 60px 40px;
    color: #28a745;
    font-size: 1.3rem;
    background: #d4edda;
    border: 2px solid #28a745;
    border-radius: 12px;
    font-weight: 600;
}

.toma-label {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.toma-label.toma1 {
    background: #dc3545;
    color: white;
}

.toma-label.toma2 {
    background: #28a745;
    color: white;
}

.kilos-diferente {
    background: #ffeb3b;
    color: #0D1A33;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
    border: 2px solid #ffc107;
}

.ubicacion-diferente {
    background: #ff9800;
    color: #000000;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
    border: 2px solid #f57c00;
}

@media print {
    @page {
        size: A4 landscape;
        margin: 1.5cm;
    }
    
    body {
        background: #FFFFFF;
        color: #000000;
        font-size: 10pt;
    }
    
    .container {
        box-shadow: none;
        border-radius: 0;
        margin: 0;
        padding: 0;
        max-width: 100%;
    }
    
    header {
        background: #0D1A33 !important;
        color: #FFFFFF !important;
        padding: 15px 20px;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    header .menu-toggle,
    header .menu-overlay,
    header .user-menu {
        display: none !important;
    }
    
    .comparacion-actions,
    .no-print,
    footer {
        display: none !important;
    }
    
    .comparacion-container {
        box-shadow: none;
        padding: 0;
        margin: 0;
    }
    
    .comparacion-header {
        margin-bottom: 20px;
        padding-bottom: 15px;
        border-bottom: 3px solid #003C8F;
        page-break-inside: avoid;
    }
    
    .comparacion-header h2 {
        color: #0D1A33;
        font-size: 18pt;
        margin-bottom: 8px;
    }
    
    .comparacion-stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
        margin-bottom: 20px;
        page-break-inside: avoid;
    }
    
    .stat-card {
        background: #003C8F !important;
        color: #FFFFFF !important;
        padding: 15px;
        border-radius: 8px;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .stat-card h3 {
        font-size: 8pt;
        margin-bottom: 8px;
    }
    
    .stat-card .stat-value {
        font-size: 20pt;
    }
    
    .comparacion-section {
        margin-bottom: 25px;
        page-break-inside: avoid;
    }
    
    .section-title {
        background: #0D1A33 !important;
        color: #FFFFFF !important;
        padding: 12px 15px;
        font-size: 12pt;
        margin-bottom: 10px;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        page-break-after: avoid;
    }
    
    .comparacion-table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 15px;
        font-size: 9pt;
        page-break-inside: auto;
    }
    
    .comparacion-table thead {
        background: #003C8F !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .comparacion-table th {
        color: #FFFFFF !important;
        padding: 10px 12px;
        font-weight: 600;
        text-align: left;
        border: 1px solid #0D1A33;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .comparacion-table td {
        padding: 8px 12px;
        border: 1px solid #E0E0E0;
        color: #000000;
    }
    
    .comparacion-table tbody tr {
        page-break-inside: avoid;
    }
    
    .comparacion-table tbody tr:nth-child(even) {
        background: #F5F5F5 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .diferencia-row.first-diff-row td {
        border-top: 2px solid #ffc107;
        background: #FFF9E6 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .diferencia-row.last-diff-row td {
        border-bottom: 2px solid #ffc107;
        background: #FFF9E6 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .toma-label {
        padding: 4px 8px;
        border-radius: 4px;
        font-weight: 600;
        font-size: 8pt;
    }
    
    .toma-label.toma1 {
        background: #2196F3 !important;
        color: #FFFFFF !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .toma-label.toma2 {
        background: #FF9800 !important;
        color: #FFFFFF !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .kilos-diferente {
        font-weight: 700;
        color: #dc3545 !important;
    }
    
    .ubicacion-diferente {
        font-weight: 700;
        color: #dc3545 !important;
    }
    
    .no-diferencias {
        padding: 30px;
        text-align: center;
        background: #E8F5E9;
        border: 2px solid #4CAF50;
        border-radius: 8px;
        color: #2E7D32;
        font-size: 12pt;
        font-weight: 600;
        margin: 20px 0;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    main {
        padding: 15px 20px;
    }
}

@media (max-width: 768px) {
    .comparacion-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .comparacion-table {
        font-size: 0.85rem;
    }
}
