:root {
  color-scheme: light;
  --bg: #eef3f8;
  --panel: #ffffff;
  --panel-soft: #f7fafc;
  --ink: #142235;
  --muted: #66758a;
  --line: #dbe4ee;
  --line-strong: #c3d0de;
  --blue: #1267d8;
  --blue-strong: #084caa;
  --blue-soft: #e8f2ff;
  --green: #17966f;
  --amber: #c98213;
  --danger: #d93a46;
  --shadow: 0 22px 70px rgba(21, 39, 63, .14);
  --shadow-soft: 0 10px 30px rgba(21, 39, 63, .09);
  --radius: 8px;
  --rail: 72px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(18, 103, 216, .09), transparent 30%),
    linear-gradient(135deg, #f6f9fc 0%, #e9f0f7 56%, #dde8f2 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
  font-weight: 720;
  box-shadow: inset 0 1px 0 rgba(20, 34, 53, .02);
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #6b7d92 50%),
    linear-gradient(135deg, #6b7d92 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 18px,
    calc(100% - 13px) 18px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(18, 103, 216, .44);
  box-shadow: 0 0 0 3px rgba(18, 103, 216, .11);
}

label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
}

.brand-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18px 10px;
  background: #091a2e;
  color: white;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .08);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.brand-lockup strong,
.brand-lockup span {
  display: block;
  letter-spacing: 0;
}

.brand-lockup strong {
  font-size: 14px;
}

.brand-lockup span {
  color: rgba(255, 255, 255, .66);
  font-size: 11px;
  font-weight: 750;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: linear-gradient(135deg, #1072e8, #23a2c7);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .03em;
}

.brand-logo {
  width: 54px;
  min-width: 0;
  height: 54px;
  min-height: 0;
  padding: 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .94);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}

.brand-logo img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
}

.rail-button,
.icon-button,
.tool-button,
.small-button,
.primary-button {
  border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}

.rail-button {
  position: relative;
  display: grid;
  place-items: center;
  align-items: center;
  width: 44px;
  height: 50px;
  min-height: 50px;
  padding: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .76);
  text-align: center;
  font-weight: 950;
  font-size: 13px;
  letter-spacing: 0;
}

.nav-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border: 2px solid #091a2e;
  border-radius: 999px;
  background: #f6a623;
  color: #081b2f;
  font-size: 10px;
  font-weight: 900;
}

.rail-button:hover,
.rail-button.is-active {
  background: rgba(255, 255, 255, .18);
  color: #ffffff;
  transform: translateY(-1px);
}

.workspace {
  min-width: 0;
  height: 100vh;
  height: 100dvh;
  padding: 18px 18px 18px 0;
}

.demo-mode-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  margin-bottom: 10px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .78);
  font-size: 11px;
  font-weight: 850;
}

.demo-mode-pill.light {
  margin: 0;
  border-color: var(--line);
  background: #fff;
  color: var(--muted);
}

.catalog-layer,
.admin-layer,
.rfq-layer,
.ops-layer {
  display: grid;
  grid-template-rows: 76px minmax(0, 1fr);
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(180, 194, 211, .7);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: rgba(255, 255, 255, .72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.ops-layer {
  display: block;
  overflow: auto;
}

.ops-view {
  display: grid;
  gap: 18px;
  min-height: 100%;
  padding: 20px;
}

.technician-layer {
  overflow: hidden;
}

.technician-layer .ops-view {
  height: 100%;
  min-height: 0;
  padding: 12px;
}

.procurement-layer {
  overflow: hidden;
}

.procurement-layer .ops-view {
  height: 100%;
  min-height: 0;
  padding: 12px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(250px, .8fr) minmax(220px, 520px) auto;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .86);
}

.topbar-left,
.topbar-controls,
.details-top,
.panel-heading,
.viewer-toolbar,
.tool-cluster {
  display: flex;
  align-items: center;
}

.topbar-left {
  gap: 12px;
  min-width: 0;
}

.topbar-controls {
  justify-content: flex-end;
  gap: 10px;
}

.topbar h1,
.panel-heading h2,
.viewer-toolbar h2 {
  margin: 0;
  letter-spacing: 0;
}

.topbar h1 {
  font-size: 22px;
  line-height: 1.1;
}

.viewer-toolbar h2,
.panel-heading h2 {
  font-size: 17px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border-color: var(--line);
  background: #fff;
  color: #203247;
  font-size: 21px;
  box-shadow: 0 6px 18px rgba(32, 50, 71, .06);
}

.icon-button:hover,
.tool-button:hover,
.small-button:hover {
  transform: translateY(-1px);
  border-color: #a9bed5;
  box-shadow: 0 9px 22px rgba(21, 39, 63, .1);
}

.global-search,
.filter-box {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.global-search input,
.filter-box input,
.marker-form input,
.marker-form select,
.marker-form textarea,
.topbar select,
.breadcrumbs select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.marker-form textarea {
  min-height: 78px;
  padding: 10px 12px;
  resize: vertical;
}

.global-search input {
  height: 42px;
  padding: 0 14px;
}

.filter-box input,
.marker-form input,
.marker-form select {
  height: 40px;
  padding: 0 12px;
}

.topbar select,
.breadcrumbs select {
  height: 38px;
  padding: 0 30px 0 10px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(18, 103, 216, .65);
  box-shadow: 0 0 0 4px rgba(18, 103, 216, .12);
}

.catalog-grid {
  display: grid;
  grid-template-columns: 360px minmax(420px, 1fr) 330px;
  min-height: 0;
}

.left-panel,
.details-panel,
.admin-sidebar,
.admin-detail {
  min-height: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, .82);
}

.left-panel {
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  border-right: 1px solid var(--line);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.breadcrumbs span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.breadcrumbs select {
  max-width: 124px;
  font-size: 12px;
}

.preview-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff, #f4f8fc);
  box-shadow: var(--shadow-soft);
}

.preview-diagram {
  display: grid;
  place-items: center;
  height: 72px;
  overflow: hidden;
  border-radius: 8px;
  background: #e9f2fc;
}

.preview-card strong,
.preview-card span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-card span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.panel-heading {
  justify-content: space-between;
  gap: 12px;
}

.count-pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-strong);
  font-size: 12px;
  font-weight: 800;
}

.parts-table {
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.parts-header,
.part-row {
  display: grid;
  grid-template-columns: 58px 104px minmax(0, 1fr) 36px;
  gap: 10px;
  align-items: center;
}

.parts-header {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #f7fafc;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.parts-list {
  height: 100%;
  max-height: 100%;
  overflow: auto;
}

.part-row {
  width: 100%;
  min-height: 62px;
  padding: 11px 12px;
  border: 0;
  border-bottom: 1px solid #edf2f6;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.part-row:hover {
  background: #f8fbff;
}

.part-row.is-selected {
  background: var(--blue-soft);
  box-shadow: inset 3px 0 0 var(--blue);
}

.part-row.is-item-selected:not(.is-selected) {
  background: #f8fbff;
  box-shadow: inset 3px 0 0 rgba(18, 103, 216, .28);
}

.part-row.is-filtered {
  background: #fff8e8;
}

.part-pos {
  color: var(--blue-strong);
  font-weight: 900;
}

.part-pn {
  font-size: 12px;
  font-weight: 800;
}

.part-desc {
  min-width: 0;
  color: #31435a;
  font-size: 13px;
}

.part-desc strong,
.part-desc span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.part-desc span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.qty-pill {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #eef4fa;
  color: #32485f;
  font-size: 12px;
  font-weight: 800;
}

.viewer-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  padding: 18px;
  background: #edf3f8;
}

