/*
 * KASUAL HRIS dashboard. Plain CSS, no build step.
 * Loaded only by resources/views/hris-dashboard/*; every rule is scoped under body.hd.
 * Tokens are measured from the reference export (see .scratch/hris-dashboard/DESIGN.md).
 */

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/InterVariable.woff2") format("woff2");
}

.hd {
    /* Surfaces */
    --hd-page: #eff0f3;
    --hd-surface: #fcfcfd;
    --hd-surface-tint: #ebecef;
    --hd-line: #e0e1e6;
    --hd-line-soft: #cdced7;
    --hd-bar: #dcdde1;          /* reference grey bar is #e1e2e5; one step darker so bars read on the tint card */
    --hd-bar-stub: #e4e5e8;

    /* Text */
    --hd-ink: #1e1f24;
    --hd-ink-2: #515257;
    --hd-ink-3: #64656a;        /* reference muted #78797d fails AA on tint; darkened */
    --hd-ink-on-accent: #ffffff;

    /* Accent */
    --hd-accent: #6da2df;       /* charts, today marker, hero card, focus ring */
    --hd-accent-light: #7bb1ef;
    --hd-accent-strong: #3b77c4; /* fills that carry white text: AA 4.5:1 */
    --hd-accent-strong-hover: #3268ad;
    --hd-accent-ink: #2f6db8;   /* blue text on white */
    --hd-accent-soft: #e3eefb;

    /* Status (fills are the reference colours, text is ink for AA) */
    --hd-success: #47d198;
    --hd-warning: #ffcd46;
    --hd-danger: #ff897e;
    --hd-danger-ink: #b4322a;
    --hd-danger-soft: #ffe7e4;
    --hd-violet: #a48be6;

    /* Shape */
    --hd-radius-card: 32px;
    --hd-radius-inner: 24px;
    --hd-radius-tile: 14px;
    --hd-radius-field: 12px;
    --hd-radius-pill: 999px;

    /* Space */
    --hd-gutter: 24px;
    --hd-gap: 24px;
    --hd-pad: 24px;

    --hd-shadow-pop: 0 18px 48px rgba(30, 31, 36, 0.12), 0 2px 6px rgba(30, 31, 36, 0.06);
    --hd-shadow-btn: 0 6px 16px rgba(59, 119, 196, 0.28);
    --hd-focus: 0 0 0 3px #fcfcfd, 0 0 0 5px #3b77c4;

    margin: 0;
    min-height: 100vh;
    background: var(--hd-page);
    color: var(--hd-ink);
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.45;
    font-feature-settings: "cv11", "ss01";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.hd *, .hd *::before, .hd *::after { box-sizing: border-box; }
.hd p, .hd h1, .hd h2, .hd h3, .hd dl, .hd dd, .hd ul { margin: 0; }
.hd ul { padding: 0; list-style: none; }
.hd a { color: inherit; }
.hd button, .hd input { font: inherit; color: inherit; }

.hd :focus { outline: none; }
.hd :focus-visible { box-shadow: var(--hd-focus); border-radius: 12px; }

.hd .hd-visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

.hd .hd-skip {
    position: absolute; left: 16px; top: -60px; z-index: 50;
    padding: 10px 16px; border-radius: var(--hd-radius-pill);
    background: var(--hd-accent-strong); color: #fff; text-decoration: none; font-weight: 600;
}
.hd .hd-skip:focus { top: 12px; }

.hd .hd-icon {
    width: 22px; height: 22px; flex: none;
    fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Top bar ---------- */

.hd .hd-topbar {
    position: relative; z-index: 30;
    display: flex; align-items: center; gap: 16px;
    padding: var(--hd-gutter) var(--hd-gutter) 0;
    max-width: 1440px; margin: 0 auto;
}

.hd .hd-brand {
    display: inline-flex; align-items: center; gap: 10px;
    height: 48px; padding: 0 18px 0 6px;
    border-radius: var(--hd-radius-pill);
    background: var(--hd-surface);
    text-decoration: none; flex: none;
}
.hd .hd-brand__mark {
    display: grid; place-items: center;
    width: 36px; height: 36px; border-radius: 50%;
    background: #0d121e; color: #fff;
    font-weight: 700; font-size: 16px; letter-spacing: 0;
}
.hd .hd-brand__name { font-weight: 600; font-size: 16px; letter-spacing: 0.01em; white-space: nowrap; }

.hd .hd-nav { flex: 1; display: flex; justify-content: center; min-width: 0; }
.hd .hd-nav__list { display: flex; gap: 4px; }
.hd .hd-nav__group { position: relative; }
.hd .hd-nav__button { gap: 6px; border: 0; background: none; cursor: pointer; font: inherit; font-size: 17px; padding: 0 18px 0 24px; }
.hd .hd-nav__chev { width: 18px; height: 18px; transition: transform .15s ease; }
.hd .hd-nav__button[aria-expanded="true"] { color: var(--hd-ink); background: var(--hd-surface); }
.hd .hd-nav__button[aria-expanded="true"] .hd-nav__chev { transform: rotate(180deg); }
.hd .hd-nav__link:focus-visible { box-shadow: var(--hd-focus); border-radius: var(--hd-radius-pill); }

/* Dropdown panel of a nav group */
.hd .hd-menu--nav { left: 0; right: auto; width: 320px; padding: 8px; border-radius: 24px; }
.hd .hd-menu--nav.hd-menu--end { left: auto; right: 0; }
.hd .hd-navitem {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 10px; border-radius: 16px; text-decoration: none; color: var(--hd-ink);
}
.hd .hd-navitem:hover { background: var(--hd-page); }
.hd .hd-navitem:focus-visible { box-shadow: inset 0 0 0 2px var(--hd-accent-strong); background: var(--hd-page); border-radius: 16px; }
.hd .hd-navitem.is-active { background: var(--hd-page); }
.hd .hd-navitem__icon {
    display: grid; place-items: center; flex: none; width: 40px; height: 40px;
    border-radius: var(--hd-radius-tile); background: var(--hd-page); color: var(--hd-ink);
}
.hd .hd-navitem.is-active .hd-navitem__icon { background: var(--hd-accent-strong); color: #fff; }
.hd .hd-navitem__icon .hd-icon { width: 20px; height: 20px; }
.hd .hd-navitem__text { display: flex; flex-direction: column; min-width: 0; }
.hd .hd-navitem__label { font-size: 15px; font-weight: 500; }
.hd .hd-navitem__hint { font-size: 13px; color: var(--hd-ink-3); }

/* Narrow screens: one Menu button with a sheet */
.hd .hd-navmenu { display: none; position: relative; margin-left: auto; }
.hd .hd-navmenu__button {
    display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 18px 0 14px;
    border: 0; border-radius: var(--hd-radius-pill); background: var(--hd-surface); color: var(--hd-ink);
    font-size: 16px; font-weight: 500; cursor: pointer;
}
.hd .hd-navmenu__button:focus-visible { box-shadow: var(--hd-focus); border-radius: var(--hd-radius-pill); }
.hd .hd-navmenu__button[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--hd-accent); }
.hd .hd-menu--sheet {
    right: 0; width: 340px; max-width: calc(100vw - 32px);
    max-height: calc(100vh - 96px); overflow-y: auto; padding: 10px; border-radius: 24px;
}
.hd .hd-sheetgroup { margin: 12px 10px 4px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--hd-ink-3); }
.hd .hd-sheetlink {
    display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px;
    border-radius: 14px; color: var(--hd-ink); text-decoration: none; font-size: 16px;
}
.hd .hd-sheetlink .hd-icon { width: 20px; height: 20px; color: var(--hd-ink-2); }
.hd .hd-sheetlink:hover, .hd .hd-sheetlink.is-active { background: var(--hd-page); }
.hd .hd-sheetlink.is-active { font-weight: 600; }
.hd .hd-sheetlink.is-active::after { content: ""; width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: var(--hd-accent-strong); }
.hd .hd-sheetlink:focus-visible { box-shadow: inset 0 0 0 2px var(--hd-accent-strong); border-radius: 14px; }
.hd .hd-nav__link {
    display: inline-flex; align-items: center; height: 48px; padding: 0 24px;
    border-radius: var(--hd-radius-pill);
    color: var(--hd-ink-2); text-decoration: none; font-size: 17px; white-space: nowrap;
    transition: background-color .15s ease, color .15s ease;
}
.hd .hd-nav__link:hover { color: var(--hd-ink); background: rgba(252, 252, 253, .6); }
.hd .hd-nav__link.is-active { background: var(--hd-surface); color: var(--hd-ink); }

.hd .hd-profile { position: relative; flex: none; }
.hd .hd-profile__button {
    display: grid; place-items: center;
    width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%;
    background: var(--hd-surface); cursor: pointer;
}
.hd .hd-profile__button[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--hd-accent); }
.hd .hd-profile__button:focus-visible { box-shadow: var(--hd-focus); border-radius: 50%; }

