/* ══════════════════════════════════════════════════════════════════
   Sell.ly CRM — Design System
   Apple-style Dark Mode Glassmorphism — SVG Icons, no emoji.
   ══════════════════════════════════════════════════════════════════ */

/* ── Design Tokens ─────────────────────────────────────────────── */
:root {
    /* Surface — deep dark with subtle blue undertone */
    --bg-primary: #060a14;
    --bg-secondary: #0c1222;
    --bg-card: rgba(12, 18, 34, 0.75);
    --bg-hover: rgba(30, 41, 64, 0.5);
    --bg-input: rgba(12, 18, 34, 0.5);
    --bg-elevated: rgba(18, 26, 48, 0.9);

    /* Glass — multi-layer Apple depth */
    --glass-bg: rgba(12, 18, 34, 0.45);
    --glass-bg-solid: rgba(12, 18, 34, 0.85);
    --glass-border: rgba(148, 163, 184, 0.07);
    --glass-border-hover: rgba(99, 102, 241, 0.35);
    --glass-border-subtle: rgba(148, 163, 184, 0.04);
    --glass-blur: 28px;
    --glass-shine: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 50%);

    /* Text */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-accent: #a5b4fc;

    /* Brand — refined indigo palette */
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-soft: rgba(99, 102, 241, 0.12);
    --accent-glow: rgba(99, 102, 241, 0.2);
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);

    /* Status */
    --success: #34d399;
    --danger: #f87171;
    --warning: #fbbf24;
    --info: #60a5fa;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;

    /* Shadows — richer depth */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4), 0 0 1px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.45), 0 0 1px rgba(0,0,0,0.2);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.55), 0 0 1px rgba(0,0,0,0.2);
    --shadow-glow: 0 0 24px var(--accent-glow), 0 0 48px rgba(99,102,241,0.08);
    --shadow-inner-glow: inset 0 1px 0 rgba(255,255,255,0.03);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Font */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Ambient background orbs — subtle depth and life */
body::before, body::after {
    content: ''; position: fixed; z-index: -1;
    border-radius: 50%; pointer-events: none;
    filter: blur(120px); opacity: 0.4;
}
body::before {
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.12), transparent 70%);
    top: -10%; left: -5%;
    animation: orbFloat 25s ease-in-out infinite;
}
body::after {
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.08), transparent 70%);
    bottom: -10%; right: -5%;
    animation: orbFloat 30s ease-in-out infinite reverse;
}
@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ── Typography ────────────────────────────────────────────────── */
h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.2; }
h2 { font-size: 1.375rem; font-weight: 600; letter-spacing: -0.02em; }
h3 { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; }

.page-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: var(--space-xl); padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--glass-border);
}
.page-title { color: var(--text-primary); }
.page-subtitle { color: var(--text-secondary); font-size: 0.875rem; margin-top: var(--space-xs); }

/* ── App Layout ────────────────────────────────────────────────── */
.app-layout {
    display: flex; min-height: 100vh;
}
.app-main {
    flex: 1; padding: var(--space-xl); overflow-y: auto;
    margin-left: 240px;
}

/* ── Sidebar ───────────────────────────────────────────────────── */
.sidebar {
    width: 240px; height: 100vh; position: fixed; left: 0; top: 0;
    background: var(--glass-bg-solid);
    backdrop-filter: blur(40px) saturate(1.2);
    -webkit-backdrop-filter: blur(40px) saturate(1.2);
    border-right: 1px solid var(--glass-border);
    display: flex; flex-direction: column; z-index: 100;
    box-shadow: var(--shadow-inner-glow);
}
.sidebar-brand {
    display: flex; align-items: center; gap: var(--space-md);
    padding: var(--space-lg); border-bottom: 1px solid var(--glass-border);
}
.brand-icon {
    color: var(--accent); display: flex; align-items: center;
    filter: drop-shadow(0 0 6px var(--accent-glow));
}
.brand-icon svg { width: 24px; height: 24px; }
.brand-text {
    font-size: 1.25rem; font-weight: 700; color: var(--text-primary);
    letter-spacing: -0.03em;
    background: var(--accent-gradient); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text;
}
.sidebar-nav { flex: 1; padding: var(--space-md) var(--space-sm); }
.sidebar-footer { padding: var(--space-md) var(--space-sm); border-top: 1px solid var(--glass-border); }

