* {
    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;
}

.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: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

.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: 20px;
}

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

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

.modal-ubicaciones-resultados {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 10px;
    border: 1px solid #F5F5F5;
    border-radius: 6px;
}

.ubicacion-resultado-item.selected {
    background: #003C8F;
    color: #FFFFFF;
}

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

.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(2, 1fr);
    gap: 15px;
}

.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: block;
    margin-bottom: 8px;
    color: #333333;
    font-weight: 500;
}

.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:focus {
    outline: none;
    border-color: #003C8F;
}

.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;
}

.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-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #F5F5F5;
}

.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: 12px 20px;
    font-size: 1rem;
    color: #8A8A8A;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab-btn:hover {
    color: #003C8F;
    background: #F5F5F5;
}

.tab-btn.active {
    color: #003C8F;
    border-bottom-color: #003C8F;
    font-weight: 600;
}

.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: auto;
}

.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);
}

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

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

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

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

.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;
    }
    
    .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;
        width: 100%;
    }
    
    .acciones-backup .btn {
        width: 100%;
    }
}