.viewer-toolbar {
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  min-width: 0;
}

.tool-cluster {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.tool-button,
.small-button,
.primary-button {
  min-height: 36px;
  border-radius: 8px;
  font-weight: 800;
}

.tool-button,
.small-button {
  border-color: var(--line);
  background: #fff;
  color: #24374d;
}

.tool-button {
  min-width: 38px;
  padding: 0 12px;
}

.small-button {
  padding: 0 12px;
  font-size: 13px;
}

.primary-button {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  padding: 0 14px;
  box-shadow: 0 10px 24px rgba(18, 103, 216, .22);
}

.primary-button:hover {
  transform: translateY(-1px);
  background: var(--blue-strong);
}

.danger-button {
  border-color: var(--danger);
  background: var(--danger);
}

.danger-button:hover {
  background: #b92b36;
}

.danger-text {
  color: var(--danger);
}

.tool-button.is-active {
  border-color: rgba(18, 103, 216, .55);
  background: var(--blue-soft);
  color: var(--blue-strong);
}

.view-mode-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(42px, auto));
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #eef4fa;
}

.view-mode-toggle .tool-button {
  min-height: 32px;
  padding-inline: 12px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.view-mode-toggle .tool-button.is-active {
  background: #fff;
  border-color: rgba(18, 103, 216, .24);
  box-shadow: 0 6px 16px rgba(18, 103, 216, .13);
}

.view-mode-toggle .tool-button:disabled {
  cursor: not-allowed;
  opacity: .42;
}

.sheet-toggle {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: min(360px, 42vw);
}

.sheet-toggle .tool-button {
  min-width: 34px;
  min-height: 30px;
  padding: 0 8px;
  font-size: 11px;
}

.toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #31435a;
  font-size: 12px;
  font-weight: 800;
}

.diagram-viewport {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(120, 145, 172, .09) 1px, transparent 1px),
    linear-gradient(0deg, rgba(120, 145, 172, .09) 1px, transparent 1px),
    #f8fbfd;
  background-size: 32px 32px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), var(--shadow-soft);
  touch-action: none;
}

.diagram-viewport::after {
  content: "Drag to pan · wheel or controls to zoom";
  position: absolute;
  left: 16px;
  bottom: 14px;
  padding: 7px 10px;
  border: 1px solid rgba(177, 194, 211, .8);
  border-radius: 999px;
  background: rgba(255, 255, 255, .86);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
}

.diagram-stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1200px;
  height: 1550px;
  transform-origin: center center;
  transition: transform .18s ease;
}

.three-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(120, 145, 172, .08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(120, 145, 172, .08) 1px, transparent 1px),
    radial-gradient(circle at 50% 38%, rgba(18, 103, 216, .08), transparent 36%),
    #f8fbfd;
  background-size: 32px 32px, 32px 32px, auto, auto;
}

.three-viewport canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.three-hud {
  position: absolute;
  left: 16px;
  top: 14px;
  z-index: 2;
  display: grid;
  gap: 4px;
  max-width: min(360px, calc(100% - 32px));
  padding: 10px 12px;
  border: 1px solid rgba(177, 194, 211, .86);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .88);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  pointer-events: none;
}

.three-hud strong {
  font-size: 13px;
  line-height: 1.2;
}

.three-hud span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.three-legend {
  position: absolute;
  right: 16px;
  bottom: 14px;
  z-index: 2;
  padding: 7px 10px;
  border: 1px solid rgba(177, 194, 211, .86);
  border-radius: 999px;
  background: rgba(255, 255, 255, .88);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
}

.diagram-viewport.is-3d .diagram-stage {
  visibility: hidden;
  pointer-events: none;
}

.diagram-viewport.is-3d::after {
  content: "Drag to rotate · click a part to select";
}

.diagram-viewport.aircraft-overview-viewport.is-3d::after {
  content: "Drag to rotate · click ATA/System zone";
}

.diagram-viewport.is-panning .diagram-stage,
.editor .diagram-stage {
  transition: none;
}

.technical-diagram {
  display: block;
  width: 1200px;
  height: 1550px;
  user-select: none;
}

.pdf-diagram-page {
  position: relative;
  display: grid;
  place-items: center;
  width: 1200px;
  height: 1550px;
  overflow: hidden;
  background: #f7fafc;
}

.pdf-diagram-page img {
  display: block;
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  box-shadow: 0 14px 40px rgba(21, 39, 63, .16);
}

.pdf-diagram-page.is-small {
  width: 100%;
  height: 100%;
}

.pdf-diagram-page.is-small img {
  width: 100%;
  height: 100%;
  box-shadow: none;
}

.pdf-diagram-caption {
  position: absolute;
  left: 18px;
  bottom: 16px;
  display: grid;
  gap: 2px;
  max-width: calc(100% - 36px);
  padding: 8px 10px;
  border: 1px solid rgba(177, 194, 211, .88);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .92);
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(21, 39, 63, .1);
}

.pdf-diagram-caption strong,
.pdf-diagram-caption span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-diagram-caption strong {
  font-size: 12px;
}

.pdf-diagram-caption span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
}

.empty-pdf-diagram {
  align-content: center;
  gap: 8px;
  padding: 36px;
  color: var(--muted);
  text-align: center;
}

.empty-pdf-diagram strong {
  color: var(--ink);
  font-size: 22px;
}

.hotspot-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hotspot {
  position: absolute;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: -21px 0 0 -21px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 13px 28px rgba(18, 103, 216, .27);
  font-size: 11px;
  font-weight: 900;
  pointer-events: auto;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, opacity .18s ease;
}

.hotspot::before {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid rgba(18, 103, 216, .28);
  border-radius: inherit;
}

.hotspot:hover {
  transform: scale(1.12);
  box-shadow: 0 14px 34px rgba(18, 103, 216, .38);
}

.hotspot.is-selected {
  background: #f6a623;
  box-shadow: 0 0 0 8px rgba(246, 166, 35, .22), 0 18px 38px rgba(201, 130, 19, .34);
  animation: pulse 1.8s ease-in-out infinite;
}

.hotspot.is-filter-match:not(.is-selected) {
  background: var(--green);
}

.hotspot.is-muted {
  opacity: .24;
}

.hotspot .hotspot-label {
  pointer-events: none;
}

.hotspot-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  width: max-content;
  max-width: 210px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #081b2f;
  color: white;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  opacity: 0;
  transform: translate(-50%, 6px);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
}

.hotspot:hover .hotspot-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.hide-labels .hotspot .hotspot-label {
  display: none;
}

.hide-hotspots .hotspot {
  display: none;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

.details-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 18px;
  border-left: 1px solid var(--line);
}

#partDetails {
  min-height: 0;
  overflow: hidden;
}

