/* ============================================
   VARIABLES GLOBALES
   ============================================ */
:root {
    --transition-speed: 0.3s;
    --bg-dark: #f0f2f5;
    --bg-darker: #ffffff;
    --text-light: #1a1b1e;
    --text-gray: #4b5563;
    --primary-blue: #3b82f6;
    --accent-dark: #2563eb;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --overlay-color: rgba(255, 255, 255, 0.85);
    --success-green: #059669;
    --danger-red: #dc2626;
    --header-height-mobile: 110px;
    --header-height-desktop: 100px;
    --nav-bar-height: 50px;
}

/* ============================================
   RESET Y BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    min-height: 100vh;
    background-color: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden;
}

/* ============================================
   HEADER - MOBILE FIRST
   ============================================ */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-darker);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #e5e7eb;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-image {
    height: 35px;
    width: auto;
    object-fit: contain;
}

.logo {
    color: var(--text-light);
    font-weight: 700;
    font-size: 1.1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

#userName {
    font-weight: 500;
    color: var(--text-light);
    font-size: 0.85rem;
    display: none; /* Oculto en móvil */
}

.logout-button {
    background-color: transparent;
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.logout-button:hover {
    background-color: var(--primary-blue);
    color: white;
}

.logout-text {
    display: none; /* Oculto en móvil */
}

.header-bottom {
    padding: 10px 15px;
}

.search-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.search-bar {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-gray);
    font-size: 0.9rem;
}

.search-bar input {
    width: 100%;
    padding: 10px 10px 10px 35px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    color: #374151;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.sync-button,
.campo-programable-btn {
    padding: 10px;
    background-color: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sync-button {
    width: 40px;
    height: 40px;
}

.campo-programable-btn {
    min-width: 40px;
}

.btn-text {
    display: none; /* Oculto en móvil */
}

.sync-button:hover,
.campo-programable-btn:hover {
    background-color: var(--accent-dark);
    transform: translateY(-1px);
}

/* ============================================
   CONTAINER PRINCIPAL
   ============================================ */
.container {
    margin-top: var(--header-height-mobile);
    padding: 15px 10px;
    padding-bottom: calc(var(--nav-bar-height) + 60px);
    min-height: calc(100vh - var(--header-height-mobile));
}

/* ============================================
   VISTA DESKTOP - TABLA (Oculta en móvil)
   ============================================ */
.desktop-view {
    display: none;
}

#stockTable {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#stockTable th {
    background-color: var(--primary-blue);
    color: white;
    padding: 12px 10px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

#stockTable td {
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
    font-size: 0.9rem;
}

#stockTable tr:nth-child(even) {
    background-color: #f9fafb;
}

#stockTable tr:hover {
    background-color: #f3f4f6;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

/* ============================================
   VISTA MOBILE - CARDS
   ============================================ */
.mobile-view {
    display: block;
}

.stock-card {
    background-color: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}

.stock-card:active {
    transform: scale(0.98);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f2f5;
}

.card-code {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-location {
    background-color: #f0f2f5;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-gray);
}

.card-description {
    font-size: 0.95rem;
    color: #374151;
    line-height: 1.4;
    margin-bottom: 12px;
    font-weight: 500;
}

.card-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.stat-item {
    text-align: center;
    padding: 8px;
    background-color: #f8fafc;
    border-radius: 8px;
}

.stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-gray);
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
}

.stat-item.disponible .stat-value {
    color: var(--success-green);
}

.stat-item.disponible.bajo-stock .stat-value {
    color: var(--danger-red);
}

.card-action {
    width: 100%;
}

