/**
 * Delivery report PDF template — optimized for per-page html2canvas capture.
 */
.dlv-pdf-root {
  --dlv-ink: #0f172a;
  --dlv-muted: #475569;
  --dlv-line: #e2e8f0;
  --dlv-gold: #c9a227;
  --dlv-gold2: #f0d78c;
  --dlv-navy: #0b1220;
  --dlv-green: #15803d;
  --dlv-green-bg: #ecfdf5;
  --dlv-warn-bg: #fffbeb;
  --dlv-warn: #b45309;
  font-family: 'Noto Sans SC', 'DM Sans', system-ui, sans-serif;
  font-size: 10.5pt;
  line-height: 1.65;
  color: var(--dlv-ink);
  background: #fff;
  width: 794px;
  max-width: 794px;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.dlv-pdf-root *,
.dlv-pdf-root *::before,
.dlv-pdf-root *::after {
  box-sizing: border-box;
}

/* Each .dlv-page = exactly one PDF page (794×1123 px @96dpi ≈ A4) */
.dlv-page {
  position: relative;
  display: block;
  width: 794px;
  max-width: 794px;
  height: 1123px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #fff;
  break-inside: avoid;
  page-break-inside: avoid;
}

/* ── Cover ── */
.dlv-page.dlv-cover {
  background-color: #060a12;
  background-image:
    radial-gradient(ellipse 80% 60% at 85% 15%, rgba(201, 162, 39, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 50% at 10% 90%, rgba(30, 58, 95, 0.35), transparent 50%),
    linear-gradient(155deg, #060a12 0%, #0b1220 42%, #111827 100%);
  color: #f8fafc;
  padding: 44px 48px 36px;
}

.dlv-cover-top {
  overflow: hidden;
  margin-bottom: 28px;
}

.dlv-cover-top::after {
  content: '';
  display: table;
  clear: both;
}

.dlv-cover-badge {
  float: left;
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 39, 0.45);
  background: rgba(201, 162, 39, 0.14);
  font-size: 9pt;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dlv-gold2);
}

.dlv-cover-provider {
  float: right;
  text-align: right;
  font-size: 9pt;
  color: rgba(248, 250, 252, 0.72);
  line-height: 1.5;
}

.dlv-cover-main {
  clear: both;
  margin: 36px 0 28px;
}

.dlv-cover-eyebrow {
  font-size: 11pt;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--dlv-gold);
  margin-bottom: 14px;
}

.dlv-cover-title {
  font-family: 'Outfit', 'Noto Sans SC', sans-serif;
  font-size: 30pt;
  font-weight: 700;
  line-height: 1.12;
  max-width: 680px;
  margin: 0 0 14px;
  letter-spacing: -0.02em;
  word-break: break-word;
}

.dlv-cover-subtitle {
  font-size: 12pt;
  color: rgba(248, 250, 252, 0.78);
  max-width: 620px;
  margin: 0;
  font-weight: 400;
  line-height: 1.5;
}

.dlv-cover-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.dlv-cover-meta div {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.dlv-cover-meta div:nth-child(2n) {
  border-right: none;
}

.dlv-cover-meta div:nth-last-child(-n + 2) {
  border-bottom: none;
}

.dlv-cover-meta dt {
  font-size: 8pt;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.5);
  margin: 0 0 4px;
}

.dlv-cover-meta dd {
  margin: 0;
  font-size: 9.5pt;
  color: #f8fafc;
  font-weight: 500;
  word-break: break-word;
}

.dlv-cover-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.dlv-cover-stat {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.dlv-cover-stat strong {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 16pt;
  color: var(--dlv-gold2);
  line-height: 1.1;
}

.dlv-cover-stat span {
  font-size: 8pt;
  color: rgba(248, 250, 252, 0.55);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dlv-cover-footer {
  position: absolute;
  left: 48px;
  right: 48px;
  bottom: 32px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  font-size: 9pt;
  color: rgba(248, 250, 252, 0.55);
}

.dlv-cover-status {
  float: left;
  color: #86efac;
  font-weight: 600;
}

.dlv-cover-status::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  margin-right: 8px;
  vertical-align: middle;
}

.dlv-cover-footer > span:last-child {
  float: right;
}

/* ── Inner pages ── */
.dlv-page.dlv-inner {
  padding: 44px 48px 36px;
  background: #fff;
}

.dlv-inner-body {
  height: 980px;
  overflow: hidden;
}

.dlv-page-header {
  overflow: hidden;
  padding-bottom: 14px;
  margin-bottom: 22px;
  border-bottom: 2px solid var(--dlv-navy);
}

.dlv-page-brand {
  float: left;
  font-family: 'Outfit', sans-serif;
  font-size: 9pt;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dlv-navy);
  max-width: 560px;
  word-break: break-word;
}

.dlv-page-num {
  float: right;
  font-family: 'Outfit', sans-serif;
  font-size: 26pt;
  font-weight: 700;
  line-height: 1;
  color: var(--dlv-gold);
  letter-spacing: -0.03em;
}

