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

:root {
    --bg: #0f1117;
    --surface: #1a1d27;
    --surface2: #232733;
    --border: #2e3345;
    --text: #e1e4ed;
    --text-muted: #8b8fa3;
    --primary: #6c5ce7;
    --primary-hover: #7c6df7;
    --green: #00b894;
    --yellow: #fdcb6e;
    --red: #e17055;
    --blue: #74b9ff;
    --radius: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* ── Header ── */
.header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.header h1 { font-size: 20px; font-weight: 600; }
.header-actions { display: flex; gap: 12px; align-items: center; }

/* ── Nav Tabs ── */
.nav-tabs { display: flex; gap: 4px; }
.nav-tab {
    padding: 6px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
}
.nav-tab:hover { color: var(--text); background: var(--surface2); }
.nav-tab.active { color: var(--text); background: var(--primary); }

/* ── Company Table ── */
.company-table table { font-size: 13px; }
.company-table tr:hover { background: var(--surface2); }

/* ── Outreach Cards ── */
.outreach-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 12px;
}
.outreach-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}
.outreach-header h3 { font-size: 16px; }
.outreach-contact {
    background: var(--surface2);
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 12px;
}
.outreach-dm { margin-top: 10px; }
.dm-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.dm-text {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text);
    font-family: inherit;
}
.outreach-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ── Stats Bar ── */
.stats-bar {
    display: flex;
    gap: 16px;
    padding: 16px 32px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.stat-card {
    background: var(--surface2);
    padding: 12px 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    min-width: 140px;
}
.stat-card .label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.stat-card .value { font-size: 24px; font-weight: 700; margin-top: 2px; }

/* ── Filters ── */
.filters {
    padding: 16px 32px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    border-bottom: 1px solid var(--border);
}
.filter-group { display: flex; flex-direction: column; gap: 4px; }
.filter-group label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.filter-group input,
.filter-group select {
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 12px;
    border-radius: var(--radius);
    font-size: 13px;
    min-width: 160px;
}
.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary);
}

/* ── Buttons ── */
.btn {
    padding: 8px 16px;
    border-radius: var(--radius);
    border: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-muted); }
.btn-outline:hover { border-color: var(--text-muted); color: var(--text); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-green { background: var(--green); color: white; }
.btn-yellow { background: var(--yellow); color: #333; }

/* ── Job List ── */
.content { padding: 20px 32px; }

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

.job-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    display: grid;
    grid-template-columns: 30px 60px 1fr auto;
    gap: 12px;
    align-items: center;
    transition: border-color 0.2s;
}
.job-card:hover { border-color: var(--primary); }

.score-badge {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}
.score-high { background: rgba(0,184,148,0.15); color: var(--green); border: 2px solid var(--green); }
.score-mid { background: rgba(253,203,110,0.15); color: var(--yellow); border: 2px solid var(--yellow); }
.score-low { background: rgba(225,112,85,0.15); color: var(--red); border: 2px solid var(--red); }

.job-info h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.job-meta { display: flex; gap: 16px; font-size: 13px; color: var(--text-muted); flex-wrap: wrap; }
.job-meta span { display: flex; align-items: center; gap: 4px; }
.job-tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.tag {
    background: var(--surface2);
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: var(--blue);
}

.job-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.status-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}
.status-new { background: rgba(116,185,255,0.15); color: var(--blue); }
.status-reviewed { background: rgba(253,203,110,0.15); color: var(--yellow); }
.status-applied { background: rgba(0,184,148,0.15); color: var(--green); }
.status-stale { background: rgba(225,112,85,0.15); color: var(--red); }

/* India-friendly badges */
.india-yes { background: rgba(0,184,148,0.15); color: var(--green); border: 1px solid var(--green); padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.india-maybe { background: rgba(253,203,110,0.15); color: var(--yellow); border: 1px solid var(--yellow); padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.india-no { background: rgba(225,112,85,0.15); color: var(--red); border: 1px solid var(--red); padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.india-unknown { background: rgba(139,143,163,0.15); color: var(--text-muted); border: 1px solid var(--border); padding: 2px 8px; border-radius: 4px; font-size: 11px; }
.location-note { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ── Modal ── */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    justify-content: center;
    align-items: flex-start;
    padding-top: 60px;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 24px;
}
.modal h2 { font-size: 18px; margin-bottom: 4px; }
.modal-company { color: var(--text-muted); font-size: 14px; margin-bottom: 16px; }
.modal-details { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.modal-desc {
    background: var(--surface2);
    padding: 16px;
    border-radius: var(--radius);
    font-size: 13px;
    line-height: 1.7;
    max-height: 300px;
    overflow-y: auto;
}
.modal-desc h1, .modal-desc h2, .modal-desc h3 { font-size: 14px; margin: 12px 0 4px; }
.modal-desc ul, .modal-desc ol { padding-left: 20px; }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; justify-content: flex-end; }

/* ── Loading ── */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: var(--text-muted);
    font-size: 14px;
    gap: 10px;
}
.spinner {
    width: 20px; height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.collect-loader {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--surface2);
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    min-width: 220px;
}
.collect-loader[hidden] { display: none; }
.collect-loader-text { display: flex; flex-direction: column; line-height: 1.25; }
.collect-loader-title { font-size: 13px; font-weight: 600; color: var(--text); }
.collect-loader-sub { font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* ── Pagination ── */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 20px;
}

/* ── Empty ── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.empty-state h3 { font-size: 16px; margin-bottom: 8px; color: var(--text); }

/* ── Toast ── */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--surface2);
    border: 1px solid var(--green);
    color: var(--green);
    padding: 12px 20px;
    border-radius: var(--radius);
    font-size: 13px;
    z-index: 2000;
    animation: fadeIn 0.3s;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } }
