/* ============================================
   LettingsAI - Design System & Styles
   ============================================ */
:root {
    --bg: #fafaf8; --bg-card: #ffffff; --bg-elevated: #f5f5f0; --bg-inset: #eeeee8;
    --text: #1a1a1a; --text-secondary: #5a5a52; --text-muted: #9a9a90;
    --border: #e0e0d8; --border-light: #eeeeea;
    --accent: #1a6b5a; --accent-hover: #145a4b; --accent-soft: #e8f4f0; --accent-muted: #b8ddd2;
    --danger: #c53030; --danger-soft: #fed7d7;
    --warning: #dd6b20; --warning-soft: #fef3c7;
    --success: #059669; --success-soft: #d1fae5;
    --purple: #7c3aed; --purple-soft: #ede9fe;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.03);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
    --radius-sm: 6px; --radius-md: 10px; --radius-lg: 14px; --radius-xl: 20px;
    --font-body: 'DM Sans', -apple-system, sans-serif;
    --font-display: 'Fraunces', Georgia, serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 15px; scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }

/* NAV */
.top-nav { position: sticky; top: 0; z-index: 100; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; height: 56px; background: rgba(255,255,255,0.85); backdrop-filter: blur(16px) saturate(1.5); border-bottom: 1px solid var(--border-light); }
.nav-brand { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.brand-icon { display: flex; align-items: center; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand-badge { font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; padding: 2px 7px; border-radius: 4px; background: var(--warning-soft); color: var(--warning); }
.nav-center { display: flex; align-items: center; gap: 2px; }
.nav-tab { display: flex; align-items: center; gap: 6px; padding: 6px 14px; border: none; background: transparent; font-family: var(--font-body); font-size: 0.85rem; font-weight: 500; color: var(--text-muted); border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition); white-space: nowrap; }
.nav-tab:hover { color: var(--text-secondary); background: var(--bg-elevated); }
.nav-tab.active { color: var(--accent); background: var(--accent-soft); }
.nav-right { display: flex; align-items: center; min-width: 180px; justify-content: flex-end; }
.nav-user { display: flex; align-items: center; gap: 8px; }
.user-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: white; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700; }
.user-name { font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); }

/* MAIN */
.main-content { max-width: 1360px; margin: 0 auto; padding: 28px 32px 60px; }
.view { display: none; animation: fadeIn 0.35s ease; }
.view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.view-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 28px; }
.view-header h1 { font-family: var(--font-display); font-size: 1.75rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1.2; }
.view-subtitle { color: var(--text-muted); font-size: 0.9rem; margin-top: 4px; }
.date-display { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }

