:root {
    color-scheme: light;
    --navy: #101c2b;
    --blue: #213b53;
    --orange: #ff9d58;
    --ink: #182b3d;
    --muted: #546678;
    --line: #dce5ed;
    --paper: #f3f6f9;
    font: 16px/1.5 system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
h1, p { margin: 0; }
h1 { line-height: 1.2; font-size: clamp(1.65rem, 4vw, 2.25rem); }
.muted { color: var(--muted); }
.brand { display: flex; align-items: center; gap: .65rem; font-size: 1.35rem; font-weight: 750; }
.mark { display: grid; place-items: center; width: 2.15rem; height: 2.15rem; border-radius: .45rem; background: var(--orange); color: var(--navy); }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.login-card, .panel { background: white; border: 1px solid var(--line); border-radius: 1rem; padding: clamp(1rem, 4vw, 2rem); }
.login-card { width: min(100%, 29rem); box-shadow: 0 16px 40px #101c2b12; }
.login-card h1 { margin: 1.35rem 0 .5rem; }
.login-card form { display: grid; gap: 1rem; margin: 1.3rem 0; }
label { display: grid; gap: .35rem; font-weight: 650; }
input, button { font: inherit; }
input { min-width: 0; width: 100%; border: 1px solid #aab9c7; border-radius: .5rem; padding: .62rem .75rem; }
button { cursor: pointer; border: 1px solid var(--navy); border-radius: .55rem; background: var(--navy); color: white; padding: .6rem 1rem; font-weight: 650; }
.secondary { color: var(--navy); background: white; }
.portal-link { display: inline-block; margin-top: 1rem; font-weight: 650; color: #213b53; text-underline-offset: .2em; }
.sidebar .portal-link { color: #ffd3ad; }
:focus-visible { outline: 3px solid #b7500b; outline-offset: 3px; }
.error { margin-top: 1rem; padding: .75rem; border-radius: .5rem; background: #fff0eb; color: #8b2519; }
.portal { min-height: 100vh; display: grid; grid-template-columns: 16rem minmax(0, 1fr); }
.sidebar { padding: 1.4rem; background: var(--navy); color: white; }
.area { margin: .8rem 0 1.6rem; color: #bdccda; }
nav { display: flex; flex-direction: column; gap: .4rem; }
nav a { color: white; text-decoration: none; padding: .6rem .75rem; border-radius: .5rem; }
nav a:hover, nav a[aria-current] { background: var(--blue); }
nav a[aria-current] { box-shadow: inset 3px 0 var(--orange); }
.main { min-width: 0; padding: clamp(1rem, 4vw, 3rem); }
.page-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.eyebrow { color: #8b4317; font-weight: 700; margin-bottom: .25rem; }
.page-header .muted { margin-top: .35rem; }
.summary { color: var(--muted); margin-bottom: .75rem; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; }
th, td { padding: .7rem .85rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
th { background: var(--paper); white-space: nowrap; }
@media (max-width: 740px) {
    .portal { grid-template-columns: minmax(0, 1fr); }
    .sidebar { padding: 1rem; }
    .area { margin: .4rem 0 .65rem; }
    nav { flex-direction: row; overflow-x: auto; }
    nav a { white-space: nowrap; }
}

.hr-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.hr-metric { border-top: 3px solid var(--orange); }
.hr-metric strong { display: block; margin-top: .25rem; font-size: 2rem; line-height: 1.2; }
.hr-panel-header, .hr-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
}
.hr-panel-header { justify-content: space-between; margin-bottom: 1rem; }
.hr-panel-header h2 { margin: 0; font-size: 1.2rem; }
.hr-link { color: var(--blue); font-weight: 650; text-underline-offset: .2em; }
.hr-filters { margin-bottom: 1.1rem; }
.hr-filters summary {
    display: list-item;
    width: fit-content;
    padding: .55rem .85rem;
    border: 1px solid var(--line);
    border-radius: .5rem;
    background: var(--paper);
    font-weight: 650;
    cursor: pointer;
}
.hr-filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
    align-items: end;
    gap: .8rem;
    margin-top: .85rem;
}
.hr-filter-form select {
    width: 100%;
    min-width: 0;
    padding: .62rem .65rem;
    border: 1px solid #aab9c7;
    border-radius: .5rem;
    background: white;
    color: var(--ink);
    font: inherit;
}
.hr-name { background: white; white-space: normal; }
.hr-status {
    display: inline-block;
    padding: .15rem .55rem;
    border-radius: 1rem;
    background: var(--paper);
    color: var(--ink);
    font-size: .875rem;
}
.hr-status-active { background: #def5e8; color: #125438; }

/* Web sign-in */
.login-page {
    min-height: 100svh;
    padding: clamp(1rem, 5vw, 3rem);
    background: radial-gradient(ellipse at 50% 0%, #e0eaf3, var(--paper) 68%);
}
.login-shell {
    width: min(100%, 29rem);
    border: 1px solid #ccd8e3;
    border-radius: 1.15rem;
    overflow: hidden;
    box-shadow: 0 20px 50px #101c2b20;
}
.login-shell .login-card {
    width: 100%;
    padding: clamp(1.25rem, 5vw, 2.25rem);
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
.login-logo { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.login-shell h1 { margin-top: 1.3rem; font-size: 1.25rem; }
.login-shell form { margin-block: 1.45rem 1.15rem; }
.login-shell input { min-height: 3rem; background: #fbfcfe; }
.login-shell button { min-height: 3rem; margin-top: .25rem; }
.login-shell button:hover { background: var(--blue); }
.login-recovery-button {
    display: block;
    padding: .65rem .9rem;
    border: 1px solid var(--line);
    border-radius: .55rem;
    color: var(--blue);
    font-size: .875rem;
    font-weight: 650;
    text-align: center;
    text-decoration: none;
}
.login-recovery-button:hover { background: var(--paper); }
.login-recovery-message { margin-top: .75rem; }
.login-route { overflow: hidden; background: #19344b; }
.login-route svg { display: block; width: 100%; height: auto; }
.login-route-truck { animation: login-truck-arrive 4s ease-out both; }
.login-route-line { animation: login-route-trace 4s ease-out both; }
@keyframes login-truck-arrive {
    from { transform: translateX(-145px); }
    to { transform: translateX(0); }
}
@keyframes login-route-trace {
    from { stroke-dashoffset: 65; opacity: .35; }
    to { stroke-dashoffset: 0; opacity: .9; }
}
@media (prefers-reduced-motion: reduce) {
    .login-route-truck, .login-route-line { animation: none; }
}

.hr-brand {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: .55rem;
    background: white;
}
.hr-button {
    display: inline-block;
    padding: .6rem 1rem;
    border-radius: .55rem;
    background: var(--navy);
    color: white;
    font-weight: 650;
    text-decoration: none;
}
.hr-button:hover { background: var(--blue); }
.hr-create-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
    align-items: start;
    gap: 1rem;
    max-width: 46rem;
    margin-top: 1.15rem;
}
.hr-create-form select {
    width: 100%;
    padding: .62rem .65rem;
    border: 1px solid #aab9c7;
    border-radius: .5rem;
    background: white;
    color: var(--ink);
    font: inherit;
}
.hr-create-form small { font-weight: 400; }
.hr-create-form .hr-actions { grid-column: 1 / -1; }
.hr-notice { margin-bottom: 1rem; padding: .75rem; border-radius: .5rem; background: #def5e8; color: #125438; }

.hr-navigation { display: block; margin-top: 1rem; }
.hr-navigation summary {
    padding: .6rem .75rem;
    border-radius: .5rem;
    background: var(--blue);
    cursor: pointer;
    font-weight: 700;
}
.hr-navigation summary::marker { color: var(--orange); }
.hr-navigation a {
    display: block;
    margin: .4rem 0 0 .95rem;
    background: #172b3e;
}
.hr-navigation a[aria-current] {
    background: #172b3e;
    box-shadow: inset 2px 0 var(--orange);
}
.hr-navigation a:hover { background: var(--blue); }

.office-page .portal {
    grid-template-columns: 16rem minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas: "header header" "sidebar content";
}
.office-header {
    grid-area: header;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: .65rem;
    min-height: 56px;
    padding: .4rem 1rem;
    background: white;
    border-bottom: 1px solid var(--line);
}
.office-header h1 { font-size: 1.25rem; font-weight: 700; }
.office-header button { min-height: 44px; border-color: var(--line); border-radius: .5rem; }
.office-page .sidebar {
    grid-area: sidebar;
    padding: 1.125rem;
    background: white;
    color: var(--ink);
    border-right: 1px solid var(--line);
}
.office-page .main { grid-area: content; padding: clamp(1rem, 3vw, 2rem); }
.office-page .panel { border-radius: .75rem; }
.office-page .area { margin: .75rem 0; color: var(--ink); font-weight: 700; }
.office-page .sidebar a { color: var(--ink); }
.office-page .sidebar nav a,
.office-page .hr-navigation summary { background: white; }
.office-page .sidebar nav a:hover,
.office-page .hr-navigation summary:hover { background: var(--paper); }
.office-page .sidebar nav a[aria-current] {
    background: #fff1e6;
    box-shadow: none;
    font-weight: 700;
}
.office-page .hr-navigation summary { border-bottom: 1px solid var(--line); }
.office-page .hr-navigation summary::marker { color: var(--muted); }
.office-page .sidebar .portal-link { display: block; font-size: .875rem; }
.office-page .hr-button,
.office-page .panel button { min-height: 44px; border-radius: .5rem; }
@media (max-width: 899px) {
    .office-page .portal {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto 1fr;
        grid-template-areas: "header" "sidebar" "content";
    }
    .office-page .sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
}

@media (min-width: 900px) {
    .office-page .office-header {
        position: sticky;
        top: 0;
        z-index: 1;
        min-height: 57px;
        padding-block: 6px;
    }
    .office-page .sidebar {
        position: sticky;
        top: 57px;
        height: calc(100dvh - 57px);
        overflow-y: auto;
    }
}

.office-heading { display: flex; align-items: center; gap: .65rem; }
.office-menu-toggle { display: none; }
.office-page .office-area-links {
    display: grid;
    margin-top: .75rem;
    border-top: 1px solid var(--line);
    padding-top: .5rem;
}
.office-page .office-area-links:empty { display: none; }
@media (max-width: 899px) {
    .office-page .office-header { position: sticky; top: 0; z-index: 2; }
    .office-menu-ready .office-menu-toggle { display: inline-block; }
    .office-menu-ready .sidebar { scroll-margin-top: 5rem; }
    .office-menu-ready .sidebar:not(.office-sidebar-open) { display: none; }
}

/* Dark navigation is isolated from the content and sign-in themes. */
.office-page .sidebar {
    --sidebar-base: var(--navy);
    --sidebar-header: var(--blue);
    --sidebar-active: #fff1e6;
    --sidebar-divider: #304459;
    padding: 0 0 .75rem;
    background: var(--sidebar-base);
    color: #f3f4f6;
    border-color: var(--sidebar-divider);
}
.office-sidebar-brand {
    display: flex;
    align-items: center;
    gap: .625rem;
    padding: .875rem 1rem;
    background: var(--sidebar-header);
    color: white;
    font-size: 1.0625rem;
    font-weight: 700;
}
.office-sidebar-brand img { border-radius: .375rem; }
.office-page .sidebar .area { margin: .75rem 1rem .45rem; color: #bdccda; }
.office-page .sidebar nav { display: block; }
.office-page .sidebar nav a,
.office-page .sidebar nav summary {
    padding: .58rem 1rem;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: #f3f4f6;
    font-size: .875rem;
}
.office-page .sidebar nav a { display: block; }
.office-page .sidebar nav a:hover,
.office-page .sidebar nav summary:hover { background: var(--sidebar-header); }
.office-page .sidebar nav a[aria-current] {
    background: var(--sidebar-active);
    color: var(--ink);
}
.office-page .hr-navigation { margin-top: .6rem; }
.office-page .hr-navigation summary { display: flex; align-items: center; gap: .65rem; list-style: none; }
.office-page .hr-navigation summary::-webkit-details-marker { display: none; }
.office-page .hr-navigation summary::after {
    content: '›';
    margin-left: auto;
    font-size: 1.15rem;
}
.office-page .hr-navigation details[open] summary { background: var(--sidebar-header); }
.office-page .hr-navigation details[open] summary::after { transform: rotate(90deg); }
.office-page .sidebar .hr-navigation a { margin: 0; padding-left: 2.7rem; }
.office-page .office-area-links { border-color: var(--sidebar-divider); }

.office-page .hr-tabs {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: 1rem;
    padding: .35rem;
    border: 1px solid var(--line);
    border-radius: .75rem;
    background: white;
}
.office-page .hr-tabs a { color: var(--ink); font-weight: 650; box-shadow: none; }
.office-page .hr-tabs a:hover { background: var(--paper); }
.office-page .hr-tabs a[aria-current] { background: #fff1e6; }
.hr-profile-picker {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: .75rem;
    margin-bottom: 1.25rem;
}
.hr-profile-picker label { flex: 1 1 16rem; min-width: 0; }
.hr-profile-picker select {
    width: 100%;
    min-height: 44px;
    padding: .55rem .65rem;
    border: 1px solid #aab9c7;
    border-radius: .5rem;
    background: white;
    color: var(--ink);
    font: inherit;
}
.hr-profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
    gap: 1rem;
}
.hr-profile-card { padding: 1rem; border: 1px solid var(--line); border-radius: .75rem; }
.hr-profile-card:first-child { text-align: center; background: var(--paper); }
.hr-profile-card h3 { margin: 0 0 .35rem; overflow-wrap: anywhere; }
.hr-profile-avatar {
    display: grid;
    place-items: center;
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto .8rem;
    border-radius: 50%;
    background: var(--blue);
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
}
.hr-profile-card .hr-status { margin-top: .65rem; }
.hr-profile-details { margin: .5rem 0 0; }
.hr-profile-details div {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .25rem 1rem;
    padding: .7rem 0;
    border-bottom: 1px solid var(--line);
}
.hr-profile-details div:last-child { border-bottom: 0; }
.hr-profile-details dt { font-weight: 650; }
.hr-profile-details dd { margin: 0; min-width: 0; overflow-wrap: anywhere; color: var(--muted); }
@media (max-width: 640px) {
    .hr-profile-grid { grid-template-columns: minmax(0, 1fr); }
}
