/* Admin panel */
:root {
  --sidebar: #0b171d;
  --sidebar-text: #b7c4cc;
  --sidebar-active: #149494;
}

body.admin {
  background: #eef3f6;
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}
body.laudo-standalone {
  display: block;
  background:
    radial-gradient(circle at 90% 0%, rgba(11,110,110,0.12), transparent 40%),
    #eef3f6;
}
body.laudo-standalone .standalone-main {
  max-width: 1080px;
  margin: 0 auto;
  min-height: 100vh;
}
body.laudo-standalone .admin-top {
  position: sticky;
  top: 0;
  border-bottom: 1px solid var(--line);
}
body.laudo-standalone .standalone-brand {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}
body.laudo-standalone .standalone-brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.sidebar {
  background: var(--sidebar);
  color: var(--sidebar-text);
  padding: 1.25rem 0.9rem;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: hidden;
}
.sidebar .brand {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  color: #fff;
  padding: 0.4rem 0.55rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar .sidebar-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  background: #fff;
  border-radius: 10px;
  flex: 0 0 42px;
}
.sidebar .brand small {
  display: block;
  color: var(--sidebar-text);
  font-weight: 500;
  font-size: 0.75rem;
}
.side-nav {
  display: grid;
  gap: 0.25rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  align-content: start;
}
.side-nav a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  color: var(--sidebar-text);
  font-weight: 600;
  font-size: 0.92rem;
}
.side-nav a:hover { background: rgba(255,255,255,0.05); color: #fff; }
.side-nav a.active {
  background: rgba(20,148,148,0.18);
  color: #7fe0e0;
}
.side-footer {
  margin-top: auto;
  display: grid;
  gap: 0.4rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.orc-table input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.4rem 0.5rem;
  background: #fff;
}
.orc-table tfoot td {
  padding: 0.85rem 0.75rem;
  background: #f6fafb;
}
.admin-credit {
  padding: 0.85rem 1.5rem 1.1rem;
  display: flex;
  justify-content: flex-end;
}
.admin-credit .powered-by { color: #5b6b76; }
.side-footer .powered-by {
  margin-top: 0.35rem;
  padding: 0.35rem 0.8rem;
  color: #8aa;
}
.side-footer a, .side-footer button {
  color: var(--sidebar-text);
  background: transparent;
  border: 0;
  text-align: left;
  padding: 0.55rem 0.8rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}
.side-footer a:hover, .side-footer button:hover { color: #fff; background: rgba(255,255,255,0.05); }

.admin-main { min-width: 0; }
.admin-top {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 20;
}
.admin-top h1 { font-size: 1.25rem; letter-spacing: -0.02em; }
.admin-top p { color: var(--muted); font-size: 0.9rem; }
.admin-content { padding: 1.25rem 1.5rem 2rem; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1rem;
}
.kpi {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  box-shadow: 0 4px 14px rgba(15,28,36,0.04);
}
.kpi .label { color: var(--muted); font-size: 0.82rem; font-weight: 700; margin-bottom: 0.35rem; }
.kpi .value { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.02em; }
.kpi .hint { color: var(--muted); font-size: 0.8rem; margin-top: 0.25rem; }
.kpi.good .value { color: var(--ok); }
.kpi.warn .value { color: var(--warn); }
.kpi.brand .value { color: var(--brand-dark); }

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 1rem;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.panel-head h2 { font-size: 1rem; }
.panel-body { padding: 1rem 1.1rem; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
table.data th, table.data td {
  text-align: left;
  padding: 0.75rem 0.6rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.data th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 800;
}
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: #f8fbfc; }

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 800;
}
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: #e8f1fb; color: var(--info); }
.badge-muted { background: #eef2f5; color: var(--muted); }

.actions { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.toolbar {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  align-items: center;
}
.toolbar input, .toolbar select {
  min-width: 180px;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 24, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 100;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: #fff;
  border-radius: 18px;
  width: min(640px, 100%);
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}
.modal.modal-xl {
  width: min(920px, 100%);
}

/* ——— Product form (clean layout) ——— */
.pf {
  display: grid;
  grid-template-columns: 1.35fr 0.95fr;
  gap: 0;
  min-height: 420px;
}
.pf-main, .pf-side {
  padding: 1.15rem 1.25rem 1.35rem;
}
.pf-main {
  background: #fff;
  border-right: 1px solid var(--line);
}
.pf-side {
  background: #f6f8fa;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.pf-block {
  margin-bottom: 1.25rem;
}
.pf-block:last-child { margin-bottom: 0; }
.pf-block > .pf-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8a9aa6;
  margin-bottom: 0.55rem;
}
.pf-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 0.75rem;
}
.pf-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pf-row.full { grid-template-columns: 1fr; }
.pf label {
  display: grid;
  gap: 0.28rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #4a5c68;
}
.pf label.span-2 { grid-column: 1 / -1; }
.pf input, .pf select, .pf textarea {
  width: 100%;
  border: 1px solid #dde5eb;
  border-radius: 10px;
  padding: 0.58rem 0.75rem;
  background: #fff;
  font-weight: 500;
  color: var(--ink);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.pf input:focus, .pf select:focus, .pf textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(11, 110, 110, 0.12);
}
.pf textarea { resize: vertical; min-height: 88px; line-height: 1.45; }
.pf-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}
.pf-inline .ai-status {
  font-size: 0.78rem;
  color: var(--muted);
  flex: 1;
  min-width: 120px;
}
.btn-ai {
  background: linear-gradient(135deg, #0b6e6e, #149494);
  color: #fff;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
}
.btn-ai:hover { filter: brightness(1.06); }
.btn-ai:disabled { opacity: 0.65; cursor: wait; }

/* Photos */
.pf-card {
  background: #fff;
  border: 1px solid #e2e9ee;
  border-radius: 14px;
  padding: 0.9rem;
}
.pf-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.pf-card-head strong {
  font-size: 0.88rem;
  font-weight: 750;
  color: var(--ink);
}
.pf-card-head span {
  font-size: 0.75rem;
  color: var(--muted);
}
.photo-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 0.65rem;
}
.photo-toolbar select {
  border: 1px solid #dde5eb;
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
  font-size: 0.82rem;
  background: #fff;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 0.5rem;
}
.photo-card {
  border: 1px solid #e2e9ee;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  position: relative;
}
.photo-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  display: block;
  background:
    linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
    linear-gradient(-45deg, #f0f0f0 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
    linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
  background-size: 12px 12px;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
  background-color: #fff;
}
.photo-card .meta {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  justify-content: space-between;
  gap: 0.2rem;
  padding: 0.3rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.45));
}
.photo-card .meta .btn {
  padding: 0.2rem 0.4rem;
  font-size: 0.68rem;
  min-width: 0;
  background: #fff;
  border: 0;
}
.photo-empty {
  border: 1.5px dashed #d5dee5;
  border-radius: 10px;
  padding: 1.1rem 0.75rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
  background: #fafbfc;
}

