/* ============================================================
   SIGMA LUGGAGE HUB — Professional Print Stylesheet
   A4 Portrait · Branded · Colorful · Structured
   ============================================================ */

@media print {

/* ── Page ──────────────────────────────────────────────────── */
@page {
    size: A4 portrait;
    margin: 18mm 16mm 22mm 16mm;
}
@page :first { margin-top: 12mm; }

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
}

html, body {
    font-family: 'Arial', 'Helvetica Neue', sans-serif !important;
    font-size: 10pt !important;
    line-height: 1.45 !important;
    color: #1A1A2E !important;
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

/* ── Hide web chrome ───────────────────────────────────────── */
.sigma-navbar, .sigma-sidebar, #appWrapper > .sigma-sidebar,
.mobile-bottom-nav, .sidebar-overlay, .filters-bar,
.breadcrumb, .page-header .btn, .page-header .d-flex,
#toastContainer, .no-print, nav, .fab-btn,
.dropdown-menu, .modal, .offcanvas, .alert-dismissible .btn-close,
.pagination, .empty-state .btn, #autoSaveIndicator,
.status-timeline { display: none !important; }

/* ── Layout ─────────────────────────────────────────────────── */
#appWrapper, #mainContent { display: block !important; margin: 0 !important; padding: 0 !important; }
.container-fluid { padding: 0 !important; max-width: 100% !important; }

/* ── Page header (doc title only) ──────────────────────────── */
.page-header {
    display: block !important;
    margin-bottom: 8pt !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
}
.page-header .page-title {
    font-size: 15pt !important;
    font-weight: 700 !important;
    color: #1A1A2E !important;
    margin: 0 !important;
}
.page-header .page-subtitle { font-size: 9pt !important; color: #666 !important; }

/* ── Print document header ─────────────────────────────────── */
.print-doc-header {
    display: block !important;
    margin-bottom: 14pt !important;
    padding-bottom: 8pt !important;
    border-bottom: 3pt solid #D61B5D !important;
    page-break-after: avoid !important;
}

/* ── Print footer ───────────────────────────────────────────── */
.print-footer-bar {
    display: block !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 16pt !important;
    border-top: 1pt solid #D61B5D !important;
    padding: 3pt 0 !important;
    font-size: 7.5pt !important;
    color: #888 !important;
    text-align: center !important;
    background: #fff !important;
}

/* ── Cards ──────────────────────────────────────────────────── */
.card {
    border: 1pt solid #E0E0E0 !important;
    border-radius: 4pt !important;
    box-shadow: none !important;
    margin-bottom: 10pt !important;
    page-break-inside: avoid !important;
    background: #fff !important;
}
.card-header {
    background: #1A1A2E !important;
    color: #fff !important;
    padding: 5pt 10pt !important;
    font-size: 8.5pt !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4pt !important;
    border: none !important;
}
.card-body { padding: 8pt 10pt !important; }

/* ── KPI Cards ──────────────────────────────────────────────── */
.kpi-card {
    border: 1.5pt solid #D61B5D !important;
    border-radius: 4pt !important;
    padding: 8pt 10pt !important;
    box-shadow: none !important;
    background: linear-gradient(135deg, #fff 60%, #FBE9F0 100%) !important;
    page-break-inside: avoid !important;
    overflow: hidden !important;
}
.kpi-icon-wrap { display: none !important; }
.kpi-value {
    font-size: 14pt !important;
    font-weight: 700 !important;
    color: #D61B5D !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
.kpi-label {
    font-size: 7pt !important;
    color: #666 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4pt !important;
}

/* ── Table wrapper ──────────────────────────────────────────── */
.table-wrap {
    overflow: visible !important;
    border: none !important;
    margin-bottom: 10pt !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* ── Tables ─────────────────────────────────────────────────── */
table, .table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 8.5pt !important;
    page-break-inside: auto !important;
    margin: 0 !important;
}
.table thead { display: table-header-group !important; }
.table tfoot  { display: table-footer-group !important; }

.table thead th {
    background: #1A1A2E !important;
    color: #fff !important;
    font-size: 7.5pt !important;
    font-weight: 700 !important;
    padding: 5pt 6pt !important;
    border: 1pt solid #1A1A2E !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3pt !important;
    white-space: nowrap !important;
}
.table tbody tr { page-break-inside: avoid !important; }
.table tbody td {
    padding: 4pt 6pt !important;
    border: 0.5pt solid #E5E5E5 !important;
    vertical-align: top !important;
    font-size: 8.5pt !important;
    color: #111 !important;
}
.table tbody tr:nth-child(even) td { background: #F9F9F9 !important; }
.table tbody tr:last-child td { border-bottom: 1.5pt solid #AAA !important; }
.table tfoot td {
    padding: 5pt 6pt !important;
    border: 1pt solid #CCC !important;
    background: #F0F0F0 !important;
    font-weight: 700 !important;
    font-size: 8.5pt !important;
    color: #000 !important;
    border-top: 2pt solid #D61B5D !important;
}

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
    display: inline-block !important;
    font-size: 7pt !important;
    font-weight: 700 !important;
    padding: 1.5pt 5pt !important;
    border-radius: 3pt !important;
    border: 0.5pt solid currentColor !important;
    text-transform: uppercase !important;
    letter-spacing: 0.2pt !important;
}
.badge.bg-success  { background: #E8F5E9 !important; color: #1B5E20 !important; }
.badge.bg-primary  { background: #E8EAF6 !important; color: #283593 !important; }
.badge.bg-danger   { background: #FFEBEE !important; color: #B71C1C !important; }
.badge.bg-warning  { background: #FFF8E1 !important; color: #E65100 !important; }
.badge.bg-info     { background: #E3F2FD !important; color: #01579B !important; }
.badge.bg-secondary{ background: #F5F5F5 !important; color: #424242 !important; }

/* ── Financial colours kept in print ───────────────────────── */
.text-success, .ledger-credit  { color: #1B5E20 !important; }
.text-danger,  .ledger-debit   { color: #B71C1C !important; }
.text-primary  { color: #D61B5D !important; }
.fw-700        { font-weight: 700 !important; }
.fw-600        { font-weight: 600 !important; }

/* ── Links ──────────────────────────────────────────────────── */
a { color: #1A1A2E !important; text-decoration: none !important; }

/* ── Receipt specific ───────────────────────────────────────── */
.receipt {
    max-width: 100% !important;
    border: 1.5pt solid #D61B5D !important;
    border-radius: 0 !important;
}
.receipt-header {
    background: #1A1A2E !important;
    color: #fff !important;
    padding: 12pt 16pt !important;
}
.receipt-header h1 { font-size: 16pt !important; color: #fff !important; }
.receipt-header p  { font-size: 8pt  !important; color: #ccc !important; }
.amount-box {
    background: #FBE9F0 !important;
    border: 1.5pt solid #D61B5D !important;
    padding: 10pt !important;
    text-align: center !important;
}
.amount-box .amount { font-size: 22pt !important; font-weight: 700 !important; color: #D61B5D !important; }

/* ── Info rows ──────────────────────────────────────────────── */
.info-row {
    display: flex !important;
    justify-content: space-between !important;
    padding: 3pt 0 !important;
    border-bottom: 0.5pt solid #EEE !important;
    font-size: 9pt !important;
}
.info-label { color: #555 !important; min-width: 110pt !important; }
.info-value { font-weight: 600 !important; text-align: right !important; }

/* ── Ledger ─────────────────────────────────────────────────── */
.ledger-balance-positive { color: #B71C1C !important; font-weight: 700 !important; }
.ledger-balance-negative { color: #1B5E20 !important; font-weight: 700 !important; }

/* ── Totals block ───────────────────────────────────────────── */
.booking-totals {
    border: 1pt solid #D61B5D !important;
    border-radius: 0 !important;
    padding: 8pt !important;
    background: #FBE9F0 !important;
    page-break-inside: avoid !important;
}
.total-row {
    display: flex !important;
    justify-content: space-between !important;
    padding: 3pt 0 !important;
    border-bottom: 0.5pt dashed #DDD !important;
    font-size: 9pt !important;
}
.total-row.grand {
    font-size: 12pt !important;
    font-weight: 700 !important;
    border-top: 2pt solid #D61B5D !important;
    border-bottom: 2pt solid #D61B5D !important;
    padding: 5pt 0 !important;
    color: #D61B5D !important;
}

/* ── Grid print ─────────────────────────────────────────────── */
.row { display: flex !important; flex-wrap: wrap !important; margin: 0 !important; }
.col-6, .col-md-3, .col-md-4, .col-12 { padding: 3pt !important; }
.col-6    { width: 50% !important; }
.col-md-3 { width: 25% !important; }
.col-md-4 { width: 33.33% !important; }
.col-12   { width: 100% !important; }
.col-md-6 { width: 50% !important; }
.col-md-8 { width: 66.66% !important; }

/* ── Page breaks ────────────────────────────────────────────── */
.page-break-before { page-break-before: always !important; }
.page-break-after  { page-break-after:  always !important; }
.avoid-break       { page-break-inside: avoid !important; }

/* ── Misc ────────────────────────────────────────────────────── */
.mono        { font-family: 'Courier New', monospace !important; font-size: 8pt !important; }
.text-muted  { color: #666 !important; }
.border-bottom { border-bottom: 0.5pt solid #DDD !important; }
.no-print    { display: none !important; }
.d-print-block { display: block !important; }
img { max-width: 100% !important; }

/* ── Signatures ─────────────────────────────────────────────── */
.print-signatures {
    display: flex !important;
    justify-content: space-between !important;
    margin-top: 28pt !important;
    padding-top: 8pt !important;
}
.print-signatures .sig-box {
    width: 28% !important;
    border-top: 1pt solid #1A1A2E !important;
    padding-top: 4pt !important;
    text-align: center !important;
    font-size: 8pt !important;
    color: #555 !important;
}

/* ── Draft watermark ─────────────────────────────────────────── */
.print-draft-watermark::before {
    content: 'DRAFT' !important;
    position: fixed !important;
    top: 50% !important; left: 50% !important;
    transform: translate(-50%,-50%) rotate(-35deg) !important;
    font-size: 72pt !important;
    font-weight: 900 !important;
    color: rgba(214,27,93,0.07) !important;
    z-index: 9999 !important;
    pointer-events: none !important;
    letter-spacing: 8pt !important;
}

}
/* end @media print */
