/* ═══════════════════════════════════════════════════════════════════════════
   West Avenue Group — Premium Dark Glassmorphism Theme
   Ported from phone-manager + West Avenue Group specific additions
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── CSS Variables ──────────────────────────────────────────────────────── */
:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.7);
    --bg-card-hover: rgba(17, 24, 39, 0.9);
    --bg-glass: rgba(255, 255, 255, 0.03);
    --bg-glass-border: rgba(255, 255, 255, 0.08);

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent-primary: #00C2A8;
    --accent-primary-hover: #00e0c2;
    --accent-primary-glow: rgba(0, 194, 168, 0.3);
    --accent-secondary: #009984;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --accent-info: #3b82f6;
    --accent-purple: #8b5cf6;

    --gradient-1: linear-gradient(135deg, #00C2A8, #00e0c2);
    --gradient-2: linear-gradient(135deg, #009984, #00C2A8);
    --gradient-3: linear-gradient(135deg, #ef4444, #f87171);
    --gradient-4: linear-gradient(135deg, #10b981, #34d399);
    --gradient-5: linear-gradient(135deg, #3b82f6, #60a5fa);
    --gradient-6: linear-gradient(135deg, #8b5cf6, #a78bfa);

    --sidebar-width: 260px;
    --topbar-height: 70px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 30px var(--accent-primary-glow);

    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary); color: var(--text-primary);
    line-height: 1.6; min-height: 100vh; overflow-x: hidden;
}
a { color: var(--accent-primary-hover); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-primary); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════════════════════ */
.sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: var(--sidebar-width); background: var(--bg-secondary);
    border-right: 1px solid var(--bg-glass-border);
    display: flex; flex-direction: column; z-index: 100;
    transition: var(--transition-slow);
}
.sidebar-brand {
    display: flex; align-items: center; gap: 12px;
    padding: 24px 20px; border-bottom: 1px solid var(--bg-glass-border);
}
.brand-icon { width: 40px; height: 40px; background: var(--gradient-1); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; }
.brand-icon svg { width: 22px; height: 22px; color: white; }
.brand-title { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.5px; }
.brand-subtitle { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

.sidebar-menu { flex: 1; padding: 16px 12px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.menu-label { font-size: 0.65rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; padding: 16px 16px 6px; }

.menu-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 16px;
    border-radius: var(--radius-sm); color: var(--text-secondary);
    font-size: 0.875rem; font-weight: 500; transition: var(--transition);
    cursor: pointer; border: none; background: none; text-decoration: none;
}
.menu-item svg { width: 20px; height: 20px; flex-shrink: 0; }
.menu-item:hover { background: var(--bg-glass); color: var(--text-primary); }
.menu-item.active { background: var(--accent-primary-glow); color: var(--accent-primary-hover); }

.sidebar-footer { padding: 16px 12px; border-top: 1px solid var(--bg-glass-border); }
.user-card { display: flex; align-items: center; gap: 12px; padding: 10px 16px; margin-bottom: 4px; }
.user-avatar { width: 36px; height: 36px; background: var(--gradient-1); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; color: white; flex-shrink: 0; }
.user-info { display: flex; flex-direction: column; }
.user-name { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); }
.user-role { font-size: 0.7rem; color: var(--text-muted); text-transform: capitalize; }
.logout-btn { color: var(--accent-danger) !important; }
.logout-btn:hover { background: rgba(239, 68, 68, 0.1) !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════════════════════ */
.main-content { margin-left: var(--sidebar-width); min-height: 100vh; background: var(--bg-primary); }
.top-bar {
    height: var(--topbar-height); display: flex; align-items: center;
    padding: 0 32px; border-bottom: 1px solid var(--bg-glass-border);
    background: rgba(10, 14, 26, 0.8); backdrop-filter: blur(12px);
    position: sticky; top: 0; z-index: 50; gap: 16px;
}
.menu-toggle { display: none; background: none; border: none; color: var(--text-primary); cursor: pointer; padding: 8px; }
.menu-toggle svg { width: 24px; height: 24px; }
.page-title { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.5px; flex: 1; }
.top-bar-right { display: flex; align-items: center; gap: 12px; }
.content-area { padding: 32px; }

/* ── Badges ────────────────────────────────────────────────────────────── */
.badge { padding: 4px 12px; border-radius: 20px; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; }
.badge-admin { background: var(--accent-primary-glow); color: var(--accent-primary-hover); }
.badge-broker, .badge-agent { background: rgba(59, 130, 246, 0.15); color: var(--accent-info); }
.badge-processor { background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }

.status-badge { padding: 4px 10px; border-radius: 20px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; }
.status-active, .status-new, .status-open { background: rgba(16, 185, 129, 0.15); color: var(--accent-success); }
.status-warm, .status-scheduled, .status-received { background: rgba(245, 158, 11, 0.15); color: var(--accent-warning); }
.status-closed, .status-completed, .status-verified { background: rgba(59, 130, 246, 0.15); color: var(--accent-info); }
.status-lost, .status-cancelled, .status-rejected, .status-overdue, .status-suspended { background: rgba(239, 68, 68, 0.15); color: var(--accent-danger); }
.status-dormant, .status-missing, .status-requested { background: rgba(100, 116, 139, 0.15); color: var(--text-muted); }

.priority-urgent { color: var(--accent-danger); font-weight: 700; }
.priority-high { color: var(--accent-warning); font-weight: 600; }
.priority-medium { color: var(--accent-info); }
.priority-low { color: var(--text-muted); }

.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: 0.7rem; font-weight: 600; background: rgba(0, 194, 168, 0.1); color: var(--accent-primary-hover); border: 1px solid rgba(0, 194, 168, 0.2); }
.tag-remove { cursor: pointer; opacity: 0.6; font-size: 0.8rem; }
.tag-remove:hover { opacity: 1; }

/* ═══════════════════════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════════════════════ */
.card { background: var(--bg-card); border: 1px solid var(--bg-glass-border); border-radius: var(--radius-lg); backdrop-filter: blur(12px); transition: var(--transition); }
.card:hover { border-color: rgba(255, 255, 255, 0.12); }
.card-header { padding: 20px 24px; border-bottom: 1px solid var(--bg-glass-border); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.card-header h2 { font-size: 1rem; font-weight: 600; }
.card-body { padding: 24px; }
.card-header-actions { display: flex; gap: 12px; align-items: center; }

/* ═══════════════════════════════════════════════════════════════════════════
   STATS CARDS
   ═══════════════════════════════════════════════════════════════════════════ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 32px; }
.stat-card { padding: 24px; border-radius: var(--radius-lg); display: flex; align-items: center; gap: 16px; position: relative; overflow: hidden; }
.stat-card::before { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.3); border-radius: inherit; }
.stat-gradient-1 { background: var(--gradient-1); }
.stat-gradient-2 { background: var(--gradient-2); }
.stat-gradient-3 { background: var(--gradient-3); }
.stat-gradient-4 { background: var(--gradient-4); }
.stat-gradient-5 { background: var(--gradient-5); }
.stat-gradient-6 { background: var(--gradient-6); }
.stat-icon { width: 48px; height: 48px; background: rgba(255, 255, 255, 0.2); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; }
.stat-icon svg { width: 24px; height: 24px; color: white; }
.stat-info { display: flex; flex-direction: column; position: relative; z-index: 1; }
.stat-value { font-size: 1.75rem; font-weight: 800; color: white; line-height: 1; }
.stat-label { font-size: 0.8rem; color: rgba(255, 255, 255, 0.8); margin-top: 4px; font-weight: 500; }

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: var(--radius-sm); font-size: 0.875rem; font-weight: 600; font-family: inherit; cursor: pointer; border: none; transition: var(--transition); text-decoration: none; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent-primary); color: white; }
.btn-primary:hover { background: var(--accent-primary-hover); box-shadow: var(--shadow-glow); transform: translateY(-1px); color: white; }
.btn-secondary { background: var(--bg-glass); color: var(--text-secondary); border: 1px solid var(--bg-glass-border); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.08); color: var(--text-primary); }
.btn-danger { background: rgba(239, 68, 68, 0.1); color: var(--accent-danger); border: 1px solid rgba(239, 68, 68, 0.2); }
.btn-danger:hover { background: rgba(239, 68, 68, 0.2); }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-icon { width: 34px; height: 34px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; border: 1px solid var(--bg-glass-border); background: var(--bg-glass); color: var(--text-secondary); cursor: pointer; transition: var(--transition); padding: 0; }
.btn-icon svg { width: 16px; height: 16px; }
.btn-icon:hover { border-color: rgba(255, 255, 255, 0.2); color: var(--text-primary); }

/* ═══════════════════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════════════════ */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 12px 16px; background: var(--bg-primary); border: 1px solid var(--bg-glass-border); border-radius: var(--radius-sm); color: var(--text-primary); font-size: 0.9rem; font-family: inherit; transition: var(--transition); outline: none; }
.form-group select option { background: #1f2937; color: #f1f5f9; }
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-muted); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--accent-primary); box-shadow: 0 0 0 3px var(--accent-primary-glow); }
.form-group textarea { min-height: 100px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-inline { display: flex; gap: 12px; align-items: flex-end; }
.form-inline .form-group { margin-bottom: 0; flex: 1; }

/* ── Login ─────────────────────────────────────────────────────────────── */
.auth-layout { height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.login-container { display: grid; grid-template-columns: 1fr 1fr; width: 100%; min-height: 100vh; }
.login-left { display: flex; align-items: center; justify-content: center; background: var(--gradient-1); position: relative; overflow: hidden; }
.login-artwork { position: relative; z-index: 1; text-align: center; padding: 40px; }
.login-artwork svg { width: 80px; height: 80px; color: white; margin-bottom: 20px; }
.login-artwork h2 { font-size: 2rem; font-weight: 800; color: white; margin-bottom: 8px; }
.login-artwork p { color: rgba(255, 255, 255, 0.8); font-size: 1rem; max-width: 400px; }
.floating-shapes { position: absolute; inset: 0; overflow: hidden; }
.shape { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.08); animation: float 6s ease-in-out infinite; }
.shape-1 { width: 200px; height: 200px; top: 10%; left: -5%; }
.shape-2 { width: 150px; height: 150px; top: 60%; right: -3%; animation-delay: 1.5s; }
.shape-3 { width: 120px; height: 120px; bottom: 10%; left: 20%; animation-delay: 3s; }
.shape-4 { width: 80px; height: 80px; top: 30%; right: 25%; animation-delay: 4.5s; }
@keyframes float { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-20px) scale(1.05); } }
.login-right { display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--bg-primary); }
.login-card { width: 100%; max-width: 420px; }
.login-header { margin-bottom: 32px; }
.login-header h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 8px; }
.login-header p { color: var(--text-secondary); }
.login-form .form-group { margin-bottom: 24px; }
.input-wrapper { position: relative; display: flex; align-items: center; }
.input-wrapper input { width: 100%; padding: 14px 16px 14px 44px; background: var(--bg-glass); border: 1px solid var(--bg-glass-border); border-radius: var(--radius-sm); color: var(--text-primary); font-size: 0.95rem; font-family: inherit; transition: var(--transition); outline: none; }
.input-wrapper input::placeholder { color: var(--text-muted); }
.input-wrapper input:focus { border-color: var(--accent-primary); box-shadow: 0 0 0 3px var(--accent-primary-glow); }
.input-icon { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--text-muted); pointer-events: none; }

