/* ---- colours ---- */
:root {
  --hr-accent: var(--pico-primary);              /* the app's blue */
  --hr-nav-active-bg: color-mix(in srgb, var(--pico-primary) 12%, transparent); /* light tint of the blue */
  --hr-nav-text: var(--pico-color);
  --hr-border: var(--pico-muted-border-color);
  --hr-page-bg: var(--pico-background-color);   /* fixed here: Pico redefines its own variable on links */
  --hr-sidebar-width: 230px;
  --hr-topbar-height: 56px;
}

/* ---- page frame: top bar + left menu ---- */
body { min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--hr-topbar-height);
  display: flex; align-items: center; gap: .75rem; padding: 0 1.25rem;
  background: var(--pico-background-color); border-bottom: 1px solid var(--hr-border);
}
.topbar .brand { text-decoration: none; font-size: 1.15rem; color: var(--hr-accent); }
.topbar .brand strong { color: inherit; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.topbar-right .dropdown { margin: 0; }
.topbar-right .dropdown summary { padding: .3rem .8rem; height: auto; }
.theme-toggle, .menu-toggle { padding: .3rem .6rem; margin: 0; width: auto; }
.menu-toggle { display: none; }

.sidebar {
  position: fixed; top: var(--hr-topbar-height); bottom: 0; left: 0; width: var(--hr-sidebar-width);
  padding: 1rem .6rem; overflow-y: auto; background: var(--pico-background-color);
  border-right: 1px solid var(--hr-border);
}
.sidebar ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: stretch;
  min-height: 100%; }
.sidebar li { list-style: none; display: block; width: 100%; margin: 0 0 .15rem; padding: 0; }
.sidebar li.nav-bottom { margin-top: auto; padding-top: 1rem; }
.sidebar a {
  display: flex; align-items: center; gap: .85rem; margin: 0; padding: .6rem .8rem; border-radius: .6rem; width: 100%;
  color: var(--hr-nav-text); text-decoration: none; font-weight: 500;
}
.sidebar a:hover { background: var(--hr-nav-active-bg); }
.sidebar a[aria-current="page"] { background: var(--hr-nav-active-bg); color: var(--hr-accent); font-weight: 700; }
.sidebar .icon { flex-shrink: 0; }

.content { padding: 1.5rem 2rem; max-width: 1600px; }
body.has-sidebar .content { margin-left: var(--hr-sidebar-width); }

@media (max-width: 800px) {
  .menu-toggle { display: inline-block; }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; z-index: 15; box-shadow: none; }
  body.menu-open .sidebar { transform: none; box-shadow: 4px 0 16px rgba(0, 0, 0, .15); }
  body.has-sidebar .content { margin-left: 0; padding: 1rem; }
}

/* ---- shared bits ---- */
.muted { color: var(--pico-muted-color); }
.error { color: var(--pico-del-color); }
.field-error { display: block; color: var(--pico-del-color); font-size: .85rem; margin-top: -.5rem; margin-bottom: .75rem; }
.login { max-width: 520px; margin: 3rem auto; }

.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: inline-flex;
  align-items: center; justify-content: center; background: var(--pico-secondary-background);
  color: var(--pico-secondary-inverse); font-weight: 600; vertical-align: middle; flex-shrink: 0; }
.avatar.large { width: 120px; height: 120px; font-size: 2.2rem; }

.profile-head { display: flex; gap: 1.5rem; align-items: center; margin-bottom: 1.5rem; flex-wrap: wrap; }
.profile-head h1 { margin-bottom: .25rem; }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 1.5rem; }
dl.fields { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; }
dl.fields dt { color: var(--pico-muted-color); }
dl.fields dd { margin: 0; }

.status { font-size: .8rem; padding: .1rem .55rem; border-radius: 1rem; vertical-align: middle;
  background: var(--pico-secondary-background); color: var(--pico-secondary-inverse); }
.status.Terminated { background: var(--pico-del-color); }

.inline-form { display: inline; }
.inline-form button { padding: .25rem .6rem; margin: 0; width: auto; }
table td, table th { vertical-align: middle; }

