.tpr-dialog { --tpr-ink:#102b45; --tpr-teal:#087b88; color:#152b3f; background:#eef3f6; border:1px solid #bdcdd8; border-radius:18px; width:min(1020px, calc(100vw - 32px)); max-width:none; max-height:calc(100dvh - 32px); padding:0; box-shadow:0 26px 100px #061c3a66; overflow:auto; }
.tpr-dialog::backdrop { background:#061b35b3; backdrop-filter:blur(4px); }
.tpr-dialog * { box-sizing:border-box; }
.tpr-toolbar { display:flex; justify-content:space-between; align-items:center; gap:20px; position:sticky; top:0; z-index:2; padding:18px 24px; background:#102b45; color:white; }
.tpr-toolbar h2 { margin:0 0 4px; font:700 19px/1.2 system-ui,sans-serif; color:white; }
.tpr-toolbar p { margin:0; font:13px/1.5 system-ui,sans-serif; color:#d6e5ef; }
.tpr-buttons { display:flex; gap:8px; flex-shrink:0; }
.tpr-buttons button { cursor:pointer; border:1px solid #b8cfdc; border-radius:9px; min-height:42px; padding:9px 13px; font:650 13px/1.3 system-ui,sans-serif; }
.tpr-buttons .tpr-print-button { background:#8aead8; color:#103044; border-color:#8aead8; }
.tpr-buttons .tpr-close-button { background:#163b58; color:#fff; }
.tpr-buttons button:disabled { cursor:wait; opacity:.6; }
.tpr-buttons button:focus-visible { outline:3px solid #f6cc67; outline-offset:3px; }
.tpr-sheet { width:min(100% - 48px, 840px); background:#fff; margin:24px auto; padding:30px; border:1px solid #d2dfe6; box-shadow:0 8px 30px #102b450c; font:12px/1.45 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; overflow-wrap:anywhere; }
.tpr-header { display:flex; gap:20px; justify-content:space-between; align-items:start; border-bottom:3px solid var(--tpr-teal); padding-bottom:16px; margin-bottom:14px; }
.tpr-brand { font-size:25px; font-weight:850; letter-spacing:2px; color:var(--tpr-ink); }
.tpr-brand-caption { font-size:8px; letter-spacing:1.55px; margin:0 0 15px; color:#4b697d; }
.tpr-eyebrow { font-size:9px; font-weight:700; letter-spacing:1.1px; margin:0; }
.tpr-identity { text-align:right; }
.tpr-identity h1 { font-size:30px; letter-spacing:-1px; margin:0; color:var(--tpr-ink); }
.tpr-identity p { font-size:10px; margin:3px 0; color:#456276; }
.tpr-section { margin-top:18px; }
.tpr-section h2 { font-size:14px; margin:0 0 9px; padding-bottom:5px; border-bottom:1px solid #a5c3cf; color:var(--tpr-ink); break-after:avoid; }
.tpr-section h3 { margin:10px 0 6px; font-size:12px; color:var(--tpr-ink); break-after:avoid; }
.tpr-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); margin:0 0 9px; gap:8px 20px; }
.tpr-fact { min-width:0; break-inside:avoid; }
.tpr-fact dt { font-size:9px; text-transform:uppercase; letter-spacing:.4px; font-weight:750; color:#526d7e; margin:0 0 2px; }
.tpr-fact dd { font-size:11px; margin:0; white-space:pre-wrap; }
.tpr-note { margin:6px 0 9px; font-size:11px; white-space:pre-wrap; }
.tpr-warn, .tpr-demo { border:1px solid #ba7b26; border-left:4px solid #a5660e; background:#fff9e9; padding:8px 10px; color:#66430e; }
.tpr-demo { font-weight:750; border:2px solid #955913; }
.tpr-verified { border-left:3px solid #1f7265; padding-left:8px; color:#185548; }
.tpr-status { border:1px solid #b9c7d1; background:#f5f8fa; padding:8px 10px; }
.tpr-small { font-size:10px; color:#486174; }
.tpr-hash { font:9px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace; color:#465c6d; }
.tpr-block + .tpr-block { border-top:1px dashed #b8cbd6; margin-top:12px; padding-top:6px; }
.tpr-table { width:100%; table-layout:fixed; border-collapse:collapse; margin:8px 0 10px; font-size:10.5px; }
.tpr-table th { background:#eff5f7; color:#24475f; font-size:9px; text-align:left; }
.tpr-table th, .tpr-table td { padding:7px 8px; border:1px solid #c8d8e0; vertical-align:top; overflow-wrap:anywhere; white-space:pre-wrap; }
.tpr-table tr { break-inside:avoid; }
.tpr-codes { margin:14px 0 5px; display:flex; justify-content:center; align-items:center; gap:22px; padding:10px; border:1px solid #bacdd8; background:white; break-inside:avoid; }
.tpr-codes > * { min-width:0; }
.tpr-codes svg { display:block; max-width:100%; height:auto; }
.tpr-codes .ticket-code-qr { width:140px; }
.tpr-codes .ticket-code-barcode { width:260px; }
.ticket-document-actions .ticket-share-button, .ticket-document-actions .ticket-print-button { appearance:none; display:inline-flex; align-items:center; gap:8px; min-height:40px; padding:8px 13px; border:1px solid #9fbecb; border-radius:9px; background:#f5fbfc; color:#154d63; font:650 12px/1.3 system-ui,sans-serif; cursor:pointer; }
.ticket-document-actions .ticket-print-button { background:#123952; border-color:#123952; color:white; }
.ticket-document-actions .ticket-share-button:hover { background:#e5f6f5; }
.ticket-document-actions .ticket-print-button:hover { background:#1a526e; }
.ticket-document-actions .ticket-share-button:focus-visible, .ticket-document-actions .ticket-print-button:focus-visible { outline:3px solid #19a5ad; outline-offset:3px; }
.tpr-url { margin:4px 0 14px; font-size:9px; line-height:1.5; }
.tpr-footer { display:block; border-top:2px solid #698b9e; margin-top:18px; padding-top:9px; font-size:9px; color:#476171; }
.tpr-footer p { margin:3px 0; }
.tpr-print-fallback { display:none; }
.tpr-print-root { display:none; --tpr-ink:#102b45; --tpr-teal:#087b88; }
.tpr-print-root * { box-sizing:border-box; }
.tpr-page-marker { display:none; }
@media (max-width:620px) { .tpr-dialog { width:calc(100vw - 12px); max-height:calc(100dvh - 12px); border-radius:12px; } .tpr-toolbar { flex-wrap:wrap; gap:10px; padding:14px; } .tpr-buttons { width:100%; } .tpr-buttons button { flex:1; } .tpr-sheet { margin:12px auto; width:calc(100% - 20px); padding:15px; } .tpr-header { gap:9px; } .tpr-brand { font-size:18px; letter-spacing:1px; } .tpr-brand-caption { font-size:6px; letter-spacing:.8px; } .tpr-identity h1 { font-size:24px; } .tpr-identity p { font-size:8px; } .tpr-facts { gap:8px 12px; } .tpr-table th,.tpr-table td { padding:5px; } .tpr-codes { flex-wrap:wrap; gap:12px; } }
@media print {
  @page { size:auto; margin:12mm; }
  html, body.tpr-mounted { background:#fff !important; min-width:0 !important; width:auto !important; height:auto !important; overflow:visible !important; margin:0 !important; padding:0 !important; }
  body > :not(.tpr-print-root):not(.tpr-print-fallback) { display:none !important; }
  body:not(.tpr-mounted)::after { content:"Open a resolved ticket and choose Print ticket to prepare its saved record, QR code and barcode."; display:block; padding:15mm; color:#111; font:14pt/1.5 sans-serif; }
  body.tpr-mounted .tpr-dialog { display:none !important; }
  body.tpr-mounted .tpr-print-fallback { display:block !important; color:#111; font:14pt/1.5 sans-serif; padding:15mm; }
  body.tpr-print-ready .tpr-print-fallback { display:none !important; }
  body.tpr-print-ready .tpr-print-root { display:block !important; position:static !important; overflow:visible !important; width:auto !important; height:auto !important; margin:0 !important; padding:0 !important; background:white !important; color:#102b45 !important; }
  .tpr-dialog::backdrop { display:none !important; background:transparent !important; }
  .tpr-toolbar { display:none !important; }
  .tpr-sheet { width:100%; margin:0; padding:0; border:0; box-shadow:none; font-size:9pt; line-height:1.3; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
  .tpr-header { break-inside:avoid; padding-bottom:12px; margin-bottom:10px; }
  .tpr-brand { font-size:20pt; }
  .tpr-identity h1 { font-size:24pt; }
  .tpr-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px 16px; }
  .tpr-section { margin-top:8pt; }
  .tpr-section h2 { font-size:11pt; }
  .tpr-section h3 { font-size:9pt; }
  .tpr-note, .tpr-fact dd { font-size:8.5pt; }
  .tpr-note { margin:4px 0 7px; }
  .tpr-art-references { break-inside:avoid; }
  .tpr-table { font-size:8pt; }
  .tpr-fact dt, .tpr-table th { font-size:7pt; }
  .tpr-table thead { display:table-header-group; }
  .tpr-table td,.tpr-table th { padding:4pt; }
  .tpr-codes { flex-wrap:nowrap; gap:12mm; padding:3mm; }
  .tpr-codes svg { max-width:100%; }
  .tpr-codes .ticket-code-qr { width:34mm; }
  .tpr-codes .ticket-code-barcode { width:65mm; }
  .tpr-small { font-size:7.5pt; }
  .tpr-hash, .tpr-url, .tpr-footer { font-size:7pt; }
  .tpr-footer { display:block !important; break-inside:avoid; line-height:1.3; letter-spacing:normal; margin-top:10px; padding:7px 0 0; }
  .tpr-page-marker { display:block; position:fixed; bottom:0; left:0; right:0; font:7pt/1.2 system-ui,sans-serif; color:#476171; text-align:right; background:white; padding-top:2mm; }
  .tpr-margin-footer .tpr-page-marker { display:none; }
  a[href]::after { content:none !important; }
}

.ticket-document-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-top:16px; position:relative; z-index:1; }
.ticket-link-fallback { flex:1 1 240px; min-width:0; width:100%; padding:10px; border:1px solid #9fbecb; border-radius:8px; color:#15334b; background:#fff; font-size:12px; }
