* {
  box-sizing: border-box;
}
:root {
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;
  color: #243a36;
  background: #f5f7f6;
  font-size: 14px;
  --green: #216756;
  --border: #dce4df;
  --muted: #65786f;
}
body {
  margin: 0;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  min-height: 100vh;
}
aside {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #153f38;
  color: white;
  padding: 32px 16px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 8px 42px;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: 2px;
}
.brand small {
  display: block;
  font-size: 11px;
  letter-spacing: 3px;
  font-weight: 400;
  color: #c1d6cc;
  margin-top: 4px;
}
.brandmark {
  width: 42px;
  height: 42px;
  border: 1px solid #9daf97;
  border-radius: 11px;
  background: #dbe8cd;
  color: #234e42;
  font-size: 32px;
  text-align: center;
  line-height: 41px;
}
nav {
  display: grid;
  gap: 8px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  background: white;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: inherit;
  padding: 8px 13px;
}
button:hover {
  border-color: #6f9987;
  background: #f2f7f3;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #42846e;
  outline-offset: 2px;
}
button:disabled {
  opacity: 0.48;
  cursor: default;
}
nav button {
  display: flex;
  align-items: center;
  gap: 13px;
  background: transparent;
  border: 0;
  text-align: left;
  color: #ccdbd5;
  padding: 13px 17px;
}
nav button.active,
nav button:hover {
  background: #315e51;
  color: #fff;
}
nav svg {
  width: 19px;
  height: 19px;
}
.local {
  margin-top: auto;
  border-top: 1px solid #426259;
  padding: 19px 9px 0;
  color: #d0dfd6;
  font-size: 12px;
}
.local i,
.legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8bb997;
  margin-right: 5px;
}
main {
  min-width: 0;
}
header {
  height: 59px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3vw;
  color: var(--muted);
  font-size: 12px;
}
header b {
  padding: 0 10px;
  color: #b3bdb7;
}
#view {
  padding: 26px 3vw 45px;
  max-width: 1740px;
  margin: auto;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 29px;
  letter-spacing: 1px;
}
h2 {
  font-size: 19px;
}
h3 {
  font-size: 15px;
}
p,
small,
.muted {
  color: var(--muted);
}
.heading,
.bar,
.line,
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.heading,
.bar {
  justify-content: space-between;
}
.heading {
  margin-bottom: 22px;
}
.heading p {
  margin-top: 6px;
  font-size: 13px;
}
.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.primary:hover {
  background: #184e40;
  color: white;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 20px;
}
.stat,
.panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.stat {
  padding: 15px 17px;
  position: relative;
}
.stat strong {
  display: inline-block;
  font-size: 30px;
  margin-top: 8px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat small {
  padding-left: 6px;
}
.stat label {
  font-size: 13px;
  color: #576c62;
}
.stat .icon {
  position: absolute;
  right: 15px;
  bottom: 18px;
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #eef4ed;
  color: #4a705a;
}
.icon svg {
  width: 17px;
  height: 17px;
}
.panel {
  overflow: hidden;
  margin-bottom: 16px;
}
.pad,
.bar {
  padding: 18px 20px;
}
.bar {
  border-bottom: 1px solid var(--border);
}
.bar input[type="month"] {
  width: 154px;
}
.legend {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--muted);
}
.legend i {
  width: 7px;
  height: 7px;
}
.legend .one {
  background: #d5a545;
}
.legend .full {
  background: #a2ada6;
}
.legend .over {
  background: #c36760;
}
.week,
.grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.week {
  background: #f6f8f5;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 9px 0;
}
.day,
.blank {
  border: 0;
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-radius: 0;
  min-height: 90px;
  padding: 7px 8px;
  text-align: left;
  background: #fff;
}
.blank {
  background: #fafbf9;
}
.day:nth-child(7n),
.blank:nth-child(7n) {
  border-right: 0;
}
.day:hover {
  background: #f1f7ef;
}
.number {
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 23px;
  height: 22px;
}
.today {
  background: var(--green);
  border-radius: 6px;
  color: white;
}
.slot {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: space-between;
  margin-top: 4px;
  padding: 3px 5px;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.25;
  color: #386348;
  background: #edf4eb;
  white-space: nowrap;
}
.slot.one {
  background: #fbf2d9;
  color: #86601e;
}
.slot.full {
  background: #eff1f0;
  color: #637069;
}
.slot.over,
.warn {
  background: #faeae7;
  color: #9d4036;
}
.warn {
  padding: 9px 12px;
  border-radius: 6px;
}
.tablewrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
th,
td {
  text-align: left;
  padding: 11px 13px;
  border-bottom: 1px solid #e7ece7;
  white-space: nowrap;
}
th {
  background: #f5f7f4;
  color: var(--muted);
  font-weight: 500;
}
.empty {
  text-align: center;
  padding: 35px 12px;
  color: var(--muted);
}
input,
select,
textarea {
  border: 1px solid #cdd8d0;
  border-radius: 6px;
  padding: 8px;
  background: white;
  color: inherit;
  max-width: 100%;
}
input[type="checkbox"] {
  accent-color: var(--green);
}
label.field {
  display: grid;
  gap: 6px;
  color: #50645b;
  font-size: 13px;
}
.formgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.wide {
  grid-column: 1/-1;
}
.stack {
  display: grid;
  gap: 15px;
}
.filters {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}
.actions {
  justify-content: flex-end;
}
.tag {
  background: #ecf3ec;
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 12px;
}
.soft {
  background: #f6f8f5;
  padding: 12px;
  border-radius: 8px;
}
dialog {
  width: min(720px, 94vw);
  max-height: 88vh;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  color: inherit;
}
dialog::backdrop {
  background: #162f294f;
}
dialog .bar {
  padding: 0 0 15px;
  margin-bottom: 16px;
}
.danger {
  color: #a13e35;
}
.tiny {
  font-size: 12px;
  padding: 4px 8px;
}
#toast {
  position: fixed;
  z-index: 4;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: #1c493f;
  color: #fff;
  border-radius: 8px;
  padding: 11px 18px;
  display: none;
}
.importfile {
  display: block;
  max-width: 100%;
  margin: 12px 0;
}
#sync{padding:8px 18px;background:#e4f2ee;color:#214b43;font-size:14px}#bottom{display:none}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:8px;margin:12px 0}.datecard{display:grid;gap:6px;text-align:left}.cards .slot{margin:6px 0}.datecard .slot{font-size:14px}.local{visibility:hidden}
@media(max-width:800px){body aside{display:none}#bottom:not([hidden]){display:flex;position:fixed;inset:auto 0 0;background:#154c45;justify-content:space-around;padding:5px 0 calc(5px + env(safe-area-inset-bottom));z-index:3}#bottom button{color:white;min-height:44px;background:transparent;border:0}body main{padding-bottom:80px}body #view{padding:12px}body .cards{grid-template-columns:repeat(2,minmax(0,1fr))}body .slot{font-size:14px}body input,body select{font-size:16px;max-width:100%;min-width:0}body .heading,body .bar{flex-wrap:wrap}body .tablewrap table,body .tablewrap tbody,body .tablewrap tr{display:block;width:auto;min-width:0}body .tablewrap thead{display:none}body .tablewrap tr{padding:10px;border-bottom:1px solid #ccdcd5}body .tablewrap td{display:grid;grid-template-columns:5em 1fr;white-space:normal;overflow-wrap:anywhere;border:0;padding:4px}body .tablewrap td:before{content:attr(data-label);color:#51645c}body dialog{width:calc(100% - 16px);max-width:100%;box-sizing:border-box}body .panel{min-width:0}body #toast{bottom:72px}}
.checkrow {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.sub {
  margin: 10px 0;
}
.actions button {
  white-space: nowrap;
}
@media (min-width: 1500px) {
  .day,
  .blank {
    min-height: 116px;
  }
}
@media (max-width: 1100px) {
  body {
    grid-template-columns: 155px minmax(0, 1fr);
  }
  aside {
    padding: 24px 9px;
  }
  .brand {
    font-size: 18px;
  }
  .slot {
    font-size: 10px;
    padding: 3px;
  }
  .day,
  .blank {
    padding: 5px 3px;
  }
  .legend {
    gap: 6px;
  }
  #view {
    padding: 20px 16px;
  }
}
@media (max-width: 800px) {
  body {
    display: block;
  }
  aside {
    position: static;
    height: auto;
    padding: 10px;
  }
  .brand,
  .local {
    display: none;
  }
  nav {
    display: flex;
    overflow: auto;
    gap: 2px;
  }
  nav button {
    padding: 8px;
    white-space: nowrap;
  }
  nav svg {
    display: none;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .calendar {
    overflow: auto;
  }
  .calendar .week,
  .calendar .grid {
    min-width: 660px;
  }
  header {
    height: 40px;
  }
  .formgrid {
    grid-template-columns: 1fr;
  }
  .wide {
    grid-column: auto;
  }
  .legend {
    flex-wrap: wrap;
  }
}
