:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;
  color: #18372f;
  background: #f4f7f5;
  font-size: 15px;
  --green: #176c52;
  --muted: #678078;
  --line: #dde7e1;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  height: 76px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 28px;
  color: var(--green);
}
.brand span {
  font-size: 20px;
  font-weight: 750;
}
#identity {
  font-size: 13px;
  color: var(--muted);
}
main {
  max-width: 1180px;
  margin: 38px auto;
  padding: 0 20px;
  min-height: 75vh;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--green);
  font-weight: 700;
}
h1 {
  font-size: 32px;
  letter-spacing: -1px;
  margin: 10px 0;
}
h2 {
  font-size: 20px;
  margin: 0 0 18px;
}
h3 {
  font-size: 16px;
}
p {
  color: var(--muted);
  line-height: 1.8;
}
button,
.button {
  border: 0;
  border-radius: 9px;
  background: var(--green);
  color: white;
  padding: 11px 17px;
  cursor: pointer;
  text-decoration: none;
  font: inherit;
  white-space: nowrap;
  display: inline-block;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.secondary {
  background: #eaf1ec;
  color: var(--green);
}
.danger {
  background: #fae9e6;
  color: #a0382d;
}
.small {
  font-size: 12px;
  padding: 7px 10px;
}
.page-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}
nav {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 24px;
  overflow-x: auto;
}
nav button {
  background: transparent;
  color: var(--muted);
}
nav .active {
  background: #dcece2;
  color: var(--green);
  font-weight: 700;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 20px;
}
.filterbar {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 18px 22px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
}
input,
select {
  font: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid #ccdcd1;
  border-radius: 8px;
  background: white;
  color: #17382e;
  min-width: 120px;
}
input[type="checkbox"] {
  min-width: 0;
  width: 18px;
  height: 18px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  padding: 18px;
  border-radius: 12px;
}
.stat .value {
  font-size: 29px;
  margin-top: 10px;
  font-weight: 700;
}
.stat .label {
  font-size: 12px;
  color: var(--muted);
}
.slotgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.slotcard {
  position: relative;
}
.slotcard.current {
  border: 2px solid var(--green);
  background: #fafffb;
}
.slotcard .time {
  font-size: 25px;
  font-weight: 650;
  margin: 10px 0;
  color: var(--green);
}
.badge {
  display: inline-block;
  font-size: 11px;
  background: #eaf2ed;
  color: var(--green);
  padding: 5px 8px;
  border-radius: 5px;
}
.badge.missing {
  background: #fae7e1;
  color: #b14d32;
}
.badge.review {
  background: #fff2ce;
  color: #926b14;
}
.badge.normal,
.badge.makeup {
  background: #e0f0e6;
  color: #1c7152;
}
.badge.cancelled,
.badge.stopped {
  background: #f0f0f0;
  color: #888;
}
.table-wrap {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
  white-space: nowrap;
}
th {
  text-align: left;
  background: #f5f8f5;
  color: var(--muted);
  font-weight: 500;
  padding: 13px 12px;
}
td {
  padding: 14px 12px;
  border-bottom: 1px solid #edf1ed;
}
tr:last-child td {
  border-bottom: 0;
}
.empty {
  padding: 44px 20px;
  text-align: center;
  color: var(--muted);
}
.actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
#notice {
  padding: 14px 18px;
  border-radius: 10px;
  background: #e4f0e8;
  color: var(--green);
  margin-bottom: 18px;
}
#notice.error {
  background: #fbe9e5;
  color: #a83a2e;
}
.row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.slot-editor {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr auto auto;
  align-items: end;
  gap: 10px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.slot-editor input {
  width: 100%;
  min-width: 0;
}
.slot-editor label {
  min-width: 0;
}
.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.calendar-day {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  min-height: 110px;
}
.calendar-day details {
  font-size: 11px;
  margin-top: 8px;
  line-height: 1.8;
}
.calendar-day summary {
  cursor: pointer;
}
.calendar-day .badge {
  font-size: 10px;
  margin-top: 4px;
}
.calendar-day.day-missing {
  border-top: 3px solid #c76c4f;
}
.calendar-day.day-complete {
  border-top: 3px solid #348268;
}
.calendar-heading {
  font-size: 12px;
  color: var(--muted);
  padding: 8px;
}
.log-entry {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  line-height: 1.8;
}
.log-entry:first-child {
  padding-top: 0;
}
.log-entry:last-child {
  border: 0;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  max-width: 480px;
  width: calc(100% - 36px);
  padding: 28px;
  line-height: 1.8;
}
dialog::backdrop {
  background: #123c2d55;
}
#pagination {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin: 18px;
}
footer {
  text-align: center;
  color: #8a9c93;
  font-size: 11px;
  padding: 24px;
}
#login {
  max-width: 650px;
  margin: 12vh auto;
  padding: 40px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 760px) {
  header {
    padding: 0 18px;
    height: 65px;
  }
  #identity {
    font-size: 10px;
    max-width: 145px;
    text-align: right;
  }
  main {
    margin-top: 24px;
    padding: 0 14px;
  }
  h1 {
    font-size: 26px;
  }
  .card {
    padding: 18px;
  }
  .stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .stat {
    padding: 13px;
  }
  .stat .value {
    font-size: 24px;
  }
  .slotgrid {
    grid-template-columns: 1fr;
  }
  .filterbar {
    gap: 10px;
  }
  .filterbar label {
    flex: 1;
    min-width: 125px;
  }
  input,
  select {
    width: 100%;
  }
  .slot-editor {
    grid-template-columns: 1fr 1fr;
  }
  .slot-editor > label:first-child {
    grid-column: 1/-1;
  }
  .calendar {
    grid-template-columns: 1fr;
  }
  .calendar-heading {
    display: none;
  }
  .calendar-day {
    min-height: 0;
  }
  .calendar-day.blank {
    display: none;
  }
  #login {
    padding: 26px;
    margin: 7vh auto;
  }
  .page-title {
    gap: 10px;
  }
  .page-title p {
    font-size: 12px;
  }
}