.view-button {
    width: 100%;
    padding: 10px;
    background-color: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.view-button:active {
    transform: scale(0.95);
}

.view-button i {
    font-size: 1rem;
}

/* ============================================
   PAGINACIÓN - COMPACTA
   ============================================ */
.pagination-controls {
    position: fixed;
    bottom: var(--nav-bar-height);
    left: 0;
    right: 0;
    background-color: white;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
    padding: 6px 12px;
    z-index: 98;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    height: 40px;
}

.pagination-top {
    flex-shrink: 0;
}

.page-size-selector {
    padding: 5px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background-color: white;
    color: #374151;
    font-size: 0.8rem;
    cursor: pointer;
}

.page-size-selector:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.pagination-navigation {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-button {
    padding: 5px 10px;
    background-color: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 3px;
}

.pagination-button:disabled {
    background-color: #cbd5e1;
    cursor: not-allowed;
}

.pagination-button:not(:disabled):active {
    transform: scale(0.98);
}

.pagination-button .btn-text {
    display: none;
}

.page-info {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-gray);
    min-width: 55px;
    text-align: center;
}

/* ============================================
   MODAL
   ============================================ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: white;
    padding: 25px;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h2 {
    color: #1f2937;
    margin-bottom: 20px;
    font-size: 1.4rem;
    font-weight: 700;
    padding-right: 30px;
    border-bottom: 3px solid var(--primary-blue);
    padding-bottom: 12px;
}

.close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-gray);
    transition: all 0.2s ease;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #f3f4f6;
}

.close-button:hover {
    color: white;
    background-color: var(--primary-blue);
    transform: rotate(90deg);
}

.modal-body {
    overflow-x: auto;
    margin-top: 10px;
}

/* Tabla dentro del modal */
#almacenesTable {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 300px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#almacenesTable th {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-dark) 100%);
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}

#almacenesTable th:first-child {
    border-radius: 0;
}

#almacenesTable th:last-child {
    border-radius: 0;
}

#almacenesTable td {
    padding: 12px 15px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.9rem;
    background-color: white;
}

#almacenesTable tr:last-child td {
    border-bottom: none;
}

#almacenesTable tr:nth-child(even) td {
    background-color: #f9fafb;
}

#almacenesTable tr:hover td {
    background-color: #eff6ff;
    transition: background-color 0.2s ease;
}

#almacenesTable td:first-child {
    font-weight: 600;
    color: #1f2937;
}

#almacenesTable td:not(:first-child) {
    text-align: right;
    color: #4b5563;
    font-weight: 500;
}

/* ============================================
   NAVIGATION BAR - IGUAL QUE ADMINISTRACIÓN
   ============================================ */
