/* ===== SISTEMA DE DISEÑO ULTRA PROFESIONAL ===== */

/* Variables CSS para consistencia */
:root {
    --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --secondary-gradient: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --dark-gradient: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 12px 40px rgba(0, 0, 0, 0.15);
    --shadow-strong: 0 20px 60px rgba(0, 0, 0, 0.2);
    --border-radius: 16px;
    --border-radius-lg: 24px;
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 32px;
    --spacing-xl: 48px;
    --font-weight-light: 300;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
}

/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    min-height: 100vh;
}

/* ===== ESTILOS GLOBALES ===== */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

/* ===== CONTENEDOR PRINCIPAL ===== */
.lead-profile-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: var(--spacing-sm);
    background: transparent;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Responsive para contenedor */
@media (min-width: 768px) {
    .lead-profile-container {
        padding: var(--spacing-md);
    }
}

@media (min-width: 1200px) {
    .lead-profile-container {
        padding: var(--spacing-lg);
    }
}

/* ===== HERO SECTION PREMIUM ===== */
.lead-hero {
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.1) 0%, 
        rgba(118, 75, 162, 0.1) 50%, 
        rgba(240, 147, 251, 0.1) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

.lead-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
}

.lead-hero-content {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    position: relative;
    z-index: 2;
    flex-direction: column;
    text-align: center;
    width: 100%;
    max-width: 100%;
}

/* Responsive para hero content */
@media (min-width: 768px) {
    .lead-hero {
        padding: var(--spacing-lg);
    }
    
    .lead-hero-content {
        flex-direction: row;
        text-align: left;
        gap: var(--spacing-lg);
    }
}

@media (min-width: 1200px) {
    .lead-hero {
        padding: var(--spacing-xl);
    }
}

.lead-avatar {
    width: 80px;
    height: 80px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: var(--font-weight-bold);
    color: white;
    box-shadow: var(--shadow-strong);
    position: relative;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .lead-avatar {
        width: 100px;
        height: 100px;
        font-size: 2.2rem;
    }
}

@media (min-width: 1200px) {
    .lead-avatar {
        width: 120px;
        height: 120px;
        font-size: 2.5rem;
    }
}

.lead-avatar::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(45deg, #3b82f6, #1d4ed8, #60a5fa);
    z-index: -1;
    opacity: 0.3;
    filter: blur(8px);
}

.lead-info {
    flex: 1;
}

.lead-info h1 {
    font-size: 1.8rem;
    font-weight: var(--font-weight-bold);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-xs);
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

@media (min-width: 768px) {
    .lead-info h1 {
        font-size: 2.2rem;
    }
}

@media (min-width: 1200px) {
    .lead-info h1 {
        font-size: 2.5rem;
    }
}

.lead-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--spacing-md);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

@media (min-width: 768px) {
    .lead-subtitle {
        font-size: 1rem;
    }
}

@media (min-width: 1200px) {
    .lead-subtitle {
        font-size: 1.125rem;
    }
}

