/* HR Dashboard — 2026 app-shell design for Hall & Hall Enterprises.
   Brand palette aligned with Fleet CRM:
     yellow      #FEDD00   primary accent / focus / CTA
     yellow-soft #FFF4B3   highlight wash
     ink         #0A0A0A   primary text + dark sidebar surface
     surface     #FFFFFF   cards
     page        #F7F7F8   canvas background
   Layout: fixed dark sidebar (248px) + scrolling canvas. Detail view is a
   slide-in drawer from the right so the list stays in context.
*/

/* ---------- tokens ---------- */
:root {
    --bk-yellow:        #FEDD00;
    --bk-yellow-hover:  #E5C700;
    --bk-yellow-dark:   #D4B800;
    --bk-yellow-soft:   #FFF4B3;
    --bk-yellow-tint:   #FFFBE0;
    --bk-yellow-ring:   rgba(254, 221, 0, 0.32);

    --bk-ink:           #0A0A0A;
    --bk-ink-950:       #0F0F12;
    --bk-ink-900:       #18181B;
    --bk-ink-800:       #27272A;
    --bk-ink-700:       #3F3F46;
    --bk-ink-600:       #52525B;
    --bk-ink-500:       #71717A;
    --bk-ink-400:       #A1A1AA;
    --bk-ink-300:       #D4D4D8;
    --bk-ink-200:       #E4E4E7;
    --bk-ink-100:       #F4F4F5;
    --bk-ink-50:        #FAFAFA;

    --bk-surface:       #FFFFFF;
    --bk-page:          #F7F7F8;
    --bk-page-tint:     radial-gradient(1200px 600px at 80% -200px, rgba(254, 221, 0, 0.08), transparent 60%),
                        #F7F7F8;

    --bk-success:       #15803D;
    --bk-success-soft:  #DCFCE7;
    --bk-success-ink:   #14532D;
    --bk-warn:          #B45309;
    --bk-warn-soft:     #FEF3C7;
    --bk-warn-ink:      #78350F;
    --bk-danger:        #B91C1C;
    --bk-danger-soft:   #FEE2E2;
    --bk-danger-ink:    #7F1D1D;
    --bk-info:          #1D4ED8;
    --bk-info-soft:     #DBEAFE;
    --bk-info-ink:      #1E3A8A;

    --bk-radius:        14px;
    --bk-radius-sm:     10px;
    --bk-radius-md:     12px;
    --bk-radius-lg:     18px;
    --bk-radius-xl:     24px;
    --bk-radius-pill:   999px;

    --bk-border:        1px solid rgba(15, 23, 42, 0.06);
    --bk-border-strong: 1px solid rgba(15, 23, 42, 0.10);

    --bk-shadow-xs: 0 1px 1px rgba(15, 23, 42, 0.04);
    --bk-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 1px rgba(15, 23, 42, 0.06);
    --bk-shadow-md: 0 8px 18px -10px rgba(15, 23, 42, 0.14), 0 2px 4px rgba(15, 23, 42, 0.04);
    --bk-shadow-lg: 0 24px 48px -16px rgba(15, 23, 42, 0.18), 0 4px 8px rgba(15, 23, 42, 0.05);
    --bk-shadow-xl: 0 40px 80px -20px rgba(15, 23, 42, 0.24), 0 8px 16px rgba(15, 23, 42, 0.06);
    --bk-glow:      0 0 0 4px var(--bk-yellow-ring);

    --bk-trans:      180ms cubic-bezier(0.2, 0.0, 0.0, 1.0);
    --bk-trans-fast: 120ms cubic-bezier(0.2, 0.0, 0.0, 1.0);
    --bk-trans-slow: 280ms cubic-bezier(0.2, 0.0, 0.0, 1.0);

    --hhhr-sidebar-w:  248px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* The dashboard toggles drawers and modals via the HTML `hidden` attribute.
   A bare `display: grid|flex` rule below silently overrides `hidden`, so
   make `hidden` always win. */
[hidden] { display: none !important; }

body.hhhr-app-page,
body.hhhr-login-page {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--bk-ink);
    background: var(--bk-page-tint);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
a { color: var(--bk-ink); text-decoration: none; transition: color var(--bk-trans-fast); }
a:hover { color: var(--bk-ink-700); }
button { font-family: inherit; font-size: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: inherit; color: var(--bk-ink); }

.hhhr-sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- app shell ---------- */
.hhhr-shell {
    display: flex;
    min-height: 100vh;
}

/* ---------- sidebar ---------- */
.hhhr-sidebar {
    width: var(--hhhr-sidebar-w);
    flex: 0 0 var(--hhhr-sidebar-w);
    position: sticky;
    top: 0;
    height: 100vh;
    background:
        radial-gradient(800px 300px at 50% -100px, rgba(254, 221, 0, 0.06), transparent 60%),
        linear-gradient(180deg, var(--bk-ink-950) 0%, var(--bk-ink) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 20px 16px;
    z-index: 30;
}
.hhhr-sidebar-top {
    padding: 4px 8px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 14px;
}
.hhhr-sidebar .hhhr-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.hhhr-sidebar .hhhr-brand::before {
    content: "";
    flex: 0 0 auto;
    width: 8px;
    height: 38px;
    border-radius: 4px;
    background: var(--bk-yellow);
    box-shadow: 0 0 16px rgba(254, 221, 0, 0.4);
}
.hhhr-sidebar .hhhr-brand-text {
    display: flex; flex-direction: column;
    line-height: 1.15; min-width: 0;
}
.hhhr-sidebar .hhhr-brand-text strong {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.005em;
}
.hhhr-sidebar .hhhr-brand-text span {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-top: 1px;
}

.hhhr-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 4px 0;
}
.hhhr-sidebar-foot {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 10px;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.hhhr-sidebar-foot .hhhr-export-form { margin: 0; }
.hhhr-sidebar-foot .hhhr-export-form button { width: 100%; }

.hhhr-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: 0;
    border-radius: var(--bk-radius-sm);
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background var(--bk-trans-fast), color var(--bk-trans-fast);
    position: relative;
}
a.hhhr-nav-item { text-decoration: none; }
.hhhr-nav-item i {
    font-size: 14px;
    width: 18px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    transition: color var(--bk-trans-fast);
}
.hhhr-nav-item span:first-of-type { flex: 1 1 auto; }
.hhhr-nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}
.hhhr-nav-item:hover i { color: #fff; }
.hhhr-nav-item.is-active {
    background: rgba(254, 221, 0, 0.10);
    color: var(--bk-yellow);
    font-weight: 600;
}
.hhhr-nav-item.is-active i { color: var(--bk-yellow); }
.hhhr-nav-item.is-active::before {
    content: "";
    position: absolute;
    left: -16px; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 22px;
    background: var(--bk-yellow);
    border-radius: 0 3px 3px 0;
}
.hhhr-nav-item:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bk-yellow-ring); }
.hhhr-nav-count {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.72);
    padding: 2px 8px;
    border-radius: var(--bk-radius-pill);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.02em;
}
.hhhr-nav-item.is-active .hhhr-nav-count {
    background: rgba(254, 221, 0, 0.18);
    color: var(--bk-yellow);
}

