:root {
    --primary: #003473;
    --primary-light: #4299e1;
    --accent: #84BD00;
    --accent-light: #a8d94e;
    --success: #425500;
    --success-light: #6b8a00;
    --warning: #c05621;
    --warning-light: #f6ad55;
    --danger: #c53030;
    --purple: #553c9a;
    --gray-50: #f7fafc;
    --gray-100: #edf2f7;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e0;
    --gray-400: #a0aec0;
    --gray-500: #718096;
    --gray-600: #4a5568;
    --gray-700: #2d3748;
    --gray-800: #1a202c;
    --gray-900: #171923;
    /* Theme-specific variables (dark mode default) */
    --bg-primary: linear-gradient(135deg, var(--gray-900) 0%, var(--primary) 50%, var(--gray-800) 100%);
    --bg-card: rgba(255,255,255,0.05);
    --bg-card-hover: rgba(255,255,255,0.08);
    --bg-sidebar: rgba(0,0,0,0.3);
    --bg-input: rgba(0,0,0,0.3);
    --border-color: rgba(255,255,255,0.1);
    --border-accent: rgba(132,189,0,0.3);
    --text-primary: var(--gray-100);
    --text-secondary: var(--gray-400);
    --text-muted: var(--gray-500);
    --shadow-color: rgba(0,0,0,0.3);
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 50%, #f7fafc 100%);
    --bg-card: rgba(255,255,255,0.9);
    --bg-card-hover: rgba(255,255,255,1);
    --bg-sidebar: rgba(255,255,255,0.95);
    --bg-input: rgba(255,255,255,0.9);
    --border-color: rgba(0,0,0,0.12);
    --border-accent: rgba(132,189,0,0.5);
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --shadow-color: rgba(0,0,0,0.1);
}
[data-theme="light"] .hero { background: linear-gradient(135deg, rgba(132,189,0,0.1), rgba(0,52,115,0.1)); border-color: rgba(132,189,0,0.3); }
[data-theme="light"] .hero-title { background: linear-gradient(135deg, #1a202c, var(--primary)); -webkit-background-clip: text; background-clip: text; }
[data-theme="light"] .hero-label { color: var(--success) !important; font-weight: 600; }
[data-theme="light"] .hero-subtitle { color: #2d3748 !important; }
[data-theme="light"] span[style*="background: rgba(255,255,255,0.1)"] { background: linear-gradient(135deg, rgba(0,52,115,0.15), rgba(132,189,0,0.1)) !important; border: 1px solid rgba(0,52,115,0.2); color: #1a202c !important; }
[data-theme="light"] a[style*="background: rgba(255,255,255,0.05)"] { background: linear-gradient(135deg, rgba(132,189,0,0.12), rgba(0,52,115,0.08)) !important; border: 1px solid rgba(132,189,0,0.25); }
[data-theme="light"] a[style*="background: rgba(56,178,172"] { background: linear-gradient(135deg, rgba(56,178,172,0.2), rgba(0,52,115,0.1)) !important; border: 1px solid rgba(56,178,172,0.3); }
[data-theme="light"] .metric-card { background: linear-gradient(135deg, rgba(132,189,0,0.15), rgba(0,52,115,0.1)); }
[data-theme="light"] .sidebar-footer-card { background: linear-gradient(135deg, rgba(132,189,0,0.2), rgba(56,178,172,0.15)); }
[data-theme="light"] .sidebar-footer-label { color: var(--primary) !important; }
[data-theme="light"] .sidebar-footer-change { color: #2d3748 !important; }
[data-theme="light"] .mobile-nav-footer .text-gray-400 { color: var(--primary) !important; }
[data-theme="light"] .mobile-nav-footer div[style*="color: var(--gray-300)"] { color: #2d3748 !important; }
[data-theme="light"] .nav-item { color: #4a5568; }
[data-theme="light"] .nav-item:hover { background: rgba(132,189,0,0.15); }
[data-theme="light"] .nav-item.active { background: linear-gradient(90deg, rgba(132,189,0,0.2), transparent); color: var(--success); }
[data-theme="light"] .login-input { background: rgba(255,255,255,0.9); border-color: #cbd5e0; color: #1a202c; }
[data-theme="light"] .login-input::placeholder { color: #a0aec0; }
[data-theme="light"] .phase-card { box-shadow: 0 4px 15px rgba(0,0,0,0.08); }
[data-theme="light"] .mobile-header { background: rgba(255,255,255,0.95); }
[data-theme="light"] .mobile-nav { background: rgba(255,255,255,0.98); }
[data-theme="light"] .hamburger span { background: #1a202c; }
[data-theme="light"] table { color: #1a202c; }
[data-theme="light"] th { background: linear-gradient(135deg, var(--primary), var(--primary-light)) !important; color: white !important; font-weight: 600; }
[data-theme="light"] td { border-color: #e2e8f0 !important; background: rgba(255,255,255,0.7); }
[data-theme="light"] .badge { background: rgba(132,189,0,0.15); color: var(--success); }
[data-theme="light"] .text-gray-300 { color: #2d3748 !important; }
[data-theme="light"] .text-gray-400 { color: #4a5568 !important; }
[data-theme="light"] .text-gray-500 { color: #718096 !important; }
[data-theme="light"] h4[style*="color: var(--gray-400)"] { color: var(--primary) !important; }
[data-theme="light"] p[style*="color: var(--gray-400)"] { color: #2d3748 !important; }
[data-theme="light"] .text-xs.text-gray-400 { color: #2d3748 !important; }
[data-theme="light"] a[style*="background: rgba"] p { color: #2d3748 !important; }
[data-theme="light"] div[style*="background: rgba(39,103,73"] p:last-child { color: #1a202c !important; }
[data-theme="light"] div[style*="background: rgba(128,90,213"] p:last-child { color: #1a202c !important; }
[data-theme="light"] div[style*="background: rgba(26,54,93"] p:last-child { color: #1a202c !important; }
[data-theme="light"] .card { color: #1a202c; }
[data-theme="light"] .card h3, [data-theme="light"] .card h4 { color: #1a202c; }
[data-theme="light"] .card p, [data-theme="light"] .card li, [data-theme="light"] .card span { color: #2d3748; }
[data-theme="light"] .task-list li { color: #2d3748; }
[data-theme="light"] .chevron { color: var(--warning); }
[data-theme="light"] .export-bar { background: linear-gradient(135deg, rgba(132,189,0,0.08), rgba(0,52,115,0.08)); border: 1px solid rgba(0,52,115,0.15); }
[data-theme="light"] .export-bar-label { color: var(--primary); }
/* Light mode: Tasks table and form fields */
[data-theme="light"] .input-field { background: rgba(255,255,255,0.95); border-color: #cbd5e0; color: #1a202c; }
[data-theme="light"] .input-field::placeholder { color: #a0aec0; }
[data-theme="light"] .select-field { background: rgba(255,255,255,0.95); border-color: #cbd5e0; color: #1a202c; }
[data-theme="light"] #tasks-table tr { background: rgba(255,255,255,0.8); }
[data-theme="light"] #tasks-table tr:hover { background: rgba(255,255,255,0.95); }
[data-theme="light"] #tasks-table td { color: #1a202c; }
[data-theme="light"] #tasks-table .drag-handle { color: #718096 !important; }
[data-theme="light"] .status-select[data-status="completada"] { background: rgba(107, 138, 0, 0.2) !important; color: #1a202c !important; }
[data-theme="light"] .status-select[data-status="en_progreso"] { background: rgba(132, 189, 0, 0.2) !important; color: #1a202c !important; }
[data-theme="light"] .status-select[data-status="pendiente"] { background: rgba(192, 86, 33, 0.2) !important; color: #1a202c !important; }
/* Light mode: Proyectos Especiales boxes (incluye Alianzas Estratégicas) */
[data-theme="light"] #section-projects div[style*="background: rgba(0,0,0"] { background: linear-gradient(135deg, rgba(132,189,0,0.12), rgba(0,82,180,0.08)) !important; border: 1px solid rgba(132,189,0,0.25); }
[data-theme="light"] #section-projects .text-gray-500 { color: var(--primary) !important; font-weight: 600; }
[data-theme="light"] #section-projects .text-accent { color: var(--success) !important; }
[data-theme="light"] #section-projects .text-gray-400 { color: #2d3748 !important; }
[data-theme="light"] #section-projects .font-bold { color: #1a202c; }
[data-theme="light"] #section-projects .font-bold[style*="color: #68d391"] { color: #276749 !important; }
[data-theme="light"] #section-projects .font-bold[style*="color: #63b3ed"] { color: #2b6cb0 !important; }
/* Light mode: Pipeline - Leads a Explorar por Sector */
[data-theme="light"] #explore-leads-container div[style*="background: rgba(0,0,0"] { background: rgba(255,255,255,0.85) !important; border: 1px solid rgba(0,52,115,0.15); box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
/* Light mode: Propuesta de Valor - Xperto MediaMax box */
[data-theme="light"] div[style*="background: rgba(26,54,93"] { background: linear-gradient(135deg, rgba(0,52,115,0.08), rgba(132,189,0,0.12)) !important; border: 1px solid rgba(0,52,115,0.2); }
[data-theme="light"] div[style*="background: rgba(26,54,93"] h3[style*="color: var(--accent)"] { color: var(--success) !important; }
[data-theme="light"] div[style*="background: rgba(26,54,93"] strong[style*="color: var(--accent)"] { color: var(--success) !important; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Outfit', sans-serif; background: var(--bg-primary); color: var(--text-primary); min-height: 100vh; transition: background 0.3s ease, color 0.3s ease; }

/* Strategy Selector */
.strategy-selector { display: flex; align-items: center; gap: 8px; padding: 12px 24px; border-bottom: 1px solid var(--border-color); }
.strategy-selector select { flex: 1; background: var(--gray-800); border: 1px solid var(--border-color); border-radius: 6px; padding: 8px 12px; color: var(--text-primary); font-size: 13px; font-family: inherit; cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%239ca3af'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; padding-right: 28px; }
.strategy-selector select:hover { border-color: var(--accent); }
.strategy-selector select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2); }
.strategy-settings-btn { background: var(--gray-700); border: 1px solid var(--border-color); border-radius: 6px; padding: 8px; cursor: pointer; color: var(--gray-400); transition: all 0.2s; display: flex; align-items: center; justify-content: center; }
.strategy-settings-btn:hover { background: var(--gray-600); color: var(--text-primary); border-color: var(--accent); }

/* Strategy Manager */
.strategy-list { display: flex; flex-direction: column; gap: 8px; }
.strategy-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--gray-800); border-radius: 8px; border: 1px solid var(--border-color); transition: all 0.2s; }
.strategy-item:hover { border-color: var(--gray-600); }
.strategy-item-active { border-color: var(--accent); background: rgba(102, 126, 234, 0.1); }
.strategy-item-content { flex: 1; min-width: 0; }
.strategy-item-meta { display: flex; gap: 12px; margin-top: 4px; }
.strategy-item-actions { display: flex; gap: 8px; margin-left: 12px; }

/* Theme Toggle Switch */
.theme-toggle { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 24px; border-bottom: 1px solid var(--border-color); margin-bottom: 16px; }
.theme-toggle-label { font-size: 12px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; }
.theme-switch { position: relative; width: 50px; height: 26px; }
.theme-switch input { opacity: 0; width: 0; height: 0; }
.theme-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: var(--gray-700); border-radius: 26px; transition: 0.3s; }
.theme-slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: 0.3s; display: flex; align-items: center; justify-content: center; }
.theme-switch input:checked + .theme-slider { background: var(--accent); }
.theme-switch input:checked + .theme-slider:before { transform: translateX(24px); }
.theme-icons { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.theme-icon { opacity: 0.5; transition: opacity 0.3s; }
.theme-icon.active { opacity: 1; }
/* Theme Toggle in Navigation */
.theme-toggle-nav { padding: 12px 16px; margin-top: 8px; border-top: 1px solid var(--border-color); }
.theme-toggle-nav .theme-toggle { padding: 8px 12px; margin-bottom: 0; border-bottom: none; background: var(--bg-card); border-radius: 8px; }

/* Loading Overlay */
.loading-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.85); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 10000; }
.loading-spinner { width: 50px; height: 50px; border: 4px solid var(--gray-700); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
.login-spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--gray-500); border-top-color: var(--text-primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { margin-top: 16px; color: var(--gray-300); font-size: 14px; }

/* Data Management Buttons */
.data-management-buttons { display: flex; align-items: center; gap: 8px; padding: 12px 24px; border-bottom: 1px solid var(--border-color); margin-bottom: 16px; }
.data-btn { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 6px; border: 1px solid var(--border-color); background: var(--card-bg); color: var(--text-secondary); font-size: 12px; cursor: pointer; transition: all 0.2s; }
.data-btn:hover { background: var(--hover-bg); color: var(--text-primary); border-color: var(--accent); }
.data-btn svg { flex-shrink: 0; }
.data-btn-export:hover { color: var(--success); border-color: var(--success); }
.data-btn-import:hover { color: var(--info); border-color: var(--info); }

/* Data Notification Toast */
.data-notification { position: fixed; bottom: 24px; right: 24px; padding: 12px 20px; border-radius: 8px; display: flex; align-items: center; gap: 12px; z-index: 10001; box-shadow: 0 4px 12px rgba(0,0,0,0.3); animation: slideIn 0.3s ease; }
.data-notification-success { background: var(--success); color: white; }
.data-notification-error { background: var(--danger); color: white; }
.data-notification-info { background: var(--info); color: white; }
.data-notification button { background: none; border: none; color: inherit; font-size: 18px; cursor: pointer; padding: 0; margin-left: 8px; opacity: 0.8; }
.data-notification button:hover { opacity: 1; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Login Screen */
.login-screen { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(135deg, var(--gray-900) 0%, var(--primary) 50%, var(--gray-800) 100%); display: flex; align-items: center; justify-content: center; z-index: 9999; }
.login-screen.hidden { display: none; }
.login-box { background: rgba(255,255,255,0.05); backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.1); border-radius: 24px; padding: 48px; width: 100%; max-width: 420px; margin: 20px; text-align: center; }
.login-logo { width: 80px; height: 80px; background: linear-gradient(135deg, var(--accent), var(--success)); border-radius: 20px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 32px; color: white; margin: 0 auto 24px; }
.login-title { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.login-subtitle { color: var(--gray-400); margin-bottom: 32px; font-size: 14px; }
.login-field { margin-bottom: 16px; text-align: left; }
.login-label { display: block; font-size: 12px; color: var(--gray-400); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }
.login-input { width: 100%; padding: 14px 16px; background: rgba(0,0,0,0.3); border: 1px solid var(--gray-600); border-radius: 12px; color: white; font-size: 16px; font-family: inherit; transition: all 0.2s; }
.login-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(132,189,0,0.2); }
.login-input::placeholder { color: var(--gray-500); }
.login-btn { width: 100%; padding: 14px 24px; background: linear-gradient(135deg, var(--accent), var(--accent-light)); color: var(--gray-900); border: none; border-radius: 12px; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.2s; margin-top: 8px; }
.login-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(132,189,0,0.4); }
.login-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.login-error { color: #fc8181; font-size: 13px; margin-top: 16px; display: none; }
.login-error.show { display: block; animation: shake 0.5s ease; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.login-footer { margin-top: 32px; font-size: 12px; color: var(--gray-500); }
.login-divider { display: flex; align-items: center; margin: 20px 0; color: var(--gray-500); font-size: 13px; }
.login-divider::before, .login-divider::after { content: ''; flex: 1; border-bottom: 1px solid var(--border-color); }
.login-divider span { padding: 0 12px; }
.google-login-btn { width: 100%; padding: 12px 24px; background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border-color); border-radius: 12px; font-size: 15px; font-weight: 500; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 10px; }
.google-login-btn:hover { background: var(--bg-hover); border-color: var(--gray-500); transform: translateY(-1px); }
.google-login-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.google-login-btn svg { flex-shrink: 0; }

.app { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar { width: 280px; background: var(--bg-sidebar); backdrop-filter: blur(20px); border-right: 1px solid var(--border-color); padding: 24px 0; display: flex; flex-direction: column; position: fixed; height: 100vh; overflow-y: auto; transition: background 0.3s ease; }
.logo { padding: 0 24px; margin-bottom: 32px; display: flex; align-items: center; gap: 12px; }
.logo-icon { width: 48px; height: 48px; background: linear-gradient(135deg, var(--accent), var(--success)); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; color: white; overflow: hidden; }
.logo-icon img { width: 100%; height: 100%; object-fit: contain; }
.logo-icon .logo-svg { width: 28px; height: 28px; stroke: white; stroke-width: 2; fill: none; }
.logo-initials { font-weight: 800; font-size: 18px; color: white; }
.logo-text { font-weight: 700; font-size: 18px; }
.logo-subtitle { font-size: 11px; color: var(--gray-400); text-transform: uppercase; letter-spacing: 1px; }
.nav-group { margin-top: 16px; }
.nav-group-header { padding: 8px 24px; font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--gray-500); font-weight: 600; display: flex; align-items: center; justify-content: space-between; cursor: pointer; transition: color 0.2s; }
.nav-group-header:hover { color: var(--gray-300); }
.nav-group-chevron { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; transition: transform 0.3s ease; }
.nav-group.collapsed .nav-group-chevron { transform: rotate(-90deg); }
.nav-group-items { overflow: hidden; transition: max-height 0.3s ease, opacity 0.2s ease; max-height: 500px; opacity: 1; }
.nav-group.collapsed .nav-group-items { max-height: 0; opacity: 0; }
.nav-item { padding: 12px 24px; display: flex; align-items: center; gap: 12px; color: var(--gray-400); cursor: pointer; transition: all 0.3s; border-left: 3px solid transparent; }
.nav-group .nav-item, .nav-group-items .nav-item { padding-left: 32px; }
.nav-item:hover { background: rgba(132,189,0,0.2); transform: translateX(4px); }
.nav-item.active { background: linear-gradient(90deg, rgba(132,189,0,0.3), transparent); border-left-color: var(--accent); color: var(--accent); }
.nav-item svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; }

/* Sidebar User Section */
.sidebar-user-section { padding: 12px 20px; border-top: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sidebar-user-info { display: flex; align-items: center; gap: 8px; color: var(--gray-300); font-size: 13px; min-width: 0; flex: 1; }
.sidebar-user-icon { flex-shrink: 0; color: var(--gray-400); }
.sidebar-user-info span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-logout-btn { display: flex; align-items: center; gap: 6px; padding: 6px 12px; background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.3); border-radius: 6px; color: #ef4444; font-size: 12px; font-weight: 500; cursor: pointer; transition: all 0.2s; flex-shrink: 0; }
.sidebar-logout-btn:hover { background: rgba(239,68,68,0.25); border-color: rgba(239,68,68,0.5); transform: translateY(-1px); }
.sidebar-logout-btn svg { flex-shrink: 0; }
[data-theme="light"] .sidebar-user-section { border-top-color: #e2e8f0; }
[data-theme="light"] .sidebar-user-info { color: #4a5568; }
[data-theme="light"] .sidebar-user-icon { color: #718096; }

.sidebar-footer { margin-top: auto; padding: 20px; }
.sidebar-footer-card { background: linear-gradient(135deg, rgba(132,189,0,0.15), rgba(56,178,172,0.1)); border: 1px solid rgba(132,189,0,0.3); border-radius: 12px; padding: 20px; text-align: center; }
.sidebar-footer-label { font-size: 11px; color: var(--gray-400); margin-bottom: 8px; letter-spacing: 1px; text-transform: uppercase; }
.sidebar-footer-value { font-size: 36px; font-weight: 800; font-family: 'Space Mono', monospace; color: var(--accent); }
.sidebar-footer-change { font-size: 14px; color: var(--gray-300); margin-top: 6px; font-weight: 500; }

/* Main */
.main { flex: 1; margin-left: 280px; padding: 32px; overflow-y: auto; }
.section { display: none; animation: fadeIn 0.5s ease; }
.section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Cards */
.card { background: var(--bg-card); backdrop-filter: blur(20px); border: 1px solid var(--border-color); border-radius: 16px; margin-bottom: 24px; transition: all 0.3s; }
.card:hover { border-color: var(--border-accent); transform: translateY(-2px); box-shadow: 0 20px 40px var(--shadow-color); }
.card-body { padding: 24px; }
.metric-card { background: linear-gradient(135deg, rgba(132,189,0,0.1), rgba(0,52,115,0.2)); border: 1px solid rgba(132,189,0,0.2); }

/* Document Sections */
.doc-section { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 16px; padding: 32px; margin-bottom: 32px; }
.doc-section h2 { margin-top: 0; }

/* Hero */
.hero { text-align: center; margin-bottom: 48px; padding: 60px 40px; background: linear-gradient(135deg, rgba(56,178,172,0.1), rgba(26,54,93,0.2)); border-radius: 24px; border: 1px solid rgba(56,178,172,0.2); }
.hero-label { font-size: 14px; color: var(--accent); text-transform: uppercase; letter-spacing: 3px; margin-bottom: 16px; }
.hero-title { font-size: 48px; font-weight: 800; margin-bottom: 16px; background: linear-gradient(135deg, white, var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-subtitle { font-size: 18px; color: var(--gray-400); max-width: 600px; margin: 0 auto; line-height: 1.7; }

/* Grid */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1200px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-5 { grid-template-columns: repeat(3, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .grid-5 { grid-template-columns: repeat(2, 1fr); } }

/* Mobile Menu */
.mobile-header { display: none; position: fixed; top: 0; left: 0; right: 0; height: 64px; background: rgba(0,0,0,0.9); backdrop-filter: blur(20px); z-index: 1000; padding: 0 16px; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,0.1); }
.hamburger { width: 40px; height: 40px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; cursor: pointer; background: none; border: none; padding: 8px; }
.hamburger span { display: block; width: 24px; height: 2px; background: white; transition: all 0.3s; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.mobile-header-actions { display: flex; align-items: center; gap: 8px; }
.mobile-data-btn { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); border-radius: 8px; color: var(--text-secondary); cursor: pointer; transition: all 0.2s; }
.mobile-data-btn:hover { background: rgba(255,255,255,0.2); color: var(--accent); border-color: var(--accent); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }
.mobile-logo { display: flex; align-items: center; gap: 10px; }
.mobile-logo-icon { width: 36px; height: 36px; background: linear-gradient(135deg, var(--accent), var(--primary)); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; }
.mobile-logo-text { font-weight: 700; font-size: 16px; }
.mobile-nav-overlay { display: none; position: fixed; top: 64px; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.95); backdrop-filter: blur(20px); z-index: 999; padding: 24px; overflow-y: auto; }
.mobile-nav-overlay.active { display: block; animation: slideDown 0.3s ease; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
.mobile-nav-group { margin-top: 16px; }
.mobile-nav-group-header { padding: 8px 20px; font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--gray-500); font-weight: 600; }
.mobile-nav-item { padding: 14px 20px; display: flex; align-items: center; gap: 16px; color: var(--gray-300); font-size: 15px; border-radius: 12px; margin-bottom: 4px; transition: all 0.2s; }
.mobile-nav-group .mobile-nav-item { padding-left: 28px; }
.mobile-nav-item:hover, .mobile-nav-item.active { background: rgba(56,178,172,0.2); color: var(--accent); }
.mobile-nav-item svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; fill: none; }
.mobile-nav-footer { margin-top: 24px; padding: 20px; background: rgba(255,255,255,0.05); border-radius: 16px; text-align: center; }
.mobile-download-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 14px 20px; background: linear-gradient(135deg, var(--accent), var(--accent-light)); color: var(--gray-900); border-radius: 12px; font-weight: 600; text-decoration: none; margin-top: 16px; }

@media (max-width: 768px) {
    .sidebar { display: none; }
    .main { margin-left: 0; padding-top: 88px; }
    .mobile-header { display: flex; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .hero-title { font-size: 32px; }
    .hero { padding: 40px 24px; }
    /* Export bar - centered with download icon */
    .export-bar { flex-wrap: wrap; gap: 6px; justify-content: center; }
    .export-bar-label { display: none; }
    .export-bar::before { content: ''; display: block; width: 20px; height: 20px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cline x1='12' y1='15' x2='12' y2='3'/%3E%3C/svg%3E"); background-size: contain; background-repeat: no-repeat; margin-right: 4px; }
    /* Export buttons - icon only on mobile */
    .export-btn { padding: 10px; gap: 0; min-width: 38px; min-height: 38px; justify-content: center; }
    .export-btn .btn-text { display: none; }
    .export-btn svg { width: 16px; height: 16px; }
}

/* Typography */
h1 { font-size: 36px; font-weight: 800; margin-bottom: 8px; }
h2 { font-size: 24px; font-weight: 700; margin-bottom: 20px; }
h3 { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.subtitle { color: var(--gray-400); margin-bottom: 40px; font-size: 16px; }

/* Metrics */
.metric-value { font-size: 28px; font-weight: 700; font-family: 'Space Mono', monospace; }
.metric-label { font-size: 13px; color: var(--gray-500); margin-top: 4px; }
.badge { padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; display: inline-block; }
.badge-success { background: rgba(39,103,73,0.3); color: #68d391; }
.badge-warning { background: rgba(192,86,33,0.3); color: #f6ad55; }
.badge-danger { background: rgba(197,48,48,0.3); color: #fc8181; }
.badge-neutral { background: rgba(255,255,255,0.1); color: var(--gray-400); }
.badge-accent { background: var(--accent); color: var(--gray-900); }

/* Fuente Cards */
.fuente-card { border-top: 4px solid; }
.fuente-card.card-1 { border-top-color: var(--primary); }
.fuente-card.card-2 { border-top-color: var(--accent); }
.fuente-card.card-3 { border-top-color: var(--success); }
.fuente-card.card-4 { border-top-color: #805ad5; }
.fuente-card.card-5 { border-top-color: var(--warning); }
.fuente-card.card-6 { border-top-color: #e53e3e; }
.fuente-card.card-7 { border-top-color: #38b2ac; }
.fuente-card.card-8 { border-top-color: #ed8936; }
.fuente-card.card-9 { border-top-color: #667eea; }
.fuente-card.card-10 { border-top-color: #48bb78; }
.fuente-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.fuente-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.fuente-icon.card-1 { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; }
.fuente-icon.card-2 { background: linear-gradient(135deg, var(--accent), var(--accent-light)); color: var(--gray-900); }
.fuente-icon.card-3 { background: linear-gradient(135deg, var(--success), var(--success-light)); color: white; }
.fuente-icon.card-4 { background: linear-gradient(135deg, #805ad5, #553c9a); color: white; }
.fuente-icon.card-5 { background: linear-gradient(135deg, var(--warning), var(--warning-light)); color: var(--gray-900); }
.fuente-icon.card-6 { background: linear-gradient(135deg, #e53e3e, #c53030); color: white; }
.fuente-icon.card-7 { background: linear-gradient(135deg, #38b2ac, #2c7a7b); color: white; }
.fuente-icon.card-8 { background: linear-gradient(135deg, #ed8936, #dd6b20); color: white; }
.fuente-icon.card-9 { background: linear-gradient(135deg, #667eea, #5a67d8); color: white; }
.fuente-icon.card-10 { background: linear-gradient(135deg, #48bb78, #38a169); color: white; }
.progress-bar { height: 8px; background: var(--gray-700); border-radius: 4px; overflow: hidden; margin-top: 8px; }
.progress-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; }
.progress-fill.card-1 { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.progress-fill.card-2 { background: linear-gradient(90deg, var(--accent), var(--accent-light)); }
.progress-fill.card-3 { background: linear-gradient(90deg, var(--success), var(--success-light)); }
.progress-fill.card-4 { background: linear-gradient(90deg, #805ad5, #553c9a); }
.progress-fill.card-5 { background: linear-gradient(90deg, var(--warning), var(--warning-light)); }
.progress-fill.card-6 { background: linear-gradient(90deg, #e53e3e, #c53030); }
.progress-fill.card-7 { background: linear-gradient(90deg, #38b2ac, #2c7a7b); }
.progress-fill.card-8 { background: linear-gradient(90deg, #ed8936, #dd6b20); }
.progress-fill.card-9 { background: linear-gradient(90deg, #667eea, #5a67d8); }
.progress-fill.card-10 { background: linear-gradient(90deg, #48bb78, #38a169); }

/* Forms */
.slider { -webkit-appearance: none; width: 100%; height: 6px; border-radius: 3px; background: var(--gray-700); outline: none; }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); cursor: pointer; box-shadow: 0 2px 8px rgba(56,178,172,0.5); }

/* Simulator Sliders */
.sim-slider { -webkit-appearance: none; width: 100%; height: 4px; border-radius: 2px; background: var(--gray-700); outline: none; cursor: pointer; }
.sim-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); cursor: pointer; box-shadow: 0 2px 6px rgba(56,178,172,0.4); transition: transform 0.2s, box-shadow 0.2s; }
.sim-slider::-webkit-slider-thumb:hover { transform: scale(1.2); box-shadow: 0 2px 10px rgba(56,178,172,0.6); }
.sim-slider::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); cursor: pointer; border: none; box-shadow: 0 2px 6px rgba(56,178,172,0.4); }
.sim-slider::-moz-range-track { height: 4px; border-radius: 2px; background: var(--gray-700); }
[data-theme="light"] .sim-slider { background: #e2e8f0; }
[data-theme="light"] .sim-slider::-webkit-slider-thumb { background: var(--accent); box-shadow: 0 2px 6px rgba(56,178,172,0.5); }

.input-field { background: rgba(0,0,0,0.3); border: 1px solid var(--gray-600); border-radius: 8px; padding: 8px 12px; color: white; font-family: 'Space Mono', monospace; transition: all 0.2s; width: 100%; }
.input-field:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(56,178,172,0.2); }
.select-field { background: rgba(0,0,0,0.3); border: 1px solid var(--gray-600); border-radius: 8px; padding: 6px 10px; color: white; font-size: 12px; cursor: pointer; }
.select-field:focus { outline: none; border-color: var(--accent); }
.control-group { margin-bottom: 20px; }
.control-header { display: flex; justify-content: space-between; margin-bottom: 8px; }
.control-label { color: var(--gray-400); font-size: 13px; }
.control-value { font-family: 'Space Mono', monospace; color: var(--accent); }

/* Buttons */
.btn { padding: 10px 20px; border-radius: 8px; font-weight: 600; cursor: pointer; transition: all 0.2s; border: none; font-family: inherit; display: inline-flex; align-items: center; gap: 8px; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-light)); color: var(--gray-900); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(56,178,172,0.4); }
.btn-secondary { background: rgba(255,255,255,0.1); color: white; border: 1px solid rgba(255,255,255,0.2); }
.btn-secondary:hover { background: rgba(255,255,255,0.2); }
.btn-danger { background: rgba(229,62,62,0.2); color: #fc8181; border: 1px solid rgba(229,62,62,0.3); }
.btn-danger:hover { background: rgba(229,62,62,0.4); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 12px 8px; color: var(--gray-400); font-size: 12px; text-transform: uppercase; border-bottom: 2px solid var(--gray-700); }
td { padding: 16px 8px; border-bottom: 1px solid var(--gray-800); }
th.sortable { cursor: pointer; user-select: none; transition: all 0.2s; }
th.sortable:hover { color: var(--accent); background: rgba(132,189,0,0.1); }
th.sortable.sorted { color: var(--accent); }
th.sortable .sort-icon { margin-left: 4px; font-size: 10px; opacity: 0.6; transition: opacity 0.2s; }
th.sortable:hover .sort-icon, th.sortable.sorted .sort-icon { opacity: 1; }

/* Drag and Drop */
tr[draggable="true"] { transition: background 0.2s, opacity 0.2s, transform 0.2s; }
tr[draggable="true"]:hover .drag-handle { color: var(--accent); }
tr.dragging { opacity: 0.5; background: rgba(132,189,0,0.1); }
tr.drag-over { background: rgba(132,189,0,0.2); box-shadow: inset 0 -2px 0 var(--accent); }
.drag-handle { cursor: grab; font-size: 14px; letter-spacing: -2px; }
.drag-handle:active { cursor: grabbing; }

/* Tasks table */
.sortable-task { cursor: pointer; user-select: none; transition: all 0.2s; }
.sortable-task:hover { color: var(--accent); background: rgba(132,189,0,0.1); }
.sortable-task.sorted { color: var(--accent); }
.sortable-task .sort-icon { margin-left: 4px; font-size: 10px; opacity: 0.6; transition: opacity 0.2s; }
.sortable-task:hover .sort-icon, .sortable-task.sorted .sort-icon { opacity: 1; }
tr.task-completed { opacity: 0.6; }
tr.task-completed td { text-decoration: line-through; color: var(--gray-500); }
tr.task-completed .drag-handle, tr.task-completed .btn { text-decoration: none; }
tr.task-completed input, tr.task-completed select { text-decoration: line-through; }

/* Scenario Tabs */
.scenario-tabs { display: flex; gap: 8px; margin-bottom: 24px; background: rgba(0,0,0,0.2); padding: 8px; border-radius: 12px; }
.scenario-tab { flex: 1; padding: 12px 20px; border-radius: 8px; text-align: center; cursor: pointer; transition: all 0.3s; font-weight: 600; }
.scenario-tab:hover { background: rgba(255,255,255,0.1); }
.scenario-tab.active.optimista { background: linear-gradient(135deg, var(--success), var(--success-light)); color: var(--gray-900); }
.scenario-tab.active.conservador { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; }
.scenario-tab.active.pesimista { background: linear-gradient(135deg, var(--danger), #fc8181); color: white; }

/* Propuesta de Valor tabs */
.propuesta-tabs { display: flex; gap: 8px; margin-bottom: 24px; }
.propuesta-tab { padding: 10px 20px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.3s; background: rgba(0,0,0,0.3); border: 1px solid transparent; color: var(--gray-400); }
.propuesta-tab:hover { background: rgba(255,255,255,0.1); color: var(--gray-200); }
.propuesta-tab.active { background: linear-gradient(135deg, var(--accent), var(--success)); color: var(--gray-900); border-color: transparent; }

/* Export buttons */
.export-bar { display: flex; gap: 10px; margin-bottom: 24px; padding: 16px 20px; background: linear-gradient(135deg, rgba(132,189,0,0.1), rgba(0,52,115,0.15)); border-radius: 12px; align-items: center; border: 1px solid rgba(132,189,0,0.2); }
.export-bar-label { font-size: 13px; color: var(--accent); margin-right: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.export-btn { padding: 10px 18px; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; border: none; color: white; transition: all 0.2s; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.export-btn:nth-child(2) { background: linear-gradient(135deg, #e53e3e, #fc8181); } /* PDF - Red */
.export-btn:nth-child(3) { background: linear-gradient(135deg, #3182ce, #63b3ed); } /* Word - Blue */
.export-btn:nth-child(4) { background: linear-gradient(135deg, #38a169, #68d391); } /* Excel - Green */
.export-btn:nth-child(5) { background: linear-gradient(135deg, #805ad5, #b794f4); } /* HTML - Purple */
.export-btn:nth-child(6) { background: linear-gradient(135deg, #dd6b20, #f6ad55); } /* Markdown - Orange */
.export-btn:nth-child(7) { background: linear-gradient(135deg, #319795, #4fd1c5); } /* PNG - Teal */
.export-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,0,0,0.4); filter: brightness(1.1); }
.export-btn svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; }

/* Charts */
.chart-bar { display: flex; align-items: flex-end; justify-content: space-around; height: 250px; padding: 0 20px; }
.bar-group { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bar { width: 60px; border-radius: 4px 4px 0 0; transition: height 0.5s ease; position: relative; }
.bar-label { font-size: 12px; color: var(--gray-400); text-align: center; }
.bar-value { font-size: 11px; font-family: 'Space Mono', monospace; color: white; position: absolute; top: -20px; left: 50%; transform: translateX(-50%); white-space: nowrap; }

/* Line Chart */
.line-chart-container { position: relative; height: 280px; padding: 20px 0; }
.line-chart-svg { width: 100%; height: 100%; overflow: visible; }
.line-chart-path { fill: none; stroke: url(#lineGradient); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(132,189,0,0.3)); }
.line-chart-area { fill: url(#areaGradient); opacity: 0.4; }
.line-chart-dot { fill: var(--accent); stroke: var(--bg-card); stroke-width: 3; filter: drop-shadow(0 2px 8px rgba(132,189,0,0.5)); transition: r 0.2s ease, filter 0.2s ease; cursor: pointer; }
.line-chart-dot:hover { filter: drop-shadow(0 4px 12px rgba(132,189,0,0.8)); }
.line-chart-label { font-size: 12px; fill: var(--text-secondary); text-anchor: middle; }
.line-chart-value { font-size: 13px; font-family: 'Space Mono', monospace; fill: var(--text-primary); text-anchor: middle; font-weight: 600; }
.line-chart-grid { stroke: var(--border-color); stroke-width: 1; stroke-dasharray: 4 4; }
.line-chart-milestone { display: flex; flex-direction: column; align-items: center; position: absolute; transform: translateX(-50%); }
.line-chart-milestone-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg-card); box-shadow: 0 2px 8px rgba(132,189,0,0.5); }
.line-chart-milestone-label { margin-top: 8px; font-size: 11px; color: var(--text-secondary); }
.line-chart-milestone-value { font-size: 14px; font-weight: 700; font-family: 'Space Mono', monospace; color: var(--accent); }
[data-theme="light"] .line-chart-dot { stroke: white; }
[data-theme="light"] .line-chart-milestone-dot { border-color: white; }

/* Pie */
.pie-container { display: flex; align-items: center; gap: 40px; }
.pie-chart { width: 200px; height: 200px; border-radius: 50%; position: relative; display: flex; align-items: center; justify-content: center; }
.pie-center { position: absolute; width: 120px; height: 120px; background: var(--bg-card); backdrop-filter: blur(10px); border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; box-shadow: 0 4px 20px var(--shadow-color); }
.pie-center-label { font-size: 10px; color: #cbd5e1; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; font-weight: 600; }
.pie-center-value { font-size: 22px; font-weight: 800; font-family: 'Space Mono', monospace; color: #a8d94e; text-shadow: 0 0 10px rgba(132,189,0,0.3); }
[data-theme="light"] .pie-center { background: rgba(255,255,255,0.95); }
[data-theme="light"] .pie-center-label { color: var(--primary); }
[data-theme="light"] .pie-center-value { color: var(--success); }
.pie-legend { flex: 1; }
.legend-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--gray-700); }
.legend-item:last-child { border-bottom: none; }
.legend-color { width: 12px; height: 12px; border-radius: 3px; margin-right: 12px; }
.legend-name { display: flex; align-items: center; }
.legend-amount { font-weight: 700; font-family: 'Space Mono', monospace; }
.legend-percent { font-size: 12px; color: var(--gray-500); }

/* Timeline */
.phase-card { border-left: 4px solid; }
.phase-card.phase-1 { border-left-color: var(--accent); }
.phase-card.phase-2 { border-left-color: var(--primary); }
.phase-card.phase-3 { border-left-color: var(--success); }
.phase-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.phase-number { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; }
.phase-number.phase-1 { background: linear-gradient(135deg, var(--accent), var(--accent-light)); color: var(--gray-900); }
.phase-number.phase-2 { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }
.phase-number.phase-3 { background: linear-gradient(135deg, var(--success), var(--success-light)); }
.phase-title { font-weight: 700; font-size: 24px; margin: 0; }
.phase-subtitle { color: var(--gray-400); font-size: 14px; }
.phase-content { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.task-list li { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--gray-300); font-size: 14px; }
.task-list .chevron { color: var(--accent); }
.task-section-title { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.task-section-title.phase-1 { color: var(--accent); }
.task-section-title.phase-2 { color: var(--primary-light); }
.task-section-title.phase-3 { color: var(--success-light); }

/* Actions */
.action-card { background: rgba(56,178,172,0.1); border-color: rgba(56,178,172,0.3); }
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.action-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px; background: rgba(0,0,0,0.2); border-radius: 8px; }
.action-day { flex-shrink: 0; }
.action-text { font-weight: 500; margin-bottom: 4px; }
.action-owner { font-size: 12px; color: var(--gray-500); }

/* Summary */
.summary-card { text-align: center; }
.summary-label { font-size: 14px; color: var(--gray-400); margin-bottom: 8px; }
.summary-value { font-size: 56px; font-weight: 800; font-family: 'Space Mono', monospace; background: linear-gradient(135deg, var(--accent), white); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.summary-status { font-size: 14px; margin-top: 8px; }
.summary-status.success { color: var(--success-light); }
.summary-status.warning { color: var(--warning); }
.summary-status.danger { color: #fc8181; }

/* Utilities */
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.mb-32 { margin-bottom: 32px; }
.mb-24 { margin-bottom: 24px; }
.mb-20 { margin-bottom: 20px; }
.mb-16 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 8px; }
.mt-24 { margin-top: 24px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-mono { font-family: 'Space Mono', monospace; }
.text-accent { color: var(--accent); }
.text-gray-400 { color: var(--gray-400); }
.text-gray-500 { color: var(--gray-500); }
.font-bold { font-weight: 700; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }

/* Pie Chart Layout */
.pie-chart-layout { display: flex; align-items: center; gap: 40px; }
.pie-chart-circle { width: 200px; height: 200px; border-radius: 50%; box-shadow: 0 4px 20px rgba(0,0,0,0.3); flex-shrink: 0; }
.pie-chart-legend { flex: 1; }

/* Simulator Pie Chart */
.sim-pie-container { margin-top: 24px; display: flex; align-items: center; gap: 24px; }
#sim-pie-chart { width: 140px; height: 140px; border-radius: 50%; background: conic-gradient(var(--gray-700) 0% 100%); flex-shrink: 0; transition: background 0.3s; }
#sim-pie-legend { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 12px; }

/* Task Filters */
.task-filters-container { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.task-filters-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.task-filter-select { min-width: 110px; }

/* Document Table of Contents */
.doc-toc { margin-bottom: 48px; padding: 24px; background: rgba(0,0,0,0.2); border-radius: 8px; }
.doc-toc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }

/* Document Section */
.doc-section { overflow-x: auto; }
.doc-section table { min-width: 500px; }
.table-responsive { overflow-x: auto; margin: 16px 0; }

@media (max-width: 1024px) { .phase-content, .action-grid { grid-template-columns: 1fr; } .pie-container { flex-direction: column; } }
@media (max-width: 768px) {
    .pie-chart-layout { flex-direction: column; gap: 24px; }
    .pie-chart-circle { width: 180px; height: 180px; margin: 0 auto; }
    .pie-chart-legend { width: 100%; }
    #chart-fuentes-projection { height: auto !important; min-height: 0 !important; }
    /* Responsive tables */
    .card-body { overflow-x: auto; }
    table { min-width: 400px; font-size: 13px; }
    table th, table td { padding: 8px 10px; }
    /* Simulator pie chart responsive */
    .sim-pie-container { flex-direction: column; }
    #sim-pie-chart { margin: 0 auto; }
    #sim-pie-legend { grid-template-columns: 1fr 1fr; justify-items: start; }
    /* Task filters responsive */
    .task-filters-container { width: 100%; justify-content: flex-start; gap: 10px; }
    .task-filters-group { width: 100%; gap: 6px; }
    .task-filters-group > label { display: none; }
    .task-filter-select { min-width: 0; flex: 1; font-size: 12px; padding: 8px 6px; }
    #task-clear-filters { flex-shrink: 0; }
    /* Document TOC responsive */
    .doc-toc { padding: 16px; margin-bottom: 32px; }
    .doc-toc-grid { grid-template-columns: 1fr; gap: 24px; }
    /* Document section tables responsive */
    .doc-section table { font-size: 13px; min-width: 500px; }
    .doc-section table td { padding: 6px 8px !important; }
    .doc-section > div { overflow-x: auto; }
}

/* Special Projects Card */
.special-project { background: linear-gradient(135deg, rgba(85,60,154,0.2), rgba(56,178,172,0.1)); border-color: rgba(85,60,154,0.3); }

/* Pipeline priority colors */
.priority-alta { color: #fc8181; }
.priority-media { color: var(--warning-light); }
.priority-baja { color: var(--gray-400); }
.probability-high { color: var(--success-light); }
.probability-medium { color: var(--warning-light); }
.probability-low { color: #fc8181; }

/* ==================== PROSPECCION STYLES ==================== */

/* Prospeccion Tabs */
.prospeccion-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.prospeccion-tab {
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.2s;
}

.prospeccion-tab:hover {
    background: rgba(132,189,0,0.1);
    border-color: var(--accent);
    color: var(--accent);
}

.prospeccion-tab.active {
    background: linear-gradient(135deg, var(--accent), var(--success));
    color: white;
    border-color: transparent;
    font-weight: 600;
}

/* Actividades Sub-Sub-Tabs */
.actividades-subtabs {
    display: flex;
    gap: 8px;
    padding: 8px;
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
    width: fit-content;
}

.actividades-subtab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    transition: all 0.2s;
}

.actividades-subtab:hover {
    background: rgba(132,189,0,0.1);
    color: var(--accent);
}

.actividades-subtab.active {
    background: var(--bg-card);
    color: var(--accent);
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.actividades-subtab svg {
    width: 16px;
    height: 16px;
}

/* Prospect Card */
.prospect-card {
    transition: all 0.2s;
}

.prospect-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    background: rgba(0,0,0,0.3) !important;
}

/* Activity Card */
.activity-card {
    transition: all 0.2s;
}

.activity-card:hover {
    background: rgba(0,0,0,0.3) !important;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
    max-height: 90vh;
    overflow-y: auto;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    /* Modal body styles if needed */
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Toast Notification */
.toast-notification {
    animation: slideInRight 0.3s ease;
}

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

/* Light theme adjustments for Prospeccion */
[data-theme="light"] .prospeccion-tabs {
    background: rgba(255,255,255,0.9);
}

[data-theme="light"] .prospeccion-tab {
    color: #4a5568;
}

[data-theme="light"] .prospeccion-tab:hover {
    color: var(--accent);
}

[data-theme="light"] .prospeccion-tab.active {
    color: white;
}

[data-theme="light"] .actividades-subtabs {
    background: rgba(0,0,0,0.05);
}

[data-theme="light"] .actividades-subtab {
    color: #4a5568;
}

[data-theme="light"] .actividades-subtab.active {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

[data-theme="light"] .prospect-card,
[data-theme="light"] .activity-card {
    background: rgba(0,0,0,0.05) !important;
}

[data-theme="light"] .prospect-card:hover,
[data-theme="light"] .activity-card:hover {
    background: rgba(0,0,0,0.08) !important;
}

[data-theme="light"] .modal-overlay {
    background: rgba(0,0,0,0.7);
}

[data-theme="light"] .modal-content {
    background: white;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

/* Responsive Prospeccion */
@media (max-width: 768px) {
    .prospeccion-tabs {
        padding: 8px;
        gap: 6px;
    }

    .prospeccion-tab {
        padding: 8px 12px;
        font-size: 12px;
    }

    .actividades-subtabs {
        padding: 6px;
        gap: 4px;
    }

    .actividades-subtab {
        padding: 6px 12px;
        font-size: 12px;
    }

    .modal-content {
        padding: 16px;
        margin: 10px;
    }
}

/* ==================== ROLE-BASED RESTRICTIONS ==================== */

/* Disabled permission style - shows button as disabled with reduced opacity */
.disabled-permission {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* Restricted mode (applies to viewers and guests who can't edit current strategy) */
body.restricted-mode .add-btn:not(.export-btn),
body.restricted-mode .edit-btn:not(.export-btn),
body.restricted-mode .delete-btn,
body.restricted-mode .remove-btn,
body.restricted-mode .save-btn,
body.restricted-mode .btn-add,
body.restricted-mode .btn-edit,
body.restricted-mode .btn-delete {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Disable drag handles in restricted mode */
body.restricted-mode .drag-handle,
body.restricted-mode [draggable="true"] {
    cursor: default !important;
    pointer-events: none;
}

/* Disable inline edit icons in restricted mode */
body.restricted-mode .inline-edit,
body.restricted-mode .edit-icon,
body.restricted-mode .delete-icon {
    opacity: 0.4;
    pointer-events: none;
}

/* Disable editable elements in restricted mode */
body.restricted-mode input:not([type="text"]#login-user):not([type="password"]#login-pass):not(#strategy-dropdown),
body.restricted-mode textarea,
body.restricted-mode select:not(#strategy-dropdown):not(.filter-select) {
    pointer-events: none;
    opacity: 0.7;
}

/* Keep login fields enabled */
body.restricted-mode #login-user,
body.restricted-mode #login-pass,
body.restricted-mode #login-btn {
    pointer-events: auto !important;
    opacity: 1 !important;
}

/* Keep strategy dropdown and filters enabled */
body.restricted-mode #strategy-dropdown,
body.restricted-mode .filter-select {
    pointer-events: auto !important;
    opacity: 1 !important;
}

/* Hide config/settings actions in restricted mode */
body.restricted-mode .config-actions,
body.restricted-mode .edit-actions {
    opacity: 0.4;
    pointer-events: none;
}

/* Guest-specific: Also disable exports (guests can't export) */
body.guest-mode .export-bar button,
body.guest-mode .export-btn,
body.guest-mode [onclick*="export"],
body.guest-mode [onclick*="Export"],
body.guest-mode button[onclick*="download"],
body.guest-mode button[onclick*="Download"] {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Guest-specific: Also disable import */
body.guest-mode [onclick*="import"],
body.guest-mode [onclick*="Import"],
body.guest-mode .import-btn {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Viewer-specific styles (can export, but can't edit) */
body.viewer-mode .export-bar button,
body.viewer-mode .export-btn {
    opacity: 1 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
}

/* Hide "Nueva Estrategia" button for viewers and guests */
body.viewer-mode [onclick*="openNewStrategyWizard"],
body.guest-mode [onclick*="openNewStrategyWizard"] {
    opacity: 0.4;
    pointer-events: none;
}

/* Admin-only elements: hidden by default, shown via JS for admins */
.admin-only {
    display: none;
}

/* Role badge styling */
#role-badge {
    animation: pulse-role 3s infinite;
    transition: all 0.3s ease;
}

@keyframes pulse-role {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

/* Legacy guest-badge support */
#guest-badge {
    animation: pulse-role 2s infinite;
}

/* ==================== ADMIN PANEL STYLES ==================== */
.admin-panel {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border-color);
}

.admin-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.admin-panel-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.permissions-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.permissions-table th,
.permissions-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.permissions-table th {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg-secondary);
}

.permissions-table tr:hover {
    background: var(--bg-hover);
}

.permission-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.permission-badge.admin {
    background: rgba(159,122,234,0.2);
    color: #9f7aea;
}

.permission-badge.owner {
    background: rgba(66,153,225,0.2);
    color: #4299e1;
}

.permission-badge.editor {
    background: rgba(56,178,172,0.2);
    color: #38b2ac;
}

.permission-badge.viewer {
    background: rgba(72,187,120,0.2);
    color: #48bb78;
}

.permission-badge.guest {
    background: rgba(237,137,54,0.2);
    color: #ed8936;
}

.permission-badge.public {
    background: rgba(160,174,192,0.2);
    color: #a0aec0;
}

/* User assignment dropdown */
.user-assignment-select {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 13px;
    min-width: 120px;
}

/* Toggle switch for public/private */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-600);
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--primary-light);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* ========================================
   GLOBAL SEARCH MODAL
   ======================================== */

.search-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    z-index: 1100;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
    animation: fadeIn 0.15s ease-out;
}

.search-modal-content {
    width: 600px;
    max-width: 90vw;
    max-height: 70vh;
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: slideDown 0.2s ease-out;
}

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

.search-input-wrapper {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
}

.search-input-wrapper .search-icon {
    width: 20px;
    height: 20px;
    stroke: var(--gray-400);
    flex-shrink: 0;
}

#global-search-input {
    flex: 1;
    background: transparent;
    border: none;
    font-size: 18px;
    color: var(--text-color);
    outline: none;
}

#global-search-input::placeholder {
    color: var(--gray-500);
}

.search-shortcut {
    font-size: 12px;
    color: var(--gray-500);
    background: var(--gray-800);
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.search-results {
    max-height: calc(70vh - 70px);
    overflow-y: auto;
}

.search-results-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--gray-500);
}

.search-results-empty svg {
    width: 48px;
    height: 48px;
    stroke: var(--gray-600);
    margin-bottom: 12px;
}

.search-category {
    padding: 8px 20px;
    border-bottom: 1px solid var(--border-color);
}

.search-category:last-child {
    border-bottom: none;
}

.search-category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-category-header svg {
    width: 14px;
    height: 14px;
    stroke: var(--gray-500);
}

.search-result-item {
    padding: 10px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 8px;
    margin: 2px 0;
    transition: background 0.15s ease;
}

.search-result-item:hover {
    background: var(--gray-800);
}

.search-result-item svg {
    width: 16px;
    height: 16px;
    stroke: var(--gray-400);
    flex-shrink: 0;
}

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

.search-result-title {
    font-size: 14px;
    color: var(--text-color);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-meta {
    font-size: 12px;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--primary-light);
    color: white;
    flex-shrink: 0;
}

/* ========================================
   FLOATING ACTION BUTTON (FAB)
   ======================================== */

.fab-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100;
}

.fab-main {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-light);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.fab-main:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    background: var(--accent-light);
}

.fab-main .fab-icon {
    stroke: white;
    transition: transform 0.3s ease;
}

.fab-container.open .fab-main .fab-icon {
    transform: rotate(45deg);
}

.fab-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.fab-container.open .fab-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.fab-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: background 0.15s ease, transform 0.15s ease;
    font-size: 14px;
    color: var(--text-color);
}

.fab-item:hover {
    background: var(--gray-800);
    transform: translateX(-4px);
}

.fab-item svg {
    width: 18px;
    height: 18px;
    stroke: var(--primary-light);
    flex-shrink: 0;
}

.fab-item span {
    font-weight: 500;
}

.fab-item .shortcut {
    font-size: 11px;
    color: var(--gray-500);
    background: var(--gray-800);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
}

/* Hide FAB on small screens */
@media (max-width: 768px) {
    .fab-container {
        display: none;
    }
}

/* ========================================
   KANBAN BOARD
   ======================================== */

.view-toggle {
    display: flex;
    gap: 4px;
    background: var(--gray-800);
    padding: 4px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.view-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--gray-400);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.view-btn:hover {
    color: var(--text-color);
    background: var(--gray-700);
}

.view-btn.active {
    background: var(--card-bg);
    color: var(--text-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.view-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.kanban-board {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 8px 4px 16px;
    min-height: 500px;
}

.kanban-column {
    min-width: 280px;
    max-width: 280px;
    background: var(--gray-900);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    transition: background 0.2s ease;
}

.kanban-column.drag-over {
    background: rgba(132, 189, 0, 0.1);
    box-shadow: inset 0 0 0 2px var(--primary-light);
}

.kanban-column-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 4px 12px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 12px;
}

.kanban-column-header .status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.kanban-column-header .status-dot.prospecto { background: var(--gray-400); }
.kanban-column-header .status-dot.contacto { background: #4299e1; }
.kanban-column-header .status-dot.propuesta { background: #9f7aea; }
.kanban-column-header .status-dot.negociacion { background: #ed8936; }
.kanban-column-header .status-dot.ganado { background: #48bb78; }
.kanban-column-header .status-dot.perdido { background: #f56565; }

.kanban-column-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    flex: 1;
}

.kanban-column-count {
    font-size: 12px;
    color: var(--gray-500);
    background: var(--gray-800);
    padding: 2px 8px;
    border-radius: 10px;
}

.kanban-column-value {
    font-size: 12px;
    color: var(--primary-light);
    font-weight: 600;
}

.kanban-cards {
    flex: 1;
    min-height: 100px;
    overflow-y: auto;
}

.kanban-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    cursor: grab;
    border-left: 3px solid var(--primary-light);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.kanban-card:active {
    cursor: grabbing;
}

.kanban-card.dragging {
    opacity: 0.5;
    transform: rotate(3deg);
}

.kanban-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.kanban-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.3;
}

.kanban-card-priority {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    flex-shrink: 0;
}

.kanban-card-priority.alta {
    background: rgba(245, 101, 101, 0.2);
    color: #f56565;
}

.kanban-card-priority.media {
    background: rgba(237, 137, 54, 0.2);
    color: #ed8936;
}

.kanban-card-priority.baja {
    background: rgba(72, 187, 120, 0.2);
    color: #48bb78;
}

.kanban-card-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-light);
    margin-bottom: 8px;
}

.kanban-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--gray-500);
}

.kanban-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.kanban-card-meta svg {
    width: 12px;
    height: 12px;
    stroke: var(--gray-500);
}

.kanban-card-sector {
    font-size: 11px;
    color: var(--gray-400);
    background: var(--gray-800);
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 8px;
    display: inline-block;
}

/* Quick Activity Modal */
.quick-activity-modal {
    padding: 20px;
}

.quick-activity-modal h3 {
    margin-bottom: 16px;
    font-size: 18px;
}

.quick-activity-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.quick-activity-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.quick-activity-form label {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-400);
}

.quick-activity-form select,
.quick-activity-form input,
.quick-activity-form textarea {
    padding: 10px 12px;
    background: var(--gray-800);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 14px;
}

.quick-activity-form textarea {
    min-height: 80px;
    resize: vertical;
}

.quick-activity-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

/* Keyboard shortcut hints */
.keyboard-hint {
    position: fixed;
    bottom: 100px;
    right: 24px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    font-size: 13px;
    color: var(--text-color);
    z-index: 99;
    animation: fadeIn 0.3s ease-out;
}

.keyboard-hint kbd {
    background: var(--gray-700);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    margin: 0 2px;
}

/* ==================== ANALYTICS SECTION ==================== */

/* Analytics Tabs */
.analytics-tabs {
    display: flex;
    gap: 4px;
    background: var(--gray-800);
    padding: 4px;
    border-radius: 8px;
    width: fit-content;
}

.analytics-tab {
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: var(--gray-400);
    cursor: pointer;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.analytics-tab:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.05);
}

.analytics-tab.active {
    background: var(--card-bg);
    color: var(--text-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Date Filter */
.analytics-date-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.analytics-date-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--gray-400);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

.analytics-date-btn:hover {
    border-color: var(--primary-light);
    color: var(--text-color);
}

.analytics-date-btn.active {
    background: var(--primary-light);
    color: white;
    border-color: var(--primary-light);
}

/* Goal Progress Ring */
.analytics-goal-ring {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(var(--primary-light) var(--progress, 0%), var(--gray-700) 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.5s ease;
}

.analytics-goal-center {
    width: 90px;
    height: 90px;
    background: var(--card-bg);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.analytics-goal-percentage {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-light);
}

.analytics-goal-label {
    font-size: 11px;
    color: var(--gray-400);
    text-transform: uppercase;
}

/* Pace Indicator */
.analytics-pace {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.analytics-pace.ahead {
    background: rgba(72, 187, 120, 0.2);
    color: #48bb78;
}

.analytics-pace.on-track {
    background: rgba(66, 153, 225, 0.2);
    color: #4299e1;
}

.analytics-pace.behind {
    background: rgba(245, 101, 101, 0.2);
    color: #f56565;
}

/* Heatmap */
.analytics-heatmap {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.analytics-heatmap-cell {
    aspect-ratio: 1;
    border-radius: 4px;
    background: var(--gray-800);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--gray-500);
    transition: background 0.2s ease;
}

.analytics-heatmap-cell.level-1 {
    background: rgba(132, 189, 0, 0.2);
    color: var(--accent);
}

.analytics-heatmap-cell.level-2 {
    background: rgba(132, 189, 0, 0.4);
    color: var(--accent);
}

.analytics-heatmap-cell.level-3 {
    background: rgba(132, 189, 0, 0.6);
    color: white;
}

.analytics-heatmap-cell.level-4 {
    background: rgba(132, 189, 0, 0.8);
    color: white;
}

/* Engagement Score */
.analytics-engagement-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--gray-800);
    border-radius: 8px;
    margin-bottom: 8px;
}

.analytics-engagement-score {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.analytics-engagement-score.high {
    background: rgba(72, 187, 120, 0.2);
    color: #48bb78;
}

.analytics-engagement-score.medium {
    background: rgba(237, 137, 54, 0.2);
    color: #ed8936;
}

.analytics-engagement-score.low {
    background: rgba(245, 101, 101, 0.2);
    color: #f56565;
}

.analytics-engagement-info {
    flex: 1;
    min-width: 0;
}

.analytics-engagement-name {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 2px;
}

.analytics-engagement-details {
    font-size: 12px;
    color: var(--gray-400);
}

/* Recommendations */
.analytics-recommendation {
    padding: 12px 16px;
    background: var(--gray-800);
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 3px solid var(--gray-600);
}

.analytics-recommendation.urgent {
    border-left-color: #f56565;
}

.analytics-recommendation.high {
    border-left-color: #ed8936;
}

.analytics-recommendation.normal {
    border-left-color: #4299e1;
}

.analytics-recommendation-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.analytics-recommendation-priority {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
}

.analytics-recommendation.urgent .analytics-recommendation-priority {
    background: rgba(245, 101, 101, 0.2);
    color: #f56565;
}

.analytics-recommendation.high .analytics-recommendation-priority {
    background: rgba(237, 137, 54, 0.2);
    color: #ed8936;
}

.analytics-recommendation.normal .analytics-recommendation-priority {
    background: rgba(66, 153, 225, 0.2);
    color: #4299e1;
}

.analytics-recommendation-lead {
    font-weight: 600;
    color: var(--text-color);
}

.analytics-recommendation-action {
    font-size: 13px;
    color: var(--gray-400);
}

/* Analytics Charts */
.analytics-chart-container {
    min-height: 200px;
    position: relative;
}

.analytics-bar-chart {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.analytics-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.analytics-bar-label {
    width: 100px;
    font-size: 13px;
    color: var(--gray-400);
    text-align: right;
    flex-shrink: 0;
}

.analytics-bar-track {
    flex: 1;
    height: 24px;
    background: var(--gray-800);
    border-radius: 4px;
    overflow: hidden;
}

.analytics-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.analytics-bar-value {
    width: 60px;
    font-size: 13px;
    color: var(--text-color);
    text-align: right;
    flex-shrink: 0;
}

/* Trend Line Chart */
.analytics-trend-chart {
    position: relative;
    height: 200px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 20px 0;
}

.analytics-trend-bar {
    flex: 1;
    background: var(--primary-light);
    border-radius: 4px 4px 0 0;
    transition: height 0.5s ease;
    position: relative;
    min-height: 4px;
}

.analytics-trend-bar:hover {
    opacity: 0.8;
}

.analytics-trend-label {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: var(--gray-400);
    white-space: nowrap;
}

/* Milestones Timeline */
.analytics-milestones {
    position: relative;
    padding: 20px 0;
}

.analytics-milestone-track {
    height: 4px;
    background: var(--gray-700);
    border-radius: 2px;
    position: relative;
    margin: 30px 0;
}

.analytics-milestone-progress {
    height: 100%;
    background: var(--primary-light);
    border-radius: 2px;
    transition: width 0.5s ease;
}

.analytics-milestone-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--gray-700);
    border: 2px solid var(--gray-600);
}

.analytics-milestone-marker.completed {
    background: var(--accent);
    border-color: var(--accent);
}

.analytics-milestone-marker.current {
    background: var(--primary-light);
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(66, 153, 225, 0.3);
}

.analytics-milestone-label {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: var(--gray-400);
    white-space: nowrap;
}

/* Funnel Analytics */
.analytics-funnel {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.analytics-funnel-stage {
    display: flex;
    align-items: center;
    gap: 16px;
}

.analytics-funnel-bar {
    height: 36px;
    background: var(--primary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    transition: width 0.5s ease;
    min-width: 80px;
}

.analytics-funnel-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.analytics-funnel-label {
    font-size: 13px;
    color: var(--text-color);
    min-width: 140px;
}

.analytics-funnel-rate {
    font-size: 12px;
    color: var(--gray-400);
}

.analytics-funnel-arrow {
    color: var(--gray-500);
    font-size: 18px;
    padding-left: 12px;
}

/* Dashboard Goal Progress Card */
.dashboard-goal-card {
    display: flex;
    gap: 32px;
    align-items: center;
    padding: 24px;
}

.dashboard-goal-ring-container {
    flex-shrink: 0;
}

.dashboard-goal-info {
    flex: 1;
}

.dashboard-goal-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

.dashboard-goal-subtitle {
    font-size: 14px;
    color: var(--gray-400);
    margin-bottom: 16px;
}

.dashboard-goal-stats {
    display: flex;
    gap: 24px;
}

.dashboard-goal-stat {
    text-align: center;
}

.dashboard-goal-stat-value {
    font-size: 24px;
    font-weight: 700;
    font-family: 'Space Mono', monospace;
}

.dashboard-goal-stat-label {
    font-size: 12px;
    color: var(--gray-400);
    text-transform: uppercase;
}

/* Granularity Toggle */
.analytics-granularity {
    display: flex;
    gap: 4px;
    background: var(--gray-800);
    padding: 4px;
    border-radius: 6px;
    width: fit-content;
}

.analytics-granularity-btn {
    padding: 6px 12px;
    border: none;
    background: transparent;
    color: var(--gray-400);
    cursor: pointer;
    border-radius: 4px;
    font-size: 12px;
    transition: all 0.2s ease;
}

.analytics-granularity-btn.active {
    background: var(--card-bg);
    color: var(--text-color);
}

/* Responsive */
@media (max-width: 768px) {
    .analytics-tabs {
        width: 100%;
        overflow-x: auto;
    }

    .analytics-tab {
        padding: 8px 16px;
        font-size: 13px;
        white-space: nowrap;
    }

    .dashboard-goal-card {
        flex-direction: column;
        text-align: center;
    }

    .dashboard-goal-stats {
        justify-content: center;
    }

    .analytics-bar-label {
        width: 80px;
        font-size: 12px;
    }
}

/* ==================== AUTOMATION & WORKFLOW (Phase 3) ==================== */

/* Follow-up Reminders */
.reminders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.reminders-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.reminders-summary {
    display: flex;
    gap: 8px;
}

.reminder-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.reminder-badge.urgent {
    background: rgba(245, 101, 101, 0.2);
    color: #f56565;
}

.reminder-badge.high {
    background: rgba(237, 137, 54, 0.2);
    color: #ed8936;
}

.reminder-badge.normal {
    background: rgba(66, 153, 225, 0.2);
    color: #4299e1;
}

.reminders-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.reminder-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--gray-800);
    border-radius: 8px;
    border-left: 3px solid var(--gray-600);
}

.reminder-item.urgent {
    border-left-color: #f56565;
}

.reminder-item.high {
    border-left-color: #ed8936;
}

.reminder-item.normal {
    border-left-color: #4299e1;
}

.reminder-priority-indicator {
    display: none;
}

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

.reminder-lead-name {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 2px;
}

.reminder-details {
    font-size: 12px;
    color: var(--gray-400);
    display: flex;
    gap: 8px;
}

.reminder-actions {
    display: flex;
    gap: 8px;
}

.reminders-footer {
    margin-top: 12px;
    text-align: center;
}

.reminders-footer a {
    color: var(--primary-light);
    text-decoration: none;
    font-size: 14px;
}

.reminders-empty {
    text-align: center;
    padding: 32px 16px;
    color: var(--gray-400);
}

.reminders-empty p {
    margin: 12px 0 4px 0;
    font-size: 16px;
    color: var(--text-color);
}

.reminders-empty span {
    font-size: 13px;
}

/* Email Templates */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.template-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.template-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.template-category {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary-light);
    background: rgba(66, 153, 225, 0.15);
    padding: 4px 8px;
    border-radius: 4px;
}

.template-actions {
    display: flex;
    gap: 4px;
}

.template-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}

.template-subject {
    font-size: 13px;
    color: var(--gray-400);
}

.template-preview {
    font-size: 13px;
    color: var(--gray-400);
    line-height: 1.5;
    max-height: 60px;
    overflow: hidden;
}

.template-footer {
    display: flex;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.template-full-content {
    background: var(--gray-800);
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
}

.template-full-subject {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.template-full-body {
    font-family: inherit;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    margin: 0;
    color: var(--text-color);
}

.placeholders-help {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.placeholders-help h4 {
    margin: 0 0 16px 0;
}

.placeholders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
}

.placeholder-item {
    font-size: 13px;
    color: var(--gray-400);
}

.placeholder-item code {
    background: var(--gray-800);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--accent);
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    margin-right: 8px;
}

/* Activity Type Buttons */
.activity-type-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.activity-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    background: var(--gray-800);
    border: 2px solid transparent;
    border-radius: 8px;
    color: var(--gray-400);
    cursor: pointer;
    transition: all 0.2s ease;
}

.activity-type-btn:hover {
    border-color: var(--border-color);
    color: var(--text-color);
}

.activity-type-btn.active {
    border-color: var(--primary-light);
    background: rgba(66, 153, 225, 0.1);
    color: var(--primary-light);
}

.activity-type-btn svg {
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* Scheduled Activities */
.scheduled-activities-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.scheduled-activity-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    align-items: center;
}

.scheduled-activity-item.today {
    border-color: var(--primary-light);
    background: rgba(66, 153, 225, 0.05);
}

.scheduled-activity-item.past {
    opacity: 0.6;
}

.scheduled-date {
    text-align: center;
    min-width: 60px;
}

.scheduled-day {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
    font-family: 'Space Mono', monospace;
}

.scheduled-month {
    font-size: 12px;
    color: var(--gray-400);
    text-transform: uppercase;
}

.today-badge {
    font-size: 10px;
    font-weight: 700;
    color: var(--primary-light);
    margin-top: 4px;
}

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

.scheduled-type {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-light);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.scheduled-lead {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}

.scheduled-notes {
    font-size: 13px;
    color: var(--gray-400);
    margin-top: 4px;
}

.scheduled-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Bulk Action Bar */
.bulk-action-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.bulk-action-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
    font-size: 14px;
}

.bulk-count {
    font-weight: 700;
    color: var(--primary-light);
    font-size: 18px;
}

.bulk-action-buttons {
    display: flex;
    gap: 8px;
}

.bulk-action-buttons .btn {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bulk-action-buttons .btn svg {
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.bulk-action-close {
    background: none;
    border: none;
    color: var(--gray-400);
    font-size: 24px;
    cursor: pointer;
    padding: 0 0 0 12px;
    border-left: 1px solid var(--border-color);
    margin-left: 8px;
}

.bulk-action-close:hover {
    color: var(--text-color);
}

/* Bulk checkbox styling */
.bulk-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

#bulk-select-all {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .templates-grid {
        grid-template-columns: 1fr;
    }

    .activity-type-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .bulk-action-bar {
        left: 16px;
        right: 16px;
        transform: none;
        flex-wrap: wrap;
        justify-content: center;
    }

    .bulk-action-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }

    .scheduled-activity-item {
        flex-wrap: wrap;
    }

    .placeholders-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== COLLABORATION (Phase 4) ==================== */

/* Notifications Button */
.notification-btn {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Notifications Panel */
.notifications-panel {
    position: fixed;
    top: 60px;
    right: 16px;
    width: 360px;
    max-height: 480px;
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.notifications-panel.show {
    display: flex;
}

.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.notifications-header h3 {
    margin: 0;
    font-size: 16px;
}

.notifications-list {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border-color);
}

.notification-item:hover {
    background: rgba(132, 189, 0, 0.1);
}

.notification-item.unread {
    background: rgba(132, 189, 0, 0.05);
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
}

.notification-icon {
    font-size: 20px;
    flex-shrink: 0;
}

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

.notification-message {
    font-size: 14px;
    color: var(--text-color);
    margin-bottom: 4px;
}

.notification-time {
    font-size: 12px;
    color: var(--gray-400);
}

.notification-dismiss {
    background: none;
    border: none;
    color: var(--gray-400);
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.2s;
}

.notification-item:hover .notification-dismiss {
    opacity: 1;
}

.notification-dismiss:hover {
    color: var(--danger);
}

.notifications-empty {
    padding: 40px 16px;
    text-align: center;
    color: var(--gray-400);
}

/* Activity Feed */
.activity-feed {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.activity-feed-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.activity-feed-header h3 {
    margin: 0;
    font-size: 16px;
}

.activity-feed-list {
    max-height: 400px;
    overflow-y: auto;
}

.activity-feed-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.activity-feed-item:last-child {
    border-bottom: none;
}

.activity-feed-icon {
    font-size: 18px;
    flex-shrink: 0;
}

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

.activity-feed-text {
    font-size: 14px;
    color: var(--text-color);
    margin-bottom: 4px;
}

.activity-feed-text em {
    color: var(--accent);
    font-style: normal;
}

.activity-feed-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--gray-400);
}

.activity-feed-empty {
    padding: 40px 16px;
    text-align: center;
    color: var(--gray-400);
}

/* Audit Trail */
.audit-trail {
    padding: 24px;
}

.audit-trail-header {
    margin-bottom: 24px;
}

.audit-trail-header h2 {
    margin: 0 0 8px 0;
}

.audit-trail-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.audit-trail-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.audit-trail-date-group {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.audit-trail-date {
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    font-weight: 600;
    font-size: 14px;
    color: var(--gray-300);
}

.audit-trail-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.audit-trail-item:last-child {
    border-bottom: none;
}

.audit-trail-time {
    font-size: 12px;
    color: var(--gray-400);
    min-width: 50px;
    flex-shrink: 0;
}

.audit-trail-icon {
    font-size: 16px;
    flex-shrink: 0;
}

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

.audit-trail-action {
    font-size: 14px;
    color: var(--text-color);
}

.audit-trail-action em {
    color: var(--accent);
    font-style: normal;
}

.audit-trail-changes {
    margin-top: 8px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.audit-old-value {
    color: var(--danger);
    text-decoration: line-through;
}

.audit-arrow {
    color: var(--gray-400);
}

.audit-new-value {
    color: var(--success-light);
}

.audit-trail-empty {
    padding: 60px 24px;
    text-align: center;
    color: var(--gray-400);
}

/* Lead Comments */
.lead-comments {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.lead-comments-header {
    margin-bottom: 16px;
}

.lead-comments-header h4 {
    margin: 0;
    font-size: 16px;
}

.lead-comments-input {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: flex-end;
}

.lead-comments-input textarea {
    flex: 1;
}

.lead-comments-input .btn {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lead-comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lead-comment {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 12px;
}

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

.lead-comment-author {
    font-weight: 600;
    font-size: 14px;
    color: var(--accent);
}

.lead-comment-time {
    font-size: 12px;
    color: var(--gray-400);
}

.lead-comment-text {
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.lead-comment-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.btn-link {
    background: none;
    border: none;
    color: var(--gray-400);
    font-size: 12px;
    cursor: pointer;
    padding: 0;
}

.btn-link:hover {
    color: var(--accent);
}

.btn-link.text-danger:hover {
    color: var(--danger);
}

.lead-comments-empty {
    padding: 24px;
    text-align: center;
    color: var(--gray-400);
    font-size: 14px;
}

/* Light Theme */
[data-theme="light"] .notifications-panel {
    background: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .notification-item.unread {
    background: rgba(132, 189, 0, 0.08);
}

[data-theme="light"] .activity-feed,
[data-theme="light"] .audit-trail-date-group {
    background: white;
}

[data-theme="light"] .audit-trail-date {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .lead-comment {
    background: rgba(0, 0, 0, 0.05);
}

/* Responsive */
@media (max-width: 768px) {
    .notifications-panel {
        right: 8px;
        left: 8px;
        width: auto;
        top: 56px;
    }

    .audit-trail {
        padding: 16px;
    }

    .audit-trail-filters {
        flex-direction: column;
    }

    .audit-trail-item {
        flex-wrap: wrap;
    }

    .audit-trail-time {
        width: 100%;
        margin-bottom: 4px;
    }

    .lead-comments-input {
        flex-direction: column;
        align-items: stretch;
    }

    .lead-comments-input .btn {
        align-self: flex-end;
    }
}

/* ==================== KANBAN TOUCH SUPPORT ==================== */

/* Touch-friendly Kanban cards */
@media (pointer: coarse) {
    .kanban-card {
        padding: 16px;
        min-height: 80px;
        touch-action: pan-y;
        -webkit-user-select: none;
        user-select: none;
    }

    .kanban-card-header {
        gap: 12px;
    }

    .kanban-card-actions .btn {
        min-width: 44px;
        min-height: 44px;
        padding: 10px;
    }

    .kanban-column {
        min-width: 280px;
        padding: 12px;
    }

    .kanban-column-header {
        padding: 12px;
    }
}

/* Dragging states for touch */
.kanban-card-dragging {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border: 2px solid var(--primary-light);
    opacity: 0.95;
}

.kanban-card-placeholder {
    opacity: 0.3;
    border: 2px dashed var(--gray-600);
}

.kanban-column-drag-over {
    background: rgba(132, 189, 0, 0.1);
    border: 2px dashed var(--primary-light);
}

/* Kanban responsive improvements */
@media (max-width: 1024px) {
    .kanban-board {
        gap: 12px;
        padding: 12px;
    }

    .kanban-column {
        min-width: 260px;
        flex: 0 0 260px;
    }
}

@media (max-width: 768px) {
    .kanban-board {
        flex-direction: column;
        overflow-x: visible;
    }

    .kanban-column {
        width: 100%;
        min-width: 100%;
        flex: 0 0 auto;
    }

    .kanban-column-cards {
        max-height: 300px;
        overflow-y: auto;
    }
}

/* Safe area insets for notched devices */
@supports (padding: max(0px)) {
    .mobile-header {
        padding-top: max(12px, env(safe-area-inset-top));
    }

    .sidebar {
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }

    .fab {
        bottom: max(24px, calc(env(safe-area-inset-bottom) + 16px));
    }
}

/* Header actions container */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==================== ERROR HANDLING STYLES ==================== */

.error-retry-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--danger);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    max-width: 90%;
    animation: slideUp 0.3s ease-out;
}

.error-retry-toast span {
    flex: 1;
    color: var(--text-primary);
    font-size: 14px;
}

.error-retry-toast .btn {
    white-space: nowrap;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Error notification enhancement */
.notification.error,
.toast.error {
    border-left: 4px solid var(--danger);
}

.notification.warning,
.toast.warning {
    border-left: 4px solid var(--warning);
}

/* ==================== TEST RESULTS STYLES ==================== */

.test-results-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    z-index: 10002;
}

.test-results-panel::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: -1;
}

.test-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-darker);
}

.test-results-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--text-primary);
}

.test-results-header button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px 8px;
}

.test-results-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
}

.test-results-summary.all-passed {
    background: rgba(132, 189, 0, 0.1);
    border-left: 4px solid var(--success);
}

.test-results-summary.has-failures {
    background: rgba(220, 53, 69, 0.1);
    border-left: 4px solid var(--danger);
}

.test-count {
    font-weight: 600;
    color: var(--text-primary);
}

.test-duration {
    color: var(--text-muted);
    font-size: 13px;
}

.test-results-list {
    overflow-y: auto;
    padding: 12px 0;
    max-height: 400px;
}

.test-suite {
    margin-bottom: 16px;
}

.test-suite-header {
    padding: 8px 20px;
    font-weight: 600;
    color: var(--primary-light);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.test-result {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 20px;
    font-size: 13px;
}

.test-result.passed .test-name {
    color: var(--text-primary);
}

.test-result.failed .test-name {
    color: var(--danger);
}

.test-icon {
    flex-shrink: 0;
    font-size: 12px;
}

.test-name {
    flex: 1;
}

.test-error {
    display: block;
    color: var(--danger);
    font-size: 12px;
    margin-top: 4px;
    padding-left: 20px;
    opacity: 0.8;
}

/* ==================== ACCIONES SECTION ==================== */

.acciones-calendar-day {
    background: var(--gray-900);
    padding: 8px;
    min-height: 60px;
    transition: background 0.15s;
}

.acciones-calendar-day:hover:not(.empty) {
    background: var(--gray-800);
}

.acciones-calendar-day.empty {
    background: var(--gray-900);
    opacity: 0.3;
}

.acciones-calendar-day.today {
    background: rgba(132, 189, 0, 0.08);
    box-shadow: inset 0 0 0 1px var(--primary-light);
}

.acciones-calendar-day.has-actions {
    cursor: pointer;
}

.acciones-kanban-card {
    transition: transform 0.15s, box-shadow 0.15s;
}

.acciones-kanban-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.acciones-kanban-card:active {
    cursor: grabbing;
}

.acciones-kanban-column {
    transition: background 0.15s;
}

@media (max-width: 768px) {
    .acciones-summary-cards {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .acciones-kanban {
        flex-direction: column !important;
    }

    .acciones-kanban-column {
        min-width: unset !important;
    }

    .acciones-filter-bar {
        flex-direction: column !important;
    }
}
