/* =============================================================================
   SafalHires — global CSS (testcolors: cyan #0891B2 → violet #6D5FC8)
   Loaded by auth layout, app base, and public landing.
   ============================================================================= */

/* Smooth scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

html.dark ::-webkit-scrollbar-thumb { background: #475569; }
html.dark ::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* Dark mode: helper text / captions — prefer over text-slate-500 on slate-900 backgrounds */
html.dark .sh-dark-caption {
    color: #94a3b8; /* slate-400 */
}

/* Lucide icon defaults */
[data-lucide] { width: 20px; height: 20px; stroke-width: 1.8; }

/* ── Brand gradient fills (replaces flat bg-brand-600 “teal” buttons) ── */
.sh-btn-primary {
    background: linear-gradient(135deg, #0891B2, #6D5FC8);
    color: #fff;
    box-shadow: 0 2px 10px rgba(8, 145, 178, 0.3);
    transition: opacity 0.2s, box-shadow 0.2s, transform 0.15s;
}
.sh-btn-primary:hover {
    opacity: 0.94;
    box-shadow: 0 4px 18px rgba(8, 145, 178, 0.4);
}

.sh-g-brand {
    background: linear-gradient(135deg, #0891B2, #6D5FC8);
}
.sh-g-brand-hover:hover {
    opacity: 0.92;
    box-shadow: 0 4px 18px rgba(8, 145, 178, 0.4);
}
.sh-shadow-brand {
    box-shadow: 0 2px 10px rgba(8, 145, 178, 0.3);
}

/* Small gradient disc / step number */
.sh-pill-brand {
    background: linear-gradient(135deg, #0891B2, #6D5FC8);
    color: #fff;
    box-shadow: 0 2px 8px rgba(8, 145, 178, 0.25);
}

/* SafalHires sourcing upsell banner (edit requirement — violet utilities not in compiled Tailwind) */
.sh-sourcing-banner {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    border-radius: 1rem;
    border: 1.5px dashed #a78bfa;
    background: linear-gradient(90deg, #f5f3ff 0%, #ffffff 45%, #ecfeff 100%);
    box-shadow: 0 1px 4px rgba(109, 95, 200, 0.1);
}
@media (min-width: 640px) {
    .sh-sourcing-banner {
        flex-direction: row;
        align-items: center;
    }
}
html.dark .sh-sourcing-banner {
    border-color: #7c3aed;
    background: linear-gradient(90deg, rgba(76, 29, 149, 0.28) 0%, #1e293b 45%, rgba(8, 145, 178, 0.14) 100%);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
.sh-sourcing-banner-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0891B2, #6D5FC8);
    box-shadow: 0 2px 8px rgba(8, 145, 178, 0.35);
}
.sh-sourcing-enable-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.625rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    cursor: pointer;
    background: linear-gradient(135deg, #0891B2, #6D5FC8);
    color: #fff !important;
    box-shadow: 0 2px 10px rgba(8, 145, 178, 0.35);
    transition: opacity 0.2s, box-shadow 0.2s, transform 0.15s;
}
.sh-sourcing-enable-btn:hover:not(:disabled) {
    opacity: 0.94;
    box-shadow: 0 4px 18px rgba(8, 145, 178, 0.45);
}
.sh-sourcing-enable-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Gradient text */
.sh-text-gradient {
    background: linear-gradient(135deg, #0891B2, #6D5FC8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Structured prose blocks (Professional Summary, AI Reasoning etc.).
   Keeps long, server-formatted text readable: proper spacing between
   sections, bullets and paragraphs, with sensible break behaviour on
   narrow screens. */
.sh-prose > *:first-child { margin-top: 0 !important; }
.sh-prose > *:last-child  { margin-bottom: 0 !important; }
.sh-prose h5 { letter-spacing: 0.06em; }
.sh-prose ul { padding-left: 1.25rem; }
.sh-prose li + li { margin-top: 0.35rem; }
.sh-prose p + ul,
.sh-prose ul + p,
.sh-prose h5 + p,
.sh-prose h5 + ul { margin-top: 0.25rem; }
.sh-prose { overflow-wrap: anywhere; word-break: break-word; }

html.dark .sh-text-gradient {
    background: linear-gradient(135deg, #5eead4, #c4b5fd);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Sidebar active row (used in base.html) */
.sh-nav-active {
    background: linear-gradient(135deg, #E0F5FA, #EEEAFC);
    border: 1px solid #BAE8F5;
}
html.dark .sh-nav-active {
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.15), rgba(109, 95, 200, 0.12));
    border-color: rgba(8, 145, 178, 0.35);
}
.sh-nav-indicator {
    background: linear-gradient(180deg, #0891B2, #6D5FC8);
}

/* Table row “View” etc. */
a.sh-ghost-to-primary:hover,
button.sh-ghost-to-primary:hover {
    background: linear-gradient(135deg, #0891B2, #6D5FC8) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 2px 10px rgba(8, 145, 178, 0.3);
}

/* Secondary “Unlock” — visible cyan→violet border + soft gradient fill
   Do NOT combine with Tailwind border-0 (it zeroes border-width and hides the ring). */
.sh-btn-unlock {
    border: 2px solid transparent;
    background:
        linear-gradient(135deg, #ecfeff 0%, #f5f3ff 55%, #faf5ff 100%) padding-box,
        linear-gradient(135deg, #0891b2, #6d5fc8) border-box;
    color: #4c3d9e;
    box-shadow: 0 1px 4px rgba(8, 145, 178, 0.15), 0 0 0 1px rgba(109, 95, 200, 0.06);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s, opacity 0.2s, transform 0.15s;
}
html.dark .sh-btn-unlock {
    color: #ddd6fe;
    background:
        linear-gradient(135deg, rgba(8, 145, 178, 0.14) 0%, rgba(109, 95, 200, 0.12) 100%) padding-box,
        linear-gradient(135deg, #22b2c9, #8478e0) border-box;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
.sh-btn-unlock:hover {
    background:
        linear-gradient(135deg, #cffafe 0%, #ede9fe 50%, #f5f3ff 100%) padding-box,
        linear-gradient(135deg, #0891b2, #6d5fc8) border-box;
    color: #3730a3;
    box-shadow: 0 3px 12px rgba(8, 145, 178, 0.22), 0 0 0 1px rgba(109, 95, 200, 0.12);
    transform: translateY(-1px);
}
html.dark .sh-btn-unlock:hover {
    background:
        linear-gradient(135deg, rgba(8, 145, 178, 0.22) 0%, rgba(109, 95, 200, 0.2) 100%) padding-box,
        linear-gradient(135deg, #2dd4bf, #a78bfa) border-box;
    color: #f5f3ff;
}
.sh-btn-unlock:disabled {
    opacity: 0.55;
    transform: none;
    cursor: not-allowed;
}

/* Small toolbar icon (e.g. requirement info) — same family, no flat teal fill */
.sh-soft-brand-icon {
    border: 1px solid transparent;
    background:
        linear-gradient(#f8fafc, #f8fafc) padding-box,
        linear-gradient(135deg, rgba(8, 145, 178, 0.35), rgba(109, 95, 200, 0.4)) border-box;
    color: #5b4eb0;
    transition: background 0.2s, color 0.2s;
}
html.dark .sh-soft-brand-icon {
    color: #a5b4fc;
    background:
        linear-gradient(rgb(30, 41, 59), rgb(30, 41, 59)) padding-box,
        linear-gradient(135deg, rgba(8, 145, 178, 0.35), rgba(109, 95, 200, 0.4)) border-box;
}
.sh-soft-brand-icon:hover {
    background:
        linear-gradient(#e0f5fa, #eeedfc) padding-box,
        linear-gradient(135deg, #0891b2, #6d5fc8) border-box;
    color: #3730a3;
}
html.dark .sh-soft-brand-icon:hover {
    background:
        linear-gradient(rgba(8, 145, 178, 0.2), rgba(109, 95, 200, 0.18)) padding-box,
        linear-gradient(135deg, #0891b2, #6d5fc8) border-box;
    color: #ddd6fe;
}

/* ── Candidate table: score chips — 5-tier system ── */
.sh-chip-score-excellent,
.sh-chip-score-high,
.sh-chip-score-good,
.sh-chip-score-mid,
.sh-chip-score-low {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.375rem;
    padding: 0.125rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.25;
}

/* 90%+ — vivid brand gradient chip */
.sh-chip-score-excellent {
    background: linear-gradient(135deg, #0891B2, #6D5FC8);
    color: #fff;
    border: 1px solid transparent;
    box-shadow: 0 1px 6px rgba(8, 145, 178, 0.25);
}
html.dark .sh-chip-score-excellent {
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.55), rgba(109, 95, 200, 0.5));
    color: #f0fdfa;
    box-shadow: 0 1px 6px rgba(8, 145, 178, 0.3);
}

/* 80–89% — strong brand tint */
.sh-chip-score-high {
    background: linear-gradient(135deg, #cffafe, #ede9fe);
    color: #3730a3;
    border: 1px solid rgba(109, 95, 200, 0.28);
    box-shadow: 0 1px 3px rgba(8, 145, 178, 0.1);
}
html.dark .sh-chip-score-high {
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.3), rgba(109, 95, 200, 0.25));
    color: #ddd6fe;
    border-color: rgba(167, 139, 250, 0.35);
}

/* 70–79% — softer brand */
.sh-chip-score-good {
    background: linear-gradient(135deg, #e0f5fa, #eeeafc);
    color: #5b4eb0;
    border: 1px solid rgba(109, 95, 200, 0.18);
}
html.dark .sh-chip-score-good {
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.18), rgba(109, 95, 200, 0.14));
    color: #c4b5fd;
    border-color: rgba(167, 139, 250, 0.25);
}

/* 60–69% — neutral slate with hint of brand */
.sh-chip-score-mid {
    background: linear-gradient(135deg, #f1f5f9, #f8fafc);
    color: #64748b;
    border: 1px solid rgba(148, 163, 184, 0.4);
}
html.dark .sh-chip-score-mid {
    background: linear-gradient(135deg, rgba(51, 65, 85, 0.65), rgba(30, 41, 59, 0.8));
    color: #94a3b8;
    border-color: rgba(100, 116, 139, 0.45);
}

/* <60% — rose/red warning */
.sh-chip-score-low {
    background: linear-gradient(135deg, #fff1f2, #ffe4e6);
    color: #9f1239;
    border: 1px solid rgba(244, 63, 94, 0.22);
}
html.dark .sh-chip-score-low {
    background: rgba(136, 19, 55, 0.28);
    color: #fda4af;
    border-color: rgba(251, 113, 133, 0.28);
}

/* Profile / header: same tier colors, readable size */
.sh-chip-score-excellent.sh-chip-pill-lg,
.sh-chip-score-high.sh-chip-pill-lg,
.sh-chip-score-good.sh-chip-pill-lg,
.sh-chip-score-mid.sh-chip-pill-lg,
.sh-chip-score-low.sh-chip-pill-lg {
    font-size: 0.875rem;
    padding: 0.35rem 0.85rem;
    min-width: 0;
    border-radius: 9999px;
}

/* ── Pre-screen score chips: emerald-gold palette (distinct from AI Match blue/purple) ── */
.sh-chip-p2-excellent {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    border: 1px solid transparent;
    box-shadow: 0 1px 6px rgba(245, 158, 11, 0.35);
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 2.375rem; padding: 0.125rem 0.5rem;
    border-radius: 0.375rem; font-size: 0.72rem; font-weight: 700; line-height: 1.25;
}
html.dark .sh-chip-p2-excellent {
    background: linear-gradient(135deg, rgba(245,158,11,.8), rgba(217,119,6,.75));
    color: #fef3c7;
    box-shadow: 0 1px 6px rgba(245,158,11,.3);
}
.sh-chip-p2-high {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border: 1px solid rgba(16,185,129,.3);
    box-shadow: 0 1px 3px rgba(16,185,129,.12);
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 2.375rem; padding: 0.125rem 0.5rem;
    border-radius: 0.375rem; font-size: 0.72rem; font-weight: 700; line-height: 1.25;
}
html.dark .sh-chip-p2-high {
    background: linear-gradient(135deg, rgba(16,185,129,.3), rgba(5,150,105,.25));
    color: #6ee7b7; border-color: rgba(52,211,153,.35);
}
.sh-chip-p2-mid {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid rgba(22,163,74,.22);
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 2.375rem; padding: 0.125rem 0.5rem;
    border-radius: 0.375rem; font-size: 0.72rem; font-weight: 600; line-height: 1.25;
}
html.dark .sh-chip-p2-mid {
    background: rgba(22,163,74,.15); color: #86efac; border-color: rgba(74,222,128,.25);
}
.sh-chip-p2-low {
    background: #f8fafc;
    color: #94a3b8;
    border: 1px solid rgba(148,163,184,.35);
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 2.375rem; padding: 0.125rem 0.5rem;
    border-radius: 0.375rem; font-size: 0.72rem; font-weight: 600; line-height: 1.25;
}
html.dark .sh-chip-p2-low {
    background: rgba(51,65,85,.5); color: #94a3b8; border-color: rgba(100,116,139,.4);
}
.sh-chip-p2-excellent.sh-chip-pill-lg,
.sh-chip-p2-high.sh-chip-pill-lg,
.sh-chip-p2-mid.sh-chip-pill-lg,
.sh-chip-p2-low.sh-chip-pill-lg {
    font-size: 0.875rem;
    padding: 0.35rem 0.85rem;
    min-width: 0;
    border-radius: 9999px;
}

/* ── Top Pick badge (AI match >= 70, screened score >= 8, stability >= 85) ── */
.sh-top-pick-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 1px 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fef08a, #fde68a);
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, .45);
    box-shadow: 0 0 0 1.5px rgba(245, 158, 11, .18);
    white-space: nowrap;
}
html.dark .sh-top-pick-badge {
    background: linear-gradient(135deg, rgba(245, 158, 11, .35), rgba(217, 119, 6, .3));
    color: #fde68a;
    border-color: rgba(245, 158, 11, .4);
}
tr.sh-top-pick-row {
    background: linear-gradient(to right, rgba(254,243,199,.55), transparent 60%) !important;
    border-left: 3px solid #f59e0b !important;
}
html.dark tr.sh-top-pick-row {
    background: linear-gradient(to right, rgba(120,80,10,.18), transparent 60%) !important;
    border-left: 3px solid #f59e0b !important;
}

/* ── Stability chips — violet-dominant (vs cyan-dominant AI match) ── */
.sh-chip-stab-excellent,
.sh-chip-stab-high,
.sh-chip-stab-good,
.sh-chip-stab-mid,
.sh-chip-stab-low {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.375rem;
    padding: 0.125rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.25;
}

/* 90%+ — solid violet gradient */
.sh-chip-stab-excellent {
    background: linear-gradient(135deg, #6D5FC8, #9333ea);
    color: #fff;
    border: 1px solid transparent;
    box-shadow: 0 1px 6px rgba(109, 95, 200, 0.3);
}
html.dark .sh-chip-stab-excellent {
    background: linear-gradient(135deg, rgba(109, 95, 200, 0.6), rgba(147, 51, 234, 0.5));
    color: #f5f3ff;
    box-shadow: 0 1px 6px rgba(109, 95, 200, 0.35);
}

/* 80–89% — strong violet tint */
.sh-chip-stab-high {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    color: #4c1d95;
    border: 1px solid rgba(109, 95, 200, 0.3);
    box-shadow: 0 1px 3px rgba(109, 95, 200, 0.1);
}
html.dark .sh-chip-stab-high {
    background: linear-gradient(135deg, rgba(109, 95, 200, 0.32), rgba(147, 51, 234, 0.22));
    color: #ddd6fe;
    border-color: rgba(167, 139, 250, 0.4);
}

/* 70–79% — lighter violet tint */
.sh-chip-stab-good {
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
    color: #5b21b6;
    border: 1px solid rgba(109, 95, 200, 0.2);
}
html.dark .sh-chip-stab-good {
    background: linear-gradient(135deg, rgba(109, 95, 200, 0.18), rgba(88, 28, 135, 0.15));
    color: #c4b5fd;
    border-color: rgba(167, 139, 250, 0.28);
}

/* 60–69% — neutral slate */
.sh-chip-stab-mid {
    background: linear-gradient(135deg, #f1f5f9, #f8fafc);
    color: #64748b;
    border: 1px solid rgba(148, 163, 184, 0.4);
}
html.dark .sh-chip-stab-mid {
    background: linear-gradient(135deg, rgba(51, 65, 85, 0.65), rgba(30, 41, 59, 0.8));
    color: #94a3b8;
    border-color: rgba(100, 116, 139, 0.45);
}

/* <60% — rose/red */
.sh-chip-stab-low {
    background: linear-gradient(135deg, #fff1f2, #ffe4e6);
    color: #9f1239;
    border: 1px solid rgba(244, 63, 94, 0.22);
}
html.dark .sh-chip-stab-low {
    background: rgba(136, 19, 55, 0.28);
    color: #fda4af;
    border-color: rgba(251, 113, 133, 0.28);
}

/* CTC / compact metric pill */
.sh-chip-metric {
    display: inline-block;
    max-width: 100%;
    padding: 0.2rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    background: linear-gradient(135deg, #f8fafc, #f0f9ff);
    color: #475569;
    border: 1px solid rgba(8, 145, 178, 0.14);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}
html.dark .sh-chip-metric {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(8, 145, 178, 0.1));
    color: #cbd5e1;
    border-color: rgba(109, 95, 200, 0.22);
}

/* Secondary metric (e.g. notice period) — neutral slate, still tidy */
.sh-chip-metric-neutral {
    display: inline-block;
    max-width: 100%;
    padding: 0.2rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    color: #64748b;
    border: 1px solid rgba(148, 163, 184, 0.35);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}
html.dark .sh-chip-metric-neutral {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(51, 65, 85, 0.5));
    color: #94a3b8;
    border-color: rgba(71, 85, 105, 0.55);
}

/* Reasoning icon cell */
.sh-icon-reasoning {
    border: 1px solid transparent;
    background:
        linear-gradient(#f8fafc, #faf5ff) padding-box,
        linear-gradient(135deg, rgba(8, 145, 178, 0.35), rgba(109, 95, 200, 0.4)) border-box;
    color: #5b4eb0;
}
html.dark .sh-icon-reasoning {
    background:
        linear-gradient(rgb(30, 41, 59), rgb(30, 41, 59)) padding-box,
        linear-gradient(135deg, rgba(8, 145, 178, 0.4), rgba(109, 95, 200, 0.45)) border-box;
    color: #a5b4fc;
}
.sh-icon-reasoning:hover {
    background:
        linear-gradient(#ecfeff, #f5f3ff) padding-box,
        linear-gradient(135deg, #0891b2, #6d5fc8) border-box;
    color: #3730a3;
}
html.dark .sh-icon-reasoning:hover {
    background:
        linear-gradient(rgba(8, 145, 178, 0.2), rgba(109, 95, 200, 0.18)) padding-box,
        linear-gradient(135deg, #22b2c9, #a78bfa) border-box;
    color: #f5f3ff;
}

/* Gaps / mismatch icon (theme alert, not amber) */
.sh-icon-gaps {
    border: 1px solid transparent;
    background:
        linear-gradient(#faf5ff, #fdf2f8) padding-box,
        linear-gradient(135deg, #6d5fc8, #db2777) border-box;
    color: #7c3aed;
}
html.dark .sh-icon-gaps {
    background:
        linear-gradient(rgba(49, 46, 129, 0.35), rgba(136, 19, 55, 0.2)) padding-box,
        linear-gradient(135deg, #a78bfa, #f472b6) border-box;
    color: #e9d5ff;
}
.sh-icon-gaps:hover {
    opacity: 0.92;
    box-shadow: 0 2px 8px rgba(109, 95, 200, 0.25);
}

/* Stepper in-progress pulse */
@keyframes sh-step-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(8, 145, 178, 0.45); }
    50%      { box-shadow: 0 0 0 8px rgba(8, 145, 178, 0); }
}
.sh-step-active {
    animation: sh-step-pulse 2s ease-in-out infinite;
}

/* Unlock button subtle glow pulse */
@keyframes sh-unlock-glow {
    0%, 100% { box-shadow: 0 1px 3px rgba(8, 145, 178, 0.2); }
    50%      { box-shadow: 0 2px 12px rgba(8, 145, 178, 0.35), 0 0 0 3px rgba(109, 95, 200, 0.1); }
}
.sh-btn-unlock {
    animation: sh-unlock-glow 2.5s ease-in-out infinite;
}
.sh-btn-unlock:hover {
    animation: none;
}

/* Table row entrance animation */
@keyframes sh-row-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
#candTable tbody tr {
    animation: sh-row-fade-in 0.3s ease-out both;
}
#candTable tbody tr:nth-child(1)  { animation-delay: 0ms; }
#candTable tbody tr:nth-child(2)  { animation-delay: 30ms; }
#candTable tbody tr:nth-child(3)  { animation-delay: 60ms; }
#candTable tbody tr:nth-child(4)  { animation-delay: 90ms; }
#candTable tbody tr:nth-child(5)  { animation-delay: 120ms; }
#candTable tbody tr:nth-child(6)  { animation-delay: 150ms; }
#candTable tbody tr:nth-child(7)  { animation-delay: 180ms; }
#candTable tbody tr:nth-child(8)  { animation-delay: 210ms; }
#candTable tbody tr:nth-child(9)  { animation-delay: 240ms; }
#candTable tbody tr:nth-child(10) { animation-delay: 270ms; }

/* Plain text from DB (resume_text, AI reasoning): preserve newlines; wrap long lines / dash rules */
.sh-preformatted-body {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
}

/* Candidates topbar — job requirement picker */
.cand-job-picker {
    flex-shrink: 0;
    min-width: 13.5rem;
    width: min(26rem, calc(100vw - 7rem));
    max-width: 26rem;
}
@media (min-width: 640px) {
    .cand-job-picker {
        min-width: 16rem;
        width: min(28rem, 44vw);
        max-width: 28rem;
    }
}
@media (min-width: 1024px) {
    .cand-job-picker {
        min-width: 18rem;
        width: min(32rem, 36vw);
        max-width: 32rem;
    }
}
#candJobBtn {
    padding-right: 2.25rem;
}
#candJobDropdown {
    width: max(100%, min(22rem, calc(100vw - 2rem)));
}

/* Assign Requirement — scrollable recruiter picker */
.assign-recruiter-panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: 28rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    background: #fff;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}
html.dark .assign-recruiter-panel {
    border-color: #475569;
    background: #1e293b;
    box-shadow: none;
}
.assign-recruiter-search {
    display: block;
    width: 100%;
    box-sizing: border-box;
    border: 0;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.65rem 0.85rem;
    font-size: 0.8125rem;
    color: #334155;
    background: #f8fafc;
    outline: none;
}
.assign-recruiter-search:focus {
    background: #fff;
    box-shadow: inset 0 0 0 2px rgba(8, 145, 178, 0.35);
}
html.dark .assign-recruiter-search {
    border-bottom-color: #475569;
    color: #e2e8f0;
    background: #0f172a;
}
html.dark .assign-recruiter-search:focus { background: #1e293b; }
.assign-recruiter-selected-bar {
    flex-shrink: 0;
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #f0fdfa 0%, #f8fafc 100%);
}
html.dark .assign-recruiter-selected-bar {
    border-bottom-color: #475569;
    background: linear-gradient(180deg, rgba(8, 145, 178, 0.12) 0%, #0f172a 100%);
}
.assign-recruiter-selected-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}
.assign-recruiter-selected-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #0f766e;
}
html.dark .assign-recruiter-selected-title { color: #5eead4; }
.assign-recruiter-filter-btn {
    border: 1px solid #99f6e4;
    background: #fff;
    color: #0f766e;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
}
.assign-recruiter-filter-btn.is-active {
    background: #0891B2;
    border-color: #0891B2;
    color: #fff;
}
.assign-recruiter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    max-height: 4.5rem;
    overflow-y: auto;
}
.assign-recruiter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border: 1px solid #67e8f9;
    background: #fff;
    color: #0f766e;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.2rem 0.45rem 0.2rem 0.55rem;
    border-radius: 999px;
    cursor: pointer;
}
.assign-recruiter-none-selected {
    font-size: 0.6875rem;
    color: #64748b;
    font-style: italic;
}
.assign-recruiter-scroll {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 17.5rem;
    overflow-x: hidden;
    overflow-y: scroll;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding: 0.5rem;
}
.assign-recruiter-row {
    display: flex !important;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.625rem;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 0.375rem 0;
    padding: 0.55rem 0.65rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #fff;
    cursor: pointer;
    text-align: left;
}
.assign-recruiter-row:last-child { margin-bottom: 0; }
.assign-recruiter-row:hover { background: #f8fafc; }
.assign-recruiter-row:has(input:checked) {
    background: #ecfeff;
    border-color: #67e8f9;
}
html.dark .assign-recruiter-row {
    border-color: #475569;
    background: #0f172a;
}
html.dark .assign-recruiter-row:hover { background: #334155; }
html.dark .assign-recruiter-row:has(input:checked) {
    background: rgba(8, 145, 178, 0.18);
    border-color: #0891B2;
}
.assign-recruiter-row.is-hidden { display: none !important; }
.assign-recruiter-row input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    margin: 0.125rem 0 0 0;
    flex-shrink: 0;
}
.assign-recruiter-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    flex: 1 1 auto;
}
.assign-recruiter-name {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.35;
}
html.dark .assign-recruiter-name { color: #f1f5f9; }
.assign-recruiter-email {
    display: block;
    font-size: 0.6875rem;
    color: #64748b;
    line-height: 1.35;
    word-break: break-all;
}
html.dark .assign-recruiter-email { color: #94a3b8; }
.assign-recruiter-footer {
    flex-shrink: 0;
    padding: 0.45rem 0.75rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 0.6875rem;
    color: #64748b;
}
html.dark .assign-recruiter-footer {
    border-top-color: #475569;
    background: #0f172a;
    color: #94a3b8;
}
.assign-recruiter-empty {
    padding: 1.25rem 0.75rem;
    text-align: center;
    font-size: 0.8125rem;
    color: #64748b;
}
.assign-recruiter-savebar {
    display: none;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 0.75rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid #fcd34d;
    border-radius: 0.75rem;
    background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
}
.assign-recruiter-savebar.is-visible { display: flex; }
.assign-recruiter-savebar-msg {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #92400e;
}
.assign-recruiter-savebar-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.assign-recruiter-btn-cancel,
.assign-recruiter-btn-save {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.25rem;
    padding: 0.45rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
}
.assign-recruiter-btn-cancel {
    background: #fff;
    border: 1px solid #cbd5e1;
    color: #475569;
}
.assign-recruiter-btn-save {
    border: 0;
    background: linear-gradient(135deg, #0891B2, #6D5FC8);
    color: #fff;
}

/* Print — hide sidebar & topbar */
@media print {
    #sidebar, #sidebarOverlay, .sh-topbar, nav { display: none !important; }
    #mainArea { margin-left: 0 !important; }
    body { background: #fff !important; }
}
