:root {
  font:
    15px/1.45 "Inter",
    "Segoe UI",
    sans-serif;
  color: #202b29;
  background: #f6f7f4;
  --line: #dce1dc;
  --muted: #60706a;
  --green: #11664e;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
header {
  min-height: 66px;
  background: #172b25;
  color: #eff8f2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px clamp(18px, 4vw, 60px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
}
.brand strong {
  letter-spacing: 0.07em;
}
.brand span {
  color: #8aa599;
}
.mark {
  display: grid;
  place-items: center;
  background: #bded7c;
  color: #173827;
  width: 33px;
  height: 33px;
  border-radius: 8px;
  font-size: 24px;
  line-height: 1;
  font-style: italic;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  border: 1px solid #cbd4ce;
  border-radius: 7px;
  background: white;
  padding: 8px 13px;
  color: #23483b;
  cursor: pointer;
}
button:hover {
  background: #edf5ee;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
  font-weight: 600;
}
.primary:hover {
  background: #084c38;
}
#logout {
  color: #e8f4ec;
  background: transparent;
  border-color: #51685d;
}
.loginbox {
  width: min(420px, 92vw);
  margin: 12vh auto 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
  display: grid;
  gap: 17px;
}
.loginbox p,
.loginbox h1 {
  margin: 0;
}
.key {
  font-size: 30px;
  color: var(--green);
}
a {
  color: var(--green);
}
#workspace {
  max-width: 1600px;
  margin: auto;
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr);
  min-height: calc(100vh - 66px);
}
aside {
  border-right: 1px solid var(--line);
  padding: 32px 16px;
  background: #f0f3ee;
}
aside h2 {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  margin: 0 12px 16px;
}
nav {
  display: grid;
  gap: 3px;
}
nav button {
  background: transparent;
  text-align: left;
  border: 0;
  color: #3b4a43;
  font-size: 14px;
}
nav .active {
  background: #dcebdc;
  color: #133d29;
  font-weight: 650;
}
.sub {
  padding-left: 29px;
  font-size: 13px;
}
.content {
  padding: 32px clamp(14px, 3vw, 48px);
}
.heading,
.tablehead,
.actions,
.dialoghead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.crumb,
.tablehead span,
small,
p {
  color: var(--muted);
}
.crumb {
  margin: 0 0 3px;
  font-size: 13px;
}
h1 {
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.045em;
  line-height: 1.15;
  margin: 0;
}
h2 {
  font-size: 19px;
  letter-spacing: -0.025em;
}
h3 {
  font-size: 16px;
}
.filters {
  display: flex;
  gap: 12px;
  margin: 27px 0 10px;
}
.search {
  flex: 1;
}
.filters select {
  min-width: 145px;
}
label {
  display: grid;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: #405249;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #cbd4ce;
  border-radius: 7px;
  padding: 9px 11px;
  background: white;
  color: #1c3025;
  font-size: 15px;
  font-weight: 400;
}
input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  outline: 2px solid #74ab85;
  outline-offset: 1px;
}
textarea {
  resize: vertical;
}
.tablewrap {
  overflow-x: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th {
  text-align: left;
  color: var(--muted);
  font-weight: 550;
  font-size: 12px;
  background: #fafbf8;
}
td,
th {
  padding: 11px 12px;
  border-bottom: 1px solid #e8ebe6;
}
tr:last-child td {
  border-bottom: 0;
}
td:nth-child(2) {
  white-space: nowrap;
}
td:first-child {
  min-width: 170px;
}
td small {
  display: block;
  font-size: 12px;
}
.textbtn {
  border: 0;
  background: none;
  padding: 2px 0;
  text-align: left;
  font-weight: 620;
}
.tools {
  display: flex;
  gap: 5px;
}
.tools button {
  font-size: 12px;
  padding: 5px 8px;
}
.pill {
  display: inline-block;
  white-space: nowrap;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 12px;
  color: #226343;
  background: #e3f2e6;
}
.pill.off {
  color: #626b67;
  background: #ecefeb;
}
#empty {
  text-align: center;
  padding: 22px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  width: min(535px, 95vw);
  padding: 20px;
  max-height: 90vh;
  color: inherit;
}
dialog::backdrop {
  background: #14251e66;
}
.dialoghead h2 {
  margin: 0;
}
.dialoghead {
  padding-bottom: 14px;
}
.close {
  font-size: 24px;
  border: 0;
  padding: 0 8px;
}
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
form {
  display: grid;
  gap: 13px;
}
.check {
  display: flex;
  align-items: center;
}
.check input {
  width: auto;
}
.actions {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  justify-content: flex-end;
}
.danger {
  color: #912e38;
  margin-right: auto;
  border-color: #e3c9cb;
}
#warehouse form {
  margin: 16px 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}
.unit {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  overflow-wrap: anywhere;
  border-bottom: 1px solid var(--line);
}
#notice {
  position: fixed;
  z-index: 5;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  background: #253d32;
  color: white;
  padding: 12px 20px;
  border-radius: 9px;
  max-width: 94vw;
}
.error {
  color: #982a2a;
  margin: 5px 0;
}
#tree button {
  overflow-wrap: anywhere;
}
@media (max-width: 850px) {
  #workspace {
    grid-template-columns: 165px minmax(0, 1fr);
  }
  aside {
    padding: 20px 6px;
  }
  .content {
    padding: 20px 12px;
  }
  .tools {
    flex-direction: column;
  }
}
@media (max-width: 640px) {
  #workspace {
    display: block;
  }
  aside {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  aside h2 {
    margin-bottom: 6px;
  }
  nav {
    display: flex;
    overflow-x: auto;
  }
  nav button {
    white-space: nowrap;
  }
  .heading {
    align-items: flex-end;
  }
  .heading button {
    font-size: 13px;
  }
  .filters {
    margin-top: 16px;
  }
  .pair {
    grid-template-columns: 1fr;
  }
  .brand {
    gap: 8px;
  }
  .content {
    padding: 18px 10px;
  }
  .filters select {
    min-width: 0;
  }
}
