:root {
  --ink: #192f2b;
  --muted: #536a62;
  --green: #1d5c48;
  --line: #d7dfd8;
  --paper: #f5f7f2;
  --white: #fff;
  --gold: #e9d19d;
  font:
    15px/1.6 -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button,
a,
input,
select,
textarea {
  outline-offset: 3px;
}
a {
  color: var(--green);
}
.ico {
  width: 20px;
  height: 20px;
  flex: none;
  vertical-align: middle;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 37px;
  letter-spacing: -0.05em;
  line-height: 1.25;
}
h2 {
  font-size: 20px;
  letter-spacing: -0.035em;
}
h3 {
  font-size: 16px;
}
.muted,
small,
.sub {
  color: var(--muted);
}
small,
.sub {
  font-size: 12px;
}
.layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  min-height: 100dvh;
}
.rail {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100dvh;
  background: #eaf0e7;
  border-right: 1px solid var(--line);
  padding: 30px 16px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 750;
  font-size: 23px;
  letter-spacing: 0.07em;
}
.brand small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: #516858;
  font-weight: 550;
}
.mark {
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #214e40;
  color: #f6eed7;
  width: 41px;
  height: 44px;
}
.mark .ico {
  width: 28px;
  height: 28px;
}
.rail nav {
  margin-top: 40px;
  display: grid;
  gap: 6px;
}
.rail button,
.bottom button {
  border: 0;
  background: transparent;
  color: #445e53;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 9px;
  padding: 11px 14px;
  font-weight: 550;
}
.rail button.on,
.bottom button.on {
  background: #d3e2d5;
  color: #164c39;
}
.rail footer {
  margin-top: auto;
  font-size: 12px;
  color: var(--muted);
}
.rail footer button {
  padding: 8px 0;
}
.stage {
  min-width: 0;
}
.top {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 0 clamp(20px, 4vw, 64px);
  gap: 12px;
}
.context {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}
.context b {
  color: var(--ink);
}
.searchbtn {
  border: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  border-radius: 30px;
  padding: 7px 14px;
  font-size: 13px;
}
.workspace {
  margin: 0 auto;
  max-width: 1450px;
  padding: clamp(22px, 3.4vw, 46px) clamp(20px, 4vw, 64px) 80px;
}
.head,
.sectionhead,
.spread,
.row,
.line,
.actions,
.tags {
  display: flex;
  align-items: center;
  gap: 10px;
}
.head,
.sectionhead,
.spread {
  justify-content: space-between;
}
.head {
  margin-bottom: 25px;
}
.head p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 6px;
}
.actions,
.tags {
  flex-wrap: wrap;
}
.btn,
.link,
.tab,
.iconbtn {
  border: 1px solid var(--line);
  background: #fff;
  padding: 8px 13px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 550;
  text-decoration: none;
  font-size: 14px;
  min-height: 40px;
}
.btn.primary {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
.link {
  color: var(--green);
  background: none;
  border: 0;
  padding: 5px;
  font-size: 13px;
}
.iconbtn {
  width: 40px;
  padding: 6px;
}
.hero {
  position: relative;
  overflow: hidden;
  background: #183f34;
  color: white;
  border-radius: 14px;
  padding: 26px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 170px;
}
.hero h2 {
  font-size: 23px;
  color: #fff;
}
.hero small {
  color: #c7dacf;
  display: flex;
  align-items: center;
  gap: 7px;
}
.metrics {
  display: flex;
  gap: 34px;
  margin-top: 19px;
}
.metric b {
  font-size: 30px;
  line-height: 1.1;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
}
.metric span {
  display: block;
  font-size: 12px;
  color: #d0e2d5;
  margin-top: 4px;
}
.folderart {
  width: 150px;
  height: 108px;
  position: relative;
  margin-right: 10px;
  transform: rotate(-7deg);
}
.folderart:before,
.folderart:after,
.folderart i {
  content: "";
  position: absolute;
  border-radius: 5px;
  border: 1px solid #81a994;
}
.folderart:before {
  inset: 0 16px 12px 10px;
  background: repeating-linear-gradient(
    0deg,
    #bed0b5 0 12px,
    #a5bda4 12px 13px
  );
  transform: rotate(12deg);
}
.folderart i {
  inset: 8px 6px 5px 5px;
  background: #eaebd8;
  transform: rotate(4deg);
}
.folderart:after {
  inset: 21px 0 0;
  background: linear-gradient(125deg, #709882, #456d58);
  clip-path: polygon(0 0, 38% 0, 45% 9%, 100% 9%, 100% 100%, 0 100%);
}
.folderart span {
  position: absolute;
  z-index: 2;
  top: 51px;
  left: 18px;
  color: #ecedcf;
}
.columns {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(240px, 1fr);
  gap: 24px;
  margin-top: 29px;
}
.sectionhead {
  margin: 0 0 13px;
}
.card,
.panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  overflow: hidden;
}
.panel {
  padding: 19px;
}
.stack {
  display: grid;
  gap: 16px;
}
.event,
.docrow,
.task,
.record {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: white;
  padding: 16px;
  color: var(--ink);
}
.event:last-child,
.docrow:last-child,
.task:last-child,
.record:last-child {
  border-bottom: 0;
}
.event:hover,
.docrow:hover,
.task:hover,
.record:hover {
  background: #f7f9f5;
}
.grow {
  flex: 1;
  min-width: 0;
}
.grow strong,
.grow small {
  display: block;
  overflow-wrap: anywhere;
}
.grow strong {
  font-size: 15px;
}
.calendar {
  width: 50px;
  text-align: center;
  border-right: 1px solid var(--line);
  padding-right: 12px;
  flex: none;
}
.calendar b {
  display: block;
  font-size: 25px;
  line-height: 1.1;
  font-weight: 560;
  letter-spacing: -1px;
}
.calendar small {
  font-size: 11px;
}
.pill {
  display: inline-flex;
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 5px;
  background: #e8f1e8;
  color: #315c46;
  white-space: nowrap;
}
.pill.amber {
  background: #faf0db;
  color: #7b5723;
}
.glyph {
  width: 36px;
  height: 40px;
  color: #396c55;
  display: grid;
  place-items: center;
  background: #edf3ea;
  border-radius: 8px;
  flex: none;
}
.task .glyph {
  background: #f7efdc;
  color: #836b3b;
}
.second {
  margin-top: 24px;
}
.quick {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  background: #e9efe4;
  color: #213e32;
  text-align: left;
  width: 100%;
  padding: 16px;
  border-radius: 10px;
}
.quick strong,
.quick small {
  display: block;
}
.tagline {
  font-size: 12px;
  color: var(--muted);
}
.empty {
  padding: 22px 16px;
  color: var(--muted);
  font-size: 14px;
}
.sectiontitle {
  margin: 20px 0 9px;
}
.filters,
.formgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.filters {
  margin-bottom: 15px;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 550;
}
label input,
label select,
label textarea,
.searchbox {
  display: block;
  width: 100%;
  margin-top: 4px;
}
input:not([type="checkbox"]),
textarea,
select {
  border: 1px solid #bac9bf;
  background: white;
  border-radius: 7px;
  padding: 9px;
  min-height: 42px;
  min-width: 0;
  max-width: 100%;
}
input[type="checkbox"] {
  accent-color: var(--green);
  width: 18px;
  height: 18px;
}
.check {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 0;
}
.check input {
  flex: none;
}
.form {
  display: grid;
  gap: 14px;
}
.form .actions {
  margin-top: 6px;
}
.bottom {
  display: none;
}
.mobilebrand {
  display: none;
}
.error {
  color: #903b34;
}
.tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.tab {
  background: #eef2ea;
  border-color: transparent;
}
.tab.on {
  background: #245b48;
  color: white;
}
.details {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 6px 10px;
  font-size: 13px;
}
.details dt {
  color: var(--muted);
}
.details dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.tablewrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 10px;
  white-space: nowrap;
}
th {
  font-size: 12px;
  color: var(--muted);
  background: #f4f6f1;
}
.chart {
  width: 100%;
  max-height: 240px;
}
.chart text {
  font: 12px system-ui;
  fill: #4e665b;
}
.dategroup {
  margin: 17px 0 6px;
  color: var(--muted);
  font-size: 13px;
}
.modalhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
dialog {
  width: min(580px, 94vw);
  max-height: 91dvh;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  padding: 22px;
  color: var(--ink);
}
dialog::backdrop {
  background: #11241ed1;
}
dialog.wide {
  width: min(980px, 97vw);
}
.viewer {
  overflow: auto;
  max-height: 63dvh;
  border: 1px solid var(--line);
  background: #dfe5dd;
  text-align: center;
}
.viewer img,
.viewer canvas {
  display: block;
  margin: auto;
  height: auto;
}
.fullscreen {
  position: fixed !important;
  inset: 0 !important;
  max-width: 100vw !important;
  max-height: 100dvh !important;
  width: 100vw !important;
  height: 100dvh !important;
  border-radius: 0 !important;
  margin: 0 !important;
}
.fullscreen .viewer {
  max-height: 76dvh;
}
.toolbar {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin: 10px 0;
}
.toolbar button {
  min-height: 36px;
}
.notice {
  padding: 10px 12px;
  border-left: 3px solid #a98a50;
  background: #f6f0e1;
  font-size: 13px;
}
.login {
  max-width: 420px;
  margin: 12vh auto;
  padding: 26px;
}
.login .brand {
  margin-bottom: 30px;
}
.login h1 {
  font-size: 26px;
  margin-bottom: 16px;
}
#toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: #163f31;
  color: white;
  padding: 9px 18px;
  border-radius: 8px;
  z-index: 5;
  pointer-events: none;
}
#toast:empty {
  display: none;
}
.filelist {
  list-style: none;
  padding: 0;
}
.filelist li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.hidden {
  display: none !important;
}
.visually {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.doctor {
  max-width: 780px;
  margin: auto;
}
.doctor h1 {
  font-size: 27px;
}
.doctor section {
  margin-top: 20px;
}
.timeline {
  border-left: 2px solid #94ad9a;
  padding-left: 18px;
}
.timeline article {
  margin: 0 0 16px;
}
.timeline h3 {
  font-size: 17px;
}
.data-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 1000px) {
  .layout {
    grid-template-columns: 158px minmax(0, 1fr);
  }
  .rail {
    padding: 22px 9px;
  }
  .columns {
    grid-template-columns: 1.4fr 1fr;
    gap: 14px;
  }
  .workspace {
    padding-left: 20px;
    padding-right: 20px;
  }
  .folderart {
    width: 117px;
  }
  .top {
    padding: 0 20px;
  }
}
@media (max-width: 700px) {
  .layout {
    display: block;
  }
  .rail,
  .context {
    display: none;
  }
  .mobilebrand {
    display: flex;
  }
  .top {
    height: 58px;
    padding: 0 17px;
  }
  .top .brand {
    font-size: 18px;
  }
  .top .mark {
    width: 30px;
    height: 32px;
    border-radius: 7px;
  }
  .top .mark svg {
    width: 21px;
  }
  .top .brand small {
    display: none;
  }
  .searchbtn {
    font-size: 12px;
  }
  .workspace {
    padding: 20px 16px 94px;
  }
  .head {
    margin-bottom: 16px;
    align-items: flex-start;
  }
  .head h1 {
    font-size: 28px;
  }
  .head p {
    font-size: 12px;
  }
  .head .btn {
    font-size: 13px;
    padding: 7px 10px;
  }
  .hero {
    padding: 19px;
    min-height: 148px;
  }
  .hero h2 {
    font-size: 19px;
  }
  .folderart {
    width: 76px;
    height: 74px;
    margin-right: 0;
  }
  .folderart span {
    top: 37px;
    left: 9px;
  }
  .metrics {
    gap: 19px;
    margin-top: 15px;
  }
  .metric b {
    font-size: 24px;
  }
  .metric span {
    font-size: 11px;
  }
  .columns,
  .grid2 {
    grid-template-columns: 1fr;
  }
  .columns {
    margin-top: 20px;
    gap: 20px;
  }
  .sectionhead {
    margin-bottom: 8px;
  }
  .sectionhead h2,
  h2 {
    font-size: 18px;
  }
  .second {
    margin-top: 16px;
  }
  .event,
  .docrow,
  .task,
  .record {
    padding: 12px 11px;
    gap: 9px;
  }
  .calendar {
    width: 41px;
    padding-right: 8px;
  }
  .panel {
    padding: 14px;
  }
  .bottom {
    position: fixed;
    display: flex;
    z-index: 2;
    bottom: 0;
    left: 0;
    right: 0;
    background: #f7faf5f7;
    border-top: 1px solid var(--line);
    padding: 5px 6px max(5px, env(safe-area-inset-bottom));
    justify-content: space-around;
  }
  .bottom button {
    flex: 1;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    font-size: 11px;
    padding: 4px 0;
    gap: 1px;
  }
  .bottom button.on {
    background: transparent;
    color: #105236;
    font-weight: 750;
  }
  .bottom button.on .ico {
    background: #d9e7d8;
    width: 36px;
    border-radius: 8px;
  }
  .filters,
  .formgrid {
    grid-template-columns: 1fr 1fr;
  }
  .filters label:first-child:last-child {
    grid-column: 1/-1;
  }
  #toast {
    bottom: 75px;
  }
  .head .actions {
    justify-content: flex-end;
  }
  dialog {
    padding: 17px;
  }
  .login {
    margin: 9vh 12px;
  }
  .record .pill {
    white-space: normal;
  }
  .row {
    flex-wrap: wrap;
  }
  .btn {
    line-height: 1.35;
  }
}
@media print {
  .rail,
  .top,
  .bottom,
  .actions,
  .modalhead button,
  #toast {
    display: none;
  }
  .layout,
  .workspace {
    display: block;
    padding: 0;
  }
  .doctor {
    max-width: none;
  }
}
@media (max-width: 700px) {
  .top .brand small {
    display: block;
    font-size: 9px;
    letter-spacing: 0.09em;
  }
  .top .brand {
    line-height: 1.25;
  }
}
@media print {
  body.doctor-print .layout,
  body.doctor-print .modalhead,
  body.doctor-print dialog button {
    display: none !important;
  }
  body.doctor-print dialog.fullscreen {
    display: block;
    position: static !important;
    inset: auto !important;
    width: auto !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible;
    border: 0;
    background: white;
    padding: 0;
  }
  body.doctor-print dialog::backdrop {
    display: none;
  }
  body.doctor-print .doctor button[data-act="doctor-doc"] {
    display: inline !important;
    border: 0;
    padding: 0;
  }
}

