:root {
  --green: #136b5b;
  --muted: #63716f;
  --border: #dfe7e5;
  --ink: #213f39;
  background: #f4f7f8;
  color: var(--ink);
}
body {
  color: var(--ink);
  background: #f4f7f8;
}
.ui-icon {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
}
.primary, .secondary, .danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
}
.secondary {
  color: #35574f;
  border-color: #dbe5e1;
}
input, select, textarea {
  border-color: #d7e2de;
  border-radius: 12px;
  color: var(--ink);
}
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid #357eab;
  outline-offset: 3px;
}
.leader-layout {
  width: min(1020px, 100%);
  padding: 18px 28px 112px;
}
.leader-header {
  position: relative;
  padding: 20px 24px;
  background: #164f45;
  color: #fff;
  border-radius: 22px;
  box-shadow: 0 7px 20px #173e3410;
}
.leader-header-top {
  margin-bottom: 18px;
}
.leader-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.leader-brand b {
  display: block;
  letter-spacing: 2px;
  font-size: 16px;
  line-height: 1.25;
}
.leader-brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #173e34;
  background: #e1ecc2;
}
.leader-header .eyebrow {
  color: #cae0d9;
  font-size: 10px;
  letter-spacing: .8px;
  margin-top: 3px;
}
.leader-header h1 {
  font-size: 29px;
  font-weight: 700;
  letter-spacing: -.5px;
}
.leader-identity {
  color: #d0e2dd;
  margin: 6px 0 0;
  font-size: 14px;
}
.account-button {
  background: #ffffff10;
  color: #fff;
  border-color: #ffffff35;
  min-height: 44px;
}
.account-button:hover {
  background: #ffffff25;
}
.context-controls {
  margin: 14px 0 6px;
}
.line-options {
  gap: 8px;
  margin-bottom: 12px;
}
.line-options .secondary {
  flex: 0 1 auto;
  padding: 12px 16px;
  font-size: 15px;
  box-shadow: 0 2px 5px #214c3705;
}
.line-options [aria-pressed="true"] {
  background: #136b5b;
  border-color: #136b5b;
}
.day-controls {
  padding: 10px 14px;
  border: 1px solid #e0e8e4;
  border-radius: 14px;
  background: #fff;
  align-items: center;
}
.day-context {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.day-context > .ui-icon {
  color: #568275;
}
.day-context strong, .day-context span {
  display: block;
}
.day-context strong {
  font-size: 14px;
  color: #344f47;
}
.day-context span {
  font-size: 13px;
  margin-top: 3px;
  color: #61746b;
}
.day-controls summary {
  font-size: 13px;
  padding: 12px 0;
  color: #376b5e;
}
.day-controls details[open] {
  min-width: 145px;
}
.day-controls input, .day-controls select {
  min-width: 0;
  max-width: 100%;
}
.screen-title {
  margin: 20px 0 10px;
}
.screen-title h2 {
  font-size: 23px;
}
.screen-title .secondary {
  background: #e5efeb;
  border-color: #d9e6df;
  padding: 10px 14px;
  font-size: 14px;
}
.save-status {
  background: #eaf2ef;
  border: 1px solid #dde9e3;
  border-radius: 10px;
  color: #3b685a;
  font-size: 13px;
  margin-bottom: 16px;
  padding: 9px 12px;
}
.save-error {
  color: #8e352d;
  background: #fbe9e5;
  border-color: #edcbc5;
}
.save-status.is-idle {
  display: none;
}
.attendance-progress {
  margin-bottom: 16px;
}
.attendance-progress > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  margin-bottom: 8px;
}
.attendance-progress strong {
  color: #185c4d;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}
.attendance-progress strong span {
  font-weight: 400;
  color: #63746d;
  font-size: 13px;
}
.progress-track {
  display: block;
  width: 100%;
  height: 7px;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #e1e9e5;
  accent-color: #338673;
}
.progress-track::-webkit-progress-bar {
  background: #e1e9e5;
  border-radius: 8px;
}
.progress-track::-webkit-progress-value {
  background: #338673;
  border-radius: 8px;
}
.progress-track::-moz-progress-bar {
  border-radius: inherit;
  background: #338673;
}
.quick-filters {
  gap: 10px;
}
.quick-filters button {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 7px;
  padding: 12px 14px;
  border: 1px solid #dce6e1;
  border-radius: 15px;
  color: #345c4e;
  text-align: left;
  background: #fff;
  box-shadow: 0 2px 5px #183e2f04;
}
.quick-filters strong {
  font-size: 30px;
  text-align: right;
  margin: 0;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.quick-filters .filter-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #e8f2ed;
}
.quick-filters button > span:last-child {
  grid-column: 1 / -1;
  font-size: 14px;
  line-height: 1.4;
}
.quick-filters [data-filter="unmarked"] {
  background: #fffaf0;
  border-color: #eddfbd;
  color: #8a6016;
}
.quick-filters [data-filter="unmarked"] .filter-icon {
  background: #f9eac5;
}
.quick-filters [data-filter="onSite"] {
  background: #f0f8f3;
  border-color: #d1e5d9;
  color: #24694e;
}
.quick-filters [data-filter="outside"] {
  background: #f0f5fc;
  border-color: #d5e1ef;
  color: #3b648b;
}
.quick-filters [data-filter="outside"] .filter-icon {
  background: #e0ebf8;
}
.quick-filters button.selected {
  box-shadow: inset 0 0 0 2px currentColor;
}
.roster-tools {
  margin: 10px 0 5px;
  align-items: center;
}
.roster-tools > button[aria-pressed="true"] {
  text-decoration: none;
  color: #1a6956;
  background: #e6efea;
  border-radius: 10px;
}
.summary-detail summary {
  color: #596f65;
}
.search {
  padding: 0 14px;
  border-radius: 13px;
  box-shadow: 0 2px 5px #173e2f03;
  color: #6b8176;
  gap: 4px;
}
.search:focus-within {
  outline: 2px solid #488779;
  outline-offset: 2px;
}
.search input:focus-visible {
  outline: none;
}
.search input {
  min-width: 0;
  min-height: 54px;
  font-weight: 400;
}
.roster-list {
  gap: 16px;
}
.worker-card {
  padding: 18px 18px 12px;
  border: 1px solid #dde6e0;
  border-top: 3px solid #bfd4ca;
  border-radius: 18px;
  box-shadow: 0 4px 14px #284e3707;
}
.worker-card[data-attendance-state="unmarked"] {
  border-top-color: #d9b35c;
}
.worker-card[data-attendance-state="present"] {
  border-top-color: #3c9279;
}
.worker-card[data-attendance-state="absent"] {
  border-top-color: #c98378;
}
.worker-top {
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}
.worker-identity {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.worker-initials {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: #e8efeb;
  color: #3c7060;
  font-size: 14px;
  font-weight: 700;
}
.worker-card[data-attendance-state="unmarked"] .worker-initials {
  background: #f5edda;
  color: #886a29;
}
.worker-name h3 {
  color: #213e35;
  font-size: 18px;
  line-height: 1.4;
}
.worker-name > span {
  color: #6b7b72;
  font-size: 12px;
  letter-spacing: .4px;
}
.worker-departure {
  font-size: 12px;
  color: #9c5149;
  max-width: 86px;
  padding: 8px 0 8px 4px;
}
.attendance-buttons {
  gap: 8px;
}
.attendance {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 74px;
  padding: 12px 4px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  border-color: #dce5df;
  background: #f8faf9;
}
.attendance.present {
  background: #146b58;
  border-color: #146b58;
  color: #fff;
  box-shadow: 0 3px 7px #12664e14;
}
.attendance.present:hover {
  background: #0c5545;
}
.attendance.absent {
  color: #665f60;
}
.attendance.leave {
  background: #fff9ed;
  border-color: #e9dec5;
  color: #88621e;
}
.recorded-status {
  min-height: 46px;
  background: #e9f5ee;
  border: 1px solid #d6e8dd;
  border-radius: 11px;
  padding-left: 12px;
}
.recorded-status strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.recorded-status .text-button {
  min-height: 44px;
}
.recorded-status.absent {
  border-color: #efd8d1;
  color: #91483b;
}
.recorded-status.leave {
  border-color: #eddfbd;
  color: #86601a;
}
.arrival-unmarked {
  padding: 10px 0 0;
  gap: 4px 10px;
}
.arrival-unmarked > small {
  font-size: 13px;
}
.arrival-unmarked button {
  border: 0;
  background: transparent;
  color: #326d80;
  padding: 8px 0;
  font-size: 14px;
}
.arrival-panel {
  padding: 14px 0 4px;
}
.arrival-panel button {
  font-size: 13px;
  padding: 10px;
}
.arrival-panel strong {
  font-size: 19px;
}
.arrival-badge {
  font-size: 12px;
  padding: 4px 8px;
}
.presence-panel {
  background: #f0f7f3;
  border: 1px solid #deebe2;
  border-radius: 12px;
}
.presence-panel small {
  font-size: 12px;
}
.presence-panel.outside {
  background: #edf4fb;
  border-color: #d6e4ef;
  color: #365d7c;
}
.presence-panel.left {
  border-color: #efd9ce;
}
.overtime-choice {
  margin-top: 10px;
}
.overtime-choice > button {
  background: #fbfcfd;
  color: #536978;
  border-color: #e2e8ec;
  font-size: 14px;
}
.overtime-choice > button:disabled {
  opacity: 1;
  background: #f5f7f7;
  color: #78847f;
  border-style: dashed;
}
.overtime-choice small {
  font-size: 12px;
  color: #718078;
}
.card-meta {
  font-size: 12px;
  padding-top: 12px;
  color: #6b7b72;
}
.worker-line-actions {
  border-top: 1px solid #e9eeeb;
}
.worker-line-actions .secondary {
  background: #f8faf9;
  border-color: #e5ebe7;
  font-size: 14px;
}
.leader-nav {
  width: min(560px, calc(100% - 32px));
  bottom: 12px;
  padding: 7px;
  border: 1px solid #d8e3dd;
  border-radius: 18px;
  box-shadow: 0 5px 25px #284e3714;
  gap: 6px;
}
.leader-nav button {
  min-height: 52px;
  border-radius: 12px;
  gap: 9px;
  color: #5d7167;
}
.leader-nav button.active {
  background: #e7f0eb;
  color: #155d4b;
}
.page-footer {
  color: #697970;
  font-size: 12px;
}
.history-panel {
  border-color: #dfe7e2;
  border-radius: 18px;
  box-shadow: 0 4px 14px #284e3705;
}
.history-shortcuts .secondary {
  background: #f6f9f7;
}
.history-summary span {
  background: #e9f0ec;
  border: 1px solid #dce7df;
}
.history-table th {
  background: #edf3ef;
}
.login-page {
  min-height: 100dvh;
  align-items: center;
}
.login-choices {
  padding: 32px;
  background: #fff;
  border: 1px solid #e0e7e3;
  border-radius: 24px;
  box-shadow: 0 14px 40px #234f3410;
}
#toast {
  bottom: calc(95px + env(safe-area-inset-bottom));
  font-size: 14px;
}
@media (max-width: 650px) {
  .leader-layout {
    padding: calc(12px + env(safe-area-inset-top)) 14px 106px;
  }
  .leader-header {
    padding: 16px 18px;
    border-radius: 18px;
  }
  .leader-header h1 {
    font-size: 27px;
  }
  .leader-header-top {
    margin-bottom: 14px;
  }
  .account-button {
    min-height: 44px;
    font-size: 13px;
    padding: 9px 10px;
  }
  .quick-filters {
    gap: 8px;
  }
  .quick-filters button {
    padding: 11px 10px;
  }
  .quick-filters button > span:last-child {
    min-height: 38px;
    font-size: 13px;
  }
  .quick-filters strong {
    font-size: 28px;
  }
  .worker-card {
    padding: 16px 14px 10px;
  }
  .leader-nav {
    width: 100%;
    bottom: 0;
    padding: 8px 14px calc(8px + env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
    border-bottom: 0;
    box-shadow: 0 -4px 20px #284e3708;
  }
}
@media (max-width: 360px) {
  .leader-nav button {
    padding: 10px 8px;
    gap: 7px;
    font-size: 14px;
    white-space: nowrap;
  }
  .worker-initials {
    width: 34px;
    height: 38px;
    font-size: 12px;
  }
  .worker-identity {
    gap: 8px;
  }
  .worker-name h3 {
    font-size: 17px;
  }
  .worker-departure {
    max-width: 70px;
  }
  .quick-filters button {
    padding: 10px 8px;
    gap: 6px 3px;
  }
  .quick-filters .filter-icon {
    width: 25px;
    height: 27px;
  }
  .day-controls {
    flex-wrap: wrap;
    gap: 4px;
  }
  .day-controls details {
    margin-left: auto;
  }
}
