/* ============================================================
 * JR ATS — AI Recruiter Search  [jr_employer_recruiter_search]
 * Scoped under .jrrs to avoid collisions with global jrats-* rules.
 * Brand primary: #5277ba
 * ============================================================ */

.jrrs {
    --jrrs-brand: #5277ba;
    --jrrs-brand-dark: #3f5f9e;
    --jrrs-brand-soft: #eef3fb;
    --jrrs-ink: #1f2937;
    --jrrs-muted: #6b7280;
    --jrrs-line: #e5e7eb;
    --jrrs-bg: #f9fafb;
    --jrrs-green: #10b981;
    --jrrs-radius: 14px;
    max-width: 1180px;
    margin: 0 auto;
    color: var(--jrrs-ink);
    font-size: 14px;
}

.jrrs *,
.jrrs *::before,
.jrrs *::after { box-sizing: border-box; }

/* ---------- Header ---------- */
.jrrs-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.jrrs-header__title {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--jrrs-ink);
}
.jrrs-header__subtitle {
    margin: 4px 0 0;
    color: var(--jrrs-muted);
    font-size: 14px;
}
.jrrs-header__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.jrrs-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    border: 1px solid var(--jrrs-line);
    background: #fff;
    color: var(--jrrs-ink);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.jrrs-pill-btn:hover { border-color: var(--jrrs-brand); box-shadow: 0 2px 8px rgba(82,119,186,.12); }

