/* eExpertiz — profesyonel ekspertiz raporu çıktısı (örnek raporlar referans) */
:root {
  --ex-navy: #001b4f;
  --ex-navy-mid: #0a2d6e;
  --ex-blue: #1565c0;
  --ex-cyan: #10b7c9;
  --ex-bg: #eef2f7;
  --ex-paper: #ffffff;
  --ex-text: #1a2332;
  --ex-muted: #5c6b7a;
  --ex-border: #c5cdd8;
  --ex-border-light: #e2e8f0;
  --ex-red: #d32f2f;
  --ex-green: #2e7d32;
  --ex-warn: #f57c00;
  --st-original: #ffffff;
  --st-painted: #ffc107;
  --st-changed: #ef5350;
  --st-local: #fff59d;
  --st-processed: #ce93d8;
  --st-removed: #b0bec5;
  --st-damaged: #1565c0;
  --st-unknown: #eceff1;
  --ex-radius: 4px;
  --ex-shadow: 0 4px 24px rgba(0, 27, 79, 0.1);
}

.ex-report {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ex-text);
  line-height: 1.45;
  font-size: 14px;
}

.ex-report-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 16px 16px 48px;
}

.ex-sheet {
  background: var(--ex-paper);
  border: 1px solid var(--ex-border);
  box-shadow: var(--ex-shadow);
  margin-bottom: 20px;
  page-break-inside: avoid;
}

/* Üst şerit — PLAKA | EKSPERTİZ NO | PAKET */
.ex-strip {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-bottom: 2px solid var(--ex-navy);
  background: #f8fafc;
}

.ex-strip-cell {
  padding: 10px 14px;
  text-align: center;
  border-right: 1px solid var(--ex-border);
}

.ex-strip-cell:last-child { border-right: none; }

.ex-strip-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ex-muted);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.ex-strip-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ex-navy);
  word-break: break-word;
}

/* Araç meta kutusu */
.ex-meta-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-bottom: 1px solid var(--ex-border-light);
  font-size: 0.85rem;
}

.ex-meta-row {
  display: flex;
  gap: 8px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--ex-border-light);
  border-right: 1px solid var(--ex-border-light);
}

.ex-meta-row:nth-child(2n) { border-right: none; }
.ex-meta-row.full { grid-column: 1 / -1; border-right: none; }

.ex-meta-label {
  flex: 0 0 38%;
  color: var(--ex-muted);
  font-weight: 600;
}

.ex-meta-value {
  flex: 1;
  font-weight: 700;
  color: var(--ex-text);
}

.ex-meta-value.mono {
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
}

/* Kapak — bilgilendirme sayfası */
.ex-cover-title {
  text-align: center;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 18px 16px 14px;
  border-bottom: 2px solid var(--ex-navy);
  color: var(--ex-navy);
}

.ex-dense-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.ex-dense-table th,
.ex-dense-table td {
  border: 1px solid var(--ex-border);
  padding: 7px 10px;
  text-align: left;
  vertical-align: top;
}

.ex-dense-table th {
  background: #f1f5f9;
  font-weight: 700;
  color: var(--ex-navy);
  width: 28%;
}

.ex-qr-block {
  display: flex;
  gap: 16px;
  padding: 16px;
  align-items: flex-start;
  border-top: 1px solid var(--ex-border-light);
}

.ex-qr-placeholder {
  width: 96px;
  height: 96px;
  border: 2px dashed var(--ex-border);
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  color: var(--ex-muted);
  text-align: center;
  flex-shrink: 0;
}

.ex-qr-link {
  display: block;
  flex-shrink: 0;
  line-height: 0;
  border-radius: 6px;
  overflow: hidden;
}

.ex-qr-image {
  display: block;
  width: 140px;
  height: 140px;
  max-width: min(140px, 42vw);
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--ex-border);
  border-radius: 6px;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

.ex-qr-pending {
  min-width: 96px;
  min-height: 96px;
}

.ex-qr-block--compact {
  margin: 0;
  border-top: none;
  padding: 12px 0 0;
}

.ex-wo-qr-strip {
  padding: 0 16px 12px;
  border-top: 1px dashed var(--ex-border-light);
  margin-top: 8px;
}

.ex-wo-qr-strip .ex-qr-image {
  width: 120px;
  height: 120px;
  max-width: 120px;
}

.ex-qr-text {
  font-size: 0.78rem;
  color: var(--ex-muted);
  line-height: 1.55;
}

.ex-legal {
  padding: 12px 16px 16px;
  font-size: 0.72rem;
  color: var(--ex-muted);
  border-top: 1px solid var(--ex-border-light);
  line-height: 1.6;
}

/* Bölüm başlığı — mavi şerit */
.ex-section-bar {
  background: linear-gradient(90deg, var(--ex-navy), var(--ex-blue));
  color: #fff;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 10px 14px;
  text-align: center;
}

.ex-section-note {
  background: #fff3e0;
  color: #e65100;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  padding: 6px 12px;
  border-bottom: 1px solid #ffcc80;
}

/* Durum lejantı */
.ex-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--ex-border-light);
  background: #fafbfc;
}

.ex-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
}

.ex-legend-swatch {
  width: 14px;
  height: 14px;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 2px;
}

/* Araç şeması */
.ex-diagram-wrap {
  padding: 16px;
  overflow-x: auto;
}

.ex-diagram-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  max-width: 520px;
  margin: 0 auto 10px;
}

.ex-diagram-type {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ex-navy);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ex-diagram-view {
  font-size: 0.72rem;
  color: var(--ex-muted);
}

.ex-diagram {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  aspect-ratio: 4/5;
}

.ex-diagram-silhouette path,
.ex-diagram-silhouette rect,
.ex-diagram-silhouette ellipse {
  fill: none;
  stroke: #b0bec5;
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.ex-diagram-silhouette .ex-diagram-glass {
  fill: rgba(144, 202, 249, 0.15);
  stroke: #90caf9;
  stroke-width: 0.8;
}

.ex-diagram-silhouette .ex-diagram-hatch-rear,
.ex-diagram-silhouette .ex-diagram-bed,
.ex-diagram-silhouette .ex-diagram-cargo {
  fill: rgba(236, 239, 241, 0.55);
  stroke: #cfd8dc;
  stroke-dasharray: 4 2;
}

.ex-diagram-part-group {
  cursor: default;
}

.ex-diagram svg {
  width: 100%;
  height: 100%;
}

.ex-diagram-part {
  stroke: #78909c;
  stroke-width: 1.2;
  cursor: default;
  transition: opacity 0.15s;
}

.ex-diagram-part:hover { opacity: 0.85; }

.ex-diagram-label {
  font-size: 9px;
  font-weight: 700;
  fill: #1a2332;
  pointer-events: none;
}

/* Kontrol listesi tablosu */
.ex-checklist {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.ex-checklist th {
  background: #f1f5f9;
  border: 1px solid var(--ex-border);
  padding: 8px 12px;
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ex-muted);
}

.ex-checklist td {
  border: 1px solid var(--ex-border-light);
  padding: 8px 12px;
  vertical-align: middle;
}

.ex-checklist tr:nth-child(even) td { background: #fafbfc; }

.ex-checklist-num {
  color: var(--ex-muted);
  font-weight: 600;
  width: 28px;
}

.ex-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 0.82rem;
  white-space: nowrap;
}

.ex-status.ok { color: var(--ex-green); }
.ex-status.warn { color: var(--ex-red); }
.ex-status.neutral { color: var(--ex-text); }

.ex-status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid rgba(0,0,0,0.08);
}

/* Değerlendirme özeti — kırmızı/yeşil bar */
.ex-summary-bar {
  display: flex;
  border-top: 2px solid var(--ex-navy);
}

.ex-summary-bar-label {
  flex: 1;
  padding: 10px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  background: #f1f5f9;
  color: var(--ex-navy);
  display: flex;
  align-items: center;
}

.ex-summary-counts {
  display: flex;
  min-width: 120px;
}

.ex-summary-red,
.ex-summary-green {
  flex: 1;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  padding: 10px;
}

.ex-summary-red { background: var(--ex-red); }
.ex-summary-green { background: var(--ex-green); }

/* Fotoğraf kanıt grid */
.ex-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 14px;
}

.ex-photo-card {
  border: 1px solid var(--ex-border);
  border-radius: var(--ex-radius);
  overflow: hidden;
  background: #fff;
}

.ex-photo-card-head {
  background: #1a2332;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 6px 8px;
  text-align: center;
  line-height: 1.25;
}

.ex-photo-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.ex-photo-card a { display: block; line-height: 0; }

/* Uyarılar */
.ex-warnings {
  margin: 0 14px 14px;
  padding: 12px 14px;
  background: #fff8e1;
  border: 1px solid #ffc107;
  border-radius: var(--ex-radius);
  font-size: 0.82rem;
}

.ex-warnings h3 {
  font-size: 0.78rem;
  color: #e65100;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ex-warnings ul { margin-left: 18px; }

/* Çakışma kartları */
.ex-conflicts { background: #fff5f5; border-color: #f5c2c0; }
.ex-conflict-cards { display: grid; gap: 12px; margin-top: 10px; }
.ex-conflict-card {
  background: #fff;
  border: 1px solid #f0d4d4;
  border-radius: 12px;
  padding: 12px 14px;
}
.ex-conflict-card--critical { border-left: 4px solid #c62828; }
.ex-conflict-card--high { border-left: 4px solid #ef6c00; }
.ex-conflict-card--medium { border-left: 4px solid #0288d1; }
.ex-conflict-card-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0d47a1;
  margin-bottom: 8px;
}
.ex-conflict-part {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ex-text);
  margin-bottom: 10px;
}
.ex-conflict-row-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ex-muted);
  margin: 8px 0 4px;
}
.ex-conflict-inspection-date {
  font-weight: 700;
  font-size: 0.88rem;
}
.ex-conflict-inspection-org { font-size: 0.84rem; color: var(--ex-text); }
.ex-conflict-inspection-km { font-size: 0.84rem; font-weight: 600; margin-top: 2px; }
.ex-conflict-compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: start;
}
.ex-conflict-arrow {
  text-align: center;
  font-size: 1.1rem;
  color: var(--ex-muted);
  padding-top: 28px;
}
.ex-conflict-value {
  margin-top: 6px;
  font-weight: 700;
  font-size: 0.86rem;
}
.ex-conflict-severity {
  margin-top: 10px;
  font-size: 0.82rem;
}
.ex-conflict-severity-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fdecea;
  color: #b42318;
  font-weight: 700;
  font-size: 0.72rem;
}
.ex-conflict-card--legacy p {
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--ex-muted);
}

@media (max-width: 560px) {
  .ex-conflict-compare { grid-template-columns: 1fr; }
  .ex-conflict-arrow { padding-top: 0; }
}

/* Alt bilgi */
.ex-footer {
  text-align: center;
  font-size: 0.72rem;
  color: var(--ex-muted);
  padding: 16px;
  border-top: 1px solid var(--ex-border-light);
}

.ex-brand-watermark {
  text-align: center;
  padding: 8px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: rgba(0, 27, 79, 0.12);
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .ex-strip { grid-template-columns: 1fr; }
  .ex-strip-cell { border-right: none; border-bottom: 1px solid var(--ex-border); }
  .ex-strip-cell:last-child { border-bottom: none; }
  .ex-meta-box { grid-template-columns: 1fr; }
  .ex-meta-row { border-right: none; }
  .ex-photo-grid { grid-template-columns: repeat(2, 1fr); }
  .ex-summary-bar { flex-direction: column; }
  .ex-qr-block { flex-direction: column; align-items: center; text-align: center; }
  .ex-qr-image { max-width: 160px; width: 42vw; height: auto; aspect-ratio: 1; }
}