.nav-item {
    display: flex; align-items: center; gap: var(--space-md);
    padding: 10px var(--space-md); margin-bottom: 2px;
    border-radius: var(--radius-sm); position: relative;
    color: var(--text-secondary); text-decoration: none;
    transition: all var(--transition-fast); cursor: pointer;
    border: none; background: none; width: 100%; font-size: 0.875rem;
    font-family: var(--font-sans);
}
.nav-item:hover {
    background: var(--bg-hover); color: var(--text-primary);
}
.nav-item.active {
    background: var(--accent-soft); color: var(--accent-hover);
}
.nav-item.active::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 20px; border-radius: 0 3px 3px 0;
    background: var(--accent-gradient);
    box-shadow: 0 0 8px var(--accent-glow);
}
.nav-icon {
    width: 20px; height: 20px; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; color: inherit; opacity: 0.65;
    transition: opacity var(--transition-fast);
}
.nav-icon svg { width: 18px; height: 18px; }
.nav-item:hover .nav-icon { opacity: 1; }
.nav-item.active .nav-icon { opacity: 1; }

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-sm); border: 1px solid transparent;
    font-family: var(--font-sans); font-size: 0.875rem; font-weight: 500;
    cursor: pointer; transition: all var(--transition-fast);
    white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-full { width: 100%; }

.btn-primary {
    background: var(--accent); color: white; border-color: var(--accent);
}
.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover); box-shadow: var(--shadow-glow);
}
.btn-secondary {
    background: transparent; color: var(--text-primary);
    border-color: var(--glass-border);
}
.btn-secondary:hover:not(:disabled) {
    background: var(--bg-hover); border-color: var(--accent);
}
.btn-danger {
    background: var(--danger); color: white; border-color: var(--danger);
}
.btn-ghost {
    background: transparent; color: var(--text-secondary); border: none;
}
.btn-ghost:hover:not(:disabled) { color: var(--text-primary); }

.spinner {
    width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white; border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Form ──────────────────────────────────────────────────────── */
.form-group { margin-bottom: var(--space-md); }
.form-label {
    display: block; font-size: 0.8125rem; font-weight: 500;
    color: var(--text-secondary); margin-bottom: var(--space-xs);
}
.input {
    width: 100%; padding: var(--space-sm) var(--space-md);
    background: var(--bg-input); border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm); color: var(--text-primary);
    font-family: var(--font-sans); font-size: 0.875rem;
    transition: border-color var(--transition-fast);
    outline: none;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.input-error { border-color: var(--danger); }
.form-error { font-size: 0.75rem; color: var(--danger); margin-top: var(--space-xs); }

/* ── Cards ─────────────────────────────────────────────────────── */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(1.15);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.15);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm), var(--shadow-inner-glow);
    transition: all var(--transition-normal);
}
.card:hover {
    border-color: var(--glass-border-hover);
    box-shadow: var(--shadow-md), var(--shadow-inner-glow);
}
.card-header {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--glass-border);
}
.card-title { font-size: 0.9375rem; font-weight: 600; }
.card-body { padding: var(--space-lg); }

/* ── Stat Cards ────────────────────────────────────────────────── */
.kpi-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-md); margin-bottom: var(--space-xl);
}
.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(1.15);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.15);
    border: 1px solid var(--glass-border); border-radius: var(--radius-md);
    padding: var(--space-lg); display: flex; align-items: center; gap: var(--space-md);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm), var(--shadow-inner-glow);
    position: relative; overflow: hidden;
    animation: cardEnter 0.5s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}
.stat-card::before {
    content: ''; position: absolute; inset: 0;
    background: var(--glass-shine); pointer-events: none;
}
.stat-card:nth-child(1) { animation-delay: 0ms; }
.stat-card:nth-child(2) { animation-delay: 80ms; }
.stat-card:nth-child(3) { animation-delay: 160ms; }
.stat-card:nth-child(4) { animation-delay: 240ms; }
.stat-card:hover {
    border-color: var(--glass-border-hover);
    box-shadow: var(--shadow-glow), var(--shadow-md);
    transform: translateY(-3px);
}
.stat-icon {
    width: 48px; height: 48px; border-radius: var(--radius-md);
    background: var(--accent-gradient);
    display: flex; align-items: center; justify-content: center;
    color: white; flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}
