:root {
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  color: #23332f;
  background: #f6f7f4;
  font-size: 15px;
  --ink: #21332e;
  --muted: #586961;
  --line: #d8dfd7;
  --paper: #fff;
  --mint: #d8f59a;
  --forest: #173e31;
  --pale: #eaf2e7;
  --amber: #805914;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
a {
  color: inherit;
}
h1,
h2,
h3,
p {
  margin: 0;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #638c30;
  outline-offset: 3px;
}
button,
select,
input,
textarea {
  border-radius: 6px;
}
button:active:enabled {
  transform: translateY(1px);
}
.skip {
  position: fixed;
  top: -80px;
  left: 15px;
  z-index: 10;
  background: white;
  padding: 12px;
}
.skip:focus {
  top: 5px;
}
.initial,
.login-main {
  min-height: 100dvh;
  display: grid;
  place-content: center;
  gap: 24px;
}
.initial p {
  color: var(--muted);
}
.ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 1.15em;
  height: 1.15em;
}
.ico svg {
  width: 100%;
  height: 100%;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.085em;
  line-height: 1;
}
.brand span {
  display: inline-block;
  background: #8bbb50;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-left: 4px;
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 65px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 0 clamp(20px, 4vw, 72px);
}
.identity,
.top-actions,
.buttons,
.hstack,
.detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.identity {
  gap: 20px;
}
.app-name {
  border-left: 1px solid #ced7cf;
  padding-left: 20px;
  color: #476050;
  font-weight: 550;
  font-size: 0.9rem;
}
.top-actions {
  gap: 14px;
}
.btn,
.icon-btn,
.linkbtn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 14px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.88rem;
  line-height: 1.25;
}
.icon-btn {
  height: 36px;
  width: 36px;
  padding: 0;
}
.btn:hover,
.icon-btn:hover {
  background: #edf2eb;
  border-color: #bac9b9;
}
.btn.primary {
  background: var(--forest);
  border-color: var(--forest);
  color: #fff;
}
.btn.primary:hover {
  background: #28553f;
}
.btn.lime {
  background: var(--mint);
  border-color: var(--mint);
  color: #193728;
}
.btn.lime:hover {
  background: #c9ef7c;
}
.btn.text,
.linkbtn {
  border: 0;
  background: transparent;
  color: #486551;
}
.btn.text:hover,
.linkbtn:hover {
  background: var(--pale);
}
.login-main {
  min-height: 100dvh;
  background: #edf1e9;
  padding: 24px;
}
.login-wrap {
  width: min(850px, calc(100vw - 48px));
  display: grid;
  grid-template-columns: 0.78fr 1fr;
  background: #fff;
  border: 1px solid #cfdbce;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 80px #25433012;
}
.login-side {
  background: #233d32;
  color: #eaf6e5;
  position: relative;
  padding: 36px;
  min-height: 430px;
  display: flex;
  align-items: flex-start;
  isolation: isolate;
  overflow: hidden;
}
.login-side:before,
.login-side:after {
  content: "";
  position: absolute;
  z-index: -1;
  height: 280px;
  width: 280px;
  border: 1px solid #9abf95;
  border-radius: 38px;
  transform: rotate(45deg);
  bottom: -75px;
  left: -95px;
}
.login-side:after {
  left: -40px;
  bottom: -80px;
  border: 30px solid #587b5c;
  width: 340px;
  height: 340px;
  opacity: 0.7;
}
.login-side .brand {
  font-size: 43px;
}
.login-copy {
  padding: 55px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
}
.login-copy h1,
.page-title h1 {
  line-height: 1.05;
  letter-spacing: -0.055em;
  font-weight: 650;
}
.login-copy h1 {
  font-size: clamp(2rem, 4.3vw, 3.2rem);
}
.muted,
.hint {
  color: var(--muted);
  line-height: 1.5;
}
.hint {
  font-size: 0.84rem;
}
.login-copy form,
.form-stack {
  display: grid;
  gap: 16px;
}
label.field {
  display: grid;
  gap: 6px;
  font-size: 0.83rem;
  font-weight: 650;
  color: #3c4e45;
}
input,
textarea,
select {
  width: 100%;
  border: 1px solid #cbd5cc;
  background: #fff;
  min-height: 39px;
  padding: 8px 10px;
  color: var(--ink);
}
select {
  cursor: pointer;
}
textarea {
  resize: vertical;
  min-height: 76px;
  line-height: 1.45;
}
.feedback,
.form-error {
  color: #903b2f;
  font-size: 0.86rem;
  line-height: 1.45;
}
.form-error:empty {
  display: none;
}
.workspace {
  max-width: 1610px;
  margin: auto;
  padding: clamp(24px, 3vw, 46px) clamp(18px, 4vw, 70px) 54px;
}
.page-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.page-title h1 {
  font-size: clamp(2.15rem, 3.8vw, 3.35rem);
}
.page-title p {
  margin-top: 8px;
}
.list-select {
  width: min(230px, calc(100vw - 40px));
  min-height: 39px;
  font-size: 0.88rem;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-block: 18px 25px;
}
.stat {
  position: relative;
  overflow: hidden;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  padding: 14px 17px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: center;
  color: var(--ink);
}
.stat:hover {
  border-color: #a6b6a7;
}
.stat.active {
  border-color: #79947a;
  background: #edf3e9;
}
.stat span {
  font-size: 0.84rem;
  font-weight: 550;
  color: #4c6051;
}
.stat strong {
  font-size: clamp(1.65rem, 2.6vw, 2.15rem);
  letter-spacing: -0.05em;
  grid-row: 2;
  line-height: 1.1;
}
.stat .ico {
  grid-column: 2;
  grid-row: 1 / 3;
  color: #647d68;
  width: 24px;
  height: 24px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2,
.section-title {
  font-size: 1.04rem;
  font-weight: 650;
  letter-spacing: -0.025em;
}
.panel-head .info {
  display: grid;
  gap: 3px;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.search {
  position: relative;
  min-width: 180px;
}
.search .ico {
  position: absolute;
  top: 11px;
  left: 10px;
  color: #6b7e6e;
}
.search input {
  padding-left: 33px;
  font-size: 0.85rem;
}
.toolbar select {
  width: auto;
  max-width: 180px;
  font-size: 0.85rem;
}
.table-wrap {
  overflow: auto;
}
.inventory {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  font-size: 0.9rem;
}
.inventory th {
  text-align: left;
  color: #526758;
  font-weight: 650;
  font-size: 0.76rem;
  background: #f4f6f2;
  position: sticky;
  top: 0;
}
.inventory th,
.inventory td {
  padding: 13px 15px;
  border-bottom: 1px solid #e7ebe5;
}
.inventory th:first-child,
.inventory td:first-child {
  padding-left: 20px;
}
.inventory tr:last-child td {
  border-bottom: 0;
}
.inventory tbody tr:hover {
  background: #f5f8f2;
}
.inventory td.trunc {
  max-width: clamp(165px, 24vw, 365px);
  overflow: hidden;
  text-overflow: ellipsis;
}
.mono {
  font-family: var(--mono);
  font-size: 0.86em;
}
.id-link {
  border: 0;
  padding: 3px 0;
  background: none;
  color: var(--forest);
  font-weight: 650;
  text-align: left;
  min-height: 30px;
}
.id-link:hover {
  text-decoration: underline;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #edf0ed;
  color: #46574c;
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 650;
  line-height: 1.3;
}
.badge:before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #819084;
}
.badge.confirmed {
  background: #e1f2df;
  color: #2b603c;
}
.badge.confirmed:before {
  background: #498455;
}
.badge.review {
  background: #fff1d3;
  color: #805814;
}
.badge.review:before {
  background: #b78423;
}
.badge.unresolved {
  background: #f4e8e4;
  color: #835142;
}
.badge.unresolved:before {
  background: #ac7062;
}
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: clamp(35px, 6vw, 85px) 20px;
}
.empty .file-mark {
  width: 58px;
  height: 58px;
  border-radius: 15px;
  background: #e9f4e0;
  color: #416241;
  display: grid;
  place-items: center;
  margin-bottom: 5px;
}
.file-mark .ico {
  height: 28px;
  width: 28px;
}
.empty h2 {
  font-size: 1.35rem;
  letter-spacing: -0.035em;
}
.empty p {
  max-width: 440px;
}
.empty .btn {
  margin-top: 7px;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  color: #5d6c61;
  font-size: 0.83rem;
}
.pagination .buttons {
  gap: 5px;
}
.messages {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9;
  display: grid;
  gap: 6px;
  max-width: min(540px, 94vw);
}
.toast {
  background: #263d30;
  color: white;
  border-radius: 6px;
  padding: 12px 16px;
  box-shadow: 0 6px 22px #13271926;
  line-height: 1.4;
}
.toast.error {
  background: #7d3b30;
}
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: #1d2e254b;
  z-index: 3;
}
.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  width: min(580px, 100%);
  background: #fff;
  box-shadow: -8px 0 40px #18301c26;
  z-index: 4;
  display: flex;
  flex-direction: column;
}
.drawer-header {
  padding: 22px 24px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.drawer-header h2 {
  font-size: 1.65rem;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
  margin: 5px 0;
}
.drawer-header .hint {
  font-size: 0.78rem;
}
.drawer-nav {
  display: flex;
  padding: 0 24px;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  font-weight: 600;
  color: #647367;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: none;
  padding: 5px 0;
}
.tab.active {
  border-color: #395e40;
  color: var(--ink);
}
.drawer-scroll {
  overflow: auto;
  flex: 1;
  padding: 20px 24px 28px;
}
.drawer-scroll section + section,
.drawer-scroll details {
  margin-top: 22px;
}
.section-title {
  margin-bottom: 11px;
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}
.wide {
  grid-column: 1/-1;
}
.drawer-foot {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 8px;
  padding: 12px 24px;
  border-top: 1px solid var(--line);
  background: #fcfdfa;
}
.drawer-foot .hint {
  margin-right: auto;
}
.callout {
  background: #f0f5eb;
  border: 1px solid #d9e5d1;
  border-radius: 7px;
  padding: 11px 13px;
  font-size: 0.84rem;
  line-height: 1.45;
  color: #415743;
}
.callout.warn {
  background: #f8f4e9;
  border-color: #e4dcc6;
  color: #67572f;
}
.research-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}
.research-box h3 {
  font-size: 1rem;
}
.research-box p {
  margin: 6px 0 10px;
}
.kv {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(0, 2fr);
  margin: 8px 0 0;
  font-size: 0.84rem;
}
.kv dt,
.kv dd {
  margin: 0;
  padding: 6px 2px;
  border-bottom: 1px solid #e6ebe4;
  overflow-wrap: anywhere;
}
.kv dt {
  color: #5d6f62;
  padding-right: 10px;
}
.kv dd {
  white-space: pre-wrap;
}
.result-json {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.83rem;
  line-height: 1.45;
  max-height: 270px;
  overflow: auto;
  background: #f4f7f1;
  padding: 12px;
  border-radius: 6px;
}
summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  color: #47634c;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 15px 0;
}
.photo-grid figure {
  margin: 0;
}
.photo-grid img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: contain;
  background: #eff2ed;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.photo-grid figcaption {
  font-size: 0.77rem;
  color: var(--muted);
  padding-top: 3px;
}
.eyebrow {
  font-size: 0.74rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #596b5b;
  font-weight: 650;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 16px;
}
.modal-head h2 {
  font-size: 1.55rem;
  letter-spacing: -0.04em;
}
.modal-body {
  display: grid;
  gap: 15px;
}
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}
.filebox {
  cursor: pointer;
  display: grid;
  place-items: center;
  gap: 9px;
  min-height: 120px;
  padding: 20px;
  text-align: center;
  border: 1px dashed #9faf9b;
  border-radius: 8px;
  background: #f5f8f1;
  font-weight: 600;
}
.filebox:focus-within {
  outline: 3px solid #638c30;
}
.filebox.drag {
  background: #e2efd8;
  border-color: #5d815c;
}
.filebox input,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip-path: inset(50%);
}
.filebox .ico {
  font-size: 23px;
}
.filebox small {
  font-weight: 400;
}
.preview-wrap {
  max-height: 150px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.preview-wrap .inventory td,
.preview-wrap .inventory th {
  padding: 7px 10px;
}
.checkbox {
  display: flex;
  align-items: start;
  gap: 8px;
  font-size: 0.87rem;
  color: #3c5042;
  line-height: 1.4;
}
.checkbox input {
  appearance: auto;
  width: 16px;
  height: 16px;
  min-height: 0;
  flex: none;
  margin: 2px 0 0;
}
.btn-file {
  position: relative;
}
.doc-note {
  font-size: 0.8rem;
  color: #5a695d;
}
.no-scroll {
  overflow: hidden;
}
dialog {
  width: min(575px, calc(100% - 30px));
  border: 1px solid #cad6c8;
  border-radius: 12px;
  padding: 23px;
  color: var(--ink);
  max-height: 89dvh;
  box-shadow: 0 20px 90px #15291c32;
}
dialog::backdrop {
  background: #17291f69;
}
#modal[open] {
  display: block;
}
@media (min-width: 1450px) {
  .inventory th,
  .inventory td {
    padding-block: 15px;
  }
}
@media (max-width: 780px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .stat {
    padding: 11px 14px;
  }
  .stat strong {
    font-size: 1.5rem;
  }
  .page-title {
    align-items: start;
  }
  .panel-head {
    padding: 14px;
  }
  .panel-head .toolbar {
    width: 100%;
  }
  .toolbar .search {
    flex: 1;
    min-width: 135px;
  }
  .top {
    min-height: 57px;
  }
  .brand {
    font-size: 29px;
  }
  .workspace {
    padding-top: 24px;
  }
  .page-title .buttons {
    width: 100%;
    gap: 6px;
  }
  .buttons .btn {
    font-size: 0.83rem;
  }
  .page-title h1 {
    font-size: 2.3rem;
  }
  .inventory th:first-child,
  .inventory td:first-child {
    padding-left: 14px;
  }
  .login-wrap {
    grid-template-columns: 1fr;
    max-width: 455px;
  }
  .login-side {
    min-height: 88px;
    padding: 25px;
  }
  .login-side:after {
    left: auto;
    right: -155px;
    bottom: -100px;
  }
  .login-side:before {
    left: auto;
    right: -190px;
    bottom: -120px;
  }
  .login-side .brand {
    font-size: 34px;
  }
  .login-copy {
    padding: 30px 26px;
  }
  .top-actions .btn {
    min-height: 32px;
  }
  .drawer-scroll {
    padding: 16px 18px 24px;
  }
  .drawer-header {
    padding: 15px 18px;
  }
  .drawer-nav {
    padding: 0 18px;
  }
  .drawer-foot {
    padding: 10px 18px;
  }
  .pagination {
    padding: 10px 14px;
  }
}
@media (max-width: 440px) {
  .app-name {
    padding-left: 12px;
    font-size: 0.78rem;
  }
  .identity {
    gap: 12px;
  }
  .btn {
    padding: 8px 10px;
  }
  .field-grid {
    grid-template-columns: 1fr;
  }
  .top-actions .exit-label {
    display: none;
  }
  .workspace {
    padding-inline: 12px;
  }
  .stat .ico {
    width: 20px;
    height: 20px;
  }
  .list-select {
    max-width: 100%;
  }
  .drawer-nav {
    gap: 14px;
  }
  .photo-grid {
    grid-template-columns: 1fr;
  }
  .toolbar select {
    max-width: 128px;
  }
  .pagination .btn {
    font-size: 0.76rem;
  }
}
[hidden] {
  display: none !important;
}
.drawer-neighbors {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
}
.drawer-neighbors .btn {
  min-height: 32px;
  font-size: 0.77rem;
}
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.catalog-card {
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 0;
  text-align: left;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}
.catalog-card:hover {
  border-color: #6f946e;
}
.catalog-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: contain;
  background: #f0f3ed;
}
.catalog-card span {
  display: grid;
  gap: 4px;
  padding: 10px;
}
.catalog-card strong,
.catalog-card small {
  overflow-wrap: anywhere;
}
.catalog-card small {
  font-size: 0.75rem;
  color: var(--muted);
}
.catalog-empty {
  display: grid;
  gap: 8px;
  padding: 26px 14px;
  text-align: center;
  justify-items: center;
}
.catalog-empty .ico {
  color: #6b856c;
  font-size: 28px;
}
.catalog-empty h3 {
  font-size: 1rem;
}
@media (max-width: 560px) {
  .top {
    padding-inline: 16px;
    gap: 12px;
  }
  .top-actions,
  .top .identity {
    flex-wrap: nowrap;
    gap: 4px;
  }
  .top .app-name {
    display: none;
  }
  .top-actions .btn {
    white-space: nowrap;
  }
}