@media print {
  .ex-report-page { padding: 0; max-width: none; }
  .ex-sheet { box-shadow: none; page-break-after: always; }
  .ex-wo-side-accent { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .ex-qr-image {
    width: 128px;
    height: 128px;
    max-width: 128px;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .ex-qr-link { pointer-events: none; }
  .ex-wo-qr-strip .ex-qr-image {
    width: 110px;
    height: 110px;
    max-width: 110px;
  }
}

/* —— Durum renkleri (inline style yerine) —— */
.ex-legend-swatch-original { background: var(--st-original); }
.ex-legend-swatch-painted { background: var(--st-painted); }
.ex-legend-swatch-local_painted { background: var(--st-local); }
.ex-legend-swatch-changed,
.ex-legend-swatch-replaced { background: var(--st-changed); }
.ex-legend-swatch-processed { background: var(--st-processed); }
.ex-legend-swatch-removed_reinstalled { background: var(--st-removed); }
.ex-legend-swatch-damaged { background: var(--st-damaged); }
.ex-legend-swatch-unable_to_inspect { background: var(--st-unknown); }

.ex-diagram-fill-original { fill: var(--st-original); }
.ex-diagram-fill-painted { fill: var(--st-painted); }
.ex-diagram-fill-local_painted { fill: var(--st-local); }
.ex-diagram-fill-changed,
.ex-diagram-fill-replaced { fill: var(--st-changed); }
.ex-diagram-fill-processed { fill: var(--st-processed); }
.ex-diagram-fill-removed_reinstalled { fill: var(--st-removed); }
.ex-diagram-fill-damaged { fill: var(--st-damaged); }
.ex-diagram-fill-unable_to_inspect { fill: var(--st-unknown); }
.ex-diagram-fill-empty { fill: #f5f5f5; }

.ex-critical-tag {
  color: #c62828;
  font-size: 0.72rem;
}

.ex-public-url {
  word-break: break-all;
  font-size: 0.7rem;
  margin-top: 8px;
}

.ex-public-url a {
  color: var(--ex-blue);
  word-break: break-all;
}

.mono {
  font-family: ui-monospace, monospace;
  letter-spacing: 0.03em;
}

.ex-photos-empty {
  padding: 16px;
  color: var(--ex-muted);
}

/* —— Antetli önizleme (firma portal) —— */
.ex-preview-letterhead {
  margin-bottom: 12px;
  border: 1px solid var(--ex-border);
}

.ex-preview-letterhead-bar {
  padding: 18px 16px;
  background: linear-gradient(90deg, var(--ex-navy), var(--ex-blue));
  color: #fff;
}

.ex-preview-letterhead-title {
  font-size: 1.1rem;
  font-weight: 800;
}

.ex-preview-letterhead-sub {
  font-size: 0.82rem;
  opacity: 0.9;
}

/* —— İş emri sayfası (bexpertise360 referans) —— */
.ex-sheet--work-order {
  border: none;
  box-shadow: var(--ex-shadow);
  padding: 0;
  overflow: hidden;
}

.ex-wo-frame {
  position: relative;
  background: var(--ex-paper);
  border-left: 14px solid var(--ex-red);
  border-right: 14px solid var(--ex-red);
}

.ex-wo-side-accent {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 14px;
  pointer-events: none;
  opacity: 0.15;
  background: repeating-linear-gradient(
    -45deg,
    var(--ex-red),
    var(--ex-red) 4px,
    transparent 4px,
    transparent 8px
  );
}

.ex-wo-side-accent--left { left: -14px; }
.ex-wo-side-accent--right { right: -14px; }

.ex-wo-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--ex-border-light);
}

.ex-wo-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ex-wo-brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--ex-navy), var(--ex-red));
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.ex-wo-brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.ex-wo-brand-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--ex-navy);
  letter-spacing: 0.02em;
}

