/**
 * company-admin styles (Wave D2)
 * Extracted from root styles.css L7824-L9884.
 */

/* === Company Admin Styles (Refactored) === */
.company-info-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

/* Mobile: Full width company card - COMPACT */
@media (max-width: 480px) and (hover: none) and (pointer: coarse) {
    .company-info-card {
        padding: 12px 10px;
        margin-bottom: 10px;
        border-radius: 10px;
        margin-left: -8px;
        margin-right: -8px;
        width: calc(100% + 16px);
    }

    .company-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
        margin-bottom: 12px;
    }

    .company-logo {
        width: 56px;
        height: 56px;
        font-size: 1.6rem;
        border-radius: 12px;
    }

    .company-details {
        align-items: center;
    }

    .company-details h4 {
        font-size: 1.15rem;
        margin-bottom: 2px;
    }

    .company-details p {
        font-size: 0.85rem;
    }

    .company-nib {
        font-size: 0.75rem;
        padding: 2px 6px;
    }

    .btn-edit-company {
        width: 100%;
        justify-content: center;
        min-height: 44px;
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .company-contacts {
        justify-content: center;
        gap: 16px;
        padding-top: 10px;
    }

    .contact-item {
        align-items: center;
        text-align: center;
    }

    .contact-label {
        font-size: 0.7rem;
    }

    .contact-item span:not(.contact-label) {
        font-size: 0.85rem;
    }
}

@media (max-width: 320px) and (hover: none) and (pointer: coarse) {
    .company-info-card {
        padding: 10px 8px;
        margin-left: -4px;
        margin-right: -4px;
        width: calc(100% + 8px);
        border-radius: 8px;
        margin-bottom: 8px;
    }

    .company-header {
        gap: 8px;
        margin-bottom: 10px;
    }

    .company-logo {
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
        border-radius: 10px;
    }

    .company-details h4 {
        font-size: 1.05rem;
    }

    .company-details p {
        font-size: 0.8rem;
    }
}

.company-info-card:hover {
    box-shadow: var(--shadow-hover);
}

.company-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.company-logo {
    font-size: 2.5rem;
    width: 80px;
    height: 80px;
    background: var(--brand-tint-10, rgba(var(--brand-color-rgb), 0.1));
    color: var(--brand-fg, var(--brand-color));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--brand-tint-20, rgba(var(--brand-color-rgb), 0.2));
}

.company-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.company-details h4 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.company-details p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.company-nib {
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 0.8;
    background: var(--bg-surface-1);
    padding: 2px 8px;
    border-radius: 4px;
    align-self: flex-start;
    margin-top: 4px;
}

.btn-edit-company {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-edit-company:hover {
    border-color: var(--brand-color);
    color: var(--brand-fg, var(--brand-color));
    background: var(--brand-tint-05, rgba(var(--brand-color-rgb), 0.05));
}

/* Director assessment health — real metrics (replaces decorative fake bars) */
.director-assessment-health {
    min-height: 140px;
    display: flex;
    align-items: stretch;
}

.director-health-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
}

.director-health-stats[hidden] {
    display: none !important;
}

.director-health-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px 10px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface-1, var(--bg-card));
    text-align: center;
}

.director-health-stat-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--brand-fg, var(--brand-color));
    line-height: 1.1;
}

.director-health-stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    line-height: 1.3;
}

@media (max-width: 480px) {
    .director-health-stats {
        grid-template-columns: 1fr;
    }
}

/* In-page company section switcher — primary path on mobile (header sub-nav is hidden). */
.company-section-switcher {
    display: flex;
    gap: 8px;
    padding: 8px;
    margin: 0 0 16px;
    background: var(--bg-surface-1, var(--bg-card));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    position: sticky;
    top: 0;
    z-index: 5;
}

.company-section-switcher-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.company-section-switcher-btn:hover {
    color: var(--text-primary);
    background: var(--brand-tint-05, rgba(var(--brand-color-rgb), 0.05));
}

.company-section-switcher-btn.active {
    color: var(--brand-fg, var(--brand-color));
    background: var(--brand-tint-12, rgba(var(--brand-color-rgb), 0.12));
    border-color: var(--brand-tint-28, rgba(var(--brand-color-rgb), 0.28));
}