.details-top {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.part-card {
  height: 100%;
  min-height: 0;
  overflow: auto;
}

.part-card h2 {
  margin: 0 0 6px;
  font-size: 24px;
  letter-spacing: 0;
}

.part-card .description {
  margin: 0 0 18px;
  color: #32475d;
  line-height: 1.45;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.status-chip {
  padding: 7px 10px;
  border-radius: 999px;
  background: #f0f5f9;
  color: #334960;
  font-size: 12px;
  font-weight: 800;
}

.status-chip.green {
  background: #e7f7f1;
  color: #137253;
}

.detail-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.detail-item {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.detail-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-item strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.action-grid .primary-button,
.action-grid .small-button {
  width: 100%;
  justify-content: center;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 320px;
  padding: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.admin-grid {
  display: grid;
  grid-template-columns: 320px minmax(420px, 1fr) 320px;
  min-height: 0;
}

.admin-sidebar,
.admin-detail {
  padding: 18px;
  border-right: 1px solid var(--line);
}

.admin-detail {
  border-right: 0;
  border-left: 1px solid var(--line);
}

.assembly-cards,
.upload-stack,
.marker-form {
  display: grid;
  gap: 10px;
}

.assembly-card,
.upload-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.assembly-card {
  text-align: left;
}

.assembly-card.is-active {
  border-color: rgba(18, 103, 216, .48);
  background: var(--blue-soft);
}

.assembly-card strong,
.upload-card strong {
  color: #23384d;
  font-size: 13px;
}

.assembly-card span,
.upload-card span,
.upload-card input {
  color: var(--muted);
  font-size: 12px;
}

.upload-stack {
  margin-top: 18px;
}

.editor-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  padding: 18px;
  background: #edf3f8;
}

.editor-stage {
  cursor: crosshair;
}

#editorDiagramClone svg {
  display: block;
  width: 1200px;
  height: 820px;
}

#editorDiagramArtwork svg,
#diagramArtwork svg,
#previewDiagram svg {
  display: block;
}

#editorDiagramArtwork svg,
#diagramArtwork svg {
  width: 1200px;
  height: 820px;
}

#previewDiagram svg {
  width: 100%;
  height: 100%;
}

.editor .hotspot {
  cursor: grab;
}

.editor .hotspot:active {
  cursor: grabbing;
}

.marker-form {
  margin-top: 8px;
}

.marker-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.coordinate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.status-box,
.mock-preview {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7fafc;
  color: #43576c;
  font-size: 13px;
  line-height: 1.45;
}

.mock-preview {
  display: grid;
  gap: 8px;
}

.toast {
  position: fixed;
  right: 26px;
  bottom: 24px;
  z-index: 30;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #071b30;
  color: #fff;
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.admin-topbar {
  grid-template-columns: minmax(310px, .9fr) minmax(240px, 460px) auto;
}

.admin-layer.is-studio-flow .admin-topbar .global-search,
.admin-layer.is-studio-flow .admin-topbar .topbar-controls,
.admin-layer.is-studio-flow .catalog-tree-panel > .panel-heading,
.admin-layer.is-studio-flow .admin-picker-stack,
.admin-layer.is-studio-flow .admin-actions-row {
  display: none;
}

.admin-layer.is-studio-browser .viewer-toolbar {
  display: none;
}

.admin-layer.is-studio-browser .admin-editor-panel {
  grid-template-rows: minmax(0, 1fr);
}

.admin-layer.is-studio-browser .editor-figure-item-panel {
  grid-row: 1;
  align-self: stretch;
  height: 100%;
}

.admin-layer.is-studio-flow .catalog-tree-panel,
.admin-layer.is-studio-flow .admin-detail {
  padding-top: 14px;
}

.admin-layer.is-studio-flow .admin-grid {
  min-height: 0;
}

.admin-layer.is-studio-flow .admin-sidebar,
.admin-layer.is-studio-flow .admin-editor-panel,
.admin-layer.is-studio-flow .admin-detail {
  min-width: 0;
  min-height: 0;
}

.dirty-pill {
  align-self: center;
  padding: 7px 10px;
  border: 1px solid rgba(201, 130, 19, .24);
  border-radius: 999px;
  background: #fff5df;
  color: #8b5a0b;
  font-size: 12px;
  font-weight: 900;
}

.admin-grid {
  grid-template-columns: 340px minmax(0, 1fr) 380px;
  overflow: hidden;
}

.admin-editor-panel {
  grid-template-rows: auto minmax(380px, 1fr) auto;
  gap: 14px;
  min-width: 0;
  overflow: hidden;
}

.catalog-tree-panel,
.admin-detail {
  overflow: auto;
  min-width: 0;
  background: rgba(255, 255, 255, .9);
  position: relative;
  z-index: 2;
}

.admin-picker-stack {
  display: grid;
  gap: 10px;
  margin: 16px 0 12px;
}

.admin-picker-stack label,
.wizard-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-picker-stack select,
.wizard-form input,
.wizard-form select,
.wizard-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.admin-picker-stack select,
.wizard-form input,
.wizard-form select {
  height: 40px;
  padding: 0 12px;
}

.wizard-form textarea {
  padding: 10px 12px;
  resize: vertical;
}

.admin-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.admin-actions-row .primary-button {
  grid-column: 1 / -1;
}

.studio-workflow,
.studio-import-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.studio-step {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.studio-step > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #eef4fa;
  color: var(--muted);
  font-size: 13px;
  font-weight: 950;
}

.studio-step.is-complete > span {
  background: #e8f6ef;
  color: #157347;
}

.studio-step.is-active > span {
  background: var(--blue);
  color: #fff;
}

.studio-step strong,
.studio-import-card strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
}

.studio-step small,
.studio-import-card small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.studio-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.studio-action-row .primary-button {
  grid-column: 1 / -1;
}

.studio-import-card {
  background: #f8fbfd;
}

.studio-main-screen {
  display: grid;
  gap: 16px;
  align-content: start;
  min-width: 0;
  min-height: 100%;
  padding: 18px;
}

.studio-screen-heading {
  display: grid;
  gap: 6px;
}

.studio-screen-heading h2 {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.15;
}

.studio-screen-heading p {
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.studio-card-grid,
.figure-browser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  align-content: start;
}