.stat-icon svg { width: 22px; height: 22px; }
.stat-content { flex: 1; }
.stat-value {
    font-size: 1.625rem; font-weight: 700; display: block;
    letter-spacing: -0.02em; line-height: 1.2;
}
.stat-label { font-size: 0.8125rem; color: var(--text-secondary); margin-top: 2px; }
.stat-change { font-size: 0.75rem; font-weight: 600; padding: 2px 8px; border-radius: var(--radius-full); }
.stat-change.positive { background: rgba(52, 211, 153, 0.15); color: var(--success); }
.stat-change.negative { background: rgba(248, 113, 113, 0.15); color: var(--danger); }

/* ── Dashboard Grid ────────────────────────────────────────────── */
.dashboard-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--space-md);
}

/* ── Activities ────────────────────────────────────────────────── */
.activity-list { display: flex; flex-direction: column; gap: var(--space-sm); }
.activity-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: var(--space-sm) 0; border-bottom: 1px solid rgba(99, 102, 241, 0.08);
}
.activity-item:last-child { border-bottom: none; }
.activity-action { font-size: 0.875rem; display: block; }
.activity-detail { font-size: 0.8125rem; color: var(--text-muted); }
.activity-time { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }

/* ── Table ─────────────────────────────────────────────────────── */
.table-container {
    background: var(--glass-bg); backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border); border-radius: var(--radius-md);
    overflow: hidden;
}
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead { background: rgba(15, 23, 42, 0.5); }
.data-table th {
    padding: var(--space-md) var(--space-lg); text-align: left;
    font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--text-muted);
    border-bottom: 1px solid var(--glass-border);
}
.data-table td {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid rgba(99, 102, 241, 0.06);
    font-size: 0.875rem;
}
.table-row { transition: background var(--transition-fast); }
.table-row:hover { background: var(--bg-hover); }
.table-row.clickable { cursor: pointer; }

.cell-name { display: flex; align-items: center; gap: var(--space-md); font-weight: 500; }
.contact-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--accent-gradient); color: white;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.75rem; letter-spacing: -0.02em;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

/* ── Status Badges ─────────────────────────────────────────────── */
.status-badge {
    font-size: 0.75rem; font-weight: 600; padding: 2px 10px;
    border-radius: var(--radius-full);
}
.status-lead { background: rgba(59, 130, 246, 0.15); color: var(--info); }
.status-qualified { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.status-customer { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.status-churned { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.status-archived { background: rgba(100, 116, 139, 0.15); color: var(--text-muted); }

/* ── Modal ─────────────────────────────────────────────────────── */
.modal-backdrop {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn 0.2s ease;
}
.modal {
    background: var(--bg-secondary); border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg); width: 90%; max-width: 500px;
    box-shadow: var(--shadow-lg); animation: slideUp 0.25s ease;
}
.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: var(--space-lg); border-bottom: 1px solid var(--glass-border);
}
.modal-title { font-size: 1.125rem; font-weight: 600; }
.modal-close {
    background: none; border: none; color: var(--text-muted);
    font-size: 1.25rem; cursor: pointer; padding: var(--space-xs);
    transition: color var(--transition-fast);
}
.modal-close:hover { color: var(--text-primary); }
.modal-body { padding: var(--space-lg); }
.modal-form { display: flex; flex-direction: column; gap: var(--space-sm); }
.modal-actions {
    display: flex; justify-content: flex-end; gap: var(--space-sm);
    margin-top: var(--space-md); padding-top: var(--space-md);
    border-top: 1px solid var(--glass-border);
}

/* ── Login ─────────────────────────────────────────────────────── */
.login-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(ellipse at 50% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
}
.login-card {
    background: var(--glass-bg); backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border); border-radius: var(--radius-lg);
    padding: var(--space-2xl); width: 100%; max-width: 400px;
    box-shadow: var(--shadow-lg);
}
.login-brand { text-align: center; margin-bottom: var(--space-xl); }
.brand-icon-large { font-size: 3rem; color: var(--accent); display: block; margin-bottom: var(--space-sm); }
.login-brand h1 { font-size: 2rem; letter-spacing: -0.03em; }
.login-subtitle { color: var(--text-muted); font-size: 0.875rem; }
.login-form { display: flex; flex-direction: column; gap: var(--space-sm); }
.login-error {
    background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger); padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm); font-size: 0.8125rem;
}