.company-leadership-quick {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.company-leadership-quick-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.company-leadership-quick-head .helper-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.company-settings-jump {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    margin: 0 0 var(--section-gap, 12px);
    padding: 10px;
    position: sticky;
    top: 0;
    z-index: 4;
    background: var(--bg-surface-1, var(--bg-card));
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.company-settings-jump a.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    min-height: 40px;
}

#company-settings-section .settings-card {
    scroll-margin-top: 72px;
}

@media (max-width: 768px) and (hover: none) and (pointer: coarse) {
    .company-section-switcher {
        margin-left: -4px;
        margin-right: -4px;
        border-radius: 10px;
    }

    .company-leadership-quick-head {
        flex-direction: column;
        align-items: stretch;
    }

    .company-leadership-quick-head .btn-primary {
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }
}

.company-contacts {
    display: flex;
    gap: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    font-weight: 600;
}

.contact-item span:not(.contact-label) {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* contact-item / contact-label primary definitions live above; avoid light-only #f0f0f0 override */

/* Onboarding Checklist Card */
.onboarding-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 16px 20px;
    border: 1px solid var(--primary-color);
    border-left: 4px solid var(--primary-color);
    margin-bottom: 16px;
}
.onboarding-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.onboarding-header h4 {
    margin: 0;
    font-size: 15px;
    flex: 0 0 auto;
}
.onboarding-progress {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}
.onboarding-progress-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-surface-2, #e5e5e5);
    border-radius: 3px;
    overflow: hidden;
    max-width: 200px;
}
.onboarding-progress-bar > div {
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
    transition: width 0.4s ease;
}
.onboarding-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.onboarding-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--bg-surface-1);
    transition: background 0.2s;
}
.onboarding-item:hover {
    background: var(--bg-surface-2, var(--bg-surface-1));
}
.onboard-check {
    font-size: 18px;
    color: var(--text-secondary);
    flex: 0 0 24px;
    text-align: center;
}
.onboarding-item.done .onboard-check {
    color: var(--success-text, var(--success-color, #10b981));
}
.onboarding-item.done .onboard-check i::before {
    content: none;
}
.onboarding-item.done .onboard-check::after {
    content: '\\2713';
    font-weight: bold;
}
.onboard-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.onboard-info strong {
    font-size: 13px;
}
.onboard-info small {
    font-size: 11px;
    color: var(--text-secondary);
}
.onboarding-item.done .onboard-info strong {
    text-decoration: line-through;
    color: var(--text-secondary);
}
.onboarding-item .btn-link {
    font-size: 12px;
    color: var(--brand-fg, var(--primary-color));
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    white-space: nowrap;
}
.onboarding-item.done .btn-link {
    display: none;
}

/* Quick Actions */
.quick-actions {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 16px;
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
}

/* Mobile: Full width quick actions */
@media (max-width: 480px) and (hover: none) and (pointer: coarse) {
    .quick-actions {
        padding: 10px 8px;
        margin-bottom: 10px;
        border-radius: 8px;
        margin-left: -8px;
        margin-right: -8px;
        width: calc(100% + 16px);
    }

    .action-buttons {
        flex-direction: column;
        gap: 6px;
    }

    .action-btn {
        width: 100%;
        min-height: 44px;
        justify-content: center;
        padding: 10px 14px;
        font-size: 0.85rem;
    }
}

@media (max-width: 320px) and (hover: none) and (pointer: coarse) {
    .quick-actions {
        padding: 8px 6px;
        margin-left: -4px;
        margin-right: -4px;
        width: calc(100% + 8px);
        border-radius: 6px;
    }

    .quick-actions h4 {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    .action-btn {
        min-height: 40px;
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

.quick-actions h4 {
    margin: 0 0 10px 0;
    color: var(--text-color);
    font-size: 0.95rem;
}

.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 10px 16px;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8125rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.action-btn:hover {
    background: rgba(var(--sidebar-accent-rgb, 232, 93, 4), 0.14);
    color: var(--text-primary);
    border-color: rgba(var(--sidebar-accent-rgb, 232, 93, 4), 0.45);
}

.action-btn.edit:hover,
.action-btn.delete:hover {
    color: var(--text-on-brand, #ffffff);
}

.action-btn.edit:hover {
    background: var(--brand-hover);
    border-color: var(--brand-hover);
}

.action-btn.delete:hover {
    background: #c9302c;
    border-color: #c9302c;
}

/* Org Preview */
.org-preview-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 16px;
    border: 1px solid var(--border-color);
}

/* Mobile: Full width org preview */
@media (max-width: 480px) and (hover: none) and (pointer: coarse) {
    .org-preview-card {
        padding: 10px 8px;
        border-radius: 8px;
        margin-left: -8px;
        margin-right: -8px;
        width: calc(100% + 16px);
    }

    .org-preview-card h4 {
        font-size: 0.95rem;
        margin-bottom: 10px;
    }
}

@media (max-width: 320px) and (hover: none) and (pointer: coarse) {
    .org-preview-card {
        padding: 8px 6px;
        margin-left: -4px;
        margin-right: -4px;
        width: calc(100% + 8px);
        border-radius: 6px;
    }

    .org-preview-card h4 {
        font-size: 0.9rem;
    }
}

.org-preview-card h4 {
    margin: 0 0 10px 0;
    font-size: 0.95rem;
}

/* Org Mode Tabs — REMOVED (replaced by unified chart command center) */
/* Table Editor — REMOVED (replaced by drawer) */

/* Talent Search */
.talent-search-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    margin-bottom: 25px;
}

.talent-search-card .helper-text {
    color: var(--text-secondary); /* WCAG AA: Use variable instead of #666 */
    margin-bottom: 20px;
}

.talent-search-form .search-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.search-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.talent-results {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.results-header h5 {
    margin: 0;
}

#talent-results-count {
    color: var(--text-secondary); /* WCAG AA: Use variable instead of #666 */
    font-size: 0.9rem;
}

/* Employee Filter Bar */
.employee-filter-bar {
    display: flex;
    gap: var(--stack-gap, 8px);
    margin-bottom: var(--section-gap-sm, 10px);
    flex-wrap: wrap;
}

.employee-filter-bar input,
.employee-filter-bar select {
    padding: 12px 14px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    background-color: var(--bg-card);
    color: var(--text-color);
}

.employee-filter-bar input {
    flex: 1;
    min-width: 200px;
}

/* Assign Form Card */
.assign-form-card {
    background: var(--bg-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px dashed var(--border-color);
}

.assign-form-card h5 {
    margin: 0 0 15px 0;
    color: var(--text-color);
}

/* Invite Section */
.invite-section {
    background: var(--bg-surface-1);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.invite-section h5 {
    margin: 0 0 15px 0;
    color: var(--brand-fg, var(--brand-color));
    font-size: 1.1rem;
    font-weight: 600;
}

.invite-section .helper-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.invite-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Company Admin forms should span the card width (override global form max-width) */
#company-tab .invite-form,
#company-tab #companyInviteForm,
#company-tab #companyTalentSearchForm,
#company-tab .talent-search-form {
    max-width: none;
    margin: 0;
    padding: 0;
}

/* Report Cards */
.report-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.report-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
}

.report-card h5 {
    margin: 0 0 10px 0;
}

.report-card p {
    color: var(--text-secondary); /* WCAG AA: Use variable instead of #666 */
    font-size: 0.9rem;
    margin: 0 0 15px 0;
}

.report-chart {
    min-height: 150px;
    background: var(--bg-secondary); /* WCAG: Adaptive background */
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary); /* WCAG AA: Use variable instead of #888 */
}

.employee-report-list {
    max-height: 300px;
    overflow-y: auto;
}

.export-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Skill Badge */
.skill-badge {
    display: inline-block;
    padding: 3px 10px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 15px;
    font-size: 0.8rem;
    margin: 2px;
}

.company-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: var(--bg-surface-1);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
}

.company-badge-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 3px;
    flex-shrink: 0;
}

.company-badge .company-name {
    color: var(--text-primary);
    font-weight: 500;
}

.score-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
}