.dlv-page-header::after {
  content: '';
  display: table;
  clear: both;
}

.dlv-section-title {
  font-family: 'Outfit', 'Noto Sans SC', sans-serif;
  font-size: 18pt;
  font-weight: 700;
  color: var(--dlv-navy);
  margin: 0 0 8px;
  line-height: 1.2;
}

.dlv-section-lead {
  font-size: 10pt;
  color: var(--dlv-muted);
  margin: 0 0 18px;
  line-height: 1.65;
}

.dlv-highlight-box {
  padding: 14px 16px;
  border-radius: 10px;
  border-left: 4px solid var(--dlv-gold);
  background: #fffbeb;
  margin-bottom: 18px;
  font-size: 9.5pt;
  color: #334155;
  line-height: 1.6;
}

.dlv-highlight-box strong {
  color: #92400e;
}

/* ── Tables ── */
.dlv-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 9.5pt;
}

.dlv-table thead th {
  background: var(--dlv-navy);
  color: #f8fafc;
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.dlv-table thead th:first-child {
  border-radius: 8px 0 0 0;
}

.dlv-table thead th:last-child {
  border-radius: 0 8px 0 0;
}

.dlv-table tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--dlv-line);
  vertical-align: top;
}

.dlv-table tbody tr:nth-child(even) td {
  background: #f8fafc;
}

.dlv-status-done {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--dlv-green-bg);
  color: var(--dlv-green);
  font-size: 8.5pt;
  font-weight: 600;
}

.dlv-status-pending {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--dlv-warn-bg);
  color: var(--dlv-warn);
  font-size: 8.5pt;
  font-weight: 600;
}

/* ── Modules ── */
.dlv-module {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--dlv-line);
}

.dlv-module:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.dlv-module-head {
  overflow: hidden;
  margin-bottom: 6px;
}

.dlv-module-num {
  float: left;
  width: 26px;
  height: 26px;
  line-height: 26px;
  text-align: center;
  border-radius: 8px;
  background: var(--dlv-navy);
  color: var(--dlv-gold2);
  font-family: 'Outfit', sans-serif;
  font-size: 10pt;
  font-weight: 700;
  margin-right: 10px;
}

.dlv-module-title {
  font-family: 'Outfit', 'Noto Sans SC', sans-serif;
  font-size: 11.5pt;
  font-weight: 700;
  color: var(--dlv-navy);
  margin: 0;
  line-height: 26px;
}

.dlv-module-head::after {
  content: '';
  display: table;
  clear: both;
}

.dlv-module-desc {
  margin: 0 0 10px 36px;
  color: var(--dlv-muted);
  font-size: 9.5pt;
}

.dlv-shot {
  margin: 8px 0 0 36px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--dlv-line);
  max-height: 200px;
}

.dlv-shot img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: cover;
  object-position: top;
}

.dlv-shot-caption {
  padding: 6px 10px;
  font-size: 8pt;
  color: var(--dlv-muted);
  background: #f8fafc;
  border-top: 1px solid var(--dlv-line);
}

.dlv-shot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0 0;
}

.dlv-shot-grid .dlv-shot {
  margin: 0;
}

.dlv-shot-grid .dlv-shot img {
  max-height: 140px;
}

/* ── Lists ── */
.dlv-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}

.dlv-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 9pt;
  color: #334155;
}

.dlv-check-box {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border: 1.5px solid #94a3b8;
  border-radius: 3px;
  margin-top: 2px;
}

.dlv-bullet-list {
  margin: 0 0 16px;
  padding-left: 18px;
  color: var(--dlv-muted);
  font-size: 9.5pt;
}

.dlv-bullet-list li {
  margin-bottom: 4px;
}

.dlv-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.dlv-tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 8.5pt;
  font-weight: 600;
}

/* ── Two columns ── */
.dlv-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.dlv-card {
  border: 1px solid var(--dlv-line);
  border-radius: 10px;
  padding: 14px 16px;
  background: #fafafa;
}

.dlv-card h4 {
  margin: 0 0 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 10.5pt;
  color: var(--dlv-navy);
}

.dlv-card ul {
  margin: 0;
  padding-left: 16px;
  font-size: 9pt;
  color: var(--dlv-muted);
}

.dlv-card ul li {
  margin-bottom: 3px;
}

/* ── Message box ── */
.dlv-message {
  padding: 16px 18px;
  border-radius: 10px;
  border: 1px solid var(--dlv-line);
  background: #f8fafc;
  font-size: 9.5pt;
  color: #334155;
  white-space: pre-wrap;
  line-height: 1.7;
}

.dlv-page-footer {
  position: absolute;
  left: 48px;
  right: 48px;
  bottom: 28px;
  overflow: hidden;
  font-size: 8pt;
  color: #94a3b8;
  border-top: 1px solid var(--dlv-line);
  padding-top: 10px;
}

.dlv-page-footer > span:first-child {
  float: left;
  max-width: 420px;
}

.dlv-page-footer > span:last-child {
  float: right;
}

.dlv-page-footer::after {
  content: '';
  display: table;
  clear: both;
}