/* STATS */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-md); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-sm); transition: var(--transition); }
.stat-card:hover { box-shadow: var(--shadow-md); border-color: var(--border); }
.stat-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; }
.stat-content { display: flex; flex-direction: column; }
.stat-number { font-family: var(--font-display); font-size: 1.85rem; font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.stat-change { font-size: 0.75rem; font-weight: 600; padding: 3px 8px; border-radius: 99px; width: fit-content; }
.stat-change.positive { background: var(--success-soft); color: var(--success); }
.stat-change.neutral { background: var(--bg-elevated); color: var(--text-secondary); }

/* DASHBOARD CARDS */
.dashboard-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; }
.dashboard-card { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-md); padding: 22px; box-shadow: var(--shadow-sm); }
.dashboard-card.large { grid-column: 1 / -1; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.card-header h3 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 500; letter-spacing: -0.02em; }
.card-badge { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 3px 8px; border-radius: 99px; background: var(--success-soft); color: var(--success); }
.card-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--success); display: inline-block; margin-right: 4px; animation: pulse-dot 2s infinite; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* Pipeline */
.pipeline-chart { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.pipeline-bar { height: 32px; background: var(--bg-elevated); border-radius: var(--radius-sm); overflow: hidden; }
.pipeline-segment { height: 100%; border-radius: var(--radius-sm); display: flex; align-items: center; padding: 0 12px; font-size: 0.75rem; font-weight: 600; color: white; min-width: fit-content; }
.pipeline-segment.received { background: var(--text-muted); }
.pipeline-segment.screened { background: #6b7280; }
.pipeline-segment.shortlisted { background: var(--accent); }
.pipeline-segment.viewing { background: var(--purple); }
.pipeline-note { font-size: 0.8rem; color: var(--text-muted); padding: 10px 14px; background: var(--accent-soft); border-radius: var(--radius-sm); border-left: 3px solid var(--accent); }
.pipeline-note strong { color: var(--accent); }

/* Attention & Activity */
.attention-list { display: flex; flex-direction: column; gap: 12px; }
.attention-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bg-elevated); font-size: 0.85rem; line-height: 1.5; }
.attention-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.attention-item.high .attention-dot { background: var(--danger); }
.attention-item.medium .attention-dot { background: var(--warning); }
.attention-item.low .attention-dot { background: var(--success); }
.inline-btn { background: none; border: none; color: var(--accent); font-weight: 600; font-size: 0.8rem; cursor: pointer; font-family: var(--font-body); text-decoration: underline; text-underline-offset: 2px; }
.inline-btn:hover { color: var(--accent-hover); }
.activity-list { display: flex; flex-direction: column; gap: 14px; }
.activity-item { display: flex; flex-direction: column; gap: 2px; padding-left: 14px; border-left: 2px solid var(--border-light); }
.activity-time { font-size: 0.7rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.activity-text { font-size: 0.85rem; color: var(--text-secondary); }
.activity-text strong { color: var(--text); }

/* LISTINGS */
.search-box { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text-muted); min-width: 240px; }
.search-box input { border: none; background: none; font-family: var(--font-body); font-size: 0.85rem; color: var(--text); outline: none; width: 100%; }
.search-box input::placeholder { color: var(--text-muted); }
.listings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.listing-card { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition); cursor: pointer; }
.listing-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--accent-muted); }
.listing-image { width: 100%; height: 190px; object-fit: cover; display: block; }
.listing-image-wrap { position: relative; overflow: hidden; }
.listing-badge { position: absolute; top: 10px; right: 10px; padding: 3px 10px; border-radius: 99px; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; backdrop-filter: blur(8px); }
.listing-badge.unscreened { background: rgba(180,83,9,0.88); color: white; }
.listing-body { padding: 16px 18px 18px; }
.listing-address { font-family: var(--font-display); font-size: 1rem; font-weight: 500; letter-spacing: -0.02em; margin-bottom: 4px; }
.listing-meta { display: flex; gap: 12px; font-size: 0.78rem; color: var(--text-muted); margin-bottom: 14px; }
.listing-meta span { display: flex; align-items: center; gap: 4px; }
.listing-stats { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--border-light); }
.listing-stat { text-align: center; }
.listing-stat-val { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; display: block; line-height: 1; }
.listing-stat-label { font-size: 0.68rem; color: var(--text-muted); margin-top: 2px; display: block; }
.listing-price { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--accent); }
.listing-price small { font-weight: 400; font-size: 0.75rem; color: var(--text-muted); }

/* ============================================
   LISTING DETAIL VIEW
   ============================================ */
.back-btn { display: inline-flex; align-items: center; gap: 4px; background: none; border: none; font-family: var(--font-body); font-size: 0.82rem; font-weight: 600; color: var(--accent); cursor: pointer; margin-bottom: 8px; padding: 0; }
.back-btn:hover { color: var(--accent-hover); }