.ex-wo-brand-branch {
  font-size: 0.75rem;
  color: var(--ex-muted);
  margin-top: 2px;
}

.ex-wo-contact {
  text-align: right;
  font-size: 0.72rem;
  color: var(--ex-muted);
  line-height: 1.55;
  max-width: 280px;
}

.ex-wo-summary-table {
  width: calc(100% - 36px);
  margin: 0 18px 12px;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.ex-wo-summary-table th,
.ex-wo-summary-table td {
  border: 1.5px solid #1a2332;
  padding: 7px 10px;
  text-align: left;
  vertical-align: middle;
}

.ex-wo-summary-table th {
  background: #f8fafc;
  font-weight: 700;
  width: 22%;
  color: var(--ex-navy);
}

.ex-wo-title-bar {
  background: #1a2332;
  color: #fff;
  text-align: center;
  font-weight: 800;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  padding: 10px 14px;
  margin: 0 18px;
}

.ex-wo-intro {
  padding: 14px 18px;
  font-size: 0.78rem;
  line-height: 1.65;
  text-align: justify;
  color: var(--ex-text);
}

.ex-wo-intro strong {
  font-weight: 800;
}

.ex-wo-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
  padding: 0 18px 16px;
  align-items: stretch;
}

.ex-wo-photo {
  border: 1.5px solid #1a2332;
  min-height: 200px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ex-wo-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ex-wo-photo-placeholder {
  text-align: center;
  color: var(--ex-muted);
  font-size: 0.8rem;
  padding: 24px;
}

.ex-wo-package-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  border: 1.5px solid #1a2332;
}

.ex-wo-package-table th {
  background: #1a2332;
  color: #fff;
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 8px 10px;
  font-size: 0.78rem;
}

.ex-wo-package-table .ex-wo-package-name {
  color: var(--ex-red);
  font-weight: 800;
  text-align: center;
  padding: 8px;
  border-bottom: 1px solid var(--ex-border);
}

.ex-wo-package-table td {
  border-bottom: 1px solid var(--ex-border-light);
  padding: 7px 10px;
}

.ex-wo-package-table td:first-child {
  font-weight: 700;
  width: 42%;
  color: var(--ex-navy);
}

.ex-wo-contract {
  padding: 12px 18px 18px;
  font-size: 0.74rem;
  line-height: 1.65;
  color: var(--ex-muted);
  text-align: justify;
}

.ex-wo-parties-table {
  width: calc(100% - 36px);
  margin: 0 18px 12px;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.ex-wo-parties-table th,
.ex-wo-parties-table td {
  border: 1px solid var(--ex-border);
  padding: 6px 8px;
  text-align: left;
  vertical-align: middle;
}

.ex-wo-parties-table thead th {
  background: #f1f5f9;
  font-weight: 700;
  color: var(--ex-navy);
  font-size: 0.72rem;
}

.ex-wo-parties-table tbody th {
  background: #f8fafc;
  width: 14%;
  font-weight: 700;
  color: var(--ex-navy);
}

.ex-wo-payment-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin: 0 18px 14px;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid var(--ex-border-light);
  border-radius: var(--ex-radius);
  font-size: 0.78rem;
}

.ex-wo-payment-bar strong {
  color: var(--ex-navy);
}

@media (max-width: 640px) {
  .ex-wo-split { grid-template-columns: 1fr; }
  .ex-wo-header { flex-direction: column; }
  .ex-wo-contact { text-align: left; max-width: none; }
}

