@font-face{font-family:Arabic;src:url(assets/StitchArabic.ttf) format('truetype');font-weight:400;font-display:swap}@font-face{font-family:Arabic;src:url(assets/StitchArabicBold.ttf) format('truetype');font-weight:700;font-display:swap}
html,body{height:100%;margin:0}.site-shell{width:100%;max-width:720px;margin:auto;height:100dvh}.site-shell .phone{width:100%!important;height:100dvh;max-height:none;max-width:none;border-radius:0;border:0;box-shadow:none}.site-shell .status,.site-shell .gesture{display:none}.app-head{padding-top:max(12px,env(safe-area-inset-top));min-height:70px;height:auto}.nav{padding-bottom:max(5px,env(safe-area-inset-bottom));height:auto;min-height:70px}.sticky{padding-bottom:max(12px,env(safe-area-inset-bottom))}.site-shell .content{padding:16px}.site-shell .sheet{padding-bottom:max(19px,env(safe-area-inset-bottom))}.site-shell .phone.busy{cursor:progress}.save-indicator{font-size:10px;line-height:1.5;color:var(--muted)}.auth-screen{flex:1;padding:28px 22px;overflow:auto;display:flex;align-items:center;justify-content:center}.auth-card{width:100%;max-width:410px}.auth-card h1{margin-bottom:8px}.auth-card p{color:var(--muted);line-height:1.8;font-size:12px;margin:0 0 22px}.auth-card .primary{margin-top:18px}.auth-card .field input{min-height:46px}.auth-card .auth-error{margin-top:10px}.site-user-chip{border:1px solid var(--line);border-radius:6px;padding:3px 6px;font-size:10px;color:var(--muted)}.management-actions{display:flex;gap:7px;margin-top:10px;flex-wrap:wrap}.management-actions button{min-height:40px;padding:7px 11px;border:1px solid var(--line);background:var(--surface);border-radius:8px;font-size:11px}.backup-input{width:100%;padding:13px;background:var(--surface);border:1px solid var(--line);border-radius:9px}.app-session{display:flex;align-items:center;justify-content:space-between;padding:9px 12px;background:var(--surface);border:1px solid var(--line);border-radius:9px;margin-top:15px}.app-session strong{font-size:12px}.app-session button{font-size:11px;color:var(--section-ink,var(--accent));min-height:40px}.upload-summary{line-height:1.9;font-size:12px;padding:10px}.auth-switch{font-size:12px;padding:12px;color:var(--accent)}.data-toolbar{display:flex;gap:7px;flex-wrap:wrap;margin:9px 0}.data-toolbar button{font-size:11px;min-height:40px;padding:8px 11px;border:1px solid var(--line);border-radius:8px;background:var(--surface)}
@media(min-width:800px){body{background:#0b1422}.site-shell{border-inline:1px solid #293b52}.site-shell .app-head{padding-inline:24px}.site-shell .content{padding:20px 24px}.site-shell .nav button{font-size:12px}.site-shell .home-invoice-table td{font-size:12px}.site-shell .home-invoice-party{font-size:12px}.site-shell .home-invoice-table .amount{font-size:16px}.site-shell .home-invoice-table .table-date{font-size:10px}}
@media print{body{background:#fff!important;color:#000!important}.site-shell,.review-controls{display:none!important}#print-root{display:block!important;padding:18px;font-family:Arabic,system-ui}#print-root table{width:100%;border-collapse:collapse}#print-root th,#print-root td{padding:8px;border:1px solid #999}#print-root h1{font-size:22px}#print-root .print-meta{display:flex;justify-content:space-between;font-size:12px;margin:10px 0}#print-root .total{font-size:20px;margin-top:15px}}

.app-head{gap:8px}.app-head>div:first-child{flex:1}.site-profile svg{width:19px;height:19px}.site-profile{min-width:40px;min-height:40px}

.paste-backup{margin:12px 0;font-size:12px}.paste-backup summary{cursor:pointer;padding:8px}.paste-backup textarea{width:100%;resize:vertical;font-family:monospace;font-size:11px;padding:10px;color:var(--ink);background:var(--surface);border:1px solid var(--line);border-radius:8px}

/* A document is one readable composition, not a register or a metric grid. */
.document-page{padding:2px 0 10px}.invoice-document{--document-grid-edge:#394e68;--document-grid-outer:#4c6380;--document-grid-head:#243b5e;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:16px;overflow:hidden}.document-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.document-shop{font-size:12px;color:var(--muted);margin-bottom:3px}.document-heading h2{font-size:21px;line-height:1.4}.document-status{background:color-mix(in srgb,var(--green) 12%,transparent);color:var(--green);border-radius:5px;padding:4px 8px;font-size:11px;white-space:nowrap}.document-status.is-void{color:var(--red);background:color-mix(in srgb,var(--red) 12%,transparent)}.document-reference{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;font:11px system-ui;color:var(--muted);padding:8px 0 10px;margin-bottom:12px;border-bottom:1px solid var(--line)}.document-reference time{display:flex;gap:8px}.document-information{display:grid;grid-template-columns:1fr 1fr;gap:10px 12px;margin:0 0 14px}.document-datum{min-width:0}.document-datum dt{font-size:13px;font-weight:700;color:var(--section-ink,var(--ink));margin-bottom:3px}.document-datum dd{font-size:14px;font-weight:500;line-height:1.5;margin:0;overflow-wrap:anywhere}.document-items h3{font-size:14px;margin-bottom:7px}.document-lines{width:100%;table-layout:fixed;border-collapse:collapse}.document-lines th{font-size:10px;font-weight:700;text-align:start;color:var(--ink);padding:8px 6px;border-inline-end:2px solid var(--document-grid-edge);border-bottom:3px solid var(--document-grid-outer);background:var(--document-grid-head)}.document-lines td{padding:9px 6px;font-size:12px;vertical-align:top;border-inline-end:2px solid var(--document-grid-edge);border-bottom:2px solid var(--document-grid-edge);overflow-wrap:anywhere}.document-lines th:last-child,.document-lines td:last-child{border-inline-end:0}.document-lines tbody tr:last-child td{border-bottom:0}.document-lines tbody tr:nth-child(even){background:color-mix(in srgb,var(--raised) 55%,var(--surface))}.document-lines-frame{border:2px solid var(--document-grid-outer);border-radius:8px;overflow:hidden}.document-lines td:last-child{font-weight:700}.document-line-name strong{font-size:12px;font-weight:700;line-height:1.6}.document-line-number{display:inline-block;font:10px system-ui;color:var(--muted);margin-inline-end:6px}.document-lines .amount{display:block;text-align:start;font-size:12px;white-space:normal}.document-lines .amount>span:first-child{overflow-wrap:anywhere}.document-lines .currency{font-size:9px;display:inline;margin-inline-start:3px}.document-note{margin:16px 0;font-size:12px}.document-note strong{font-size:11px;color:var(--muted)}.document-note p{margin-top:5px;line-height:1.8;overflow-wrap:anywhere}.document-total{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:12px;padding-top:12px;border-top:1px solid var(--line)}.document-total>div>span{display:block;font-size:15px;font-weight:700}.document-total small{display:block;font-size:10px;margin-top:3px;line-height:1.6}.document-total .amount{font-size:30px;white-space:nowrap}.document-total .currency{font-size:11px}.document-total:has(.money-wide){display:block}.document-total .amount.money-wide{font-size:clamp(22px,5.5vw,30px);margin-top:6px;justify-content:flex-end;flex-wrap:wrap}.document-actions{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 0}.document-actions button{display:flex;align-items:center;justify-content:center;gap:7px;padding:10px 12px;border:1px solid var(--line);border-radius:8px;font-size:12px;min-height:44px;flex:1;white-space:nowrap;background:var(--surface)}.document-actions svg,.document-history svg{width:17px;height:17px}.document-actions .document-print{color:var(--section-ink);background:color-mix(in srgb,var(--section-ink) 9%,var(--surface));border-color:color-mix(in srgb,var(--section-ink) 30%,var(--line))}.document-actions .document-delete{color:var(--red)}.document-history{display:flex;align-items:center;gap:7px;font-size:11px;color:var(--muted);min-height:40px;padding:8px 0;margin-top:6px}.document-history>span{font:10px system-ui;border:1px solid var(--line);border-radius:4px;padding:2px 5px}.document-void-note{font-size:12px;line-height:1.8;color:var(--muted)}
@media(max-width:420px){.invoice-document{padding:14px}.document-heading h2{font-size:19px}.document-information{gap:10px}.document-actions .document-print{flex-basis:100%}.document-lines td{padding-block:9px}}

.phone[data-appearance=light] .invoice-document{--document-grid-edge:#aebdcd;--document-grid-outer:#9daec2;--document-grid-head:#d9e3ef}
/* List-side actions and the shared, glass navigation surface. */
.site-shell .content :is(.section-title,.filter-bar,.warehouse-row-tools) button.text-btn,.site-shell .data-toolbar button{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:36px;padding:5px 10px;border:1px solid var(--accent);border-radius:8px;color:var(--accent);background:color-mix(in srgb,var(--accent) 8%,var(--surface));font-size:11px;font-weight:700;line-height:1.5}
.site-shell .nav{margin:0 8px max(8px,env(safe-area-inset-bottom));padding:6px;gap:4px;min-height:72px;border:1px solid color-mix(in srgb,var(--ink) 15%,var(--line));border-radius:22px;background:var(--surface);background:linear-gradient(145deg,#ffffff0d,#ffffff02),color-mix(in srgb,var(--surface) 82%,transparent);box-shadow:inset 0 1px 0 #ffffff12,0 6px 20px #0002;backdrop-filter:blur(20px) saturate(135%);-webkit-backdrop-filter:blur(20px) saturate(135%);isolation:isolate}
.site-shell .nav button{min-width:0;min-height:58px;padding:5px 2px;border:1px solid transparent;border-radius:16px;gap:4px;color:var(--muted);font-size:10px;line-height:1.4}
.site-shell .nav button svg{width:22px;height:22px;padding:0;box-sizing:border-box;background:none;color:var(--muted)}
.site-shell .nav button.active::before,.site-shell .nav button.active::after{content:none;display:none}
.site-shell .nav button.active{color:var(--accent);font-weight:700;background:color-mix(in srgb,var(--accent) 18%,var(--surface));border-color:color-mix(in srgb,var(--accent) 45%,transparent);box-shadow:inset 0 1px 0 #ffffff10}
.site-shell .nav button.active svg{color:var(--accent);background:none;padding:0;border-radius:0}
.phone[data-appearance=light] .nav{background:linear-gradient(145deg,#ffffffc9,#ffffff4d),#edf2f5b8;border-color:#c3ceda;box-shadow:inset 0 1px 0 #fff,0 4px 16px #263d5714}
.phone[data-appearance=light] .nav button.active{background:#ead7adad;border-color:#c6a461;color:#785018}
.phone[data-appearance=light] .nav button.active svg{color:#785018}
@media(prefers-reduced-motion:no-preference){.site-shell .nav button{transition:background-color .18s ease,border-color .18s ease,color .18s ease}.site-shell .nav button svg{transition:color .18s ease}}
.cash-emblem{border-color:color-mix(in srgb,var(--green) 50%,var(--red));background:linear-gradient(135deg,color-mix(in srgb,var(--green) 18%,var(--surface)) 49.5%,color-mix(in srgb,var(--red) 18%,var(--surface)) 50.5%)}.cash-icon{display:grid;width:20px;height:20px}.cash-icon svg{grid-area:1/1;width:20px;height:20px;color:var(--green);clip-path:polygon(0 0,100% 0,0 100%)}.cash-icon svg+svg{color:var(--red);clip-path:polygon(100% 0,100% 100%,0 100%)}
.cash-sheet .sheet-body{padding-block:9px}.cash-form{display:flex;flex-direction:column;gap:10px}.cash-form .pair{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;margin:0}.cash-form .field{margin:0;min-width:0}.cash-form .field>span{font-size:12px;margin-bottom:5px}.cash-form :is(input,select){min-height:44px;padding:8px 10px;font-size:13px;min-width:0;width:100%}.cash-form input[name=amount]{direction:ltr;text-align:start}.cash-sheet .sheet-head{padding-bottom:9px}.cash-sheet .primary{margin-top:10px}
.site-shell .content .actions button[data-action="new:purchase"]{flex-direction:column;gap:5px;justify-content:center;align-items:center;text-align:center}
.site-shell .cash-emblem .cash-icon svg{color:var(--green)}.site-shell .cash-emblem .cash-icon svg+svg{color:var(--red)}
.site-shell .phone[data-view=home] :is(.primary-sale>.primary,.actions>.secondary){flex-direction:column;flex-wrap:nowrap;justify-content:center;align-items:center;gap:6px;min-height:70px;padding:10px 6px;text-align:center}
.site-shell .nav button,.site-shell .nav button svg,.site-shell .nav button.active,.site-shell .nav button.active svg,.site-shell .phone[data-appearance=light] .nav button.active,.site-shell .phone[data-appearance=light] .nav button.active svg{color:var(--section-ink)}
.cash-form input[name=note]{max-width:100%;min-width:0;height:44px;border:1px solid var(--line);border-radius:8px;white-space:nowrap;text-overflow:ellipsis}
@media(hover:hover){.site-shell .nav button:hover{background:color-mix(in srgb,var(--section-ink) 12%,var(--surface));border-color:color-mix(in srgb,var(--section-ink) 32%,transparent)}}
.site-shell .invoice-register-filters{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px;padding:5px;border:1px solid color-mix(in srgb,var(--section-ink) 25%,var(--line));border-radius:10px;background:var(--surface);margin:0 0 12px}
.site-shell .invoice-register-filters .browse-select{display:flex;align-items:center;justify-content:space-between;min-width:0;min-height:55px;padding:8px 10px;border:1px solid color-mix(in srgb,var(--section-ink) 24%,var(--line));border-radius:7px;box-shadow:inset 0 -2px color-mix(in srgb,var(--section-ink) 65%,transparent);background:color-mix(in srgb,var(--section-ink) 10%,var(--surface));text-align:start;color:var(--section-ink)}
.site-shell .invoice-register-filters .browse-copy{min-width:0}.site-shell .invoice-register-filters small{display:block;font-size:10px;color:var(--muted)}.site-shell .invoice-register-filters strong{font-size:12px;line-height:1.6;overflow-wrap:anywhere}.site-shell .invoice-register-filters .browse-caret{background:none;padding:0;width:18px;height:18px}.site-shell .invoice-register-filters .browse-caret svg{width:15px;height:15px}

.site-shell .compact-stock-register .register-scroll {overflow-x: hidden}
.site-shell .compact-stock-register .register-table {width:100%;min-width:0;table-layout:fixed}
.site-shell .compact-stock-register th,.site-shell .compact-stock-register td {min-width:0;padding:7px 4px;white-space:normal;overflow-wrap:anywhere;font-size:11px}
.site-shell .compact-stock-register th:first-child,.site-shell .compact-stock-register td:first-child {width:42px!important;min-width:42px;max-width:42px}
.site-shell .compact-stock-register .amount {font-size:14px}
@media print {
 #print-root .export-document {break-inside:auto; margin-bottom:20px;border-top:2px solid #607489;padding-top:10px}
 #print-root .export-document dl {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 #print-root .export-document dl div {border-bottom:1px solid #bbc7d2;padding:4px;overflow-wrap:anywhere}
 #print-root .export-document dt {font-weight:bold;font-size:10px;color:#465568}
 #print-root .export-document dd {margin:3px 0;font-size:11px}
 #print-root .export-document table {font-size:9px;table-layout:fixed;width:100%}
 #print-root .export-document td,#print-root .export-document th {overflow-wrap:anywhere;padding:3px}
}

.site-shell .compact-stock-register th:first-child {white-space:nowrap;overflow-wrap:normal}
.site-shell .party-directory .register-scroll {overflow-x:hidden}
.site-shell .party-directory table {width:100%;min-width:0;table-layout:fixed}
.site-shell .party-directory th,.site-shell .party-directory td {padding:8px 5px;min-width:0;white-space:normal;overflow-wrap:anywhere;vertical-align:middle;text-align:start}
.site-shell .party-directory th {font-size:11px;background:color-mix(in srgb,var(--section-ink) 17%,var(--surface))}
.site-shell .party-directory .row-ordinal {width:auto;min-width:36px;max-width:none;white-space:nowrap;font-size:11px}
.site-shell .party-directory-name {border:0;background:none;color:var(--text);padding:4px 0;min-width:0;width:100%;font-size:12px;font-weight:700;line-height:1.6;text-align:start;overflow-wrap:anywhere}
.site-shell .party-directory-phone {font-size:10px;color:var(--muted);letter-spacing:0}
.site-shell .party-directory .amount {font-size:16px;flex-wrap:wrap;gap:3px}
.site-shell .party-directory .amount .currency {font-size:9px}
.site-shell .party-directory-balance {display:block;font-size:9px;color:var(--muted);margin-top:3px;line-height:1.4}
.site-shell .party-directory tbody tr {cursor:pointer}
.site-shell .party-directory tbody tr:hover {background:color-mix(in srgb,var(--section-ink) 9%,var(--surface))}

.site-shell .bounded-register-scroll {max-height:330px;overflow-y:auto!important;overscroll-behavior-x:contain;overscroll-behavior-y:auto;scrollbar-width:thin;scrollbar-color:var(--section-ink) transparent}
.site-shell .bounded-register-scroll thead {position:sticky;top:0;z-index:2;background:var(--surface)}
.site-shell .list-page-controls {display:flex;align-items:center;justify-content:space-between;gap:8px;margin:9px 0 18px}
.site-shell .list-page-controls button {border:1px solid var(--border);background:var(--surface);color:var(--section-ink);padding:8px 12px;min-height:40px;border-radius:9px;font:inherit;font-size:12px}
.site-shell .list-page-controls button:disabled {opacity:.4}
.site-shell .list-page-controls span {font-size:11px;text-align:center;color:var(--muted)}
.site-shell .list-page-controls small {display:block;font-size:10px;margin-top:3px}
.site-shell .modern-picker {padding:16px;max-height:75dvh;border:1px solid var(--border);border-radius:24px 24px 0 0}
.site-shell .modern-picker .sheet-head {margin:0 0 12px;padding:0 0 10px;border-bottom:1px solid var(--border)}
.site-shell .modern-picker .sheet-head h2 {font-size:20px}
.site-shell .modern-picker .picker-tile-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:3px;max-height:48dvh;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.site-shell .modern-picker .picker-tile {display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:48px;padding:10px;border:1px solid var(--border)!important;border-radius:10px;background:var(--surface);font-size:12px;line-height:1.5;color:var(--text);text-align:start}
.site-shell .modern-picker .picker-tile[aria-pressed=true] {background:color-mix(in srgb,var(--section-ink) 15%,var(--surface));border-color:var(--section-ink)!important;color:var(--section-ink)}
.site-shell .picker-radio {display:flex;align-items:center;justify-content:center;flex-shrink:0;width:20px;height:20px;border:1px solid var(--border);border-radius:50%}
.site-shell .picker-radio svg {width:14px;height:14px}
.site-shell .picker-tile[aria-pressed=true] .picker-radio {border-color:currentColor}

.site-shell .bounded-data-list {max-height:330px;overflow-y:auto;overscroll-behavior-x:contain;overscroll-behavior-y:auto;scrollbar-width:thin}

/* Let page lists hand vertical scrolling to the page at their boundaries.
   Modal pickers retain containment so the page behind them stays still. */
.site-shell main .register-scroll {overscroll-behavior-x:contain;overscroll-behavior-y:auto}
.site-shell .modern-picker {border-color:var(--line)}
.site-shell .modern-picker .sheet-head {border-bottom-color:var(--line)}
.site-shell .modern-picker .picker-tile {border-color:var(--line)!important;color:var(--ink);font-size:13px;font-weight:600}
.site-shell .modern-picker .picker-tile[aria-pressed=true] {border-color:var(--section-ink)!important;color:var(--section-ink);font-weight:700}
.site-shell .modern-picker .picker-radio {border-color:var(--line)}
.site-shell .modern-picker .picker-tile[aria-pressed=true] .picker-radio {background:var(--section-ink);color:var(--bg);border-color:var(--section-ink)}
.site-shell .content .register-table th:last-child,
.site-shell .content .register-table td:last-child {border-inline-end:2px solid var(--list-divider)}
.site-shell .warehouse-product-filters {min-width:0;margin:14px 0 18px;padding:10px 12px 12px;border:1px solid var(--list-divider);border-radius:14px;background:color-mix(in srgb,var(--surface) 65%,var(--bg))}
.site-shell .warehouse-product-filters legend {padding:0 7px;color:var(--section-ink);font-size:12px;font-weight:700}
.site-shell .warehouse-product-filters .tabs {margin:0 0 10px;border:1px solid var(--line);border-radius:10px;padding:4px;background:var(--bg)}
.site-shell .warehouse-product-filters .tabs button {min-height:38px;padding:7px 10px;border-radius:7px}
.site-shell .warehouse-product-filters .filter-bar {margin:0 0 10px;flex-direction:row-reverse;gap:10px}
.site-shell .warehouse-product-filters .warehouse-filter-label {font-size:12px;font-weight:600;color:var(--muted)}
.site-shell .warehouse-product-filters .filter-bar button {min-height:38px;padding:6px 10px;font-size:12px;max-width:80%;overflow-wrap:anywhere}
.site-shell .warehouse-product-filters .search {margin:0;min-height:44px;background:var(--bg);border-color:var(--line)}
/* Inventory value needs a full row: numbers must never split into fragments. */
.site-shell .content .audit-facts-row {grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.site-shell .content .audit-facts-row>div {padding:9px 10px;gap:3px}
.site-shell .content .audit-facts-row h3 {min-height:0;font-weight:600}
.site-shell .content .audit-facts-row>div:last-child {grid-column:1/-1;flex-direction:row;justify-content:space-between;gap:10px;flex-wrap:wrap;text-align:start}
.site-shell .content .audit-facts-row .amount {flex-direction:row;flex-wrap:nowrap;gap:5px;font-size:clamp(20px,5vw,25px);line-height:1.4;white-space:nowrap;max-width:none}
.site-shell .content .audit-facts-row .amount>span {white-space:nowrap;overflow-wrap:normal;word-break:normal;flex-shrink:0}
.site-shell .content .audit-facts-row .currency {font-size:10px;white-space:nowrap}
.site-shell .content .browse-toolbar .browse-select {border:1px solid color-mix(in srgb,var(--section-ink) 40%,var(--line));background:color-mix(in srgb,var(--section-ink) 8%,var(--surface));border-radius:10px;min-height:48px;padding:8px 11px;gap:9px}
.site-shell .content .browse-toolbar .browse-copy {gap:3px}
.site-shell .content .browse-toolbar .browse-copy small {color:var(--muted);font-size:10px}
.site-shell .content .browse-toolbar .browse-copy strong {color:var(--section-ink);font-size:12px}
.site-shell .content .browse-toolbar .browse-caret {background:transparent;width:16px;height:16px;border-radius:0;color:var(--section-ink)}
.site-shell .content .browse-toolbar .browse-select:hover {border-color:var(--section-ink);background:color-mix(in srgb,var(--section-ink) 14%,var(--surface))}
.export-output-options {display:grid;gap:8px;margin-top:12px}
.export-output-options button {display:flex;align-items:center;gap:12px;padding:12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);text-align:start;min-height:64px}
.export-output-options button:hover {border-color:var(--section-ink);background:var(--raised)}
.export-output-options button>span:last-child {display:grid;gap:3px}
.export-output-options strong {font-size:14px}.export-output-options small {font-size:11px}
.output-file-badge {display:grid;place-items:center;width:42px;height:42px;border:1px solid var(--line);border-radius:8px;font:700 10px system-ui;color:var(--section-ink);background:var(--raised)}
.output-file-badge.excel {color:var(--green);background:color-mix(in srgb,var(--green) 12%,var(--surface))}.output-file-badge.pdf {color:var(--red);background:color-mix(in srgb,var(--red) 12%,var(--surface))}
.export-download-link {display:flex;align-items:center;justify-content:center;min-height:48px;border:1px solid var(--section-ink);border-radius:9px;background:var(--raised);color:var(--section-ink);font-weight:700;text-decoration:none;margin-top:12px}
@media print {
 #print-root .export-report {direction:rtl;color:#25364a;font-size:10px;padding:0}
 #print-root .export-report header {display:flex;align-items:center;justify-content:space-between;border-bottom:2px solid #294562;padding-bottom:9px;margin-bottom:14px}
 #print-root .export-report h1 {font-size:20px}#print-root .export-report h2 {font-size:17px;margin:14px 0 7px}
 #print-root .export-report h3 {font-size:12px;margin:16px 0 6px;break-after:avoid}
 #print-root .export-report p {margin:5px 0;color:#536478}
 #print-root .export-report table {font-size:9px;table-layout:fixed;margin-bottom:12px}
 #print-root .export-report th {background:#e0e8f2;color:#25364a;font-weight:700}
 #print-root .export-report th,#print-root .export-report td {border:1px solid #b4bfce;padding:6px;overflow-wrap:anywhere;vertical-align:top}
 #print-root .export-report thead {display:table-header-group}#print-root .export-report tr {break-inside:avoid}
}

/* Product labels stay inside their own column, including narrow phone layouts. */
.warehouse-product-name,.pos-result-copy strong,.document-line-name strong,.pos-table-name strong{display:block;min-width:0;max-width:100%;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal!important;word-break:normal!important}
.warehouse-product-name{width:100%;text-align:start}
.pos-table-name strong{flex:1}
.document-line-name strong{flex:1}

.product-editor-fields{display:grid;gap:16px}.product-editor-fields .field{margin:0;gap:7px}.product-editor-fields input,.product-editor-fields select{min-height:48px;height:48px;padding:8px 12px;font-size:15px}.product-editor-fields .pair{gap:10px;margin:0}.product-editor-fields .field>span{font-size:13px;font-weight:700;color:var(--ink)}
.product-extra{border:1px solid color-mix(in srgb,var(--section-ink) 45%,var(--line));border-radius:10px;background:color-mix(in srgb,var(--section-ink) 7%,var(--surface))}.product-extra summary{display:flex;align-items:center;justify-content:space-between;min-height:46px;padding:10px 13px;color:var(--section-ink);font-size:13px;font-weight:700;cursor:pointer;list-style:none}.product-extra summary::-webkit-details-marker{display:none}.product-extra summary>span{display:flex;align-items:center;gap:8px}.product-extra summary svg{width:18px;height:18px}.product-extra[open] summary{border-bottom:1px solid var(--line)}.product-extra[open] summary>svg{transform:rotate(90deg)}.product-extra-fields{padding:12px;display:grid;gap:13px}
.product-barcode-input{display:flex;border:1px solid var(--line);border-radius:9px;overflow:hidden;background:var(--surface)}.product-barcode-input input{flex:1;min-width:0;border:0;border-radius:0}.product-barcode-input button{min-width:48px;min-height:48px;border-inline-start:1px solid var(--line);color:var(--section-ink);background:color-mix(in srgb,var(--section-ink) 12%,var(--surface))}.product-barcode-input svg{width:21px;height:21px}
.product-opening{margin:0;padding:12px;border:1px solid var(--line);border-radius:10px;min-width:0;background:var(--surface)}.product-opening legend{padding:0 7px;font-size:13px;font-weight:700}.product-opening p{font-size:11px;line-height:1.6;color:var(--muted);margin:7px 0 0}.product-opening-readonly{display:flex;gap:6px;align-items:baseline}.product-opening-readonly span{font-size:11px;color:var(--muted)}
.barcode-camera-overlay{position:fixed;inset:0;z-index:10000;background:#000b;display:flex;align-items:center;justify-content:center;padding:16px;direction:rtl}.barcode-camera-dialog{width:min(100%,440px);border:1px solid var(--line,#40556d);border-radius:16px;background:var(--surface,#122033);color:var(--ink,#fff);padding:16px}.barcode-camera-dialog header{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.barcode-camera-dialog h2{font-size:18px}.barcode-camera-dialog header button{width:44px;height:44px;font-size:28px;border:1px solid var(--line,#40556d);border-radius:10px;color:inherit}.barcode-camera-preview{position:relative;background:#000;border-radius:10px;overflow:hidden;aspect-ratio:4/3}.barcode-camera-preview video{width:100%;height:100%;object-fit:cover}.barcode-camera-guide{position:absolute;inset:30% 10%;border:2px solid #dcb05d;border-radius:8px;pointer-events:none}.barcode-camera-dialog p{font-size:13px;line-height:1.7;margin-top:12px}

.product-editor-sheet{max-height:94%!important;padding:0 16px 12px!important}.product-editor-sheet .sheet-head{padding-bottom:6px}.product-editor-sheet .sheet-handle{margin-top:9px;margin-bottom:8px}.product-editor-fields{gap:12px}.product-editor-fields .field{gap:5px}.product-opening{padding:8px 10px}.product-extra summary{min-height:44px;padding:8px 12px}.product-editor-sheet>.primary{min-height:48px;margin-top:8px;padding:9px 14px}


/* Stable sheet top and pinned controls; only its body scrolls. */
.site-shell .sheet{height:86%;max-height:94%!important;min-height:0;box-sizing:border-box}
.site-shell .sheet-head{flex:none;min-height:48px;margin:0 0 10px;align-items:center}
.site-shell .sheet-body{flex:1 1 auto;min-height:0;max-height:none;overflow-y:auto;overscroll-behavior:contain}
.site-shell .sheet>.primary{flex:none}
.site-shell .sheet-update{animation:none!important}
.site-shell .bounded-register-scroll{height:330px;min-height:330px;overflow-anchor:none}

.register-table tbody tr.source-record-focus>td{background:color-mix(in srgb,var(--accent,#79adf0) 18%,var(--surface,#122033));box-shadow:inset 0 2px 0 var(--accent,#79adf0),inset 0 -2px 0 var(--accent,#79adf0);animation:source-record-pulse 1.3s ease-out 2}
@keyframes source-record-pulse{50%{background:color-mix(in srgb,var(--accent,#79adf0) 32%,var(--surface,#122033))}}
@media(prefers-reduced-motion:reduce){.register-table tbody tr.source-record-focus>td{animation:none}}

.source-workspace-tools{margin-bottom:14px}.source-workspace-tools .primary{width:100%}

/* Gold is an edge token, never an amount, label, icon or filled surface. */
.phone{--gold-border:#9a804e;--gold-strong:#c3a166;--accent:#8fb9ee;--amber:#f2a09c;--list-bg:#080d14;--list-head:#111c2a}
.phone[data-appearance=light]{--gold-border:#ac915b;--gold-strong:#8b703b;--accent:#285f9d;--amber:#a33442;--list-bg:#fff;--list-head:#edf1f6}
.phone .accent,.phone .amber{color:var(--ink)!important}
.phone :is(.primary,.home-start-sale){background:var(--raised)!important;color:var(--ink)!important;border:1px solid var(--gold-strong)!important;box-shadow:none}
.phone :is(.text-btn,.secondary,.management-actions button,.data-toolbar button,.list-page-controls button,.pos-note-button,.pos-more,.pos-new-product,.pos-resume,.pos-next-invoice,.export-download-link){border:1px solid var(--gold-border);border-radius:8px;color:var(--ink)}
.phone .text-btn{padding:7px 11px;min-height:40px;background:var(--surface)}
.phone :is(.section-title h2,.brand-mark,.catalog-icon,.avatar){color:var(--ink)}
.phone .nav button[data-action="go:home"],.phone .nav button[data-action="go:more"]{color:var(--ink)!important}
.phone .nav button[data-action="go:home"] svg,.phone .nav button[data-action="go:more"] svg{color:var(--ink)!important}
.phone .nav button.active{background:var(--raised)!important;border-color:var(--gold-strong)!important}
.phone .nav button.active:before{display:none!important}
.phone .content :is(.metric-card,.stats>div,.compact-record-summary>div,.report-numeric-grid>.row,.financial-account-row):has(.accent){--tile-bg:var(--surface);--tile-border:var(--gold-border)}
.phone .content .ledger-balance:has(.accent){background:var(--surface)!important;border-color:var(--gold-border)!important}
.phone :is(.register-table-shell,.invoice-register,.panel:not(.summary),.pos-cart-table-shell,.document-lines-frame,.financial-account-list,.pos-choice-list,.pos-product-results){border-color:var(--gold-strong)!important}
.phone .register-scroll{border-inline-end:2px solid var(--gold-border)!important}
.phone :is(.register-table,.document-lines,.pos-cart-table){border-collapse:collapse;background:var(--list-bg)}
.phone :is(.register-table,.document-lines,.pos-cart-table) th{background:var(--list-head)!important;color:var(--ink);border-color:var(--gold-border)!important}
.phone :is(.register-table,.document-lines,.pos-cart-table) td{background:var(--list-bg)!important;border-color:var(--gold-border)!important}
.phone :is(.register-table,.document-lines,.pos-cart-table) tbody tr:nth-child(n){background:var(--list-bg)!important}
.phone :is(.register-table,.document-lines,.pos-cart-table) tbody tr:hover td{background:var(--list-bg)!important}
.phone .register-table td,.phone .document-lines td,.phone .pos-cart-table td{border-inline-end:1.5px solid var(--gold-border);border-bottom:1.5px solid var(--gold-border)}
.phone :is(.row,.financial-account-row,.catalog-item,.pos-choice-list>button,.pos-product-hit,.invoice-record){background:var(--list-bg)!important;border-color:var(--gold-border)!important}


.report-metrics-31{gap:8px}.report-metrics-31 .metric-card{min-height:54px;text-align:start;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px}
.report-metrics-31 .metric-card strong{font-size:12px;line-height:1.5;flex:1;min-width:0}.report-metrics-31 .metric-card .amount{font-size:19px;flex:none;white-space:nowrap}.report-metrics-31 .metric-count{font:700 20px system-ui}
.report-context-note{font-size:12px;line-height:1.8;color:var(--muted);margin:10px 0 14px}
.report-trace-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:4px 0 10px}.report-trace-heading h3{font-size:17px}.report-trace-heading small{font-size:11px;color:var(--muted)}
.report-trace-total{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:48px;padding:10px 12px;border:1px solid var(--gold-border);border-radius:9px;background:var(--surface);margin:10px 0;font-size:13px}
.report-trace-component{display:flex;align-items:center;gap:9px;min-height:48px;width:100%;text-align:start;padding:9px 12px;border:1px solid var(--gold-border);border-radius:9px;background:var(--list-bg);margin:7px 0;font-size:13px}
.report-trace-component>span:first-child{flex:1;min-width:0}.report-trace-component svg{width:16px;height:16px;color:var(--muted)}.report-trace-component:hover{border-color:var(--gold-strong)}
.report-reconciliation{padding:12px;border:1px solid var(--gold-border);border-radius:11px;margin:12px 0 16px;background:var(--surface)}.report-reconciliation h4{font-size:14px}
.report-source-table{margin:12px 0}.report-source-table table{table-layout:fixed;width:100%;min-width:0;white-space:normal}.report-source-table th:first-child{width:42px;white-space:nowrap}.report-source-table :is(th,td):last-child{width:30%}.report-source-table td{overflow-wrap:anywhere}.report-source-table td small{display:block;font-size:10px;line-height:1.5;color:var(--muted);margin-top:4px}.report-source-table .amount{font-size:13px;white-space:nowrap}
.report-trace-alert{font-size:12px;line-height:1.8;padding:10px;border:1px solid var(--red);border-radius:9px;color:var(--ink)}.report-trace-alert p{margin:6px 0}.report-ledger-link{width:100%;justify-content:space-between;margin:12px 0}
.phone .register-table td .amount{display:inline-flex;flex-wrap:nowrap!important;white-space:nowrap!important;gap:2px;font-size:clamp(10px,2.8vw,12px);line-height:1.3}
.phone .register-table td .amount>span{white-space:nowrap!important;word-break:normal;overflow-wrap:normal}
.phone .register-table td .amount .currency{font-size:7px;white-space:nowrap!important;word-break:normal}
.phone .register-table td{padding-inline:4px}
.phone .sheet{background:var(--bg)!important}
.phone :is(.attention,.badge.warn){color:var(--ink)!important;background:var(--surface)!important;border-color:var(--gold-border)!important}
.phone .column-sort>span{color:var(--muted)!important}
.phone .nav button.active,.phone .nav button.active svg{color:var(--section-ink)!important}
@media(max-width:380px){.report-metrics-31 .metric-card{padding:8px;gap:6px}.report-metrics-31 .metric-card strong{font-size:11px}.report-metrics-31 .metric-card .amount{font-size:16px}}
@media(prefers-reduced-motion:reduce){.phone .register-table tbody tr.source-record-focus>td{animation:none}}


/* Edges express structure; the brand is reserved for primary actions. */
.phone{--edge:#34475d;--edge-soft:#29394d;--edge-strong:#50677f;--line:var(--edge-soft);--gold-border:var(--edge);--gold-strong:var(--edge-strong);--brand-edge:#a58a55;--focus-ring:#8bb8ee;--source-fill:#19354c;--source-peak:#254c68;--list-head:#172638}
.phone[data-appearance=light]{--edge:#b5c2d1;--edge-soft:#d6dee7;--edge-strong:#8fa2b8;--line:var(--edge-soft);--gold-border:var(--edge);--gold-strong:var(--edge-strong);--brand-edge:#9b804c;--focus-ring:#356eac;--source-fill:#deedf9;--source-peak:#c6e1f6;--list-head:#e9eff6}
.phone :is(.primary,.home-start-sale){border-color:var(--brand-edge)!important}
.phone :is(.register-table-shell,.invoice-register,.pos-cart-table-shell,.document-lines-frame,.financial-account-list,.pos-choice-list,.pos-product-results){border:1.5px solid var(--edge-strong)!important}
.phone :is(.register-table,.document-lines,.pos-cart-table){border:0;box-shadow:none}
.phone :is(.register-table,.document-lines,.pos-cart-table) :is(th,td){border-inline-end:1px solid var(--edge)!important;border-bottom:1px solid var(--edge)!important}
.phone :is(.register-table,.document-lines,.pos-cart-table) th{border-bottom-width:2px!important}
.phone :is(.register-table,.document-lines,.pos-cart-table) :is(th,td):last-child{border-inline-end:0!important}
.phone :is(.register-table,.document-lines,.pos-cart-table) tbody tr:last-child td{border-bottom:0!important}
.phone .register-scroll{border-inline-end:1px solid var(--edge)!important}
.phone :is(.column-sort,.home-invoice-party,.document-history){border:0!important;box-shadow:none;background:transparent}
.phone .nav{border-color:var(--edge)}
.phone .nav button{border-color:transparent!important}
.phone .nav button.active{border-color:color-mix(in srgb,var(--section-ink) 42%,var(--edge-soft))!important}
.phone .app-head{border-bottom-color:var(--edge)}
.phone .app-head [data-action=back]{border-color:transparent!important;background:transparent}
.phone .section-title h2{border-color:var(--edge)}
.phone .invoice-document{border-color:var(--edge-soft)}
.phone .document-reference,.phone .document-total{border-color:var(--edge-soft)}
.phone .document-history{padding-inline:4px}
.phone :is(.search,.pos-search){border:1px solid var(--edge);box-shadow:none;transition:border-color .15s ease}
.phone :is(.search,.pos-search):focus-within{border-color:var(--focus-ring)!important;box-shadow:0 0 0 1px color-mix(in srgb,var(--focus-ring) 35%,transparent)}
.phone :is(.search,.pos-search) input,.phone :is(.search,.pos-search) input:focus,.phone :is(.search,.pos-search) input:focus-visible{border:0!important;outline:0!important;box-shadow:none!important;background:transparent}
.phone .search input{min-width:0}
.phone :is(.search,.pos-search) button{border:0!important;box-shadow:none}
.phone button:focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px}
.phone .field :is(input,select,textarea):focus-visible{outline:0;border-color:var(--focus-ring);box-shadow:0 0 0 1px var(--focus-ring)}
.phone .document-lines td{vertical-align:middle}
.document-product-label{display:flex;align-items:center;gap:7px;min-width:0}
.document-product-label .document-line-number{display:inline;flex:none;margin:0;font-size:10px;color:var(--muted)}
.document-product-label strong{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.6}
.phone .register-table tbody tr.source-record-focus>td{background:var(--source-fill)!important;box-shadow:none;animation:source-surface-pulse 1.2s ease-in-out 2}
@keyframes source-surface-pulse{50%{box-shadow:inset 0 0 0 100vmax #8fb9ee18}}
@media(prefers-reduced-motion:reduce){.phone .register-table tbody tr.source-record-focus>td{animation:none}}

/* A restrained warm frame for records; neutral dividers preserve legibility. */
.phone{--list-frame:#8e7c58;--list-rule:#43556b;--action-frame:#a68b56}
.phone[data-appearance=light]{--list-frame:#a18b60;--list-rule:#a7b8cb;--action-frame:#9b7f48}
.site-shell #phone :is(.register-table-shell,.invoice-register,.document-lines-frame,.financial-account-list,.pos-choice-list,.pos-product-results,.pos-cart){border:2px solid var(--list-frame)!important;border-radius:11px;overflow:hidden}
.phone :is(.register-table,.document-lines,.pos-cart-table) :is(th,td){border-inline-end-width:2px!important;border-bottom-width:2px!important;border-color:var(--list-rule)!important}
.phone :is(.register-table,.document-lines,.pos-cart-table) th{border-bottom:2px solid var(--edge-strong)!important}
.phone :is(.register-table,.document-lines,.pos-cart-table) :is(th,td):last-child{border-inline-end:0!important}
.phone :is(.register-table,.document-lines,.pos-cart-table) tbody tr:last-child td{border-bottom:0!important}
.phone .register-scroll{border-inline-end:2px solid var(--list-rule)!important}
.site-shell #phone .panel:has(>.row),.site-shell #phone .compact-catalog{border:2px solid var(--list-frame)!important}
.site-shell #phone .panel:has(>.row[data-action^="go:"]){border-color:var(--edge-strong)!important}
.phone :is(.row,.financial-account-row,.catalog-item,.pos-choice-list>button,.pos-product-hit,.invoice-record)+:is(.row,.financial-account-row,.catalog-item,.pos-choice-list>button,.pos-product-hit,.invoice-record){border-top:2px solid var(--list-rule)!important}
.phone .row{border-bottom-color:var(--list-rule)!important}
.phone .primary,.phone .primary-sale>.primary{border-width:2px!important;border-color:var(--action-frame)!important}
.phone .actions>.secondary,.phone .document-actions>button:not(.document-delete),.phone .pos-heading>button,.phone .section-title>.text-btn{border:1.5px solid var(--action-frame)!important}
.phone .document-actions>.document-delete{border:1.5px solid color-mix(in srgb,var(--red) 45%,var(--edge))}
.site-shell #phone .pos-cart>.pos-cart-table-frame{border:0!important;border-radius:0}
.phone .pos-cart-heading .section-count{display:inline-block;font-size:10px;font-weight:400;color:var(--muted);margin-inline-start:8px}
.phone .pos-clear{align-self:flex-end;min-height:32px;padding:3px 8px;font-size:11px;color:var(--muted)}
.phone .pos-cart .register-table-shell{margin:0}
.phone .pos-cart-table :is(.pos-table-name,.pos-table-value,.pos-table-remove){border:0!important;background:transparent;box-shadow:none}
.phone .modern-picker .picker-tile{border:1px solid var(--edge)!important}
.phone .modern-picker .picker-tile[aria-pressed=true]{border-color:var(--action-frame)!important;border-width:1.5px!important}
.phone .register-table td .amount.money-wide{font-size:clamp(8px,2.2vw,10px)}
.phone .document-lines .amount.money-wide{font-size:9px;gap:2px}
.phone .document-lines .amount.money-wide .currency{font-size:7px}
.phone .modern-picker .picker-tile-grid{align-content:start;grid-auto-rows:minmax(48px,auto)}
.phone .product-barcode-input:focus-within{border-color:var(--focus-ring);box-shadow:0 0 0 1px color-mix(in srgb,var(--focus-ring) 35%,transparent)}
.phone .product-barcode-input input:focus-visible{border:0!important;outline:0!important;box-shadow:none!important}
.backup-file-picker{position:relative;display:flex;flex-direction:column;justify-content:center;gap:6px;min-height:82px;padding:14px;border:1.5px solid var(--edge-strong);border-radius:10px;background:var(--surface);cursor:pointer}
.backup-file-heading{font-size:14px;font-weight:700;color:var(--section-ink,var(--ink))}
.backup-file-picker small{font-size:11px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
.backup-file-picker input[type=file]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.backup-file-picker:focus-within{border-color:var(--focus-ring);box-shadow:0 0 0 1px var(--focus-ring)}