.detail-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; margin-bottom: 28px; }
.detail-hero-image { border-radius: var(--radius-md); overflow: hidden; height: 260px; }
.detail-hero-image img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero-info { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-md); padding: 22px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; justify-content: space-between; }
.detail-hero-info h2 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 500; margin-bottom: 12px; }
.detail-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.detail-meta-item { display: flex; flex-direction: column; }
.detail-meta-label { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.detail-meta-value { font-size: 0.95rem; font-weight: 500; color: var(--text); }
.detail-stats-row { display: flex; gap: 16px; padding-top: 14px; border-top: 1px solid var(--border-light); margin-top: auto; }
.detail-stat-pill { display: flex; flex-direction: column; align-items: center; padding: 8px 16px; background: var(--bg-elevated); border-radius: var(--radius-sm); flex: 1; }
.detail-stat-pill .val { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; line-height: 1; }
.detail-stat-pill .lbl { font-size: 0.68rem; color: var(--text-muted); margin-top: 2px; }

/* CTA glow button */
.cta-glow { position: relative; overflow: hidden; }
.cta-glow::before { content: ''; position: absolute; inset: -2px; background: linear-gradient(135deg, var(--accent), var(--purple), var(--accent)); border-radius: inherit; z-index: -1; animation: glow-rotate 3s linear infinite; }
@keyframes glow-rotate { to { filter: hue-rotate(60deg); } }

/* Applications list */
.applications-section { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); overflow: hidden; }
.applications-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border-light); }
.applications-header h3 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 500; }
.applications-search { display: flex; align-items: center; gap: 6px; padding: 6px 12px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-muted); }
.applications-search input { border: none; background: none; font-family: var(--font-body); font-size: 0.82rem; color: var(--text); outline: none; width: 180px; }
.applications-search input::placeholder { color: var(--text-muted); }
.applications-list { max-height: 600px; overflow-y: auto; }
.app-row { display: grid; grid-template-columns: 40px 1.3fr 2fr 0.7fr 32px; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border-light); font-size: 0.82rem; cursor: pointer; transition: var(--transition); }
.app-row:hover { background: var(--accent-soft); }
.app-row.header { font-weight: 600; color: var(--text-muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; cursor: default; background: var(--bg-elevated); position: sticky; top: 0; z-index: 1; }
.app-row.header:hover { background: var(--bg-elevated); }
.app-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 0.65rem; font-weight: 700; flex-shrink: 0; }
.app-name { font-weight: 500; }
.app-arrow { color: var(--text-muted); font-size: 0.9rem; text-align: center; }
.app-tag { font-size: 0.7rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; display: inline-block; }
.app-tag.employed { background: var(--success-soft); color: var(--success); }
.app-tag.self { background: var(--purple-soft); color: var(--purple); }
.app-tag.student { background: var(--warning-soft); color: var(--warning); }
.app-tag.retired { background: var(--bg-elevated); color: var(--text-secondary); }
.app-tag.part-time { background: #fef3c7; color: #92400e; }

/* ============================================
   AI SCREENING
   ============================================ */
.screening-layout { display: grid; grid-template-columns: 320px 1fr; gap: 20px; align-items: flex-start; }
.screening-filters { position: sticky; top: 80px; }
.filter-panel { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-sm); max-height: calc(100vh - 120px); overflow-y: auto; }
.filter-panel::-webkit-scrollbar { width: 4px; }
.filter-panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.filter-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.filter-header h3 { font-family: var(--font-display); font-size: 1rem; font-weight: 500; }
.reset-btn { background: none; border: none; font-family: var(--font-body); font-size: 0.75rem; color: var(--text-muted); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.reset-btn:hover { color: var(--danger); }
.filter-section { margin-bottom: 4px; }
.filter-label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.04em; }
.filter-hint { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 10px; line-height: 1.4; }
.filter-divider { height: 1px; background: var(--border-light); margin: 14px 0; }
select { width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 0.85rem; color: var(--text); background: var(--bg-card); cursor: pointer; outline: none; transition: var(--transition); appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%239a9a90' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.checkbox-group, .radio-group { display: flex; flex-direction: column; gap: 6px; }
.checkbox-item, .radio-item { display: flex; align-items: center; gap: 8px; font-size: 0.83rem; color: var(--text-secondary); cursor: pointer; }
.checkbox-item input, .radio-item input { accent-color: var(--accent); cursor: pointer; }
.range-input { display: flex; align-items: center; gap: 12px; }
.range-input input[type="range"] { flex: 1; accent-color: var(--accent); cursor: pointer; }
.range-value { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500; color: var(--accent); min-width: 70px; text-align: right; }
.weight-sliders { display: flex; flex-direction: column; gap: 8px; }
.weight-row { display: grid; grid-template-columns: 1fr 80px 20px; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--text-secondary); }
.weight-slider { accent-color: var(--accent); cursor: pointer; width: 100%; }
.weight-val { font-family: var(--font-mono); font-size: 0.75rem; color: var(--accent); text-align: center; }
.run-ai-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; padding: 12px; background: var(--accent); color: white; border: none; border-radius: var(--radius-md); font-family: var(--font-body); font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: var(--transition); position: relative; overflow: hidden; }
.run-ai-btn:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.run-ai-btn::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent); transform: translateX(-100%); animation: shimmer 3s infinite; }
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* Results */
.screening-results { min-height: 500px; }
.results-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 400px; text-align: center; color: var(--text-muted); gap: 12px; }
.results-placeholder h3 { font-family: var(--font-display); font-weight: 500; color: var(--text-secondary); }
.results-placeholder p { max-width: 380px; font-size: 0.85rem; line-height: 1.5; }
.ai-processing { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 400px; text-align: center; gap: 16px; }
.processing-animation { position: relative; width: 80px; height: 80px; }
.processing-ring { position: absolute; inset: 0; border: 2px solid transparent; border-top: 2px solid var(--accent); border-radius: 50%; animation: spin 1.2s linear infinite; }
.processing-ring.delay { inset: 8px; border-top-color: var(--accent-muted); animation-duration: 1.8s; animation-direction: reverse; }
.processing-ring.delay2 { inset: 16px; border-top-color: var(--border); animation-duration: 2.4s; }
@keyframes spin { to { transform: rotate(360deg); } }
.ai-processing h3 { font-family: var(--font-display); font-weight: 500; color: var(--text); }
.processing-status { font-size: 0.85rem; color: var(--text-muted); }
.processing-steps { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; text-align: left; }
.step { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--text-muted); transition: var(--transition); }
.step.active { color: var(--accent); font-weight: 500; }
.step.done { color: var(--success); }
.step-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); transition: var(--transition); flex-shrink: 0; }
.step.active .step-dot { background: var(--accent); box-shadow: 0 0 8px var(--accent-muted); }
.step.done .step-dot { background: var(--success); }

