/* OcevoHub — printed / "Save as PDF" pages (reports, shift summaries, purchase orders…).
   Loaded with media="print" on every app page. Goal: simple, one calm accent, tables you can actually read on paper.
   Selectors start with "html body" so they win over the on-screen theme. */
@page { size: A4; margin: 16mm 14mm 18mm; @bottom-left { content: "OcevoHub"; font-size: 8pt; color: #94a3b8; } @bottom-right { content: "Page " counter(page) " of " counter(pages); font-size: 8pt; color: #94a3b8; } }

.print-head { display: none; }

@media print {
  :root { --pk: #1d4ed8; --pk-soft: #eef3ff; --pk-ink: #0f172a; --pk-mute: #64748b; --pk-line: #dfe5ef; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; box-shadow: none !important; text-shadow: none !important; animation: none !important; }
  html, body { background: #fff !important; color: var(--pk-ink) !important; font-size: 10.5pt; line-height: 1.4; }
  html body { font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif; }
  html body a { color: inherit !important; text-decoration: none !important; }

  /* Chrome that never belongs on paper */
  html body .sidebar, html body .topbar, html body .no-print, html body .toasts, html body .page-actions, html body .toolbar, html body .pagination, html body .range-bar,
  html body .report-tabs, html body .sticky-actions, html body .btn, html body .chip, html body .tabs, html body .dp-row, html body .trial-banner, html body .platform-notice,
  html body .skip-link, html body nav, html body .crumbs, html body .breadcrumbs, html body .alert-upgrade, html body .coming-soon, html body .empty { display: none !important; }
  html body .main, html body .app > .main { margin: 0 !important; padding: 0 !important; }
  html body .content { padding: 0 !important; max-width: none !important; margin: 0 !important; }

  /* Letterhead */
  html body .print-head { display: flex !important; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 0 0 10px; margin: 0 0 14px; border-bottom: 2.5px solid var(--pk); }
  html body .print-head .ph-biz { font-size: 15pt; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
  html body .print-head .ph-sub { font-size: 8.5pt; color: var(--pk-mute); margin-top: 2px; }
  html body .print-head .ph-meta { text-align: right; font-size: 8.5pt; color: var(--pk-mute); line-height: 1.5; white-space: nowrap; }
  html body .print-head .ph-meta b { color: var(--pk); letter-spacing: .12em; text-transform: uppercase; font-size: 8pt; }
  html body .print-only { display: block !important; }

  /* Title */
  html body .page-header { display: block !important; margin: 0 0 12px !important; padding: 0 !important; background: none !important; border: 0 !important; }
  html body .page-header h1 { font-size: 20pt !important; font-weight: 800; letter-spacing: -.03em; margin: 0 !important; color: var(--pk-ink) !important; line-height: 1.1; }
  html body .page-header .subtitle, html body .page-header p { color: var(--pk-mute) !important; font-size: 9.5pt; margin: 3px 0 0 !important; }

  /* Key figures: a flat strip instead of coloured cards */
  html body .stat-grid { display: grid !important; grid-template-columns: repeat(4, 1fr) !important; gap: 0 !important; border-top: 1px solid var(--pk-line); border-bottom: 1px solid var(--pk-line); margin: 0 0 16px !important; page-break-inside: avoid; }
  html body .stat-card, html body .stat-card.hero { background: none !important; background-image: none !important; border: 0 !important; border-right: 1px solid var(--pk-line) !important; border-radius: 0 !important; padding: 9px 12px !important; color: var(--pk-ink) !important; overflow: visible !important; }
  html body .stat-card:nth-child(4n) { border-right: 0 !important; }
  html body .stat-card:nth-child(n+5) { border-top: 1px solid var(--pk-line) !important; }
  html body .stat-card .stat-icon, html body .stat-card svg, html body .stat-card::before, html body .stat-card::after { display: none !important; }
  html body .stat-card .stat-label, html body .stat-card.hero .stat-label { font-size: 7.5pt !important; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--pk-mute) !important; }
  html body .stat-card .stat-value, html body .stat-card.hero .stat-value { font-size: 14pt !important; font-weight: 800 !important; letter-spacing: -.02em; margin-top: 3px !important; color: var(--pk-ink) !important; filter: none !important; }
  html body .stat-card.hero { border-left: 3px solid var(--pk) !important; background: var(--pk-soft) !important; }
  html body .stat-card .stat-meta { font-size: 7.5pt !important; color: var(--pk-mute) !important; }
  html body .text-danger { color: #b91c1c !important; }
  html body .text-success { color: #15803d !important; }

  /* Cards become plain sections */
  html body .card, html body .card-flush { border: 0 !important; border-radius: 0 !important; background: none !important; background-image: none !important; margin: 0 0 14px !important; padding: 0 !important; }
  html body .card-header { display: block !important; padding: 0 0 4px !important; margin: 14px 0 6px !important; border: 0 !important; border-bottom: 1px solid var(--pk-line) !important; background: none !important; }
  html body .card-header h3, html body .card h3 { font-size: 9pt !important; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; color: var(--pk) !important; margin: 0 !important; }
  html body .card-body { padding: 0 !important; }
  html body .chart-box { page-break-inside: avoid; max-height: 62mm; }
  html body .chart-box canvas { max-height: 62mm !important; max-width: 100% !important; }
  html body .grid, html body .grid-2, html body .grid-main-side { display: block !important; }

  /* Tables: hairlines only, repeating header, right-aligned figures */
  html body .table-wrap { overflow: visible !important; border: 0 !important; background: none !important; }
  html body table, html body .table { width: 100% !important; border-collapse: collapse !important; font-size: 9pt; background: none !important; }
  html body thead { display: table-header-group; }
  html body tfoot { display: table-footer-group; }
  html body tr { page-break-inside: avoid; break-inside: avoid; }
  html body th { text-align: left; font-size: 7.5pt !important; letter-spacing: .1em; text-transform: uppercase; font-weight: 800; color: var(--pk-mute) !important; background: none !important;
                 padding: 6px 8px !important; border: 0 !important; border-bottom: 1.5px solid var(--pk-ink) !important; }
  html body td { padding: 5px 8px !important; border: 0 !important; border-bottom: 1px solid var(--pk-line) !important; vertical-align: top; background: none !important; }
  html body th.num, html body td.num, html body .num { text-align: right !important; font-variant-numeric: tabular-nums; }
  html body tbody tr:nth-child(even) td { background: #fafbfd !important; }
  html body tfoot td { font-weight: 800; border-top: 1.5px solid var(--pk-ink) !important; border-bottom: 0 !important; background: none !important; padding-top: 7px !important; }
  html body .table-cards td::before { display: none !important; }
  html body .badge { background: none !important; border: 0 !important; padding: 0 !important; color: inherit !important; font-weight: 700; }
  html body .badge::before { content: "• "; color: var(--pk); }
  html body .muted, html body .small.muted { color: var(--pk-mute) !important; }
}
