.worker-home {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.worker-home > section {
  min-width: 0;
  margin: 0;
  padding: clamp(20px, 3vw, 30px);
  border-radius: 16px;
}
.worker-shift {
  background: #173e32;
  color: white;
}
.worker-home h2 {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.25;
}
.worker-shift-heading,
.worker-location-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.worker-shift-heading h2 {
  color: white;
}
.worker-state {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border: 1px solid #729587;
  border-radius: 99px;
  padding: 4px 10px;
  color: #eef5f0;
  font-size: .8rem;
}
.worker-state::before {
  content: "";
  width: 7px;
  height: 7px;
  border: 1px solid currentColor;
  border-radius: 50%;
}
.worker-state[data-working="true"]::before {
  border-color: #adedbf;
  background: #adedbf;
}
.worker-shift .worker-clock-caption,
.worker-shift .worker-shift-meta,
.worker-shift .worker-shift-help {
  color: #d3e4dc;
}
.worker-clock-caption {
  margin: 22px 0 4px;
  font-size: .85rem;
}
.worker-shift [role="timer"] {
  font-size: clamp(2.65rem, 7vw, 4.7rem);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.035em;
  line-height: 1.08;
}
.worker-shift-meta {
  margin: 10px 0 0;
  overflow-wrap: anywhere;
  font-size: .88rem;
}
.worker-shift-meta strong {
  color: white;
}
.worker-shift-help {
  margin: 22px 0 14px;
  max-width: 48ch;
  font-size: .94rem;
}
.worker-home .worker-work-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding-inline: 21px;
  background: white;
  color: #173e32;
  font-weight: 700;
}
.worker-work-button::before {
  content: "";
  width: 0;
  height: 0;
  border-block: 6px solid transparent;
  border-left: 10px solid currentColor;
}
.worker-work-button[data-working="true"]::before {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 1px;
  background: currentColor;
}
.worker-work-button[data-action]:not([data-action="start"],[data-action="finish"])::before {
  display: none;
}
.worker-home button:hover:enabled {
  filter: brightness(.95);
}
.worker-home button:focus-visible {
  outline: 3px solid #d98749;
  outline-offset: 3px;
}
.worker-shift .worker-feedback {
  margin: 14px 0 0;
  color: #e2ebe6;
  font-size: .85rem;
}
.worker-shift .worker-feedback.error {
  color: #ffd0ad;
}
.worker-shift #worker-show-map {
  margin-top: 4px;
  padding: 8px 0;
  min-height: 44px;
  background: transparent;
  color: white;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.worker-feedback:empty,
