/* Nota WA — mobile-first, ringan, profesional */
:root{--primary:#2563eb;--primary-dark:#1d4ed8;--primary-soft:#eff6ff;--success:#15803d;--success-soft:#f0fdf4;--warning:#b45309;--warning-soft:#fffbeb;--danger:#dc2626;--danger-soft:#fef2f2;--bg:#f6f7f9;--surface:#fff;--surface-soft:#f8fafc;--text:#111827;--text-secondary:#4b5563;--text-muted:#6b7280;--border:#e5e7eb;--border-strong:#d1d5db;--radius-sm:8px;--radius-md:12px;--radius-lg:16px;--shadow-sm:0 1px 2px rgba(15,23,42,.05);--shadow-md:0 4px 14px rgba(15,23,42,.07);--max-content:880px}
*,*::before,*::after{box-sizing:border-box}html{min-width:320px;scroll-behavior:smooth}body{margin:0;min-height:100vh;background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:1.5;-webkit-font-smoothing:antialiased}button,input,select,textarea{font:inherit}button{-webkit-tap-highlight-color:transparent}img{max-width:100%}
.app-header{background:var(--surface);border-bottom:1px solid var(--border);padding:16px;text-align:center}.app-header h1{margin:0;color:var(--text);font-size:1.25rem;font-weight:750;letter-spacing:-.02em}.tagline{margin-top:3px;color:var(--text-muted);font-size:.8rem}.app-container{width:min(100% - 24px,var(--max-content));margin:0 auto;padding:16px 0 24px}.view{display:none}.view.active{display:block}
.card{margin-bottom:14px;padding:16px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-sm)}.card h2{margin:0 0 14px;padding:0 0 10px;border-bottom:1px solid var(--border);font-size:1.05rem;font-weight:700}.card h3{margin:18px 0 9px;font-size:.95rem;font-weight:700}.form-group{margin-bottom:13px}.form-row{display:grid;grid-template-columns:1fr;gap:12px}label{display:block;margin-bottom:5px;color:var(--text-secondary);font-size:.82rem;font-weight:650}input:not([type="checkbox"]):not([type="radio"]),select,textarea{width:100%;min-height:44px;padding:10px 12px;background:var(--surface);color:var(--text);border:1px solid var(--border-strong);border-radius:var(--radius-sm);outline:none;transition:border-color .15s,box-shadow .15s,background .15s}textarea{min-height:88px;resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af}input:not([type="checkbox"]):not([type="radio"]):focus,select:focus,textarea:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(37,99,235,.12)}input:not([type="checkbox"]):not([type="radio"])[readonly]{background:var(--surface-soft);color:var(--text-secondary)}.field-help{margin:5px 0 0;color:var(--text-muted);font-size:.75rem;line-height:1.45}
.highlight{padding:14px;background:var(--primary-soft);border:1px solid #bfdbfe;border-radius:var(--radius-md)}.btn{display:inline-flex;align-items:center;justify-content:center;min-height:44px;width:100%;padding:10px 15px;border:1px solid transparent;border-radius:var(--radius-sm);font-size:.92rem;font-weight:700;line-height:1.2;text-align:center;cursor:pointer;transition:background .15s,border-color .15s,transform .05s,opacity .15s}.btn:active{transform:translateY(1px)}.btn:disabled{cursor:not-allowed;opacity:.55}.btn-primary{background:var(--primary);color:#fff}.btn-primary:hover{background:var(--primary-dark)}.btn-secondary{background:#475569;color:#fff}.btn-success{background:var(--success);color:#fff}.btn-danger{background:var(--danger);color:#fff}.btn-outline{background:var(--surface);border-color:var(--border-strong);color:var(--text)}.btn-outline:hover{background:var(--surface-soft)}.btn-quiet{background:var(--surface-soft);border-color:var(--border);color:var(--text-secondary)}.btn-large{min-height:50px;font-size:1rem}.action-buttons{display:grid;grid-template-columns:1fr;gap:9px;margin-top:18px}
.item-row{margin-bottom:12px;padding:14px;background:var(--surface-soft);border:1px solid var(--border);border-radius:var(--radius-md)}.item-row:last-child{margin-bottom:0}.item-row-header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:11px}.item-row-title{min-width:0;font-size:.9rem;font-weight:750}.remove-item{position:static;flex:0 0 auto;padding:5px 8px;background:transparent;color:var(--danger);border:1px solid transparent;border-radius:6px;font-size:.78rem;font-weight:650;cursor:pointer}.remove-item:hover{background:var(--danger-soft);border-color:#fecaca}.item-subtotal{display:flex;justify-content:space-between;gap:12px;margin-top:8px;padding-top:9px;border-top:1px dashed var(--border-strong);color:var(--text-secondary);font-size:.85rem}.item-subtotal strong{color:var(--text)}
.status-badge{display:inline-flex;align-items:center;min-height:26px;padding:4px 9px;border-radius:999px;font-size:.72rem;font-weight:800;letter-spacing:.02em}.status-draft{background:var(--warning-soft);color:var(--warning)}.status-final,.status-paid{background:var(--success-soft);color:var(--success)}.status-unpaid{background:var(--danger-soft);color:#b91c1c}
.receipt-paper{width:100%;max-width:760px;margin:0 auto 16px;padding:22px;background:#fff;color:#111;border:1px solid #e5e7eb;border-radius:4px;box-shadow:var(--shadow-sm)}.receipt-header{margin-bottom:17px;padding-bottom:15px;border-bottom:1px dashed #bdbdbd;text-align:center}.receipt-header img{display:block;max-width:72px;max-height:72px;object-fit:contain}.receipt-business-row{display:flex;gap:12px;align-items:center}.receipt-business-row--center{flex-direction:column}.receipt-business-row--center img{margin:0 auto 8px}.receipt-business-row--left{justify-content:flex-start;text-align:left}.receipt-business-row--left img{margin:0}.receipt-business-row--right{flex-direction:row-reverse;justify-content:flex-start;text-align:right}.receipt-business-row--right img{margin:0}.receipt-business-info{min-width:0}.receipt-header h2{margin:0;padding:0;border:0;font-size:1.2rem;font-weight:800}.receipt-header p{margin:2px 0;font-size:.8rem;color:#555}.receipt-address{margin-top:9px!important}.receipt-meta{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:16px;font-size:.82rem}.receipt-meta>div:last-child{text-align:right}.receipt-table{width:100%;margin-bottom:16px;border-collapse:collapse;font-size:.83rem}.receipt-table th,.receipt-table td{padding:8px 5px;border-bottom:1px solid #ececec;text-align:left;vertical-align:top}.receipt-table th{background:#fafafa;color:#333;font-weight:700}.receipt-table .text-right{text-align:right}.receipt-table .item-description{display:block;margin-top:2px;color:#666;font-size:.75rem}.receipt-summary{margin-top:8px;padding-top:10px;border-top:2px solid #111}.summary-row{display:flex;justify-content:space-between;gap:15px;margin-bottom:5px;font-size:.84rem}.summary-row.total{margin-top:9px;padding-top:9px;border-top:1px solid #ccc;font-size:1.08rem;font-weight:800}.receipt-payment{margin-top:14px;padding:11px 12px;background:#f8fafc;border:1px solid #e5e7eb;border-radius:5px;font-size:.82rem}.receipt-terms{margin-top:14px;padding-top:12px;border-top:1px solid #e5e7eb;white-space:pre-wrap;font-size:.76rem;color:#555}.receipt-footer{margin-top:32px;margin-bottom:16px;padding-top:18px;border-top:1px dashed #bbb;color:#555;font-size:.78rem;text-align:center}.receipt-final{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:14px;padding:9px 11px;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:5px;color:#166534;font-size:.76rem;font-weight:700}.integrity-box{margin-top:12px;padding:9px 10px;background:#fafafa;border:1px solid #e5e7eb;border-radius:5px;color:#6b7280;font-size:.68rem;line-height:1.45;word-break:break-all}
.history-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 0;border-bottom:1px solid var(--border)}.history-item:last-child{border-bottom:0}.history-info{min-width:0}.history-info h4{margin:0 0 3px;font-size:.9rem;font-weight:750}.history-info p{margin:2px 0;color:var(--text-muted);font-size:.76rem}.history-total{color:var(--text);font-weight:750}.history-actions{display:flex;flex:0 0 auto;gap:6px}.history-actions button{width:auto;min-height:36px;padding:6px 9px;font-size:.76rem}.empty-state{padding:28px 14px;color:var(--text-muted);text-align:center}.empty-state strong{display:block;margin-bottom:5px;color:var(--text-secondary)}.notice{padding:11px 12px;border-radius:var(--radius-sm);font-size:.82rem}.notice-info{background:var(--primary-soft);border:1px solid #bfdbfe;color:#1e40af}.notice-success{background:var(--success-soft);border:1px solid #bbf7d0;color:#166534}.notice-warning{background:var(--warning-soft);border:1px solid #fde68a;color:#92400e}.notice-danger{background:var(--danger-soft);border:1px solid #fecaca;color:#991b1b}
.top-nav{position:sticky;top:0;z-index:100;display:flex;gap:6px;align-items:center;overflow-x:auto;white-space:nowrap;padding:8px max(12px,env(safe-area-inset-right)) 8px max(12px,env(safe-area-inset-left));background:rgba(255,255,255,.97);border-bottom:1px solid var(--border);box-shadow:0 2px 12px rgba(15,23,42,.05);backdrop-filter:blur(8px)}.top-nav::-webkit-scrollbar{height:0}.top-nav{scrollbar-width:none}.nav-btn{flex:1 0 auto;min-width:84px;min-height:42px;padding:7px 12px;background:transparent;border:0;border-radius:8px;color:var(--text-muted);font-size:.78rem;font-weight:700;cursor:pointer}.nav-btn.active{background:var(--primary-soft);color:var(--primary)}.nav-btn.nav-primary{color:var(--primary)}
.logo-preview,.logo-preview-empty{display:block;width:100%;height:112px;margin-top:8px;box-sizing:border-box;background:var(--surface-soft);border:1px solid var(--border);border-radius:var(--radius-sm)}.logo-preview{padding:12px;object-fit:contain}.logo-preview-empty{display:flex;align-items:center;justify-content:center;gap:11px;padding:14px;color:var(--text-muted);border-style:dashed}.logo-preview-empty__mark{display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;border-radius:50%;background:#fff;color:var(--primary);font-size:1.15rem;border:1px solid var(--border)}.logo-preview-empty__copy{display:grid;gap:2px;text-align:left}.logo-preview-empty__copy strong{font-size:.82rem;color:var(--text)}.logo-preview-empty__copy small{font-size:.72rem;line-height:1.35}
.segmented-control{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.segmented-control button{min-height:40px;padding:8px;border:1px solid var(--border-strong);border-radius:var(--radius-sm);background:var(--surface);color:var(--text-secondary);font:inherit;font-size:.8rem;font-weight:700;cursor:pointer}.segmented-control button.active{border-color:var(--primary);background:var(--primary-soft);color:var(--primary)}.theme-picker{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:10px}.theme-card{display:grid;grid-template-columns:48px minmax(0,1fr);align-items:center;gap:9px;min-height:64px;padding:8px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface);color:var(--text);text-align:left;font:inherit;cursor:pointer}.theme-card.active{border-color:var(--primary);box-shadow:0 0 0 2px rgba(37,99,235,.12)}.theme-card strong{font-size:.8rem}.theme-card__mini{position:relative;display:block;height:42px;overflow:hidden;border:1px solid #dfe4ec;background:#fff}.theme-card__mini>span{display:block;width:52%;height:6px;margin:5px;background:#334155}.theme-card__mini i{display:block;height:3px;margin:4px 5px;background:#e2e8f0}.theme-card__mini b{position:absolute;right:5px;bottom:5px;width:22px;height:7px;background:#334155}.theme-card__mini.theme-modern{border-top:4px solid #2563eb}.theme-card__mini.theme-modern>span,.theme-card__mini.theme-modern b{background:#2563eb}.theme-card__mini.theme-elegant{border-color:#cbb17c;background:#fffdf7}.theme-card__mini.theme-elegant>span,.theme-card__mini.theme-elegant b{background:#8c6a2a}.theme-card__mini.theme-elegant i{background:#eadfca}.theme-card__mini.theme-classic{border-top:4px solid #334155}.theme-card__mini.theme-compact>span{height:4px;margin:4px}.theme-card__mini.theme-compact i{height:2px;margin:3px 4px}.theme-card__mini.theme-professional{border-left:4px solid #15803d}.theme-card__mini.theme-professional>span,.theme-card__mini.theme-professional b{background:#15803d}.theme-settings-preview{margin-top:12px;padding:10px;background:var(--surface-soft);border:1px solid var(--border);border-radius:var(--radius-sm);overflow:hidden}.theme-settings-preview .receipt-paper{margin:0;padding:15px;box-shadow:none}.theme-settings-preview .receipt-meta{margin-bottom:10px}.theme-settings-preview .receipt-table{margin-bottom:10px}.theme-settings-preview .receipt-table th,.theme-settings-preview .receipt-table td{padding:4px}.theme-settings-preview .receipt-payment{margin-top:9px;padding:8px}.theme-settings-preview .receipt-footer{margin-top:12px}
.receipt-paper.logo-position-left .receipt-header img{margin-left:0;margin-right:auto}.receipt-paper.logo-position-center .receipt-header img{margin-left:auto;margin-right:auto}.receipt-paper.logo-position-right .receipt-header img{margin-left:auto;margin-right:0}.receipt-paper.theme-classic{border-top:6px solid #334155}.receipt-paper.theme-classic .receipt-header{border-bottom:2px solid #334155}.receipt-paper.theme-modern{border-top:7px solid #2563eb}.receipt-paper.theme-modern .receipt-table th{background:#2563eb;color:#fff}.receipt-paper.theme-modern .summary-row.total{background:#eff6ff;padding:10px}.receipt-paper.theme-elegant{border-color:#d7c493;border-top:5px solid #9b793a}.receipt-paper.theme-elegant .receipt-header{border-bottom-color:#c9b37c}.receipt-paper.theme-elegant .receipt-table th{background:#fffaf0;color:#6d5220}.receipt-paper.theme-elegant .receipt-payment{background:#fffaf0;border-color:#eadfc4}.receipt-paper.theme-compact{padding:17px;font-size:.92em}.receipt-paper.theme-compact .receipt-header{margin-bottom:11px;padding-bottom:10px}.receipt-paper.theme-compact .receipt-table th,.receipt-paper.theme-compact .receipt-table td{padding:5px 4px}.receipt-paper.theme-professional{border-left:6px solid #15803d}.receipt-paper.theme-professional .receipt-header{text-align:center}.receipt-paper.theme-professional .receipt-summary{border-top:3px solid #15803d}.receipt-paper.theme-minimal .receipt-table th{background:transparent;border-bottom:2px solid #111}
.payment-request-group{margin:2px 0 13px;padding:12px;background:var(--surface-soft);border:1px solid var(--border);border-radius:var(--radius-sm)}.payment-qris-preview{display:block;width:min(100%,180px);margin:9px auto 0;padding:5px;background:#fff;border:1px solid var(--border);border-radius:8px;object-fit:contain}.receipt-payment-request{display:grid;gap:7px;margin-top:11px;padding-top:11px;border-top:1px dashed #cbd5e1}.receipt-payment-qris{display:block;width:min(100%,185px);height:auto;margin:2px auto;padding:5px;background:#fff;border:1px solid #d8e1ec;border-radius:7px;object-fit:contain}.receipt-payment-barcode{display:grid;justify-items:center;gap:7px;margin-top:16px;padding-top:12px;border-top:1px dashed #cbd5e1;text-align:center;font-size:.78rem;color:#475569}.receipt-payment-barcode img{display:block;width:min(100%,220px);max-height:150px;object-fit:contain;padding:5px;background:#fff;border:1px solid #d8e1ec;border-radius:7px}
.cash-payment-group{display:grid;gap:8px;margin:0 0 13px;padding:12px;background:var(--surface-soft);border:1px solid var(--border);border-radius:var(--radius-sm)}.cash-payment-group[hidden]{display:none!important}.cash-payment-group input{margin:0}.cash-payment-feedback{min-height:24px}.cash-payment-result{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding-top:8px;border-top:1px dashed var(--border-strong);font-size:.88rem}.cash-payment-result strong{font-size:.94rem}.cash-payment-result.is-change strong{color:var(--success)}.cash-payment-result.is-shortfall{color:#991b1b}.cash-payment-result.is-shortfall strong{color:#b91c1c}.cash-payment-result.is-pending{color:var(--text-muted)}.cash-payment-result.is-pending strong{font-size:.8rem;font-weight:650}.receipt-summary .cash-received{margin-top:8px}.receipt-summary .cash-change strong{color:#166534}.receipt-summary .cash-shortfall{color:#991b1b}.receipt-summary .cash-shortfall strong{color:#b91c1c}
.payment-method-option{display:inline-flex;align-items:center;gap:7px}.payment-method-logo{width:28px;height:20px;object-fit:contain;background:#fff;border-radius:3px;padding:1px}
.payment-qris-download{display:flex;justify-content:center;width:max-content;margin:10px auto 0;padding:7px 11px;border:1px solid #cbd5e1;border-radius:7px;background:#fff;color:#1d4ed8;font-size:.75rem;font-weight:700;text-decoration:none}.payment-qris-download:hover{border-color:#2563eb;background:#eff6ff}
.receipt-paper.paper-a5{max-width:560px}.receipt-paper.paper-80{width:80mm;max-width:80mm;padding:5mm;font-size:12px}.receipt-paper.paper-58{width:58mm;max-width:58mm;padding:3mm;font-size:10px}.paper-80 .receipt-meta,.paper-58 .receipt-meta{grid-template-columns:1fr}.paper-80 .receipt-meta>div:last-child,.paper-58 .receipt-meta>div:last-child{text-align:left}.paper-80 .receipt-table,.paper-58 .receipt-table{font-size:inherit}.paper-58 .receipt-table th:nth-child(3),.paper-58 .receipt-table td:nth-child(3){display:table-cell}.paper-80 .receipt-summary,.paper-58 .receipt-summary{width:100%}.paper-80 .receipt-header img,.paper-58 .receipt-header img{max-width:38mm;max-height:18mm}.paper-58 .receipt-header img{max-width:28mm;max-height:14mm}.paper-80 .receipt-payment,.paper-58 .receipt-payment,.paper-80 .receipt-terms,.paper-58 .receipt-terms{overflow-wrap:anywhere}
.settings-preview-card{margin-bottom:14px}.settings-preview-card>.field-help{margin-top:-6px;margin-bottom:12px}.settings-full-preview>#settings-full-note{margin-top:14px}.data-tools{margin-top:14px;padding:13px;background:var(--surface-soft);border:1px solid var(--border);border-radius:var(--radius-sm)}.data-tools strong{display:block;margin-bottom:4px}.data-tools .btn{margin-top:9px}.inline-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.inline-actions .btn{width:auto;margin-top:0}.upgrade-email-form input{margin-top:5px}.receipt-paper .receipt-business-row--left,.receipt-paper .receipt-business-row--right{gap:14px}.receipt-paper .receipt-business-row--left img,.receipt-paper .receipt-business-row--right img{margin:0!important}

/* Tema aplikasi: hanya token UI; nota tetap memakai gaya cetaknya sendiri. */
:root{--app-header-bg:var(--surface);--app-header-text:var(--text);--app-header-muted:var(--text-muted);--nav-bg:var(--surface);--input-bg:var(--surface);--input-readonly-bg:var(--surface-soft);--placeholder:#9ca3af;--focus-ring:rgba(37,99,235,.14);--highlight-border:#bfdbfe;--secondary:#475569}
:root[data-app-theme="green"]{--primary:#15803d;--primary-dark:#166534;--primary-soft:#f0fdf4;--focus-ring:rgba(21,128,61,.15);--highlight-border:#bbf7d0}
:root[data-app-theme="purple"]{--primary:#7e22ce;--primary-dark:#6b21a8;--primary-soft:#faf5ff;--focus-ring:rgba(126,34,206,.15);--highlight-border:#e9d5ff}
:root[data-app-theme="teal"]{--primary:#0f766e;--primary-dark:#115e59;--primary-soft:#f0fdfa;--focus-ring:rgba(15,118,110,.15);--highlight-border:#99f6e4}
:root[data-app-theme="orange"]{--primary:#c2410c;--primary-dark:#9a3412;--primary-soft:#fff7ed;--focus-ring:rgba(194,65,12,.15);--highlight-border:#fed7aa}
:root[data-app-theme="maroon"]{--primary:#9f1239;--primary-dark:#881337;--primary-soft:#fff1f2;--focus-ring:rgba(159,18,57,.15);--highlight-border:#fecdd3}
:root[data-app-theme="darkBlue"],:root[data-app-theme="darkGreen"],:root[data-app-theme="darkPurple"],:root[data-app-theme="darkTeal"]{--text:#f8fafc;--text-secondary:#d5deeb;--text-muted:#aeb9c9;--placeholder:#93a1b5;--nav-bg:var(--surface);--secondary:#66758a;--success:#5ee89a;--success-soft:#173a2a;--warning:#fbbf24;--warning-soft:#4b3817;--danger:#fb7185;--danger-soft:#4a1d2b;--shadow-sm:0 1px 2px rgba(0,0,0,.28);--shadow-md:0 4px 14px rgba(0,0,0,.34)}
:root[data-app-theme="darkBlue"]{--bg:#111d35;--surface:#192844;--surface-soft:#223453;--border:#385174;--border-strong:#4e6b91;--input-bg:#13223c;--input-readonly-bg:#223453;--primary:#71afff;--primary-dark:#4d94ef;--primary-soft:#203f68;--focus-ring:rgba(113,175,255,.27);--highlight-border:#3b6da5}
:root[data-app-theme="darkGreen"]{--bg:#2d171f;--surface:#40212b;--surface-soft:#512b37;--border:#704252;--border-strong:#8a5667;--input-bg:#351a24;--input-readonly-bg:#512b37;--primary:#fa9bb4;--primary-dark:#ea7092;--primary-soft:#663243;--focus-ring:rgba(250,155,180,.26);--highlight-border:#9e5268}
:root[data-app-theme="darkPurple"]{--bg:#251a38;--surface:#35264d;--surface-soft:#44325f;--border:#634c82;--border-strong:#7a609d;--input-bg:#2c1f43;--input-readonly-bg:#44325f;--primary:#d3a9ff;--primary-dark:#b97df3;--primary-soft:#583c7c;--focus-ring:rgba(211,169,255,.27);--highlight-border:#8662ac}
:root[data-app-theme="darkTeal"]{--bg:#2d2219;--surface:#403126;--surface-soft:#523e30;--border:#705844;--border-strong:#896d55;--input-bg:#35271d;--input-readonly-bg:#523e30;--primary:#f0be83;--primary-dark:#df9e51;--primary-soft:#6a4d32;--focus-ring:rgba(240,190,131,.26);--highlight-border:#9f7650}
.app-header{background:var(--app-header-bg);border-bottom-color:transparent}.app-header h1{color:var(--app-header-text)}.app-header .tagline{color:var(--app-header-muted)}.top-nav{background:var(--nav-bg)}input:not([type="checkbox"]):not([type="radio"]),select,textarea{background:var(--input-bg)}input::placeholder,textarea::placeholder{color:var(--placeholder)}input:not([type="checkbox"]):not([type="radio"]):focus,select:focus,textarea:focus{box-shadow:0 0 0 3px var(--focus-ring)}input:not([type="checkbox"]):not([type="radio"])[readonly]{background:var(--input-readonly-bg)}.highlight{border-color:var(--highlight-border)}.btn-secondary{background:var(--secondary)}
.app-theme-picker{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:10px}.app-theme-card{display:flex;align-items:center;gap:9px;min-width:0;padding:9px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface);color:var(--text);font:inherit;font-size:.82rem;font-weight:700;text-align:left;cursor:pointer}.app-theme-card.active{border-color:var(--primary);box-shadow:0 0 0 2px var(--focus-ring)}.app-theme-swatch{position:relative;display:block;flex:0 0 42px;height:30px;overflow:hidden;border:1px solid rgba(15,23,42,.16);border-radius:6px;background:#f6f7f9}.app-theme-swatch::before{content:"";position:absolute;inset:5px 5px 5px 17px;border-radius:3px;background:#fff}.app-theme-swatch::after{content:"";position:absolute;top:0;bottom:0;left:0;width:13px;background:#2563eb}.app-theme-swatch--green::after{background:#15803d}.app-theme-swatch--purple::after{background:#7e22ce}.app-theme-swatch--teal::after{background:#0f766e}.app-theme-swatch--orange::after{background:#c2410c}.app-theme-swatch--maroon::after{background:#9f1239}.app-theme-swatch--darkBlue,.app-theme-swatch--darkGreen,.app-theme-swatch--darkPurple,.app-theme-swatch--darkTeal{background:#0f172a;border-color:#475569}.app-theme-swatch--darkBlue::before,.app-theme-swatch--darkGreen::before,.app-theme-swatch--darkPurple::before,.app-theme-swatch--darkTeal::before{background:#202b3d}.app-theme-swatch--darkBlue::after{background:#60a5fa}.app-theme-swatch--darkGreen::after{background:#4ade80}.app-theme-swatch--darkPurple::after{background:#c084fc}.app-theme-swatch--darkTeal::after{background:#2dd4bf}

/* Checkout SimpelNota — pola kartu ringkas ala AutoLanding. */
.app-theme-settings-card{margin-top:14px}.app-theme-settings-card .field-help{margin-bottom:8px}.theme-settings-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:10px 0}.theme-settings-actions .btn{width:100%!important;min-width:0;min-height:42px!important;margin:0!important;padding:8px 6px!important;font-size:.76rem!important;line-height:1.2}.app-theme-picker{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.app-theme-group{grid-column:1/-1;margin:7px 0 0;color:var(--text-muted);font-size:.68rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.app-theme-card{gap:6px;min-height:38px;padding:5px 6px;font-size:.69rem;line-height:1.15}.app-theme-swatch{flex-basis:28px;height:22px;background:var(--swatch-bg)!important;border-color:var(--swatch-border)!important}.app-theme-swatch::before{inset:4px 4px 4px 11px;background:var(--swatch-surface)!important}.app-theme-swatch::after{width:8px;background:var(--swatch-primary)!important}.app-theme-card strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.payment-body{background:#eef4fb;color:#172033}.payment-shell{width:min(100% - 28px,640px);margin:0 auto;padding:22px 0 38px}.payment-brand{display:inline-flex;align-items:center;gap:10px;color:#17324d;text-decoration:none}.payment-brand-mark{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#2563eb;color:#fff;font-weight:850}.payment-brand strong,.payment-brand small{display:block}.payment-brand strong{font-size:.95rem}.payment-brand small{margin-top:1px;color:#64748b;font-size:.68rem}.payment-heading{padding:29px 0 18px;text-align:center}.payment-heading h1{margin:4px 0 7px;color:#0f172a;font-size:1.6rem;line-height:1.2}.payment-heading>p:last-child{max-width:420px;margin:0 auto;color:#64748b;font-size:.88rem}.eyebrow{margin:0;color:#2563eb;font-size:.68rem;font-weight:800;letter-spacing:.1em}.payment-message{min-height:20px;margin:0 0 12px;color:#64748b;text-align:center;font-size:.8rem}.payment-message.is-danger{color:#b91c1c}.payment-card{margin-bottom:13px;padding:18px;background:#fff;border:1px solid #dce5f0;border-radius:16px;box-shadow:0 8px 24px rgba(15,23,42,.055)}.payment-card h2{margin:0 0 13px;color:#0f172a;font-size:1rem}.payment-summary{text-align:center}.payment-plan{margin:0 0 12px;color:#334155;font-size:.92rem;font-weight:750}.payment-total-label{display:block;color:#64748b;font-size:.66rem;font-weight:800;letter-spacing:.08em}.payment-total{display:block;margin:2px 0 10px;color:#0f172a;font-size:2rem;line-height:1.15;letter-spacing:-.04em}.payment-status{display:inline-flex;padding:5px 9px;border-radius:999px;background:#eff6ff;color:#1d4ed8;font-size:.72rem;font-weight:750}.payment-order-meta{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:15px;color:#64748b;font-size:.72rem}.payment-order-id{overflow-wrap:anywhere}.copy-button{flex:0 0 auto;padding:5px 8px;border:1px solid #cbd5e1;border-radius:7px;background:#fff;color:#334155;font:inherit;font-size:.7rem;font-weight:700;cursor:pointer}.copy-button:hover{border-color:#2563eb;color:#1d4ed8}.payment-method-groups{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.payment-category{min-height:42px;padding:7px 5px;border:1px solid #d8e1ec;border-radius:9px;background:#fff;color:#475569;font:inherit;font-size:.72rem;font-weight:750;cursor:pointer}.payment-category.active{border-color:#2563eb;background:#eff6ff;color:#1d4ed8;box-shadow:0 0 0 2px rgba(37,99,235,.1)}.payment-method-list{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.payment-method-option{min-height:38px;padding:7px 10px;border:1px solid #d8e1ec;border-radius:8px;background:#f8fafc;color:#334155;font:inherit;font-size:.78rem;font-weight:700;cursor:pointer}.payment-method-option.active{border-color:#2563eb;background:#2563eb;color:#fff}.payment-method-detail{margin-top:13px;padding:14px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:11px}.payment-method-detail h3{margin:0 0 6px;color:#0f172a;font-size:.9rem}.payment-instruction{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;color:#475569;font-size:.82rem;line-height:1.55}.payment-account-number{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:11px;padding:10px 11px;border-radius:9px;background:#fff;border:1px solid #dce5f0}.payment-account-number strong{min-width:0;overflow-wrap:anywhere;color:#0f172a;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.95rem;letter-spacing:.02em}.payment-qris-image{display:block;width:min(100%,260px);height:auto;margin:13px auto 8px;border:1px solid #d8e1ec;border-radius:10px;object-fit:contain;background:#fff}.payment-merchant{margin:0;color:#64748b;text-align:center;font-size:.78rem}.payment-proof .field-help{margin-bottom:12px}.proof-picker{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:138px;padding:18px;border:2px dashed #b8c7d9;border-radius:12px;background:#f8fafc;color:#334155;text-align:center;cursor:pointer}.proof-picker:hover{border-color:#2563eb;background:#f5f9ff}.proof-picker-icon{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#dbeafe;color:#2563eb;font-size:1.2rem;font-weight:800}.proof-picker strong{font-size:.86rem}.proof-picker small{color:#64748b;font-size:.72rem}.payment-proof input[type=file]{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.payment-submit{margin-top:12px}.payment-after-upload{margin:10px 0 0;color:#64748b;font-size:.73rem;line-height:1.5;text-align:center}.payment-back{display:block;margin:18px auto 0;color:#64748b;text-align:center;font-size:.82rem;font-weight:650;text-decoration:none}.payment-back:hover{color:#1d4ed8}@media (min-width:760px){.payment-shell{width:min(100% - 48px,680px);padding-top:32px}.payment-card{padding:22px}.payment-heading h1{font-size:1.8rem}}

.create-empty-preview{overflow:visible}.create-empty-preview>#create-empty-note{margin-top:12px}.create-empty-preview .receipt-paper{margin-bottom:0;padding:16px;box-shadow:none}.create-empty-preview .receipt-meta{margin-bottom:10px}.create-empty-preview .receipt-table{margin-bottom:10px}.create-empty-preview .receipt-table th,.create-empty-preview .receipt-table td{padding:5px 4px}#btn-preview,#btn-settings-preview-note{position:fixed;right:max(12px,env(safe-area-inset-right));bottom:max(14px,env(safe-area-inset-bottom));left:max(12px,env(safe-area-inset-left));z-index:120;width:auto;box-shadow:0 10px 24px rgba(15,23,42,.18)}#view-create,#view-settings{padding-bottom:86px}@media (min-width:800px){#btn-preview,#btn-settings-preview-note{right:calc((100vw - min(100vw - 56px,var(--max-content)))/2);left:auto;width:auto;min-width:190px}}
@media (min-width:640px){.app-header{padding:18px 24px}.app-container{width:min(100% - 40px,var(--max-content));padding-top:24px}.card{padding:20px}.form-row{grid-template-columns:repeat(2,minmax(0,1fr))}.action-buttons{grid-template-columns:repeat(2,minmax(0,1fr))}.top-nav{width:min(100% - 40px,var(--max-content));margin:0 auto;padding:6px;border:1px solid var(--border);border-top:0;border-radius:0 0 var(--radius-md) var(--radius-md);box-shadow:var(--shadow-sm)}.nav-btn{min-height:40px;font-size:.82rem}}
@media (min-width:800px){.app-container{width:min(100% - 56px,var(--max-content))}.receipt-paper{padding:28px}}@media (max-width:380px){.app-container{width:min(100% - 18px,var(--max-content))}.card{padding:14px}.receipt-paper{padding:15px}.receipt-table{font-size:.76rem}.receipt-table th,.receipt-table td{padding:7px 3px}.top-nav{padding-left:8px;padding-right:8px}.nav-btn{font-size:.68rem;min-width:78px;padding-left:8px;padding-right:8px}.theme-picker{grid-template-columns:1fr}}
@page{size:A4;margin:10mm}@media print{html,body{width:100%;min-width:0;margin:0;padding:0!important;background:#fff}body *{visibility:hidden!important}#receipt-preview-container,#receipt-preview-container *{visibility:visible!important}#receipt-preview-container{position:absolute!important;inset:0!important;width:100%!important;margin:0!important;padding:0!important;background:#fff!important;border:0!important;box-shadow:none!important}#receipt-preview-container>h2,#receipt-preview-container .action-buttons,#receipt-preview-container .no-print,.app-header,.top-nav{display:none!important}.receipt-paper{width:100%!important;max-width:none!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;overflow-wrap:anywhere}.receipt-final{-webkit-print-color-adjust:exact;print-color-adjust:exact}.receipt-table{table-layout:fixed}.receipt-table td,.receipt-table th{overflow-wrap:anywhere}.receipt-header img{object-fit:contain!important;max-width:100%!important}.receipt-table tr,.receipt-summary,.receipt-payment,.receipt-terms,.receipt-footer{break-inside:avoid}.receipt-paper.paper-a4{width:190mm!important}.receipt-paper.paper-a5{width:128mm!important}.receipt-paper.paper-80{width:80mm!important;max-width:80mm!important;padding:4mm!important}.receipt-paper.paper-58{width:58mm!important;max-width:58mm!important;padding:3mm!important}}

/* Keep the SimpelNota brand header visible while the app content scrolls. */
.app-header{position:sticky;top:0;z-index:101}
.top-nav{position:relative;top:auto;z-index:100}/* Brand SimpelNota pada seluruh halaman publik. */
.app-brand{display:inline-flex;align-items:center;justify-content:center;gap:9px;color:inherit;text-decoration:none;text-align:left}.app-brand>img{width:42px;height:42px;object-fit:contain}.app-brand .tagline{display:block}.payment-brand-logo{display:block;width:38px;height:38px;object-fit:contain}.theme-current{margin:1px 0 7px;font-weight:650}.theme-toggle{width:auto;min-height:36px;margin-top:2px;font-size:.78rem}.theme-picker[hidden]{display:none!important}@media (max-width:380px){.app-brand>img{width:36px;height:36px}.app-brand h1{font-size:1.1rem}.app-brand .tagline{font-size:.72rem}}
.receipt-paper .receipt-header img{width:110px;max-width:110px;max-height:110px;height:auto}.receipt-paper.paper-80 .receipt-header img{width:76px;max-width:76px;max-height:76px}.receipt-paper.paper-58 .receipt-header img{width:62px;max-width:62px;max-height:62px}

/* Canonical paper geometry: sheets preserve their aspect ratio; thermal
   receipts keep a fixed roll width and grow vertically with their content. */
.receipt-paper.paper-a4{width:210mm;max-width:100%;min-height:297mm;aspect-ratio:210/297;box-sizing:border-box}
.receipt-paper.paper-a5{width:148mm;max-width:100%;min-height:210mm;aspect-ratio:148/210;box-sizing:border-box}
.receipt-paper.paper-80{width:80mm;max-width:100%;min-height:0;height:auto;box-sizing:border-box}
.receipt-paper.paper-58{width:58mm;max-width:100%;min-height:0;height:auto;box-sizing:border-box}
.receipt-paper.paper-80 .receipt-table,.receipt-paper.paper-58 .receipt-table{table-layout:fixed}.receipt-paper.paper-80 .receipt-table th,.receipt-paper.paper-80 .receipt-table td,.receipt-paper.paper-58 .receipt-table th,.receipt-paper.paper-58 .receipt-table td{overflow-wrap:normal;word-break:normal}.receipt-paper.paper-80 .receipt-table th:first-child,.receipt-paper.paper-80 .receipt-table td:first-of-type,.receipt-paper.paper-58 .receipt-table th:first-child,.receipt-paper.paper-58 .receipt-table td:first-of-type{width:30%}.receipt-paper.paper-80 .receipt-table th:nth-child(2),.receipt-paper.paper-80 .receipt-table td:nth-child(2),.receipt-paper.paper-58 .receipt-table th:nth-child(2),.receipt-paper.paper-58 .receipt-table td:nth-child(2){width:17%}.receipt-paper.paper-80 .receipt-table th:nth-child(3),.receipt-paper.paper-80 .receipt-table td:nth-child(3),.receipt-paper.paper-58 .receipt-table th:nth-child(3),.receipt-paper.paper-58 .receipt-table td:nth-child(3){width:26%}.receipt-paper.paper-80 .receipt-table th:nth-child(4),.receipt-paper.paper-80 .receipt-table td:nth-child(4),.receipt-paper.paper-58 .receipt-table th:nth-child(4),.receipt-paper.paper-58 .receipt-table td:nth-child(4){width:27%}.receipt-paper.paper-80 .receipt-table th:nth-child(3),.receipt-paper.paper-80 .receipt-table th:nth-child(4),.receipt-paper.paper-80 .receipt-table .money-cell,.receipt-paper.paper-58 .receipt-table th:nth-child(3),.receipt-paper.paper-58 .receipt-table th:nth-child(4),.receipt-paper.paper-58 .receipt-table .money-cell{white-space:nowrap;overflow-wrap:normal;word-break:normal;font-variant-numeric:tabular-nums}

/* Mobile action bars remain reachable on short viewports and respect the
   gesture/navigation safe area. */
@media(max-width:799px){
  #view-create{padding-bottom:calc(188px + env(safe-area-inset-bottom))!important}
  #view-catalog{padding-bottom:calc(150px + env(safe-area-inset-bottom))!important}
  #view-create .floating-action-area{bottom:max(10px,env(safe-area-inset-bottom));z-index:120}
  #view-create .floating-action-area .btn{min-height:52px}
  .keyboard-open .floating-action-area{display:grid!important}
  #catalog-floating-actions{bottom:max(10px,env(safe-area-inset-bottom))!important;z-index:120!important;padding-bottom:env(safe-area-inset-bottom)!important}
  #catalog-floating-actions #btn-add-catalog-product,#catalog-floating-actions #btn-save-catalog-product{min-height:52px!important}
}

@media print{
  @page{size:auto;margin:10mm}
  .receipt-paper.paper-a4{width:210mm!important;min-height:297mm!important;aspect-ratio:auto!important}
  .receipt-paper.paper-a5{width:148mm!important;min-height:210mm!important;aspect-ratio:auto!important}
  .receipt-paper.paper-80{width:80mm!important;min-height:0!important}
  .receipt-paper.paper-58{width:58mm!important;min-height:0!important}
}
.theme-settings-preview .receipt-header img{width:150px;max-width:150px;max-height:150px}.theme-settings-preview .receipt-business-row--center{gap:4px}.theme-settings-preview .receipt-business-row--center img{margin-bottom:2px}
.report-page{padding-bottom:24px}.report-intro{margin-top:-4px}.report-filter{max-width:520px;margin:18px 0 24px}.report-filter>select{width:100%;min-height:44px}.report-custom-range{margin-top:12px}.report-custom-range .form-row{gap:8px}.report-section{margin-top:24px}.report-section h3{margin:0 0 12px;font-size:1rem}.report-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0}.report-metric{min-width:0;min-height:82px;padding:13px 12px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface-soft);display:flex;flex-direction:column;justify-content:space-between;gap:9px}.report-metric-label{color:var(--text-muted);font-size:.7rem;font-weight:750;line-height:1.25;letter-spacing:.02em}.report-metric-value{display:block;overflow-wrap:anywhere;color:var(--text);font-size:clamp(1rem,4.7vw,1.35rem);font-weight:800;line-height:1.1}.report-metric--money:first-child,.report-metric--profit{border-color:color-mix(in srgb,var(--primary) 28%,var(--border));background:color-mix(in srgb,var(--primary-soft) 55%,var(--surface))}.report-metric--profit .report-metric-value{color:var(--success)}.report-product-list{display:grid;gap:10px}.report-product-card{padding:13px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface)}.report-product-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;border-bottom:1px solid var(--border);padding-bottom:9px}.report-product-head h4{margin:0;min-width:0;overflow-wrap:anywhere;font-size:.95rem}.report-product-head span{flex:0 0 auto;color:var(--text-muted);font-size:.75rem;font-weight:700}.report-product-card dl{display:grid;grid-template-columns:1fr auto;gap:6px 12px;margin:11px 0 0;font-size:.82rem}.report-product-card dt{color:var(--text-muted)}.report-product-card dd{margin:0;text-align:right;font-weight:750;overflow-wrap:anywhere}.report-empty{display:grid;gap:6px;padding:18px 15px;border:1px dashed var(--border-strong);border-radius:var(--radius-sm);background:var(--surface-soft);color:var(--text-muted);font-size:.82rem}.report-empty strong{color:var(--text);font-size:.9rem}.report-export{padding-top:4px}.report-export .field-help{margin-top:-4px}.report-actions{display:flex;gap:9px;flex-wrap:wrap}.report-actions .btn{flex:1;min-width:150px;white-space:normal}@media(min-width:640px){.report-summary{grid-template-columns:repeat(3,minmax(0,1fr))}.report-product-list{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:340px){.report-summary{grid-template-columns:1fr}.report-actions{display:grid}.report-actions .btn{width:100%;min-width:0}}
.app-brand .tagline{text-decoration:none}.nav-btn.nav-primary:not(.active){color:var(--text-muted)}.logo-preview-label{margin-bottom:5px}
/* Laporan usaha: ringkas, responsif, dan tetap ringan tanpa dependency UI. */
.report-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:10px;margin:16px 0}.report-metric{padding:12px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface-soft);display:grid;gap:4px}.report-metric strong{font-size:1.1rem}.report-metric small{color:var(--text-muted);font-size:.72rem;letter-spacing:.03em}.report-actions{align-items:end}.report-table{width:100%;border-collapse:collapse;font-size:.86rem}.report-table th,.report-table td{padding:9px 7px;border-bottom:1px solid var(--border);text-align:left;vertical-align:top}.report-table th{color:var(--text-muted);font-size:.75rem}.product-identification{margin:10px 0;padding:10px;border:1px solid var(--border);border-radius:var(--radius-sm)}.product-identification summary{cursor:pointer;font-weight:700}.product-identification .logo-preview{max-width:180px;margin-top:8px}@media(max-width:600px){.report-table{display:block;overflow-x:auto;white-space:nowrap}.report-actions{align-items:stretch}.report-actions .btn{flex:1}}
.barcode-scanner-modal{padding:6px!important}.barcode-scanner-dialog{width:min(100%,720px)!important;max-height:calc(100vh - 12px);overflow:auto}.barcode-camera-wrap{height:min(68vh,640px)!important;min-height:360px;aspect-ratio:auto!important}.barcode-camera{object-fit:cover!important}@media(max-width:600px){.barcode-scanner-dialog{padding:10px!important;border-radius:12px}.barcode-camera-wrap{height:62vh!important;min-height:380px}}
.ocr-candidates{display:grid;gap:8px;margin:10px 0;padding:10px;border:1px solid var(--primary);border-radius:var(--radius-sm);background:var(--surface-soft)}.ocr-candidates .ocr-product-choice{width:100%;min-height:48px;text-align:left;font-weight:800;white-space:normal}
.product-photo-actions{margin-top:8px}.product-photo-actions .btn{min-height:44px}
.receipt-item-remove{display:block;margin-top:5px;padding:3px 7px;border:1px solid var(--danger,#dc2626);border-radius:6px;background:transparent;color:var(--danger,#dc2626);font-size:.72rem;cursor:pointer}.receipt-item-remove:hover,.receipt-item-remove:focus-visible{background:var(--danger,#dc2626);color:#fff}
/* Scanner barcode: gunakan seluruh layar agar produk mudah diarahkan ke kamera. */
.barcode-scanner-modal{padding:0!important;place-items:stretch!important;background:#05070b!important}
.barcode-scanner-modal .barcode-scanner-dialog{width:100%!important;max-width:none!important;height:100vh;height:100dvh;min-height:100vh;max-height:none!important;box-sizing:border-box;display:flex;flex-direction:column;gap:10px;padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))!important;border:0!important;border-radius:0!important;overflow:hidden;background:#05070b!important;color:#fff!important}
.barcode-scanner-modal .barcode-scanner-head{flex:0 0 auto;margin:0}
.barcode-scanner-modal .barcode-scanner-head .btn{color:#fff!important;background:#0f172a!important;border:1px solid rgba(255,255,255,.72)!important;box-shadow:0 2px 8px rgba(0,0,0,.35)!important}
.barcode-scanner-modal .barcode-camera-wrap{width:100%;flex:1 1 auto;min-height:0;height:auto!important;aspect-ratio:auto!important;border-radius:0;background:#000}
.barcode-scanner-modal .barcode-camera{object-fit:cover!important}
.barcode-scanner-modal .barcode-scanner-status{flex:0 0 auto;margin:0;color:#dbeafe}
.barcode-scanner-modal .barcode-manual-fallback{flex:0 0 auto;padding-top:10px;border-color:rgba(255,255,255,.2)}
.barcode-scanner-modal .barcode-manual-fallback label{color:#dbeafe}
@media(max-width:380px){.barcode-scanner-modal .barcode-scanner-dialog{padding-left:8px!important;padding-right:8px!important}}
/* Pengaturan: tombol simpan selalu mudah dijangkau saat form panjang. */
#view-settings{padding-bottom:92px}
#view-settings #btn-save-profile{position:fixed;right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));left:max(12px,env(safe-area-inset-left));z-index:120;width:auto;box-shadow:0 10px 24px rgba(15,23,42,.18)}
#view-settings #btn-settings-preview-note{bottom:calc(max(12px,env(safe-area-inset-bottom)) + 64px)}
@media(min-width:800px){#view-settings #btn-save-profile{right:calc((100vw - min(100vw - 56px,var(--max-content)))/2);left:auto;min-width:210px}#view-settings #btn-settings-preview-note{right:calc((100vw - min(100vw - 56px,var(--max-content)))/2 + 230px);left:auto;width:auto;min-width:180px}}
#view-preview{padding-bottom:92px}
#view-preview #btn-save-note{position:fixed;right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));left:max(12px,env(safe-area-inset-left));z-index:120;width:auto;box-shadow:0 10px 24px rgba(15,23,42,.18)}
@media(min-width:800px){#view-preview #btn-save-note{right:calc((100vw - min(100vw - 56px,var(--max-content)))/2);left:auto;min-width:210px}}
#view-catalog{padding-bottom:156px}
#view-catalog #btn-add-catalog-product{position:fixed;right:max(12px,env(safe-area-inset-right));bottom:calc(max(12px,env(safe-area-inset-bottom)) + 58px);left:max(12px,env(safe-area-inset-left));z-index:120;width:auto;box-shadow:0 10px 24px rgba(15,23,42,.18)}
#view-catalog #btn-save-catalog-product{position:fixed;right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));left:max(12px,env(safe-area-inset-left));z-index:121;width:auto;box-shadow:0 10px 24px rgba(15,23,42,.18)}
#view-catalog #btn-save-catalog-product[hidden]{display:none!important}
@media(min-width:800px){#view-catalog #btn-add-catalog-product{right:calc((100vw - min(100vw - 56px,var(--max-content)))/2);left:auto;min-width:230px}#view-catalog #btn-save-catalog-product{right:calc((100vw - min(100vw - 56px,var(--max-content)))/2);left:auto;min-width:230px}}

.history-month-heading{margin:18px 0 4px;padding:8px 0 7px;color:var(--text);font-size:.92rem;font-weight:800;border-bottom:1px solid var(--border)}
.history-month-heading:first-child{margin-top:0}
.history-period-filter{max-width:260px;margin:14px 0 16px}.history-period-filter label{font-size:.82rem;font-weight:750}.history-period-filter select{min-height:42px;margin-top:5px}.customer-frequency-section{margin:0 0 18px;border:1px solid var(--border);border-radius:14px;background:var(--surface-soft);overflow:hidden}.customer-frequency-toggle{appearance:none;display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:58px;padding:12px 14px;border:0;background:transparent;color:var(--text);font:inherit;text-align:left;cursor:pointer}.customer-frequency-toggle>span:first-child{display:grid;gap:3px;min-width:0}.customer-frequency-toggle strong{font-size:.96rem}.customer-frequency-toggle small{color:var(--text-muted);font-size:.76rem}.customer-frequency-chevron{flex:0 0 auto;color:var(--primary);font-size:1.55rem;font-weight:800;line-height:1;transform:rotate(0deg);transition:transform .16s ease}.customer-frequency-toggle[aria-expanded="true"] .customer-frequency-chevron{transform:rotate(90deg)}.customer-frequency-content{display:grid;gap:12px;padding:0 14px 14px;border-top:1px solid var(--border)}.customer-frequency-content>.field-help{margin:12px 0 0;line-height:1.45}.customer-frequency-sort{display:grid;gap:5px;color:var(--text-secondary);font-size:.8rem;font-weight:750}.customer-frequency-sort select{min-height:42px}.customer-frequency-list{display:grid;gap:8px}.customer-frequency-row{display:grid;grid-template-columns:auto minmax(0,1fr);gap:6px 10px;align-items:center;padding:11px 10px;border:1px solid var(--border);border-radius:11px;background:var(--surface)}.customer-frequency-rank{display:grid;place-items:center;grid-row:1 / span 2;width:25px;height:25px;border-radius:50%;background:var(--primary-soft);color:var(--primary);font-size:.78rem}.customer-frequency-info{display:grid;gap:2px;min-width:0}.customer-frequency-info strong{overflow-wrap:anywhere;font-size:.9rem}.customer-frequency-info small{overflow-wrap:anywhere;color:var(--text-muted);font-size:.75rem}.customer-frequency-metrics{grid-column:2;display:flex;align-items:baseline;justify-content:space-between;gap:10px;color:var(--text-muted);font-size:.76rem}.customer-frequency-metrics strong{color:var(--text);font-size:.84rem}.customer-frequency-empty{display:grid;gap:5px;padding:15px 12px;border:1px dashed var(--border-strong);border-radius:11px;background:var(--surface);color:var(--text-muted);font-size:.8rem;line-height:1.45}.customer-frequency-empty strong{color:var(--text);font-size:.86rem}.customer-frequency-more{justify-self:start;width:auto;min-height:40px;padding-inline:13px}@media(min-width:700px){.customer-frequency-row{grid-template-columns:auto minmax(0,1fr) auto}.customer-frequency-metrics{grid-column:3;min-width:210px}.history-period-filter{margin-top:16px}}
.button-icon{display:inline-block;width:18px;height:18px;margin-right:7px;vertical-align:-4px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#view-create .create-meta-row{display:none!important}
#view-create #calculation-box{display:none!important}
#view-create #btn-toggle-manual-note{font-size:.92rem}
.create-customer-contact{display:grid;gap:12px;margin-top:12px}
#btn-toggle-manual-note,#btn-toggle-payment-details{width:100%;margin-top:12px;min-height:48px;font-weight:750}
#payment-details{display:grid;gap:0;margin-top:12px}

/* Preview di Buat Nota dibuat konsisten dengan preview Pengaturan. */
.create-empty-preview{background:var(--surface-soft);border:1px solid var(--border);border-radius:var(--radius-sm);overflow:visible}
.create-empty-preview .create-preview-frame{padding:10px;background:var(--surface-soft);border:1px solid var(--border);border-radius:var(--radius-sm)}
.create-empty-preview .receipt-paper{width:100%;max-width:760px;margin:0 auto;padding:15px;background:#fff;border:0!important;border-radius:0;box-shadow:none!important}
.create-empty-preview .receipt-header{border-bottom:0!important;padding-bottom:8px!important;margin-bottom:10px!important}
.top-nav{justify-content:center}
@media (min-width:640px){.top-nav .nav-btn{flex:0 0 auto}.top-nav{justify-content:center}}
@media (min-width:800px){
  #catalog-floating-actions{left:50%!important;right:auto!important;width:min(calc(100vw - 56px),760px);transform:translateX(-50%)}
  #settings-floating-actions{left:50%!important;right:auto!important;width:min(calc(100vw - 56px),880px);transform:translateX(-50%)}
  #view-settings #btn-settings-preview-note{left:auto!important;width:auto!important;min-width:180px}
}

/* Buat Nota: payment controls and optional payment barcode */
.checkbox-label{display:flex;align-items:center;gap:9px;min-height:44px;margin:8px 0 0;font-weight:650;cursor:pointer}
.checkbox-label>input[type="checkbox"]{appearance:auto;box-sizing:border-box;flex:0 0 20px;width:20px;height:20px;min-height:20px;margin:0;padding:0;border:0;border-radius:4px;background:transparent;accent-color:var(--primary);box-shadow:none}
.payment-barcode-toggle-group{margin-top:12px}
.receipt-payment-barcode-missing{margin-top:16px;padding:10px;border-top:1px dashed #cbd5e1;color:#64748b;text-align:center;font-size:.78rem}
.settings-contact-field .settings-note-toggle{margin-top:8px;font-weight:650;font-size:.82rem}
.receipt-website,.receipt-social-media{overflow-wrap:anywhere}
.home-quick-access{display:grid;gap:8px}.home-quick-access h2{margin:0}.home-quick-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.home-quick-card{display:grid;align-content:start;gap:6px;min-width:0;padding:14px;border:1px solid var(--border);border-radius:14px;background:var(--surface);color:var(--text);text-align:left;font:inherit;cursor:pointer}.home-quick-card:hover,.home-quick-card:focus-visible{border-color:var(--primary);background:var(--primary-soft)}.home-quick-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:var(--primary-soft);color:var(--primary);font-weight:800}.home-quick-card small{color:var(--text-secondary);line-height:1.4}.home-guide{display:grid;gap:10px}.home-guide-toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:0;border:0;background:transparent;color:var(--text);text-align:left;font:inherit;cursor:pointer}.home-guide-toggle span:first-child{display:grid;gap:3px}.home-guide-toggle small{color:var(--text-muted)}.home-guide-content{display:grid;gap:10px}.home-guide-content[hidden]{display:none}.home-guide-content article{display:grid;grid-template-columns:30px 1fr;column-gap:10px;row-gap:3px;padding:12px;border:1px solid var(--border);border-radius:12px;background:var(--surface-soft)}.home-guide-content article b{grid-row:1 / span 2;display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--primary);color:#fff}.home-guide-content article p{grid-column:2;margin:0;color:var(--text-secondary);font-size:.82rem;line-height:1.4}.catalog-category-heading{margin:18px 0 4px;color:var(--text);font-size:.78rem;letter-spacing:.08em;text-transform:uppercase}.catalog-category-heading:first-child{margin-top:0}.catalog-category-label{display:inline-block;padding:3px 7px;border-radius:999px;background:var(--primary-soft);color:var(--primary);font-size:.7rem;font-weight:750}.manual-product-entry select{width:100%}@media(max-width:520px){.home-quick-grid{grid-template-columns:1fr}.home-quick-card{grid-template-columns:auto 1fr;column-gap:10px}.home-quick-card strong,.home-quick-card small{grid-column:2}.home-quick-icon{grid-row:1 / span 2}}
#closing-message,#transaction-closing-message{min-height:44px;height:44px;resize:vertical;line-height:1.35}
.save-confirmed{background:var(--success)!important;border-color:var(--success)!important;color:#fff!important}
#settings-floating-actions{padding:0!important;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important}

/* Desktop: the two create-note actions share one compact row. The floating
   host stays transparent so it never looks like an extra white card/list. */
@media (min-width:800px){
  #floating-action-area{
    display:grid!important;
    grid-template-columns:minmax(0,1.18fr) minmax(0,1fr)!important;
    align-items:stretch;
    gap:10px!important;
    padding:0!important;
    background:transparent!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
  }
  #floating-action-area #btn-scan-product,
  #floating-action-area #btn-preview{min-width:0!important;width:100%!important}
}

/* Home entry screen: scoped components, so browser button defaults cannot leak in. */
.home-entry-page{gap:16px;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important}
.home-hero{display:grid;grid-template-columns:minmax(0,1.16fr) minmax(112px,.84fr);align-items:center;gap:8px;padding:22px 18px 18px;overflow:hidden;border:1px solid #dbeafe;border-radius:24px;background:linear-gradient(135deg,#f8fbff 0%,#eef6ff 55%,#e4f1ff 100%)}
.home-hero .welcome-copy{gap:9px;max-width:none}.home-hero .welcome-eyebrow{display:none}.home-hero .welcome-copy h1{max-width:12ch;font-size:clamp(1.74rem,8.5vw,2.42rem);line-height:1.08;letter-spacing:-.038em}.home-hero .welcome-subtitle{font-size:clamp(.86rem,3.65vw,1rem);line-height:1.43}.home-hero .welcome-cta{display:flex;align-items:center;justify-content:center;gap:9px;min-height:54px;margin-top:4px;border-radius:13px;font-size:1.04rem;box-shadow:0 8px 16px rgba(37,99,235,.22)}
.home-hero .welcome-cta>span{font-size:1.8rem;font-weight:400;line-height:.8}.home-hero .welcome-cta>b{margin-left:auto;font-size:2rem;font-weight:400;line-height:.6}.home-hero .welcome-hero-visual{min-height:0;height:100%;border:0;border-radius:0;background:transparent;overflow:visible}.home-hero .welcome-phone{width:92px;height:142px;border-width:5px;border-radius:18px;transform:rotate(-8deg)}.home-hero .welcome-receipt{width:88px;height:125px;margin-left:-43px;padding:29px 11px 12px;transform:rotate(7deg)}.home-hero .welcome-receipt em{position:absolute;top:11px;left:11px;color:#0f2458;font-size:.86rem;font-style:normal;font-weight:850}.home-hero .welcome-receipt span{height:6px;margin-bottom:8px}.home-hero .welcome-receipt strong{width:62%;height:9px;margin-top:15px}.home-hero .welcome-share{width:32px;height:32px;margin:40px 0 0 -5px;font-size:1rem}
.home-quick-access{display:grid;gap:4px;padding:17px 14px 14px;border:1px solid #dce8f8;border-radius:23px;background:var(--surface)}.home-quick-access h2{color:#0c1d4d;font-size:1.34rem;line-height:1.15}.home-quick-access>.field-help{margin:0 0 11px;color:#617493;font-size:.88rem}.home-quick-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.home-quick-card{appearance:none;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto 1fr;align-content:start;gap:7px;min-height:174px;padding:14px 12px 12px;border:0;border-radius:15px;background:#eef7ff;color:#0b1d52;text-align:left;font:inherit;box-shadow:none;cursor:pointer}.home-quick-card--text{background:#edfbf4}.home-quick-card--image{background:#f6f0ff}.home-quick-card:focus-visible{outline:3px solid color-mix(in srgb,var(--primary) 38%,transparent);outline-offset:2px}.home-quick-card:active{transform:translateY(1px)}.home-quick-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:0;background:transparent;color:#0878fb}.home-quick-card--text .home-quick-icon{color:#10a969}.home-quick-card--image .home-quick-icon{color:#703cff}.home-quick-icon svg{width:34px;height:34px;fill:none;stroke:currentColor;stroke-width:2.25;stroke-linecap:round;stroke-linejoin:round}.home-quick-content{display:grid;align-content:start;gap:4px;min-width:0;grid-column:1 / -1}.home-quick-content strong{display:block;color:#0a1c51;font-size:clamp(.88rem,3.8vw,1.04rem);line-height:1.15}.home-quick-content small{display:block;color:#536a90;font-size:clamp(.75rem,3.15vw,.9rem);line-height:1.28}.home-quick-chevron{grid-column:2;grid-row:1;align-self:center;color:#0878fb;font-size:2rem;line-height:.7}.home-quick-card--text .home-quick-chevron{color:#10a969}.home-quick-card--image .home-quick-chevron{color:#703cff}
.home-guide{display:grid;gap:0;overflow:hidden;border:1px solid #dce8f8;border-radius:21px;background:var(--surface)}.home-guide-toggle{appearance:none;display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:11px;min-height:80px;padding:15px;border:0;border-radius:0;background:var(--surface);color:#0a1c51;text-align:left;font:inherit;cursor:pointer}.home-guide-toggle:focus-visible{outline:3px solid color-mix(in srgb,var(--primary) 38%,transparent);outline-offset:-3px}.home-guide-icon{display:grid;place-items:center;color:#0878fb}.home-guide-icon svg,.home-guide-step-icon svg{width:31px;height:31px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.home-guide-copy{display:grid!important;gap:3px;min-width:0}.home-guide-copy strong{font-size:1.02rem;line-height:1.15}.home-guide-copy small{color:#617493;font-size:.82rem;line-height:1.3}.home-guide-toggle-state{display:inline-flex;align-items:center;justify-self:end;gap:6px;min-height:34px;padding:0 10px;border:1px solid #cfe0fb;border-radius:999px;background:#f5f9ff;color:#0b67d0;font-size:.78rem;font-weight:750;line-height:1;white-space:nowrap}.home-guide-toggle-icon{display:grid;place-items:center;width:17px;height:17px;border-radius:50%;background:#e1efff}.home-guide-toggle-icon svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2.25;stroke-linecap:round}.home-guide-content{gap:9px;padding:0 13px 13px;border-top:1px solid #e7effa}.home-guide-content article{grid-template-columns:38px 35px minmax(0,1fr);column-gap:10px;align-items:start;padding:12px 10px;border:1px solid #e3ebf5;border-radius:17px;background:#fff}.home-guide-content article b{grid-row:auto;width:38px;height:38px;background:#dcebff;color:#0878fb;font-size:1rem}.home-guide-step-icon{display:grid;place-items:center;color:#0878fb}.home-guide-content article>div{display:grid;gap:3px;min-width:0}.home-guide-content article strong{font-size:.91rem;line-height:1.2}.home-guide-content article p{grid-column:auto;margin:0;color:#536a90;font-size:.78rem;line-height:1.34}
/* Native checkbox remains compact while the whole label row stays touch-friendly. */
.settings-contact-field .settings-note-toggle{margin-top:8px}.settings-contact-field .settings-note-toggle>input[type="checkbox"]{width:20px;height:20px;min-height:20px;padding:0;flex:0 0 20px}
@media (min-width:640px){.home-entry-page{max-width:960px;margin:0 auto}.home-hero{grid-template-columns:minmax(0,1.12fr) minmax(250px,.88fr);padding:34px}.home-hero .welcome-copy h1{font-size:clamp(2.1rem,4vw,3.05rem)}.home-hero .welcome-phone{width:150px;height:218px}.home-hero .welcome-receipt{width:138px;height:180px;margin-left:-55px;padding:39px 17px 16px}.home-hero .welcome-receipt em{top:14px;left:17px;font-size:1.12rem}.home-hero .welcome-share{width:42px;height:42px}.home-quick-access{padding:23px}.home-quick-card{min-height:190px;padding:18px}.home-guide-toggle{min-height:88px;padding:18px}.home-guide-content{padding:0 18px 18px}.home-guide-content article{padding:15px}}
@media (max-width:390px){.home-guide-toggle{gap:8px;padding:13px}.home-guide-toggle-state{gap:5px;min-height:32px;padding:0 8px;font-size:.72rem}.home-guide-toggle-icon{width:16px;height:16px}}

/* Home uses one vertical application flow. These rules deliberately isolate it
   from the retired welcome-page grid that remains in legacy inline markup. */
.home-entry-page{display:grid!important;grid-template-columns:minmax(0,1fr)!important;align-items:stretch!important;gap:16px!important;width:100%;max-width:960px;margin:0 auto;padding:0!important;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important}
.home-entry-page>.home-hero,.home-entry-page>.home-quick-access,.home-entry-page>.home-guide{grid-column:auto!important;grid-row:auto!important;width:100%;min-width:0}
.home-hero .welcome-copy{display:grid;gap:9px;min-width:0;max-width:none}.home-hero .welcome-copy h1{margin:0;color:var(--text)}.home-hero .welcome-subtitle{margin:0;color:var(--text-secondary);max-width:58ch}.home-hero .welcome-hero-visual{position:relative;display:flex;align-items:center;justify-content:center;min-height:190px}.home-hero .welcome-phone{position:relative;border-style:solid;background:#dbeafe;box-shadow:0 12px 24px rgba(30,64,175,.2)}.home-hero .welcome-phone-camera{position:absolute;top:8px;left:50%;width:24px;height:4px;border-radius:4px;background:#172554;transform:translateX(-50%)}.home-hero .welcome-scan-corners{position:absolute;inset:48px 16px 42px;border:2px solid var(--primary);border-radius:8px;box-shadow:0 0 0 999px rgba(255,255,255,.14)}.home-hero .welcome-barcode{position:absolute;left:31px;right:31px;bottom:22px;height:14px;background:repeating-linear-gradient(90deg,#172554 0 2px,transparent 2px 5px)}.home-hero .welcome-receipt{position:relative;background:#fff;border:1px solid #bfdbfe;box-shadow:0 10px 22px rgba(15,23,42,.13);clip-path:polygon(0 0,100% 0,100% 94%,92% 100%,84% 94%,76% 100%,68% 94%,60% 100%,52% 94%,44% 100%,36% 94%,28% 100%,20% 94%,12% 100%,4% 94%,0 100%)}.home-hero .welcome-receipt span{display:block;border-radius:5px;background:#bfdbfe}.home-hero .welcome-receipt span:nth-child(2){width:72%}.home-hero .welcome-receipt span:nth-child(3){width:86%}.home-hero .welcome-receipt strong{display:block;border-radius:5px;background:var(--primary)}.home-hero .welcome-share{display:grid;place-items:center;border-radius:50%;background:var(--primary);color:#fff;font-weight:800;box-shadow:0 6px 14px rgba(30,64,175,.25)}
.home-quick-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important}.home-quick-card{width:100%;min-width:0!important}.home-guide-toggle{width:100%!important}
@media (max-width:600px){.home-hero{grid-template-columns:1fr;gap:12px;padding:22px 18px 18px}.home-hero .welcome-copy h1{max-width:12ch;font-size:clamp(1.72rem,8.6vw,2.28rem)}.home-hero .welcome-hero-visual{min-height:122px;height:122px;overflow:visible}.home-hero .welcome-phone{width:74px;height:114px;border-width:4px;border-radius:16px}.home-hero .welcome-phone-camera{top:7px;width:20px}.home-hero .welcome-scan-corners{inset:35px 12px 32px}.home-hero .welcome-barcode{left:24px;right:24px;bottom:17px;height:11px}.home-hero .welcome-receipt{width:72px;height:100px;margin-left:-34px;padding:24px 9px 9px}.home-hero .welcome-receipt em{top:9px;left:9px;font-size:.72rem}.home-hero .welcome-receipt span{height:5px;margin-bottom:6px}.home-hero .welcome-receipt strong{height:7px;margin-top:11px}.home-hero .welcome-share{width:29px;height:29px;margin:30px 0 0 -5px;font-size:.86rem}.home-quick-grid{grid-template-columns:1fr!important}.home-quick-card{grid-template-columns:42px minmax(0,1fr) auto;grid-template-rows:auto auto;min-height:0}.home-quick-icon{grid-column:1;grid-row:1 / span 2}.home-quick-content{grid-column:2;grid-row:1 / span 2}.home-quick-chevron{grid-column:3;grid-row:1 / span 2}}

/* UI polish: primary actions carry the visual hierarchy; secondary controls stay compact. */
.btn{font-weight:650}
.btn-primary{font-size:clamp(1rem,.96rem + .16vw,1.12rem);font-weight:700}
.btn-large{font-size:1.06rem;font-weight:700}
.home-hero .welcome-cta{font-size:clamp(1rem,.96rem + .35vw,1.12rem);font-weight:700}
#view-settings #btn-save-profile{font-size:1.06rem;font-weight:700}

/* Home is deliberately limited to welcome, one CTA, and the guide. */
.home-entry-page>.home-quick-access{display:none!important}
.home-entry-page>.home-hero,.home-entry-page>.home-guide{grid-column:auto!important;grid-row:auto!important;width:100%;min-width:0}

/* Primary navigation: deliberately stronger than secondary controls. */
.top-nav{gap:4px!important}
.top-nav .nav-btn{font-weight:700!important;line-height:1.22!important}
.top-nav .nav-icon{width:24px!important;height:24px!important}
.top-nav .nav-icon svg{width:24px!important;height:24px!important;stroke-width:2.05!important}
@media (max-width:639px){
  .top-nav{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:2px!important}
  .top-nav .nav-btn{min-height:56px!important;padding:6px 1px!important;font-size:clamp(.81rem,3.45vw,.875rem)!important;letter-spacing:-.035em!important;white-space:nowrap!important}
  .top-nav .nav-icon,.top-nav .nav-icon svg{width:24px!important;height:24px!important}
}
@media (min-width:640px) and (max-width:1023px){
  .top-nav{gap:18px!important;padding:8px 14px!important}
  .top-nav .nav-btn{min-width:104px!important;min-height:68px!important;padding:7px 8px!important;font-size:15px!important}
  .top-nav .nav-icon,.top-nav .nav-icon svg{width:26px!important;height:26px!important}
}
@media (min-width:1024px){
  .top-nav{gap:clamp(24px,3vw,52px)!important;padding:9px 16px!important}
  .top-nav .nav-btn{min-width:110px!important;min-height:74px!important;padding:7px 8px!important;font-size:17px!important}
  .top-nav .nav-icon,.top-nav .nav-icon svg{width:28px!important;height:28px!important}
}

/* Large primary actions use the same readable hierarchy without affecting utility buttons. */
#btn-first-note,#btn-save-profile,#btn-save-note,#btn-save-catalog-product,#btn-add-catalog-product,#btn-add-manual-product,#btn-preview{font-size:clamp(1rem,.96rem + .16vw,1.125rem)!important;font-weight:700!important}
#view-settings #btn-save-profile.save-attention{outline:3px solid color-mix(in srgb,var(--primary) 38%,transparent);outline-offset:4px;animation:settings-save-attention .9s ease-in-out 2}
@keyframes settings-save-attention{50%{transform:translateY(-2px);box-shadow:0 14px 30px color-mix(in srgb,var(--primary) 34%,transparent)}}

/* Keep the shared application shell fixed when long pages such as History need a scrollbar. */
html{overflow-y:scroll;scrollbar-gutter:stable}
.top-nav .nav-btn.active{font-weight:700!important}
#history-list,.history-item,.history-info{min-width:0;max-width:100%}
.history-actions{flex-wrap:wrap;justify-content:flex-end}

/* Header brand: the title leads the hierarchy; its icon is the untouched master artwork. */
.app-brand{gap:14px!important}
.app-brand>img{width:46px!important;height:52px!important;max-width:46px!important;max-height:52px!important;object-fit:contain!important}
.app-brand-name{font-size:21px!important;line-height:1.12!important;font-weight:750!important}
.app-brand .tagline{font-size:13.5px!important;line-height:1.3!important;font-weight:450!important}
@media (min-width:640px){
  .app-header{padding:12px 24px!important}
  .app-brand{gap:15px!important}
  .app-brand>img{width:54px!important;height:56px!important;max-width:54px!important;max-height:56px!important}
  .app-brand-name{font-size:24px!important;line-height:1.15!important;font-weight:750!important}
  .app-brand .tagline{font-size:16px!important;line-height:1.3!important;font-weight:450!important}
}

/*
 * Screen preview scaling is intentionally separate from the logical paper
 * dimensions used for export and print.  It preserves the visual distinction
 * between sheet and roll formats while allowing every paper to fit a phone.
 */
.theme-settings-preview,.create-empty-preview{width:100%;box-sizing:border-box}
.receipt-preview-stage{display:flex;justify-content:center;align-items:flex-start;width:100%;min-width:0;box-sizing:border-box;padding:10px 0;overflow:auto;background:#fff;color:#111;color-scheme:light}
.receipt-preview-stage>div{display:flex;justify-content:center;align-items:flex-start;flex:0 0 100%;min-width:0;background:#fff}
.receipt-preview-stage .receipt-paper{margin:0!important;flex:0 0 auto;box-sizing:border-box;background:#fff!important;color:#111!important}
.theme-settings-preview .receipt-preview-stage .receipt-paper.paper-a4,.create-empty-preview .receipt-preview-stage .receipt-paper.paper-a4{width:calc(100% - 24px)!important;max-width:520px!important;min-height:0!important;aspect-ratio:210/297!important}
.theme-settings-preview .receipt-preview-stage .receipt-paper.paper-a5,.create-empty-preview .receipt-preview-stage .receipt-paper.paper-a5{width:70.5%!important;max-width:370px!important;min-height:0!important;aspect-ratio:148/210!important}
.theme-settings-preview .receipt-preview-stage .receipt-paper.paper-80,.create-empty-preview .receipt-preview-stage .receipt-paper.paper-80{width:78%!important;max-width:320px!important;min-height:0!important;height:auto!important}
.theme-settings-preview .receipt-preview-stage .receipt-paper.paper-58,.create-empty-preview .receipt-preview-stage .receipt-paper.paper-58{width:56%!important;max-width:232px!important;min-height:0!important;height:auto!important}

/* Application colour chooser: full-width palette strips, labels, and a clear
 * selected indicator, matching the supplied reference without changing theme IDs. */
.app-theme-picker{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important;margin-top:10px!important}
.app-theme-picker[hidden]{display:none!important}
/* App theme styles the application chrome only. The note remains a white
   document and is styled solely through its selected Note Theme class. */
.receipt-paper{isolation:isolate;background:#fff!important;color:#111!important;color-scheme:light}.receipt-paper :is(h1,h2,h3,h4,strong,td,th,span,div,p,small){color:inherit}.receipt-paper .receipt-header p,.receipt-paper .item-description,.receipt-paper .receipt-terms,.receipt-paper .receipt-footer{color:#555!important}.receipt-paper .receipt-table th{background:#fafafa;color:#333!important}.receipt-paper.theme-modern .receipt-table th{background:#2563eb!important;color:#fff!important}.receipt-paper.theme-elegant .receipt-table th{background:#fffaf0!important;color:#6d5220!important}.receipt-paper.theme-minimal .receipt-table th{background:transparent!important;color:#333!important}
.app-theme-card{display:grid!important;grid-template-columns:minmax(118px,44%) minmax(0,1fr) 22px!important;align-items:center!important;gap:14px!important;min-height:56px!important;padding:7px 9px!important;border:1px solid #dbe4ef!important;border-radius:11px!important;background:var(--surface)!important;color:var(--text)!important;font-size:.88rem!important;font-weight:750!important;box-shadow:none!important}
.app-theme-card:hover{border-color:color-mix(in srgb,var(--primary) 42%,#dbe4ef)!important;background:color-mix(in srgb,var(--primary-soft) 34%,var(--surface))!important}
.app-theme-card.active{border-color:var(--primary)!important;box-shadow:0 0 0 1px var(--primary)!important}
.app-theme-card strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:inherit!important}
.app-theme-swatch{display:block!important;position:relative!important;flex:initial!important;width:100%!important;height:42px!important;min-width:0!important;overflow:hidden!important;border:0!important;border-radius:11px!important;background:linear-gradient(90deg,var(--swatch-dark) 0 33.333%,var(--swatch-primary) 33.333% 66.666%,var(--swatch-soft) 66.666% 100%)!important}
.app-theme-swatch::before,.app-theme-swatch::after{display:none!important}
.app-theme-radio{display:grid;place-items:center;width:20px;height:20px;border:2px solid #aab4c2;border-radius:50%;box-sizing:border-box}
.app-theme-card.active .app-theme-radio{border-color:var(--primary);background:var(--primary);box-shadow:inset 0 0 0 5px var(--surface)}
@media(max-width:900px){.app-theme-picker{grid-template-columns:repeat(2,minmax(0,1fr))!important}.app-theme-card{grid-template-columns:minmax(104px,43%) minmax(0,1fr) 20px!important;gap:10px!important}}
@media(max-width:560px){.app-theme-picker{grid-template-columns:1fr!important}.app-theme-card{grid-template-columns:minmax(130px,42%) minmax(0,1fr) 22px!important;min-height:54px!important;font-size:.86rem!important}.app-theme-swatch{height:40px!important}}

/* Camera modal controls remain readable on dark mobile preview. */
.barcode-scanner-modal .barcode-scanner-head .btn.barcode-scanner-close,
.product-photo-camera-modal .barcode-scanner-head .btn.product-photo-camera-close {
  display:inline-flex!important;align-items:center!important;justify-content:center!important;min-width:78px!important;min-height:42px!important;padding:8px 14px!important;border:1px solid rgba(255,255,255,.72)!important;border-radius:9px!important;background:rgba(15,23,42,.88)!important;color:#fff!important;font-size:.95rem!important;font-weight:800!important;line-height:1!important;text-shadow:0 1px 2px rgba(0,0,0,.5)!important;opacity:1!important;visibility:visible!important;z-index:3!important
}
`r`n/* User-selectable receipt logo size. */`r`n.receipt-paper.logo-size-small .receipt-header img{width:64px!important;max-width:64px!important;max-height:64px!important}.receipt-paper.logo-size-medium .receipt-header img{width:110px!important;max-width:110px!important;max-height:110px!important}.receipt-paper.logo-size-large .receipt-header img{width:150px!important;max-width:150px!important;max-height:150px!important}.receipt-paper.paper-80.logo-size-small .receipt-header img{width:52px!important;max-width:52px!important;max-height:52px!important}.receipt-paper.paper-80.logo-size-medium .receipt-header img{width:76px!important;max-width:76px!important;max-height:76px!important}.receipt-paper.paper-80.logo-size-large .receipt-header img{width:100px!important;max-width:100px!important;max-height:100px!important}.receipt-paper.paper-58.logo-size-small .receipt-header img{width:42px!important;max-width:42px!important;max-height:42px!important}.receipt-paper.paper-58.logo-size-medium .receipt-header img{width:62px!important;max-width:62px!important;max-height:62px!important}.receipt-paper.paper-58.logo-size-large .receipt-header img{width:78px!important;max-width:78px!important;max-height:78px!important}`r`n
/* Keep a comfortable paper tail after the closing message. */
.receipt-paper{padding-bottom:32px!important}.receipt-paper.paper-80{padding-bottom:10mm!important}.receipt-paper.paper-58{padding-bottom:9mm!important}.theme-settings-preview .receipt-paper{padding-bottom:28px!important}

/* Keep all primary navigation actions available while the page scrolls. */
:root{--app-header-sticky-height:0px}
.top-nav{position:sticky!important;top:var(--app-header-sticky-height)!important;z-index:100!important}

/* Main Preview Nota uses the same paper stage as Settings: the visible
   sheet width changes with the selected paper, while its receipt layout
   remains rendered by the canonical paper class. */
#receipt-preview .receipt-preview-stage .receipt-paper.paper-a4{width:calc(100% - 24px)!important;max-width:760px!important;min-height:0!important;aspect-ratio:210/297!important}
#receipt-preview .receipt-preview-stage .receipt-paper.paper-a5{width:70.5%!important;max-width:530px!important;min-height:0!important;aspect-ratio:148/210!important}
#receipt-preview .receipt-preview-stage .receipt-paper.paper-80{width:49%!important;max-width:320px!important;min-height:0!important;height:auto!important}
#receipt-preview .receipt-preview-stage .receipt-paper.paper-58{width:36%!important;max-width:232px!important;min-height:0!important;height:auto!important}
@media(max-width:520px){#receipt-preview .receipt-preview-stage{padding-inline:0}#receipt-preview .receipt-preview-stage .receipt-paper.paper-a4{width:calc(100% - 12px)!important}#receipt-preview .receipt-preview-stage .receipt-paper.paper-a5{width:70.5%!important}#receipt-preview .receipt-preview-stage .receipt-paper.paper-80{width:62%!important}#receipt-preview .receipt-preview-stage .receipt-paper.paper-58{width:46%!important}}
/* Settings preview should show only the paper itself; its surround inherits
   the settings panel instead of creating a second white rectangle. */
.theme-settings-preview .receipt-preview-stage,.theme-settings-preview .receipt-preview-stage>div{background:transparent!important}
/* One paper-preview geometry for Create, Settings, and final Preview. */
body :is(.create-empty-preview,.theme-settings-preview,#receipt-preview) .receipt-preview-stage{padding:12px 0!important;background:transparent!important}
body :is(.create-empty-preview,.theme-settings-preview,#receipt-preview) .receipt-preview-stage>div{background:transparent!important}
body :is(.create-empty-preview,.theme-settings-preview,#receipt-preview) .receipt-preview-stage .receipt-paper{margin:0!important;box-sizing:border-box!important;background:#fff!important}
body :is(.create-empty-preview,.theme-settings-preview,#receipt-preview) .receipt-preview-stage .receipt-paper.paper-a4{width:calc(100% - 24px)!important;max-width:760px!important;min-height:0!important;height:auto!important;aspect-ratio:210/297!important}
body :is(.create-empty-preview,.theme-settings-preview,#receipt-preview) .receipt-preview-stage .receipt-paper.paper-a5{width:70.5%!important;max-width:530px!important;min-height:0!important;height:auto!important;aspect-ratio:148/210!important}
body :is(.create-empty-preview,.theme-settings-preview,#receipt-preview) .receipt-preview-stage .receipt-paper.paper-80{width:49%!important;max-width:320px!important;min-height:0!important;height:auto!important}
body :is(.create-empty-preview,.theme-settings-preview,#receipt-preview) .receipt-preview-stage .receipt-paper.paper-58{width:36%!important;max-width:232px!important;min-height:0!important;height:auto!important}
body :is(.create-empty-preview,.theme-settings-preview,#receipt-preview) .receipt-preview-stage .receipt-paper .receipt-footer{margin-bottom:14px!important}
body :is(.create-empty-preview,.theme-settings-preview,#receipt-preview) .receipt-preview-stage .receipt-paper{padding-bottom:48px!important}
body :is(.create-empty-preview,.theme-settings-preview,#receipt-preview) .receipt-preview-stage .receipt-paper.paper-80{padding-bottom:14mm!important}
body :is(.create-empty-preview,.theme-settings-preview,#receipt-preview) .receipt-preview-stage .receipt-paper.paper-58{padding-bottom:12mm!important}
@media(max-width:520px){body :is(.create-empty-preview,.theme-settings-preview,#receipt-preview) .receipt-preview-stage .receipt-paper.paper-a4{width:calc(100% - 12px)!important}body :is(.create-empty-preview,.theme-settings-preview,#receipt-preview) .receipt-preview-stage .receipt-paper.paper-a5{width:70.5%!important}body :is(.create-empty-preview,.theme-settings-preview,#receipt-preview) .receipt-preview-stage .receipt-paper.paper-80{width:62%!important}body :is(.create-empty-preview,.theme-settings-preview,#receipt-preview) .receipt-preview-stage .receipt-paper.paper-58{width:46%!important}}

/* Thermal 58 delete action must remain inside the product column. */
.create-empty-preview .receipt-paper.paper-58 .receipt-item-remove{display:block;width:100%;max-width:100%;min-width:0;box-sizing:border-box;margin-top:4px;padding:3px 2px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:.72rem;line-height:1.2}

/* Commercial package card: intentionally distinct from ordinary settings controls. */
#upgrade-actions.upgrade-packages{margin:18px 0;padding:0;overflow:hidden;border:1px solid #b9d5ff;border-radius:18px;background:linear-gradient(145deg,#f8fbff 0%,#edf5ff 100%);box-shadow:0 12px 28px rgba(37,99,235,.12)}
.upgrade-packages__header{padding:17px 16px 16px;background:linear-gradient(135deg,#1d4ed8,#2563eb);color:#fff}
.upgrade-packages__eyebrow{display:block;margin-bottom:5px;color:#dbeafe;font-size:.7rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.upgrade-packages__header strong{display:block;color:#fff;font-size:1.18rem;line-height:1.2}
.upgrade-packages__header p{margin:7px 0 0;color:#eff6ff;font-size:.82rem;line-height:1.45}
.upgrade-plan-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:12px}
.upgrade-plan{display:grid;min-width:0;min-height:104px;align-content:space-between;gap:5px;padding:11px 9px;border:1px solid #cbdcf7;border-radius:12px;background:#fff;color:#0f172a;text-align:left;font:inherit;cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}
.upgrade-plan:hover,.upgrade-plan:focus-visible{border-color:#2563eb;box-shadow:0 7px 16px rgba(37,99,235,.16);transform:translateY(-2px);outline:none}
.upgrade-plan span{color:#475569;font-size:.73rem;font-weight:800}.upgrade-plan b{color:#1d4ed8;font-size:clamp(.87rem,3.7vw,1.08rem);line-height:1.1}.upgrade-plan small{color:#64748b;font-size:.65rem;line-height:1.2}
.upgrade-plan--lifetime{border-color:#f2c66d;background:linear-gradient(155deg,#fffdf4,#fff7df)}.upgrade-plan--lifetime b{color:#9a5b05}
@media(max-width:360px){.upgrade-plan-grid{gap:6px;padding:9px}.upgrade-plan{min-height:98px;padding:9px 7px}.upgrade-plan span{font-size:.68rem}.upgrade-plan small{font-size:.6rem}}
@media(min-width:760px){.upgrade-plan-grid{max-width:620px}.upgrade-plan{min-height:112px;padding:14px 12px}}
/* Purchase recovery needs readable breathing room inside Settings. */
#purchase-recovery{margin-top:18px;padding:18px!important;border-radius:14px!important}
#purchase-recovery>strong{margin-bottom:10px!important;font-size:1rem;line-height:1.3}
#purchase-recovery>.field-help{margin:0 0 14px!important;line-height:1.55}
#purchase-recovery .inline-actions{margin-top:12px}
#purchase-recovery .inline-actions+.inline-actions{margin-top:10px}
#purchase-recovery #recovery-message{margin:12px 0 0!important;min-height:1.35em}
@media(max-width:520px){#purchase-recovery{padding:16px!important}}
/* Shared text rhythm for cards and settings panels. */
#view-settings .card:not(.settings-preview-card)>.field-help{margin:8px 0 12px;line-height:1.55}
#view-settings .form-group>.field-help{margin-top:8px;line-height:1.5}
.data-tools>strong+.field-help{margin:8px 0 12px;line-height:1.55}
.data-tools>.field-help:not(:first-child){margin-top:10px;line-height:1.55}
.data-tools>.inline-actions{margin-top:12px}
.data-tools>.inline-actions+.field-help{margin-top:12px}
#view-settings .card>h2+.field-help{margin-top:0;margin-bottom:12px;line-height:1.55}
/* Canonical preview paper geometry: one source of truth for every view. */
body :is(.create-empty-preview,.theme-settings-preview,#receipt-preview) .receipt-preview-stage{display:flex!important;justify-content:center!important;align-items:flex-start!important;padding:12px 0!important;overflow:visible!important;background:transparent!important}
body :is(.create-empty-preview,.theme-settings-preview,#receipt-preview) .receipt-preview-stage>.receipt-rendered{display:flex!important;flex:0 1 100%!important;flex-direction:column!important;align-items:center!important;min-width:0!important;background:transparent!important}
body :is(.create-empty-preview,.theme-settings-preview,#receipt-preview) .receipt-preview-stage .receipt-paper{display:block!important;margin:0!important;box-sizing:border-box!important;overflow:visible!important;background:#fff!important;color:#111!important}
body :is(.create-empty-preview,.theme-settings-preview,#receipt-preview) .receipt-preview-stage .receipt-paper.paper-a4{width:calc(100% - 24px)!important;max-width:760px!important;min-height:0!important;aspect-ratio:210/297!important}
body :is(.create-empty-preview,.theme-settings-preview,#receipt-preview) .receipt-preview-stage .receipt-paper.paper-a5{width:70.5%!important;max-width:530px!important;min-height:0!important;aspect-ratio:148/210!important}
body :is(.create-empty-preview,.theme-settings-preview,#receipt-preview) .receipt-preview-stage .receipt-paper.paper-80{width:80mm!important;max-width:calc(100% - 12px)!important;min-height:0!important;height:auto!important;padding:4mm!important;padding-bottom:14mm!important}
body :is(.create-empty-preview,.theme-settings-preview,#receipt-preview) .receipt-preview-stage .receipt-paper.paper-58{width:58mm!important;max-width:calc(100% - 12px)!important;min-height:0!important;height:auto!important;padding:3mm!important;padding-bottom:12mm!important}
body :is(.create-empty-preview,.theme-settings-preview,#receipt-preview) .receipt-preview-stage .receipt-paper.paper-a4,body :is(.create-empty-preview,.theme-settings-preview,#receipt-preview) .receipt-preview-stage .receipt-paper.paper-a5{padding-bottom:48px!important}
.receipt-paper.paper-80 .receipt-table,.receipt-paper.paper-58 .receipt-table{table-layout:fixed!important}
.receipt-paper.paper-80 .receipt-table th,.receipt-paper.paper-80 .receipt-table td,.receipt-paper.paper-58 .receipt-table th,.receipt-paper.paper-58 .receipt-table td{overflow:hidden!important;word-break:normal!important}
.receipt-paper.paper-80 .receipt-table .money-cell,.receipt-paper.paper-58 .receipt-table .money-cell{padding-inline:3px!important;text-align:right!important;white-space:nowrap!important;font-size:.92em!important;font-variant-numeric:tabular-nums}
.receipt-paper.paper-80 .summary-row,.receipt-paper.paper-58 .summary-row{gap:6px!important;align-items:baseline!important}
.receipt-paper.paper-80 .summary-row>span,.receipt-paper.paper-58 .summary-row>span{min-width:0!important;overflow-wrap:anywhere}
.receipt-paper.paper-80 .summary-row>strong,.receipt-paper.paper-58 .summary-row>strong{flex:0 0 auto!important;white-space:nowrap!important;text-align:right!important;font-variant-numeric:tabular-nums}
.receipt-paper.paper-58 .summary-row{font-size:.78rem!important}.receipt-paper.paper-58 .summary-row.total{font-size:1rem!important}.receipt-paper.paper-80 .summary-row.total{font-size:1.03rem!important}
@media(max-width:520px){body :is(.create-empty-preview,.theme-settings-preview,#receipt-preview) .receipt-preview-stage .receipt-paper.paper-a4{width:calc(100% - 12px)!important}body :is(.create-empty-preview,.theme-settings-preview,#receipt-preview) .receipt-preview-stage .receipt-paper.paper-a5{width:70.5%!important}}
/* Sheet metadata must never widen beyond the preview paper. */
body :is(.theme-settings-preview,.create-empty-preview,#receipt-preview) .receipt-paper .receipt-meta>div{min-width:0!important;overflow-wrap:anywhere!important;word-break:break-word!important}
body :is(.theme-settings-preview,.create-empty-preview,#receipt-preview) .receipt-paper .receipt-meta :is(span,strong){max-width:100%!important;overflow-wrap:anywhere!important;word-break:break-word!important}
body :is(.theme-settings-preview,.create-empty-preview,#receipt-preview) .receipt-paper.paper-a5 .receipt-meta{grid-template-columns:1fr!important;gap:7px!important}
body :is(.theme-settings-preview,.create-empty-preview,#receipt-preview) .receipt-paper.paper-a5 .receipt-meta>div:last-child{text-align:left!important}
.theme-settings-preview{overflow:visible!important;min-width:0!important}
.theme-settings-preview .receipt-preview-stage,.theme-settings-preview .receipt-rendered{min-width:0!important;max-width:100%!important}
/* Mobile sheet previews: no metadata or table cell may escape the paper. */
@media(max-width:520px){
  body :is(.theme-settings-preview,.create-empty-preview,#receipt-preview) .receipt-paper.paper-a4 .receipt-meta,
  body :is(.theme-settings-preview,.create-empty-preview,#receipt-preview) .receipt-paper.paper-a5 .receipt-meta{grid-template-columns:1fr!important;gap:7px!important}
  body :is(.theme-settings-preview,.create-empty-preview,#receipt-preview) .receipt-paper.paper-a4 .receipt-meta>div:last-child,
  body :is(.theme-settings-preview,.create-empty-preview,#receipt-preview) .receipt-paper.paper-a5 .receipt-meta>div:last-child{text-align:left!important}
  body :is(.theme-settings-preview,.create-empty-preview,#receipt-preview) .receipt-paper.paper-a4 .receipt-table,
  body :is(.theme-settings-preview,.create-empty-preview,#receipt-preview) .receipt-paper.paper-a5 .receipt-table{table-layout:fixed!important}
  body :is(.theme-settings-preview,.create-empty-preview,#receipt-preview) .receipt-paper.paper-a4 .receipt-table :is(th,td),
  body :is(.theme-settings-preview,.create-empty-preview,#receipt-preview) .receipt-paper.paper-a5 .receipt-table :is(th,td){min-width:0!important;overflow-wrap:anywhere!important;word-break:normal!important}
  body :is(.theme-settings-preview,.create-empty-preview,#receipt-preview) .receipt-paper.paper-a4 .money-cell,
  body :is(.theme-settings-preview,.create-empty-preview,#receipt-preview) .receipt-paper.paper-a5 .money-cell{font-size:.9em!important;white-space:nowrap!important;text-align:right!important}
}
/* Settings preview papers grow with their content; never overlay following settings. */
.theme-settings-preview .receipt-preview-stage{height:auto!important;min-height:0!important;overflow:visible!important}
.theme-settings-preview .receipt-rendered{height:auto!important;min-height:0!important;overflow:visible!important}
.theme-settings-preview .receipt-paper.paper-a4,.theme-settings-preview .receipt-paper.paper-a5{height:auto!important;min-height:0!important;aspect-ratio:auto!important;overflow:visible!important}
@media(max-width:520px){
  .theme-settings-preview .receipt-paper.paper-a4{min-height:430px!important}
  .theme-settings-preview .receipt-paper.paper-a5{min-height:330px!important}
}
/* Settings preview is a separate scaled viewport.  It never changes the
   canonical receipt used by export/print, and remains in normal document flow. */
.theme-settings-preview{overflow:visible!important;contain:layout paint;min-width:0!important}
.theme-settings-preview .settings-receipt-preview-stage{display:grid!important;gap:16px!important;width:100%!important;min-width:0!important;height:auto!important;min-height:0!important;margin:0!important;padding:10px 0!important;overflow:visible!important;background:transparent!important}
.theme-settings-preview .settings-receipt-preview-stage>.receipt-rendered{display:block!important;width:100%!important;max-width:none!important;min-width:0!important;height:auto!important;margin:0!important;background:transparent!important}
.theme-settings-preview .settings-receipt-preview-stage .receipt-paper{display:block!important;box-sizing:border-box!important;margin:0 auto!important;overflow:visible!important}
.theme-settings-preview .settings-receipt-preview-stage .receipt-paper.paper-a4,.theme-settings-preview .settings-receipt-preview-stage .receipt-paper.paper-a5{aspect-ratio:210/297!important}
.theme-settings-preview .settings-receipt-preview-stage .receipt-paper.paper-a5{aspect-ratio:148/210!important}
@media(max-width:520px){.theme-settings-preview .settings-receipt-preview-stage{padding:8px 0!important}}
/* Sheet receipt typography: physical A4/A5 rules. These govern print, PDF,
   image export and the canonical renderer; preview scaling is separate. */
.receipt-paper.paper-a4{padding:13mm 14mm!important;font-size:13pt!important;line-height:1.42!important}
.receipt-paper.paper-a5{padding:10mm!important;font-size:11pt!important;line-height:1.4!important}
.receipt-paper.paper-a4 .receipt-header{margin-bottom:6mm!important;padding-bottom:5mm!important}.receipt-paper.paper-a5 .receipt-header{margin-bottom:4mm!important;padding-bottom:3.5mm!important}
.receipt-paper.paper-a4 .receipt-header h2{font-size:24pt!important;line-height:1.12!important}.receipt-paper.paper-a5 .receipt-header h2{font-size:20pt!important;line-height:1.14!important}
.receipt-paper.paper-a4 .receipt-header p{font-size:12pt!important;line-height:1.35!important}.receipt-paper.paper-a5 .receipt-header p{font-size:10.5pt!important;line-height:1.35!important}
.receipt-paper.paper-a4 .receipt-address{font-size:11pt!important}.receipt-paper.paper-a5 .receipt-address{font-size:10pt!important}
.receipt-paper.paper-a4 .receipt-meta{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:7mm!important;margin-bottom:6mm!important;font-size:13pt!important;line-height:1.38!important}.receipt-paper.paper-a5 .receipt-meta{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:5mm!important;margin-bottom:4mm!important;font-size:11.5pt!important;line-height:1.36!important}.receipt-paper.paper-a4 .receipt-meta>div:last-child,.receipt-paper.paper-a5 .receipt-meta>div:last-child{text-align:right!important}
.receipt-paper.paper-a4 .receipt-table{table-layout:fixed!important;margin-bottom:6mm!important;font-size:13pt!important}.receipt-paper.paper-a5 .receipt-table{table-layout:fixed!important;margin-bottom:4mm!important;font-size:11.5pt!important}.receipt-paper.paper-a4 .receipt-table th,.receipt-paper.paper-a4 .receipt-table td{padding:3.2mm 2.4mm!important}.receipt-paper.paper-a5 .receipt-table th,.receipt-paper.paper-a5 .receipt-table td{padding:2.4mm 1.8mm!important}.receipt-paper.paper-a4 .receipt-table th,.receipt-paper.paper-a5 .receipt-table th{font-weight:800!important}.receipt-paper.paper-a4 .receipt-table th:nth-child(2),.receipt-paper.paper-a5 .receipt-table th:nth-child(2){text-align:center!important}.receipt-paper.paper-a4 .receipt-table th:nth-child(n+3),.receipt-paper.paper-a4 .receipt-table td:nth-child(n+3),.receipt-paper.paper-a5 .receipt-table th:nth-child(n+3),.receipt-paper.paper-a5 .receipt-table td:nth-child(n+3){text-align:right!important;white-space:nowrap!important}.receipt-paper.paper-a4 .receipt-table td:first-child,.receipt-paper.paper-a5 .receipt-table td:first-child{overflow-wrap:anywhere!important}
.receipt-paper.paper-a4 .receipt-summary{margin-top:4mm!important;padding-top:4mm!important}.receipt-paper.paper-a5 .receipt-summary{margin-top:3mm!important;padding-top:3mm!important}.receipt-paper.paper-a4 .summary-row{margin-bottom:2.4mm!important;font-size:13pt!important}.receipt-paper.paper-a5 .summary-row{margin-bottom:1.8mm!important;font-size:11.5pt!important}.receipt-paper.paper-a4 .summary-row.total{margin-top:4mm!important;padding:3.5mm 0!important;font-size:21pt!important}.receipt-paper.paper-a5 .summary-row.total{margin-top:3mm!important;padding:2.5mm 0!important;font-size:17pt!important}
.receipt-paper.paper-a4 .receipt-payment{margin-top:5mm!important;padding:4mm!important;font-size:12pt!important}.receipt-paper.paper-a5 .receipt-payment{margin-top:4mm!important;padding:3mm!important;font-size:10.5pt!important}.receipt-paper.paper-a4 .receipt-terms,.receipt-paper.paper-a4 .receipt-footer{font-size:11pt!important;line-height:1.4!important}.receipt-paper.paper-a5 .receipt-terms,.receipt-paper.paper-a5 .receipt-footer{font-size:10pt!important;line-height:1.4!important}.receipt-paper.paper-a4 .receipt-footer{margin-top:8mm!important;padding-top:4mm!important}.receipt-paper.paper-a5 .receipt-footer{margin-top:6mm!important;padding-top:3mm!important}
/* The compact theme must not shrink physical sheet typography. */
.receipt-paper.paper-a4.theme-compact,.receipt-paper.paper-a5.theme-compact{font-size:inherit!important}
@media print{.receipt-paper.paper-a4{padding:13mm 14mm!important}.receipt-paper.paper-a5{padding:10mm!important}}
/* Fixed physical pages are measured before display; no overflow is hidden. */
.receipt-page-measure-host{position:absolute!important;left:-100000px!important;top:0!important;width:auto!important;visibility:hidden!important;pointer-events:none!important}.receipt-paper.receipt-sheet-page.paper-a4{height:297mm!important;min-height:297mm!important}.receipt-paper.receipt-sheet-page.paper-a5{height:210mm!important;min-height:210mm!important}.theme-settings-preview .settings-receipt-preview-stage>.receipt-rendered{overflow:visible!important}.theme-settings-preview .receipt-sheet-page{break-after:auto!important;page-break-after:auto!important}

/* Paged sheet previews must stack vertically. The generic preview rule is
   intentionally overridden at equal specificity, so each physical page stays
   in normal document flow and cannot overlap the following settings card. */
body .theme-settings-preview .receipt-preview-stage.settings-receipt-preview-stage{display:grid!important;grid-template-columns:minmax(0,1fr)!important;justify-items:center!important;align-items:start!important;gap:16px!important}
body .theme-settings-preview .receipt-preview-stage.settings-receipt-preview-stage>.receipt-rendered{display:block!important;width:100%!important;min-width:0!important;max-width:none!important}
@media print{.receipt-sheet-page:not(:last-child){break-after:page!important;page-break-after:always!important}.receipt-sheet-page{overflow:visible!important}}
/* Sheet pagination uses physical printable space. Tighten only vertical white
   space (never font size) so A4 can use its real first-page capacity. */
.receipt-paper.paper-a4 .receipt-header{margin-bottom:4mm!important;padding-bottom:4mm!important}
.receipt-paper.paper-a4 .receipt-meta{margin-bottom:4mm!important}
.receipt-paper.paper-a4 .receipt-table{margin-bottom:4mm!important}
.receipt-paper.paper-a4 .receipt-summary{margin-top:2mm!important;padding-top:3mm!important}
.receipt-paper.paper-a4 .receipt-payment{margin-top:4mm!important;padding:3mm!important}
.receipt-paper.paper-a4 .receipt-terms{margin-top:10px!important;padding-top:9px!important}
.receipt-paper.paper-a4 .receipt-footer{margin-top:6mm!important;padding-top:3mm!important;margin-bottom:8px!important}
/* Physical-sheet compaction: preserve type scale and data, remove only
   redundant vertical whitespace so the first page uses its real capacity. */
.receipt-paper.paper-a4 .receipt-business-row--center,.receipt-paper.paper-a5 .receipt-business-row--center{gap:2px!important}
.receipt-paper.paper-a4 .receipt-business-row--center img,.receipt-paper.paper-a5 .receipt-business-row--center img{margin-bottom:1px!important}
.receipt-paper.paper-a4 .receipt-header p,.receipt-paper.paper-a5 .receipt-header p{margin:1px 0!important}
.receipt-paper.paper-a4 .receipt-address,.receipt-paper.paper-a5 .receipt-address{margin-top:3px!important}
.receipt-paper.paper-a4 .receipt-header{margin-bottom:3mm!important;padding-bottom:3mm!important}
.receipt-paper.paper-a5 .receipt-header{margin-bottom:2.5mm!important;padding-bottom:2.5mm!important}
.receipt-paper.paper-a4 .receipt-meta{gap:4mm!important;margin-bottom:3mm!important}
.receipt-paper.paper-a5 .receipt-meta{gap:3mm!important;margin-bottom:2.5mm!important}
.receipt-paper.paper-a4 .receipt-table{margin-bottom:3mm!important}
.receipt-paper.paper-a5 .receipt-table{margin-bottom:2.5mm!important}
.receipt-paper.paper-a4 .receipt-summary{margin-top:2mm!important;padding-top:2.5mm!important}
.receipt-paper.paper-a5 .receipt-summary{margin-top:1.8mm!important;padding-top:2mm!important}
.receipt-paper.paper-a4 .summary-row{margin-bottom:1.2mm!important}
.receipt-paper.paper-a5 .summary-row{margin-bottom:1mm!important}
.receipt-paper.paper-a4 .summary-row.total{margin-top:2.5mm!important;padding:2.2mm 0!important}
.receipt-paper.paper-a5 .summary-row.total{margin-top:2mm!important;padding:1.8mm 0!important}
.receipt-paper.paper-a4 .receipt-payment{margin-top:3mm!important;padding:2.5mm!important}
.receipt-paper.paper-a5 .receipt-payment{margin-top:2.5mm!important;padding:2mm!important}
.receipt-paper.paper-a4 .receipt-terms{margin-top:8px!important;padding-top:7px!important}
.receipt-paper.paper-a5 .receipt-terms{margin-top:7px!important;padding-top:6px!important}
.receipt-paper.paper-a4 .receipt-footer{margin-top:4mm!important;padding-top:2.5mm!important;margin-bottom:4px!important}
.receipt-paper.paper-a5 .receipt-footer{margin-top:3mm!important;padding-top:2mm!important;margin-bottom:4px!important}
/* Restore V.5 Create-Note behaviour: this preview is a normal-flow receipt,
   not a fixed-ratio Settings sheet. Its paper expands to its content so no
   receipt section can overlap the form below it. */
#receipt-preview .receipt-paper.paper-a4,#receipt-preview .receipt-paper.paper-a5{height:auto!important;min-height:0!important;aspect-ratio:auto!important;overflow:visible!important}
#receipt-preview .receipt-rendered{display:block!important;width:100%!important;min-width:0!important;overflow:visible!important}
#receipt-preview .receipt-preview-stage{height:auto!important;min-height:0!important;overflow:visible!important}
/* Unified screen-preview geometry: A4/A5 use the same natural-height model
   as Thermal. Only canonical width and typography differ on a phone screen. */
body :is(#receipt-preview,.theme-settings-preview,.create-empty-preview) .receipt-paper.paper-a4,
body :is(#receipt-preview,.theme-settings-preview,.create-empty-preview) .receipt-paper.paper-a5{height:auto!important;min-height:0!important;aspect-ratio:auto!important;overflow:visible!important}