﻿/* ── Sync page ─────────────────────────────────────────────────────────── */

/* Page scaffold */
.sync-page { --sync-radius: .625rem; }

/* ── Page header ── */
.sync-page-header {
    background: var(--surface, #fff);
    border: 1px solid var(--border, #e5e5ea);
    border-radius: var(--sync-radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}
.sync-page-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 1rem;
}
.sync-page-title-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.sync-page-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: .75rem;
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
    color: #fff;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(26,115,232,.35);
}
.sync-page-subtitle {
    font-size: .85rem;
    color: var(--text-secondary, #636366);
    margin: .1rem 0 0;
}
.sync-header-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ── Status bar ── */
.sync-status-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    padding-top: .75rem;
    border-top: 1px solid var(--border, #e5e5ea);
}
.sync-status-item {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.sync-status-label {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-secondary, #8e8e93);
}
.sync-status-value {
    font-size: .85rem;
    font-weight: 500;
    color: var(--text, #1c1c1e);
}
.sync-status-value--accent {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--brand, #1b6ec2);
}

/* ── State badge ── */
.sync-state-badge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .25rem .65rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    white-space: nowrap;
}
.badge-idle     { background: #f0f0f5;   color: #636366; }
.badge-syncing  { background: #e8f0fe;   color: #1a73e8; }
.badge-ok       { background: #e6f9f0;   color: #1a7f4b; }
.badge-error    { background: #fde8e8;   color: #c0392b; }
.badge-offline  { background: #fef3e2;   color: #b45309; }
.badge-conflict { background: #fff3e0;   color: #e67e22; }

/* ── Generic status badges (used across HR pages e.g. Probation, Dashboard) ── */
.badge-granted  { background: var(--success-bg, #d1e7dd); color: var(--success, #198754); }
.badge-rejected { background: var(--danger-bg, #f8d7da);  color: var(--danger, #dc3545); }
.badge-pending  { background: #fff3e0;                     color: #e67e22; }
.badge-info     { background: #e8f0fe;                     color: #1a73e8; }

/* ── Entity summary cards ── */
.sync-entity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: .875rem;
    margin-bottom: 1.25rem;
}
.sync-entity-card {
    border: 1px solid var(--border, #e5e5ea);
    border-radius: var(--sync-radius);
    padding: 1rem 1.1rem;
    background: var(--surface, #fff);
    position: relative;
    overflow: hidden;
    transition: box-shadow .15s, transform .15s;
}
.sync-entity-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--entity-accent, var(--brand, #1b6ec2));
    border-radius: var(--sync-radius) var(--sync-radius) 0 0;
}
.sync-entity-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.09); transform: translateY(-1px); }
.sync-entity-card--supervision    { --entity-accent: #1a73e8; }
.sync-entity-card--appraisal      { --entity-accent: #f59e0b; }
.sync-entity-card--debrief        { --entity-accent: #7c3aed; }
.sync-entity-card--absence        { --entity-accent: #e11d48; }
.sync-entity-card--mileageclaim   { --entity-accent: #0891b2; }
.sync-entity-card--mileagejourney { --entity-accent: #0e7490; }
.sync-entity-card--trainingrecord     { --entity-accent: #16a34a; }
.sync-entity-card--trainingcourse     { --entity-accent: #15803d; }
.sync-entity-card--trainingrequirement { --entity-accent: #166534; }
.sync-entity-card--courseenrollment   { --entity-accent: #4ade80; }
.sync-entity-card--skeleton    { min-height: 100px; background: linear-gradient(90deg,#f0f0f5 25%,#e8e8ed 50%,#f0f0f5 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }

/* ── Section headings (HR grid / Training grid) ── */
.sync-section-heading {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-secondary, #636366);
    margin: 1.25rem 0 .6rem;
}
.sync-section-heading:first-child { margin-top: 0; }

.sync-entity-card-header {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin-bottom: .5rem;
}
.sync-entity-card-icon {
    font-size: 1rem;
    color: var(--entity-accent, var(--brand, #1b6ec2));
    opacity: .85;
}
.sync-entity-name {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-secondary, #636366);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sync-entity-total {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: .2rem;
    color: var(--text, #1c1c1e);
}
.sync-entity-detail { font-size: .76rem; }
.sync-entity-active  { color: var(--success, #15803d); }
.sync-entity-deleted { color: var(--danger,  #c0392b); font-weight: 600; }
.sync-entity-modified {
    font-size: .7rem;
    color: var(--text-secondary, #636366);
    margin-top: .4rem;
    display: flex;
    align-items: center;
    gap: .25rem;
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Tabs ── */
.sync-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border, #e5e5ea);
    margin-bottom: 0;
}
.sync-tab {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .6rem 1.25rem;
    font-size: .875rem;
    font-weight: 500;
    color: var(--text-secondary, #636366);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: color .15s, border-color .15s, background .15s;
    border-radius: .375rem .375rem 0 0;
}
.sync-tab:hover { color: var(--brand, #1b6ec2); background: rgba(27,110,194,.04); }
.sync-tab--active {
    color: var(--brand, #1b6ec2);
    font-weight: 600;
    border-bottom-color: var(--brand, #1b6ec2);
}
.sync-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.3rem;
    height: 1.3rem;
    padding: 0 .3rem;
    font-size: .68rem;
    font-weight: 700;
    border-radius: 999px;
    background: var(--brand, #1b6ec2);
    color: #fff;
}
.sync-tab--active .sync-tab-badge { background: var(--brand, #1b6ec2); }

/* ── Tab panel ── */
.sync-tab-panel {
    border: 1px solid var(--border, #e5e5ea);
    border-top: none;
    border-radius: 0 0 var(--sync-radius) var(--sync-radius);
    background: var(--surface, #fff);
    min-height: 200px;
}

/* ── Tab toolbar ── */
.sync-tab-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--border, #e5e5ea);
    background: var(--surface-alt, #fafafa);
}
.sync-tab-toolbar--filters { gap: .5rem .75rem; }
.sync-toolbar-info { font-size: .82rem; color: var(--text-secondary, #636366); }

/* ── Filter controls ── */
.sync-filter-group { display: flex; align-items: center; gap: .3rem; }
.sync-filter-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-secondary, #8e8e93);
    white-space: nowrap;
}
.sync-filter-select {
    padding: .3rem .65rem;
    font-size: .82rem;
    border: 1px solid var(--border, #e5e5ea);
    border-radius: .375rem;
    background: var(--surface, #fff);
    color: var(--text, #1c1c1e);
    cursor: pointer;
    min-width: 7rem;
}
.sync-filter-select:focus { outline: 2px solid var(--brand, #1b6ec2); outline-offset: 1px; }

/* ── Danger / secondary link buttons ── */
.btn-link-danger {
    background: none; border: none; cursor: pointer; padding: .2rem .35rem;
    font-size: .82rem; color: var(--danger, #c0392b); font-weight: 500;
    border-radius: .25rem; transition: background .15s;
}
.btn-link-danger:hover { background: rgba(192,57,43,.08); }
.btn-link-secondary {
    background: none; border: none; cursor: pointer; padding: .2rem .35rem;
    font-size: .82rem; color: var(--text-secondary, #636366); font-weight: 500;
    border-radius: .25rem; transition: background .15s;
}
.btn-link-secondary:hover { background: rgba(0,0,0,.06); }

/* ── Date group separator ── */
.sync-date-group { margin-bottom: .25rem; }
.sync-date-separator {
    display: flex;
    align-items: center;
    padding: .5rem 1rem;
    background: var(--surface-alt, #f7f7f9);
    border-bottom: 1px solid var(--border, #e5e5ea);
}
.sync-date-label {
    font-size: .78rem;
    font-weight: 700;
    color: var(--text-secondary, #636366);
    text-transform: uppercase;
    letter-spacing: .05em;
    display: flex;
    align-items: center;
    gap: .75rem;
}
.sync-date-count {
    font-weight: 400;
    font-size: .75rem;
    text-transform: none;
    letter-spacing: 0;
    background: var(--border, #e5e5ea);
    color: var(--text-secondary, #636366);
    padding: .1rem .4rem;
    border-radius: 999px;
}

/* ── Shared table ── */
.sync-table-scroll { overflow-x: auto; }
.sync-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}
.sync-table thead th {
    padding: .55rem 1rem;
    text-align: left;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-secondary, #8e8e93);
    background: var(--surface-alt, #f7f7f9);
    border-bottom: 1px solid var(--border, #e5e5ea);
    white-space: nowrap;
}
.sync-table tbody td {
    padding: .6rem 1rem;
    border-bottom: 1px solid var(--separator, #f1f3f4);
    vertical-align: middle;
}
.sync-table tbody tr:last-child td { border-bottom: none; }
.sync-table .col-time   { width: 100px; }
.sync-table .col-status { width: 120px; }
.sync-table .col-entity { width: 115px; }
.sync-table .col-action { width: 130px; }
.sync-table .col-source { width: 70px;  }
.sync-table .col-actor  { width: 180px; }
.sync-table .col-num    { width: 70px; text-align: center; }

.sync-event-row.row-error    td { background: rgba(192,57,43,.05); }
.sync-event-row.row-conflict td { background: rgba(230,126,34,.05); }
.sync-audit-row:hover td { background: rgba(26,115,232,.03); }

.sync-log-time {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: var(--text-secondary, #636366);
    font-size: .82rem;
}
.sync-log-message { font-size: .84rem; }
.sync-dash        { color: var(--text-secondary, #8e8e93); }
.sync-audit-actor { font-size: .82rem; font-weight: 500; }
.sync-audit-desc  { font-size: .82rem; color: var(--text-secondary, #636366); }

/* ── Conflict badge ── */
.sync-conflict-badge {
    display: inline-block;
    background: #fff3e0; color: #e67e22;
    font-size: .75rem; font-weight: 700;
    padding: .15rem .45rem; border-radius: 12px;
}

/* ── Empty state ── */
.sync-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 1rem;
    gap: .5rem;
    text-align: center;
}
.sync-empty-icon {
    font-size: 2.5rem;
    color: var(--text-secondary, #8e8e93);
    opacity: .4;
    margin-bottom: .25rem;
}
.sync-empty-title { font-size: 1rem; font-weight: 600; margin: 0; color: var(--text, #1c1c1e); }
.sync-empty-sub   { font-size: .85rem; color: var(--text-secondary, #636366); margin: 0; max-width: 340px; }

/* ── Entity pills ── */
.sync-entity-pill {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .2rem .55rem; border-radius: .375rem;
    font-size: .75rem; font-weight: 600; white-space: nowrap;
}
.sync-entity-pill--supervision        { background: #e8f0fe; color: #1a73e8; }
.sync-entity-pill--appraisal          { background: #fef3c7; color: #92400e; }
.sync-entity-pill--debrief            { background: #ede9fe; color: #5b21b6; }
.sync-entity-pill--absence            { background: #ffe4e6; color: #be123c; }
.sync-entity-pill--absencefitmote     { background: #fce7f3; color: #be185d; }
.sync-entity-pill--absencefitnote     { background: #fce7f3; color: #be185d; }
.sync-entity-pill--wellnessrequest    { background: #dcfce7; color: #166534; }
.sync-entity-pill--mileageclaim       { background: #d1fae5; color: #065f46; }
.sync-entity-pill--mileagejourney     { background: #ecfdf5; color: #065f46; }
.sync-entity-pill--trainingrecord     { background: #e0f2fe; color: #0369a1; }
.sync-entity-pill--trainingcourse     { background: #bae6fd; color: #0c4a6e; }
.sync-entity-pill--trainingrequirement{ background: #f0f9ff; color: #0369a1; }
.sync-entity-pill--courseenrollment   { background: #cffafe; color: #155e75; }
.sync-entity-pill--applicationsubmission { background: #fce7f3; color: #9d174d; }
.sync-entity-pill--onboardingdocument { background: #fef9c3; color: #713f12; }
.sync-entity-pill--backtoworkrecord   { background: #fff7ed; color: #c2410c; }
.sync-entity-pill--interviewcalendar  { background: #f5f3ff; color: #6d28d9; }
.sync-entity-pill--comment            { background: #f3f4f6; color: #374151; }

/* ── Action badges ── */
.sync-action-badge {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .2rem .55rem; border-radius: .375rem;
    font-size: .75rem; font-weight: 600; white-space: nowrap;
}
.sync-action--created          { background: #dcfce7; color: #166534; }
.sync-action--updated          { background: #dbeafe; color: #1e40af; }
.sync-action--deleted          { background: #fee2e2; color: #991b1b; }
.sync-action--archived         { background: #f3f4f6; color: #374151; }
.sync-action--approved         { background: #dcfce7; color: #166534; }
.sync-action--rejected         { background: #fee2e2; color: #991b1b; }
.sync-action--signed           { background: #ede9fe; color: #5b21b6; }
.sync-action--syncpushed       { background: #e0f2fe; color: #0369a1; }
.sync-action--syncpulled       { background: #f0fdf4; color: #166534; }
.sync-action--conflictresolved { background: #fef3c7; color: #92400e; }

/* ── Source badges ── */
.sync-source-badge {
    display: inline-block;
    padding: .2rem .5rem; border-radius: .3rem;
    font-size: .7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .05em;
}
.sync-source--web  { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.sync-source--maui { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.sync-source--sync { background: #fefce8; color: #854d0e; border: 1px solid #fde68a; }

/* ── Button variants ── */
.btn-action--ghost {
    background: transparent;
    color: var(--brand, #1b6ec2);
    border: 1px solid currentColor;
}
.btn-action--ghost:hover { background: rgba(27,110,194,.07); }

/* ── Last synced strip (MAUI) ── */
.sync-last-synced {
    font-size: .85rem; color: var(--text-secondary, #636366);
    margin-bottom: 1rem; display: flex; align-items: center; gap: .35rem;
}

/* ── Inline icon helpers (no Bootstrap utilities needed) ── */
.sync-inline-icon { margin-right: .3rem; }
.sync-inline-icon--muted { margin-right: .3rem; opacity: .45; }

/* ── Responsive ── */
@media (max-width: 640px) {
    .sync-status-bar   { gap: .75rem 1rem; }
    .sync-entity-grid  { grid-template-columns: repeat(2, 1fr); }
    .sync-tab          { padding: .5rem .75rem; font-size: .82rem; }
    .sync-tab-toolbar--filters { flex-direction: column; align-items: flex-start; }
}

/* â”€â”€ Dashboard stat cards â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.dashboard-subtitle {
    color: var(--text-secondary, #636366);
    margin-top: -.5rem;
    margin-bottom: 1.25rem;
}

.dashboard-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.dashboard-stat-card {
    background: var(--surface, #fff);
    border: 1px solid var(--border, #e5e5ea);
    border-radius: 16px;
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .3rem;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .15s, transform .15s;
    text-align: center;
}

.dashboard-stat-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
    transform: translateY(-2px);
}

.dashboard-stat-icon  { font-size: 1.8rem; }
.dashboard-stat-value { font-size: 2rem; font-weight: 700; color: var(--brand, #007aff); line-height: 1; }
.dashboard-stat-label { font-size: .9rem; font-weight: 600; }
.dashboard-stat-sub   { font-size: .75rem; color: var(--text-secondary, #8e8e93); }


/* -- Page chrome -------------------------------------------------- */
/* â”€â”€ Page chrome â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.hr-page {
    padding: 1.5rem 1.5rem 3rem;
    width: 100%;
}

.hr-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 1.25rem;
}

.hr-title-group {
    display: flex;
    align-items: baseline;
    gap: .75rem;
}

.hr-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.hr-count {
    font-size: .85rem;
    color: var(--text-secondary, #8e8e93);
}

/* â”€â”€ Filter bar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.hr-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1.25rem;
}

/* The search wrapper grows to fill all available space */
.hr-filter-bar .search-wrap {
    position: relative;
    flex: 1 1 200px;
    min-width: 160px;
}

.hr-search {
    padding: .45rem .75rem .45rem 2.25rem;
    border: 1px solid var(--border, #d1d1d6);
    border-radius: 8px;
    font-size: .9rem;
    min-width: 220px;
    width: 100%;
    box-sizing: border-box;
    background: var(--surface, #fff);
    color: inherit;
}

.hr-filter-select {
    padding: .45rem .75rem;
    border: 1px solid var(--border, #d1d1d6);
    border-radius: 8px;
    font-size: .9rem;
    background: var(--surface, #fff);
    color: inherit;
}

.hr-filter-select--perpage {
    min-width: 130px;
    max-width: 140px;
    margin-left: auto;  /* pushes it to the right end of the filter bar */
}

.hr-filter-label { font-size: .85rem; color: var(--text-secondary, #8e8e93); }
.hr-filter-sep   { font-size: .85rem; color: var(--text-secondary, #8e8e93); }

/* â”€â”€ Card grid â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.hr-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.hr-card {
    background: var(--surface, #fff);
    border: 1px solid var(--border, #e5e5ea);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: box-shadow .15s, transform .15s;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.hr-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
    transform: translateY(-2px);
}

.hr-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.hr-card-name {
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hr-interview-banner {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .02em;
    color: #fff;
    background: linear-gradient(135deg, #7c3aed 0%, #2563eb 50%, #0891b2 100%);
    border-radius: 8px;
    padding: .35rem .6rem;
    box-shadow: 0 2px 8px rgba(124, 58, 237, .35);
    width: fit-content;
}

.hr-interview-banner i {
    font-size: .95rem;
}

.hr-interview-banner-date {
    font-weight: 500;
    opacity: .9;
    margin-left: .15rem;
}

.hr-card-meta {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    font-size: .82rem;
    color: var(--text-secondary, #636366);
}

.hr-card-footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: .25rem;
}

.hr-card-link {
    font-size: .82rem;
    color: var(--brand, #007aff);
    text-decoration: none;
    font-weight: 500;
}

.hr-card-link:hover { text-decoration: underline; }

/* ── Rota coverage rows ──────────────────────────────────────────────────── */
.hr-coverage-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .45rem .6rem;
    border-radius: var(--radius-sm, 6px);
    background: var(--surface-alt);
    border: 1px solid var(--border);
    margin-bottom: .35rem;
    font-size: .88rem;
}

.hr-coverage-row:last-child { margin-bottom: 0; }

.hr-coverage-day {
    font-weight: 600;
    min-width: 7rem;
    color: var(--text);
}

.hr-coverage-type {
    flex: 1;
    color: var(--text-secondary);
    margin: 0 .75rem;
}

.hr-coverage-badge {
    display: inline-flex;
    align-items: center;
    gap: .3em;
    padding: .28em .75em;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    border: 1px solid transparent;
}

.hr-coverage-badge--met {
    background: var(--success-bg);
    color: var(--success);
    border-color: var(--success-border);
}
.hr-coverage-badge--short {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: var(--danger-border);
}


.rota-avatar-stack {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-top: .4rem;
}

.rota-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--card-bg, #fff);
    margin-left: -8px;
    object-fit: cover;
    flex-shrink: 0;
}

.rota-avatar-stack .rota-avatar:first-child { margin-left: 0; }

.rota-avatar--initials,
.rota-avatar--more {
    background: var(--brand, #007aff);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.rota-avatar--more {
    background: var(--text-secondary, #636366);
    font-size: .6rem;
}

/* â”€â”€ Badges â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.hr-badge {
    display: inline-block;
    padding: .2em .65em;
    border-radius: 6px;
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
}

.hr-badge--lg { font-size: .82rem; padding: .3em .9em; }

.hr-badge--scheduled         { background: #e5f0ff; color: #0055cc; }
.hr-badge--confirmedattending { background: #d4f1e4; color: #0a7a3e; }
.hr-badge--completed         { background: #d4f1e4; color: #0a7a3e; }
.hr-badge--declined          { background: #ffe5e5; color: #c0392b; }
.hr-badge--cancelled         { background: #ffe5e5; color: #c0392b; }
.hr-badge--draft      { background: #f5f5f7; color: #636366; }
.hr-badge--inprogress { background: #fff3cd; color: #7a5c00; }
.hr-badge--acknowledged { background: #d4f1e4; color: #0a7a3e; }
.hr-badge--pending    { background: #fff3cd; color: #7a5c00; }
.hr-badge--closed     { background: #f5f5f7; color: #636366; }
.hr-badge--requested  { background: #fff3cd; color: #7a5c00; }
.hr-badge--approved   { background: #d4f1e4; color: #0a7a3e; }
.hr-badge--rejected   { background: #ffe5e5; color: #c0392b; }
.hr-badge--signed     { background: #d4f1e4; color: #0a7a3e; }
.hr-badge--other      { background: #f5f5f7; color: #636366; }
.hr-badge--incident   { background: #ffe5e5; color: #c0392b; }
.hr-badge--postshift  { background: #e5f0ff; color: #0055cc; }
.hr-badge--return     { background: #f0e5ff; color: #6600cc; }
.hr-badge--sickness   { background: #ffe5e5; color: #c0392b; }
.hr-badge--annual     { background: #e5f0ff; color: #0055cc; }

.hr-rating {
    font-weight: 600;
    color: var(--brand, #007aff);
}

/* â”€â”€ Loading / empty / error â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.hr-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    padding: 2rem;
    color: var(--text-secondary, #636366);
    font-size: .95rem;
}

.hr-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary, #636366);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.analytics-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .15rem;
    padding: .75rem 1.25rem;
    min-width: 110px;
    border-radius: var(--r-md, 8px);
    background: var(--card-bg, #f5f5f7);
    border: 1px solid var(--border-color, #e2e2e6);
}

.analytics-tile-value {
    font-size: 1.4rem;
    font-weight: 700;
}

.analytics-tile-label {
    font-size: .75rem;
    color: var(--text-secondary, #636366);
    text-transform: uppercase;
    letter-spacing: .02em;
}

.hr-error {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    border-radius: var(--r-md, 8px);
    background: var(--danger-bg, #f8d7da);
    color: var(--danger, #c0392b);
    font-size: .9rem;
    font-weight: 500;
}

.hr-error {
    background: #ffe5e5;
    color: #c0392b;
    border-radius: 8px;
    padding: .75rem 1rem;
    font-size: .9rem;
    margin-top: .5rem;
}

/* â”€â”€ Detail page â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.hr-detail-page {
    padding: 1.5rem 1.5rem 3rem;
    width: 100%;
}

.hr-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 1.5rem;
}

.hr-detail-header-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.hr-profile-card {
    background: var(--surface, #fff);
    border: 1px solid var(--border, #e5e5ea);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.hr-profile-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.hr-profile-name {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 .25rem;
}

.hr-profile-sub {
    font-size: .9rem;
    color: var(--text-secondary, #636366);
    margin: 0;
}

.hr-detail-grid {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    border-top: 1px solid var(--border, #e5e5ea);
    padding-top: 1rem;
}

.hr-detail-row {
    display: flex;
    gap: 1rem;
    font-size: .9rem;
}

.hr-detail-label {
    min-width: 160px;
    font-weight: 500;
    color: var(--text-secondary, #636366);
    flex-shrink: 0;
}

.hr-detail-value { color: inherit; }

.sub-interview-group {
    position: relative;
    padding: .75rem 6rem .75rem 0;
    border-bottom: 1px solid var(--border, #e5e5ea);
}

.sub-interview-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sub-interview-badge {
    position: absolute;
    top: .75rem;
    right: .75rem;
}

.hr-detail-section h3 {
    font-size: .95rem;
    font-weight: 600;
    margin: 0 0 .4rem;
    color: var(--text-secondary, #636366);
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: .78rem;
}

.hr-prose {
    margin: 0;
    white-space: pre-wrap;
    font-size: .9rem;
    line-height: 1.6;
}

.hr-detail-rating-group {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.hr-rating-badge {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand, #007aff);
}

/* â”€â”€ Table â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.hr-table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid var(--border, #e5e5ea);
}

.hr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
}

.hr-table th {
    background: var(--surface-alt, #f2f2f7);
    font-weight: 600;
    text-align: left;
    padding: .65rem 1rem;
    white-space: nowrap;
    border-bottom: 1px solid var(--border, #e5e5ea);
}

.hr-table td {
    padding: .6rem 1rem;
    border-bottom: 1px solid var(--border, #e5e5ea);
}

.hr-table tr:last-child td { border-bottom: none; }
.hr-table tr:hover td { background: var(--surface-alt, #f9f9fb); }
.hr-table-num { text-align: right; font-variant-numeric: tabular-nums; }

/* ── Compliance Audit Table field (adjustable widths, wrapping headers) ─── */
.audit-table {
    table-layout: fixed;
}

.audit-table th {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    vertical-align: top;
    line-height: 1.25;
}

.audit-table td {
    word-break: break-word;
    overflow-wrap: break-word;
    vertical-align: top;
}

@media print {
    .audit-table {
        table-layout: fixed;
        width: 100% !important;
        font-size: .75rem;
    }

    .audit-table th,
    .audit-table td {
        padding: .35rem .5rem;
    }
}

/* â”€â”€ Reports page â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.report-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.report-stat-card {
    background: var(--surface, #fff);
    border: 1px solid var(--border, #e5e5ea);
    border-radius: 14px;
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .2rem;
    text-align: center;
}

.report-stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--brand, #007aff);
    line-height: 1;
}

.report-stat-label {
    font-size: .9rem;
    font-weight: 600;
}

.report-stat-sub {
    font-size: .78rem;
    color: var(--text-secondary, #636366);
}

.report-section {
    margin-bottom: 2rem;
}

/* Primary section heading — e.g. "Training & Development", "Mileage Claims" */
.report-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary, #1c1c1e);
    margin: 0 0 1rem;
    padding-bottom: .4rem;
    border-bottom: 2px solid var(--border-color, #e5e7eb);
}

/* Sub-heading inside a section — e.g. "By Category", "Top Claimants", "By Status" */
.report-section-subtitle {
    font-size: .95rem;
    font-weight: 700;
    color: var(--text-secondary, #636366);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin: 1.5rem 0 .6rem;
}

/* Sort header row inside a report section */
.report-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 1.5rem 0 .6rem;
}
.report-section-header .report-section-subtitle {
    margin: 0;
}
.report-section-header .report-section-title {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.hr-sort-bar {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
}

.hr-sort-label {
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-secondary, #636366);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.hr-sort-btn {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .2rem .6rem;
    font-size: .8rem;
    font-weight: 500;
    background: var(--surface-secondary, #f3f4f6);
    color: var(--text-primary, #1c1c1e);
    border: 1.5px solid var(--border-color, #e5e7eb);
    border-radius: .4rem;
    cursor: pointer;
    transition: background .12s, border-color .12s;
}
.hr-sort-btn:hover {
    background: var(--surface-hover, #e9ebef);
    border-color: #c7cacd;
}
.hr-sort-btn--active {
    background: var(--accent-light, #ede9fe);
    border-color: var(--accent, #7c3aed);
    color: var(--accent, #7c3aed);
}

/* Sortable table column headers */
.hr-th-sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.hr-th-sortable:hover {
    background: var(--surface-hover, #f3f4f6);
}

.hr-sort-inactive {
    opacity: .35;
}

.report-bar-group {
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.report-bar-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .88rem;
}

.report-bar-label {
    min-width: 110px;
    font-weight: 500;
    flex-shrink: 0;
}

.report-bar-track {
    flex: 1;
    background: var(--surface-alt, #f2f2f7);
    border-radius: 6px;
    height: 14px;
    overflow: hidden;
}

.report-bar-fill {
    height: 100%;
    border-radius: 6px;
    background: var(--brand, #007aff);
    transition: width .4s ease;
    min-width: 2px;
}

.report-bar-fill--rating { background: #ff9500; }

.report-bar-value {
    min-width: 90px;
    text-align: right;
    color: var(--text-secondary, #636366);
    font-variant-numeric: tabular-nums;
}

/* â”€â”€ Dark mode overrides â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (prefers-color-scheme: dark) {
    .hr-badge--scheduled    { background: #1a3a6e; color: #6fa8ff; }
    .hr-badge--completed,
    .hr-badge--confirmedattending,
    .hr-badge--acknowledged,
    .hr-badge--approved,
    .hr-badge--signed       { background: #0a3d24; color: #4cd97b; }
    .hr-badge--cancelled,
    .hr-badge--declined,
    .hr-badge--rejected,
    .hr-badge--sickness,
    .hr-badge--incident     { background: #4d1414; color: #ff6b6b; }
    .hr-badge--pending,
    .hr-badge--inprogress,
    .hr-badge--requested    { background: #3d2e00; color: #ffd166; }
    .hr-badge--draft,
    .hr-badge--closed,
    .hr-badge--other        { background: #2c2c2e; color: #aeaeb2; }
    .hr-error               { background: #4d1414; color: #ff8080; }
    .report-bar-track       { background: #2c2c2e; }
}

[data-theme="dark"] .hr-badge--scheduled    { background: rgba(27,110,194,0.20); color: #6fa8ff; }
[data-theme="dark"] .hr-badge--annual,
[data-theme="dark"] .hr-badge--postshift    { background: rgba(27,110,194,0.20); color: #6fa8ff; }
[data-theme="dark"] .hr-badge--completed,
[data-theme="dark"] .hr-badge--confirmedattending,
[data-theme="dark"] .hr-badge--acknowledged,
[data-theme="dark"] .hr-badge--approved,
[data-theme="dark"] .hr-badge--signed       { background: rgba(74,222,128,0.15); color: #4ade80; }
[data-theme="dark"] .hr-badge--cancelled,
[data-theme="dark"] .hr-badge--declined,
[data-theme="dark"] .hr-badge--rejected,
[data-theme="dark"] .hr-badge--sickness,
[data-theme="dark"] .hr-badge--incident     { background: rgba(248,113,113,0.15); color: #f87171; }
[data-theme="dark"] .hr-badge--pending,
[data-theme="dark"] .hr-badge--inprogress,
[data-theme="dark"] .hr-badge--requested    { background: rgba(251,191,36,0.15); color: #fbbf24; }
[data-theme="dark"] .hr-badge--draft,
[data-theme="dark"] .hr-badge--closed,
[data-theme="dark"] .hr-badge--other        { background: rgba(156,163,175,0.15); color: #9ca3af; }
[data-theme="dark"] .hr-badge--return       { background: rgba(167,139,250,0.15); color: #c4b5fd; }
[data-theme="dark"] .hr-error               { background: rgba(248,113,113,0.12); color: #f87171; }
[data-theme="dark"] .report-bar-track       { background: var(--surface-alt); }

/* â”€â”€ Responsive â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
/* ======================================================================
   RESPONSIVE � MOBILE FIRST
   Target: <=640px (phones, including S24/S26 Ultra & iPhone Pro Max)
   ====================================================================== */
@media (max-width: 640px) {

    /* -- Page padding -- */
    .hr-page,
    .hr-detail-page {
        padding: 1rem .875rem 3rem;
    }

    /* -- Header: title + actions stack vertically -- */
    .hr-header {
        flex-direction: column;
        align-items: flex-start;
        gap: .6rem;
    }

    .hr-header-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: .5rem;
    }

    .hr-header-actions .btn-action {
        flex: 1 1 auto;
        min-width: 0;
        justify-content: center;
    }

    /* -- Filter bar: each control full-width -- */
    .hr-filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: .5rem;
    }

    .hr-filter-bar .search-wrap,
    .hr-filter-bar .hr-search,
    .hr-filter-bar .hr-filter-select,
    .hr-filter-bar input[type="date"] {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    /* Disable the margin-left:auto trick for per-page select on mobile */
    .hr-filter-select--perpage {
        margin-left: 0;
        max-width: 100%;
    }

    /* -- Card grid: single column -- */
    .hr-card-grid { grid-template-columns: 1fr; }

    /* -- Detail label narrower -- */
    .hr-detail-label { min-width: 110px; }

    /* -- Detail header: stack actions below title -- */
    .hr-detail-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .hr-detail-header-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .hr-detail-header-actions .btn-action {
        flex: 1 1 auto;
        justify-content: center;
    }

    /* -- Profile hero on details -- */
    .hr-profile-hero {
        flex-direction: column;
    }

    /* -- Reports -- */
    .report-stat-grid { grid-template-columns: 1fr 1fr; }
    .report-bar-label { min-width: 70px; }

    /* -- Section header with actions -- */
    .hr-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: .5rem;
    }

    .hr-section-actions {
        width: 100%;
    }

    /* -- Quick nav: single column -- */
    .hr-quick-nav {
        grid-template-columns: 1fr;
    }

    /* -- HR title size -- */
    .hr-title { font-size: 1.35rem; }

    /* -- Pagination -- */
    .hr-pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: .3rem;
    }
}

/* -- Tablet tweaks (641px-768px) -- */
@media (min-width: 641px) and (max-width: 768px) {
    .hr-header-actions { flex-wrap: wrap; gap: .4rem; }
    .hr-filter-bar .hr-search { min-width: 160px; }
    .hr-quick-nav { grid-template-columns: repeat(2, 1fr); }
}


/* ── Employee card HR stats strip ──────────────────────────────────────── */
.emp-card-hr-stats {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    padding: .5rem .75rem .6rem;
    border-top: 1px solid var(--border, #e5e5ea);
    background: var(--surface-alt, #f9f9fb);
    border-radius: 0 0 var(--r-xl, .75rem) var(--r-xl, .75rem);
}
.hr-stat {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .72rem;
    font-weight: 500;
    padding: .2rem .55rem;
    border-radius: var(--r-full, 9999px);
    white-space: nowrap;
}
.hr-stat i { font-size: .75rem; }
.hr-stat--ok      { background: color-mix(in srgb, var(--success, #34c759) 12%, transparent); color: var(--success, #34c759); }
.hr-stat--soon    { background: color-mix(in srgb, #f59e0b 12%, transparent);                color: #b45309; }
.hr-stat--overdue { background: color-mix(in srgb, var(--danger, #ff3b30) 12%, transparent); color: var(--danger, #ff3b30); }
.hr-stat--open    { background: color-mix(in srgb, #f59e0b 12%, transparent);                color: #b45309; }

/* ── Employee details HR tabs ───────────────────────────────────────────── */
.emp-hr-section {
    margin-top: 2rem;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #e5e5ea);
    border-radius: var(--r-xl, .75rem);
    overflow: hidden;
}
.emp-hr-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border, #e5e5ea);
    background: var(--surface-alt, #f9f9fb);
    overflow-x: auto;
}
.emp-hr-tab {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .7rem 1.1rem;
    font-size: .875rem;
    font-weight: 500;
    color: var(--text-secondary, #6e6e73);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: color .15s, border-color .15s;
}
.emp-hr-tab:hover  { color: var(--text, #1c1c1e); }
.emp-hr-tab.active { color: var(--brand, #007aff); border-bottom-color: var(--brand, #007aff); background: var(--surface, #fff); }
.emp-hr-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.3rem;
    height: 1.3rem;
    padding: 0 .3rem;
    font-size: .7rem;
    font-weight: 600;
    border-radius: var(--r-full, 9999px);
    background: var(--brand, #007aff);
    color: #fff;
}
.emp-hr-panel { padding: 1rem 1rem 1.25rem; }
.emp-hr-panel-comments { padding: 1rem; }
.emp-hr-panel-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: .75rem;
}
.emp-hr-loading { display: flex; justify-content: center; padding: 1.5rem 0; }
.emp-hr-empty   { color: var(--text-secondary, #6e6e73); font-size: .875rem; text-align: center; padding: 1.5rem 0; }
.emp-hr-list    { display: flex; flex-direction: column; gap: .4rem; }
.emp-hr-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem .75rem;
    border: 1px solid var(--border, #e5e5ea);
    border-radius: .5rem;
    text-decoration: none;
    color: var(--text, #1c1c1e);
    font-size: .875rem;
    transition: background .12s;
}
.emp-hr-item:hover { background: var(--surface-alt, #f9f9fb); }
.emp-hr-item-date   { font-weight: 500; min-width: 9rem; }
.emp-hr-item-period { color: var(--text-secondary, #6e6e73); font-size: .8rem; }
.emp-hr-item-type   { color: var(--text-secondary, #6e6e73); font-size: .8rem; }
.emp-hr-item-days   { margin-left: auto; color: var(--text-secondary, #6e6e73); font-size: .8rem; }
.emp-hr-item-rating { margin-left: auto; color: #b45309; font-weight: 600; font-size: .8rem; }
.emp-hr-item-signed { color: var(--success, #34c759); font-size: .85rem; }
.emp-hr-status--completed  { color: var(--success, #34c759); font-weight: 600; }
.emp-hr-status--scheduled  { color: var(--brand, #007aff); }
.emp-hr-status--cancelled  { color: var(--text-secondary, #6e6e73); text-decoration: line-through; }
.emp-hr-status--pending    { color: #b45309; }
.emp-hr-status--approved   { color: var(--success, #34c759); font-weight: 600; }
.emp-hr-status--rejected   { color: var(--danger, #ff3b30); }
.emp-hr-status--requested  { color: #b45309; }
.emp-hr-status--acknowledged { color: var(--success, #34c759); }

/* ── Settings HR schedule inputs ────────────────────────────────────────── */
.settings-input {
    width: 5rem;
    padding: .35rem .55rem;
    border: 1px solid var(--border, #e5e5ea);
    border-radius: .4rem;
    font-size: .875rem;
    background: var(--surface, #fff);
    color: var(--text, #1c1c1e);
}
.settings-input:focus { outline: 2px solid var(--brand, #007aff); outline-offset: 1px; border-color: transparent; }
.settings-input-group { display: flex; align-items: center; gap: .5rem; }

/* ── Leave entitlement tile grid ─────────────────────────────────────────── */
.emp-leave-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: .75rem;
    padding: .85rem 1rem 1rem;
    background: var(--surface-alt, #f2f2f7);
    border-radius: .9rem;
    margin-bottom: .65rem;
}

.emp-leave-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .3rem;
    padding: .85rem .9rem .75rem;
    border-radius: .7rem;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #e5e5ea);
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
    overflow: hidden;
    transition: box-shadow .15s, transform .15s;
}
.emp-leave-tile:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,.09);
    transform: translateY(-1px);
}

/* Coloured accent bar at the top of each tile */
.emp-leave-tile::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: .7rem .7rem 0 0;
}
.emp-leave-tile--entitlement::before { background: var(--brand, #007aff); }
.emp-leave-tile--accrued::before     { background: #5856d6; }
.emp-leave-tile--carryover::before   { background: #ff9500; }
.emp-leave-tile--used::before        { background: #ff3b30; }
.emp-leave-tile--remaining::before   { background: var(--success, #34c759); }
.emp-leave-tile--bankholiday::before { background: #ffcc00; }
.emp-leave-tile--sick::before        { background: #ff6b00; }
.emp-leave-tile--leaver::before      { background: #8e8e93; }
.emp-leave-tile--fullyear::before    { background: #6f42c1; }

/* Icon */
.emp-leave-tile-icon {
    font-size: 1.1rem;
    line-height: 1;
    margin-bottom: .1rem;
}
.emp-leave-tile--entitlement .emp-leave-tile-icon { color: var(--brand, #007aff); }
.emp-leave-tile--accrued     .emp-leave-tile-icon { color: #5856d6; }
.emp-leave-tile--carryover   .emp-leave-tile-icon { color: #ff9500; }
.emp-leave-tile--used        .emp-leave-tile-icon { color: #ff3b30; }
.emp-leave-tile--remaining   .emp-leave-tile-icon { color: var(--success, #34c759); }
.emp-leave-tile--bankholiday .emp-leave-tile-icon { color: #b8860b; }
.emp-leave-tile--sick        .emp-leave-tile-icon { color: #ff6b00; }
.emp-leave-tile--leaver      .emp-leave-tile-icon { color: #8e8e93; }
.emp-leave-tile--fullyear    .emp-leave-tile-icon { color: #6f42c1; }

/* Value + unit on the same line */
.emp-leave-tile-body {
    display: flex;
    align-items: baseline;
    gap: .25rem;
}
.emp-leave-tile-value {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text, #1c1c1e);
}
.emp-leave-tile-unit {
    font-size: .7rem;
    font-weight: 500;
    color: var(--text-secondary, #6e6e73);
    text-transform: uppercase;
    letter-spacing: .03em;
}

/* Label below value */
.emp-leave-tile-label {
    font-size: .72rem;
    font-weight: 500;
    color: var(--text-secondary, #6e6e73);
    display: flex;
    flex-direction: column;
    gap: .1rem;
}
.emp-leave-tile-label small {
    font-size: .63rem;
    opacity: .75;
}

.emp-leave-taxyear {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .75rem;
    color: var(--text-secondary, #6e6e73);
    padding: 0 .25rem .65rem;
    margin: 0;
}
.emp-leave-taxyear i { font-size: .8rem; }

/* ── Absence group (collapsible) ─────────────────────────────────────────── */
.emp-absence-group {
    border: 1px solid var(--border, #e5e5ea);
    border-radius: .65rem;
    overflow: hidden;
    margin-bottom: .5rem;
}
.emp-absence-group-title {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem .85rem;
    font-weight: 600;
    font-size: .875rem;
    cursor: pointer;
    list-style: none;
    background: var(--surface-alt, #f9f9fb);
    user-select: none;
}
.emp-absence-group-title::-webkit-details-marker { display: none; }
.emp-absence-group-title::before {
    content: '▶';
    font-size: .65rem;
    transition: transform .15s;
    color: var(--text-secondary, #6e6e73);
}
details[open] .emp-absence-group-title::before { transform: rotate(90deg); }
.emp-absence-group-hours {
    margin-left: auto;
    font-size: .78rem;
    font-weight: 500;
    color: var(--text-secondary, #6e6e73);
}

/* ── Type pills ───────────────────────────────────────────────────────────── */
.emp-absence-type-pill {
    display: inline-flex;
    align-items: center;
    padding: .18rem .6rem;
    border-radius: var(--r-full, 9999px);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .01em;
}
.emp-absence-type--annual      { background: color-mix(in srgb, var(--brand, #007aff) 12%, transparent); color: var(--brand, #007aff); }
.emp-absence-type--sickness    { background: color-mix(in srgb, #ff3b30 12%, transparent); color: #c0392b; }
.emp-absence-type--bankholiday { background: color-mix(in srgb, #ffcc00 18%, transparent); color: #b8860b; }
.emp-absence-type--compassionate { background: color-mix(in srgb, #5856d6 12%, transparent); color: #5856d6; }
.emp-absence-type--maternity   { background: color-mix(in srgb, #ff2d55 12%, transparent); color: #c0185d; }
.emp-absence-type--paternity   { background: color-mix(in srgb, #5ac8fa 12%, transparent); color: #0070a8; }
.emp-absence-type--unpaid      { background: color-mix(in srgb, #8e8e93 12%, transparent); color: #636366; }
.emp-absence-type--other       { background: color-mix(in srgb, #ff9500 12%, transparent); color: #b45309; }

/* ── Absence cards ────────────────────────────────────────────────────────── */
.emp-absence-cards {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    padding: .5rem .75rem .75rem;
    background: var(--surface, #fff);
}
.emp-absence-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .55rem .85rem;
    border-radius: .55rem;
    border: 1px solid var(--border, #e5e5ea);
    text-decoration: none;
    color: inherit;
    background: var(--surface, #fff);
    transition: background .12s, box-shadow .12s;
}
.emp-absence-card:hover {
    background: var(--surface-alt, #f9f9fb);
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.emp-absence-card--approved { border-left: 3px solid var(--success, #34c759); }
.emp-absence-card--rejected { border-left: 3px solid var(--danger, #ff3b30); }
.emp-absence-card--requested { border-left: 3px solid #f59e0b; }
.emp-absence-card--cancelled { border-left: 3px solid var(--text-secondary, #6e6e73); opacity: .65; }

.emp-absence-card-left {
    display: flex;
    flex-direction: column;
    gap: .1rem;
}
.emp-absence-card-dates {
    font-weight: 600;
    font-size: .875rem;
    color: var(--text, #1c1c1e);
}
.emp-absence-card-duration {
    font-size: .78rem;
    color: var(--text-secondary, #6e6e73);
}
.emp-absence-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .2rem;
}
.emp-absence-card-reason {
    font-size: .75rem;
    color: var(--text-secondary, #6e6e73);
    max-width: 16rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Absence status badges ────────────────────────────────────────────────── */
.emp-absence-status-badge {
    display: inline-block;
    padding: .15rem .55rem;
    border-radius: var(--r-full, 9999px);
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.emp-absence-status--approved  { background: color-mix(in srgb, var(--success, #34c759) 15%, transparent); color: #1a7a35; }
.emp-absence-status--rejected  { background: color-mix(in srgb, var(--danger, #ff3b30) 15%, transparent);  color: #c0392b; }
.emp-absence-status--requested { background: color-mix(in srgb, #f59e0b 15%, transparent);                  color: #92400e; }
.emp-absence-status--cancelled { background: color-mix(in srgb, #8e8e93 15%, transparent);                  color: #636366; }

/* ── Leave entitlement standalone section ────────────────────────────────── */
.emp-leave-section {
    background: var(--surface, #fff);
    border-radius: var(--r-lg, 14px);
    border: 1px solid var(--border, #e5e5ea);
    padding: 1.25rem 1.5rem 1rem;
    margin-bottom: 1.25rem;
}
.emp-section-title {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-secondary, #6e6e73);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin: 0 0 .85rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}

/* ── Absences filter bar ─────────────────────────────────────────────────── */
.emp-abs-filters {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: .85rem;
}
.emp-abs-search {
    flex: 1 1 180px;
    min-width: 140px;
    padding: .38rem .7rem;
    border: 1px solid var(--border, #e5e5ea);
    border-radius: var(--r-md, 8px);
    font-size: .85rem;
    background: var(--surface, #fff);
    color: var(--text, #1c1c1e);
}
.emp-abs-select {
    flex: 0 1 160px;
    padding: .38rem .6rem;
    border: 1px solid var(--border, #e5e5ea);
    border-radius: var(--r-md, 8px);
    font-size: .85rem;
    background: var(--surface, #fff);
    color: var(--text, #1c1c1e);
    cursor: pointer;
}
.emp-page-size-select {
    flex: 0 0 auto;
    margin-left: auto;
}

/* ── Absences table ──────────────────────────────────────────────────────── */
.emp-abs-table-wrap {
    overflow-x: auto;
    border-radius: var(--r-md, 8px);
    border: 1px solid var(--border, #e5e5ea);
}
.emp-abs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}
.emp-abs-table thead tr {
    background: var(--surface-alt, #f5f5f7);
    border-bottom: 1px solid var(--border, #e5e5ea);
}
.emp-abs-table th {
    padding: .6rem .9rem;
    text-align: left;
    font-size: .75rem;
    font-weight: 600;
    color: var(--text-secondary, #6e6e73);
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
    user-select: none;
}
.emp-abs-table th.sortable {
    cursor: pointer;
}
.emp-abs-table th.sortable:hover {
    color: var(--brand, #007aff);
}
.emp-abs-table th.sorted {
    color: var(--brand, #007aff);
}
.emp-abs-table td {
    padding: .55rem .9rem;
    border-bottom: 1px solid var(--border-light, #f0f0f5);
    color: var(--text, #1c1c1e);
    vertical-align: middle;
}
.emp-abs-table tbody tr:last-child td {
    border-bottom: none;
}
.emp-abs-row {
    cursor: pointer;
    transition: background .12s;
}
.emp-abs-row:hover td {
    background: var(--surface-alt, #f5f5f7);
}
.emp-abs-date-end {
    color: var(--text-secondary, #6e6e73);
}
.emp-abs-reason {
    max-width: 22rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-secondary, #6e6e73);
}

/* ── Shared HR list pagination ──────────────────────────────────────────── */
.hr-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .3rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.hr-page-btn {
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 .6rem;
    border: 1px solid var(--border, #e5e5ea);
    border-radius: 8px;
    background: var(--surface, #fff);
    color: var(--text, #1c1c1e);
    font-size: .85rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .12s, color .12s, border-color .12s;
    line-height: 1;
}

.hr-page-btn:hover:not(:disabled):not(.active) {
    background: var(--surface-alt, #f5f5f7);
    border-color: var(--brand, #1b6ec2);
    color: var(--brand, #1b6ec2);
}

.hr-page-btn.active {
    background: var(--brand, #1b6ec2);
    border-color: var(--brand, #1b6ec2);
    color: #fff;
    cursor: default;
}

.hr-page-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.hr-pagination-ellipsis {
    padding: 0 .3rem;
    color: var(--text-secondary, #8e8e93);
    font-size: .85rem;
    line-height: 2.25rem;
}

/* ── Absences pagination ─────────────────────────────────────────────────── */
.emp-abs-pagination {
    display: flex;
    align-items: center;
    gap: .3rem;
    margin-top: .75rem;
    flex-wrap: wrap;
}
.emp-abs-page-btn {
    min-width: 2rem;
    height: 2rem;
    padding: 0 .5rem;
    border: 1px solid var(--border, #e5e5ea);
    border-radius: var(--r-md, 8px);
    background: var(--surface, #fff);
    color: var(--text, #1c1c1e);
    font-size: .82rem;
    cursor: pointer;
    transition: background .12s, color .12s;
}
.emp-abs-page-btn:hover:not(:disabled) {
    background: var(--surface-alt, #f5f5f7);
}
.emp-abs-page-btn.active {
    background: var(--brand, #007aff);
    color: #fff;
    border-color: var(--brand, #007aff);
    font-weight: 600;
}
.emp-abs-page-btn:disabled {
    opacity: .4;
    cursor: default;
}
.emp-abs-page-info {
    margin-left: .5rem;
    font-size: .78rem;
    color: var(--text-secondary, #6e6e73);
}

/* ── HR stats row — uniform cards that wrap to the next row automatically ── */
.emp-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
    align-items: flex-start;
}

/* ── Generic HR stats tile section ──────────────────────────────────────── */
.emp-stats-section {
    flex: 0 0 auto;                 /* fixed size — all cards same width */
    width: calc(3 * 8rem + 2 * 0.65rem + 2 * 1.25rem); /* 3 tile cols + gaps + padding */
    background: var(--surface, #fff);
    border-radius: var(--r-lg, 14px);
    border: 1px solid var(--border, #e5e5ea);
    padding: 1.1rem 1.25rem .9rem;
    box-sizing: border-box;
}
.emp-stats-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(6rem, 8rem)); /* fixed 3-col grid */
    gap: .65rem;
}

/* Narrow: drop to 2 columns and let sections fill available width */
@media (max-width: 520px) {
    .emp-stats-section {
        flex: 1 1 auto;
        width: 100%;
    }
    .emp-stats-tiles {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Individual stat tile — square, adaptive grid cell */
.emp-stat-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;   /* value + label sit at the bottom */
    gap: .15rem;
    aspect-ratio: 1 / 1;         /* always square */
    padding: .75rem .85rem .7rem;
    background: var(--surface-alt, #f5f5f7);
    border-radius: var(--r-md, 10px);
    overflow: hidden;
}
.emp-stat-tile::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--border, #e5e5ea);
    border-radius: var(--r-md, 10px) var(--r-md, 10px) 0 0;
}
.emp-stat-tile-icon {
    position: absolute;
    top: .75rem;
    left: .85rem;
    font-size: 1.1rem;
    line-height: 1;
    color: var(--text-secondary, #6e6e73);
    opacity: .85;
}
.emp-stat-tile-body {
    display: flex;
    align-items: baseline;
    gap: .2rem;
}
.emp-stat-tile-value {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text, #1c1c1e);
}
.emp-stat-tile-unit {
    font-size: .7rem;
    font-weight: 500;
    color: var(--text-secondary, #6e6e73);
}
.emp-stat-tile-label {
    font-size: .72rem;
    font-weight: 500;
    color: var(--text-secondary, #6e6e73);
}

/* Accent colours per tile variant */
.emp-stat-tile--total::before       { background: var(--brand, #007aff); }
.emp-stat-tile--total .emp-stat-tile-icon { color: var(--brand, #007aff); }

.emp-stat-tile--scheduled::before   { background: #5856d6; }
.emp-stat-tile--scheduled .emp-stat-tile-icon { color: #5856d6; }

.emp-stat-tile--completed::before   { background: var(--success, #34c759); }
.emp-stat-tile--completed .emp-stat-tile-icon { color: #1a7a35; }

.emp-stat-tile--cancelled::before   { background: #ff3b30; }
.emp-stat-tile--cancelled .emp-stat-tile-icon { color: #c0392b; }

.emp-stat-tile--signed::before      { background: #ff9500; }
.emp-stat-tile--signed .emp-stat-tile-icon { color: #b45309; }

.emp-stat-tile--draft::before       { background: #8e8e93; }
.emp-stat-tile--draft .emp-stat-tile-icon { color: #636366; }

.emp-stat-tile--inprogress::before  { background: #5ac8fa; }
.emp-stat-tile--inprogress .emp-stat-tile-icon { color: #0070a8; }

.emp-stat-tile--rating::before      { background: #ffcc00; }
.emp-stat-tile--rating .emp-stat-tile-icon { color: #b8860b; }

.emp-stat-tile--incident::before    { background: #ff3b30; }
.emp-stat-tile--incident .emp-stat-tile-icon { color: #c0392b; }

.emp-stat-tile--postshift::before   { background: #5856d6; }
.emp-stat-tile--postshift .emp-stat-tile-icon { color: #5856d6; }

.emp-stat-tile--return::before      { background: #30b0c7; }
.emp-stat-tile--return .emp-stat-tile-icon { color: #1a6e80; }

.emp-stat-tile--pending::before     { background: #f59e0b; }
.emp-stat-tile--pending .emp-stat-tile-icon { color: #92400e; }

.emp-stat-tile--mil-draft::before      { background: #8e8e93; }
.emp-stat-tile--mil-draft .emp-stat-tile-icon { color: #636366; }

.emp-stat-tile--mil-submitted::before  { background: #5ac8fa; }
.emp-stat-tile--mil-submitted .emp-stat-tile-icon { color: #0070a8; }

.emp-stat-tile--mil-approved::before   { background: var(--success, #34c759); }
.emp-stat-tile--mil-approved .emp-stat-tile-icon { color: #1a7a35; }

.emp-stat-tile--mil-miles::before      { background: #5856d6; }
.emp-stat-tile--mil-miles .emp-stat-tile-icon { color: #5856d6; }

.emp-stat-tile--mil-amount::before     { background: #ff9500; }
.emp-stat-tile--mil-amount .emp-stat-tile-icon { color: #b45309; }

/* ── HR status pill (used in tables for Supervision/Appraisal/Debrief) ─── */
.emp-hr-status-pill {
    display: inline-flex;
    align-items: center;
    padding: .18rem .6rem;
    border-radius: var(--r-full, 9999px);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .01em;
    white-space: nowrap;
}

/* Supervision statuses */
.emp-hr-status--scheduled  { background: color-mix(in srgb, #5856d6 12%, transparent); color: #5856d6; }
.emp-hr-status--completed  { background: color-mix(in srgb, var(--success, #34c759) 12%, transparent); color: #1a7a35; }
.emp-hr-status--cancelled  { background: color-mix(in srgb, #ff3b30 12%, transparent); color: #c0392b; }

/* Appraisal statuses */
.emp-hr-status--draft        { background: color-mix(in srgb, #8e8e93 12%, transparent); color: #636366; }
.emp-hr-status--inprogress   { background: color-mix(in srgb, #5ac8fa 12%, transparent); color: #0070a8; }
.emp-hr-status--acknowledged { background: color-mix(in srgb, #30b0c7 12%, transparent); color: #1a6e80; }

/* Debrief statuses */
.emp-hr-status--pending  { background: color-mix(in srgb, #f59e0b 12%, transparent); color: #92400e; }
.emp-hr-status--closed   { background: color-mix(in srgb, #8e8e93 12%, transparent); color: #636366; }

/* Mileage claim statuses */
.emp-hr-status--mil-draft      { background: color-mix(in srgb, #8e8e93 12%, transparent); color: #636366; }
.emp-hr-status--mil-submitted  { background: color-mix(in srgb, #5ac8fa 12%, transparent); color: #0070a8; }
.emp-hr-status--mil-approved   { background: color-mix(in srgb, var(--success, #34c759) 12%, transparent); color: #1a7a35; }
.emp-hr-status--mil-paid       { background: color-mix(in srgb, #34c759 12%, transparent); color: #0a5c1e; }
.emp-hr-status--mil-rejected   { background: color-mix(in srgb, #ff3b30 12%, transparent); color: #c0392b; }

/* ── HR type pill (Debrief types) ────────────────────────────────────────── */
.emp-hr-type-pill {
    display: inline-flex;
    align-items: center;
    padding: .18rem .6rem;
    border-radius: var(--r-full, 9999px);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .01em;
    white-space: nowrap;
}
.emp-hr-type--incident  { background: color-mix(in srgb, #ff3b30 12%, transparent); color: #c0392b; }
.emp-hr-type--postshift { background: color-mix(in srgb, #5856d6 12%, transparent); color: #5856d6; }
.emp-hr-type--return    { background: color-mix(in srgb, #30b0c7 12%, transparent); color: #1a6e80; }
.emp-hr-type--other     { background: color-mix(in srgb, #8e8e93 12%, transparent); color: #636366; }

/* ── Signed/unsigned icons in tables ─────────────────────────────────────── */
.emp-signed-yes { color: var(--success, #34c759); }
.emp-signed-no  { color: var(--border, #c7c7cc); }

/* ── Side panel (slide-in drawer) ────────────────────────────────────────── */
.hr-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    z-index: 200;
}

.hr-side-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(480px, 100vw);
    background: var(--color-surface, #fff);
    box-shadow: -4px 0 24px rgba(0, 0, 0, .14);
    z-index: 201;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 1.5rem;
}

.hr-side-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.hr-side-panel-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text, #1c1c1e);
    margin: 0;
}

.hr-side-panel-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    line-height: 1;
    color: var(--text-secondary, #8e8e93);
    cursor: pointer;
    padding: .2rem .4rem;
    border-radius: var(--r-sm, 6px);
    transition: background .15s;
}

.hr-side-panel-close:hover { background: var(--surface-alt, #f5f5f7); }

/* ── Course content preview modal ────────────────────────────────────────── */
.preview-modal-overlay {
    z-index: 300;
}

.preview-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(800px, 96vw);
    max-height: 90vh;
    background: var(--color-surface, #fff);
    border-radius: var(--r-lg, 14px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, .22);
    z-index: 301;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.preview-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem 1rem;
    border-bottom: 1px solid var(--border, #e5e5ea);
    flex-shrink: 0;
}

.preview-modal-title-row {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.preview-modal-type-badge {
    font-size: .75rem;
    color: var(--text-secondary, #636366);
}

.preview-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--color-text, #1c1c1e);
}

.preview-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.preview-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
    padding: .85rem 1.5rem;
    border-top: 1px solid var(--border, #e5e5ea);
    flex-shrink: 0;
    background: var(--surface-alt, #f5f5f7);
}

/* Assessment preview — question options */
.preview-questions-readonly .player-question { pointer-events: none; }

.preview-options {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    margin-top: .6rem;
}

.preview-option {
    display: flex;
    align-items: center;
    padding: .45rem .75rem;
    border-radius: var(--r-sm, 6px);
    border: 1px solid var(--border, #e5e5ea);
    font-size: .9rem;
    background: var(--surface-secondary, #f9f9f9);
}

.preview-option--correct {
    border-color: #34c759;
    background: #d1f2d9;
    color: #1a5c2a;
    font-weight: 500;
}

.preview-model-answer {
    margin-top: .6rem;
    padding: .6rem .85rem;
    background: var(--surface-secondary, #f9f9f9);
    border-radius: var(--r-sm, 6px);
    border: 1px solid var(--border, #e5e5ea);
    font-size: .9rem;
}

.preview-assessment-meta .player-assessment-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: .85rem;
    color: var(--text-secondary, #636366);
}

/* ── Header actions row ──────────────────────────────────────────────────── */
.hr-header-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
}

/* ── Card description text ───────────────────────────────────────────────── */
.hr-card-description {
    font-size: .82rem;
    color: var(--text-secondary, #8e8e93);
    margin: .25rem 0 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Alert banner ────────────────────────────────────────────────────────── */
.hr-alert {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: .75rem 1rem;
    border-radius: var(--r-md, 10px);
    font-size: .875rem;
    margin-bottom: 1rem;
    background: color-mix(in srgb, #5ac8fa 10%, transparent);
    color: #0070a8;
    border: 1px solid color-mix(in srgb, #5ac8fa 30%, transparent);
}

.hr-alert--warning {
    background: color-mix(in srgb, #f59e0b 10%, transparent);
    color: #92400e;
    border-color: color-mix(in srgb, #f59e0b 30%, transparent);
}

.hr-alert--danger {
    background: color-mix(in srgb, #ff3b30 10%, transparent);
    color: #c0392b;
    border-color: color-mix(in srgb, #ff3b30 30%, transparent);
}

.hr-alert-link {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hr-alert-link:hover { opacity: .75; }

/* ── Filter checkbox ─────────────────────────────────────────────────────── */
.hr-filter-check {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .85rem;
    color: var(--color-text, #1c1c1e);
    cursor: pointer;
    user-select: none;
}

.hr-filter-check input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--color-primary, #007aff);
    cursor: pointer;
}

/* ── Extra badge variants ────────────────────────────────────────────────── */
.hr-badge--mandatory  { background: #fff3e0; color: #e65100; }
.hr-badge--expiring   { background: #fff8e1; color: #b45309; }
.hr-badge--expired    { background: #ffe5e5; color: #c0392b; }

/* ── Detail value colour modifiers ──────────────────────────────────────── */
.hr-detail-value--success { color: var(--success, #34c759); font-weight: 500; }
.hr-detail-value--warning { color: #b45309; font-weight: 500; }
.hr-detail-value--danger  { color: var(--danger, #ff3b30); font-weight: 500; }

/* ── hr-badge info variant ───────────────────────────────────────────────── */
.hr-badge--info { background: #e3f0ff; color: #0055cc; }

/* ── hr-count inline pill ────────────────────────────────────────────────── */
.hr-count {
    font-size: .75rem;
    color: var(--text-secondary, #8e8e93);
    background: var(--surface-alt, #f5f5f7);
    border-radius: var(--r-full, 999px);
    padding: .1rem .5rem;
}

/* ── hr-empty-inline ─────────────────────────────────────────────────────── */
.hr-empty-inline {
    font-size: .85rem;
    color: var(--text-secondary, #8e8e93);
    font-style: italic;
    margin: .5rem 0;
}

/* ── Course tabs ─────────────────────────────────────────────────────────── */
.course-tabs {
    display: flex;
    gap: .25rem;
    border-bottom: 1.5px solid var(--border, #e0e0e5);
    margin-bottom: 1.25rem;
}

.course-tab {
    background: none;
    border: none;
    border-bottom: 2.5px solid transparent;
    padding: .5rem 1rem;
    font-size: .9rem;
    font-weight: 500;
    color: var(--text-secondary, #8e8e93);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: -1.5px;
    transition: color .15s, border-color .15s;
}

.course-tab:hover { color: var(--color-text, #1c1c1e); }

.course-tab--active {
    color: var(--color-primary, #007aff);
    border-bottom-color: var(--color-primary, #007aff);
}

/* ── Course modules accordion ────────────────────────────────────────────── */
.course-modules {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.course-module-card {
    border: 1.5px solid var(--border, #e0e0e5);
    border-radius: var(--r-md, 10px);
    overflow: hidden;
    background: var(--color-surface, #fff);
}

.course-module-card--open {
    border-color: var(--color-primary, #007aff);
}

.course-module-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1rem;
    cursor: pointer;
    user-select: none;
    background: var(--surface-alt, #f9f9fb);
    gap: .75rem;
}

.course-module-header:hover { background: #f0f4ff; }

.course-module-title-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

.course-module-chevron { font-size: .85rem; color: var(--text-secondary, #8e8e93); }
.course-module-order   { font-size: .75rem; color: var(--text-secondary, #8e8e93); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.course-module-title   { font-weight: 600; font-size: .95rem; color: var(--color-text, #1c1c1e); }

.course-module-body {
    padding: 1rem;
    border-top: 1px solid var(--border, #e0e0e5);
}

/* ── Lesson list ─────────────────────────────────────────────────────────── */
.course-lesson-list {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    margin-bottom: .75rem;
}

.course-lesson-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem .75rem;
    background: var(--surface-alt, #f9f9fb);
    border-radius: var(--r-sm, 6px);
    font-size: .875rem;
    flex-wrap: wrap;
}

.course-lesson-icon  { font-size: 1rem; }
.course-lesson-order { color: var(--text-secondary, #8e8e93); font-weight: 600; min-width: 1.5rem; }
.course-lesson-title { flex: 1; min-width: 0; font-weight: 500; color: var(--color-text, #1c1c1e); }

/* ── Assessment strip ────────────────────────────────────────────────────── */
.course-assessment-strip {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .6rem .75rem;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: var(--r-sm, 6px);
    margin-top: .75rem;
    margin-bottom: .5rem;
    flex-wrap: wrap;
}

.course-assessment-icon { font-size: 1.1rem; }

/* ── Question list ───────────────────────────────────────────────────────── */
.course-question-list {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    margin-left: 1rem;
}

.course-question-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem .75rem;
    background: var(--color-surface, #fff);
    border: 1px solid var(--border, #e0e0e5);
    border-radius: var(--r-sm, 6px);
    font-size: .85rem;
    flex-wrap: wrap;
}

.course-question-num  { font-weight: 700; color: var(--text-secondary, #8e8e93); min-width: 2rem; }
.course-question-text { flex: 1; min-width: 0; }

/* ── Multiple-choice option builder row ──────────────────────────────────── */
.course-option-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .4rem;
}

.course-option-check {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--color-primary, #007aff);
    flex-shrink: 0;
}

/* ── Enrolment progress bar ──────────────────────────────────────────────── */
.course-progress-bar {
    display: inline-block;
    width: 80px;
    height: 6px;
    background: var(--border, #e0e0e5);
    border-radius: var(--r-full, 999px);
    overflow: hidden;
    vertical-align: middle;
    margin-right: .35rem;
}

.course-progress-fill {
    height: 100%;
    background: var(--color-primary, #007aff);
    border-radius: var(--r-full, 999px);
    transition: width .3s;
}

/* ── Enrol employee multi-select list ───────────────────────────────────── */
.enroll-employee-list {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid var(--border, #e5e5ea);
    border-radius: 8px;
    padding: .35rem;
}

.enroll-employee-row {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .45rem .6rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: .88rem;
    transition: background .1s;
}

.enroll-employee-row:hover {
    background: var(--surface-alt, #f2f2f7);
}

.enroll-employee-row--selected {
    background: var(--brand-tint, #e5f0ff);
}

.enroll-employee-row input[type="checkbox"] {
    flex-shrink: 0;
    accent-color: var(--brand, #007aff);
}

.enroll-employee-name {
    flex: 1;
    font-weight: 500;
}

.enroll-employee-pos {
    font-size: .78rem;
    color: var(--text-secondary, #636366);
    white-space: nowrap;
}

@media (prefers-color-scheme: dark) {
    .enroll-employee-row--selected { background: #1a3a6e; }
    .enroll-employee-list { border-color: #3a3a3c; }
}

/* ── Employee profile — Training course strip ───────────────────────────── */
.emp-training-courses {
    margin-bottom: 1rem;
}

.emp-training-courses-title {
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-secondary, #636366);
    margin: 0 0 .6rem;
}

.emp-training-course-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: .6rem;
}

.emp-training-course-card {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    padding: .75rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border, #e5e5ea);
    background: var(--surface, #fff);
    text-decoration: none;
    color: inherit;
    transition: box-shadow .15s, transform .15s;
}

.emp-training-course-card:hover {
    box-shadow: 0 3px 12px rgba(0,0,0,.08);
    transform: translateY(-1px);
}

.emp-training-course--overdue {
    border-color: #f5c6cb;
    background: #fff8f8;
}

.emp-training-course-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .4rem;
}

.emp-training-course-name {
    font-weight: 600;
    font-size: .88rem;
    flex: 1;
}

.emp-training-course-meta {
    font-size: .78rem;
    color: var(--text-secondary, #636366);
}

.emp-training-course-bottom {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    margin-top: .25rem;
}

.emp-training-course-progress {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.emp-training-progress-bar {
    flex: 1;
    height: 5px;
    background: var(--border, #e5e5ea);
    border-radius: 999px;
    overflow: hidden;
}

.emp-training-progress-fill {
    height: 100%;
    background: var(--brand, #007aff);
    border-radius: 999px;
    transition: width .3s;
}

.emp-training-progress-pct {
    font-size: .72rem;
    color: var(--text-secondary, #636366);
    min-width: 28px;
    text-align: right;
}

.emp-training-course-due {
    font-size: .75rem;
    color: var(--text-secondary, #636366);
}

.emp-training-due--overdue {
    color: #c0392b;
    font-weight: 600;
}

/* ── Dashboard — Training cards ─────────────────────────────────────────── */
.dash-training-group-label {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin: 0 0 .5rem;
}

.dash-training-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: .6rem;
}

.dash-training-card {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    padding: .75rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border, #e5e5ea);
    background: var(--surface, #fff);
    text-decoration: none;
    color: inherit;
    transition: box-shadow .15s, transform .15s;
}

.dash-training-card:hover {
    box-shadow: 0 3px 12px rgba(0,0,0,.08);
    transform: translateY(-1px);
    text-decoration: none;
    color: inherit;
}

.dash-training-card--overdue {
    border-color: #f5c6cb;
    background: #fff8f8;
}

.dash-training-card--complete {
    border-color: #c3e6cb;
    background: #f8fff9;
}

.dash-training-card-title {
    font-weight: 600;
    font-size: .88rem;
}

.dash-training-card-meta {
    font-size: .75rem;
    color: var(--text-secondary, #636366);
}

.dash-training-card-progress {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-top: .15rem;
}

.dash-training-progress-bar {
    flex: 1;
    height: 5px;
    background: #e5e5ea;
    border-radius: 999px;
    overflow: hidden;
}

.dash-training-progress-fill {
    height: 100%;
    background: var(--brand, #007aff);
    border-radius: 999px;
    transition: width .3s;
}

.dash-training-progress-pct {
    font-size: .7rem;
    color: var(--text-secondary, #636366);
    min-width: 26px;
    text-align: right;
}

.dash-training-card-due {
    font-size: .75rem;
}

.dash-training-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-top: .5rem;
    flex-wrap: wrap;
}

.btn-start,
.btn-continue {
    display: inline-flex;
    align-items: center;
    font-size: .72rem;
    font-weight: 600;
    padding: .25rem .65rem;
    border-radius: 999px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: opacity .15s;
}
.btn-start    { background: #007aff; color: #fff; }
.btn-continue { background: #34c759; color: #fff; }
.btn-start:hover,
.btn-continue:hover { opacity: .85; }

.dash-stat-overdue {
    border: 1px solid #f5c6cb;
}

/* ── Utility: orange colour for training stat cards ─────────────────────── */
.text-orange   { color: #fd7e14 !important; }
.bg-orange     { background-color: rgba(253, 126, 20, var(--bs-bg-opacity, 1)) !important; }

@media (prefers-color-scheme: dark) {
    .emp-training-course--overdue { background: #3d1a1a; border-color: #7a2020; }
    .dash-training-card--overdue  { background: #3d1a1a; border-color: #7a2020; }
    .dash-training-card--complete { background: #1a3d22; border-color: #1e7a3e; }
    .dash-stat-overdue            { border-color: #7a2020; }
    .emp-training-progress-bar,
    .dash-training-progress-bar   { background: #3a3a3c; }
}

/* ── Course Player ──────────────────────────────────────────────────────── */
.player-shell {
    display: flex;
    height: calc(100vh - 56px);
    overflow: hidden;
    background: var(--bg, #f2f2f7);
}

/* Sidebar nav */
.player-nav {
    width: 280px;
    min-width: 280px;
    background: var(--surface, #fff);
    border-right: 1px solid var(--border, #e5e5ea);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform .2s;
}
@media (max-width: 768px) {
    .player-nav { position: fixed; z-index: 200; left: 0; top: 0; height: 100%; transform: translateX(-100%); }
    .player-nav--open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,.2); }
}
.player-nav-header {
    display: flex; align-items: center; gap: .5rem;
    padding: .75rem 1rem; border-bottom: 1px solid var(--border, #e5e5ea);
    font-weight: 600; font-size: .9rem;
}
.player-nav-close { background: none; border: none; cursor: pointer; font-size: 1rem; display: none; }
@media (max-width: 768px) { .player-nav-close { display: block; } }

.player-progress-strip { padding: .5rem 1rem; border-bottom: 1px solid var(--border, #e5e5ea); }
.player-progress-bar { height: 6px; background: var(--border, #e5e5ea); border-radius: 9999px; overflow: hidden; }
.player-progress-fill { height: 100%; background: #34c759; border-radius: 9999px; transition: width .3s; }
.player-progress-pct { font-size: .72rem; color: var(--text-secondary, #636366); }

.player-nav-modules { flex: 1; overflow-y: auto; padding: .5rem 0; }
.player-nav-module { margin-bottom: .25rem; }
.player-nav-module-title {
    padding: .5rem 1rem; font-size: .78rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .04em;
    color: var(--text-secondary, #636366);
}
.player-nav-lessons { list-style: none; margin: 0; padding: 0; }
.player-nav-lesson {
    display: flex; align-items: center; gap: .5rem;
    padding: .45rem 1rem .45rem 1.5rem;
    font-size: .82rem; cursor: pointer;
    border-left: 3px solid transparent;
    transition: background .1s;
}
.player-nav-lesson:hover { background: var(--bg, #f2f2f7); }
.player-nav-lesson--active { background: #e8f0fe; border-left-color: #007aff; font-weight: 600; }
.player-nav-lesson--done { color: #34c759; }
.player-nav-lesson--assessment { font-style: italic; }
.player-nav-lesson-icon { width: 1.1rem; text-align: center; flex-shrink: 0; }

/* Main area */
.player-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.player-topbar {
    display: flex; align-items: center; gap: .75rem;
    padding: .6rem 1rem; background: var(--surface, #fff);
    border-bottom: 1px solid var(--border, #e5e5ea);
    font-size: .85rem; flex-wrap: wrap;
}
.player-menu-btn { background: none; border: none; cursor: pointer; font-size: 1.1rem; padding: .25rem .4rem; border-radius: 6px; }
.player-menu-btn:hover { background: var(--bg, #f2f2f7); }
.player-back-link { color: var(--text-secondary, #636366); text-decoration: none; }
.player-back-link:hover { text-decoration: underline; }
.player-crumb-sep { color: var(--text-secondary, #636366); margin: 0 .2rem; }
.player-due { font-size: .8rem; }

.player-content { flex: 1; overflow-y: auto; padding: 2rem; }
.player-saving-notice { display: flex; align-items: center; font-size: .8rem; color: var(--text-secondary, #636366); margin-bottom: .75rem; }

/* Welcome screen */
.player-welcome { max-width: 680px; margin: 0 auto; }
.player-welcome-title { font-size: 1.8rem; font-weight: 700; margin-bottom: .5rem; }
.player-welcome-desc { color: var(--text-secondary, #636366); margin-bottom: 1rem; }
.player-objectives { background: var(--surface, #fff); border: 1px solid var(--border, #e5e5ea); border-radius: 12px; padding: 1rem 1.25rem; margin-bottom: 1rem; }
.player-meta-strip { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .85rem; color: var(--text-secondary, #636366); margin-bottom: 1.25rem; }
.player-start-btn { font-size: 1rem; padding: .65rem 1.5rem; border-radius: 999px; }
.player-complete-banner { background: #d1f2d9; border: 1px solid #34c759; border-radius: 12px; padding: 1rem 1.25rem; color: #1a5c2a; margin-bottom: 1rem; }

/* Completed course read-only page */
.player-complete-page { max-width: 600px; margin: 3rem auto; text-align: center; padding: 2rem; background: var(--surface, #fff); border: 1px solid var(--border, #e5e5ea); border-radius: 16px; box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.player-complete-page-title { font-size: 1.6rem; font-weight: 700; margin: 1rem 0 .5rem; }
.player-complete-page-badge { margin-bottom: .75rem; }
.player-complete-page-date { font-size: .9rem; margin-bottom: 1.25rem; }
.player-complete-page-result { background: var(--surface-secondary, #f9f9f9); border: 1px solid var(--border, #e5e5ea); border-radius: 12px; padding: 1rem 1.25rem; text-align: left; }

/* Lesson */
.player-lesson { max-width: 760px; margin: 0 auto; }
.player-lesson-header { margin-bottom: 1.25rem; }
.player-lesson-type-badge { font-size: .75rem; color: var(--text-secondary, #636366); display: block; margin-bottom: .3rem; }
.player-lesson-title { font-size: 1.5rem; font-weight: 700; margin: 0 0 .25rem; }
.player-video-wrap { position: relative; padding-bottom: 56.25%; height: 0; margin-bottom: 1.25rem; border-radius: 12px; overflow: hidden; }
.player-video-frame { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.player-resource-link { margin-bottom: 1rem; }
.player-lesson-body {
    background: var(--surface, #fff); border: 1px solid var(--border, #e5e5ea);
    border-radius: 12px; padding: 1.25rem 1.5rem; margin-bottom: 1.25rem;
    line-height: 1.7; font-size: .95rem;
}
.player-lesson-footer { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; padding-top: 1rem; border-top: 1px solid var(--border, #e5e5ea); }
.player-lesson-nav-btns { display: flex; gap: .5rem; }

/* Assessment */
.player-assessment { max-width: 680px; margin: 0 auto; }
.player-assessment-header { margin-bottom: 1.5rem; }
.player-assessment-meta { display: flex; gap: 1rem; font-size: .82rem; color: var(--text-secondary, #636366); margin-top: .5rem; flex-wrap: wrap; }
.player-questions { display: flex; flex-direction: column; gap: 1.5rem; margin-bottom: 1.5rem; }
.player-question { background: var(--surface, #fff); border: 1px solid var(--border, #e5e5ea); border-radius: 12px; padding: 1.25rem; }
.player-question-num { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-secondary, #636366); margin-bottom: .35rem; }
.player-question-text { font-weight: 600; margin-bottom: .85rem; }
.player-option {
    display: flex; align-items: center; gap: .6rem;
    padding: .5rem .75rem; border-radius: 8px; cursor: pointer;
    border: 1px solid var(--border, #e5e5ea); margin-bottom: .4rem;
    transition: background .1s;
}
.player-option:hover { background: var(--bg, #f2f2f7); }
.player-option--selected { background: #e8f0fe; border-color: #007aff; }
.player-essay { width: 100%; resize: vertical; }

/* Assessment result */
.player-assessment-result { max-width: 560px; margin: 0 auto; text-align: center; padding: 2rem 1rem; }
.player-result--pass { }
.player-result--fail { }
.player-result-score { font-size: 1.1rem; color: var(--text-secondary, #636366); }
.player-result-actions { display: flex; gap: .75rem; justify-content: center; margin-top: 1.25rem; flex-wrap: wrap; }
.player-result-breakdown { text-align: left; }
.player-result-q { padding: .4rem .5rem; border-radius: 6px; margin-bottom: .3rem; font-size: .85rem; }
.player-result-q--pass { background: #d1f2d9; }
.player-result-q--fail { background: #fce8e8; }

/* Spinner size variant */
.spinner--sm { width: 14px; height: 14px; }

/* Certificate download button */
.cert-download-btn {
    background: linear-gradient(135deg, #007b82 0%, #9b2c7a 100%);
    color: #fff !important;
    border: none;
    border-radius: 999px;
    padding: .55rem 1.25rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    transition: opacity .15s;
}
.cert-download-btn:hover { opacity: .88; }

@media (prefers-color-scheme: dark) {
    .player-shell       { background: #1c1c1e; }
    .player-nav         { background: #2c2c2e; border-color: #3a3a3c; }
    .player-topbar      { background: #2c2c2e; border-color: #3a3a3c; }
    .player-nav-lesson--active { background: #1c2a3a; }
    .player-lesson-body { background: #2c2c2e; border-color: #3a3a3c; }
    .player-question    { background: #2c2c2e; border-color: #3a3a3c; }
    .player-option      { border-color: #3a3a3c; }
    .player-option--selected { background: #1c2a3a; border-color: #007aff; }
    .player-complete-banner { background: #1a3d22; color: #a3f0b5; border-color: #34c759; }
    .player-result-q--pass  { background: #1a3d22; }
    .player-result-q--fail  { background: #3d1a1a; }
}


/* ================================================================


/* ================================================================
   Attachments tab — document type pills, action buttons, modals
   ================================================================ */

/* ── Document type pill ─────────────────────────────────────────── */
.att-doc-type-pill {
    display: inline-block;
    padding: .18rem .6rem;
    border-radius: 99px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .02em;
    background: var(--surface-alt);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    white-space: nowrap;
}

/* ── Row action buttons ─────────────────────────────────────────── */
.att-actions { display: flex; gap: .35rem; align-items: center; }

.btn-icon-sm {
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.9rem; height: 1.9rem; border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    font-size: .85rem; cursor: pointer; text-decoration: none;
    transition: background .15s, color .15s, border-color .15s;
}
.btn-icon-sm:hover {
    background: var(--surface-hover);
    color: var(--text);
    border-color: var(--border-strong);
}
.btn-icon-sm.btn-icon-danger:hover {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: var(--danger-border);
}

.att-file-icon { opacity: .6; }

/* ── Modal backdrop ─────────────────────────────────────────────── */
.att-modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, .55);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

/* ── Modal shell ────────────────────────────────────────────────── */
.att-modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg, 0 1rem 3rem rgba(0,0,0,.35));
    width: min(520px, 100%);
    max-height: 90vh;
    display: flex; flex-direction: column;
    overflow: hidden;
}

.att-modal--sm  { width: min(400px, 100%); }

.att-modal--viewer {
    width: min(920px, 100%);
    height: min(86vh, 920px);
}

/* ── Modal header ───────────────────────────────────────────────── */
.att-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.att-modal-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.att-modal-close {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2rem; height: 2rem; border-radius: 6px;
    background: none; border: none; cursor: pointer;
    color: var(--text-secondary); font-size: .95rem;
    transition: background .15s, color .15s;
}
.att-modal-close:hover { background: var(--surface-hover); color: var(--text); }

.att-viewer-header-actions { display: flex; align-items: center; gap: .5rem; }

/* ── Modal body ─────────────────────────────────────────────────── */
.att-modal-body {
    padding: 1.25rem;
    overflow-y: auto;
    flex: 1;
    display: flex; flex-direction: column; gap: 1.1rem;
    align-items: stretch;
    justify-content: flex-start;
}

/* ── Form groups inside modal ───────────────────────────────────── */
.att-form-group {
    display: flex; flex-direction: column; gap: .4rem;
    flex-shrink: 0;
}
.att-form-group label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: .01em;
}
.att-optional { opacity: .7; font-weight: 400; }
.att-required { color: var(--danger); }

/* Inputs inside the modal inherit the app's input tokens */
.att-modal .emp-abs-search,
.att-modal .emp-abs-select,
.att-doc-type-select {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text);
    border-radius: 6px;
    padding: .45rem .75rem;
    font-size: .88rem;
    line-height: 1.4;
    appearance: auto;
    transition: border-color .15s, box-shadow .15s;
}
.att-modal .emp-abs-select {
    height: 2.25rem;
}
.att-doc-type-select {
    height: 2.25rem !important;
    min-height: unset !important;
    max-height: unset !important;
}
.att-modal .att-description {
    height: auto;
    resize: vertical;
}
.att-modal .emp-abs-search:focus,
.att-modal .emp-abs-select:focus {
    outline: none;
    border-color: var(--input-border-focus);
    box-shadow: 0 0 0 3px var(--input-ring);
}

/* File picker */
.att-file-input {
    font-size: .85rem;
    color: var(--text-secondary);
    background: var(--input-bg);
    border: 1px dashed var(--border-strong);
    border-radius: 8px;
    padding: .6rem .85rem;
    cursor: pointer;
    width: 100%;
    transition: border-color .15s, background .15s;
}
.att-file-input:hover {
    border-color: var(--brand);
    background: var(--brand-subtle);
}

.att-selected-file {
    font-size: .8rem;
    color: var(--success);
    margin-top: .3rem;
    display: flex; align-items: center; gap: .3rem;
}

/* Error banner */
.att-error {
    color: var(--danger);
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    border-radius: 6px;
    padding: .55rem .85rem;
    font-size: .82rem;
    margin: 0;
}

/* Filename chip in edit modal */
.att-edit-filename {
    font-size: .88rem;
    color: var(--text-secondary);
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .5rem .85rem;
    margin: 0;
    display: flex; align-items: center; gap: .4rem;
}

/* ── Modal footer ───────────────────────────────────────────────── */
.att-modal-footer {
    display: flex; align-items: center; justify-content: flex-end; gap: .65rem;
    padding: .9rem 1.25rem;
    border-top: 1px solid var(--border);
    background: var(--surface-alt);
    flex-shrink: 0;
}

/* ?? Batch upload modal ??????????????????????????????????????????????????? */
.att-modal--lg {
    width: min(760px, 96vw);
    max-height: min(88vh, 880px);
}

.att-required { color: var(--danger, #ff3b30); margin-left: .15rem; }
.att-optional { color: var(--muted, #8e8e93); font-size: .78rem; margin-left: .3rem; font-weight: 400; }

.att-description {
    width: 100%; resize: vertical; padding: .45rem .7rem;
    border: 1px solid var(--border); border-radius: 8px;
    background: var(--surface); color: var(--text);
    font-size: .88rem; font-family: inherit; line-height: 1.4;
}
.att-description:focus { outline: none; border-color: var(--brand, #1b6ec2); box-shadow: 0 0 0 3px rgba(27,110,194,.15); }

.att-batch-file-list {
    display: flex; flex-direction: column; gap: .3rem;
    max-height: 320px; overflow-y: auto;
    border: 1px solid var(--border); border-radius: 10px;
    padding: .4rem;
}
.att-batch-file-row {
    display: grid;
    grid-template-columns: 1.4rem 1fr auto 1.4rem;
    align-items: center;
    gap: .5rem;
    padding: .4rem .6rem;
    border-radius: 8px;
    font-size: .83rem;
    background: var(--surface);
    transition: background .15s;
}
.att-batch-file-row:hover { background: var(--surface-alt); }
.att-batch-file-row--success { background: rgba(52,199,89,.07); }
.att-batch-file-row--error   { background: rgba(255,59,48,.07); }
.att-batch-file-row--uploading { background: rgba(27,110,194,.07); }

.att-batch-file-name {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    color: var(--text);
}
.att-batch-file-size {
    white-space: nowrap; color: var(--muted, #8e8e93); font-size: .78rem;
}
.att-batch-file-status {
    display: flex; align-items: center; justify-content: center; width: 1.4rem;
}
.att-batch-file-icon { color: var(--muted, #8e8e93); font-size: .95rem; }

.att-batch-progress {
    display: flex; align-items: center; gap: .55rem;
    font-size: .82rem; color: var(--muted, #8e8e93);
    padding: .3rem .1rem;
}

.att-batch-empty {
    text-align: center; color: var(--muted, #8e8e93);
    font-size: .85rem; padding: 1.25rem 0;
}

.att-batch-summary {
    padding: .6rem .1rem .4rem;
}
.att-batch-summary-ok {
    color: var(--success, #34c759); font-size: .88rem; margin-bottom: .25rem;
}
.att-batch-summary-err {
    color: var(--danger, #ff3b30); font-size: .88rem;
}

.att-batch-spinner {
    display: inline-block; width: .8rem; height: .8rem;
    border: 2px solid var(--border);
    border-top-color: var(--brand, #1b6ec2);
    border-radius: 50%;
    animation: spin .6s linear infinite;
    flex-shrink: 0;
}



/* ── Inline viewer body ─────────────────────────────────────────── */
.att-viewer-body {
    flex: 1; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg);
}
.att-viewer-iframe { width: 100%; height: 100%; border: none; }
.att-viewer-img    { max-width: 100%; max-height: 100%; object-fit: contain; padding: 1rem; }
.att-viewer-video  { max-width: 100%; max-height: 100%; }

/* ── Inline spinner ─────────────────────────────────────────────── */
.spinner-sm {
    display: inline-block; width: .85rem; height: .85rem;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .6s linear infinite;
    flex-shrink: 0;
}

/* ── Comments panel ─────────────────────────────────────────────── */
.comments-panel {
    background: var(--surface, #fff);
    border: 1px solid var(--color-border, #e5e5ea);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .875rem;
}

.comments-header {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .9rem;
    font-weight: 600;
    color: var(--color-text, #1c1c1e);
}

.comments-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--brand, #1b6ec2);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
}

.comments-loading {
    display: flex;
    justify-content: center;
    padding: 1rem 0;
}

.comments-empty {
    font-size: .875rem;
    color: var(--color-secondary, #636366);
    margin: 0;
    text-align: center;
    padding: .5rem 0;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-item {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
}

.comment-avatar {
    position: relative;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--brand, #1b6ec2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-avatar .presence-dot-overlay {
    position: absolute;
    bottom: -2px;
    right: -2px;
    z-index: 1;
    width: 12px;
    height: 12px;
    border: 2px solid var(--surface, #fff);
}

.presence-dot {
    border-radius: 50%;
    display: inline-block;
}
.presence-dot.online  { background: var(--success, #198754); }
.presence-dot.offline { background: var(--text-tertiary, #adb5bd); }

.comment-initials {
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.comment-avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .2rem;
}

.comment-author {
    font-size: .82rem;
    font-weight: 600;
    color: var(--color-text, #1c1c1e);
}

.comment-time {
    font-size: .75rem;
    color: var(--color-secondary, #636366);
}

.comment-delete {
    margin-left: auto;
    background: none;
    border: none;
    padding: 2px 4px;
    cursor: pointer;
    color: var(--color-secondary, #636366);
    font-size: .8rem;
    border-radius: 4px;
    transition: color .15s, background .15s;
    line-height: 1;
}
.comment-delete:hover {
    color: var(--danger, #c0392b);
    background: rgba(192, 57, 43, .08);
}

.comment-text {
    margin: 0;
    font-size: .875rem;
    color: var(--color-text, #1c1c1e);
    white-space: pre-wrap;
    word-break: break-word;
}

.comment-compose {
    display: flex;
    gap: .5rem;
    align-items: flex-end;
}

.comment-input {
    flex: 1;
    resize: vertical;
    min-height: 56px;
    padding: .6rem .75rem;
    border: 1px solid var(--color-border, #e5e5ea);
    border-radius: 8px;
    font-size: .875rem;
    color: var(--color-text, #1c1c1e);
    background: var(--surface, #fff);
    transition: border-color .15s;
    font-family: inherit;
}
.comment-input:focus {
    outline: none;
    border-color: var(--brand, #1b6ec2);
}

.comment-submit {
    flex-shrink: 0;
    height: 38px;
    padding: 0 1rem;
}

.comments-error {
    font-size: .8rem;
    color: var(--danger, #c0392b);
    margin: 0;
    display: flex;
    align-items: center;
    gap: .35rem;
}

.spinner--sm { width: 18px; height: 18px; border-width: 2px; }
.spinner--xs { width: 14px; height: 14px; border-width: 2px; }
}

/* ── Back To Work slide-out panel ──────────────────────────────────────── */

.btw-panel-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    z-index: 1040;
    animation: btw-fade-in .2s ease;
}

@keyframes btw-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.btw-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(560px, 100vw);
    background: var(--surface, #fff);
    box-shadow: -4px 0 24px rgba(0, 0, 0, .15);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.4, 0, .2, 1);
    overflow: hidden;
}

.btw-panel--open {
    transform: translateX(0);
}

.btw-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border, #e5e5ea);
    flex-shrink: 0;
    background: var(--surface, #fff);
}

.btw-panel-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text, #1c1c1e);
    margin: 0;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.btw-panel-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: .35rem;
    border-radius: .375rem;
    color: var(--text-secondary, #6e6e73);
    font-size: 1rem;
    line-height: 1;
    transition: background .15s, color .15s;
}

.btw-panel-close:hover {
    background: var(--surface-raised, #f2f2f7);
    color: var(--text, #1c1c1e);
}

.btw-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.btw-panel-actions {
    border-top: 1px solid var(--border, #e5e5ea);
    padding-top: 1.25rem;
    margin-top: 1rem;
}

/* Button on absence detail to trigger the panel */
.btn-btw {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem 1rem;
    background: var(--primary, #007aff);
    color: #fff;
    border: none;
    border-radius: .5rem;
    font-size: .875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, opacity .15s;
    text-decoration: none;
}

.btn-btw:hover  { background: var(--primary-dark, #0062cc); }
.btn-btw:active { opacity: .85; }

/* ── Merge-field legend ──────────────────────────────────────────────────── */
.merge-field-legend {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.merge-field-legend-toggle {
    display: flex;
    align-items: center;
    gap: .5rem;
    width: 100%;
    padding: .75rem 1rem;
    background: #f8fafc;
    border: none;
    cursor: pointer;
    font-size: .875rem;
    font-weight: 600;
    color: #374151;
    text-align: left;
    transition: background .15s;
}

.merge-field-legend-toggle:hover { background: #f1f5f9; }

.merge-field-legend-body {
    padding: 1rem 1.25rem;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.merge-field-legend-intro {
    font-size: .875rem;
    color: #4b5563;
    margin-bottom: .875rem;
}

.merge-field-grid {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: .875rem;
}

.merge-field-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    padding: .5rem .875rem;
    font-size: .8125rem;
    border-bottom: 1px solid #f3f4f6;
    align-items: center;
    gap: 1rem;
}

.merge-field-row:last-child { border-bottom: none; }

.merge-field-row--header {
    background: #f9fafb;
    font-weight: 600;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #6b7280;
}

.merge-field-row code {
    font-family: ui-monospace, "Cascadia Code", monospace;
    font-size: .8125rem;
    background: #eff6ff;
    color: #1d4ed8;
    padding: .15rem .4rem;
    border-radius: 4px;
    border: 1px solid #bfdbfe;
    white-space: nowrap;
}

.merge-field-legend-tip {
    font-size: .8125rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: .4rem;
    margin: 0;
}

.merge-field-legend-tip .bi-lightbulb { color: #f59e0b; }

/* ── Send-contract button ───────────────────────────────────────────────── */
.btn-contract {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .9rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: .875rem;
    font-weight: 500;
    background: #0d6efd;
    color: #fff;
    transition: background .15s, opacity .15s;
}

.btn-contract:hover    { background: #0b5ed7; }
.btn-contract:disabled { opacity: .6; cursor: not-allowed; }

/* ── Send-job-description button ────────────────────────────────────────── */
.btn-job-description {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .9rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: .875rem;
    font-weight: 500;
    background: #6f42c1;
    color: #fff;
    transition: background .15s, opacity .15s;
}

.btn-job-description:hover    { background: #5a32a3; }
.btn-job-description:disabled { opacity: .6; cursor: not-allowed; }

/* ── Send-job-offer button ──────────────────────────────────────────────── */
.btn-job-offer {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .9rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: .875rem;
    font-weight: 500;
    background: #198754;
    color: #fff;
    transition: background .15s, opacity .15s;
}

.btn-job-offer:hover    { background: #146c43; }
.btn-job-offer:disabled { opacity: .6; cursor: not-allowed; }

.emp-inline-feedback {
    font-size: .8125rem;
    padding: .3rem .7rem;
    border-radius: 5px;
    white-space: nowrap;
}

.emp-inline-feedback--success { background: #dcfce7; color: #166534; }
.emp-inline-feedback--error   { background: #fee2e2; color: #991b1b; }


/* ── Wellness manager picker cards ───────────────────────────────────────── */

.mgr-pick-card {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.75rem;
    border: 1.5px solid var(--bs-border-color, #dee2e6);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    user-select: none;
    width: 100%;
    background: #fff;
}

.mgr-pick-card:hover {
    border-color: #198754;
    background: #f0fdf4;
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.08);
}

.mgr-pick-card--selected {
    border-color: #198754;
    background: #f0fdf4;
}

.mgr-pick-avatar {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
}

.mgr-pick-avatar img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.mgr-pick-initials {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand, #0d6efd), #5AC8FA);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.5px;
    user-select: none;
}

.mgr-pick-name {
    flex: 1;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.3;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mgr-pick-check {
    flex-shrink: 0;
    width: 1.1em;
    height: 1.1em;
    cursor: pointer;
    accent-color: #198754;
    margin: 0;
}


/* ── Mileage journeys card layout ────────────────────────────────────────── */

.mileage-journeys-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.mileage-journey-card {
    background: var(--surface-alt, #f9f9fb);
    border: 1px solid var(--border, #e5e5ea);
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.mileage-journey-card:hover {
    border-color: var(--brand, #007aff);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.08);
}

.mileage-journey-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.mileage-journey-field--wide {
    grid-column: span 2;
}

.mileage-journey-field--narrow {
    grid-column: span 1;
}

.mileage-journey-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.mileage-journey-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary, #636366);
    margin: 0;
}

.mileage-journey-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 0.25rem;
}

.mileage-totals {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 0.5rem 0;
    border-top: 2px solid var(--border, #e5e5ea);
    margin-top: 0.5rem;
}

.mileage-totals-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary, #636366);
}

.mileage-totals-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--brand, #007aff);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 768px) {
    .mileage-journey-fields {
        grid-template-columns: 1fr;
    }

    .mileage-journey-field--wide,
    .mileage-journey-field--narrow {
        grid-column: span 1;
    }
}

/* -- Quick navigation (Training Index) ----------------------------- */
.hr-quick-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.hr-quick-nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #e5e5ea);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all .2s ease;
}

.hr-quick-nav-item:hover {
    border-color: var(--brand, #007aff);
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.15);
    transform: translateY(-1px);
}

.hr-quick-nav-item i {
    font-size: 1.5rem;
    color: var(--brand, #007aff);
    flex-shrink: 0;
}

.hr-quick-nav-title {
    font-weight: 600;
    font-size: .95rem;
    margin-bottom: .15rem;
}

.hr-quick-nav-desc {
    font-size: .8rem;
    color: var(--text-secondary, #8e8e93);
}

/* -- Modal overlay -------------------------------------------------- */
.hr-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

.hr-modal {
    background: var(--surface, #fff);
    border-radius: 12px;
    padding: 1.75rem 1.5rem 1.5rem;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.hr-modal h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 .25rem;
    color: var(--text, #1c1c1e);
}

@media (prefers-color-scheme: dark) {
    .hr-modal { background: var(--surface-alt, #1c1c1e); }
    .hr-modal h2 { color: var(--text, #f5f5f7); }
}

/* ── Attendance / Shift detail styles ───────────────────────────────────────── */
.hr-offcanvas-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 1040;
}
.hr-offcanvas {
    position: fixed; top: 0; right: 0; height: 100vh; width: 420px;
    z-index: 1050; display: flex; flex-direction: column;
    background: #ffffff;
    color: #1c1c1e;
    border-left: 1px solid #e2e2e7;
}
.hr-offcanvas--right { box-shadow: -4px 0 32px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.04); }
.hr-offcanvas-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e2e7;
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    background: #f9f9fb;
    flex-shrink: 0;
}
.hr-offcanvas-title { font-size: 1rem; margin: 0; font-weight: 700; }
.hr-offcanvas-close {
    background: transparent; border: 0; font-size: 1.1rem; cursor: pointer;
    color: #6c6c72; line-height: 1; padding: .25rem;
    border-radius: 6px; transition: background .15s;
}
.hr-offcanvas-close:hover { background: rgba(0,0,0,0.06); color: #1c1c1e; }
.hr-offcanvas-body { padding: 1.25rem; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 1.25rem; }

.hr-detail-section { padding: .5rem 0; border-bottom: 1px dashed rgba(0,0,0,0.04); }
.hr-detail-section-title { font-size: .9rem; margin: 0 0 .5rem; color: var(--text-muted,#6c6c72); }
.hr-detail-row { display:flex; align-items:center; gap:.5rem; padding:.25rem 0; color:var(--text,#1c1c1e); }
.hr-stat-row { display:flex; justify-content:space-between; padding:.25rem 0; }

.hr-avatar-list { display:flex; flex-direction:column; gap:.5rem; }
.hr-avatar-list-item { display:flex; gap:.75rem; align-items:center; }

/* ── Avatar chips (used in My Shifts card stack + detail modal) ── */
.hr-avatar-chip {
    width: 32px; height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand, #007aff);
    color: #fff;
    font-size: .65rem; font-weight: 700;
    border: 2px solid var(--card-bg, #fff);
    user-select: none;
}
.hr-avatar-chip img { width: 100%; height: 100%; object-fit: cover; display: block; }

.hr-avatar-chip--md {
    width: 40px; height: 40px;
    border-radius: 50%;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: var(--surface-alt, #f5f6f8);
    color: var(--text, #1c1c1e);
    font-weight: 600;
    border: none;
}
.hr-avatar-chip--md img { width: 100%; height: 100%; object-fit: cover; display: block; }

.hr-avatar-chip--overflow {
    background: var(--text-secondary, #636366);
    font-size: .6rem;
    border-radius: 50%;
}

.hr-avatar-stack { display: flex; flex-direction: row; align-items: center; gap: 0; margin-top: .4rem; }
.hr-avatar-stack .hr-avatar-chip { margin-left: -8px; }
.hr-avatar-stack .hr-avatar-chip:first-child { margin-left: 0; }

.hr-avatar-name { font-size:.95rem; }

/* ── Employee avatar (used in Probation and other record lists) ── */
.emp-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand, #007aff);
    color: #fff;
    font-size: .8rem; font-weight: 700;
    user-select: none;
}
.emp-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.emp-avatar--sm { width: 28px; height: 28px; font-size: .7rem; }
.emp-avatar--lg { width: 56px; height: 56px; font-size: 1.1rem; }

.hr-clock-timeline { display:flex; flex-direction:column; gap:.5rem; }
.hr-clock-event { display:flex; gap:.75rem; align-items:flex-start; }
.hr-clock-event-icon { width:36px; height:36px; border-radius:999px; display:flex; align-items:center; justify-content:center; color:#fff; }
.hr-clock-event-icon--in { background: #28a745; }
.hr-clock-event-icon--out { background: #6c757d; }
.hr-clock-event-body { flex:1; display:flex; flex-direction:column; gap:.25rem; }
.hr-clock-event-label { font-weight:600; }
.hr-clock-event-time { font-size:.85rem; color:var(--muted,#6c6c72); }
.hr-clock-event-meta { font-size:.85rem; color:var(--muted,#6c6c72); display:inline-block; margin-top:.25rem; }
.hr-clock-map { width:100%; height:160px; border-radius:8px; overflow:hidden; margin-top:.5rem; }
.hr-attendance-map { width:100%; height:220px; border-radius:10px; overflow:hidden; margin-top:.75rem; border: 1px solid var(--border,#e9e9ee); }

.hr-shift-card--today { border-left:4px solid var(--accent,#1976d2); }

/* ── Shift detail panel ──────────────────────────────────────────────── */

/* Hero strip at top of the panel */
.hr-sdp-hero {
    margin: -1rem -1rem 0;
    padding: 1.25rem 1.25rem 1rem;
    background: var(--brand-subtle, #f0f4ff);
    border-bottom: 1px solid var(--border, #e9e9ee);
    display: flex;
    flex-direction: column;
    gap: .6rem;
}
.hr-sdp-hero-badges { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.hr-sdp-hero-date   { font-size: 1.15rem; font-weight: 700; color: var(--text, #1c1c1e); line-height: 1.2; }
.hr-sdp-hero-time   { font-size: .95rem; color: var(--text-secondary, #636366); display: flex; align-items: center; gap: .35rem; }
.hr-sdp-hero-prop   { font-size: .9rem; color: var(--text-secondary, #636366); display: flex; align-items: center; gap: .35rem; }

/* Section titles */
.hr-sdp-section { padding: .75rem 0; border-bottom: 1px solid var(--border-subtle, rgba(0,0,0,0.06)); }
.hr-sdp-section:last-child { border-bottom: none; }
.hr-sdp-section-title {
    font-size: .75rem; font-weight: 700; letter-spacing: .06em;
    text-transform: uppercase; color: var(--text-secondary, #636366);
    margin: 0 0 .65rem;
}

/* Service-user grid inside the panel */
.hr-sdp-su-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: .75rem;
}
.hr-sdp-su-item {
    display: flex; flex-direction: column; align-items: center; gap: .35rem;
    text-align: center;
}
.hr-sdp-su-avatar {
    width: 52px; height: 52px; border-radius: 50%; overflow: hidden;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand, #007aff); color: #fff;
    font-size: .8rem; font-weight: 700;
    border: 2px solid var(--card-bg, #fff);
    box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.hr-sdp-su-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hr-sdp-su-name {
    font-size: .7rem; color: var(--text, #1c1c1e);
    line-height: 1.2; max-width: 72px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Attendance action card */
.hr-sdp-clock-card {
    border-radius: 12px;
    border: 1.5px solid var(--border, #e9e9ee);
    padding: 1rem;
    display: flex; flex-direction: column; gap: .6rem;
    background: var(--surface, #fff);
}
.hr-sdp-clock-card--in  { border-color: #28a745; background: #f6fff9; }
.hr-sdp-clock-card--out { border-color: #1976d2; background: #f0f4ff; }
.hr-sdp-clock-status    { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
.hr-sdp-clock-status-dot {
    width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
    animation: sdp-pulse 1.6s ease-in-out infinite;
}
.hr-sdp-clock-status-dot--green { background: #28a745; }
.hr-sdp-clock-status-dot--blue  { background: #1976d2; }
@keyframes sdp-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .5; transform: scale(.75); }
}
.hr-sdp-clock-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.hr-sdp-clock-btn {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .6rem 1.25rem; border-radius: 8px; border: none; cursor: pointer;
    font-weight: 600; font-size: .9rem; transition: filter .15s;
}
.hr-sdp-clock-btn:hover  { filter: brightness(.92); }
.hr-sdp-clock-btn:active { filter: brightness(.85); }
.hr-sdp-clock-btn:disabled { opacity: .55; cursor: default; filter: none; }
.hr-sdp-clock-btn--in  { background: #28a745; color: #fff; }
.hr-sdp-clock-btn--out { background: #ff9500; color: #fff; }
.hr-sdp-clock-error { font-size: .85rem; color: #dc3545; display:flex; align-items:center; gap:.35rem; }

/* Timeline */
.hr-sdp-timeline { display: flex; flex-direction: column; gap: 0; position: relative; }
.hr-sdp-tl-item  { display: flex; gap: .75rem; align-items: flex-start; position: relative; padding-bottom: .9rem; }
.hr-sdp-tl-item:last-child { padding-bottom: 0; }
/* Vertical connector line */
.hr-sdp-tl-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 17px; top: 36px;
    width: 2px; bottom: 0;
    background: var(--border, #e9e9ee);
    z-index: 0;
}
.hr-sdp-tl-icon {
    width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: .9rem; position: relative; z-index: 1;
}
.hr-sdp-tl-icon--in  { background: #28a745; }
.hr-sdp-tl-icon--out { background: #6c757d; }
.hr-sdp-tl-body  { flex: 1; display: flex; flex-direction: column; gap: .2rem; padding-top: .1rem; }
.hr-sdp-tl-label { font-weight: 600; font-size: .9rem; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.hr-sdp-tl-time  { font-size: .8rem; color: var(--text-secondary, #636366); }
.hr-sdp-tl-meta  { font-size: .8rem; color: var(--text-secondary, #636366); display: flex; align-items: center; gap: .25rem; }

/* Hours summary */
.hr-sdp-hours-bar-track {
    height: 8px; border-radius: 99px;
    background: var(--border, #e9e9ee);
    overflow: hidden; margin-top: .35rem;
}
.hr-sdp-hours-bar-fill {
    height: 100%; border-radius: 99px;
    background: linear-gradient(90deg, #1976d2, #42a5f5);
    max-width: 100%;
    transition: width .4s ease;
}
.hr-sdp-hours-bar-fill--over { background: linear-gradient(90deg, #e65100, #ff9500); }
.hr-sdp-hours-row { display: flex; justify-content: space-between; font-size: .85rem; margin-top: .4rem; }

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .hr-offcanvas,
    :root[data-theme="dark"] .hr-offcanvas {
        background: #1c1c1e;
        color: #f5f5f7;
        border-left-color: rgba(255,255,255,0.08);
    }
}
:root[data-theme="dark"] .hr-offcanvas {
    background: #1c1c1e;
    color: #f5f5f7;
    border-left-color: rgba(255,255,255,0.08);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .hr-offcanvas--right,
    :root[data-theme="dark"] .hr-offcanvas--right { box-shadow: -4px 0 32px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.06); }

    :root:not([data-theme="light"]) .hr-offcanvas-header { background: #2c2c2e; border-bottom-color: rgba(255,255,255,0.08); color: #f5f5f7; }
    :root:not([data-theme="light"]) .hr-offcanvas-close { color: #aeaeb2; }
    :root:not([data-theme="light"]) .hr-offcanvas-close:hover { background: rgba(255,255,255,0.08); color: #f5f5f7; }

    :root:not([data-theme="light"]) .hr-sdp-hero { background: rgba(255,255,255,0.04); border-bottom-color: rgba(255,255,255,0.08); }
    :root:not([data-theme="light"]) .hr-sdp-hero-date,
    :root:not([data-theme="light"]) .hr-sdp-hero-time,
    :root:not([data-theme="light"]) .hr-sdp-hero-prop { color: #f5f5f7; }

    :root:not([data-theme="light"]) .hr-sdp-section { border-bottom-color: rgba(255,255,255,0.06); }
    :root:not([data-theme="light"]) .hr-sdp-section-title { color: #aeaeb2; }

    :root:not([data-theme="light"]) .hr-sdp-su-avatar { background: rgba(255,255,255,0.1); color: #f5f5f7; border-color: #1c1c1e; }
    :root:not([data-theme="light"]) .hr-sdp-su-name { color: #f5f5f7; }

    :root:not([data-theme="light"]) .hr-sdp-clock-card { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.12); color: #f5f5f7; }
    :root:not([data-theme="light"]) .hr-sdp-clock-card--in  { background: rgba(40,167,69,.12); border-color: rgba(40,167,69,.4); }
    :root:not([data-theme="light"]) .hr-sdp-clock-card--out { background: rgba(25,118,210,.12); border-color: rgba(25,118,210,.4); }
    :root:not([data-theme="light"]) .hr-sdp-clock-status { color: #f5f5f7; }
    :root:not([data-theme="light"]) .hr-sdp-clock-summary { color: #aeaeb2; }

    :root:not([data-theme="light"]) .hr-sdp-tl-item:not(:last-child)::before { background: rgba(255,255,255,0.1); }
    :root:not([data-theme="light"]) .hr-sdp-tl-label { color: #f5f5f7; }
    :root:not([data-theme="light"]) .hr-sdp-tl-time,
    :root:not([data-theme="light"]) .hr-sdp-tl-meta,
    :root:not([data-theme="light"]) .hr-sdp-tl-dist { color: #aeaeb2; }

    :root:not([data-theme="light"]) .hr-sdp-hours-bar-track { background: rgba(255,255,255,0.1); }
    :root:not([data-theme="light"]) .hr-sdp-hours-row { color: #f5f5f7; }

    :root:not([data-theme="light"]) .hr-detail-row { color: #f5f5f7; }
    :root:not([data-theme="light"]) .hr-avatar-chip { border-color: #1c1c1e; }
    :root:not([data-theme="light"]) .hr-avatar-chip--md { background: rgba(255,255,255,0.08); color: #f5f5f7; }
    :root:not([data-theme="light"]) .hr-clock-event-time,
    :root:not([data-theme="light"]) .hr-clock-event-meta { color: rgba(255,255,255,0.65); }
}

:root[data-theme="dark"] .hr-offcanvas--right { box-shadow: -4px 0 32px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.06); }
:root[data-theme="dark"] .hr-offcanvas-header { background: #2c2c2e; border-bottom-color: rgba(255,255,255,0.08); color: #f5f5f7; }
:root[data-theme="dark"] .hr-offcanvas-close { color: #aeaeb2; }
:root[data-theme="dark"] .hr-offcanvas-close:hover { background: rgba(255,255,255,0.08); color: #f5f5f7; }

:root[data-theme="dark"] .hr-sdp-hero { background: rgba(255,255,255,0.04); border-bottom-color: rgba(255,255,255,0.08); }
:root[data-theme="dark"] .hr-sdp-hero-date,
:root[data-theme="dark"] .hr-sdp-hero-time,
:root[data-theme="dark"] .hr-sdp-hero-prop { color: #f5f5f7; }

:root[data-theme="dark"] .hr-sdp-section { border-bottom-color: rgba(255,255,255,0.06); }
:root[data-theme="dark"] .hr-sdp-section-title { color: #aeaeb2; }

:root[data-theme="dark"] .hr-sdp-su-avatar { background: rgba(255,255,255,0.1); color: #f5f5f7; border-color: #1c1c1e; }
:root[data-theme="dark"] .hr-sdp-su-name { color: #f5f5f7; }

:root[data-theme="dark"] .hr-sdp-clock-card { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.12); color: #f5f5f7; }
:root[data-theme="dark"] .hr-sdp-clock-card--in  { background: rgba(40,167,69,.12); border-color: rgba(40,167,69,.4); }
:root[data-theme="dark"] .hr-sdp-clock-card--out { background: rgba(25,118,210,.12); border-color: rgba(25,118,210,.4); }
:root[data-theme="dark"] .hr-sdp-clock-status { color: #f5f5f7; }
:root[data-theme="dark"] .hr-sdp-clock-summary { color: #aeaeb2; }

:root[data-theme="dark"] .hr-sdp-tl-item:not(:last-child)::before { background: rgba(255,255,255,0.1); }
:root[data-theme="dark"] .hr-sdp-tl-label { color: #f5f5f7; }
:root[data-theme="dark"] .hr-sdp-tl-time,
:root[data-theme="dark"] .hr-sdp-tl-meta,
:root[data-theme="dark"] .hr-sdp-tl-dist { color: #aeaeb2; }

:root[data-theme="dark"] .hr-sdp-hours-bar-track { background: rgba(255,255,255,0.1); }
:root[data-theme="dark"] .hr-sdp-hours-row { color: #f5f5f7; }

:root[data-theme="dark"] .hr-detail-row { color: #f5f5f7; }
:root[data-theme="dark"] .hr-avatar-chip { border-color: #1c1c1e; }
:root[data-theme="dark"] .hr-avatar-chip--md { background: rgba(255,255,255,0.08); color: #f5f5f7; }
:root[data-theme="dark"] .hr-clock-event-time,
:root[data-theme="dark"] .hr-clock-event-meta { color: rgba(255,255,255,0.65); }

/* ── Compliance Audit A4 print ─────────────────────────────────────────── */
.audit-print-page {
    background: #fff;
    max-width: 210mm;
    margin: 0 auto;
    box-sizing: border-box;
}

.audit-print-page.audit-print-landscape {
    max-width: 297mm;
}

@media print {
    @page {
        size: A4;
        margin: 12mm;
    }

    html[data-printing-audit="1"] body * {
        visibility: hidden !important;
    }

    html[data-printing-audit="1"],
    html[data-printing-audit="1"] body {
        height: auto !important;
        overflow: visible !important;
    }

    html[data-printing-audit="1"] .audit-print-page,
    html[data-printing-audit="1"] .audit-print-page * {
        visibility: visible !important;
    }

    html[data-printing-audit="1"] .audit-print-page {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
        background: #fff !important;
    }

    html[data-printing-audit="1"] .audit-print-hide,
    html[data-printing-audit="1"] .hr-detail-header,
    html[data-printing-audit="1"] .survey-submit-bar,
    html[data-printing-audit="1"] .nav-sidebar,
    html[data-printing-audit="1"] .top-row,
    html[data-printing-audit="1"] .sync-status-bar {
        display: none !important;
    }

    html[data-printing-audit="1"] .survey-question-card {
        page-break-inside: avoid;
        border: 1px solid #dee2e6 !important;
        box-shadow: none !important;
    }

    html[data-printing-audit="1"] input,
    html[data-printing-audit="1"] textarea,
    html[data-printing-audit="1"] select {
        border: 1px solid #999 !important;
        color: #000 !important;
        background: #fff !important;
    }
}