.studio-card {
  display: grid;
  gap: 14px;
  align-content: space-between;
  min-height: 150px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.studio-card strong {
  display: block;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.2;
}

.studio-card span,
.studio-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.studio-card-actions,
.studio-secondary-actions,
.studio-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.studio-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.studio-breadcrumbs button {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 900;
}

.studio-breadcrumbs button:disabled {
  color: var(--ink);
}

.studio-breadcrumbs span {
  color: var(--muted);
  font-weight: 900;
}

.studio-left-guide,
.studio-context-panel,
.studio-import-form,
.studio-sheet-list,
.studio-parts-mini-list,
.studio-advanced-tools {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.editor-figure-item-panel {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.studio-import-form {
  width: 100%;
  max-width: 760px;
  align-self: start;
}

.studio-context-panel h3,
.studio-sheet-list h3,
.studio-parts-mini-list h3 {
  color: var(--ink);
  font-size: 15px;
}

.studio-context-panel p,
.studio-left-guide span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.4;
}

.studio-import-form label,
.studio-parts-mini-list {
  min-width: 0;
}

.studio-import-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.studio-import-form input,
.studio-import-form select,
.studio-parts-mini-list input {
  min-width: 0;
  width: 100%;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.readonly-field {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.readonly-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.readonly-field strong {
  color: var(--ink);
}

.studio-review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.studio-review-grid span {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.studio-review-grid b {
  color: var(--ink);
  font-size: 22px;
}

.studio-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.studio-mode-tabs .is-active,
.studio-filter-row .is-active,
.studio-sheet-list .is-active {
  border-color: rgba(18, 103, 216, .55);
  background: var(--blue-soft);
  color: var(--blue);
}

.studio-sheet-list > div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.studio-parts-mini-list > div {
  display: grid;
  gap: 7px;
  max-height: 360px;
  overflow: auto;
}

.studio-parts-mini-list button {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 4px 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.studio-parts-mini-list button.is-selected {
  border-color: rgba(18, 103, 216, .55);
  background: var(--blue-soft);
}

.studio-parts-mini-list b {
  grid-row: span 2;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #eef4fa;
  color: var(--blue);
}

.studio-parts-mini-list span {
  color: var(--ink);
  font-weight: 900;
}

.studio-parts-mini-list small {
  color: var(--muted);
  font-weight: 760;
}

.assembly-tree {
  display: grid;
  gap: 12px;
}

.tree-system {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.tree-system-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #f7fafc;
  color: var(--ink);
  text-align: left;
}

.tree-system-button span {
  font-weight: 900;
}

.tree-system-button small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.tree-assemblies {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.assembly-card span:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.assembly-card .assembly-card-actions {
  display: flex;
  gap: 8px;
  padding-top: 2px;
}

.assembly-card .assembly-card-actions span {
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f4f8fc;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.assembly-card .assembly-card-actions [data-delete-figure] {
  color: #c0394d;
}

.assembly-card b,
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef4fa;
  color: #42576f;
  font-size: 11px;
  font-weight: 900;
}

.status-published {
  background: #e7f7f1;
  color: #137253;
}

.status-review {
  background: #fff5df;
  color: #8b5a0b;
}

.status-draft {
  background: #eef4fa;
  color: #42576f;
}

.admin-bottom-panel {
  min-height: 210px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .84);
  box-shadow: var(--shadow-soft);
}

.editor-figure-item-panel {
  min-height: 0;
}

.admin-figitem-strip {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .92);
}

.admin-figitem-strip-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.admin-figitem-strip-head strong {
  color: var(--ink);
  font-size: 14px;
}

.admin-figitem-strip-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.admin-figitem-buttons {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.admin-figitem-buttons .figure-item-button {
  flex: 0 0 68px;
  min-height: 52px;
  display: grid;
  place-items: center;
  gap: 2px;
}

.admin-figitem-buttons .figure-item-button b {
  color: inherit;
  font-size: 15px;
}

.admin-figitem-buttons .figure-item-button small {
  color: inherit;
  opacity: .72;
  font-size: 10px;
  font-weight: 900;
}

.part-editor-table {
  max-height: 230px;
  margin-top: 12px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.parts-edit-header,
.parts-edit-row {
  display: grid;
  grid-template-columns: 64px minmax(120px, 1fr) minmax(120px, 1fr) minmax(160px, 1.4fr) 44px 52px;
  gap: 10px;
  align-items: center;
}

.diagram-fallback {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  width: 1200px;
  height: 820px;
  border: 1px dashed var(--line-strong);
  border-radius: 34px;
  background: #f7fafc;
  color: var(--muted);
  text-align: center;
}

.diagram-fallback strong {
  color: var(--ink);
  font-size: 26px;
}

.parts-edit-header {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #f7fafc;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.parts-edit-row {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #edf2f6;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.parts-edit-row:hover,
.parts-edit-row.is-selected {
  background: var(--blue-soft);
}

.parts-edit-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 750;
}

.readonly-field {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7fafc;
}

.readonly-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.readonly-field strong {
  font-size: 13px;
}

.admin-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.admin-summary-grid span {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-summary-grid b {
  color: var(--ink);
  font-size: 18px;
}

.mini-section-heading {
  display: grid;
  gap: 3px;
}

.mini-section-heading strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
}

.aircraft-hotspot-editor {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7fafc;
}

.aircraft-hotspot-editor-list {
  display: grid;
  gap: 8px;
  max-height: 340px;
  overflow: auto;
  padding-right: 2px;
}

.aircraft-hotspot-editor-row {
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid rgba(177, 194, 211, .78);
  border-radius: var(--radius);
  background: #fff;
}

.aircraft-hotspot-editor-row strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.2;
}

.aircraft-hotspot-editor-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
}

.hotspot-coordinate-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 6px;
  align-items: end;
}

.hotspot-coordinate-grid label {
  gap: 4px;
  font-size: 10px;
}

.hotspot-coordinate-grid input {
  min-height: 32px;
  padding: 6px;
}

.hotspot-coordinate-grid .small-button {
  min-height: 32px;
  padding-inline: 9px;
}

.upload-stack.compact {
  margin-top: 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(7, 20, 35, .44);
  backdrop-filter: blur(7px);
}

.modal-card,
.confirm-card {
  width: min(980px, 100%);
  max-height: min(90vh, 920px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.confirm-card {
  width: min(430px, 100%);
  padding: 20px;
}

.confirm-card h2 {
  margin: 0 0 8px;
}

.confirm-card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.45;
}

.modal-header,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.modal-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.modal-header h2,
.wizard-step h3 {
  margin: 0;
  letter-spacing: 0;
}

.wizard-form {
  display: grid;
  gap: 14px;
}

.wizard-step {
  margin: 0 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbfd;
}

.wizard-step:first-of-type {
  margin-top: 18px;
}

.step-label {
  margin: 0 0 4px;
  color: var(--blue-strong);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.technician-shell .form-grid {
  gap: 9px;
  margin-top: 0;
}

.technician-shell textarea {
  min-height: 96px;
}

.technician-shell .upload-card {
  min-height: 72px;
  padding: 10px;
}

.span-2 {
  grid-column: 1 / -1;
}

.validation-box {
  margin: 0 18px;
  padding: 10px 12px;
  border: 1px solid rgba(217, 58, 70, .35);
  border-radius: var(--radius);
  background: #fff0f2;
  color: #9e2630;
  font-size: 13px;
  font-weight: 800;
}

.rfq-drawer {
  position: fixed;
  top: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 35;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(430px, calc(100vw - 36px));
  border: 1px solid rgba(180, 194, 211, .9);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: #f8fbfd;
}

.drawer-header h2 {
  margin: 0;
}

.drawer-content {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  padding: 16px;
}

.rfq-line {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7fafc;
}

.rfq-line span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.rfq-line strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.drawer-section {
  display: grid;
  gap: 10px;
}

.rfq-line-form,
.rfq-line-form label,
.sender-card label,
.email-editor label,
.rfq-edit-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.rfq-line-form {
  gap: 12px;
}

.rfq-line-form input,
.rfq-line-form select,
.rfq-line-form textarea,
.sender-card select,
.email-editor input,
.email-editor textarea,
.custom-recipient input,
.rfq-edit-grid input,
.rfq-edit-grid select,
.rfq-edit-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.rfq-line-form input,
.rfq-line-form select,
.sender-card select,
.email-editor input,
.custom-recipient input,
.rfq-edit-grid input,
.rfq-edit-grid select {
  height: 40px;
  padding: 0 12px;
}

.rfq-line-form textarea,
.email-editor textarea,
.rfq-edit-grid textarea {
  min-height: 78px;
  padding: 10px 12px;
  resize: vertical;
}

.drawer-sticky-cta {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .72), #fff 40%);
}

.rfq-topbar {
  position: relative;
  z-index: 2;
  grid-template-columns: minmax(300px, .75fr) minmax(360px, 1fr) auto;
}

.rfq-layer {
  grid-template-rows: auto minmax(0, 1fr);
}

.topbar-subtitle {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.35;
}

.rfq-summary-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.rfq-summary-strip span {
  display: grid;
  gap: 1px;
  align-items: center;
  min-width: 78px;
  min-height: 48px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.rfq-summary-strip b {
  color: var(--blue-strong);
  font-size: 15px;
  line-height: 1.05;
}

.rfq-summary-strip small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.rfq-cart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  min-height: 0;
  overflow: hidden;
}

.rfq-cart-main {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  min-height: 0;
  padding: 16px;
  background: #edf3f8;
}

.rfq-stepper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.rfq-stepper span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .82);
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}

.rfq-stepper b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #eef4fa;
  color: #52677f;
  font-size: 11px;
}

.rfq-stepper span.is-active,
.rfq-stepper span.is-complete {
  border-color: rgba(18, 103, 216, .3);
  background: #f8fbff;
  color: var(--blue-strong);
}

.rfq-stepper span.is-complete b {
  background: var(--blue);
  color: #fff;
}

.rfq-section-heading {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .9);
}

.rfq-cart-items {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  overflow: auto;
}

.rfq-empty-state {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  min-height: 460px;
  padding: 30px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .75);
  color: var(--muted);
  text-align: center;
}