.ex-queries-table {
  width: calc(100% - 36px);
  margin: 0 18px 16px;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.ex-queries-table th,
.ex-queries-table td {
  border: 1px solid var(--ex-border);
  padding: 7px 10px;
  text-align: left;
  vertical-align: top;
}

.ex-queries-table thead th {
  background: #f1f5f9;
  font-weight: 700;
  color: var(--ex-navy);
  font-size: 0.72rem;
}

.ex-query-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
}

.ex-query-status--not_queried { background: #eceff1; color: #546e7a; }
.ex-query-status--clear { background: #e8f5e9; color: #2e7d32; }
.ex-query-status--found { background: #ffebee; color: #c62828; }
.ex-query-status--unable { background: #fff3e0; color: #ef6c00; }

/* —— Kapak sayfası (rapor_kapak referans) —— */
.ex-sheet--kapak {
  border: 1.5px solid #1a2332;
  box-shadow: var(--ex-shadow);
  padding: 0;
  overflow: hidden;
}

.ex-kapak-frame {
  position: relative;
  padding: 14px 28px 18px 14px;
  background: var(--ex-paper);
}

.ex-kapak-corner {
  position: absolute;
  width: 72px;
  height: 72px;
  pointer-events: none;
  opacity: 0.85;
  background: repeating-linear-gradient(
    -45deg,
    var(--ex-red),
    var(--ex-red) 3px,
    transparent 3px,
    transparent 6px
  );
}

.ex-kapak-corner--tl { top: 0; left: 0; clip-path: polygon(0 0, 100% 0, 0 100%); }
.ex-kapak-corner--br { bottom: 0; right: 28px; clip-path: polygon(100% 0, 100% 100%, 0 100%); }

.ex-kapak-sidebar {
  position: absolute;
  top: 80px;
  right: 0;
  bottom: 80px;
  width: 22px;
  background: #37474f;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 48px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  padding: 12px 0;
}

.ex-kapak-header {
  display: grid;
  grid-template-columns: 72px 1fr 120px;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding-top: 8px;
}

.ex-kapak-badge {
  width: 56px;
  height: 56px;
  background: var(--ex-red);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.15;
  display: grid;
  place-items: center;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

.ex-kapak-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.ex-kapak-brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--ex-navy), var(--ex-red));
  display: grid;
  place-items: center;
}

.ex-kapak-logo-img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.ex-kapak-logo-fallback { color: #fff; font-weight: 800; font-size: 1rem; }

.ex-kapak-brand-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ex-navy);
  letter-spacing: 0.04em;
}

.ex-kapak-brand-sub {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--ex-red);
  letter-spacing: 0.12em;
  margin-top: 2px;
}

.ex-kapak-qr { text-align: center; }
.ex-kapak-qr .ex-qr-image,
.ex-kapak-qr .ex-qr-placeholder { width: 96px; height: 96px; margin: 0 auto; }
.ex-kapak-qr-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-top: 4px;
  color: var(--ex-navy);
}

.ex-kapak-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.74rem;
  margin-bottom: 10px;
}

.ex-kapak-table th,
.ex-kapak-table td {
  border: 1.5px solid #1a2332;
  padding: 6px 8px;
  text-align: left;
  vertical-align: middle;
}

.ex-kapak-table th {
  background: #f8fafc;
  font-weight: 700;
  color: var(--ex-navy);
  font-size: 0.68rem;
}

.ex-kapak-table--3 th,
.ex-kapak-table--3 td { width: 33.33%; }

.ex-kapak-table--5 th,
.ex-kapak-table--5 td { width: 20%; }

.ex-kapak-split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 12px;
  margin: 12px 0;
  align-items: stretch;
}

.ex-kapak-diagram-panel {
  border: 1.5px solid #1a2332;
  border-radius: 12px;
  padding: 8px;
  background: #fafbfc;
  min-height: 220px;
}

.ex-kapak-package-panel {
  border: 1.5px solid #1a2332;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ex-kapak-package-head {
  background: #1a2332;
  color: #fff;
  text-align: center;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  padding: 8px 10px;
}

