:root {
  color-scheme: light;
  --bg: #f3f5f6;
  --panel: #ffffff;
  --ink: #15191d;
  --muted: #626971;
  --line: #dce2e6;
  --soft: #eef2f4;
  --green: #f05a00;
  --green-dark: #c64a00;
  --blue: #262728;
  --blue-soft: #eef0f2;
  --amber: #c88a2d;
  --danger: #a4453c;
  --paper: #fbfcfd;
  --shadow: 0 24px 70px rgba(18, 29, 39, 0.13);
}

* {
  box-sizing: border-box;
}

@media (prefers-reduced-motion: no-preference) {
  * {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(120deg, rgba(240, 90, 0, 0.08), transparent 31%),
    linear-gradient(300deg, rgba(36, 63, 90, 0.10), transparent 42%),
    var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  padding: 28px;
}

.workspace {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: calc(100vh - 56px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: appEnter .45s ease-out both;
}

.product-nav {
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f0f4f6);
  padding: 24px;
}

.brand-block {
  padding: 2px 0 20px;
  border-bottom: 1px solid var(--line);
}

.brand-block p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  max-width: 230px;
}

.eyebrow,
.section-label {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  max-width: 235px;
  font-size: 28px;
  line-height: 1.08;
}

h2 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.2;
}

h3 {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.25;
}

.product-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.sidebar-action-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.graphic-action {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 56px;
  border: 1px solid rgba(38, 39, 40, 0.22);
  border-radius: 8px;
  background: #f7f9fa;
  color: var(--ink);
  text-decoration: none;
  padding: 9px 10px;
}

.graphic-action:hover {
  border-color: var(--green);
  box-shadow: 0 10px 22px rgba(18, 29, 39, 0.10);
}

.graphic-action-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  background: var(--blue);
}

.graphic-action strong,
.graphic-action small {
  display: block;
  line-height: 1.2;
}

.graphic-action strong {
  font-size: 13px;
}

.graphic-action small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.product-button {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  padding: 8px 10px;
  transform: translateX(0);
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.product-button:hover,
.product-button.active {
  border-color: rgba(36, 63, 90, 0.32);
  background: var(--panel);
}

.product-button:hover {
  transform: translateX(3px);
}

.product-button.active {
  box-shadow: inset 4px 0 0 var(--green), 0 10px 24px rgba(36, 63, 90, 0.10);
}

.product-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 700;
}

.product-name {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.product-sub {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.config-panel {
  min-width: 0;
  padding: 24px 28px 28px;
}

.top-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.top-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7f9fa;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 0 10px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 22px;
  border-bottom: 1px solid var(--line);
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  min-height: 38px;
  padding: 0 14px;
  text-decoration: none;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.secondary-action:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
  transform: translateY(-1px);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(430px, 1fr) 410px;
  gap: 26px;
  padding-top: 24px;
  align-items: start;
}

.form-surface {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  padding: 18px;
  animation: surfaceEnter .28s ease-out both;
}

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field.full {
  grid-column: 1 / -1;
}

.condition-field.hidden {
  display: none;
}

.search-find-field.hidden {
  display: none;
}

.notes-field.hidden,
.feedback-field.hidden {
  display: none;
}

label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 0 11px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(36, 63, 90, 0.18);
  border-color: var(--blue);
  box-shadow: 0 8px 22px rgba(36, 63, 90, 0.08);
}

textarea {
  min-height: 78px;
  padding-top: 10px;
  resize: vertical;
}

textarea[rows="5"],
textarea[rows="6"] {
  min-height: 132px;
}

