:root {
  font:
    15px/1.5 "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #1d302d;
  background: #f5f6f2;
  --pine: #183c34;
  --lime: #d0f38a;
  --line: #d9dfd8;
  --muted: #5d7068;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
.btn {
  cursor: pointer;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--pine);
  padding: 10px 15px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
}
button:hover,
.btn:hover {
  filter: brightness(0.96);
}
button:disabled {
  opacity: 0.5;
}
a {
  color: var(--pine);
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #829e37;
  outline-offset: 2px;
}
.primary {
  background: var(--pine);
  color: white;
  border-color: var(--pine);
}
.lime {
  background: var(--lime);
  color: #16392e;
  border-color: var(--lime);
}
svg.i {
  width: 20px;
  height: 20px;
  flex: none;
  vertical-align: middle;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}
h2 {
  font-size: 21px;
  letter-spacing: -0.035em;
}
p,
small {
  color: var(--muted);
}
h1 + p,
h2 + p {
  margin-top: 7px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 730;
  font-size: 27px;
  letter-spacing: -1.6px;
}
.brand img {
  width: 39px;
  height: 39px;
}
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
}
aside {
  background: #17352f;
  color: white;
  padding: 29px 17px;
  display: flex;
  flex-direction: column;
  gap: 33px;
  position: sticky;
  top: 0;
  height: 100dvh;
}
aside .brand {
  padding: 0 10px;
}
nav {
  display: grid;
  gap: 4px;
}
nav a {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 14px;
  color: #d4dfd9;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 540;
}
nav a.active {
  background: #345549;
  color: #d2f798;
}
nav a:hover {
  background: #2b4940;
}
.account {
  margin-top: auto;
  border-top: 1px solid #486056;
  padding: 17px 5px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  background: #d7e4cb;
  color: #2d4838;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  font-weight: 700;
}
.account small {
  display: block;
  color: #b7c9bd;
}
.account button {
  margin-left: auto;
  background: transparent;
  color: white;
  border: 0;
  padding: 6px;
}
.topbar {
  height: 68px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 0 clamp(20px, 4vw, 65px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}
.topbar b {
  color: var(--pine);
}
.mobilemenu {
  display: none;
}
.content {
  max-width: 1500px;
  margin: auto;
  padding: 36px clamp(20px, 4vw, 65px) 60px;
}
.spread,
.actions,
.row,
.title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.spread,
.title {
  justify-content: space-between;
}
.title {
  margin-bottom: 24px;
}
.actions {
  flex-wrap: wrap;
}
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #25483d;
  color: white;
  border-radius: 16px;
  padding: 29px 32px;
  margin-bottom: 22px;
}
.hero h2 {
  font-size: 30px;
  color: white;
}
.hero .finder {
  max-width: 620px;
  margin: 18px 0 0;
}
.heroArt {
  position: absolute;
  right: -10px;
  top: -62px;
  width: 310px;
  height: 260px;
  opacity: 0.23;
  transform: rotate(-8deg);
  z-index: -1;
}
.finder {
  display: flex;
  background: #fff;
  border: 1px solid var(--line);
  padding: 5px 6px 5px 14px;
  gap: 8px;
  align-items: center;
  border-radius: 9px;
  color: var(--pine);
}
.finder input {
  padding: 5px;
  border: none;
  min-width: 0;
  flex: 1;
}
.finder button {
  min-height: 38px;
  padding: 6px 14px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0;
}
.metric,
.card,
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
}
.metric {
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
}
.metric span {
  font-size: 13px;
  font-weight: 620;
  color: #55675d;
}
.metric strong {
  font-size: 36px;
  letter-spacing: -2px;
}
.glyph {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #edf3df;
  color: #45613e;
}
.metric .glyph {
  grid-row: span 2;
}
.metric:nth-child(3) .glyph {
  background: #fff1d9;
  color: #996624;
}
.columns {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(250px, 1fr);
  gap: 18px;
  align-items: start;
}
.panel,
.card {
  padding: 22px;
}
.panel + .panel,
.card + .card {
  margin-top: 15px;
}
.stack {
  display: grid;
  gap: 15px;
}
.panel .spread {
  margin-bottom: 15px;
}
.empty {
  text-align: center;
  padding: 34px 14px;
  color: var(--muted);
}
.empty .glyph {
  margin: 0 auto 10px;
  width: 43px;
  height: 43px;
}
.empty b {
  display: block;
  color: var(--pine);
}
.link {
  font-weight: 600;
  font-size: 13px;
}
.list {
  display: grid;
}
.item {
  padding: 15px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.item > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}
