/* HR (business/hrm): setup checklist, cost calculator, employee phone, team calendar, payroll, hire flow.
   Tokens only. Prefix: hrm-. Macros: hrm.html. */
.hrm-setup { display: grid; gap: var(--d-space-4); padding: var(--d-space-5); background: var(--biz-panel); border: var(--d-border) solid var(--d-line); border-radius: 16px; box-shadow: 0 2rem 4rem -2.4rem rgb(0 0 0 / 0.45); }
.hrm-setup__who { display: flex; align-items: center; gap: var(--d-space-3); }
.hrm-setup__who b { display: block; } .hrm-setup__who small { display: block; color: var(--d-muted); font-size: var(--d-step--1); }
.hrm-setup__clock { margin-left: auto; padding: 0.2em 0.6em; border-radius: 999px; background: color-mix(in srgb, var(--d-accent) 12%, transparent); color: var(--d-accent); font-size: var(--d-step--1); font-weight: 700; }
.hrm-setup__list { margin: 0; padding: 0; display: grid; gap: var(--d-space-2); font-size: var(--d-step--1); }
.hrm-setup__list li { display: flex; align-items: center; gap: var(--d-space-3); color: var(--d-muted); transition: color 300ms var(--d-ease); }
.hrm-tick { display: grid; place-items: center; width: 1.35rem; height: 1.35rem; flex: none; border-radius: 50%; border: 1.5px solid var(--d-line); transition: background 300ms var(--d-ease), border-color 300ms var(--d-ease); }
.hrm-tick svg { width: 0.9rem; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 16; stroke-dashoffset: 16; transition: stroke-dashoffset 400ms var(--d-ease-out) 100ms; }
.hrm-setup__list li.is-done { color: var(--d-text); }
.hrm-setup__list li.is-done .hrm-tick { background: var(--biz-ok); border-color: var(--biz-ok); }
.hrm-setup__list li.is-done .hrm-tick svg { stroke-dashoffset: 0; }
.hrm-setup__done { font-weight: 600; color: var(--biz-ok); }
.d-motion .hrm-setup__done:not([hidden]) { animation: biz-rise 500ms var(--d-ease-out) both; }

.hrm-cost { display: grid; gap: var(--d-space-6); padding: var(--d-space-6); background: var(--biz-panel); border: var(--d-border) solid var(--d-line); border-radius: 18px; }
@media (min-width: 56rem) { .hrm-cost { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: var(--d-space-8); align-items: center; } }
.hrm-cost__inputs { display: grid; gap: var(--d-space-5); }
.hrm-cost__range { display: grid; gap: var(--d-space-3); }
.hrm-cost__range input { width: 100%; height: 2.75rem; accent-color: var(--d-accent); }
.hrm-cost__out { display: grid; gap: var(--d-space-3); }
.hrm-cost__total { font-size: clamp(2.4rem, 1.6rem + 3vw, 4rem); font-weight: 750; letter-spacing: -0.03em; line-height: 1; }
.hrm-cost__bar { display: flex; height: 0.9rem; border-radius: 999px; overflow: hidden; gap: 2px; }
.hrm-cost__bar i { flex-basis: 0; transition: flex-grow 600ms var(--d-ease-out); }
.hrm-cost__bar i:nth-child(1), .hrm-cost__legend .is-base { background: var(--d-accent); }
.hrm-cost__bar i:nth-child(2), .hrm-cost__legend .is-tax { background: var(--biz-c1); }
.hrm-cost__bar i:nth-child(3), .hrm-cost__legend .is-extra { background: var(--biz-c2); }
.hrm-cost__legend { margin: 0; padding: 0; display: grid; gap: var(--d-space-2); font-size: var(--d-step--1); }
.hrm-cost__legend li { display: flex; align-items: center; gap: var(--d-space-2); }
.hrm-cost__legend i { width: 0.75rem; height: 0.75rem; border-radius: 3px; }
.hrm-cost__legend b { margin-left: auto; }
.hrm-cost__note { font-size: var(--d-step--1); }