/* ---------- Dropdown panels (saved / history) ---------- */
.jrrs-panel-wrap { position: relative; }
.jrrs-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 320px;
    max-width: 86vw;
    background: #fff;
    border: 1px solid var(--jrrs-line);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,.12);
    padding: 12px;
    z-index: 40;
    display: none;
}
.jrrs-panel.is-open { display: block; }
.jrrs-panel__title { font-weight: 700; font-size: 13px; margin: 0 0 8px; }
.jrrs-panel__empty { color: var(--jrrs-muted); font-size: 13px; padding: 8px 2px; }
.jrrs-panel__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px;
    border-radius: 8px;
}
.jrrs-panel__row:hover { background: var(--jrrs-brand-soft); }
.jrrs-panel__link {
    color: var(--jrrs-brand-dark);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.jrrs-panel__del {
    border: none;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 6px;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 12px;
    line-height: 1;
}
.jrrs-panel__del:hover { background: #fee2e2; color: #b91c1c; }

/* ---------- Generic card ---------- */
.jrrs-card {
    background: #fff;
    border: 1px solid var(--jrrs-line);
    border-radius: var(--jrrs-radius);
    padding: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

/* ---------- Stats row ---------- */
.jrrs-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}
.jrrs-stat {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.jrrs-stat__icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.jrrs-stat__icon--a { background: #eef3fb; color: var(--jrrs-brand); }
.jrrs-stat__icon--b { background: #ecfdf5; color: #059669; }
.jrrs-stat__icon--c { background: #eff6ff; color: #2563eb; }
.jrrs-stat__icon--d { background: #fff7ed; color: #d97706; }
.jrrs-stat__icon--e { background: #f5f0ff; color: #7c3aed; }
.jrrs-stat__label { font-size: 12px; color: var(--jrrs-muted); font-weight: 600; }
.jrrs-stat__num { font-size: 22px; font-weight: 800; line-height: 1.1; margin: 2px 0; }
.jrrs-stat__desc { font-size: 11px; color: #9ca3af; }

/* ---------- AI Recruiter Search card ---------- */
.jrrs-ai {
    position: relative;
    border: 1px solid #d6e0f2;
    background: linear-gradient(180deg, #f7faff 0%, #ffffff 70%);
    border-radius: var(--jrrs-radius);
    padding: 20px;
    margin-bottom: 18px;
}
.jrrs-ai__head { display: flex; align-items: flex-start; gap: 14px; }
.jrrs-ai__avatar {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, #5277ba 0%, #6b4fb0 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}
.jrrs-ai__titles { flex: 1; min-width: 0; }
.jrrs-ai__title { margin: 0; font-size: 18px; font-weight: 800; display: inline-flex; align-items: center; gap: 10px; }
.jrrs-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--jrrs-brand-soft);
    color: var(--jrrs-brand-dark);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .03em;
    border: 1px solid #d6e0f2;
}
.jrrs-ai__desc { margin: 4px 0 0; color: var(--jrrs-muted); font-size: 13px; }
.jrrs-ai__sparkle { position: absolute; top: 18px; right: 20px; color: var(--jrrs-brand); font-size: 20px; opacity: .8; }

.jrrs-ai__body {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 16px;
    margin-top: 14px;
}
.jrrs-ai__textarea {
    width: 100%;
    min-height: 92px;
    resize: vertical;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: var(--jrrs-ink);
}
.jrrs-ai__textarea:focus {
    outline: none;
    border-color: var(--jrrs-brand);
    box-shadow: 0 0 0 3px rgba(82,119,186,.18);
}
.jrrs-ai__example {
    border: 1px dashed #c7d4ec;
    background: #f7faff;
    border-radius: 12px;
    padding: 12px 14px;
    cursor: pointer;
    position: relative;
    transition: border-color .15s ease, background .15s ease;
}
.jrrs-ai__example:hover { border-color: var(--jrrs-brand); background: #eef3fb; }
.jrrs-ai__example-kicker { font-size: 11px; font-weight: 800; color: var(--jrrs-brand-dark); }
.jrrs-ai__example-text { font-size: 12.5px; color: #475569; margin-top: 4px; line-height: 1.5; }
.jrrs-ai__example-arrow { position: absolute; right: 12px; bottom: 10px; color: #94a3b8; font-size: 16px; }

/* ---------- Filters grid (Quick + Advanced) ---------- */
.jrrs-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
    margin-bottom: 18px;
}
.jrrs-card__head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.jrrs-card__head-icon { color: var(--jrrs-brand); font-size: 18px; }
.jrrs-card__title { margin: 0; font-size: 16px; font-weight: 800; }
.jrrs-card__hint { margin: 0; font-size: 12px; color: var(--jrrs-muted); }

.jrrs-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.jrrs-field { display: block; }
.jrrs-field > label { display: block; font-size: 12px; font-weight: 700; color: #374151; margin-bottom: 6px; }
.jrrs-control {
    position: relative;
    display: flex;
    align-items: center;
}
.jrrs-control > .jrrs-control__icon {
    position: absolute;
    left: 11px;
    font-size: 14px;
    color: #9ca3af;
    pointer-events: none;
}
.jrrs-input,
.jrrs-select {
    width: 100%;
    height: 44px;
    padding: 10px 12px 10px 34px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
    color: var(--jrrs-ink);
    font-family: inherit;
}
.jrrs-input:focus,
.jrrs-select:focus {
    outline: none;
    border-color: var(--jrrs-brand);
    box-shadow: 0 0 0 3px rgba(82,119,186,.18);
}
.jrrs-input::placeholder { color: #9ca3af; }

/* Ready-to-work toggle switch */
.jrrs-toggle-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    text-align: center;
}
.jrrs-switch { position: relative; display: inline-block; width: 50px; height: 28px; }
.jrrs-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.jrrs-switch__slider {
    position: absolute;
    inset: 0;
    background: #cbd5e1;
    border-radius: 999px;
    transition: background .2s ease;
    cursor: pointer;
}
.jrrs-switch__slider::before {
    content: '';
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.jrrs-switch input:checked + .jrrs-switch__slider { background: var(--jrrs-green); }
.jrrs-switch input:checked + .jrrs-switch__slider::before { transform: translateX(22px); }
.jrrs-switch input:focus-visible + .jrrs-switch__slider { box-shadow: 0 0 0 3px rgba(82,119,186,.35); }
.jrrs-toggle-label { font-size: 13px; font-weight: 700; color: #374151; }
.jrrs-toggle-desc { font-size: 11px; color: var(--jrrs-muted); line-height: 1.4; }

/* Quick filters action buttons */
.jrrs-actions { display: flex; gap: 12px; margin-top: 16px; }
.jrrs-btn {
    flex: 1;
    height: 46px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    text-decoration: none;
    font-family: inherit;
}
.jrrs-btn--primary { background: var(--jrrs-brand); color: #fff; }
.jrrs-btn--primary:hover { background: var(--jrrs-brand-dark); }
.jrrs-btn--ghost { background: #fff; color: var(--jrrs-ink); border-color: var(--jrrs-line); }
.jrrs-btn--ghost:hover { border-color: var(--jrrs-brand); color: var(--jrrs-brand-dark); }

/* Advanced filters collapse */
.jrrs-advanced { padding: 0; overflow: hidden; }
.jrrs-advanced > summary {
    list-style: none;
    cursor: pointer;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
}
.jrrs-advanced > summary::-webkit-details-marker { display: none; }
.jrrs-advanced__chevron { transition: transform .2s ease; color: var(--jrrs-muted); }
.jrrs-advanced[open] .jrrs-advanced__chevron { transform: rotate(180deg); }
.jrrs-advanced__inner { padding: 0 18px 18px; }

/* ---------- Active filter tags ---------- */
.jrrs-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.jrrs-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 11px;
    border-radius: 999px;
    background: var(--jrrs-brand-soft);
    color: var(--jrrs-brand-dark);
    font-size: 12px;
    font-weight: 600;
}
.jrrs-tag--clear {
    background: #f3f4f6;
    color: #111827;
    text-decoration: none;
}

/* ---------- Upgrade banner ---------- */
.jrrs-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: space-between;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #5277ba 0%, #6b4fb0 100%);
    color: #fff;
    border-radius: var(--jrrs-radius);
    padding: 20px 22px;
    margin-bottom: 18px;
}
.jrrs-banner__title { margin: 0; font-size: 17px; font-weight: 800; }
.jrrs-banner__text { margin: 4px 0 0; font-size: 13px; opacity: .92; max-width: 760px; line-height: 1.5; }
.jrrs-banner__btn {
    background: #fff;
    color: var(--jrrs-brand-dark);
    border: none;
    border-radius: 10px;
    padding: 11px 20px;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}
.jrrs-banner__btn:hover { background: #eef3fb; }

/* ---------- Bottom action tiles ---------- */
.jrrs-tiles {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 22px;
}
.jrrs-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    padding: 14px 10px;
    border: 1px solid var(--jrrs-line);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    font: inherit;
    color: var(--jrrs-ink);
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.jrrs-tile:hover { border-color: var(--jrrs-brand); box-shadow: 0 3px 10px rgba(82,119,186,.12); }
.jrrs-tile__icon { font-size: 20px; color: var(--jrrs-brand); }
.jrrs-tile__label { font-size: 12.5px; font-weight: 700; }
.jrrs-tile--soon { opacity: .85; }
.jrrs-soon {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .04em;
    color: #92400e;
    background: #fef3c7;
    border-radius: 999px;
    padding: 2px 6px;
}
.jrrs-tile--upgrade { background: var(--jrrs-brand-soft); border-color: #d6e0f2; }
.jrrs-tile--upgrade .jrrs-tile__label { color: var(--jrrs-brand-dark); }

/* ---------- Results ---------- */
.jrrs-results-head { font-size: 13px; color: #4b5563; margin: 4px 0 12px; }
.jrrs-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}
.jrrs-result-card {
    border: 1px solid var(--jrrs-line);
    border-radius: 12px;
    padding: 16px;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.jrrs-result-card:hover {
    border-color: var(--jrrs-brand);
    box-shadow: 0 6px 16px rgba(0,0,0,.06);
    transform: translateY(-1px);
}
.jrrs-result-card__top { display: flex; gap: 14px; align-items: flex-start; }
.jrrs-result-card__body { flex: 1; min-width: 0; }
.jrrs-result-card__nameline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.jrrs-advanced .jrrs-card__hint { display: block; }

/* Locked (gated) advanced-filters panel */
.jrrs-lock {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    padding: 24px 16px;
}
.jrrs-lock__icon { font-size: 28px; }
.jrrs-lock__text { margin: 0; color: var(--jrrs-muted); font-size: 13px; }
.jrrs-lock__btn { flex: 0 0 auto; min-width: 160px; }

/* Visible-but-locked (upsell) states — features stay shown but disabled */
.jrrs-card--locked .jrrs-grid2 { opacity: .6; }
.jrrs-input:disabled,
.jrrs-select:disabled { background: #f3f4f6; cursor: not-allowed; color: #9ca3af; }
.jrrs-badge--lock { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.jrrs-lock-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--jrrs-line);
}
.jrrs-lock-cta__text { font-size: 13px; color: var(--jrrs-muted); }
.jrrs-lock-cta__btn { flex: 0 0 auto; min-width: 140px; }
.jrrs-pill-btn--lock { opacity: .8; }
.jrrs-pill-btn--lock:hover { opacity: 1; }
.jrrs-lock-mini { font-size: 11px; }
.jrrs-ai__example.is-locked { opacity: .8; }
.jrrs-ai__example.is-locked .jrrs-ai__example-kicker { color: #92400e; }
.jrrs-avatar {
    width: 64px; height: 64px; border-radius: 50%;
    object-fit: cover; border: 2px solid var(--jrrs-line); display: block;
}
.jrrs-avatar--ph {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--jrrs-brand-soft); color: var(--jrrs-brand);
    font-size: 28px; border: 2px solid var(--jrrs-line);
}
.jrrs-result-card__name { font-weight: 800; font-size: 16px; line-height: 1.2; }
.jrrs-result-card__pos { font-size: 13px; color: var(--jrrs-muted); margin-top: 4px; }
.jrrs-result-card__meta { margin-top: 12px; font-size: 13px; line-height: 1.7; }
.jrrs-result-card__meta strong { color: #374151; }
.jrrs-empty {
    text-align: center;
    color: var(--jrrs-muted);
    padding: 40px 16px;
    border: 1px dashed var(--jrrs-line);
    border-radius: 12px;
    background: var(--jrrs-bg);
}

/* ---------- Pagination ---------- */
.jrrs-pagination { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.jrrs-pagination a {
    padding: 7px 12px;
    border: 1px solid var(--jrrs-line);
    border-radius: 8px;
    text-decoration: none;
    background: #fff;
    color: var(--jrrs-ink);
    font-size: 13px;
}
.jrrs-pagination a:hover { border-color: var(--jrrs-brand); }
.jrrs-pagination a.is-current { background: var(--jrrs-brand); color: #fff; border-color: var(--jrrs-brand); font-weight: 700; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .jrrs-stats { grid-template-columns: repeat(2, 1fr); }
    .jrrs-tiles { grid-template-columns: repeat(3, 1fr); }
    .jrrs-ai__body { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .jrrs-filters { grid-template-columns: 1fr; }
    .jrrs-grid2 { grid-template-columns: 1fr; }
    .jrrs-header__title { font-size: 22px; }
    .jrrs-result-card:hover { transform: none; }
}
@media (max-width: 560px) {
    .jrrs-stats { grid-template-columns: 1fr; }
    .jrrs-tiles { grid-template-columns: 1fr 1fr; }
    .jrrs-actions { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    .jrrs-result-card,
    .jrrs-switch__slider,
    .jrrs-switch__slider::before,
    .jrrs-advanced__chevron { transition: none; }
}

/* ============================================================
 * Phase 1 additions — Results toolbar, candidate cards v2,
 * selection, more-menu, bulk actions bar, grid/list views, toast.
 * ============================================================ */

/* ---------- Results toolbar ---------- */
.jrrs-rtoolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 12px 16px;
    margin-bottom: 14px;
}
.jrrs-rtoolbar__left { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.jrrs-rtoolbar__icon { color: var(--jrrs-brand); font-size: 17px; }
.jrrs-rtoolbar__count strong { font-weight: 800; }
.jrrs-rtoolbar__mid { display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.jrrs-rtoolbar__right { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.jrrs-selectall { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; cursor: pointer; }
.jrrs-selectall input { width: 16px; height: 16px; accent-color: var(--jrrs-brand); cursor: pointer; }

.jrrs-sort { display: inline-flex; align-items: center; gap: 8px; }
.jrrs-sort__label { font-size: 13px; color: var(--jrrs-muted); font-weight: 600; white-space: nowrap; }
.jrrs-sort__select { height: 38px; width: auto; min-width: 170px; padding-left: 12px; }

.jrrs-viewtoggle { display: inline-flex; border: 1px solid var(--jrrs-line); border-radius: 9px; overflow: hidden; }
.jrrs-viewtoggle__btn {
    border: none;
    background: #fff;
    padding: 8px 11px;
    font-size: 15px;
    cursor: pointer;
    color: var(--jrrs-muted);
    line-height: 1;
}
.jrrs-viewtoggle__btn + .jrrs-viewtoggle__btn { border-left: 1px solid var(--jrrs-line); }
.jrrs-viewtoggle__btn.is-active { background: var(--jrrs-brand); color: #fff; }

[data-jrrs-bulk-trigger]:disabled { opacity: .55; cursor: not-allowed; }
.jrrs-panel--left { left: 0; right: auto; }

/* ---------- Dropdown menu items (bulk + more) ---------- */
.jrrs-menu-item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    border: none;
    background: none;
    text-align: left;
    padding: 9px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--jrrs-ink);
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
}
.jrrs-menu-item:hover { background: var(--jrrs-brand-soft); color: var(--jrrs-brand-dark); }
.jrrs-menu-item.is-disabled { color: #9ca3af; cursor: not-allowed; }
.jrrs-menu-item.is-disabled:hover { background: none; color: #9ca3af; }
.jrrs-menu-item--danger { color: #b91c1c; }
.jrrs-menu-item--danger:hover { background: #fee2e2; color: #991b1b; }

/* ---------- Candidate card v2 ---------- */
.jrrs-check { display: inline-flex; align-items: flex-start; padding-top: 4px; cursor: pointer; }
.jrrs-check input { width: 17px; height: 17px; accent-color: var(--jrrs-brand); cursor: pointer; }
.jrrs-check__box { display: none; }

.jrrs-result-card.is-selected {
    border-color: var(--jrrs-brand);
    box-shadow: 0 0 0 2px rgba(82,119,186,.22);
    background: #fbfcff;
}

.jrrs-result-card__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 8px;
    font-size: 12.5px;
    color: var(--jrrs-muted);
}
.jrrs-fact { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }

.jrrs-more-wrap { margin-left: auto; }
.jrrs-iconbtn {
    border: 1px solid var(--jrrs-line);
    background: #fff;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    color: var(--jrrs-muted);
}
.jrrs-iconbtn:hover { border-color: var(--jrrs-brand); color: var(--jrrs-brand-dark); }
.jrrs-panel--more { width: 230px; }

/* Skill tags */
.jrrs-skilltags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.jrrs-skilltag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 7px;
    background: #f3f4f6;
    color: #374151;
    font-size: 12px;
    font-weight: 600;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.jrrs-skilltag--more { background: var(--jrrs-brand-soft); color: var(--jrrs-brand-dark); }

/* Card action buttons */
.jrrs-cardactions { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--jrrs-line); display: grid; gap: 8px; }
.jrrs-cardactions__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(86px, 1fr)); gap: 8px; }
.jrrs-abtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0 8px;
    border-radius: 9px;
    border: 1px solid var(--jrrs-line);
    background: #fff;
    color: var(--jrrs-ink);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    white-space: nowrap;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.jrrs-abtn:hover { border-color: var(--jrrs-brand); color: var(--jrrs-brand-dark); background: var(--jrrs-brand-soft); }
.jrrs-abtn--primary { background: var(--jrrs-brand); border-color: var(--jrrs-brand); color: #fff; }
.jrrs-abtn--primary:hover { background: var(--jrrs-brand-dark); border-color: var(--jrrs-brand-dark); color: #fff; }
.jrrs-abtn--accent { border-color: #d6e0f2; background: var(--jrrs-brand-soft); color: var(--jrrs-brand-dark); }
.jrrs-abtn--accent:hover { border-color: var(--jrrs-brand); }

/* ---------- List view ---------- */
.jrrs-results.is-list { grid-template-columns: 1fr; }
.jrrs-results.is-list .jrrs-result-card { display: grid; grid-template-columns: 1fr auto; gap: 10px 18px; align-items: start; }
.jrrs-results.is-list .jrrs-result-card__top { grid-column: 1; }
.jrrs-results.is-list .jrrs-skilltags { grid-column: 1; margin-top: 6px; }
.jrrs-results.is-list .jrrs-cardactions {
    grid-column: 2;
    grid-row: 1 / span 2;
    border-top: none;
    border-left: 1px solid var(--jrrs-line);
    padding: 0 0 0 18px;
    margin-top: 0;
    align-content: start;
    min-width: 270px;
}
.jrrs-results.is-list .jrrs-cardactions__row { grid-template-columns: 1fr 1fr; }

/* ---------- Bulk actions bar ---------- */
.jrrs-bulkbar {
    position: sticky;
    bottom: 14px;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid var(--jrrs-brand);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(31,41,55,.16);
}
.jrrs-bulkbar[hidden] { display: none; }
.jrrs-bulkbar__count { font-size: 13.5px; }
.jrrs-bulkbar__count strong { color: var(--jrrs-brand-dark); font-weight: 800; }
.jrrs-bulkbar__actions { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.jrrs-bulkbar__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 13px;
    border-radius: 9px;
    border: 1px solid var(--jrrs-line);
    background: #fff;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    color: var(--jrrs-ink);
    font-family: inherit;
}
.jrrs-bulkbar__btn:hover { border-color: var(--jrrs-brand); color: var(--jrrs-brand-dark); background: var(--jrrs-brand-soft); }
.jrrs-bulkbar__btn--solid { background: var(--jrrs-brand); border-color: var(--jrrs-brand); color: #fff; }
.jrrs-bulkbar__btn--solid:hover { background: var(--jrrs-brand-dark); color: #fff; }
.jrrs-bulkbar__clear {
    border: none;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 8px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
}
.jrrs-bulkbar__clear:hover { background: #fee2e2; color: #b91c1c; }

/* ---------- Toast ---------- */
.jrrs-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: #1f2937;
    color: #fff;
    border-radius: 10px;
    padding: 11px 18px;
    font-size: 13px;
    font-weight: 600;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    max-width: 88vw;
    text-align: center;
}
.jrrs-toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Responsive (Phase 1 additions) ---------- */
@media (max-width: 900px) {
    .jrrs-results.is-list .jrrs-result-card { grid-template-columns: 1fr; }
    .jrrs-results.is-list .jrrs-cardactions {
        grid-column: 1;
        grid-row: auto;
        border-left: none;
        border-top: 1px solid var(--jrrs-line);
        padding: 12px 0 0;
        margin-top: 12px;
        min-width: 0;
    }
}
@media (max-width: 768px) {
    .jrrs-rtoolbar { align-items: stretch; }
    .jrrs-rtoolbar__left, .jrrs-rtoolbar__mid, .jrrs-rtoolbar__right { width: 100%; justify-content: space-between; }
    .jrrs-viewtoggle { display: none; } /* single-column anyway on mobile */
    .jrrs-bulkbar { bottom: 8px; }
    .jrrs-bulkbar__actions { gap: 6px; }
    .jrrs-bulkbar__btn { padding: 0 10px; font-size: 12px; }
}
@media (max-width: 560px) {
    .jrrs-cardactions__row { grid-template-columns: 1fr 1fr; }
    .jrrs-sort__select { min-width: 0; flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .jrrs-toast, .jrrs-abtn { transition: none; }
}

/* ============================================================
 * Phase 2 additions — live action states + Invite modal.
 * ============================================================ */

/* Active (Saved / Following / Invited) button state */
.jrrs-abtn.is-active {
    background: var(--jrrs-brand-soft);
    border-color: var(--jrrs-brand);
    color: var(--jrrs-brand-dark);
    font-weight: 800;
}
.jrrs-abtn.is-active:hover { background: #e3ebf8; }

/* ---------- Invite modal ---------- */
.jrrs-modal {
    position: fixed;
    inset: 0;
    z-index: 99990;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.jrrs-modal[hidden] { display: none; }
.jrrs-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, .55);
}
.jrrs-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
}
.jrrs-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--jrrs-line, #e5e7eb);
}
.jrrs-modal__title { margin: 0; font-size: 17px; font-weight: 800; color: #1f2937; }
.jrrs-modal__x {
    border: none;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 8px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
}
.jrrs-modal__x:hover { background: #fee2e2; color: #b91c1c; }
.jrrs-modal__body { padding: 16px 18px; display: grid; gap: 14px; }
.jrrs-modal__target { margin: 0; font-size: 13px; font-weight: 700; color: #5277ba; }
.jrrs-modal__textarea {
    width: 100%;
    resize: vertical;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    color: #1f2937;
    background: #fff;
    min-height: 96px;
}
.jrrs-modal__textarea:focus {
    outline: none;
    border-color: #5277ba;
    box-shadow: 0 0 0 3px rgba(82, 119, 186, .18);
}
.jrrs-modal__error {
    margin: 0;
    font-size: 12.5px;
    font-weight: 700;
    color: #b91c1c;
    background: #fee2e2;
    border-radius: 8px;
    padding: 8px 11px;
}
.jrrs-modal__foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 18px;
    border-top: 1px solid var(--jrrs-line, #e5e7eb);
}
.jrrs-modal__btn { flex: 0 0 auto; min-width: 120px; height: 42px; }
.jrrs-modal__btn:disabled { opacity: .6; cursor: not-allowed; }
body.jrrs-modal-open { overflow: hidden; }

@media (max-width: 560px) {
    .jrrs-modal__dialog { max-width: 100%; }
    .jrrs-modal__foot { flex-direction: column-reverse; }
    .jrrs-modal__btn { width: 100%; }
}

/* ============================================================
 * Phase 3 additions — Match badge, min-criteria notice,
 * no-public-profile button state.
 * ============================================================ */

.jrrs-matchbadge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 7px;
    font-size: 11.5px;
    font-weight: 800;
    white-space: nowrap;
}
.jrrs-matchbadge[hidden] { display: none; }
.jrrs-matchbadge.is-high { background: #dcfce7; color: #15803d; }
.jrrs-matchbadge.is-mid  { background: #fef3c7; color: #b45309; }
.jrrs-matchbadge.is-low  { background: #f3f4f6; color: #6b7280; }

.jrrs-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid #fcd34d;
    background: #fffbeb;
    color: #92400e;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 600;
    margin-top: 16px;
}
.jrrs-notice__icon { font-size: 17px; }

.jrrs-abtn.is-noprofile { opacity: .55; cursor: not-allowed; }
.jrrs-abtn.is-noprofile:hover { background: var(--jrrs-brand); color: #fff; border-color: var(--jrrs-brand); }

/* ============================================================
 * Profile popup additions.
 * ============================================================ */

.jrrs-modal__dialog--profile { max-width: 560px; }

.jrrs-pbody { max-height: 62vh; overflow-y: auto; }
.jrrs-pbody__loading,
.jrrs-pbody__error { margin: 8px 0; font-size: 13.5px; font-weight: 600; color: var(--jrrs-muted, #6b7280); }
.jrrs-pbody__error { color: #b91c1c; }

.jrrs-pbody__head { display: flex; align-items: center; gap: 14px; }
.jrrs-pbody__avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--jrrs-brand, #5277ba);
    flex: 0 0 auto;
}
.jrrs-pbody__avatar--ph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--jrrs-brand-soft, #eef2f9);
    font-size: 26px;
}
.jrrs-pbody__name { font-size: 17px; font-weight: 800; color: #1f2937; }
.jrrs-pbody__pos { font-size: 13.5px; font-weight: 600; color: var(--jrrs-brand-dark, #41639e); margin-top: 2px; }

.jrrs-pbody__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 16px;
    border-top: 1px solid var(--jrrs-line, #e5e7eb);
    padding-top: 14px;
}
.jrrs-pbody__label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--jrrs-muted, #6b7280); }
.jrrs-pbody__value { font-size: 13.5px; font-weight: 600; color: #1f2937; margin-top: 2px; overflow-wrap: anywhere; }

.jrrs-pbody__sectitle {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--jrrs-muted, #6b7280);
    border-top: 1px solid var(--jrrs-line, #e5e7eb);
    padding-top: 14px;
}
.jrrs-pbody__list { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13.5px; color: #1f2937; }

.jrrs-pfoot { flex-wrap: wrap; }

@media (max-width: 560px) {
    .jrrs-pbody__grid { grid-template-columns: 1fr; }
}