.lead-badges {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.luxury-badge {
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.luxury-badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.status-new { background: rgba(59, 130, 246, 0.15); color: #1d4ed8; }
.status-contacted { background: rgba(16, 185, 129, 0.15); color: #047857; }
.status-qualified { background: rgba(245, 158, 11, 0.15); color: #92400e; }
.status-active { background: rgba(34, 197, 94, 0.15); color: #15803d; }
.status-inactive { background: rgba(156, 163, 175, 0.15); color: #374151; }
.priority-high { background: rgba(239, 68, 68, 0.15); color: #dc2626; }
.priority-medium { background: rgba(245, 158, 11, 0.15); color: #d97706; }
.priority-low { background: rgba(34, 197, 94, 0.15); color: #16a34a; }
.status-online { background: rgba(34, 197, 94, 0.15); color: #16a34a; }
.status-offline { background: rgba(156, 163, 175, 0.15); color: #6b7280; }

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot.online { background: #10b981; }
.dot.offline { background: #9ca3af; }

.lead-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.luxury-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    min-width: 120px;
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 200px;
}

@media (min-width: 768px) {
    .luxury-btn {
        width: auto;
        min-width: 160px;
    }
}

.luxury-btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-soft);
}

.luxury-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.luxury-btn-secondary {
    background: var(--glass-bg);
    color: #4a5568;
    border: 1px solid var(--glass-border);
}

.luxury-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* ===== ACCIONES RÁPIDAS REDISEÑADAS ===== */
.quick-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

/* Responsive para quick actions */
@media (min-width: 640px) {
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .quick-actions {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

.quick-action-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.quick-action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.quick-action-card:hover::before {
    left: 100%;
}

.quick-action-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-strong);
    border-color: rgba(102, 126, 234, 0.3);
}

.quick-action-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    display: block;
}

.quick-action-title {
    font-size: 1.25rem;
    font-weight: var(--font-weight-semibold);
    color: #2d3748;
    margin-bottom: var(--spacing-xs);
}

.quick-action-desc {
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* ===== PANELES INFORMATIVOS PREMIUM ===== */
.info-panels {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

/* Responsive para paneles informativos */
@media (min-width: 1024px) {
    .info-panels {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        align-items: stretch;
        gap: var(--spacing-lg);
    }
}

.panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
}

/* Igualar altura de paneles en grilla */
.info-panels > .panel { height: 100%; }

.lead-profile-container > .panel + .panel {
    margin-top: var(--spacing-xl);
}

.panel:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

.panel-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-md);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

@media (min-width: 768px) {
    .panel-header {
        gap: var(--spacing-sm);
        padding: var(--spacing-lg);
    }
}

.panel-header:hover {
    background: rgba(255, 255, 255, 0.1);
}

.panel-icon {
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    border-radius: var(--border-radius);
    color: white;
    box-shadow: var(--shadow-soft);
}

@media (min-width: 768px) {
    .panel-icon {
        font-size: 1.5rem;
        width: 48px;
        height: 48px;
    }
}

.panel-title {
    flex: 1;
    font-size: 1rem;
    font-weight: var(--font-weight-semibold);
    color: #2d3748;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

@media (min-width: 768px) {
    .panel-title {
        font-size: 1.25rem;
    }
}

.panel-caret {
    transition: transform 0.3s ease;
    color: #64748b;
}

.panel.is-open .panel-caret {
    transform: rotate(180deg);
}

.panel-content {
    padding: var(--spacing-md);
}

@media (min-width: 768px) {
    .panel-content {
        padding: var(--spacing-lg);
    }
}

.collapsible-content {
    max-height: none;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
}

.panel:not(.is-open) .collapsible-content {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.panel.is-open .collapsible-content {
    max-height: none;
    opacity: 1;
}

/* Panel caret animation */
.panel-caret svg {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.panel:not(.is-open) .panel-caret svg {
    transform: rotate(-90deg);
}

/* ===== WIDGETS ULTRA PROFESIONALES ===== */
.contact-info, .assignment-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-md);
}

.contact-item, .assignment-item {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.contact-item::before, .assignment-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.contact-item:hover::before, .assignment-item:hover::before {
    transform: scaleX(1);
}

.contact-item:hover, .assignment-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(102, 126, 234, 0.3);
}

.item-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
}

.item-icon:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-medium);
}

.item-content {
    flex: 1;
    min-width: 0;
}

.item-content strong {
    display: block;
    font-weight: var(--font-weight-semibold);
    color: #2d3748;
    margin-bottom: 4px;
    font-size: 0.875rem;
}

.contact-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    transition: all 0.3s ease;
    position: relative;
}

.contact-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: width 0.3s ease;
}

.contact-link:hover::after {
    width: 100%;
}

.form-select {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 0.875rem;
    color: #2d3748;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    width: 100%;
}

.form-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ===== ESTADÍSTICAS PREMIUM ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

/* Responsive para stats grid */
@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: var(--shadow-strong);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: var(--font-weight-bold);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
}

/* Activity Timeline Styles */
.activity-timeline {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    overflow-x: auto;
}

.timeline-header {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    align-items: center;
    min-width: 600px;
}

.timeline-header .timeline-column {
    flex: 1;
    min-width: 0;
}

.timeline-header .timeline-column:nth-child(1) { /* Fecha */
    flex: 0 0 160px;
}

.timeline-header .timeline-column:nth-child(2) { /* Actividad */
    flex: 0 0 180px;
}

.timeline-header .timeline-column:nth-child(3) { /* Comentario */
    flex: 2;
    min-width: 200px;
}

.timeline-header .timeline-column:nth-child(4) { /* Creado Por */
    flex: 0 0 140px;
}

.timeline-column {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    min-width: 0;
    overflow: hidden;
}

/* ===== PANEL DE CONTRASEÑA (UX) ===== */
#pwd-panel .panel-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
#pwd-panel .panel-content {
    background: rgba(255, 255, 255, 0.6);
}
#pwd-panel .comment-form .form-group {
    margin-bottom: var(--spacing-md);
}
#pwd-panel .form-input {
    height: 44px;
    border-radius: 12px;
    padding: 10px 14px;
}
#pwd-panel .btn-primary {
    width: 100%;
    border-radius: 12px;
    padding: 12px;
    background: var(--secondary-gradient);
}
#pwd-panel .text-muted {
    display: block;
    margin-top: 8px;
    color: #64748b;
}

