﻿/* =========================================================
   Base layout
   ========================================================= */
html, body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    overscroll-behavior-y: none; /* block pull-to-refresh */
}

body {
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.body-content {
    padding-left: 0;
    padding-right: 0;
}

/* Prevent dt truncation in horizontal DLs */
.dl-horizontal dt {
    white-space: normal;
}

/* Utility */
.min-height-row {
    min-height: 350px;
}

.divider {
    display: table;
    text-align: center;
    width: 95%;
    margin: 40px auto;
}

    .divider span {
        display: table-cell;
        position: relative;
    }

        .divider span:first-child, .divider span:last-child {
            width: 50%;
            top: 13px;
            background-size: 100% 2px;
            background-position: 0 0, 0 100%;
            background-repeat: no-repeat;
        }

        .divider span:first-child {
            background-image: linear-gradient(90deg, transparent, #868e96);
        }

        .divider span:nth-child(2) {
            padding: 0 5px;
            width: auto;
            white-space: nowrap;
        }

        .divider span:last-child {
            background-image: linear-gradient(90deg, #868e96, transparent);
        }

/* Validation highlights */
.garbage {
    display: none;
}

    .garbage[style*=visible] + input,
    .garbage[style*=visible] + select,
    .garbage[style*=visible] + textarea {
        background-color: #fff6f6 !important;
        border: 1px solid #ff0000 !important;
    }
/* Canvas invalid look */
.garbageCanvas {
    border: 1px solid #ff0000 !important;
    background-color: #fff6f6 !important;
    border-radius: .375rem;
}

/* Buttons / uploads */
.btn-file-css {
    position: relative;
    overflow: hidden;
}

    .btn-file-css input[type=file] {
        position: absolute;
        top: 0;
        right: 0;
        min-width: 100%;
        min-height: 100%;
        font-size: 100px;
        text-align: right;
        opacity: 0;
        cursor: inherit;
        display: block;
    }

.btn-primary-upload {
    color: #fff;
    background: #0d6efd;
    border-color: #0d6efd;
}

.textbox_btn_lt, .textbox_btn_rt, .textbox_btn {
    border-color: #222236;
    color: #fff;
    background: #10a2dd;
    padding: .375rem .75rem;
    font-size: .775rem;
    line-height: 1.71;
    transition: color .15s, background-color .15s, border-color .15s, box-shadow .15s;
}

.textbox_btn_lt {
    border-radius: .25em 0 0 .25em;
}

.textbox_btn_rt {
    border-radius: 0 .25em .25em 0;
}

.textbox_btn {
    border-radius: 0 .25rem .25rem 0;
    border-color: #10a2dd;
}

.textbox_btn_lt:hover {
    background: #222236;
}

.textbox_btn:hover {
    border: 1px solid transparent;
}

.noline {
    text-decoration: none !important;
}

.multiline {
    max-width: 654px !important;
    min-width: 280px !important;
}

.btn-file {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

    .btn-file input[type="file"] {
        position: absolute;
        top: 0;
        right: 0;
        min-width: 100%;
        min-height: 100%;
        font-size: 100px;
        opacity: 0;
        cursor: pointer;
        display: block;
    }

.btn.textbox_btn_lt {
    background: #10a2dd;
    color: #fff;
    border-color: #10a2dd; 
    padding: .375rem .75rem;
    font-size: 1.0rem;
    line-height: 1.71;
    border-radius: .25em 0 0 .25em; 
}

    .btn.textbox_btn_lt:hover,
    .btn.textbox_btn_lt:focus,
    .btn.textbox_btn_lt:active,
    .btn.textbox_btn_lt.active {
        background: #0c92ca; 
        border-color: #0c92ca; 
        color: #fff;
        text-decoration: none; 
        box-shadow: none; 
    }

.tbl-container {
    margin: 10px 0 0 10px;
}

.bg-red {
    background: red;
    color: #fff;
}

.bdr {
    border-radius: 6px;
    overflow: hidden;
}

.title {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hrcentertext {
    flex: 1;
}

.linecentertext {
    padding: 0 48px;
}

.hidemodal {
    display: none !important;
}

.hrFade {
    margin: 30px 0;
    height: 1px;
    border: none;
    background: linear-gradient(90deg, transparent, black 50%, transparent);
}

.oFile::file-selector-button {
    display: none;
}

.oFile {
    width: 200px;
}

.FAClass {
    font-family: FontAwesome;
}

.hideTextBox {
    display: none;
    visibility: hidden;
}

#lb_UploadImage.disabled {
    z-index: -1;
    position: relative;
    opacity: .5;
}

progress {
    border-radius: 5px;
    width: 80%;
    height: 22px;
    box-shadow: 1px 1px 4px rgba(0,0,0,.2);
}

    progress::-webkit-progress-bar {
        background: #fff;
        border-radius: 5px;
    }

    progress::-webkit-progress-value {
        background: #358bad;
        border-radius: 5px;
    }

.custom-input-group .custom-btn-reset {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border: 1px solid #ced4da;
    padding: .375rem .75rem;
}

.custom-input-group .form-control {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-right: 0;
}

.custom-textbox {
    border: 1px solid #ced4da !important;
    box-sizing: border-box;
}

.custom-align {
    margin-top: .75rem !important;
}

.btn-outline-primary {
    border: 1px solid #0d6efd !important;
    padding: .375rem .75rem !important;
}

.btn-outline-secondary {
    border: 1px solid #6c757d !important;
    padding: .375rem .75rem !important;
}

.btn-outline-success {
    border: 1px solid #198754 !important;
    padding: .375rem .75rem !important;
}

.btn-outline-danger {
    border: 1px solid #dc3545 !important;
    padding: .375rem .75rem !important;
}

.btn-outline-warning {
    border: 1px solid #ffc107 !important;
    padding: .375rem .75rem !important;
}

.flatpickr-calendar {
    z-index: 9999 !important;
}

.flatpickr-current-month {
    position: relative;
    z-index: 10000 !important;
}

    .flatpickr-current-month .numInputWrapper {
        position: relative;
        z-index: 10001 !important;
    }

        .flatpickr-current-month .numInputWrapper input {
            z-index: 10002 !important;
            position: relative;
            background: #fff;
            border: 1px solid #ddd;
            pointer-events: auto;
        }

        .flatpickr-current-month .numInputWrapper span.arrowUp,
        .flatpickr-current-month .numInputWrapper span.arrowDown {
            z-index: 10002 !important;
            pointer-events: auto;
        }

/* Layout helpers */
.icon-col {
    width: 20px;
    display: inline-block;
}

.nohover:hover, .nohover:focus, .nohover:active {
    background: transparent !important;
    color: #fff !important;
}

/* =========================================================
   Pick-up Page (screen)
   ========================================================= */
.receipt-card {
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 16px;
    background: #fff;
}

.label {
    font-size: .8rem;
    color: #666;
}

.box {
    border: 1px solid #bbb;
    min-height: 27px;
    padding-left: 8px;
    border-radius: 8px;
    background: #fafafa;
}

.table-items th, .table-items td {
    vertical-align: top;
}

.sig-wrap {
    border: 1px dashed #999;
    border-radius: 8px;
    background: #fff;
}

/* Make page labels match table header typography */
.app-layout .label, .app-layout .form-label,
.print-layout .label, .print-layout .form-label {
    color: var(--bs-emphasis-color, #212529) !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    letter-spacing: normal;
}

/* Memo/Ship Via placement */
.memo-shipvia-wrap {
    white-space: nowrap;
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

.memo-shipvia {
    margin-top: .25rem !important;
    white-space: nowrap;
}

.nowrap, .no-wrap {
    white-space: nowrap !important;
}
/* supports both spellings used */


/* =========================================================
   Table softness (screen & print)
   ========================================================= */
.table.print-grid {
    border-color: #cacdd0 !important;
    border-width: 1px;
}

    .table.print-grid th, .table.print-grid td {
        border-color: #cacdd0 !important;
        border-width: 1px;
    }

    .table.print-grid thead th {
        background: #f9fafb !important;
        color: #212529 !important;
        border-bottom: 1px solid #e2e2e2 !important;
    }


/* Hide the print layout on screen */
.print-layout {
    display: none;
}

/* App look, shared */
.label {
    font-weight: 700;
}

.box {
    border: 1px solid #bbb;
    background: #fafafa;
    border-radius: 8px;
    min-height: 36px;
    padding: 4px 8px;
}

/* Soft grid lines by default */
.table.print-grid th, .table.print-grid td {
    border: 1px solid #cacdd0 !important;
    vertical-align: top;
    padding: 3px 6px;
    line-height: 1.25;
}

.table.print-grid thead th {
    background: #f9fafb !important;
    border: 1px solid #e2e2e2 !important;
    font-weight: 700;
}

/* ========================================================= PRINT-ONLY Multipage: repeating header/footer + paginated table ========================================================= */ /* Screen: hide print doc; show app */

.only-print {
    display: none;
}

@media print {
    @page {
        margin: 10mm;
        size: auto;
    }

    #printDoc {
        display: block !important;
    }

        #printDoc, #printDoc * {
            overflow: visible !important;
            position: static !important;
            transform: none !important;
            filter: none !important;
        }

            #printDoc .print-frame {
                border-collapse: separate !important;
            }

            #printDoc .page-break:last-child {
                display: none !important;
            }

            #printDoc .page-break {
                page-break-before: always;
                break-before: page;
            }

            #printDoc .print-frame tbody tr {
                page-break-inside: avoid;
                break-inside: avoid;
            }

            #printDoc .print-frame {
                border-collapse: separate !important;
                table-layout: fixed;
                width: 100%;
            }

            #printDoc .page-block {
                page-break-inside: avoid;
                break-inside: avoid;
            }

                #printDoc .page-block thead, #printDoc .page-block tfoot {
                    page-break-inside: avoid;
                    break-inside: avoid;
                }

            #printDoc .page-block {
                margin: 0;
            }
    /* avoid extra push from margins */

    #form1 > *:not(#printDoc) {
        display: none !important;
    }

    header, nav, .navbar, .site-header, .site-footer, .breadcrumb, .fixed-top-alert {
        display: none !important;
    }

    .no-print {
        display: none !important;
    }

    .print-frame {
        width: 100%;
        border-collapse: collapse;
        table-layout: fixed;
    }

        .print-frame thead {
            display: table-header-group !important;
        }

        .print-frame tfoot {
            display: table-footer-group !important;
        }

        .print-frame tbody {
            display: table-row-group !important;
        }

        .print-frame thead tr, .print-frame tfoot tr {
            break-inside: avoid;
            page-break-inside: avoid;
        }

        .print-frame thead *, .print-frame tfoot * {
            position: static !important;
        }

        .print-frame col.col-item {
            width: 22%;
        }

        .print-frame col.col-desc {
            width: 66%;
        }

        .print-frame col.col-qty {
            width: 12%;
        }

        .print-frame th, .print-frame td {
            padding: 2mm;
            vertical-align: top;
            border-bottom: 0.5pt solid #e5e5e5;
            font-size: 11pt;
            line-height: 1.3;
        }

        .print-frame tbody td:nth-child(3) {
            text-align: right;
            padding-right: 3mm;
        }

        .print-frame .cols-head th {
            font-size: 10.5pt;
            font-weight: 700;
            border-top: 0.8pt solid #ccc;
            border-bottom: 0.8pt solid #ccc;
        }

        .print-frame tbody td {
            font-size: 10pt;
        }

        .print-frame thead th {
            font-weight: normal;
        }

        .print-frame thead tr {
            break-inside: avoid;
            page-break-inside: avoid;
        }
    /* extra safety */

    .ph-header {
        padding: 0 0 2mm 0;
        border-bottom: none;
    }

    .ph-header-grid {
        display: table;
        width: 100%;
        table-layout: fixed;
        border-collapse: separate;
        border-spacing: 8mm 0;
    }

    .ph-left {
        display: table-cell;
        vertical-align: top;
        text-align: center;
        width: 40%;
    }

    .ph-right {
        display: table-cell;
        vertical-align: top;
        text-align: right;
        width: 60%;
    }

    .ph-logo {
        display: block;
        max-width: none !important;
        width: auto;
        height: auto;
        margin: 0 auto 1mm;
    }

    .ph-addr {
        font-size: 10pt;
        line-height: 1.2;
    }

    .ph-title {
        margin: 0 0 2mm 0;
        text-align: right;
        font-size: 18pt;
        font-weight: 700;
    }

    .ph-summaries {
        display: inline-block;
        width: auto;
    }

    .ph-box {
        display: inline-block;
        vertical-align: top;
        border: 0.5pt solid #cfcfcf;
        border-radius: 2pt;
        padding: 2mm 3mm;
        min-width: 28mm;
        text-align: center;
        margin-left: 4mm;
    }

        .ph-box:first-child {
            margin-left: 0;
        }

        .ph-box .lbl {
            display: block;
            font-weight: 600;
            font-size: 9pt;
            margin-bottom: 0.5mm;
        }

        .ph-box .val {
            font-size: 10pt;
        }

    .ph-fieldrow {
        display: flex;
        gap: 2mm;
        margin-top: 3mm;
    }

        .ph-fieldrow .f:nth-child(1) {
            flex: 0 0 47%;
        }

        .ph-fieldrow .f:nth-child(2) {
            flex: 0 0 16.6667%;
        }

        .ph-fieldrow .f:nth-child(3) {
            flex: 0 0 16.6667%;
        }

        .ph-fieldrow .f:nth-child(4) {
            flex: 0 0 16.6667%;
        }

        .ph-fieldrow .lbl {
            display: block;
            font-size: 9pt;
            font-weight: 600;
        }

        .ph-fieldrow .val {
            display: block;
            border: 0.5pt solid #ddd;
            padding: 1.5mm 2mm;
            min-height: 24pt;
        }

    .ph-meta {
        margin-top: 1mm;
        text-align: right;
        font-size: 10pt;
        padding-bottom: 7px;
        padding-top: 7px;
    }

        .ph-meta .ms {
            margin-left: 6mm;
        }

    .pf-footer {
        border-top: 0.8pt solid #ccc;
        padding-top: 7px;
    }

    .pf-wrap {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 0;
        padding-block: 10px;
    }

    .pf-center {
        grid-column: 2;
        display: grid;
        row-gap: 1.5mm;
        justify-items: start;
    }

    .pf-left {
        grid-column: 1;
        justify-self: start;
        align-self: start;
    }

    .pf-right {
        grid-column: 3;
        justify-self: end;
        align-self: end;
    }

    .pf-footer .lbl {
        font-weight: 600;
        font-size: 9pt;
    }

    .pf-footer .val {
        font-size: 10pt;
    }

    .sig-img {
        height: 14mm;
        width: auto;
        object-fit: contain;
        background: #fff;
        border: 0.5pt solid #ddd;
        padding: 0.5mm;
    }

    html, body {
        counter-reset: page;
    }

    .pageno {
        display: inline-block;
        min-width: 28mm;
        text-align: right;
        font-size: 9pt;
    }

    .print-frame tbody tr {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    /* Screen-side emulation of print rules so the measurer uses the same layout */

    .print-emulate .print-frame {
        width: 100%;
        border-collapse: separate;
        table-layout: fixed;
    }

        .print-emulate .print-frame thead {
            display: table-header-group !important;
        }

        .print-emulate .print-frame tfoot {
            display: table-footer-group !important;
        }

        .print-emulate .print-frame tbody tr {
            break-inside: avoid;
            page-break-inside: avoid;
        }

    .print-emulate .ph-logo {
        display: block;
        max-width: none !important;
        width: auto;
        height: auto;
        margin: 0 auto 1mm;
    }

    .print-emulate .ph-addr {
        font-size: 10pt;
        line-height: 1.2;
        text-align: center;
    }

    .print-emulate .ph-title {
        margin: 0 0 2mm 0;
        text-align: right;
        font-size: 18pt;
        font-weight: 700;
    }

    .print-emulate .ph-summaries {
        display: inline-block;
        width: auto;
        white-space: nowrap;
    }

    .print-emulate .ph-box {
        display: inline-block;
        vertical-align: top;
        border: 0.5pt solid #cfcfcf;
        border-radius: 2pt;
        padding: 2mm 3mm;
        min-width: 28mm;
        text-align: center;
        margin-left: 4mm;
    }

        .print-emulate .ph-box:first-child {
            margin-left: 0;
        }

        .print-emulate .ph-box .lbl {
            display: block;
            font-weight: 600;
            font-size: 9pt;
            margin-bottom: 0.5mm;
        }

        .print-emulate .ph-box .val {
            font-size: 10pt;
        }

    .print-emulate .ph-fieldrow {
        display: flex;
        gap: 3mm;
        margin-top: 3mm;
    }

        .print-emulate .ph-fieldrow .f:nth-child(1) {
            flex: 0 0 50%;
        }

        .print-emulate .ph-fieldrow .f:nth-child(2), .print-emulate .ph-fieldrow .f:nth-child(3), .print-emulate .ph-fieldrow .f:nth-child(4) {
            flex: 0 0 16.6667%;
        }

        .print-emulate .ph-fieldrow .lbl {
            display: block;
            font-size: 9pt;
            font-weight: 600;
        }

        .print-emulate .ph-fieldrow .val {
            display: block;
            border: 0.5pt solid #ddd;
            padding: 1.5mm 2mm;
            min-height: 10pt;
        }

    .print-emulate .ph-meta {
        text-align: right;
        font-size: 10pt;
        padding: 2mm 0;
    }

    .print-emulate .pf-footer {
        border-top: 0.8pt solid #ccc;
        padding-top: 7px;
    }

    .print-emulate .pf-wrap {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 0;
    }

    .print-emulate .pf-left {
        grid-column: 1;
        justify-self: start;
    }

    .print-emulate .pf-center {
        grid-column: 2;
        display: grid;
        row-gap: 1.5mm;
        justify-items: start;
    }

    .print-emulate .pf-right {
        grid-column: 3;
        justify-self: end;
    }
    /* your cell fonts/borders */

    .print-emulate .print-frame th, .print-emulate .print-frame td {
        padding: 2mm;
        vertical-align: top;
        border-bottom: 0.5pt solid #e5e5e5;
        font-size: 11pt;
        line-height: 1.3;
    }

    .print-emulate .print-frame .cols-head th {
        font-size: 10.5pt;
        font-weight: 700;
        border-top: 0.8pt solid #ccc;
        border-bottom: 0.8pt solid #ccc;
    }

    .print-emulate .print-frame tbody td:nth-child(3) {
        text-align: right;
        padding-right: 3mm;
    }
}