/* ── Skeleton Loading ──────────────────────────────────────────── */
.skeleton {
    position: relative; overflow: hidden;
}
.skeleton::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(99,102,241,0.05), transparent);
    animation: shimmer 1.5s infinite;
}
.skeleton-icon {
    width: 40px; height: 40px; border-radius: var(--radius-sm);
    background: rgba(99, 102, 241, 0.1);
}
.skeleton-content { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.skeleton-line {
    height: 14px; border-radius: 4px;
    background: rgba(99, 102, 241, 0.1);
}
.skeleton-line.wide { width: 70%; }
.skeleton-line.narrow { width: 40%; }

@keyframes shimmer { to { transform: translateX(100%); } }

/* ── Utilities ─────────────────────────────────────────────────── */
.text-danger { color: var(--danger); }
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Header Actions ────────────────────────────────────────────── */
.header-actions { display: flex; align-items: center; gap: var(--space-md); }

/* ── View Toggle ───────────────────────────────────────────────── */
.view-toggle {
    display: flex; background: var(--bg-input);
    border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
    overflow: hidden;
}
.toggle-btn {
    padding: 6px 12px; background: none; border: none;
    color: var(--text-muted); cursor: pointer; font-size: 1rem;
    transition: all var(--transition-fast);
}
.toggle-btn.active {
    background: var(--accent); color: white;
}
.toggle-btn:hover:not(.active) { color: var(--text-primary); }

/* ── Contact Grid ──────────────────────────────────────────────── */
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
    animation: fadeIn 0.3s ease;
}

/* ── Contact Card ──────────────────────────────────────────────── */
.contact-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    transition: all var(--transition-normal);
    cursor: pointer;
}
.contact-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.contact-card-header {
    display: flex; align-items: center; gap: var(--space-md);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--glass-border);
}
.contact-card-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #a855f7);
    color: white; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.8125rem; flex-shrink: 0;
}
.contact-card-meta { flex: 1; min-width: 0; }
.contact-card-name {
    display: block; font-weight: 600; font-size: 0.9375rem;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.contact-card-nr {
    font-size: 0.75rem; color: var(--text-muted); font-family: var(--font-mono);
}

.contact-card-body {
    display: flex; flex-direction: column; gap: 6px;
}
.contact-card-row {
    display: flex; align-items: center; gap: var(--space-sm);
    font-size: 0.8125rem; color: var(--text-secondary);
}
.card-icon {
    width: 20px; height: 20px; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; color: var(--text-muted);
}
.card-icon svg { width: 16px; height: 16px; }

/* ── Status Dots ───────────────────────────────────────────────── */
.status-dot {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.status-dot.status-lead { background: var(--info); }
.status-dot.status-qualified { background: var(--warning); }
.status-dot.status-customer { background: var(--success); }
.status-dot.status-churned { background: var(--danger); }
.status-dot.status-archived { background: var(--text-muted); }

/* ── Table Number Column ───────────────────────────────────────── */
.cell-number {
    font-family: var(--font-mono); font-size: 0.8125rem;
    color: var(--text-muted);
}

/* ── Form Row (side by side) ───────────────────────────────────── */
.form-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md);
}

/* ── Empty State ───────────────────────────────────────────────── */
.empty-state {
    text-align: center; padding: var(--space-2xl);
    color: var(--text-muted);
}
.empty-icon {
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto var(--space-md);
    color: var(--text-muted);
}
.empty-icon svg { width: 48px; height: 48px; }
.empty-state h3 { color: var(--text-secondary); margin-bottom: var(--space-xs); }
.empty-state p { font-size: 0.875rem; }

/* ── Contact Card Link ─────────────────────────────────────────── */
.contact-card-link { text-decoration: none; color: inherit; display: block; }

/* ── Profile Header ────────────────────────────────────────────── */
.profile-header {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--glass-border);
}
.back-link {
    display: inline-flex; align-items: center; gap: var(--space-sm);
    color: var(--text-muted); text-decoration: none;
    font-size: 0.8125rem; margin-bottom: var(--space-md);
    transition: color var(--transition-fast);
}
.back-link:hover { color: var(--accent); }
.back-icon { display: flex; align-items: center; }
.back-icon svg { width: 16px; height: 16px; }

.profile-header-info {
    display: flex; align-items: center; gap: var(--space-md);
}
.profile-name {
    font-size: 1.5rem; font-weight: 700;
}
.profile-nr {
    font-family: var(--font-mono); font-size: 0.875rem;
    color: var(--text-muted);
}