/* ═══════════════════════════════════════════════════════════════════════════
   DATA TABLES
   ═══════════════════════════════════════════════════════════════════════════ */
.table-responsive { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; padding: 14px 20px; font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--bg-glass-border); background: var(--bg-glass); }
.data-table td { padding: 14px 20px; font-size: 0.875rem; border-bottom: 1px solid var(--bg-glass-border); color: var(--text-secondary); }
.data-table tbody tr { transition: var(--transition); }
.data-table tbody tr:hover { background: var(--bg-glass); }
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-avatar-sm { width: 32px; height: 32px; background: var(--gradient-1); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.75rem; color: white; flex-shrink: 0; }
.action-cell { display: flex; gap: 8px; }

/* ═══════════════════════════════════════════════════════════════════════════
   PIPELINE KANBAN
   ═══════════════════════════════════════════════════════════════════════════ */
.pipeline-board { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 20px; min-height: 500px; }
.pipeline-column { min-width: 260px; max-width: 280px; flex-shrink: 0; background: var(--bg-card); border: 1px solid var(--bg-glass-border); border-radius: var(--radius-lg); display: flex; flex-direction: column; }
.pipeline-column-header { padding: 16px; border-bottom: 1px solid var(--bg-glass-border); display: flex; align-items: center; justify-content: space-between; }
.pipeline-column-header h3 { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.pipeline-count { background: var(--bg-glass); padding: 2px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; color: var(--text-muted); }
.pipeline-cards { flex: 1; padding: 12px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; min-height: 60px; }
.pipeline-card { background: var(--bg-primary); border: 1px solid var(--bg-glass-border); border-radius: var(--radius-md); padding: 14px; cursor: grab; transition: var(--transition); }
.pipeline-card:hover { border-color: var(--accent-primary); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.pipeline-card.dragging { opacity: 0.5; }
.pipeline-card-name { font-weight: 600; font-size: 0.875rem; margin-bottom: 4px; }
.pipeline-card-name a { color: var(--text-primary); }
.pipeline-card-meta { font-size: 0.75rem; color: var(--text-muted); display: flex; gap: 8px; flex-wrap: wrap; }
.pipeline-column.drag-over { border-color: var(--accent-primary); background: rgba(0, 194, 168, 0.05); }

/* ═══════════════════════════════════════════════════════════════════════════
   LEAD DETAIL TABS
   ═══════════════════════════════════════════════════════════════════════════ */
.detail-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; }
.detail-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 16px; }
.detail-header-info h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 4px; }
.detail-header-info p { color: var(--text-secondary); font-size: 0.9rem; }
.detail-header-actions { display: flex; gap: 12px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--bg-glass-border); margin-bottom: 24px; overflow-x: auto; }
.tab { padding: 12px 20px; font-size: 0.85rem; font-weight: 600; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; transition: var(--transition); white-space: nowrap; background: none; border-top: none; border-left: none; border-right: none; }
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--accent-primary-hover); border-bottom-color: var(--accent-primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Detail Sidebar ───────────────────────────────────────────────────── */
.detail-sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-card { background: var(--bg-card); border: 1px solid var(--bg-glass-border); border-radius: var(--radius-lg); padding: 20px; }
.sidebar-card h3 { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 12px; }
.sidebar-card-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--bg-glass-border); font-size: 0.85rem; }
.sidebar-card-item:last-child { border-bottom: none; }
.sidebar-card-label { color: var(--text-muted); }
.sidebar-card-value { color: var(--text-primary); font-weight: 600; }

