:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #213c36;
  background: #f5f6f3;
  font-synthesis: none;
  --green: #194d40;
  --muted: #7c8883;
  --line: #e4e8e3;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
.button {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 9px;
  padding: 13px 19px;
  font-weight: 600;
  font-size: 14px;
  min-height: 44px;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.primary {
  background: var(--green);
  color: white;
}
.primary:hover {
  background: #246451;
}
.secondary {
  background: #f1f4f0;
  border: 1px solid var(--line);
  color: var(--green);
}
.full {
  width: 100%;
}
.link {
  background: none;
  padding: 0;
  justify-content: flex-start;
  color: inherit;
  font-size: 12px;
}
aside {
  width: 235px;
  position: fixed;
  inset: 0 auto 0 0;
  background: #173e36;
  color: #e9f1ea;
  padding: 36px 23px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: 1px;
}
.brand small {
  display: block;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 3px;
  margin-top: 5px;
  color: #a7bbb0;
}
.brandmark {
  display: grid;
  place-items: center;
  background: #d7e8b4;
  color: #173e36;
  width: 39px;
  height: 42px;
  border-radius: 10px;
  font-size: 26px;
}
.nav-caption {
  font-size: 9px;
  letter-spacing: 1.6px;
  color: #93aca0;
  margin: 56px 10px 15px;
}
nav a {
  display: flex;
  gap: 13px;
  padding: 15px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 8px;
  color: #b7cbc0;
}
nav .selected {
  background: #2b5147;
  color: white;
}
.aside-bottom {
  margin-top: auto;
  font-size: 12px;
  color: #d3e1d8;
}
.aside-bottom small {
  display: block;
  font-size: 10px;
  color: #9eb5a8;
  margin: 10px 0 24px;
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c3dc9c;
  margin-right: 6px;
}
main {
  margin-left: 235px;
  padding: 0 46px;
  max-width: 1700px;
}
.topbar {
  height: 79px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}
.local-pill {
  background: #e9eee6;
  color: #56715e;
  padding: 7px 11px;
  border-radius: 20px;
  font-size: 10px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 39px 0 28px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.8px;
  font-weight: 700;
  color: #7b8b72;
}
h1 {
  font-size: 34px;
  letter-spacing: -1.3px;
  line-height: 1.2;
  margin: 10px 0;
}
h2 {
  font-size: 17px;
  letter-spacing: -0.3px;
  margin: 0 0 20px;
}
h3 {
  font-size: 13px;
  margin-top: 28px;
}
p {
  font-size: 14px;
  line-height: 1.65;
  color: #7a8580;
  margin: 10px 0 20px;
}
.page-heading p {
  margin: 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 30px;
}
.stats > div {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 23px 25px;
}
.stats span {
  font-size: 12px;
  color: #6e7f75;
}
.stats strong {
  display: block;
  font-size: 38px;
  font-weight: 500;
  margin: 15px 0 8px;
}
.stats small {
  font-size: 11px;
  color: #909990;
}
.stats > div:last-child {
  background: #eaf0e3;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 25px 0;
}
.panel-title h2 {
  margin: 0;
}
.muted {
  font-size: 12px;
  color: var(--muted);
}
.filters {
  display: flex;
  gap: 12px;
  padding: 22px 25px;
}
.filters input {
  flex: 1;
  min-width: 120px;
}
.filters select {
  width: auto;
  max-width: 210px;
}
.table-scroll {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  text-align: left;
  white-space: nowrap;
}
th {
  font-size: 9px;
  letter-spacing: 0.7px;
  background: #fafbf8;
  color: #8b958d;
  font-weight: 600;
  padding: 15px 22px;
  border-block: 1px solid var(--line);
}
td {
  padding: 22px;
  border-bottom: 1px solid #edf0eb;
}
td b {
  font-weight: 550;
}
td small {
  display: block;
  color: #8d9790;
  font-size: 11px;
  margin-top: 6px;
}
.code {
  font-weight: 650;
  color: #2f6350;
}
.badge {
  display: inline-block;
  padding: 7px 10px;
  border-radius: 20px;
  background: #eef2ef;
  color: #576e61;
  font-size: 10px;
  font-weight: 600;
}
.badge.ready {
  background: #e8f1d9;
  color: #4c752b;
}
.badge.waiting {
  background: #fff3dc;
  color: #927432;
}
.badge.done {
  background: #edf0f5;
  color: #708093;
}
.empty {
  text-align: center;
  padding: 60px 25px 70px;
}
.empty h2 {
  margin: 15px 0 8px;
}
.empty p {
  max-width: 370px;
  margin: 0 auto 24px;
}
.empty-icon {
  font-size: 36px;
  color: #719079;
}
footer {
  padding: 35px 0;
  display: flex;
  justify-content: space-between;
  letter-spacing: 1.2px;
  font-size: 9px;
  color: #9aa396;
}
footer span {
  letter-spacing: 0;
}
.back {
  display: inline-block;
  margin-top: 28px;
  font-size: 12px;
  color: #6b8274;
}
.back + .page-heading {
  margin-top: 24px;
}
.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
}
.form-panel {
  padding: 26px;
  margin-bottom: 20px;
}
.step {
  font-size: 10px;
  color: #8b9d80;
  margin-right: 13px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.wide {
  grid-column: 1/-1;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 550;
  color: #4a6255;
}
input,
textarea,
select {
  display: block;
  width: 100%;
  margin-top: 8px;
  border: 1px solid #dce3da;
  background: #fcfdfb;
  border-radius: 7px;
  padding: 11px 12px;
  min-height: 43px;
  outline: none;
  font-size: 13px;
  color: #29483a;
}
textarea {
  resize: vertical;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #6e937c;
  box-shadow: 0 0 0 3px #eaf1e6;
}
.filters input,
.filters select {
  margin: 0;
}
.required {
  color: #84996c;
}
.hint {
  font-size: 11px;
  line-height: 1.7;
}
.form-panel small {
  font-size: 10px;
  color: #8f998e;
}
.error {
  color: #b9473e;
  font-size: 12px;
}
.error:empty {
  display: none;
}
.note-card {
  padding: 20px;
  background: #eaf0e3;
  border-radius: 10px;
  font-size: 13px;
}
.note-card p {
  font-size: 12px;
  margin-bottom: 0;
}
.timeline > div {
  border-left: 2px solid #dce7d5;
  padding: 0 0 22px 15px;
  font-size: 12px;
}
.timeline > div:last-child {
  padding-bottom: 0;
}
.timeline small {
  display: block;
  margin-top: 7px;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}
.address {
  padding: 16px;
  background: #edf2e8;
  border-radius: 7px;
  word-break: break-all;
  font-size: 14px;
  margin: 20px 0;
}
.mono {
  font-family: monospace;
  font-size: 12px;
}
.print-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 390px;
}
.preview-area {
  padding: 45px 20px;
  display: flex;
  flex-direction: column;
  gap: 25px;
  justify-content: center;
  align-items: center;
  background: #edf0e9;
}
.dimension {
  font-size: 11px;
  letter-spacing: 2px;
  color: #82907c;
}
.label {
  width: 50mm;
  height: 30mm;
  flex: none;
  background: white;
  color: black;
  padding: 2mm;
  display: flex;
  align-items: center;
  overflow: hidden;
  box-shadow: 0 10px 25px #23412212;
  font-family: Arial, sans-serif;
}
.label-copy {
  width: 23mm;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.4mm;
}
.label-copy strong {
  font-size: 7pt;
  letter-spacing: 0.5pt;
}
.label-copy b {
  font-size: 6.2pt;
  white-space: nowrap;
}
.label-copy span {
  font-size: 7pt;
  line-height: 1.1;
  overflow-wrap: anywhere;
  max-height: 11mm;
  overflow: hidden;
}
.label-copy small {
  font-size: 6pt;
}
.qr {
  width: 23mm;
  height: 23mm;
  flex: none;
}
.qr svg {
  display: block;
  width: 100%;
  height: 100%;
}
.print-instructions {
  padding: 38px;
}
.print-instructions li {
  font-size: 13px;
  line-height: 1.8;
  color: #78867b;
  padding-left: 4px;
  margin-bottom: 8px;
}
.print-instructions ol {
  padding-left: 18px;
}
.qr-destination {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 12px;
}
.qr-destination a {
  word-break: break-all;
  color: #517d60;
}
.qr-destination small {
  font-size: 11px;
  color: #869181;
}
.login-wrap {
  min-height: 100vh;
  background: #173e36;
  display: grid;
  place-content: center;
  padding: 25px;
}
.login-brand {
  color: white;
  font-size: 13px;
  letter-spacing: 2px;
  margin: 0 0 30px;
}
.login-brand span {
  color: #a6bcaa;
  font-size: 10px;
}
.login-card {
  background: #f9faf6;
  border-radius: 16px;
  padding: 45px;
  max-width: 450px;
}
.login-card h1 {
  font-size: 39px;
}
.login-card label {
  margin: 20px 0;
}
.login-card button {
  width: 100%;
  margin-bottom: 25px;
}
.login-card small {
  font-size: 10px;
  color: #8b9988;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90vw;
  padding: 14px 22px;
  background: #244f3e;
  color: white;
  font-size: 13px;
  border-radius: 9px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 100;
}
#toast.show {
  opacity: 1;
}
@media (min-width: 1400px) {
  main {
    padding: 0 60px;
  }
}
@media (max-width: 1100px) {
  aside {
    width: 195px;
    padding: 30px 16px;
  }
  main {
    margin-left: 195px;
    padding: 0 25px;
  }
  .editor-grid {
    grid-template-columns: minmax(0, 1fr) 240px;
  }
  .filters {
    flex-wrap: wrap;
  }
  .filters input {
    flex-basis: 100%;
  }
  .print-panel {
    grid-template-columns: 1fr;
  }
  .brand {
    font-size: 13px;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  aside {
    position: static;
    width: 100%;
    padding: 16px 20px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .brandmark {
    width: 30px;
    height: 33px;
    font-size: 22px;
  }
  .brand {
    font-size: 12px;
  }
  .brand small {
    font-size: 7px;
  }
  nav {
    display: flex;
    gap: 5px;
  }
  nav a {
    padding: 10px;
    font-size: 12px;
    margin: 0;
  }
  .nav-caption,
  .aside-bottom {
    display: none;
  }
  main {
    margin: 0;
    padding: 0 18px;
  }
  .topbar {
    height: 52px;
    font-size: 10px;
  }
  .page-heading {
    margin: 26px 0 22px;
    align-items: flex-start;
    flex-wrap: wrap;
  }
  h1 {
    font-size: 29px;
  }
  .page-heading p {
    font-size: 12px;
  }
  .stats {
    gap: 8px;
  }
  .stats > div {
    padding: 15px 12px;
  }
  .stats span {
    font-size: 10px;
  }
  .stats strong {
    font-size: 29px;
  }
  .stats small {
    font-size: 9px;
  }
  .stats > div small {
    display: none;
  }
  .editor-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .editor-side {
    display: flex;
    flex-direction: column;
  }
  .form-panel {
    padding: 20px;
  }
  .form-grid {
    gap: 17px;
  }
  .filters {
    padding: 18px;
  }
  .filters select {
    flex: 1;
    max-width: none;
    min-width: 0;
    font-size: 11px;
  }
  .panel-title {
    padding: 20px 18px 0;
  }
  .panel-title h2 {
    font-size: 15px;
  }
  .print-instructions {
    padding: 25px;
  }
  .login-card {
    padding: 30px;
  }
  .login-wrap {
    padding: 20px;
  }
  .settings-grid {
    gap: 0;
  }
  footer {
    font-size: 8px;
  }
  .preview-area .muted {
    font-size: 10px;
  }
}
@media (max-width: 380px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  .brand span:last-child {
    display: none;
  }
}
@page {
  size: 50mm 30mm;
  margin: 0;
}
@media print {
  html,
  body {
    width: 50mm;
    height: 30mm;
    margin: 0 !important;
    padding: 0 !important;
    background: white;
  }
  body * {
    visibility: hidden;
  }
  #physical-label,
  #physical-label * {
    visibility: visible;
  }
  #physical-label {
    position: fixed;
    inset: 0;
    margin: 0;
    box-shadow: none;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  aside,
  footer,
  .topbar,
  #toast {
    display: none !important;
  }
  main {
    margin: 0;
    padding: 0;
  }
  .print-panel {
    border: 0;
  }
  .preview-area {
    padding: 0;
  }
  body {
    overflow: hidden;
  }
}
@media print {
  main > :not(.print-panel),
  .print-panel > :not(.preview-area),
  .preview-area > :not(#physical-label) {
    display: none !important;
  }
  main,
  .print-panel,
  .preview-area {
    display: block !important;
    width: 50mm !important;
    height: 30mm !important;
    min-height: 0 !important;
    max-height: 30mm !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    border-radius: 0 !important;
  }
  #physical-label {
    position: static !important;
  }
  #app {
    height: 30mm;
    overflow: hidden;
  }
}
/* One monochrome raster is shared with the Zebra, without client text layout. */
.detailed-label {
  position: relative;
  display: block;
  padding: 0;
}
.label-raster {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}
@media print {
  #physical-label {
    position: relative !important;
  }
}
.read-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.read-grid .panel {
  margin-bottom: 0;
}
.read-grid + section {
  margin-top: 20px;
}
.read-grid dl {
  margin: 0;
  display: grid;
  gap: 18px;
}
.read-grid dt {
  font-size: 11px;
  color: #7c8883;
  margin-bottom: 5px;
}
.read-grid dd {
  font-size: 15px;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.5;
}
@media (max-width: 760px) {
  .read-grid {
    grid-template-columns: 1fr;
  }
}