/* mobile sidebar toggle FAB — only visible <960px */
.hhhr-sidebar-toggle {
    position: fixed;
    top: 14px; left: 14px;
    z-index: 45;
    width: 42px; height: 42px;
    border-radius: var(--bk-radius);
    background: var(--bk-ink);
    color: var(--bk-yellow);
    border: 0;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--bk-shadow-md);
    font-size: 16px;
}
.hhhr-sidebar-toggle:hover { background: var(--bk-ink-900); }
.hhhr-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.45);
    backdrop-filter: blur(6px);
    z-index: 25;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--bk-trans);
}
body.hhhr-sidebar-open .hhhr-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
}

/* ---------- canvas ---------- */
.hhhr-canvas {
    flex: 1 1 auto;
    min-width: 0;
    padding: 28px 36px 96px;
    /* Full width — sidebar already eats 248px on the left. The injury form,
       tables, and dropzone all benefit from the extra horizontal room. */
    max-width: none;
}
/* Page banner with the company logo. Sits on white surface so the full
   wordmark reads clearly, unlike the dark sidebar where it disappeared. */
.hhhr-canvas-banner {
    display: flex;
    align-items: center;
    padding: 12px 0 26px;
    margin-bottom: 26px;
    border-bottom: 1px solid var(--bk-ink-100);
}
.hhhr-canvas-banner img {
    display: block;
    height: 100px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}
@media (max-width: 720px) {
    .hhhr-canvas-banner { padding-top: 0; margin-bottom: 18px; }
    .hhhr-canvas-banner img { height: 72px; }
}

.hhhr-canvas-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.hhhr-canvas-heading { min-width: 0; }
.hhhr-canvas-eyebrow {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bk-ink-500);
}
.hhhr-canvas-title {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--bk-ink);
}
.hhhr-canvas-actions {
    display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}

/* ---------- views (switched via JS) ---------- */
.hhhr-view { display: none; }
.hhhr-view.is-active {
    display: block;
    animation: hhhr-view-in 220ms cubic-bezier(0.2, 0.0, 0.0, 1.0);
}
@keyframes hhhr-view-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- search ---------- */
.hhhr-search { position: relative; }
.hhhr-search input[type="search"] {
    width: 320px;
    max-width: 60vw;
    padding: 11px 14px 11px 40px;
    border: var(--bk-border-strong);
    border-radius: var(--bk-radius-pill);
    background: var(--bk-surface);
    color: var(--bk-ink);
    font-size: 14px;
    transition: border-color var(--bk-trans-fast), box-shadow var(--bk-trans-fast);
}
.hhhr-search::before {
    content: "\f002";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 16px; top: 50%;
    transform: translateY(-50%);
    color: var(--bk-ink-400);
    font-size: 13px;
    pointer-events: none;
}
.hhhr-search input[type="search"]:focus {
    outline: none;
    border-color: var(--bk-yellow-dark);
    box-shadow: var(--bk-glow);
}
.hhhr-search input[type="search"]::placeholder { color: var(--bk-ink-400); }

/* ---------- stats grid ---------- */
.hhhr-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}
.hhhr-stat {
    position: relative;
    background: var(--bk-surface);
    border: var(--bk-border);
    border-radius: var(--bk-radius-lg);
    padding: 20px 22px 18px;
    box-shadow: var(--bk-shadow-sm);
    transition: transform var(--bk-trans), box-shadow var(--bk-trans), border-color var(--bk-trans);
    overflow: hidden;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: default;
    display: flex;
    flex-direction: column;
}
.hhhr-stat-icon {
    width: 36px; height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    background: var(--bk-ink-100);
    color: var(--bk-ink-700);
    margin-bottom: 14px;
}
.hhhr-stat-green .hhhr-stat-icon { background: var(--bk-success-soft); color: var(--bk-success-ink); }
.hhhr-stat-amber .hhhr-stat-icon { background: var(--bk-yellow-soft); color: var(--bk-warn-ink); }
.hhhr-stat-blue .hhhr-stat-icon  { background: var(--bk-info-soft); color: var(--bk-info-ink); }
.hhhr-stat-red .hhhr-stat-icon   { background: var(--bk-danger-soft); color: var(--bk-danger-ink); }
.hhhr-stat-grey .hhhr-stat-icon  { background: var(--bk-ink-100); color: var(--bk-ink-700); }
.hhhr-stat-purple .hhhr-stat-icon { background: #ede5ff; color: #5b21b6; }
.hhhr-stat-sub {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--bk-ink-400);
    margin-top: 2px;
}

.hhhr-stat-num {
    font-size: 34px;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    font-feature-settings: "tnum" 1, "lnum" 1;
    color: var(--bk-ink);
}
.hhhr-stat-label {
    font-size: 13px;
    color: var(--bk-ink-500);
    margin-top: 4px;
    font-weight: 500;
}
.hhhr-stat-hint {
    font-size: 11px;
    color: var(--bk-warn-ink);
    background: var(--bk-yellow-soft);
    padding: 3px 8px;
    border-radius: var(--bk-radius-pill);
    display: inline-block;
    margin-top: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    opacity: 0.75;
    transition: opacity var(--bk-trans);
    width: fit-content;
}
.hhhr-stat-clickable { cursor: pointer; }
.hhhr-stat-clickable:hover {
    transform: translateY(-2px);
    box-shadow: var(--bk-shadow-md);
    border-color: rgba(15, 23, 42, 0.10);
}
.hhhr-stat-clickable:hover .hhhr-stat-hint { opacity: 1; }
.hhhr-stat-clickable:focus-visible {
    outline: none;
    box-shadow: var(--bk-glow), var(--bk-shadow-md);
}
.hhhr-stat-amber::after {
    content: "";
    position: absolute;
    top: 0; right: -40%; bottom: 0;
    width: 70%;
    background: radial-gradient(circle at 30% 50%, var(--bk-yellow-soft) 0%, transparent 60%);
    pointer-events: none;
    opacity: 0.55;
}

/* ---------- overview grid (Needs Attention + This Week) ---------- */
.hhhr-overview-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 18px;
}
@media (max-width: 960px) {
    .hhhr-overview-grid { grid-template-columns: 1fr; }
}

/* ---------- panel (generic dashboard card) ---------- */
.hhhr-panel {
    background: var(--bk-surface);
    border: var(--bk-border);
    border-radius: var(--bk-radius-lg);
    box-shadow: var(--bk-shadow-sm);
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.hhhr-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.hhhr-panel-head h2 {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--bk-ink-500);
    display: flex;
    align-items: center;
    gap: 10px;
}
.hhhr-panel-head h2 i {
    color: var(--bk-yellow-dark);
    font-size: 14px;
}
.hhhr-panel-meta {
    font-size: 11px;
    background: var(--bk-ink-100);
    color: var(--bk-ink-700);
    padding: 3px 10px;
    border-radius: var(--bk-radius-pill);
    font-weight: 600;
    letter-spacing: 0.02em;
}
.hhhr-panel-empty {
    text-align: center;
    color: var(--bk-ink-500);
    padding: 28px 12px;
}
.hhhr-panel-empty i {
    font-size: 28px;
    color: var(--bk-success);
    margin-bottom: 10px;
    opacity: 0.6;
}
.hhhr-panel-empty p { margin: 0; font-size: 14px; }
.hhhr-panel-cta {
    margin-top: 12px;
    align-self: flex-start;
    background: transparent;
    border: 0;
    color: var(--bk-ink-700);
    font-weight: 600;
    font-size: 13px;
    padding: 8px 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color var(--bk-trans-fast), gap var(--bk-trans-fast);
}
.hhhr-panel-cta:hover { color: var(--bk-ink); gap: 10px; }
.hhhr-panel-cta i { font-size: 11px; }

