/* ========== ESTILOS PARA TARJETAS DE USUARIOS - ADMINISTRACIÓN ========== */

.user-cards-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    border: 1px solid #e2e8f0;
}

.user-cards-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.user-cards-title {
    color: #1e293b;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-cards-subtitle {
    color: #64748b;
    font-size: 0.95rem;
    margin: 5px 0 0 0;
}

.user-cards-actions {
    display: flex;
    gap: 10px;
}

.btn-add-user {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-add-user:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.btn-refresh {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-refresh:hover {
    background: #545862;
    transform: translateY(-1px);
}

/* ========== GRID DE TARJETAS ========== */

.user-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.user-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 20px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.user-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: #007bff;
}

.user-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #0056b3);
}

/* ========== HEADER DE TARJETA ========== */

.user-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f5f9;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: bold;
    margin-right: 15px;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    border: 3px solid white;
}

.user-avatar.admin {
    background: linear-gradient(45deg, #dc3545, #c82333);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.user-avatar.vendedor {
    background: linear-gradient(45deg, #28a745, #1e7e34);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.user-avatar.asistente {
    background: linear-gradient(45deg, #ffc107, #e0a800);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.user-info h3 {
    margin: 0 0 5px 0;
    color: #1e293b;
    font-size: 1.2rem;
    font-weight: 600;
}

.user-role {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.user-status {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.status-inactive {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* ========== ESTADÍSTICAS ========== */

.activity-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.stat-item {
    text-align: center;
    padding: 15px 10px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.stat-item:hover {
    background: #f1f5f9;
    transform: translateY(-1px);
}

.stat-number {
    font-size: 1.6rem;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 5px;
    display: block;
}

.stat-label {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========== HISTORIAL DE ACTIVIDADES ========== */

.activity-history {
    margin-top: 20px;
}

.activity-history h4 {
    color: #1e293b;
    font-size: 1rem;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.activity-list {
    max-height: 200px;
    overflow-y: auto;
    background: #f8fafc;
    border-radius: 8px;
    padding: 10px;
    border: 1px solid #e2e8f0;
}

.activity-list::-webkit-scrollbar {
    width: 6px;
}

.activity-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.activity-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.activity-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    padding: 10px;
    margin-bottom: 8px;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #007bff;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.activity-item:hover {
    background: #f8fafc;
    transform: translateX(2px);
}

.activity-item:last-child {
    margin-bottom: 0;
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.activity-cotizacion {
    background: #dbeafe;
    color: #1d4ed8;
    border-left-color: #1d4ed8;
}

.activity-cliente {
    background: #dcfce7;
    color: #16a34a;
    border-left-color: #16a34a;
}

.activity-producto {
    background: #fef3c7;
    color: #d97706;
    border-left-color: #d97706;
}

.activity-sistema {
    background: #f3e8ff;
    color: #7c3aed;
    border-left-color: #7c3aed;
}

.activity-modificacion {
    background: #fef3c7;
    color: #d97706;
    border-left-color: #d97706;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-action {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 3px;
    word-wrap: break-word;
}

.activity-time {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0;
}

.activity-empty {
    text-align: center;
    color: #64748b;
    padding: 30px 20px;
    font-style: italic;
}

.activity-empty i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #cbd5e1;
    display: block;
}

/* ========== ACCIONES DE USUARIO ========== */

.user-actions {
    margin-top: 20px;
    display: flex;
    gap: 8px;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
}

.btn-user-action {
    flex: 1;
    padding: 10px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-user-primary {
    background: #007bff;
    color: white;
}

.btn-user-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.btn-user-secondary {
    background: #6c757d;
    color: white;
}

.btn-user-secondary:hover {
    background: #545862;
    transform: translateY(-1px);
}

.btn-user-danger {
    background: #dc3545;
    color: white;
}

.btn-user-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* ========== ESTADO VACÍO ========== */

.empty-users-state {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
    background: white;
    border-radius: 12px;
    border: 2px dashed #cbd5e1;
}

.empty-users-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #cbd5e1;
}

.empty-users-state h4 {
    color: #475569;
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}

.empty-users-state p {
    margin: 0 0 20px 0;
    font-size: 0.95rem;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 1200px) {
    .user-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
}

@media (max-width: 768px) {
    .user-cards-section {
        padding: 20px 15px;
        margin: 15px 0;
    }

    .user-cards-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .user-cards-actions {
        width: 100%;
    }

    .btn-add-user,
    .btn-refresh {
        flex: 1;
        justify-content: center;
    }

    .user-cards-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .user-card {
        padding: 15px;
    }

    .user-card-header {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .user-avatar {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .activity-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-item {
        padding: 12px 8px;
    }

    .stat-number {
        font-size: 1.4rem;
    }

    .user-actions {
        flex-direction: column;
        gap: 8px;
    }

    .btn-user-action {
        flex: none;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .user-cards-section {
        padding: 15px 10px;
        margin: 10px 0;
    }

    .user-card {
        padding: 12px;
    }

    .activity-stats {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .activity-list {
        max-height: 150px;
        padding: 8px;
    }

    .activity-item {
        padding: 8px;
        font-size: 0.8rem;
    }

    .activity-icon {
        width: 28px;
        height: 28px;
        margin-right: 10px;
    }
}

/* ========== ANIMACIONES ========== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-card {
    animation: fadeInUp 0.5s ease forwards;
}

.user-card:nth-child(1) { animation-delay: 0.1s; }
.user-card:nth-child(2) { animation-delay: 0.2s; }
.user-card:nth-child(3) { animation-delay: 0.3s; }
.user-card:nth-child(4) { animation-delay: 0.4s; }

/* ========== TEMA OSCURO (OPCIONAL) ========== */

@media (prefers-color-scheme: dark) {
    .user-cards-section {
        background: #1e293b;
        border-color: #334155;
    }

    .user-card {
        background: #334155;
        border-color: #475569;
        color: #e2e8f0;
    }

    .user-info h3 {
        color: #f1f5f9;
    }

    .stat-item {
        background: #475569;
        border-color: #64748b;
    }

    .activity-list {
        background: #475569;
        border-color: #64748b;
    }

    .activity-item {
        background: #64748b;
    }
}

/* ========== MODAL DE HISTORIAL DE USUARIO ========== */

.user-history-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    box-sizing: border-box;
}

.history-modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 95%;
    max-width: 1200px;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ========== HEADER DEL MODAL ========== */

.history-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 30px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-radius: 16px 16px 0 0;
}

.history-header-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.history-user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
}

.history-modal-header h2 {
    margin: 0 0 5px 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.history-user-role {
    margin: 0;
    opacity: 0.9;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.history-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.history-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* ========== FILTROS DE BÚSQUEDA ========== */

.activity-filters {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 20px 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 200px;
}

.filter-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-input {
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: white;
}

.filter-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.filter-input::placeholder {
    color: #adb5bd;
    font-style: italic;
}

.filter-actions {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.filter-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-btn.clear {
    background: #6c757d;
    color: white;
}

.filter-btn.clear:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.filter-btn.search {
    background: #007bff;
    color: white;
}

.filter-btn.search:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.filter-results-count {
    background: #e9ecef;
    color: #495057;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: auto;
}

/* Responsive para filtros */
@media (max-width: 768px) {
    .activity-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .filter-group {
        min-width: unset;
    }
    
    .filter-actions {
        margin-left: 0;
        justify-content: center;
    }
}

/* ========== BODY DEL MODAL ========== */

.history-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* ========== RESUMEN DE ESTADÍSTICAS ========== */

.history-stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    padding: 25px 30px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.history-stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.history-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.cotizaciones-icon { background: linear-gradient(45deg, #007bff, #0056b3); }
.clientes-icon { background: linear-gradient(45deg, #28a745, #1e7e34); }
.productos-icon { background: linear-gradient(45deg, #ffc107, #e0a800); }
.sistema-icon { background: linear-gradient(45deg, #6f42c1, #5a2d91); }

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #1e293b;
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 2px;
    font-weight: 500;
}

/* ========== PESTAÑAS DE HISTORIAL ========== */

.history-tabs {
    display: flex;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 30px;
    overflow-x: auto;
}

.history-tab-btn {
    background: none;
    border: none;
    padding: 15px 20px;
    color: #64748b;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.history-tab-btn:hover {
    color: #007bff;
    background: #f8fafc;
}

.history-tab-btn.active {
    color: #007bff;
    border-bottom-color: #007bff;
    background: #f8fafc;
}

/* ========== CONTENIDO DE PESTAÑAS ========== */

.history-tab-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.history-activities-container {
    padding: 25px 30px;
    min-height: 300px;
}

/* ========== TIMELINE DE ACTIVIDADES ========== */

.history-timeline {
    position: relative;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.history-timeline::-webkit-scrollbar {
    width: 6px;
}

.history-timeline::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.history-timeline::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    display: flex;
    margin-bottom: 25px;
    padding-left: 60px;
    opacity: 0;
    animation: timelineSlideIn 0.5s ease forwards;
}

@keyframes timelineSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.timeline-marker {
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.timeline-marker.cotizaciones { background: linear-gradient(45deg, #007bff, #0056b3); }
.timeline-marker.clientes { background: linear-gradient(45deg, #28a745, #1e7e34); }
.timeline-marker.productos { background: linear-gradient(45deg, #ffc107, #e0a800); }
.timeline-marker.sistema { background: linear-gradient(45deg, #6f42c1, #5a2d91); }

.timeline-content {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    flex: 1;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.timeline-content:hover {
    border-color: #007bff;
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.1);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.timeline-action {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
}

.timeline-time {
    background: #f1f5f9;
    color: #64748b;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.timeline-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timeline-date {
    color: #64748b;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.timeline-extra-details {
    color: #475569;
    font-size: 0.85rem;
    line-height: 1.4;
}

.detail-item {
    margin-right: 8px;
}

/* ========== ESTADO VACÍO EN HISTORIAL ========== */

.history-empty {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.history-empty i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #cbd5e1;
}

.history-empty h4 {
    color: #475569;
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}

.history-empty p {
    margin: 0;
    font-size: 0.95rem;
}

/* ========== FOOTER DEL MODAL ========== */

.history-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 16px 16px;
}

.btn-export-history {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-export-history:hover {
    background: #1e7e34;
    transform: translateY(-1px);
}

.btn-close-history {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-close-history:hover {
    background: #545862;
    transform: translateY(-1px);
}

/* ========== RESPONSIVE PARA MODAL ========== */

@media (max-width: 768px) {
    .user-history-modal {
        padding: 10px;
    }

    .history-modal-content {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 12px;
    }

    .history-modal-header {
        padding: 20px;
        border-radius: 12px 12px 0 0;
    }

    .history-header-info {
        gap: 12px;
    }

    .history-user-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .history-modal-header h2 {
        font-size: 1.3rem;
    }

    .history-stats-summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 20px;
    }

    .history-stat-card {
        padding: 15px;
        gap: 12px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .history-tabs {
        padding: 0 20px;
        overflow-x: auto;
    }

    .history-tab-btn {
        padding: 12px 16px;
        font-size: 0.85rem;
    }

    .history-activities-container {
        padding: 20px;
    }

    .timeline-item {
        padding-left: 50px;
        margin-bottom: 20px;
    }

    .timeline-marker {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }

    .timeline-content {
        padding: 15px;
    }

    .timeline-action {
        font-size: 1rem;
    }

    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .history-modal-footer {
        padding: 15px 20px;
        flex-direction: column;
        gap: 10px;
    }

    .btn-export-history,
    .btn-close-history {
        width: 100%;
        justify-content: center;
    }
}

/* ========== INFORMACIÓN DESTACADA EN ACTIVIDADES ========== */

.timeline-primary-info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.highlight-info {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.highlight-info i {
    font-size: 0.75rem;
}

.highlight-info.ot-number {
    background: #e3f2fd;
    color: #1976d2;
    border-color: #bbdefb;
}

.highlight-info.client-name {
    background: #e8f5e8;
    color: #2e7d32;
    border-color: #c8e6c9;
}

.highlight-info.total-price {
    background: #fff3e0;
    color: #f57c00;
    border-color: #ffcc02;
    font-weight: 700;
}

.highlight-info.client-rut {
    background: #f3e5f5;
    color: #7b1fa2;
    border-color: #ce93d8;
}

.highlight-info.client-company {
    background: #e0f2f1;
    color: #00695c;
    border-color: #80cbc4;
}

.highlight-info.product-name {
    background: #fce4ec;
    color: #c2185b;
    border-color: #f8bbd9;
}

.highlight-info.product-price {
    background: #fff8e1;
    color: #ff8f00;
    border-color: #ffcc02;
    font-weight: 700;
}

.highlight-info.product-brand {
    background: #f1f8e9;
    color: #558b2f;
    border-color: #aed581;
}

.click-hint {
    margin-top: 8px;
    font-size: 0.75rem;
    color: #6c757d;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.timeline-item.clickable:hover .click-hint {
    opacity: 1;
}

.timeline-item.clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.timeline-item.clickable:hover {
    background: rgba(0, 123, 255, 0.02);
    border-left: 3px solid #007bff;
    padding-left: 12px;
    margin-left: -3px;
}

/* ========== ACTIVIDADES FILTRADAS ========== */

.timeline-item.filtered-out {
    display: none;
}

.no-results-message {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.no-results-message i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.no-results-message h3 {
    margin: 0 0 8px 0;
    font-size: 1.2rem;
    color: #495057;
}

.no-results-message p {
    margin: 0;
    font-size: 0.9rem;
}

/* ========== MODAL DE DETALLES DE ACTIVIDAD ========== */

.activity-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: fadeIn 0.3s ease;
}

.activity-detail-modal .modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

.activity-detail-modal .modal-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.activity-detail-modal .modal-header h4 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
}

.activity-detail-modal .modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.activity-detail-modal .modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.activity-detail-modal .modal-body {
    padding: 25px;
}

.detail-grid {
    display: grid;
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #e9ecef;
}

.detail-item.highlight {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left-color: #ffc107;
}

.detail-item label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item span {
    font-size: 1rem;
    color: #212529;
    font-weight: 500;
}

.detail-item.highlight span {
    font-weight: 700;
    color: #856404;
}

.quote-details .ot-number {
    color: #0056b3;
    font-family: 'Courier New', monospace;
}

.quote-details .client-name {
    color: #155724;
}

.quote-details .quote-total {
    color: #e67e22;
    font-size: 1.1rem;
}

.client-details .client-name {
    color: #155724;
}

.client-details .client-rut {
    color: #6f42c1;
    font-family: 'Courier New', monospace;
}

.client-details .client-company {
    color: #117a8b;
}

.product-details .product-name {
    color: #721c24;
}

.product-details .product-price {
    color: #e67e22;
    font-size: 1.1rem;
}

.product-details .product-brand {
    color: #155724;
}

.activity-detail-modal .modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.activity-detail-modal .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.activity-detail-modal .btn-secondary {
    background: #6c757d;
    color: white;
}

.activity-detail-modal .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
