:root {
  --ink: #112c35;
  --ink-soft: #38515a;
  --muted: #6e8086;
  --surface: #ffffff;
  --surface-soft: #f3f6f5;
  --canvas: #e9efed;
  --line: #d8e1de;
  --brand: #00685f;
  --brand-dark: #064940;
  --lime: #dfff68;
  --success: #0a795e;
  --warning: #a26000;
  --danger: #b53b32;
  --shadow: 0 18px 50px rgb(16 44 53 / 10%);
  font-family: Inter, Aptos, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}

button, input { font: inherit; }

a { color: inherit; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 20;
  padding: 8px 12px;
  background: #fff;
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  height: 76px;
  padding: 0 clamp(22px, 5vw, 80px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 47px;
  height: 47px;
  display: grid;
  place-items: center;
  border-radius: 13px 3px 13px 3px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: -.03em;
}

.brand-copy { display: grid; line-height: 1.15; }
.brand-copy strong { font-size: 17px; }
.brand-copy small { margin-top: 4px; color: var(--muted); font-size: 11px; letter-spacing: .025em; }

.header-nav { display: flex; align-items: center; gap: 24px; }
.header-nav > a { color: var(--ink-soft); font-weight: 700; text-decoration: none; }
.header-nav > a:hover { color: var(--brand); }

.live-indicator { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.live-indicator i { width: 8px; height: 8px; border-radius: 50%; background: #20a676; box-shadow: 0 0 0 4px #dff4ed; }

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 86% 20%, rgb(223 255 104 / 18%) 0 12%, transparent 35%),
    linear-gradient(132deg, #0c3438 0%, #07534d 58%, #08685d 100%);
  color: #fff;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .13;
  background-image: linear-gradient(90deg, transparent 49.7%, #fff 50%, transparent 50.3%);
  background-size: 72px 72px;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  padding: 62px clamp(22px, 5vw, 80px) 68px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.hero .eyebrow { color: var(--lime); }

h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 760px;
  margin-bottom: 12px;
  font-size: clamp(39px, 5vw, 66px);
  line-height: 1.02;
  letter-spacing: -.045em;
}

.hero-copy { max-width: 720px; margin-bottom: 32px; color: rgb(255 255 255 / 74%); font-size: 17px; }

.hero-tools {
  display: grid;
  grid-template-columns: minmax(0, 880px) minmax(260px, 330px);
  align-items: stretch;
  gap: 14px;
}
.hero-action-stack {
  min-width: 0;
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.search-card {
  width: 100%;
  padding: 18px;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 15px;
  background: rgb(255 255 255 / 10%);
  backdrop-filter: blur(8px);
  box-shadow: 0 20px 55px rgb(0 30 27 / 22%);
}

.search-card > label { display: block; margin-bottom: 8px; color: var(--lime); font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.search-card > p { margin: 8px 2px 0; color: rgb(255 255 255 / 55%); font-size: 12px; }

.search-row { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; overflow: hidden; border-radius: 10px; background: #fff; }
.search-icon { display: grid; place-items: center; color: var(--brand); }
.search-icon svg { width: 22px; stroke: currentColor; stroke-width: 1.8; }
.search-row input { width: 100%; min-width: 0; height: 60px; border: 0; outline: 0; color: var(--ink); font-size: 18px; font-weight: 650; }
.search-row input::placeholder { color: #98a8aa; font-weight: 500; }
.search-row:focus-within { box-shadow: 0 0 0 4px rgb(223 255 104 / 35%); }
.search-row button { height: 48px; margin-right: 6px; padding: 0 19px 0 22px; display: inline-flex; align-items: center; gap: 12px; border: 0; border-radius: 8px; background: var(--brand); color: #fff; font-weight: 800; cursor: pointer; }
.search-row button:hover { background: var(--brand-dark); }
.search-row button:disabled { cursor: wait; opacity: .7; }
.search-row button svg { width: 19px; stroke: currentColor; stroke-width: 2; }

.scan-launch-card {
  min-width: 0;
  padding: 17px 18px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  border: 1px solid rgb(223 255 104 / 48%);
  border-radius: 15px;
  background: rgb(3 38 36 / 44%);
  color: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 20px 55px rgb(0 30 27 / 18%);
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.scan-launch-card:hover { border-color: var(--lime); background: rgb(3 38 36 / 66%); transform: translateY(-1px); }
.scan-launch-card:focus-visible { outline: 3px solid rgb(223 255 104 / 65%); outline-offset: 3px; }
.scan-launch-card-midea { border-color: rgb(89 190 255 / 58%); }
.scan-launch-card-midea .scan-launch-icon { background: #64c7ff; }
.scan-launch-card-midea .scan-launch-copy small { color: #8ed8ff; }
.scan-launch-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; background: var(--lime); color: var(--brand-dark); }
.scan-launch-icon svg { width: 25px; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.scan-launch-copy { min-width: 0; display: grid; }
.scan-launch-copy small { color: var(--lime); font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.scan-launch-copy strong { margin-top: 2px; font-size: 14px; line-height: 1.25; }
.scan-launch-copy em { margin-top: 4px; color: rgb(255 255 255 / 58%); font-size: 10px; font-style: normal; line-height: 1.3; }
.scan-launch-arrow { width: 18px; stroke: currentColor; stroke-width: 2; }

.status-region, .start-state, .loading-state, .result { width: min(1320px, calc(100% - 44px)); margin-inline: auto; }
.status-region { margin-top: 18px; }
.status-region:empty { display: none; }

.notice { padding: 12px 15px; display: flex; align-items: flex-start; gap: 10px; border: 1px solid; border-radius: 9px; background: #fff; font-weight: 650; }
.notice.error { border-color: #edc1bd; color: var(--danger); }
.notice.info { border-color: #bcdad4; color: var(--brand); }

.start-state { padding: 34px 0 70px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.start-card { min-height: 132px; padding: 24px; display: flex; gap: 18px; border: 1px solid var(--line); border-radius: 12px; background: rgb(255 255 255 / 72%); }
.start-number { color: var(--brand); font-family: ui-monospace, Consolas, monospace; font-size: 12px; font-weight: 800; }
.start-card strong { font-size: 16px; }
.start-card p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }

.loading-state { padding: 44px 0 90px; }
.skeleton { position: relative; overflow: hidden; background: #dce5e2; }
.skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgb(255 255 255 / 55%), transparent); transform: translateX(-100%); animation: shimmer 1.35s infinite; }
.skeleton-title { width: 340px; height: 48px; border-radius: 8px; }
.skeleton-grid { margin-top: 22px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.skeleton-card { height: 130px; border-radius: 12px; }
@keyframes shimmer { to { transform: translateX(100%); } }

.result { padding: 32px 0 72px; }
.result-header { padding: 25px 27px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-radius: 14px 14px 0 0; background: var(--surface); border: 1px solid var(--line); }
.customer-heading { display: flex; align-items: center; gap: 16px; min-width: 0; }
.customer-avatar { width: 58px; height: 58px; flex: 0 0 58px; display: grid; place-items: center; border-radius: 50%; background: #ddefea; color: var(--brand); font-size: 18px; font-weight: 850; }
.heading-line { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.heading-line h2 { margin: 0; font-size: 25px; letter-spacing: -.025em; }
.customer-heading p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }

.tag { display: inline-flex; min-height: 23px; padding: 2px 9px; align-items: center; border-radius: 99px; font-size: 11px; font-weight: 800; }
.tag-success { background: #dff3ec; color: var(--success); }
.tag-warning { background: #fff0ce; color: var(--warning); }
.tag-neutral { background: #e9eeed; color: var(--ink-soft); }
.tag-pv { background: #fff4c4; color: #765500; }
.tag-wp { background: #dff0ed; color: var(--brand); }

.result-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.button { min-height: 40px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 8px; font-size: 12px; font-weight: 800; text-decoration: none; cursor: pointer; }
.button svg { width: 17px; stroke: currentColor; stroke-width: 1.8; }
.button-primary { background: var(--brand); color: #fff; }
.button-primary:hover { background: var(--brand-dark); }
.button-midea { background: #0879be; color: #fff; }
.button-midea:hover { background: #05639d; }
.button-quiet { border-color: var(--line); background: #fff; color: var(--ink-soft); }
.button-quiet:hover { background: var(--surface-soft); }
.button-disabled { border-color: #e2e7e5; background: #f1f3f2; color: #95a19e; cursor: not-allowed; }
.button-disabled span { padding: 1px 5px; border-radius: 4px; background: #e2e7e5; font-size: 9px; text-transform: uppercase; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-top: 0; background: var(--surface); }
.stat { min-height: 90px; padding: 18px 25px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat span { display: block; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.stat strong { display: block; margin-top: 5px; font-size: 25px; letter-spacing: -.03em; }

.delivered-components { margin-top: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.delivery-head { min-height: 73px; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.delivery-head h2 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
.delivery-head .eyebrow { margin: 0 0 3px; }
.delivery-head > span { color: var(--muted); font-size: 11px; font-weight: 750; }
.delivery-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: #fafcfc; }
.delivery-stat { min-width: 0; padding: 12px 20px; border-right: 1px solid var(--line); }
.delivery-stat:last-child { border-right: 0; }
.delivery-stat span { display: block; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.delivery-stat strong { display: block; margin-top: 3px; font-size: 19px; }
.delivery-table-wrap { overflow-x: auto; }
.delivery-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.delivery-table th { padding: 10px 14px; border-bottom: 1px solid var(--line); background: #f4f7f6; color: var(--muted); font-size: 9px; letter-spacing: .05em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.delivery-table td { padding: 13px 14px; border-bottom: 1px solid #e8edeb; vertical-align: top; }
.delivery-table tbody tr:last-child td { border-bottom: 0; }
.delivery-table td strong, .delivery-table td small { display: block; }
.delivery-table td strong { font-size: 12px; }
.delivery-table td small { max-width: 270px; margin-top: 3px; color: var(--muted); font-size: 9px; overflow-wrap: anywhere; }
.delivery-type { display: inline-flex; padding: 4px 8px; border-radius: 99px; font-size: 9px; font-weight: 850; white-space: nowrap; }
.delivery-type.outdoor { background: #dff0ed; color: var(--brand); }
.delivery-type.inverter { background: #fff0ce; color: #775600; }
.delivery-type.storage { background: #ece8f8; color: #554482; }
.delivery-serials { min-width: 180px; display: flex; flex-wrap: wrap; gap: 4px; }
.delivery-serials code { padding: 3px 6px; border-radius: 4px; background: #e8f4f1; color: var(--brand-dark); font-family: ui-monospace, Consolas, monospace; font-size: 10px; font-weight: 800; }
.delivery-missing { color: var(--muted); font-size: 10px; font-style: italic; }
.delivery-empty, .delivery-error { padding: 20px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; font-size: 12px; }
.delivery-empty { color: var(--muted); }
.delivery-empty strong { color: var(--ink-soft); }
.delivery-empty span { font-size: 10px; }
.delivery-error { border-left: 3px solid var(--danger); background: #fff3f1; color: var(--danger); }

.result-layout { margin-top: 18px; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start; }
.customer-sidebar { display: grid; gap: 14px; }
.panel { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 7px 25px rgb(16 44 53 / 4%); }
.panel-heading { padding: 16px 18px 13px; display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid var(--line); }
.panel-heading h3 { margin: 0; font-size: 14px; }
.panel-kicker { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.contact-details { padding: 7px 18px 15px; }
.contact-row { padding: 10px 0; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 9px; border-bottom: 1px solid #edf1f0; }
.contact-row:last-child { border-bottom: 0; }
.contact-row svg { width: 17px; margin-top: 1px; stroke: var(--brand); stroke-width: 1.7; }
.contact-row span { display: block; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.contact-row strong, .contact-row a { display: block; overflow-wrap: anywhere; font-size: 13px; font-weight: 700; text-decoration: none; }
.contact-row a:hover { color: var(--brand); text-decoration: underline; }
.source-overview { padding: 10px 18px 16px; display: grid; gap: 8px; }
.source-line { padding: 9px 0; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 9px; }
.source-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px; background: var(--surface-soft); color: var(--brand); font-size: 10px; font-weight: 900; }
.source-line strong { display: block; font-size: 12px; }
.source-line small { display: block; color: var(--muted); font-size: 10px; }
.source-state { width: 8px; height: 8px; border-radius: 50%; background: #bcc7c4; }
.source-state.found { background: #20a676; box-shadow: 0 0 0 3px #dff4ed; }
.source-state.error { background: var(--danger); }

.project-area { min-width: 0; }
.section-heading { min-height: 59px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.section-heading h2 { margin: 0; font-size: 22px; letter-spacing: -.025em; }
.section-heading .eyebrow { margin-bottom: 4px; }
.updated-at { margin: 0 0 3px; color: var(--muted); font-size: 11px; }
.source-results { display: grid; gap: 16px; }

.source-section { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.source-head { padding: 15px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); background: #f7f9f8; }
.source-title { display: flex; align-items: center; gap: 9px; }
.source-title h3 { margin: 0; font-size: 15px; }
.source-count { color: var(--muted); font-size: 11px; font-weight: 700; }
.source-empty { padding: 28px 20px; color: var(--muted); text-align: center; }
.source-error { margin: 14px 18px; padding: 10px 12px; border-left: 3px solid var(--danger); background: #fff3f1; color: var(--danger); font-size: 12px; }

.project-card + .project-card { border-top: 8px solid var(--canvas); }
.project-summary { padding: 20px; display: flex; justify-content: space-between; gap: 20px; }
.project-summary h4 { margin: 0 0 5px; font-size: 18px; letter-spacing: -.02em; }
.project-subline { margin: 0; color: var(--muted); font-size: 12px; }
.project-tags { display: flex; align-items: flex-start; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.project-meta { padding: 0 20px 18px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.meta-item { min-width: 0; padding: 11px 12px; border-radius: 8px; background: var(--surface-soft); }
.meta-item span { display: block; margin-bottom: 3px; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.meta-item strong { display: block; overflow-wrap: anywhere; font-size: 12px; }
.project-links { padding: 0 20px 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.text-link { display: inline-flex; align-items: center; gap: 5px; color: var(--brand); font-size: 12px; font-weight: 800; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

.project-sections { border-top: 1px solid var(--line); }
.data-section { border-bottom: 1px solid var(--line); }
.data-section:last-child { border-bottom: 0; }
.data-section > summary { min-height: 49px; padding: 0 20px; display: flex; align-items: center; gap: 10px; list-style: none; cursor: pointer; font-size: 13px; font-weight: 800; }
.data-section > summary::-webkit-details-marker { display: none; }
.data-section > summary::before { content: "+"; width: 21px; height: 21px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 5px; color: var(--brand); }
.data-section[open] > summary::before { content: "-"; }
.data-section > summary em { margin-left: auto; color: var(--muted); font-size: 10px; font-style: normal; }
.data-body { padding: 0 20px 18px 51px; }
.data-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 20px; }
.kv { min-width: 0; padding: 7px 0; border-bottom: 1px solid #edf1f0; }
.kv span { display: block; color: var(--muted); font-size: 10px; }
.kv strong { display: block; margin-top: 2px; overflow-wrap: anywhere; font-size: 12px; }
.empty-copy { margin: 0; color: var(--muted); font-size: 12px; }
.item-list { display: grid; gap: 8px; }
.list-item { padding: 11px 12px; border: 1px solid #e1e8e6; border-radius: 8px; background: #fafbfb; }
.list-item-head { display: flex; justify-content: space-between; gap: 12px; }
.list-item strong { font-size: 12px; }
.list-item p { margin: 5px 0 0; color: var(--ink-soft); font-size: 11px; white-space: pre-wrap; }
.list-item small { color: var(--muted); font-size: 10px; }
.file-link { color: var(--brand); text-decoration: none; }
.file-link:hover { text-decoration: underline; }
.inline-warning { margin-top: 10px; padding: 8px 10px; border-radius: 6px; background: #fff1d9; color: var(--warning); font-size: 11px; }

.scan-dialog {
  width: min(1180px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 17px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 34px 95px rgb(6 36 40 / 35%);
}
.scan-dialog::backdrop { background: rgb(5 26 29 / 67%); backdrop-filter: blur(3px); }
.scan-dialog [hidden] { display: none !important; }
.scan-dialog-shell { max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.scan-dialog-header { padding: 24px 26px 20px; display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.scan-dialog-header h2 { margin: 0; font-size: 24px; letter-spacing: -.025em; }
.scan-dialog-header > div > p:last-child { max-width: 760px; margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.scan-dialog-close { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink-soft); font-size: 25px; line-height: 1; cursor: pointer; }
.scan-dialog-close:hover { background: var(--surface-soft); }
.scan-progress-card { margin: 18px 26px 0; padding: 15px 17px; border: 1px solid #cfe0dc; border-radius: 10px; background: #f3f9f7; }
.scan-progress-head { display: flex; justify-content: space-between; gap: 18px; font-size: 12px; }
.scan-progress-head span { color: var(--muted); font-weight: 750; }
.scan-progress-track { height: 7px; margin-top: 11px; overflow: hidden; border-radius: 99px; background: #dce8e5; }
.scan-progress-track i { width: 0%; height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, var(--brand), #22a77e); transition: width .3s ease; }
.scan-progress-track i.indeterminate { width: 35%; animation: scan-progress 1.2s ease-in-out infinite alternate; }
@keyframes scan-progress { from { transform: translateX(-45%); } to { transform: translateX(230%); } }
.scan-progress-card p { margin: 9px 0 0; color: var(--muted); font-size: 11px; }
.scan-stats { margin: 14px 26px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.scan-stat { padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; background: #fafcfc; }
.scan-stat span { display: block; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.scan-stat strong { display: block; margin-top: 2px; font-size: 19px; }
.scan-table-wrap { min-height: 210px; margin: 0 26px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.scan-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.scan-table th { position: sticky; top: 0; z-index: 1; padding: 10px 11px; border-bottom: 1px solid var(--line); background: #f2f6f5; color: var(--muted); font-size: 9px; letter-spacing: .04em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.scan-table td { padding: 11px; border-bottom: 1px solid #e8edeb; vertical-align: top; }
.scan-table tbody tr:last-child td { border-bottom: 0; }
.scan-table code { display: inline-block; margin: 0 3px 3px 0; padding: 2px 6px; border-radius: 4px; background: #dff3ec; color: var(--success); font-family: ui-monospace, Consolas, monospace; font-size: 11px; font-weight: 800; }
.scan-table code.is-new { background: #e7f2ff; color: #096da8; }
.scan-device-check { margin-bottom: 5px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.scan-device-check:last-child { margin-bottom: 0; }
.scan-system-sn { display: block; color: var(--muted); font-family: ui-monospace, Consolas, monospace; font-size: 9px; }
.scan-projects { display: block; max-width: 220px; color: var(--ink-soft); }
.scan-result { display: inline-flex; padding: 3px 7px; border-radius: 99px; font-size: 9px; font-weight: 850; white-space: nowrap; }
.scan-result.found { background: #dff3ec; color: var(--success); }
.scan-result.warning { background: #fff0ce; color: var(--warning); }
.scan-result.error { background: #fde6e3; color: var(--danger); }
.scan-empty { height: 150px; color: var(--muted); text-align: center; vertical-align: middle !important; }
.scan-dialog-actions { min-height: 69px; padding: 14px 26px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); }
.scan-dialog-actions > span { color: var(--muted); font-size: 10px; }
.scan-dialog-actions > div { display: flex; gap: 8px; }

footer { min-height: 66px; padding: 0 clamp(22px, 5vw, 80px); display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid #cfd9d6; color: var(--muted); font-size: 11px; }

@media (max-width: 1000px) {
  .hero-tools { grid-template-columns: minmax(0, 1fr); }
  .hero-action-stack { max-width: 520px; }
  .scan-launch-card { max-width: 520px; }
  .result-header { align-items: flex-start; flex-direction: column; }
  .result-actions { justify-content: flex-start; }
  .result-layout { grid-template-columns: 1fr; }
  .customer-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .site-header { height: auto; min-height: 70px; padding: 11px 18px; }
  .brand-copy small, .live-indicator { display: none; }
  .header-nav { gap: 12px; font-size: 12px; }
  .hero-inner { padding: 45px 22px 50px; }
  h1 { font-size: 42px; }
  .hero-copy { font-size: 15px; }
  .search-card { padding: 12px; }
  .hero-action-stack { width: 100%; max-width: none; }
  .scan-launch-card { width: 100%; max-width: none; }
  .search-row { grid-template-columns: 40px minmax(0, 1fr) 48px; }
  .search-row input { height: 56px; font-size: 16px; }
  .search-row button { width: 42px; height: 42px; padding: 0; justify-content: center; }
  .search-row button span { display: none; }
  .start-state, .skeleton-grid { grid-template-columns: 1fr; }
  .start-state { padding-top: 22px; }
  .result { width: calc(100% - 24px); padding-top: 18px; }
  .result-header { padding: 20px; }
  .result-actions { width: 100%; }
  .result-actions .button { flex: 1 1 auto; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .delivery-head { align-items: flex-start; flex-direction: column; gap: 5px; }
  .delivery-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .delivery-stat:nth-child(2) { border-right: 0; }
  .delivery-stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .delivery-table-wrap { overflow: visible; }
  .delivery-table, .delivery-table tbody, .delivery-table tr, .delivery-table td { display: block; width: 100%; }
  .delivery-table thead { display: none; }
  .delivery-table tr { padding: 9px 14px; }
  .delivery-table td { min-height: 39px; padding: 8px 0 8px 112px; position: relative; border-bottom: 1px solid #edf1f0; }
  .delivery-table td:last-child { border-bottom: 0; }
  .delivery-table td::before { content: attr(data-label); width: 102px; position: absolute; top: 9px; left: 0; color: var(--muted); font-size: 8px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
  .delivery-serials { min-width: 0; }
  .customer-sidebar { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .project-summary { flex-direction: column; }
  .project-tags { justify-content: flex-start; }
  .project-meta, .data-grid { grid-template-columns: 1fr; }
  .data-body { padding-left: 20px; }
  footer { padding-block: 16px; align-items: flex-start; flex-direction: column; }
  .scan-dialog { width: calc(100% - 16px); max-height: calc(100vh - 16px); }
  .scan-dialog-shell { max-height: calc(100vh - 16px); }
  .scan-dialog-header { padding: 19px 18px 16px; }
  .scan-dialog-header h2 { font-size: 20px; }
  .scan-progress-card { margin: 12px 18px 0; }
  .scan-stats { margin: 10px 18px; grid-template-columns: repeat(2, 1fr); }
  .scan-table-wrap { margin: 0 18px; }
  .scan-dialog-actions { padding: 12px 18px; align-items: stretch; flex-direction: column; }
  .scan-dialog-actions > div { display: grid; grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .skeleton::after { animation: none; }
  .scan-progress-track i.indeterminate { animation: none; }
}