/* Costs */
.cost-rows { display: grid; gap: 0.4rem; }
.cost-row {
  display: grid;
  grid-template-columns: 1.1fr 0.75fr 1fr auto;
  gap: 0.35rem;
  align-items: center;
}
.cost-row select,
.cost-row input {
  border: 1px solid #dde5eb;
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  font-size: 0.85rem;
  background: #fff;
  width: 100%;
}
.cost-total {
  margin-top: 0.55rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.55rem;
  border-top: 1px solid #e8eef2;
  font-size: 0.88rem;
  color: var(--muted);
}
.cost-total strong {
  color: var(--ink);
  font-size: 0.98rem;
}

/* Profit */
.profit-box {
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  background: #eaf7f1;
  border: 1px solid #d3ecdf;
}
.profit-box .caption {
  font-size: 0.75rem;
  font-weight: 700;
  color: #5f7a6c;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}
.profit-box .big {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ok);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.profit-box .sub {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: #5b6b76;
  display: grid;
  gap: 0.15rem;
}
.profit-box.warn-box {
  background: #fff8eb;
  border-color: #f0dfb4;
}
.profit-box.warn-box .big { color: var(--warn); }
.profit-box.warn-box .caption { color: #9a7b3a; }

/* SEO accordion */
.pf-seo {
  margin: 0;
  border-top: 1px solid var(--line);
  background: #fff;
}
.pf-seo summary {
  list-style: none;
  cursor: pointer;
  padding: 0.85rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
.pf-seo summary::-webkit-details-marker { display: none; }
.pf-seo summary::after {
  content: '▾';
  font-size: 0.75rem;
  opacity: 0.7;
}
.pf-seo[open] summary {
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.pf-seo[open] summary::after { content: '▴'; }
.pf-seo .seo-body {
  padding: 0.9rem 1.25rem 1.15rem;
  display: grid;
  gap: 0.65rem;
  background: #fafbfc;
}
.seo-readonly {
  background: #f3f6f8 !important;
}
.specs-suggest {
  margin-top: 0.5rem;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  background: #f0f7ff;
  border: 1px solid #d6e8fb;
  font-size: 0.85rem;
  display: none;
}
.specs-suggest.open { display: block; }
.specs-suggest strong {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.8rem;
  color: var(--info);
}
.ai-status {
  font-size: 0.78rem;
  color: var(--muted);
}

@media (max-width: 820px) {
  .pf { grid-template-columns: 1fr; }
  .pf-main { border-right: 0; border-bottom: 1px solid var(--line); }
  .pf-row.three { grid-template-columns: 1fr 1fr; }
  .cost-row { grid-template-columns: 1fr 1fr auto; }
  .cost-row input[data-cost-notes],
  .cost-row input[placeholder="Obs."] { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .pf-row, .pf-row.three { grid-template-columns: 1fr; }
  .cost-row { grid-template-columns: 1fr auto; }
}
.modal header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.95rem 1.2rem;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}
.modal header h3 { font-size: 1.05rem; letter-spacing: -0.01em; }
.modal .body {
  padding: 1.15rem;
  max-height: calc(90vh - 130px);
  overflow: auto;
}
.modal .body:has(.pf-wrap) {
  padding: 0;
  background: #f6f8fa;
}
.modal .footer {
  padding: 0.85rem 1.15rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  border-top: 1px solid var(--line);
  background: #fff;
  position: sticky;
  bottom: 0;
}
.split-2 {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
}
.bar-list { display: grid; gap: 0.75rem; }
.bar-item .row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.88rem;
  margin-bottom: 0.3rem;
}
.bar-item .track {
  height: 8px;
  background: #e8eef2;
  border-radius: 999px;
  overflow: hidden;
}
.bar-item .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), #1aa3a3);
  border-radius: 999px;
}
.muted { color: var(--muted); }
.right { text-align: right; }
.mono { font-variant-numeric: tabular-nums; }

@media (max-width: 1000px) {
  body.admin { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .kpi-grid, .split-2 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .kpi-grid, .split-2 { grid-template-columns: 1fr; }
  .admin-content { padding: 1rem; }
  table.data { display: block; overflow-x: auto; }
}

/* ——— Laudo de desativação ——— */
.mode-switch {
  display: inline-flex;
  background: #e8eef2;
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
}
.mode-switch button {
  border: 0;
  background: transparent;
  padding: 0.5rem 1.05rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--muted);
  cursor: pointer;
}
.mode-switch button.active {
  background: #fff;
  color: var(--brand-dark);
  box-shadow: 0 1px 4px rgba(15, 28, 36, 0.12);
}
.laudo-form { display: grid; gap: 1rem; scroll-margin-top: 96px; }
.eq-list { display: grid; gap: 0.85rem; }
.eq-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem 1rem 1rem;
  background: #fbfcfd;
}
.eq-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.eq-photos { margin-top: 0.85rem; }
.bulk-list {
  display: grid;
  gap: 0.4rem;
  max-height: 50vh;
  overflow: auto;
}
.bulk-row {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.65rem 0.8rem;
  background: #fff;
  cursor: pointer;
  font-weight: 650;
}
.bulk-row small {
  display: block;
  font-weight: 500;
  color: var(--muted);
  font-size: 0.78rem;
}
.bulk-row.in { background: #f3f6f8; opacity: 0.75; }
.bulk-row:has(input:checked:not(:disabled)) {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.laudo-sys {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.75rem;
  align-items: end;
}
.crit-list { display: grid; gap: 0.65rem; }
.crit-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  background: #fff;
}
.crit-card.on {
  border-color: #b7d8d8;
  background: #f3fbfb;
}
.crit-card label.crit-head {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-weight: 700;
  cursor: pointer;
}
.crit-card .crit-rule {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
  margin: 0.2rem 0 0.45rem 1.55rem;
}
.crit-card textarea { width: 100%; min-height: 64px; }
.dest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}
.dest-grid label {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  font-weight: 650;
  font-size: 0.86rem;
  cursor: pointer;
  background: #fff;
}
.dest-grid label:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.sign-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}
.sign-box {
  border: 1px dashed #d5dee5;
  border-radius: 12px;
  padding: 0.7rem;
  background: #fafbfc;
  min-height: 88px;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  position: relative;
}
.sign-box img {
  max-height: 72px;
  max-width: 100%;
  object-fit: contain;
}
.sign-box .sign-remove {
  position: absolute;
  top: 6px;
  right: 6px;
}
.laudo-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.55rem;
}
.laudo-photo-grid .photo-card img { object-fit: cover; }