.score-badge.high {
    background: rgba(152, 195, 121, 0.15);
    color: var(--success-text, var(--success-color));
}

.score-badge.medium {
    background: rgba(229, 192, 123, 0.15);
    color: var(--warning-text, var(--warning-color));
}

.score-badge.low {
    background: rgba(224, 108, 117, 0.15);
    color: var(--error-text, var(--error-color));
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.4;
}

.status-badge.available {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.status-badge.assigned {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
}

/* ===== VIEW TOGGLE CONTROL ===== */
.view-toggle {
    display: inline-flex;
    background: var(--bg-surface-1);
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
}

.view-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 1rem;
}

/* Icon-only toggle (employee grid/list) */
.view-toggle .view-toggle-btn {
    width: 34px;
    height: 30px;
}

.view-toggle-btn:hover {
    color: var(--text-primary);
    background: var(--bg-surface-2);
}

.view-toggle-btn.active {
    background: var(--bg-card);
    color: var(--brand-fg, var(--brand-color));
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ===== JOB POSTING CARDS (Tiimi-style) ===== */
.user-jobs-filter-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr) minmax(0, 0.7fr);
    gap: 8px;
    align-items: center;
    width: 100%;
    max-width: 100%;
    margin-bottom: 10px;
}

#user-jobs-section .user-jobs-filter-grid > input,
#user-jobs-section .user-jobs-filter-grid > select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.user-jobs-location-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    margin-bottom: 10px;
}