/* ── Timeline ─────────────────────────────────────────────────────────── */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item { display: flex; gap: 16px; padding: 16px 0; position: relative; }
.timeline-item::before { content: ''; position: absolute; left: 15px; top: 40px; bottom: 0; width: 2px; background: var(--bg-glass-border); }
.timeline-item:last-child::before { display: none; }
.timeline-dot { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-glass); border: 2px solid var(--bg-glass-border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.timeline-dot svg { width: 14px; height: 14px; color: var(--accent-primary); }
.timeline-content { flex: 1; }
.timeline-title { font-size: 0.875rem; font-weight: 600; margin-bottom: 2px; }
.timeline-desc { font-size: 0.8rem; color: var(--text-secondary); }
.timeline-time { font-size: 0.7rem; color: var(--text-muted); margin-top: 4px; }

/* ── Document Checklist ───────────────────────────────────────────────── */
.checklist { display: flex; flex-direction: column; gap: 8px; }
.checklist-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--bg-primary); border: 1px solid var(--bg-glass-border); border-radius: var(--radius-md); transition: var(--transition); }
.checklist-item:hover { border-color: rgba(255, 255, 255, 0.12); }
.checklist-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.checklist-icon.verified { background: rgba(16, 185, 129, 0.15); color: var(--accent-success); }
.checklist-icon.missing { background: rgba(239, 68, 68, 0.15); color: var(--accent-danger); }
.checklist-icon.received { background: rgba(245, 158, 11, 0.15); color: var(--accent-warning); }
.checklist-icon.waived { background: rgba(100, 116, 139, 0.15); color: var(--text-muted); }
.checklist-icon svg { width: 16px; height: 16px; }
.checklist-info { flex: 1; }
.checklist-name { font-size: 0.875rem; font-weight: 600; }
.checklist-category { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; }
.checklist-actions { display: flex; gap: 8px; align-items: center; }

.progress-bar-container { width: 100%; height: 8px; background: var(--bg-glass); border-radius: 4px; overflow: hidden; margin-top: 12px; }
.progress-bar { height: 100%; background: var(--gradient-1); border-radius: 4px; transition: width 0.5s ease; }
.progress-text { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

/* ── AI Suggestions ───────────────────────────────────────────────────── */
.ai-card { background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1)); border: 1px solid rgba(139, 92, 246, 0.2); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 16px; }
.ai-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ai-card-header svg { width: 20px; height: 20px; color: var(--accent-purple); }
.ai-card-header h4 { font-size: 0.9rem; font-weight: 700; }
.ai-intent { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 0.7rem; font-weight: 700; background: rgba(139, 92, 246, 0.2); color: var(--accent-purple); text-transform: uppercase; margin-bottom: 8px; }
.ai-summary { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 12px; }
.ai-actions { display: flex; flex-direction: column; gap: 8px; }
.ai-action-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--bg-primary); border: 1px solid var(--bg-glass-border); border-radius: var(--radius-sm); font-size: 0.8rem; }

