:root {
    font: 14px "Segoe UI", Tahoma, sans-serif;
    color: #090909;
    --window: #eee;
    --border: #c1c1c1;
    --blue: #00bfff;
    --link: #00599c;
    --green: #1e8e3e;
    --red: #c0392b;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; background: #092457; }
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: #f4f4f4; border: 1px solid var(--border); border-radius: 3px; padding: 6px 12px; }
button:hover:not(:disabled) { background: #d9effb; border-color: #92b9d3; }
button:disabled { opacity: .48; cursor: default; }
:focus-visible { outline: 2px solid #0963a9; outline-offset: 2px; }
input:not([type=checkbox], [type=radio]), select { border: 1px solid #aaa; background: #fff; border-radius: 2px; padding: 5px 8px; min-width: 0; }
input[readonly] { color: #444; background: #f8f8f8; }
input[type=radio], input[type=checkbox] { accent-color: #14619c; }
fieldset { min-inline-size: 0; margin: 0; border: 1px solid #c5c5c5; border-radius: 2px; padding: 6px 8px 8px; }
legend { padding-inline: 4px; color: #343434; }
.icon svg { width: 30px; height: 30px; }
.search-strip .icon svg, .qty-controls .icon svg { width: 28px; height: 28px; }
.desktop { position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; min-height: 100vh; padding: 68px 24px 24px; overflow: hidden; background: radial-gradient(ellipse at 76% 16%, #3169ad 0, transparent 53%), linear-gradient(146deg, #16396b 0 30%, #0d2752 65%, #122d63); }
.desktop::before, .desktop::after { content: ""; position: absolute; z-index: -1; pointer-events: none; }
.desktop::before { width: 120vw; height: 78vh; bottom: -55vh; left: -10vw; border-radius: 48%; transform: rotate(-18deg); background: linear-gradient(165deg, #61baf4, #1158a5 35%, #092651 63%); box-shadow: 0 -3px 38px #75c3f389, inset 0 2px 8px #9bddff90; }
.desktop::after { width: 90vw; height: 69vh; top: -51vh; right: -19vw; border-radius: 47%; transform: rotate(-13deg); background: linear-gradient(175deg, #153568, #194889 67%, #4e98d7); box-shadow: 0 8px 58px #5896cc75; }
.desktop-header { position: absolute; inset: 0 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 16px; min-height: 48px; padding: 8px 16px; border-bottom: 1px solid #a0c7ef35; background: #09265399; color: #ebf5ff; }
.desktop-brand { display: flex; align-items: center; gap: 9px; font-weight: 600; }
.desktop-brand img { box-sizing: content-box; display: block; width: clamp(120px, 38vw, 160px); height: 24px; object-fit: contain; padding: 4px 8px; border-radius: 4px; background: #fff; }
.desktop-brand small { font-size: 10px; color: #cce4ff; letter-spacing: .13em; border-left: 1px solid #b9d5fc70; margin-left: 4px; padding-left: 12px; }
.desktop-storage { font-size: 12px; }
.desktop-storage::before { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #87dfad; content: ""; }
.desktop-icon-art { position: absolute; }
.desktop-items { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 4px; width: min(100%, 1038px); margin: 0; padding: 0; list-style: none; color: #fff; }
.desktop-items li { display: grid; justify-items: center; align-content: start; gap: 3px; width: 88px; text-align: center; font-size: 12px; line-height: 1.2; text-shadow: 0 1px 3px #000, 0 1px 5px #000; }
.desktop-items svg, .desktop-items img { width: 44px; height: 44px; filter: drop-shadow(0 2px 2px #001333a6); }
.desktop-items svg.excel { color: #176c43; }
.desktop-items svg.word { color: #1956a3; }
.desktop-items svg text { fill: #fff; text-anchor: middle; font: 700 12px "Segoe UI", sans-serif; }
.desktop-items :is(button, a) { display: grid; justify-items: center; gap: 3px; width: 100%; padding: 2px; border: 0; border-radius: 3px; color: inherit; background: transparent; text-decoration: none; font: inherit; text-shadow: inherit; }
.desktop-items :is(button, a):hover { background: #a9d5ff35; }
.desktop-items :is(button, a):focus-visible { outline-color: #d1ebff; }
@media (min-width: 1280px) {
    .desktop-items { position: absolute; inset: 68px auto auto 16px; display: grid; gap: 12px; width: 88px; }
    .desktop-documents { inset: 68px 16px auto auto; }
}
.tutorial.window { position: fixed; inset: 58px 0 auto; margin: 0 auto; width: min(610px, calc(100% - 16px)); color: #273644; background: #edf5fb; box-shadow: 0 4px 15px #061a3d55; }
.tutorial .tutorial-titlebar { min-height: 26px; justify-content: space-between; background: #dcecf8; border-color: #c4d8e6; cursor: default; touch-action: auto; }
.tutorial-body { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 7px 9px; font-size: 12px; }
.tutorial-step { color: var(--link); font-weight: 700; white-space: nowrap; }
.tutorial .link { margin-left: auto; }
.tutorial .link:hover { text-decoration: underline; }
body.tutorial-active .desktop { padding-top: 146px; }
body.tutorial-active dialog:modal { inset-block-start: 126px; max-height: calc(100dvh - 146px); }
.window { width: min(100%, 1038px); border: 1px solid #65809a; border-radius: 6px; overflow: hidden; background: var(--window); box-shadow: 0 18px 52px #03132db3; }
.market { position: relative; height: 635px; display: flex; flex-direction: column; }
.receipt-printer { position: absolute; z-index: 4; inset: auto 0 0; display: flex; flex-direction: column-reverse; width: min(304px, 100%); max-height: calc(100% - 78px); margin-inline: auto; padding-inline: 8px; overflow: clip; }
.printer-slot { position: relative; z-index: 1; flex: 0 0 9px; border: 1px solid #52667a; border-radius: 4px 4px 0 0; background: #182535; box-shadow: inset 0 2px 4px #071018; }
.receipt-paper { position: relative; min-height: 0; margin: 0 6px; padding: 12px; overflow-y: auto; background: #fffdf1; color: #25241f; cursor: pointer; font: 12px/1.4 Consolas, monospace; overflow-wrap: anywhere; box-shadow: 0 1px 14px #07182e80; }
.receipt-header, .receipt-footer { text-align: center; }
.receipt-header > * { display: block; }
.receipt-header > strong { font-size: 15px; }
.receipt-header > b { margin-top: 6px; }
.receipt-items, .receipt-totals, .receipt-footer { margin: 8px 0 0; padding: 7px 0 0; border-top: 1px dashed #8c8878; }
.receipt-items { list-style: none; }
.receipt-items li + li { margin-top: 5px; }
.receipt-items li div, .receipt-totals { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; }
.receipt-totals dd { margin: 0; text-align: right; }
.receipt-paper .receipt-hint { display: block; margin: 8px auto 0; text-align: center; color: #645d4b; font-size: 11px; }
.receipt-paper:hover .receipt-hint, .receipt-paper:focus-within .receipt-hint { text-decoration: underline; }
.receipt-paper.is-printing { animation: receipt-feed .48s ease-out both; }
.receipt-paper.is-torn { animation: receipt-tear .26s ease-in both; }
@keyframes receipt-feed { from { transform: translateY(105%); } to { transform: translateY(0); } }
@keyframes receipt-tear { to { transform: translate(22px, -55px) rotate(5deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
    .receipt-paper.is-printing, .receipt-paper.is-torn { animation-duration: 1ms; }
}
.loading { padding: 20px; }
.titlebar { flex: none; display: flex; align-items: center; gap: 7px; min-height: 32px; padding: 4px 9px; background: #fbfbfb; border-bottom: 1px solid #d3d3d3; font-size: 13px; }
.titlebar, .drag-handle { cursor: grab; touch-action: none; user-select: none; }
.titlebar.is-dragging, .drag-handle.is-dragging { cursor: grabbing; }
.market, dialog { translate: var(--window-x, 0px) var(--window-y, 0px); }
.titlebar img { width: 17px; height: 17px; }
.menubar { flex: none; display: flex; flex-wrap: wrap; align-items: stretch; z-index: 2; background: #f2f2f2; border-bottom: 1px solid #d3d3d3; }
.menubar > button, summary { display: block; background: transparent; border: 0; border-radius: 0; padding: 4px 9px; list-style: none; font-size: 12px; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
summary:hover, details[open] > summary { background: #d9effb; }
.menubar { position: relative; }
.menubar > details { position: relative; }
.menu { position: absolute; left: 0; top: 100%; min-width: 215px; width: max-content; max-width: min(355px, calc(100vw - 26px)); max-height: min(420px, 65dvh); overflow: auto; padding: 3px; background: #f7f7f7; border: 1px solid #b6b6b6; box-shadow: 0 3px 8px #0003; }
.menubar > details:nth-child(n+6) .menu { left: auto; right: 0; }
.menu button, .menu summary, .menu a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; width: 100%; padding: 5px 8px; text-align: left; border: 0; background: transparent; font-size: 13px; }
.menu a { color: var(--link); text-decoration: none; }
.menu a:hover { background: #d9effb; text-decoration: underline; }
.menu summary::after { content: "▸"; color: #505050; }
.menu details[open] > summary::after { content: "▾"; }
.menu summary:hover, .menu details[open] > summary { background: #d9effb; }
.menu kbd { white-space: nowrap; color: #5c5c5c; font: inherit; font-size: 11px; }
.menu hr { height: 2px; margin: 3px 0; border: 0; background: #999c; }
.menu button[data-unavailable] > span:first-child { color: #585858; }
.menu-hints { display: inline-flex; flex: none; align-items: baseline; gap: 6px; }
.menu-badge { padding: 1px 4px; border: 1px solid #c8c8c8; border-radius: 3px; background: #eee; color: #505050; font-size: 10px; white-space: nowrap; }
.submenu { margin-left: 10px; border-left: 1px solid #ccc; }
.screen { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 0 7px; }
.search-strip { display: flex; min-height: 68px; justify-content: space-between; align-items: center; padding: 4px 3px; gap: 12px; }
.search-form { display: flex; align-items: center; min-width: 0; gap: 4px; }
#query { width: 250px; font-size: 22px; height: 40px; }
.clock { min-width: 145px; text-align: center; color: #505050; line-height: 1; }
.clock time { display: block; font-size: 40px; font-variant-numeric: tabular-nums; }
.clock span { display: block; margin-top: 4px; }
.basket { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.grid-rail { display: flex; gap: 5px; flex: 1; min-height: 0; }
.table-scroll { flex: 1; min-width: 0; min-height: 0; overflow: auto; background: #fcfcfc; border: 1px solid var(--border); }
table { border-spacing: 0; width: 100%; font-size: 13px; }
th, td { text-align: left; padding: 6px 8px; border-right: 1px solid #bbb3; overflow-wrap: anywhere; }
th:last-child, td:last-child { border-right: 0; }
th { position: sticky; top: 0; z-index: 1; white-space: nowrap; background: #eaeaea; font-weight: 400; border-bottom: 1px solid #cecece; }
tbody tr:nth-child(even) { background: #f1f1f1; }
tr[data-key] { cursor: pointer; }
tr[data-key]:hover:not(.selected) { background: #e4f3fc; }
tr.selected { background: var(--blue) !important; color: #102732; }
tr:focus-visible { outline-offset: -2px; }
.numeric { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.empty td { color: #5e6871; text-align: center; padding: 14px; }
.check-table { min-width: 530px; }
.check-table th:nth-child(1), .check-table th:nth-child(2) { width: 15%; }
.check-table th:nth-child(n+4) { width: 9%; }
.rail { flex: none; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.rail > * { flex-shrink: 0; }
.icon { display: inline-grid; place-items: center; width: 48px; height: 47px; padding: 0; color: #090909; }
.search-strip .icon { width: 40px; height: 40px; }
.danger-ink { color: #a62c23; }
.basket-meta, .screen-status { display: flex; gap: 5px; flex-wrap: wrap; align-items: baseline; font-size: 12px; color: #484848; padding-top: 5px; }
.basket-meta span, .screen-status span { color: #777; margin: 0 2px; }
.quick-products { flex: none; display: flex; gap: 4px; overflow-x: auto; margin-top: 5px; padding: 2px; }
.quick-products button { flex: 0 0 130px; height: 50px; padding: 3px 5px; font-size: 12px; }
.quick-products button:focus-visible { outline-offset: -2px; }
.quick-products button span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.checkout { display: grid; grid-template-columns: 375fr 350fr 210fr; align-items: start; gap: 8px; margin: 6px 0 0; }
.totals { padding-inline: 10px; }
.totals > div, .totals > label { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 43px; font-size: clamp(17px, 2.2vw, 26px); }
.totals strong { font-size: clamp(22px, 2.6vw, 30px); font-weight: 400; font-variant-numeric: tabular-nums; }
.totals input { width: 51%; text-align: right; font-size: clamp(21px, 2.6vw, 30px); line-height: 1; padding: 1px 5px !important; }
.totals .change-line, .totals .change-line strong { font-weight: 700; }
.checkout-middle { display: grid; gap: 6px; }
.checkout-middle fieldset { min-height: 52px; }
.checkout-middle fieldset > span { margin-left: 5px; font-size: 12px; }
.muted, .contact-meta { color: #626262; }
.contact-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 8px; font-size: 12px; }
.contact-meta span:first-child { grid-column: 1/-1; color: #404040; }
.checkout-actions { display: grid; justify-items: end; gap: 7px; padding-top: 9px; }
button.primary, button.danger { border-color: transparent; color: #fff; font-weight: 600; background: var(--green); }
button.danger { background: var(--red); }
button.primary:hover:not(:disabled), button.danger:hover:not(:disabled) { background: var(--blue); color: #102732; }
#pay { width: 100%; min-height: 89px; font-size: 34px; }
#pay:disabled, #cancel-check:disabled { opacity: .72; }
#cancel-check { min-height: 40px; min-width: 55%; }
.screen-status { min-height: 24px; padding: 3px 2px; }
.link { background: transparent !important; border: 0; border-radius: 0; color: var(--link); padding: 0; font-size: inherit; }
.link:hover, .link:focus-visible { text-decoration: underline; }
.push { margin-left: auto; }
.notice { position: fixed; inset: auto 16px 16px auto; margin: 0; width: max-content; max-width: min(360px, calc(100% - 32px)); padding: 12px 16px; border: 1px solid #9db6a5; border-left: 4px solid var(--green); border-radius: 4px; background: #f7faf8; color: #154c28; box-shadow: 0 5px 18px #13273b4d; pointer-events: none; }
.notice.error { border-color: #d7a29c; border-left-color: var(--red); color: #9b251d; background: #fff7f5; }
.form-error { color: #9b251d; }
.form-error:empty { display: none; }
.subsidiary { padding-top: 8px; }
.toolbar { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding-bottom: 8px; }
.toolbar input[type=search] { width: min(350px, 100%); font-size: 22px; height: 40px; }
.toolbar select { width: min(250px, 100%); height: 40px; }
.toolbar.dates label { display: flex; align-items: center; gap: 5px; }
.report-layout { display: grid; grid-template-columns: minmax(0, 29%) minmax(0, 1fr); align-items: stretch; gap: 11px; padding: 15px 11px 12px; }
.report-layout h3 { margin: 6px 0; text-align: center; font-size: 14px; }
.report-layout .link { color: #0000ee; text-decoration: underline; text-underline-offset: 3px; }
.report-layout .link[data-unavailable] { color: #54547a; }
.report-cashbox { display: grid; align-content: center; gap: 13px; border-right: 2px solid #ccc; padding-right: 19px; text-align: center; }
.report-cashbox > div strong, .report-headlines strong { display: block; margin-bottom: 4px; font-weight: 400; font-size: clamp(19px, 3.3vw, 25px); font-variant-numeric: tabular-nums; }
.report-cashbox > div + div::before, .report-cashbox > section::before { content: ''; display: block; width: min(100%, 100px); margin: 4px auto 10px; border-top: 1px solid #aaa; }
.report-period { padding-inline: 4px; }
.report-period input { font-size: 12px; width: min(150px, 45%); padding: 2px 4px; }
.report-presets { display: flex; flex-wrap: wrap; gap: 4px 8px; padding: 3px 8px 0; font-size: 12px; }
.report-presets [data-report-period="today"] { font-weight: bold; }
.report-headlines { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 8px 0 5px; padding-bottom: 9px; border-bottom: 1px solid #aaa; text-align: center; overflow-wrap: anywhere; }
.report-headlines > div + div { border-left: 1px solid #aaa; }
.report-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.report-columns > div + div { padding-left: 11px; border-left: 1px solid #bbb; }
.report-metrics { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 8px; margin: 5px 0; text-align: left; }
.report-metrics dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.report-links { display: flex; justify-content: space-between; gap: 6px; margin-top: 8px; }
dialog.report-payments-window { width: min(530px, calc(100% - 16px)); height: 290px; }
.report-payments-window .table-scroll { margin: 10px 10px 5px; border-color: #999; }
.report-payments-window table { table-layout: fixed; min-width: 300px; font-size: 12px; }
.report-payments-window th:first-child { width: 40%; }
.report-payments-window :is(th, td) { padding-block: 8px; }
.report-payments-window .screen-status { flex: none; padding: 5px 10px; }
.metrics { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 6px 0; }
.metrics dd { text-align: right; margin: 0; font-variant-numeric: tabular-nums; }
dialog { width: min(440px, calc(100% - 20px)); max-height: calc(100dvh - 20px); padding: 0; border: 1px solid #798896; border-radius: 5px; background: var(--window); box-shadow: 0 16px 60px #0005; color: inherit; }
dialog::backdrop { background: #07162763; }
dialog.workspace[open] { display: flex; flex-direction: column; }
dialog.workspace::backdrop { background: #07162738; }
.about-window { width: min(500px, calc(100% - 20px)); border-top: 10px solid #00bfff; }
.about-window .dialog-body { padding: 12px 20px 16px; }
.about-window h2 { margin: 0 0 12px; font-size: 18px; }
.about-program { display: flex; align-items: center; gap: 12px; }
.about-program img { width: 48px; height: 48px; }
.about-program p { margin: 3px 0 0; }
.about-window .confirm { justify-content: center; }
.about-window .confirm button { min-width: 100px; }
dialog.catalog-window { width: min(800px, calc(100% - 16px)); height: 600px; }
dialog.journal-window { width: min(1016px, calc(100% - 16px)); height: 576px; }
dialog.price-labels-window { width: min(862px, calc(100% - 16px)); height: 656px; }
.price-labels-window table { min-width: 465px; }
.price-labels-window .confirm { flex: none; padding: 12px; }
.price-labels-confirm .primary { width: min(200px, 54%); min-height: 50px; font-size: 22px; }
.price-labels-window .form-error { margin: 5px 0 0; }
dialog.label-template-window { width: min(500px, calc(100% - 16px)); height: 450px; }
.label-template-window form { display: flex; flex: 1; min-height: 0; flex-direction: column; }
.label-template-window .grid-rail { padding: 4px; align-items: stretch; }
.label-template-window .icon { flex: none; }
.label-template-window table { font-size: clamp(17px, 5vw, 25px); }
.label-template-window .confirm { flex: none; padding: 12px; }
.label-template-window .confirm .primary { width: min(200px, 54%); min-height: 50px; font-size: 20px; }
.journal-table { min-width: 840px; font-size: 12px; }
.journal-table th:nth-child(4) { min-width: 290px; width: 38%; }
.journal-table td { vertical-align: top; }
.journal-table ul { margin: 0; padding: 0; list-style: none; }
.journal-table li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 10px; }
.journal-table li + li { margin-top: 4px; }
.journal-table li span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
#journal-query { width: min(290px, 100%); height: 34px; font-size: 13px; }
dialog.report-window { width: min(740px, calc(100% - 16px)); }
.report-window .report-layout { min-height: 0; overflow: auto; }
dialog.wide { width: min(675px, calc(100% - 20px)); }
dialog.payment { width: min(402px, calc(100% - 16px)); }
.numeric-window { width: min(500px, calc(100% - 20px)); }
.numeric-window .dialog-body { padding: 8px; }
.numeric-window .entry-name { font-size: 32px; line-height: 35px; margin: 0 0 8px; overflow-wrap: anywhere; }
.numeric-window .entry-row { display: grid; grid-template-columns: minmax(0, 185px) minmax(0, 1fr); align-items: center; gap: 6px; min-height: 44px; }
.numeric-window .entry-row label { font-size: clamp(15px, 4vw, 24px); }
.numeric-window .entry-row input { justify-self: end; text-align: right; width: min(267px, 100%); height: 40px; font-size: clamp(20px, 5vw, 28px); font-variant-numeric: tabular-nums; }
.qty-controls { display: grid; grid-template-columns: minmax(0, 1fr) 40px 40px; gap: 4px; }
.qty-controls .icon { width: 40px; height: 40px; }
.quantity-window .entry-row input:not(#qty-value) { font-size: clamp(20px, 5vw, 32px); }
.discount-window .entry-name { font-size: 34px; }
.discount-window .entry-row { min-height: 40px; }
.discount-window .entry-row label { font-size: clamp(15px, 4vw, 20px); }
.discount-window .entry-row input { width: min(180px, 100%); height: 35px; font-size: 24px; }
.discount-window .entry-row #discount-percent { width: min(135px, 100%); }
.numeric-window .confirm { margin-top: 8px; padding: 8px 15px; background: #cacaca; }
.numeric-window .confirm .primary { width: min(200px, 54%); min-height: 50px; font-size: clamp(14px, 4vw, 20px); }
.numeric-window .confirm .danger { width: min(120px, 45%); min-height: 40px; font-size: clamp(13px, 4vw, 18px); }
.close { margin: -4px -9px -4px auto; font-size: 18px; border: 0; background: none; border-radius: 0; padding: 3px 12px; }
.close:hover:not(:disabled) { background: var(--red); color: #fff; }
.dialog-body { padding: 12px; }
.dialog-body > p:first-child { margin-top: 0; }
.dialog-scroll { max-height: 300px; margin-top: 8px; }
.dialog-scroll table { min-width: 390px; }
.confirm { display: flex; justify-content: space-between; gap: 8px; align-items: center; background: #ddd; padding: 7px 10px; }
.confirm button { min-height: 34px; }
.payment .titlebar svg { width: 14px; height: 14px; }
.payment .dialog-body { padding: 8px 10px; }
.payment .confirm { align-items: flex-end; padding: 15px; background: #cacaca; }
.payment .confirm .primary { min-height: 50px; width: min(200px, 55%); font-size: clamp(17px, 5.5vw, 25px); }
.payment .confirm .danger { min-height: 40px; width: min(120px, 42%); font-size: clamp(15px, 4.5vw, 20px); }
.payment-sum { display: grid; grid-template-columns: 1fr minmax(0, 54%); align-items: center; gap: 8px; font-size: clamp(17px, 5.5vw, 24px); }
.payment-sum + .payment-sum { margin-top: 10px; }
.payment-sum output, .payment-methods input { min-width: 0; min-height: 40px; padding: 4px 5px; border: 1px solid #666; border-radius: 2px; text-align: right; font-size: clamp(19px, 5.5vw, 25px); font-variant-numeric: tabular-nums; }
.payment-sum output { color: #505050; background: #fafafa; overflow-wrap: anywhere; }
.payment-methods { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 40%) 40px; align-items: center; gap: 6px 5px; border: 1px solid #999; padding: 3px; margin-block: 5px 6px; background: #f9f9f9; font-size: clamp(17px, 5.5vw, 25px); }
.payment-methods button { width: 40px; height: 40px; padding: 0; font-size: 18px; }
.field { display: grid; gap: 4px; }
.stock-fields { display: grid; gap: 10px; }
dialog.product-window { width: min(680px, calc(100% - 16px)); height: 580px; }
.product-window form { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.product-window .menubar { background: var(--window); border-bottom: 0; }
.product-basics { display: grid; grid-template-columns: 91px minmax(0, 1fr); align-items: center; gap: 4px 6px; padding: 5px 7px 8px; font-size: 12px; }
.product-basics input:not([type]) { height: 24px; padding: 2px 4px; border-color: #888; }
.product-basics .product-name { width: min(423px, 100%); }
.product-basics #product-group { width: min(200px, 100%); background: #ddd; text-align: center; }
.product-basics > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.product-basics #product-barcode { width: min(200px, 100%); }
.product-window .link { color: #0000ee; text-decoration: underline; text-underline-offset: 3px; }
.product-tabs { flex: none; display: flex; padding: 0 3px; overflow-x: auto; }
.product-tabs button { flex: 0 0 auto; min-height: 36px; padding: 5px 17px; border: 1px solid #777; border-radius: 3px 3px 0 0; font-size: 12px; }
.product-tabs button + button { margin-left: -1px; }
.product-tabs button[aria-selected=true] { position: relative; border-color: #0083a9; background: #00bfff; color: #042b3a; }
.product-tabs button:focus-visible { outline-offset: -3px; }
.product-panel { flex: 1; min-height: 80px; margin: -1px 3px 0; padding: 10px 7px 4px; border: 1px solid #777; overflow: auto; }
.product-stock, .product-journal { display: flex; flex-direction: column; }
.product-stock .grid-rail { gap: 9px; }
.product-stock .table-scroll { border-color: #999; }
.product-stock .icon { width: 48px; height: 50px; border-color: #888; background: #ddd; }
.product-stock .icon:hover:not(:disabled) { background: #d9effb; }
.product-stock .icon svg { width: 36px; height: 36px; }
.product-stock-table { min-width: 370px; font-size: 12px; }
.product-stock-table th:nth-child(1) { width: 70px; }
.product-stock-table th:nth-child(2), .product-stock-table th:nth-child(3) { width: 110px; }
.product-stock-table th:nth-child(4) { width: 100px; }
.product-stock-table th { padding-block: 8px; }
.product-stock .screen-status { padding-right: 57px; }
.product-info .field { width: min(420px, 100%); margin-bottom: 9px; }
.product-info textarea { resize: vertical; min-width: 0; font: inherit; border: 1px solid #aaa; padding: 5px 8px; }
#product-error { margin: 4px 7px 0; }
.product-window .confirm { flex: none; align-items: flex-end; margin-top: 8px; padding: 14px 12px; background: #cacaca; }
.product-window .confirm .primary { min-height: 50px; width: min(200px, 56%); font-size: clamp(15px, 5vw, 25px); }
.product-window .confirm .danger { min-height: 40px; width: min(120px, 42%); font-size: clamp(14px, 4vw, 20px); }
dialog.search-window { width: min(800px, calc(100% - 16px)); height: 600px; }
.search-toolbar { padding: 10px 8px 8px; gap: 6px 10px; }
.search-toolbar input { flex: 0 1 auto; }
.search-toolbar select { flex: 0 1 220px; }
.search-results { margin-inline: 8px; scrollbar-gutter: stable; }
.search-results table { min-width: 530px; table-layout: fixed; }
.search-results th:nth-child(1) { width: 21%; }
.search-results th:nth-child(2) { width: 18%; }
.search-results th:nth-child(n+4) { width: 12%; }
.search-status { margin-inline: 8px; }
.search-window .confirm { flex: none; padding: 8px; }
.search-window .confirm .primary { width: min(211px, 34%); min-height: 48px; font-size: clamp(13px, 3.7vw, 22px); }
.search-window .confirm .danger { min-height: 40px; }
dialog.sale-window { width: min(884px, calc(100% - 16px)); height: 694px; }
.sale-info { margin: 5px 10px 7px; padding: 6px 8px 11px; border: 1px solid #999; border-radius: 3px; font-size: 12px; }
.sale-info h3 { font-size: 12px; margin: 0 0 10px; }
.sale-info-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: start; gap: 14px; padding: 0 5px 0 10px; }
.sale-info-grid dl { display: grid; grid-template-columns: minmax(108px, auto) minmax(0, 1fr); gap: 6px 10px; margin: 0; }
.sale-info-grid dd { margin: 0; overflow-wrap: anywhere; }
.sale-info-grid .sale-amounts { width: min(100%, 208px); }
.sale-amounts dd { text-align: right; font-variant-numeric: tabular-nums; }
.sale-print { border-color: #888; background: #ddd; }
.sale-print svg { width: 36px; height: 36px; }
.sale-tabs { padding-inline: 10px; }
.sale-tabs button { min-height: 42px; padding-inline: 22px; }
.sale-panel { display: flex; flex-direction: column; margin: -1px 10px 6px; padding: 9px 10px 4px; }
.sale-panel table { font-size: 12px; min-width: 500px; }
.sale-panel td { vertical-align: top; }
.sale-panel .sale-goods-table { min-width: 710px; table-layout: fixed; }
.sale-goods-table th:nth-child(1), .sale-goods-table th:nth-child(2) { width: 12%; }
.sale-goods-table th:nth-child(3) { width: 26%; }
.sale-goods-table th:nth-child(n+4):nth-child(-n+7) { width: 8.5%; }
@media (max-width: 600px) {
    .sale-info-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; padding: 0; }
    .sale-info-grid dl { grid-template-columns: minmax(0, 1fr) auto; gap: 4px; }
    .sale-info-grid dd { max-width: 92px; }
    .sale-print { grid-column: 2; justify-self: end; width: 34px; height: 34px; }
    .sale-print svg { width: 25px; height: 25px; }
    .sale-tabs button { padding-inline: 10px; }
}
@media (max-width: 500px) {
    .product-tabs button { padding-inline: 11px; }
    .product-stock .screen-status { padding-right: 0; }
    .product-stock .icon { width: 40px; height: 40px; }
    .product-stock .icon svg { width: 29px; height: 29px; }
}
@media (max-width: 760px) {
    .desktop { padding: 54px 8px 14px; justify-content: flex-start; gap: 10px; }
    .market { height: 635px; }
    .checkout { grid-template-columns: minmax(0, 1fr) minmax(92px, 32%); }
    .checkout-middle { grid-column: 1 / -1; grid-row: 2; }
    .checkout-middle fieldset:first-child { min-height: auto; }
    .checkout-middle fieldset + fieldset { display: none; }
    #pay { font-size: clamp(24px, 6vw, 32px); }
    .menubar > details { position: static; }
    .menubar > details:nth-child(n) .menu { left: 0; right: auto; }
}
@media (max-width: 600px) {
    .report-layout { grid-template-columns: 1fr; }
    .report-cashbox { grid-row: 2; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 0; border-top: 1px solid #aaa; padding: 8px 0 0; }
    .report-cashbox > section { grid-column: 1/-1; }
    .report-cashbox > div + div::before { display: none; }
}
@media (max-width: 520px) {
    .desktop { padding-top: 72px; }
    .desktop-header { padding-inline: 8px; }
    .tutorial.window { inset-block-start: 72px; }
    body.tutorial-active .desktop { padding-top: 164px; }
    body.tutorial-active dialog:modal { inset-block-start: 156px; max-height: calc(100dvh - 176px); }
}
@media (max-width: 430px) {
    .numeric-window .entry-row { grid-template-columns: minmax(0, 36%) minmax(0, 1fr); }
    .numeric-window .entry-name { font-size: 25px; line-height: 28px; }
    .clock { min-width: auto; }
    .clock time { font-size: 25px; }
    .clock span { font-size: 11px; }
    #query { width: 100%; }
    .report-metrics, .report-columns { gap: 6px 4px; }
    .report-columns > div + div { padding-left: 5px; }
}