/* Result tabs */
.result-tabs { display: flex; gap: 4px; margin-bottom: 16px; background: var(--bg-elevated); padding: 4px; border-radius: var(--radius-md); }
.result-tab { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 12px; border: none; background: transparent; font-family: var(--font-body); font-size: 0.82rem; font-weight: 500; color: var(--text-muted); border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition); }
.result-tab:hover { color: var(--text-secondary); }
.result-tab.active { background: var(--bg-card); color: var(--text); box-shadow: var(--shadow-sm); }
.tab-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.tab-dot.green { background: var(--success); }
.tab-dot.yellow { background: var(--warning); }
.tab-dot.red { background: var(--danger); }
.tab-count { font-family: var(--font-mono); font-size: 0.72rem; padding: 1px 6px; border-radius: 99px; background: var(--bg-inset); }

/* Results header & buttons */
.results-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.results-summary h3 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 500; }
.results-summary p { font-size: 0.82rem; color: var(--text-muted); margin-top: 2px; }
.results-actions { display: flex; gap: 8px; }
.primary-btn, .secondary-btn { display: flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: var(--transition); border: none; white-space: nowrap; }
.primary-btn { background: var(--accent); color: white; }
.primary-btn:hover:not(:disabled) { background: var(--accent-hover); }
.primary-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.secondary-btn { background: var(--bg-elevated); color: var(--text-secondary); border: 1px solid var(--border); }
.secondary-btn:hover { background: var(--bg-inset); }
.secondary-btn.small, .primary-btn.small { padding: 5px 10px; font-size: 0.75rem; }

