/* Variables globales */
:root {
    --primary-blue: #3b82f6;
    --accent-dark: #2563eb;
    --text-gray: #4b5563;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-dark: #1a1b1e;
    --border-light: #e2e8f0;
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Colores por conductor con opacidad reducida */
:root {
    --conductor-ferreira: rgba(51, 255, 181, 0.3);
    --conductor-gomez: rgba(59, 130, 246, 0.3);
    --conductor-diaz: rgba(16, 185, 129, 0.3);
    --conductor-barbero: rgba(245, 158, 11, 0.3);
    --conductor-rivas: rgba(255, 87, 51, 0.3);
    --conductor-pavon: rgba(51, 255, 87, 0.3);
    --conductor-gordillo: rgba(51, 87, 255, 0.3);
    --conductor-pachon: rgba(255, 51, 233, 0.3);
    --conductor-delgado: rgba(51, 255, 246, 0.3);
    --conductor-perez: rgba(255, 181, 51, 0.3);
    --conductor-correa: rgba(255, 51, 51, 0.3);
    --conductor-juarez: rgba(181, 51, 255, 0.3);
}

/* Estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--bg-white);
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-image {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.logo {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1.1rem;
}

.search-bar {
    flex: 1;
    max-width: 400px;
    margin: 0 2rem;
}

.search-bar input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logout-button {
    background-color: transparent;
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.logout-button:hover {
    background-color: var(--primary-blue);
    color: white;
}

/* Main content */
.main-content {
    padding: 2rem;
    margin-bottom: 70px;
}

/* Controls bar */
.controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background-color: var(--bg-white);
    padding: 1rem;
    border-radius: 12px;
    box-shadow: var(--shadow-light);
}

.filters {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.filters select {
    padding: 0.5rem;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 14px;
    min-width: 150px;
}

.refresh-button {
    background-color: var(--primary-blue);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.refresh-button:hover {
    background-color: var(--accent-dark);
}

.stats {
    display: flex;
    gap: 1rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: var(--bg-light);
    border-radius: 8px;
    min-width: 80px;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-blue);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-gray);
}

/* Content container */
.content-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Conductor sections */
.conductor-section {
    background-color: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.conductor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--conductor-color, var(--primary-blue)) 0%, rgba(255,255,255,0.9) 100%);
    color: var(--text-dark); /* Cambiar a texto oscuro para mejor contraste */
}

.conductor-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.conductor-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.conductor-details h3 {
    margin: 0;
    font-size: 1.2rem;
}

.conductor-details p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.conductor-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.pedidos-count {
    font-weight: 600;
    font-size: 1.1rem;
}

.vehicle-info {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Pedidos list */
.pedidos-list {
    padding: 0;
}

.pedido-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.pedido-item:hover {
    background-color: var(--bg-light);
}

.pedido-item:last-child {
    border-bottom: none;
}

.pedido-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.cliente-nombre {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
    flex: 1;
}

.pedido-fecha {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.pedido-descripcion {
    color: var(--text-gray);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.pedido-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.detail-item i {
    color: var(--text-gray);
    width: 16px;
}

.detail-value {
    color: var(--text-dark);
    font-weight: 500;
}

/* Colores específicos por conductor */
.conductor-ferreira {
    --conductor-color: var(--conductor-ferreira);
}

.conductor-gomez {
    --conductor-color: var(--conductor-gomez);
}

.conductor-diaz {
    --conductor-color: var(--conductor-diaz);
}

.conductor-barbero {
    --conductor-color: var(--conductor-barbero);
}

.conductor-rivas {
    --conductor-color: var(--conductor-rivas);
}

.conductor-pavon {
    --conductor-color: var(--conductor-pavon);
}

.conductor-gordillo {
    --conductor-color: var(--conductor-gordillo);
}

.conductor-pachon {
    --conductor-color: var(--conductor-pachon);
}

.conductor-delgado {
    --conductor-color: var(--conductor-delgado);
}

.conductor-perez {
    --conductor-color: var(--conductor-perez);
}

.conductor-correa {
    --conductor-color: var(--conductor-correa);
}

.conductor-juarez {
    --conductor-color: var(--conductor-juarez);
}

/* Pendientes header */
.pendientes-header {
    background: linear-gradient(135deg, #6b7280 0%, rgba(255,255,255,0.1) 100%);
}

/* Navigation bar */
.navigation-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.nav-item {
    color: var(--text-gray);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    padding: 0.5rem;
}

.nav-item:hover,
.nav-item.active {
    color: var(--primary-blue);
}

.nav-item i {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

/* Responsive design */
@media (max-width: 768px) {
    header {
        padding: 0.5rem 1rem;
        flex-wrap: wrap;
    }

    .logo {
        font-size: 1rem;
    }

    .search-bar {
        order: 3;
        width: 100%;
        margin: 0.5rem 0 0 0;
        max-width: none;
    }

    .main-content {
        padding: 1rem;
    }

    .controls-bar {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .filters {
        flex-wrap: wrap;
    }

    .stats {
        justify-content: center;
    }

    .conductor-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .conductor-stats {
        align-items: flex-start;
    }

    .pedido-details {
        grid-template-columns: 1fr;
    }

    .navigation-bar {
        gap: 20px;
    }

    .nav-item {
        font-size: 0.8rem;
    }

    .nav-item i {
        font-size: 1.3rem;
    }
}

/* Loading state */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    color: var(--text-gray);
}

.loading i {
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-gray);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--border-light);
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.btn-create-albaran {
    background-color: var(--primary-blue);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-create-albaran:hover {
    background-color: var(--accent-dark);
}

.btn-view-details {
    background-color: transparent;
    color: var(--text-gray);
    border: 1px solid var(--border-light);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-view-details:hover {
    background-color: var(--bg-light);
    border-color: var(--text-gray);
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background-color: var(--bg-white);
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-medium);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    background-color: var(--bg-light);
    border-radius: 12px 12px 0 0;
}

.modal-header h2 {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-gray);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background-color: var(--border-light);
    color: var(--text-dark);
}

.modal-body {
    padding: 1.5rem;
}

/* Pedido details styles */
.pedido-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.detail-section {
    margin-bottom: 1.5rem;
}

.detail-section h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-light);
    font-size: 1.1rem;
}

.detail-section p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.detail-section strong {
    color: var(--text-dark);
    font-weight: 600;
}

/* Tabla de artículos */
.articulos-table {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.articulos-table table {
    width: 100%;
    border-collapse: collapse;
}

.articulos-table th,
.articulos-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.articulos-table th {
    background-color: var(--bg-light);
    font-weight: 600;
    color: var(--text-dark);
}

.articulos-table tr:last-child td {
    border-bottom: none;
}

.articulos-table tr:hover {
    background-color: var(--bg-light);
}

/* Responsive modal */
@media (max-width: 768px) {
    .modal-content {
        margin: 0;
        border-radius: 0;
        height: 100vh;
        max-height: none;
    }
    
    .modal-header {
        border-radius: 0;
    }
    
    .pedido-details-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .articulos-table {
        font-size: 0.9rem;
    }
    
    .articulos-table th,
    .articulos-table td {
        padding: 0.5rem;
    }
}
/* ===== Visor números albarán (header) ===== */
.albaran-counters {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-left: 1rem;
}

.albaran-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    padding: 6px 10px;
    border-radius: 999px;
    box-shadow: var(--shadow-light);
    font-size: 0.9rem;
    white-space: nowrap;
}

.albaran-pill i {
    color: var(--primary-blue);
    font-size: 1rem;
}

.albaran-pill .pill-label {
    color: var(--text-gray);
    font-weight: 600;
    letter-spacing: .2px;
}

.albaran-pill .pill-number {
    color: var(--text-dark);
    font-weight: 700;
}

/* Responsive: en pantallas pequeñas reducimos el tamaño */
@media (max-width: 768px) {
    .albaran-counters {
        gap: 6px;
        margin-left: .5rem;
    }
    .albaran-pill {
        padding: 4px 8px;
        font-size: 0.8rem;
    }
}
/* Sistema de notificaciones y modales mejorados */
.notification-overlay {
    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;
    padding: 1rem;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.notification-modal {
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.notification-header {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
}

.notification-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.notification-icon.success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.notification-icon.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.notification-icon.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.notification-icon.info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.notification-icon.question {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.notification-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.notification-message {
    color: var(--text-gray);
    line-height: 1.5;
    font-size: 1rem;
}

.notification-body {
    padding: 1.5rem;
}

.notification-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding: 1.5rem;
    background: var(--bg-light);
}

.notification-btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.notification-btn.primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-dark));
    color: white;
}

.notification-btn.primary:hover {
    background: linear-gradient(135deg, var(--accent-dark), #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.notification-btn.success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.notification-btn.success:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.notification-btn.danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.notification-btn.danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.notification-btn.secondary {
    background: var(--bg-white);
    color: var(--text-gray);
    border: 1px solid var(--border-light);
}

.notification-btn.secondary:hover {
    background: var(--bg-light);
    border-color: var(--text-gray);
}

/* Loading spinner */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 15000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.loading-content {
    background: var(--bg-white);
    padding: 3rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.3s ease;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border-light);
    border-top: 4px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

.loading-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.loading-subtext {
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast notifications */
.toast-notification {
    position: fixed;
    top: 80px;
    right: 1rem;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 1rem 1.5rem;
    z-index: 12000;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    border-left: 4px solid var(--primary-blue);
}

.toast-notification.show {
    transform: translateX(0);
}

.toast-notification.success {
    border-left-color: #10b981;
}

.toast-notification.error {
    border-left-color: #ef4444;
}

.toast-notification.warning {
    border-left-color: #f59e0b;
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: white;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.toast-message {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.25rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.toast-close:hover {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .notification-modal {
        margin: 1rem;
        max-width: none;
    }
    
    .notification-buttons {
        flex-direction: column;
    }
    
    .notification-btn {
        width: 100%;
    }
    
    .toast-notification {
        right: 1rem;
        left: 1rem;
        min-width: auto;
    }
}
/* ===== ESTILOS PARA MODIFICACIÓN DE MODELOS ===== */
/* Agregar al final de cartaportealbaran.css */

.btn-close-modificacion {
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-close-modificacion:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.modificacion-content {
    padding: 0;
}

/* Pestañas de navegación */
.modificacion-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-light);
    background-color: var(--bg-light);
}

.tab-button {
    flex: 1;
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    color: var(--text-gray);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-button.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
    background-color: var(--bg-white);
}

.tab-button:hover:not(.active) {
    color: var(--text-dark);
    background-color: rgba(59, 130, 246, 0.05);
}

/* Contenido de pestañas */
.tab-content {
    display: none;
    padding: 1.5rem;
}

.tab-content.active {
    display: block;
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.tab-header h4 {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.2rem;
}

.btn-refresh {
    background-color: var(--bg-light);
    border: 1px solid var(--border-light);
    color: var(--text-gray);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-refresh:hover {
    background-color: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

/* Lista de modelos */
.modelos-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modelo-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.modelo-card:hover {
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-blue);
}

.modelo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.modelo-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.modelo-icon {
    color: #1f7a1f;
    font-size: 2rem;
}

.modelo-details h4 {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.modelo-type {
    margin: 0;
    color: var(--text-gray);
    font-size: 0.9rem;
}

.modelo-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.file-size {
    font-weight: 600;
    color: var(--text-dark);
}

.file-date {
    font-size: 0.9rem;
    color: var(--text-gray);
}

.modelo-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.modelo-actions button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-download {
    background-color: var(--primary-blue);
    color: white;
}

.btn-download:hover {
    background-color: var(--accent-dark);
}

.btn-info {
    background-color: var(--bg-light);
    color: var(--text-gray);
    border: 1px solid var(--border-light);
}

.btn-info:hover {
    background-color: #6b7280;
    color: white;
}

.btn-replace {
    background-color: #f59e0b;
    color: white;
}

.btn-replace:hover {
    background-color: #d97706;
}

/* Estados de carga y error */
.loading-state, .error-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-gray);
}

.loading-state i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-blue);
}

.error-state i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #ef4444;
}

/* Modal de reemplazo */
.replace-modal-content {
    max-width: 600px;
}

.warning-banner {
    background-color: #fef3cd;
    border: 1px solid #f6e05e;
    color: #975a16;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.file-upload-area {
    margin-bottom: 1.5rem;
}

.upload-dropzone {
    border: 2px dashed var(--border-light);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: var(--bg-light);
}

.upload-dropzone:hover {
    border-color: var(--primary-blue);
    background-color: rgba(59, 130, 246, 0.05);
}

.upload-dropzone i {
    font-size: 3rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.upload-dropzone p {
    margin: 0.5rem 0;
    color: var(--text-dark);
    font-weight: 500;
}

.upload-hint {
    font-size: 0.9rem;
    color: var(--text-gray) !important;
}

.file-info {
    margin-bottom: 1.5rem;
}

.file-preview {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background-color: var(--bg-light);
    border-radius: 6px;
}

.file-preview i {
    color: #1f7a1f;
    font-size: 1.2rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.modal-actions button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-validate {
    background-color: #8b5cf6;
    color: white;
}

.btn-validate:hover {
    background-color: #7c3aed;
}

.btn-upload {
    background-color: var(--primary-blue);
    color: white;
}

.btn-upload:hover {
    background-color: var(--accent-dark);
}

.btn-cancel {
    background-color: var(--bg-light);
    color: var(--text-gray);
    border: 1px solid var(--border-light);
}

.btn-cancel:hover {
    background-color: var(--text-gray);
    color: white;
}

/* Lista de backups */
.backups-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 500px;
    overflow-y: auto;
}

.backup-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.backup-item:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1);
}

.backup-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.backup-info i {
    color: var(--text-gray);
    font-size: 1.2rem;
}

.backup-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.backup-name {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.backup-date {
    font-size: 0.8rem;
    color: var(--text-gray);
}

.backup-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.backup-size {
    font-size: 0.8rem;
    color: var(--text-gray);
    min-width: 60px;
    text-align: right;
}

.btn-download-backup {
    background-color: transparent;
    border: none;
    color: var(--primary-blue);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-download-backup:hover {
    background-color: var(--primary-blue);
    color: white;
}

.backup-more {
    text-align: center;
    padding: 1rem;
    color: var(--text-gray);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-light);
    margin-top: 0.5rem;
}

/* Información de modelo */
.modelo-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.info-section h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-light);
}

.info-section p {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.hoja-info {
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background-color: var(--bg-light);
    border-radius: 4px;
}

.hoja-info strong {
    color: var(--text-dark);
}

.hoja-info small {
    color: var(--text-gray);
}

/* Responsive */
@media (max-width: 768px) {
    .modificacion-tabs {
        flex-direction: column;
    }
    
    .tab-button {
        justify-content: center;
    }
    
    .modelo-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .modelo-stats {
        align-items: flex-start;
    }
    
    .modelo-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .modelo-info-grid {
        grid-template-columns: 1fr;
    }
    
    .backup-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .backup-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions button {
        width: 100%;
        justify-content: center;
    }
}
.btn-generar-pdf {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(231, 76, 60, 0.2);
}

.btn-generar-pdf:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

.btn-generar-pdf:active {
    transform: translateY(0);
}

.btn-generar-pdf:disabled {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}