.user-jobs-location-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    min-width: 0;
    font-size: 0.85em;
    white-space: nowrap;
}

.user-jobs-radius-container {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 180px;
    max-width: 100%;
    min-width: 0;
}

.user-jobs-radius-label {
    margin: 0;
    font-size: 0.82em;
    white-space: nowrap;
    color: var(--text-secondary);
}

#user-jobs-section #user-jobs-radius {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
}

.user-jobs-radius-value {
    flex: 0 0 auto;
    min-width: 42px;
    font-size: 0.82em;
}

.job-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.job-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: var(--card-pad, 12px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.2s ease;
    position: relative;
}

#company-job-postings-grid .job-card[data-posting-id] {
    cursor: pointer;
}

#company-job-postings-grid .job-card-applicant-count[data-posting-id] {
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.job-card:hover {
    border-color: var(--brand-color);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.job-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.job-card-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin: 0;
}

.job-card-company {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.job-card-company i {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.job-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.job-card-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.job-card-meta-item i {
    font-size: 0.9375rem;
    color: var(--text-muted);
}

.job-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.job-card-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.6875rem;
    font-weight: 500;
    background: var(--bg-surface-1);
    color: var(--text-secondary);
}

.job-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.job-card-match {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.job-card-match .match-bar {
    width: 48px;
    height: 6px;
    border-radius: 3px;
    background: var(--bg-surface-1);
    overflow: hidden;
}

.job-card-match .match-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.job-card-match .match-bar-fill.high { background: #10b981; }
.job-card-match .match-bar-fill.medium { background: #f59e0b; }
.job-card-match .match-bar-fill.low { background: #ef4444; }

.job-card-actions {
    display: flex;
    gap: 6px;
}

.job-card-actions button {
    padding: 6px 14px;
    font-size: 0.8125rem;
    border-radius: 8px;
    font-weight: 600;
}

/* Company job cards — slightly different footer with status */
.job-card-status-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.job-card-applicant-count {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.job-card-applicant-count i {
    font-size: 0.9375rem;
}

/* Empty state for job cards */
.job-cards-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.job-cards-empty i {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: block;
}

/* ============================================================
   Job Posting Form - Improved for HC Manager (Desktop)
   ============================================================ */

#company-search-talent,
#hc-recruitment-section {
    max-width: none;
}

#talent-sub-nav {
    margin-bottom: 14px;
}

.recruitment-workspace {
    display: grid;
    grid-template-columns: minmax(340px, 0.9fr) minmax(0, 1.55fr);
    gap: 18px;
    align-items: start;
    width: 100%;
}

/* Shared talent search: HC split layout participates in parent grid */
.recruitment-talent-workspace > .talent-search-root--hc {
    display: contents;
}

.talent-search-stack {
    display: grid;
    gap: 18px;
}

/* Employee HR Portal (HR Saya) */
.user-hr-sub-nav {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
}

.hr-service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.hr-service-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    gap: 4px 10px;
    align-items: center;
    text-align: left;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-card);
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hr-service-card:hover {
    border-color: var(--brand-color);
    box-shadow: var(--shadow-hover);
}

.hr-service-icon {
    grid-row: 1 / span 2;
    font-size: 1.5rem;
    color: var(--brand-color);
}

.hr-service-title {
    font-weight: 600;
    color: var(--text-primary);
}

.hr-service-desc {
    grid-column: 2;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.hr-service-arrow {
    grid-row: 1 / span 2;
    opacity: 0.45;
}

.hr-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.hr-progress-label {
    font-weight: 600;
}

.hr-progress-value {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.hr-checklist,
.hr-offboarding-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.hr-checklist-item,
.hr-offboarding-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--bg-secondary);
}

.hr-checklist-item.is-done,
.hr-offboarding-item.is-done {
    opacity: 0.85;
}

.hr-checklist-item.is-done .hr-checklist-icon,
.hr-offboarding-item.is-done {
    color: var(--success-color);
}

.hr-checklist-actions,
.hr-offboarding-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.hr-checklist-complete {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--success-color) 12%, transparent);
    color: var(--success-color);
}

/* HC Strategic — Analytics & Talent Pipeline */
.hc-analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.hc-analytics-card {
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hc-analytics-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.hc-analytics-value {
    font-size: 1.35rem;
    color: var(--text-primary);
}

.hc-dashboard-analytics-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.hc-strategic-sub-nav {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.recruitment-workspace-main {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.recruitment-panel {
    min-width: 0;
}

.recruitment-create-panel,
.recruitment-filter-panel {
    position: sticky;
    top: 92px;
    max-height: calc(100vh - 128px);
    overflow: auto;
    padding-right: 2px;
    scrollbar-gutter: stable;
}

.recruitment-list-panel,
.recruitment-applicants-panel,
.recruitment-results-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
}

.recruitment-list-panel .section-toolbar {
    margin-bottom: 12px;
}

.recruitment-list-panel .section-toolbar h5,
.recruitment-applicants-panel h5,
.recruitment-results-panel h5 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 0.98rem;
}

.recruitment-table-scroll {
    max-height: 430px;
    overflow: auto;
}

.recruitment-table-scroll .data-table {
    min-width: 860px;
}

@media (max-width: 768px) and (hover: none) and (pointer: coarse) {
    .recruitment-table-scroll .data-table,
    .recruitment-results-panel .data-table {
        min-width: 100%;
    }
}

.recruitment-table-scroll thead th,
.recruitment-results-panel .table-wrapper thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--bg-card);
}

