/* =========================================================
   WORKFORCE OPERATIONS — PHASE 5.5
   ========================================================= */

.workforce-strip {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .75rem;
    margin-bottom: 1rem;
}

.workforce-metric {
    position: relative;
    overflow: hidden;
    min-height: 112px;
    padding: 1rem;
    border: 1px solid #e4e9ef;
    border-radius: 18px;
    background: #fff;
}

.workforce-metric::after {
    content: "";
    position: absolute;
    width: 76px;
    height: 76px;
    left: -28px;
    bottom: -34px;
    border-radius: 50%;
    background: rgba(23, 107, 135, .055);
}

.workforce-metric span,
.workforce-metric strong,
.workforce-metric small {
    display: block;
}

.workforce-metric span {
    color: #6e7c8d;
    font-size: .68rem;
    font-weight: 800;
}

.workforce-metric strong {
    margin: .45rem 0 .18rem;
    font-size: 1.65rem;
    line-height: 1;
}

.workforce-metric small {
    color: #98a3af;
    font-size: .58rem;
}

.workforce-filter-row {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-top: .7rem;
}

.workforce-filter-row select {
    min-width: 170px;
    height: 40px;
    padding: 0 .75rem;
    outline: none;
    border: 1px solid #dce3eb;
    border-radius: 11px;
    background: #fff;
    font: inherit;
    font-size: .68rem;
}

.workforce-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .72rem;
}

.workforce-table th {
    height: 48px;
    padding: 0 .85rem;
    border-bottom: 1px solid #e8edf2;
    background: #fafbfd;
    color: #778392;
    text-align: right;
    white-space: nowrap;
}

.workforce-table td {
    padding: .85rem;
    border-bottom: 1px solid #eef2f5;
    vertical-align: middle;
}

.workforce-table tbody tr {
    transition: background .18s ease;
}

.workforce-table tbody tr:hover {
    background: #fbfdfe;
}

.workforce-person {
    display: flex;
    align-items: center;
    min-width: 190px;
    gap: .7rem;
}

.workforce-avatar {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #eaf4f6;
    color: #176b87;
    font-size: .72rem;
    font-weight: 900;
}

.workforce-person strong,
.workforce-person small {
    display: block;
}

.workforce-person strong {
    font-size: .72rem;
}

.workforce-person small {
    margin-top: .16rem;
    color: #8b97a4;
    font-size: .58rem;
}

.workforce-chip {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 .55rem;
    border-radius: 999px;
    font-size: .58rem;
    font-weight: 800;
    white-space: nowrap;
}

.workforce-chip.employee {
    background: #eef6ff;
    color: #356b9b;
}

.workforce-chip.supervisor {
    background: #f4efff;
    color: #7054a6;
}

.workforce-chip.active {
    background: #eaf8f2;
    color: #28795f;
}

.workforce-chip.inactive,
.workforce-chip.terminated {
    background: #fff0f1;
    color: #a84551;
}

.workforce-chip.leave {
    background: #fff7e8;
    color: #936c24;
}

.workforce-chip.suspended {
    background: #fff0f1;
    color: #a84551;
}

.workforce-outlet strong,
.workforce-outlet small {
    display: block;
}

.workforce-outlet strong {
    font-size: .68rem;
}

.workforce-outlet small {
    margin-top: .18rem;
    color: #98a3af;
    font-size: .56rem;
}

.workforce-unassigned {
    color: #a46f24;
    font-weight: 800;
}

.readiness {
    min-width: 125px;
}

.readiness-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .35rem;
    gap: .5rem;
}

.readiness-head strong {
    font-size: .62rem;
}

.readiness-head span {
    color: #7d8996;
    font-size: .56rem;
}

.readiness-bar {
    overflow: hidden;
    height: 6px;
    border-radius: 999px;
    background: #edf1f4;
}

.readiness-bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #176b87;
}

.workforce-open {
    min-height: 34px;
    padding: 0 .7rem;
    border: 1px solid #dce3eb;
    border-radius: 9px;
    background: #fff;
    color: #176b87;
    cursor: pointer;
    font: inherit;
    font-size: .62rem;
    font-weight: 900;
}

.workforce-open:hover {
    background: #f2f8fa;
}

/* 360 Drawer */

.workforce-backdrop {
    position: fixed;
    z-index: 90;
    inset: 0;
    background: rgba(4, 10, 18, .55);
    backdrop-filter: blur(2px);
}

.workforce-drawer {
    position: fixed;
    z-index: 95;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    width: min(720px, 94vw);
    height: 100vh;
    border-right: 1px solid #dfe5eb;
    background: #f8fafc;
    box-shadow: 18px 0 55px rgba(4, 10, 18, .18);
    transform: translateX(-105%);
    transition: transform .24s ease;
}

.workforce-drawer.open {
    transform: translateX(0);
}

.workforce-drawer-header {
    flex: 0 0 auto;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid #e3e8ed;
    background: #fff;
}

.workforce-drawer-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.workforce-profile-heading {
    display: flex;
    align-items: center;
    gap: .85rem;
}

.workforce-profile-avatar {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: #176b87;
    color: #fff;
    font-size: .9rem;
    font-weight: 900;
}

.workforce-profile-heading h2 {
    margin: 0;
    font-size: 1.05rem;
}

.workforce-profile-heading p {
    margin: .25rem 0 0;
    color: #7c8997;
    font-size: .65rem;
}

.workforce-close {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid #dfe5eb;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    font-size: 1rem;
}

.workforce-tabs {
    display: flex;
    overflow-x: auto;
    margin-top: 1rem;
    padding-bottom: 2px;
    gap: .35rem;
}