.hrm-phone { justify-self: center; width: min(17rem, 80vw); aspect-ratio: 9 / 19; padding: 0.7rem; border-radius: 2.6rem; background: #111; box-shadow: 0 2.4rem 4rem -2rem rgb(0 0 0 / 0.6); }
.hrm-phone__screen { position: relative; height: 100%; display: grid; align-content: start; gap: 0.7rem; padding: 2.4rem 1rem 1rem; border-radius: 2rem; background: var(--d-bg); color: var(--d-text); overflow: hidden; font-size: 0.8rem; }
.hrm-phone__hello { font-size: 1.15rem; font-weight: 700; }
.hrm-phone__card { display: grid; gap: 0.2rem; padding: 0.8rem; border-radius: 0.9rem; background: var(--biz-panel); border: var(--d-border) solid var(--d-line); }
.hrm-phone__card small { color: var(--d-muted); } .hrm-phone__card b { font-size: 1.1rem; }
.hrm-phone__bar { height: 0.35rem; border-radius: 999px; background: var(--d-line); overflow: hidden; } .hrm-phone__bar i { display: block; width: 58%; height: 100%; background: var(--d-accent); }
.hrm-phone__cta { padding: 0.75rem; border-radius: 0.8rem; background: var(--d-accent); color: var(--d-on-accent); text-align: center; font-weight: 700; }
.hrm-phone__toast { position: absolute; left: 0.8rem; right: 0.8rem; bottom: 1rem; padding: 0.7rem; border-radius: 0.8rem; background: var(--d-text); color: var(--d-bg); font-weight: 600; }
.d-motion .hrm-phone__toast { opacity: 0; transform: translate3d(0, 1rem, 0); transition: opacity 400ms var(--d-ease), transform 600ms var(--d-ease-out); }
.d-motion .hrm-phone.is-in .hrm-phone__toast { opacity: 1; transform: none; transition-delay: 1.5s; }
.d-motion .hrm-phone.is-in .hrm-phone__cta { animation: hrm-press 360ms var(--d-ease-out) 1.1s; }
@keyframes hrm-press { 50% { transform: scale(0.95); filter: brightness(1.15); } }

.hrm-cal { display: grid; gap: 2px; overflow-x: auto; font-size: var(--d-step--1); }
.hrm-cal__row { display: grid; grid-template-columns: 11rem minmax(32rem, 1fr); align-items: center; min-height: 2.75rem; }
.hrm-cal__row--head { grid-template-columns: 11rem repeat(var(--n, 10), minmax(3.2rem, 1fr)); color: var(--d-muted); font-weight: 600; }
.hrm-cal__day { text-align: center; }
.hrm-cal__who { display: flex; align-items: center; gap: var(--d-space-2); font-weight: 500; }
.hrm-cal__track { position: relative; height: 2rem; background: repeating-linear-gradient(90deg, transparent 0 calc(100% / var(--n, 10) - 1px), var(--d-line) calc(100% / var(--n, 10) - 1px) calc(100% / var(--n, 10))); border-radius: 6px; }
.hrm-cal__bar { position: absolute; top: 0.2rem; bottom: 0.2rem; left: calc(var(--a) / var(--n) * 100% + 2px); width: calc((var(--b) - var(--a)) / var(--n) * 100% - 4px); display: flex; align-items: center; padding: 0 0.6rem; border-radius: 6px; font-style: normal; font-size: 0.72rem; font-weight: 700; color: #fff; background: var(--d-accent); transform-origin: left; overflow: hidden; white-space: nowrap; }
.hrm-cal__bar { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hrm-cal--compact { overflow: visible; }
.hrm-cal--compact .hrm-cal__row { grid-template-columns: 8.5rem minmax(0, 1fr); }
.hrm-cal--compact .hrm-cal__row--head { grid-template-columns: 8.5rem repeat(var(--n), minmax(0, 1fr)); }
.hrm-cal--compact .hrm-cal__who > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hrm-cal__bar--sick { background: var(--biz-bad); } .hrm-cal__bar--training { background: var(--biz-c1); }
.d-motion .hrm-cal__bar { animation: hrm-grow 800ms var(--d-ease-out) both; animation-delay: calc(var(--i) * 80ms + 200ms); }
@keyframes hrm-grow { from { transform: scaleX(0); } }

.hrm-pay { display: grid; gap: var(--d-space-5); }
.hrm-pay__step { display: grid; gap: var(--d-space-5); }
.hrm-pay__step[hidden] { display: none; }
.hrm-pay__table { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: var(--d-step--1); }
.hrm-pay__table th, .hrm-pay__table td { padding: var(--d-space-3) var(--d-space-2); border-bottom: var(--d-border) solid var(--d-line); text-align: left; }
.hrm-pay__table .d-num { text-align: right; }
.hrm-pay__checks { margin: 0; padding: 0; display: grid; gap: var(--d-space-2); font-size: var(--d-step--1); }
.hrm-pay__checks li { display: flex; gap: var(--d-space-2); align-items: center; }
.hrm-pay__checks .d-icon { color: var(--biz-ok); width: 1rem; height: 1rem; }
.hrm-pay__big { font-size: var(--d-step-3); font-weight: 700; letter-spacing: -0.02em; }
.hrm-pay__confirm { display: flex; gap: var(--d-space-3); align-items: center; min-height: 2.75rem; }
.hrm-pay__confirm input { width: 1.2rem; height: 1.2rem; accent-color: var(--d-accent); }
.hrm-pay__btn:disabled, .biz-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.hrm-pay__paid { justify-items: center; text-align: center; padding: var(--d-space-7) 0; }
.hrm-pay__seal { width: 5rem; fill: none; stroke: var(--biz-ok); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.hrm-pay__seal circle { stroke-dasharray: 214; } .hrm-pay__seal path { stroke-dasharray: 50; }
.d-motion .hrm-pay__paid:not([hidden]) .hrm-pay__seal circle { animation: hrm-ring 800ms var(--d-ease-out) both; }
.d-motion .hrm-pay__paid:not([hidden]) .hrm-pay__seal path { animation: hrm-mark 500ms var(--d-ease-out) 600ms both; }
@keyframes hrm-ring { from { stroke-dashoffset: 214; } } @keyframes hrm-mark { from { stroke-dashoffset: 50; } }

.hrm-hire { display: grid; gap: var(--d-space-5); max-width: 46rem; }
@media (min-width: 64rem) { .hrm-hire { max-width: 70rem; grid-template-columns: minmax(0, 46rem) minmax(15rem, 19rem); column-gap: var(--d-space-8); justify-content: space-between; } .hrm-hire > :not(.hrm-offer) { grid-column: 1; } }
.hrm-offer { display: none; }
@media (min-width: 64rem) { .hrm-offer { grid-column: 2; grid-row: 1 / span 9; align-self: start; position: sticky; top: 6rem; display: grid; gap: var(--d-space-4); padding: var(--d-space-5); border: var(--d-border) solid var(--d-line); border-radius: 16px; background: var(--d-bg); box-shadow: 0 1.6rem 3rem -2.2rem rgb(0 0 0 / 0.35); } .hrm-offer[hidden] { display: none; } }
.hrm-offer__label { font-size: var(--d-step--1); font-weight: 600; color: var(--d-accent); }
.hrm-offer__who { display: flex; align-items: center; gap: var(--d-space-3); }
.hrm-offer__av { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: color-mix(in srgb, var(--d-accent) 16%, var(--d-bg)); color: var(--d-accent); font-weight: 700; transition: transform 300ms var(--d-ease-out); }
.hrm-offer__av.is-bump { transform: scale(1.08); }
.hrm-offer__who b { display: block; font-size: var(--d-step-1); } .hrm-offer__who small { color: var(--d-muted); }
.hrm-offer dl { margin: 0; display: grid; gap: var(--d-space-2); font-size: var(--d-step--1); }
.hrm-offer dl div { display: flex; justify-content: space-between; gap: var(--d-space-3); padding-top: var(--d-space-2); border-top: var(--d-border) solid var(--d-line); }
.hrm-offer dt { color: var(--d-muted); } .hrm-offer dd { margin: 0; font-weight: 600; text-align: right; }
.hrm-offer .is-empty { color: var(--d-muted); font-weight: 400; }
.hrm-hire__step { margin: 0; padding: 0; border: 0; display: grid; gap: var(--d-space-4); min-width: 0; }
.hrm-hire__step[hidden] { display: none; }
.d-motion .hrm-hire__step:not([hidden]) { animation: biz-rise 500ms var(--d-ease-out) both; }
.hrm-hire__q { padding: 0; margin-bottom: var(--d-space-2); font-size: var(--d-step-3); font-weight: 700; letter-spacing: -0.02em; }
.hrm-hire__pair { display: grid; gap: var(--d-space-4); }
@media (min-width: 40rem) { .hrm-hire__pair { grid-template-columns: 1fr 1fr; } }
.hrm-hire__kit { display: flex; flex-wrap: wrap; gap: var(--d-space-2); }
.hrm-hire__apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(12rem, 100%), 1fr)); gap: var(--d-space-2); }
.hrm-app { position: relative; display: flex; }
.hrm-app input { position: absolute; opacity: 0; }
.hrm-app span { flex: 1; display: flex; align-items: center; gap: var(--d-space-2); min-height: 2.75rem; padding: 0 var(--d-space-3); border: var(--d-border) solid var(--d-line); border-radius: 10px; font-size: var(--d-step--1); cursor: pointer; }
.hrm-app span::before { content: ""; width: 1rem; height: 1rem; border-radius: 4px; border: 1.5px solid var(--d-line); }
.hrm-app input:checked + span { border-color: var(--d-accent); background: color-mix(in srgb, var(--d-accent) 8%, transparent); }
.hrm-app input:checked + span::before { background: var(--d-accent); border-color: var(--d-accent); box-shadow: inset 0 0 0 2px var(--biz-panel); }
.hrm-app input:focus-visible + span { outline: 2px solid var(--d-focus); outline-offset: 2px; }
.hrm-hire__nav { display: flex; justify-content: space-between; gap: var(--d-space-3); }
.hrm-hire__nav [data-hire-next] { margin-left: auto; }