/* ---------- attention list (Dashboard view) ---------- */
.hhhr-attention-list { list-style: none; margin: 0; padding: 0; }
.hhhr-attention-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px 12px 16px;
    border-radius: var(--bk-radius);
    transition: background var(--bk-trans-fast);
    position: relative;
}
.hhhr-attention-row::before {
    content: "";
    position: absolute;
    left: 4px; top: 50%;
    transform: translateY(-50%);
    width: 4px; height: 32px;
    border-radius: 4px;
    background: var(--bk-yellow);
}
.hhhr-attention-row:hover { background: var(--bk-yellow-tint); }
.hhhr-attention-main { flex: 1 1 auto; min-width: 0; }
.hhhr-attention-name {
    display: block;
    font-weight: 600;
    color: var(--bk-ink);
    font-size: 14px;
    margin-bottom: 2px;
}
.hhhr-attention-name:hover { color: var(--bk-ink-900); }
.hhhr-attention-sub {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--bk-ink-500);
}
.hhhr-attention-overdue {
    color: var(--bk-danger);
    font-weight: 600;
}
.hhhr-attention-loc {
    color: var(--bk-ink-500);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.hhhr-attention-loc::before {
    content: "•";
    color: var(--bk-ink-300);
}
.hhhr-attention-actions {
    display: flex;
    gap: 6px;
    flex: 0 0 auto;
}

/* ---------- timeline (This Week panel) ---------- */
.hhhr-timeline { list-style: none; margin: 0; padding: 0; }
.hhhr-timeline-row {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--bk-ink-200);
}
.hhhr-timeline-row:last-child { border-bottom: 0; }
.hhhr-timeline-when {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    padding-top: 2px;
}
.hhhr-timeline-date {
    font-size: 13px;
    font-weight: 700;
    color: var(--bk-ink);
    letter-spacing: -0.005em;
}
.hhhr-timeline-distance {
    font-size: 11px;
    color: var(--bk-ink-500);
    margin-top: 2px;
}
.hhhr-timeline-content {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.hhhr-timeline-icon {
    width: 32px; height: 32px;
    flex: 0 0 auto;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}
.hhhr-timeline-birthday .hhhr-timeline-icon {
    background: var(--bk-yellow-soft);
    color: var(--bk-warn-ink);
}
.hhhr-timeline-anniversary .hhhr-timeline-icon {
    background: var(--bk-info-soft);
    color: var(--bk-info-ink);
}
.hhhr-timeline-text {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 10px;
    min-width: 0;
    flex: 1 1 auto;
}
.hhhr-timeline-text .hhhr-celebrate-link {
    font-weight: 600;
    color: var(--bk-ink);
    font-size: 14px;
}
.hhhr-timeline-text .hhhr-celebrate-link:hover {
    color: var(--bk-ink-900);
    text-decoration: underline;
    text-decoration-color: var(--bk-yellow);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}
.hhhr-timeline-tag {
    font-size: 11px;
    background: var(--bk-ink-100);
    color: var(--bk-ink-700);
    padding: 2px 8px;
    border-radius: var(--bk-radius-pill);
    font-weight: 600;
    letter-spacing: 0.01em;
}
.hhhr-timeline-loc {
    font-size: 12px;
    color: var(--bk-ink-500);
}
.hhhr-timeline-loc::before {
    content: "•";
    margin-right: 6px;
    color: var(--bk-ink-300);
}

/* ---------- toolbar (Employees view) ---------- */
.hhhr-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.hhhr-filter-pills {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    background: var(--bk-ink-100);
    padding: 4px;
    border-radius: var(--bk-radius-pill);
}
.hhhr-pill {
    background: transparent;
    color: var(--bk-ink-600);
    border: 0;
    padding: 7px 14px;
    border-radius: var(--bk-radius-pill);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: background var(--bk-trans-fast), color var(--bk-trans-fast), box-shadow var(--bk-trans-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.hhhr-pill:hover { color: var(--bk-ink); background: rgba(255, 255, 255, 0.6); }
.hhhr-pill.is-active {
    background: var(--bk-surface);
    color: var(--bk-ink);
    box-shadow: var(--bk-shadow-sm);
}
.hhhr-pill-warn { color: var(--bk-warn); }
.hhhr-pill-warn.is-active { color: var(--bk-warn-ink); }
.hhhr-pill-purple { color: #5b21b6; }
.hhhr-pill-purple.is-active { color: #4c1d95; background: #ede5ff; }
.hhhr-pill:focus-visible { outline: none; box-shadow: var(--bk-glow); }

/* ---------- bulk bar ---------- */
.hhhr-bulk-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: var(--bk-ink);
    color: #fff;
    border-radius: var(--bk-radius);
    padding: 12px 16px;
    margin-bottom: 12px;
    box-shadow: var(--bk-shadow-md);
}
.hhhr-bulk-msg strong { color: var(--bk-yellow); font-size: 16px; font-weight: 700; }
.hhhr-bulk-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hhhr-bulk-bar .hhhr-btn-ghost { background: rgba(255,255,255,0.06); color: #fff; border-color: rgba(255,255,255,0.15); }
.hhhr-bulk-bar .hhhr-btn-ghost:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.25); }

/* ---------- table ---------- */
.hhhr-table-wrap {
    background: var(--bk-surface);
    border: var(--bk-border);
    border-radius: var(--bk-radius-lg);
    box-shadow: var(--bk-shadow-sm);
    overflow: hidden;
}
.hhhr-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.hhhr-table th, .hhhr-table td {
    text-align: left;
    padding: 14px 18px;
    border-bottom: 1px solid var(--bk-ink-100);
    vertical-align: middle;
}
.hhhr-table thead th {
    background: var(--bk-ink-50);
    font-weight: 700;
    color: var(--bk-ink-500);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding-top: 12px;
    padding-bottom: 12px;
}
/* Sortable header: the <th> gives up its padding so the inner <button> can
   own the whole cell (full click target + hover state). Arrow is a tiny
   indicator that flips between neutral, ascending, and descending. */
.hhhr-table thead th.hhhr-th-sortable { padding: 0; }
.hhhr-th-sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 12px 18px;
    background: transparent;
    border: 0;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    text-align: left;
    cursor: pointer;
}
.hhhr-th-sort-btn:hover { background: var(--bk-ink-100); }
.hhhr-sort-arrow { font-size: 9px; opacity: 0.4; }
.hhhr-sort-arrow::before { content: '⇅'; }
.hhhr-th-sortable.is-sorted-asc  .hhhr-sort-arrow { opacity: 1; }
.hhhr-th-sortable.is-sorted-asc  .hhhr-sort-arrow::before { content: '▲'; }
.hhhr-th-sortable.is-sorted-desc .hhhr-sort-arrow { opacity: 1; }
.hhhr-th-sortable.is-sorted-desc .hhhr-sort-arrow::before { content: '▼'; }
.hhhr-table tbody tr { transition: background var(--bk-trans-fast); }
.hhhr-table tbody tr:hover { background: var(--bk-yellow-tint); }
.hhhr-row.is-hidden { display: none; }
.hhhr-name-link {
    font-weight: 600;
    color: var(--bk-ink);
    letter-spacing: -0.005em;
}
.hhhr-name-link:hover {
    color: var(--bk-ink-900);
    text-decoration: underline;
    text-decoration-color: var(--bk-yellow);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}
.hhhr-row-sub { font-size: 12px; color: var(--bk-ink-500); margin-top: 2px; }
.hhhr-col-check { width: 36px; }
.hhhr-row-check, .hhhr-row-check-stub, #hhhr-select-all { accent-color: var(--bk-ink); transform: translateY(1px); }
.hhhr-col-actions { text-align: right; white-space: nowrap; }
.hhhr-col-actions .hhhr-btn { margin-left: 6px; }
.hhhr-empty { text-align: center; color: var(--bk-ink-500); padding: 48px 16px; font-size: 14px; }

/* ---------- badges ---------- */
.hhhr-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--bk-radius-pill);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.01em;
}
.hhhr-badge-green { background: var(--bk-success-soft); color: var(--bk-success-ink); }
.hhhr-badge-red   { background: var(--bk-danger-soft); color: var(--bk-danger-ink); }
.hhhr-badge-amber { background: var(--bk-yellow-soft); color: var(--bk-warn-ink); }
.hhhr-badge-large { padding: 6px 14px; font-size: 13px; }
.hhhr-badge-blue  { background: var(--bk-info-soft); color: var(--bk-info-ink); }
.hhhr-badge-grey  { background: var(--bk-ink-100); color: var(--bk-ink-700); }
.hhhr-badge-chip  { padding: 2px 8px; font-size: 11px; gap: 4px; vertical-align: middle; }
.hhhr-row-sub + .hhhr-badge-chip { margin-top: 4px; }