.ex-kapak-package-name {
  color: var(--ex-red);
  font-weight: 800;
  font-size: 0.82rem;
  text-align: center;
  padding: 10px 8px 6px;
}

.ex-kapak-package-list {
  list-style: none;
  margin: 0;
  padding: 0 10px 12px;
  font-size: 0.68rem;
  line-height: 1.5;
}

.ex-kapak-package-list li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 3px 0;
  border-bottom: 1px dotted var(--ex-border-light);
}

.ex-kapak-package-list li:last-child { border-bottom: none; }

.ex-kapak-check {
  color: var(--ex-green);
  font-weight: 800;
  flex-shrink: 0;
}

.ex-kapak-title-bar {
  background: #37474f;
  color: #fff;
  text-align: center;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  padding: 8px 12px;
  margin-top: 4px;
}

.ex-kapak-contract {
  font-size: 0.62rem;
  line-height: 1.55;
  text-align: justify;
  padding: 10px 4px;
  color: var(--ex-text);
}

.ex-kapak-contract p { margin: 0 0 6px; }

.ex-kapak-signatures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--ex-border);
}

.ex-kapak-sign-title {
  font-weight: 800;
  font-size: 0.78rem;
  color: var(--ex-navy);
  margin-bottom: 8px;
  letter-spacing: 0.06em;
}

.ex-kapak-sign-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 8px;
  font-size: 0.68rem;
  margin-bottom: 6px;
  align-items: end;
}

.ex-kapak-sign-row span:first-child {
  color: var(--ex-muted);
  font-weight: 600;
}

.ex-kapak-sign-row span:last-child {
  border-bottom: 1px solid #1a2332;
  min-height: 18px;
  padding-bottom: 2px;
}

.ex-kapak-sign-line span:last-child { min-height: 28px; }

.ex-kapak-legal {
  text-align: right;
  color: var(--ex-red);
  font-weight: 700;
  font-size: 0.68rem;
  margin-top: 10px;
  padding-right: 4px;
}

/* —— Araç diyagramı: 3 görünüm teknik çizim + SVG panel —— */
.vd-wrap { width: 100%; }
.vd-wrap--report { margin-bottom: 12px; }
.vd-wrap--kapak .vd-svg-shell { max-width: 300px; margin: 0 auto; }

/* Üç görünüm sedan gömülü şema (baskı / antetli / kapak) */
.vd-wrap--sedan-embed {
  max-width: 520px;
  margin: 0 auto 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}
.vd-wrap--sedan-embed.vd-wrap--kapak { max-width: 340px; }
.vd-wrap--sedan-embed svg {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
}
.vd-wrap--sedan-embed .part-hit:not([data-status]) {
  fill: transparent;
  stroke: transparent;
  stroke-width: 2.5;
  pointer-events: none;
}
.vd-wrap--sedan-embed .part-hit[data-status] {
  pointer-events: none;
  stroke-width: 3;
}
.vd-wrap--sedan-embed .status-label {
  pointer-events: none;
  text-anchor: middle;
  dominant-baseline: middle;
  font-size: 11px;
  font-weight: 700;
  fill: #17212b;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 4px;
  stroke-linejoin: round;
}
.vd-legend--sedan-embed {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0 auto 10px;
  max-width: 520px;
  justify-content: center;
  font-size: 0.7rem;
  color: #334155;
}
.vd-legend--sedan-embed .vd-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.vd-legend--sedan-embed .vd-legend-item i {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  display: inline-block;
}

.vd-view-labels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  max-width: 480px;
  margin: 0 auto 4px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  text-align: center;
}

.vd-view-labels span { display: none; }

.vd-svg-shell {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  padding: 6px;
}

.vd-wrap--editor .vd-svg-shell {
  max-width: 520px;
  background: #fff;
}

.vd-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  background: #fff;
}

.vd-photo {
  pointer-events: none;
}

.vd-panel {
  cursor: default;
  outline: none;
}

