/* ==========================================================================
   Lite Candidate Directory Styles (/candidates)
   Scoped strictly to the candidate directory page — Zero global bundle bloat.
   ========================================================================== */

.l-cand-dir-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 30px 16px 60px;
}

/* Page Top Header */
.l-cand-top-header {
    margin-bottom: 24px;
}
.l-cand-top-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px;
}
.l-cand-top-subtitle {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0;
}

/* 2-Column Directory Layout */
.l-cand-layout {
    display: grid;
    grid-template-columns: 290px 1fr;
    gap: 28px;
    align-items: start;
}

/* ============================== Sidebar Filters ============================== */
.l-cand-sidebar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 22px;
    position: sticky;
    top: 90px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.l-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}
.l-filter-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.l-filter-clear {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary-500);
    text-decoration: none;
    cursor: pointer;
}
.l-filter-clear:hover {
    text-decoration: underline;
}

.l-filter-group {
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid #f1f5f9;
}
.l-filter-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.l-filter-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
    display: block;
}

/* Search input inside sidebar */
.l-filter-search-input {
    width: 100%;
    padding: 8px 12px 8px 32px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #0f172a;
    outline: none;
    transition: all 0.2s ease;
}
.l-filter-search-input:focus {
    background: #ffffff;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(10, 101, 204, 0.1);
}
.l-filter-search-wrap {
    position: relative;
    margin-bottom: 12px;
}
.l-filter-search-wrap svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    color: #94a3b8;
    pointer-events: none;
}

/* Checkbox & Radio lists */
.l-filter-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 4px;
}
.l-filter-list::-webkit-scrollbar {
    width: 4px;
}
.l-filter-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.l-filter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #334155;
    cursor: pointer;
    user-select: none;
}
.l-filter-item:hover {
    color: var(--primary-500);
}
.l-filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.l-filter-checkbox input[type="checkbox"],
.l-filter-checkbox input[type="radio"] {
    accent-color: var(--primary-500);
    cursor: pointer;
    width: 15px;
    height: 15px;
}
.l-filter-count {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
}

/* Mobile Filter Drawer Toggle */
.l-mobile-filter-btn {
    display: none;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
}

/* ============================== Main Results Area ============================== */
.l-cand-results {
    width: 100%;
}

.l-cand-results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 18px;
    margin-bottom: 20px;
    gap: 16px;
}
.l-cand-count {
    font-size: 0.95rem;
    color: #475569;
}
.l-cand-count strong {
    color: #0f172a;
    font-weight: 700;
}
.l-cand-sort-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.l-cand-sort-label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}
.l-cand-sort-select {
    padding: 6px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f172a;
    background: #ffffff;
    cursor: pointer;
    outline: none;
}
.l-cand-sort-select:focus {
    border-color: var(--primary-500);
}

/* Active Filter Chips */
.l-cand-active-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.l-cand-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 20px;
    text-decoration: none;
}
.l-cand-chip button {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    line-height: 1;
}
.l-cand-chip button:hover {
    color: #ef4444;
}

/* ============================== Modern Candidate Card ============================== */
.l-candidate-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 22px 24px;
    margin-bottom: 18px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.l-candidate-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 10px 28px -4px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}
.l-candidate-card.is-matched {
    border-left: 4px solid var(--primary-500);
}

/* Card Header */
.l-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.l-card-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

/* Avatar with Initial Fallback */
.l-cand-avatar {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: 50%;
    overflow: hidden;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.l-cand-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.l-cand-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #0a65cc 0%, #2563eb 100%);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Name & Title */
.l-card-user-info {
    flex: 1;
    min-width: 0;
}
.l-card-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.l-card-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.l-card-name a {
    color: inherit;
    text-decoration: none;
}
.l-card-name a:hover {
    color: var(--primary-500);
}
.l-verified-badge {
    color: #0284c7;
    display: inline-flex;
    align-items: center;
}
.l-verified-badge svg {
    width: 17px;
    height: 17px;
}
.l-card-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: #475569;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Top Badges (Role Match + Profile Completeness) */
.l-card-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.l-badge-role-match {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 3px 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.l-badge-completeness {
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 9px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.l-badge-completeness.high {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}
.l-badge-completeness.medium {
    background: #f0f9ff;
    color: #0369a1;
    border: 1px solid #bae6fd;
}
.l-badge-completeness.low {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

/* Meta Pills Row */
.l-card-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
    font-size: 0.85rem;
    color: #475569;
}
.l-card-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.l-card-meta-item svg {
    width: 16px;
    height: 16px;
    color: #64748b;
}
.l-card-meta-item strong {
    color: #0f172a;
    font-weight: 600;
}

/* Snippet Row (Employment / Education) */
.l-card-snippet {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem;
    color: #334155;
    background: #f8fafc;
    padding: 10px 14px;
    border-radius: 10px;
    border-left: 3px solid #cbd5e1;
}
.l-card-snippet-row {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.l-card-snippet-row svg {
    width: 15px;
    height: 15px;
    color: #64748b;
    flex-shrink: 0;
}

/* Skills Chips */
.l-card-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.l-skill-tag {
    background: #f1f5f9;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 6px;
}
.l-skill-more {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    padding: 2px 4px;
}

/* Card Footer Actions */
.l-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
    gap: 12px;
}
.l-card-footer-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.l-viewed-pill {
    font-size: 0.75rem;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.l-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.l-btn-view {
    background: var(--primary-500);
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}
.l-btn-view:hover {
    background: var(--primary-600);
    color: #ffffff;
    transform: translateY(-1px);
}
.l-btn-action-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}
.l-btn-action-icon:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: var(--primary-500);
}
.l-btn-action-icon.is-bookmarked {
    color: #eab308;
    background: #fefce8;
    border-color: #fde047;
}

/* Empty State */
.l-cand-empty {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
}
.l-cand-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.l-cand-empty-icon svg {
    width: 32px;
    height: 32px;
}
.l-cand-empty h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px;
}
.l-cand-empty p {
    color: #64748b;
    font-size: 0.95rem;
    margin: 0 0 20px;
}

/* Pagination container */
.l-cand-pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .l-cand-layout {
        grid-template-columns: 1fr;
    }
    .l-cand-sidebar {
        display: none;
    }
    .l-cand-sidebar.is-open {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 99999;
        overflow-y: auto;
        border-radius: 0;
        padding: 24px 20px;
    }
    .l-mobile-filter-btn {
        display: inline-flex;
    }
}
@media (max-width: 640px) {
    .l-card-header {
        flex-direction: column;
    }
    .l-card-badges {
        align-self: flex-start;
    }
    .l-card-footer {
        flex-direction: column;
        align-items: stretch;
    }
    .l-card-actions {
        justify-content: flex-end;
    }
}
