/* ARES PHE — Plate Arrangement modal: REPORT / ARRANGEMENT views (static/plate_report.js).
 *
 * Vanilla port of the Tailwind classes used by the standalone report (v30). Every class is
 * prefixed `pa-` and everything renders inside #pa-modal-content (or the print window's
 * body.pa-print-doc). Tailwind sizes are kept in px: text-xs 12px, text-[10px], py-1 4px,
 * px-2 8px, rounded 4px, ... Palette: blue-950 #172554, blue-900 #1e3a8a, blue-800 #1e40af,
 * blue-700 #1d4ed8, blue-600 #2563eb, blue-400 #60a5fa, blue-300 #93c5fd, blue-50 #eff6ff,
 * green-50 #f0fdf4, orange-50 #fff7ed, yellow-50 #fefce8, red-600 #dc2626, purple-700
 * #7e22ce, slate-50 #f8fafc / 200 #e2e8f0 / 300 #cbd5e1 / 500 #64748b / 600 #475569 / 800
 * #1e293b, gray-50 #f9fafb / 100 #f3f4f6 / 200 #e5e7eb / 400 #9ca3af / 500 #6b7280 / 600
 * #4b5563.
 *
 * NOTE: no @page rule here on purpose — it would override the datasheet's print margins in
 * the main page. The print window gets its own @page from PlateReport.PRINT_DOC_CSS.
 */

/* v4.265 (owner 2026-10-26: the downloaded PDF must look like the window): the report's own font travels with the
   app - Inter (SIL Open Font License, static/fonts/OFL.txt) - so the window, Print Report and the documents zip's PDF
   draw the same letters on every machine; the server's browser has no Segoe UI and fell back to a wider font.
   latin-ext carries the Turkish letters. */