/* =========================================================
   PRINT-ONLY
   Multipage: repeating header/footer + paginated table
   ========================================================= */
/* Screen: hide print doc; show app */
.only-print { display: none; }

@media print {
  @page { margin: 10mm; size: auto; }
  #printDoc { display: block !important; }
  #printDoc, #printDoc * { overflow: visible !important; position: static !important; transform: none !important; filter: none !important; }
  #printDoc .print-frame { border-collapse: separate !important; }

  #printDoc .page-break:last-child { display: none !important; }
  #printDoc .page-break { page-break-before: always; break-before: page; }
  #printDoc .print-frame tbody tr { page-break-inside: avoid; break-inside: avoid; }
  #printDoc .print-frame { border-collapse: separate !important; table-layout: fixed; width: 100%; }

  #printDoc .page-block { page-break-inside: avoid; break-inside: avoid; }
  #printDoc .page-block thead, #printDoc .page-block tfoot { page-break-inside: avoid; break-inside: avoid; }
  #printDoc .page-block { margin: 0; } /* avoid extra push from margins */

  /* Hide app chrome the safe way */
  header, nav, .navbar, .site-header, .site-footer, .breadcrumb, .fixed-top-alert,
  .no-print, .app-layout { display: none !important; }

  .print-frame { width: 100%; border-collapse: collapse; table-layout: fixed; }
  .print-frame thead { display: table-header-group !important; }
  .print-frame tfoot { display: table-footer-group !important; }
  .print-frame tbody { display: table-row-group !important; }
  .print-frame thead tr, .print-frame tfoot tr { break-inside: avoid; page-break-inside: avoid; }
  .print-frame thead *, .print-frame tfoot * { position: static !important; }

  .print-frame col.col-item { width: 22%; }
  .print-frame col.col-desc { width: 66%; }
  .print-frame col.col-qty  { width: 12%; }

  .print-frame th, .print-frame td { padding: 2mm; vertical-align: top; border-bottom: 0.5pt solid #e5e5e5; font-size: 11pt; line-height: 1.3; }
  .print-frame tbody td:nth-child(3) { text-align: right; padding-right: 3mm; }
  .print-frame .cols-head th { font-size: 10.5pt; font-weight: 700; border-top: 0.8pt solid #ccc; border-bottom: 0.8pt solid #ccc; }
  .print-frame tbody td { font-size: 10pt; }

  .print-frame thead th { font-weight: normal; } 
  .print-frame thead tr { break-inside: avoid; page-break-inside: avoid; }  /* extra safety */

  .ph-header { padding: 0 0 2mm 0; border-bottom: none; }
  .ph-header-grid { display: table; width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 8mm 0; }
  .ph-left  { display: table-cell; vertical-align: top; text-align: center; width: 40%; }
  .ph-right { display: table-cell; vertical-align: top; text-align: right;  width: 60%; }
  .ph-logo { display: block; max-width: none !important; width: auto; height: auto; margin: 0 auto 1mm; }
  .ph-addr { font-size: 10pt; line-height: 1.2; }
  .ph-title { margin: 0 0 2mm 0; text-align: right; font-size: 18pt; font-weight: 700; }
  .ph-summaries { display: inline-block; width: auto; }
  .ph-box { display: inline-block; vertical-align: top; border: 0.5pt solid #cfcfcf; border-radius: 2pt; padding: 2mm 3mm; min-width: 28mm; text-align: center; margin-left: 4mm; }
  .ph-box:first-child { margin-left: 0; }
  .ph-box .lbl { display: block; font-weight: 600; font-size: 9pt; margin-bottom: 0.5mm; }
  .ph-box .val { font-size: 10pt; }

  .ph-fieldrow { display: flex; gap: 2mm; margin-top: 3mm; }
  .ph-fieldrow .f:nth-child(1) { flex: 0 0 47%; }
  .ph-fieldrow .f:nth-child(2) { flex: 0 0 16.6667%; }
  .ph-fieldrow .f:nth-child(3) { flex: 0 0 16.6667%; }
  .ph-fieldrow .f:nth-child(4) { flex: 0 0 16.6667%; }
  .ph-fieldrow .lbl { display: block; font-size: 9pt; font-weight: 600; }
  .ph-fieldrow .val { display: block; border: 0.5pt solid #ddd; padding: 1.5mm 2mm; min-height: 24pt; }

  .ph-fieldrow-table { width: 100%; table-layout: fixed; border-collapse: collapse; }
  .ph-fieldrow-table td { vertical-align: top; padding: 4mm; }
  .ph-fieldrow-table .lbl { display: block; font-weight: 600; font-size: 9pt; margin-bottom: 1mm; }
  .ph-fieldrow-table .val { display: block; border: 0.5pt solid #ddd; padding: 1.5mm 2mm; min-height: 24pt; box-sizing: border-box; overflow-wrap: anywhere; word-break: break-word; }

  .ph-meta { margin-top: 1mm; text-align: right; font-size: 10pt; padding-bottom: 7px; padding-top: 7px; }
  .ph-meta .ms { margin-left: 6mm; }

  .pf-footer { border-top: 0.8pt solid #ccc; padding-top: 7px;}
  .pf-wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0; padding-block: 10px;}
  .pf-center { grid-column: 2; display: grid; row-gap: 1.5mm; justify-items: start; }
  .pf-left { grid-column: 1; justify-self: start; align-self: start;}
  .pf-right { grid-column: 3; justify-self: end; align-self: end;}
  .pf-footer .lbl { font-weight: 600; font-size: 9pt; }
  .pf-footer .val { font-size: 10pt; }
  .sig-img { height: 14mm; width: auto; object-fit: contain; background: #fff; border: 0.5pt solid #ddd; padding: 0.5mm; }

.footer-table { margin: 0 auto; margin-top: 20px !important; border-collapse: collapse !important; }
.footer-cell { vertical-align: top; text-align: left; padding: 0 !important; margin: 0 !important; border: none !important; }
.pad-left { padding-left: 11mm !important; }
.footer-label { font-weight: bold; font-size: 10pt; }
.footer-value { font-size: 10pt; display: block; }
.sig-img { height: 14mm; width: auto; object-fit: contain; background: #fff; border: 0.5pt solid #ddd; padding: 0.5mm; }

  html, body { counter-reset: page; }
  .pageno { display: inline-block; min-width: 28mm; text-align: right; font-size: 9pt; }

  .print-frame tbody tr { break-inside: avoid; page-break-inside: avoid; }

  /* Screen-side emulation of print rules so the measurer uses the same layout */
  .print-emulate .print-frame{ width:100%; border-collapse:separate; table-layout:fixed; }
  .print-emulate .print-frame thead{ display:table-header-group !important; }
  .print-emulate .print-frame tfoot{ display:table-footer-group !important; }
  .print-emulate .print-frame tbody tr{ break-inside:avoid; page-break-inside:avoid; }
  .print-emulate .ph-logo{ display:block; max-width:none !important; width:auto; height:auto; margin:0 auto 1mm; }
  .print-emulate .ph-addr{ font-size:10pt; line-height:1.2; text-align:center; }
  .print-emulate .ph-title{ margin:0 0 2mm 0; text-align:right; font-size:18pt; font-weight:700; }
  .print-emulate .ph-summaries{ display:inline-block; width:auto; white-space:nowrap; }
  .print-emulate .ph-box{ display:inline-block; vertical-align:top; border:0.5pt solid #cfcfcf; border-radius:2pt; padding:2mm 3mm; min-width:28mm; text-align:center; margin-left:4mm; }
  .print-emulate .ph-box:first-child{ margin-left:0; }
  .print-emulate .ph-box .lbl{ display:block; font-weight:600; font-size:9pt; margin-bottom:0.5mm; }
  .print-emulate .ph-box .val{ font-size:10pt; }
  .print-emulate .ph-fieldrow{ display:flex; gap:3mm; margin-top:3mm; }
  .print-emulate .ph-fieldrow .f:nth-child(1){ flex:0 0 50%; }
  .print-emulate .ph-fieldrow .f:nth-child(2),
  .print-emulate .ph-fieldrow .f:nth-child(3),
  .print-emulate .ph-fieldrow .f:nth-child(4){ flex:0 0 16.6667%; }
  .print-emulate .ph-fieldrow .lbl{ display:block; font-size:9pt; font-weight:600; }
  .print-emulate .ph-fieldrow .val{ display:block; border:0.5pt solid #ddd; padding:1.5mm 2mm; min-height:10pt; }
  .print-emulate .ph-meta{ text-align:right; font-size:10pt; padding:2mm 0; }
  .print-emulate .pf-footer{ border-top:0.8pt solid #ccc; padding-top:7px; }
  .print-emulate .pf-wrap{ display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:0; }
  .print-emulate .pf-left{ grid-column:1; justify-self:start; }
  .print-emulate .pf-center{ grid-column:2; display:grid; row-gap:1.5mm; justify-items:start; }
  .print-emulate .pf-right{ grid-column:3; justify-self:end; }
  .print-emulate .print-frame th,.print-emulate .print-frame td{ padding:2mm; vertical-align:top; border-bottom:0.5pt solid #e5e5e5; font-size:11pt; line-height:1.3; }
  .print-emulate .print-frame .cols-head th{ font-size:10.5pt; font-weight:700; border-top:0.8pt solid #ccc; border-bottom:0.8pt solid #ccc; }
  .print-emulate .print-frame tbody td:nth-child(3){ text-align:right; padding-right:3mm; }
}
