* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  color: #21271d;
  background: #f8f5ed;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  line-height: 1.44;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}
a {
  color: inherit;
}
img {
  display: block;
  max-width: 100%;
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
button {
  color: inherit;
}
button.plain,
.plain {
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
}
button.primary,
.primary {
  border: 0;
  text-decoration: none;
  background: #263725;
  color: #fff;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  padding: 13px 20px;
  min-height: 44px;
  border-radius: 4px;
  font-size: 0.91rem;
  font-weight: 700;
}
button.secondary,
.secondary {
  background: #fff;
  border: 1px solid #d9d9ce;
  color: #283425;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 4px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 650;
  font-size: 0.87rem;
}
.primary:hover {
  background: #3b5239;
}
.secondary:hover {
  background: #f3f5ed;
}
input,
select,
textarea {
  min-width: 0;
  border: 1px solid #d9d9ce;
  border-radius: 4px;
  background: white;
  color: #263026;
  padding: 9px 11px;
  width: 100%;
}
textarea {
  min-height: 86px;
  resize: vertical;
}
label.field {
  display: grid;
  gap: 5px;
  align-content: start;
  font-size: 0.86rem;
  font-weight: 650;
}
form {
  display: grid;
  gap: 13px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.form-grid > .wide {
  grid-column: 1/-1;
}
.actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.muted {
  color: #67705e;
}
.status {
  background: #ebefe4;
  color: #30472d;
  border-radius: 2px;
  padding: 3px 8px;
  font-size: 0.78rem;
  display: inline-block;
}
dialog {
  width: min(580px, calc(100% - 26px));
  max-height: calc(100dvh - 30px);
  padding: 0;
  border: 1px solid #d9d9ce;
  border-radius: 10px;
  background: #fdfbf5;
  color: #202a20;
  box-shadow: 0 22px 80px #2926164d;
  overflow: auto;
}
dialog::backdrop {
  background: #1723168c;
}
dialog .dialog-head {
  padding: 17px 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid #e1dfd3;
  gap: 10px;
}
dialog .dialog-body {
  padding: 20px;
}
dialog .close {
  font-size: 1.6rem;
  line-height: 1.05;
  background: transparent;
  border: 0;
  padding: 5px 9px;
  color: #53614c;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  max-width: 90vw;
  background: #263725;
  border-radius: 6px;
  padding: 11px 18px;
  color: white;
  box-shadow: 0 4px 25px #181b1844;
}
.dialog-error {
  color: #8c351e;
  white-space: pre-wrap;
}
.warning {
  color: #875425;
}
.empty {
  padding: 20px;
  background: #f0eee3;
  border: 1px dashed #d8d5c5;
  border-radius: 5px;
}
.amounts {
  display: grid;
  gap: 6px;
  margin: 10px 0 14px;
}
.amounts div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.amounts div:last-child {
  border-top: 1px solid #deddd1;
  padding-top: 7px;
  font-weight: bold;
}
.section-gap {
  margin-top: 18px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 550px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}