.hd .hd-menu {
    position: absolute; right: 0; top: calc(100% + 10px); z-index: 40;
    width: 320px; max-width: calc(100vw - 32px);
    padding: 12px; border-radius: var(--hd-radius-inner);
    background: var(--hd-surface); box-shadow: var(--hd-shadow-pop);
}
.hd .hd-menu[hidden] { display: none; }
.hd .hd-menu__head { display: flex; align-items: center; gap: 12px; padding: 6px 6px 14px; border-bottom: 1px solid var(--hd-line); }
.hd .hd-menu__who { min-width: 0; }
.hd .hd-menu__name { font-weight: 600; font-size: 16px; }
.hd .hd-menu__email { color: var(--hd-ink-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd .hd-menu__form { margin: 8px 0 0; }
.hd .hd-menu__item {
    display: flex; align-items: center; gap: 12px; width: 100%;
    padding: 12px 10px; border: 0; border-radius: 14px; background: none;
    font-size: 16px; text-align: left; cursor: pointer;
}
.hd .hd-menu__item:hover { background: var(--hd-page); }
.hd .hd-menu__item--danger { color: var(--hd-danger-ink); }
.hd .hd-menu__chev { margin-left: auto; width: 18px; height: 18px; }

/* ---------- Avatars ---------- */

.hd .hd-avatar {
    display: grid; place-items: center; flex: none;
    width: 52px; height: 52px; border-radius: 50%;
    font-weight: 600; font-size: 17px; letter-spacing: .02em;
    background: #dfe9f7; color: #1f4f8a;
}
.hd .hd-avatar--sm { width: 40px; height: 40px; font-size: 14px; }
.hd .hd-avatar--md { width: 44px; height: 44px; font-size: 15px; }
.hd .hd-avatar--accent { background: var(--hd-accent-strong); color: #fff; }
.hd .hd-avatar--t1 { background: #dfe9f7; color: #1f4f8a; }
.hd .hd-avatar--t2 { background: #dcf3e8; color: #17603f; }
.hd .hd-avatar--t3 { background: #fff0c9; color: #6b4e00; }
.hd .hd-avatar--t4 { background: #ffe3df; color: #8f2c22; }
.hd .hd-avatar--t5 { background: #ebe4fa; color: #4c3592; }

/* ---------- Page ---------- */

.hd .hd-main { max-width: 1440px; margin: 0 auto; padding: 44px var(--hd-gutter) 40px; }
.hd .hd-main:focus-visible { box-shadow: none; }

.hd .hd-page-meta { margin-top: 20px; padding: 0 8px; color: var(--hd-ink-3); font-size: 14px; }

/* ---------- Cards ---------- */

.hd .hd-card {
    position: relative;
    border-radius: var(--hd-radius-card);
    background: var(--hd-surface);
    padding: var(--hd-pad);
    min-width: 0;
}
.hd .hd-card--tint { background: var(--hd-surface-tint); }
.hd .hd-card__head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.hd .hd-card__title { font-size: 22px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.2; }
.hd .hd-card__title--xl { font-size: 32px; letter-spacing: -0.02em; }
.hd .hd-card__aside { margin-left: auto; color: var(--hd-ink-2); font-size: 15px; white-space: nowrap; }
.hd .hd-card__desc { color: var(--hd-ink-2); font-size: 15px; }
.hd .hd-card__desc--flush { margin-top: 12px; }

.hd .hd-tile {
    display: grid; place-items: center; flex: none;
    width: 48px; height: 48px; border-radius: var(--hd-radius-tile);
    background: var(--hd-surface); color: var(--hd-ink);
}
.hd .hd-tile--tint { background: var(--hd-page); }

/* ---------- Home grid ---------- */

.hd .hd-home {
    display: grid; gap: var(--hd-gap);
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-areas:
        "ov ov ov ov ov ov ov td td td td td"
        "ov ov ov ov ov ov ov rc rc rc rc rc"
        "hc hc hc hc pd pd pd rc rc rc rc rc"
        "bd bd bd ce ce ce lc lc lc py py py";
    align-items: start;
}
.hd .hd-home__overview { grid-area: ov; align-self: stretch; }
.hd .hd-home__today { grid-area: td; }
.hd .hd-home__recent { grid-area: rc; align-self: stretch; }
.hd .hd-home__headcount { grid-area: hc; align-self: stretch; }
.hd .hd-home__pending { grid-area: pd; align-self: stretch; }
.hd .hd-home__birthdays { grid-area: bd; align-self: stretch; }
.hd .hd-home__codes { grid-area: lc; align-self: stretch; }
.hd .hd-home__payroll { grid-area: py; align-self: stretch; }
.hd .hd-home__contracts { grid-area: ce; align-self: stretch; }
/* Bottom row has four cards: titles stay on one line and the aside drops below when it does not fit. */
.hd .hd-home__birthdays .hd-card__head, .hd .hd-home__contracts .hd-card__head,
.hd .hd-home__codes .hd-card__head, .hd .hd-home__payroll .hd-card__head { flex-wrap: wrap; row-gap: 4px; }
.hd .hd-home__birthdays .hd-card__title, .hd .hd-home__contracts .hd-card__title,
.hd .hd-home__codes .hd-card__title, .hd .hd-home__payroll .hd-card__title { white-space: nowrap; }

/* ---------- Attendance overview ---------- */

.hd .hd-overview { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; margin-top: 28px; }
.hd .hd-overview__stats { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 8px 0 4px 8px; }
.hd .hd-bigstat__value { font-size: 56px; font-weight: 500; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.hd .hd-bigstat__of { font-size: 16px; font-weight: 500; letter-spacing: 0; color: var(--hd-ink-2); margin-left: 4px; }
.hd .hd-bigstat__label { margin-top: 10px; color: var(--hd-ink-2); font-size: 15px; }
.hd .hd-muted-value { font-size: 28px; color: var(--hd-ink-3); letter-spacing: -0.01em; }

.hd .hd-chart { min-width: 0; }
.hd .hd-chart__bars { display: flex; align-items: stretch; gap: 6px; height: 260px; }
.hd .hd-chart__col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.hd .hd-chart__track { flex: 1; width: 100%; max-width: 28px; display: flex; align-items: flex-end; }
.hd .hd-chart__bar { display: block; width: 100%; border-radius: var(--hd-radius-pill); background: var(--hd-bar); min-height: 8px; }
.hd .hd-chart__bar.is-accent { background: var(--hd-accent); }
.hd .hd-chart__bar.is-today { background: linear-gradient(180deg, var(--hd-accent-light), var(--hd-accent-strong)); }
.hd .hd-chart__bar.is-stub { height: 10px; background: var(--hd-bar-stub); }
.hd .hd-chart__label { height: 18px; font-size: 13px; color: var(--hd-ink-3); font-variant-numeric: tabular-nums; }
.hd .hd-chart__label.is-today { color: var(--hd-accent-ink); font-weight: 600; }

.hd .hd-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; color: var(--hd-ink-2); font-size: 13px; }
.hd .hd-legend li { display: inline-flex; align-items: center; gap: 8px; }
.hd .hd-legend__swatch { width: 10px; height: 10px; border-radius: 50%; background: var(--hd-bar); }
.hd .hd-legend__swatch.is-accent { background: var(--hd-accent); }
.hd .hd-legend__swatch.is-stub { background: var(--hd-bar-stub); box-shadow: inset 0 0 0 1px var(--hd-line-soft); }

/* ---------- Snapshot ---------- */

.hd .hd-snapshot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 8px; }
.hd .hd-snapshot--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hd .hd-snapshot__item { display: flex; flex-direction: column-reverse; gap: 4px; padding: 4px 16px; border-left: 1px solid var(--hd-line-soft); }
.hd .hd-snapshot__item:first-child { padding-left: 0; border-left: 0; }
.hd .hd-snapshot dt { color: var(--hd-ink-2); font-size: 15px; }
.hd .hd-snapshot dd { font-size: 36px; font-weight: 500; line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.hd .hd-snapshot dd.is-danger, .hd .hd-rows strong.is-danger { color: var(--hd-danger-ink); }

.hd .hd-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.hd .hd-chip {
    display: inline-flex; align-items: center; gap: 8px;
    height: 34px; padding: 0 14px; border-radius: var(--hd-radius-pill);
    background: var(--hd-page); color: var(--hd-ink-2); font-size: 14px;
}
.hd .hd-chip strong { color: var(--hd-ink); font-weight: 600; }
.hd .hd-chip__dot { width: 8px; height: 8px; border-radius: 50%; }
.hd .hd-chip__dot--violet { background: var(--hd-violet); }
.hd .hd-chip__dot--blue { background: var(--hd-accent); }

.hd .hd-note {
    display: flex; align-items: flex-start; gap: 10px;
    margin: 0 0 16px; padding: 12px 14px; border-radius: 16px;
    background: var(--hd-accent-soft); color: #234f86; font-size: 14px;
}
.hd .hd-note .hd-icon { width: 18px; height: 18px; margin-top: 1px; }
.hd .hd-note--danger { margin: 16px 0 0; background: var(--hd-danger-soft); color: var(--hd-danger-ink); }

/* ---------- Badges ---------- */

.hd .hd-badge {
    display: inline-flex; align-items: center; height: 24px; padding: 0 10px;
    border-radius: var(--hd-radius-pill);
    font-size: 13px; font-weight: 600; line-height: 1; white-space: nowrap;
    color: var(--hd-ink);
}
.hd .hd-badge--success { background: var(--hd-success); }
.hd .hd-badge--warning { background: var(--hd-warning); }
.hd .hd-badge--danger { background: var(--hd-danger); }
.hd .hd-badge--accent { background: var(--hd-accent); }
.hd .hd-badge--neutral { background: var(--hd-page); box-shadow: inset 0 0 0 1px var(--hd-line); color: var(--hd-ink-2); }
.hd .hd-badge--dark { background: var(--hd-ink); color: #fff; }

/* ---------- People list ---------- */

.hd .hd-people { margin: 0 calc(var(--hd-pad) * -1); }
.hd .hd-person {
    display: flex; align-items: center; gap: 14px;
    padding: 14px var(--hd-pad);
    border-top: 1px solid var(--hd-line-soft);
}
.hd .hd-person:first-child { border-top: 0; }
.hd .hd-people--compact .hd-person { padding-top: 10px; padding-bottom: 10px; border-top-color: var(--hd-line); }
.hd .hd-person__main { min-width: 0; flex: 1; }
.hd .hd-person__name { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 500; min-width: 0; }
.hd .hd-person__name > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd .hd-people--compact .hd-person__name { font-size: 16px; }
.hd .hd-person__sub { margin-top: 4px; color: var(--hd-ink-2); font-size: 14px; }
.hd .hd-person__end { text-align: right; flex: none; }
.hd .hd-person__time { font-size: 20px; font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---------- Hero (headcount) ---------- */

.hd .hd-card--hero {
    color: #fff;
    background:
        radial-gradient(90% 55% at 90% 0%, rgba(140, 190, 245, .55) 0%, rgba(140, 190, 245, 0) 70%),
        linear-gradient(170deg, #3b77c4 0%, #3470bd 100%); /* white small text stays >= 4.5:1 below the title band */
}
.hd .hd-card--hero .hd-tile { background: rgba(255, 255, 255, .95); color: var(--hd-ink); }
.hd .hd-hero__value { margin-top: 28px; font-size: 64px; font-weight: 500; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.hd .hd-hero__label { margin-top: 8px; font-size: 15px; color: #fff; }
.hd .hd-hero__split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.hd .hd-hero__split > div { padding: 10px 14px; border-radius: 16px; background: rgba(255, 255, 255, .14); display: flex; flex-direction: column-reverse; }
.hd .hd-hero__split dt { font-size: 13px; color: #fff; }
.hd .hd-hero__split dd { font-size: 24px; font-weight: 500; font-variant-numeric: tabular-nums; }
.hd .hd-adoption { margin-top: 18px; }
.hd .hd-adoption__text { font-size: 14px; color: #fff; }
.hd .hd-adoption__text strong { font-weight: 600; }
.hd .hd-meter { margin-top: 10px; height: 10px; border-radius: var(--hd-radius-pill); background: rgba(255, 255, 255, .28); overflow: hidden; }
.hd .hd-meter__fill { display: block; height: 100%; border-radius: inherit; background: #fff; }

/* ---------- Pending ---------- */

.hd .hd-pending { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 20px; }
.hd .hd-pending__total { font-size: 64px; font-weight: 500; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.hd .hd-rows { margin-top: 18px; }
.hd .hd-rows li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--hd-line); color: var(--hd-ink-2); font-size: 15px; }
.hd .hd-rows strong { color: var(--hd-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.hd .hd-allclear { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; color: var(--hd-ink-2); }

.hd .hd-link {
    color: var(--hd-ink); font-weight: 600; text-decoration: none;
    padding-bottom: 6px; border-bottom: 1.5px solid var(--hd-ink);
}
.hd .hd-link:hover { color: var(--hd-accent-ink); border-color: var(--hd-accent-ink); }
.hd .hd-link--onblue, .hd .hd-link--onblue:hover { color: #fff; border-color: #fff; }
.hd .hd-link--onblue:hover { border-bottom-width: 2.5px; }

/* ---------- Payroll ---------- */

.hd .hd-payroll__period { margin-top: 4px; font-size: 34px; font-weight: 500; letter-spacing: -0.02em; }
.hd .hd-payroll__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 8px; color: var(--hd-ink-2); }

/* ---------- Empty states ---------- */

.hd .hd-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    gap: 6px; min-height: 120px; padding: 20px;
    border-radius: var(--hd-radius-inner);
    border: 1.5px dashed var(--hd-line-soft);
}
.hd .hd-card--tint .hd-empty { background: rgba(252, 252, 253, .5); }
.hd .hd-empty--chart { height: 260px; }
.hd .hd-empty__title { font-weight: 600; font-size: 16px; }
.hd .hd-empty__text { color: var(--hd-ink-2); font-size: 14px; }

/* ---------- Buttons, fields ---------- */

.hd .hd-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    height: 52px; padding: 0 28px; border: 0; border-radius: var(--hd-radius-pill);
    font-size: 17px; font-weight: 600; cursor: pointer; text-decoration: none;
    transition: background-color .15s ease, transform .1s ease;
}
.hd .hd-btn:active { transform: translateY(1px); }
.hd .hd-btn--primary {
    background: linear-gradient(180deg, #3d79c6 0%, #3672bf 100%);
    color: #fff; box-shadow: var(--hd-shadow-btn);
}
.hd .hd-btn--primary:hover { background: var(--hd-accent-strong-hover); }
.hd .hd-btn--primary:focus-visible { box-shadow: var(--hd-focus); border-radius: var(--hd-radius-pill); }
.hd .hd-btn--secondary { background: var(--hd-page); color: var(--hd-ink); }
.hd .hd-btn--block { width: 100%; }

.hd .hd-form { display: flex; flex-direction: column; gap: 18px; }
.hd .hd-field { display: flex; flex-direction: column; gap: 8px; }
.hd .hd-field__label { font-weight: 600; font-size: 15px; }
.hd .hd-input {
    height: 52px; padding: 0 16px; width: 100%;
    border: 1px solid var(--hd-line); border-radius: var(--hd-radius-field);
    background: #f5f6f8; font-size: 16px;
    transition: border-color .15s ease, background-color .15s ease;
}
.hd .hd-input:hover { border-color: var(--hd-line-soft); }
.hd .hd-input:focus-visible { border-color: var(--hd-accent-strong); background-color: #fff; box-shadow: 0 0 0 3px rgba(109, 162, 223, .35); border-radius: var(--hd-radius-field); }
.hd .hd-input.is-invalid { border-color: var(--hd-danger-ink); background-color: #fff8f7; }
.hd .hd-field__error { color: var(--hd-danger-ink); font-size: 14px; }

.hd .hd-check { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; color: var(--hd-ink-2); cursor: pointer; width: fit-content; }
.hd .hd-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--hd-accent-strong); }
.hd .hd-check input:focus-visible { box-shadow: var(--hd-focus); border-radius: 4px; }

.hd .hd-alert {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 14px 16px; margin-bottom: 20px; border-radius: 16px;
    font-size: 15px;
}
.hd .hd-alert--danger { background: var(--hd-danger-soft); color: var(--hd-danger-ink); }
.hd .hd-alert .hd-icon { width: 20px; height: 20px; }

/* ---------- Login ---------- */

.hd--login { display: flex; }
.hd .hd-login {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--hd-gap); width: 100%; max-width: 1200px; min-height: 100vh;
    margin: 0 auto; padding: var(--hd-gutter);
}
.hd .hd-login__panel {
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 28px; border-radius: var(--hd-radius-card); color: #fff;
    background:
        radial-gradient(90% 50% at 90% 0%, rgba(150, 198, 248, .6) 0%, rgba(150, 198, 248, 0) 70%),
        linear-gradient(170deg, #3b77c4 0%, #3470bd 100%);
}
.hd .hd-brand--onblue { align-self: flex-start; color: var(--hd-ink); }
.hd .hd-login__pitch { max-width: 440px; }
.hd .hd-login__pitch-title { font-size: 40px; font-weight: 500; line-height: 1.12; letter-spacing: -0.02em; }
.hd .hd-login__pitch-text { margin-top: 14px; font-size: 17px; color: #fff; }
.hd .hd-login__form-wrap {
    align-self: center; justify-self: center; width: 100%; max-width: 460px;
    padding: 40px; border-radius: var(--hd-radius-card); background: var(--hd-surface);
}
.hd .hd-login__brand-mobile { display: none; }
.hd .hd-login__title { font-size: 34px; font-weight: 500; letter-spacing: -0.02em; }
.hd .hd-login__lead { margin: 8px 0 28px; color: var(--hd-ink-2); }

/* =====================================================================
 * Phase 1 components (employees). Same tokens; still scoped under .hd.
 * ===================================================================== */

.hd select, .hd textarea { font: inherit; color: inherit; }

/* ---------- Page header ---------- */

.hd .hd-pagehead { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 16px 24px; margin-bottom: 24px; }
.hd .hd-pagehead__main { min-width: 0; flex: 1 1 320px; }
.hd .hd-pagehead__crumb { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; color: var(--hd-ink-2); font-size: 15px; text-decoration: none; }
.hd .hd-pagehead__crumb:hover { color: var(--hd-ink); }
.hd .hd-pagehead__crumb .hd-icon { width: 18px; height: 18px; }
.hd .hd-pagehead__title { font-size: 32px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; }
.hd .hd-pagehead__sub { margin-top: 6px; color: var(--hd-ink-2); font-size: 15px; }
.hd .hd-pagehead__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Buttons (additions) ---------- */

.hd .hd-btn .hd-icon { width: 20px; height: 20px; }
.hd .hd-btn--sm { height: 40px; padding: 0 18px; font-size: 15px; }
.hd .hd-btn--xs { height: 32px; padding: 0 12px; font-size: 14px; gap: 6px; }
.hd .hd-btn--xs .hd-icon { width: 16px; height: 16px; }
.hd .hd-btn--secondary:hover { background: #e4e5e9; }
.hd .hd-btn--outline { background: var(--hd-surface); color: var(--hd-ink); box-shadow: inset 0 0 0 1px var(--hd-line-soft); }
.hd .hd-btn--outline:hover { background: var(--hd-page); }
.hd .hd-btn--ghost { background: transparent; color: var(--hd-ink); }
.hd .hd-btn--ghost:hover { background: var(--hd-page); }
.hd .hd-btn--danger { background: linear-gradient(180deg, #d0473b 0%, #c53d32 100%); color: #fff; box-shadow: 0 6px 16px rgba(197, 61, 50, .28); }
.hd .hd-btn--danger:hover { background: #b4322a; }
.hd .hd-btn--danger-soft { background: var(--hd-danger-soft); color: var(--hd-danger-ink); }
.hd .hd-btn--danger-soft:hover { background: #ffd9d4; }
.hd .hd-btn:focus-visible { box-shadow: var(--hd-focus); border-radius: var(--hd-radius-pill); }
.hd .hd-btn[disabled], .hd .hd-btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; box-shadow: none; }
.hd .hd-iconbtn {
    display: inline-grid; place-items: center; flex: none;
    width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
    background: transparent; color: var(--hd-ink); cursor: pointer;
}
.hd .hd-iconbtn:hover, .hd .hd-iconbtn[aria-expanded="true"] { background: var(--hd-page); }
.hd .hd-iconbtn:focus-visible { box-shadow: var(--hd-focus); border-radius: 50%; }
.hd .hd-iconbtn .hd-icon { width: 22px; height: 22px; }

/* ---------- Flash / toast ---------- */

.hd .hd-flash {
    display: flex; align-items: flex-start; gap: 12px;
    margin-bottom: 24px; padding: 14px 14px 14px 18px; border-radius: 20px;
    background: #e3f7ee; color: #17603f; font-size: 15px;
}
.hd .hd-flash--danger { background: var(--hd-danger-soft); color: var(--hd-danger-ink); }
.hd .hd-flash--info { background: var(--hd-accent-soft); color: #234f86; }
.hd .hd-flash--warning { background: #fff4d6; color: #6b4e00; }
.hd .hd-flash .hd-icon { width: 20px; height: 20px; margin-top: 1px; }
.hd .hd-flash__body { flex: 1; min-width: 0; padding-top: 1px; }
.hd .hd-flash__body strong { font-weight: 600; }
.hd .hd-flash__close { width: 32px; height: 32px; margin: -4px -2px -4px 0; color: inherit; }
.hd .hd-flash__close:hover { background: rgba(255, 255, 255, .55); }
.hd .hd-flash[hidden] { display: none; }

/* ---------- Stat row (employees) ---------- */

.hd .hd-stats { display: grid; gap: var(--hd-gap); grid-template-columns: 5fr 4fr 3fr; margin-bottom: var(--hd-gap); }
.hd .hd-stats > .hd-card { display: flex; flex-direction: column; }
.hd .hd-stat__value { margin-top: auto; padding-top: 24px; font-size: 56px; font-weight: 500; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.hd .hd-stat__label { margin-top: 8px; color: var(--hd-ink-2); font-size: 15px; }
.hd .hd-card--hero .hd-stat__label { color: #fff; }
.hd .hd-stat__meter-text { margin-top: auto; padding-top: 20px; color: var(--hd-ink-2); font-size: 14px; }
.hd .hd-stat__meter-text strong { color: var(--hd-ink); font-weight: 600; }
.hd .hd-meter--ink { background: var(--hd-page); }
.hd .hd-meter--ink .hd-meter__fill { background: var(--hd-accent); }

/* ---------- Toolbar: search + filters ---------- */

.hd .hd-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 8px; }
.hd .hd-search { position: relative; flex: 1 1 260px; max-width: 360px; }
.hd .hd-search .hd-icon { position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--hd-ink-3); pointer-events: none; }
.hd .hd-search .hd-input { height: 44px; padding-left: 46px; border-radius: var(--hd-radius-pill); }
.hd .hd-toolbar .hd-select { height: 44px; border-radius: var(--hd-radius-pill); width: auto; min-width: 150px; }
.hd .hd-toolbar__end { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.hd .hd-toolbar__count { color: var(--hd-ink-2); font-size: 14px; }

/* ---------- Tab pills ---------- */

.hd .hd-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 3px; margin: -3px; }
.hd .hd-tabs::-webkit-scrollbar { display: none; }
.hd .hd-tab {
    display: inline-flex; align-items: center; gap: 8px; flex: none;
    height: 40px; padding: 0 16px; border: 0; border-radius: var(--hd-radius-pill);
    background: var(--hd-page); color: var(--hd-ink); font-size: 16px; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.hd .hd-tab:hover { background: #e4e5e9; }
.hd .hd-tab.is-active, .hd .hd-tab[aria-selected="true"] { background: var(--hd-accent-strong); color: #fff; }
.hd .hd-tab:focus-visible { box-shadow: var(--hd-focus); border-radius: var(--hd-radius-pill); }
.hd .hd-tab__count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--hd-radius-pill); background: rgba(30, 31, 36, .08); font-size: 13px; font-weight: 600; display: inline-grid; place-items: center; }
.hd .hd-tab.is-active .hd-tab__count, .hd .hd-tab[aria-selected="true"] .hd-tab__count { background: rgba(255, 255, 255, .22); }
.hd .hd-tabpanel { margin-top: 20px; }
.hd .hd-tabpanel[hidden] { display: none; }
.hd .hd-tabpanel:focus-visible { box-shadow: none; }

/* ---------- Data table ---------- */

.hd .hd-card--table { padding: var(--hd-pad) 0 0; overflow: visible; }
.hd .hd-card--table > .hd-card__head, .hd .hd-card--table > .hd-toolbar, .hd .hd-card--table > .hd-tabs-wrap,
.hd .hd-card--table > .hd-filters, .hd .hd-card--table > .hd-card__desc, .hd .hd-card--table > .hd-cardpad { padding: 0 var(--hd-pad); }
.hd .hd-table-wrap { width: 100%; overflow-x: auto; }
.hd .hd-table-wrap--bleed { width: auto; margin: 0 calc(var(--hd-pad) * -1); }
.hd .hd-errorsum:focus-visible { box-shadow: 0 0 0 2px var(--hd-danger-ink); border-radius: 16px; }
.hd .hd-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.hd .hd-table th {
    padding: 16px 16px; text-align: left; font-weight: 400; color: var(--hd-ink-2); white-space: nowrap;
    border-bottom: 1px solid var(--hd-line);
}
.hd .hd-table th:first-child, .hd .hd-table td:first-child { padding-left: var(--hd-pad); }
.hd .hd-table th:last-child, .hd .hd-table td:last-child { padding-right: var(--hd-pad); }
.hd .hd-table td { padding: 16px; border-top: 1px solid var(--hd-line); vertical-align: middle; }
.hd .hd-table tbody tr:first-child td { border-top: 0; }
.hd .hd-table tbody tr:hover td { background: #f7f8fa; }
.hd .hd-table__num { text-align: right; font-variant-numeric: tabular-nums; }
.hd .hd-table__actions { width: 56px; text-align: right; }
.hd .hd-table__sub { display: block; margin-top: 3px; color: var(--hd-ink-2); font-size: 14px; }
.hd .hd-table__strong { font-weight: 500; font-size: 16px; }
.hd .hd-table__muted { color: var(--hd-ink-3); }
.hd .hd-sort { display: inline-flex; align-items: center; gap: 4px; color: inherit; text-decoration: none; }
.hd .hd-sort:hover { color: var(--hd-ink); }
.hd .hd-sort .hd-icon { width: 14px; height: 14px; opacity: .45; }
.hd .hd-sort.is-sorted { color: var(--hd-ink); font-weight: 500; }
.hd .hd-sort.is-sorted .hd-icon { opacity: 1; }

.hd .hd-who { display: flex; align-items: center; gap: 14px; min-width: 220px; }
.hd .hd-who__main { min-width: 0; }
.hd .hd-who__name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 17px; font-weight: 500; }
.hd .hd-who__name a { text-decoration: none; }
.hd .hd-who__name a:hover { text-decoration: underline; text-underline-offset: 3px; }
.hd .hd-who__code { margin-top: 3px; color: var(--hd-ink-2); font-size: 14px; font-variant-numeric: tabular-nums; }

.hd .hd-signin { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.hd .hd-signin__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hd-line-soft); flex: none; }
.hd .hd-signin__dot.is-on { background: #1f9d68; }
.hd .hd-signin__dot.is-warn { background: #e0a400; }

/* Row menu */
.hd .hd-rowmenu { position: relative; display: inline-block; }
.hd .hd-menu--row { width: 230px; top: calc(100% + 6px); padding: 8px; border-radius: 20px; text-align: left; }
.hd .hd-menu--up { top: auto; bottom: calc(100% + 6px); }
.hd .hd-menu__item { color: var(--hd-ink); text-decoration: none; }
.hd .hd-menu__item.hd-menu__item--danger { color: var(--hd-danger-ink); }
.hd .hd-menu__item:focus-visible { box-shadow: inset 0 0 0 2px var(--hd-accent-strong); border-radius: 14px; background: var(--hd-page); }
.hd .hd-menu__item .hd-icon { width: 20px; height: 20px; }
.hd .hd-menu__sep { height: 1px; margin: 6px 4px; background: var(--hd-line); }

/* Pagination */
.hd .hd-pager { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; padding: 16px var(--hd-pad); border-top: 1px solid var(--hd-line); }
.hd .hd-pager__size { display: inline-flex; align-items: center; gap: 8px; color: var(--hd-ink-2); font-size: 14px; }
.hd .hd-pager__size .hd-select { height: 40px; width: auto; min-width: 84px; border-radius: var(--hd-radius-pill); }
.hd .hd-pager__info { color: var(--hd-ink-2); font-size: 14px; font-variant-numeric: tabular-nums; }
.hd .hd-pager__pages { display: flex; align-items: center; gap: 4px; margin: 0 auto; }
.hd .hd-pager__page {
    display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px;
    border-radius: var(--hd-radius-pill); color: var(--hd-ink); text-decoration: none; font-variant-numeric: tabular-nums;
}
.hd a.hd-pager__page:hover { background: var(--hd-page); }
.hd .hd-pager__page[aria-current="page"] { background: var(--hd-page); font-weight: 600; box-shadow: inset 0 0 0 1px var(--hd-line); }
.hd .hd-pager__gap { color: var(--hd-ink-3); padding: 0 4px; }
.hd .hd-pager__nav { display: flex; gap: 8px; }
.hd .hd-pager__step { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: var(--hd-radius-pill); background: var(--hd-page); color: var(--hd-ink); text-decoration: none; font-size: 15px; }
.hd a.hd-pager__step:hover { background: #e4e5e9; }
.hd .hd-pager__step .hd-icon { width: 16px; height: 16px; }
.hd span.hd-pager__step { color: var(--hd-ink-3); background: #f4f5f7; }

/* ---------- Form fields (additions) ---------- */

.hd .hd-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 32px; }
.hd .hd-form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hd .hd-field--full { grid-column: 1 / -1; }
.hd .hd-field__req { color: var(--hd-danger-ink); margin-left: 2px; }
.hd .hd-field__opt { color: var(--hd-ink-3); font-weight: 400; font-size: 14px; margin-left: 4px; }
.hd .hd-field__hint { color: var(--hd-ink-3); font-size: 14px; }
.hd .hd-input { background-color: #f9f9fb; }
.hd .hd-input::placeholder { color: #6f717a; }
.hd .hd-input[readonly] { color: var(--hd-ink-2); background: var(--hd-page); }
.hd .hd-input[disabled] { color: var(--hd-ink-3); background: var(--hd-page); cursor: not-allowed; }
.hd .hd-select {
    appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e1f24' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 16px center; background-size: 18px;
}
.hd .hd-textarea { height: auto; min-height: 104px; padding: 14px 16px; line-height: 1.5; resize: vertical; }
.hd input[type="date"].hd-input { padding-right: 12px; }
.hd .hd-check--block { display: flex; align-items: flex-start; width: auto; padding: 16px; border-radius: 16px; background: var(--hd-page); color: var(--hd-ink); }
.hd .hd-check--block input { margin-top: 1px; }
.hd .hd-check__text strong { display: block; font-weight: 600; }
.hd .hd-check__text span { display: block; margin-top: 2px; color: var(--hd-ink-2); font-size: 14px; }

.hd .hd-formcard { padding: 32px; }
.hd .hd-section + .hd-section { margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--hd-line); }
.hd .hd-section__head { margin-bottom: 20px; }
.hd .hd-section__title { font-size: 20px; font-weight: 500; letter-spacing: -0.01em; }
.hd .hd-section__desc { margin-top: 4px; color: var(--hd-ink-2); font-size: 14px; }
.hd .hd-formactions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hd .hd-formactions__end { display: flex; gap: 12px; flex-wrap: wrap; margin-left: auto; }
.hd .hd-errorsum { margin-bottom: 24px; }
.hd .hd-errorsum ul { margin-top: 6px; padding-left: 18px; list-style: disc; }
.hd .hd-errorsum a { text-decoration: underline; }

/* ---------- Profile ---------- */

.hd .hd-banner {
    border-radius: var(--hd-radius-card); background: #0b335c; color: #fff; padding: 8px;
}
.hd .hd-banner__top { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 18px; padding: 16px 16px 20px; }
.hd .hd-banner__top .hd-avatar { width: 72px; height: 72px; font-size: 24px; }
.hd .hd-banner__who { flex: 1 1 260px; min-width: 0; }
.hd .hd-banner__name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 26px; font-weight: 500; letter-spacing: -0.01em; }
.hd .hd-banner__meta { margin-top: 6px; color: #d3dceb; font-size: 15px; }
.hd .hd-banner__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hd .hd-banner__actions .hd-btn--secondary { background: rgba(255, 255, 255, .12); color: #fff; }
.hd .hd-banner__actions .hd-btn--secondary:hover { background: rgba(255, 255, 255, .2); }
.hd .hd-banner__actions .hd-iconbtn { color: #fff; }
.hd .hd-banner__actions .hd-iconbtn:hover, .hd .hd-banner__actions .hd-iconbtn[aria-expanded="true"] { background: rgba(255, 255, 255, .14); }
.hd .hd-banner__sheet { border-radius: var(--hd-radius-inner); background: var(--hd-surface); color: var(--hd-ink); padding: 20px 24px; }

.hd .hd-info { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 24px; }
.hd .hd-info--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hd .hd-info--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hd .hd-info__item { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 4px; min-width: 0; }
.hd .hd-info dt { color: var(--hd-ink-2); font-size: 14px; }
.hd .hd-info dd { font-size: 17px; font-weight: 500; overflow-wrap: anywhere; }
.hd .hd-info dd.is-empty { color: var(--hd-ink-3); font-weight: 400; }
.hd .hd-info__full { grid-column: 1 / -1; }

.hd .hd-secret { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.hd .hd-secret__value { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.hd .hd-secret__value.is-masked { color: var(--hd-ink-2); letter-spacing: .08em; }
.hd .hd-secret__btn { height: 28px; padding: 0 12px; border: 0; border-radius: var(--hd-radius-pill); background: var(--hd-accent-soft); color: #234f86; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.hd .hd-secret__btn:hover { background: #d4e4f8; }
.hd .hd-secret__btn:focus-visible { box-shadow: var(--hd-focus); border-radius: var(--hd-radius-pill); }
.hd .hd-secret__btn .hd-icon { width: 15px; height: 15px; }
.hd .hd-secret__err { flex-basis: 100%; color: var(--hd-danger-ink); font-size: 13px; font-weight: 400; }

.hd .hd-profile-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--hd-gap); margin-top: var(--hd-gap); }
.hd .hd-subcard { border-radius: var(--hd-radius-inner); background: var(--hd-page); padding: 20px; }
.hd .hd-subcard + .hd-subcard { margin-top: 16px; }
.hd .hd-subcard__title { font-size: 17px; font-weight: 600; margin-bottom: 14px; }

/* Timeline (position history, activity) */
.hd .hd-timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.hd .hd-timeline__item { position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 4px 14px; padding: 14px 0; border-top: 1px solid var(--hd-line); }
.hd .hd-timeline__item:first-child { border-top: 0; }
.hd .hd-timeline__dot { width: 10px; height: 10px; margin: 6px 0 0 5px; border-radius: 50%; background: var(--hd-accent); }
.hd .hd-timeline__dot.is-danger { background: var(--hd-danger); }
.hd .hd-timeline__dot.is-success { background: var(--hd-success); }
.hd .hd-timeline__dot.is-muted { background: var(--hd-line-soft); }
.hd .hd-timeline__title { font-weight: 500; }
.hd .hd-timeline__meta { color: var(--hd-ink-2); font-size: 14px; }
.hd .hd-timeline__when { color: var(--hd-ink-2); font-size: 14px; white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.hd .hd-timeline__fields { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.hd .hd-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: var(--hd-radius-pill); background: var(--hd-page); color: var(--hd-ink-2); font-size: 13px; }
.hd .hd-subcard .hd-tag { background: var(--hd-surface); }

.hd .hd-devices { display: grid; gap: 12px; }
.hd .hd-device { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; background: var(--hd-page); }
.hd .hd-device__main { flex: 1; min-width: 0; }
.hd .hd-device__name { font-weight: 500; }
.hd .hd-device__meta { color: var(--hd-ink-2); font-size: 14px; }

/* ---------- Empty state (page) ---------- */

.hd .hd-empty--page { min-height: 260px; gap: 10px; margin: 8px var(--hd-pad) var(--hd-pad); }
.hd .hd-empty__icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 4px; border-radius: 50%; background: var(--hd-page); color: var(--hd-ink-2); }
.hd .hd-empty__actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

/* ---------- Dialog (native <dialog>) ---------- */

.hd .hd-dialog {
    width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto;
    padding: 32px; border: 0; border-radius: var(--hd-radius-card);
    background: var(--hd-surface); color: var(--hd-ink); box-shadow: var(--hd-shadow-pop);
}
.hd .hd-dialog::backdrop { background: rgba(30, 31, 36, .42); }
.hd .hd-dialog[open] { animation: hd-pop .16s ease-out; }
@keyframes hd-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.hd .hd-dialog__close { position: absolute; top: 16px; right: 16px; }
.hd .hd-dialog__icon { display: grid; place-items: center; width: 104px; height: 104px; margin: 8px auto 24px; border-radius: 50%; color: #fff; }
.hd .hd-dialog__icon .hd-icon { width: 44px; height: 44px; stroke-width: 1.8; }
.hd .hd-dialog__icon--danger { background: radial-gradient(circle at 50% 30%, #ff8b80 0%, #f4695c 100%); box-shadow: 0 12px 28px rgba(244, 105, 92, .35); }
.hd .hd-dialog__icon--accent { background: radial-gradient(circle at 50% 30%, #86b6ec 0%, #5b93d6 100%); box-shadow: 0 12px 28px rgba(91, 147, 214, .35); }
.hd .hd-dialog__icon--success { background: radial-gradient(circle at 50% 30%, #5fdcaa 0%, #2fbf83 100%); box-shadow: 0 12px 28px rgba(47, 191, 131, .3); }
.hd .hd-dialog__title { text-align: center; font-size: 22px; font-weight: 500; letter-spacing: -0.01em; }
.hd .hd-dialog__text { margin-top: 6px; text-align: center; color: var(--hd-ink-2); font-size: 15px; }
.hd .hd-dialog__body { margin-top: 24px; display: grid; gap: 18px; text-align: left; }
.hd .hd-dialog__actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }
.hd .hd-dialog--left .hd-dialog__title, .hd .hd-dialog--left .hd-dialog__text { text-align: left; }

/* ---------- Success state ---------- */

.hd .hd-success { max-width: 620px; margin: 24px auto 0; padding: 40px 32px 32px; text-align: center; }
.hd .hd-success .hd-dialog__icon { margin-top: 0; }
.hd .hd-success__title { font-size: 26px; font-weight: 500; letter-spacing: -0.01em; }
.hd .hd-success__text { margin-top: 8px; color: var(--hd-ink-2); }
.hd .hd-success__facts { margin: 24px 0 0; padding: 16px 20px; border-radius: var(--hd-radius-inner); background: var(--hd-page); text-align: left; }
.hd .hd-success__actions { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

/* ---------- Dropzone + file rows ---------- */

.hd .hd-drop {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    min-height: 260px; padding: 32px 20px; text-align: center; cursor: pointer;
    border: 1.5px dashed var(--hd-line-soft); border-radius: var(--hd-radius-inner); background: #f9f9fb;
    transition: border-color .15s ease, background-color .15s ease;
}
.hd .hd-drop:hover, .hd .hd-drop.is-dragover { border-color: var(--hd-accent-strong); background: var(--hd-accent-soft); }
.hd .hd-drop:focus-within { border-color: var(--hd-accent-strong); box-shadow: 0 0 0 3px rgba(109, 162, 223, .35); }
.hd .hd-drop.is-invalid { border-color: var(--hd-danger-ink); background: #fff8f7; }
.hd .hd-drop input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.hd .hd-drop__icon { width: 34px; height: 34px; margin-bottom: 8px; }
.hd .hd-drop__title { font-weight: 600; font-size: 17px; }
.hd .hd-drop__hint { color: var(--hd-ink-2); font-size: 14px; }
.hd .hd-files { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 16px; }
.hd [data-hd-drop], .hd .hd-field { min-width: 0; }
.hd .hd-files[hidden] { display: none; }
.hd .hd-file { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--hd-line); border-radius: 20px; background: var(--hd-surface); }
.hd .hd-file__tile { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--hd-radius-tile); background: #e6f6ee; color: #17603f; font-size: 11px; font-weight: 700; letter-spacing: .04em; flex: none; }
.hd .hd-file__main { flex: 1; min-width: 0; }
.hd .hd-file__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd .hd-file__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 2px; color: var(--hd-ink-2); font-size: 14px; }
.hd .hd-file__ok { display: inline-flex; align-items: center; gap: 6px; color: #17603f; }
.hd .hd-file__ok .hd-icon { width: 16px; height: 16px; }
.hd .hd-dotsep { width: 4px; height: 4px; border-radius: 50%; background: var(--hd-line-soft); }

/* ---------- Import preview / diff ---------- */

.hd .hd-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 4px 0 24px; }
.hd .hd-summary__item { padding: 16px 18px; border-radius: 20px; background: var(--hd-page); display: flex; flex-direction: column-reverse; gap: 2px; }
.hd .hd-summary dt { color: var(--hd-ink-2); font-size: 14px; }
.hd .hd-summary dd { font-size: 30px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

.hd .hd-diffcard { border: 1px solid var(--hd-line); border-radius: var(--hd-radius-inner); background: var(--hd-surface); overflow: hidden; }
.hd .hd-diffcard + .hd-diffcard { margin-top: 12px; }
.hd .hd-diffcard__head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding: 14px 18px; }
.hd .hd-diffcard__who { flex: 1 1 220px; min-width: 0; }
.hd .hd-diffcard__name { font-weight: 600; font-size: 16px; }
.hd .hd-diffcard__meta { color: var(--hd-ink-2); font-size: 14px; }
.hd .hd-diff { width: 100%; border-collapse: collapse; font-size: 15px; table-layout: fixed; }
.hd .hd-diff th { padding: 10px 18px; text-align: left; font-weight: 400; font-size: 13px; color: var(--hd-ink-2); background: #f7f8fa; border-top: 1px solid var(--hd-line); }
.hd .hd-diff td { padding: 10px 18px; border-top: 1px solid var(--hd-line); vertical-align: top; overflow-wrap: anywhere; }
.hd .hd-diff__field { width: 26%; color: var(--hd-ink-2); }
.hd .hd-diff__old { width: 34%; color: var(--hd-ink-3); }
.hd .hd-diff__old del { text-decoration-color: rgba(100, 101, 106, .6); }
.hd .hd-diff__arrow { width: 40px; color: var(--hd-ink-3); text-align: center; }
.hd .hd-diff th:nth-child(3) { width: 40px; }
.hd .hd-diff thead th:first-child { width: 26%; }
.hd .hd-diff thead th:nth-child(2) { width: 34%; }
.hd .hd-diff__new ins { text-decoration: none; padding: 1px 6px; border-radius: 6px; background: #dcf3e8; color: #114d32; font-weight: 500; }
.hd .hd-diff__none { color: var(--hd-ink-3); font-style: italic; }
.hd .hd-diffcard--nomatch { background: #fffaf0; border-color: #f3e2b5; }
.hd .hd-import:not(:has(#f-update_naming:checked)) .hd-diff tr.is-naming > * { opacity: .5; }
.hd .hd-import:not(:has(#f-update_naming:checked)) .hd-diff tr.is-naming ins { background: var(--hd-page); color: var(--hd-ink-2); }
.hd .hd-diff__skipped { padding: 10px 18px 14px; border-top: 1px solid var(--hd-line); color: var(--hd-ink-2); font-size: 14px; }
.hd .hd-diff__skipped-title { font-weight: 600; color: var(--hd-ink); margin-bottom: 4px; }
.hd .hd-diff__skipped ul { display: grid; gap: 2px; }
.hd .hd-diff__skipped strong { color: var(--hd-ink); font-weight: 500; }
.hd .hd-details > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; padding: 12px 0; font-weight: 600; }
.hd .hd-details > summary::-webkit-details-marker { display: none; }
.hd .hd-details > summary .hd-icon { width: 18px; height: 18px; transition: transform .15s ease; }
.hd .hd-details[open] > summary .hd-icon { transform: rotate(90deg); }
.hd .hd-details > summary:focus-visible { box-shadow: var(--hd-focus); border-radius: 8px; }




/* ---------- Phase 2 shared components ---------- */

/* Two-column page body: main column + 400px aside (detail panels, side forms). */
.hd .hd-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: var(--hd-gap); align-items: start; }
.hd .hd-split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hd .hd-stack { display: grid; gap: var(--hd-gap); min-width: 0; }
.hd .hd-stack > * { min-width: 0; }

/* Toggle switch: a real button (role=switch) inside its own form or a dialog opener. */
.hd .hd-switchrow { display: flex; align-items: center; gap: 16px; padding: 16px 0; }
.hd .hd-switchrow + .hd-switchrow { border-top: 1px solid var(--hd-line); }
.hd .hd-switchrow__text { flex: 1; min-width: 0; }
.hd .hd-switchrow__title { font-weight: 600; font-size: 16px; }
.hd .hd-switchrow__desc { color: var(--hd-ink-2); font-size: 14px; }
.hd .hd-switch {
    position: relative; flex: none; width: 52px; height: 30px; padding: 0; border: 0;
    border-radius: var(--hd-radius-pill); background: #8a8c95; cursor: pointer;
    transition: background-color .15s ease;
}
.hd .hd-switch::after {
    content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 3px rgba(30, 31, 36, .25); transition: transform .15s ease;
}
.hd .hd-switch[aria-checked="true"] { background: var(--hd-accent-strong); }
.hd .hd-switch[aria-checked="true"]::after { transform: translateX(22px); }
.hd .hd-switch:disabled, .hd .hd-switch[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.hd .hd-switch:focus-visible { box-shadow: var(--hd-focus); border-radius: var(--hd-radius-pill); }
.hd .hd-switch__state { font-size: 14px; font-weight: 600; min-width: 28px; }

/* Label / value rows (detail panels). */
.hd .hd-kv { display: grid; grid-template-columns: minmax(120px, 38%) minmax(0, 1fr); gap: 0; }
.hd .hd-kv > dt, .hd .hd-kv > dd { padding: 11px 0; border-top: 1px solid var(--hd-line); }
.hd .hd-kv > dt:first-of-type, .hd .hd-kv > dt:first-of-type + dd { border-top: 0; }
.hd .hd-kv > dt { color: var(--hd-ink-2); font-size: 14px; padding-right: 16px; }
.hd .hd-kv > dd { font-weight: 500; overflow-wrap: anywhere; }
.hd .hd-kv > dd.is-empty { color: var(--hd-ink-3); font-weight: 400; }
.hd .hd-prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Payslip ledger (PaySlip.png): tinted rounded box, description / earnings / deductions. */
.hd .hd-ledger-wrap { border-radius: var(--hd-radius-inner); background: var(--hd-page); overflow: hidden; }
.hd .hd-ledger { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.hd .hd-ledger th, .hd .hd-ledger td { padding: 12px 20px; text-align: left; border-top: 1px solid var(--hd-line); }
.hd .hd-ledger thead th { border-top: 0; color: var(--hd-ink-2); font-weight: 500; font-size: 14px; }
.hd .hd-ledger tbody th { font-weight: 400; }
.hd .hd-ledger .hd-ledger__num { text-align: right; white-space: nowrap; }
.hd .hd-ledger tfoot th, .hd .hd-ledger tfoot td { font-weight: 600; background: #e6e7eb; }
.hd .hd-ledger__sub { display: block; color: var(--hd-ink-3); font-size: 13px; }

/* Conversation thread (Chat Started.png). */
.hd .hd-thread { display: flex; flex-direction: column; gap: 14px; }
.hd .hd-msg { display: flex; gap: 12px; max-width: 760px; }
.hd .hd-msg__body { min-width: 0; padding: 12px 16px; border-radius: 20px 20px 20px 6px; background: var(--hd-page); }
.hd .hd-msg__who { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 4px; font-weight: 600; font-size: 14px; }
.hd .hd-msg__when { color: var(--hd-ink-3); font-weight: 400; font-size: 13px; }
.hd .hd-msg__text { white-space: pre-wrap; overflow-wrap: anywhere; }
.hd .hd-msg__meta { margin-top: 8px; color: var(--hd-ink-2); font-size: 13px; }
.hd .hd-msg__meta ul { margin-top: 4px; padding-left: 18px; list-style: disc; }
.hd .hd-msg--mine { margin-left: auto; flex-direction: row-reverse; }
.hd .hd-msg--mine .hd-msg__body { border-radius: 20px 20px 6px 20px; background: var(--hd-accent-soft); }
.hd .hd-msg--hr .hd-msg__body { background: #e4f6ec; }

/* Collapsible card section built on <details>. */
.hd .hd-fold { border-radius: var(--hd-radius-inner); background: var(--hd-page); }
.hd .hd-fold + .hd-fold { margin-top: 12px; }
.hd .hd-fold > summary {
    display: flex; align-items: center; gap: 10px; padding: 14px 18px;
    list-style: none; cursor: pointer; font-weight: 600; border-radius: var(--hd-radius-inner);
}
.hd .hd-fold > summary::-webkit-details-marker { display: none; }
.hd .hd-fold > summary .hd-fold__chev { width: 18px; height: 18px; margin-left: auto; transition: transform .15s ease; }
.hd .hd-fold[open] > summary .hd-fold__chev { transform: rotate(180deg); }
.hd .hd-fold > summary:focus-visible { box-shadow: var(--hd-focus); }
.hd .hd-fold__body { padding: 0 18px 18px; }
.hd .hd-fold--white { background: var(--hd-surface); border: 1px solid var(--hd-line); }

/* Back link above a detail page title. */
.hd .hd-back { display: inline-flex; align-items: center; gap: 6px; color: var(--hd-ink-2); text-decoration: none; font-size: 15px; margin-bottom: 8px; }
.hd .hd-back:hover { color: var(--hd-ink); text-decoration: underline; }
.hd .hd-back .hd-icon { width: 18px; height: 18px; }

/* Inline filter form above a table: labelled fields in a row. */
.hd .hd-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin-top: 16px; }
.hd .hd-filters .hd-field { flex: 1 1 160px; min-width: 0; max-width: 260px; }
.hd .hd-filters .hd-filters__actions { display: flex; gap: 8px; }

/* Row buttons (approve / reject / details) in the last table column. */
.hd .hd-rowactions { display: inline-flex; flex-wrap: nowrap; justify-content: flex-end; gap: 6px; }
.hd .hd-table td.hd-table__actions:has(.hd-rowactions) { width: 1%; white-space: nowrap; }

/* Row states: a warning row (soft danger) and a row opened from a link (soft accent). */
.hd .hd-table tbody tr.is-warning td { background: #fff3f1; }
.hd .hd-table tbody tr.is-highlight td { background: var(--hd-accent-soft); }
.hd .hd-table tbody tr.is-highlight td:first-child { box-shadow: inset 4px 0 0 var(--hd-accent-strong); }

/* Fieldsets, numbered steps, counters, diagnostics, checklists. */
.hd .hd-fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.hd .hd-fieldset > legend { padding: 0; margin-bottom: 4px; }
.hd .hd-steps { margin: 0; padding: 0; list-style: none; counter-reset: hd-step; display: grid; gap: 14px; }
.hd .hd-steps > li { position: relative; padding-left: 40px; counter-increment: hd-step; color: var(--hd-ink-2); }
.hd .hd-steps > li strong { color: var(--hd-ink); }
.hd .hd-steps > li::before {
    content: counter(hd-step); position: absolute; left: 0; top: -2px; display: grid; place-items: center;
    width: 28px; height: 28px; border-radius: 50%; background: var(--hd-surface); color: var(--hd-ink); font-weight: 600; font-size: 14px;
}
.hd .hd-counters { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 14px; }
.hd .hd-counters > div { padding: 10px 12px; border-radius: 14px; background: var(--hd-surface); }
.hd .hd-counters dt { color: var(--hd-ink-2); font-size: 13px; }
.hd .hd-counters dd { font-size: 20px; font-weight: 500; font-variant-numeric: tabular-nums; }
.hd .hd-diaglist { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.hd .hd-diaglist > li { padding: 8px 10px; border-radius: 10px; background: var(--hd-page); }
.hd .hd-checklist { display: grid; gap: 8px; }
.hd .hd-codebox { margin: 0; padding: 14px 16px; border-radius: 14px; background: var(--hd-page); max-height: 420px; overflow: auto; }
.hd .hd-mono--cap { display: inline-block; max-width: 150px; }
.hd .hd-card--table > .hd-card__body { padding: 0 var(--hd-pad) var(--hd-pad); }

/* Monospace bits (update ids, git shas). */
.hd .hd-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; overflow-wrap: anywhere; }

/* KPI / generic item card inside a card. */
.hd .hd-item { padding: 20px; border-radius: var(--hd-radius-inner); background: var(--hd-page); }
.hd .hd-item + .hd-item { margin-top: 12px; }
.hd .hd-item__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.hd .hd-item__title { font-size: 17px; font-weight: 600; margin-right: auto; overflow-wrap: anywhere; }
.hd .hd-item__meta { color: var(--hd-ink-2); font-size: 14px; margin-top: 6px; }
.hd .hd-item__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.hd .hd-item .hd-fold { background: var(--hd-surface); }

/* Attachment list rows. */
.hd .hd-attach { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--hd-page); text-decoration: none; color: var(--hd-ink); }
.hd .hd-attach + .hd-attach { margin-top: 8px; }
.hd .hd-attach:hover .hd-attach__name { text-decoration: underline; }
.hd .hd-attach__tile { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--hd-surface); }
.hd .hd-attach__name { font-weight: 500; overflow-wrap: anywhere; }
.hd .hd-attach .hd-attach__end { margin-left: auto; width: 20px; height: 20px; color: var(--hd-ink-2); }
.hd .hd-attach__meta { color: var(--hd-ink-3); font-size: 13px; }

/* ---------- Phase 3 components: employee files, checklists, template editor ---------- */

/* File rows (Document.png): grey rounded rows on a white card, type tile, name + meta, actions. */
.hd .hd-flist { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.hd .hd-frow { border-radius: var(--hd-radius-inner); background: var(--hd-page); }
.hd .hd-frow__main { display: flex; align-items: center; gap: 16px; padding: 14px 16px; min-width: 0; }
.hd .hd-ftile {
    position: relative; display: grid; place-items: center; flex: none; width: 52px; height: 52px;
    border-radius: var(--hd-radius-tile); background: var(--hd-surface); color: var(--hd-ink-2);
}
.hd .hd-ftile .hd-icon { width: 24px; height: 24px; margin: 10px 0 0 10px; }
.hd .hd-ftile__ext {
    position: absolute; left: 6px; top: 8px; padding: 1px 4px; border-radius: 4px;
    background: #c53d32; color: #fff; font-size: 9px; font-weight: 700; letter-spacing: .03em; line-height: 1.3;
}
.hd .hd-ftile--img .hd-ftile__ext { background: #2a7a52; }
.hd .hd-ftile--doc .hd-ftile__ext { background: #3b77c4; }
.hd .hd-frow__text { flex: 1; min-width: 0; }
.hd .hd-frow__title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-weight: 600; font-size: 16px; }
.hd .hd-frow__title > span:first-child { overflow-wrap: anywhere; }
.hd .hd-frow__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 4px; color: var(--hd-ink-2); font-size: 14px; }
.hd .hd-frow__meta .hd-dotsep { margin: 0; }
.hd .hd-frow__orig { color: var(--hd-ink-3); font-size: 13px; overflow-wrap: anywhere; }
.hd .hd-frow__actions { display: flex; align-items: center; gap: 8px; flex: none; }
.hd .hd-frow__vis { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--hd-ink-2); }
.hd .hd-frow.is-archived { background: transparent; border: 1px dashed var(--hd-line-soft); }
.hd .hd-frow.is-archived .hd-frow__title { color: var(--hd-ink-2); }
.hd .hd-iconbtn--fill { background: var(--hd-surface); }
.hd .hd-iconbtn--fill:hover { background: #e4e5e9; }

/* Version history inside a file row. */
.hd .hd-versions { margin: 0 16px; border-top: 1px solid var(--hd-line-soft); }
.hd .hd-versions > summary {
    display: inline-flex; align-items: center; gap: 6px; padding: 10px 0; cursor: pointer; list-style: none;
    color: var(--hd-ink-2); font-size: 14px; font-weight: 500;
}
.hd .hd-versions > summary::-webkit-details-marker { display: none; }
.hd .hd-versions > summary .hd-icon { width: 16px; height: 16px; transition: transform .15s ease; }
.hd .hd-versions[open] > summary .hd-icon:last-child { transform: rotate(180deg); }
.hd .hd-versions > summary:focus-visible { box-shadow: var(--hd-focus); border-radius: 8px; }
.hd .hd-versions ol { margin: 0 0 14px; padding: 0; list-style: none; display: grid; gap: 6px; }
.hd .hd-versions li {
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 8px 12px;
    border-radius: 12px; background: var(--hd-surface); font-size: 14px;
}
.hd .hd-versions__v { font-weight: 600; min-width: 28px; }
.hd .hd-versions__meta { flex: 1; min-width: 0; color: var(--hd-ink-2); overflow-wrap: anywhere; }

/* Section heading inside a card (Archived, Missing). */
.hd .hd-subhead { display: flex; align-items: center; gap: 10px; margin: 28px 0 12px; font-size: 17px; font-weight: 600; }
.hd .hd-subhead .hd-tab__count { background: var(--hd-page); }

/* Progress bar with a text label (checklists). */
.hd .hd-progress { display: grid; gap: 6px; min-width: 0; }
.hd .hd-progress__label { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--hd-ink-2); }
.hd .hd-progress__label strong { color: var(--hd-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.hd .hd-progress__track { height: 8px; border-radius: var(--hd-radius-pill); background: var(--hd-page); overflow: hidden; }
.hd .hd-item .hd-progress__track, .hd .hd-card--tint .hd-progress__track { background: var(--hd-surface); }
.hd .hd-progress__fill { display: block; height: 100%; border-radius: inherit; background: var(--hd-accent-strong); }
.hd .hd-progress.is-done .hd-progress__fill { background: #2a9d6b; }
.hd .hd-table .hd-progress { min-width: 140px; max-width: 220px; }

/* Checklist as a vertical stepper (Recruitment Process.png): green check done, dashed open. */
.hd .hd-cl { margin: 0; padding: 0; list-style: none; }
.hd .hd-cl__item { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 4px 16px; padding: 0 0 22px; }
.hd .hd-cl__item:last-child { padding-bottom: 0; }
.hd .hd-cl__item::before {
    content: ""; position: absolute; left: 21px; top: 46px; bottom: 2px; width: 2px; border-radius: 2px; background: var(--hd-line);
}
.hd .hd-cl__item:last-child::before { display: none; }
.hd .hd-cl__item.is-done::before { background: #2a9d6b; }
.hd .hd-cl__tick {
    display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%;
    border: 2px dashed #8a8c95; background: var(--hd-surface); color: var(--hd-ink-3); cursor: pointer;
}
.hd .hd-cl__tick .hd-icon { width: 20px; height: 20px; opacity: 0; }
.hd .hd-cl__tick:hover { border-color: var(--hd-accent-strong); color: var(--hd-accent-strong); }
.hd .hd-cl__tick:hover .hd-icon { opacity: .6; }
.hd .hd-cl__tick[aria-pressed="true"] { border: 0; background: #2a9d6b; color: #fff; }
.hd .hd-cl__tick[aria-pressed="true"] .hd-icon { opacity: 1; }
.hd .hd-cl__tick:focus-visible { box-shadow: var(--hd-focus); border-radius: 50%; }
.hd .hd-cl__tick:disabled { cursor: default; }
.hd .hd-cl__tick:disabled:hover { border-color: #8a8c95; color: var(--hd-ink-3); }
.hd .hd-cl__tick:disabled:hover .hd-icon { opacity: 0; }
.hd .hd-cl__tick[aria-pressed="true"]:disabled:hover { color: #fff; }
.hd .hd-cl__tick[aria-pressed="true"]:disabled:hover .hd-icon { opacity: 1; }
.hd .hd-cl__body { min-width: 0; padding-top: 2px; }
.hd .hd-cl__label { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 17px; font-weight: 500; }
.hd .hd-cl__help { margin-top: 2px; color: var(--hd-ink-2); font-size: 14px; }
.hd .hd-cl__meta { margin-top: 4px; color: var(--hd-ink-3); font-size: 13px; }
.hd .hd-cl__note { margin-top: 8px; padding: 8px 12px; border-radius: 12px; background: var(--hd-page); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.hd .hd-cl__side { display: flex; align-items: flex-start; gap: 6px; padding-top: 4px; }
.hd .hd-verify {
    display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: var(--hd-radius-pill);
    font-size: 12px; font-weight: 600; background: var(--hd-page); color: var(--hd-ink-2); white-space: nowrap;
}
.hd .hd-verify .hd-icon { width: 14px; height: 14px; }
.hd .hd-verify.is-ok { background: #e4f6ec; color: #17603f; }
.hd .hd-verify.is-no { background: #fff1ef; color: var(--hd-danger-ink); }
.hd .hd-cl__blocking { color: var(--hd-danger-ink); }

/* Checklist card header (type, employee, progress, actions). */
.hd .hd-clhead { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 22px; }
.hd .hd-clhead__text { flex: 1 1 260px; min-width: 0; }
.hd .hd-clhead__title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 20px; font-weight: 500; }
.hd .hd-clhead__meta { margin-top: 2px; color: var(--hd-ink-2); font-size: 14px; }
.hd .hd-clhead .hd-progress { flex: 0 1 260px; }

/* Template item editor: ordered rows with position, text, move up / down, edit, remove. */
.hd .hd-tpl { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.hd .hd-tpl__row {
    display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: start;
    padding: 14px 16px; border-radius: 20px; background: var(--hd-page);
}
.hd .hd-tpl__pos {
    display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
    background: var(--hd-surface); font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums;
}
.hd .hd-tpl__text { min-width: 0; padding-top: 4px; }
.hd .hd-tpl__label { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-weight: 600; overflow-wrap: anywhere; }
.hd .hd-tpl__help { margin-top: 2px; color: var(--hd-ink-2); font-size: 14px; }
.hd .hd-tpl__tools { display: flex; gap: 4px; }
.hd .hd-tpl__tools form { margin: 0; }
.hd .hd-tpl__tools .hd-iconbtn { background: var(--hd-surface); }
.hd .hd-tpl__tools .hd-iconbtn:hover { background: #e4e5e9; }
.hd .hd-tpl__tools .hd-iconbtn:disabled { opacity: .35; cursor: not-allowed; }
.hd .hd-tpl .hd-tag { background: var(--hd-surface); gap: 4px; }
.hd .hd-tag .hd-icon { width: 14px; height: 14px; }
.hd .hd-tplname { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 16px; }
.hd .hd-tplname .hd-field { flex: 1 1 260px; max-width: 420px; margin: 0; }
.hd .hd-subcard .hd-tpl__row { background: var(--hd-surface); }
.hd .hd-subcard .hd-tpl__pos, .hd .hd-subcard .hd-tpl__tools .hd-iconbtn, .hd .hd-subcard .hd-tpl .hd-tag { background: var(--hd-page); }
.hd .hd-subcard .hd-tpl__tools .hd-iconbtn:hover { background: #e4e5e9; }
.hd .hd-subcard .hd-tplname .hd-input { background: var(--hd-surface); }

/* Misc P3 bits. */
.hd .hd-frow .hd-tag { background: var(--hd-surface); }
.hd .hd-cl .hd-tag { gap: 4px; }
.hd .hd-subcard .hd-cl__note { background: var(--hd-surface); }
.hd .hd-subcard .hd-cl__tick:not([aria-pressed="true"]) { background: var(--hd-surface); }
.hd .hd-subcard .hd-progress__track { background: var(--hd-surface); }
.hd .hd-success__next {
    display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 14px 16px;
    border-radius: var(--hd-radius-inner); border: 1px solid var(--hd-line); text-align: left;
}
.hd .hd-success__nexttext { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: 14px; color: var(--hd-ink-2); }
.hd .hd-success__nexttext strong { color: var(--hd-ink); font-size: 16px; font-weight: 600; }
.hd .hd-dialog .hd-note p + p, .hd .hd-dialog .hd-note p + ul { margin-top: 4px; }
.hd .hd-contracts__list { margin-top: 4px; }
.hd .hd-filters.hd-clstart .hd-field { flex: 0 1 380px; max-width: 380px; }
.hd .hd-days { font-variant-numeric: tabular-nums; white-space: nowrap; }
.hd .hd-stats.hd-stats--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hd .hd-stats.hd-stats--4 > .hd-card:first-child { grid-column: auto; }
@media (max-width: 1180px) { .hd .hd-stats.hd-stats--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .hd .hd-stats.hd-stats--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .hd .hd-stats--4 .hd-stat__value { font-size: 36px; } }
.hd .hd-card--table > .hd-flist, .hd .hd-card--table > .hd-files-body { padding: 16px var(--hd-pad) 0; }

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
    .hd .hd-home {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas:
            "ov ov"
            "td rc"
            "hc rc"
            "pd ce"
            "bd lc"
            "py py";
    }
    .hd .hd-nav__link { padding: 0 16px; font-size: 16px; }
    .hd .hd-nav__button { padding: 0 12px 0 16px; font-size: 16px; }


    .hd .hd-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hd .hd-stats > .hd-card:first-child { grid-column: 1 / -1; }
    .hd .hd-info { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hd .hd-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1120px) {
    .hd .hd-split, .hd .hd-split--even { grid-template-columns: minmax(0, 1fr); }
    .hd .hd-nav { display: none; }
    .hd .hd-navmenu { display: block; }
}

@media (max-width: 760px) {
    .hd { --hd-gutter: 16px; --hd-gap: 16px; --hd-pad: 20px; --hd-radius-card: 26px; }
    .hd .hd-topbar { flex-wrap: wrap; gap: 12px; }
    .hd .hd-brand { height: 44px; }
    .hd .hd-brand__mark { width: 32px; height: 32px; font-size: 15px; }
    .hd .hd-profile__button { width: 44px; height: 44px; }
    .hd .hd-navmenu__button { height: 44px; }
    .hd .hd-kv { grid-template-columns: minmax(0, 1fr); }
    .hd .hd-kv > dd { padding-top: 0; border-top: 0; }
    .hd .hd-kv > dt { padding-bottom: 2px; }
    .hd .hd-ledger th, .hd .hd-ledger td { padding: 10px 14px; }
    .hd .hd-filters .hd-field { max-width: none; flex-basis: calc(50% - 8px); }
    .hd .hd-filters .hd-filters__actions { width: 100%; }
    .hd .hd-filters .hd-filters__actions .hd-btn { flex: 1; }
    .hd .hd-item { padding: 16px; }
    .hd .hd-table--stack tbody tr.is-warning { background: #fff3f1; }
    .hd .hd-table--stack tbody tr.is-highlight { background: var(--hd-accent-soft); box-shadow: inset 4px 0 0 var(--hd-accent-strong); }
    .hd .hd-table--stack tbody tr.is-highlight td:first-child { box-shadow: none; }
    .hd .hd-table--stack td.hd-table__actions:has(.hd-rowactions) { position: static; width: 100%; padding: 10px 0 0; }
    .hd .hd-table--stack .hd-rowactions { display: flex; justify-content: flex-start; }
    .hd .hd-table--stack .hd-rowactions .hd-btn { flex: 1 1 0; }
    .hd .hd-table--stack td.hd-table__primary:has(~ td .hd-rowactions) { padding-right: 0; }
    .hd .hd-switchrow { align-items: flex-start; }
    .hd .hd-topbar { position: relative; }
    .hd .hd-navmenu { position: static; }
    .hd .hd-menu--sheet { left: var(--hd-gutter); right: var(--hd-gutter); top: calc(100% + 8px); width: auto; max-width: none; }

    .hd .hd-main { padding-top: 20px; }

    .hd .hd-home { grid-template-columns: minmax(0, 1fr); grid-template-areas: "td" "ov" "rc" "pd" "ce" "hc" "lc" "bd" "py"; }
    .hd .hd-card__title--xl { font-size: 24px; }
    .hd .hd-card__title { font-size: 20px; }
    .hd .hd-card__head { gap: 12px; flex-wrap: wrap; }
    .hd .hd-tile { width: 44px; height: 44px; }

    .hd .hd-overview { grid-template-columns: minmax(0, 1fr); margin-top: 20px; }
    .hd .hd-overview__stats { flex-direction: row; gap: 16px; padding: 0; }
    .hd .hd-bigstat { flex: 1; }
    .hd .hd-bigstat__value { font-size: 44px; }
    .hd .hd-chart__bars { height: 180px; gap: 3px; }
    .hd .hd-empty--chart { height: auto; min-height: 140px; }
    .hd .hd-chart__label { font-size: 11px; }

    .hd .hd-snapshot dd { font-size: 30px; }
    .hd .hd-snapshot__item { padding: 4px 12px; }
    .hd .hd-snapshot dt { font-size: 13px; }

    .hd .hd-person { gap: 12px; }
    .hd .hd-avatar { width: 44px; height: 44px; font-size: 15px; }
    .hd .hd-avatar--sm { width: 38px; height: 38px; font-size: 13px; }
    .hd .hd-person__name { font-size: 16px; flex-wrap: wrap; row-gap: 4px; }
    .hd .hd-person__time { font-size: 17px; }

    .hd .hd-hero__value, .hd .hd-pending__total { font-size: 52px; }

    .hd .hd-login { grid-template-columns: minmax(0, 1fr); align-content: start; }
    .hd .hd-login__panel { display: none; }
    .hd .hd-login__brand-mobile { display: inline-flex; margin-bottom: 28px; background: var(--hd-page); }
    .hd .hd-login__form-wrap { padding: 28px 20px; margin-top: 8vh; }

    .hd .hd-pagehead__title { font-size: 26px; }
    .hd .hd-pagehead__actions { width: 100%; }
    .hd .hd-pagehead__actions .hd-btn { flex: 1 1 auto; }
    .hd .hd-btn { height: 48px; padding: 0 20px; font-size: 16px; }
    .hd .hd-btn--sm { height: 40px; padding: 0 16px; font-size: 15px; }
    .hd .hd-btn--xs { height: 32px; padding: 0 12px; font-size: 14px; }
    .hd .hd-stats { grid-template-columns: minmax(0, 1fr); }
    .hd .hd-stat__value { font-size: 44px; }
    .hd .hd-search { max-width: none; flex-basis: 100%; }
    .hd .hd-toolbar .hd-select { flex: 1 1 140px; min-width: 0; }
    .hd .hd-toolbar__end { margin-left: 0; width: 100%; justify-content: space-between; }

    /* Table becomes stacked cards */
    .hd .hd-table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .hd .hd-table--stack, .hd .hd-table--stack tbody, .hd .hd-table--stack tr, .hd .hd-table--stack td { display: block; width: 100%; }
    .hd .hd-table--stack tr { position: relative; padding: 14px var(--hd-pad); border-top: 1px solid var(--hd-line); }
    .hd .hd-table--stack tbody tr:first-child { border-top: 0; }
    .hd .hd-table--stack td, .hd .hd-table--stack td:first-child, .hd .hd-table--stack td:last-child { padding: 3px 0; border: 0; }
    .hd .hd-table--stack tbody tr:hover td { background: none; }
    .hd .hd-table--stack td[data-label] { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
    .hd .hd-table--stack td[data-label]::before { content: attr(data-label); color: var(--hd-ink-2); flex: none; }
    .hd .hd-table--stack td[data-label] > * { text-align: right; }
    .hd .hd-table--stack td.hd-table__primary { padding: 0 44px 8px 0; }
    .hd .hd-table--stack td.hd-table__actions { position: absolute; top: 14px; right: calc(var(--hd-pad) - 8px); width: auto; padding: 0; }
    .hd .hd-who { min-width: 0; }
    .hd .hd-who__name { font-size: 16px; }

    .hd .hd-pager { justify-content: space-between; }
    .hd .hd-pager__pages { order: 3; width: 100%; justify-content: center; margin: 0; }
    .hd .hd-pager__info { order: 1; }
    .hd .hd-pager__nav { order: 2; }
    .hd .hd-pager__size { order: 4; }
    .hd .hd-pager__step span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .hd .hd-pager__step { padding: 0 12px; }

    .hd .hd-form-grid, .hd .hd-form-grid--3 { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .hd .hd-formcard { padding: 20px; }
    .hd .hd-formactions { flex-direction: column-reverse; align-items: stretch; }
    .hd .hd-formactions__end { flex-direction: column-reverse; margin-left: 0; }
    .hd .hd-formactions .hd-btn { width: 100%; }

    .hd .hd-banner__top { padding: 12px 10px 16px; }
    .hd .hd-banner__top .hd-avatar { width: 56px; height: 56px; font-size: 19px; }
    .hd .hd-banner__name { font-size: 21px; }
    .hd .hd-banner__actions { width: 100%; }
    .hd .hd-banner__sheet { padding: 18px; }
    .hd .hd-info, .hd .hd-info--3, .hd .hd-info--2 { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .hd .hd-banner__sheet .hd-info { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
    .hd .hd-banner__sheet .hd-info dd { font-size: 15px; }
    .hd .hd-subcard { padding: 16px; }

    .hd .hd-timeline__item { grid-template-columns: 20px minmax(0, 1fr); }
    .hd .hd-timeline__when { grid-column: 2; text-align: left; }

    .hd .hd-dialog { padding: 24px 20px 20px; }
    .hd .hd-dialog__icon { width: 84px; height: 84px; margin-bottom: 18px; }
    .hd .hd-dialog__icon .hd-icon { width: 36px; height: 36px; }
    .hd .hd-dialog__actions { flex-direction: column-reverse; }
    .hd .hd-dialog__actions .hd-btn { width: 100%; }
    .hd .hd-success { padding: 28px 20px 20px; }
    .hd .hd-success__actions { flex-direction: column-reverse; }
    .hd .hd-success__actions .hd-btn { width: 100%; }

    .hd .hd-drop { min-height: 200px; }
    .hd .hd-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hd .hd-summary dd { font-size: 26px; }
    .hd .hd-diff, .hd .hd-diff tbody, .hd .hd-diff tr, .hd .hd-diff td, .hd .hd-diff tbody th { display: block; width: 100% !important; }
    .hd .hd-diff tbody th { padding: 0 0 2px; border: 0; }
    .hd .hd-diff thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .hd .hd-diff tr { padding: 10px 16px; border-top: 1px solid var(--hd-line); }
    .hd .hd-diff td { padding: 1px 0; border: 0; width: 100% !important; }
    .hd .hd-diff td.hd-diff__field { font-size: 13px; }
    .hd .hd-diff td.hd-diff__arrow { display: none; }
    .hd .hd-diff td.hd-diff__old::before { content: "Now: "; color: var(--hd-ink-3); }
    .hd .hd-diff td.hd-diff__new::before { content: "New: "; color: var(--hd-ink-2); }
}

@media (max-width: 760px) {
    .hd .hd-frow__main { flex-wrap: wrap; gap: 12px; padding: 12px; }
    .hd .hd-ftile { width: 44px; height: 44px; }
    .hd .hd-frow__text { flex-basis: calc(100% - 60px); }
    .hd .hd-frow__actions { width: 100%; justify-content: flex-end; flex-wrap: nowrap; }
    .hd .hd-frow__vislong { display: none; }
    .hd .hd-frow__vis { margin-right: auto; }
    .hd .hd-versions { margin: 0 12px; }
    .hd .hd-cl__item { grid-template-columns: 44px minmax(0, 1fr); }
    .hd .hd-cl__side { grid-column: 2; padding-top: 6px; flex-wrap: wrap; }
    .hd .hd-tpl__row { grid-template-columns: 28px minmax(0, 1fr); padding: 12px; }
    .hd .hd-tpl__pos { width: 28px; height: 28px; }
    .hd .hd-tpl__tools { grid-column: 1 / -1; justify-content: flex-end; }
    .hd .hd-success__next { flex-wrap: wrap; }
    .hd .hd-success__next .hd-btn { width: 100%; }
    .hd .hd-clhead .hd-progress { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .hd *, .hd *::before, .hd *::after { transition: none !important; animation: none !important; }
}

/* ---------- Phase 4 components: recruitment ---------- */

/* Escaped plain text with paragraphs and lists (position description, requirements, notes). */
.hd .hd-prose { font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.hd .hd-prose > * + * { margin-top: 10px; }
.hd .hd-prose ul, .hd .hd-prose ol { margin: 0; padding-left: 22px; }
.hd .hd-prose ul { list-style: disc; }
.hd .hd-prose ol { list-style: decimal; }
.hd .hd-prose li + li { margin-top: 4px; }
.hd .hd-prose li::marker { color: var(--hd-ink-3); }
.hd .hd-prose--empty { color: var(--hd-ink-3); }

/* Stage funnel (Recruitment.png, as counts and bars instead of the dot matrix). */
.hd .hd-funnel { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.hd .hd-funnel__row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 48px; align-items: center; gap: 14px; }
.hd .hd-funnel__label { color: var(--hd-ink-2); font-size: 15px; }
.hd .hd-funnel__label a { text-decoration: none; }
.hd .hd-funnel__label a:hover { color: var(--hd-ink); text-decoration: underline; }
.hd .hd-funnel__track { height: 28px; border-radius: var(--hd-radius-pill); background: var(--hd-page); overflow: hidden; }
.hd .hd-card--tint .hd-funnel__track { background: var(--hd-surface); }
.hd .hd-funnel__fill { display: block; height: 100%; min-width: 28px; border-radius: inherit; background: var(--hd-accent); }
.hd .hd-funnel__fill.is-zero { min-width: 0; width: 0 !important; }
.hd .hd-funnel__row--hired .hd-funnel__fill { background: #2a9d6b; }
.hd .hd-funnel__row--rejected .hd-funnel__fill { background: var(--hd-line-soft); }
.hd .hd-funnel__row:nth-child(2) .hd-funnel__fill { background: #5b93d6; }
.hd .hd-funnel__row:nth-child(3) .hd-funnel__fill { background: var(--hd-accent-strong); }
.hd .hd-funnel__row:nth-child(4) .hd-funnel__fill { background: #0b335c; }
.hd .hd-funnel__value { font-size: 20px; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }

/* Position rows on the overview (open positions with candidate counts). */
.hd .hd-plist { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.hd .hd-prow {
    position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px;
    border-radius: var(--hd-radius-inner); background: var(--hd-page);
}
.hd .hd-card--tint .hd-prow { background: var(--hd-surface); }
.hd .hd-prow__main { flex: 1; min-width: 0; }
.hd .hd-prow__title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-weight: 600; font-size: 16px; }
.hd .hd-prow__title a { text-decoration: none; overflow-wrap: anywhere; }
.hd .hd-prow__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.hd .hd-prow__title a:focus-visible { box-shadow: none; }
.hd .hd-prow:focus-within { box-shadow: var(--hd-focus); }
.hd .hd-prow__meta { margin-top: 3px; color: var(--hd-ink-2); font-size: 14px; }
.hd .hd-prow__count { flex: none; text-align: right; font-size: 13px; color: var(--hd-ink-2); }
.hd .hd-prow__count strong { display: block; color: var(--hd-ink); font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1.1; }
.hd .hd-prow .hd-icon.hd-prow__chev { width: 20px; height: 20px; color: var(--hd-ink-3); }

/* Tag that marks a position as live on the careers page. */
.hd .hd-tag--live { background: #e4f6ec; color: #17603f; gap: 5px; }
.hd .hd-tag--live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #2a9d6b; }
.hd .hd-tag--new { background: var(--hd-accent-soft); color: #234f86; font-weight: 600; }

/* Stage board: one column per stage; cards move with a menu (no drag). */
.hd .hd-board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; align-items: start; margin: 0; padding: 0; list-style: none; }
.hd .hd-board__col { min-width: 0; border-radius: var(--hd-radius-inner); background: var(--hd-page); padding: 12px; }
.hd .hd-board__head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 12px; }
.hd .hd-board__title { font-size: 16px; font-weight: 600; }
.hd .hd-board__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--hd-accent); flex: none; }
.hd .hd-board__col--applied .hd-board__dot { background: #8a8c95; }
.hd .hd-board__col--screening .hd-board__dot { background: var(--hd-accent); }
.hd .hd-board__col--interview .hd-board__dot { background: var(--hd-accent-strong); }
.hd .hd-board__col--offer .hd-board__dot { background: #d9a300; }
.hd .hd-board__col--hired .hd-board__dot { background: #2a9d6b; }
.hd .hd-board__col--rejected .hd-board__dot { background: var(--hd-danger-ink); }
.hd .hd-board__count { margin-left: auto; min-width: 26px; height: 24px; padding: 0 8px; border-radius: var(--hd-radius-pill); background: var(--hd-surface); font-size: 13px; font-weight: 600; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.hd .hd-board__list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.hd .hd-board__empty { padding: 18px 10px; border: 1.5px dashed var(--hd-line-soft); border-radius: 18px; color: var(--hd-ink-3); font-size: 14px; text-align: center; }
.hd .hd-board-rejected { margin-top: 14px; }

/* Candidate card on the board. */
.hd .hd-ccard { position: relative; display: grid; gap: 10px; padding: 14px; border-radius: 20px; background: var(--hd-surface); min-width: 0; }
.hd .hd-ccard__top { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.hd .hd-ccard .hd-avatar { width: 38px; height: 38px; font-size: 13px; }
.hd .hd-ccard__who { flex: 1; min-width: 0; }
.hd .hd-ccard__name { font-weight: 600; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.hd .hd-ccard__name a { text-decoration: none; }
.hd .hd-ccard__name a:hover { text-decoration: underline; }
.hd .hd-ccard__sub { margin-top: 2px; color: var(--hd-ink-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd .hd-ccard__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.hd .hd-ccard__tags .hd-tag { height: 22px; padding: 0 8px; font-size: 12px; gap: 4px; }
.hd .hd-ccard__tags .hd-icon { width: 13px; height: 13px; }
.hd .hd-ccard__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid var(--hd-line); color: var(--hd-ink-3); font-size: 13px; }
.hd .hd-ccard__reason { color: var(--hd-danger-ink); font-size: 13px; overflow-wrap: anywhere; }
.hd .hd-move .hd-btn .hd-icon { width: 15px; height: 15px; }
.hd .hd-move .hd-menu { min-width: 220px; }
.hd .hd-move form { margin: 0; display: contents; }
.hd .hd-menu__label { padding: 8px 14px 4px; color: var(--hd-ink-3); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }

/* Stage history (Recruitment Process.png stepper, read-only). */
.hd .hd-stagehist { margin: 0; padding: 0; list-style: none; }
.hd .hd-stagehist__item { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 2px 14px; padding-bottom: 20px; }
.hd .hd-stagehist__item:last-child { padding-bottom: 0; }
.hd .hd-stagehist__item::before { content: ""; position: absolute; left: 19px; top: 42px; bottom: 2px; width: 2px; border-radius: 2px; background: #2a9d6b; }
.hd .hd-stagehist__item:last-child::before { display: none; }
.hd .hd-stagehist__mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #2a9d6b; color: #fff; }
.hd .hd-stagehist__mark .hd-icon { width: 18px; height: 18px; }
.hd .hd-stagehist__item.is-current .hd-stagehist__mark { background: var(--hd-surface); color: var(--hd-accent-strong); box-shadow: inset 0 0 0 2px var(--hd-accent-strong); }
.hd .hd-stagehist__item.is-rejected .hd-stagehist__mark { background: var(--hd-surface); color: var(--hd-danger-ink); box-shadow: inset 0 0 0 2px var(--hd-danger-ink); }
.hd .hd-stagehist__item.is-current::before, .hd .hd-stagehist__item.is-rejected::before { display: none; }
.hd .hd-stagehist__body { min-width: 0; padding-top: 1px; }
.hd .hd-stagehist__title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 16px; font-weight: 500; }
.hd .hd-stagehist__meta { margin-top: 2px; color: var(--hd-ink-2); font-size: 14px; }
.hd .hd-stagehist__note { margin-top: 6px; padding: 8px 12px; border-radius: 12px; background: var(--hd-page); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.hd .hd-subcard .hd-stagehist__note, .hd .hd-subcard .hd-stagehist__item.is-current .hd-stagehist__mark { background: var(--hd-surface); }

/* Note list (candidate notes). */
.hd .hd-notes { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.hd .hd-notes__item { padding: 12px 14px; border-radius: 18px; background: var(--hd-page); }
.hd .hd-notes__meta { margin-bottom: 4px; color: var(--hd-ink-2); font-size: 13px; }


/* Title with status pills (position, candidate). */
.hd .hd-titlebadges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.hd .hd-titlebadges > span:first-child { overflow-wrap: anywhere; min-width: 0; }
.hd .hd-candhead { display: flex; align-items: center; gap: 16px; }
.hd .hd-candhead .hd-avatar { width: 64px; height: 64px; font-size: 22px; }
.hd .hd-candhead__text { min-width: 0; }

/* Segmented control (Notification Preference.png): radio options or submit buttons in one pill row. */
.hd .hd-segment__opts { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: var(--hd-radius-pill); background: var(--hd-page); }
.hd .hd-card--tint .hd-segment__opts { background: var(--hd-surface); }
.hd .hd-segment__opt {
    position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 18px;
    border: 0; border-radius: var(--hd-radius-pill); background: transparent; color: var(--hd-ink); font: inherit; font-size: 15px; cursor: pointer;
}
.hd .hd-segment__opt:hover { background: rgba(30, 31, 36, .06); }
.hd .hd-segment__opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.hd .hd-segment__opt:has(input:checked), .hd .hd-segment__opt.is-on { background: var(--hd-accent-strong); color: #fff; cursor: default; }
.hd .hd-segment__opt:has(input:focus-visible), .hd button.hd-segment__opt:focus-visible { box-shadow: var(--hd-focus); }
.hd .hd-segment .hd-field__label { display: block; margin-bottom: 8px; }
.hd .hd-check.is-disabled { opacity: .6; cursor: not-allowed; }

/* Applicant message, hire call to action, stage panel, forms in cards. */
.hd .hd-quote { padding: 14px 16px; border-radius: 18px; background: var(--hd-page); border-left: 4px solid var(--hd-accent); }
.hd .hd-hirecta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-bottom: var(--hd-gap); }
.hd .hd-hirecta__text { flex: 1 1 320px; min-width: 0; }
.hd .hd-hirecta__title { font-size: 24px; font-weight: 500; letter-spacing: -0.01em; }
.hd .hd-hirecta p { margin-top: 4px; color: #fff; }
.hd .hd-btn--light { background: #fff; color: var(--hd-accent-ink); box-shadow: none; }
.hd .hd-btn--light:hover { background: var(--hd-accent-soft); }
.hd .hd-stagenow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; color: var(--hd-ink-2); font-size: 14px; }
.hd .hd-moveform { display: grid; gap: 14px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--hd-line-soft); }
.hd .hd-card--tint .hd-moveform .hd-input { background: var(--hd-surface); }
.hd .hd-moveform__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.hd .hd-noteform { display: grid; gap: 12px; justify-items: start; }
.hd .hd-noteform .hd-field { width: 100%; }
.hd .hd-fromcand { margin: 0 0 28px; }
.hd .hd-fromcand .hd-check--block { background: var(--hd-surface); }
.hd .hd-board__hint { font-size: 14px; }

@media (max-width: 1180px) {
    .hd .hd-board { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .hd .hd-board { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .hd .hd-funnel__row { grid-template-columns: 92px minmax(0, 1fr) 40px; gap: 10px; }
    .hd .hd-funnel__track { height: 22px; }
    .hd .hd-prow { padding: 12px 14px; }
    .hd .hd-board__hint { display: none; }
    .hd .hd-candhead .hd-avatar { width: 52px; height: 52px; font-size: 18px; }
    .hd .hd-segment__opts { display: flex; }
    .hd .hd-segment__opt { flex: 1 1 auto; padding: 0 12px; }
    .hd .hd-hirecta .hd-btn { width: 100%; }
    .hd .hd-moveform__btns .hd-btn { flex: 1 1 auto; }
}