.hhhr-pending-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 3px 10px;
    border-radius: var(--bk-radius-pill);
    background: var(--bk-yellow-soft);
    color: var(--bk-warn-ink);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: 1px solid rgba(180, 83, 9, 0.18);
}
.hhhr-pending-badge i { color: var(--bk-warn); }

/* ---------- insurance status pill ---------- */
.hhhr-ins {
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.hhhr-ins-sent        { color: var(--bk-success); }
.hhhr-ins-refused     { color: var(--bk-success); }
.hhhr-ins-scheduled   { color: var(--bk-warn); }
.hhhr-ins-cancelled   { color: var(--bk-ink-400); font-style: italic; font-weight: 500; }
.hhhr-ins-outstanding { color: var(--bk-danger); font-weight: 700; }
.hhhr-ins-none        { color: var(--bk-ink-400); font-weight: 500; }
.hhhr-ins-days        { color: var(--bk-ink-500); font-weight: 500; margin-left: 4px; }

/* ---------- last-contact column ---------- */
.hhhr-last-contact { display: inline-flex; flex-direction: column; line-height: 1.25; font-size: 13px; font-weight: 500; color: var(--bk-ink); }
.hhhr-last-contact-sub { font-size: 11px; color: var(--bk-ink-500); font-weight: 500; }
.hhhr-last-contact-failed { color: var(--bk-danger); }
.hhhr-last-contact-failed .hhhr-last-contact-sub { color: var(--bk-danger); opacity: 0.85; }
.hhhr-last-contact-failed .fa-triangle-exclamation { margin-left: 4px; }
.hhhr-last-contact-none { color: var(--bk-ink-400); }

/* ---------- buttons ---------- */
.hhhr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid transparent;
    border-radius: var(--bk-radius-sm);
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.005em;
    text-decoration: none;
    transition: background var(--bk-trans-fast), border-color var(--bk-trans-fast), color var(--bk-trans-fast), transform var(--bk-trans-fast), box-shadow var(--bk-trans-fast);
    background: var(--bk-surface);
    color: var(--bk-ink);
}
.hhhr-btn:hover { transform: translateY(-1px); }
.hhhr-btn:active { transform: translateY(0); }
.hhhr-btn:focus-visible { outline: none; box-shadow: var(--bk-glow); }
.hhhr-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.hhhr-btn-block { width: 100%; padding: 14px 16px; font-size: 15px; }

.hhhr-btn-icon {
    padding: 7px;
    min-width: 34px;
    height: 34px;
    line-height: 1;
    border-radius: var(--bk-radius-sm);
}
.hhhr-btn-icon i { font-size: 13px; margin: 0; }
.hhhr-btn i { margin-right: 2px; }
.hhhr-btn-icon i { margin-right: 0; }

.hhhr-btn-primary {
    background: var(--bk-yellow);
    color: var(--bk-ink);
    border-color: var(--bk-yellow);
    box-shadow: 0 1px 2px rgba(212, 184, 0, 0.4), inset 0 -1px 0 rgba(0,0,0,0.05);
}
.hhhr-btn-primary:hover { background: var(--bk-yellow-hover); border-color: var(--bk-yellow-hover); }
.hhhr-btn-primary:active { background: var(--bk-yellow-dark); border-color: var(--bk-yellow-dark); }

.hhhr-btn-danger {
    background: var(--bk-danger);
    color: #fff;
    border-color: var(--bk-danger);
}
.hhhr-btn-danger:hover { background: var(--bk-danger-ink); border-color: var(--bk-danger-ink); }

.hhhr-btn-success {
    background: var(--bk-success);
    color: #fff;
    border-color: var(--bk-success);
}
.hhhr-btn-success:hover { background: var(--bk-success-ink); border-color: var(--bk-success-ink); }

.hhhr-btn-ghost {
    background: var(--bk-surface);
    border-color: var(--bk-ink-200);
    color: var(--bk-ink);
}
.hhhr-btn-ghost:hover {
    background: var(--bk-ink-50);
    border-color: var(--bk-ink-300);
}

.hhhr-btn-warn {
    background: var(--bk-warn);
    color: #fff;
    border-color: var(--bk-warn);
}
.hhhr-btn-warn:hover { background: var(--bk-warn-ink); border-color: var(--bk-warn-ink); }

/* large side-by-side choice buttons inside the mark-completed modal */
.hhhr-choice-row { display: flex; gap: 12px; margin-top: 4px; }
.hhhr-btn-large {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    text-align: left;
    line-height: 1.25;
    min-height: 72px;
    border-radius: var(--bk-radius);
}
.hhhr-btn-large .hhhr-choice-icon {
    flex: 0 0 auto;
    width: 36px; height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.18);
    border-radius: 999px;
    font-size: 16px;
    font-weight: 700;
}
.hhhr-btn-large .hhhr-choice-text strong { font-weight: 700; font-size: 15px; }
.hhhr-btn-large .hhhr-choice-text small { font-weight: 400; opacity: 0.85; font-size: 12px; }
.hhhr-btn-large:disabled { opacity: 0.5; cursor: not-allowed; }
@media (max-width: 540px) { .hhhr-choice-row { flex-direction: column; } }

/* ---------- detail drawer ---------- */
.hhhr-drawer {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: flex;
    justify-content: flex-end;
}
.hhhr-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.42);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: hhhr-fade-in 200ms ease-out;
}
.hhhr-drawer-panel {
    position: relative;
    width: min(820px, 100vw);
    height: 100vh;
    background: var(--bk-page);
    box-shadow: var(--bk-shadow-xl);
    overflow-y: auto;
    animation: hhhr-drawer-in 320ms cubic-bezier(0.2, 0.0, 0.0, 1.0);
    padding-bottom: 48px;
}
@keyframes hhhr-drawer-in {
    from { transform: translateX(40px); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}
.hhhr-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 16px 24px;
    background: var(--bk-surface);
    border-bottom: var(--bk-border);
    position: sticky;
    top: 0;
    z-index: 2;
    backdrop-filter: saturate(180%) blur(8px);
}
.hhhr-drawer-close-x {
    width: 36px; height: 36px;
    border-radius: var(--bk-radius-sm);
    background: transparent;
    border: 0;
    color: var(--bk-ink-600);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: background var(--bk-trans-fast), color var(--bk-trans-fast);
}
.hhhr-drawer-close-x:hover { background: var(--bk-ink-100); color: var(--bk-ink); }
#hhhr-detail-body { padding: 24px 28px 0; }