.rfq-empty-state h2 {
  margin: 0;
  color: var(--ink);
}

.rfq-empty-state p {
  max-width: 420px;
  margin: 0;
  line-height: 1.45;
}

.rfq-item-card {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 22px rgba(21, 39, 63, .07);
}

.rfq-item-top,
.rfq-line-identity,
.rfq-item-actions,
.email-actions,
.manual-email-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rfq-item-top {
  justify-content: space-between;
}

.rfq-line-identity {
  min-width: 0;
}

.rfq-line-select {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.rfq-item-top h3 {
  margin: 0;
  font-size: 17px;
  letter-spacing: 0;
}

.rfq-line-identity p {
  margin: 3px 0 0;
  color: #34485f;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
}

.rfq-item-actions,
.email-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.send-panel-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  padding: 12px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .96) 28%);
}

.send-panel-actions .primary-button {
  width: min(240px, 100%);
}

.rfq-item-desc {
  margin: 0;
  color: #34485f;
  font-weight: 750;
}

.rfq-source-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.rfq-source-row span,
.rfq-source-row strong {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
}

.rfq-source-row span {
  background: var(--blue-soft);
  color: var(--blue-strong);
}

.rfq-source-row strong {
  background: #eaf8f3;
  color: #11684d;
}

.rfq-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.rfq-item-meta span {
  padding: 6px 9px;
  border-radius: 999px;
  background: #eef4fa;
  color: #42576f;
  font-size: 12px;
  font-weight: 850;
}

.rfq-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.rfq-edit-grid label {
  display: grid;
  gap: 5px;
}

.rfq-edit-grid input,
.rfq-edit-grid select {
  min-height: 38px;
  padding-block: 8px;
}

.rfq-edit-grid textarea {
  min-height: 68px;
}

.rfq-send-panel {
  min-height: 0;
  overflow: auto;
  padding: 18px;
  border-left: 1px solid var(--line);
  background: rgba(255, 255, 255, .9);
}

#rfqSendPanel {
  display: grid;
  gap: 12px;
}

.sender-card,
.recipient-panel,
.email-editor,
.publish-checklist {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 22px rgba(21, 39, 63, .06);
}

.compact-heading h2 {
  font-size: 16px;
}

.recipient-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 28px;
}

.recipient-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(18, 103, 216, .24);
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-strong);
  font-size: 12px;
  font-weight: 900;
}

.recipient-chip span {
  color: #52677f;
  font-weight: 750;
}

.muted-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.recommendation-note {
  margin: 0;
  color: #40556d;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}

.custom-recipient {
  display: grid;
  gap: 8px;
}

.manual-email-row input {
  min-width: 0;
}

.broker-list {
  display: grid;
  gap: 8px;
  max-height: 230px;
  overflow: auto;
}

.broker-row {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.broker-row div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.broker-row b {
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef4fa;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
}

.broker-row:hover,
.broker-row.is-selected {
  border-color: rgba(18, 103, 216, .42);
  background: var(--blue-soft);
}

.broker-row.is-selected b {
  background: var(--blue);
  color: #fff;
}

.broker-row span,
.broker-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.broker-row small {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.broker-row em {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  padding: 2px 6px;
  border-radius: 999px;
  background: #eef4fa;
  color: #42576f;
  font-style: normal;
  font-weight: 900;
}

.email-editor textarea {
  min-height: 280px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  text-transform: none;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbfd;
  color: #40556d;
  font-size: 12px;
  font-weight: 900;
}

.checklist-item span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff2d7;
  color: #8f5c00;
  font-size: 11px;
}

.checklist-item.is-done {
  border-color: rgba(23, 150, 111, .2);
  background: #edf9f4;
  color: #11684d;
}

.checklist-item.is-done span {
  background: var(--green);
  color: #fff;
}

.ops-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff, #f4f8fb);
  box-shadow: var(--shadow-soft);
}

.ops-hero.compact {
  padding: 16px 18px;
}

.ops-hero h1 {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0;
}

.ops-subtitle {
  max-width: 780px;
  margin: 7px 0 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.5;
}

.ops-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.metric-card,
.ops-panel,
.fleet-card,
.step-card,
.selected-part-card,
.diagram-metadata-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.metric-card {
  display: grid;
  gap: 4px;
  padding: 15px;
}

.metric-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.metric-card strong {
  font-size: 28px;
  letter-spacing: 0;
}

.metric-card.danger strong {
  color: var(--danger);
}

.ops-panel {
  padding: 16px;
}

.fleet-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 12px;
}

.fleet-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  color: var(--ink);
  text-align: left;
}

.fleet-card:hover,
.request-card:hover,
.request-card.is-active {
  border-color: rgba(18, 103, 216, .42);
  background: #f8fbff;
}

.fleet-card-top,
.request-card-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.registration {
  color: var(--blue-strong);
  font-size: 12px;
  font-weight: 950;
}

.fleet-card h3,
.selected-part-card h2 {
  margin: 4px 0;
  font-size: 19px;
  letter-spacing: 0;
}

.technician-shell h3 {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0;
}

.technician-shell label {
  display: grid;
  gap: 6px;
}

.technician-shell input,
.technician-shell select {
  min-height: 38px;
  padding-block: 8px;
}

.selected-part-card h2 {
  font-size: 15px;
  line-height: 1.25;
}

.selected-part-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.technician-shell .rfq-item-meta {
  gap: 5px;
}

.technician-shell .rfq-item-meta span {
  padding: 5px 7px;
  font-size: 10px;
}

