:root {
  color-scheme: dark;
  --bg: #10131c;
  --panel: #191e2b;
  --panel-raised: #202638;
  --line: #343c50;
  --text: #f5f7fb;
  --muted: #a5aec0;
  --cyan: #19cce0;
  --lime: #b2f52f;
  --purple: #a86aff;
  --danger: #ff707b;
  font-family: 'DM Sans', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--text); background: radial-gradient(ellipse at 15% -15%, #183444 0, transparent 35%), radial-gradient(ellipse at 100% 0, #2b1746 0, transparent 25%), var(--bg); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.app-shell { min-height: 100vh; }
.topbar { height: 78px; padding: 0 clamp(18px, 5vw, 72px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #ffffff15; background: #10131cd9; backdrop-filter: blur(14px); }
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 50px; height: 50px; border-radius: 10px; object-fit: cover; background: #000; }
.brand-lockup div { display: grid; gap: 2px; }
.brand-lockup strong { font: 700 15px 'Outfit', sans-serif; letter-spacing: .08em; color: var(--lime); }
.brand-lockup span { font-size: 10px; letter-spacing: .19em; color: var(--purple); }
.topbar-right, .user-area { display: flex; align-items: center; gap: 18px; }
.connection { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.connection i { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 12px #b2f52f8a; }
.user-area { color: var(--muted); font-size: 13px; }
.workspace { width: min(1600px, 100%); margin: 0 auto; display: flex; align-items: flex-start; }
main { flex: 1; min-width: 0; max-width: 1320px; margin: 0 auto; padding: 48px clamp(18px, 4vw, 60px) 72px; }
.side-nav { position: sticky; top: 16px; flex: 0 0 220px; margin: 34px 0 0 22px; padding: 17px 12px; border: 1px solid var(--line); border-radius: 14px; background: #171c29; }
.side-nav .eyebrow { margin: 0 9px 10px; font-size: 10px; }
.side-nav-button { width: 100%; min-height: 42px; margin: 2px 0; padding: 0 11px; border: 1px solid transparent; border-radius: 9px; color: #c6ccda; background: transparent; text-align: left; }
.side-nav-button:hover, .side-nav-button.active { color: var(--text); border-color: var(--line); background: #252c3d; }
.side-nav-button.active { box-shadow: inset 3px 0 var(--lime); }
.side-nav[hidden] { display: none !important; }
.finance-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.finance-grid .summary-card { min-width: 0; }
.finance-grid .summary-card strong { font-size: 23px; }
.expense-card { margin: 18px 0; padding: 20px; }
.expense-form { display: grid; grid-template-columns: 1.1fr 1.7fr 1fr 1fr auto; align-items: end; gap: 12px; }
.expense-form label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
.expense-form input, .expense-form select { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: #111520; }
.expense-card h2 { margin-bottom: 14px; }
.expense-card td { vertical-align: middle; }
.expense-voided { opacity: .58; text-decoration: line-through; }
.goal-card { margin: 18px 0; padding: 20px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, .5fr) minmax(240px, 1fr); align-items: center; gap: 16px; }
.goal-card .eyebrow { margin-bottom: 5px; }
.goal-card h2 { margin-bottom: 6px; }
.goal-card .muted { font-size: 13px; }
.goal-card progress { width: 100%; height: 13px; accent-color: var(--lime); }
.goal-form { display: flex; align-items: end; gap: 10px; }
.goal-form label { flex: 1; display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
.goal-form input, .inventory-count-form input { min-width: 100px; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: #111520; }
.inventory-count-form { display: flex; align-items: center; gap: 7px; }
.inventory-count-form input { width: 94px; min-width: 0; }
.inventory-count-form .button { min-height: 38px; padding: 0 10px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.finance-period-controls { display: grid; justify-items: end; gap: 8px; }
.finance-period-controls > label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.finance-period-controls select { min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: #111520; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 9px; font: 600 clamp(29px, 4vw, 40px)/1.1 'Outfit', 'Segoe UI', sans-serif; letter-spacing: -.025em; }
h2 { margin: 0; font: 600 22px 'Outfit', sans-serif; }
.eyebrow { margin-bottom: 9px; color: var(--cyan); font-size: 11px; font-weight: 700; letter-spacing: .17em; text-transform: uppercase; }
.muted { max-width: 690px; margin-bottom: 0; color: var(--muted); line-height: 1.55; }
.button { min-height: 42px; padding: 0 16px; border: 1px solid transparent; border-radius: 10px; font-weight: 700; transition: transform .15s ease, filter .15s ease, background .15s ease; }
.button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.button-primary { color: #111722; background: var(--lime); box-shadow: 0 7px 24px #b2f52f21; }
.button-secondary { color: #10131c; background: var(--cyan); }
.button-quiet { min-height: 34px; padding: 0 12px; border-color: var(--line); color: var(--text); background: transparent; }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.summary-card { min-height: 98px; padding: 18px 20px; display: grid; align-content: space-between; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(140deg, #202638, #171c29); }
.summary-card span { color: var(--muted); font-size: 12px; }
.summary-card strong { font: 600 27px 'Outfit', sans-serif; color: var(--cyan); }
.sales-report { margin: 18px 0 22px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #191e2bed; }
.report-heading { margin-bottom: 16px; display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.report-heading h2 { margin: 0; }
.report-heading label { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.report-heading select { min-height: 38px; padding: 0 28px 0 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: #111520; }
.sales-report-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 12px; }
.sales-report-grid .summary-card { min-width: 0; padding: 15px; }
.sales-report-grid .summary-card strong { font-size: 22px; }
.sales-report-grid .summary-card small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.report-breakdown, .report-note { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.report-note { font-size: 11px; }
.catalog-card, .team-panel { border: 1px solid var(--line); border-radius: 16px; background: #191e2bed; box-shadow: 0 22px 60px #05070d36; }
.catalog-toolbar { padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); }
.search-box { width: min(460px, 100%); height: 42px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #111520; color: var(--muted); }
.search-box > span:not(.sr-only) { font-size: 23px; line-height: 1; }
.search-box input { width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; }
.search-box input::placeholder { color: #788298; }
.filter-label { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
select, input { accent-color: var(--cyan); }
.filter-label select { min-height: 38px; padding: 0 28px 0 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: #111520; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 13px 16px; color: #8792a9; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
td { padding: 15px 16px; border-top: 1px solid #ffffff0d; vertical-align: middle; }
tbody tr:hover { background: #ffffff05; }
td:first-child, th:first-child { padding-left: 20px; }
td:last-child, th:last-child { padding-right: 20px; }
.sku { color: var(--cyan); font: 600 12px ui-monospace, SFMono-Regular, Consolas, monospace; white-space: nowrap; }
.product-name { font-weight: 700; }
.product-sub { margin-top: 4px; color: var(--muted); font-size: 11px; }
.product-variant { color: #d1d7e3; font-size: 12px; min-width: 160px; }
.price { font-weight: 700; white-space: nowrap; }
.stock { color: #d1d7e3; font-size: 12px; white-space: nowrap; }
.stock.unknown { color: #f1c36b; }
.row-actions { display: flex; justify-content: flex-end; gap: 8px; white-space: nowrap; }
.text-button { padding: 6px 8px; border: 0; border-radius: 7px; color: var(--cyan); background: transparent; font-size: 12px; font-weight: 700; }
.text-button:hover { background: #19cce016; }
.text-button.danger { color: var(--danger); }
.text-button.danger:hover { background: #ff707b17; }
.archived-badge { margin-left: 8px; padding: 3px 7px; border-radius: 20px; color: #c2a7ff; background: #a86aff1e; font-size: 9px; font-weight: 700; text-transform: uppercase; }
.empty-state { min-height: 150px; display: grid; align-content: center; justify-items: center; gap: 8px; color: var(--muted); text-align: center; }
.empty-state strong { color: var(--text); }
.team-panel { margin-top: 20px; padding: 0 20px; }
.team-panel summary { padding: 18px 0; cursor: pointer; color: var(--text); font-weight: 700; }
.team-content { padding: 0 0 20px; }
.employee-form { padding: 18px 0; border-top: 1px solid var(--line); }
.employee-form h2 { margin-bottom: 14px; font-size: 18px; }
.employee-list { display: grid; gap: 7px; margin-top: 15px; color: var(--muted); font-size: 13px; }
.employee-row { padding: 10px 12px; display: flex; justify-content: space-between; border-radius: 8px; background: #ffffff08; }
.employee-row-details { display: flex; align-items: center; gap: 16px; }
.employee-row-actions { display: flex; align-items: center; gap: 8px; }
.auth-view { min-height: calc(100vh - 180px); display: grid; place-items: center; }
.auth-card { width: min(460px, 100%); padding: 32px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(145deg, #202638, #171c29); box-shadow: 0 22px 70px #05070d55; }
.auth-card h1 { font-size: 30px; }
.form-grid { display: grid; gap: 14px; }
.form-grid.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid label { display: grid; gap: 7px; color: #c6ccda; font-size: 12px; font-weight: 600; }
.form-grid input { width: 100%; min-height: 42px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; outline: 0; color: var(--text); background: #111520; }
.form-grid input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px #19cce020; }
.span-two { grid-column: 1 / -1; }
.form-message { min-height: 18px; margin: 0; color: var(--danger); font-size: 12px; }
.fine-print { margin: 18px 0 0; color: #8f9ab0; font-size: 11px; line-height: 1.5; }
.form-message.success, .success { color: var(--lime); }
.section-switch { display: flex; justify-content: flex-end; margin: -12px 0 20px; }
.section-switch { gap: 10px; }
.sales-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(340px, .8fr); gap: 18px; align-items: start; }
.sale-products { min-height: 320px; }
.sale-product-list { display: grid; }
.sale-product { padding: 15px 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 16px; border-top: 1px solid #ffffff0d; }
.sale-product > div { display: grid; gap: 5px; }
.sale-product > div span, .cart-line span { color: var(--muted); font-size: 11px; }
.sale-product button { min-height: 36px; padding-inline: 12px; }
.sale-product button:disabled { cursor: not-allowed; opacity: .45; }
.checkout-card { padding: 18px; }
.checkout-heading { padding-bottom: 14px; display: flex; justify-content: space-between; align-items: center; }
.checkout-heading h2 { font-size: 18px; }
.checkout-heading .muted { font-size: 11px; }
.cart-lines { display: grid; max-height: 290px; overflow: auto; }
.cart-line { padding: 11px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid #ffffff0d; }
.cart-line > div:first-child { display: grid; gap: 4px; }
.cart-line strong { font-size: 13px; }
.quantity-controls { display: flex; align-items: center; gap: 6px; }
.quantity-controls button { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: #111520; font-size: 18px; }
.checkout-totals { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.checkout-totals > div { padding: 8px 0; display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }
.checkout-totals strong { color: var(--text); }
.checkout-totals label, .payment-fields label { padding: 8px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.checkout-totals input, .payment-fields input { width: 130px; min-height: 36px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; outline: 0; color: var(--text); background: #111520; text-align: right; }
.total-row { margin-top: 5px; padding-top: 13px !important; border-top: 1px solid var(--line); font-size: 16px !important; }
.total-row strong { color: var(--lime); font-size: 20px; }
.payment-fields { padding-top: 10px; border-top: 1px solid var(--line); }
.payment-fields legend { padding: 0 8px; color: var(--cyan); font-weight: 700; }
.payment-fields fieldset { min-width: 0; }
.inline-check { display: flex; align-items: center; gap: 9px; color: var(--text); font-size: 13px; }
.inline-check input { width: 17px; min-height: 17px; accent-color: var(--lime); }
.payment-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #111520; }
.payment-summary strong { display: block; margin-top: 4px; color: var(--text); }
.payment-summary span { color: var(--muted); font-size: 11px; }
#receipt-print { display: none; }
#label-print { display: none; }
.label-dialog { max-width: 560px; }
.label-preview { min-height: 90px; margin-top: 12px; padding: 12px; display: flex; justify-content: center; align-items: center; overflow: auto; border: 1px dashed var(--line); border-radius: 10px; background: #111520; }
.label-sheet { box-sizing: border-box; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; background: #fff; break-after: page; page-break-after: always; break-inside: avoid; page-break-inside: avoid; }
.label-preview .label-sheet { flex: none; transform: scale(.9); transform-origin: center; }
.label-preview .print-label { border: 1px solid #aab1bc; background: #fff; }
.print-label { box-sizing: border-box; padding: 1mm; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: .35mm; overflow: hidden; color: #000; background: #fff; font-family: Arial, sans-serif; break-inside: avoid; page-break-inside: avoid; }
.print-label-blank { background: transparent; }
.print-label-brand { display: grid; gap: .35mm; justify-items: center; align-content: center; overflow: hidden; }
.print-label-name { overflow: hidden; font-size: 7.5pt; font-weight: 700; line-height: 1; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.print-label-slogan { overflow: hidden; font-size: 4.2pt; font-weight: 600; line-height: 1; text-align: center; white-space: nowrap; }
.print-label svg { display: block; width: auto; height: auto; max-width: 100%; min-height: 0; justify-self: center; align-self: center; }
.print-label-sku { justify-self: center; overflow: hidden; font-family: Consolas, monospace; font-size: 6pt; line-height: 1; white-space: nowrap; }
.print-label-instagram { display: flex; justify-content: center; align-items: center; gap: .5mm; margin-top: .5mm; overflow: hidden; font-size: 4.5pt; font-weight: 600; line-height: 1; white-space: nowrap; }
.print-label .instagram-icon { width: 2.5mm; height: 2.5mm; flex: none; fill: none; stroke: #000; stroke-width: 2; }
.payment-fields .fine-print { min-height: 16px; margin: 4px 0 12px; text-align: right; }
.complete-sale { width: 100%; }
.serial-pending { margin-top: 4px; color: #f1c36b; font-size: 11px; }
.cart-imei-inputs { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 9px; margin: -4px 0 8px; }
.cart-imei-inputs label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; }
.cart-imei-inputs input { min-width: 0; min-height: 38px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; outline: 0; color: var(--text); background: #111520; font: 12px Consolas, monospace; }
.cart-imei-inputs input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px #19cce020; }
.serial-history { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.serial-history h3 { margin: 0 0 10px; font-size: 14px; }
.serial-list { display: grid; gap: 7px; max-height: 220px; overflow: auto; }
.serial-item { display: flex; flex-direction: column; gap: 3px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: #111520; }
.serial-item strong { font: 12px Consolas, monospace; }
.serial-item span { color: var(--muted); font-size: 11px; }
.sales-history { margin-top: 20px; padding-top: 16px; }
.sales-history .checkout-heading { padding-inline: 18px; }
.repair-heading-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.data-notice { margin: -10px 0 18px; padding: 12px 15px; border: 1px solid #f1c36b55; border-radius: 10px; color: #f1d69c; background: #f1c36b12; font-size: 12px; line-height: 1.5; }
.repairs-card { overflow: hidden; }
.inline-status { max-width: 190px; min-height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: #111520; font-size: 12px; }
.dialog-form textarea { width: 100%; min-height: 74px; padding: 10px 11px; resize: vertical; border: 1px solid var(--line); border-radius: 9px; outline: 0; color: var(--text); background: #111520; }
.dialog-form textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px #19cce020; }
.dialog-form input:disabled, .dialog-form select:disabled, .dialog-form textarea:disabled { opacity: .55; cursor: not-allowed; }
.choice-group { min-width: 0; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 11px; }
.choice-dropdown > summary { padding: 1px 4px; cursor: pointer; color: var(--text); font-size: 13px; font-weight: 700; }
.choice-dropdown[open] > summary { margin-bottom: 12px; padding-bottom: 11px; border-bottom: 1px solid var(--line); }
.choice-content { padding: 1px 4px 4px; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.choice-grid label { display: flex !important; align-items: flex-start; gap: 8px !important; color: #c6ccda; font-size: 12px !important; font-weight: 500 !important; line-height: 1.4; }
.choice-grid input[type="checkbox"], .choice-grid input[type="radio"] { flex: 0 0 16px; width: 16px; min-height: 16px; margin: 1px 0 0; padding: 0; }
.other-detail { margin-top: 13px; }
.product-dialog { width: min(760px, calc(100% - 24px)); max-height: min(92vh, 900px); padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: 18px; color: var(--text); background: #191e2b; box-shadow: 0 30px 120px #000a; }
.product-dialog::backdrop { background: #05070dcc; backdrop-filter: blur(4px); }
.dialog-form { padding: 24px; }
.dialog-heading { margin-bottom: 22px; display: flex; justify-content: space-between; align-items: flex-start; }
.dialog-heading .eyebrow { margin-bottom: 5px; }
.icon-button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: transparent; font-size: 24px; line-height: 1; }
.dialog-actions { margin-top: 20px; display: flex; justify-content: flex-end; gap: 10px; }
.toast { position: fixed; right: 22px; bottom: 22px; max-width: min(420px, calc(100vw - 44px)); padding: 13px 17px; border: 1px solid #b2f52f55; border-radius: 11px; color: var(--text); background: #242c27; box-shadow: 0 12px 36px #0007; opacity: 0; pointer-events: none; transform: translateY(12px); transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

@media (max-width: 760px) {
  .topbar { height: 68px; padding-inline: 16px; }
  .brand-logo { width: 40px; height: 40px; }
  .brand-lockup strong { font-size: 12px; }
  .brand-lockup span { font-size: 8px; }
  .connection { display: none; }
  .workspace { display: block; }
  .side-nav { position: sticky; z-index: 5; top: 0; display: flex; gap: 5px; overflow-x: auto; margin: 0; padding: 8px 10px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
  .side-nav .eyebrow { display: none; }
  .side-nav-button { width: auto; flex: 0 0 auto; padding: 0 12px; }
  .side-nav-button.active { box-shadow: inset 0 -3px var(--lime); }
  main { padding: 30px 16px 52px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .finance-period-controls { width: 100%; justify-items: stretch; }
  .finance-period-controls > label select { width: 100%; }
  .report-heading { align-items: stretch; flex-direction: column; }
  .repair-heading-actions { width: 100%; justify-content: flex-start; }
  .summary-grid { grid-template-columns: 1fr; gap: 9px; }
  .finance-grid { grid-template-columns: 1fr; }
  .expense-form { grid-template-columns: 1fr; }
  .goal-card { grid-template-columns: 1fr; }
  .goal-form { align-items: stretch; flex-direction: column; }
  .summary-card { min-height: 78px; }
  .catalog-toolbar { align-items: stretch; flex-direction: column; }
  .search-box { width: 100%; }
  .filter-label { justify-content: space-between; }
  .form-grid.two-col { grid-template-columns: 1fr; }
  .sales-layout { grid-template-columns: 1fr; }
  .choice-grid { grid-template-columns: 1fr; }
  .sale-product { grid-template-columns: minmax(0, 1fr) auto; }
  .sale-product button { grid-column: 1 / -1; }
  .checkout-totals label, .payment-fields label { align-items: flex-start; }
  .payment-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-two { grid-column: auto; }
  .dialog-form { padding: 18px; }
  .auth-card { padding: 24px; }
}

@media print {
  @page { size: 80mm auto; margin: 3mm; }
  body.printing-receipt * { visibility: hidden !important; }
  body.printing-receipt #receipt-print, body.printing-receipt #receipt-print * { visibility: visible !important; }
  body.printing-receipt #receipt-print { display: block !important; position: absolute; inset: 0 auto auto 0; box-sizing: border-box; width: 74mm; padding: 2mm; color: #000; background: #fff; font: 14px/1.45 Arial, Helvetica, sans-serif; }
  #receipt-print .receipt-brand { margin: 1mm 0 1mm; display: flex; align-items: center; justify-content: center; gap: 3mm; }
  #receipt-print .receipt-logo { display: block; flex: 0 0 17mm; width: 17mm; height: 17mm; object-fit: contain; filter: grayscale(1) invert(1) contrast(1.5); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #receipt-print .receipt-brand-text { min-width: 0; text-align: left; }
  #receipt-print h1 { margin: 0 0 2px; font-size: 20px; line-height: 1.1; text-align: left; }
  #receipt-print .receipt-slogan { margin: 0; text-align: left; font-size: 10px; font-weight: 700; letter-spacing: 1.4px; }
  #receipt-print .receipt-business-contact { margin: 0 0 6px; text-align: center; font-size: 13px; line-height: 1.4; font-weight: 600; }
  #receipt-print .receipt-business-contact p { margin: 1px 0; }
  #receipt-print .receipt-warranty { margin: 6px 0; font-size: 10.5px; line-height: 1.38; }
  #receipt-print .receipt-warranty-heading { margin: 0 0 2px; font-weight: 700; }
  #receipt-print .receipt-warranty-list { margin: 0; padding-left: 14px; }
  #receipt-print .receipt-warranty-list li { margin: 0 0 3px; padding-left: 1px; overflow-wrap: anywhere; }
  #receipt-print .receipt-policy-note { margin: 4px 0 0; font-weight: 700; }
  #receipt-print p { margin: 3px 0; }
  #receipt-print .receipt-center { text-align: center; }
  #receipt-print .receipt-rule { border-top: 1px dashed #000; margin: 6px 0; }
  #receipt-print .receipt-line { display: flex; justify-content: space-between; gap: 5px; align-items: baseline; }
  #receipt-print .receipt-strong { font-weight: 700; }
  #receipt-print .receipt-section-label { margin: 5px 0 2px; font-weight: 700; }
  #receipt-print .receipt-title { margin: 5px 0; font-weight: 700; }
  #receipt-print .receipt-items { width: 100%; border-collapse: collapse; table-layout: fixed; font: 13px/1.45 Arial, Helvetica, sans-serif; letter-spacing: 0; }
  #receipt-print .receipt-items th, #receipt-print .receipt-items td { padding: 2px 1px; border-bottom: 1px dotted #777; text-align: left; overflow-wrap: anywhere; vertical-align: top; }
  #receipt-print .receipt-items th:first-child, #receipt-print .receipt-items tbody tr:not(.receipt-item-details-row) td:first-child { width: 68%; }
  #receipt-print .receipt-items th:last-child, #receipt-print .receipt-items tbody tr:not(.receipt-item-details-row) td:last-child { width: 32%; text-align: right; }
  #receipt-print .receipt-items th { font-size: 11px; font-weight: 700; }
  #receipt-print .receipt-items .receipt-item-description { font-size: 12px; }
  #receipt-print .receipt-items .receipt-item-amount { white-space: nowrap; }
  #receipt-print .receipt-items .receipt-item-details-row td { padding-top: 1px; border-bottom: 1px dotted #777; }
  #receipt-print .receipt-items .receipt-item-details { width: 100%; text-align: left; display: flex; justify-content: space-between; gap: 4px; font-size: 11px; line-height: 1.4; }
  #receipt-print .receipt-items .receipt-item-code, #receipt-print .receipt-items .receipt-item-unit-price { min-width: 0; overflow-wrap: anywhere; }
  #receipt-print .receipt-items .receipt-item-unit-price { text-align: right; }
  #receipt-print .receipt-observation { margin: 4px 0; overflow-wrap: anywhere; }
  #receipt-print .receipt-notice { margin-top: 8px; font-size: 12px; line-height: 1.45; text-align: center; }
  body.printing-labels * { visibility: hidden !important; }
  body.printing-labels #label-print, body.printing-labels #label-print * { visibility: visible !important; }
  body.printing-labels #label-print { display: block !important; position: absolute; inset: 0; margin: 0; padding: 0; }
  body.printing-labels #label-print .print-label { margin: 0; border: 0; }
  body.printing-labels #label-print .label-sheet:last-child { break-after: auto; page-break-after: auto; }
}
.sale-return-items { display: grid; gap: 10px; max-height: 42vh; overflow: auto; padding: 2px 4px 2px 0; }
.sale-return-row { display: grid; grid-template-columns: minmax(180px, 1fr) repeat(2, minmax(130px, .55fr)); gap: 10px; align-items: end; padding: 12px; border: 1px solid var(--line, #dedede); border-radius: 10px; }
.sale-return-row strong { align-self: center; }
.sale-return-row label { font-size: .86rem; }
@media (max-width: 650px) { .sale-return-row { grid-template-columns: 1fr 1fr; } .sale-return-row strong { grid-column: 1 / -1; } }