/* Candidate Cards */
.results-list { display: flex; flex-direction: column; gap: 10px; }
.candidate-card { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-md); padding: 18px 20px; box-shadow: var(--shadow-sm); transition: var(--transition); display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; }
.candidate-card:hover { border-color: var(--accent-muted); box-shadow: var(--shadow-md); }
.candidate-card.selected { border-color: var(--accent); background: var(--accent-soft); }
.candidate-check { width: 20px; height: 20px; border: 2px solid var(--border); border-radius: 4px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: var(--transition); flex-shrink: 0; }
.candidate-check.checked { background: var(--accent); border-color: var(--accent); }
.candidate-check.checked::after { content: '✓'; color: white; font-size: 0.7rem; font-weight: 700; }
.candidate-info { min-width: 0; }
.candidate-name { font-family: var(--font-display); font-weight: 500; font-size: 1rem; margin-bottom: 4px; }
.candidate-details { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 0.78rem; color: var(--text-muted); }
.candidate-details span { display: flex; align-items: center; gap: 4px; }
.candidate-ai-note { margin-top: 10px; padding: 8px 12px; background: var(--bg-elevated); border-radius: var(--radius-sm); font-size: 0.78rem; color: var(--text-secondary); line-height: 1.5; border-left: 3px solid var(--accent); }
.candidate-ai-note strong { color: var(--accent); }
.candidate-score { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 56px; cursor: pointer; }
.score-ring { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: 1rem; }
.score-ring.high { background: var(--success-soft); color: var(--success); border: 2px solid var(--success); }
.score-ring.medium { background: var(--warning-soft); color: var(--warning); border: 2px solid var(--warning); }
.score-ring.low { background: var(--danger-soft); color: var(--danger); border: 2px solid var(--danger); }
.score-label { font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.ai-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ai-flag { padding: 3px 8px; border-radius: 99px; font-size: 0.7rem; font-weight: 600; }
.ai-flag.positive { background: var(--success-soft); color: var(--success); }
.ai-flag.neutral { background: var(--bg-elevated); color: var(--text-secondary); }
.ai-flag.concern { background: var(--warning-soft); color: var(--warning); }

/* VIEWINGS */
.viewings-layout { display: grid; grid-template-columns: 1fr 360px; gap: 20px; align-items: flex-start; }
.calendar-section { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-sm); }
.calendar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.calendar-header h3 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 500; }
.cal-nav { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-card); color: var(--text-secondary); cursor: pointer; font-size: 0.9rem; transition: var(--transition); }
.cal-nav:hover { background: var(--bg-elevated); }
.calendar-grid { display: grid; grid-template-columns: 70px repeat(7, 1fr); gap: 1px; background: var(--border-light); border-radius: var(--radius-sm); overflow: hidden; }
.cal-header-cell { background: var(--bg-elevated); padding: 8px 4px; text-align: center; font-size: 0.7rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.cal-time-cell { background: var(--bg-elevated); padding: 6px 8px; font-size: 0.72rem; font-family: var(--font-mono); color: var(--text-muted); display: flex; align-items: center; }
.cal-cell { background: var(--bg-card); min-height: 48px; padding: 3px; cursor: pointer; transition: var(--transition); }
.cal-cell:hover { background: var(--accent-soft); }
.cal-event { padding: 3px 6px; border-radius: 3px; font-size: 0.65rem; font-weight: 600; line-height: 1.3; cursor: pointer; transition: var(--transition); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-event.confirmed { background: var(--accent-soft); color: var(--accent); border-left: 2px solid var(--accent); }
.cal-event.pending { background: var(--warning-soft); color: var(--warning); border-left: 2px solid var(--warning); }
.cal-event.cancelled { background: var(--danger-soft); color: var(--danger); border-left: 2px solid var(--danger); text-decoration: line-through; }
.cal-event:hover { transform: scale(1.02); }
.viewing-details-panel { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-sm); position: sticky; top: 80px; }
.viewing-detail-placeholder { text-align: center; color: var(--text-muted); font-size: 0.85rem; padding: 40px 0; }
.viewing-detail-content h3 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 500; margin-bottom: 14px; }
.viewing-detail-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border-light); font-size: 0.83rem; }
.viewing-detail-row:last-child { border-bottom: none; }
.viewing-detail-label { color: var(--text-muted); }
.viewing-detail-value { font-weight: 500; }
.viewing-status-tag { display: inline-flex; padding: 2px 8px; border-radius: 99px; font-size: 0.7rem; font-weight: 600; }
.viewing-status-tag.confirmed { background: var(--success-soft); color: var(--success); }
.viewing-status-tag.pending { background: var(--warning-soft); color: var(--warning); }
.viewing-attendees { margin-top: 14px; }
.viewing-attendees h4 { font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px; }
.attendee-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; font-size: 0.82rem; }
.attendee-name { display: flex; align-items: center; gap: 8px; }
.attendee-avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 0.6rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* COMMUNICATIONS */
.comms-layout { display: grid; grid-template-columns: 260px 1fr; gap: 20px; align-items: flex-start; }
.comms-sidebar { display: flex; flex-direction: column; gap: 18px; }
.comms-nav { display: flex; flex-direction: column; gap: 4px; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-md); padding: 8px; box-shadow: var(--shadow-sm); }
.comms-tab { padding: 8px 12px; border: none; background: transparent; font-family: var(--font-body); font-size: 0.83rem; font-weight: 500; color: var(--text-muted); border-radius: var(--radius-sm); cursor: pointer; text-align: left; transition: var(--transition); }
.comms-tab:hover { background: var(--bg-elevated); color: var(--text-secondary); }
.comms-tab.active { background: var(--accent-soft); color: var(--accent); }
.template-info { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-md); padding: 16px; box-shadow: var(--shadow-sm); }
.template-info h4, .send-stats h4 { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-secondary); margin-bottom: 10px; }
.template-vars { display: flex; flex-wrap: wrap; gap: 4px; }
.template-vars code { font-family: var(--font-mono); font-size: 0.68rem; padding: 3px 6px; background: var(--bg-elevated); border-radius: 3px; color: var(--accent); }
.send-stats { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-md); padding: 16px; box-shadow: var(--shadow-sm); }
.send-stat-row { display: flex; justify-content: space-between; font-size: 0.8rem; padding: 5px 0; color: var(--text-secondary); }
.send-stat-row strong { color: var(--text); font-family: var(--font-mono); font-size: 0.75rem; }
.comms-editor { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); overflow: hidden; }
.editor-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid var(--border-light); background: var(--bg-elevated); }
.editor-label { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.email-preview { padding: 18px; }
.email-field { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border-light); font-size: 0.85rem; }
.email-field label { font-weight: 600; color: var(--text-muted); min-width: 60px; }
.email-body { padding: 16px 0; font-size: 0.88rem; line-height: 1.7; color: var(--text-secondary); outline: none; min-height: 250px; }
.email-body p { margin-bottom: 12px; }
.email-body ul, .email-body ol { margin-left: 20px; margin-bottom: 12px; }
.email-body li { margin-bottom: 4px; }
.email-body strong { color: var(--text); }
.editor-footer { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-top: 1px solid var(--border-light); background: var(--bg-elevated); }
.email-count { font-size: 0.8rem; color: var(--text-muted); }