/* ═══════════════════════════════════════════════════════════════════════════
   DASHBOARD ADDITIONS
   ═══════════════════════════════════════════════════════════════════════════ */
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; }
.dashboard-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; margin-top: 24px; }
.welcome-card { background: var(--gradient-1); border-radius: var(--radius-xl); padding: 40px; display: flex; align-items: center; justify-content: space-between; position: relative; overflow: hidden; margin-bottom: 32px; }
.welcome-card::before { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.2); }
.welcome-content { position: relative; z-index: 1; }
.welcome-content h2 { font-size: 1.5rem; font-weight: 700; color: white; margin-bottom: 8px; }
.welcome-content p { color: rgba(255, 255, 255, 0.8); max-width: 500px; }

.activity-list { display: flex; flex-direction: column; gap: 8px; }
.activity-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--bg-glass-border); }
.activity-item:last-child { border-bottom: none; }
.activity-dot { width: 8px; height: 8px; background: var(--accent-primary); border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.activity-info { display: flex; flex-direction: column; }
.activity-title { font-weight: 600; font-size: 0.85rem; }
.activity-meta { font-size: 0.75rem; color: var(--text-muted); }

.empty-state { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:60px 20px; color:var(--text-muted); text-align:center; }
.empty-state svg { width:64px; height:64px; margin-bottom:16px; opacity:0.3; }

/* ── AI WOW STYLES ──────────────────────────────────────────────────────── */
:root {
    --ai-primary: #8b5cf6;
    --ai-secondary: #ec4899;
    --ai-glow: rgba(139, 92, 246, 0.3);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
}

.ai-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.05) 100%);
    border: 1px solid var(--ai-glow);
    position: relative;
    overflow: hidden;
}

.ai-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--ai-glow) 0%, transparent 70%);
    animation: ai-pulse 8s infinite linear;
    pointer-events: none;
    z-index: 0;
}

@keyframes ai-pulse {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-10%, 10%) scale(1.1); }
    100% { transform: translate(0, 0) scale(1); }
}

.ai-badge {
    background: linear-gradient(90deg, var(--ai-primary), var(--ai-secondary));
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px var(--ai-glow);
}

.glass-panel {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

.ai-sidebar {
    position: fixed;
    right: -350px;
    top: 80px;
    bottom: 100px;
    width: 320px;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 20px;
    margin-right: 20px;
}

.ai-sidebar.active {
    right: 0;
}

.ai-loader {
    display: inline-flex;
    gap: 4px;
}

.ai-loader span {
    width: 6px;
    height: 6px;
    background: var(--ai-primary);
    border-radius: 50%;
    animation: ai-bounce 1.4s infinite ease-in-out both;
}

.ai-loader span:nth-child(1) { animation-delay: -0.32s; }
.ai-loader span:nth-child(2) { animation-delay: -0.16s; }

@keyframes ai-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.insight-card {
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--ai-primary);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: transform 0.2s;
}

.insight-card:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.08);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════════════════════════════════ */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 200; align-items: center; justify-content: center; }
.modal-overlay.active { display: flex; }
.modal { background: var(--bg-secondary); border: 1px solid var(--bg-glass-border); border-radius: var(--radius-xl); width: 90%; max-width: 600px; max-height: 80vh; overflow-y: auto; }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--bg-glass-border); display: flex; align-items: center; justify-content: space-between; }
.modal-header h2 { font-size: 1.1rem; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; }
.modal-close svg { width: 20px; height: 20px; }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--bg-glass-border); display: flex; gap: 12px; justify-content: flex-end; }

/* ═══════════════════════════════════════════════════════════════════════════
   FLASH MESSAGES
   ═══════════════════════════════════════════════════════════════════════════ */
.flash-container { padding: 0 32px; margin-top: 16px; }
.auth-flash { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 1000; padding: 0; max-width: 400px; width: 90%; }
.flash { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-radius: var(--radius-sm); margin-bottom: 8px; font-size: 0.875rem; font-weight: 500; cursor: pointer; animation: slideDown 0.3s ease; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.flash-success { background: rgba(16, 185, 129, 0.15); color: var(--accent-success); border: 1px solid rgba(16, 185, 129, 0.3); }
.flash-error { background: rgba(239, 68, 68, 0.15); color: var(--accent-danger); border: 1px solid rgba(239, 68, 68, 0.3); }
.flash-info { background: rgba(59, 130, 246, 0.15); color: var(--accent-info); border: 1px solid rgba(59, 130, 246, 0.3); }

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */
.main-footer, .auth-footer { padding: 24px 32px; border-top: 1px solid var(--bg-glass-border); background: rgba(10, 14, 26, 0.5); display: flex; justify-content: flex-end; align-items: center; width: 100%; }
.auth-footer { position: absolute; bottom: 0; left: 0; right: 0; padding: 20px 32px; background: transparent; border-top: none; }
.footer-copyright { font-size: 0.85rem; color: var(--text-muted); }
.footer-copyright a { color: var(--accent-primary-hover); font-weight: 500; }

/* ═══════════════════════════════════════════════════════════════════════════
   FILTERS BAR
   ═══════════════════════════════════════════════════════════════════════════ */
.filters-bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 24px; }
.filters-bar .form-group { margin-bottom: 0; }
.filters-bar select, .filters-bar input { padding: 8px 14px; font-size: 0.85rem; background: var(--bg-card); border: 1px solid var(--bg-glass-border); border-radius: var(--radius-sm); color: var(--text-primary); }
.search-input { min-width: 250px; }