/* The old back-btn class lingers for backward compat. */
.hhhr-back { display: none; }

/* ---------- detail view inner cards ---------- */
.hhhr-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 22px;
    flex-wrap: wrap;
    padding: 24px 26px;
    background: linear-gradient(135deg, var(--bk-surface), var(--bk-yellow-tint));
    border: var(--bk-border);
    border-radius: var(--bk-radius-lg);
    box-shadow: var(--bk-shadow-sm);
    position: relative;
    overflow: hidden;
}
.hhhr-detail-header::after {
    content: "";
    position: absolute;
    right: -80px; top: -80px;
    width: 240px; height: 240px;
    background: radial-gradient(circle, var(--bk-yellow-soft) 0%, transparent 60%);
    pointer-events: none;
    opacity: 0.6;
}
.hhhr-detail-name {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin: 0 0 6px;
    color: var(--bk-ink);
    position: relative;
    z-index: 1;
}
.hhhr-detail-sub { color: var(--bk-ink-600); font-size: 14px; margin: 0; position: relative; z-index: 1; }

.hhhr-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
@media (min-width: 1100px) {
    /* in the drawer at full width, two-up cards still fit comfortably */
    .hhhr-drawer-panel .hhhr-cards { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
}
.hhhr-card {
    background: var(--bk-surface);
    border: var(--bk-border);
    border-radius: var(--bk-radius-lg);
    padding: 22px 24px;
    box-shadow: var(--bk-shadow-sm);
    transition: box-shadow var(--bk-trans);
}
.hhhr-card:hover { box-shadow: var(--bk-shadow-md); }
.hhhr-card h3 {
    margin: 0 0 14px;
    font-size: 11px;
    color: var(--bk-ink-500);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.hhhr-info-row {
    display: flex; justify-content: space-between; gap: 12px;
    padding: 10px 0; border-bottom: 1px solid var(--bk-ink-100);
    font-size: 14px;
}
.hhhr-info-row:last-child { border-bottom: 0; }
.hhhr-info-row dt { color: var(--bk-ink-500); font-weight: 500; }
.hhhr-info-row dd { margin: 0; font-weight: 600; text-align: right; color: var(--bk-ink); }

/* Contact info card — read view */
.hhhr-contact-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px;
}
.hhhr-contact-head h3 {
    margin: 0; font-size: 11px; color: var(--bk-ink-500);
    text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700;
}
/* Personal info and emergency contact: the edit forms.
   A card being edited takes the whole row of the drawer, so every field is a
   comfortable width instead of a third of a half-width card. */
.hhhr-card.is-editing { grid-column: 1 / -1; box-shadow: var(--bk-shadow-md); }
#hhhr-contact-editor, #hhhr-info-editor { margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--bk-ink-100); }
.hhhr-form-section {
    margin: 18px 0 10px;
    font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--bk-ink-500); font-weight: 700;
}
.hhhr-form-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px 16px; }
.hhhr-span-1 { grid-column: span 1; }
.hhhr-span-2 { grid-column: span 2; }
.hhhr-span-3 { grid-column: span 3; }
.hhhr-span-4 { grid-column: span 4; }
.hhhr-span-6 { grid-column: 1 / -1; }
.hhhr-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hhhr-field-label { font-size: 13px; font-weight: 600; color: var(--bk-ink-700); }
.hhhr-field input,
.hhhr-field select {
    width: 100%; min-width: 0; height: 44px; padding: 0 12px;
    font-size: 16px; line-height: 1.2;
    border: 1px solid var(--bk-ink-300); border-radius: var(--bk-radius-sm);
    background: var(--bk-surface); color: var(--bk-ink);
    transition: border-color var(--bk-trans-fast), box-shadow var(--bk-trans-fast);
}
.hhhr-field select {
    appearance: none; -webkit-appearance: none; padding-right: 34px; text-overflow: ellipsis;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2352525B' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
}
.hhhr-field input::placeholder { color: var(--bk-ink-400); }
.hhhr-field input:hover,
.hhhr-field select:hover { border-color: var(--bk-ink-400); }
.hhhr-field input:focus,
.hhhr-field select:focus { outline: none; border-color: var(--bk-ink); box-shadow: var(--bk-glow); }
.hhhr-field-hint { font-size: 12px; line-height: 1.35; color: var(--bk-ink-500); }
.hhhr-field-error { font-size: 12px; font-weight: 600; color: var(--bk-danger); }
.hhhr-field.has-error input,
.hhhr-field.has-error select { border-color: var(--bk-danger); box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12); }
.hhhr-form-actions {
    display: flex; align-items: center; justify-content: flex-end; gap: 10px;
    margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--bk-ink-100);
}
.hhhr-form-actions .hhhr-btn { min-height: 42px; padding: 0 18px; }
.hhhr-form-note { margin-right: auto; font-size: 12px; line-height: 1.35; color: var(--bk-ink-500); }
.hhhr-btn.hhhr-btn-small { padding: 3px 10px; font-size: 12px; margin-left: 8px; vertical-align: middle; }
.hhhr-card-head-actions .hhhr-btn.hhhr-btn-small,
.hhhr-contact-head > .hhhr-btn.hhhr-btn-small { margin-left: 0; padding: 6px 12px; white-space: nowrap; }

/* Read view: links, what is missing, and when the yearly update goes out. */
.hhhr-info-row dd a { color: inherit; text-decoration: underline; text-decoration-color: var(--bk-ink-300); text-underline-offset: 3px; overflow-wrap: anywhere; }
.hhhr-info-row dd a:hover { text-decoration-color: var(--bk-ink); }
.hhhr-info-row dt { flex: 0 0 auto; }
.hhhr-info-row dd { min-width: 0; overflow-wrap: anywhere; }
.hhhr-missing { color: var(--bk-warn); font-weight: 600; white-space: nowrap; }
.hhhr-tenure {
    display: inline-block; margin-left: 6px; padding: 1px 8px;
    font-size: 12px; font-weight: 600; color: var(--bk-ink-600);
    background: var(--bk-ink-100); border-radius: var(--bk-radius-pill); vertical-align: 1px;
}
.hhhr-info-foot { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--bk-ink-100); }
.hhhr-info-foot:empty, .hhhr-info-foot:not(:has(p, button, li)) { display: none; }
.hhhr-info-foot > .hhhr-btn.hhhr-btn-small { margin: 10px 0 0; padding: 6px 12px; }
.hhhr-yearly-line { margin: 0; font-size: 13px; line-height: 1.45; color: var(--bk-ink-600); }
.hhhr-yearly-line i { margin-right: 4px; color: var(--bk-ink-400); }
.hhhr-yearly-line.is-problem { color: var(--bk-warn-ink); }
.hhhr-yearly-line.is-problem i { color: var(--bk-warn); }