/* Official A4 sheet (print + PDF capture) */
.laudo-print-root {
  position: fixed;
  left: -14000px;
  top: 0;
  z-index: 0;
  pointer-events: none;
  width: 210mm;
  background: #fff;
}
.laudo-print-root.capturing {
  left: 0;
  top: 0;
  z-index: 150;
}
body.capturing-laudo .sidebar,
body.capturing-laudo .admin-top,
body.capturing-laudo .admin-content,
body.capturing-laudo .modal-backdrop {
  visibility: hidden !important;
}
.laudo-page {
  width: 210mm;
  min-height: 297mm;
  height: auto;
  background: #fff;
  color: #111;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10pt;
  line-height: 1.3;
  box-sizing: border-box;
  padding: 8mm 11mm 10mm;
  overflow: visible;
  display: flex;
  flex-direction: column;
}
.laudo-page.fixed {
  height: 297mm;
  min-height: 297mm;
  overflow: hidden;
}
.ld-header {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin-bottom: 6px;
}
.ld-header td {
  border: 1px solid #111;
  vertical-align: middle;
  padding: 6px 8px;
}
.ld-header .ld-logo {
  width: 24mm;
  text-align: center;
  padding: 3px;
}
.ld-header .ld-logo img {
  width: 20mm;
  height: 20mm;
  object-fit: contain;
  margin: 0 auto;
}
.ld-header .ld-title { text-align: center; }
.ld-h1 {
  font-size: 13.5pt;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.15;
}
.ld-h2 {
  font-size: 8pt;
  font-weight: 700;
  margin-top: 3px;
  color: #222;
}
.ld-header .ld-date {
  width: 42mm;
  font-size: 8.5pt;
  text-align: center;
}
.ld-header .ld-date strong {
  display: block;
  margin-top: 4px;
  font-size: 10.5pt;
}
.ld-meta {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin-top: 6px;
}
.ld-meta td {
  border: 1px solid #111;
  padding: 5px 7px;
  vertical-align: top;
  font-size: 9pt;
}
.ld-k {
  font-weight: 800;
  font-size: 8pt;
  text-transform: none;
  display: block;
  margin-bottom: 2px;
}
.ld-sec {
  background: #111;
  color: #fff;
  font-weight: 800;
  font-size: 9.5pt;
  padding: 4px 8px;
  margin: 8px 0 0;
}
.ld-note {
  font-size: 8pt;
  color: #333;
  margin: 4px 0 5px;
}
.ld-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.ld-table td {
  border: 1px solid #111;
  padding: 4px 6px;
  vertical-align: top;
  font-size: 9pt;
}
.ld-table .lbl { font-weight: 700; white-space: nowrap; width: 28%; }
.ld-crit td { padding: 3px 6px; }
.ld-check {
  display: inline-block;
  width: 11px;
  height: 11px;
  border: 1.4px solid #111;
  margin-right: 6px;
  text-align: center;
  line-height: 10px;
  font-size: 8pt;
  font-weight: 800;
  vertical-align: top;
  margin-top: 1px;
  flex: 0 0 11px;
  overflow: hidden;
}
.ld-just {
  margin-top: 2px;
  font-size: 8pt;
  min-height: 14px;
  border-bottom: 1px dotted #888;
}
.ld-just.empty {
  white-space: nowrap;
  overflow: hidden;
}
.ld-just.empty { color: #888; }
.ld-dest td { font-size: 8pt; line-height: 1.3; }
.ld-sign td { height: 22mm; }
.ld-sign .who { font-weight: 800; font-size: 8.5pt; margin-bottom: 6px; text-align: center; }
.ld-sign .line { margin-top: 10px; font-size: 8.5pt; }
.ld-sign img.sig {
  max-height: 18mm;
  max-width: 70mm;
  object-fit: contain;
  margin: 4px auto 0;
}
.ld-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 4mm;
  flex: 1;
  min-height: 0;
  margin-top: 4mm;
}
.ld-photo-slot {
  border: 1px solid #111;
  overflow: hidden;
  background: #f7f7f7;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ld-photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}
.ld-photo-slot .ph {
  color: #999;
  font-size: 9pt;
}
.ld-foot {
  margin-top: auto;
  font-size: 7pt;
  color: #333;
  border-top: 1px solid #111;
  padding-top: 4px;
  line-height: 1.35;
}
.ld-yaksi {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 4px;
  font-size: 6.5pt;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #777;
}
.ld-yaksi img { height: 10px; width: auto; }
.laudo-preview-modal .laudo-page {
  position: relative;
  left: auto;
  width: 210mm;
  max-width: 100%;
  height: auto;
  min-height: 297mm;
  margin: 0 auto 1.2rem;
  box-shadow: 0 10px 28px rgba(0,0,0,0.14);
  border: 1px solid #d8d8d8;
}
.modal.modal-doc { width: min(920px, 100%); }

@media (max-width: 820px) {
  .laudo-sys, .dest-grid, .sign-row { grid-template-columns: 1fr; }
}

@media print {
  body.printing-laudo { background: #fff !important; display: block; }
  body.printing-laudo .sidebar,
  body.printing-laudo .admin-top,
  body.printing-laudo .admin-content,
  body.printing-laudo .modal-backdrop { display: none !important; }
  body.printing-laudo .laudo-print-root {
    position: static;
    left: auto;
    width: auto;
  }
  body.printing-laudo .laudo-page {
    box-shadow: none;
    page-break-after: always;
    break-after: page;
  }
  @page { size: A4; margin: 0; }
}