/* ── Profile Layout ────────────────────────────────────────────── */
.profile-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: var(--space-lg);
    align-items: start;
}
@media (max-width: 900px) {
    .profile-layout { grid-template-columns: 1fr; }
}

/* ── Profile Sidebar ───────────────────────────────────────────── */
.profile-sidebar {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    position: sticky; top: var(--space-lg);
}

.profile-avatar-section {
    text-align: center;
    padding-bottom: var(--space-lg);
    margin-bottom: var(--space-lg);
    border-bottom: 1px solid var(--glass-border);
}
.profile-avatar {
    width: 72px; height: 72px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #a855f7);
    color: white; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1.5rem; margin: 0 auto var(--space-md);
}
.profile-sidebar-name {
    font-size: 1.125rem; font-weight: 600; margin-bottom: var(--space-xs);
}

/* ── Profile Sections ──────────────────────────────────────────── */
.profile-section {
    margin-bottom: var(--space-lg);
}
.profile-section:last-child { margin-bottom: 0; }

.profile-section-title {
    font-size: 0.6875rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--text-muted);
    margin-bottom: var(--space-md);
}

/* ── Detail Rows ───────────────────────────────────────────────── */
.detail-row {
    display: flex; align-items: flex-start; gap: var(--space-md);
    padding: var(--space-sm) 0;
}
.detail-icon {
    width: 18px; height: 18px; display: flex; align-items: center;
    justify-content: center; color: var(--text-muted); flex-shrink: 0;
    margin-top: 2px;
}
.detail-icon svg { width: 16px; height: 16px; }
.detail-content { flex: 1; min-width: 0; }
.detail-label {
    display: block; font-size: 0.6875rem; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.05em;
}
.detail-value {
    display: block; font-size: 0.875rem; word-break: break-word;
}

/* ── Tags ──────────────────────────────────────────────────────── */
.tags-list { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.tag {
    padding: 2px 10px; border-radius: var(--radius-full);
    background: rgba(99, 102, 241, 0.12); color: var(--accent);
    font-size: 0.75rem; font-weight: 500;
}

/* ── Profile Actions ───────────────────────────────────────────── */
.profile-actions {
    display: flex; flex-direction: column; gap: var(--space-sm);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--glass-border);
}
.btn-danger-ghost {
    display: flex; align-items: center; justify-content: center; gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: none; border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-sm);
    color: var(--danger); cursor: pointer; font-family: var(--font-sans);
    font-size: 0.875rem; transition: all var(--transition-fast);
}
.btn-danger-ghost svg { width: 16px; height: 16px; }
.btn-danger-ghost:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
}

/* ── Glass Panel (right side) ──────────────────────────────────── */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
}

.section-header {
    display: flex; align-items: center; gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}
.section-icon {
    width: 20px; height: 20px; display: flex; align-items: center;
    color: var(--accent);
}
.section-icon svg { width: 18px; height: 18px; }
.section-header h3 { flex: 1; font-size: 1rem; font-weight: 600; }
.section-count {
    background: rgba(99, 102, 241, 0.12); color: var(--accent);
    padding: 2px 8px; border-radius: var(--radius-full);
    font-size: 0.75rem; font-weight: 600;
}
.section-empty {
    color: var(--text-muted); font-size: 0.875rem;
    text-align: center; padding: var(--space-lg) 0;
}

/* ── Deal Cards ────────────────────────────────────────────────── */
.deals-list { display: flex; flex-direction: column; gap: var(--space-sm); }
.deal-card {
    display: flex; align-items: center; justify-content: space-between;
    padding: var(--space-md);
    border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}
.deal-card:hover {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.04);
}
.deal-info { flex: 1; min-width: 0; }
.deal-title { display: block; font-weight: 500; font-size: 0.875rem; }
.deal-value { font-size: 0.8125rem; color: var(--text-muted); font-family: var(--font-mono); }
.deal-stage {
    padding: 3px 10px; border-radius: var(--radius-full);
    font-size: 0.75rem; font-weight: 500; white-space: nowrap;
}

/* ── Activity Timeline ─────────────────────────────────────────── */
.timeline { display: flex; flex-direction: column; }
.timeline-item {
    display: flex; gap: var(--space-md);
    padding: var(--space-md) 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.06);
}
.timeline-item:last-child { border-bottom: none; }
.timeline-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent); flex-shrink: 0;
    margin-top: 6px;
}
.timeline-content { flex: 1; min-width: 0; }
.timeline-action {
    display: block; font-size: 0.875rem; font-weight: 500;
    text-transform: capitalize;
}
.timeline-detail {
    display: block; font-size: 0.8125rem; color: var(--text-secondary);
    margin-top: 2px;
}
.timeline-meta {
    display: block; font-size: 0.75rem; color: var(--text-muted);
    margin-top: 4px;
}

