:root {
  font: 100% system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #14292d;
  background: #f3f7f6;
  --dark: #0b2125;
  --teal: #075651;
  --muted: #496361;
  --line: #d3e0dc;
  --paper: #fff;
  --wash: #e6f3ee;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; line-height: 1.5; }
button, input, select { font: inherit; }
button, select, .photo-button { cursor: pointer; }
button, a, input, select, .photo-button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #188981; outline-offset: 3px; }
.wrap { max-width: 1060px; width: min(100% - 3rem, 1060px); margin-inline: auto; }
.masthead { background: var(--dark); color: #fff; }
.masthead-content { min-height: 90px; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.brand { display: inline-flex; align-items: center; color: inherit; text-decoration: none; }
.brand-wordmark { display: inline-block; padding: .24rem .55rem .31rem; border: 1px solid #a6db4e; border-radius: .42rem; background: #101714; font-size: clamp(1.32rem, 4.8vw, 2.5rem); line-height: 1.04; font-weight: 750; letter-spacing: -.035em; white-space: nowrap; }
.brand-power { position: relative; color: #b0e654; }
.brand-power::after { content: ""; position: absolute; inset: .34em 36% auto; height: .26em; border-radius: .12em; background: #f174a9; }
.brand-location { margin-inline-start: .35em; color: #d7e7e1; font-weight: 650; }
.catalogue-label { color: #c0d7d1; font-size: .875rem; }
.intro { padding: 2.65rem 0 1.45rem; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); line-height: 1.08; letter-spacing: -.055em; }
.intro p { margin-top: .65rem; color: var(--muted); font-size: 1.04rem; }
#page-title, #model-stock-title, #received-orders-title, #required-stock-title, #last-order-missing-title, #orders-title { display: inline-block; max-width: 100%; padding: .48rem .82rem; border: 1px solid #a9c9bd; border-inline-start: 3px solid #388b72; border-radius: .55rem; background: #fff; box-shadow: 0 3px 10px #153b330b; color: var(--dark); font-size: clamp(1.05rem, 2.5vw, 1.45rem); line-height: 1.25; letter-spacing: .035em; font-weight: 800; text-transform: uppercase; overflow-wrap: anywhere; }
#last-order-missing-title { border-color: #e1aeb8; border-inline-start-color: #a83e55; background: #fff7f8; box-shadow: 0 3px 10px #923b4e12; color: #7d273a; }
.search-panel { padding: 1.25rem; background: var(--paper); border: 1px solid var(--line); border-radius: 1rem; box-shadow: 0 5px 22px #153b3310; }
.field-label { display: block; font-size: .875rem; font-weight: 700; }
.field-label { margin-bottom: .45rem; }
.search-row { display: flex; gap: .75rem; align-items: stretch; }
.input-wrap { display: flex; align-items: center; min-width: 0; flex: 1; position: relative; }
.input-wrap svg { pointer-events: none; position: absolute; left: .9rem; width: 1.3rem; height: 1.3rem; color: var(--muted); }
#query { width: 100%; min-height: 3.3rem; border: 1px solid #a8beb8; border-radius: .62rem; padding: .65rem 2.5rem .65rem 2.75rem; color: #14292d; background: #f9fbfa; font-size: 1rem; }
#query::placeholder { color: #5d6f6c; }
#query::-webkit-search-cancel-button { display: none; }
.clear-button, .icon-button { width: 2.3rem; height: 2.3rem; border: 0; border-radius: .45rem; color: var(--teal); background: transparent; font-size: 1.5rem; }
.clear-button { position: absolute; right: .25rem; }
.clear-button:hover, .icon-button:hover { background: var(--wash); }
.scan-button { border: 0; background: var(--teal); color: #fff; border-radius: .62rem; padding: .75rem 1rem; display: flex; align-items: center; justify-content: center; gap: .55rem; font-weight: 700; }
.scan-button:hover { background: #073f3e; }
.scan-button svg { width: 1.35rem; height: 1.35rem; }
.voice-order-button { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 3.3rem; padding: .38rem .95rem .38rem .42rem; border: 1px solid #a33078; border-radius: 999px; background: linear-gradient(135deg, #76366f, #ae397c); color: #fff; box-shadow: 0 5px 15px #87336a30; font-weight: 800; white-space: nowrap; }
.voice-order-button:hover { background: linear-gradient(135deg, #632c5f, #962f69); transform: translateY(-1px); }
.voice-order-icon { display: grid; place-items: center; width: 2.35rem; height: 2.35rem; border-radius: 50%; background: #ffffff30; border: 1px solid #ffffff6e; }
.voice-order-icon svg { width: 1.23rem; height: 1.23rem; }
.voice-order-button[aria-pressed="true"] { border-color: #075651; background: linear-gradient(135deg, #075651, #16847b); box-shadow: 0 0 0 3px #07565128, 0 5px 15px #07565124; }
.voice-order-panel { margin-top: .9rem; padding: .85rem 1rem; border: 1px solid #a8cec1; border-radius: .7rem; background: #f0f9f4; }
.voice-order-panel p { color: #254c43; }
.voice-order-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: .45rem; margin-top: .55rem; }
.voice-order-choices button { text-align: left; }
.voice-order-panel #voice-order-retry { margin-top: .55rem; }
.select-wrap { position: relative; max-width: min(100%, 15rem); }
.select-wrap::after { content: ""; position: absolute; border-right: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(45deg); right: .85rem; top: .85rem; width: .42rem; height: .42rem; pointer-events: none; }
select { appearance: none; max-width: 100%; padding: .4rem 2rem .4rem .65rem; border: 1px solid var(--line); border-radius: .45rem; color: var(--dark); background: var(--paper); font-size: .875rem; }
.results { margin-top: 1.8rem; }
.results-header { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; margin-bottom: .65rem; }
h2 { font-size: 1.26rem; letter-spacing: -.025em; }
#result-count { color: var(--muted); font-size: .875rem; text-align: right; }
.notice { padding: .7rem .9rem; margin-bottom: .75rem; border: 1px solid #b3d9cc; background: var(--wash); border-radius: .55rem; }
.notice.conflict { background: #fff3d5; border-color: #e1c27b; }
.table-wrap { background: var(--paper); border: 1px solid var(--line); border-radius: .8rem; overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th { background: #eaf2ef; text-align: left; font-weight: 700; font-size: .86rem; color: #29433e; }
td, th { padding: .8rem 1rem; }
td { border-top: 1px solid #e1ebe7; }
td:last-child, th:last-child { text-align: right; }
.product-name { font-weight: 620; }
.product-category { color: var(--muted); font-size: .875rem; margin-top: .14rem; }
.code-action { border: 1px solid var(--line); background: #f8fbfa; color: var(--teal); border-radius: .42rem; min-height: 2.25rem; padding: .25rem .55rem; display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap; }
.code-action:hover { background: var(--wash); }
.code-action code { font: 600 .9rem ui-monospace, Consolas, monospace; }
.code-action svg { width: .95rem; height: .95rem; }
.empty { background: var(--paper); border: 1px dashed #aec3bc; border-radius: .8rem; padding: 1.5rem; }
.empty p { max-width: 48ch; margin-top: .3rem; color: var(--muted); }
.secondary { background: var(--paper); color: var(--teal); border: 1px solid #aac7be; border-radius: .5rem; padding: .57rem .85rem; font-weight: 700; }
.secondary:hover { background: var(--wash); }
.more { margin: .85rem 0 0; }
dialog { box-sizing: border-box; max-height: calc(100dvh - 2rem); width: min(33rem, 100% - 2rem); border: 1px solid var(--line); border-radius: .9rem; padding: 0; color: var(--dark); }
dialog::backdrop { background: #0b2125b5; }
.dialog-content { padding: 1.15rem; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.dialog-status { margin: .65rem 0 .85rem; color: var(--muted); }
.viewfinder { aspect-ratio: 4 / 3; position: relative; border-radius: .55rem; background: var(--dark); overflow: hidden; }
video { width: 100%; height: 100%; object-fit: contain; }
.target { pointer-events: none; position: absolute; inset: 25% 10%; border: 2px dashed #a3ead1; border-radius: .4rem; }
.photo-button { display: inline-block; }
.toast { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); padding: .65rem 1rem; border-radius: .5rem; background: var(--dark); color: #fff; box-shadow: 0 4px 16px #0b212544; text-align: center; max-width: calc(100vw - 2rem); }
@media (max-width: 580px) {
  .wrap { width: calc(100% - 1.75rem); }
  .masthead-content { min-height: 72px; }
  .catalogue-label { display: none; }
  .intro { padding-top: 1.75rem; }
  .search-panel { padding: .9rem; }
  .search-row { flex-direction: column; gap: .55rem; }
  .scan-button { min-height: 2.8rem; }
  .voice-order-button { min-height: 3.15rem; }
  td, th { padding: .65rem .65rem; }
  .code-action { gap: .3rem; }
}
.stock-status { color: var(--muted); margin: -.25rem 0 .7rem; font-size: .875rem; }
.stock-button { background: #eff5f4; color: #264944; border: 1px solid #bdd2cd; border-radius: .45rem; padding: .32rem .55rem; min-height: 2.25rem; font-size: .875rem; font-weight: 700; white-space: nowrap; }
.stock-button:hover { box-shadow: inset 0 0 0 1px var(--teal); }
.stock-button.counted { background: #ddf4e9; color: #075651; min-width: 3rem; }
.stock-button.low-stock { background: #fce7e9; color: #871c2c; border-color: #dfa7af; min-width: 3rem; }
#stock-product { color: var(--muted); }
.stock-current { margin: .7rem 0 1rem; padding: .5rem .7rem; border-radius: .4rem; background: var(--wash); font-weight: 700; }
.stock-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; margin-bottom: .5rem; }
#stock-form select, #stock-form input { display: block; width: 100%; min-height: 2.65rem; border: 1px solid #a8beb8; border-radius: .45rem; color: var(--dark); background: var(--paper); font-size: 1rem; margin-top: .25rem; }
#stock-form input { padding: .4rem .6rem; }
#stock-form .select-wrap { display: block; max-width: none; }
#stock-form .select-wrap::after { top: 1rem; }
#stock-form button:disabled { opacity: .55; cursor: default; }
.stock-feedback { margin: .5rem 0; color: var(--muted); min-height: 1.4rem; font-size: .9rem; }
.stock-history { margin-top: 1rem; border-top: 1px solid var(--line); }
.stock-history h3 { margin: .65rem 0 .25rem; font-size: 1rem; }
.stock-history ul { padding-left: 1.2rem; margin: 0; color: var(--muted); font-size: .875rem; }
.stock-history li + li { margin-top: .35rem; }
.product-name { overflow-wrap: anywhere; }
@media (max-width: 580px) {
  td, th { padding-inline: .4rem; }
  .code-action { padding-inline: .35rem; }
  .code-action svg { display: none; }
  .stock-button { padding-inline: .35rem; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.work-nav { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .65rem; margin-top: 1.2rem; padding: .7rem; border: 1px solid #d7e7e1; border-radius: 1.4rem; background: #e8f2ee; box-shadow: 0 9px 24px #153b330c; }
.nav-button { display: flex; align-items: center; gap: .55rem; min-height: 4.1rem; padding: .5rem .7rem; border: 1px solid #d0e0da; border-radius: 999px; background: #fff; color: #315650; box-shadow: 0 2px 8px #153b330a; text-align: left; line-height: 1.2; font-size: .9rem; font-weight: 750; }
.nav-button:hover { border-color: #73a89d; background: #f6fcf9; transform: translateY(-1px); }
.nav-step { display: grid; flex: 0 0 2.3rem; place-items: center; width: 2.3rem; height: 2.3rem; border: 1px solid #b8d7cc; border-radius: 50%; background: #e8f4ee; color: var(--teal); font-size: 1rem; font-weight: 800; }
.nav-button[aria-current="page"] { border-color: var(--teal); background: var(--teal); color: #fff; box-shadow: 0 5px 15px #07565132; }
.nav-button[aria-current="page"] .nav-step { border-color: #fff; background: #fff; color: var(--teal); }
@media (max-width: 1000px) { .work-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 850px) {
  .work-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 430px) {
  .brand-wordmark { font-size: clamp(1.05rem, 3.85vw, 1.32rem); }
  .brand-location { margin-inline-start: .22em; }
  .work-nav { gap: .45rem; padding: .5rem; }
  .nav-button { gap: .4rem; padding: .45rem .5rem; font-size: .84rem; }
  .nav-step { flex-basis: 2rem; width: 2rem; height: 2rem; }
}
.order-page { padding-bottom: 2.25rem; }
.received-order-toolbar { margin: .25rem 0 1rem; }
.received-order-panel { margin-top: .65rem; }
.received-order-panel > .order-hint { margin: .2rem 0 .8rem; }
.received-example { margin-top: 1.2rem; }
.received-example .order-hint { margin: .25rem 0 .75rem; }
.received-summary { margin-top: .9rem; padding: .8rem; border: 1px solid #b9d6c8; border-radius: .6rem; background: #f2f9f5; }
.received-summary h3 { margin: 0 0 .55rem; font-size: .95rem; }
.received-summary .order-hint { margin-top: .5rem; }
.received-summary .order-hint + .order-hint { margin-top: .2rem; }
.received-totals { max-width: 38rem; margin-bottom: 0; }
.received-totals .order-metric { padding: .48rem .58rem; }
.received-totals .order-metric span { font-size: .74rem; }
.received-totals .order-metric strong { font-size: 1.35rem; }
.received-lines { overflow-x: auto; }
#received-orders-page .received-items-table { table-layout: fixed; width: 100%; min-width: 56rem; }
#received-orders-page .received-items-table th, #received-orders-page .received-items-table td { padding: .4rem .34rem; vertical-align: middle; font-size: .82rem; overflow-wrap: anywhere; }
#received-orders-page .received-items-table th { font-size: .72rem; letter-spacing: .015em; line-height: 1.2; }
#received-orders-page .received-items-table th:not(:first-child), #received-orders-page .received-items-table td:not(:first-child) { width: auto; white-space: normal; text-align: left; }
#received-orders-page .received-items-table th:nth-child(1), #received-orders-page .received-items-table td:nth-child(1) { width: 14%; }
#received-orders-page .received-items-table th:nth-child(2), #received-orders-page .received-items-table td:nth-child(2) { width: 23%; min-width: 0; }
#received-orders-page .received-items-table th:nth-child(3), #received-orders-page .received-items-table td:nth-child(3) { width: 13%; }
#received-orders-page .received-items-table th:nth-child(4), #received-orders-page .received-items-table td:nth-child(4) { width: 11%; }
#received-orders-page .received-items-table th:nth-child(5), #received-orders-page .received-items-table td:nth-child(5) { width: 9%; text-align: center; }
#received-orders-page .received-items-table th:nth-child(6), #received-orders-page .received-items-table td:nth-child(6) { width: 7%; text-align: center; }
#received-orders-page .received-items-table th:nth-child(7), #received-orders-page .received-items-table td:nth-child(7) { width: 9%; text-align: center; }
#received-orders-page .received-items-table th:nth-child(8), #received-orders-page .received-items-table td:nth-child(8) { width: 14%; text-align: center; }
#received-orders-page .received-model { color: var(--teal); font-weight: 750; font-size: .8rem; }
#received-orders-page .received-item { font-weight: 700; line-height: 1.3; font-size: .82rem; }
#received-orders-page .received-variant { color: #375750; font-size: .78rem; }
#received-orders-page .received-code { font: 650 .77rem ui-monospace, Consolas, monospace; white-space: nowrap !important; }
.received-price-box { display: inline-flex; align-items: center; justify-content: center; min-width: 4.1rem; min-height: 2rem; padding: .2rem .4rem; border: 1px solid #9bcbb6; border-radius: .48rem; background: #e6f6eb; color: #07533f; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.received-ordered { font-variant-numeric: tabular-nums; }
.received-print { white-space: nowrap; padding: .3rem .42rem; font-size: .77rem; }
@media (max-width: 700px) {
  #received-orders-page .received-lines { overflow: visible; border: 0; }
  #received-orders-page .received-items-table { display: block; width: 100%; min-width: 0; }
  #received-orders-page .received-items-table thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  #received-orders-page .received-items-table tbody { display: grid; gap: .7rem; }
  #received-orders-page .received-items-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem .7rem; padding: .7rem; border: 1px solid var(--line); border-radius: .65rem; background: #fff; }
  #received-orders-page .received-items-table td, #received-orders-page .received-items-table td:not(:first-child) { display: block; width: auto; min-width: 0; padding: .2rem; border: 0; text-align: left; white-space: normal; }
  #received-orders-page .received-items-table td::before { content: attr(data-label); display: block; margin-bottom: .08rem; color: var(--muted); font: 700 .68rem/1.2 system-ui, sans-serif; letter-spacing: .035em; text-transform: uppercase; }
  #received-orders-page .received-items-table td:nth-child(1), #received-orders-page .received-items-table td:nth-child(2), #received-orders-page .received-items-table td:nth-child(3), #received-orders-page .received-items-table td:nth-child(8) { grid-column: 1 / -1; width: 100%; }
  #received-orders-page .received-items-table td:nth-child(4) { grid-column: 1; }
  #received-orders-page .received-items-table td:nth-child(5) { grid-column: 2; }
  #received-orders-page .received-items-table td:nth-child(6) { grid-column: 1; }
  #received-orders-page .received-items-table td:nth-child(7) { grid-column: 2; }
  #received-orders-page .received-items-table .received-print { width: 100%; min-height: 2.5rem; font-size: .85rem; }
  .received-totals { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem; }
  .received-totals .order-metric { padding: .4rem; }
  .received-totals .order-metric span { font-size: .68rem; }
  .received-totals .order-metric strong { font-size: 1.1rem; }
}
#barcode-print-sheet { display: none; }
.order-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.order-heading h1 { overflow-wrap: anywhere; }
.order-heading button { flex-shrink: 0; }
.order-example { margin: 1rem 0 1.3rem; padding: 1rem; border: 1px solid #d8bc72; border-radius: .8rem; background: #fffbef; }
.find-example { margin: 1.2rem 0; padding: 1rem; border: 1px solid #d8bc72; border-radius: .8rem; background: #fffbef; }
.find-example-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; flex-wrap: wrap; }
.find-example-heading h2 { margin: 0; font-size: 1.08rem; }
.find-example-heading span { color: #694d10; font-size: .875rem; font-weight: 750; }
.find-example > p { margin: .4rem 0 .8rem; color: #5b513a; }
.find-example .find-example-table { margin-top: .75rem; overflow-x: auto; background: #fff; border-radius: .55rem; }
.find-example-table table { min-width: 55rem; }
.find-example-table th, .find-example-table td { padding: .55rem .65rem; }
.find-example-table td:first-child { color: var(--teal); font-weight: 750; }
.find-example-table td:nth-child(2) { min-width: 15rem; font-weight: 400; }
.find-example-table td:nth-child(4), .find-example-table td:nth-child(5), .find-example-table td:nth-child(6) { white-space: nowrap; }
.find-example-table td:nth-child(5) { font-variant-numeric: tabular-nums; font-weight: 700; }
.example-price-box { display: inline-flex; align-items: center; justify-content: center; min-height: 2rem; min-width: 4.7rem; padding: .18rem .48rem; border: 1px solid #d9c58b; border-radius: .42rem; background: #fff8e7; color: #634711; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.search-price-note { margin: 1rem 0 .4rem; }
.results .table-wrap { overflow-x: auto; }
.results .table-wrap table { min-width: 48rem; }
.results .table-wrap th, .results .table-wrap td { padding: .55rem .6rem; }
.results .quantity-stepper-button, #iphone-order-results .quantity-stepper-button { width: 2.15rem; }
.results .quantity-stepper-value, #iphone-order-results .quantity-stepper-value { width: 3.4rem; min-width: 2.8rem; }
.results .delete-item-button, #iphone-order-results .delete-item-button { padding: .4rem .55rem; font-size: .87rem; }
.find-example-table .quantity-stepper { min-height: 2.4rem; }
.find-example-table .quantity-stepper-button { width: 2.15rem; min-height: 2.4rem; font-size: 1.15rem; }
.find-example-table .quantity-stepper-value { width: 3.4rem; min-width: 2.8rem; min-height: 2.4rem; padding: .2rem; }
.find-example-actions { display: flex; align-items: center; gap: .32rem; white-space: nowrap; }
.find-example-actions button { min-height: 2.4rem; padding: .34rem .52rem; font-size: .86rem; }
.find-example-actions .example-add { border-color: #91bda7; background: #e6f5eb; color: #07533f; font-weight: 750; }
.find-example-actions .example-add:hover { background: #d1ebda; }
.find-example .order-example-total { margin: .75rem 0 0; font-weight: 750; color: var(--dark); }
.order-example-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; flex-wrap: wrap; }
.order-example-heading h2 { margin: 0; font-size: 1.08rem; }
.order-example-heading span { color: #694d10; font-size: .875rem; font-weight: 750; }
.order-example > p { margin: .4rem 0 .8rem; color: #5b513a; }
.order-example-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.order-example-group { border: 1px solid #e8dfc8; border-radius: .6rem; background: #fff; padding: .7rem .8rem; }
.order-example-group h3 { margin: 0 0 .4rem; font-size: .95rem; }
.order-example-group ul { list-style: none; margin: 0; padding: 0; }
.order-example-group li { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: .42rem 0; border-top: 1px solid #f0ece3; flex-wrap: wrap; }
.order-example-group li strong, .order-example-group li small { display: block; }
.order-example-group li strong { font-size: .9rem; }
.order-example-group li small { color: var(--muted); font-size: .82rem; }
.order-example-group li b { white-space: nowrap; color: var(--teal); }
.sample-delete { margin-left: auto; }
.order-example-group li span, .current-order-example li span { flex: 1; min-width: 0; }
.order-example .order-example-total { margin: .75rem 0 0; font-weight: 700; color: var(--dark); }
.current-order-example { margin: .8rem 0 1rem; border: 1px solid #c7dcd3; border-radius: .65rem; background: #f2faf6; padding: .85rem; }
.current-order-example > p:first-child { margin: 0 0 .5rem; color: #245745; }
.current-order-example ul { list-style: none; margin: 0; padding: 0; }
.current-order-example li { display: flex; align-items: center; justify-content: space-between; gap: .8rem; border-top: 1px solid #dcebe4; padding: .42rem 0; flex-wrap: wrap; }
.current-order-example li strong, .current-order-example li small { display: block; }
.current-order-example li small { color: var(--muted); }
.current-order-example li b { white-space: nowrap; color: var(--teal); }
.current-example-table { overflow-x: auto; border-radius: .55rem; }
.current-example-table table { min-width: 44rem; }
.current-example-table th, .current-example-table td { padding: .55rem .65rem; }
.current-example-table td:first-child { font-weight: 800; color: var(--dark); }
.current-example-table td:nth-child(2) { min-width: 12rem; }
.current-example-table td:nth-child(3) { white-space: nowrap; }
.current-example-table td:nth-child(5) { text-align: center; }
.current-example-table td:nth-child(6) { text-align: right; }
.current-order-example .order-example-total { margin: .7rem 0 0; font-weight: 700; }
#current-missing-list .order-table-wrap { background: #fff; border-radius: .5rem; overflow-x: auto; }
#current-missing-list table { min-width: 34rem; }
#current-missing-list td:nth-child(4) { color: #8d202d; font-weight: 750; }
#current-missing-list td:nth-child(4) .quantity-stepper { color: var(--dark); }
.order-removed-items { margin-top: .7rem; padding: .55rem .7rem; border: 1px dashed #d7c994; border-radius: .5rem; background: #fffdf7; }
.order-removed-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding-top: .3rem; }
@media (max-width: 650px) { .order-example-grid { grid-template-columns: 1fr; } }
.order-page #orders-status:empty { display: none; }
.order-page .order-error { color: #8e1f2c; }
.order-panel, .order-card { background: var(--paper); border: 1px solid var(--line); border-radius: .8rem; }
.order-panel { padding: 1.1rem; }
.order-page fieldset { margin: 0; padding: 0; min-width: 0; border: 0; }
.order-page button:disabled { opacity: .56; cursor: default; }
.order-page button:disabled:hover { box-shadow: none; }
.order-list { display: grid; gap: .65rem; }
.order-card { display: flex; align-items: center; justify-content: space-between; gap: .65rem; padding: .9rem 1rem; color: var(--dark); text-align: left; width: 100%; }
.order-card:hover, .picker-result:hover { background: #f0f8f5; border-color: #97bab1; }
.order-card-main { display: grid; gap: .2rem; overflow-wrap: anywhere; }
.order-hint { font-size: .875rem; color: var(--muted); }
#order-source { margin-top: .5rem; }
.order-badge { display: inline-block; border-radius: .35rem; background: #eaf1ef; color: #365650; padding: .24rem .44rem; font-size: .875rem; font-weight: 700; white-space: nowrap; }
.order-badge.missing, .order-metric.missing { background: #fce7e9; color: #8d202d; border-color: #e9b6bd; }
.order-badge.complete { background: #dff4e9; color: #075651; }
.order-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.order-actions .order-input { flex: 1 1 12rem; width: auto; }
.order-input { display: block; width: 100%; min-width: 0; min-height: 2.65rem; padding: .42rem .58rem; border: 1px solid #a8beb8; border-radius: .45rem; color: var(--dark); background: var(--paper); }
.order-input.quantity-input { max-width: 7rem; min-width: 2.2rem; }
.quantity-stepper { display: inline-flex; align-items: stretch; border: 1px solid #9bbdb4; border-radius: .65rem; background: #fff; overflow: hidden; min-height: 2.7rem; white-space: nowrap; }
.quantity-stepper:focus-within { outline: 2px solid #328a78; outline-offset: 2px; }
.quantity-stepper-button { width: 2.5rem; min-height: 2.7rem; border: 0; background: #e8f4ef; color: #075651; font-size: 1.35rem; font-weight: 800; }
.quantity-stepper-button:hover:not(:disabled) { background: #cde8db; }
.quantity-stepper-button:disabled { opacity: .45; cursor: default; }
.order-input.quantity-stepper-value { appearance: textfield; width: 4.2rem; min-width: 3.1rem; min-height: 2.7rem; border: 0; border-inline: 1px solid #c8ddd5; border-radius: 0; padding: .3rem .2rem; text-align: center; font-weight: 750; }
.quantity-stepper-value::-webkit-inner-spin-button, .quantity-stepper-value::-webkit-outer-spin-button { appearance: none; margin: 0; }
.delete-item-button { border: 1px solid #d49fa8; border-radius: .5rem; background: #fff1f2; color: #8a1f31; padding: .5rem .72rem; font-weight: 750; white-space: nowrap; }
.delete-item-button:hover:not(:disabled) { background: #fbdfe3; border-color: #b95969; }
.delete-item-button:disabled { opacity: .5; cursor: default; }
.order-pick { margin: 1rem 0; }
.order-picker { display: grid; gap: .3rem; margin-top: .45rem; }
.picker-result { display: flex; align-items: center; justify-content: space-between; gap: .6rem; text-align: left; border-radius: .45rem; border: 1px solid var(--line); color: var(--teal); background: #f8fbfa; padding: .45rem .65rem; }
.picker-result > span { font-size: .875rem; white-space: nowrap; }
.order-product-label { overflow-wrap: anywhere; color: var(--dark); }
.order-table-wrap { border: 1px solid var(--line); border-radius: .5rem; overflow: hidden; }
.order-table th, .order-table td { padding: .65rem; }
.order-table td:not(:first-child), .order-table th:not(:first-child) { text-align: right; }
.order-table td:not(:first-child) { width: 1%; white-space: nowrap; }
.order-table tr:nth-child(even) { background: #f8fbfa; }
.order-text-button { background: transparent; border: 0; color: var(--teal); min-height: 2.2rem; padding: .3rem .4rem; font-size: .875rem; font-weight: 700; text-decoration: underline; text-underline-offset: .2em; }
#draft-lines { margin: .8rem 0 1rem; }
.draft-total { margin-top: .5rem; }
.draft-quantity-summary { margin: 1rem 0 1.2rem; padding: .85rem; border: 1px solid #b8d5c8; border-radius: .7rem; background: #f1f9f4; }
.draft-quantity-summary h3 { margin: 0 0 .6rem; font-size: 1rem; }
.draft-quantity-summary .order-totals { grid-template-columns: repeat(3, minmax(0, 9rem)); gap: .45rem; margin-bottom: .5rem; }
.draft-quantity-summary .order-metric { gap: 0; padding: .42rem .55rem; border-radius: .45rem; }
.draft-quantity-summary .order-metric span { font-size: .76rem; }
.draft-quantity-summary .order-metric strong { font-size: 1.35rem; }
.draft-quantity-summary .order-metric.total { border-color: #78ad93; background: #e0f3e7; color: #07533f; }
@media (max-width: 560px) { .draft-quantity-summary .order-totals { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem; } .draft-quantity-summary .order-metric { padding: .38rem .42rem; } .draft-quantity-summary .order-metric span { font-size: .69rem; } .draft-quantity-summary .order-metric strong { font-size: 1.15rem; } }
.order-totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-bottom: .9rem; }
.order-metric { display: grid; gap: .12rem; padding: .7rem; min-width: 0; border: 1px solid var(--line); border-radius: .55rem; background: #fff; color: var(--dark); overflow-wrap: anywhere; }
.order-metric span { font-size: .875rem; font-weight: 650; }
.order-metric strong { font-size: clamp(1.2rem, 4vw, 2rem); line-height: 1.25; }
.delivery-panel > .order-hint { margin-top: .25rem; }
.delivery-search { margin: .8rem 0; }
.missing-toggle { display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; font-size: .875rem; font-weight: 600; }
.missing-toggle input { width: 1.15rem; height: 1.15rem; accent-color: var(--teal); }
.receive-controls { display: flex; justify-content: flex-end; gap: .3rem; align-items: center; }
.receive-controls .quantity-input { width: 5rem; }
.delivery-actions { margin-top: 1rem; }
@media (max-width: 580px) {
  .order-heading { align-items: flex-start; flex-direction: column; }
  .order-panel { padding: .7rem; }
  .order-table th, .order-table td { padding: .4rem .28rem; }
  .order-badge { font-size: .8rem; }
  .receive-controls { flex-direction: column; gap: 0; }
  .receive-controls .quantity-input { width: 3.3rem; padding: .25rem .2rem; }
  .receive-controls .order-text-button { min-height: 1.9rem; }
}
.work-nav { flex-wrap: wrap; }
.model-results { margin-top: 1.15rem; }
.model-heading, .model-cart { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; }
.model-heading { justify-content: space-between; margin-bottom: .45rem; }
.model-cart { margin: .7rem 0; padding: .55rem .6rem; background: var(--wash); border: 1px solid var(--line); border-radius: .55rem; }
.model-cart-message { flex: 1 1 11rem; font-size: .875rem; }
.model-cart .scan-button { padding: .5rem .7rem; }
.model-cart button:disabled { opacity: .55; cursor: default; }
.model-table { table-layout: auto; background: #fff; }
#iphone-order-results .order-table-wrap { overflow-x: auto; }
#iphone-order-results .model-table { min-width: 47rem; }
#iphone-order-results .model-table th, #iphone-order-results .model-table td { padding: .55rem .55rem; }
.model-table th, .model-table td { text-align: start; }
.model-table td:not(:first-child), .model-table th:not(:first-child) { text-align: center; }
.model-table .model-product { min-width: 0; text-align: start; overflow-wrap: anywhere; }
.model-code { color: var(--muted); font-size: .85rem; }
.model-quantity { width: 5.8rem; margin-inline: auto; text-align: center; }
.model-level { border: 1px solid #bed0ce; border-radius: .45rem; background: #edf4f2; color: #294846; padding: .35rem .48rem; font-weight: 700; font-size: .875rem; }
.model-level.low { color: #871c2c; background: #fce7e9; border-color: #dfa7af; }
.model-level.healthy { color: #06533f; background: #dcf4e7; border-color: #a9d8c6; }
.model-level:hover { box-shadow: inset 0 0 0 1px currentColor; }
.model-reorder { display: block; margin-inline: auto; }
.model-summary { margin: .85rem 0; }
.model-summary h3 { margin: 0 0 .45rem; font-size: 1rem; }
.model-summary ul { display: grid; grid-template-columns: repeat(auto-fit,minmax(12rem,1fr)); gap: .38rem; list-style: none; padding: 0; margin: 0; }
.model-summary li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .58rem; justify-content: space-between; padding: .4rem .55rem; border-radius: .42rem; border: 1px solid var(--line); background: #fff; font-size: .88rem; }
.model-summary small { width: 100%; color: var(--muted); }
@media(max-width: 580px) {
  .nav-button { padding-inline: .5rem; font-size: .9rem; }
  .model-table td, .model-table th { white-space: normal !important; width: auto !important; }
  .model-table .model-product { width: 38% !important; }
  .model-level { font-size: .8rem; padding-inline: .2rem; min-width: 3rem; }
  .model-quantity { width: 3.2rem; min-width: 2.5rem; padding-inline: .2rem; }
}

.model-suggestions { list-style: none; padding: 0; margin: .65rem 0 1.5rem; max-width: 32rem; }
.model-suggestions li + li { margin-top: .3rem; }
.model-suggestion { display: flex; justify-content: space-between; align-items: center; gap: .4rem .75rem; flex-wrap: wrap; width: 100%; text-align: left; padding: .55rem .75rem; border: 1px solid var(--line); border-radius: .45rem; background: var(--paper); color: var(--dark); font-weight: 650; }
.model-suggestion:hover { background: var(--wash); border-color: #a8beb8; }

.model-status { border-radius: .35rem; padding: .18rem .45rem; font-size: .875rem; color: var(--muted); background: #edf4f2; }
.model-status.low, .model-alert { color: #871c2c; background: #fce7e9; }
.model-status.healthy { color: #06533f; background: #dcf4e7; }
.model-alert { padding: .45rem .65rem; border: 1px solid #dfa7af; border-radius: .45rem; font-weight: 700; font-size: .9rem; }

.model-suggestion-low { border-inline-start: .25rem solid #a42f42; }
.model-suggestion-healthy { border-inline-start: .25rem solid #28795e; }

.stock-report-actions { margin-top: 1rem; }
.stock-example-note { margin: .65rem 0 1rem; padding: .75rem .9rem; border: 1px solid #d8bc72; border-radius: .6rem; background: #fff5d9; color: #604812; }
.stock-report-actions button:disabled { cursor: default; opacity: .55; }
.stock-report-table { overflow-x: auto; }
.stock-report-table table { min-width: 64rem; }
.stock-report-table td:last-child, .stock-report-table th:last-child { min-width: 8rem; text-align: center; }
.stock-report-table .received-print { width: 100%; }
.stock-report-table th, .stock-report-table td { padding: .55rem .58rem; }
.stock-report-model-start td { border-top: 2px solid #a8beb8; }
.stock-report-model-end td { border-bottom: 1px solid #d5e2dd; }
.stock-report-table td:first-child { font-weight: 650; }
.stock-model-select { display: inline-block; padding: .22rem .35rem; border: 1px solid transparent; border-radius: .45rem; background: transparent; color: var(--teal); text-align: left; font: inherit; font-weight: 750; cursor: pointer; }
.stock-model-select:hover, .stock-model-select:focus-visible { border-color: #8bbcaf; background: #eaf6f0; }
.stock-report-selected td { background: #eff9f4; border-top-color: #91c5af; border-bottom-color: #91c5af; }
.stock-report-selected td:first-child { border-inline-start: 3px solid #58a183; }
.stock-report-selected td:last-child { border-inline-end: 3px solid #58a183; }
.stock-report-selected .stock-model-select { background: #ddf2e7; border-color: #91c5af; color: #064c3e; }
.stock-quantity-box, .missing-quantity-box, .missing-count-box { display: inline-flex; align-items: center; justify-content: center; min-width: 2.5rem; min-height: 2rem; padding: .2rem .6rem; border: 1px solid #9bcbb6; border-radius: .48rem; background: #e6f6eb; color: #07533f; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media print {
  @page { size: A4 landscape; margin: 11mm; }
  body:not(.printing-barcode) > :not(#stock-print-sheet) { display: none !important; }
  body:not(.printing-barcode) #stock-print-sheet { display: block !important; color: #000; }
  body.printing-barcode > :not(#barcode-print-sheet) { display: none !important; }
  body.printing-barcode #barcode-print-sheet { display: flex !important; box-sizing: border-box; flex-direction: column; align-items: center; justify-content: center; gap: 1.1mm; width: 57mm; height: 32mm; padding: 2.5mm 4mm 2.5mm 3mm; color: #000; background: #fff; overflow: hidden; }
  #barcode-print-sheet strong { max-width: 46mm; font: 700 7pt/1.15 Arial, sans-serif; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #barcode-print-sheet svg { display: block; flex: 0 0 auto; width: 46mm; height: 15mm; fill: #000; transform: translateX(-1mm); shape-rendering: crispEdges; }
  #barcode-print-sheet span { font: 700 10pt Arial, sans-serif; letter-spacing: .08em; }
  #stock-print-sheet h1 { font-size: 21pt; margin-bottom: 3mm; }
  #stock-print-sheet p { margin-bottom: 4mm; }
  #stock-print-sheet .stock-report-table { overflow: visible; border: none; }
  #stock-print-sheet table { min-width: 0; font-size: 9pt; }
  #stock-print-sheet .stock-report-table td:last-child, #stock-print-sheet .stock-report-table th:last-child { min-width: 0; text-align: right; }
  #stock-print-sheet thead { display: table-header-group; }
  #stock-print-sheet tr { break-inside: avoid; }
  #stock-print-sheet th, #stock-print-sheet td { padding: 1.7mm; border-bottom: 1px solid #ccc; }
  #stock-print-sheet .stock-quantity-box { border: 1px solid #777; background: #fff; color: #000; }
}
.required-stock-table { overflow-x: auto; }
.required-stock-table table { min-width: 54rem; }
.required-stock-table .model-quantity { min-width: 4rem; }
.required-add { white-space: nowrap; }
.required-stock-row { background: #fff7f7; }
.required-stock-row td { border-top-color: #f0d8db; }
.required-stock-row td:first-child { border-inline-start: 3px solid #a42f42; }
.required-tick { width: 1.15rem; height: 1.15rem; accent-color: var(--teal); cursor: pointer; }
.required-on-hand { display: inline-block; white-space: nowrap; }
.required-stock-table .required-model-group th { text-align: left; background: #e8f1ee; color: var(--dark); }
.required-stock-row.required-stock-safe { background: #f2faf6; }
.required-stock-row.required-stock-safe td { border-top-color: #d7e9dc; }
.required-stock-row.required-stock-safe td:first-child { border-inline-start-color: #28795e; }
#required-list-title { margin-bottom: .4rem; }
.part-results-title { font-size: 1rem; margin: .85rem 0 .4rem; }
.packing-table { overflow-x: auto; }
.packing-table table { min-width: 34rem; }
.packing-table td, .packing-table th { padding: .6rem .75rem; }
.packing-table td:last-child { white-space: nowrap; }
.warehouse-shortage { color: #871c2c; background: #fce7e9; font-weight: 750; }
.missing-quantity-box { border-color: #dfa7af; background: #fff; color: #871c2c; }
.missing-count-box { border-color: #c7d7d1; background: #f5faf7; color: #244c43; }
.missing-count-box.packed { border-color: #b3cfbf; background: #ebf7ef; }
.missing-count-box.received { border-color: #b5c9d9; background: #f1f7fa; color: #31566d; }
.missing-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin: .75rem 0; }
.missing-total-card { display: grid; gap: .15rem; padding: .6rem .75rem; border: 1px solid #cbdcd5; border-radius: .55rem; background: #fff; }
.missing-total-card span { color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .035em; }
.missing-total-card strong { font-size: 1.12rem; font-variant-numeric: tabular-nums; }
.missing-total-card.missing { border-color: #e1aeb8; background: #fff1f3; color: #8b2639; }
@media (max-width: 600px) { .missing-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.shortage-actions { margin-top: .8rem; }
#warehouse-packing { margin-bottom: .75rem; }

/* Keep every section's item lists as compact as the Received Orders list. */
:is(#stock-page, #model-stock-page, #required-stock-page, #last-order-missing-page, #orders-page) table :is(th, td) {
  padding: .4rem .34rem;
  vertical-align: middle;
  font-size: .82rem;
  overflow-wrap: anywhere;
}
:is(#stock-page, #model-stock-page, #required-stock-page, #last-order-missing-page, #orders-page) table th {
  font-size: .72rem;
  letter-spacing: .015em;
  line-height: 1.2;
}
:is(#stock-page, #model-stock-page, #required-stock-page, #last-order-missing-page, #orders-page) :is(.product-name, .model-product, .order-product-label) {
  font-size: .82rem;
  line-height: 1.3;
}
:is(#stock-page, #model-stock-page, #required-stock-page, #last-order-missing-page, #orders-page) :is(.order-example-group li, .current-order-example li, .model-summary li, .order-card, .model-suggestion) {
  font-size: .82rem;
  line-height: 1.3;
}
:is(#stock-page, #model-stock-page, #required-stock-page, #last-order-missing-page, #orders-page) :is(.order-example-group li strong, .current-order-example li strong) {
  font-size: .82rem;
}