.fleet-card p,
.fleet-card small {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.fleet-stats,
.diagram-meta-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.fleet-stats span,
.diagram-meta-grid span {
  padding: 9px;
  border-radius: var(--radius);
  background: #f2f6fa;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.fleet-stats b,
.diagram-meta-grid b {
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.technician-shell {
  display: grid;
  grid-template-columns: minmax(320px, 360px) minmax(620px, 1fr) minmax(340px, 390px);
  gap: 12px;
  height: 100%;
  min-height: 0;
}

.tech-context-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
}

.step-card,
.selected-part-card,
.diagram-metadata-card {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.tech-context-panel > .step-card:first-child {
  gap: 8px;
  padding: 10px 12px;
}

.tech-context-panel > .step-card:first-child .muted-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
}

.tech-context-panel > .step-card:first-child label {
  gap: 5px;
}

.tech-context-panel > .step-card:first-child select {
  min-height: 38px;
}

.selected-part-card {
  position: static;
  z-index: 1;
}

.tech-selected-mini {
  gap: 8px;
  padding: 10px 12px;
}

.tech-selected-mini h2 {
  font-size: 14px;
}

.tech-selected-mini p {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
}

.part-selector-card {
  min-height: 0;
  overflow: hidden;
}

.figure-selector-card {
  min-height: 0;
  overflow: hidden;
}

.figure-card-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding-right: 2px;
}

.figure-card-row {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.figure-card-row:hover,
.figure-card-row.is-selected {
  border-color: rgba(18, 103, 216, .46);
  background: var(--blue-soft);
}

.figure-card-row strong {
  font-size: 12px;
  font-weight: 950;
}

.figure-card-row span,
.figure-card-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.tech-part-list {
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: auto;
  padding-right: 2px;
}

.part-selector-card {
  min-height: 0;
  overflow: hidden;
}

.tech-part-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 5px 10px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.tech-part-row:hover,
.tech-part-row.is-selected {
  border-color: rgba(18, 103, 216, .46);
  background: var(--blue-soft);
}

.tech-part-row.is-item-selected:not(.is-selected) {
  border-color: rgba(18, 103, 216, .24);
  background: #f8fbff;
}

.tech-system-row {
  grid-template-columns: 64px 1fr;
}

.tech-system-row span {
  background: #e9f7f4;
  color: #007f6c;
}

.tech-part-row .tech-part-item {
  grid-row: span 3;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #eef4fa;
  color: var(--blue-strong);
  font-size: 12px;
  font-weight: 950;
}

.tech-part-row strong {
  font-size: 12px;
  line-height: 1.18;
}

.tech-part-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
}

.tech-part-row .tech-part-meta {
  display: block;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.tech-system-row span {
  background: #e9f7f4;
  color: #007f6c;
}

.material-request-form,
.review-form {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.tech-create-mr-form {
  align-content: start;
}

.tech-selected-part-detail {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.part-detail-head {
  display: grid;
  gap: 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.part-detail-head h3 {
  color: var(--ink);
  font-size: 16px;
}

.part-detail-head strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.part-detail-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
}

.part-detail-block {
  display: grid;
  gap: 7px;
}

.part-detail-block h4 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.part-detail-block .detail-list {
  gap: 6px;
  margin-bottom: 0;
}

.part-detail-block .detail-item {
  grid-template-columns: 116px minmax(0, 1fr);
  padding: 7px 9px;
}

.part-detail-block .detail-item span {
  font-size: 11px;
}

.part-detail-block .detail-item strong {
  font-size: 12px;
}

.tech-selected-part-detail .part-option-row {
  padding: 7px 9px;
}

.part-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.part-status-grid span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fbfd;
}

.part-status-grid b,
.part-status-grid small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.part-status-grid b {
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
}

.part-status-grid small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.request-placeholder {
  align-content: start;
  min-height: 180px;
}

.request-placeholder p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.45;
}

.request-placeholder button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.issue-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.issue-chip,
.filter-tab {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.issue-chip.is-selected,
.filter-tab.is-active {
  border-color: rgba(18, 103, 216, .36);
  background: var(--blue-soft);
  color: var(--blue-strong);
}

.large-action {
  min-height: 44px;
  font-size: 15px;
}

.tech-diagram-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  min-height: 0;
}

.technician-diagram {
  grid-row: 2;
  height: 100%;
  min-height: 0;
}

.technician-diagram::after {
  display: none;
}

.tech-diagram-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-height: 40px;
}

.tech-diagram-toolbar:empty {
  display: none;
}

.figure-item-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow-soft);
}

.figure-item-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.figure-item-panel-header strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.2;
}

.figure-item-panel-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.figure-item-button-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  max-height: 116px;
  overflow: auto;
  padding: 1px 2px 2px 1px;
}

.figure-item-button {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 34px;
  padding: 0 10px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 18px rgba(18, 103, 216, .22);
  font-size: 12px;
  font-weight: 950;
}

.figure-item-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(18, 103, 216, .32);
}

.figure-item-button.is-selected {
  background: #f6a623;
  box-shadow: 0 0 0 5px rgba(246, 166, 35, .2), 0 12px 24px rgba(201, 130, 19, .28);
}

.tech-diagram-toolbar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}

.figure-sheet-note {
  padding: 8px 10px;
  border: 1px solid rgba(177, 194, 211, .75);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .86);
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}

.figure-validation-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(177, 194, 211, .85);
  border-radius: var(--radius);
  background: #f8fbfd;
}

.figure-validation-panel strong {
  color: var(--ink);
  font-size: 13px;
}

.import-settings-panel {
  background: #ffffff;
}

.gemini-settings-grid {
  display: grid;
  gap: 10px;
}

.figure-validation-grid {
  display: grid;
  gap: 7px;
}

.figure-validation-grid span,
.validation-warning-list span,
.validation-ok {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
  line-height: 1.35;
}

.figure-validation-grid b {
  color: var(--ink);
}

.validation-warning-list {
  display: grid;
  gap: 6px;
}

.validation-warning-list span {
  padding: 7px 8px;
  border: 1px solid rgba(201, 130, 19, .35);
  border-radius: 8px;
  background: rgba(255, 244, 225, .88);
  color: #8b5a0f;
}

.validation-ok {
  color: var(--green);
}

.aircraft-overview-card {
  display: grid;
  grid-template-rows: auto auto auto auto;
  gap: 12px;
  min-height: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(247, 250, 253, .96)),
    #fff;
  box-shadow: var(--shadow-soft);
}

.aircraft-overview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.aircraft-overview-header h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.15;
}

.aircraft-overview-header span,
.aircraft-zone-summary p,
.aircraft-model-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
}

.overview-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 360px;
}

.overview-badges b {
  padding: 6px 9px;
  border: 1px solid rgba(177, 194, 211, .78);
  border-radius: 999px;
  background: #f7fafc;
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.aircraft-model-shell {
  position: relative;
  z-index: 1;
  height: 420px;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(177, 194, 211, .82);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(120, 145, 172, .07) 1px, transparent 1px),
    linear-gradient(0deg, rgba(120, 145, 172, .07) 1px, transparent 1px),
    radial-gradient(circle at 50% 28%, rgba(18, 103, 216, .09), transparent 32%),
    #f8fbfd;
  background-size: 36px 36px, 36px 36px, auto, auto;
}

.aircraft-model-shell model-viewer {
  display: block;
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  --poster-color: transparent;
}

.aircraft-model-shell model-viewer.is-unavailable {
  opacity: .18;
}