.form-section {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding: 8px 0 2px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: var(--panel);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.chip:hover {
  border-color: rgba(240, 90, 0, 0.42);
  background: #f7fbf4;
  transform: translateY(-1px);
}

.chip input {
  width: auto;
  min-height: auto;
}

.lookup-result {
  display: grid;
  gap: 4px;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fa;
  color: var(--muted);
  padding: 10px 12px;
  line-height: 1.35;
  font-size: 13px;
}

.lookup-result.hit {
  border-color: rgba(240, 90, 0, 0.34);
  background: #f3f9ef;
  color: #223018;
}

.lookup-result.warn {
  border-color: rgba(200, 138, 45, 0.42);
  background: #fff8ec;
  color: #533915;
}

.lookup-result span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.lookup-result strong {
  color: var(--blue);
  font-size: 18px;
  line-height: 1.2;
}

.lookup-result small {
  color: var(--muted);
}

.lookup-result.list {
  gap: 8px;
  background: #fbfcfd;
}

.lookup-row {
  display: grid;
  gap: 2px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.lookup-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.lookup-row span {
  text-transform: none;
}

.lookup-row strong {
  font-size: 15px;
}

.result-surface {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  padding: 18px;
  position: sticky;
  top: 24px;
  animation: resultEnter .34s ease-out both;
}

.visual-frame {
  display: grid;
  place-items: center;
  min-height: 220px;
  margin-bottom: 18px;
  border: 1px solid rgba(47, 107, 79, 0.34);
  border-radius: 10px;
  position: relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(241,246,240,.96)),
    linear-gradient(90deg, rgba(47,107,79,.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(47,107,79,.08) 1px, transparent 1px);
  background-size: auto, 28px 28px, 28px 28px;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.8),
    0 14px 34px rgba(36,63,90,.08);
  overflow: hidden;
}

.visual-frame::before {
  content: "Grafik / Angebotszeichnung";
  position: absolute;
  top: 12px;
  left: 14px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(47, 107, 79, 0.1);
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.visual-frame svg {
  width: min(100%, 390px);
  height: 200px;
  transform-origin: center;
  animation: drawIn .55s ease-out both;
  filter: drop-shadow(0 12px 14px rgba(36,63,90,.16));
}

.visual-frame.technical-drawing-frame {
  place-items: stretch;
  min-height: 260px;
  padding: 12px;
  background: #fff;
  border-color: var(--line);
}

.visual-frame.technical-drawing-frame::before {
  content: none;
}

.visual-frame.technical-drawing-frame svg {
  width: 100%;
  height: auto;
  max-height: none;
  align-self: center;
  filter: none;
  animation: none;
}

.visual-frame.technical-drawing-frame svg path {
  transition: none;
}

.visual-frame.technical-drawing-frame:hover svg path {
  transform: none;
  opacity: 1;
}

.visual-frame.technical-drawing-frame svg *,
.bridge-drawing-preview svg * {
  animation: none;
  transition: none;
}

.visual-frame svg path {
  transition: transform .28s ease, opacity .28s ease;
}

.visual-frame:hover svg path:nth-child(1) {
  transform: translateY(-2px);
}

.visual-frame:hover svg path:nth-child(2) {
  transform: translateY(1px);
}

.result-block p {
  color: var(--muted);
  line-height: 1.45;
}

.quote-lines {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.quote-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 10px 12px;
  animation: lineEnter .22s ease-out both;
}

.quote-line:nth-child(2) {
  animation-delay: .04s;
}

.quote-line span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.quote-line strong {
  font-size: 15px;
  text-align: right;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px;
  animation: metricEnter .24s ease-out both;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.metric:nth-child(2) {
  animation-delay: .03s;
}

.metric:nth-child(3) {
  animation-delay: .06s;
}

.metric:nth-child(4) {
  animation-delay: .09s;
}

.metric:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(18, 29, 39, 0.08);
}

.metric:first-child {
  border-color: rgba(240, 90, 0, 0.30);
  background: #f3f9ef;
}

.bom-block {
  margin-top: 16px;
}

.bom-list {
  display: grid;
  gap: 12px;
}

.bom-group {
  display: grid;
  gap: 8px;
}

.bom-group-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 1px;
}

.bom-group-heading span {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.bom-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 10px 12px;
  animation: lineEnter .22s ease-out both;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.bom-item:hover {
  border-color: rgba(36, 63, 90, 0.28);
  box-shadow: 0 10px 22px rgba(18, 29, 39, 0.07);
  transform: translateY(-1px);
}

.bom-item.graphic-accessory {
  border-color: rgba(240, 90, 0, 0.28);
  background: #f7fbf3;
}

.bom-item:nth-child(2) {
  animation-delay: .03s;
}

.bom-item:nth-child(3) {
  animation-delay: .06s;
}

.bom-item:nth-child(4) {
  animation-delay: .09s;
}

.bom-item:nth-child(5) {
  animation-delay: .12s;
}

.bom-item strong {
  font-size: 13px;
  line-height: 1.25;
}

.bom-item .bom-price {
  color: var(--blue);
  font-weight: 700;
  white-space: nowrap;
}

.bom-item small {
  grid-column: 1 / -1;
  color: var(--muted);
  line-height: 1.35;
}

.bom-item small em {
  color: #517d30;
  font-style: normal;
  font-weight: 700;
}

.checklist-block {
  margin-top: 16px;
}

.checklist-list {
  display: grid;
  gap: 10px;
}

.checklist-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 10px 12px;
}

.checklist-group > strong {
  display: block;
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 13px;
}

.check-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 7px 0;
  border-top: 1px solid rgba(220, 226, 230, 0.72);
  color: #26313a;
  font-size: 13px;
  line-height: 1.35;
}