@media (max-width: 640px) {
    .hhhr-form-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .hhhr-span-3, .hhhr-span-4, .hhhr-span-6 { grid-column: 1 / -1; }
    .hhhr-span-2, .hhhr-span-1 { grid-column: span 1; }
    .hhhr-form-actions { flex-wrap: wrap; }
    .hhhr-form-note { flex: 1 0 100%; margin: 0 0 4px; }
    .hhhr-form-actions .hhhr-btn { flex: 1 1 0; justify-content: center; }
}

.hhhr-pdf-list { list-style: none; margin: 0; padding: 0; }
.hhhr-pdf-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--bk-ink-100);
    min-width: 0;
    font-size: 14px;
}
.hhhr-pdf-list li:last-child { border-bottom: 0; }
.hhhr-pdf-list li > :first-child {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.hhhr-pdf-list li .hhhr-btn { flex: 0 0 auto; white-space: nowrap; }
.hhhr-pdf-meta { font-size: 12px; color: var(--bk-ink-500); overflow-wrap: anywhere; }

/* ---------- HH HR Forms: documents, packets, invites ---------- */
.hhhr-doc-group { margin: 14px 0 2px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--bk-ink-500); }
.hhhr-doc-group:first-of-type { margin-top: 4px; }
.hhhr-invite-list { list-style: none; margin: 8px 0 0; padding: 0; }
.hhhr-invite-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 0; }
.hhhr-invite-list .hhhr-btn.hhhr-btn-small { margin-left: 0; }
.hhhr-oe-line { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--bk-ink-100); }
.hhhr-packet-list { list-style: none; margin: 0; padding: 0; }
.hhhr-packet { display: grid; grid-template-columns: 9.5em 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--bk-ink-100); font-size: 14px; }
.hhhr-packet:last-child { border-bottom: 0; }
.hhhr-packet-when { font-size: 12px; color: var(--bk-ink-500); padding-top: 2px; }
.hhhr-packet.is-archived .hhhr-packet-body { opacity: 0.7; }
@media (max-width: 520px) {
    .hhhr-packet { grid-template-columns: 1fr; gap: 2px; }
}
.hhhr-hhf-off { display: flex; gap: 10px; align-items: center; background: var(--bk-warn-soft); color: var(--bk-warn-ink); margin-bottom: 16px; }

.hhhr-audit-list { list-style: none; margin: 0; padding: 0; }
.hhhr-audit-list li {
    padding: 12px 0 12px 20px;
    border-bottom: 1px solid var(--bk-ink-100);
    font-size: 13px;
    position: relative;
}
.hhhr-audit-list li::before {
    content: "";
    position: absolute;
    left: 0; top: 18px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--bk-yellow);
    box-shadow: 0 0 0 3px var(--bk-yellow-soft);
}
.hhhr-audit-list li:last-child { border-bottom: 0; }
.hhhr-audit-time { color: var(--bk-ink-500); font-size: 11px; margin-top: 4px; letter-spacing: 0.02em; }

.hhhr-action-bar {
    margin-top: 22px;
    padding: 18px 22px;
    background: var(--bk-surface);
    border: var(--bk-border);
    border-radius: var(--bk-radius-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: var(--bk-shadow-sm);
}
.hhhr-action-bar strong { font-weight: 600; }

/* ---------- notes textarea ---------- */
.hhhr-notes-input {
    width: 100%;
    min-height: 110px;
    padding: 12px 14px;
    border: var(--bk-border-strong);
    border-radius: var(--bk-radius);
    font-size: 14px;
    line-height: 1.5;
    color: var(--bk-ink);
    background: var(--bk-surface);
    resize: vertical;
    transition: border-color var(--bk-trans-fast), box-shadow var(--bk-trans-fast);
}
.hhhr-notes-input:focus {
    outline: none;
    border-color: var(--bk-yellow-dark);
    box-shadow: var(--bk-glow);
}
.hhhr-notes-row {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 10px; flex-wrap: wrap; gap: 8px;
}
.hhhr-notes-status { font-size: 12px; color: var(--bk-ink-500); }
.hhhr-notes-status.is-saving { color: var(--bk-info); }
.hhhr-notes-status.is-saved  { color: var(--bk-success); font-weight: 600; }
.hhhr-notes-status.is-dirty  { color: var(--bk-warn); font-weight: 600; }
.hhhr-notes-status.is-error  { color: var(--bk-danger); font-weight: 600; }

/* ---------- pagination ---------- */
.hhhr-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.hhhr-page-meta { font-size: 13px; color: var(--bk-ink-500); }
.hhhr-page-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hhhr-page-numbers { display: flex; gap: 4px; flex-wrap: wrap; }
.hhhr-page-num {
    background: transparent;
    border: 1px solid transparent;
    color: var(--bk-ink-600);
    width: 34px; height: 34px;
    border-radius: var(--bk-radius-sm);
    font-weight: 600;
    font-size: 13px;
    transition: background var(--bk-trans-fast), color var(--bk-trans-fast), border-color var(--bk-trans-fast);
}
.hhhr-page-num:hover { background: var(--bk-ink-100); color: var(--bk-ink); }
.hhhr-page-num.is-current {
    background: var(--bk-ink);
    color: var(--bk-yellow);
    border-color: var(--bk-ink);
}
.hhhr-page-ellipsis { color: var(--bk-ink-400); padding: 0 6px; align-self: center; }

/* ---------- modal ---------- */
.hhhr-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: 24px;
}
.hhhr-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 15, 18, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: hhhr-fade-in 180ms ease-out;
}
.hhhr-modal-card {
    position: relative;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: var(--bk-surface);
    border-radius: var(--bk-radius-xl);
    box-shadow: var(--bk-shadow-xl);
    max-width: 520px;
    width: 100%;
    padding: 28px 28px 22px;
    border: 1px solid rgba(255,255,255,0.6);
    animation: hhhr-pop-in 220ms cubic-bezier(0.2, 0.0, 0.0, 1.0);
}
.hhhr-modal-card h2 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--bk-ink);
}
.hhhr-modal-card p { color: var(--bk-ink-600); margin: 0 0 16px; font-size: 14px; }
.hhhr-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--bk-ink-100);
}
.hhhr-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--bk-ink-600);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 6px;
}
/* Fields inside the modal are styled by #hhhr-modal-extras in injuries.css. */

