/* =============================================================================
   HR module - Employees list widgets, type chips, and the employee form's tabs.
   Employees reuse the Users page chrome (page-header, data-table, status-pill,
   filter-field); only the pieces unique to HR live here.
   ============================================================================= */

/* ---- Active / Not active widgets ---------------------------------------- */

.hr-widgets {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 4px 0 22px;
}

.hr-widget {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 16px 18px;
    border: 1px solid var(--border-default, #e3e7eb);
    border-radius: var(--radius-button);
    background: var(--surface-panel, #fff);
    text-align: left;
    cursor: pointer;
    transition: border-color 130ms ease, box-shadow 130ms ease, transform 130ms ease;
}

.hr-widget:hover { transform: translateY(-1px); }

.hr-widget--selected {
    border-color: var(--accent, #6366f1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.hr-widget__value {
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.hr-widget__label {
    font-size: var(--font-size-small);
    color: var(--text-muted);
}

/* A colour cue on the number, by tone. */
.hr-widget--active .hr-widget__value { color: #16a34a; }
.hr-widget--inactive .hr-widget__value { color: #b45309; }
.hr-widget--neutral .hr-widget__value { color: var(--accent, #6366f1); }

@media (max-width: 760px) {
    .hr-widgets { grid-template-columns: 1fr; }
}


/* ---- User Type chip in the table ---------------------------------------- */

.hr-type-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: var(--radius-button);
    font-size: var(--font-size-tiny);
    font-weight: 600;
}

.hr-type-chip--admin {
    background: rgba(99, 102, 241, 0.14);
    color: var(--accent, #6366f1);
}

.hr-type-chip--employee {
    background: var(--surface-subtle, #eef1f4);
    color: var(--text-secondary, #475467);
}


/* ---- Employee form: tabs ------------------------------------------------- */

.employee-form { min-width: 0; }

.employee-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-default, #e3e7eb);
}

.employee-tab {
    padding: 10px 15px;
    border: none;
    background: none;
    font: inherit;
    font-size: var(--font-size-small);
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    transition: color 120ms ease, border-color 120ms ease;
}

.employee-tab:hover { color: var(--text-primary); }

.employee-tab--active {
    color: var(--accent, #6366f1);
    border-bottom-color: var(--accent, #6366f1);
}

.employee-tabpane { display: none; }
.employee-tabpane--active { display: block; }

/* The Details pane stacks the same sections the user panel shows side by side. */
.employee-tabpane .form-section + .form-section {
    margin-top: 20px;
}

/* ---- Placeholder tabs (Attendance / Annual Leave / Payroll) -------------- */

.employee-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 48px 24px;
    color: var(--text-muted);
}

.employee-placeholder__glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--surface-subtle, #eef1f4);
    color: var(--text-muted);
    margin-bottom: 4px;
}

.employee-placeholder__title {
    margin: 0;
    font-size: var(--font-size-medium);
    font-weight: 600;
    color: var(--text-primary);
}

.employee-placeholder__text {
    margin: 0;
    max-width: 360px;
    font-size: var(--font-size-small);
    line-height: 1.5;
}


/* =============================================================================
   HEADER TIME-CLOCK WIDGET
   A pill in the dark top header: clock glyph + running timer. Green while
   working, orange on break/lunch, muted when clocked out.
   ============================================================================= */

.header-clock {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 13px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.82);
    font: inherit;
    font-size: var(--font-size-small, 13px);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: background 130ms ease, border-color 130ms ease, color 130ms ease;
}

.header-clock:hover { background: rgba(255, 255, 255, 0.12); }

.header-clock__icon { display: inline-flex; }
.header-clock__icon .icon { display: block; }

.header-clock__time { letter-spacing: 0.01em; }

/* Working - green. */
.header-clock--active {
    border-color: rgba(34, 197, 94, 0.45);
    background: rgba(34, 197, 94, 0.16);
    color: #4ade80;
}

/* On break / lunch - orange. */
.header-clock--break {
    border-color: rgba(251, 146, 60, 0.5);
    background: rgba(251, 146, 60, 0.18);
    color: #fb923c;
}

@media (max-width: 900px) {
    .header-clock { display: none; }
}


/* =============================================================================
   TIME-CLOCK PANEL (quarter-width slide-over)
   ============================================================================= */

.clock-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.clock-panel__status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 24px 16px;
    border: 1px solid var(--border-default, #e3e7eb);
    border-radius: var(--radius-button);
    background: var(--surface-subtle, #f6f8fa);
    text-align: center;
}

.clock-panel__time {
    font-size: 42px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

.clock-panel__state {
    font-size: var(--font-size-small);
    font-weight: 500;
    color: var(--text-muted);
}

/* Tone follows the state. */
.clock-panel__status--active {
    border-color: rgba(22, 163, 74, 0.35);
    background: rgba(34, 197, 94, 0.10);
}
.clock-panel__status--active .clock-panel__time { color: #16a34a; }
.clock-panel__status--active .clock-panel__state { color: #15803d; }

.clock-panel__status--break {
    border-color: rgba(234, 88, 12, 0.4);
    background: rgba(251, 146, 60, 0.12);
}
.clock-panel__status--break .clock-panel__time { color: #ea580c; }
.clock-panel__status--break .clock-panel__state { color: #c2410c; }

/* Action buttons */
.clock-panel__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.clock-panel__action {
    flex: 1 1 auto;
    justify-content: center;
}

.clock-panel__action--wide { flex-basis: 100%; }

/* Annual leave section */
.clock-panel__section {
    padding-top: 18px;
    border-top: 1px solid var(--border-subtle, #e3e7eb);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.clock-panel__section-head {
    display: flex;
    align-items: center;
    gap: 9px;
}

.clock-panel__section-glyph { color: var(--text-muted); display: inline-flex; }

.clock-panel__section-title {
    margin: 0;
    font-size: var(--font-size-medium);
    font-weight: 600;
    color: var(--text-primary);
}

.clock-panel__leave-request { justify-content: center; }

.clock-panel__leave-label {
    font-size: var(--font-size-tiny);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.clock-panel__leave-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.clock-leave {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border-subtle, #e3e7eb);
    border-radius: var(--radius-button);
    background: var(--surface-panel, #fff);
}

.clock-leave__label {
    font-size: var(--font-size-small);
    font-weight: 600;
    color: var(--text-primary);
}

.clock-leave__dates {
    font-size: var(--font-size-tiny);
    color: var(--text-muted);
    margin-top: 2px;
}

.clock-leave__status {
    flex: none;
    padding: 2px 10px;
    border-radius: var(--radius-button);
    font-size: var(--font-size-tiny);
    font-weight: 600;
}

.clock-leave__status--approved {
    background: rgba(34, 197, 94, 0.14);
    color: #16a34a;
}

.clock-leave__status--pending {
    background: rgba(251, 146, 60, 0.16);
    color: #c2410c;
}


/* =============================================================================
   EMPLOYEE PANEL - Attendance & Annual Leave tabs (tables + add form)
   ============================================================================= */

.employee-tab-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.employee-tab-section__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.employee-tab-section__title {
    margin: 0;
    font-size: var(--font-size-medium);
    font-weight: 600;
    color: var(--text-primary);
}

.employee-tab-section__hint {
    margin: 3px 0 0;
    font-size: var(--font-size-small);
    color: var(--text-muted);
}

.employee-table-scroll {
    max-height: 420px;
    overflow: auto;
    border: 1px solid var(--border-subtle, #e3e7eb);
    border-radius: var(--radius-button);
}

.employee-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-small);
}

.employee-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    text-align: left;
    padding: 10px 14px;
    background: var(--surface-subtle, #f6f8fa);
    border-bottom: 1px solid var(--border-subtle, #e3e7eb);
    font-size: var(--font-size-tiny);
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.employee-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-subtle, #eef1f4);
    color: var(--text-primary);
    vertical-align: middle;
}

.employee-table tbody tr:last-child td { border-bottom: none; }

.employee-table__mono { font-variant-numeric: tabular-nums; color: var(--text-secondary); }
.employee-table__note { color: var(--text-muted); }

.employee-table__empty {
    margin: 0;
    padding: 22px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: var(--font-size-small);
}

/* Activity chips (attendance) */
.attendance-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: var(--radius-button);
    font-size: var(--font-size-tiny);
    font-weight: 600;
}
.attendance-chip--in    { background: rgba(34, 197, 94, 0.14); color: #16a34a; }
.attendance-chip--out   { background: rgba(220, 38, 38, 0.12); color: #dc2626; }
.attendance-chip--break { background: rgba(251, 146, 60, 0.16); color: #c2410c; }

/* Leave status chips */
.leave-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: var(--radius-button);
    font-size: var(--font-size-tiny);
    font-weight: 600;
}
.leave-chip--approved  { background: rgba(34, 197, 94, 0.14); color: #16a34a; }
.leave-chip--pending   { background: rgba(251, 146, 60, 0.16); color: #c2410c; }
.leave-chip--rejected  { background: rgba(220, 38, 38, 0.12); color: #dc2626; }
.leave-chip--cancelled { background: var(--surface-subtle, #eef1f4); color: var(--text-muted); }

/* Add-leave form (in the employee panel) */
.employee-leave-form {
    padding: 14px;
    border: 1px solid var(--border-subtle, #e3e7eb);
    border-radius: var(--radius-button);
    background: var(--surface-subtle, #f6f8fa);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.employee-leave-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.employee-leave-form__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}


/* =============================================================================
   TIME-CLOCK PANEL - inline request-leave form
   ============================================================================= */

.clock-leave-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--border-subtle, #e3e7eb);
    border-radius: var(--radius-button);
    background: var(--surface-subtle, #f6f8fa);
}

.clock-leave-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.clock-leave-form__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: var(--font-size-tiny);
    font-weight: 600;
    color: var(--text-muted);
}

.clock-leave-form__field input,
.clock-leave-form__field select {
    padding: 8px 10px;
    border: 1px solid var(--border-default, #d5dadf);
    border-radius: var(--radius-button);
    background: var(--surface-panel, #fff);
    font: inherit;
    font-size: var(--font-size-small);
    font-weight: 400;
    color: var(--text-primary);
}

.clock-leave-form__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.clock-leave--empty {
    justify-content: center;
    color: var(--text-muted);
    font-size: var(--font-size-small);
    border-style: dashed;
}


/* =============================================================================
   ANNUAL LEAVE - Balance / Used / Remaining widgets + row actions
   ============================================================================= */

.leave-widgets {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.leave-stat {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 14px 16px;
    border: 1px solid var(--border-default, #e3e7eb);
    border-radius: var(--radius-button);
    background: var(--surface-panel, #fff);
}

.leave-stat__value {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

.leave-stat__label {
    font-size: var(--font-size-small);
    font-weight: 600;
    color: var(--text-secondary, #475467);
}

.leave-stat__sub {
    font-size: var(--font-size-tiny);
    color: var(--text-muted);
}

.leave-stat--balance .leave-stat__value   { color: var(--accent, #6366f1); }
.leave-stat--used .leave-stat__value       { color: #c2410c; }
.leave-stat--remaining .leave-stat__value  { color: #16a34a; }
.leave-stat--over .leave-stat__value       { color: #dc2626; }

@media (max-width: 620px) {
    .leave-widgets { grid-template-columns: 1fr; }
}

/* Row action buttons (approve / reject / cancel) */
.employee-table__actions {
    white-space: nowrap;
    text-align: right;
}

.leave-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-left: 4px;
    border: 1px solid var(--border-default, #e3e7eb);
    border-radius: var(--radius-button);
    background: var(--surface-panel, #fff);
    color: var(--text-muted);
    cursor: pointer;
    transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.leave-action--approve:hover {
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.4);
    color: #16a34a;
}

.leave-action--reject:hover,
.leave-action--cancel:hover {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.35);
    color: #dc2626;
}


/* =============================================================================
   SHIFTS - chips (employee panel) + exclude-weekends / hint form rows
   ============================================================================= */

.shift-chip {
    display: inline-block;
    padding: 2px 10px;
    border-radius: var(--radius-button);
    font-size: var(--font-size-tiny);
    font-weight: 600;
}

.shift-chip--scheduled { background: rgba(99, 102, 241, 0.14); color: #4f46e5; }
.shift-chip--approved  { background: rgba(34, 197, 94, 0.14);  color: #16a34a; }
.shift-chip--declined  { background: rgba(220, 38, 38, 0.12);  color: #dc2626; }
.shift-chip--completed { background: var(--surface-subtle, #eef1f4); color: var(--text-muted); }

.employee-leave-form__check,
.clock-leave-form__check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-size-small);
    color: var(--text-secondary, #475467);
    cursor: pointer;
}

.employee-leave-form__check input,
.clock-leave-form__check input {
    width: 15px;
    height: 15px;
    accent-color: var(--accent, #6366f1);
    cursor: pointer;
}

.employee-leave-form__hint,
.clock-leave-form__hint {
    margin: 0;
    font-size: var(--font-size-tiny);
    color: var(--text-muted);
}


/* =============================================================================
   TIME-CLOCK PANEL - tabs, upcoming shifts, bank holidays, next-shift chip
   ============================================================================= */

.clock-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: var(--radius-button);
    background: var(--surface-subtle, #f6f8fa);
}

.clock-tab {
    flex: 1;
    padding: 8px 10px;
    border: none;
    border-radius: var(--radius-button);
    background: transparent;
    font: inherit;
    font-size: var(--font-size-small);
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.clock-tab:hover { color: var(--text-primary); }

.clock-tab.is-active {
    background: var(--surface-panel, #fff);
    color: var(--text-primary);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

.clock-tabpane {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.clock-tabpane[hidden] { display: none; }

.clock-panel__next-shift[hidden] { display: none; }

.clock-panel__next-shift {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--border-subtle, #e3e7eb);
    border-radius: var(--radius-button);
    background: var(--surface-subtle, #f6f8fa);
}

.clock-panel__next-shift-label {
    font-size: var(--font-size-tiny);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.clock-panel__next-shift-value {
    font-size: var(--font-size-small);
    font-weight: 600;
    color: var(--text-primary);
}

.clock-panel__shift-list,
.clock-panel__holiday-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.clock-shift,
.clock-holiday {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border-subtle, #e3e7eb);
    border-radius: var(--radius-button);
    background: var(--surface-panel, #fff);
}

.clock-shift__date {
    font-size: var(--font-size-small);
    font-weight: 600;
    color: var(--text-primary);
}

.clock-shift__meta {
    font-size: var(--font-size-tiny);
    color: var(--text-muted);
    margin-top: 2px;
}

.clock-shift__status {
    flex: none;
    padding: 2px 10px;
    border-radius: var(--radius-button);
    font-size: var(--font-size-tiny);
    font-weight: 600;
}

.clock-shift__status--scheduled { background: rgba(99, 102, 241, 0.14); color: #4f46e5; }
.clock-shift__status--approved  { background: rgba(34, 197, 94, 0.14);  color: #16a34a; }
.clock-shift__status--declined  { background: rgba(220, 38, 38, 0.12);  color: #dc2626; }
.clock-shift__status--completed { background: var(--surface-subtle, #eef1f4); color: var(--text-muted); }

.clock-holiday__name {
    font-size: var(--font-size-small);
    font-weight: 600;
    color: var(--text-primary);
}

.clock-holiday__date {
    font-size: var(--font-size-tiny);
    color: var(--text-muted);
}

.clock-shift--empty,
.clock-holiday--empty {
    justify-content: center;
    color: var(--text-muted);
    font-size: var(--font-size-small);
    border-style: dashed;
}


/* =============================================================================
   ACCOUNT AVATAR - clock status badge (green tick in / orange break / red out)
   ============================================================================= */

.header-user-avatar__status {
    position: absolute;
    right: -3px;
    bottom: -3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 999px;
    color: #fff;
    box-shadow: 0 0 0 2px #2a2a30;
    pointer-events: none;
}

.header-user-avatar__status .icon { display: block; }

.header-user-avatar__status--in    { background: #22c55e; }
.header-user-avatar__status--break { background: #fb923c; }
.header-user-avatar__status--out   { background: #ef4444; }


/* =============================================================================
   STAFF HUB (time clock) - today's activity timeline
   ============================================================================= */

.clock-panel__today {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 4px;
}

.clock-panel__today-label {
    font-size: var(--font-size-tiny);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.clock-today-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.clock-today {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid var(--border-subtle, #e3e7eb);
    border-radius: var(--radius-button);
    background: var(--surface-panel, #fff);
}

.clock-today__label {
    font-size: var(--font-size-small);
    font-weight: 600;
    color: var(--text-primary);
}

.clock-today__time {
    font-size: var(--font-size-small);
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
}

.clock-today--empty {
    margin: 0;
    padding: 10px 12px;
    text-align: center;
    color: var(--text-muted);
    font-size: var(--font-size-small);
    border: 1px dashed var(--border-subtle, #e3e7eb);
    border-radius: var(--radius-button);
}


/* =============================================================================
   HEADER CLOCK - passive display variant (icon only, not clickable)
   ============================================================================= */

.header-clock--static { cursor: default; }
.header-clock--static:hover { background: rgba(255, 255, 255, 0.06); }
.header-clock--static.header-clock--active:hover { background: rgba(34, 197, 94, 0.16); }
.header-clock--static.header-clock--break:hover  { background: rgba(251, 146, 60, 0.18); }


/* =============================================================================
   STAFF HUB - top menu (My profile / Sign out) above the tabs
   ============================================================================= */

.clock-menu {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.clock-menu__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex: 1;
    padding: 9px 12px;
    border: 1px solid var(--border-subtle, #e3e7eb);
    border-radius: var(--radius-button);
    background: var(--surface-panel, #fff);
    font: inherit;
    font-size: var(--font-size-small);
    font-weight: 600;
    color: var(--text-secondary, #475467);
    cursor: pointer;
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.clock-menu__item .icon { display: block; }

.clock-menu__item:hover {
    background: var(--surface-subtle, #f6f8fa);
    color: var(--text-primary);
}

.clock-menu__item--danger { color: #dc2626; }

.clock-menu__item--danger:hover {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.3);
    color: #dc2626;
}


/* =============================================================================
   EMPLOYEE ATTENDANCE - worked-hours summary (sub-headings + total row)
   ============================================================================= */

.employee-subhead {
    margin: 14px 0 2px;
    font-size: var(--font-size-tiny);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.employee-subhead:first-of-type { margin-top: 4px; }

.employee-table__total td {
    border-top: 1px solid var(--border-default, #e3e7eb);
    font-weight: 600;
    color: var(--text-primary);
}


/* =============================================================================
   SHIFTS - recurring weekday chips (employee form) + Staff Hub accept/decline
   ============================================================================= */

.shift-weekdays {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.shift-weekdays__label {
    font-size: var(--font-size-tiny);
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.shift-weekdays__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.shift-weekday { cursor: pointer; user-select: none; }

.shift-weekday input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.shift-weekday span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding: 6px 10px;
    border: 1px solid var(--border-default, #d5dadf);
    border-radius: 999px;
    font-size: var(--font-size-small);
    font-weight: 600;
    color: var(--text-secondary, #475467);
    background: var(--surface-panel, #fff);
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.shift-weekday input:checked + span {
    background: var(--accent, #6366f1);
    border-color: var(--accent, #6366f1);
    color: #fff;
}

.clock-shift__actions {
    display: flex;
    gap: 6px;
    flex: none;
}

.clock-shift__act {
    padding: 4px 10px;
    border-radius: var(--radius-button);
    border: 1px solid var(--border-default, #d5dadf);
    background: var(--surface-panel, #fff);
    font: inherit;
    font-size: var(--font-size-tiny);
    font-weight: 600;
    cursor: pointer;
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.clock-shift__act--accept { color: #16a34a; }
.clock-shift__act--accept:hover {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.4);
}

.clock-shift__act--decline { color: #dc2626; }
.clock-shift__act--decline:hover {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.35);
}


/* =============================================================================
   HR DIRECTORY PAGES - shared table bits + leave-request approval queue
   ============================================================================= */

.data-table__num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.data-table__empty {
    padding: 26px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: var(--font-size-small);
}

.hr-requests-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 12px;
    font-size: var(--font-size-small);
    color: var(--text-secondary, #475467);
}

.hr-requests-summary__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(251, 146, 60, 0.18);
    color: #c2410c;
    font-weight: 700;
    font-size: var(--font-size-tiny);
}

.leave-req-actions { display: flex; gap: 6px; justify-content: flex-end; }


/* =============================================================================
   SHIFTS DASHBOARD - month calendar
   ============================================================================= */

.cal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 4px 0 14px;
    font-size: var(--font-size-tiny);
    color: var(--text-muted);
}

.cal-legend__item { display: inline-flex; align-items: center; gap: 6px; }

.cal-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.cal-dot--shift   { background: #6366f1; }
.cal-dot--holiday { background: #16a34a; }
.cal-dot--sick    { background: #dc2626; }
.cal-dot--other   { background: #94a3b8; }
.cal-dot--bank    { background: #f59e0b; }

.cal-nav__label {
    min-width: 150px;
    text-align: center;
    font-weight: 600;
    font-size: var(--font-size-medium);
    color: var(--text-primary);
}

.cal-wrap { width: 100%; }

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1px;
    background: var(--border-subtle, #e3e7eb);
    border: 1px solid var(--border-subtle, #e3e7eb);
    border-radius: var(--radius-button);
    overflow: hidden;
}

.cal-grid__weekday {
    background: var(--surface-subtle, #f6f8fa);
    padding: 8px 10px;
    font-size: var(--font-size-tiny);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: left;
}

.cal-cell {
    background: var(--surface-panel, #fff);
    min-height: 104px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cal-cell--muted { background: var(--surface-subtle, #f6f8fa); }
.cal-cell--muted .cal-cell__date { color: var(--text-muted); }

.cal-cell--today { box-shadow: inset 0 0 0 2px var(--accent, #6366f1); }

.cal-cell__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.cal-cell__date { font-size: var(--font-size-small); font-weight: 700; color: var(--text-primary); }

.cal-cell__bank {
    font-size: 10px;
    font-weight: 600;
    color: #b45309;
    background: rgba(245, 158, 11, 0.16);
    padding: 1px 6px;
    border-radius: 999px;
    max-width: 74px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cal-cell__items { display: flex; flex-direction: column; gap: 4px; }

.cal-chip {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
    padding: 3px 7px;
    border: none;
    border-left: 3px solid transparent;
    border-radius: var(--radius-button);
    font: inherit;
    text-align: left;
    cursor: pointer;
    background: var(--surface-subtle, #f1f3f5);
    transition: filter 120ms ease;
}

.cal-chip:hover { filter: brightness(0.96); }

.cal-chip__name {
    font-size: var(--font-size-tiny);
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cal-chip__meta { font-size: 10px; color: var(--text-muted); flex: none; }

/* Shifts - indigo, shaded by status. */
.cal-chip--shift { background: rgba(99, 102, 241, 0.12); border-left-color: #6366f1; }
.cal-chip--shift.cal-chip--approved  { background: rgba(34, 197, 94, 0.14); border-left-color: #16a34a; }
.cal-chip--shift.cal-chip--completed { background: var(--surface-subtle, #eef1f4); border-left-color: #94a3b8; }

/* Leave - by type. */
.cal-chip--holiday { background: rgba(34, 197, 94, 0.14); border-left-color: #16a34a; }
.cal-chip--sick    { background: rgba(220, 38, 38, 0.12); border-left-color: #dc2626; }
.cal-chip--other   { background: rgba(148, 163, 184, 0.18); border-left-color: #94a3b8; }
.cal-chip--pending { opacity: 0.7; border-left-style: dashed; }

@media (max-width: 720px) {
    .cal-chip__meta { display: none; }
    .cal-cell { min-height: 72px; }
}


/* =============================================================================
   EMPLOYEE DEDUCTIONS (Salary tab) - header + active toggle switch
   ============================================================================= */

.employee-deductions-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.deduction-toggle { display: inline-flex; cursor: pointer; }

.deduction-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.deduction-toggle span {
    position: relative;
    width: 34px;
    height: 19px;
    border-radius: 999px;
    background: var(--border-default, #d5dadf);
    transition: background 120ms ease;
}

.deduction-toggle span::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #fff;
    transition: transform 120ms ease;
}

.deduction-toggle input:checked + span { background: #16a34a; }
.deduction-toggle input:checked + span::after { transform: translateX(15px); }


/* =============================================================================
   PAYROLL - Run Payroll panel + payslip document
   ============================================================================= */

.payroll-run { display: flex; flex-direction: column; gap: 16px; }

.payroll-run__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.payroll-run__section { display: flex; flex-direction: column; gap: 10px; }

.payroll-run__all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-size-small);
    font-weight: 600;
    color: var(--text-secondary, #475467);
    cursor: pointer;
}

.payroll-run__people {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid var(--border-subtle, #e3e7eb);
    border-radius: var(--radius-button);
    padding: 8px;
}

.run-person {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 8px;
    border-radius: var(--radius-button);
    cursor: pointer;
}
.run-person:hover { background: var(--surface-subtle, #f6f8fa); }
.run-person__body { display: flex; flex-direction: column; }
.run-person__name { font-size: var(--font-size-small); font-weight: 600; color: var(--text-primary); }
.run-person__pay { font-size: var(--font-size-tiny); color: var(--text-muted); }

.payroll-run__actions { display: flex; justify-content: flex-end; }

.payroll-run__preview-label {
    font-size: var(--font-size-tiny);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.payroll-hours { color: var(--text-muted); font-weight: 400; font-size: var(--font-size-tiny); }

/* Payslip document */
.payslip { display: flex; flex-direction: column; gap: 14px; }

.payslip__head {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle, #e3e7eb);
}

.payslip__label {
    font-size: var(--font-size-tiny);
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.payslip__value { font-size: var(--font-size-medium); font-weight: 600; color: var(--text-primary); margin-top: 2px; }
.payslip__sub { font-size: var(--font-size-tiny); color: var(--text-muted); margin-top: 2px; }

.payslip__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--font-size-medium);
    font-weight: 600;
    color: var(--text-primary);
}
.payslip__row--gross { padding-bottom: 4px; }
.payslip__row--net {
    padding: 12px 14px;
    border-radius: var(--radius-button);
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a;
    font-size: var(--font-size-large, 18px);
}

.payslip__deductions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
    border: 1px solid var(--border-subtle, #e3e7eb);
    border-radius: var(--radius-button);
}
.payslip__deductions-label {
    font-size: var(--font-size-tiny);
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 2px;
}
.payslip-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--font-size-small);
    color: var(--text-secondary, #475467);
}
.payslip-line--total {
    padding-top: 8px;
    margin-top: 4px;
    border-top: 1px solid var(--border-subtle, #e3e7eb);
    font-weight: 700;
    color: var(--text-primary);
}


/* ---- HR Dashboard ------------------------------------------------------- */

.hr-dash-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .hr-dash-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .hr-dash-tiles { grid-template-columns: 1fr; } }

.hr-dash-tiles .hr-widget:not(.hr-widget--link) { cursor: default; }
.hr-dash-tiles .hr-widget:not(.hr-widget--link):hover { transform: none; }
.hr-widget__sub { font-size: 12px; color: var(--text-muted); }
.hr-widget--pending .hr-widget__value { color: #d97706; }
.hr-widget--link:hover {
    border-color: var(--accent, #6366f1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.hr-dash-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
@media (max-width: 900px) { .hr-dash-grid { grid-template-columns: 1fr; } }

.hr-dash-card {
    border: 1px solid var(--border-default, #e3e7eb);
    border-radius: var(--radius-button);
    background: var(--surface-panel, #fff);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.hr-dash-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-subtle, #eef1f4);
}
.hr-dash-card__title { margin: 0; font-size: 14px; font-weight: 650; color: var(--text-primary); }
.hr-dash-card__link {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 4px 6px;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    border-radius: var(--radius-button);
}
.hr-dash-card__link:hover { color: var(--accent, #6366f1); background: rgba(99, 102, 241, 0.08); }

.hr-dash-card__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px;
    max-height: 340px;
    overflow-y: auto;
}

.hr-dash-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    background: transparent;
    border-radius: var(--radius-button);
    cursor: pointer;
    text-align: left;
}
.hr-dash-row:hover { background: var(--surface-hover, #f5f7f9); }

.hr-dash-avatar {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: #94a3b8;
}
.hr-dash-avatar--holiday { background: #16a34a; }
.hr-dash-avatar--sick    { background: #dc2626; }
.hr-dash-avatar--other   { background: #94a3b8; }
.hr-dash-avatar--shift   { background: #6366f1; }

.hr-dash-row__main { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; }
.hr-dash-row__name {
    font-size: 13px; font-weight: 550; color: var(--text-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hr-dash-row__meta { font-size: 12px; color: var(--text-muted); }
.hr-dash-row__end { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }

.hr-dash-chip {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-button);
    color: #fff;
    background: #94a3b8;
    white-space: nowrap;
}
.hr-dash-chip--holiday { background: #16a34a; }
.hr-dash-chip--sick    { background: #dc2626; }
.hr-dash-chip--other   { background: #94a3b8; }
.hr-dash-chip--shift   { background: #6366f1; }

.hr-dash-tag--pending {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 6px;
    border-radius: var(--radius-button);
    color: #b45309;
    background: rgba(245, 158, 11, 0.16);
}

.hr-dash-empty { padding: 18px 12px; text-align: center; font-size: 13px; color: var(--text-muted); }


/* ---- HR page gutter ----------------------------------------------------- */
/* The page header/toolbar already carry a horizontal gutter; give the body
   content the same so tables, widgets, calendars and dashboard panels don't
   sit flush against the left/right edges. */
.page-surface--gutter > *:not(.page-header):not(.page-toolbar) {
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}
