* { margin: 0; padding: 0; box-sizing: border-box; }

        :root {
            --bg-primary: #07080A;
            --bg-card: #0F1114;
            --bg-elevated: #161921;
            --accent: #3B82F6;
            --accent-glow: rgba(59, 130, 246, 0.15);
            --green: #10B981;
            --orange: #F59E0B;
            --red: #EF4444;
            --text-primary: #F1F5F9;
            --text-secondary: #94A3B8;
            --text-muted: #64748B;
            --border: rgba(148, 163, 184, 0.08);
            --border-strong: rgba(148, 163, 184, 0.15);
        }

        body {
            font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
            background: var(--bg-primary);
            color: var(--text-primary);
            -webkit-font-smoothing: antialiased;
            overflow-x: hidden;
        }

        h1, h2, h3, h4 { font-family: 'Space Grotesk', sans-serif; }

        /* --- NAV --- */
        .nav {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1rem 2rem;
            border-bottom: 1px solid var(--border);
            position: sticky;
            top: 0;
            z-index: 100;
            background: rgba(7, 8, 10, 0.9);
            backdrop-filter: blur(12px);
        }

        .nav-brand {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--text-primary);
            text-decoration: none;
        }

        .nav-brand svg { width: 28px; height: 28px; }

        .nav-links {
            display: flex;
            align-items: center;
            gap: 1.5rem;
        }

        .nav-links a {
            color: var(--text-secondary);
            text-decoration: none;
            font-size: 0.9rem;
            transition: color 0.2s;
        }

        .nav-links a:hover { color: var(--text-primary); }

        .nav-user {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .user-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: var(--accent);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.8rem;
            font-weight: 600;
            color: white;
        }

        /* --- LAYOUT --- */
        .app-container {
            display: flex;
            min-height: calc(100vh - 65px);
        }

        .sidebar {
            width: 260px;
            border-right: 1px solid var(--border);
            padding: 1.5rem;
            flex-shrink: 0;
        }

        .sidebar-section { margin-bottom: 2rem; }

        .sidebar-label {
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: var(--text-muted);
            margin-bottom: 0.75rem;
            font-weight: 500;
        }

        .sidebar-nav-item {
            display: flex;
            align-items: center;
            gap: 0.6rem;
            padding: 0.6rem 0.75rem;
            border-radius: 8px;
            color: var(--text-secondary);
            text-decoration: none;
            font-size: 0.9rem;
            transition: all 0.15s;
            cursor: pointer;
            border: none;
            background: none;
            width: 100%;
            text-align: left;
        }

        .sidebar-nav-item:hover { background: var(--bg-elevated); color: var(--text-primary); }
        .sidebar-nav-item.active { background: var(--accent-glow); color: var(--accent); }

        .sidebar-nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }

        .main-content {
            flex: 1;
            padding: 2rem;
            overflow-y: auto;
        }

        /* --- PAGE HEADER --- */
        .page-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            margin-bottom: 2rem;
        }

        .page-title { font-size: 1.5rem; font-weight: 600; margin-bottom: 0.25rem; }
        .page-subtitle { color: var(--text-secondary); font-size: 0.9rem; }

        /* --- CARDS --- */
        .card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 1.25rem;
            margin-bottom: 1rem;
        }

        .card-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1rem;
        }

        .card-title {
            font-size: 0.95rem;
            font-weight: 600;
        }

        /* --- STATS --- */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1rem;
            margin-bottom: 2rem;
        }

        .stat-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 1.25rem;
        }

        .stat-value {
            font-size: 2rem;
            font-weight: 700;
            font-family: 'Space Grotesk', sans-serif;
            line-height: 1;
            margin-bottom: 0.35rem;
        }

        .stat-label {
            font-size: 0.8rem;
            color: var(--text-secondary);
        }

        .stat-change {
            font-size: 0.75rem;
            margin-top: 0.5rem;
        }

        .stat-change.positive { color: var(--green); }
        .stat-change.neutral { color: var(--text-muted); }

        /* --- FORMS --- */
        .form-group { margin-bottom: 1.25rem; }

        .form-label {
            display: block;
            font-size: 0.8rem;
            font-weight: 500;
            color: var(--text-secondary);
            margin-bottom: 0.5rem;
        }

        .form-input, .form-select, .form-textarea {
            width: 100%;
            padding: 0.65rem 0.875rem;
            background: var(--bg-elevated);
            border: 1px solid var(--border-strong);
            border-radius: 8px;
            color: var(--text-primary);
            font-size: 0.9rem;
            font-family: inherit;
            transition: border-color 0.2s;
        }

        .form-input:focus, .form-select:focus, .form-textarea:focus {
            outline: none;
            border-color: var(--accent);
        }

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

        .form-hint {
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-top: 0.35rem;
        }

        .form-actions {
            display: flex;
            gap: 0.75rem;
            margin-top: 1.5rem;
        }

        /* --- BUTTONS --- */
        .btn {
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            padding: 0.6rem 1.1rem;
            border-radius: 8px;
            font-size: 0.875rem;
            font-weight: 500;
            font-family: inherit;
            cursor: pointer;
            transition: all 0.15s;
            border: none;
            text-decoration: none;
        }

        .btn svg { width: 16px; height: 16px; }

        .btn-primary {
            background: var(--accent);
            color: white;
        }

        .btn-primary:hover { background: #2563eb; }

        .btn-secondary {
            background: var(--bg-elevated);
            color: var(--text-primary);
            border: 1px solid var(--border-strong);
        }

        .btn-secondary:hover { background: #1e2230; }

        .btn-danger {
            background: rgba(239, 68, 68, 0.15);
            color: var(--red);
            border: 1px solid rgba(239, 68, 68, 0.3);
        }

        .btn-danger:hover { background: rgba(239, 68, 68, 0.25); }

        .btn:disabled { opacity: 0.5; cursor: not-allowed; }

        /* --- TAGS --- */
        .tag {
            display: inline-flex;
            align-items: center;
            gap: 0.3rem;
            padding: 0.25rem 0.6rem;
            border-radius: 100px;
            font-size: 0.75rem;
            font-weight: 500;
        }

        .tag-blue { background: var(--accent-glow); color: var(--accent); }
        .tag-green { background: rgba(16, 185, 129, 0.15); color: var(--green); }
        .tag-orange { background: rgba(245, 158, 11, 0.15); color: var(--orange); }
        .tag-gray { background: var(--bg-elevated); color: var(--text-muted); }
        .tag-red { background: rgba(239, 68, 68, 0.15); color: var(--red); }

        /* --- TABLE --- */
        .prospects-table {
            width: 100%;
            border-collapse: collapse;
        }

        .prospects-table th {
            text-align: left;
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: var(--text-muted);
            padding: 0.75rem 1rem;
            border-bottom: 1px solid var(--border);
            font-weight: 500;
        }

        .prospects-table td {
            padding: 1rem;
            border-bottom: 1px solid var(--border);
            font-size: 0.875rem;
            vertical-align: middle;
        }

        .prospects-table tr:hover td { background: var(--bg-elevated); }
        .prospects-table tr:last-child td { border-bottom: none; }

        .company-cell {
            display: flex;
            flex-direction: column;
            gap: 0.2rem;
        }

        .company-name {
            font-weight: 500;
            color: var(--text-primary);
        }

        .company-domain {
            font-size: 0.75rem;
            color: var(--text-muted);
        }

        .contact-cell {
            display: flex;
            flex-direction: column;
            gap: 0.15rem;
        }

        .contact-name { color: var(--text-primary); }
        .contact-title { font-size: 0.8rem; color: var(--text-secondary); }

        /* --- ACTIVITY FEED --- */
        .activity-list {
            display: flex;
            flex-direction: column;
            gap: 0;
        }

        .activity-item {
            display: flex;
            gap: 0.875rem;
            padding: 0.875rem 0;
            border-bottom: 1px solid var(--border);
        }

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

        .activity-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            margin-top: 0.4rem;
            flex-shrink: 0;
        }

        .activity-dot.blue { background: var(--accent); }
        .activity-dot.green { background: var(--green); }
        .activity-dot.orange { background: var(--orange); }
        .activity-dot.red { background: var(--red); }

        .activity-content { flex: 1; }

        .activity-message { font-size: 0.875rem; line-height: 1.4; }
        .activity-time { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }

        /* --- MODAL --- */
        .modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(4px);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 200;
            padding: 1rem;
        }

        .modal {
            background: var(--bg-card);
            border: 1px solid var(--border-strong);
            border-radius: 16px;
            padding: 1.75rem;
            width: 100%;
            max-width: 560px;
            max-height: 90vh;
            overflow-y: auto;
        }

        .modal-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1.5rem;
        }

        .modal-title { font-size: 1.1rem; font-weight: 600; }

        .modal-close {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            background: var(--bg-elevated);
            border: none;
            color: var(--text-secondary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            transition: all 0.15s;
        }

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

        /* --- CHIPS INPUT --- */
        .chips-input {
            display: flex;
            flex-wrap: wrap;
            gap: 0.4rem;
            padding: 0.5rem;
            background: var(--bg-elevated);
            border: 1px solid var(--border-strong);
            border-radius: 8px;
            min-height: 44px;
            align-items: center;
        }

        .chips-input:focus-within { border-color: var(--accent); }

        .chip {
            display: inline-flex;
            align-items: center;
            gap: 0.3rem;
            padding: 0.25rem 0.5rem;
            background: var(--accent-glow);
            color: var(--accent);
            border-radius: 100px;
            font-size: 0.8rem;
        }

        .chip-remove {
            cursor: pointer;
            opacity: 0.7;
            font-size: 0.9rem;
        }

        .chip-remove:hover { opacity: 1; }

        .chips-input input {
            border: none;
            background: none;
            outline: none;
            color: var(--text-primary);
            font-size: 0.875rem;
            min-width: 80px;
            flex: 1;
            font-family: inherit;
        }

        /* --- JOB STATUS --- */
        .job-status {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 1rem;
            border-radius: 100px;
            font-size: 0.8rem;
            font-weight: 500;
        }

        .job-status.pending { background: rgba(245, 158, 11, 0.15); color: var(--orange); }
        .job-status.running { background: var(--accent-glow); color: var(--accent); }
        .job-status.completed { background: rgba(16, 185, 129, 0.15); color: var(--green); }
        .job-status.failed { background: rgba(239, 68, 68, 0.15); color: var(--red); }

        .spinner {
            width: 14px;
            height: 14px;
            border: 2px solid rgba(255,255,255,0.2);
            border-top-color: currentColor;
            border-radius: 50%;
            animation: spin 0.7s linear infinite;
        }

        @keyframes spin { to { transform: rotate(360deg); } }

        /* --- EMPTY STATE --- */
        .empty-state {
            text-align: center;
            padding: 3rem 2rem;
            color: var(--text-muted);
        }

        .empty-state svg { width: 48px; height: 48px; margin-bottom: 1rem; opacity: 0.4; }
        .empty-state h3 { font-size: 1rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
        .empty-state p { font-size: 0.875rem; }

        /* --- TOAST --- */
        .toast-container {
            position: fixed;
            bottom: 1.5rem;
            right: 1.5rem;
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            z-index: 300;
        }

        .toast {
            padding: 0.75rem 1.25rem;
            border-radius: 10px;
            font-size: 0.875rem;
            background: var(--bg-elevated);
            border: 1px solid var(--border-strong);
            color: var(--text-primary);
            box-shadow: 0 8px 24px rgba(0,0,0,0.4);
            animation: slideUp 0.2s ease;
        }

        .toast.success { border-color: rgba(16, 185, 129, 0.4); }
        .toast.error { border-color: rgba(239, 68, 68, 0.4); }

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

        /* --- RESPONSIVE --- */
        @media (max-width: 768px) {
            .app-container { flex-direction: column; }
            .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
            .stats-grid { grid-template-columns: 1fr 1fr; }
            .nav-links { display: none; }
        }

        /* --- AUTH PAGES --- */
        .auth-page {
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 2rem;
        }

        .auth-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 2.5rem;
            width: 100%;
            max-width: 400px;
        }

        .auth-title {
            font-size: 1.5rem;
            font-weight: 700;
            text-align: center;
            margin-bottom: 0.5rem;
        }

        .auth-subtitle {
            text-align: center;
            color: var(--text-secondary);
            font-size: 0.9rem;
            margin-bottom: 2rem;
        }

        .auth-divider {
            text-align: center;
            color: var(--text-muted);
            font-size: 0.8rem;
            margin: 1.5rem 0;
        }

        .auth-divider a { color: var(--accent); text-decoration: none; }

        /* --- POLLING INDICATOR --- */
        .polling-indicator {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            font-size: 0.75rem;
            color: var(--text-muted);
        }

        .polling-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: var(--green);
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.3; }
        }