.timeline-row {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
    align-items: start;
    min-height: 60px;
    min-width: 600px;
}

.timeline-row .timeline-column {
    flex: 1;
    min-width: 0;
}

.timeline-row .timeline-column:nth-child(1) { /* Fecha */
    flex: 0 0 160px;
}

.timeline-row .timeline-column:nth-child(2) { /* Actividad */
    flex: 0 0 180px;
}

.timeline-row .timeline-column:nth-child(3) { /* Comentario */
    flex: 2;
    min-width: 200px;
}

.timeline-row .timeline-column:nth-child(4) { /* Creado Por */
    flex: 0 0 140px;
}

.timeline-row:hover {
    background: #f8faff;
    transform: translateY(-1px);
}

.timeline-row:last-child {
    border-bottom: none;
}

.timeline-row.new-activity {
    background: linear-gradient(90deg, #e3f2fd 0%, #ffffff 100%);
    border-left: 4px solid #2196f3;
    animation: slideInFromRight 0.5s ease-out;
}

.timeline-row.animate-in {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive para timeline */
@media (max-width: 768px) {
    .activity-timeline {
        overflow-x: visible;
    }
    
    .timeline-header {
        display: none;
        min-width: auto;
    }
    
    .timeline-row {
        display: block;
        padding: 0.75rem;
        border-radius: 8px;
        margin-bottom: 0.5rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        min-width: auto;
    }
    
    .timeline-column {
        padding: 0.25rem 0;
        margin-bottom: 0.5rem;
    }
    
    .timeline-column:before {
        content: attr(data-label) ": ";
        font-weight: 600;
        color: #667eea;
        font-size: 0.8rem;
        display: inline;
    }
}

@media (max-width: 768px) {
    .activity-timeline {
        overflow-x: visible;
    }
    
    .timeline-header {
        display: none;
        min-width: auto;
    }
    
    .timeline-row {
        display: block;
        padding: 0.75rem;
        border-radius: 8px;
        margin-bottom: 0.5rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        min-width: auto;
    }
    
    .timeline-column {
        padding: 0.25rem 0;
        margin-bottom: 0.5rem;
    }
    
    .timeline-column:before {
        content: attr(data-label) ": ";
        font-weight: 600;
        color: #667eea;
        font-size: 0.8rem;
        display: inline;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .timeline-header .timeline-column:nth-child(1),
    .timeline-row .timeline-column:nth-child(1) {
        flex: 0 0 140px;
    }
    
    .timeline-header .timeline-column:nth-child(2),
    .timeline-row .timeline-column:nth-child(2) {
        flex: 0 0 160px;
    }
    
    .timeline-header .timeline-column:nth-child(3),
    .timeline-row .timeline-column:nth-child(3) {
        flex: 2;
        min-width: 150px;
    }
    
    .timeline-header .timeline-column:nth-child(4),
    .timeline-row .timeline-column:nth-child(4) {
        flex: 0 0 120px;
    }
    
    .timeline-header,
    .timeline-row {
        gap: 0.75rem;
        min-width: 500px;
    }
}

@media (min-width: 1025px) {
    .timeline-header .timeline-column:nth-child(1),
    .timeline-row .timeline-column:nth-child(1) {
        flex: 0 0 180px;
    }
    
    .timeline-header .timeline-column:nth-child(2),
    .timeline-row .timeline-column:nth-child(2) {
        flex: 0 0 200px;
    }
    
    .timeline-header .timeline-column:nth-child(3),
    .timeline-row .timeline-column:nth-child(3) {
        flex: 3;
        min-width: 250px;
    }
    
    .timeline-header .timeline-column:nth-child(4),
    .timeline-row .timeline-column:nth-child(4) {
        flex: 0 0 160px;
    }
    
    .timeline-header,
    .timeline-row {
        gap: 1.5rem;
        min-width: auto;
    }
}

.activity-date {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

.activity-type {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.activity-icon {
    font-size: 1.2rem;
}

.activity-name {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.activity-description {
    font-size: 0.9rem;
    color: #444;
    line-height: 1.4;
}

/* Compactar comentarios: mostrar solo 3 líneas por defecto */
.activity-description.clamped {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Expandir comentario completo al alternar */
.activity-description.expanded {
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
    overflow: visible;
}

/* Botón de alternancia Ver más/menos */
.description-toggle {
    margin-top: 6px;
    background: transparent;
    border: none;
    color: #3b82f6;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0;
}

.description-toggle:hover {
    text-decoration: underline;
}

.activity-user {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

/* Animations */
@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes slideUpFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInGlow {
    0% {
        box-shadow: 0 4px 20px rgba(74, 144, 226, 0.2);
    }
    50% {
        box-shadow: 0 8px 30px rgba(74, 144, 226, 0.4);
    }
    100% {
        box-shadow: 0 4px 20px rgba(74, 144, 226, 0.1);
    }
}

/* Column Styles */
.timeline-col-date {
    display: flex;
    align-items: center;
}

.timeline-date-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.timeline-icon {
    width: 32px;
    height: 32px;
    background: var(--secondary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.timeline-date {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

.timeline-col-activity {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timeline-type {
    font-weight: 600;
    color: #3b82f6;
    text-transform: capitalize;
    font-size: 0.9rem;
}

.timeline-subject {
    font-weight: 500;
    color: #2d3748;
    font-size: 0.95rem;
}

.timeline-col-comment {
    display: flex;
    align-items: flex-start;
    padding-top: 2px;
}

.timeline-desc {
    color: #64748b;
    line-height: 1.5;
    font-size: 0.9rem;
}

.timeline-desc-empty {
    color: #9ca3af;
    font-style: italic;
    font-size: 0.85rem;
}

.timeline-col-user {
    display: flex;
    align-items: center;
}

.timeline-user {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .timeline-header-row,
    .timeline-row {
        grid-template-columns: 180px 1fr 1.5fr 120px;
        gap: 15px;
        padding: 14px 16px;
    }
    
    .timeline-icon {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .timeline-header-row,
    .timeline-row {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 12px 16px;
    }
    
    .timeline-header-row {
        display: none; /* Hide header on mobile */
    }
    
    .timeline-row {
        display: block;
        border-left: 3px solid #3b82f6;
        border-radius: 8px;
        margin-bottom: 12px;
        background: rgba(255, 255, 255, 0.03);
    }
    
    .timeline-col-date,
    .timeline-col-activity,
    .timeline-col-comment,
    .timeline-col-user {
        margin-bottom: 8px;
    }
    
    .timeline-col-date::before {
        content: "Fecha: ";
        font-weight: 600;
        color: #3b82f6;
    }
    
    .timeline-col-activity::before {
        content: "Actividad: ";
        font-weight: 600;
        color: #3b82f6;
        display: block;
        margin-bottom: 4px;
    }
    
    .timeline-col-comment::before {
        content: "Comentario: ";
        font-weight: 600;
        color: #3b82f6;
        display: block;
        margin-bottom: 4px;
    }
    
    .timeline-col-user::before {
        content: "Creado por: ";
        font-weight: 600;
        color: #3b82f6;
        display: block;
        margin-bottom: 4px;
    }
}

/* Legacy timeline-item styles for backward compatibility */
.timeline-item {
    display: flex;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border-left: 3px solid var(--primary-gradient);
}

.timeline-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius);
    margin: 0 calc(-1 * var(--spacing-sm));
    padding-left: var(--spacing-sm);
    padding-right: var(--spacing-sm);
    transform: translateX(5px);
}

.timeline-item.new-activity {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(80, 200, 120, 0.1));
    border-left-color: #10b981;
    box-shadow: 0 4px 20px rgba(74, 144, 226, 0.2);
}

.timeline-item.slide-up {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUpFade 0.5s ease forwards;
}

.timeline-item.fade-in {
    animation: fadeInGlow 0.8s ease forwards;
}

.timeline-content {
    flex: 1;
}

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

.timeline-meta {
    font-size: 0.8em;
    color: #64748b;
    font-style: italic;
}

/* Empty state for activities */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
    font-style: italic;
}

.empty-state::before {
    content: "📝";
    display: block;
    font-size: 3em;
    margin-bottom: 10px;
    opacity: 0.5;
}

.empty-state i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.empty-state h3 {
    margin: 0 0 0.5rem 0;
    color: #999;
    font-weight: 500;
}

.empty-state p {
    margin: 0;
    font-size: 0.9rem;
}

/* Modal de Resultado */
.result-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.result-modal.show {
    opacity: 1;
    visibility: visible;
}

.result-modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.7) translateY(50px);
    transition: all 0.3s ease;
}

.result-modal.show .result-modal-content {
    transform: scale(1) translateY(0);
}

.result-modal-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.result-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.result-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.result-modal-body {
    padding: 2rem;
    text-align: center;
}

.result-success-icon {
    margin-bottom: 1.5rem;
}

.result-success-icon i {
    font-size: 4rem;
    color: #10b981;
    animation: successPulse 0.6s ease-out;
}

.result-details h4 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.result-details p {
    margin: 0 0 1.5rem 0;
    color: #666;
    line-height: 1.5;
}

.result-meta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.result-type,
.result-date {
    background: #f3f4f6;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #666;
}

.result-type {
    background: #dbeafe;
    color: #1e40af;
}

.result-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

.result-btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.result-btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
}

.result-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

@keyframes successPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .result-modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .result-modal-body {
        padding: 1.5rem;
    }
    
    .result-meta {
        flex-direction: column;
        align-items: center;
    }
}

/* ===== ULTRA PROFESSIONAL ACTIVITY MODAL - Sistema Azul y Blanco ===== */
.activity-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(59, 130, 246, 0.1);
    backdrop-filter: blur(15px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.activity-modal.show {
    opacity: 1;
}

/* Wizard Modal Styles */
.wizard-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wizard-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.wizard-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.wizard-modal.show .wizard-container {
    transform: scale(1);
}

/* Wizard Header */
.wizard-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 24px;
    position: relative;
}

.wizard-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.wizard-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.wizard-close svg {
    color: white;
}

/* Progress Steps */
.wizard-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.progress-step.active {
    opacity: 1;
}

.progress-step.completed {
    opacity: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 8px;
    transition: background 0.3s ease;
}

.progress-step.active .step-number {
    background: white;
    color: #007bff;
}

.progress-step.completed .step-number {
    background: #28a745;
    color: white;
}

.step-label {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

.progress-line {
    width: 60px;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 16px;
    margin-top: -24px;
}

/* Wizard Content */
.wizard-content {
    padding: 32px;
    min-height: 400px;
}

.wizard-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.wizard-step.active {
    display: block;
}

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

.step-header {
    text-align: center;
    margin-bottom: 32px;
}

.step-header h3 {
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.step-header p {
    color: #6c757d;
    font-size: 16px;
    margin: 0;
}

/* Comment Type Cards */
.comment-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.comment-type-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.comment-type-card:hover {
    border-color: #007bff;
    background: #f0f8ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15);
}

.comment-type-card.selected {
    border-color: #007bff;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
}

.comment-type-card.selected .type-description {
    color: rgba(255, 255, 255, 0.9);
}

.type-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.type-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
}

.type-description {
    font-size: 12px;
    color: #6c757d;
    line-height: 1.4;
}

/* Form Styles */
.comment-form {
    max-width: 100%;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    font-family: inherit;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Preview Styles */
.comment-preview {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    border-left: 4px solid #007bff;
}

.preview-item {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e9ecef;
}

.preview-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.preview-item strong {
    color: #2c3e50;
    display: inline-block;
    min-width: 100px;
}

.preview-item span {
    color: #495057;
}

/* Wizard Actions */
.wizard-actions {
    background: #f8f9fa;
    padding: 20px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e9ecef;
}

.wizard-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.wizard-btn-secondary {
    background: #6c757d;
    color: white;
}

.wizard-btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.wizard-btn-primary {
    background: #007bff;
    color: white;
}

.wizard-btn-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.wizard-btn-success {
    background: #28a745;
    color: white;
}

.wizard-btn-success:hover {
    background: #1e7e34;
    transform: translateY(-1px);
}

.wizard-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Loading State */
.wizard-btn.loading {
    position: relative;
    color: transparent;
}

.wizard-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    color: white;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .wizard-container {
        width: 95%;
        margin: 20px;
    }
    
    .wizard-content {
        padding: 24px 20px;
    }
    
    .wizard-actions {
        padding: 16px 20px;
        flex-direction: column;
        gap: 12px;
    }
    
    .wizard-btn {
        width: 100%;
    }
    
    .comment-types {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .progress-line {
        width: 40px;
        margin: 0 8px;
        margin-top: -24px;
    }
}

/* Focus state for form elements */
.premium-input:focus,
.premium-select:focus,
.premium-textarea:focus {
    box-shadow: 
        0 0 0 3px rgba(59, 130, 246, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.premium-textarea {
    min-height: 100px;
    resize: vertical;
}

/* Form Actions */
.premium-form-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-end;
    padding: var(--spacing-lg) var(--spacing-xl);
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.premium-btn {
    padding: var(--spacing-md) var(--spacing-xl);
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-size: 0.95rem;
}

.premium-btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.premium-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.premium-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.premium-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.premium-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Loading state */
.premium-btn.loading {
    position: relative;
    color: transparent;
}

.premium-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== MODAL STYLES ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.premium-input:focus,
.premium-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

.premium-textarea {
    min-height: 100px;
    resize: vertical;
}

.premium-input::placeholder,
.premium-textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.premium-actions {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: flex-end;
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--glass-border);
}

/* Loading state for submit button */
.premium-btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.premium-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Modal */
@media (max-width: 640px) {
    .premium-modal-content {
        width: 95%;
        margin: var(--spacing-sm);
    }
    
    .premium-activity-types {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .premium-actions {
        flex-direction: column;
    }
}

/* ===== EXISTING STYLES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.fade-in {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-up {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-up:nth-child(2) { animation-delay: 0.1s; }
.slide-up:nth-child(3) { animation-delay: 0.2s; }
.slide-up:nth-child(4) { animation-delay: 0.3s; }

/* ===== GRID RESPONSIVE ===== */
.lead-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    width: 100%;
}

@media (min-width: 768px) {
    .lead-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-lg);
    }
}

@media (min-width: 1200px) {
    .lead-grid {
        grid-template-columns: 2fr 1fr;
        gap: var(--spacing-xl);
    }
}

/* ===== SECCIONES RESPONSIVE ===== */
.lead-section {
    width: 100%;
    margin-bottom: var(--spacing-md);
}

@media (min-width: 768px) {
    .lead-section {
        margin-bottom: var(--spacing-lg);
    }
}

/* ===== HERO SECTION RESPONSIVE ===== */
.lead-hero {
    width: 100%;
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

@media (min-width: 768px) {
    .lead-hero {
        padding: var(--spacing-lg);
        margin-bottom: var(--spacing-lg);
    }
}

.lead-hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--spacing-md);
}

@media (min-width: 768px) {
    .lead-hero-content {
        flex-direction: row;
        text-align: left;
        align-items: flex-start;
    }
}

/* ===== ACCIONES RÁPIDAS RESPONSIVE ===== */
.quick-actions {
    width: 100%;
    margin-bottom: var(--spacing-md);
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
}

@media (min-width: 480px) {
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .quick-actions-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--spacing-md);
    }
}

@media (min-width: 1200px) {
    .quick-actions-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .lead-actions {
        flex-direction: row;
        justify-content: center;
    }
    
    .contact-info, .assignment-info {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .lead-profile-container {
        padding: var(--spacing-md);
    }
    
    .lead-hero {
        padding: var(--spacing-md);
    }
    
    .lead-info h1 {
        font-size: 2rem;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .contact-info, .assignment-info {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .lead-badges {
        justify-content: center;
    }
    
    .lead-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== ACCESIBILIDAD ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== MODO OSCURO (OPCIONAL) ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --glass-bg: rgba(0, 0, 0, 0.2);
        --glass-border: rgba(255, 255, 255, 0.1);
    }
    
    body {
        background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
        color: #e2e8f0;
    }
    
    .panel-title, .quick-action-title, .item-content strong {
        color: #e2e8f0;
    }
    
    .lead-subtitle, .quick-action-desc, .stat-label {
        color: #a0aec0;
    }
}
.info-panels > .panel { height: 100%; display: flex; flex-direction: column; }
.info-panels > .panel .panel-content { flex: 1; }
#financial-panel .financial-stats-row, #financial-stats-panel .financial-stats-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:var(--spacing-md);margin-bottom:var(--spacing-md)}
@media (min-width: 1024px){#financial-stats-panel .financial-stats-row.row-top{grid-template-columns:repeat(4,1fr)}#financial-panel .financial-stats-row.row-bottom{grid-template-columns:repeat(3,1fr)}}
#financial-panel .stat-label, #financial-stats-panel .stat-label{white-space:nowrap}