.worker-location-card [data-location-message]:empty {
  display: none;
}
.worker-location-heading {
  margin-bottom: 14px;
}
.worker-location-card [data-check-location] {
  min-height: 44px;
}
.worker-idle-time,
.worker-phone-label,
.worker-phone-privacy {
  display: none;
}
.worker-hours-calendar {
  width: 100%;
  table-layout: fixed;
  border-spacing: 0;
  border-collapse: separate;
  color: #244737;
  font-size: .84rem;
  line-height: 1.3;
}
.worker-hours-calendar th, .worker-hours-calendar td {
  padding: 7px 8px;
  border: 0;
  border-bottom: 1px solid #e2e8df;
  vertical-align: middle;
}
.worker-hours-calendar thead th {
  position: sticky;
  top: var(--worker-header-height, 0px);
  z-index: 1;
  height: 37px;
  background: #eef2eb;
  color: #405947;
  text-align: center;
  font-size: .76rem;
  font-weight: 600;
}
.worker-hours-calendar thead th:first-child { width: 34%; }
.worker-hours-calendar thead th:nth-child(2) { width: 29%; }
.worker-hours-calendar tbody th {
  background: #fafbf8;
  color: #244737;
  font-weight: 500;
  font-size: inherit;
  text-align: left;
}
.worker-hours-calendar tbody td {
  height: 36px;
  background: white;
  overflow-wrap: anywhere;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.worker-hours-calendar tbody.worker-day-weekend :is(th,td) { background: #eff3ed; }
.worker-hours-calendar time { display: flex; align-items: baseline; gap: 5px; }
.worker-hours-calendar time b { min-width: 1.25em; font-weight: 600; font-variant-numeric: tabular-nums; }
.worker-hours-calendar time span { color: #566b5d; font-size: .74rem; }
.worker-hours-calendar ul { list-style: none; margin: 0; padding: 0; }
.worker-hours-calendar li + li { margin-top: 5px; }
.worker-hours-calendar li span { font-weight: 600; }
.worker-hours-calendar li small { display: block; font-size: .73rem; color: #506653; }
.worker-hours-calendar .worker-day-open { color: #17693e; }
.worker-hours-calendar .worker-day-leave { padding: 5px 6px; }
.worker-hours-calendar [data-leave-label] {
  display: inline-block;
  margin: 1px 0;
  padding: 3px 7px;
  border-radius: 5px;
  background: #e5eddf;
  color: #34573b;
  font-size: .74rem;
}
.worker-hours-history > summary {
  display: list-item;
  padding: 12px 0;
  cursor: pointer;
  font-size: .88rem;
  font-weight: 600;
}
@media (max-width: 720px) {
  .worker-hours-summary.card {
    padding: 0;
    margin-bottom: 16px;
    border: 0;
    border-radius: 0;
  }
  .worker-hours-summary .kpi { margin: 0 0 10px; }
  .worker-hours-summary .kpi > div {
    padding: 15px 16px 12px;
    border-radius: 12px;
    background: #e5ecdd;
  }
  .worker-hours-summary .kpi strong {
    margin: 0 0 4px;
    color: #173e32;
    font-size: 1.45rem;
    font-variant-numeric: tabular-nums;
  }
  .worker-hours-summary .kpi span { font-size: .75rem; color: #4f6356; }
  .worker-home {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-height: calc(100vh - var(--worker-header-height, 56px) - var(--worker-nav-height, 58px));
    min-height: calc(100dvh - var(--worker-header-height, 56px) - var(--worker-nav-height, 58px));
    background: white;
  }
  .worker-home > .worker-location-card {
    position: relative;
    order: -1;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .worker-location-heading,
  .worker-shift-heading,
  .worker-shift .worker-clock-caption {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    margin: 0;
  }
  .worker-location-card [data-check-location],
  .worker-wide-label {
    display: none;
  }
  .worker-location-card [data-location-message]:not(:empty) {
    position: absolute;
    inset: auto 12px 38px;
    z-index: 2;
    width: fit-content;
    max-width: calc(100% - 24px);
    margin: 0 auto;
    padding: 6px 10px;
    border-radius: 7px;
    background: white;
    color: #25483a;
    box-shadow: 0 1px 6px #183e3121;
    font-size: .8rem;
    line-height: 1.4;
    pointer-events: none;
  }
  .worker-location-card [data-location-message].error { color: #884026; }
  .worker-location-card:has([data-settings-open="true"]) [data-location-message] { z-index: 0; }
  .worker-home > .worker-shift {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 28px 20px 24px;
    border: 0;
    border-radius: 12px 12px 0 0;
    margin-top: -4px;
    background: white;
    color: #19221f;
    text-align: center;
  }
  .worker-shift [role="timer"] {
    display: block;
    order: -2;
    font-family: system-ui, sans-serif;
    font-size: clamp(2.15rem, 9.2vw, 2.65rem);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -.035em;
  }
  .worker-home .worker-work-button {
    order: -1;
    width: min(100%, 204px);
    min-height: 46px;
    margin: 18px 0 0;
    padding: 12px 20px;
    border-radius: 3px;
    background: #173e32;
    color: white;
    font-size: .875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
  }
  .worker-work-button::before { display: none; }
  .worker-home .worker-work-button[data-action="sick"] { width: min(100%, 250px); }
  .worker-phone-label { display: inline; }
  .worker-phone-privacy {
    display: block;
    max-width: 32ch;
    margin: 12px 0 0;
    color: #53665f;
    font-size: .75rem;
    line-height: 1.45;
  }
  .worker-shift .worker-shift-meta { color: #53665f; }
  .worker-shift .worker-shift-meta strong { color: #173e32; }
  .worker-shift .worker-feedback { color: #25483a; }
  .worker-shift .worker-feedback.error { color: #884026; }
  .worker-shift #worker-show-map { color: #173e32; }
  .worker-location [data-worker-map-details] p {
    margin: 8px 0;
    color: #425c50;
    font-size: .8rem;
    line-height: 1.45;
  }
}