.recruitment-results-panel .table-wrapper {
    max-height: calc(100vh - 260px);
    overflow: auto;
}

.recruitment-results-panel .data-table {
    min-width: 780px;
}

.job-posting-form {
    max-width: none;
}

.job-posting-form-header {
    margin-bottom: 14px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.form-section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.form-section-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 4px 0 0;
    line-height: 1.45;
    max-width: 620px;
}

.skill-chips:empty,
.skill-chips > div {
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 4px 0;
}

.form-section-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.form-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.form-section-icon {
    color: var(--brand-color);
    font-size: 1.1rem;
}

.form-field {
    margin-bottom: 14px;
}

.form-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.form-field label.required::after {
    content: " *";
    color: #e11d48;
}

.form-field .field-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.3;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 720px) {
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Radius control */
.radius-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.radius-control input[type="range"] {
    flex: 1;
    accent-color: var(--brand-color);
}

.radius-value {
    min-width: 72px;
    text-align: right;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-secondary);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
}

/* Payment Type Tabs */
.payment-type-tabs {
    display: flex;
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 4px;
    gap: 4px;
    border: 1px solid var(--border-color);
}

.payment-tab {
    flex: 1;
    padding: 9px 14px;
    border: none;
    background: transparent;
    border-radius: 7px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.payment-tab:hover {
    background: var(--bg-surface-1);
    color: var(--text-primary);
}

.payment-tab.active {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 0;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.form-actions .btn-primary {
    padding: 0 16px;
    font-size: 0.875rem;
    font-weight: 600;
    min-width: 0;
    min-height: 40px;
}

.form-actions .btn-secondary {
    padding: 10px 16px;
}

/* Textarea improvement */
#company-job-description {
    width: 100%;
    min-height: 92px;
    resize: vertical;
    font-size: 0.9rem;
    line-height: 1.4;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-primary);
}