@keyframes hhhr-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes hhhr-pop-in {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- toast ---------- */
.hhhr-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bk-ink);
    color: #fff;
    padding: 12px 20px;
    border-radius: var(--bk-radius-pill);
    box-shadow: var(--bk-shadow-lg), inset 0 1px 0 rgba(255,255,255,0.08);
    font-size: 14px;
    font-weight: 600;
    z-index: 250;
    max-width: 90%;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    animation: hhhr-toast-in 260ms cubic-bezier(0.2, 0.0, 0.0, 1.0);
}
.hhhr-toast.is-error   { background: var(--bk-danger); }
.hhhr-toast.is-success { background: var(--bk-success); }
.hhhr-toast-msg { white-space: normal; }
.hhhr-toast-undo {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.32);
    padding: 4px 14px;
    border-radius: var(--bk-radius-pill);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--bk-trans-fast);
}
.hhhr-toast-undo:hover { background: rgba(255, 255, 255, 0.28); }
@keyframes hhhr-toast-in {
    from { opacity: 0; transform: translate(-50%, 12px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- no-access screen ---------- */
.hhhr-login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(1000px 600px at 70% -200px, rgba(254, 221, 0, 0.22), transparent 60%),
        radial-gradient(800px 500px at 0% 110%, rgba(10, 10, 10, 0.06), transparent 60%),
        var(--bk-page);
}
.hhhr-login-card {
    width: 100%;
    max-width: 420px;
    background: var(--bk-surface);
    border: var(--bk-border);
    border-radius: var(--bk-radius-xl);
    box-shadow: var(--bk-shadow-lg);
    padding: 36px 36px 32px;
    position: relative;
    overflow: hidden;
}
.hhhr-login-card::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--bk-yellow), var(--bk-yellow-dark), var(--bk-yellow));
}
.hhhr-login-card .hhhr-brand { display: flex; margin-bottom: 26px; flex-direction: column; align-items: flex-start; gap: 14px; }
.hhhr-login-card .hhhr-brand-mark { height: auto; max-width: 100%; width: auto; background: transparent; padding: 0; border-radius: 0; }
.hhhr-login-card .hhhr-brand-mark img { display: block; max-height: 88px; max-width: 100%; height: auto; width: auto; }
.hhhr-login-card .hhhr-brand-text strong { font-size: 18px; color: var(--bk-ink); }
.hhhr-login-card .hhhr-brand-text span { font-size: 12px; color: var(--bk-ink-500); }
/* The signed-out page at /hr/: time off for everyone, the dashboard for HR. */
.hhhr-door-title { margin: 0 0 16px; font-size: 22px; font-weight: 800; letter-spacing: -0.01em; color: var(--bk-ink); }
.hhhr-door-choice {
    display: block; margin: 0 0 12px; padding: 16px 18px;
    border: 1px solid var(--bk-ink-200); border-radius: var(--bk-radius);
    background: var(--bk-surface); color: var(--bk-ink); text-decoration: none;
    transition: border-color var(--bk-trans-fast), box-shadow var(--bk-trans-fast), transform var(--bk-trans-fast);
}
.hhhr-door-choice strong { display: block; font-size: 17px; font-weight: 800; }
.hhhr-door-choice span { display: block; margin-top: 4px; font-size: 14px; line-height: 1.45; color: var(--bk-ink-600); }
.hhhr-door-choice.is-main { background: var(--bk-yellow); border-color: var(--bk-yellow-dark); }
.hhhr-door-choice.is-main span { color: var(--bk-ink-800); }
.hhhr-door-choice:hover { border-color: var(--bk-ink); box-shadow: var(--bk-shadow-md); transform: translateY(-1px); }
.hhhr-door-choice:focus-visible { outline: 3px solid var(--bk-ink); outline-offset: 2px; }
.hhhr-door-choice.is-off { background: var(--bk-ink-50, #f5f5f5); border-style: dashed; color: var(--bk-ink-500); cursor: not-allowed; }
.hhhr-door-choice.is-off strong, .hhhr-door-choice.is-off span { color: var(--bk-ink-500); }
.hhhr-door-choice.is-off:hover { border-color: var(--bk-ink-200); box-shadow: none; transform: none; }
.hhhr-door-text { margin: 0 0 14px; font-size: 15px; line-height: 1.5; color: var(--bk-ink-800); }
.hhhr-door-form { margin: 0 0 12px; }
.hhhr-door-form label { display: block; margin: 0 0 6px; font-size: 14px; font-weight: 700; color: var(--bk-ink); }
.hhhr-door-form > input { width: 100%; box-sizing: border-box; margin: 0 0 12px; padding: 12px 14px; font-size: 16px; border: 1px solid var(--bk-ink-200); border-radius: var(--bk-radius); }
.hhhr-door-form > input:focus-visible { outline: 3px solid var(--bk-ink); outline-offset: 1px; }
.hhhr-door-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.hhhr-door .hhhr-btn-block { text-decoration: none; justify-content: center; }
.hhhr-door a.hhhr-btn-block + a.hhhr-btn-block { margin-top: 8px; }
.hhhr-door-staff { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--bk-ink-100); }
.hhhr-door-staff p { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bk-ink-500); }
.hhhr-door-staff .hhhr-btn { text-decoration: none; justify-content: center; }

.hhhr-error {
    background: var(--bk-danger-soft);
    color: var(--bk-danger-ink);
    border: 1px solid rgba(185, 28, 28, 0.18);
    padding: 10px 14px;
    border-radius: var(--bk-radius);
    font-size: 14px;
    margin-bottom: 18px;
}
.hhhr-fineprint {
    margin: 18px 0 0;
    font-size: 12px;
    color: var(--bk-ink-500);
    text-align: center;
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
    .hhhr-sidebar {
        position: fixed;
        top: 0; left: 0; bottom: 0;
        transform: translateX(-100%);
        transition: transform var(--bk-trans-slow);
        box-shadow: var(--bk-shadow-xl);
    }
    body.hhhr-sidebar-open .hhhr-sidebar { transform: translateX(0); }
    .hhhr-sidebar-toggle { display: inline-flex; }
    .hhhr-canvas { padding: 64px 22px 96px; }
    .hhhr-canvas-title { font-size: 26px; }
}
@media (max-width: 720px) {
    .hhhr-canvas { padding: 64px 16px 96px; }
    .hhhr-stats { grid-template-columns: repeat(2, 1fr); }
    .hhhr-attention-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .hhhr-attention-actions { justify-content: flex-end; }
    /* table → stacked cards */
    .hhhr-table-wrap { border-radius: var(--bk-radius); }
    .hhhr-table thead { display: none; }
    .hhhr-table tbody tr {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px 12px;
        padding: 14px 16px;
        border-bottom: 1px solid var(--bk-ink-100);
    }
    .hhhr-table tbody tr:hover { background: transparent; }
    .hhhr-table tbody td {
        display: flex;
        flex-direction: column;
        gap: 2px;
        padding: 0;
        border: 0;
        font-size: 13px;
    }
    .hhhr-table tbody td[data-label]::before {
        content: attr(data-label);
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--bk-ink-400);
        font-weight: 700;
    }
    .hhhr-table tbody td[data-label=""]::before { display: none; }
    .hhhr-col-actions { grid-column: span 2; text-align: left; padding-top: 6px !important; }
    .hhhr-col-actions .hhhr-btn { margin-left: 0; margin-right: 6px; }
    .hhhr-col-check { grid-column: span 2; }
}

/* =========================================================================
 * Drawer — Paid Time Off card
 * ========================================================================= */

