.month-grid {
  --date-width: 9.25rem;
  position: relative;
  isolation: isolate;
  overflow: auto;
  width: 100%;
  max-height: 72vh;
  max-height: 72dvh;
  border-block: 1px solid var(--line);
  scroll-padding: 2.7rem .3rem 2.9rem calc(var(--date-width) + .3rem);
}

.month-grid:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: -2px;
}

.month-roster {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.22;
}

.month-roster th,
.month-roster td {
  padding: .1rem .32rem;
  border-block-end: 1px solid #e1e8e0;
  border-inline-end: 1px solid #ebefea;
  background: var(--row-color, #fff);
}

.month-roster tr.closed-day {
  --row-color: #fff5df;
}

.month-roster tr.trading-day {
  --row-color: #eff5fa;
}

.month-roster tr:last-child td,
.month-roster tbody tr:last-child th {
  border-block-end: 0;
}

.month-roster thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 2.45rem;
  padding-inline: .65rem;
  font-weight: 700;
  color: #244a39;
  background: #edf3e9;
  border-color: #d2ddcf;
}

.month-roster th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  width: var(--date-width);
  min-width: var(--date-width);
  max-width: var(--date-width);
  padding-inline: .7rem;
  border-inline-end-color: #cbd7c9;
}

.month-roster thead th:first-child {
  z-index: 3;
}

.month-roster .row-date, .roster .row-date {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: .1rem .18rem;
  padding-block: .12rem;
}
.roster .row-date { width:100%; grid-column:1 / -1; }
.date-actions { display:flex; align-items:center; justify-content:flex-end; gap:0; }
.month-roster .date-actions .note-btn { min-width:1.65rem; min-height:2rem; }

.month-roster .day-head {
  display: flex;
  flex-direction: column;
  gap: .12rem;
}

.month-roster .day-head .badge {
  padding: 0;
  font-size: .75rem;
  text-align: left;
  background: transparent;
}

.month-roster .date-title strong {
  font-size: .98rem;
}

.month-roster .day-note {
  grid-column: 1 / -1;
  color: #355b45;
  padding-block-end: .1rem;
}

.month-roster .note-btn {
  margin: 0;
  align-self: start;
  min-height: 2.1rem;
  min-width: 1.75rem;
  border-radius: 4px;
}

.month-roster .note-btn:hover {
  background: var(--pale);
}

.month-roster .entry-btn {
  display: block;
  width: 100%;
  min-width: 6.2rem;
  min-height: 2.2rem;
  padding: .12rem;
}

.month-roster .entry-btn:hover,
.month-roster .entry-btn:focus-visible,
.month-roster .note-btn:focus-visible {
  outline-offset: -2px;
}

.month-roster .shift,
.month-roster .badge {
  font-size: .875rem;
}

.month-roster .coverage {
  min-width: 5.25rem;
  padding-inline: .6rem;
}

.month-roster tfoot > tr > *,
.roster tfoot > tr > * {
  border-top: 2px solid #9eb8a8;
  color: #183f30;
  background: #eaf2eb;
  font-size: .875rem;
  font-weight: 650;
  white-space: nowrap;
}

.month-roster tfoot > tr > * {
  position: sticky;
  bottom: 0;
  z-index: 1;
  padding: .55rem .65rem;
}

.month-roster tfoot th:first-child {
  z-index: 2;
}

.month-roster .hours-total,
.roster .hours-total {
  font-weight: 750;
}

@media (max-width: 940px) {
  .month-grid {
    --date-width: 7.5rem;
  }
  .month-roster th:first-child {
    padding-inline: .42rem;
  }
  .month-roster .entry-btn {
    min-height: 2.75rem;
  }
  .month-roster .note-btn {
    min-height: 2.55rem;
    min-width: 1.85rem;
  }
  .roster tfoot {
    display: block;
    margin: 0 .85rem 1rem;
  }
  .roster tfoot tr {
    background: #eaf2eb;
  }
  .roster tfoot th {
    padding: 0 0 .4rem;
    border: 0;
  }
  .roster tfoot td {
    border-top: 1px solid #cbd9ce;
  }
  .roster tfoot .hours-total {
    border-top: 2px solid #9eb8a8;
  }
}


.stat .premium-hours {
  margin-top: .35rem;
  line-height: 1.35;
}

@media (max-width: 550px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats .stat-hours {
    order: -1;
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    padding-inline: .75rem;
  }
  .stat-hours .stat-icon { margin: 0; }
}
.day-warning { position:relative; display:inline-grid; place-items:center; width:1.65rem; min-width:1.65rem; height:1.75rem; padding:0; border:0; background:transparent; color:#ae292b; font-size:.8rem; font-weight:800; line-height:1; cursor:pointer; }
.day-warning::before { content:''; position:absolute; width:.88rem; height:.88rem; border:1.5px solid currentColor; border-radius:50%; }
.day-warning:focus-visible { outline:3px solid #23638d; outline-offset:2px; }
.warning-tabs { display:flex; flex-wrap:wrap; gap:.4rem; margin:1rem 0 .6rem; }
.warning-tabs button { padding:.5rem .75rem; border:1px solid #b7c8bc; border-radius:8px; background:#fff; color:#254735; font-weight:650; cursor:pointer; }
.warning-tabs button[aria-pressed="true"] { background:#e4eddc; border-color:#8fae9c; }
.warning-list { list-style:none; padding:0; margin:0; }
.warning-list li { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:.5rem 1rem; padding:.65rem 0; border-top:1px solid #e3e9e1; }
.warning-list li span { flex:1 1 18rem; }
.warning-empty { margin:.8rem 0 0; }
