/* ═══════════════════════════════════════════════════════════
   EMPLOYEES — Liste des salaries (Neumorphic)
   ═══════════════════════════════════════════════════════════ */

.employees-page {
    max-width: 960px;
    margin: 0 auto;
    padding: var(--space-4);
}

/* ── Header ────────────────────────────────────────────── */
.employees-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-5);
    gap: var(--space-3);
    flex-wrap: wrap;
}

.employees-header__left {}

.employees-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0;
}

.employees-subtitle {
    font-size: 0.85rem;
    color: var(--color-text-tertiary);
    margin: var(--space-1) 0 0;
}

.employees-header__actions {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

/* ── Buttons ───────────────────────────────────────────── */
.employees-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 10px 20px;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}

.employees-btn--primary {
    background: var(--color-accent);
    color: #fff;
    box-shadow: var(--neu-raised);
}
.employees-btn--primary:hover {
    filter: brightness(1.08);
}

.employees-btn--outline {
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    box-shadow: var(--neu-raised);
}
.employees-btn--outline:hover {
    box-shadow: var(--neu-inset-sm);
}

/* ── KPIs ──────────────────────────────────────────────── */
.employees-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--space-3);
    margin-bottom: var(--space-5);
}

.employees-kpi {
    background: var(--color-bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--neu-raised);
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.employees-kpi__value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

.employees-kpi__label {
    font-size: 0.78rem;
    color: var(--color-text-tertiary);
    font-weight: 500;
}

/* ── Search ────────────────────────────────────────────── */
.employees-search {
    position: relative;
    margin-bottom: var(--space-4);
}

.employees-search__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--color-text-tertiary);
    pointer-events: none;
    transition: color .15s;
}

.employees-search:focus-within .employees-search__icon {
    color: var(--color-accent);
}

.employees-search__input {
    width: 100%;
    padding: 11px 16px 11px 42px;
    border-radius: var(--radius-lg);
    border: none;
    background: var(--color-bg-primary);
    box-shadow: var(--neu-inset-sm);
    font-size: 0.9rem;
    color: var(--color-text-primary);
    font-family: inherit;
    outline: none;
    transition: box-shadow .15s;
}

.employees-search__input::placeholder {
    color: var(--color-text-tertiary);
}

.employees-search__input:focus {
    box-shadow: var(--neu-inset-sm), 0 0 0 2px var(--color-accent);
}

/* ── Filters ───────────────────────────────────────────── */
.employees-filters {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
    overflow-x: auto;
    padding-bottom: var(--space-2);
    -webkit-overflow-scrolling: touch;
}

.employees-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    background: var(--color-bg-primary);
    color: var(--color-text-secondary);
    box-shadow: var(--neu-raised);
    transition: all .15s;
    white-space: nowrap;
}

.employees-filter.is-active {
    box-shadow: var(--neu-inset-sm);
    color: var(--color-accent);
    background: var(--color-bg-secondary);
}

.employees-filter__count {
    background: var(--color-bg-tertiary);
    color: var(--color-text-tertiary);
    font-size: 0.7rem;
    padding: 1px 7px;
    border-radius: 999px;
    font-weight: 700;
}

.employees-filter.is-active .employees-filter__count {
    background: var(--color-accent);
    color: #fff;
}

/* ── View Toggle ───────────────────────────────────────── */
.employees-view-toggle {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
    justify-content: flex-end;
}

.employees-view-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--neu-raised);
    border: none;
    cursor: pointer;
    color: var(--color-text-tertiary);
    transition: all .15s;
}

.employees-view-btn.is-active {
    box-shadow: var(--neu-inset-sm);
    color: var(--color-accent);
}

.employees-view-btn:hover {
    color: var(--color-text-primary);
}

/* ── Employee List ─────────────────────────────────────── */
.employees-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.employees-empty {
    text-align: center;
    padding: var(--space-8) var(--space-4);
    color: var(--color-text-tertiary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
}

/* ── Employee Card ─────────────────────────────────────── */
.employee-card {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--color-bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--neu-raised);
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.employee-card:hover {
    box-shadow: var(--neu-inset-sm);
    text-decoration: none;
}

.employee-card:active {
    transform: scale(0.99);
}

.employee-card__avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: 700;
    overflow: hidden;
    box-shadow: var(--neu-raised-sm);
}

.employee-card__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.employee-card__info {
    flex: 1;
    min-width: 0;
}

.employee-card__name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.employee-card__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
    margin-top: 2px;
}

.employee-card__dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--color-text-tertiary);
}

.employee-card__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.employee-card__dept {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.employee-card__status {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* ── Employee Grid View ────────────────────────────────── */
.employees-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-3);
}

.employee-grid-card {
    background: var(--color-bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--neu-raised);
    padding: var(--space-5) var(--space-4);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.employee-grid-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent), #6366f1);
    opacity: 0;
    transition: opacity .15s;
}

.employee-grid-card:hover {
    box-shadow: var(--neu-raised-lg);
    transform: translateY(-2px);
    text-decoration: none;
}

.employee-grid-card:hover::before {
    opacity: 1;
}

.employee-grid-card__avatar {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    overflow: hidden;
    box-shadow: var(--neu-raised-sm);
    transition: transform .15s;
}

.employee-grid-card:hover .employee-grid-card__avatar {
    transform: scale(1.06);
}

.employee-grid-card__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.employee-grid-card__name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-text-primary);
    text-align: center;
}

.employee-grid-card__role {
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
    text-align: center;
}

.employee-grid-card__footer {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-1);
}

/* ── Unassigned Section ────────────────────────────────── */
.employees-unassigned {
    background: var(--color-bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--neu-raised);
    margin-bottom: var(--space-5);
    overflow: hidden;
    border-left: 3px solid #ef4444;
}

.employees-unassigned__header {
    padding: var(--space-3) var(--space-4);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.employees-unassigned__title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #ef4444;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin: 0;
}

.employees-unassigned__title svg {
    flex-shrink: 0;
}

.employees-unassigned__list {
    display: flex;
    flex-direction: column;
}

.employees-unassigned__item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-4);
    border-top: 1px solid var(--color-border);
    cursor: pointer;
    transition: background .15s;
    font-size: 0.82rem;
}

.employees-unassigned__item:hover {
    background: color-mix(in srgb, #ef4444 4%, transparent);
}

.employees-unassigned__item-avatar {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    overflow: hidden;
    flex-shrink: 0;
}

.employees-unassigned__item-name {
    font-weight: 600;
    color: var(--color-text-primary);
    flex: 1;
}

.employees-unassigned__item-role {
    color: var(--color-text-tertiary);
}

/* ── Data Table Avatar Cell ────────────────────────────── */
.data-table__cell-avatar {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.data-table__cell-avatar .avatar {
    flex-shrink: 0;
}

.data-table__cell-avatar span {
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
    .employees-page {
        padding: var(--space-3);
    }

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

    .employees-header__actions {
        width: 100%;
    }

    .employees-header__actions .employees-btn {
        flex: 1;
        justify-content: center;
    }

    .employees-kpis {
        grid-template-columns: repeat(2, 1fr);
    }

    .employees-grid {
        grid-template-columns: 1fr;
    }

    .employee-card__meta {
        flex-wrap: wrap;
    }
}