#company-job-description:focus {
    border-color: var(--brand-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--brand-color-rgb, 59, 130, 246), 0.1);
}

/* Keep the old select but make it look better inside the card */
/* Improved multi-select with chips on top */
#company-job-requirements {
    width: 100%;
    height: 132px;
    min-height: 132px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-input);
    color: var(--text-primary);
    padding: 4px;
    font-size: 0.85rem;
}

#company-job-requirements:focus {
    border-color: var(--brand-color);
    outline: none;
}

/* Skill chips for job posting form */
.skill-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 32px;
    margin-bottom: 8px;
}

.recruitment-filter-panel.talent-search-card {
    margin: 0;
    padding: 16px;
    border-radius: 8px;
    box-shadow: none;
}

.recruitment-filter-panel .helper-text {
    margin-bottom: 14px;
}

.recruitment-filter-panel .talent-search-form .search-filters {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.recruitment-filter-panel .form-group {
    margin-bottom: 0;
}

.recruitment-filter-panel .form-group label {
    font-size: 0.82rem;
    font-weight: 650;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.recruitment-filter-panel input[type="text"],
.recruitment-filter-panel select,
.job-posting-form input[type="text"],
.job-posting-form input[type="number"],
.job-posting-form select {
    min-height: 40px;
    border-radius: 8px;
}

.recruitment-filter-panel .search-actions {
    position: sticky;
    bottom: 0;
    margin: 12px -16px -16px;
    padding: 12px 16px 16px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
}

.recruitment-filter-panel .search-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

#talent-min-score-label,
#talent-radius-label {
    flex: 0 0 auto;
    min-width: 58px;
    text-align: right;
    font-weight: 650;
    color: var(--text-primary);
}

#talent-job-posting-subsection .job-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

#talent-job-posting-subsection .job-card {
    border-radius: 8px;
    padding: 16px;
}

#talent-job-posting-subsection .job-card-footer {
    align-items: flex-start;
    gap: 12px;
}

#talent-job-posting-subsection .job-card-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

#talent-job-posting-subsection .job-card-actions button {
    min-height: 34px;
}

.applicant-filter-controls select {
    min-height: 36px;
}

@media (min-width: 1280px) {
    .recruitment-workspace {
        grid-template-columns: minmax(380px, 0.8fr) minmax(0, 1.8fr);
    }

    #talent-job-posting-subsection .job-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
    }
}

@media (max-width: 1100px) {
    .recruitment-workspace {
        grid-template-columns: 1fr;
    }

    .recruitment-create-panel,
    .recruitment-filter-panel {
        position: static;
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    .recruitment-filter-panel .talent-search-form .search-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .recruitment-list-panel,
    .recruitment-applicants-panel,
    .recruitment-results-panel,
    .job-posting-form-header,
    .form-section-card,
    .form-actions,
    .recruitment-filter-panel.talent-search-card {
        padding: 14px;
    }

    .recruitment-filter-panel .talent-search-form .search-filters {
        grid-template-columns: 1fr;
    }

    .payment-type-tabs {
        flex-direction: column;
    }

    #talent-job-posting-subsection .job-card-footer {
        flex-direction: column;
    }

    #talent-job-posting-subsection .job-card-actions {
        width: 100%;
        justify-content: stretch;
    }

    #talent-job-posting-subsection .job-card-actions button {
        flex: 1 1 auto;
    }
}

.skill-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-surface-1);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    padding: 4px 10px 4px 14px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-primary);
}

.skill-chip-text {
    white-space: nowrap;
}