/* TOAST */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 18px; background: var(--text); color: white; border-radius: var(--radius-md); font-size: 0.85rem; font-weight: 500; box-shadow: var(--shadow-lg); animation: toastIn 0.35s ease, toastOut 0.35s ease 3.5s forwards; max-width: 380px; }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(12px); } }

/* MODAL */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); backdrop-filter: blur(4px); z-index: 150; display: flex; align-items: center; justify-content: center; animation: fadeOverlay 0.25s ease; }
.modal-overlay.hidden { display: none; }
@keyframes fadeOverlay { from { opacity: 0; } to { opacity: 1; } }
.modal { background: var(--bg-card); border-radius: var(--radius-lg); padding: 28px; max-width: 560px; width: 90%; max-height: 85vh; overflow-y: auto; box-shadow: var(--shadow-lg); animation: modalIn 0.3s cubic-bezier(0.34,1.56,0.64,1); position: relative; }
@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(12px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-close { position: absolute; top: 14px; right: 14px; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border: none; background: var(--bg-elevated); border-radius: 50%; font-size: 1rem; color: var(--text-muted); cursor: pointer; transition: var(--transition); }
.modal-close:hover { background: var(--danger-soft); color: var(--danger); }
.modal-content h2 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 500; margin-bottom: 18px; }
.modal-content p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 10px; }

/* Applicant detail modal */
.applicant-detail { display: flex; flex-direction: column; gap: 16px; }
.applicant-detail-header { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--border-light); }
.applicant-detail-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 600; font-size: 1rem; }
.applicant-detail-name { font-family: var(--font-display); font-size: 1.2rem; font-weight: 500; }
.applicant-detail-score { margin-left: auto; }
.detail-section { margin-bottom: 4px; }
.detail-section h4 { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 8px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.detail-item { display: flex; flex-direction: column; padding: 6px 0; }
.detail-item-label { font-size: 0.73rem; color: var(--text-muted); }
.detail-item-value { font-size: 0.88rem; font-weight: 500; }
.ai-reasoning { padding: 12px 14px; background: var(--accent-soft); border-radius: var(--radius-sm); border-left: 3px solid var(--accent); font-size: 0.83rem; line-height: 1.6; color: var(--text-secondary); }
.ai-reasoning strong { color: var(--accent); }

.hidden { display: none !important; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

@media (max-width: 1100px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .screening-layout { grid-template-columns: 1fr; }
    .screening-filters { position: static; }
    .viewings-layout { grid-template-columns: 1fr; }
    .comms-layout { grid-template-columns: 1fr; }
    .detail-hero { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .top-nav { padding: 0 12px; }
    .nav-center { display: none; }
    .main-content { padding: 16px; }
    .stats-grid { grid-template-columns: 1fr; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .listings-grid { grid-template-columns: 1fr; }
    .app-row { grid-template-columns: 40px 1fr 0.6fr 32px; }
    .app-row .hide-mobile { display: none; }
}
