:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #203631;
  background: #f3f6f3;
  font-size: 15px;
  --green: #23634f;
  --border: #dce5de;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid var(--border);
  background: white;
  border-radius: 9px;
  padding: 10px 15px;
  color: inherit;
}
button:hover {
  background: #eaf3eb;
}
button.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
button.danger {
  color: #a73535;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
input,
select,
textarea {
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  max-width: 100%;
}
input:not([type="checkbox"]),
select,
textarea {
  width: 100%;
}
label {
  display: grid;
  gap: 7px;
  font-size: 0.9rem;
}
label.check {
  display: flex;
  align-items: center;
}
h1 {
  font-size: 1.9rem;
  margin: 0 0 8px;
  font-weight: 650;
  letter-spacing: -0.04em;
}
h2 {
  font-size: 1.2rem;
  margin-top: 0;
}
p {
  line-height: 1.6;
}
.muted {
  color: #6a7d74;
}
.shell {
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: 100vh;
}
aside {
  background: #173e32;
  color: #e1eee7;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.brand {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.brand small {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  margin-top: 8px;
  font-weight: 400;
}
nav {
  display: grid;
  gap: 7px;
}
nav button {
  text-align: left;
  border: 0;
  background: transparent;
  color: #cbdfd4;
}
nav button.active {
  background: #315b4c;
  color: white;
}
aside footer {
  margin-top: auto;
  font-size: 0.85rem;
}
main {
  padding: 35px;
  min-width: 0;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.actions {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}
.actions input,
.actions select {
  width: auto;
}
.panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 23px;
  margin-bottom: 18px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}
.form {
  display: grid;
  gap: 17px;
}
.row {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}
.row > * {
  flex: 1;
  min-width: 120px;
}
.stack {
  display: grid;
  gap: 12px;
}
.empty {
  padding: 45px 20px;
  text-align: center;
  color: #728176;
}
.error {
  color: #a73535;
  white-space: pre-wrap;
}
.tag {
  display: inline-block;
  border-radius: 20px;
  padding: 4px 9px;
  background: #edf3ef;
  font-size: 0.75rem;
}
.calendar {
  display: flex;
  gap: 12px;
  overflow: auto;
  align-items: stretch;
}
.column {
  flex: 1;
  min-width: 210px;
  background: #fafcf9;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}
.column h2 {
  font-size: 1rem;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.appointment {
  display: block;
  text-align: left;
  width: 100%;
  margin-bottom: 10px;
  border-left: 4px solid #5a9879;
  background: white;
}
.appointment strong,
.appointment small {
  display: block;
  margin: 5px 0;
}
.appointment.completed {
  border-left-color: #87938b;
  opacity: 0.75;
}
.appointment.cancelled {
  opacity: 0.5;
}
.appointment.needs_attention {
  border-left-color: #d99235;
}
.stats {
  display: flex;
  gap: 25px;
  margin-bottom: 24px;
  color: #68796f;
}
.stats strong {
  font-size: 1.5rem;
  color: #24483a;
  margin-right: 7px;
}
table {
  width: 100%;
  border-collapse: collapse;
}
td,
th {
  text-align: left;
  padding: 14px 10px;
  border-bottom: 1px solid var(--border);
}
th {
  font-size: 0.8rem;
  color: #708078;
}
dialog {
  border: 0;
  border-radius: 18px;
  padding: 28px;
  max-width: 740px;
  width: calc(100% - 28px);
  max-height: 90vh;
  box-shadow: 0 24px 100px #0c2c3355;
}
dialog::backdrop {
  background: #12332d77;
}
dialog header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
dialog header h2 {
  margin: 0;
}
.login {
  max-width: 420px;
  margin: 9vh auto;
  padding: 30px;
}
.login .brand {
  color: var(--green);
  margin-bottom: 35px;
}
.login h1 {
  font-size: 1.7rem;
}
.login footer {
  margin-top: 25px;
  font-size: 0.8rem;
}
#notice {
  position: fixed;
  bottom: 20px;
  right: 20px;
  max-width: 420px;
  background: #173e32;
  color: white;
  padding: 15px 20px;
  border-radius: 10px;
  display: none;
  z-index: 10;
}
.scroll {
  overflow: auto;
}
.assignment {
  padding: 12px;
  background: #f3f6f3;
  border-radius: 9px;
}
.search-results {
  max-height: 240px;
  overflow: auto;
}
.search-results button {
  display: block;
  width: 100%;
  text-align: left;
  margin-bottom: 6px;
}
a {
  color: var(--green);
}
:focus-visible {
  outline: 3px solid #78b99b;
  outline-offset: 2px;
}
@media (max-width: 800px) {
  .shell {
    grid-template-columns: 1fr;
  }
  aside {
    padding: 18px;
    gap: 15px;
  }
  nav {
    display: flex;
    overflow: auto;
  }
  nav button {
    white-space: nowrap;
  }
  aside footer {
    display: none;
  }
  main {
    padding: 20px;
  }
  .brand small {
    display: none;
  }
  .column {
    min-width: 220px;
  }
  td,
  th {
    padding: 10px 5px;
  }
  .row > * {
    min-width: 140px;
  }
}
aside select,
aside footer button {
  color: #203631;
}
aside label {
  color: #d2e2d8;
}
/* Sidebar hover must override the global light button background. */
nav button:hover,
nav button:focus-visible {
  background: #dceee2;
  color: #173e32;
}
nav button.active:hover,
nav button.active:focus-visible {
  background: #406d59;
  color: #fff;
}
.timeline-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.legend {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: #52685c;
}
.legend span::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 6px;
  background: #e4f3e7;
  border: 1px solid #9dbda5;
}
.legend .legend-booked::before {
  background: #cee4f5;
  border-color: #7ca5c6;
}
.legend .legend-off::before {
  background: #e6eae7;
  border-color: #c5cdc7;
}
.legend .legend-leave::before {
  background: #eee5f3;
  border-color: #bc9bcd;
}
.timeline-help {
  font-size: 0.8rem;
  margin: 12px 0;
}
.timeline-view {
  height: min(70vh, 780px);
  min-height: 300px;
  overflow: auto;
  border: 1px solid #cad8ce;
  border-radius: 12px;
  background: white;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.timeline-grid {
  display: grid;
  grid-template-rows: 48px auto;
  width: max-content;
  min-width: 100%;
  isolation: isolate;
}
.timeline-header,
.timeline-corner {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #f0f6f1;
  border-bottom: 1px solid #c7d5cb;
  border-right: 1px solid #dce5de;
  padding: 15px 10px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 48px;
}
.timeline-corner {
  left: 0;
  z-index: 6;
  text-align: center;
  color: #63796b;
  font-size: 0.8rem;
}
.timeline-rail {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #f6f9f5;
  border-right: 1px solid #c7d5cb;
}
.timeline-tick {
  position: absolute;
  left: 0;
  right: 0;
  font-size: 0.73rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
  border-top: 1px solid #dce5de;
  padding-top: 5px;
  pointer-events: none;
}
.timeline-lane {
  position: relative;
  background: #f0f3ef;
  border-right: 1px solid #d5e0d7;
  min-width: 0;
}
.timeline-slot {
  position: absolute;
  left: 0;
  width: 100%;
  border-radius: 0;
  border: 0;
  border-top: 1px solid #cdded0;
  background: #edf7ef;
  color: #507d5b;
  text-align: left;
  padding: 5px 8px;
  font-size: 0.75rem;
  overflow: hidden;
  white-space: nowrap;
}
.timeline-slot:disabled {
  cursor: default;
  opacity: 1;
}
.timeline-slot.offshift,
.timeline-slot.booked {
  background: #eef1ed;
  color: #87948b;
  border-color: #dfe5df;
}
.timeline-slot.leave {
  background: #f0e9f5;
  color: #8b719d;
  border-color: #e0d4e7;
}
.timeline-slot.free:hover {
  background: #d2ead9;
  color: #1a5833;
}
.timeline-slot.selected {
  background: #c4e5d0;
  box-shadow: inset 0 0 0 2px #357b53;
  color: #174d2c;
  font-weight: 650;
}
.timeline-booking {
  position: absolute;
  left: 3px;
  width: calc(100% - 6px);
  z-index: 2;
  border: 1px solid #9ebdd4;
  border-left: 4px solid #4e8ab4;
  border-radius: 6px;
  background: #ddecf8;
  text-align: left;
  padding: 4px 7px;
  color: #234660;
  overflow: hidden;
  font-size: 0.78rem;
  min-height: 4px;
}
.timeline-booking:hover {
  background: #cbe2f3;
  border-color: #578eb5;
}
.timeline-booking strong,
.timeline-booking small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 3px;
}
.timeline-booking.completed {
  background: #e2e8e2;
  border-color: #b3c1b4;
  color: #506353;
}
.timeline-booking.needs_attention {
  background: #fff0d7;
  border-color: #cf9c4f;
  color: #7a5522;
}
.timeline-now {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #dc5e57;
  pointer-events: none;
  z-index: 3;
}
.timeline-selection {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: #e2f0e5;
  border: 1px solid #a7c9b0;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 12px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 800px) {
  .timeline-view {
    height: 65vh;
  }
  .timeline-tools {
    gap: 8px;
  }
  .timeline-help {
    line-height: 1.5;
  }
}
.timeline-booking {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
}