.check-item:first-of-type {
  border-top: 0;
}

.check-item input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: var(--green-dark);
}

.check-item small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.check-item.critical {
  color: #25210d;
}

.check-item.critical > span > span::after {
  content: " pruefen";
  color: var(--amber);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.empty-checklist {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.metric strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
  line-height: 1.2;
}

.notice-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.notice {
  border-left: 4px solid var(--blue);
  background: #eef4f7;
  border-radius: 6px;
  padding: 10px 12px;
  color: #284457;
  line-height: 1.35;
  font-size: 13px;
  animation: noticeEnter .25s ease-out both;
}

@keyframes appEnter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes surfaceEnter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes resultEnter {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes drawIn {
  from { opacity: 0; transform: scale(.96) translateY(4px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes lineEnter {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes metricEnter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes noticeEnter {
  from { opacity: 0; transform: translateX(6px); }
  to { opacity: 1; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}

.notice.warn {
  border-left-color: var(--amber);
  background: #fbf1e3;
  color: #684311;
}

.notice.danger {
  border-left-color: var(--danger);
  background: #f8e9e6;
  color: #71322b;
}

.recognition-summary {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  border: 1px solid rgba(36, 63, 90, 0.18);
  border-radius: 8px;
  background: #f7f9fa;
  padding: 12px;
}

.recognition-summary:empty {
  display: none;
}

.recognition-summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.recognition-column {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 10px;
}

.recognition-column strong {
  color: var(--blue);
  font-size: 12px;
  line-height: 1.2;
}

.recognition-column ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 17px;
}

.recognition-column li {
  color: #26313a;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.recognition-column li.dimension-item {
  list-style: none;
  margin-left: -17px;
  border-left: 3px solid var(--green);
  border-radius: 6px;
  background: #eef8f2;
  padding: 6px 8px;
}

.recognition-column.missing {
  border-color: rgba(200, 138, 45, 0.42);
  background: #fff8ec;
}

.recognition-column.review {
  border-color: rgba(36, 63, 90, 0.24);
  background: #eef4f7;
}

.upload-review-protocol {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  border: 1px solid rgba(36, 63, 90, 0.22);
  border-radius: 8px;
  background: #f8faf6;
  padding: 12px;
}

.upload-review-protocol:empty {
  display: none;
}

.upload-protocol-row,
.upload-protocol-grid > div {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 10px;
}

.upload-protocol-row strong,
.upload-protocol-grid strong {
  color: var(--blue);
  font-size: 12px;
  line-height: 1.2;
}

.upload-protocol-row span,
.upload-protocol-grid li,
.upload-protocol-empty {
  color: #26313a;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.upload-protocol-text {
  max-height: 150px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border-radius: 7px;
  background: #eef3f4;
  color: #26313a;
  padding: 8px;
  font-size: 12px;
  line-height: 1.35;
}

.upload-protocol-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.upload-protocol-grid ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 17px;
}

.offer-draft-status {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  border: 1px solid rgba(23, 115, 94, 0.24);
  border-radius: 8px;
  background: #f3faf7;
  padding: 12px;
}

.offer-draft-status-head {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.offer-draft-status-head strong {
  color: var(--green-dark);
  font-size: 15px;
  line-height: 1.25;
}

.offer-draft-status-head small {
  color: var(--muted);
  line-height: 1.35;
}

.offer-draft-status-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.status-step {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--blue);
  cursor: pointer;
  padding: 9px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-align: left;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.status-step:hover {
  border-color: rgba(23, 115, 94, 0.42);
  background: #eef7f3;
}

.status-step.active {
  border-color: var(--green-dark);
  background: var(--green-dark);
  color: #fff;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.drawing-block {
  margin-top: 16px;
}

.pending-email-draft {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  border: 1px solid rgba(200, 138, 45, 0.45);
  border-radius: 8px;
  background: #fff8ec;
  color: #533915;
  padding: 10px 12px;
}

.pending-email-draft[hidden] {
  display: none;
}

.pending-email-draft strong,
.pending-email-draft small {
  display: block;
  line-height: 1.35;
}

.pending-email-draft strong {
  color: #533915;
  font-size: 13px;
}

.pending-email-draft small {
  color: var(--muted);
}

.pending-email-draft .action-row {
  margin-top: 0;
}

.bridge-import-block {
  display: none;
  gap: 10px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.print-store-address {
  display: none;
}

.bridge-import-label {
  font-size: 12px;
  color: var(--muted);
}

.bridge-file-box {
  min-height: 88px;
  background: var(--panel);
}

#graphicBridgeJson {
  min-height: 150px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
  resize: vertical;
}

.action-row.compact {
  margin-top: 0;
}

.bridge-import-summary {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bridge-import-summary:empty {
  display: none;
}

.bridge-status-card {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.bridge-status-card span,
.bridge-status-card strong,
.bridge-status-card small {
  min-width: 0;
}

.bridge-status-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.bridge-status-card strong {
  color: var(--blue);
  font-size: 12px;
  line-height: 1.25;
}

.bridge-status-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.bridge-status-card.ready {
  border-color: rgba(240, 90, 0, 0.42);
  background: rgba(240, 90, 0, 0.08);
}

.bridge-status-card.partial {
  border-color: rgba(200, 138, 45, 0.55);
  background: rgba(200, 138, 45, 0.1);
}

.bridge-status-card.open {
  border-color: rgba(164, 69, 60, 0.35);
  background: #fff8f7;
}

.bridge-target-list {
  display: grid;
  gap: 8px;
}

.bridge-target-list:empty {
  display: none;
}

.bridge-target-heading {
  margin: 2px 0 0;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.bridge-target-row {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 10px;
}

.bridge-target-row strong,
.bridge-target-row span,
.bridge-target-row small {
  min-width: 0;
}

.bridge-target-row strong {
  font-size: 13px;
  line-height: 1.25;
}

.bridge-target-row span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.bridge-target-row small {
  color: var(--muted);
  line-height: 1.35;
}

.bridge-target-row.matched {
  border-color: rgba(240, 90, 0, 0.36);
}

.bridge-target-row.calculated {
  border-color: rgba(240, 90, 0, 0.46);
  background: rgba(240, 90, 0, 0.08);
}

.bridge-target-row.checked {
  border-color: rgba(36, 63, 90, 0.28);
}

.bridge-target-row.open {
  border-color: rgba(200, 138, 45, 0.45);
}

.bridge-target-row .target-state {
  align-self: start;
  justify-self: start;
  border-radius: 999px;
  background: var(--soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  padding: 3px 8px;
}

.bridge-target-row.calculated .target-state {
  background: rgba(240, 90, 0, 0.14);
  color: var(--green-dark);
}

.bridge-target-row.open .target-state {
  background: rgba(200, 138, 45, 0.14);
  color: var(--amber);
}

.bridge-file-box.drag-over {
  border-color: var(--green);
  background: rgba(240, 90, 0, 0.10);
  transform: translateY(-1px);
}

.bridge-drawing-block {
  display: grid;
  gap: 10px;
  margin-top: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.bridge-drawing-block[hidden] {
  display: none;
}

.bridge-drawing-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bridge-drawing-heading span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.bridge-drawing-heading strong {
  color: var(--green-dark);
  font-size: 12px;
}

.bridge-drawing-preview {
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.bridge-drawing-preview svg {
  display: block;
  width: 100%;
  min-width: 0;
  height: auto;
}

.upload-box {
  display: grid;
  gap: 5px;
  border: 1px dashed rgba(36, 63, 90, 0.32);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  padding: 12px;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.upload-box:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
  transform: translateY(-1px);
}

.upload-box span {
  font-weight: 700;
}

.upload-box small,
.drawing-preview small {
  color: var(--muted);
  line-height: 1.35;
}

.upload-box input {
  display: none;
}

.drawing-preview {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.pdf-page-list {
  display: grid;
  gap: 4px;
  margin: 2px 0 0;
  padding-left: 17px;
  color: #26313a;
  line-height: 1.35;
}

.pdf-page-list .warn {
  color: #684311;
}

.pdf-text-preview {
  max-height: 180px;
  overflow: auto;
  margin: 2px 0 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #26313a;
  padding: 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
}

.ocr-text-preview {
  max-height: 180px;
  overflow: auto;
  margin: 2px 0 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #26313a;
  padding: 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
}

.ocr-warning,
.ocr-text-empty {
  border-left: 4px solid var(--amber);
  border-radius: 6px;
  background: #fff8ec;
  color: #533915;
  padding: 9px 10px;
  line-height: 1.35;
}

.ocr-accept-button {
  justify-self: start;
}

.pdf-scan-warning {
  border-left: 4px solid var(--amber);
  border-radius: 6px;
  background: #fff8ec;
  color: #533915;
  padding: 9px 10px;
  line-height: 1.35;
}

.drawing-preview img {
  width: 100%;
  max-height: 160px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.copy-status {
  min-height: 18px;
  margin: 8px 0 0;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 700;
}

@media print {
  body {
    background: #fff;
  }

  .app-shell {
    padding: 0;
  }

  .workspace {
    display: block;
    min-height: auto;
    border: 0;
    box-shadow: none;
  }

  .product-nav,
  .top-strip,
  .panel-header .secondary-action,
  .visual-frame,
  .drawing-block,
  .action-row,
  .offer-draft-status-actions,
  .copy-status {
    display: none;
  }

  .config-panel {
    padding: 0;
  }

  .print-store-address {
    display: grid;
    gap: 4px;
    margin-top: 18px;
    border-top: 1px solid var(--line);
    padding-top: 12px;
    color: var(--ink);
    font-size: 13px;
    line-height: 1.35;
  }

  .print-store-address:empty {
    display: none;
  }

  .print-store-address strong,
  .print-store-address div {
    display: block;
  }

  .content-grid {
    display: block;
    padding-top: 0;
  }

  .form-surface,
  .result-surface {
    position: static;
    border: 0;
    background: #fff;
    padding: 0;
  }

  .form-surface {
    margin-bottom: 18px;
  }

  .result-surface {
    break-inside: avoid;
  }
}

@media (max-width: 1040px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .product-nav {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .product-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 0;
  }

  .workspace {
    min-height: 100vh;
    border: 0;
  }

  .product-list,
  .form-surface,
  .metric-grid,
  .bridge-import-summary {
    grid-template-columns: 1fr;
  }

  .panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .config-panel,
  .product-nav {
    padding: 18px;
  }

  .result-surface {
    position: static;
  }
}