@font-face { font-family: "PA Inter"; font-style: normal; font-weight: 400; font-display: block;
    src: url("/static/fonts/Inter-400.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "PA Inter"; font-style: normal; font-weight: 400; font-display: block;
    src: url("/static/fonts/Inter-400-ext.woff2") format("woff2");
    unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "PA Inter"; font-style: normal; font-weight: 600; font-display: block;
    src: url("/static/fonts/Inter-600.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "PA Inter"; font-style: normal; font-weight: 600; font-display: block;
    src: url("/static/fonts/Inter-600-ext.woff2") format("woff2");
    unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "PA Inter"; font-style: normal; font-weight: 700 900; font-display: block;
    src: url("/static/fonts/Inter-700.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "PA Inter"; font-style: normal; font-weight: 700 900; font-display: block;
    src: url("/static/fonts/Inter-700-ext.woff2") format("woff2");
    unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ── Modal tab bar + REPORT toolbar ─────────────────────────────────────────────── */
.pa-tabs { display: flex; align-items: center; border-bottom: 1px solid #e5e7eb; background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.05); margin-bottom: 12px; overflow-x: auto; }
.pa-tab { padding: 8px 16px; font-size: 12px; font-weight: 700; border: 0; border-bottom: 2px solid transparent;
    background: transparent; color: #9ca3af; cursor: pointer; white-space: nowrap; font-family: inherit;
    line-height: 16px; border-radius: 0; }
.pa-tab:hover { color: #4b5563; }
.pa-tab-report.pa-tab-active { border-bottom-color: #ea580c; color: #c2410c; background: #fff7ed; }
.pa-tab-arrangement.pa-tab-active { border-bottom-color: #16a34a; color: #15803d; background: #f0fdf4; }

.pa-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-bottom: 12px; }
.pa-toolbar-label { font-size: 12px; font-weight: 600; color: #64748b; }
.pa-lang-toggle { display: inline-flex; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; padding: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.pa-lang-btn { padding: 4px 12px; font-size: 12px; font-weight: 700; border: 0; border-radius: 6px; background: transparent;
    color: #475569; cursor: pointer; font-family: inherit; line-height: 16px; }
.pa-lang-btn:hover { background: #f1f5f9; }
.pa-lang-btn.pa-lang-active { background: #1d4ed8; color: #fff; }
.pa-print-btn { background: #1d4ed8; color: #fff; padding: 6px 12px; border: 0; border-radius: 4px; font-size: 12px;
    font-weight: 700; cursor: pointer; font-family: inherit; line-height: 16px; margin-left: 8px; }
.pa-print-btn:hover { background: #1e40af; }

/* ── Neutral notice (steam deferred / generator error) ───────────────────────────── */
.pa-notice { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 4px; padding: 12px 14px;
    font-size: 12px; color: #475569; }

/* ── REPORT unit ────────────────────────────────────────────────────────────────── */
.pa-report-unit { border: 1px solid #e5e7eb; border-radius: 4px; padding: 16px; margin-bottom: 24px; background: #fff;
    color: #111827; font-size: 14px; line-height: 1.4;
    font-family: "PA Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.pa-report-unit * { box-sizing: border-box; }
.pa-print-only { display: none; }
.pa-print-page-header { font-size: 11px; font-weight: 800; color: #0f172a; border-bottom: 1px solid #cbd5e1;
    padding: 0 0 4px 0; margin: 0 0 6px 0; text-align: right; }

.pa-title-bar { background: #172554; color: #fff; padding: 10px 16px; border-radius: 4px; display: flex;
    justify-content: space-between; align-items: center; margin-bottom: 10px; }
.pa-title { font-weight: 800; font-size: 15px; letter-spacing: 0.04em; text-transform: uppercase; }
.pa-title-right { color: #93c5fd; font-size: 12px; font-weight: 700; display: inline-flex; gap: 12px; align-items: center; }
.pa-item-ref { color: #bfdbfe; font-weight: 600; }
.pa-item-tag { color: #bfdbfe; font-weight: 600; }   /* v4.244: the item's tag beside its number */
.pa-model-title { background: #eff6ff; padding: 8px 12px; border-radius: 4px; font-weight: 700; color: #1e3a8a;
    margin-bottom: 12px; word-break: break-word; }

.pa-meta-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; row-gap: 2px; font-size: 12px;
    margin-bottom: 12px; }
.pa-meta-row { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; border-bottom: 1px solid #f3f4f6;
    min-width: 0; }
.pa-meta-span2 { grid-column: 1 / -1; }
.pa-meta-label { color: #6b7280; font-weight: 600; flex-shrink: 0; }
.pa-report-value, .pa-ports-value { font-weight: 700; color: #1e3a8a; text-align: right; min-width: 0; word-break: break-word; }
.pa-extra-ports { font-weight: 700; color: #7e22ce; }

.pa-section-title { background: #1e40af; color: #fff; font-size: 12px; font-weight: 700; padding: 4px 12px;
    border-radius: 4px 4px 0 0; }
.pa-mt-2 { margin-top: 8px; }
.pa-mt-3 { margin-top: 12px; }
.pa-mb-3 { margin-bottom: 12px; }

/* Tables: override the app's global table/thead rules (sticky primary-coloured thead). */
.pa-table { width: 100%; font-size: 12px; border: 1px solid #e5e7eb; border-collapse: collapse; color: #111827; }
.pa-table thead { position: static; background: transparent; color: inherit; z-index: auto; }
.pa-table thead tr { background: #2563eb; color: #fff; }
.pa-table th { padding: 4px 8px; font-weight: 700; text-align: center; border: 0; }
/* Headings sit over their column's text: text columns left, code/qty columns centred. */
.pa-table th.pa-th-left { text-align: left; }
.pa-summary-table td { padding: 2px 8px; }
.pa-table td { border: 0; border-bottom: 1px solid #e5e7eb; vertical-align: middle; }
.pa-w-14 { width: 56px; }
.pa-w-20 { width: 80px; }
.pa-w-24 { width: 96px; }
.pa-w-28 { width: 112px; }
.pa-row-green { background: #f0fdf4; }
.pa-row-yellow { background: #fefce8; font-weight: 600; }
.pa-row-sep td { height: 8px; padding: 0; border-bottom: 1px solid #e5e7eb; }
.pa-pack-table td { padding: 4px 8px; }
.pa-td-code { font-weight: 700; color: #1e3a8a; }
.pa-td-desc { color: #4b5563; }
.pa-td-qty { font-weight: 700; color: #1e3a8a; text-align: center; }
.pa-summary-table td { padding: 2px 8px; }
.pa-sum-label { color: #1e3a8a; font-weight: 600; white-space: pre; }
.pa-sum-no { text-align: center; font-weight: 700; }
.pa-sum-code { text-align: center; font-weight: 700; color: #1e3a8a; }
.pa-sum-desc { color: #6b7280; }

.pa-code { cursor: help; text-decoration: underline dotted #60a5fa; text-underline-offset: 2px; }

.pa-arrangement-print-box { border: 1px solid #e5e7eb; border-top: 0; border-radius: 0 0 4px 4px; padding: 8px;
    overflow-x: auto; background: #fff; break-inside: avoid; }
.pa-arr-svg { display: block; }

/* ── Plate illustration (PlateImg) ──────────────────────────────────────────────── */
.pa-plate { display: flex; flex-direction: column; align-items: center; }
.pa-plate-frame { background: #fff; border-radius: 12px; border: 1px solid #e2e8f0; box-shadow: 0 1px 2px rgba(0,0,0,.05);
    padding: 8px; }
.pa-plate-box { position: relative; }
.pa-plate-img { width: 100%; height: 100%; object-fit: fill; display: block; user-select: none; }
.pa-plate-overlay { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
/* responsive.css (phone / tablet) forces `#pa-modal-content img { height:auto !important;
   max-height:... }` for the legacy reference PNGs. The plate illustration must keep filling
   its 220x693 box or the port overlay drifts — same id-scoped selector, higher specificity. */
#pa-modal-content .pa-plate-img { width: 100% !important; height: 100% !important; max-height: none !important; max-width: none !important; }
.pa-plate-code { font-size: 10px; font-weight: 700; color: #1e3a8a; margin-top: 4px; text-align: center; }

/* Hover popup (one shared element, appended to body). */
.pa-plate-popup { position: fixed; z-index: 10050; background: #fff; border: 2px solid #60a5fa; border-radius: 8px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,.25); padding: 8px; display: flex; gap: 12px; pointer-events: none;
    font-family: "PA Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }

/* ── Plate gallery (second print page) ──────────────────────────────────────────── */
.pa-report-plates-page { margin-top: 12px; }
.pa-gallery { break-inside: avoid; }
.pa-gallery-body { border: 1px solid #e5e7eb; border-top: 0; border-radius: 0 0 4px 4px; padding: 12px; background: #fff; }
.pa-plate-gallery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; justify-items: center; }
/* Owner, 2026-09-20: the column count follows the number of plate types (plate_report.js
   galleryColumns), so five types sit in one row instead of stranding the fifth alone on a
   second one. The card keeps width:100% and only a max-width, so it shrinks to its column. */
.pa-plate-gallery-grid.pa-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.pa-plate-gallery-grid.pa-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pa-plate-gallery-grid.pa-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pa-plate-gallery-grid.pa-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pa-plate-gallery-grid.pa-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.pa-plate-card { width: 100%; max-width: 160px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,.05); padding: 12px; display: flex; flex-direction: column; align-items: center; }
.pa-card-code { font-size: 11px; font-weight: 700; color: #1e3a8a; margin-top: 4px; text-align: center; word-break: break-all; }
.pa-card-start { font-size: 9px; font-weight: 700; color: #7e22ce; letter-spacing: .025em; margin-top: 2px; }
.pa-card-type { font-size: 9px; font-weight: 600; color: #64748b; margin-top: 2px; }
/* Owner, 2026-10-10: "those sections must be larger and in bold so the production can see better" ... "remove pcs
   ... only show numbers in large". The pieces of a type are the number alone, the card's largest text, in a
   highlighter box: a light amber fill with a dark amber frame and a near-black bold figure - readable on a
   black-and-white printout too, where the fill may drop but the frame and the bold number stay. */
.pa-card-count { display: inline-flex; align-items: center; justify-content: center; min-width: 56px; margin-top: 8px;
    padding: 2px 14px; box-sizing: border-box; border: 2px solid #b45309; border-radius: 999px; background: #fef3c7;
    color: #111827; font-size: 26px; font-weight: 800; line-height: 1.15; white-space: nowrap;
    -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.pa-plate-gallery-legend { margin-top: 12px; border-top: 1px solid #e2e8f0; padding-top: 8px; }
.pa-legend-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; row-gap: 6px; }
.pa-legend-item { font-size: 10px; line-height: 1.375; color: #475569; }
.pa-legend-title { font-weight: 800; color: #1e293b; }

/* ── ARRANGEMENT tab ────────────────────────────────────────────────────────────── */
.pa-arr-wrap { background: #fff; border: 1px solid #e5e7eb; border-radius: 4px; overflow: hidden;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.pa-arr-header { background: #1e40af; color: #fff; font-size: 14px; font-weight: 700; padding: 6px 12px; }
.pa-arr-scroll { max-height: 60vh; overflow-y: auto; }
/* 2026-11-02: side-by-side columns - each column its own table; screen blocks wrap left to right (at most four a row,
   fewer on a narrow window), a print page is ARR_PRINT_COLS columns (plate_report.js). The ARRANGEMENT tab has no
   inner scroll box: the window scrolls, the columns run to its bottom. */
.pa-arr-wrap .pa-arr-scroll { max-height: none; overflow: visible; }
.pa-arr-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(max(200px, calc((100% - 30px) / 4)), 1fr));
    gap: 10px; padding: 8px; align-items: start; }
.pa-arr-cols .pa-arr-table, .pa-arr-page .pa-arr-table { table-layout: fixed; }
.pa-arr-cols .pa-arr-table { border: 1px solid #e5e7eb; }
.pa-arr-cols th, .pa-arr-page th { white-space: nowrap; overflow: hidden; }
.pa-arr-page { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 6px; align-items: start; }
.pa-arr-page + .pa-arr-page { margin-top: 10px; }
/* narrow No / Plate Code so "Başlangıç Plakası" stays on one line: a wrapped row is taller and a print page is counted
   in rows */
.pa-arr-cols .pa-w-14 { width: 28px; }
.pa-arr-cols .pa-w-28 { width: 64px; }
.pa-arr-page .pa-w-14 { width: 24px; }
.pa-arr-page .pa-w-28 { width: 62px; }
.pa-arr-cols .pa-arr-desc, .pa-arr-page .pa-arr-desc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    padding-left: 6px !important; padding-right: 2px !important; }
.pa-arr-cols th.pa-th-left, .pa-arr-page th.pa-th-left { padding-left: 8px; }
.pa-arr-cols .pa-arr-desc { font-size: 11px; }
.pa-arr-page .pa-arr-desc { padding-left: 5px !important; padding-right: 2px !important; }
.pa-arr-page th { padding-left: 2px; padding-right: 2px; }
.pa-arr-page th.pa-th-left { padding-left: 5px; }
.pa-arr-table { width: 100%; font-size: 14px; border-collapse: collapse; color: #111827; }
.pa-arr-table thead { position: sticky; top: 0; z-index: 1; background: #2563eb; color: #fff; }
.pa-arr-table thead tr { background: #2563eb; color: #fff; font-size: 12px; }
.pa-arr-table th { padding: 6px 8px; font-weight: 700; text-align: center; border: 0; }
.pa-arr-table th.pa-th-left { text-align: left; padding-left: 12px; }
.pa-arr-table td { border: 0; border-bottom: 1px solid #f3f4f6; padding: 2px 0; }
.pa-arr-pass { background: #fff7ed; }
.pa-arr-end { background: #eff6ff; }
.pa-arr-plain:hover { background: #f9fafb; }
.pa-arr-no { text-align: center; color: #6b7280; }
.pa-arr-code { text-align: center; font-weight: 700; color: #1e3a8a; }
.pa-arr-desc { color: #6b7280; padding-left: 12px !important; font-size: 12px; }
/* Printable arrangement document (renderArrangementDoc): no scroll box, repeating thead. */
.pa-arr-doc .pa-arr-table { font-size: 12px; border: 1px solid #e5e7eb; }
.pa-arr-doc .pa-arr-table thead { position: static; }
.pa-arr-doc .pa-arr-table td { padding: 2px 8px; }
.pa-arr-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12px; color: #374151; font-weight: 600; margin-bottom: 10px; }

/* ── Print (A4 portrait; the print window adds @page + body rules) ──────────────── */
@media print {
    .pa-print-hidden { display: none !important; }
    .pa-report-unit { border: 0 !important; border-radius: 0 !important; padding: 0 !important; margin: 0 !important;
        background: #fff !important; break-inside: auto !important; page-break-inside: auto !important; }
    /* 2026-10-29 (owner: "plate arrangement also 1 page"): the report and its plate type gallery print on ONE page -
       the gallery follows the drawing (one compact row of cards), the page header of the old second page is gone (the
       title bar above carries the same name), and a unit still taller than its page is scaled to fit it
       (PlateReport.fitForPrint: --pa-print-fit), never below 0.80 - a unit still too tall at that runs onto a second
       page rather than print too small. Inside a scaled unit the piece counts stay 18 px and no text goes under
       about 7 px on paper: those sizes are divided by the scale (the block at the end of this @media print). */
    .pa-report-unit { zoom: var(--pa-print-fit, 1); }
    .pa-report-main-page { break-after: auto !important; page-break-after: auto !important; }
    .pa-report-plates-page { break-after: auto; page-break-after: auto; margin-top: 0; break-inside: avoid; }
    .pa-report-plates-page .pa-print-page-header { display: none !important; }
    .pa-print-only { display: block !important; }

    /* Common print layout */
    .pa-report-main-page { line-height: 1.17 !important; }
    .pa-report-main-page .pa-title-bar { padding: 7px 10px !important; margin-bottom: 7px !important; }
    .pa-report-main-page .pa-title { font-size: 13px !important; }
    .pa-report-main-page .pa-title-right { font-size: 10px !important; }
    .pa-arr-doc .pa-title { font-size: 13px !important; }
    .pa-arr-doc .pa-arr-table thead { display: table-header-group; }
    .pa-arr-doc .pa-arr-table tr { break-inside: avoid; page-break-inside: avoid; }
    .pa-arr-doc .pa-arr-page { break-inside: avoid; page-break-inside: avoid; }
    .pa-arr-doc .pa-arr-page + .pa-arr-page { break-before: page; page-break-before: always; margin-top: 0; }
    .pa-arr-doc .pa-arr-page td.pa-arr-desc { font-size: 8.5px; }
    .pa-arr-doc .pa-arr-page td.pa-arr-no, .pa-arr-doc .pa-arr-page td.pa-arr-code { padding-left: 2px !important; padding-right: 2px !important; }
    .pa-arr-doc .pa-arr-table td, .pa-arr-doc .pa-arr-table th { padding-top: 1.5px !important; padding-bottom: 1.5px !important; font-size: 10px; }
    .pa-report-main-page .pa-model-title { padding: 6px 8px !important; margin-bottom: 7px !important;
        font-size: 11px !important; line-height: 1.15 !important; }
    .pa-report-main-page .pa-model-title.pa-model-title-long { font-size: 9.6px !important; }
    .pa-report-main-page .pa-mt-2 { margin-top: 5px !important; }
    .pa-report-main-page .pa-mt-3 { margin-top: 6px !important; }
    .pa-report-main-page .pa-mb-3, .pa-report-main-page .pa-meta-grid { margin-bottom: 7px !important; }
    .pa-report-main-page th, .pa-report-main-page td { padding-top: 1.5px !important; padding-bottom: 1.5px !important; }
    .pa-report-main-page table { line-height: 1.12 !important; }
    .pa-report-main-page .pa-report-value { font-size: 9.2px !important; }
    .pa-report-main-page .pa-print-fit-sm { font-size: 8.5px !important; }
    .pa-report-main-page .pa-print-fit-xs { font-size: 7.8px !important; }
    .pa-report-main-page .pa-ports-value { font-size: 9px !important; }
    .pa-report-main-page .pa-ports-value.pa-ports-long { font-size: 8.2px !important; }
    /* v4.265: the label is the value's size, as in the window (12px both): the printed values shrink to 9.2px, and the
       labels used to stay 12px - large and grey beside them (owner 2026-10-26, the zip's PDF). */
    .pa-report-main-page .pa-meta-label { font-size: 9.2px !important; }
    .pa-report-main-page .pa-pack-table th:nth-child(1) { width: 34% !important; }
    .pa-report-main-page .pa-pack-table th:nth-child(2) { width: 50% !important; }
    .pa-report-main-page .pa-pack-table th:nth-child(3) { width: 16% !important; }
    .pa-report-main-page .pa-summary-table th:nth-child(1) { width: 18% !important; }
    .pa-report-main-page .pa-summary-table th:nth-child(2) { width: 8% !important; }
    .pa-report-main-page .pa-summary-table th:nth-child(3) { width: 22% !important; }
    .pa-report-main-page .pa-summary-table th:nth-child(4) { width: 52% !important; }

    /* Adaptive density: keep short reports large, compress only when needed */
    .pa-report-normal { font-size: 9.5px !important; }
    .pa-report-normal table { font-size: 9.1px !important; }
    .pa-report-normal .pa-arrangement-print-box { max-height: 72mm !important; padding: 1.8mm !important; overflow: hidden !important; }
    .pa-report-normal .pa-arrangement-print-box svg { width: 100% !important; height: auto !important; max-height: 68mm !important; display: block !important; }

    .pa-report-medium { font-size: 9.1px !important; }
    .pa-report-medium table { font-size: 8.7px !important; }
    .pa-report-medium .pa-arrangement-print-box { max-height: 66mm !important; padding: 1.6mm !important; overflow: hidden !important; }
    .pa-report-medium .pa-arrangement-print-box svg { width: 100% !important; height: auto !important; max-height: 62mm !important; display: block !important; }

    .pa-report-dense { font-size: 8.8px !important; }
    .pa-report-dense table { font-size: 8.35px !important; }
    .pa-report-dense th, .pa-report-dense td { padding-top: 1px !important; padding-bottom: 1px !important; }
    .pa-report-dense .pa-arrangement-print-box { max-height: 60mm !important; padding: 1.4mm !important; overflow: hidden !important; }
    .pa-report-dense .pa-arrangement-print-box svg { width: 100% !important; height: auto !important; max-height: 56mm !important; display: block !important; }

    .pa-report-plates-page .pa-plate-gallery-grid.pa-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
    .pa-report-plates-page .pa-plate-gallery-grid.pa-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .pa-report-plates-page .pa-plate-gallery-grid.pa-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
    .pa-report-plates-page .pa-plate-gallery-grid.pa-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
    .pa-report-plates-page .pa-plate-gallery-grid.pa-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; gap: 3mm !important; }
    .pa-report-plates-page .pa-plate-gallery-grid { gap: 2mm !important; }
    /* the compact gallery: up to eight cards a row (renderGallery's pa-print-cols-N), the plate drawn at about half its
       window size - the port numbers and the chevrons stay readable */
    .pa-report-plates-page .pa-plate-gallery-grid[class*="pa-print-cols-"] { grid-template-columns: repeat(var(--pa-print-cols, 4), minmax(0, 1fr)) !important; }
    .pa-report-plates-page .pa-plate-gallery-grid.pa-print-cols-1 { --pa-print-cols: 1; }
    .pa-report-plates-page .pa-plate-gallery-grid.pa-print-cols-2 { --pa-print-cols: 2; }
    .pa-report-plates-page .pa-plate-gallery-grid.pa-print-cols-3 { --pa-print-cols: 3; }
    .pa-report-plates-page .pa-plate-gallery-grid.pa-print-cols-4 { --pa-print-cols: 4; }
    .pa-report-plates-page .pa-plate-gallery-grid.pa-print-cols-5 { --pa-print-cols: 5; }
    .pa-report-plates-page .pa-plate-gallery-grid.pa-print-cols-6 { --pa-print-cols: 6; }
    .pa-report-plates-page .pa-plate-gallery-grid.pa-print-cols-7 { --pa-print-cols: 7; }
    .pa-report-plates-page .pa-plate-gallery-grid.pa-print-cols-8 { --pa-print-cols: 8; }
    .pa-report-plates-page .pa-plate-card { max-width: 24mm !important; padding: 1mm !important; box-shadow: none !important;
        border-radius: 6px !important; }
    .pa-report-plates-page .pa-plate-card .pa-plate { zoom: 0.52; }
    .pa-report-plates-page .pa-card-code { font-size: 8px !important; margin-top: 1px !important; }
    .pa-report-plates-page .pa-card-start, .pa-report-plates-page .pa-card-type { font-size: 7px !important; margin-top: 0 !important; }
    .pa-report-plates-page .pa-gallery-body { padding: 2mm !important; }
    .pa-report-plates-page .pa-plate-gallery-legend { margin-top: 1.5mm !important; padding-top: 1mm !important; }
    .pa-report-plates-page .pa-legend-grid { row-gap: 1px !important; column-gap: 4mm !important; }
    .pa-report-plates-page .pa-legend-item { font-size: 7px !important; line-height: 1.2 !important; }
    /* the printed card keeps the count the biggest text on it (owner, 2026-10-10) */
    .pa-report-plates-page .pa-card-count { font-size: 18px !important; line-height: 1.15 !important; margin-top: 1.5mm !important;
        min-width: 11mm !important; padding: .4mm 3mm !important; border-width: .5mm !important; }

    /* Review 2026-10-29: the sizes a scaled unit (--pa-print-fit, at least 0.80) keeps on paper - each divided by the
       scale: the piece counts exactly 18 px (owner, 2026-10-10), every smaller text at least 7 px. A unit that is
       not scaled (--pa-print-fit unset = 1) prints the sizes above unchanged. */
    .pa-report-unit .pa-report-plates-page .pa-card-count { font-size: calc(18px / var(--pa-print-fit, 1)) !important; }
    .pa-report-unit .pa-report-plates-page .pa-legend-item,
    .pa-report-unit .pa-report-plates-page .pa-card-start,
    .pa-report-unit .pa-report-plates-page .pa-card-type { font-size: max(7px, calc(7px / var(--pa-print-fit, 1))) !important; }
    .pa-report-unit .pa-report-plates-page .pa-card-code { font-size: max(8px, calc(7px / var(--pa-print-fit, 1))) !important; }
    .pa-report-unit .pa-report-main-page .pa-print-fit-sm { font-size: max(8.5px, calc(7px / var(--pa-print-fit, 1))) !important; }
    .pa-report-unit .pa-report-main-page .pa-print-fit-xs { font-size: max(7.8px, calc(7px / var(--pa-print-fit, 1))) !important; }
    .pa-report-unit .pa-report-main-page .pa-ports-value.pa-ports-long { font-size: max(8.2px, calc(7px / var(--pa-print-fit, 1))) !important; }
    .pa-report-unit .pa-report-normal table { font-size: max(9.1px, calc(7px / var(--pa-print-fit, 1))) !important; }
    .pa-report-unit .pa-report-medium table { font-size: max(8.7px, calc(7px / var(--pa-print-fit, 1))) !important; }
    .pa-report-unit .pa-report-dense table { font-size: max(8.35px, calc(7px / var(--pa-print-fit, 1))) !important; }
    .pa-report-unit .pa-report-dense { font-size: max(8.8px, calc(7px / var(--pa-print-fit, 1))) !important; }
}