/* home + settings cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.cards a.card { display: flex; gap: .8rem; align-items: center; padding: 1rem 1.1rem; border: 1px solid var(--hr-border);
  border-radius: .8rem; text-decoration: none; color: var(--hr-nav-text); }
.cards a.card:hover { border-color: var(--hr-accent); color: var(--hr-accent); }
.cards .icon { width: 24px; height: 24px; flex-shrink: 0; color: var(--hr-accent); }
.cards a.card small { display: block; color: var(--pico-muted-color); font-weight: 400; }

/* people: list/chart switch */
.view-switch { display: inline-flex; gap: .4rem; margin-bottom: 1rem; }
.view-switch a { padding: .35rem .9rem; border-radius: 1rem; border: 1px solid var(--hr-border); text-decoration: none; }
.view-switch a[aria-current="page"] { background: var(--hr-nav-active-bg); color: var(--hr-accent); font-weight: 600; }


/* ---- employee profile ---- */
.profile-band {
  position: relative; display: grid; grid-template-columns: 220px 1fr auto; grid-template-rows: 1fr auto;
  column-gap: 1.75rem; min-height: 190px; padding: 1.5rem 1.5rem 0; border-radius: 1.25rem;
  background: var(--hr-accent); color: #fff;
}
.profile-band h1 { color: #fff; margin: 0 0 .25rem; font-size: 2.1rem; }
.profile-band p { color: rgba(255, 255, 255, .9); margin: 0; }
.profile-photo { grid-row: 1 / span 2; align-self: start; }
.avatar.xl { width: 210px; height: 210px; font-size: 4rem; border-radius: 1.25rem; border: 4px solid var(--hr-page-bg);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .15); margin-bottom: -70px; position: relative; z-index: 2; }
.profile-title { grid-column: 2; align-self: start; }
.profile-menu { grid-column: 3; grid-row: 1; margin: 0; }
.profile-menu summary { background: #fff; color: var(--hr-accent); border-radius: 999px; padding: .35rem .9rem; height: auto;
  font-weight: 700; border: 0; }