:focus-visible {
  outline: 3px solid #267256;
  outline-offset: -3px;
}
.recent {
  min-height: 130px;
  gap: 16px;
}
.recent p {
  color: #e0ebe5;
  margin: 6px 0 0;
}
.recent h2 {
  margin: 6px 0;
}
.core {
  margin: 16px 0 24px;
}
.homegrid {
  align-items: start;
}
.inventory {
  margin-top: 16px;
}
.archive-event .event[aria-expanded="true"] > .ico {
  transform: rotate(90deg);
}
.docgroup {
  font-size: 15px;
  margin: 0;
  padding: 10px 15px;
  background: #edf3ed;
}
.marker-row,
.marker-heading {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1.35fr;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  text-align: left;
}
.marker-row {
  border: 0;
  border-top: 1px solid var(--line);
  width: 100%;
  background: white;
  color: var(--ink);
  font-size: 14px;
}
.marker-row small,
.homegrid small {
  display: block;
  color: #52685e;
}
.marker-heading {
  background: #eff4ef;
  font-size: 13px;
}
.rule,
.rules,
.picker {
  margin: 8px 0;
}
summary {
  cursor: pointer;
  min-height: 44px;
  padding: 10px 0;
}
.rule .check,
.picker .check {
  border-top: 1px solid var(--line);
}
.rule[open],
.rules[open] {
  padding-bottom: 12px;
}
#pick-preview {
  margin-bottom: 12px;
}
.series .chart {
  max-width: 640px;
}
.series p {
  margin: 6px 0;
}
@media (max-width: 700px) {
  .btn,
  .link,
  .tab,
  .check,
  .searchbtn {
    min-height: 44px;
  }
  .core {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }
  .core .btn {
    padding: 7px 2px;
    font-size: 14px;
    gap: 3px;
  }
  .recent {
    min-height: 120px;
  }
  .recent .btn {
    flex: none;
  }
  .marker-heading {
    display: none;
  }
  .marker-row {
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
  }
  .marker-row span:nth-child(even) {
    text-align: right;
  }
  .marker-row span:nth-child(n + 3) {
    color: #506458;
    font-size: 13px;
  }
  .series h3 {
    font-size: 16px;
  }
  .tablewrap:has(table) td {
    font-size: 14px;
  }
  .tablewrap:has(table) {
    overflow: auto;
  }
  .modalhead {
    position: sticky;
    top: 0;
    background: white;
    z-index: 2;
  }
}
@media (max-width: 700px) {
  .lab-history table,
  .lab-history tbody {
    display: block;
  }
  .lab-history thead {
    position: absolute;
    clip-path: inset(50%);
    width: 1px;
    height: 1px;
    overflow: hidden;
  }
  .lab-history tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px 10px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
  }
  .lab-history td {
    border: 0;
    padding: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .lab-history .cell-label {
    display: block;
    color: #52675c;
    font-size: 12px;
  }
  .lab-history .link {
    padding-left: 0;
  }
}
.recent .btn {
  color: var(--green);
}
@media (max-width: 700px) {
  .toolbar .btn {
    min-height: 44px;
  }
}

.cell-label {
  display: none;
}