.stock-summary {
  display: flex;
  align-items: center;
  gap: 12px;
}
.stock-result {
  overflow-wrap: anywhere;
}
.item strong,
.item small {
  display: block;
}
.item:hover[href] {
  color: #547334;
}
.tag {
  background: #eef3e8;
  color: #405a3f;
  padding: 4px 9px;
  border-radius: 20px;
  font: 600 12px/1.6 inherit;
  font-size: 12px;
  white-space: nowrap;
}
.tag.warn {
  background: #fff0d9;
  color: #825116;
}
.thumb {
  width: 50px;
  height: 50px;
  background: #f0f2eb;
  border: 1px solid var(--line);
  border-radius: 9px;
  object-fit: cover;
  display: grid;
  place-items: center;
  flex: none;
}
.gallery {
  display: flex;
  gap: 8px;
  overflow: auto;
}
.gallery img {
  height: 145px;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.val {
  font-size: 32px;
  letter-spacing: -1.5px;
  font-weight: 680;
  margin: 12px 0;
}
.line {
  padding: 8px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.form {
  display: grid;
  gap: 15px;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.wide {
  grid-column: 1/-1;
}
label {
  display: grid;
  gap: 5px;
  font-size: 13px;
  font-weight: 630;
}
input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #bfcac2;
  border-radius: 7px;
  color: #19362e;
  background: white;
  min-height: 44px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  width: min(650px, 94vw);
  max-height: 90dvh;
  padding: 25px;
  color: inherit;
}
dialog::backdrop {
  background: #10282088;
}
dialog h2 {
  margin-bottom: 15px;
}
dialog .actions {
  justify-content: flex-end;
  margin-top: 10px;
}
.error {
  color: #963d32;
}
.notice {
  padding: 12px;
  background: #eef4e4;
  border-radius: 8px;
}
.auth {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: white;
}
.authart {
  background: #1c4035;
  color: #f2fae9;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(30px, 6vw, 90px);
  overflow: hidden;
}
.authart h1 {
  font-size: clamp(44px, 6vw, 85px);
  max-width: 620px;
}
.art {
  width: 100%;
  max-height: 290px;
  margin: 18px auto;
}
.authbox {
  align-self: center;
  width: min(420px, 100%);
  margin: auto;
  padding: 28px;
}
.authbox .brand {
  margin-bottom: 45px;
}
.authbox form {
  margin-top: 26px;
}
.authbox h2 {
  font-size: 32px;
}
.barcode {
  height: 24px;
  width: 150px;
  background: repeating-linear-gradient(
    90deg,
    #b4d996 0 2px,
    transparent 2px 5px,
    #b4d996 5px 6px,
    transparent 6px 10px
  );
}
video {
  max-width: 100%;
  width: 520px;
  border-radius: 12px;
}
.capture {
  min-height: 55px;
  font-size: 17px;
}
.hidden,
[hidden] {
  display: none !important;
}
details {
  margin: 12px 0;
}
summary {
  cursor: pointer;
  font-weight: 600;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f3f5ef;
  padding: 10px;
}
#toast:not(:empty) {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: #183a30;
  color: white;
  padding: 12px 20px;
  border-radius: 9px;
  z-index: 8;
  box-shadow: 0 4px 18px #0002;
}
.filters {
  margin: 15px 0;
}
.mono {
  font-family: ui-monospace, monospace;
}
.focused {
  outline: 3px solid #84a65c;
}
.mobilemenu,
.mobilebrand {
  display: none;
}
@media (max-width: 1050px) {
  .shell {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .content {
    padding: 25px 20px;
  }
  .metric {
    padding: 12px;
  }
  .columns {
    grid-template-columns: 1.3fr 1fr;
  }
  .metrics {
    gap: 8px;
  }
}
@media (max-width: 790px) {
  .shell {
    display: block;
  }
  .shell aside {
    display: none;
  }
  .shell.open aside {
    display: flex;
    position: fixed;
    width: 240px;
    z-index: 5;
    top: 60px;
    height: calc(100dvh - 60px);
    gap: 10px;
    padding-top: 10px;
    overflow: auto;
  }
  .shell.open aside .brand {
    display: none;
  }
  .topbar {
    height: 60px;
    padding: 0 16px;
  }
  .mobilemenu,
  .mobilebrand {
    display: inline-flex;
  }
  .crumb {
    display: none;
  }
  .mobilebrand {
    font-size: 22px;
  }
  .mobilebrand img {
    width: 30px;
    height: 30px;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .columns {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 22px;
  }
  .title {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .content {
    padding: 22px 15px;
  }
  .auth {
    display: block;
  }
  .authart {
    padding: 25px;
  }
  .authart h1 {
    font-size: 34px;
    margin: 22px 0;
  }
  .authart .art,
  .authart .barcode {
    display: none;
  }
  .authbox {
    padding: 30px 24px;
  }
  .authbox .brand {
    display: none;
  }
  .panel {
    padding: 16px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .topbar time {
    font-size: 12px;
  }
  .item {
    flex-wrap: wrap;
  }
  .stock-result {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 5px 12px;
  }
  .stock-result .thumb {
    grid-row: span 2;
  }
  .stock-summary {
    grid-column: 2;
    flex-wrap: wrap;
    gap: 4px 10px;
    font-size: 13px;
  }
  .stock-summary .tag {
    padding: 1px 7px;
    font-size: 11px;
  }
  .tag {
    white-space: normal;
  }
}

.printed-vehicles {
  margin: 0.8rem 0;
  padding: 0.7rem 1rem;
  border-left: 3px solid #56805a;
  background: #f3f6f0;
}
.printed-vehicles h3 { margin: 0 0 0.4rem; }
.printed-vehicles > div + div { margin-top: 0.6rem; }

.part-overview > .printed-vehicles {
  margin-block: 0;
}
.part-overview > .actions {
  row-gap: 8px;
}
