.print-workspace {
    --print-line: #dce4ef;
    --print-ink: #15233b;
    --print-muted: #51627c;
    min-width: 0;
    padding: 24px;
    color: var(--print-ink);
}

.print-workspace [hidden] { display: none !important; }
.print-workspace .app-icon { width: 17px; height: 17px; flex: none; }
.print-header, .print-device, .print-actions, .print-action-buttons, .print-confirm-actions, .print-settings-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.print-header { justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.print-header h1 { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 25px; letter-spacing: 0; }
.print-header h1 .app-icon { width: 22px; height: 22px; color: var(--brand-blue); }
.print-device {
    min-width: 0;
    padding: 6px 9px;
    border: 1px solid var(--print-line);
    border-radius: 7px;
    background: #fff;
    font-size: 12px;
    overflow-wrap: anywhere;
}
.print-device span { padding: 3px 6px; border-radius: 4px; background: #edf2f8; color: #435570; font-weight: 750; }
.print-device span[data-state=online] { background: #e4f5eb; color: #13634a; }
.print-device span[data-state=connecting] { background: #fff1d8; color: #765011; }
.print-device span[data-state=error] { background: #fdebec; color: #932b32; }
.print-grid { display: grid; grid-template-columns: minmax(225px, 1fr) minmax(270px, 1.45fr) minmax(260px, 1fr); align-items: start; gap: 14px; }
.print-panel { min-width: 0; border: 1px solid var(--print-line); border-radius: 8px; background: #fff; }
.print-panel > :is(header, summary) { display: flex; align-items: center; min-height: 45px; gap: 8px; padding: 11px 13px; }
.print-panel summary { cursor: pointer; font-size: 14px; font-weight: 780; list-style: none; }
.print-panel summary::-webkit-details-marker { display: none; }
.print-panel summary > span { margin-left: auto; color: var(--print-muted); font-size: 12px; }
.print-panel summary > .app-icon:last-child { margin-left: auto; color: var(--print-muted); transform: rotate(0deg); }
.print-panel[open] > summary > .app-icon:last-child { transform: rotate(90deg); }
.print-panel h2 { margin: 0; font-size: 15px; line-height: 1.2; letter-spacing: 0; }
.print-panel header > span { margin-left: auto; color: var(--print-muted); font-size: 12px; }
.print-panel-content { display: grid; gap: 9px; padding: 12px; border-top: 1px solid var(--print-line); }
.print-panel label { display: grid; gap: 4px; min-width: 0; color: var(--print-muted); font-size: 12px; font-weight: 750; }
.print-panel :is(input:not([type=checkbox]), select) { min-width: 0; width: 100%; min-height: 37px; padding: 6px 8px; border: 1px solid #cdd8e7; border-radius: 6px; background: #fff; color: var(--print-ink); font: inherit; font-weight: 600; }
.print-date-filter, .print-field-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.print-panel label.print-check { display: flex; align-items: center; gap: 7px; }
.print-check input { margin: 0; }
.print-orders, .print-log { margin: 0; padding: 0; list-style: none; }
.print-orders { display: grid; gap: 5px; max-height: min(57dvh, 510px); overflow: auto; overscroll-behavior: contain; }
.print-order {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 6px;
    width: 100%;
    min-height: 64px;
    padding: 7px 9px;
    border: 1px solid var(--print-line);
    border-radius: 6px;
    background: #fff;
    color: var(--print-ink);
    font-size: 12px;
    text-align: left;
    overflow-wrap: anywhere;
}
.print-order small { color: var(--print-muted); }
.print-order :is(strong, small):last-of-type { text-align: right; }
.print-order[aria-pressed=true], .print-order:hover { background: #edf2ff; border-color: #a8b9f1; }
.print-order-customer { grid-column: 1 / -1; }
.print-limit { color: var(--print-muted); }
.print-paper-stage {
    display: grid;
    place-items: start center;
    min-height: 145px;
    max-height: min(62dvh, 665px);
    overflow: auto;
    padding: 13px 10px;
    border-block: 1px solid var(--print-line);
    background: #eef1f5;
    overscroll-behavior: contain;
}
.print-paper-stage .print-invoice-frame {
    width: min(80mm, 100%);
    min-height: 0;
    padding: 0;
    box-shadow: 0 2px 7px #15233b20;
}
.print-paper-stage .print-invoice-frame .document-sheet { padding: 4mm; }
.print-paper-stage .print-invoice-frame .invoice-driver-qr { width: 75%; }
.print-selection { display:flex; align-items:center; justify-content:space-between; gap:8px; color:var(--print-muted); }
.print-selection button { min-height:32px; }
.print-order-choice { display:grid; grid-template-columns:32px minmax(0,1fr); align-items:center; }
.print-order-check { justify-self:center; width:17px; height:17px; cursor:pointer; accent-color:var(--brand-blue); }
.print-actions { align-items: start; flex-direction: column; padding: 10px 12px; }
.print-action-buttons .app-icon { width: 15px; height: 15px; }
.print-job-status, .print-notice, .print-empty, .print-connection-hint { margin: 0; font-size: 12px; line-height: 1.4; color: var(--print-muted); overflow-wrap: anywhere; }
.print-job-status[data-state=ok] { color: #13634a; }
.print-job-status[data-state=sent] { color: #243ca0; }
.print-job-status[data-state=error], .print-notice { color: #9c2832; }
.print-empty { display: flex; align-items: center; gap: 8px; align-self: center; }
.print-tools { min-width: 0; display: grid; gap: 10px; }
.print-info, .print-test-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; color: var(--print-muted); font-size: 12px; }
.print-test-row > span { font-size: 11px; }
.print-test-result { display: grid; gap: 7px; }
.print-log { max-height: 180px; overflow: auto; background: #f1f4f9; border-radius: 5px; }
.print-log li { padding: 4px 7px; color: #435570; font: 11px/1.45 ui-monospace, monospace; overflow-wrap: anywhere; }
.print-log li + li { border-top: 1px solid #dce4ef; }
.print-workspace :is(button, a, summary):focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 2px; }
.print-workspace button:disabled { opacity: .5; cursor: default; }

@media (max-width: 1140px) {
    .print-grid { grid-template-columns: minmax(220px, 1fr) minmax(270px, 1.35fr); }
    .print-tools { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
}

@media (max-width: 800px) {
    .print-workspace { padding: 14px; }
    .print-grid, .print-tools { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .print-header { margin-bottom: 11px; }
    .print-orders { max-height: 225px; }
    .print-paper-stage { max-height: min(52dvh, 430px); }
    .print-actions .order-button { min-height: 43px; }
    .print-action-buttons { width: 100%; }
    .print-action-buttons > .primary { flex: 1 1 auto; }
}

@media (max-width: 360px) { .print-date-filter { grid-template-columns: minmax(0, 1fr); } }