.vd-wrap--editor .vd-panel { cursor: pointer; }

.vd-panel-shape {
  fill: transparent;
  stroke: transparent;
  stroke-width: 0.35;
  transition: fill 0.15s ease, stroke 0.15s ease, opacity 0.15s ease;
}

.vd-panel-label {
  font-family: Arial, "Segoe UI", sans-serif;
  font-size: 2.4px;
  font-weight: 800;
  fill: #111;
  pointer-events: none;
  user-select: none;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 0.4px;
}

/* Hover: yazı alanını hafif vurgula (kutu taşması yok) */
.vd-wrap--editor .vd-panel:hover .vd-panel-shape,
.vd-wrap--editor .vd-panel--active .vd-panel-shape,
.vd-wrap--editor .vd-panel:focus-visible .vd-panel-shape {
  fill: rgba(37, 99, 235, 0.18);
  stroke: rgba(37, 99, 235, 0.7);
  stroke-width: 0.35;
}

/* Durum: küçük yazı alanına hafif renk — büyük panel boyaması yok */
.vd-panel.vd-status-original .vd-panel-shape { fill: transparent; }
.vd-panel.vd-status-painted .vd-panel-shape { fill: rgba(255, 193, 7, 0.35); }
.vd-panel.vd-status-local .vd-panel-shape { fill: rgba(255, 245, 157, 0.4); }
.vd-panel.vd-status-changed .vd-panel-shape { fill: rgba(239, 83, 80, 0.35); }
.vd-panel.vd-status-processed .vd-panel-shape { fill: rgba(206, 147, 216, 0.35); }
.vd-panel.vd-status-removed .vd-panel-shape { fill: rgba(176, 190, 197, 0.4); }
.vd-panel.vd-status-damaged .vd-panel-shape { fill: rgba(21, 101, 192, 0.35); }
.vd-panel.vd-status-unknown .vd-panel-shape { fill: rgba(236, 239, 241, 0.45); }
.vd-panel.vd-status-empty .vd-panel-shape { fill: transparent; }

.vd-panel.vd-status-changed .vd-panel-label,
.vd-panel.vd-status-damaged .vd-panel-label { fill: #fff; stroke: #7f1d1d; }

.vd-caption {
  font-size: 0.7rem;
  color: var(--ex-muted, #64748b);
  text-align: center;
  margin-top: 8px;
}

.vd-wrap--editor .vd-caption { color: #64748b; }

.vd-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 10px;
  font-size: 0.7rem;
  justify-content: center;
  color: #334155;
}

.vd-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.vd-legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  display: inline-block;
}

.vd-legend-swatch.vd-status-original { background: #fff; }
.vd-legend-swatch.vd-status-painted { background: #ffc107; }
.vd-legend-swatch.vd-status-local { background: #fff59d; }
.vd-legend-swatch.vd-status-changed { background: #ef5350; }
.vd-legend-swatch.vd-status-processed { background: #ce93d8; }

.vd-popover {
  position: fixed;
  z-index: 10050;
  background: #fff;
  border: 1px solid var(--ex-border, #d0d7de);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  padding: 8px;
  min-width: 160px;
  max-height: min(70vh, 360px);
  overflow-y: auto;
}

.vd-popover-title {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ex-navy);
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--ex-border-light);
}

.vd-popover-opt {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 6px 8px;
  font-size: 0.75rem;
  border-radius: 4px;
  cursor: pointer;
}

.vd-popover-opt:hover { background: #f1f5f9; }

@media (max-width: 640px) {
  .ex-kapak-header { grid-template-columns: 1fr; text-align: center; }
  .ex-kapak-brand { flex-direction: column; }
  .ex-kapak-split { grid-template-columns: 1fr; }
  .ex-kapak-signatures { grid-template-columns: 1fr; }
  .ex-kapak-sidebar { display: none; }
  .ex-kapak-frame { padding-right: 14px; }
}