.aircraft-model-hotspot {
  min-height: 30px;
  max-width: min(140px, 28vw);
  padding: 0 11px;
  border: 1px solid rgba(95, 119, 140, .48);
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: #243b53;
  box-shadow: 0 8px 22px rgba(9, 26, 46, .12);
  font-size: 11px;
  font-weight: 950;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.aircraft-system-hotspot {
  padding-inline: 12px;
}

.aircraft-model-hotspot:hover,
.aircraft-model-hotspot.is-selected {
  border-color: rgba(18, 103, 216, .56);
  background: rgba(232, 242, 255, .96);
  color: var(--blue-strong);
}

.aircraft-model-hotspot:disabled {
  cursor: not-allowed;
  opacity: .44;
}

.model-loading,
.aircraft-model-fallback {
  display: grid;
  place-items: center;
  height: 100%;
  min-height: 220px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.aircraft-model-fallback {
  position: absolute;
  inset: 18px;
  z-index: 3;
  align-content: center;
  gap: 6px;
  border: 1px dashed rgba(120, 145, 172, .72);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .9);
  text-align: center;
}

.aircraft-model-fallback[hidden] {
  display: none;
}

.aircraft-model-fallback span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.aircraft-zone-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.aircraft-zone-label {
  position: absolute;
  transform: translate(-50%, -50%);
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(95, 119, 140, .42);
  border-radius: 999px;
  background: rgba(255, 255, 255, .86);
  color: #243b53;
  box-shadow: 0 8px 22px rgba(9, 26, 46, .08);
  font-size: 11px;
  font-weight: 950;
  pointer-events: auto;
}

.aircraft-zone-label:hover,
.aircraft-zone-label.is-selected {
  border-color: rgba(18, 103, 216, .5);
  background: rgba(232, 242, 255, .94);
  color: var(--blue-strong);
}

.aircraft-zone-label:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.aircraft-zone-workflow {
  position: relative;
  z-index: 4;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(177, 194, 211, .72);
  border-radius: var(--radius);
  background: #fff;
}

.aircraft-zone-workflow h3 {
  margin: 0;
  font-size: 15px;
}

.zone-drill-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.zone-drill-header .small-button {
  min-width: 68px;
  text-decoration: none;
}

.aircraft-zone-chip-grid,
.recommended-ata-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.aircraft-zone-chip,
.recommended-ata-card {
  display: grid;
  gap: 3px;
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
}

.aircraft-zone-chip span,
.recommended-ata-card strong {
  font-size: 12px;
  font-weight: 950;
  line-height: 1.18;
}

.aircraft-zone-chip small,
.recommended-ata-card span,
.recommended-ata-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
  line-height: 1.2;
}

.aircraft-zone-chip:hover,
.aircraft-zone-chip.is-selected,
.recommended-ata-card:hover {
  border-color: rgba(18, 103, 216, .42);
  background: var(--blue-soft);
}

.aircraft-zone-chip:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.recommended-ata-panel {
  display: grid;
  gap: 8px;
}

.recommended-ata-panel h3 {
  margin: 0;
  font-size: 15px;
}

.recommended-ata-card span {
  color: var(--blue-strong);
}

.aircraft-model-note {
  margin: 0;
  padding-top: 2px;
}

.tech-request-panel {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 12px;
  align-self: start;
  min-width: 0;
  min-height: 0;
  max-height: calc(100vh - 42px);
  overflow: auto;
}

.aircraft-overview-svg .aircraft-zone {
  cursor: pointer;
  outline: none;
}

.aircraft-overview-svg .aircraft-zone rect {
  transition: opacity .16s ease, stroke-width .16s ease;
}

.aircraft-overview-svg .aircraft-zone:hover rect,
.aircraft-overview-svg .aircraft-zone:focus rect {
  opacity: .44;
  stroke-width: 5;
}

.aircraft-overview-svg .aircraft-zone.is-disabled {
  cursor: not-allowed;
  opacity: .48;
}

.aircraft-overview-svg .aircraft-zone text {
  fill: #16324a;
  font-size: 18px;
  font-weight: 950;
  pointer-events: none;
}

.request-diagram-preview {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.mini-diagram-frame {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #edf3f8;
}

.mini-stage {
  width: 860px;
  height: 590px;
  transform: translate(-50%, -50%) scale(.34);
}

.request-workspace {
  display: grid;
  grid-template-columns: minmax(300px, 410px) minmax(0, 1fr);
  gap: 16px;
  min-height: 0;
}

.procurement-workspace {
  display: grid;
  grid-template-columns: minmax(300px, 340px) minmax(590px, 1fr) minmax(320px, 360px);
  gap: 14px;
  height: 100%;
  min-height: 0;
}

.proc-queue-panel,
.proc-detail-panel,
.proc-decision-panel {
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow-soft);
}

.proc-queue-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  padding: 14px;
  overflow: hidden;
}

.proc-detail-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 14px;
  overflow: auto;
}

.proc-decision-panel {
  position: sticky;
  top: 12px;
  display: grid;
  align-content: start;
  gap: 12px;
  max-height: calc(100vh - 48px);
  padding: 14px;
  overflow: auto;
}

.proc-section-title {
  display: grid;
  gap: 2px;
}

.proc-section-title h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

.proc-request-list {
  max-height: none;
  min-height: 0;
  align-content: start;
}

.proc-request-card {
  gap: 8px;
  padding: 12px;
  align-content: start;
}

.proc-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.proc-request-card strong {
  font-size: 15px;
  letter-spacing: 0;
}

.proc-request-card span,
.proc-request-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.proc-card-part {
  color: var(--ink) !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1.25;
}

.proc-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.proc-card-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef4fa;
  color: #40556d;
  font-size: 11px;
  font-weight: 900;
}

.proc-summary-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff, #f7fbff);
}

.proc-summary-card h1,
.proc-summary-card h2,
.proc-summary-card p {
  margin: 0;
}

.proc-summary-card h1 {
  margin-top: 2px;
  font-size: 26px;
  letter-spacing: 0;
}

.proc-summary-card h2 {
  margin-top: 6px;
  color: var(--blue-strong);
  font-size: 16px;
  letter-spacing: 0;
}

.proc-summary-card p {
  margin-top: 4px;
  color: #35485e;
  font-weight: 850;
}

.proc-summary-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.proc-summary-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #edf5fd;
  color: #29445f;
  font-size: 12px;
  font-weight: 900;
}

.proc-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 22px rgba(21, 39, 63, .06);
}

.proc-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.proc-card-header h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
}

.proc-card-header span {
  max-width: 240px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-align: right;
}

.proc-diagram-frame {
  position: relative;
  height: clamp(420px, 52vh, 540px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(18, 103, 216, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 103, 216, .045) 1px, transparent 1px),
    #edf4fa;
  background-size: 38px 38px;
}

.proc-mini-stage {
  width: 1200px;
  height: 820px;
  transform: translate(-50%, -50%) scale(.58);
}

.proc-diagram-frame .hotspot.is-selected {
  filter: drop-shadow(0 0 10px rgba(18, 103, 216, .72));
}

.proc-diagram-frame .hotspot.is-muted {
  opacity: .28;
}

.proc-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.proc-info-item {
  display: grid;
  gap: 4px;
  min-height: 62px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbfd;
}

.proc-info-item span,
.proc-comment span,
.decision-field > span,
.decision-status span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.proc-info-item strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
}

.proc-comment {
  display: grid;
  gap: 6px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbfd;
}

.proc-comment p {
  margin: 0;
  color: #35485e;
  font-weight: 750;
  line-height: 1.45;
}

.decision-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbfd;
}

.decision-field {
  display: grid;
  gap: 7px;
}

.condition-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.condition-chip {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}

.condition-chip.is-selected {
  border-color: rgba(18, 103, 216, .38);
  background: var(--blue-soft);
  color: var(--blue-strong);
}