/* Inventory uses the same cards and forms as repair records. */
.actions,
.category-row,
.search-form {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}
.category-row {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.category-row label,
.search-form label {
  flex: 1;
  min-width: 180px;
}
.category-row span {
  padding-bottom: 14px;
}
.search-examples {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.search-examples button {
  font-size: 12px;
  padding: 9px 12px;
}
.search-repairs {
  display: grid;
  gap: 10px;
}
.search-repairs a {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
#smart-results > .panel {
  margin-bottom: 20px;
}
@media (max-width: 760px) {
  aside {
    flex-wrap: wrap;
    gap: 12px;
  }
  nav {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  nav a {
    padding: 9px 7px;
    gap: 5px;
  }
  .category-row {
    align-items: center;
  }
  .category-row label {
    flex-basis: 100%;
  }
  .actions {
    width: 100%;
  }
}

@media (max-width: 760px) {
  #part-category,
  #part-stock,
  #part-archive {
    min-width: 145px;
    flex: 1;
  }
}

#repair-parts {
  margin-top: 24px;
}
.parts-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0;
}
.parts-totals > div {
  padding: 16px;
  background: #f1f4f0;
  border-radius: 10px;
}
.parts-totals span,
.parts-totals strong,
.parts-totals small {
  display: block;
  margin-bottom: 8px;
}
.parts-totals strong {
  font-size: 24px;
}
.parts-totals small {
  color: var(--muted);
}
#use-part-form {
  margin-top: 24px;
}
#show-all-parts {
  margin: 12px 0;
}
@media (max-width: 760px) {
  .parts-totals {
    grid-template-columns: 1fr;
  }
}

@media print {
  :root {
    background: white;
  }
}

#audit-details > summary {
  cursor: pointer;
  padding: 0.5rem 0;
}
#audit-more[hidden] {
  display: none;
}