.workforce-tab {
    min-height: 34px;
    padding: 0 .7rem;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: #788594;
    cursor: pointer;
    font: inherit;
    font-size: .61rem;
    font-weight: 800;
    white-space: nowrap;
}

.workforce-tab.active {
    border-color: #cfe2e7;
    background: #eaf4f6;
    color: #176b87;
}

.workforce-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.2rem 2rem;
}

.workforce-alert {
    margin-bottom: .8rem;
    padding: .75rem .9rem;
    border: 1px solid #f0d7d9;
    border-radius: 12px;
    background: #fff4f5;
    color: #9a3f4a;
    font-size: .66rem;
}

.workforce-card {
    margin-bottom: .9rem;
    padding: 1rem;
    border: 1px solid #e1e7ec;
    border-radius: 16px;
    background: #fff;
}

.workforce-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .9rem;
    gap: .8rem;
}

.workforce-card-header strong {
    font-size: .76rem;
}

.workforce-card-header small {
    color: #8a96a4;
    font-size: .58rem;
}

.workforce-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
}

.workforce-field label {
    display: block;
    margin-bottom: .35rem;
    color: #657383;
    font-size: .59rem;
    font-weight: 800;
}

.workforce-field input,
.workforce-field select,
.workforce-field textarea {
    width: 100%;
    min-height: 42px;
    padding: .65rem .75rem;
    outline: none;
    border: 1px solid #dce3e9;
    border-radius: 10px;
    background: #fff;
    font: inherit;
    font-size: .68rem;
}

.workforce-field textarea {
    min-height: 82px;
    resize: vertical;
}

.workforce-field input:focus,
.workforce-field select:focus,
.workforce-field textarea:focus {
    border-color: #6bb5c7;
    box-shadow: 0 0 0 4px rgba(23, 107, 135, .07);
}

.workforce-span-2 {
    grid-column: 1 / -1;
}

.workforce-assignment-list {
    display: grid;
    gap: .55rem;
}

.workforce-assignment {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .7rem .8rem;
    border: 1px solid #e5e9ed;
    border-radius: 11px;
    background: #fbfcfd;
    gap: .7rem;
}

.workforce-assignment strong,
.workforce-assignment small {
    display: block;
}

.workforce-assignment strong {
    font-size: .66rem;
}

.workforce-assignment small {
    margin-top: .15rem;
    color: #8995a2;
    font-size: .56rem;
}

.workforce-module-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .65rem;
}

.workforce-module {
    padding: .8rem;
    border: 1px solid #e3e8ed;
    border-radius: 13px;
    background: #fbfcfd;
}

.workforce-module strong,
.workforce-module span {
    display: block;
}

.workforce-module strong {
    font-size: .68rem;
}

.workforce-module span {
    margin-top: .3rem;
    color: #8c98a5;
    font-size: .57rem;
}

.workforce-future {
    display: inline-flex !important;
    width: auto;
    margin-top: .5rem !important;
    padding: .22rem .45rem;
    border-radius: 999px;
    background: #f0f2f5;
    color: #7d8996 !important;
    font-size: .52rem !important;
    font-weight: 900;
}

.workforce-history-empty {
    padding: 1.5rem;
    color: #8a96a3;
    text-align: center;
    font-size: .64rem;
}

.workforce-actions {
    position: sticky;
    bottom: -1rem;
    display: flex;
    justify-content: flex-end;
    margin: 1rem -1.2rem -2rem;
    padding: .85rem 1.2rem;
    border-top: 1px solid #e1e7ec;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(8px);
    gap: .55rem;
}

.workforce-save,
.workforce-secondary {
    min-height: 42px;
    padding: 0 1rem;
    border-radius: 10px;
    cursor: pointer;
    font: inherit;
    font-size: .66rem;
    font-weight: 900;
}

.workforce-save {
    border: 0;
    background: #176b87;
    color: #fff;
}

.workforce-secondary {
    border: 1px solid #dce3e9;
    background: #fff;
    color: #526171;
}

.workforce-save:disabled {
    cursor: wait;
    opacity: .6;
}

@media (max-width: 1180px) {
    .workforce-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .workforce-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workforce-filter-row {
        align-items: stretch;
        flex-direction: column;
    }

    .workforce-filter-row select {
        width: 100%;
    }

    .workforce-table,
    .workforce-table tbody,
    .workforce-table tr,
    .workforce-table td {
        display: block;
        width: 100%;
    }

    .workforce-table thead {
        display: none;
    }

    .workforce-table tbody {
        padding: .7rem;
    }

    .workforce-table tr {
        overflow: hidden;
        margin-bottom: .7rem;
        border: 1px solid #e1e7ec;
        border-radius: 14px;
        background: #fff;
    }

    .workforce-table td {
        display: grid;
        grid-template-columns: 105px minmax(0, 1fr);
        align-items: center;
        min-height: 48px;
        padding: .65rem .75rem;
    }

    .workforce-table td::before {
        content: attr(data-label);
        color: #8a96a5;
        font-size: .58rem;
        font-weight: 800;
    }

    .workforce-table td:first-child {
        display: block;
    }

    .workforce-table td:first-child::before {
        display: none;
    }

    .workforce-grid,
    .workforce-module-grid {
        grid-template-columns: 1fr;
    }

    .workforce-span-2 {
        grid-column: auto;
    }

    .workforce-drawer {
        width: 100%;
    }
}

@media (max-width: 430px) {
    .workforce-strip {
        grid-template-columns: 1fr 1fr;
        gap: .55rem;
    }

    .workforce-metric {
        min-height: 100px;
        padding: .8rem;
    }
}