.skill-chip-remove {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--text-muted);
    color: white;
    border-radius: 50%;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.85;
}

.skill-chip-remove:hover {
    opacity: 1;
    background: #e11d48;
    transform: scale(1.05);
}

@media (max-width: 640px) {
    .form-section-card {
        padding: 16px;
    }
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .form-actions .btn-primary,
    .form-actions .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    #user-jobs-section .user-jobs-filter-grid {
        grid-template-columns: 1fr;
    }

    #user-jobs-section .user-jobs-location-filter {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    #user-jobs-section #user-jobs-radius-container {
        width: 100%;
        flex: 1 1 100%;
    }

    .job-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== EMPLOYEE GRID VIEW ===== */
.employee-view-container {
    position: relative;
}

.employee-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.employee-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.employee-card:hover {
    border-color: var(--brand-color);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.employee-card-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(var(--brand-color-rgb), 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--brand-fg, var(--brand-color));
    font-weight: 700;
    flex-shrink: 0;
}

.employee-card-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.employee-card-name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.employee-card-position {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.employee-card-dept {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.employee-card-rate {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

#company-user-table th[data-col="tarif"],
#company-user-table td.employee-table-rate {
    white-space: nowrap;
    min-width: 8.5rem;
}

.employee-card-score {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.employee-card-footer {
    width: 100%;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    display: flex;
    justify-content: center;
}

/* Section header bar (Tiimi-style) — title + controls row */
.section-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.section-toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.section-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.section-toolbar h5 {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 700;
    white-space: nowrap;
}

.section-toolbar .employee-count-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(var(--brand-color-rgb), 0.1);
    color: var(--brand-fg, var(--brand-color));
}

@media (max-width: 640px) {
    .employee-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
    }

    .employee-card {
        padding: 14px;
    }

    .employee-card-avatar {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }
}

/* Talent Card */
.talent-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.talent-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.talent-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.talent-info h5 {
    margin: 0 0 5px 0;
    color: var(--text-color);
}

.talent-info p {
    margin: 0;
    color: var(--text-secondary); /* WCAG AA: Use variable instead of #666 */
    font-size: 0.85rem;
}

.talent-score {
    text-align: right;
}

.talent-skills {
    margin: 10px 0;
}

.talent-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.talent-actions button {
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.talent-table-actions {
    min-width: 190px;
    white-space: normal;
}

.talent-table-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 0.8rem;
    font-weight: 650;
    cursor: pointer;
    margin: 2px;
}

.btn-view-profile {
    background: rgba(var(--brand-color-rgb, 13, 59, 102), 0.18);
    color: var(--text-primary);
    border: 1px solid rgba(var(--brand-color-rgb, 13, 59, 102), 0.32);
}

.btn-view-profile:hover {
    background: var(--brand-hover);
    color: var(--text-on-brand) !important;
    border-color: var(--brand-hover);
}

.btn-contact {
    background: rgba(152, 195, 121, 0.15);
    color: var(--success-text, var(--success-color));
}

.btn-contact:hover {
    background: var(--success-color);
    color: white;
}

.btn-shortlist {
    background: #fff3e0;
    color: #ef6c00;
}

.btn-shortlist:hover {
    background: #ef6c00;
    color: white;
}

/* Empty State */
.empty-results {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary); /* WCAG AA: Use variable instead of #888 */
}

.empty-results i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-results p {
    margin: 0;
    font-size: 1rem;
}

@media (max-width: 768px) and (hover: none) and (pointer: coarse) {
    .company-header {
        flex-direction: column;
        text-align: center;
    }

    .company-contacts {
        flex-direction: column;
        gap: 10px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
    }

    .talent-search-form .search-filters {
        grid-template-columns: 1fr;
    }

    .employee-filter-bar {
        flex-direction: column;
    }

    .employee-filter-bar input,
    .employee-filter-bar select {
        width: 100%;
    }

    .talent-header {
        flex-direction: column;
    }

    .talent-score {
        text-align: left;
        margin-top: 10px;
    }

    .talent-actions {
        flex-direction: column;
    }

    .talent-actions button {
        width: 100%;
    }
}

