@charset "UTF-8";
/* ==========================================================================
   GT POS WEB - PRINT STYLESHEET
   A4 reports / invoices + 80 mm thermal receipts + barcode label sheets.
   Loaded after gt.css. Only affects @media print unless stated otherwise.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Page setup
   -------------------------------------------------------------------------- */
@page {
    size: A4 portrait;
    margin: 12mm 12mm 14mm;
}

@page gt-receipt {
    size: 80mm auto;
    margin: 3mm 2mm;
}

@page gt-label {
    size: A4 portrait;
    margin: 8mm;
}

/* --------------------------------------------------------------------------
   Base print reset
   -------------------------------------------------------------------------- */
@media print {
    :root {
        --gt-shadow: none;
        --gt-shadow-sm: none;
        --gt-shadow-lg: none;
        --gt-bg: #ffffff;
        --gt-surface: #ffffff;
        --gt-surface-2: #ffffff;
        --gt-surface-3: #f2f2f2;
        --gt-text: #000000;
        --gt-text-muted: #333333;
        --gt-border: #999999;
        --gt-border-strong: #000000;
    }

    html, body {
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 10.5pt;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        color-adjust: exact;
    }

    /* everything decorative disappears */
    .gt-sidebar,
    .gt-navbar,
    .gt-mobile-nav,
    .gt-footer,
    .gt-impersonation-bar,
    .gt-breadcrumbs,
    .gt-page-actions,
    .gt-filter-bar,
    .gt-pagination,
    .gt-pagination-info,
    .gt-pagination-perpage,
    .gt-toast-stack,
    .gt-toast,
    .gt-modal,
    .gt-drawer,
    .gt-drawer-backdrop,
    .gt-sidebar-backdrop,
    .gt-print-toolbar,
    .gt-export-buttons,
    .gt-table-actions,
    .gt-alert-close,
    .gt-chat-form,
    .gt-public-header,
    .gt-public-footer,
    .gt-public-nav,
    .gt-public-search,
    .gt-btn,
    .btn,
    button:not(.gt-print-keep),
    input[type="submit"],
    nav,
    aside,
    form.gt-filter-bar {
        display: none !important;
    }

    .gt-layout { display: block !important; }
    .gt-main { display: block !important; }
    .gt-content { padding: 0 !important; margin: 0 !important; }
    .gt-container { max-width: none !important; padding: 0 !important; }
    .gt-app, .gt-public { background: #ffffff !important; }

    /* cards become flat printable blocks */
    .gt-card {
        border: 1px solid #999999 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        margin-bottom: 6mm !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }
    .gt-card-header {
        border-bottom: 1px solid #999999 !important;
        background: #f2f2f2 !important;
        padding: 3mm 4mm !important;
    }
    .gt-card-body { padding: 3mm 4mm !important; }
    .gt-card-actions { display: none !important; }

    .gt-kpi {
        border: 1px solid #999999 !important;
        box-shadow: none !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }
    .gt-kpi-icon { display: none !important; }

    /* tables: never split a row, repeat the head on every page */
    .gt-table-wrap { overflow: visible !important; }
    .gt-table { min-width: 0 !important; width: 100% !important; font-size: 9pt !important; }
    .gt-table thead { display: table-header-group; }
    .gt-table tfoot { display: table-footer-group; }
    .gt-table tr { page-break-inside: avoid; break-inside: avoid; }
    .gt-table th, .gt-table td {
        border: 1px solid #999999 !important;
        padding: 1.6mm 2mm !important;
        color: #000000 !important;
        background: transparent !important;
    }
    .gt-table thead th {
        background: #e6e6e6 !important;
        color: #000000 !important;
        position: static !important;
        font-size: 8.5pt !important;
    }
    .gt-table tbody tr:nth-child(even) { background: #f7f7f7 !important; }
    .gt-table tbody tr:hover { background: transparent !important; }
    .gt-table tfoot td, .gt-table tfoot th { background: #e6e6e6 !important; border-top: 2px solid #000000 !important; }

    .gt-badge {
        border: 1px solid #000000 !important;
        background: transparent !important;
        color: #000000 !important;
        font-size: 8pt !important;
    }

    .gt-empty { padding: 6mm !important; }
    .gt-empty img { display: none !important; }

    .gt-chart { page-break-inside: avoid; break-inside: avoid; min-height: 0 !important; }
    .gt-chart-tooltip { display: none !important; }
    .gt-chart svg { max-height: 80mm; }
    noscript { display: block !important; }

    a[href]::after { content: ""; }
    a { color: #000000 !important; text-decoration: none !important; }

    /* report page breaks */
    .gt-report-page { page-break-before: auto; }
    .gt-report-page + .gt-report-page { page-break-before: always; }
    .page-break-before, .gt-page-break { page-break-before: always; break-before: page; }
    .page-break-after { page-break-after: always; break-after: page; }
    .page-break-avoid, .gt-avoid-break { page-break-inside: avoid; break-inside: avoid; }

    /* print-only header (reports/partials/print_header.php) */
    .gt-print-header {
        display: block !important;
        border-bottom: 2px solid #000000;
        padding-bottom: 3mm;
        margin-bottom: 5mm;
    }
    .gt-print-header h1 { font-size: 15pt; margin: 0 0 1mm; }
    .gt-print-header .gt-print-store { font-size: 11pt; font-weight: 700; }
    .gt-print-header .gt-print-meta { font-size: 9pt; color: #333333; }
    .gt-print-summary { display: flex; flex-wrap: wrap; gap: 4mm; margin-top: 3mm; font-size: 9pt; }
    .gt-print-summary-item { border: 1px solid #999999; padding: 1.5mm 3mm; }
    .gt-print-summary-label { color: #333333; }
    .gt-print-summary-value { font-weight: 700; }

    .gt-print-footer {
        display: block !important;
        margin-top: 6mm;
        border-top: 1px solid #999999;
        padding-top: 2mm;
        font-size: 8.5pt;
        color: #333333;
        text-align: center;
    }

    /* ---------------------------------------------------------------------
       A4 INVOICE
       --------------------------------------------------------------------- */
    .gt-invoice {
        border: 0 !important;
        padding: 0 !important;
        max-width: none !important;
        box-shadow: none !important;
        font-size: 10pt;
    }
    .gt-invoice-head { border-bottom: 2px solid #000000 !important; }
    .gt-invoice-title { font-size: 20pt !important; }
    .gt-invoice-table th, .gt-invoice-table td { border: 1px solid #000000 !important; }
    .gt-invoice-table th { background: #e6e6e6 !important; }
    .gt-invoice-sign { page-break-inside: avoid; }
    .gt-invoice-footer { border-top: 1px solid #000000 !important; }

    /* ---------------------------------------------------------------------
       80 mm THERMAL RECEIPT
       --------------------------------------------------------------------- */
    .gt-receipt,
    .gt-print-body .gt-receipt,
    body.gt-print .gt-receipt {
        width: 72mm !important;
        max-width: 72mm !important;
        margin: 0 auto !important;
        padding: 0 !important;
        font-size: 9pt !important;
        font-family: "Cascadia Mono", Consolas, "Liberation Mono", monospace !important;
        color: #000000 !important;
        background: #ffffff !important;
        box-shadow: none !important;
        border: 0 !important;
        page: gt-receipt;
        page-break-after: always;
        break-after: page;
    }
    .gt-receipt:last-of-type { page-break-after: auto; break-after: auto; }
    .gt-receipt-store-name { font-size: 12pt !important; }
    .gt-receipt-total-row td { border-top: 1px solid #000000 !important; border-bottom: 1px solid #000000 !important; }
    .gt-receipt-barcode svg { max-width: 68mm !important; height: auto !important; }

    /* the print layout (layouts/print.php) */
    .gt-print, body.gt-print { background: #ffffff !important; }
    .gt-print-body {
        padding: 0 !important;
        margin: 0 !important;
        max-width: none !important;
    }
    .gt-print-company h1 { font-size: 15pt !important; }
    .gt-print-store-block h2 { font-size: 12pt !important; }
    .gt-print-company p, .gt-print-store-block p { font-size: 9pt !important; color: #333333 !important; }
    .gt-print-footer { border-top: 1px solid #999999 !important; font-size: 8pt !important; }
    .gt-print-generated { font-size: 8pt !important; }

    /* a receipt page must not carry the A4 company header or footer */
    body.gt-print:has(.gt-receipt) .gt-print-header,
    body.gt-print:has(.gt-receipt) .gt-print-footer,
    body[data-print="receipt"] .gt-print-header,
    body[data-print="receipt"] .gt-print-footer { display: none !important; }
    body.gt-print:has(.gt-receipt) .gt-print-body,
    body[data-print="receipt"] .gt-print-body { padding: 0 !important; }
    body.gt-print:has(.gt-barcode-sheet) .gt-print-header { display: none !important; }

    /* screen-only toolbar inside the print layout */
    .gt-print-toolbar, .no-print, [data-print-trigger] { display: none !important; }

    /* ---------------------------------------------------------------------
       BARCODE LABEL SHEETS
       --------------------------------------------------------------------- */
    .gt-barcode-sheet, .barcode-sheet {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 2mm !important;
        page: gt-label;
    }
    .gt-barcode-label, .barcode-label {
        border: 1px solid #cccccc !important;
        border-radius: 0 !important;
        padding: 1.5mm !important;
        page-break-inside: avoid;
        break-inside: avoid;
        min-height: 26mm;
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    .barcode-label-name { font-size: 7.5pt !important; }
    .barcode-label-price { font-size: 8.5pt !important; font-weight: 700; }
    .barcode-svg { max-width: 100% !important; height: auto !important; }

    /* ---------------------------------------------------------------------
       MISC
       --------------------------------------------------------------------- */
    .gt-alert {
        border: 1px solid #000000 !important;
        background: transparent !important;
        color: #000000 !important;
    }
    .gt-timeline::before { background: #999999 !important; }
    .gt-timeline-item::before { background: #ffffff !important; }

    body[data-print="report"] .gt-content { padding: 0 !important; }
    body[data-print="report"] .gt-card { border: 0 !important; margin-bottom: 4mm !important; }
    body[data-print="report"] .gt-card-header { background: transparent !important; border-bottom: 1px solid #000000 !important; }

    h1, h2, h3, h4 { color: #000000 !important; page-break-after: avoid; break-after: avoid; }
    h1 { font-size: 15pt; }
    h2 { font-size: 13pt; }
    h3 { font-size: 11pt; }

    .hidden-print, .no-print { display: none !important; }
}

/* --------------------------------------------------------------------------
   Screen previews of printable documents (visible outside @media print)
   -------------------------------------------------------------------------- */
.gt-print-preview {
    background: var(--gt-surface-2);
    padding: var(--gt-space-5);
    border-radius: var(--gt-radius);
    overflow-x: auto;
}
.gt-print-preview .gt-invoice,
.gt-print-preview .gt-receipt { box-shadow: var(--gt-shadow); }
.gt-print-preview-toolbar { display: flex; flex-wrap: wrap; gap: var(--gt-space-2); margin-bottom: var(--gt-space-4); }

/* legacy helper classes kept for other workers' screens */
.print-only { display: none; }
@media print {
    .print-only { display: block !important; }
    .screen-only { display: none !important; }
}

/* W27e: generic printable report (stock list, exports -> print/PDF). */
.gt-print-title { font-size: 20px; font-weight: 800; margin: 0 0 4px; }
.gt-print-subtitle { font-size: 11.5px; color: #333; margin: 0 0 12px; }
.gt-print-table { width: 100%; border-collapse: collapse; margin: 0 0 12px; }
.gt-print-table th,
.gt-print-table td { border: 1px solid #555; padding: 3mm 2mm; font-size: 10.5px; vertical-align: top; }
.gt-print-table th { background: #eee; text-transform: uppercase; letter-spacing: .03em; font-size: 9.5px; text-align: left; }
.gt-print-table .text-right { text-align: right; }
.gt-print-note { font-size: 10px; color: #444; margin: 0; }
@page { size: A4 landscape; margin: 10mm; }
@media print {
    .gt-print-table th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* W30: receipt logo */
.gt-receipt-logo{text-align:center;margin:0 0 4px}
.gt-receipt-logo img{max-height:48px;max-width:150px;object-fit:contain;filter:grayscale(1)}