/* ── Tasks ──────────────────────────────────────────────────── */
.task-filters {
    display: flex; gap: var(--space-sm); margin-bottom: var(--space-lg);
}
.filter-btn {
    padding: 6px 16px; border-radius: var(--radius-full);
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    color: var(--text-secondary); cursor: pointer; font-size: 0.8125rem;
    transition: all var(--transition-fast);
}
.filter-btn:hover { border-color: rgba(99, 102, 241, 0.3); }
.filter-btn.active {
    background: rgba(99, 102, 241, 0.15); border-color: var(--accent);
    color: var(--accent); font-weight: 600;
}
.task-list { display: flex; flex-direction: column; gap: var(--space-sm); }
.task-item {
    display: flex; align-items: center; gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
}
.task-check {
    width: 22px; height: 22px; border-radius: 6px;
    border: 2px solid var(--glass-border); display: flex;
    align-items: center; justify-content: center;
    font-size: 0.75rem; flex-shrink: 0; cursor: pointer;
    transition: all var(--transition-fast);
}
.task-check.completed {
    background: rgba(34, 197, 94, 0.2); border-color: #22c55e; color: #22c55e;
}
.task-body { flex: 1; min-width: 0; }
.task-title { display: block; font-weight: 500; margin-bottom: 2px; }
.task-meta { display: block; font-size: 0.75rem; color: var(--text-muted); }
.priority-badge {
    padding: 2px 10px; border-radius: var(--radius-full);
    font-size: 0.6875rem; font-weight: 600; text-transform: uppercase;
}
.priority-low { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }
.priority-medium { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.priority-high { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.priority-urgent { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

/* ── Notes ──────────────────────────────────────────────────── */
.notes-list { display: flex; flex-direction: column; gap: var(--space-sm); }
.note-card {
    padding: var(--space-md);
    border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
    position: relative;
    transition: all var(--transition-fast);
}
.note-card:hover { border-color: rgba(99, 102, 241, 0.3); }
.note-pin {
    position: absolute; top: 8px; right: 8px;
    background: rgba(99, 102, 241, 0.15); color: var(--accent);
    padding: 1px 8px; border-radius: var(--radius-full);
    font-size: 0.6875rem; font-weight: 600; text-transform: uppercase;
}
.note-content {
    font-size: 0.875rem; line-height: 1.5;
    white-space: pre-wrap; margin: 0 0 var(--space-sm);
}
.note-meta {
    font-size: 0.75rem; color: var(--text-muted);
}

/* ── Animations ────────────────────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes cardEnter {
    from { transform: translateY(12px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 8px var(--accent-glow); }
    50% { box-shadow: 0 0 20px var(--accent-glow), 0 0 40px rgba(99,102,241,0.06); }
}

/* ── Glass Panel (universal) ──────────────────────────────────── */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(1.15);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.15);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm), var(--shadow-inner-glow);
    position: relative; overflow: hidden;
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}
.glass-panel::before {
    content: ''; position: absolute; inset: 0;
    background: var(--glass-shine); pointer-events: none;
}
.glass-panel:hover {
    border-color: var(--glass-border-hover);
}

/* ── Premium Scrollbar ────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.15); border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.25); }

/* ── Loading Text ─────────────────────────────────────────────── */
.loading-text {
    text-align: center; padding: var(--space-2xl);
    color: var(--text-muted); font-size: 0.875rem;
    animation: pulseGlow 2s ease-in-out infinite;
}

/* ── Empty State ──────────────────────────────────────────────── */
.empty-state {
    text-align: center; padding: var(--space-2xl) var(--space-lg);
    color: var(--text-muted);
}
.empty-icon { display: block; margin: 0 auto var(--space-md); opacity: 0.4; }
.empty-icon svg { width: 48px; height: 48px; }

/* ── Selection Glow ───────────────────────────────────────────── */
::selection { background: rgba(99, 102, 241, 0.3); color: white; }