.profile-menu summary::after { display: none; }
.profile-menu ul li label { margin: 0; cursor: pointer; }
.profile-menu ul li input[type=file] { margin-top: .4rem; font-size: .8rem; }
.profile-tabs { grid-column: 2 / span 2; grid-row: 2; display: flex; flex-wrap: wrap; gap: .25rem; align-self: end; }
.profile-tabs a { padding: .7rem 1.2rem; border-radius: .7rem .7rem 0 0; color: #fff; text-decoration: none; font-weight: 600; }
.profile-tabs a:hover { background: rgba(255, 255, 255, .15); }
.profile-band .profile-tabs a[aria-current="page"] { background-color: var(--hr-page-bg); color: var(--hr-accent); }

.profile-body { display: grid; grid-template-columns: 220px 1fr; gap: 1.75rem; margin-top: 1rem; }
.vitals { padding: 80px 0 0 .5rem; font-size: .92rem; }
.vitals h4 { font-size: .95rem; margin: 1.1rem 0 .5rem; color: var(--pico-muted-color); }
.vitals ul { list-style: none; margin: 0; padding: 0 0 .8rem; border-bottom: 1px solid var(--hr-border); }
.vitals li { list-style: none; display: flex; gap: .5rem; align-items: flex-start; margin: 0 0 .45rem; overflow-wrap: anywhere; }
.vitals li small, .vitals small { color: var(--pico-muted-color); }
.vitals .icon { width: 16px; height: 16px; margin-top: .2rem; color: var(--pico-muted-color); }
.vitals p a { display: inline-flex; gap: .4rem; align-items: center; margin-top: 1rem; }

.tab-heading { color: var(--hr-accent); margin: .5rem 0 1rem; }
.profile-main .card, .profile-main article {
  background: var(--pico-card-background-color); border: 1px solid var(--hr-border); border-radius: 1rem;
  padding: 1.25rem 1.5rem; margin: 0 0 1.25rem; box-shadow: none;
}
.card-head { display: flex; gap: .75rem; align-items: center; margin-bottom: 1rem; padding: 0; background: none; border: 0; }
.card-head h3 { margin: 0; color: var(--hr-accent); }
.card-icon { display: inline-flex; padding: .45rem; border-radius: .6rem; background: var(--hr-nav-active-bg); color: var(--hr-accent); }
.field-row { display: flex; flex-wrap: wrap; gap: 0 .9rem; align-items: flex-start; }
.field { width: 210px; }
.field.small { width: 120px; }
.field.wide { width: 320px; }
.field label { display: block; font-size: .8rem; font-weight: 600; margin-bottom: .2rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-main .field input, .profile-main .field select, .field .readonly {
  height: 2.35rem; min-height: 0; padding: .4rem .65rem; margin-bottom: .7rem; font-size: .92rem; }
.profile-main .field select { padding-right: 2rem; }
.field .readonly { display: flex; align-items: center; border: 1px solid var(--hr-border); border-radius: var(--pico-border-radius);
  background: var(--pico-form-element-disabled-background-color, transparent); overflow: hidden; white-space: nowrap;
  text-overflow: ellipsis; }
.profile-main .card-head h3 { font-size: 1.15rem; }
.profile-main .card, .profile-main article { padding: 1rem 1.25rem; }
.card-actions { display: flex; justify-content: flex-end; }
.card-actions button { width: auto; margin: 0; }

@media (max-width: 900px) {
  .profile-band { grid-template-columns: 1fr; padding-bottom: 0; }
  .profile-photo { grid-row: auto; }
  .avatar.xl { width: 120px; height: 120px; font-size: 2.4rem; margin-bottom: .5rem; }
  .profile-title, .profile-tabs, .profile-menu { grid-column: 1; grid-row: auto; }
  .profile-body { grid-template-columns: 1fr; }
  .vitals { padding-top: 0; }
  .field, .field.wide { width: 100%; }
}

.home-reports { margin-top: 2rem; }
.home-reports h2 { font-size: 1.25rem; color: var(--hr-accent); }

.folder .card-head { margin-bottom: .6rem; }
.folder-count { margin-left: auto; font-size: .85rem; }
.folder table { margin-bottom: 0; font-size: .92rem; }
.folder select { margin: 0; padding: .25rem 2rem .25rem .5rem; height: auto; font-size: .85rem; }
.profile-main .folder.empty { padding: .5rem 1.25rem; margin-bottom: .5rem; }
.folder.empty .card-head { margin: 0; }
.folder.empty .card-head h3 { font-size: 1rem; color: var(--pico-muted-color); }
.folder.empty .card-icon { padding: .3rem; }
.folder.empty .card-icon .icon { width: 18px; height: 18px; }

/* upload pop-up */
.upload-card .card-head { margin: 0; }
.upload-button { margin-left: auto; width: auto; display: inline-flex; gap: .45rem; align-items: center;
  padding: .4rem 1.1rem; margin-bottom: 0; border-radius: 999px; font-weight: 600; }
.upload-button .icon { width: 18px; height: 18px; }
#upload-dialog article { width: min(640px, 94vw); padding: 0; overflow: hidden; }
.dialog-head { display: flex; align-items: center; padding: 1rem 1.5rem; margin: 0; background: var(--hr-nav-active-bg);
  border-bottom: 0; }
.dialog-head h3 { margin: 0; color: var(--hr-accent); }
.dialog-close { margin-left: auto; width: 2.4rem; height: 2.4rem; padding: 0; border-radius: 999px; }
#upload-dialog form { margin: 0; }
.dialog-person { display: flex; gap: 1rem; align-items: center; padding: 1rem 1.5rem; border-bottom: 1px solid var(--hr-border); }
.dialog-person .avatar { width: 56px; height: 56px; border-radius: .8rem; }
.drop-zone { display: flex; flex-direction: column; align-items: center; gap: .25rem; margin: 1rem 1.5rem; padding: 1.5rem 1rem;
  text-align: center; border: 2px dashed transparent; border-radius: 1rem; }
.drop-zone p { margin: 0; }
.drop-zone .drop-text { display: inline-flex; gap: .6rem; align-items: center; font-size: 1.3rem; font-weight: 700; }
.drop-zone .drop-text .icon { width: 30px; height: 30px; }
.drop-zone.dragging { border-color: var(--hr-accent); background: var(--hr-nav-active-bg); }
.drop-choose { display: flex; gap: 1rem; align-items: center; justify-content: center; flex-wrap: wrap; margin: .5rem 0; }
.drop-zone .choose-button { background: transparent; display: inline-flex; gap: .45rem; align-items: center; margin: 0; padding: .5rem 1.2rem; cursor: pointer;
  border: 2px solid var(--hr-accent); border-radius: 999px; color: var(--hr-accent); font-weight: 600; }
.choose-button .icon { width: 18px; height: 18px; }
.choose-button input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-files { display: inline-flex; gap: .4rem; align-items: center; }
.drop-files .icon { width: 18px; height: 18px; }
#upload-dialog .field { margin: 0 1.5rem; width: auto; max-width: 320px; }
#upload-dialog > article > form > p { margin: 0 1.5rem .75rem; }
.dialog-foot { display: flex; justify-content: flex-end; align-items: center; gap: 1rem; margin: 1rem 0 0; padding: .9rem 1.5rem;
  background: var(--hr-nav-active-bg); border-top: 0; }
.dialog-foot button { width: auto; margin: 0; }
.link-button { background: none; border: 0; color: var(--hr-accent); padding: .4rem .6rem; }
.dialog-foot button[disabled] { opacity: .45; }

/* notes */
.note-form { display: flex; gap: 1rem; align-items: flex-start; margin: 0; }
.note-form .avatar { border-radius: .7rem; width: 44px; height: 44px; }
.note-form textarea { flex: 1; margin: 0; min-height: 2.6rem; resize: vertical; }
.note-form button { width: auto; margin: 0; }
.note-head { display: flex; gap: .8rem; align-items: center; }
.note-head .avatar { border-radius: .7rem; }
.note-delete { margin-left: auto; }
.note-body { margin: .75rem 0 0; white-space: pre-wrap; }

/* performance tab */
.perf-bar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin: .5rem 0 1rem; }
.perf-picker { display: flex; align-items: center; gap: .6rem; margin: 0; }
.perf-picker label { margin: 0; font-weight: 600; }
.perf-picker select { margin: 0; min-width: 18rem; border-radius: 999px; }
.perf-cancel { margin: 0 0 0 auto; }
.perf-bar .upload-button { margin-left: auto; }
#start-dialog article { width: min(640px, 94vw); padding: 0; overflow: hidden; }
#start-dialog form { margin: 0; }
.start-body { text-align: center; padding: 1.75rem 1.5rem .5rem; }
.start-icon { display: inline-flex; padding: 1rem; border-radius: 1rem; background: var(--hr-nav-active-bg); color: var(--hr-accent); }
.start-icon .icon { width: 32px; height: 32px; }
.start-body h3 { margin: 1rem 0 .5rem; }
.perf-part { margin-top: 1.25rem; }
.perf-part-title { display: flex; gap: .5rem; align-items: center; color: var(--hr-accent); font-size: 1.15rem; }
.perf-question { max-width: 560px; margin-bottom: .9rem; }
.perf-question label { font-weight: 600; font-size: .92rem; margin-bottom: .3rem; }
.perf-question select, .perf-question textarea { margin-bottom: .25rem; }
.perf-actions { display: flex; gap: .75rem; }
.perf-actions button { width: auto; margin: 0; border-radius: 999px; padding: .5rem 1.4rem; }
.perf-actions button[disabled] { opacity: .45; }
.perf-shown.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.perf-answers dt { font-weight: 600; font-size: .9rem; margin-top: .75rem; }
.perf-answers dd { margin: .2rem 0 0; white-space: pre-wrap; }
.perf-reopen { display: flex; gap: .75rem; align-items: center; margin-top: 1rem; }
.perf-reopen button { width: auto; margin: 0; }
.perf-progress { font-size: .92rem; }
.standalone-person { border: 0; padding-left: 0; }
@media (max-width: 900px) { .perf-shown.two { grid-template-columns: 1fr; } }
/* the ✕ that clears a picked answer */
.select-wrap { position: relative; }
.select-wrap select { padding-right: 4.5rem; }
.select-clear { position: absolute; right: 2.3rem; top: 50%; transform: translateY(-50%); display: none; width: auto;
  margin: 0; padding: .1rem .4rem; border: 0; background: none; color: var(--pico-muted-color); font-size: .95rem;
  line-height: 1; }
.select-clear:hover { color: var(--hr-accent); }
.select-wrap.has-value .select-clear { display: block; }
.perf-question .select-wrap select { margin-bottom: .25rem; }
.profile-band .profile-edit { grid-column: 3; grid-row: 1; align-self: start; margin: 0; padding: .35rem 1.1rem;
  border-radius: 999px; border: 0; background: #fff; color: var(--hr-accent); font-weight: 700; }
.perf-who { font-size: .85rem; color: var(--pico-muted-color); margin: .25rem 0 .75rem; }
.perf-who.shared { font-size: 1rem; font-weight: 700; color: var(--hr-accent); margin-top: 1rem; }
.home-todo { margin: 0 0 1.75rem; padding: 1rem 1.25rem; border: 1px solid var(--hr-border); border-radius: 1rem;
  background: var(--hr-nav-active-bg); }
.home-todo h2 { font-size: 1.15rem; color: var(--hr-accent); margin: 0 0 .5rem; }
.home-todo ul { margin: 0; padding: 0; }
.home-todo li { list-style: none; margin: .35rem 0; }
.home-todo a { display: inline-flex; gap: .5rem; align-items: center; font-weight: 600; }
.home-todo .icon { width: 18px; height: 18px; }
.tab-badge { display: inline-block; min-width: 1.3rem; padding: 0 .35rem; border-radius: 999px; font-size: .75rem;
  line-height: 1.3rem; text-align: center; background: #fff; color: var(--hr-accent); }
.profile-tabs a[aria-current="page"] .tab-badge { background: var(--hr-accent); color: #fff; }
.question-set table { font-size: .92rem; }
.question-set .card-head .preview-button { margin-left: auto; width: auto; padding: .3rem .9rem; font-size: .85rem; border-radius: 999px; }
.question-actions { white-space: nowrap; }
.question-actions a { margin-right: .5rem; }
.question-actions button { padding: .2rem .55rem; }
.card-actions { gap: .6rem; }
.private-tag { font-size: .72rem; padding: .05rem .45rem; border-radius: 999px; background: var(--hr-nav-active-bg);
  color: var(--hr-accent); white-space: nowrap; }
.preview-note { padding: .75rem 1rem; border-radius: .8rem; background: var(--hr-nav-active-bg); }
.cycle-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .25rem 1rem; margin-bottom: 1rem; }
.cycle-table select { margin: 0; padding: .25rem 2rem .25rem .5rem; height: auto; font-size: .9rem; }
.late { font-size: .75rem; padding: .05rem .45rem; border-radius: 999px; background: var(--pico-del-color); color: #fff; }
.cycle-close { display: flex; gap: .75rem; align-items: center; }
.cycle-close button { width: auto; margin: 0; }

/* Time off */
.time-off-year { margin-bottom: .75rem; }
.time-off-year select { width: auto; min-width: 8rem; }
.balance-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.balance-card { border: 1px solid var(--hr-border); border-radius: .8rem; padding: .7rem .9rem; display: flex; flex-direction: column; }
.balance-card strong { font-size: 1.6rem; color: var(--hr-accent); line-height: 1.2; }
.balance-card small, .balance-card span { color: var(--pico-muted-color); font-size: .8rem; }
.day-table { margin: .5rem 0; }
.day-table td { padding: .2rem .4rem; vertical-align: middle; }
.day-table td:last-child, .day-table th:last-child { white-space: nowrap; text-align: right; }
.day-table th { font-size: .8rem; color: var(--pico-muted-color); padding: .2rem .4rem; }
.day-table input { display: inline-block; width: 5rem; margin: 0; padding: .15rem .4rem; height: auto; }
.day-table tr.day-off input { opacity: .6; }
.day-table tr.day-off td { color: var(--pico-muted-color); }
.status { padding: .1rem .5rem; border-radius: .8rem; font-size: .8rem; border: 1px solid var(--hr-border); white-space: nowrap; }
.status-pending { background: var(--hr-nav-active-bg); color: var(--hr-accent); }
.status-approved { background: var(--hr-accent); color: #fff; border-color: var(--hr-accent); }
.status-denied, .status-cancelled { color: var(--pico-muted-color); }
.adjust-form { margin-top: 1rem; }
.request-head { display: flex; gap: .9rem; align-items: center; margin-bottom: 1rem; }
.request-head h1 { margin: 0; font-size: 1.4rem; }
.request-head .status { margin-left: auto; }
.decision-form { margin-top: 1rem; }
.home-time-off-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin-bottom: 1.75rem; }
.home-time-off-row .home-todo { margin: 0; }
.home-time-off .big-number { font-size: 1.6rem; color: var(--hr-accent); }
.home-time-off .upload-button { margin-left: 0; }
.calendar-bar { display: flex; align-items: center; gap: 1rem; margin: .5rem 0 1rem; }
.calendar-bar h2 { margin: 0; min-width: 11rem; text-align: center; }
.calendar-bar [role="button"] { padding: .2rem .8rem; margin: 0; }
.calendar-scroll { overflow-x: auto; }
.calendar { table-layout: fixed; width: 100%; min-width: 640px; }
.calendar th { text-align: center; font-size: .8rem; color: var(--pico-muted-color); }
.calendar td { vertical-align: top; height: 6rem; padding: .3rem; border: 1px solid var(--hr-border); font-size: .78rem; }
.calendar td.other-month { opacity: .45; }
.calendar td.weekend { background: color-mix(in srgb, var(--hr-border) 25%, transparent); }
.calendar td.is-today .day-number { background: var(--hr-accent); color: #fff; border-radius: 1rem; padding: 0 .4rem; }
.calendar .day-number { font-weight: 600; display: inline-block; margin-bottom: .2rem; }
.out-calendar .holiday { display: block; color: var(--hr-accent); font-style: italic; }
.out { display: block; margin: .1rem 0; padding: .05rem .35rem; border-radius: .4rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.out.approved { background: var(--hr-accent); color: #fff; }
.out.pending { background: var(--hr-nav-active-bg); color: var(--hr-accent); border: 1px dashed var(--hr-accent); }
.calendar-key .out, .calendar-key .holiday { display: inline-block; margin-right: .4rem; }
.holiday-row { display: flex; gap: .5rem; align-items: center; margin: 0; }
.holiday-row input { margin: 0; }
.holiday-row input[type="date"] { max-width: 11rem; }
.holiday-row button { width: auto; margin: 0; white-space: nowrap; }
.holiday-table td { vertical-align: middle; }

/* Headcount report */
.headcount { display: flex; gap: 1.5rem; align-items: stretch; margin-bottom: 2rem; padding: 1.25rem;
  border: 1px solid var(--hr-border); border-radius: .75rem; }
.hc-chart { display: flex; flex: 1; min-width: 0; overflow-x: auto; }
.hc-year { flex: 1 0 auto; padding: 0 .75rem; }
.hc-year + .hc-year { border-left: 1px solid var(--hr-border); }
.hc-year h4 { margin: 0 0 .5rem; font-weight: 500; }
.hc-bars { display: flex; gap: .4rem; }
.hc-month { display: flex; flex: 1; flex-direction: column; align-items: center; min-width: 1.6rem; }
.hc-count { font-size: .8rem; color: var(--hr-accent); }
.hc-track { display: flex; align-items: flex-end; width: 100%; height: 180px; }
.hc-bar { width: 100%; min-height: 2px; background: var(--hr-accent); border-radius: 2px 2px 0 0; }
.hc-month small { margin-top: .35rem; font-size: .72rem; color: var(--pico-muted-color); }
.hc-total { flex: 0 0 15rem; padding: 1rem 1.25rem; border-radius: .6rem; background: var(--hr-nav-active-bg); }
.hc-total h3 { margin: .4rem 0 .25rem; font-size: 1.2rem; }
.hc-date { color: var(--hr-accent); font-weight: 600; }
.hc-big { display: flex; gap: .6rem; align-items: center; margin-bottom: 1rem; }
.hc-big strong { font-size: 2rem; line-height: 1; }
.hc-big .up { color: #1a7f37; }
.hc-big .down { color: #c62828; }
.hc-yearend > small { display: block; font-size: .75rem; color: var(--pico-muted-color); }
.hc-yearend div { display: flex; gap: .4rem; align-items: center; margin-bottom: .4rem; }
.hc-yearend div span { height: .7rem; background: var(--pico-muted-border-color); border-radius: 2px; }
@media (max-width: 900px) { .headcount { flex-direction: column; } .hc-total { flex-basis: auto; } }

/* Import employees */
.notice { border-left: 4px solid var(--hr-accent); }
.notice.success { border-left-color: #1a7f37; }
.notice.problem { border-left-color: var(--pico-del-color); }
.steps li { margin-bottom: .3rem; }
.button-row { display: flex; gap: .75rem; }
.button-row button { width: auto; }

/* Sortable table headings */
th a.sort-link { color: inherit; text-decoration: none; white-space: nowrap; }
th a.sort-link:hover { color: var(--hr-accent); }
th[aria-sort] a.sort-link { color: var(--hr-accent); }

/* Photo card on the Personal tab */
.photo-edit { display: flex; gap: 1.25rem; align-items: flex-start; }
.photo-edit .avatar.xl { width: 120px; height: 120px; font-size: 2.4rem; border: 0; }
.photo-edit form { margin-bottom: .5rem; }
.photo-edit small { display: block; }

/* Org chart: top-down tree. Lines are drawn with borders on each li (left and right halves of the bar above it)
   and on each ul (the drop from the manager's card). */
.org-toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: .75rem; }
.org-toolbar input[type=search] { flex: 1 1 16rem; max-width: 26rem; margin: 0; }
.org-toolbar button, .org-toolbar select { width: auto; margin: 0; padding: .4rem .75rem; }
.org-levels { display: inline-flex; gap: .4rem; align-items: center; margin: 0; }
.org-zoom { display: inline-flex; gap: .3rem; margin-left: auto; }
.org { --org-line: var(--pico-muted-border-color); --org-gap: 18px;
  overflow: auto; padding: 1.5rem 1rem 2rem; border: 1px solid var(--hr-border); border-radius: .75rem;
  max-height: calc(100vh - 14rem); background: color-mix(in srgb, var(--hr-page-bg) 92%, var(--hr-accent) 8%); }
.org-canvas { width: max-content; min-width: 100%; }
.org ul { display: flex; justify-content: center; margin: 0; padding: var(--org-gap) 0 0; position: relative; }
.org li { list-style: none; position: relative; display: flex; flex-direction: column; align-items: center;
  margin: 0; padding: var(--org-gap) .2rem 0; }
.org li::before, .org li::after { content: ""; position: absolute; top: 0; right: 50%; width: 50%;
  height: var(--org-gap); border-top: 2px solid var(--org-line); }
.org li::after { right: auto; left: 50%; border-left: 2px solid var(--org-line); }
.org li:only-child::before { display: none; }
.org li:first-child::before, .org li:last-child::after { border: 0 none; }
.org li:last-child::before { border-right: 2px solid var(--org-line); border-radius: 0 6px 0 0; }
.org li:first-child::after { border-radius: 6px 0 0 0; }
.org li:only-child::after { border: 0; border-left: 2px solid var(--org-line); border-radius: 0; }  /* straight down */
.org ul ul::before { content: ""; position: absolute; top: 0; left: 50%; height: var(--org-gap);
  border-left: 2px solid var(--org-line); }
.org > .org-canvas > ul { padding-top: 0; gap: 1.5rem; }
.org > .org-canvas > ul > li { padding-top: 0; }
.org > .org-canvas > ul > li::before, .org > .org-canvas > ul > li::after { display: none; }
.org li.collapsed > ul { display: none; }
.org-card { position: relative; display: flex; flex-direction: column; align-items: center; width: 7.6rem;
  min-height: 5.6rem; margin-top: 22px; padding: 26px .35rem .25rem; text-align: center; background: var(--pico-card-background-color);
  border: 1px solid var(--hr-border); border-radius: .6rem; box-shadow: 0 1px 2px rgb(0 0 0 / .06); }
.org-card .avatar.org-photo { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); width: 44px;
  height: 44px; border-radius: .45rem; font-size: .95rem; border: 2px solid var(--pico-card-background-color); }
.org-name { font-size: .76rem; font-weight: 600; line-height: 1.2; }
.org-name a { text-decoration: none; }
.org-title { margin-top: .1rem; color: var(--pico-muted-color); font-size: .66rem; line-height: 1.2;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.org-toggle { align-self: flex-end; margin: auto 0 0; padding: 0 .35rem; width: auto; font-size: .68rem;
  color: var(--pico-muted-color); background: none; border: 1px solid transparent; border-radius: .4rem; }
.org-toggle:hover { color: var(--hr-accent); border-color: var(--hr-border); }
.org-toggle span { display: inline-block; transition: transform .15s; }
li.collapsed > .org-card .org-toggle span { transform: rotate(-90deg); }
li:not(.collapsed).has-reports > .org-card { border-color: var(--hr-accent); }
.org-card.found { outline: 3px solid var(--hr-accent); outline-offset: 3px; }

/* Onboarding / offboarding checklists */
.checklist-head { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: baseline; margin-bottom: .75rem; }
.checklist-head h3 { margin: 0; color: var(--hr-accent); }
.checklist-head progress { flex: 1 1 100%; margin: 0; }
.checklist-steps { margin: 0; padding-left: 1.4rem; }
.checklist-steps li { margin-bottom: .55rem; }
.checklist-steps form { display: flex; flex-wrap: wrap; gap: .25rem 1rem; align-items: center; margin: 0; }
.checklist-step { display: inline-flex; gap: .5rem; align-items: center; margin: 0; font-weight: 500; }
.checklist-steps li.done .checklist-step span { color: var(--pico-muted-color); text-decoration: line-through; }
.checklist-note { display: inline-flex; gap: .4rem; margin-left: auto; }
.checklist-note input { margin: 0; padding: .25rem .5rem; height: auto; width: 16rem; font-size: .85rem; }
.checklist-note button { margin: 0; padding: .25rem .6rem; width: auto; font-size: .8rem; }
.checklist-cancel { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: .75rem 0 0; }
.checklist-cancel button { width: auto; margin: 0; padding: .3rem .75rem; font-size: .85rem; }

/* Hiring */
.pre-line { white-space: pre-line; }
.inline-form { display: inline-flex; gap: .5rem; align-items: center; margin: 0; }
.inline-form input, .inline-form select { margin: 0; width: auto; }
.button-row form { margin: 0; }
.candidate-list { margin: 0 0 .75rem; padding-left: 1.2rem; }

/* Audit log */
.audit-filters label { margin: 0; font-size: .85rem; }
.audit-filters input, .audit-filters select { margin: .2rem 0 0; }
.pager { display: flex; gap: 1rem; align-items: center; justify-content: center; margin: 1rem 0; }
/* announcements */
.announcement h3 { margin: 0; }
.announcement-body { white-space: normal; margin: .5rem 0; }
.announcement-departments { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: 0 0 .5rem 1.6rem; }
.home-announcements article { margin: 0 0 1rem; padding: 0; box-shadow: none; background: transparent; }
.home-announcements h3 { font-size: 1.05rem; margin: 0 0 .25rem; }

/* additions & terminations */
.at-range { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.at-range input[type=date] { width: auto; margin: 0; }
.at-range button, .at-range [role=button] { width: auto; margin: 0; }
.at-growth h3 { margin-bottom: .25rem; }
.at-total { font-size: 1.6rem; font-weight: 600; color: var(--hr-accent); margin: 0 0 .5rem; }
.at-total small { font-size: .85rem; font-weight: 400; margin-left: .5rem; }
.at-chart { width: 100%; height: auto; }
.at-grid { stroke: var(--pico-muted-border-color); stroke-dasharray: 2 3; }
.at-axis { fill: var(--pico-muted-color); font-size: 12px; }
.at-line { fill: none; stroke: var(--hr-accent); stroke-width: 2; }
.at-point { fill: var(--pico-background-color); stroke: var(--hr-accent); stroke-width: 2; }
.doc-sharing { width: auto; margin: 0; padding: .2rem .6rem; font-size: .8rem; white-space: nowrap; }

/* hiring recorded afterwards */
.recorded-label { display: inline-block; font-size: .78rem; color: #7a4a00; background: #fff4d6; border: 1px solid #f0d58a;
  border-radius: 999px; padding: .1rem .6rem; margin: .1rem 0; }
[data-theme=dark] .recorded-label { color: #ffd98a; background: #3a2e12; border-color: #6b5520; }
.past-form .grid { margin-bottom: 0; }
.inline-check { display: flex; align-items: center; gap: .4rem; margin: .25rem 0; font-size: .85rem; }
.offer-preview { border: 1px solid var(--hr-border); border-radius: .6rem; padding: 1.2rem 1.5rem; margin-bottom: 1rem;
  background: var(--pico-background-color); font-family: Helvetica, Arial, sans-serif; font-size: .92rem; }