/* ═══════════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.stat-card { animation: fadeInUp 0.5s ease forwards; }
.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }
.card { animation: fadeInUp 0.5s ease forwards; }

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
    .main-content { margin-left: 0; }
    .menu-toggle { display: flex; }
    .dashboard-grid, .dashboard-grid-3 { grid-template-columns: 1fr; }
    .detail-layout { grid-template-columns: 1fr; }
    .login-container { grid-template-columns: 1fr; }
    .login-left { display: none; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .welcome-card { flex-direction: column; text-align: center; padding: 28px; }
}
@media (max-width: 768px) {
    .content-area { padding: 16px; }
    .top-bar { padding: 0 16px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .pipeline-board { flex-direction: column; }
    .pipeline-column { min-width: 100%; max-width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LIGHT THEME
   ═══════════════════════════════════════════════════════════════════════════ */
[data-theme="light"] {
    --bg-primary: #f0f2f5;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-card-hover: rgba(255, 255, 255, 1);
    --bg-glass: rgba(0, 0, 0, 0.03);
    --bg-glass-border: rgba(0, 0, 0, 0.1);
    --text-primary: #1a1a2e;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
}
[data-theme="light"] .sidebar { background: #ffffff; box-shadow: 2px 0 12px rgba(0,0,0,0.05); }
[data-theme="light"] .top-bar { background: rgba(255,255,255,0.9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
[data-theme="light"] .form-group input, [data-theme="light"] .form-group select, [data-theme="light"] .form-group textarea { background: #f7f8fa; border-color: #e2e8f0; }
[data-theme="light"] .form-group select option { background: #fff; color: #1a1a2e; }
[data-theme="light"] .pipeline-card { background: #f7f8fa; }
[data-theme="light"] .data-table th { background: #f7f8fa; }
[data-theme="light"] .modal { background: #ffffff; }
[data-theme="light"] .checklist-item { background: #f7f8fa; }
[data-theme="light"] .login-right { background: #f0f2f5; }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); }

.theme-toggle { background: none; border: 1px solid var(--bg-glass-border); border-radius: var(--radius-sm); color: var(--text-secondary); cursor: pointer; padding: 8px 10px; display: flex; align-items: center; gap: 6px; font-size: 0.8rem; transition: var(--transition); }
.theme-toggle:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.theme-toggle svg { width: 16px; height: 16px; }

/* ═══════════════════════════════════════════════════════════════════════════
   COLLAPSIBLE SIDEBAR
   ═══════════════════════════════════════════════════════════════════════════ */
.sidebar-collapsed .sidebar { width: 68px; }
.sidebar-collapsed .sidebar .brand-title,
.sidebar-collapsed .sidebar .brand-subtitle,
.sidebar-collapsed .sidebar .menu-label,
.sidebar-collapsed .sidebar .menu-item span,
.sidebar-collapsed .sidebar .user-info,
.sidebar-collapsed .sidebar .logout-btn span { display: none; }
.sidebar-collapsed .sidebar .menu-item { justify-content: center; padding: 12px; }
.sidebar-collapsed .sidebar .sidebar-brand { padding: 20px 14px; justify-content: center; }
.sidebar-collapsed .sidebar .user-card { justify-content: center; padding: 10px; }
.sidebar-collapsed .main-content { margin-left: 68px; }

.sidebar-collapse-btn { background: none; border: 1px solid var(--bg-glass-border); border-radius: var(--radius-sm); color: var(--text-muted); cursor: pointer; padding: 6px; display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.sidebar-collapse-btn:hover { color: var(--text-primary); border-color: rgba(255,255,255,0.15); }
.sidebar-collapse-btn svg { width: 18px; height: 18px; }

/* ═══════════════════════════════════════════════════════════════════════════
   GLOBAL SEARCH OVERLAY (Ctrl+K)
   ═══════════════════════════════════════════════════════════════════════════ */
.search-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 500; align-items: flex-start; justify-content: center; padding-top: 15vh; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.search-overlay.active { display: flex; animation: fadeIn 0.15s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.search-box { width: 90%; max-width: 640px; background: var(--bg-secondary); border: 1px solid var(--bg-glass-border); border-radius: var(--radius-xl); box-shadow: 0 20px 60px rgba(0,0,0,0.5); overflow: hidden; animation: searchSlideDown 0.2s ease; }
@keyframes searchSlideDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
.search-input-bar { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--bg-glass-border); }
.search-input-bar svg { width: 22px; height: 22px; color: var(--text-muted); flex-shrink: 0; }
.search-input-bar input { flex: 1; background: none; border: none; color: var(--text-primary); font-size: 1.1rem; font-family: inherit; outline: none; }
.search-input-bar input::placeholder { color: var(--text-muted); }
.search-input-bar .search-hint { font-size: 0.7rem; color: var(--text-muted); background: var(--bg-glass); padding: 4px 8px; border-radius: 4px; border: 1px solid var(--bg-glass-border); white-space: nowrap; }
.search-results { max-height: 400px; overflow-y: auto; padding: 8px; }
.search-group { padding: 4px 0; }
.search-group-title { font-size: 0.65rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; padding: 8px 12px 4px; }
.search-result-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition); color: var(--text-secondary); text-decoration: none; }
.search-result-item:hover, .search-result-item.focused { background: var(--accent-primary-glow); color: var(--text-primary); }
.search-result-item svg { width: 18px; height: 18px; color: var(--text-muted); flex-shrink: 0; }
.search-result-info { flex: 1; }
.search-result-info .name { font-weight: 600; font-size: 0.875rem; }
.search-result-info .detail { font-size: 0.75rem; color: var(--text-muted); }
.search-empty { padding: 40px 20px; text-align: center; color: var(--text-muted); font-size: 0.9rem; }

/* ═══════════════════════════════════════════════════════════════════════════
   FLOATING ACTION BUTTON (FAB)
   ═══════════════════════════════════════════════════════════════════════════ */
.fab-container { position: fixed; bottom: 32px; right: 32px; z-index: 150; }
.fab-main { width: 56px; height: 56px; border-radius: 50%; background: var(--gradient-1); color: white; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 24px rgba(0, 194, 168, 0.4); transition: var(--transition); }
.fab-main svg { width: 24px; height: 24px; transition: transform 0.3s ease; }
.fab-main:hover { transform: scale(1.08); box-shadow: 0 8px 32px rgba(0, 194, 168, 0.5); }
.fab-main.open svg { transform: rotate(45deg); }
.fab-menu { position: absolute; bottom: 68px; right: 0; display: flex; flex-direction: column; gap: 10px; opacity: 0; visibility: hidden; transform: translateY(10px); transition: var(--transition); }
.fab-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.fab-option { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.fab-option-btn { width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: var(--transition); color: white; }
.fab-option-btn:hover { transform: scale(1.1); }
.fab-option-btn svg { width: 20px; height: 20px; }
.fab-option-label { padding: 6px 12px; background: var(--bg-secondary); border: 1px solid var(--bg-glass-border); border-radius: var(--radius-sm); font-size: 0.8rem; font-weight: 600; color: var(--text-primary); box-shadow: var(--shadow-md); }
.fab-opt-lead { background: var(--accent-primary); }
.fab-opt-task { background: var(--accent-info); }
.fab-opt-note { background: var(--accent-purple); }

/* ═══════════════════════════════════════════════════════════════════════════
   NOTIFICATION BELL
   ═══════════════════════════════════════════════════════════════════════════ */
.notification-bell { position: relative; background: none; border: 1px solid var(--bg-glass-border); border-radius: var(--radius-sm); color: var(--text-secondary); cursor: pointer; padding: 8px 10px; display: flex; align-items: center; transition: var(--transition); }
.notification-bell:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.notification-bell svg { width: 18px; height: 18px; }
.notification-badge { position: absolute; top: -4px; right: -4px; width: 18px; height: 18px; background: var(--accent-danger); border-radius: 50%; font-size: 0.6rem; font-weight: 700; color: white; display: flex; align-items: center; justify-content: center; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.notification-dropdown { position: absolute; top: calc(100% + 8px); right: 0; width: 380px; background: var(--bg-secondary); border: 1px solid var(--bg-glass-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); display: none; max-height: 480px; overflow-y: auto; z-index: 200; }
.notification-dropdown.open { display: block; animation: searchSlideDown 0.2s ease; }
.notification-dropdown-header { padding: 16px 20px; border-bottom: 1px solid var(--bg-glass-border); display: flex; align-items: center; justify-content: space-between; }
.notification-dropdown-header h3 { font-size: 0.9rem; font-weight: 700; }
.notification-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--bg-glass-border); transition: var(--transition); cursor: pointer; text-decoration: none; color: inherit; }
.notification-item:hover { background: var(--bg-glass); }
.notification-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notification-icon svg { width: 16px; height: 16px; }
.notification-icon.danger { background: rgba(239,68,68,0.15); color: var(--accent-danger); }
.notification-icon.warning { background: rgba(245,158,11,0.15); color: var(--accent-warning); }
.notification-icon.info { background: rgba(59,130,246,0.15); color: var(--accent-info); }
.notification-info h4 { font-size: 0.85rem; font-weight: 600; margin-bottom: 2px; }
.notification-info p { font-size: 0.75rem; color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════════════════ */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-radius: var(--radius-md); font-size: 0.875rem; font-weight: 500; box-shadow: var(--shadow-lg); pointer-events: auto; animation: toastSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1); min-width: 320px; max-width: 420px; }
.toast.removing { animation: toastSlideOut 0.3s ease forwards; }
@keyframes toastSlideIn { from { opacity: 0; transform: translateX(60px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastSlideOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(60px); } }
.toast svg { width: 20px; height: 20px; flex-shrink: 0; }
.toast-message { flex: 1; }
.toast-close { background: none; border: none; cursor: pointer; opacity: 0.6; padding: 4px; color: inherit; }
.toast-close:hover { opacity: 1; }
.toast-close svg { width: 16px; height: 16px; }
.toast-success { background: linear-gradient(135deg, rgba(16,185,129,0.95), rgba(5,150,105,0.95)); color: white; border: 1px solid rgba(16,185,129,0.3); }
.toast-error { background: linear-gradient(135deg, rgba(239,68,68,0.95), rgba(220,38,38,0.95)); color: white; border: 1px solid rgba(239,68,68,0.3); }
.toast-info { background: linear-gradient(135deg, rgba(59,130,246,0.95), rgba(37,99,235,0.95)); color: white; border: 1px solid rgba(59,130,246,0.3); }
.toast-warning { background: linear-gradient(135deg, rgba(245,158,11,0.95), rgba(217,119,6,0.95)); color: white; border: 1px solid rgba(245,158,11,0.3); }

/* ═══════════════════════════════════════════════════════════════════════════
   SKELETON LOADING
   ═══════════════════════════════════════════════════════════════════════════ */
.skeleton { background: linear-gradient(90deg, var(--bg-glass) 25%, rgba(255,255,255,0.06) 50%, var(--bg-glass) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.skeleton-text { height: 14px; margin-bottom: 8px; width: 80%; }
.skeleton-text-sm { height: 10px; margin-bottom: 6px; width: 60%; }
.skeleton-card { height: 120px; border-radius: var(--radius-lg); margin-bottom: 16px; }
.skeleton-stat { height: 100px; border-radius: var(--radius-lg); }
.skeleton-avatar { width: 40px; height: 40px; border-radius: 50%; }
.skeleton-row { display: flex; gap: 16px; align-items: center; padding: 16px 0; }

/* ═══════════════════════════════════════════════════════════════════════════
   PAGE TRANSITIONS
   ═══════════════════════════════════════════════════════════════════════════ */
.page-transition { animation: pageFadeIn 0.4s ease; }
@keyframes pageFadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ═══════════════════════════════════════════════════════════════════════════
   CONTEXT MENU
   ═══════════════════════════════════════════════════════════════════════════ */
.context-menu { position: fixed; background: var(--bg-secondary); border: 1px solid var(--bg-glass-border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); z-index: 300; min-width: 200px; padding: 6px; display: none; animation: searchSlideDown 0.15s ease; }
.context-menu.active { display: block; }
.context-menu-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 0.85rem; color: var(--text-secondary); cursor: pointer; transition: var(--transition); border: none; background: none; width: 100%; text-align: left; font-family: inherit; }
.context-menu-item:hover { background: var(--bg-glass); color: var(--text-primary); }
.context-menu-item svg { width: 16px; height: 16px; }
.context-menu-item.danger { color: var(--accent-danger); }
.context-menu-divider { height: 1px; background: var(--bg-glass-border); margin: 4px 0; }

/* ═══════════════════════════════════════════════════════════════════════════
   INLINE EDITING
   ═══════════════════════════════════════════════════════════════════════════ */
.inline-editable { cursor: text; padding: 2px 6px; border-radius: 4px; border: 1px solid transparent; transition: var(--transition); }
.inline-editable:hover { border-color: var(--bg-glass-border); background: var(--bg-glass); }
.inline-editable.editing { border-color: var(--accent-primary); box-shadow: 0 0 0 3px var(--accent-primary-glow); background: var(--bg-primary); outline: none; }
.inline-edit-input { background: var(--bg-primary); border: 1px solid var(--accent-primary); border-radius: 4px; color: var(--text-primary); font-size: inherit; font-family: inherit; padding: 2px 6px; box-shadow: 0 0 0 3px var(--accent-primary-glow); outline: none; width: 100%; }

/* ═══════════════════════════════════════════════════════════════════════════
   LEAD SCORE BADGE
   ═══════════════════════════════════════════════════════════════════════════ */
.lead-score { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 20px; font-size: 0.7rem; font-weight: 700; }
.lead-score-hot { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.lead-score-warm { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.lead-score-cold { background: rgba(100, 116, 139, 0.15); color: #94a3b8; }
.score-dot { width: 8px; height: 8px; border-radius: 50%; }
.score-dot-hot { background: #ef4444; }
.score-dot-warm { background: #f59e0b; }
.score-dot-cold { background: #94a3b8; }

/* ═══════════════════════════════════════════════════════════════════════════
   ACTIVITY FEED PANEL (Right Side)
   ═══════════════════════════════════════════════════════════════════════════ */
.activity-panel { position: fixed; top: 0; right: -380px; width: 380px; height: 100vh; background: var(--bg-secondary); border-left: 1px solid var(--bg-glass-border); z-index: 150; transition: right 0.3s ease; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.activity-panel.open { right: 0; }
.activity-panel-header { padding: 20px; border-bottom: 1px solid var(--bg-glass-border); display: flex; align-items: center; justify-content: space-between; }
.activity-panel-header h3 { font-size: 1rem; font-weight: 700; }
.activity-panel-body { flex: 1; overflow-y: auto; padding: 16px; }
.activity-panel-close { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; }
.activity-panel-close svg { width: 20px; height: 20px; }
.feed-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--bg-glass-border); }
.feed-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent-primary); margin-top: 4px; flex-shrink: 0; }
.feed-info { flex: 1; }
.feed-title { font-size: 0.85rem; font-weight: 600; margin-bottom: 2px; }
.feed-desc { font-size: 0.8rem; color: var(--text-secondary); }
.feed-meta { font-size: 0.7rem; color: var(--text-muted); margin-top: 4px; }

.activity-toggle-btn { background: none; border: 1px solid var(--bg-glass-border); border-radius: var(--radius-sm); color: var(--text-secondary); cursor: pointer; padding: 8px 10px; display: flex; align-items: center; transition: var(--transition); }
.activity-toggle-btn:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.activity-toggle-btn svg { width: 18px; height: 18px; }

/* ═══════════════════════════════════════════════════════════════════════════
   BULK ACTIONS BAR
   ═══════════════════════════════════════════════════════════════════════════ */
.bulk-bar { display: none; align-items: center; gap: 12px; padding: 12px 20px; background: linear-gradient(135deg, rgba(0,194,168,0.1), rgba(59,130,246,0.1)); border: 1px solid var(--accent-primary); border-radius: var(--radius-md); margin-bottom: 16px; animation: fadeInUp 0.3s ease; }
.bulk-bar.active { display: flex; }
.bulk-bar .bulk-count { font-weight: 700; font-size: 0.85rem; color: var(--accent-primary-hover); }
.bulk-bar .bulk-actions { display: flex; gap: 8px; flex: 1; flex-wrap: wrap; }

/* ═══════════════════════════════════════════════════════════════════════════
   EMAIL PREVIEW PANE (Split View)
   ═══════════════════════════════════════════════════════════════════════════ */
.email-split { display: grid; grid-template-columns: 1fr 1fr; gap: 0; height: 500px; border: 1px solid var(--bg-glass-border); border-radius: var(--radius-lg); overflow: hidden; }
.email-list-pane { overflow-y: auto; border-right: 1px solid var(--bg-glass-border); }
.email-list-item { padding: 16px 20px; border-bottom: 1px solid var(--bg-glass-border); cursor: pointer; transition: var(--transition); }
.email-list-item:hover { background: var(--bg-glass); }
.email-list-item.selected { background: var(--accent-primary-glow); border-left: 3px solid var(--accent-primary); }
.email-list-item h4 { font-size: 0.85rem; font-weight: 600; margin-bottom: 4px; }
.email-list-item p { font-size: 0.75rem; color: var(--text-muted); line-height: 1.4; }
.email-preview-pane { overflow-y: auto; padding: 24px; background: var(--bg-primary); }
.email-preview-pane h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.email-preview-pane .meta { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 16px; }
.email-preview-pane .body { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; }

/* ═══════════════════════════════════════════════════════════════════════════
   DASHBOARD CHART CONTAINERS
   ═══════════════════════════════════════════════════════════════════════════ */
.chart-container { position: relative; height: 250px; padding: 16px; }
.chart-container canvas { width: 100% !important; height: 100% !important; }

/* ── Draggable Dashboard Widgets ──────────────────────────────────────── */
.widget-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; }
.widget { transition: var(--transition); }
.widget.dragging { opacity: 0.5; transform: scale(0.97); }
.widget-drag-handle { cursor: grab; display: flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 0.75rem; }
.widget-drag-handle:active { cursor: grabbing; }
.widget-drag-handle svg { width: 14px; height: 14px; }
.widget.drag-over { outline: 2px dashed var(--accent-primary); outline-offset: 4px; }

/* ── My Day Section ───────────────────────────────────────────────────── */
.my-day-section { margin-bottom: 32px; }
.my-day-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; margin-top: 16px; }
.my-day-card { background: var(--bg-card); border: 1px solid var(--bg-glass-border); border-radius: var(--radius-lg); overflow: hidden; }
.my-day-card-header { padding: 16px 20px; border-bottom: 1px solid var(--bg-glass-border); display: flex; align-items: center; gap: 10px; }
.my-day-card-header svg { width: 18px; height: 18px; color: var(--accent-primary); }
.my-day-card-header h3 { font-size: 0.85rem; font-weight: 700; }
.my-day-card-body { padding: 12px 16px; max-height: 250px; overflow-y: auto; }
.my-day-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--bg-glass-border); font-size: 0.8rem; }
.my-day-item:last-child { border-bottom: none; }

/* ── SEQUENCE BUILDER UI ───────────────────────────────────────────── */
.sequence-builder {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 15px 0;
    position: relative;
    padding-left: 10px;
}
.step-card {
    background: var(--bg-lighter);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
    transition: transform 0.2s;
}
.step-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.1);
}
.step-connector {
    width: 2px;
    height: 15px;
    background: var(--accent-purple);
    margin-left: 20px;
    position: relative;
    z-index: 1;
    opacity: 0.5;
}
.step-delay {
    font-size: 0.8rem;
    color: var(--accent-primary);
    font-weight: 600;
    min-width: 60px;
}
.step-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-grow: 1;
}
.step-channel {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-purple);
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
}
.step-action {
    font-size: 0.9rem;
    color: var(--text-primary);
}
.stat-pill {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 12px;
}
.stat-pill .val { font-weight: 700; }

/* ═══════════════════════════════════════════════════════════════════════════
   DOCUMENT CENTER OVERHAUL
   ═══════════════════════════════════════════════════════════════════════════ */
.doc-lead-table tr { cursor: pointer; border-left: 3px solid transparent; }
.doc-lead-table tr:hover { border-left-color: var(--accent-primary); }
.doc-lead-table .progress-mini { width: 100px; display: inline-block; margin-right: 10px; }
.doc-lead-table .progress-text { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; }

/* Modal Core Styles */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; z-index: 1000; opacity: 0; visibility: hidden; transition: all 0.3s ease; backdrop-filter: blur(4px); }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal { background: var(--bg-secondary); border: 1px solid var(--bg-glass-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xl); width: 100%; animation: modalSlideIn 0.3s ease; }
@keyframes modalSlideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header { padding: 20px; border-bottom: 1px solid var(--bg-glass-border); display: flex; align-items: center; justify-content: space-between; }
.modal-header h2 { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; transition: var(--transition); }
.modal-close:hover { color: var(--accent-danger); transform: rotate(90deg); }
.modal-close svg { width: 24px; height: 24px; }
.modal-body { padding: 24px; }

.doc-detail-modal .modal-body { padding: 0; }
.doc-list-container { max-height: 500px; overflow-y: auto; padding: 20px; }
.doc-item-row { display: flex; align-items: center; justify-content: space-between; padding: 12px; background: var(--bg-glass); border: 1px solid var(--bg-glass-border); border-radius: var(--radius-md); margin-bottom: 10px; transition: var(--transition); }
.doc-item-row:hover { border-color: rgba(255, 255, 255, 0.15); background: rgba(255, 255, 255, 0.05); }
.doc-item-main { flex: 1; }
.doc-item-name { font-weight: 600; font-size: 0.9rem; display: block; }
.doc-item-meta { font-size: 0.75rem; color: var(--text-muted); display: flex; gap: 12px; align-items: center; }
.doc-item-status { font-weight: 700; text-transform: uppercase; font-size: 0.65rem; }

.doc-item-actions { display: flex; gap: 8px; align-items: center; }
.doc-item-badge { padding: 2px 8px; border-radius: 4px; font-size: 0.65rem; font-weight: 700; }

.rejection-form { margin-top: 10px; padding: 12px; background: rgba(239, 68, 68, 0.1); border-radius: var(--radius-sm); border: 1px solid rgba(239, 68, 68, 0.2); display: none; }
.rejection-form.active { display: block; }

.doc-preview-modal { max-width: 900px; width: 95%; }
.doc-preview-content { height: 600px; display: flex; align-items: center; justify-content: center; background: #000; border-radius: var(--radius-md); overflow: hidden; }
.doc-preview-content iframe, .doc-preview-content img { width: 100%; height: 100%; object-fit: contain; border: none; }

.doc-status-missing { color: var(--text-muted); }
.doc-status-received { color: var(--accent-warning); }
.doc-status-verified { color: var(--accent-success); }
.doc-status-rejected { color: var(--accent-danger); }

.doc-progress-wrap { display: flex; align-items: center; gap: 10px; }
.doc-count-pill { font-size: 0.65rem; padding: 2px 6px; border-radius: 10px; font-weight: 700; background: var(--bg-glass); color: var(--text-muted); }
.doc-count-pill.pending { background: rgba(245, 158, 11, 0.2); color: var(--accent-warning); }
.doc-count-pill.rejected { background: rgba(239, 68, 68, 0.2); color: var(--accent-danger); }