.decision-recommendation {
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbfd;
  color: #40556d;
  font-size: 13px;
  font-weight: 900;
}

.decision-recommendation.good {
  border-color: rgba(23, 150, 111, .22);
  background: #eaf8f3;
  color: #11684d;
}

.decision-recommendation.warning {
  border-color: rgba(201, 130, 19, .24);
  background: #fff6e4;
  color: #8b5a0b;
}

.decision-actions {
  display: grid;
  gap: 9px;
}

.secondary-action {
  min-height: 42px;
  width: 100%;
  justify-content: center;
}

.request-list-panel,
.request-detail-panel {
  min-height: 0;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.request-list {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 250px);
  overflow: auto;
}

.proc-queue-panel .request-list {
  max-height: none;
  min-height: 0;
  align-content: start;
}

.request-card {
  display: grid;
  gap: 9px;
  width: 100%;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.request-card strong,
.request-card span {
  display: block;
}

.request-card p {
  margin: 0;
  color: #35485e;
  font-size: 13px;
  font-weight: 750;
}

.priority-badge {
  padding: 6px 9px;
  border-radius: 999px;
  background: #eef4fa;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
}

.priority-badge.warning {
  background: #fff2d7;
  color: #8f5c00;
}

.priority-badge.danger {
  background: #ffe3e7;
  color: var(--danger);
}

.status-pipeline {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0;
}

.status-pipeline span {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f6f8fb;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.status-pipeline span.is-active {
  border-color: rgba(18, 103, 216, .32);
  background: var(--blue-soft);
  color: var(--blue-strong);
}

.ops-note,
.timeline-panel,
.published-rfq-panel {
  display: grid;
  gap: 9px;
  margin-top: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbfd;
}

.ops-note p {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
  line-height: 1.5;
}

.field-warning {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(223, 137, 31, .32);
  border-radius: 8px;
  background: #fff7e8;
  color: #87520d;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}

.part-option-row {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.part-option-row:hover,
.part-option-row.is-selected {
  border-color: rgba(18, 103, 216, .44);
  background: var(--blue-soft);
}

.part-option-row span {
  font-weight: 950;
}

.part-option-row small {
  color: var(--muted);
  font-weight: 750;
}

.timeline-event {
  display: grid;
  gap: 3px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.timeline-event:first-of-type {
  border-top: 0;
}

.timeline-event span,
.timeline-event small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.timeline-event p {
  margin: 0;
  color: #40546b;
  font-size: 13px;
  font-weight: 700;
}

.linked-mr-pill {
  display: inline-flex;
  margin-top: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-strong);
  font-size: 11px;
  font-weight: 950;
}

.published-rfq-card {
  display: grid;
  gap: 2px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.published-rfq-card span,
.published-rfq-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.quote-table {
  display: grid;
  overflow: auto;
}

.quote-row {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr 1fr .8fr .7fr .55fr .9fr 1fr .45fr .8fr;
  min-width: 1180px;
  border-bottom: 1px solid var(--line);
}

.quote-row span {
  display: grid;
  align-content: center;
  min-height: 58px;
  padding: 8px;
  color: #2f435a;
  font-size: 12px;
  font-weight: 760;
}

.quote-row small {
  color: var(--muted);
}

.quote-header span {
  min-height: 38px;
  background: #f3f7fb;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

@media (max-width: 1500px) {
  .admin-layer.is-studio-flow .admin-grid {
    grid-template-columns: minmax(280px, 330px) minmax(0, 1fr);
    overflow: auto;
  }

  .admin-layer.is-studio-flow .admin-detail {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .admin-layer.is-studio-flow .studio-import-form {
    max-width: none;
  }
}

@media (max-width: 1260px) {
  body {
    overflow: auto;
  }

  .app-shell,
  .workspace,
  .catalog-layer,
  .admin-layer,
  .rfq-layer,
  .procurement-layer {
    height: auto;
    min-height: 100vh;
  }

  .catalog-grid,
  .admin-grid,
  .rfq-cart-grid {
    grid-template-columns: 320px minmax(420px, 1fr);
  }

  .details-panel,
  .admin-detail,
  .rfq-send-panel {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .rfq-cart-grid {
    grid-template-columns: 1fr;
  }

  .rfq-stepper {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rfq-summary-strip {
    flex-wrap: wrap;
  }

  .technician-shell,
  .request-workspace,
  .procurement-workspace {
    grid-template-columns: 1fr;
    height: auto;
  }

  .procurement-layer {
    overflow: auto;
  }

  .procurement-layer .ops-view {
    height: auto;
  }

  .proc-decision-panel {
    position: static;
    max-height: none;
  }

  .proc-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .aircraft-overview-header {
    display: grid;
  }

  .overview-badges {
    justify-content: flex-start;
    max-width: none;
  }

  .aircraft-zone-chip-grid,
  .recommended-ata-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ops-metrics,
  .fleet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 880px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .brand-rail {
    position: sticky;
    top: 0;
    z-index: 20;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    height: 62px;
    padding: 9px 12px;
    overflow-x: auto;
  }

  .brand-lockup div,
  .demo-mode-pill {
    display: none;
  }

  .rail-button {
    flex: 0 0 auto;
    width: auto;
    min-width: max-content;
  }

  .workspace {
    padding: 0;
  }

  .catalog-layer,
  .admin-layer,
  .rfq-layer,
  .ops-layer {
    border-radius: 0;
    border-right: 0;
  }

  .topbar {
    grid-template-columns: 1fr;
    gap: 12px;
    height: auto;
  }

  .catalog-grid,
  .admin-grid,
  .rfq-cart-grid {
    grid-template-columns: 1fr;
  }

  .left-panel,
  .details-panel,
  .admin-sidebar,
  .admin-detail,
  .rfq-send-panel {
    border: 0;
    border-bottom: 1px solid var(--line);
  }

  .rfq-edit-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .rfq-topbar {
    grid-template-columns: 1fr;
  }

  .rfq-stepper {
    grid-template-columns: 1fr;
  }

  .rfq-item-top,
  .rfq-line-identity {
    align-items: flex-start;
    flex-direction: column;
  }

  .rfq-edit-grid {
    grid-template-columns: 1fr;
  }

  .ops-view {
    padding: 12px;
  }

  .ops-hero,
  .ops-hero.compact {
    display: grid;
    padding: 14px;
  }

  .ops-metrics,
  .fleet-grid,
  .fleet-stats,
  .diagram-meta-grid {
    grid-template-columns: 1fr;
  }

  .technician-shell,
  .request-workspace,
  .procurement-workspace {
    grid-template-columns: 1fr;
  }

  .selected-part-card {
    position: static;
  }

  .proc-summary-card,
  .proc-card-header {
    display: grid;
  }

  .proc-card-header span {
    max-width: none;
    text-align: left;
  }

  .proc-info-grid {
    grid-template-columns: 1fr;
  }

  .aircraft-zone-chip-grid,
  .recommended-ata-list {
    grid-template-columns: 1fr;
  }

  .aircraft-model-shell,
  .aircraft-model-shell model-viewer {
    height: 340px;
  }

  .proc-diagram-frame {
    height: 420px;
  }

  .proc-mini-stage {
    transform: translate(-50%, -50%) scale(.42);
  }

  .viewer-panel,
  .editor-panel {
    min-height: 620px;
  }

  .diagram-viewport {
    min-height: 540px;
  }
}