#hhhr-pto-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.hhhr-pto-pending-pill {
    background: var(--bk-warn);
    color: #fff;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.hhhr-pto-pre2023 {
    background: #fff5e0;
    border: 1px solid #f3d99c;
    color: #7a4a00;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    margin: 4px 0 12px;
}
.hhhr-pto-pills {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 4px 0 10px;
}
.hhhr-pto-pill {
    background: #f7f9fc;
    border-radius: 10px;
    padding: 10px 8px;
    text-align: center;
    border-top: 3px solid #1f4b99;
}
.hhhr-pto-pill.is-info    { border-top-color: #1f4b99; }
.hhhr-pto-pill.is-warn    { border-top-color: var(--bk-warn); }
.hhhr-pto-pill.is-success { border-top-color: var(--bk-success); }
.hhhr-pto-pill-num {
    display: block;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--bk-ink);
}
.hhhr-pto-pill-label {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: var(--bk-ink-400);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.hhhr-pto-meta {
    margin: 0 0 10px;
    font-size: 12px;
    color: var(--bk-ink-400);
}
.hhhr-pto-empty {
    color: var(--bk-ink-400);
    font-style: italic;
    margin: 8px 0;
}
.hhhr-pto-list {
    list-style: none;
    margin: 6px 0 10px;
    padding: 0;
}
.hhhr-pto-row {
    padding: 8px 0;
    border-bottom: 1px solid var(--bk-line, #eef1f5);
}
.hhhr-pto-row:last-child { border-bottom: none; }
.hhhr-pto-row-head {
    display: flex;
    gap: 10px;
    align-items: baseline;
    flex-wrap: wrap;
}
.hhhr-pto-row-pill {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 999px;
    color: #fff;
    background: #6b7280;
}
.hhhr-pto-row-pill.is-pending  { background: var(--bk-warn); }
.hhhr-pto-row-pill.is-approved { background: var(--bk-success); }
.hhhr-pto-row-pill.is-denied   { background: var(--bk-danger); }
.hhhr-pto-row-pill.is-cancelled{ background: #6b7280; }
.hhhr-pto-row-details {
    font-size: 13px;
    color: var(--bk-ink);
}
.hhhr-pto-row-notes {
    margin-top: 4px;
    font-size: 12px;
    color: var(--bk-ink-400);
    padding-left: 0;
}
.hhhr-pto-row-actions {
    margin-top: 6px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.hhhr-pto-toolbar {
    margin-top: 10px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px dashed var(--bk-line, #eef1f5);
}
.hhhr-pto-form-slot {
    margin-top: 10px;
    background: #f7f9fc;
    border: 1px solid var(--bk-line, #eef1f5);
    border-radius: 10px;
    padding: 12px;
}
.hhhr-pto-inline-form { margin: 0; }
.hhhr-pto-inline-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}
.hhhr-pto-inline-row label,
.hhhr-pto-inline-full {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    font-weight: 600;
    color: var(--bk-ink);
    gap: 4px;
}
.hhhr-pto-inline-form input,
.hhhr-pto-inline-form select,
.hhhr-pto-inline-form textarea {
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    background: #fff;
}
.hhhr-pto-inline-full {
    display: block;
}
.hhhr-pto-inline-full input,
.hhhr-pto-inline-full textarea {
    width: 100%;
    margin-top: 4px;
}
.hhhr-pto-inline-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    margin-top: 6px;
}
.hhhr-pto-form-hint {
    margin: 0 0 10px;
    font-size: 12px;
    color: var(--bk-ink-400);
}

/* ---------- 1.17.5: list states, phone row actions, toast over the drawer ---------- */
.hhhr-act-label { display: none; }
.hhhr-empty-row td { text-align: center; color: var(--bk-ink-500); padding: 36px 16px; font-size: 14px; }
.hhhr-empty-row a { font-weight: 600; }
.hhhr-audit-details { margin-top: 4px; font-size: 11px; color: var(--bk-ink-500); }
.hhhr-audit-details summary { cursor: pointer; width: fit-content; }
.hhhr-ins-days { white-space: nowrap; }
/* 1.17.9: bottom-center over the drawer too, so its Back button stays reachable. */
body.hhhr-drawer-open .hhhr-toast { bottom: 20px; top: auto; }
@media (max-width: 720px) {
    /* Words on every row button: a phone has no tooltips. */
    .hhhr-table tbody td.hhhr-col-actions { flex-direction: row; flex-wrap: wrap; gap: 6px; }
    .hhhr-col-actions .hhhr-btn-icon,
    .hhhr-attention-actions .hhhr-btn-icon { width: auto; height: auto; min-height: 34px; padding: 7px 12px; margin: 0; }
    .hhhr-col-actions .hhhr-act-label,
    .hhhr-attention-actions .hhhr-act-label { display: inline; margin-left: 6px; font-size: 13px; }
    .hhhr-attention-actions { flex-wrap: wrap; gap: 6px; }
}

/* ---------- 1.17.9: partial coverage, I-9 date, More menu, OE off ---------- */
.hhhr-ins-partial { color: var(--bk-warn-ink); font-weight: 600; }
.hhhr-card-head-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.hhhr-i9-line {
    margin: 12px 0 0; padding: 8px 12px; border-radius: var(--bk-radius);
    background: var(--bk-warn-soft); color: var(--bk-warn-ink); font-size: 14px; font-weight: 600;
}
.hhhr-i9-line.is-past { background: var(--bk-danger-soft); color: var(--bk-danger); }
.hhhr-i9-line.is-done { background: var(--bk-success-soft); color: var(--bk-success-ink); }
.hhhr-i9-line .hhhr-btn { margin-left: 8px; vertical-align: middle; }
.hhhr-i9-line .hhhr-link { font: inherit; margin-left: 4px; }
.hhhr-i9-due { margin-bottom: 14px; }
.hhhr-i9-due-head {
    margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--bk-warn-ink); font-weight: 700;
}
.hhhr-i9-due-date { color: var(--bk-warn-ink); font-weight: 600; }
.hhhr-stat-off { opacity: 0.6; cursor: default; }
.hhhr-oe-line.is-off p { color: var(--bk-ink-400); margin: 0; }
.hhhr-check-label { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 14px; cursor: pointer; }
.hhhr-more { position: relative; }
.hhhr-more > summary { list-style: none; cursor: pointer; }
.hhhr-more > summary::-webkit-details-marker { display: none; }
.hhhr-more-menu {
    position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 5; min-width: 200px;
    background: #fff; border: 1px solid var(--bk-ink-100); border-radius: var(--bk-radius);
    box-shadow: var(--bk-shadow-lg); padding: 6px;
}
.hhhr-more-menu .hhhr-btn { width: 100%; justify-content: flex-start; }
.hhhr-more-danger { color: var(--bk-danger); }
.hhhr-attention-overdue.is-in-window { color: var(--bk-warn-ink); }

/* ---------- 1.17.12: New hire and "Invited, not started" ---------- */
.hhhr-new-hires { margin-top: 18px; scroll-margin-top: 18px; }
.hhhr-new-hires:focus { outline: none; }
.hhhr-new-hires-note { margin: -6px 0 10px; font-size: 13px; color: var(--bk-ink-500); }
.hhhr-new-hire-actions .hhhr-btn-icon { width: auto; height: auto; padding: 7px 12px; }
.hhhr-new-hire-actions .hhhr-act-label { display: inline; margin-left: 6px; font-size: 13px; }
/* The I-9 row's button says what it does at every width (Brandon, 10/23/2026: an icon alone read as no way to mark it done). */
.hhhr-i9-due .hhhr-attention-actions .hhhr-btn-icon { width: auto; height: auto; min-height: 34px; padding: 7px 12px; margin: 0; }
.hhhr-i9-due .hhhr-attention-actions .hhhr-act-label { display: inline; margin-left: 6px; font-size: 13px; }
.hhhr-new-hire-due .hhhr-i9-due-head { color: var(--bk-danger-ink); }
.hhhr-filter-note {
    margin: 0 0 14px; padding: 10px 14px; border-radius: var(--bk-radius);
    background: var(--bk-info-soft); color: var(--bk-info-ink); font-size: 13px;
}
.hhhr-filter-note[hidden] { display: none; }
#hhhr-nh-error { margin: 0 0 14px; color: var(--bk-danger-ink); font-size: 14px; }
#hhhr-nh-error[hidden] { display: none; }
.hhhr-modal-card p.hhhr-help { margin: 4px 0 0; font-size: 12.5px; color: var(--bk-ink-500); }