/* ── Companies Page ──────────────────────────────────────────── */
.companies-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-md);
}
.company-card { padding: var(--space-lg); }
.company-header { display: flex; align-items: center; gap: var(--space-md); margin-bottom: var(--space-md); }
.company-avatar {
    width: 42px; height: 42px; border-radius: var(--radius-md);
    background: var(--accent-gradient); color: white;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1rem; flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}
.company-name { font-weight: 600; font-size: 1rem; display: block; }
.company-industry { font-size: 0.8125rem; color: var(--text-secondary); }
.company-details { display: flex; flex-direction: column; gap: var(--space-xs); }
.company-detail {
    display: flex; align-items: center; gap: var(--space-sm);
    font-size: 0.8125rem; color: var(--text-muted);
}
.company-detail .detail-icon { width: 14px; height: 14px; opacity: 0.5; }
.company-detail .detail-icon svg { width: 14px; height: 14px; }

/* ── Pipeline Page ───────────────────────────────────────────── */
.pipeline-board {
    display: flex; gap: var(--space-md); overflow-x: auto;
    padding-bottom: var(--space-md); min-height: 400px;
}
.pipeline-column {
    min-width: 280px; max-width: 320px; flex-shrink: 0;
    display: flex; flex-direction: column;
}
.column-header {
    padding-bottom: var(--space-md); margin-bottom: var(--space-sm);
    border-bottom: 1px solid var(--glass-border);
}
.column-title { font-weight: 600; font-size: 0.9375rem; display: block; }
.column-meta { font-size: 0.75rem; color: var(--text-muted); }
.column-deals { display: flex; flex-direction: column; gap: var(--space-sm); flex: 1; }
.deal-card {
    padding: var(--space-md); border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border-subtle);
    background: rgba(18, 26, 48, 0.6);
    transition: all var(--transition-fast); cursor: pointer;
}
.deal-card:hover { border-color: var(--glass-border-hover); transform: translateY(-1px); }
.deal-title { font-weight: 500; font-size: 0.875rem; display: block; margin-bottom: 4px; }
.deal-value { font-size: 0.8125rem; color: var(--accent-hover); font-weight: 600; display: block; }
.deal-contact { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; display: block; }
.deal-empty { font-size: 0.8125rem; color: var(--text-muted); padding: var(--space-md); text-align: center; }

/* ── Calendar Page ───────────────────────────────────────────── */
.calendar-view { display: flex; flex-direction: column; gap: var(--space-md); }
.calendar-day { display: flex; flex-direction: column; }
.day-header {
    display: flex; justify-content: space-between; align-items: center;
    padding-bottom: var(--space-sm); margin-bottom: var(--space-sm);
    border-bottom: 1px solid var(--glass-border);
}
.day-date { font-weight: 600; font-size: 1rem; }
.day-count { font-size: 0.8125rem; color: var(--text-muted); }
.day-tasks { display: flex; flex-direction: column; gap: var(--space-xs); }
.calendar-task {
    display: flex; justify-content: space-between; align-items: center;
    padding: var(--space-sm) 0;
}
.calendar-task .task-title { font-size: 0.875rem; }

/* ── Settings Page ───────────────────────────────────────────── */
.settings-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: var(--space-md);
}
.settings-section { padding: var(--space-lg); }
.section-header {
    display: flex; align-items: center; gap: var(--space-sm);
    margin-bottom: var(--space-lg); padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--glass-border);
}
.section-icon { width: 20px; height: 20px; color: var(--accent); opacity: 0.7; }
.section-icon svg { width: 20px; height: 20px; }
.setting-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: var(--space-sm) 0; border-bottom: 1px solid var(--glass-border-subtle);
}
.setting-row:last-child { border-bottom: none; }
.setting-info { flex: 1; }
.setting-label { font-size: 0.875rem; font-weight: 500; display: block; }
.setting-desc { font-size: 0.75rem; color: var(--text-muted); }
.setting-value { font-size: 0.875rem; color: var(--text-secondary); font-weight: 500; }
.color-dot { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; }
.toggle-dot {
    width: 36px; height: 20px; border-radius: 10px;
    background: rgba(100, 116, 139, 0.3); position: relative;
    flex-shrink: 0;
}
.toggle-dot::after {
    content: ''; position: absolute; top: 2px; left: 2px;
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--text-muted); transition: all var(--transition-fast);
}
.toggle-dot.active { background: var(--accent-soft); }
.toggle-dot.active::after { left: 18px; background: var(--accent); }