.navigation-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    padding: 5px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-item {
    color: var(--text-gray);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

.nav-item:hover,
.nav-item.active {
    color: var(--primary-blue);
}

.nav-item i {
    font-size: 1.5em;
}

/* ============================================
   BOTÓN QUE PEDIR (flotante)
   ============================================ */
.que-pedir-button {
    position: fixed;
    bottom: calc(var(--nav-bar-height) + 60px);
    right: 15px;
    padding: 10px 18px;
    background-color: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    transition: all 0.2s ease;
    z-index: 90;
}

.que-pedir-button:active {
    transform: scale(0.95);
}

/* ============================================
   ESTILOS ADICIONALES PARA MODALES
   ============================================ */
.articulos-bajos-modal {
    max-width: 95% !important;
}

.articulo-bajo-stock {
    background-color: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.articulo-info {
    margin-bottom: 10px;
}

.articulo-codigo {
    font-weight: 700;
    color: #1f2937;
    font-size: 1rem;
    margin-bottom: 4px;
}

.articulo-nombre {
    color: var(--text-gray);
    font-size: 0.85rem;
}

.articulo-stocks {
    display: flex;
    gap: 15px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.stock-info {
    display: flex;
    flex-direction: column;
}

.stock-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    font-weight: 600;
}

.stock-value {
    font-weight: 700;
    font-size: 1rem;
}

.analizar-btn {
    width: 100%;
    padding: 10px;
    background-color: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.analizar-btn:active {
    transform: scale(0.95);
}

/* Información de consumo y análisis */
.operations-detail {
    max-height: 200px;
    overflow-y: auto;
    background-color: #f8fafc;
    border-radius: 8px;
    font-size: 0.85rem;
    padding: 10px;
    margin: 10px 0;
}

.operation-item {
    padding: 6px 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.85rem;
}

.operation-item:last-child {
    border-bottom: none;
}

.current-stock-info,
.final-stock-info {
    background-color: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    margin: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.current-stock-info {
    border-left: 4px solid var(--primary-blue);
}

.final-stock-info {
    border-left: 4px solid var(--success-green);
}

/* Fotos de artículos */
.article-photo-container {
    background-color: #f8fafc;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    text-align: center;
}

.article-photo-container img {
    max-width: 100%;
    max-height: 250px;
    object-fit: contain;
    border-radius: 4px;
    margin-bottom: 10px;
}

.no-photo {
    width: 100%;
    max-width: 250px;
    height: 150px;
    background-color: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    border-radius: 4px;
    margin: 0 auto 10px;
    font-size: 0.9rem;
}

.btn-upload-photo,
.btn-delete-photo {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin: 5px;
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-upload-photo {
    background-color: var(--primary-blue);
    color: white;
}

.btn-delete-photo {
    background-color: #ef4444;
    color: white;
}

/* Detalles de artículo */
.article-details {
    background-color: #f8fafc;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    border: 1px solid #e2e8f0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row label {
    color: var(--text-gray);
    font-weight: 500;
    font-size: 0.85rem;
}

.detail-row span {
    color: #1e40af;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Modal actions */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.modal-actions button {
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    transition: all 0.2s ease;
}

.cancel-btn {
    background-color: #e5e7eb;
    color: var(--text-gray);
}

.confirm-btn,
.save-btn {
    background-color: var(--primary-blue);
    color: white;
}

.cancel-btn:active {
    background-color: #d1d5db;
}

.confirm-btn:active,
.save-btn:active {
    transform: scale(0.95);
}

/* ============================================
   RESPONSIVE - TABLET Y DESKTOP
   ============================================ */

/* Tablet (768px+) */
@media (min-width: 768px) {
    :root {
        --header-height-mobile: 60px;
        --nav-bar-height: 50px;
    }

    header {
        position: relative;
    }

    .header-top {
        padding: 12px 30px;
    }

    .header-bottom {
        padding: 12px 30px;
        border-top: 1px solid #e5e7eb;
    }

    .logo {
        font-size: 1.3rem;
    }

    .logo-image {
        height: 40px;
    }

    #userName {
        display: inline-block;
        font-size: 0.95rem;
    }

    .logout-text {
        display: inline;
    }

    .btn-text {
        display: inline;
        font-size: 0.85rem;
    }

    .campo-programable-btn {
        padding: 10px 15px;
    }

    .container {
        margin-top: 0;
        padding: 20px 30px;
        padding-bottom: calc(var(--nav-bar-height) + 60px);
    }

    .stock-card {
        padding: 20px;
    }

    .modal-content {
        max-width: 600px;
    }

    .pagination-controls {
        padding: 8px 30px;
        height: 45px;
    }

    .pagination-button {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .pagination-button .btn-text {
        display: inline;
    }

    .page-info {
        font-size: 0.85rem;
        min-width: 70px;
    }

    .que-pedir-button {
        bottom: calc(var(--nav-bar-height) + 52px);
        right: 30px;
        font-size: 0.95rem;
        padding: 12px 22px;
    }

    .navigation-bar {
        gap: 40px;
    }
}

/* Desktop (1024px+) - Mostrar tabla */
@media (min-width: 1024px) {
    .mobile-view {
        display: none;
    }

    .desktop-view {
        display: block;
    }

    .header-top,
    .header-bottom {
        padding: 15px 40px;
    }

    .container {
        padding: 30px 40px;
        padding-bottom: 30px;
    }

    #stockTable {
        margin: 20px 0;
    }

    .modal-content {
        max-width: 800px;
    }

    .articulos-bajos-modal {
        max-width: 900px !important;
    }

    .articulo-bajo-stock {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px;
    }

    .articulo-info {
        flex: 1;
        margin-bottom: 0;
    }

    .analizar-btn {
        width: auto;
        padding: 10px 20px;
    }

    /* Paginación en desktop - NO fija */
    .pagination-controls {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        margin: 20px auto;
        padding: 15px 30px;
        border-radius: 12px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
        border: 1px solid #e5e7eb;
        max-width: 100%;
    }

    .page-size-selector {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .pagination-button {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .page-info {
        font-size: 0.9rem;
        min-width: 100px;
    }

    .que-pedir-button {
        bottom: calc(var(--nav-bar-height) + 20px);
    }
}

/* Desktop grande (1440px+) */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
        margin-left: auto;
        margin-right: auto;
    }

    .pagination-controls {
        max-width: 1400px;
    }
}

/* ============================================
   UTILIDADES Y HELPERS
   ============================================ */
.loading-message {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-gray);
}

.error-message {
    background-color: #fee;
    color: #c00;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
}

.success-message {
    background-color: #efe;
    color: #060;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
}

/* Scrollbar personalizada para webkit */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
/* ============================================
   ESTILOS ADICIONALES PARA MODALES
   ============================================ */


/* Información adicional en modales */
.modal-info-section {
    background-color: #f8fafc;
    border-radius: 10px;
    padding: 15px;
}

/* ============================================
   BOTONES DEL MODAL DE STOCK
   ============================================ */

/* Botón Analizar Consumo Habitual */
.btn-consumo-habitual {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-dark) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-consumo-habitual:hover {
    background: linear-gradient(135deg, var(--accent-dark) 0%, var(--primary-blue) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.btn-consumo-habitual:active {
    transform: translateY(0);
}

.btn-consumo-habitual i {
    font-size: 1rem;
}

/* Botón Consolidar Stock */
.consolidate-btn {
    padding: 8px 16px;
    background-color: var(--success-green);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.consolidate-btn:hover {
    background-color: #047857;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(5, 150, 105, 0.25);
}

.consolidate-btn:active {
    transform: translateY(0);
}

/* ============================================
   MODAL DE ANÁLISIS DE CONSUMO HABITUAL
   ============================================ */

/* Spinner de carga */
.analysis-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    background-color: white;
    padding: 30px 40px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.loading-spinner i {
    font-size: 2.5rem;
    color: var(--primary-blue);
}

.loading-spinner span {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    text-align: center;
}

.loading-progress {
    font-size: 0.85rem;
    color: var(--text-gray);
}

/* Sección de resumen */
.summary-section {
    background-color: #f8fafc;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-label {
    font-size: 0.95rem;
    color: var(--text-gray);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-blue);
}

/* Sección de detalles */
.detail-section {
    margin-top: 20px;
}

.detail-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.albaran-list {
    max-height: 300px;
    overflow-y: auto;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px;
}

.albaran-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 5px;
    background-color: #f9fafb;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.albaran-item:hover {
    background-color: #f3f4f6;
}

.albaran-item:last-child {
    margin-bottom: 0;
}

.albaran-code {
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.9rem;
    flex: 0 0 120px;
}

.albaran-qty {
    font-weight: 700;
    color: var(--primary-blue);
    font-size: 0.95rem;
    flex: 0 0 100px;
    text-align: right;
}

.albaran-lines {
    color: var(--text-gray);
    font-size: 0.85rem;
    flex: 0 0 80px;
    text-align: right;
}

/* Scrollbar personalizada para la lista de albaranes */
.albaran-list::-webkit-scrollbar {
    width: 6px;
}

.albaran-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.albaran-list::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 10px;
}

.albaran-list::-webkit-scrollbar-thumb:hover {
    background: var(--accent-dark);
}

/* Ajustes para móvil */
@media (max-width: 768px) {
    .summary-section {
        padding: 15px;
    }

    .stat-row {
        padding: 8px 0;
    }

    .stat-label {
        font-size: 0.85rem;
    }

    .stat-value {
        font-size: 1.1rem;
    }

    .albaran-list {
        max-height: 200px;
    }

    .albaran-item {
        flex-wrap: wrap;
        gap: 5px;
    }

    .albaran-code {
        flex: 0 0 100%;
        margin-bottom: 5px;
    }

    .albaran-qty,
    .albaran-lines {
        flex: 1;
        text-align: left;
    }

    .loading-spinner {
        padding: 20px 25px;
        max-width: 90%;
    }

    .loading-spinner i {
        font-size: 2rem;
    }

    .loading-spinner span {
        font-size: 0.9rem;
    }
}

/* ============================================
   MODAL DE ANÁLISIS TEMPORAL DETALLADO
   ============================================ */

/* Contenedor principal del análisis */
.analysis-results {
    max-width: 1200px;
}

/* Información de rango de fechas */
.date-range-info {
    background-color: #e0f2fe;
    border-left: 4px solid var(--primary-blue);
    padding: 12px 15px;
    border-radius: 6px;
    margin: 15px 0;
}

.date-range-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #0369a1;
    font-weight: 500;
}

/* Sección de filtros */
.filters-section {
    background-color: #f8fafc;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    display: grid;
    grid-template-columns: 1fr 2fr auto;
    gap: 15px;
    align-items: end;
}

.year-filter {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.year-filter label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.year-filter select {
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background-color: white;
    font-size: 0.9rem;
    color: var(--text-light);
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.year-filter select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.week-range {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.week-select {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.week-select label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.week-select select {
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background-color: white;
    font-size: 0.9rem;
    color: var(--text-light);
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.week-select select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.week-select select:disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
    opacity: 0.6;
}

.apply-filter-btn {
    padding: 10px 20px;
    background-color: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.apply-filter-btn:hover {
    background-color: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.25);
}

.apply-filter-btn:active {
    transform: translateY(0);
}

/* Resumen de análisis */
.analysis-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-dark) 100%);
    padding: 20px;
    border-radius: 10px;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    opacity: 0.9;
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
}

/* Detalles de consumo */
.consumption-details {
    margin-top: 30px;
}

.consumption-details h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.consumption-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.consumption-table thead {
    background-color: var(--primary-blue);
}

.consumption-table th {
    padding: 12px 15px;
    text-align: left;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    color: white;
}

.consumption-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s ease;
}

.consumption-table tbody tr:hover {
    background-color: #f9fafb;
}

.consumption-table tbody tr:last-child {
    border-bottom: none;
}

.consumption-table td {
    padding: 12px 15px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.date-range {
    font-size: 0.8rem;
    color: var(--text-gray);
    font-weight: 400;
}

/* Detalles de operaciones */
.operations-detail {
    max-height: 200px;
    overflow-y: auto;
}

.operation-item {
    padding: 6px 0;
    font-size: 0.85rem;
    line-height: 1.4;
}

.operation-date {
    color: var(--text-gray);
    font-weight: 500;
}

.operation-amount {
    color: var(--primary-blue);
    font-weight: 700;
}

.operation-client {
    color: var(--text-light);
}

/* Mensaje sin datos */
.no-data-message {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-gray);
    font-size: 1rem;
    background-color: #f8fafc;
    border-radius: 8px;
    margin: 20px 0;
}

/* Toast de error */
.error-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #fee2e2;
    border-left: 4px solid var(--danger-red);
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    animation: slideInRight 0.3s ease;
}

.error-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.error-content i {
    color: var(--danger-red);
    font-size: 1.2rem;
}

.error-content span {
    color: #991b1b;
    font-weight: 500;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Ajustes responsive para análisis */
@media (max-width: 768px) {
    .filters-section {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .week-range {
        grid-template-columns: 1fr;
    }

    .apply-filter-btn {
        width: 100%;
        justify-content: center;
    }

    .analysis-summary {
        grid-template-columns: 1fr;
    }

    .stat-card .stat-value {
        font-size: 1.5rem;
    }

    .consumption-table {
        font-size: 0.8rem;
    }

    .consumption-table th,
    .consumption-table td {
        padding: 8px 10px;
    }

    .operations-detail {
        max-height: 150px;
    }

    .operation-item {
        font-size: 0.8rem;
    }
}

/* ============================================
   FIX PARA iOS Y DISPOSITIVOS MÓVILES
   ============================================ */

/* Fix para el scroll en iOS */
@supports (-webkit-touch-callout: none) {
    body {
        min-height: -webkit-fill-available;
    }
    
    .navigation-bar {
        padding-bottom: max(5px, env(safe-area-inset-bottom));
    }
}

/* Ajustes generales para dispositivos móviles */
@media screen and (max-width: 768px) {
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    body {
        overscroll-behavior-y: none;
    }

    main {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .navigation-bar {
        gap: 20px;
    }
}

/* Ajustes para pantallas muy pequeñas */
@media screen and (max-width: 360px) {
    .navigation-bar {
        gap: 15px;
    }
    
    .nav-item {
        font-size: 0.8em;
    }
    
    .nav-item i {
        font-size: 1.3em;
    }
}

/* Orientación landscape en móviles */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .container {
        margin-top: 1rem;
        padding-bottom: calc(var(--nav-bar-height) + 20px);
    }
    
    .navigation-bar {
        height: 45px;
        gap: 30px;
    }
}


/* Botón Actualizar Ubicación */
.update-location-btn {
    padding: 8px 16px;
    background-color: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.update-location-btn:hover {
    background-color: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.25);
}

.update-location-btn:active {
    transform: translateY(0);
}

/* Estilos para la columna de acciones en la tabla */
#almacenesTable td:last-child {
    text-align: center;
    padding: 8px;
}

/* Ajustes para móvil */
@media (max-width: 768px) {
    .consolidate-btn {
        padding: 5px 10px;
        font-size: 0.7rem;
    }
    
    .btn-consumo-habitual {
        padding: 8px 16px;
        font-size: 0.8rem;
        width: 100%;
        justify-content: center;
    }
    
    .update-location-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
}
/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.sync-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    animation: slideInRight 0.3s ease;
    min-width: 300px;
}

.sync-toast i {
    font-size: 1.2rem;
}

.sync-toast.success {
    background-color: #d1fae5;
    border-left: 4px solid var(--success-green);
    color: #065f46;
}

.sync-toast.success i {
    color: var(--success-green);
}

.sync-toast.error {
    background-color: #fee2e2;
    border-left: 4px solid var(--danger-red);
    color: #991b1b;
}

.sync-toast.error i {
    color: var(--danger-red);
}

.sync-toast.info {
    background-color: #dbeafe;
    border-left: 4px solid var(--primary-blue);
    color: #1e40af;
}

.sync-toast.info i {
    color: var(--primary-blue);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Ajustes responsive para toasts */
@media (max-width: 768px) {
    .sync-toast {
        left: 10px;
        right: 10px;
        min-width: auto;
        max-width: calc(100% - 20px);
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .sync-toast i {
        font-size: 1rem;
    }
}

/* ============================================
   MEJORAS DEL MODAL PARA MÓVIL
   ============================================ */
@media (max-width: 768px) {
    /* Modal mejorado para móvil */
    .modal {
        padding: 0;
        align-items: flex-start;
    }
    
    .modal-content {
        max-width: 100%;
        max-height: 100vh;
        min-height: 100vh;
        border-radius: 0;
        padding: 15px;
        animation: modalSlideFromBottom 0.3s ease;
    }
    
    @keyframes modalSlideFromBottom {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
    
    /* Header del modal */
    .modal-content h2 {
        font-size: 1.3rem;
        margin-bottom: 15px;
        padding-bottom: 10px;
        padding-right: 40px;
    }
    
    .modal-content h3 {
        font-size: 1.1rem;
        margin-top: 20px;
        margin-bottom: 15px;
        color: var(--text-light);
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        border-bottom: 2px solid var(--primary-blue);
        padding-bottom: 8px;
    }
    
    /* Botón cerrar más grande y accesible */
    .close-button {
        width: 40px;
        height: 40px;
        font-size: 2rem;
        top: 15px;
        right: 15px;
        background-color: rgba(255, 255, 255, 0.9);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }
    
    /* Article Details mejorados */
    .article-details {
        margin: 15px 0;
        padding: 12px;
        background-color: #f8fafc;
    }
    
    .detail-row {
        padding: 10px 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .detail-row label {
        font-size: 0.8rem;
        color: var(--text-gray);
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }
    
    .detail-row span {
        font-size: 1rem;
        font-weight: 700;
        color: var(--primary-blue);
    }
    
    /* Wholesale info */
    .wholesale-info {
        margin-top: 15px;
        padding-top: 15px;
        border-top: 2px solid #e2e8f0;
    }
    
    .wholesale-info h4 {
        font-size: 0.85rem;
        color: var(--text-gray);
        margin-bottom: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    /* Botón consumo habitual más prominente */
    .btn-consumo-habitual {
        width: 100%;
        padding: 14px 20px;
        font-size: 0.95rem;
        margin-bottom: 15px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-dark) 100%);
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    }
    
    .btn-consumo-habitual i {
        font-size: 1.1rem;
    }
    
    /* Ubicación container mejorado */
    .ubicacion-container {
        background-color: #ffffff;
        border: 2px solid #e5e7eb;
        border-radius: 12px;
        padding: 15px;
        margin: 15px 0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }
    
    .ubicacion-container label {
        display: block;
        font-size: 0.8rem;
        font-weight: 700;
        color: var(--text-gray);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 8px;
    }
    
    .ubicacion-container input {
        width: 100%;
        padding: 12px;
        border: 2px solid #e5e7eb;
        border-radius: 8px;
        font-size: 1rem;
        margin-bottom: 10px;
        transition: border-color 0.2s ease;
    }
    
    .ubicacion-container input:focus {
        outline: none;
        border-color: var(--primary-blue);
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }
    
    .update-location-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
    }
    
    .update-location-btn i {
        font-size: 1.1rem;
    }
    
    /* Tabla de almacenes responsive */
    #almacenesTable {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 15px -15px;
        width: calc(100% + 30px);
        box-shadow: none;
        border-radius: 0;
    }
    
    #almacenesTable thead {
        display: block;
    }
    
    #almacenesTable tbody {
        display: block;
    }
    
    #almacenesTable tr {
        display: flex;
        flex-direction: column;
        background-color: white;
        margin-bottom: 12px;
        border: 2px solid #e5e7eb;
        border-radius: 12px;
        padding: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }
    
    #almacenesTable thead tr {
        display: none;
    }
    
    #almacenesTable td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
        border-bottom: 1px solid #f0f2f5;
        text-align: left !important;
    }
    
    #almacenesTable td:last-child {
        border-bottom: none;
        padding-top: 12px;
        justify-content: stretch;
    }
    
    #almacenesTable td::before {
        content: attr(data-label);
        font-weight: 700;
        font-size: 0.8rem;
        color: var(--text-gray);
        text-transform: uppercase;
        letter-spacing: 0.3px;
        flex-shrink: 0;
        min-width: 140px;
    }
    
    #almacenesTable td:not(:last-child) {
        font-size: 1rem;
        font-weight: 700;
        color: var(--primary-blue);
    }
    
    /* Botón consolidar en móvil */
    .consolidate-btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 0.95rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
    }
    
    .consolidate-btn::before {
        content: '📦';
        font-size: 1.1rem;
    }
    
    /* Foto del artículo */
    .article-photo-container {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin: 15px 0;
        padding: 15px;
        background-color: #f8fafc;
        border-radius: 12px;
        border: 2px solid #e5e7eb;
    }
    
    .article-photo-container img {
        width: 100%;
        height: auto;
        max-height: 300px;
        object-fit: contain;
        border-radius: 8px;
        background-color: white;
        padding: 10px;
    }
    
    .no-photo {
        width: 100%;
        padding: 60px 20px;
        background-color: white;
        border: 2px dashed #d1d5db;
        border-radius: 8px;
        text-align: center;
        color: var(--text-gray);
        font-size: 1rem;
        font-weight: 500;
    }
    
    .no-photo::before {
        content: '📷';
        display: block;
        font-size: 3rem;
        margin-bottom: 10px;
        opacity: 0.5;
    }
    
    /* Botones de foto */
    .btn-upload-photo,
    .btn-delete-photo {
        width: 100%;
        padding: 12px 20px;
        border: none;
        border-radius: 8px;
        font-size: 0.95rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
    
    .btn-upload-photo {
        background-color: var(--primary-blue);
        color: white;
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
    }
    
    .btn-upload-photo::before {
        content: '📤';
        font-size: 1.1rem;
    }
    
    .btn-delete-photo {
        background-color: #fee2e2;
        color: #dc2626;
        margin-top: 8px;
    }
    
    .btn-delete-photo::before {
        content: '🗑️';
        font-size: 1.1rem;
    }
    
    .btn-upload-photo:active {
        transform: scale(0.97);
    }
    
    .btn-delete-photo:active {
        transform: scale(0.97);
    }
    
    /* Modal actions mejorados */
    .modal-actions {
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
        padding-top: 20px;
        border-top: 2px solid #e5e7eb;
    }
    
    .modal-actions button {
        width: 100%;
        padding: 14px 20px;
        font-size: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
    
    .cancel-btn {
        order: 2;
    }
    
    .confirm-btn,
    .save-btn {
        order: 1;
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
    }
    
    /* Form groups en modal */
    .form-group {
        margin: 15px 0;
    }
    
    .form-group label {
        display: block;
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--text-gray);
        margin-bottom: 8px;
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }
    
    .input-group {
        margin: 12px 0;
    }
    
    .input-group label {
        display: block;
        font-size: 0.8rem;
        font-weight: 700;
        color: var(--text-gray);
        margin-bottom: 6px;
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }
    
    .input-group input {
        width: 100%;
        padding: 12px;
        border: 2px solid #e5e7eb;
        border-radius: 8px;
        font-size: 1rem;
        transition: border-color 0.2s ease;
    }
    
    .input-group input:focus {
        outline: none;
        border-color: var(--primary-blue);
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }
    
    /* Checkbox group */
    .checkbox-group {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px;
        background-color: #f8fafc;
        border-radius: 8px;
        margin: 12px 0;
    }
    
    .checkbox-group input[type="checkbox"] {
        width: 20px;
        height: 20px;
        cursor: pointer;
    }
    
    .checkbox-group label {
        margin: 0;
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--text-light);
        cursor: pointer;
        text-transform: none;
        letter-spacing: normal;
    }
    
    /* Mejoras para scrolling suave */
    .modal-content {
        scroll-behavior: smooth;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Espaciado inferior para evitar que el contenido quede oculto */
    .modal-content > *:last-child {
        margin-bottom: 20px;
    }
}