:root {
  font-family: system-ui;
  background: #f5f1eb;
  color: #353b45;
}
body {
  margin: 0;
  background: #f5f1eb;
}
main {
  max-width: 760px;
  margin: auto;
  padding: 16px;
}
header {
  padding: 8px 4px;
}
h1 {
  font-size: 23px;
  margin: 0;
  color: #39465a;
}
nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
  padding-bottom: 2px;
}
nav button {
  white-space: nowrap;
  flex: 0 1 auto;
}
button,
input,
select,
textarea {
  font: inherit;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #ded6cd;
  background: #fffdf9;
  color: #353b45;
}
button {
  background: #8292a6;
  color: #fff;
  border: 0;
  cursor: pointer;
  box-shadow: 0 2px 5px #8190a633;
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
}
button.secondary {
  background: #a89288;
}
section {
  background: #fffdf9;
  color: #353b45;
  padding: 16px;
  border-radius: 18px;
  min-height: 92px;
  box-shadow: 0 5px 18px #8b7b6c12;
}
label {
  display: block;
  margin: 10px 0 4px;
}
.row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.card {
  border-bottom: 1px solid #ece4dc;
  padding: 12px 0;
}
.muted {
  color: #847b75;
  font-size: 13px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 8px;
  overflow: auto;
}
.day {
  border: 1px solid #e7ded5;
  border-radius: 14px;
  padding: 10px;
  background: #fff;
}
.availability-list {
  display: grid;
  gap: 10px;
}
.availability-list .day {
  padding: 14px;
}
.choices {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 10px;
}
.choices label {
  margin: 0;
  padding: 9px 11px;
  border: 1px solid #ded6cd;
  border-radius: 10px;
  cursor: pointer;
  background: #faf6f1;
}
.choices input {
  accent-color: #8292a6;
}
.custom-fields {
  margin-top: 10px;
}
.custom-fields input {
  box-sizing: border-box;
  width: 100%;
  margin-top: 7px;
}
.hidden {
  display: none;
}
.collection-panel,
.employee-preferences,
.audit-details {
  border: 1px solid #e7ded5;
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}
.employee-role-panel,
.employee-add-form,
.employee-card {
  border: 1px solid #e7ded5;
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}
.employee-role-panel,
.employee-add-form,
.employee-list {
  display: grid;
  gap: 10px;
}
.employee-role-panel p {
  margin: 5px 0 0;
}
.employee-role-panel select,
.employee-add-form input {
  box-sizing: border-box;
  width: 100%;
}
.employee-card {
  display: grid;
  gap: 10px;
}
.employee-card p {
  margin: 4px 0 0;
}
.employee-status {
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e7f0e6;
  color: #547050;
  font-size: 13px;
}
.employee-status--inactive {
  background: #f2e3df;
  color: #8a6158;
}
.employee-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.employee-actions button:only-child {
  grid-column: 1 / -1;
}
.collection-panel select {
  box-sizing: border-box;
  display: block;
  width: 100%;
  margin-top: 6px;
}
.week-picker select {
  box-sizing: border-box;
  display: block;
  width: 100%;
  margin-top: 6px;
}
.employee-preferences-list,
.audit-list {
  display: grid;
  gap: 10px;
}
.employee-preferences__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #ece4dc;
}
.employee-preferences__body {
  padding-top: 12px;
}
.small-button {
  padding: 8px 10px;
  font-size: 14px;
  white-space: nowrap;
}
.preference-list {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  overflow-wrap: anywhere;
}
.week-comment {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #ece4dc;
}
.week-comment p {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
}
.audit-week {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  text-align: left;
}
.audit-details {
  margin-top: -4px;
}
.audit-person {
  padding: 8px 0;
  border-bottom: 1px solid #ece4dc;
}
.audit-person:last-child {
  border-bottom: 0;
}
table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 13px;
  overflow: hidden;
  border: 1px solid #e7ded5;
  border-radius: 12px;
}
td,
th {
  padding: 8px;
  border-bottom: 1px solid #e7ded5;
  text-align: left;
  vertical-align: top;
}
th {
  background: #f3ece4;
  color: #596477;
}
@media (max-width: 600px) {
  main {
    padding: 12px max(12px, env(safe-area-inset-right)) 18px
      max(12px, env(safe-area-inset-left));
  }
  nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  nav button {
    width: 100%;
    font-size: 15px;
    padding: 11px 7px;
  }
  section {
    padding: 14px;
  }
  .employee-preferences__head {
    align-items: flex-start;
  }
  .collection-panel,
  .employee-preferences,
  .audit-details {
    padding: 12px;
  }
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
