/* Hermed local fonts — generated at build time; no runtime CDN */
/* cairo-arabic-wght-normal */
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-display: block;
  font-weight: 200 1000;
  src: url(/assets/fonts/cairo-arabic-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC,U+102E0-102FB,U+10E60-10E7E,U+10EC2-10EC4,U+10EFC-10EFF,U+1EE00-1EE03,U+1EE05-1EE1F,U+1EE21-1EE22,U+1EE24,U+1EE27,U+1EE29-1EE32,U+1EE34-1EE37,U+1EE39,U+1EE3B,U+1EE42,U+1EE47,U+1EE49,U+1EE4B,U+1EE4D-1EE4F,U+1EE51-1EE52,U+1EE54,U+1EE57,U+1EE59,U+1EE5B,U+1EE5D,U+1EE5F,U+1EE61-1EE62,U+1EE64,U+1EE67-1EE6A,U+1EE6C-1EE72,U+1EE74-1EE77,U+1EE79-1EE7C,U+1EE7E,U+1EE80-1EE89,U+1EE8B-1EE9B,U+1EEA1-1EEA3,U+1EEA5-1EEA9,U+1EEAB-1EEBB,U+1EEF0-1EEF1;
}

/* cairo-latin-ext-wght-normal */
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-display: block;
  font-weight: 200 1000;
  src: url(/assets/fonts/cairo-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* cairo-latin-wght-normal */
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-display: block;
  font-weight: 200 1000;
  src: url(/assets/fonts/cairo-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* alexandria-arabic-wght-normal */
@font-face {
  font-family: 'Alexandria';
  font-style: normal;
  font-display: block;
  font-weight: 100 900;
  src: url(/assets/fonts/alexandria-arabic-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC,U+102E0-102FB,U+10E60-10E7E,U+10EC2-10EC4,U+10EFC-10EFF,U+1EE00-1EE03,U+1EE05-1EE1F,U+1EE21-1EE22,U+1EE24,U+1EE27,U+1EE29-1EE32,U+1EE34-1EE37,U+1EE39,U+1EE3B,U+1EE42,U+1EE47,U+1EE49,U+1EE4B,U+1EE4D-1EE4F,U+1EE51-1EE52,U+1EE54,U+1EE57,U+1EE59,U+1EE5B,U+1EE5D,U+1EE5F,U+1EE61-1EE62,U+1EE64,U+1EE67-1EE6A,U+1EE6C-1EE72,U+1EE74-1EE77,U+1EE79-1EE7C,U+1EE7E,U+1EE80-1EE89,U+1EE8B-1EE9B,U+1EEA1-1EEA3,U+1EEA5-1EEA9,U+1EEAB-1EEBB,U+1EEF0-1EEF1;
}

/* alexandria-vietnamese-wght-normal */
@font-face {
  font-family: 'Alexandria';
  font-style: normal;
  font-display: block;
  font-weight: 100 900;
  src: url(/assets/fonts/alexandria-vietnamese-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* alexandria-latin-ext-wght-normal */
@font-face {
  font-family: 'Alexandria';
  font-style: normal;
  font-display: block;
  font-weight: 100 900;
  src: url(/assets/fonts/alexandria-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* alexandria-latin-wght-normal */
@font-face {
  font-family: 'Alexandria';
  font-style: normal;
  font-display: block;
  font-weight: 100 900;
  src: url(/assets/fonts/alexandria-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* Hermed UI v1.3.6 — consolidated production stylesheet; pixel-equivalent to v1.3.5 */
:root{
  --navy-950:#021f3d;--navy-900:#032c55;--navy-800:#073c6d;
  --blue-700:#07549f;--blue-600:#0868c2;--blue-500:#1e7bd0;--blue-100:#e9f3fc;--blue-50:#f4f9fd;
  --surface:#ffffff;--canvas:#f3f7fa;--canvas-2:#edf4f9;--text:#132b3f;--text-2:#40596d;--muted:#73879a;
  --border:#dce6ee;--border-strong:#cbd9e5;
  --success:#137a54;--success-bg:#eaf7f1;--warning:#a96d12;--warning-bg:#fff6e2;--danger:#b83939;--danger-bg:#fdefef;--info:#1764a8;--info-bg:#eaf3fb;
  --shadow-xs:0 1px 2px rgba(2,31,61,.04);--shadow-sm:0 6px 18px rgba(2,31,61,.06);--shadow-md:0 16px 40px rgba(2,31,61,.10);--shadow-lg:0 30px 80px rgba(2,31,61,.16);
  --r8:8px;--r10:10px;--r12:12px;--r14:14px;--r16:16px;--r20:20px;--r24:24px;
  --sidebar:272px;--topbar:76px;
  --font:"Segoe UI Variable","Segoe UI","Noto Sans Arabic",Tahoma,Arial,sans-serif;
}
*{box-sizing:border-box}
html{background:var(--canvas);scroll-behavior:smooth}
body{margin:0;min-height:100vh;background:var(--canvas);color:var(--text);font-size:14px;line-height:1.55;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
button,input,select,textarea{font:inherit;color:inherit}
button{touch-action:manipulation}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid rgba(30,123,208,.18);outline-offset:2px}
::selection{background:#d6eafe;color:var(--navy-950)}
.hidden{display:none!important}.ltr{direction:ltr;text-align:left;font-variant-numeric:tabular-nums}.svg-sprite{position:absolute;width:0;height:0;overflow:hidden}.icon,.btn-icon,.search-icon{display:block;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.icon use,.btn-icon use,.search-icon use{pointer-events:none}

/* LOGIN */
.login{position:fixed;inset:0;z-index:80;display:grid;place-items:center}
label{display:block;margin:0 2px 7px;font-size:12px;font-weight:680;color:#536b7d}
input,select,textarea{width:100%;border:1px solid var(--border-strong);border-radius:12px;background:#fff;color:var(--text);transition:border-color .16s,box-shadow .16s,background .16s}
input,select{height:46px;padding:0 13px}textarea{min-height:88px;padding:11px 13px;resize:vertical;line-height:1.6}
input:hover,select:hover,textarea:hover{border-color:#b9cada}input:focus,select:focus,textarea:focus{border-color:var(--blue-500);box-shadow:0 0 0 4px rgba(30,123,208,.085);background:#fff;outline:none}

/* BUTTONS */
.btn{border:1px solid transparent;display:inline-flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;transition:transform .12s,box-shadow .15s,background .15s,border-color .15s,color .15s;white-space:nowrap}
.btn:hover:not(:disabled){transform:translateY(-1px)}.btn:active:not(:disabled){transform:translateY(0)}.btn:disabled{opacity:.5;cursor:not-allowed;box-shadow:none}
.btn-icon{width:17px;height:17px;stroke-width:2}
.primary{color:#fff}.primary:hover:not(:disabled){background:linear-gradient(180deg,#0c72cc,#07549f)}.soft:hover:not(:disabled){background:#e6f2fc;border-color:#c8e0f2}.ghost:hover:not(:disabled){background:#f7fafc;color:var(--navy-900);border-color:var(--border-strong)}
.btn.xs{min-height:32px;padding:6px 9px;border-radius:8px;font-size:10px}.icon-btn{padding-inline:12px}

/* SHELL */
.app{min-height:100vh;display:grid}
.sidebar{position:sticky;top:0;height:100vh;display:flex;flex-direction:column;overflow:hidden}
.side-brand .logo-img{margin:auto}.side-brand small{direction:ltr;text-align:center;margin-top:7px;color:#6e8294;font-size:9px;font-family:"Segoe UI",Arial,sans-serif;letter-spacing:.15px}.nav button{width:100%;display:flex;align-items:center;cursor:pointer}
.nav button .icon{flex:0 0 auto;stroke-width:1.8}.nav button:before{content:"";width:3px;height:22px;border-radius:999px;background:transparent;opacity:0;transition:.15s}.nav button.active:before{background:#62b1ef;opacity:1}
.side-foot{direction:ltr;text-align:center}
.topbar{position:sticky;top:0;z-index:30;justify-content:space-between}
.topbar-start{display:flex;align-items:center;gap:18px;min-width:0;flex:1}.page-context{display:flex;align-items:center;gap:8px;font-weight:650;white-space:nowrap}.context-dot{width:7px;height:7px;border-radius:50%;background:#27a170;box-shadow:0 0 0 4px #e5f5ed}
.search{position:relative;width:min(460px,46vw)}.search-icon{position:absolute;right:13px;top:50%;transform:translateY(-50%);width:17px;height:17px;color:#8aa0b1;pointer-events:none}.search input{padding-right:40px}.search input::placeholder{color:#98a9b7}
.top-actions{flex:0 0 auto}.userchip{display:flex;align-items:center;gap:10px}.avatar{display:grid;place-items:center;font-weight:800;font-family:"Segoe UI",Arial;font-size:12px}.userchip b{display:block}.userchip small{display:block;direction:ltr;text-align:right;margin-top:1px;max-width:210px;overflow:hidden;text-overflow:ellipsis}
.content{margin:auto}.view{display:none}.view.active{display:block;animation:fadeIn .18s ease}@keyframes fadeIn{from{opacity:.2;transform:translateY(3px)}to{opacity:1;transform:none}}

/* PAGE HEADERS */
.head{display:flex;justify-content:space-between;gap:18px}.head h2{margin:0 0 5px;line-height:1.25;letter-spacing:-.25px}.head p{margin:0}.head-actions{display:flex;align-items:center;flex-wrap:wrap}

/* CARDS + KPIs */
.kpis{display:grid}.kpi{position:relative;overflow:hidden}.kpi-top>span:first-child{color:#597085;font-weight:680}.kpi-icon{background:#eaf4fc;color:var(--blue-700)}.kpi-icon .icon{width:18px;height:18px}.kpi-icon.warn-icon{background:var(--warning-bg);color:var(--warning)}.kpi-icon.sales-icon{background:var(--success-bg);color:var(--success)}.kpi strong{font-family:"Segoe UI",Arial,sans-serif;line-height:1;font-weight:780}.kpi>small{display:block;margin-top:7px;color:#94a4b1;font-size:9px;direction:ltr;text-align:right}
.two{display:grid}.panel h3,.pos-main h3,.pos-side h3{margin:0 0 14px;color:var(--navy-900);font-weight:740}.alert-list{display:grid}.alert{display:flex;align-items:center;justify-content:space-between;gap:10px}.alert b{font-family:"Segoe UI",Arial,sans-serif;text-align:center;font-size:12px}
.cards-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:14px}.metric{padding:15px 16px}.metric b,.mini b{display:block;font-variant-numeric:tabular-nums}.stat-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:14px}.mini{padding:13px 14px}

/* TOOLBARS + TABLES */
.toolbar{display:flex;align-items:center;flex-wrap:wrap}.toolbar input,.toolbar select{width:auto;min-width:190px}.toolbar .grow{flex:1;min-width:240px}.table-card::-webkit-scrollbar{height:9px;width:9px}.table-card::-webkit-scrollbar-thumb{background:#cad8e2;border:2px solid #f7fafc;border-radius:999px}.table-card::-webkit-scrollbar-track{background:#f7fafc}
table{width:100%;border-collapse:separate;border-spacing:0}th,td{text-align:right;white-space:nowrap;vertical-align:middle}th{position:sticky;top:0;z-index:1}tbody tr{transition:background .12s}tbody tr:last-child td{border-bottom:0}.empty{padding:34px!important;text-align:center;color:#8b9ba8!important}.customer-cell b,.product-cell b{display:block;color:var(--navy-900);font-weight:720}.customer-cell small,.product-cell small{display:block;margin-top:3px;color:#8b9eac;font-size:9px}.message-cell{max-width:440px;white-space:normal!important;line-height:1.65;color:#52697d}.actions-cell{display:flex;align-items:center;gap:6px}
.pill,.user-role,.locked{display:inline-flex;align-items:center;font-weight:750;line-height:1}.ok{color:var(--success);background:var(--success-bg)}.warn{color:var(--warning);background:var(--warning-bg)}.bad{color:var(--danger);background:var(--danger-bg)}.info{color:var(--info);background:var(--info-bg)}.neutral,.locked{color:#687d8e;background:#eef3f6}.priority-high{color:#985311;background:#fff0df}.priority-urgent{color:var(--danger);background:var(--danger-bg)}.priority-normal{color:var(--blue-700);background:var(--blue-100)}.priority-low{color:#637786;background:#eef3f6}.user-role{background:var(--blue-100);color:var(--blue-700)}.role-manager{background:#efefff;color:#5255aa}.role-admin{background:#e8f3fc;color:#07549f}.role-sales{background:#eaf7f1;color:#137a54}
.permission-note{line-height:1.7}.permission-note strong{color:var(--navy-900)}

/* POS */
.pos-grid{display:grid}.pos-top{display:grid}.add-line{display:grid;grid-template-columns:minmax(220px,1fr) 105px auto;align-items:end;border:1px solid #e0e9f0;background:#f9fcfe}.cart-line{display:grid;grid-template-columns:minmax(190px,1fr) 72px 96px 100px 34px;gap:8px;align-items:center;padding:11px 3px;border-bottom:1px solid #edf2f5}.cart-line:last-child{border-bottom:0}.cart-line .alloc{grid-column:1/-1;padding-right:5px;color:#7f92a1;font-size:9px}.icon-x{width:31px;height:31px;border:1px solid #efd2d2;border-radius:8px;background:#fff7f7;color:var(--danger);cursor:pointer}.icon-x:hover{background:#ffefef}.summary-box{padding:16px;border:1px solid #d9e7f2;margin-bottom:14px}.sum{display:flex;justify-content:space-between;gap:10px;padding:7px 0;color:#657c8f;font-size:11px}.sum b{color:var(--navy-900);font-variant-numeric:tabular-nums}.sum.total{margin-top:5px;padding-top:12px;border-top:1px solid #dce7ef;color:var(--navy-900);font-size:13px;font-weight:760}.sum.total b{font-size:21px;font-family:"Segoe UI",Arial,sans-serif}.invoice-success{margin-top:12px;padding:12px;border:1px solid #cce8da;border-radius:11px;background:var(--success-bg);color:var(--success);font-size:11px}.stock-zero{color:var(--danger);font-weight:700}.stock-low{color:var(--warning);font-weight:700}

/* MODALS */
.modal{position:fixed;inset:0;z-index:70;display:none;place-items:center;padding:22px;background:rgba(2,31,61,.48);backdrop-filter:blur(5px)}.modal.open{display:grid}.dialog{width:min(760px,100%);max-height:min(90vh,860px);overflow:auto;background:#fff}.dialog.sm{width:min(570px,100%)}.dialog h3{margin:0 0 19px;font-weight:760}.form{display:grid;grid-template-columns:1fr 1fr}.field{display:flex;flex-direction:column}.field.full{grid-column:1/-1}.section-label{margin:16px 0 9px;padding-top:13px;border-top:1px solid #e5edf3;color:var(--blue-700);font-size:10px;font-weight:800}.section-label.first{margin-top:0;padding-top:0;border:0}.dialog-foot{display:flex;gap:9px;margin-top:20px;padding-top:16px;border-top:1px solid #edf2f5}.offer-products{min-height:150px!important;height:150px!important;padding:8px}.empty-panel{padding:30px;text-align:center;color:var(--muted)}.empty-panel b{display:block;margin-bottom:6px;color:var(--navy-900);font-size:14px}

/* TOAST */
.toast{position:fixed;z-index:100;top:18px;left:50%;max-width:min(720px,92vw);padding:12px 16px;border-radius:11px;background:var(--navy-950);color:#fff;font-size:12px;text-align:center;box-shadow:var(--shadow-md);opacity:0;pointer-events:none;transform:translate(-50%,-14px);transition:.2s}.toast.show{opacity:1;transform:translate(-50%,0)}.toast.err{background:#9f2f2f}

/* LOGO */
.logo-img{display:block;background-image:url(data:image/webp;base64,UklGRgoQAABXRUJQVlA4IP4PAABwSgCdASrBAX0APlEkkESjoiOUakVoOAUEpuz3jdrygPAKUeW/af7LzpOQfBb25F25M8prn/zv/8H1n/1//Eb3rzjO3nQz5gz2U0EPrB+z88/EngF+wt9q5Xwz6ZXQD8XvSP+df7ssSG0E+OeMsw82tCdY04nE4lfZ9NCdY04nE4nE4nE4nE4jIirT3TTFIOfzfFVg3y7QqAt1Wo6VQ1vXLl9dmj8MgYR0kwEtCIu1UbT9HK1wWF4CR2ziOAmzPbyktgxF3kdWZDvKrQn1fFJ54xnjCoAeRXqcES/gGbLaLMKL0GMIZkvIKEjVbfimyiHx/nZc56TtLAlJVOLkdDWmEf6qw7TiwYZCvfWzCarwCn+pSLq51JBqe60mUQQ1wV4/AyBCip/CQ13tCWTvYriXUnfrQrGZgi7EemRXvYpQuEcdMnAdAwfWCvQ3Hb9vNuneRCCv8c6ygZzlpe4e1zmdAI71hNevCwLWmzDD5oZY5xn5Bk9yJaNFckph5cgK47aHjFXdbXRFBY6UgfPdEHRe9Ztxh8JALQLUKk8I4FV2LDWcc3MJ62kZhJEO8tGlPaObqpDFmLQgN5V0YaViy24z1fNS/XeodhbbSoXv7mrbUA6va0pc3Mq0JBvqCPiPG/pGjX6RDZhJUudkp8GGYXd/UuQAw7Q4+eOuMTFIJRkMa+VF56tpxuEvpIEXGHJ64lDbwTXPIR6ekWWcvrLAciNragdtGhCEqHVLAPbpBzfv+Tf6D+TkroU44AzQatKedyB3dvDs3jnvmZaep8OP0qG5Ja7Y8rp8dMgztNwAAP7/NWQAAAAAz31HTgAAAAPqw1RSYuYfx+R5Ae2T/kZtwnOYFlDafu7vQKeaSnbdbCIv7fOgi3WB4ExRSLIjd0/30F1+17i6Egmye/JkX+1JtqTb1vpBEGy829ldqHE/9jiEOUpnFcyap9uf8N09zuU24qqUSnRxsaeXP40AI9nyxN+/np552eXlpZ3Rh+7kc5r1GXfJRH7FMbeOjW9AJQZTfOnYf+7fc++3XpW3I/VGNjDd9piZ8rHM39JpemngLHxpSWftkYV0mem/BFWsLobNbor9xLE3QJh4br7ciX/tHMu17SZTw+1EJa468rn+ocBzvXg7/db9ueMzOKTSN3I+4cTGXYGZyaiSNDjh9ZjtRs6TRu3lrBRr3iQ/ycCK8vtMrcbkgjpt3ZqXKW8W1F2nvKpL9tT7529s5jaOQqlYtj8g+qZWQ/jhpT5wcs+d6P4fZ7zRlS34EBVzMAk6w0NYf30BTDiTEvue/IOzwBCyqR6ezZMpOxp96YXk+/jsN9rsdUKJAxytxjeirVJlD6PP5CsuB0AhXXcZ6alX64cJMSE0WQG8xEDH+6iytVlOKmdAVJlM9wPbQCpWF/179/T/xoZy5WSRIjozP75/UkihWVn24MZ37S/wBgVwWzPnoWnnfguSagp5u7jHQRvmBMUgh/mBswMBIQZQna0tbglzg7tmAtqgfkEvEKBCMS1tByOHGGCwMgnhGbVy4L0C8vgx312/t8pDYY0KKTl4LHndGT5WxvuNBFO76sOyf3qqs+HaUZnhDyUyQSeEM9w1ZwKOUJTrYu9UpiTf0bLQe2cxzM/2S0MEHWH70zi3ARDsKpAcehZt3y0Iqzxxz5A4aiEZr7UHK+ABj8NvkAasWme0AvrdAlmQ/RT/xziC++/l+e4oPdEhNjKOB2WMBwRH2sbeZnxsxN+etUyPjwuOReUqUJMzqZ0xJ8OJjQ9rDXs5fFQdMS+zTJwg2XTVSL7xl46kt02eBAJ9BypBalyVrlITcuQ4QePFiNjEU3tkyFupXFH41ukBE4oYHGAyD4ZhZqLh0rQ/SsYtVzmV8zJ0cf1Dmfvfk1YanhrZl/KJK3QFkbsJPpWaDB5nPZS/7dUM4B/WNLz4qYVLJLca4PRCz6jqfpWWYZja1tlzIiEIAGAI3G9Bu5JWisugw0ZaNM0MueKo0ujVEYdEFitvQA5ljpjeG/uajR6TFvl+ijhtl8ndc63LgQJM+iLIBVAM+UrFuwjvXDPP/RfuJpPGsxyp2MsbFgwoYOvfqc1JeBMEBwwbnXckRQeojeibbKkqeouFWI+NKX0nunntDwGOFozMubkA5+VPuZNJXE2AHCsNEeCrHvInnOfYkfzoWHwAHBvqx2sqH2ENDSzjZaM7ZR/lRpQ+Yd21Gfva9UmzmVGvKnr8YdDFhRaxeeyBIrLjxarupGGyZ+cCrEzIB005NtVadDDOZUx80e3nau4ohNm5LOQPyfIu1EUFuQT1bCtyZ4RkDOpBTmt/DQqI9bL+DlCZBZV9ZVw8L6mVCe+7GTO1UA8o8mGnqMKM6egKDm6ADKyH43g56EoPEWVZyx8dzNLznqxid93Txwh27aTm5Cvg6EIReapm/Fd0NlGvfN/otYhY6dZiEUh1ApGGYirTrR+M5KWvOcHQxAyE1xLf2MqQe1G1Brv0ZxQIP+NW/JJOfUKSG18rOcG+jKfRMlssS2pkRk9gJqosryzW5LO7Z2FjpXIWnwrT2kNKwXO1tKg/yI5s7O8NWGgyO7eTt4Z5i3hj6/rDp5fsaSCicYqFJut/X110g9vKZ0/1ov3J63MzPA5179B7hc5j3tvB+MNj2ZofjojlQyJuzNX94a0DF5qT1QbSZKz8qmWX0b6YQKvPfzINuYeanGyxmk43kDVZAtPHf2IAXJCB8QealQBOx4VnUI1Y9fwX9E7zOnK2R04usmsVLG1ThmUpeH4OVeomV64GM/MtxsyfP+J+gApLzcvJPWDUddWWMtKoSjmd5nAqPuoLPN0vNTCtS9CModMMK2uTXuq+6ob28USNwTAQbxiYwB9SEVo1TNimQ+VVhUPdSXrdntDcyZAsg+BNfSwLP3c6omxkJrHlY2DqdfCfARclAAuFDorFzHzZQKceMRFGvRICg/ESyBsedMyiNusK3zy84hLumE1an2+mwc3ohHu/VVqP85OuJNI94Mc9LwsTimLo9l4P1OqXMNRPERaaCE7Fp8MbI8LzlzYWPaRgT0SpVxy+VBKdtJCCSe/BVS3/rqdxoCF6HUgn2fdSJTrQDZS9XbgRRL2gSQ0pFRB2JA4kn9yERIzuMhDqsFD/zAIqOLFkr6CWWg4bYjKlohYN90knbo+Kk5gyY1/x11hOUORs1VJImwAS6imcntfIucfmgQebZcUnxkJpnO4SqQIsuM9e8vhdzVbChA3yfZif9/sa2j236bcVZV6yXXeKcDIQV4A+BkOg0rVKzBM+SBkv9X3a1A0aHm0K42g1HwfHxHgyUflMnm70zjvKslK8q3g9s7XHyOcFckZM1uTexlmAX/ZnDfi9od+EJxDIEDQmzArL/SaK+r8mnAcglIDduUTM6vaBaYjaqPIyx36YdLslS2FMrA/FRiPgKQ2nbIUNoMwdmCEll4k8JPeGm5h4XB2mf2wu8/cUtaTRiU30tYW6Qy2psCuNKcrlNW3DdhCdZYyGDEUKdP/8BuuppvlRN66MkHAqTEHUV3fHR7M/uZUHQhnzHZCrK7+IoSfHEEvDSQjj7ZBYQqCqMEAZhGAi2l91EVrDlDBS4uoR978oaKxqRA0Eh3r+aC/jmne5jW7sKV8sRT23LqImhpfzqpaOhmn1G4zfh+z5HlP/xp9NH9qDNQ/arcisSJWxW1CpW7d0JiHmpRpvZLk+/rt/jmlHLVJGK7qaPVYeXe1etj82sA+aDBoAd+T4LLRJ2WhXK0UQumTOhyrctp4gqPTSzJW68jZC46ZwTTBulXP/ogUet8eV8/Ru1MP7/8pHe6BMGOqVGZnZRBwnotXhdRTLFDLhb52zvXNDCFw8ljYRePSKJ8bhKf6vXMPAblNmfD0V3W0edWfr8MPXRLWmgFVdvFfw1QhA9zSXORGsbA044WiNqIZt4qZmwnzXOIsmcZFXwpec5STLZoSrTJcKfjPkthQP7T66rNcSBXLDHWuP72ysxzjACjYJ2pzbXQpCFqcQuPajHaUfON4S/eDHDnHTUC4QRqXbA4VF2YOYzauCXnpASt+jOsvJihAUR8OXm6ZmpV1bxPpWdaWO5gXUmMeKYib5IuekGvjLeAI2/2IBtRGWialSQOyJqHnoA8pclb6R71sAstw6PjaGwf0B3QvwGDqhq+E/8XhR7at2HCttNlcquHzCs2yO6wQQ/38u6tixxSc4kPq6KyFLZScG2B8qtNzAFt8ieoKkhQrypZQM2Q27vzBjDOWkzsBrwX+QOJA9nkRWEfoqyJ2CfQD00av3clvHz1a1QEDfWyBCQuuskAObi/bNzOgMRXBMAFWRHzZXQLaAmSsFp2LDGr7eXEBsoPI/pY71StYiYMTP+xN8+/wllWMF8F5wd3ByyW7Xrt8nvo9V+Dufbym2BayC8g6YLg+T2I18BGp0Ic0M2wFoyoDEmiGOF8tceLgFzhznx31TX0BvBMmgqxEyrVPTeEPAZoo0+PWMxwWWQMsl9itxfQqn+6fvmLmukMIfY/zV8ZR/abxBt2uV+D+g7s9cKJ2oxH+qmJH5svZNdv/s2QRUn30mjs7plU4cmCNJ8wESxQjYhDxgvBL/w89bi+ld/kffml7K20LUC5sGv5uzGH60oqb/pH2ezVPf9G36YOKjEjDZQLqeS9zm8hFV1pZo1O7AXRtXdIoC/qHHyuZgpy+JBhqzmURYYcAxMpeRi79tTzwPKsXcIvJflX/qdb1laIrikLl2auzwLYSr8ttVmrHJufl/P6bIaZn/iU7kSDAI5FeF4ZkyJM4tEBYg7pI2WhQdbR5Yf5/Uaa6Dj+Kpnb/41neyEwSJymF7hrNDjEHPgpIggQUSycksxOcOSgXCBZ2d8AwoB1VyY5ielc7nF+hX6/RVootzQHr7cmnDdXUArQpL72wTj7bJh7lC0uBklYM86A6DM8XCl2Ia5pxYFLN7w3Wc26yb15xe2aKmTLUNKp957DxNFekpgMobT003Gp1Gjg/x6Xtl3q8mceSf1X9I/Aw1qhfLmS39dkX5gE9+/wQ91L3KKBVSPETJ6/ysnYEae4rcgK20KYmBigFx3eYu45l2i+F/0az8tGR+fEOdhXjhpNjF4CPW+tX47QwkcYNCtk5BfbF9eZWnHSSjrTjVU05fZD3chxqVs9yNSD9L9UhY5bU/8vnjksQD4MHDJjZ/dA5eqtr0XUCz9kZ2tn82TLQSiDsfkdTGLCgwKyScBrYdP2zV3vBgeIjEFWdhTzqy5PfNl5wj+dxClFcgcvahHZvbXRDfTskWndf78SwyvLjfBCsiND4p67PbSAAcVz0lcq0cHVq5U/uu9NnNwzWJlJbGUWTGfVkdv5UONwQbXKHVkmrG7d9ObL3bQWuU/AQPAVXnzu+7LsBgGBP5UZLGGokLDpEIDyEBIS8iXH16+aDAm8t+Ybd0tW8Lih3V83IVEtadQMfi9DuIUWADOl2oo3aLXwqhdY+ugAAAAA==);background-repeat:no-repeat;background-position:center;background-size:contain;min-height:52px}

/* RESPONSIVE */
@media(max-width:1320px){:root{--sidebar:238px}.content{padding-inline:24px}.kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.two{grid-template-columns:minmax(0,1.2fr) minmax(290px,.8fr)}.pos-grid{grid-template-columns:minmax(0,1fr) 330px}.page-context{display:none}}
@media(max-width:1080px){:root{--sidebar:88px}.app{grid-template-columns:minmax(0,1fr) var(--sidebar)}.sidebar{padding:15px 9px}.side-brand{padding:9px 5px;border-radius:13px}.side-brand .logo-img{width:66px;min-height:36px}.side-brand small,.nav-title,.nav button span,.side-foot{display:none}.nav{gap:5px;margin-top:10px}.nav button{min-height:46px;padding:8px 5px;justify-content:center}.nav button:before{display:none}.nav button .icon{width:20px;height:20px}.two,.pos-grid{grid-template-columns:1fr}.content{padding:23px 20px 48px}.search{width:min(460px,58vw)}.userchip small{max-width:150px}}
@media(max-width:820px){.topbar-start{gap:8px}.userchip{padding-inline:8px}.userchip small{display:none}}
@media(max-width:700px){body{font-size:13px}.login{align-items:start}.app{display:block}.sidebar{position:fixed;z-index:45;bottom:0;top:auto;right:0;left:0;width:100%;height:74px;padding:7px 8px;background:rgba(2,31,61,.98);display:flex;flex-direction:row;align-items:center;overflow-x:auto;overflow-y:hidden;box-shadow:0 -8px 30px rgba(2,31,61,.16);backdrop-filter:blur(12px)}.side-brand,.nav-title,.side-foot{display:none!important}.nav{display:flex;margin:0;gap:3px;flex:0 0 auto}.nav+ .nav{margin-right:3px}.nav button{width:70px;min-height:58px;padding:5px 4px;display:grid;grid-template-rows:25px auto;justify-items:center;align-content:center;gap:2px;border-radius:10px;font-size:9px}.nav button span{display:block!important;max-width:66px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nav button .icon{width:19px;height:19px}.main{padding-bottom:74px}.topbar{height:64px;padding:0 10px}.search{width:auto;flex:1}.search input{height:40px}.top-actions .icon-btn span{display:none}.top-actions .icon-btn{width:40px;padding:0}.userchip{display:none}.content{padding:17px 11px 32px}.head{margin-bottom:14px}.head h2{font-size:21px}.kpis{grid-template-columns:1fr 1fr;gap:9px}.kpi{min-height:128px;padding:14px}.kpi strong{font-size:25px}.kpi-icon{width:32px;height:32px}.cards-3{grid-template-columns:1fr}.stat-strip{grid-template-columns:1fr}.panel,.pos-main,.pos-side{padding:14px}.toolbar{gap:8px}.toolbar .grow,.toolbar input,.toolbar select{width:100%;min-width:0}.pos-top,.add-line,.form{grid-template-columns:1fr}.pos-top .field:first-child,.field.full{grid-column:auto}.cart-line{grid-template-columns:minmax(140px,1fr) 52px 78px 32px}.cart-line .price{display:none}.table-card{border-radius:13px}.dialog{padding:18px;border-radius:18px;max-height:92vh}.modal{padding:10px}.dialog-foot{position:sticky;bottom:-18px;background:#fff;margin-inline:-18px;padding:14px 18px 0}}
@media(max-width:440px){.kpis{grid-template-columns:1fr}.head-actions{display:grid;grid-template-columns:1fr 1fr}.head-actions .btn{width:100%}.topbar{gap:7px}.search input{font-size:11px}.cart-line{grid-template-columns:1fr 46px 68px 30px}.sum.total b{font-size:18px}.btn{font-size:11px}}






html,body{font-family:'Cairo','Segoe UI',Tahoma,Arial,sans-serif!important}
h1,h2,h3,.head h2,.dialog h3{font-family:'Alexandria','Cairo','Segoe UI',sans-serif!important;letter-spacing:-.015em!important}
button,input,select,textarea{font-family:'Cairo','Segoe UI',Tahoma,Arial,sans-serif!important}
/* physical RTL shell: navigation ALWAYS on the right */
.sidebar{grid-row:1!important;right:0!important;left:auto!important;color:#526b7e!important}
.main{grid-row:1!important;min-width:0!important}
.side-brand .logo-img{min-height:43px!important}.nav button{text-align:right!important}.nav button:before{display:none!important}.nav button .icon{width:18px!important;height:18px!important;color:#7890a3!important}.nav button.active .icon{color:var(--brand)!important}.page-context{font-family:'Cairo',sans-serif!important;direction:rtl!important;color:#708698!important;font-size:10.5px!important}.avatar{width:28px!important;height:28px!important;border-radius:8px!important;background:#eaf3fb!important;color:var(--brand)!important}.card{border-color:#e5ebf0!important}.kpi{transform:none!important}.kpi strong{font-size:26px!important}.kpi-top>span:first-child{font-size:10px!important}.kpi-icon{width:31px!important;height:31px!important;border-radius:9px!important}.panel,.pos-main,.pos-side{padding:15px!important}.panel h3,.pos-main h3,.pos-side h3{font-size:12.5px!important;margin-bottom:11px!important}table{min-width:760px!important}.dialog{padding:20px!important}.form{gap:10px!important}.pos-top{gap:8px!important;margin-bottom:10px!important;grid-template-columns:minmax(220px,1fr) 150px 155px!important}.add-line{padding:10px!important;border-radius:10px!important;gap:8px!important;margin-bottom:10px!important}
/* login */
.login{padding:24px!important;background:linear-gradient(135deg,#f7fafc,#edf4f9)!important;overflow:hidden!important}
@media(max-width:1180px) and (min-width:821px){:root{--sidebar:78px}.sidebar{padding:12px 8px!important}.side-brand{height:54px!important;padding:0 0 10px!important}.side-brand .logo-img{width:54px!important;min-height:36px!important;background-size:138px auto!important;background-position:left center!important}.nav-title,.nav button span,.side-foot{display:none!important}.nav button{height:42px!important;padding:0!important;justify-content:center!important}.kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}.two,.pos-grid{grid-template-columns:1fr!important}.page-context{display:none!important}}
@media(max-width:820px){.app{direction:rtl!important}.sidebar{background:rgba(255,255,255,.98)!important}.nav button span{display:block!important;font-size:8.5px!important;white-space:nowrap!important}.main{direction:rtl!important;padding:0 0 68px!important}.page-context,.userchip{display:none!important}.search{width:auto!important;flex:1!important}.cards-3{grid-template-columns:repeat(2,minmax(0,1fr))!important}.pos-top{grid-template-columns:1fr 1fr!important}.pos-top .field:first-child{grid-column:1/-1!important}.add-line{grid-template-columns:1fr 90px auto!important}}
@media(max-width:620px){.login{padding:0!important;overflow:auto!important}.kpis{grid-template-columns:1fr 1fr!important}.cards-3,.stat-strip{grid-template-columns:1fr!important}.toolbar{display:grid!important;grid-template-columns:1fr!important}.toolbar input,.toolbar select,.toolbar .grow{width:100%!important;min-width:0!important}.pos-top,.add-line,.form{grid-template-columns:1fr!important}.pos-top .field:first-child,.field.full{grid-column:auto!important}.table-card{overflow:visible!important;border:0!important;background:transparent!important;box-shadow:none!important}.table-card table{min-width:0!important;display:block!important}.table-card thead{display:none!important}.table-card tbody{display:grid!important;gap:8px!important}.table-card tbody tr{display:block!important;background:#fff!important;border:1px solid var(--line)!important;border-radius:11px!important;overflow:hidden!important}.table-card tbody td{min-height:38px!important;padding:8px 10px!important;border-bottom:1px solid #edf1f4!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:14px!important;white-space:normal!important;text-align:left!important;font-size:10px!important}.table-card tbody td:before{content:attr(data-label);color:#7b8d9d;font-size:8.5px;font-weight:700;text-align:right;flex:0 0 38%}}
@media(max-width:420px){.kpis{grid-template-columns:1fr!important}.content{padding-inline:10px!important}}


.login:not(.hidden)~.app{visibility:hidden;pointer-events:none}#registerForm input{direction:rtl;text-align:right;margin-bottom:11px}#registerForm input.ltr{direction:ltr;text-align:left}#registerBtn{width:100%}.nav button{position:relative}.notification-unread td{background:#f5faff}.read-at{display:block;margin-top:4px;color:#7b8d9d;font-size:8.5px}.pending-actions{display:flex;gap:6px;align-items:center;min-width:220px}.pending-actions select{height:32px;min-width:125px;font-size:9px}.pending-actions .btn{min-height:32px;padding:5px 8px}#forcePasswordModal .dialog{max-height:calc(100dvh - 24px);overflow:auto}@media(max-height:700px) and (min-width:701px){.login{padding:10px!important}#registerForm input{height:36px!important;margin-bottom:6px!important}}@media(max-width:700px){.login{padding:0!important}.pending-actions{min-width:0;flex-wrap:wrap}}




/* HERMED PREMIUM UI v1.2 — inspired by the MedWaste Supervision visual system */
:root{
  --p-blue-950:#05294d;--p-blue-900:#063a70;--p-blue-800:#07549b;--p-blue-700:#0967bd;--p-blue-600:#0d78d6;
  --p-sky:#4bb1ff;--p-canvas:#f4f7fb;--p-card:#ffffff;--p-ink:#0e2f4e;--p-text:#516b81;--p-muted:#8799aa;
  --p-line:#dfe7ee;--p-line-soft:#edf2f6;--p-success:#1d8b64;--p-warning:#b87a13;--p-danger:#c34149;
  --p-shadow:0 18px 48px rgba(15,50,80,.08);--p-shadow-sm:0 8px 24px rgba(15,50,80,.055);
}
html,body{background:var(--p-canvas)!important;color:var(--p-ink)!important}
body{font-family:'Cairo','Segoe UI',Tahoma,Arial,sans-serif!important}
h1,h2,h3,.head h2,.dialog h3{font-family:'Alexandria','Cairo','Segoe UI',sans-serif!important}

/* AUTH — fixed physical split layout */

/* PREMIUM HERO */
.hero-copy{position:relative;z-index:2}
.hero-copy{max-width:660px;margin:18px 0 8px}.hero-copy h2{margin:0 0 17px!important;font-size:clamp(37px,3.1vw,54px)!important;line-height:1.42!important;font-weight:730!important;letter-spacing:-.045em!important;color:#fff!important;text-wrap:balance}.hero-copy h2::first-line{color:#fff}.hero-copy p{max-width:620px!important;margin:0!important;color:rgba(229,242,253,.78)!important;font-size:13px!important;line-height:2!important;font-weight:500!important}

/* APP SHELL */
.app{direction:ltr!important;grid-template-columns:minmax(0,1fr) 256px!important;background:var(--p-canvas)!important}.sidebar{grid-column:2!important;direction:rtl!important;background:rgba(255,255,255,.98)!important;border-left:1px solid var(--p-line)!important;box-shadow:-8px 0 34px rgba(14,47,78,.025)!important;padding:14px 12px!important}.main{grid-column:1!important;direction:rtl!important}.side-brand{height:72px!important;margin:0 2px 14px!important;padding:0 8px 14px!important;border:0!important;border-bottom:1px solid var(--p-line-soft)!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;display:flex!important;align-items:center!important;justify-content:center!important}.side-brand .logo-img{width:158px!important;height:48px!important;object-fit:contain!important;background-color:transparent!important;padding:0!important;border:0!important;box-shadow:none!important}.side-brand small{display:none!important}.nav-title{margin:17px 0 7px!important;padding:0 10px!important;color:#a0adba!important;font-size:8.5px!important;font-weight:800!important;letter-spacing:.08em!important}.nav{display:grid!important;gap:4px!important}.nav button{height:44px!important;min-height:44px!important;padding:0 11px!important;border:1px solid transparent!important;border-radius:10px!important;background:transparent!important;color:#5c7183!important;font-size:11.5px!important;font-weight:650!important;gap:10px!important;transition:.16s ease!important}.nav button i{width:29px!important;height:29px!important;border-radius:8px!important;display:grid!important;place-items:center!important;background:transparent!important;color:#7b91a3!important}.nav button i svg{width:17px!important;height:17px!important}.nav button:hover{background:#f7f9fb!important;color:#123f68!important}.nav button:hover i{background:#edf5fc!important;color:#0b66b8!important}.nav button.active{background:linear-gradient(135deg,#edf7ff,#f6fbff)!important;border-color:#d9eafa!important;color:#075ba8!important;box-shadow:inset 3px 0 0 #0b74ca!important}.nav button.active i{background:#e2f1fd!important;color:#0868bd!important}.side-foot{margin-top:auto!important;padding:13px 8px 4px!important;border-top:1px solid var(--p-line-soft)!important;color:#a2b0bc!important;font-size:8px!important;line-height:1.8!important}
.topbar{height:72px!important;padding:0 24px!important;background:rgba(255,255,255,.94)!important;border-bottom:1px solid rgba(223,231,238,.9)!important;backdrop-filter:blur(14px)!important;box-shadow:0 1px 0 rgba(14,47,78,.02)!important;display:flex!important;align-items:center!important;gap:18px!important}.search{flex:1!important;max-width:580px!important;margin-inline:auto!important}.search input{height:42px!important;border-radius:11px!important;border-color:#dfe7ed!important;background:#f8fafc!important;padding-inline:15px!important;font-size:11px!important;box-shadow:none!important}.search input:focus{background:#fff!important;border-color:#90bde3!important;box-shadow:0 0 0 4px rgba(13,120,214,.07)!important}.top-actions{display:flex!important;align-items:center!important;gap:9px!important}.userchip{height:44px!important;padding:0 12px!important;border:1px solid #e0e7ed!important;border-radius:12px!important;background:#fff!important;box-shadow:none!important}.userchip:before{content:"H";width:27px;height:27px;border-radius:8px;display:grid;place-items:center;background:#eaf4fc;color:#0a65b4;font:800 10px 'Segoe UI',Arial;margin-left:8px}.userchip b{font-size:10px!important;color:#193d5b!important}.userchip small{font-size:8px!important;color:#8fa0ad!important}.top-actions>.btn{height:40px!important;border-radius:10px!important}
.content{max-width:1660px!important;padding:28px 28px 54px!important}.view{animation:none!important}.head{margin-bottom:18px!important;align-items:center!important}.head h2{font-size:22px!important;color:#123b60!important;font-weight:720!important}.head p{font-size:10.5px!important;color:#8295a5!important}.head-actions{gap:8px!important}.btn{min-height:39px!important;border-radius:10px!important;padding:8px 13px!important;font-size:10.5px!important;font-weight:750!important;box-shadow:none!important}.primary{background:linear-gradient(135deg,#075db0,#0b78ce)!important;border-color:transparent!important;box-shadow:0 8px 18px rgba(9,101,181,.13)!important}.primary:hover:not(:disabled){box-shadow:0 10px 22px rgba(9,101,181,.19)!important;transform:translateY(-1px)!important}.soft{background:#edf6fd!important;color:#0963b2!important;border-color:#dcecf8!important}.ghost{background:#fff!important;color:#526b7f!important;border-color:#dce5ec!important}

/* Dashboard hero */
.dashboard-hero{position:relative!important;overflow:hidden!important;min-height:225px!important;margin-bottom:18px!important;padding:28px 30px!important;border:1px solid rgba(255,255,255,.12)!important;border-radius:26px!important;background:radial-gradient(circle at 80% 10%,rgba(91,189,255,.20),transparent 25%),radial-gradient(circle at 10% 120%,rgba(33,143,230,.32),transparent 32%),linear-gradient(125deg,#062f59,#075295 58%,#096abc)!important;box-shadow:0 24px 62px rgba(7,52,96,.13)!important;color:#fff!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:30px!important}.dashboard-hero:after{content:"";position:absolute;width:310px;height:310px;left:-135px;bottom:-190px;border:1px solid rgba(255,255,255,.06);border-radius:50%;box-shadow:0 0 0 44px rgba(255,255,255,.02),0 0 0 88px rgba(255,255,255,.014)}.dashboard-copy,.dashboard-side{position:relative;z-index:1}.dashboard-copy{max-width:720px}.dashboard-eyebrow{display:inline-flex;align-items:center;gap:7px;padding:6px 10px;border:1px solid rgba(255,255,255,.14);border-radius:999px;background:rgba(255,255,255,.07);color:#dcecff;font-size:9px;font-weight:700}.dashboard-eyebrow i{width:6px;height:6px;border-radius:50%;background:#5bc0ff;box-shadow:0 0 0 4px rgba(91,192,255,.12)}.dashboard-hero h2{margin:13px 0 7px!important;color:#fff!important;font-size:clamp(28px,2.5vw,39px)!important;font-weight:700!important;letter-spacing:-.035em!important}.dashboard-hero p{margin:0!important;color:rgba(231,243,253,.72)!important;font-size:11.5px!important;line-height:1.9!important}.dashboard-side{display:flex;flex-direction:column;align-items:flex-end;gap:16px;min-width:290px}.live-chip{display:inline-flex;align-items:center;gap:8px;padding:9px 12px;border:1px solid rgba(255,255,255,.13);border-radius:12px;background:rgba(255,255,255,.07);color:#e5f4ff;font-size:9.5px;font-weight:700;backdrop-filter:blur(10px)}.live-chip i{width:7px;height:7px;border-radius:50%;background:#56d6a1;box-shadow:0 0 0 5px rgba(86,214,161,.12)}.dashboard-hero .head-actions .primary{background:#fff!important;color:#07559c!important;box-shadow:0 8px 20px rgba(0,25,53,.14)!important}.dashboard-hero .head-actions .soft{background:rgba(255,255,255,.09)!important;color:#fff!important;border-color:rgba(255,255,255,.16)!important}

/* KPI & cards */
.kpis{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:12px!important;margin-bottom:16px!important}.kpi{min-height:132px!important;padding:17px 18px!important;border:1px solid #e5ebf0!important;border-radius:18px!important;background:rgba(255,255,255,.98)!important;box-shadow:var(--p-shadow-sm)!important;transition:.18s ease!important}.kpi:hover{transform:translateY(-3px)!important;border-color:#d6e3ed!important;box-shadow:0 16px 34px rgba(15,50,80,.08)!important}.kpi-top{display:flex;align-items:center;justify-content:space-between;gap:8px}.kpi-top>span{color:#63798c!important;font-size:10px!important;font-weight:750!important}.kpi-icon{width:39px;height:39px;border-radius:12px;display:grid;place-items:center;flex:0 0 39px}.kpi-icon svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.sales-icon{background:#eef0ff;color:#5968c9}.kpi strong{display:block!important;margin-top:13px!important;color:#0c3356!important;font:800 28px/1 'Segoe UI',Arial!important;font-variant-numeric:tabular-nums!important}.kpi small{display:block;margin-top:7px;color:#a0adb8;font:600 8px 'Segoe UI',Arial;direction:ltr;text-align:right}
.card{border:1px solid #e5ebf0!important;border-radius:18px!important;background:#fff!important;box-shadow:0 5px 20px rgba(15,50,80,.035)!important}.two{grid-template-columns:minmax(0,1.45fr) minmax(310px,.55fr)!important;gap:12px!important}.panel{padding:18px!important}.alert-list{gap:8px!important}.alert{min-height:50px!important;padding:10px 12px!important;border:1px solid #e7edf2!important;border-radius:12px!important;background:#fbfcfe!important;color:#607688!important;font-size:10.5px!important}.alert b{min-width:30px!important;height:28px!important;display:grid!important;place-items:center!important;padding:0 8px!important;border-radius:9px!important;background:#edf5fb!important;color:#0b4f89!important;font:800 11px 'Segoe UI',Arial!important}
.cards-3,.stat-strip{gap:11px!important}.metric,.mini{padding:15px 16px!important;border-radius:16px!important}.metric span,.mini span{color:#758a9c!important;font-size:9.5px!important;font-weight:700!important}.metric b,.mini b{margin-top:6px!important;color:#113b5f!important;font:800 20px 'Segoe UI',Arial!important}

/* Tables / forms */
.toolbar{gap:8px!important;margin-bottom:11px!important}.toolbar input,.toolbar select{height:40px!important;border-radius:10px!important;background:#fff!important;border-color:#dfe7ed!important;font-size:10.5px!important}.table-card{overflow:auto!important;border-radius:17px!important}.table-card table{min-width:780px!important}th,td{padding:11px 13px!important;border-bottom:1px solid #eef2f5!important;font-size:10.5px!important}th{background:#f8fafc!important;color:#718699!important;font-size:9px!important;font-weight:800!important;letter-spacing:.01em!important}tbody tr:hover{background:#fbfdff!important}.pill,.user-role,.locked{min-height:23px!important;padding:4px 8px!important;border-radius:999px!important;font-size:8.5px!important}.permission-note{padding:12px 14px!important;border:1px solid #e0e8ef!important;border-radius:12px!important;background:#f8fafc!important;color:#63798b!important;font-size:10px!important}.dialog{border:1px solid #e2e9ef!important;border-radius:20px!important;box-shadow:0 26px 80px rgba(15,50,80,.16)!important}.dialog h3{color:#123b60!important;font-size:18px!important}.field label{color:#526b7e!important;font-size:10.5px!important;font-weight:750!important}.field input,.field select,.field textarea{border-color:#dbe4eb!important;background:#fbfdff!important;border-radius:10px!important}.field input:focus,.field select:focus,.field textarea:focus{background:#fff!important;border-color:#78afe0!important;box-shadow:0 0 0 4px rgba(13,120,214,.075)!important}.pos-grid{grid-template-columns:minmax(0,1.5fr) minmax(320px,.5fr)!important;gap:12px!important}.pos-main,.pos-side{padding:18px!important}.summary-box{border-color:#dfeaf2!important;border-radius:14px!important;background:linear-gradient(145deg,#f4f9fd,#fff)!important}

/* Responsive */
@media(max-width:1280px){.hero-copy h2{font-size:39px!important}.kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}.two,.pos-grid{grid-template-columns:1fr!important}}
@media(max-width:1050px) and (min-width:821px){.hero-copy h2{font-size:33px!important}.app{grid-template-columns:minmax(0,1fr) 82px!important}.sidebar{padding:12px 8px!important}.side-brand .logo-img{width:54px!important;object-fit:cover!important;object-position:left!important}.nav-title,.side-foot{display:none!important}.nav button{justify-content:center!important;padding:0!important}.nav button i{margin:0!important}.content{padding-inline:20px!important}}
@media(max-width:820px){.app{display:block!important;padding-bottom:76px!important}.sidebar{position:fixed!important;z-index:45!important;left:0!important;right:0!important;bottom:0!important;top:auto!important;width:100%!important;height:70px!important;padding:7px 8px!important;display:flex!important;align-items:center!important;gap:4px!important;overflow-x:auto!important;overflow-y:hidden!important;border:0!important;border-top:1px solid var(--p-line)!important;box-shadow:0 -8px 24px rgba(15,50,80,.06)!important}.side-brand,.nav-title,.side-foot{display:none!important}.sidebar .nav,.sidebar .nav+.nav{display:flex!important;gap:4px!important;margin:0!important;flex:0 0 auto!important}.nav button{min-width:70px!important;width:70px!important;height:54px!important;padding:4px 3px!important;display:grid!important;justify-items:center!important;align-content:center!important;gap:2px!important}.nav button i{width:22px!important;height:22px!important}.main{padding-bottom:70px!important}.topbar{height:62px!important;padding:0 11px!important}.search{max-width:none!important}.userchip{display:none!important}.content{padding:18px 12px 30px!important}.dashboard-hero{min-height:auto!important;padding:24px 20px!important;align-items:flex-start!important;flex-direction:column!important}.dashboard-side{align-items:flex-start!important;min-width:0!important;width:100%}.dashboard-side .head-actions{width:100%}.dashboard-side .head-actions .btn{flex:1}.kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}.two,.pos-grid{grid-template-columns:1fr!important}.cards-3,.stat-strip{grid-template-columns:repeat(2,minmax(0,1fr))!important}.head{align-items:flex-start!important;flex-direction:column!important;gap:10px!important}.head-actions{width:100%!important}.head-actions .btn{flex:1!important}.toolbar{display:grid!important;grid-template-columns:1fr!important}.toolbar input,.toolbar select,.toolbar .grow{width:100%!important;min-width:0!important}}
@media(max-width:560px){.kpis{grid-template-columns:1fr!important}.cards-3,.stat-strip{grid-template-columns:1fr!important}.dashboard-hero h2{font-size:28px!important}.table-card{overflow:visible!important;border:0!important;background:transparent!important;box-shadow:none!important}.table-card table{min-width:0!important;display:block!important}.table-card thead{display:none!important}.table-card tbody{display:grid!important;gap:8px!important}.table-card tbody tr{display:block!important;background:#fff!important;border:1px solid var(--p-line)!important;border-radius:13px!important;overflow:hidden!important}.table-card tbody td{min-height:39px!important;height:auto!important;padding:8px 10px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:14px!important;white-space:normal!important;text-align:left!important}.table-card tbody td:before{content:attr(data-label);color:#8495a4;font-size:8.5px;font-weight:800;text-align:right;flex:0 0 37%}}



@media (min-width:821px) and (max-height:760px){.hero-copy{margin:8px 0 5px!important}.hero-copy h2{font-size:34px!important;line-height:1.35!important;margin-bottom:10px!important}.hero-copy p{font-size:10.5px!important;line-height:1.75!important}
}


#login.login.hermed-exact-auth.hidden{display:none!important;visibility:hidden!important;pointer-events:none!important}





/* Exact auth reference v1.2.2 */
#login.login.hermed-exact-auth{
  position:fixed!important; inset:0!important; z-index:999!important;
  display:block!important; padding:0!important; overflow:hidden!important;
  background:
    radial-gradient(circle at 3% 13%,rgba(6,87,169,.055),transparent 17%),
    radial-gradient(circle at 4% 13%,rgba(6,87,169,.08) 1px,transparent 1.5px),
    #f8fbfe!important;
  background-size:auto,12px 12px,auto!important;
}
#login.hidden{display:none!important}
.hermed-exact-stage{
  position:absolute; inset:0; display:grid; grid-template-columns:51% 49%;
  direction:ltr; overflow:hidden;
}
.hermed-exact-left{
  grid-column:1; position:relative; direction:rtl; display:flex;
  align-items:center; justify-content:center; padding:4.2vh 4.7vw 4.4vh 4.2vw;
  background:linear-gradient(135deg,#fbfdff 0%,#f7fafe 67%,#eef5fb 100%);
}
.hermed-exact-left:before{
  content:""; position:absolute; inset:0; pointer-events:none; opacity:.42;
  background-image:radial-gradient(#c9d8e6 .85px,transparent .9px);
  background-size:12px 12px; mask-image:linear-gradient(90deg,#000 0 20%,transparent 44%);
}
.hermed-exact-card{
  width:min(684px,100%); height:min(790px,calc(100dvh - 72px));
  min-height:560px; position:relative; z-index:2; display:flex; flex-direction:column;
  justify-content:center; padding:clamp(24px,3.1vh,38px) clamp(38px,3.8vw,68px);
  border:1px solid #e0e7ed; border-radius:28px; background:#fff;
  box-shadow:0 24px 70px rgba(24,53,83,.08);
}
.hermed-exact-logo{
  display:flex; justify-content:center; align-items:center; height:74px; margin-bottom:8px;
}
.hermed-exact-logo .logo-img{
  width:310px!important; height:74px!important; max-width:88%!important;
  min-height:0!important; object-fit:contain!important; margin:0!important;
  background-color:transparent!important; border:0!important; box-shadow:none!important;
}
.hermed-exact-title{text-align:center;margin:2px 0 18px}
.hermed-exact-title h1{
  margin:0 0 3px!important; font-family:'Alexandria','Cairo','Segoe UI',sans-serif!important;
  font-size:clamp(29px,2.25vw,43px)!important; line-height:1.25!important;
  font-weight:700!important; color:#092f57!important; letter-spacing:-.035em!important;
}
.hermed-exact-title p{
  margin:0!important; direction:ltr; font:600 clamp(10px,.82vw,14px)/1.5 'Segoe UI',Arial,sans-serif!important;
  color:#6f8397!important;
}
.hermed-exact-tabs{
  display:grid; grid-template-columns:1fr 1fr; direction:rtl; height:58px;
  margin:4px 0 24px; padding:0; overflow:hidden;
  border:1px solid #cfdbe6; border-radius:12px; background:#fbfcfe;
}
.hermed-exact-tab{
  border:0; border-radius:0; background:transparent; color:#6f8294;
  font:700 clamp(10px,.78vw,13px)/1 'Cairo','Segoe UI',sans-serif; cursor:pointer;
  display:flex; align-items:center; justify-content:center; gap:10px; position:relative;
}
.hermed-exact-tab svg{width:21px;height:21px;stroke:currentColor;fill:none;stroke-width:1.8}
.hermed-exact-tab.active{color:#0765c0;background:#fff;box-shadow:0 3px 12px rgba(14,64,108,.08)}
.hermed-exact-tab.active:after{
  content:""; position:absolute; right:0; left:0; bottom:0; height:3px; background:#0873d5;
}
.hermed-exact-panel{display:block}
.hermed-exact-panel.hidden{display:none!important}
.hermed-field{margin-bottom:17px}
.hermed-field label{
  display:block!important; margin:0 3px 7px!important; text-align:right;
  color:#4d6275!important; font-size:clamp(10px,.75vw,12.5px)!important; font-weight:750!important;
}
.hermed-input-wrap{position:relative}
.hermed-input-wrap input{
  width:100%!important; height:58px!important; margin:0!important; padding:0 52px 0 48px!important;
  border:1px solid #c9d8e4!important; border-radius:11px!important; background:#fcfdff!important;
  direction:ltr!important; text-align:left!important; color:#263f55!important;
  font:500 clamp(12px,.88vw,15px)/1 'Segoe UI',Arial,sans-serif!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8)!important;
}
.hermed-input-wrap input:focus{outline:none!important;border-color:#63a7df!important;box-shadow:0 0 0 4px rgba(8,113,203,.07)!important;background:#fff!important}
.hermed-input-icon{
  position:absolute; left:17px; top:50%; transform:translateY(-50%);
  width:23px; height:23px; color:#7f8e9c; display:grid; place-items:center; pointer-events:none;
}
.hermed-input-icon svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.65}
.hermed-pass-eye{
  position:absolute; right:15px; top:50%; transform:translateY(-50%);
  width:28px; height:28px; border:0; background:transparent; color:#7c8c9a; cursor:pointer; display:grid; place-items:center;
}
.hermed-pass-eye svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.65}
.hermed-exact-options{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  margin:3px 2px 23px; font-size:clamp(9px,.7vw,11.5px);
}
.hermed-remember{display:flex;align-items:center;gap:8px;color:#6b7e90;cursor:pointer}
.hermed-remember input{width:18px!important;height:18px!important;accent-color:#0870d1}
.hermed-forgot{border:0;background:transparent;color:#0870d1;text-decoration:underline;cursor:pointer;padding:0}
.hermed-exact-submit{
  width:100%!important; height:64px!important; border:0!important; border-radius:11px!important;
  background:linear-gradient(90deg,#0756b2,#0875d7)!important; color:#fff!important;
  box-shadow:0 11px 26px rgba(4,91,184,.20)!important; font-size:clamp(13px,1vw,18px)!important;
  font-weight:800!important; display:flex!important; align-items:center!important; justify-content:center!important; gap:16px!important;
}
.hermed-exact-submit:hover:not(:disabled){transform:none!important;box-shadow:0 13px 28px rgba(4,91,184,.24)!important}
.hermed-exact-submit svg{width:23px;height:23px;stroke:currentColor;fill:none;stroke-width:1.9}
.hermed-exact-security{
  margin-top:20px; padding-top:17px; border-top:1px solid #e3e8ed;
  display:flex; align-items:center; justify-content:center; gap:9px; color:#7f8d9b;
  font-size:clamp(8.5px,.65vw,10.5px); line-height:1.7; text-align:center;
}
.hermed-exact-security svg{width:18px;height:18px;stroke:#718495;fill:none;stroke-width:1.7;flex:0 0 auto}
.hermed-register-note{
  margin-top:13px; padding:10px 12px; border:1px solid #e6d9b9; border-radius:9px;
  background:#fffbf1; color:#8b6b2c; font-size:10px; text-align:center;
}

/* Right hero */
.hermed-exact-hero{
  grid-column:2; position:relative; direction:rtl; overflow:hidden; color:#fff;
  padding:28px clamp(38px,4.1vw,72px) 32px clamp(48px,5.2vw,88px);
  background:
    radial-gradient(circle at 23% 18%,rgba(42,143,239,.23),transparent 24%),
    linear-gradient(145deg,#052d61 0%,#06458b 39%,#075cab 72%,#0868bd 100%);
  clip-path:polygon(4.2% 0,100% 0,100% 100%,0 100%);
}
.hermed-exact-hero:before{
  content:"";position:absolute;inset:-150px -190px auto auto;width:760px;height:760px;border-radius:50%;
  border:80px solid rgba(83,170,255,.09);box-shadow:0 0 0 95px rgba(70,152,235,.07),0 0 0 190px rgba(70,152,235,.045);
}
.hermed-exact-hero:after{
  content:"";position:absolute;left:-75px;bottom:-110px;width:370px;height:370px;border-radius:50%;
  background:radial-gradient(circle,rgba(0,104,198,.22),transparent 68%);
}
.hermed-lang{
  position:absolute; top:28px; right:38px; z-index:3; height:58px; min-width:175px;
  border:1px solid rgba(255,255,255,.18); border-radius:999px; background:rgba(0,55,119,.18);
  color:#e6f3ff; display:flex; align-items:center; justify-content:center; gap:12px;
  font-size:14px; font-weight:700; backdrop-filter:blur(10px);
}
.hermed-lang svg{width:23px;height:23px;stroke:currentColor;fill:none;stroke-width:1.7}
.hermed-hero-inner{position:relative;z-index:2;height:100%;display:flex;flex-direction:column;justify-content:center;max-width:760px;margin-right:auto;margin-left:0;padding-top:36px}
.hermed-system-line{display:flex;align-items:center;justify-content:flex-start;gap:10px;color:#d4e7f9;font-size:15px;margin-bottom:23px}
.hermed-system-line .shield{width:28px;height:28px;display:grid;place-items:center;border-radius:8px;background:#137fe3;color:#fff;box-shadow:0 7px 16px rgba(0,82,170,.28)}
.hermed-system-line svg{width:17px;height:17px;stroke:#fff;fill:none;stroke-width:2}
.hermed-hero-copy h2{
  margin:0 0 22px!important; font-family:'Alexandria','Cairo',sans-serif!important;
  font-size:clamp(39px,3.6vw,61px)!important; line-height:1.34!important; font-weight:700!important;
  letter-spacing:-.045em!important; color:#fff!important; text-align:right;
}
.hermed-hero-copy h2 span{display:block;position:relative;padding-right:24px}
.hermed-hero-copy h2 span:before{content:"";position:absolute;right:0;top:54%;width:9px;height:9px;border-radius:50%;background:#1687f1}
.hermed-hero-copy p{
  margin:0!important; max-width:620px; color:#d2e4f4!important; font-size:clamp(11px,.83vw,14.5px)!important;
  line-height:2!important; text-align:right;
}
.hermed-preview{
  width:min(650px,95%); height:316px; margin:48px 0 0 auto; direction:ltr;
  border:1px solid rgba(185,218,246,.42); border-radius:17px; overflow:hidden;
  background:linear-gradient(180deg,rgba(17,94,166,.64),rgba(8,57,119,.74));
  box-shadow:0 22px 45px rgba(0,29,69,.22),inset 0 1px 0 rgba(255,255,255,.08);
}
.hermed-preview-head{height:50px;display:flex;align-items:center;justify-content:space-between;padding:0 16px;border-bottom:1px solid rgba(255,255,255,.13)}
.hermed-preview-brand{font:800 13px 'Segoe UI',Arial;color:#fff;letter-spacing:.03em}
.hermed-preview-dots{display:flex;gap:8px}.hermed-preview-dots i{width:10px;height:10px;border-radius:50%;background:rgba(51,151,240,.43)}
.hermed-preview-body{height:266px;display:grid;grid-template-columns:50px 1fr}
.hermed-preview-nav{padding:10px 7px;display:grid;align-content:start;gap:7px;border-right:1px solid rgba(255,255,255,.10);background:rgba(0,39,89,.24)}
.hermed-preview-nav span{height:31px;border-radius:6px;display:grid;place-items:center;color:#b7d9f5;font:700 15px Arial}.hermed-preview-nav span.active{background:rgba(69,159,237,.23);color:#fff}
.hermed-preview-main{padding:13px}
.hermed-preview-stats{direction:rtl;display:grid;grid-template-columns:repeat(4,1fr);gap:9px}
.hermed-preview-stat{height:70px;padding:9px 10px;border:1px solid rgba(255,255,255,.08);border-radius:9px;background:rgba(9,67,132,.48)}
.hermed-preview-stat small{display:block;color:#c4ddf2;font:600 8px 'Cairo',sans-serif}.hermed-preview-stat b{display:block;margin-top:8px;color:#fff;font:800 18px 'Segoe UI',Arial}
.hermed-preview-chartrow{display:grid;grid-template-columns:minmax(0,1fr) 150px;gap:10px;height:149px;margin-top:10px}
.hermed-preview-chart,.hermed-preview-donutcard{position:relative;padding:11px;border:1px solid rgba(255,255,255,.08);border-radius:9px;background:rgba(7,53,111,.46)}
.hermed-preview-chart>span,.hermed-preview-donutcard>span{display:block;direction:rtl;color:#d2e5f5;font:600 8px 'Cairo',sans-serif}
.hermed-preview-chart svg{position:absolute;left:12px;right:12px;bottom:10px;width:calc(100% - 24px);height:94px}
.hermed-preview-donut{width:75px;height:75px;margin:15px auto 0;border-radius:50%;background:conic-gradient(#50aef7 0 44%,#4a71d8 44% 67%,#f3bf58 67% 82%,#ef7d74 82% 100%);position:relative}
.hermed-preview-donut:after{content:"";position:absolute;inset:16px;border-radius:50%;background:#0a4b8c}
.hermed-preview-legend{display:flex;justify-content:center;gap:9px;margin-top:8px;color:#c4dcf0;font-size:6.5px;direction:rtl}.hermed-preview-legend i{width:6px;height:6px;border-radius:50%;display:inline-block;margin-left:3px}

/* Compact to fit actual browser viewport without vertical scrolling */
@media (min-width:821px) and (max-height:800px){
  .hermed-exact-left{padding:18px 4vw}
  .hermed-exact-card{height:calc(100dvh - 36px);min-height:0;padding:18px 48px;border-radius:24px}
  .hermed-exact-logo{height:48px;margin-bottom:2px}.hermed-exact-logo .logo-img{height:48px!important;width:230px!important}
  .hermed-exact-title{margin:0 0 8px}.hermed-exact-title h1{font-size:27px!important}.hermed-exact-title p{font-size:10px!important}
  .hermed-exact-tabs{height:45px;margin:0 0 11px}
  .hermed-field{margin-bottom:9px}.hermed-field label{margin-bottom:4px!important;font-size:10px!important}
  .hermed-input-wrap input{height:44px!important}
  .hermed-exact-options{margin:0 2px 10px}
  .hermed-exact-submit{height:49px!important}
  .hermed-exact-security{margin-top:10px;padding-top:9px;font-size:8px}
  .hermed-exact-hero{padding-top:15px;padding-bottom:18px}
  .hermed-lang{top:16px;height:42px;min-width:135px;font-size:10px}
  .hermed-hero-inner{padding-top:18px;justify-content:center}
  .hermed-system-line{font-size:11px;margin-bottom:11px}
  .hermed-hero-copy h2{font-size:36px!important;line-height:1.30!important;margin-bottom:10px!important}
  .hermed-hero-copy h2 span{padding-right:17px}.hermed-hero-copy h2 span:before{width:7px;height:7px}
  .hermed-hero-copy p{font-size:9.5px!important;line-height:1.8!important}
  .hermed-preview{height:210px;margin-top:18px;width:min(640px,95%)}.hermed-preview-head{height:36px}.hermed-preview-body{height:174px}
  .hermed-preview-stats{gap:6px}.hermed-preview-stat{height:48px;padding:6px 7px}.hermed-preview-stat small{font-size:6.5px}.hermed-preview-stat b{font-size:13px;margin-top:4px}
  .hermed-preview-chartrow{height:103px;margin-top:6px}.hermed-preview-chart svg{height:62px}.hermed-preview-donut{width:50px;height:50px;margin-top:7px}.hermed-preview-donut:after{inset:11px}
}
@media(max-width:820px){
  #login.login.hermed-exact-auth{overflow:auto!important}
  .hermed-exact-stage{display:block;position:relative;min-height:100dvh;overflow:visible}
  .hermed-exact-hero{display:none}
  .hermed-exact-left{min-height:100dvh;padding:18px}
  .hermed-exact-card{height:auto;min-height:0;width:min(520px,100%);padding:26px 22px;border-radius:22px}
  .hermed-exact-logo .logo-img{width:235px!important}
}




.invoice-pdf-btn{display:inline-flex!important;align-items:center!important;gap:6px!important;min-width:78px!important}.invoice-pdf-btn svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.invoice-pdf-ready{margin-top:10px;padding:10px 12px;border:1px solid #cfe6da;border-radius:10px;background:#eef9f4;color:#176f50;font-size:10px;display:flex;align-items:center;justify-content:space-between;gap:10px}.invoice-pdf-ready .btn{flex:0 0 auto}
/* HERMED v1.3.4 — Auth responsive system */
.hermed-auth-back{width:100%;height:46px;margin-top:10px;border:1px solid #c9d8e4;border-radius:11px;background:#fff;color:#075fae;display:flex;align-items:center;justify-content:center;gap:9px;font:800 12px/1 'Cairo','Segoe UI',sans-serif;cursor:pointer}.hermed-auth-back:hover{background:#f5faff;border-color:#8bbce5}.hermed-auth-back svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
@media (min-width:1101px){#login.login.hermed-exact-auth{overflow:hidden!important}#login .hermed-exact-stage{grid-template-columns:minmax(520px,49%) minmax(0,51%)!important}#login .hermed-exact-left{padding:clamp(18px,3vh,34px) clamp(28px,3.6vw,64px)!important}#login .hermed-exact-card{width:min(630px,100%)!important;height:auto!important;max-height:calc(100dvh - 36px)!important;min-height:0!important;padding:clamp(20px,2.6vh,32px) clamp(34px,3.5vw,58px)!important;justify-content:center!important;overflow:visible!important}#login .hermed-exact-logo{height:clamp(46px,6.1vh,64px)!important;margin-bottom:clamp(2px,.8vh,8px)!important}#login .hermed-exact-logo .logo-img{width:clamp(210px,16vw,280px)!important;height:100%!important}#login .hermed-exact-title{margin:0 0 clamp(8px,1.5vh,15px)!important}#login .hermed-exact-title h1{font-size:clamp(27px,2vw,37px)!important}#login .hermed-exact-title p{font-size:clamp(9px,.72vw,12px)!important}#login .hermed-exact-tabs{display:grid!important;height:clamp(42px,5.2vh,52px)!important;margin:0 0 clamp(10px,1.8vh,18px)!important}#login .hermed-field{margin-bottom:clamp(8px,1.45vh,14px)!important}#login .hermed-field label{margin-bottom:clamp(3px,.6vh,6px)!important;font-size:clamp(9px,.68vw,11px)!important}#login .hermed-input-wrap input{height:clamp(42px,5.3vh,52px)!important;font-size:clamp(11px,.8vw,14px)!important}#login .hermed-exact-options{margin:1px 2px clamp(10px,1.8vh,18px)!important}#login .hermed-exact-submit{height:clamp(46px,5.8vh,56px)!important;font-size:clamp(12px,.9vw,16px)!important}#login .hermed-auth-back{height:clamp(38px,4.8vh,46px);margin-top:clamp(6px,1vh,10px)}#login .hermed-register-note{margin-top:clamp(6px,1vh,10px)!important;padding:clamp(7px,1vh,9px) 10px!important;font-size:clamp(8px,.62vw,10px)!important}#login .hermed-exact-security{margin-top:clamp(10px,1.7vh,17px)!important;padding-top:clamp(8px,1.4vh,14px)!important}#login .hermed-exact-hero{padding:clamp(18px,2.8vh,28px) clamp(30px,4vw,68px) clamp(22px,3.2vh,32px) clamp(40px,4.8vw,82px)!important}#login .hermed-lang{top:clamp(16px,2.6vh,28px)!important;right:clamp(24px,2.4vw,38px)!important;height:clamp(42px,5.4vh,54px)!important;min-width:clamp(130px,10vw,165px)!important;font-size:clamp(10px,.72vw,13px)!important}#login .hermed-hero-inner{max-width:720px!important;padding-top:clamp(18px,3vh,34px)!important}#login .hermed-system-line{font-size:clamp(11px,.85vw,14px)!important;margin-bottom:clamp(10px,2vh,20px)!important}#login .hermed-hero-copy h2{font-size:clamp(36px,3vw,54px)!important;line-height:1.31!important;margin-bottom:clamp(10px,2vh,20px)!important}#login .hermed-hero-copy p{font-size:clamp(9.5px,.75vw,13px)!important;line-height:1.85!important}#login .hermed-preview{width:min(620px,96%)!important;height:clamp(205px,28vh,285px)!important;margin-top:clamp(16px,4vh,38px)!important}#login .hermed-preview-head{height:clamp(36px,4.5vh,46px)!important}#login .hermed-preview-body{height:calc(100% - clamp(36px,4.5vh,46px))!important}#login .hermed-preview-stat{height:clamp(48px,7vh,64px)!important}#login .hermed-preview-chartrow{height:calc(100% - clamp(64px,9vh,82px))!important;min-height:90px!important}#login .hermed-preview-chart svg{height:min(75%,88px)!important}}
@media (min-width:1101px) and (max-height:820px){#login .hermed-exact-left{padding:12px clamp(28px,3.2vw,52px)!important}#login .hermed-exact-card{max-height:calc(100dvh - 20px)!important;padding:12px clamp(32px,3vw,48px)!important;border-radius:22px!important}#login .hermed-exact-logo{height:38px!important;margin-bottom:0!important}#login .hermed-exact-logo .logo-img{width:205px!important}#login .hermed-exact-title{margin:0 0 5px!important}#login .hermed-exact-title h1{font-size:25px!important}#login .hermed-exact-title p{font-size:8.5px!important}#login .hermed-exact-tabs{height:36px!important;margin:0 0 6px!important;border-radius:9px!important}#login .hermed-exact-tab{font-size:9px!important;gap:7px!important}#login .hermed-exact-tab svg{width:16px!important;height:16px!important}#login .hermed-field{margin-bottom:5px!important}#login .hermed-field label{font-size:8.5px!important;margin-bottom:2px!important}#login .hermed-input-wrap input{height:37px!important;padding-left:42px!important;padding-right:44px!important;font-size:11px!important;border-radius:9px!important}#login .hermed-input-icon{left:13px!important;width:18px!important;height:18px!important}#login .hermed-input-icon svg{width:17px!important;height:17px!important}#login .hermed-pass-eye{right:11px!important;width:23px!important;height:23px!important}#login .hermed-exact-options{margin:0 2px 6px!important;font-size:8.5px!important}#login .hermed-remember input{width:14px!important;height:14px!important}#login .hermed-exact-submit{height:40px!important;font-size:11px!important;border-radius:9px!important}#login .hermed-auth-back{height:33px!important;margin-top:5px!important;border-radius:9px!important;font-size:9px!important}#login .hermed-register-note{margin-top:5px!important;padding:5px 8px!important;font-size:7.5px!important;line-height:1.45!important}#login .hermed-exact-security{margin-top:6px!important;padding-top:5px!important;font-size:7px!important;line-height:1.4!important}#login .hermed-lang{top:12px!important;height:36px!important;min-width:120px!important;font-size:9px!important}#login .hermed-hero-inner{padding-top:12px!important}#login .hermed-system-line{font-size:9px!important;margin-bottom:7px!important}#login .hermed-hero-copy h2{font-size:32px!important;line-height:1.26!important;margin-bottom:7px!important}#login .hermed-hero-copy p{font-size:8.5px!important;line-height:1.55!important}#login .hermed-preview{height:180px!important;margin-top:10px!important;width:min(590px,94%)!important}#login .hermed-preview-head{height:31px!important}#login .hermed-preview-body{height:149px!important}#login .hermed-preview-main{padding:8px!important}#login .hermed-preview-stat{height:40px!important;padding:4px 6px!important}#login .hermed-preview-stat small{font-size:5.7px!important}#login .hermed-preview-stat b{font-size:11px!important;margin-top:2px!important}#login .hermed-preview-chartrow{height:88px!important;margin-top:5px!important}#login .hermed-preview-chart svg{height:52px!important}#login .hermed-preview-donut{width:43px!important;height:43px!important;margin-top:5px!important}#login .hermed-preview-donut:after{inset:10px!important}}
@media (max-width:1100px){#login.login.hermed-exact-auth{overflow:auto!important;background:#f6f9fc!important}#login .hermed-exact-stage{display:block!important;position:relative!important;min-height:100dvh!important;overflow:visible!important}#login .hermed-exact-hero{display:none!important}#login .hermed-exact-left{min-height:100dvh!important;padding:clamp(14px,3vw,28px)!important;align-items:center!important}#login .hermed-exact-card{width:min(650px,100%)!important;height:auto!important;min-height:0!important;max-height:none!important;padding:clamp(22px,4vw,34px) clamp(22px,5vw,46px)!important;border-radius:24px!important;overflow:visible!important}#login .hermed-exact-logo{height:clamp(50px,8vw,68px)!important;margin-bottom:4px!important}#login .hermed-exact-logo .logo-img{width:clamp(210px,38vw,270px)!important;height:100%!important}#login .hermed-exact-title{margin:0 0 12px!important}#login .hermed-exact-title h1{font-size:clamp(27px,4vw,35px)!important}#login .hermed-exact-title p{font-size:clamp(9px,1.6vw,12px)!important}#login .hermed-exact-tabs{display:grid!important;height:48px!important;margin:0 0 15px!important}#login .hermed-input-wrap input{height:50px!important}#login .hermed-field{margin-bottom:12px!important}#login .hermed-exact-submit{height:52px!important;font-size:14px!important}#login .hermed-auth-back{height:44px;font-size:11px}}
@media (max-width:600px){#login .hermed-exact-left{padding:10px!important;align-items:flex-start!important}#login .hermed-exact-card{width:100%!important;padding:20px 16px 18px!important;border-radius:18px!important;box-shadow:0 10px 30px rgba(24,53,83,.06)!important}#login .hermed-exact-logo{height:46px!important;margin-bottom:2px!important}#login .hermed-exact-logo .logo-img{width:205px!important}#login .hermed-exact-title{margin-bottom:9px!important}#login .hermed-exact-title h1{font-size:26px!important}#login .hermed-exact-title p{font-size:9px!important}#login .hermed-exact-tabs{height:44px!important;margin-bottom:12px!important;border-radius:10px!important}#login .hermed-exact-tab{font-size:10px!important;gap:7px!important}#login .hermed-exact-tab svg{width:18px!important;height:18px!important}#login .hermed-field{margin-bottom:10px!important}#login .hermed-field label{font-size:10px!important;margin-bottom:4px!important}#login .hermed-input-wrap input{height:48px!important;padding-left:44px!important;padding-right:44px!important;font-size:13px!important}#login .hermed-input-icon{left:13px!important}#login .hermed-pass-eye{right:10px!important}#login .hermed-exact-options{margin:1px 2px 12px!important;font-size:9px!important}#login .hermed-exact-submit{height:50px!important;font-size:13px!important}#login .hermed-auth-back{height:42px!important;margin-top:8px!important}#login .hermed-register-note{margin-top:8px!important;padding:8px 9px!important;font-size:8.5px!important;line-height:1.55!important}#login .hermed-exact-security{margin-top:11px!important;padding-top:10px!important;font-size:7.8px!important;line-height:1.5!important}}
@media (max-width:390px){#login .hermed-exact-left{padding:6px!important}#login .hermed-exact-card{padding:17px 13px 15px!important;border-radius:15px!important}#login .hermed-exact-logo .logo-img{width:185px!important}#login .hermed-exact-title h1{font-size:23px!important}#login .hermed-exact-tab{font-size:9px!important}#login .hermed-input-wrap input{height:46px!important}#login .hermed-exact-submit{height:48px!important}}
@media (max-width:1100px) and (max-height:620px){#login .hermed-exact-left{align-items:flex-start!important}#login .hermed-exact-card{margin:auto 0!important}}

/* HERMED v1.4.0 — Suppliers & Purchasing */
.purchase-line-entry{display:grid;grid-template-columns:minmax(220px,1fr) 110px 140px auto;gap:10px;align-items:end;margin-bottom:12px}.purchase-line-entry select,.purchase-line-entry input,.receipt-line input{width:100%;height:42px;border:1px solid var(--line);border-radius:9px;background:#fff;padding:0 11px;font:600 11px Cairo,sans-serif;color:var(--text)}.purchase-lines,.receipt-lines{display:grid;gap:8px}.purchase-line{display:grid;grid-template-columns:minmax(220px,1fr) 70px 130px 130px 36px;gap:10px;align-items:center;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#fbfdff}.purchase-line>div{min-width:0}.purchase-line small,.receipt-line small{display:block;margin-top:2px;color:var(--muted);font-size:9px}.purchase-total{display:flex;align-items:center;justify-content:flex-end;gap:14px;margin-top:12px;padding:12px 4px;border-top:1px solid var(--line)}.purchase-total span{color:var(--muted);font-weight:700}.purchase-total b{font-size:16px;color:var(--blue)}.receipt-line{display:grid;grid-template-columns:minmax(240px,1fr) 100px 150px 160px;gap:10px;align-items:center;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#fbfdff}.receipt-line>div{min-width:0}.receipt-line b{display:block}.receipt-line .r-qty{text-align:center}.receipt-line .r-batch,.receipt-line .r-expiry{direction:ltr}.purchase-line .icon-x{justify-self:end}
@media(max-width:900px){.purchase-line-entry{grid-template-columns:1fr 1fr}.purchase-line-entry select{grid-column:1/-1}.purchase-line{grid-template-columns:minmax(0,1fr) 65px 100px 34px}.purchase-line>span:nth-of-type(2){display:none}.receipt-line{grid-template-columns:1fr 1fr}.receipt-line>div{grid-column:1/-1}}
@media(max-width:560px){.purchase-line-entry{grid-template-columns:1fr}.purchase-line-entry select{grid-column:auto}.purchase-line{grid-template-columns:1fr 64px 34px}.purchase-line>span:nth-of-type(2),.purchase-line>b{display:none}.receipt-line{grid-template-columns:1fr}.receipt-line>div{grid-column:auto}}

/* Auth shell isolation: remove hidden app layout from auth viewport sizing */
#login.login.hermed-exact-auth:not(.hidden)~.app{display:none!important}


/* =============================================================
   HERMED v1.5.1 Operations Pro
   ============================================================= */
:root{--font:"Cairo","Alexandria","Segoe UI Variable","Segoe UI",Tahoma,Arial,sans-serif}
body,button,input,select,textarea{font-family:var(--font)}
.sidebar{background:linear-gradient(180deg,#021f3d 0%,#032c55 55%,#022847 100%);color:#eef7ff;border-left:1px solid rgba(255,255,255,.08);box-shadow:-10px 0 34px rgba(2,31,61,.08)}
.sidebar{overflow-y:auto!important;overflow-x:hidden!important;scrollbar-width:thin;scrollbar-color:rgba(126,166,200,.55) transparent;overscroll-behavior:contain}.sidebar::-webkit-scrollbar{width:7px}.sidebar::-webkit-scrollbar-track{background:transparent}.sidebar::-webkit-scrollbar-thumb{background:rgba(126,166,200,.42);border-radius:999px}.sidebar .side-brand,.sidebar .nav-title,.sidebar .nav,.sidebar .side-foot{flex:0 0 auto}.sidebar .side-foot{margin-top:12px}.nav-badge{position:absolute;top:4px;left:6px;margin:0;display:inline-grid!important;place-items:center;min-width:21px;height:21px;padding:0 6px;border-radius:999px;background:#ef5c64;color:#fff;font:800 9px/1 "Segoe UI",Arial,sans-serif;box-shadow:0 0 0 3px rgba(239,92,100,.13);z-index:2}.sidebar .nav button span.nav-badge{display:inline-grid!important}.nav-badge[hidden]{display:none!important}.sidebar .nav button.active .nav-badge{background:#fff;color:#b7333d;box-shadow:none}
.sidebar .side-brand{margin:12px 12px 8px;padding:16px 12px 13px;background:rgba(255,255,255,.96);border-radius:16px;box-shadow:0 12px 28px rgba(0,0,0,.16)}
.sidebar .side-brand small{color:#547087!important;font-family:"Cairo",sans-serif}.sidebar .nav-title{color:#7ea6c8;letter-spacing:.2px}.sidebar .nav button{color:#c9dced;border:1px solid transparent}.sidebar .nav button:hover{background:rgba(255,255,255,.075);color:#fff;border-color:rgba(255,255,255,.08)}.sidebar .nav button.active{background:linear-gradient(90deg,rgba(30,123,208,.34),rgba(30,123,208,.16));color:#fff;border-color:rgba(98,177,239,.28);box-shadow:inset 0 0 0 1px rgba(255,255,255,.025)}.sidebar .nav button.active .icon{color:#79c6ff}.sidebar .side-foot{color:#7d9db8;border-top:1px solid rgba(255,255,255,.08)}
.auth-feedback{margin:0 0 12px;padding:11px 13px;border-radius:12px;font-size:12px;line-height:1.6;border:1px solid}.auth-feedback.success{background:#eaf7f1;border-color:#bfe3d3;color:#116846}.auth-feedback.pending{background:#fff6e2;border-color:#efd9a8;color:#815512}.auth-feedback.error{background:#fdefef;border-color:#efc7c7;color:#982f2f}.auth-progress{display:flex;align-items:center;justify-content:center;gap:9px;margin:0 0 12px;padding:10px 12px;border-radius:12px;background:#eef6fd;color:#07549f;font-size:12px;font-weight:700}.loading-spinner{width:16px;height:16px;border:2px solid #b9daf6;border-top-color:#07549f;border-radius:50%;animation:hermedSpin .75s linear infinite}@keyframes hermedSpin{to{transform:rotate(360deg)}}
.sync-status{display:inline-flex;align-items:center;gap:7px;min-height:36px;padding:7px 10px;border-radius:10px;border:1px solid var(--border);background:#fff;cursor:pointer;font-size:11px;font-weight:750}.sync-status .icon{width:15px;height:15px}.sync-status.online{color:var(--success);background:var(--success-bg);border-color:#cae8db}.sync-status.offline{color:#9a5f0d;background:var(--warning-bg);border-color:#ecd8aa}.sync-status.syncing{color:var(--blue-700);background:var(--blue-100)}.sync-status b{display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:currentColor;color:#fff;font-size:9px}.sync-status.online b{background:var(--success)}
.offline-banner{display:flex;gap:12px;align-items:flex-start;margin:0 0 14px;padding:13px 15px;border-radius:14px;border:1px solid #ecd5a3;background:#fff7e6;color:#805411}.offline-banner .icon{flex:0 0 20px}.offline-banner b,.offline-banner span{display:block}.offline-banner span{margin-top:3px;font-size:11px;color:#946f2e}
.pos-section-head{display:flex;align-items:center;justify-content:space-between}.pos-section-head h3{margin-bottom:2px}.pos-section-head small{color:var(--muted)}.customer-mode-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin:12px 0}.customer-mode-tabs button{border:1px solid var(--border);background:#f8fbfd;color:#506a7e;border-radius:10px;min-height:38px;cursor:pointer;font-weight:750}.customer-mode-tabs button.active{background:var(--navy-900);color:#fff;border-color:var(--navy-900);box-shadow:0 8px 18px rgba(3,44,85,.13)}.customer-mode-panel{margin-bottom:12px}.compact-form{gap:10px}.mode-help{padding:9px 11px;border-radius:10px;background:#f3f8fc;color:#587084;font-size:10px;line-height:1.65}.mode-help.quick{background:#fff8e9;color:#87631e}.customer-search-wrap{position:relative}.customer-search-wrap>.search-icon{right:13px}.customer-search-wrap>input{padding-right:40px}.customer-search-results{position:absolute;z-index:45;top:calc(100% + 6px);right:0;left:0;max-height:280px;overflow:auto;padding:6px;border:1px solid var(--border);background:#fff;border-radius:12px;box-shadow:var(--shadow-md)}.customer-result{display:flex;justify-content:space-between;gap:10px;width:100%;padding:10px 11px;border:0;border-bottom:1px solid #eef3f6;background:#fff;text-align:right;cursor:pointer}.customer-result:last-child{border-bottom:0}.customer-result:hover{background:#f3f8fc}.customer-result b{display:block;color:var(--navy-900)}.customer-result small{display:block;margin-top:2px;color:#7c91a2}.customer-result code{direction:ltr;color:#648096;font-size:9px}.selected-customer{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border-radius:11px;background:#edf7f2;border:1px solid #cee7db}.selected-customer b{display:block;color:#116846}.selected-customer small{color:#5b7c6e}.v15-pos-top{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.invoice-browser-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin:24px 0 12px}.invoice-browser-head h2{margin:0;font-size:18px;color:var(--navy-900)}.invoice-browser-head p{margin:3px 0 0;color:var(--muted);font-size:11px}.quick-date-filters{display:flex;gap:6px;flex-wrap:wrap}.invoice-filters{padding:14px;margin-bottom:12px}.filter-grid{display:grid;grid-template-columns:repeat(6,minmax(120px,1fr));gap:10px;align-items:end}.filter-grid .span-2{grid-column:span 2}.filter-reset{justify-content:flex-end}.invoice-actions{display:flex;align-items:center;gap:5px}.invoice-actions .btn{min-height:30px}.invoice-pager{display:flex;justify-content:center;gap:6px;margin:12px 0 0}.invoice-pager button{min-width:34px;height:32px;border:1px solid var(--border);border-radius:8px;background:#fff;cursor:pointer}.invoice-pager button.active{background:var(--navy-900);color:#fff;border-color:var(--navy-900)}
.invoice-dialog{width:min(820px,96vw);max-height:94vh;display:flex;flex-direction:column;overflow:hidden}.invoice-modal-toolbar{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding-bottom:12px;margin-bottom:0;border-bottom:1px solid #e6edf3;background:#fff;position:sticky;top:0;z-index:2}.invoice-modal-toolbar h3{margin:0 0 3px}.invoice-modal-toolbar small{color:var(--muted)}.invoice-preview-stage{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;direction:ltr;display:flex;justify-content:center;align-items:flex-start;margin-top:14px;padding:18px;border-radius:16px;background:linear-gradient(180deg,#eef4f8 0%,#f7fafc 100%);border:1px solid #e2ebf2;scrollbar-gutter:stable}.invoice-a5-preview{width:148mm;max-width:calc(100% - 2px);min-width:0;flex:0 1 148mm;min-height:210mm;margin:0;padding:10mm;background:#fff;border:1px solid #dce6ee;border-radius:10px;box-shadow:0 14px 34px rgba(2,31,61,.09);direction:rtl}.invoice-sheet{color:#17324b}.invoice-brand{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding-bottom:8px;border-bottom:2px solid #0657a9}.invoice-brand-main{display:flex;flex-direction:column;gap:4px}.invoice-brand img{width:44mm;max-height:24mm;object-fit:contain}.invoice-brand-copy b{display:block;font-size:9px;color:#0a4779}.invoice-brand-copy small{display:block;font-size:7.5px;color:#728797}.invoice-brand .invoice-no{text-align:left}.invoice-brand .invoice-no b{display:block;font-size:15px;color:#022f57}.invoice-brand .invoice-no small{font-size:9px;color:#728797}.invoice-head-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:10px 0}.invoice-card{border:1px solid #e6edf3;border-radius:10px;padding:8px 10px;background:#fbfdff}.invoice-card h4{margin:0 0 5px;font-size:9px;color:#0b4f89}.invoice-meta{display:grid;grid-template-columns:1fr;gap:0;margin:0;font-size:9.2px}.invoice-meta div{display:grid;grid-template-columns:90px 1fr;align-items:start;gap:8px;padding:4px 0;border-bottom:1px solid #edf2f5}.invoice-meta div:last-child{border-bottom:0}.invoice-meta span{color:#6a7f90}.invoice-meta b{font-weight:700;text-align:left;min-width:0;overflow-wrap:anywhere;word-break:break-word}.invoice-items{width:100%!important;max-width:100%!important;min-width:0!important;border-collapse:collapse;font-size:8.4px;table-layout:fixed}.invoice-items th{background:#0657a9;color:#fff;padding:6px 5px;position:static;text-align:right}.invoice-items td{padding:6px 5px;border-bottom:1px solid #e9eff4;white-space:normal;vertical-align:top;overflow-wrap:anywhere;word-break:break-word}.invoice-items th:nth-child(1),.invoice-items td:nth-child(1){width:37%}.invoice-items th:nth-child(2),.invoice-items td:nth-child(2){width:23%}.invoice-items th:nth-child(3),.invoice-items td:nth-child(3){width:10%;text-align:center}.invoice-items th:nth-child(4),.invoice-items td:nth-child(4){width:15%;text-align:left}.invoice-items th:nth-child(5),.invoice-items td:nth-child(5){width:15%;text-align:left}.invoice-items tbody tr:nth-child(even){background:#f8fbfd}.invoice-summary{display:grid;grid-template-columns:1fr 58%;gap:10px;align-items:start;margin-top:10px}.invoice-total-box{width:100%;margin:0 0 0 auto}.invoice-total-row{display:flex;justify-content:space-between;padding:6px 8px;border-bottom:1px solid #e8eef3;font-size:9px}.invoice-total-row.net{margin-top:3px;background:#eaf4fc;border-radius:7px;color:#0657a9;font-size:12px;font-weight:800}.invoice-notes{margin-top:9px;padding:7px 9px;border-radius:7px;background:#f8fafc;font-size:8.5px;color:#536b7d}.invoice-footer{margin-top:13px;padding-top:7px;border-top:1px solid #e8eef3;text-align:center;font-size:7.5px;color:#8a9aaa}.invoice-mode-badge{display:inline-flex;padding:3px 6px;border-radius:999px;background:#eef4f8;color:#567084;font-size:8px}.invoice-print-toolbar{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px;border-bottom:1px solid #deebf4;background:#f7fbff;color:#21405b}.invoice-print-toolbar b{font-size:12px}.invoice-print-toolbar small{display:block;margin-top:2px;color:#698196}.invoice-print-actions{display:flex;gap:8px}.invoice-print-actions button{height:36px;padding:0 12px;border-radius:10px;border:1px solid #bfd8eb;background:#fff;color:#0f5f9e;font-weight:800;cursor:pointer}.invoice-print-actions .primary{background:#0b66b8;border-color:#0b66b8;color:#fff}.invoice-print-stage{min-height:100vh;padding:18px;background:#eef4f8}.invoice-print-sheet{width:148mm;min-height:210mm;margin:0 auto;padding:10mm;background:#fff;box-shadow:0 18px 42px rgba(2,31,61,.12)}@media print{body{background:#fff!important}.invoice-print-toolbar{display:none!important}.invoice-print-stage{padding:0!important;background:#fff!important;min-height:auto!important}.invoice-print-sheet{width:auto!important;min-height:auto!important;box-shadow:none!important;padding:0!important}.invoice-print-shell{margin:0!important}}
.health-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}.health-card{padding:15px}.health-card .health-label{display:flex;align-items:center;justify-content:space-between;color:#5a7083;font-weight:700}.health-card strong{display:block;margin-top:10px;font-size:20px;color:var(--navy-900)}.health-card small{display:block;margin-top:4px;color:var(--muted)}.health-dot{width:9px;height:9px;border-radius:50%;background:#a0adb8}.health-dot.ok{background:#1e9b68;box-shadow:0 0 0 4px #e5f5ed}.health-dot.warn{background:#d49427;box-shadow:0 0 0 4px #fff4df}.health-dot.bad{background:#c64b4b;box-shadow:0 0 0 4px #fbeaea}.system-overall{margin-bottom:14px}.system-status{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-radius:14px;border:1px solid}.system-status.healthy{background:#eaf7f1;border-color:#cce7da;color:#146a49}.system-status.degraded{background:#fff3e3;border-color:#ecd3a8;color:#855612}.health-issues{display:grid;gap:8px}.health-issue{padding:10px 12px;border-radius:10px;background:#f7fafc;border:1px solid var(--border)}.health-issue.error{background:#fdefef;border-color:#efc9c9;color:#8d3030}.health-issue.warn{background:#fff6e2;border-color:#eed9aa;color:#805512}.system-two{align-items:start}.quota-note{color:var(--muted);font-size:11px}.quota-table{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.quota-item{padding:10px 12px;border:1px solid var(--border);border-radius:10px;background:#f9fbfd}.quota-item b{display:block;color:var(--navy-900)}.quota-item small{color:var(--muted)}.offline-queue-list{display:grid;gap:7px}.offline-queue-item{padding:9px 10px;border:1px solid var(--border);border-radius:9px;background:#fafcfd}.offline-queue-item b,.offline-queue-item small{display:block}.offline-queue-item small{margin-top:2px;color:var(--muted)}
.sev{display:inline-flex;padding:4px 7px;border-radius:999px;font-size:9px;font-weight:800}.sev.INFO{background:#eaf3fb;color:#1764a8}.sev.WARN{background:#fff6e2;color:#9a6512}.sev.ERROR{background:#fdefef;color:#a43737}
@media(max-width:1100px){.filter-grid{grid-template-columns:repeat(3,minmax(150px,1fr))}.health-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.quota-table{grid-template-columns:repeat(2,minmax(0,1fr))}.invoice-a5-preview{width:148mm;max-width:calc(100% - 2px);min-width:0;flex-basis:148mm;min-height:210mm}.invoice-dialog{width:min(94vw,820px)}.invoice-head-grid,.invoice-summary{grid-template-columns:1fr}}
@media(max-width:700px){.customer-mode-tabs{grid-template-columns:1fr}.filter-grid{grid-template-columns:1fr}.filter-grid .span-2{grid-column:auto}.health-grid,.quota-table{grid-template-columns:1fr}.invoice-browser-head,.invoice-modal-toolbar{align-items:stretch;flex-direction:column}.invoice-modal-toolbar .head-actions{width:100%}.invoice-preview-stage{padding:10px}.invoice-a5-preview{padding:6mm}.invoice-head-grid,.invoice-summary{grid-template-columns:1fr}.invoice-meta div{grid-template-columns:78px 1fr}.invoice-print-toolbar{position:static;flex-direction:column;align-items:stretch}.invoice-print-actions{width:100%}.invoice-print-actions button{flex:1}.invoice-print-stage{padding:8px}.invoice-print-sheet{width:auto;min-height:auto;padding:7mm}.top-actions .sync-status span{display:none}}

/* =========================================================
   HERMED v1.5.3 INVOICE PRINT FIX FINAL OVERRIDE
   Final block for sidebar calm palette + invoice preview stage.
   Must remain at the end of app.css.
   ========================================================= */
:root{
  --hermed-side-top:#0a2237;
  --hermed-side-mid:#0d2b45;
  --hermed-side-bottom:#123554;
  --hermed-side-text:#e7f0f8;
  --hermed-side-muted:#92abc0;
  --hermed-side-icon:#9ec5df;
  --hermed-side-active:#65b4f4;
}
.sidebar{
  background:linear-gradient(180deg,var(--hermed-side-top) 0%,var(--hermed-side-mid) 52%,var(--hermed-side-bottom) 100%)!important;
  color:var(--hermed-side-text)!important;
  border-left:1px solid rgba(155,197,223,.14)!important;
  box-shadow:-8px 0 24px rgba(7,26,43,.10)!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  scrollbar-color:rgba(129,183,222,.40) rgba(255,255,255,.02)!important;
}
.sidebar::-webkit-scrollbar{width:7px!important}
.sidebar::-webkit-scrollbar-track{background:rgba(255,255,255,.02)!important}
.sidebar::-webkit-scrollbar-thumb{background:rgba(129,183,222,.38)!important;border-radius:999px!important}
.sidebar .side-brand{
  background:rgba(255,255,255,.975)!important;
  border:1px solid rgba(163,204,234,.18)!important;
  border-radius:14px!important;
  margin:4px 4px 14px!important;
  padding:8px 10px!important;
  height:66px!important;
  box-shadow:0 8px 18px rgba(0,18,36,.10)!important;
}
.sidebar .side-brand .logo-img{filter:none!important}
.sidebar .nav-title{
  color:var(--hermed-side-muted)!important;
  font-weight:800!important;
  letter-spacing:.035em!important;
}
.sidebar .nav button{
  color:var(--hermed-side-text)!important;
  background:transparent!important;
  border-color:transparent!important;
}
.sidebar .nav button .icon,
.sidebar .nav button i{
  color:var(--hermed-side-icon)!important;
  background:transparent!important;
}
.sidebar .nav button:hover{
  background:rgba(255,255,255,.055)!important;
  color:#fff!important;
  border-color:rgba(143,200,239,.10)!important;
}
.sidebar .nav button:hover .icon,
.sidebar .nav button:hover i{color:#d6ecff!important;background:rgba(101,180,244,.08)!important}
.sidebar .nav button.active{
  background:linear-gradient(90deg,rgba(101,180,244,.18),rgba(101,180,244,.08))!important;
  color:#fff!important;
  border-color:rgba(138,197,242,.16)!important;
  box-shadow:inset -3px 0 0 var(--hermed-side-active)!important;
}
.sidebar .nav button.active .icon,
.sidebar .nav button.active i{
  color:#d8efff!important;
  background:rgba(101,180,244,.10)!important;
}
.sidebar .nav-badge{
  background:#79c0f8!important;
  color:#0d3553!important;
  border:1px solid rgba(255,255,255,.40)!important;
  box-shadow:none!important;
}
.sidebar .side-foot{
  color:#89a7be!important;
  border-top:1px solid rgba(255,255,255,.06)!important;
}
@media(max-width:1050px) and (min-width:821px){
  .sidebar .side-brand{background:rgba(255,255,255,.97)!important;border-radius:12px!important;padding:5px!important;height:54px!important}
}
@media(max-width:820px){
  .sidebar{
    background:linear-gradient(90deg,#0a2237 0%,#0d2b45 52%,#123554 100%)!important;
    border-top:1px solid rgba(155,197,223,.16)!important;
    border-left:0!important;
    box-shadow:0 -8px 20px rgba(7,26,43,.16)!important;
  }
  .sidebar .nav button{color:#e7f0f8!important}
  .sidebar .nav button.active{box-shadow:inset 0 -3px 0 var(--hermed-side-active)!important}
}

/* =========================================================
   HERMED v1.5.5 CLASSIC INVOICE REFINE FINAL OVERRIDE
   Keep the v1.5.3 classic invoice concept; only polish spacing,
   typography, visual hierarchy and preview containment.
   ========================================================= */
.invoice-dialog{width:min(900px,96vw)!important;max-height:94vh!important;border-radius:20px!important;overflow:hidden!important}
.invoice-modal-toolbar{padding-bottom:12px!important;border-bottom:1px solid #e3ebf1!important;background:#fff!important}
.invoice-modal-toolbar h3{font-size:20px!important;color:#173d5d!important}
.invoice-modal-toolbar small{font-size:12px!important;color:#71879a!important}
.invoice-preview-stage{flex:1!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;direction:ltr!important;display:flex!important;justify-content:center!important;align-items:flex-start!important;margin-top:12px!important;padding:18px!important;border-radius:16px!important;background:linear-gradient(180deg,#edf4f9 0%,#f7fafc 100%)!important;border:1px solid #e0e9f0!important}
.invoice-a5-preview{width:148mm!important;max-width:100%!important;min-width:0!important;min-height:210mm!important;margin:0 auto!important;padding:9mm!important;background:#fff!important;border:1px solid #dce6ee!important;border-radius:10px!important;box-shadow:0 14px 36px rgba(2,31,61,.10)!important;direction:rtl!important;font-family:'Cairo',Tahoma,Arial,sans-serif!important;color:#17324b!important}
.invoice-classic{color:#17324b!important}
.invoice-classic .invoice-brand{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:14px!important;padding:0!important;border:0!important}
.invoice-classic .invoice-brand-main{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:flex-start!important;gap:3px!important;width:48mm!important;min-width:48mm!important;text-align:center!important}
.invoice-classic .invoice-brand-main img{width:40mm!important;max-height:22mm!important;object-fit:contain!important;display:block!important}
.invoice-classic .invoice-brand-copy{width:100%!important;text-align:center!important}.invoice-classic .invoice-brand-copy b{display:block!important;font-size:10px!important;color:#0a4f86!important;line-height:1.25!important}
.invoice-classic .invoice-brand-copy small{display:block!important;margin-top:2px!important;font-size:7.3px!important;color:#7890a2!important}
.invoice-classic .invoice-no{text-align:left!important;min-width:42mm!important}
.invoice-classic .invoice-no span{display:block!important;font-size:7.2px!important;color:#8093a2!important}
.invoice-classic .invoice-no b{display:block!important;margin-top:2px!important;font-size:13.2px!important;color:#0b4f89!important}
.invoice-classic .invoice-no small{display:block!important;margin-top:2px!important;font-size:7.4px!important;color:#7890a2!important}
.invoice-accent-line{height:3px!important;margin:9px 0 10px!important;border-radius:999px!important;background:linear-gradient(90deg,#0d6db4 0%,#62b9ef 32%,#dcecf7 32%,#dcecf7 100%)!important}
.invoice-classic .invoice-head-grid{display:grid!important;grid-template-columns:1fr 1fr!important;gap:9px!important;margin:0 0 10px!important}
.invoice-classic .invoice-card{border:1px solid #e2eaf0!important;border-radius:10px!important;padding:8px 9px!important;background:#fbfdff!important}
.invoice-classic .invoice-card h4{margin:0 0 5px!important;font-size:8.6px!important;color:#0b5b96!important}
.invoice-classic .invoice-meta{display:grid!important;grid-template-columns:1fr!important;font-size:8.1px!important;margin:0!important}
.invoice-classic .invoice-meta div{display:grid!important;grid-template-columns:62px 1fr!important;gap:7px!important;padding:3.5px 0!important;border-bottom:1px solid #edf2f5!important}
.invoice-classic .invoice-meta div:last-child{border-bottom:0!important}
.invoice-classic .invoice-meta span{color:#728797!important}
.invoice-classic .invoice-meta b{text-align:left!important;overflow-wrap:anywhere!important;word-break:break-word!important}
.invoice-items-classic{width:100%!important;max-width:100%!important;min-width:0!important;border-collapse:collapse!important;table-layout:fixed!important;font-size:7.8px!important;border:1px solid #dce7ef!important;border-radius:8px!important;overflow:hidden!important}
.invoice-items-classic th{background:#0d67aa!important;color:#fff!important;padding:6px 5px!important;text-align:right!important;font-size:7.6px!important;position:static!important}
.invoice-items-classic td{padding:6px 5px!important;border-bottom:1px solid #e7eef3!important;background:#fff!important;vertical-align:top!important;overflow-wrap:anywhere!important;white-space:normal!important}
.invoice-items-classic tbody tr:nth-child(even) td{background:#f8fbfd!important}
.invoice-items-classic tbody tr:last-child td{border-bottom:0!important}
.invoice-items-classic th:nth-child(1),.invoice-items-classic td:nth-child(1){width:7%!important;text-align:center!important}
.invoice-items-classic th:nth-child(2),.invoice-items-classic td:nth-child(2){width:31%!important}
.invoice-items-classic th:nth-child(3),.invoice-items-classic td:nth-child(3){width:18%!important}
.invoice-items-classic th:nth-child(4),.invoice-items-classic td:nth-child(4){width:12%!important;text-align:center!important}
.invoice-items-classic th:nth-child(5),.invoice-items-classic td:nth-child(5){width:16%!important;text-align:left!important}
.invoice-items-classic th:nth-child(6),.invoice-items-classic td:nth-child(6){width:16%!important;text-align:left!important}
.invoice-index{font-weight:800!important;color:#0d67aa!important}
.invoice-summary.classic{display:grid!important;grid-template-columns:1fr 56%!important;gap:10px!important;align-items:start!important;margin-top:10px!important}
.invoice-total-box.classic{width:100%!important;margin:0!important;padding:5px!important;border:1px solid #e0e9f0!important;border-radius:10px!important;background:#fbfdff!important}
.invoice-total-box.classic .invoice-total-row{display:flex!important;justify-content:space-between!important;align-items:center!important;padding:6px 7px!important;border-bottom:1px solid #e8eef3!important;font-size:8.4px!important}
.invoice-total-box.classic .invoice-total-row.net{margin-top:4px!important;border:0!important;border-radius:8px!important;background:#eaf4fc!important;color:#075792!important;font-size:11px!important;font-weight:800!important}
.invoice-classic .invoice-notes{padding:8px 9px!important;border-radius:9px!important;background:#f8fafc!important;border:1px dashed #d6e2eb!important;font-size:7.8px!important;color:#586f80!important}
.invoice-classic .invoice-notes b{display:block!important;margin-bottom:3px!important;color:#0b5b96!important}
.invoice-classic .invoice-notes span{display:block!important;line-height:1.65!important}
.invoice-classic .invoice-footer{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;margin-top:12px!important;padding-top:7px!important;border-top:1px solid #e6edf2!important;text-align:initial!important;font-size:7px!important;color:#8798a8!important}
.invoice-classic .invoice-footer b{color:#557188!important}
@media(max-width:700px){.invoice-preview-stage{padding:10px!important}.invoice-a5-preview{padding:7mm!important;min-height:0!important}.invoice-classic .invoice-head-grid,.invoice-summary.classic{grid-template-columns:1fr!important}.invoice-classic .invoice-brand-main img{width:35mm!important}}

/* HERMED v1.5.6 INVOICE PREVIEW PRINT PARITY — preview design remains authoritative */

/* HERMED v1.5.7 TRUE PRINT PARITY - print document keeps desktop A5 two-column geometry */


/* HERMED v1.6.0 ARCHITECTURE HEALTH */
.system-status.watch{background:#fff8e7;border-color:#ecd9a6;color:#7b5a13}
.health-issue.info{background:#eef6fd;border-color:#d5e7f6;color:#315f83}
.issue-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:4px}.issue-head span{font-size:9px;font-weight:800;letter-spacing:.04em;opacity:.7}
.panel-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.panel-title-row h3{margin-bottom:3px}.panel-title-row p{margin:0;color:var(--muted);font-size:11px}.baseline-chip{display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;background:#eaf4fc;color:#0b5d99;border:1px solid #cfe4f5;font-size:9px;font-weight:800;white-space:nowrap}
.architecture-panel{margin-top:14px}.architecture-health{margin-top:12px}.architecture-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.architecture-item{padding:11px 12px;border:1px solid var(--border);border-radius:12px;background:linear-gradient(180deg,#fff 0%,#f8fbfd 100%)}.architecture-item span,.architecture-item b,.architecture-item small{display:block}.architecture-item span{font-size:10px;color:var(--muted)}.architecture-item b{margin-top:5px;color:var(--navy-900);font-size:13px;overflow-wrap:anywhere}.architecture-item small{margin-top:3px;color:#75899a;font-size:9px;line-height:1.55}.growth-title{margin-top:12px;font-weight:800;color:var(--navy-900);font-size:11px}.growth-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:7px}.growth-chip{display:inline-flex;align-items:center;gap:7px;padding:6px 8px;border-radius:999px;border:1px solid #dce8f0;background:#f8fbfd;color:#587086;font-size:9px}.growth-chip b{color:#1d4667}.growth-chip i{font-style:normal;font-weight:800;color:#0c64aa}
@media(max-width:1100px){.architecture-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.architecture-grid{grid-template-columns:1fr}.panel-title-row{flex-direction:column}.baseline-chip{align-self:flex-start}}


/* HERMED v1.6.0 VERCEL + DATA INTEGRITY HEALTH */
.usage-table{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:8px}
.usage-row{padding:10px 11px;border:1px solid #dce8f0;border-radius:11px;background:#fbfdff;min-width:0}
.usage-row span,.usage-row b,.usage-row small{display:block}
.usage-row span{font-size:10px;color:var(--muted)}
.usage-row b{margin-top:4px;color:#244b6c;font-size:11px;overflow-wrap:anywhere}
.usage-row small{margin-top:3px;color:#7b8d9d;font-size:9px}
.inline-dot{display:inline-block!important;margin-inline-end:6px;vertical-align:middle}
.architecture-item b.ltr{direction:ltr;text-align:left;font-size:10px}
@media(max-width:1100px){.usage-table{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.usage-table{grid-template-columns:1fr}}


/* HERMED v1.6.0 AUDIT CURSOR PAGINATION */
.audit-pagination-shell{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-top:1px solid var(--border);background:#fbfcfd}
.audit-pagination-meta{display:flex;align-items:center;gap:10px;flex-wrap:wrap;min-width:0}
.audit-pagination-meta b{color:var(--navy-900);font-size:12px}
.audit-pagination-meta span{color:var(--muted);font-size:10.5px;direction:ltr;text-align:left}
.audit-pagination-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.audit-page-size{display:flex;align-items:center;gap:6px;font-size:10.5px;color:var(--muted)}
.audit-page-size select{height:32px;min-width:66px;border:1px solid var(--border);border-radius:8px;background:#fff;padding:0 8px}
.audit-scan-notice{margin:0 14px 12px;padding:9px 11px;border:1px solid #edd6a3;border-radius:9px;background:#fff6e2;color:#815512;font-size:10.5px}
.audit-pagination-actions .btn:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:820px){.audit-pagination-shell{align-items:stretch;flex-direction:column}.audit-pagination-actions{justify-content:space-between}.audit-page-size{margin-inline-end:auto}}


/* =====================================================================
   HERMED v1.6.1 CORE BOOTSTRAP + LAZY MODULES
   Lazy-module loading uses existing table/empty/loading primitives.
   No invoice visual geometry is modified by this release.
   ===================================================================== */


/* =====================================================================
   HERMED v1.6.3 STALE CLIENT / VERSION DRIFT PROTECTION
   ===================================================================== */
.client-version-banner{
  position:fixed;z-index:10050;top:12px;left:50%;transform:translateX(-50%);
  width:min(760px,calc(100vw - 24px));display:flex;align-items:center;justify-content:space-between;gap:14px;
  padding:12px 14px;border:1px solid #e0b74f;border-radius:14px;background:#fff8df;
  box-shadow:0 14px 40px rgba(36,68,92,.18);color:#684b0c
}
.client-version-banner.hidden{display:none!important}
.client-version-banner-copy{min-width:0}
.client-version-banner-copy b,.client-version-banner-copy span,.client-version-banner-copy small{display:block}
.client-version-banner-copy b{font-size:13px;color:#66470a}
.client-version-banner-copy span{margin-top:3px;font-size:10.5px;line-height:1.55;color:#7a5a19}
.client-version-banner-copy small{margin-top:4px;font-size:9px;color:#977429;direction:ltr;text-align:left}
html[data-hermed-stale-client="true"] [data-hermed-action],
html[data-hermed-stale-client="true"] [data-v15-action]{
  transition:opacity .15s ease
}
@media(max-width:700px){
  .client-version-banner{align-items:stretch;flex-direction:column;top:8px}
  .client-version-banner .btn{width:100%}
}

/* HERMED v1.6.4 BACKEND TRANSITION COMPATIBILITY — NO VISUAL CHANGE */

/* HERMED v1.6.9 BACKEND 0.10.7 FAST AUTH CONTRACT — NO VISUAL CHANGE */


/* =====================================================================
   HERMED UAT MOBILE NAV + SCROLL HOTFIX — 2026-08-28
   Scope: mobile shell only. No desktop, invoice, auth, API or business logic change.
   Root cause fixed: late sidebar override changed mobile overflow-x back to hidden.
   ===================================================================== */
@media(max-width:820px){
  html,body{
    min-height:100%;
    min-height:100dvh;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior-y:auto;
  }
  .app{
    min-height:100dvh!important;
    padding-bottom:0!important;
    overflow:visible!important;
  }
  .main{
    min-height:100dvh!important;
    padding-bottom:0!important;
    overflow:visible!important;
  }
  .content{
    padding-bottom:calc(98px + env(safe-area-inset-bottom,0px))!important;
    overflow:visible!important;
  }
  .sidebar{
    height:calc(76px + env(safe-area-inset-bottom,0px))!important;
    padding:6px 8px calc(6px + env(safe-area-inset-bottom,0px))!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    overscroll-behavior-x:contain!important;
    -webkit-overflow-scrolling:touch!important;
    scroll-snap-type:x proximity!important;
    scrollbar-width:auto!important;
    scrollbar-color:rgba(121,192,248,.75) rgba(255,255,255,.08)!important;
    touch-action:pan-x!important;
  }
  .sidebar::-webkit-scrollbar{
    width:auto!important;
    height:4px!important;
  }
  .sidebar::-webkit-scrollbar-track{
    background:rgba(255,255,255,.07)!important;
    border-radius:999px!important;
  }
  .sidebar::-webkit-scrollbar-thumb{
    background:rgba(121,192,248,.78)!important;
    border-radius:999px!important;
  }
  .sidebar .nav,
  .sidebar .nav+.nav{
    flex:0 0 auto!important;
  }
  .sidebar .nav button{
    scroll-snap-align:center!important;
    flex:0 0 70px!important;
  }
  .sidebar .nav button:focus-visible{
    outline:2px solid rgba(121,192,248,.85)!important;
    outline-offset:-2px!important;
  }
}


/* HERMED v1.6.9 FAST AUTH + SESSION PERSISTENCE — logic-only auth release; no invoice geometry changes */
/* =====================================================================
   HERMED FONT STABILITY R1 — LOCAL CAIRO + ALEXANDRIA ONLY
   Final typography authority. Font binaries are self-hosted WOFF2.
   Cairo = UI/body/forms/tables/nav/buttons/invoice/print
   Alexandria = headings only
   ===================================================================== */
:root{
  --font:"Cairo",Tahoma,Arial,sans-serif!important;
  --hermed-font-body:"Cairo";
  --hermed-font-heading:"Alexandria";
}
html,
body{
  font-family:"Cairo",Tahoma,Arial,sans-serif!important;
  font-synthesis:none;
}
body *{
  font-family:"Cairo",Tahoma,Arial,sans-serif!important;
  font-synthesis:none;
}
h1,h2,h3,h4,h5,h6,
.head h2,
.dialog h3,
.panel h3,
.pos-main h3,
.pos-side h3,
.hermed-exact-title h1,
.hermed-hero-copy h2,
.panel-title-row h3{
  font-family:"Alexandria","Cairo",Tahoma,Arial,sans-serif!important;
  font-synthesis:none;
}
/* Invoice/print remains Cairo exactly; no typography geometry change. */
.invoice-a5-preview,
.invoice-a5-preview *,
.invoice-classic,
.invoice-classic *{
  font-family:"Cairo",Tahoma,Arial,sans-serif!important;
  font-synthesis:none;
}

/* HERMED v1.6.50 DESKTOP MASTER TABLE FIT — keep all business columns visible */
@media (min-width: 901px){
  #products .master-table-card,
  #inventory .master-table-card{
    overflow-x:hidden!important;
    overflow-y:auto!important;
  }
  #products .master-table,
  #inventory .master-table{
    width:100%!important;
    min-width:0!important;
    table-layout:fixed!important;
  }
  #products .master-table th,
  #products .master-table td,
  #inventory .master-table th,
  #inventory .master-table td{
    min-width:0!important;
    padding:10px 8px!important;
    white-space:normal!important;
    vertical-align:middle!important;
    line-height:1.42!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
  }
  #products .master-table th,
  #inventory .master-table th{
    white-space:normal!important;
    text-align:center!important;
  }
  #products .master-table td.ltr,
  #inventory .master-table td.ltr{
    text-align:left!important;
  }
  #products .master-id-cell,
  #inventory .master-id-cell{
    font-size:9px!important;
    color:#38546c!important;
    word-break:break-all!important;
  }
  #products .master-name-cell b,
  #inventory .master-name-cell b{
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    line-height:1.45!important;
  }
  #products .master-name-cell small,
  #inventory .master-name-cell small{
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }
  #products .actions-cell{
    justify-content:center!important;
    flex-wrap:wrap!important;
  }
  #products .actions-cell .btn,
  #products .actions-cell .locked{
    max-width:100%!important;
    white-space:normal!important;
    text-align:center!important;
  }

  /* Products: ID | Name | Category | Retail | Wholesale | Stock | Status | Manage */
  #products .master-table th:nth-child(1),#products .master-table td:nth-child(1){width:18%!important}
  #products .master-table th:nth-child(2),#products .master-table td:nth-child(2){width:26%!important}
  #products .master-table th:nth-child(3),#products .master-table td:nth-child(3){width:10%!important}
  #products .master-table th:nth-child(4),#products .master-table td:nth-child(4){width:9%!important}
  #products .master-table th:nth-child(5),#products .master-table td:nth-child(5){width:9%!important}
  #products .master-table th:nth-child(6),#products .master-table td:nth-child(6){width:8%!important}
  #products .master-table th:nth-child(7),#products .master-table td:nth-child(7){width:8%!important}
  #products .master-table th:nth-child(8),#products .master-table td:nth-child(8){width:12%!important}

  /* Inventory: compact IDs/names but preserve all quantity + expiry columns */
  #inventory .master-table th:nth-child(1),#inventory .master-table td:nth-child(1){width:17%!important}
  #inventory .master-table th:nth-child(2),#inventory .master-table td:nth-child(2){width:22%!important}
  #inventory .master-table th:nth-child(3),#inventory .master-table td:nth-child(3){width:15%!important}
  #inventory .master-table th:nth-child(4),#inventory .master-table td:nth-child(4){width:10%!important}
  #inventory .master-table th:nth-child(5),#inventory .master-table td:nth-child(5){width:10%!important}
  #inventory .master-table th:nth-child(6),#inventory .master-table td:nth-child(6){width:9%!important}
  #inventory .master-table th:nth-child(7),#inventory .master-table td:nth-child(7){width:8%!important}
  #inventory .master-table th:nth-child(8),#inventory .master-table td:nth-child(8){width:9%!important}
}

@media (min-width: 901px) and (max-width: 1280px){
  #products .master-table th,#products .master-table td,
  #inventory .master-table th,#inventory .master-table td{padding:9px 6px!important;font-size:9.5px!important}
  #products .master-id-cell,#inventory .master-id-cell{font-size:8.5px!important}
}


/* =====================================================================
   HERMED v1.6.50 FULL UI FIT / CONTAINMENT AUDIT
   Scope: presentation containment, responsive tables/cards, actions,
   filters, pagers, modals and medium-width dashboard geometry only.
   No business writes, API contract or invoice print geometry changed.
   ===================================================================== */
html,body{max-width:100%!important;overflow-x:hidden!important}
.app,.main,.content,.view,.card,.panel,.table-card,.toolbar,.head,.head-actions,
.topbar,.topbar-start,.top-actions,.search,.filter-grid,.form,.field,.two,.pos-grid,
.pos-top,.add-line,.cards-3,.stat-strip,.health-grid,.system-two,.quota-table,
.usage-table,.architecture-grid,.architecture-panel,.invoice-browser-head,
.invoice-filters,.invoice-dialog,.invoice-modal-toolbar,.invoice-preview-stage{
  min-width:0!important;max-width:100%;box-sizing:border-box
}
.main,.content,.view{width:100%!important}
.head>div,.head-actions>*{min-width:0}
.toolbar>*{max-width:100%}
.toolbar input,.toolbar select,.toolbar .grow{min-width:0!important}
.message-cell,.customer-cell,.product-cell,.health-issue,.architecture-item,
.quota-item,.offline-queue-item,.system-status>*,.panel-title-row>*{min-width:0!important}
.system-status{gap:10px!important;flex-wrap:wrap!important}
.system-status span,.system-status b,.health-issue,.architecture-item b,.architecture-item small,
.quota-item,.offline-queue-item{overflow-wrap:anywhere!important;word-break:normal!important}
.dialog{max-width:calc(100vw - 24px)!important;min-width:0!important}
.dialog-foot,.invoice-modal-toolbar,.invoice-modal-toolbar .head-actions,
.invoice-print-actions,.quick-date-filters{flex-wrap:wrap!important}
.pager,.scale-pager,.invoice-pager{max-width:100%!important;overflow-x:auto!important;overflow-y:hidden!important;padding-bottom:3px}
.pager button,.scale-pager button,.invoice-pager button{flex:0 0 auto}

@media (min-width:821px){
  .view .table-card{width:100%!important;max-width:100%!important;overflow-x:hidden!important;overflow-y:auto!important}
  .view .table-card>table{width:100%!important;min-width:0!important;max-width:100%!important;table-layout:fixed!important}
  .view .table-card th,.view .table-card td{
    min-width:0!important;max-width:none!important;padding:9px 7px!important;
    white-space:normal!important;overflow-wrap:anywhere!important;word-break:normal!important;
    vertical-align:middle!important;line-height:1.42!important
  }
  .view .table-card th{text-align:center!important;font-size:9.5px!important}
  .view .table-card td{font-size:9.5px!important}
  .view .table-card td.ltr{text-align:left!important}
  .view .table-card .message-cell{max-width:none!important}
  .actions-cell,.invoice-actions,.pending-actions{min-width:0!important;max-width:100%!important;flex-wrap:wrap!important}
  .actions-cell .btn,.invoice-actions .btn,.pending-actions .btn,.pending-actions select{max-width:100%!important;min-width:0!important}
  #sales .invoice-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:4px!important;width:100%!important}
  #sales .invoice-actions .btn{width:100%!important;padding-inline:5px!important;white-space:nowrap!important}

  #dashboard .table-card th:nth-child(1),#dashboard .table-card td:nth-child(1){width:28%!important}
  #dashboard .table-card th:nth-child(2),#dashboard .table-card td:nth-child(2){width:20%!important}
  #dashboard .table-card th:nth-child(3),#dashboard .table-card td:nth-child(3){width:16%!important}
  #dashboard .table-card th:nth-child(4),#dashboard .table-card td:nth-child(4){width:20%!important}
  #dashboard .table-card th:nth-child(5),#dashboard .table-card td:nth-child(5){width:16%!important}

  #suppliers .table-card th:nth-child(1),#suppliers .table-card td:nth-child(1){width:14%!important}
  #suppliers .table-card th:nth-child(2),#suppliers .table-card td:nth-child(2){width:18%!important}
  #suppliers .table-card th:nth-child(3),#suppliers .table-card td:nth-child(3){width:14%!important}
  #suppliers .table-card th:nth-child(4),#suppliers .table-card td:nth-child(4){width:12%!important}
  #suppliers .table-card th:nth-child(5),#suppliers .table-card td:nth-child(5){width:18%!important}
  #suppliers .table-card th:nth-child(6),#suppliers .table-card td:nth-child(6){width:10%!important}
  #suppliers .table-card th:nth-child(7),#suppliers .table-card td:nth-child(7){width:14%!important}

  #purchasing .table-card th:nth-child(1),#purchasing .table-card td:nth-child(1){width:16%!important}
  #purchasing .table-card th:nth-child(2),#purchasing .table-card td:nth-child(2){width:10%!important}
  #purchasing .table-card th:nth-child(3),#purchasing .table-card td:nth-child(3){width:16%!important}
  #purchasing .table-card th:nth-child(4),#purchasing .table-card td:nth-child(4){width:8%!important}
  #purchasing .table-card th:nth-child(5),#purchasing .table-card td:nth-child(5){width:14%!important}
  #purchasing .table-card th:nth-child(6),#purchasing .table-card td:nth-child(6){width:8%!important}
  #purchasing .table-card th:nth-child(7),#purchasing .table-card td:nth-child(7){width:12%!important}
  #purchasing .table-card th:nth-child(8),#purchasing .table-card td:nth-child(8){width:16%!important}

  #customers .table-card th:nth-child(1),#customers .table-card td:nth-child(1){width:15%!important}
  #customers .table-card th:nth-child(2),#customers .table-card td:nth-child(2){width:18%!important}
  #customers .table-card th:nth-child(3),#customers .table-card td:nth-child(3){width:13%!important}
  #customers .table-card th:nth-child(4),#customers .table-card td:nth-child(4){width:22%!important}
  #customers .table-card th:nth-child(5),#customers .table-card td:nth-child(5){width:9%!important}
  #customers .table-card th:nth-child(6),#customers .table-card td:nth-child(6){width:13%!important}
  #customers .table-card th:nth-child(7),#customers .table-card td:nth-child(7){width:10%!important}

  #sales .table-card th:nth-child(1),#sales .table-card td:nth-child(1){width:13%!important}
  #sales .table-card th:nth-child(2),#sales .table-card td:nth-child(2){width:10%!important}
  #sales .table-card th:nth-child(3),#sales .table-card td:nth-child(3){width:16%!important}
  #sales .table-card th:nth-child(4),#sales .table-card td:nth-child(4){width:8%!important}
  #sales .table-card th:nth-child(5),#sales .table-card td:nth-child(5){width:10%!important}
  #sales .table-card th:nth-child(6),#sales .table-card td:nth-child(6){width:9%!important}
  #sales .table-card th:nth-child(7),#sales .table-card td:nth-child(7){width:8%!important}
  #sales .table-card th:nth-child(8),#sales .table-card td:nth-child(8){width:8%!important}
  #sales .table-card th:nth-child(9),#sales .table-card td:nth-child(9){width:18%!important}

  #offers .table-card th:nth-child(1),#offers .table-card td:nth-child(1){width:13%!important}
  #offers .table-card th:nth-child(2),#offers .table-card td:nth-child(2){width:19%!important}
  #offers .table-card th:nth-child(3),#offers .table-card td:nth-child(3){width:10%!important}
  #offers .table-card th:nth-child(4),#offers .table-card td:nth-child(4){width:10%!important}
  #offers .table-card th:nth-child(5),#offers .table-card td:nth-child(5){width:12%!important}
  #offers .table-card th:nth-child(6),#offers .table-card td:nth-child(6){width:12%!important}
  #offers .table-card th:nth-child(7),#offers .table-card td:nth-child(7){width:12%!important}
  #offers .table-card th:nth-child(8),#offers .table-card td:nth-child(8){width:12%!important}

  #notifications .table-card th:nth-child(1),#notifications .table-card td:nth-child(1){width:9%!important}
  #notifications .table-card th:nth-child(2),#notifications .table-card td:nth-child(2){width:12%!important}
  #notifications .table-card th:nth-child(3),#notifications .table-card td:nth-child(3){width:22%!important}
  #notifications .table-card th:nth-child(4),#notifications .table-card td:nth-child(4){width:9%!important}
  #notifications .table-card th:nth-child(5),#notifications .table-card td:nth-child(5){width:8%!important}
  #notifications .table-card th:nth-child(6),#notifications .table-card td:nth-child(6){width:10%!important}
  #notifications .table-card th:nth-child(7),#notifications .table-card td:nth-child(7){width:11%!important}
  #notifications .table-card th:nth-child(8),#notifications .table-card td:nth-child(8){width:8%!important}
  #notifications .table-card th:nth-child(9),#notifications .table-card td:nth-child(9){width:11%!important}

  #users .table-card th:nth-child(1),#users .table-card td:nth-child(1){width:13%!important}
  #users .table-card th:nth-child(2),#users .table-card td:nth-child(2){width:14%!important}
  #users .table-card th:nth-child(3),#users .table-card td:nth-child(3){width:20%!important}
  #users .table-card th:nth-child(4),#users .table-card td:nth-child(4){width:12%!important}
  #users .table-card th:nth-child(5),#users .table-card td:nth-child(5){width:9%!important}
  #users .table-card th:nth-child(6),#users .table-card td:nth-child(6){width:12%!important}
  #users .table-card th:nth-child(7),#users .table-card td:nth-child(7){width:10%!important}
  #users .table-card th:nth-child(8),#users .table-card td:nth-child(8){width:10%!important}

  #audit .table-card th:nth-child(1),#audit .table-card td:nth-child(1){width:13%!important}
  #audit .table-card th:nth-child(2),#audit .table-card td:nth-child(2){width:13%!important}
  #audit .table-card th:nth-child(3),#audit .table-card td:nth-child(3){width:14%!important}
  #audit .table-card th:nth-child(4),#audit .table-card td:nth-child(4){width:14%!important}
  #audit .table-card th:nth-child(5),#audit .table-card td:nth-child(5){width:10%!important}
  #audit .table-card th:nth-child(6),#audit .table-card td:nth-child(6){width:23%!important}
  #audit .table-card th:nth-child(7),#audit .table-card td:nth-child(7){width:13%!important}
}

@media (min-width:821px) and (max-width:1180px){
  .view .table-card th,.view .table-card td{padding:7px 5px!important;font-size:8.8px!important}
  .dashboard-hero{flex-direction:column!important;align-items:flex-start!important}
  .dashboard-side{width:100%!important;min-width:0!important;align-items:flex-start!important}
  .dashboard-side .head-actions{width:100%!important}
}

@media (max-width:820px){
  .content{max-width:100vw!important;overflow-x:hidden!important}
  .table-card{width:100%!important;max-width:100%!important;overflow:visible!important;border:0!important;background:transparent!important;box-shadow:none!important}
  .table-card>table{width:100%!important;min-width:0!important;max-width:100%!important;display:block!important;table-layout:auto!important}
  .table-card thead{display:none!important}
  .table-card tbody{display:grid!important;grid-template-columns:1fr!important;gap:9px!important;width:100%!important}
  .table-card tbody tr{display:block!important;width:100%!important;max-width:100%!important;background:#fff!important;border:1px solid var(--p-line,var(--border))!important;border-radius:13px!important;overflow:hidden!important}
  .table-card tbody td{width:100%!important;max-width:100%!important;min-height:40px!important;height:auto!important;padding:9px 10px!important;border-bottom:1px solid #edf1f4!important;display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:12px!important;white-space:normal!important;text-align:left!important;overflow-wrap:anywhere!important;word-break:normal!important}
  .table-card tbody td:last-child{border-bottom:0!important}
  .table-card tbody td:before{content:attr(data-label);color:#7b8d9d;font-size:8.5px;font-weight:800;text-align:right;flex:0 0 35%;max-width:35%;overflow-wrap:anywhere}
  .table-card tbody td>*{min-width:0!important;max-width:62%!important}
  .table-card tbody td.empty{display:block!important;text-align:center!important;padding:24px 12px!important}
  .table-card tbody td.empty:before{display:none!important;content:none!important}
  .table-card .actions-cell,.table-card .invoice-actions,.table-card .pending-actions{width:62%!important;max-width:62%!important;justify-content:flex-end!important;flex-wrap:wrap!important}
  #sales .invoice-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important}
  #sales .invoice-actions .btn{width:100%!important;min-width:0!important;padding-inline:6px!important}
  .audit-pagination-shell{max-width:100%!important;overflow:hidden!important}
  .audit-pagination-actions{max-width:100%!important}
  .filter-grid,.form,.pos-top,.add-line{grid-template-columns:1fr!important}
  .filter-grid .span-2,.pos-top .field:first-child,.field.full{grid-column:auto!important}
}


/* HERMED v1.6.50 POS PRODUCT SEARCH — mirrors customer search UX. */
.sale-product-field{min-width:0}.product-search-wrap{position:relative}.product-search-wrap>.search-icon{position:absolute;right:13px;top:50%;transform:translateY(-50%);width:16px;height:16px;color:#7990a2;pointer-events:none;z-index:2}.product-search-wrap>input{width:100%;padding-right:40px}.product-search-results{position:absolute;z-index:48;top:calc(100% + 6px);right:0;left:0;max-height:300px;overflow:auto;padding:6px;border:1px solid var(--border);background:#fff;border-radius:12px;box-shadow:var(--shadow-md)}.product-result{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;padding:10px 11px;border:0;border-bottom:1px solid #eef3f6;background:#fff;text-align:right;cursor:pointer}.product-result:last-child{border-bottom:0}.product-result:hover,.product-result:focus-visible{background:#f3f8fc;outline:none}.product-result b{display:block;color:var(--navy-900);overflow-wrap:anywhere}.product-result small{display:block;margin-top:2px;color:#7c91a2;line-height:1.55}.product-result code{direction:ltr;color:#648096;font-size:9px;flex:0 0 auto}.selected-product{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:7px;padding:9px 11px;border-radius:11px;background:#eef6fd;border:1px solid #d1e4f4}.selected-product b{display:block;color:#0d5f9c}.selected-product small{display:block;color:#5c788e;margin-top:2px}.selected-product code{direction:ltr;color:#56748b;font-size:9px;flex:0 0 auto}.add-line .sale-product-field{align-self:stretch}
@media(max-width:620px){.product-search-results{position:fixed;z-index:70;top:auto;bottom:82px;right:12px;left:12px;max-height:min(52vh,360px);border-radius:15px}.selected-product{align-items:flex-start}.product-result{padding:12px}}


/* HERMED v1.6.50 COMPACT POS PRODUCT SEARCH + FAST INVOICE VIEW */
.product-search-results{max-height:258px!important;padding:4px!important;border-radius:11px!important}
.product-result.product-result-compact{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(150px,35%)!important;align-items:center!important;gap:10px!important;min-height:58px!important;padding:7px 9px!important}
.product-result-main{min-width:0!important;overflow:hidden!important}.product-result-main b{font-size:12.5px!important;line-height:1.35!important;display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;overflow:hidden!important;overflow-wrap:normal!important;word-break:normal!important}.product-result-main small{font-size:10px!important;line-height:1.3!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;margin-top:3px!important}
.product-result-side{min-width:0!important;display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:5px!important;direction:ltr!important}.product-result-side code{display:block!important;width:100%!important;max-width:100%!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;font-size:8.5px!important;color:#6d8799!important}.product-result-badges{display:flex!important;gap:5px!important;flex-wrap:nowrap!important;width:100%!important}.product-result-badges em{font-style:normal!important;font-size:9px!important;font-weight:800!important;line-height:1!important;padding:5px 7px!important;border-radius:999px!important;white-space:nowrap!important}.stock-badge{background:#edf8f1!important;color:#267245!important}.stock-badge.stock-low{background:#fff6e7!important;color:#9a6813!important}.stock-badge.stock-zero{background:#fff0f0!important;color:#a23d3d!important}.price-badge{background:#eef6fd!important;color:#0d659f!important}
.invoice-preview-fast-loading,.invoice-preview-fast-error{width:min(100%,148mm);min-height:360px;margin:0 auto;padding:24px;border:1px solid #dce7ef;border-radius:16px;background:#fff}.invoice-preview-fast-head{display:flex;align-items:center;gap:12px;padding-bottom:16px;border-bottom:1px solid #e8eff4}.invoice-preview-fast-head b{display:block;color:#0a568f;font-size:17px}.invoice-preview-fast-head small{display:block;margin-top:2px;color:#7890a2}.invoice-fast-spinner{width:28px;height:28px;border:3px solid #dcebf6;border-top-color:#0d6db4;border-radius:50%;animation:invoiceFastSpinV1632 .8s linear infinite}.invoice-preview-fast-meta{display:flex;gap:8px;flex-wrap:wrap;margin:15px 0}.invoice-preview-fast-meta span{padding:6px 9px;border-radius:9px;background:#f3f8fc;color:#527086;font-size:11px}.invoice-fast-skeleton{display:grid;gap:9px;margin-top:18px}.invoice-fast-skeleton i{display:block;height:34px;border-radius:8px;background:linear-gradient(90deg,#f0f4f7 20%,#f8fafc 45%,#f0f4f7 70%);background-size:220% 100%;animation:invoiceFastShimmerV1632 1.2s linear infinite}.invoice-preview-fast-error{text-align:center;display:grid;place-items:center;align-content:center;gap:10px;color:#77504a}.invoice-preview-fast-error small{max-width:520px;overflow-wrap:anywhere}@keyframes invoiceFastSpinV1632{to{transform:rotate(360deg)}}@keyframes invoiceFastShimmerV1632{to{background-position:-220% 0}}
@media(max-width:620px){.product-result.product-result-compact{grid-template-columns:minmax(0,1fr) 124px!important;min-height:56px!important;padding:7px 8px!important}.product-result-main b{font-size:11.5px!important}.product-result-badges em{font-size:8px!important;padding:4px 5px!important}.invoice-preview-fast-loading,.invoice-preview-fast-error{padding:16px;min-height:300px}}


/* HERMED v1.6.50 CART QUANTITY CONTROLS / LIVE TOTALS */
.cart-line.cart-line-v1634{
  grid-template-columns:minmax(220px,1fr) 142px 104px 118px 38px!important;
  gap:10px!important;align-items:center!important;padding:12px 8px!important;
}
.cart-product-v1634{min-width:0!important}.cart-product-v1634 b{font-size:13px!important;line-height:1.35!important;white-space:normal!important;overflow-wrap:anywhere!important}.cart-product-v1634 small{font-size:9px!important}.cart-stock-v1634{display:inline-flex;margin-top:6px;padding:3px 7px;border-radius:999px;background:#edf8f1;color:#267245;font-size:8.5px;font-weight:800}.cart-stock-v1634.is-max{background:#fff6e7;color:#966514}.cart-stock-v1634.is-zero{background:#fff0f0;color:#a23d3d}
.cart-qty-v1634{direction:ltr;display:grid;grid-template-columns:36px minmax(54px,1fr) 36px;align-items:center;gap:5px;padding:4px;border:1px solid #dce8f0;border-radius:11px;background:#f8fbfd;min-width:0}
.cart-qty-btn{height:34px;width:36px;border:1px solid #cfe0eb;border-radius:8px;background:#fff;color:#0870bc;font:800 20px/1 Arial,sans-serif;cursor:pointer;display:grid;place-items:center}.cart-qty-btn:hover:not(:disabled){background:#edf7ff;border-color:#8fc4e9}.cart-qty-btn:disabled{opacity:.35;cursor:not-allowed}
.cart-qty-v1634 input{width:100%;min-width:0;height:34px;border:0!important;outline:0!important;background:transparent!important;text-align:center!important;padding:0 2px!important;font:800 13px/1 'Cairo',sans-serif;color:var(--navy-900);appearance:textfield}.cart-qty-v1634 input::-webkit-inner-spin-button,.cart-qty-v1634 input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.cart-metric-v1634{min-width:0;text-align:center;padding:7px 6px;border-radius:9px;background:#f8fbfd}.cart-metric-v1634 small{display:block;color:#8396a5;font-size:8px;margin-bottom:3px}.cart-metric-v1634 b{display:block;color:#183c5d;font-size:12px;white-space:nowrap}.cart-line-total-v1634{background:#eef7fd}.cart-line-total-v1634 b{color:#0868aa;font-size:13px}.cart-remove-v1634{justify-self:center!important;width:34px!important;height:34px!important}.cart-line-v1634 .alloc{grid-column:1/-1!important;margin-top:-2px!important;padding:4px 2px 0!important;white-space:normal!important;overflow-wrap:anywhere!important}
@media(max-width:820px){.cart-line.cart-line-v1634{grid-template-columns:minmax(0,1fr) 138px 38px!important;gap:8px!important;padding:11px!important;border:1px solid #e1eaf0!important;border-radius:12px!important;margin-bottom:8px!important}.cart-product-v1634{grid-column:1/-1!important}.cart-qty-v1634{grid-column:1/2!important}.cart-metric-v1634{grid-column:auto!important}.cart-line-total-v1634{grid-column:1/2!important}.cart-remove-v1634{grid-column:3!important;grid-row:2!important}.cart-line-v1634 .price{display:block!important}.cart-line-v1634 .alloc{grid-column:1/-1!important}}
@media(max-width:520px){.cart-line.cart-line-v1634{grid-template-columns:1fr 38px!important}.cart-qty-v1634{grid-column:1/2!important}.cart-remove-v1634{grid-column:2!important;grid-row:2!important}.cart-metric-v1634{grid-column:1/-1!important;display:flex!important;justify-content:space-between!important;align-items:center!important;text-align:initial!important}.cart-metric-v1634 small{margin:0!important}.cart-line-total-v1634{grid-column:1/-1!important}.cart-line-v1634 .alloc{grid-column:1/-1!important}}


/* =========================================================
   HERMED v1.6.50 CART ROW REDESIGN + SIDEBAR COLLAPSE / SCROLL SHELL FIX
   Frontend layout only. No backend or business-write changes.
   ========================================================= */
.cart-item-v1635{display:grid!important;grid-template-columns:minmax(300px,1fr) 174px 118px 134px 42px!important;align-items:center!important;gap:12px!important;width:100%!important;min-width:0!important;margin:10px 0!important;padding:13px 14px!important;border:1px solid #dfeaf2!important;border-radius:16px!important;background:linear-gradient(180deg,#fff 0%,#fbfdff 100%)!important;box-shadow:0 5px 16px rgba(14,58,91,.035)!important;direction:rtl!important}
.cart-item-product-v1635{min-width:0!important;padding-inline-end:2px!important}.cart-item-title-row-v1635{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:9px!important;min-width:0!important}.cart-item-title-row-v1635>b{min-width:0!important;color:#103d63!important;font-size:13px!important;font-weight:800!important;line-height:1.45!important;display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;overflow:hidden!important}.cart-stock-v1635{flex:0 0 auto!important;display:inline-flex!important;align-items:center!important;padding:4px 8px!important;border-radius:999px!important;background:#edf8f1!important;color:#267245!important;font-size:8.5px!important;font-weight:850!important;white-space:nowrap!important}.cart-stock-v1635.is-max{background:#fff6e7!important;color:#966514!important}.cart-stock-v1635.is-zero{background:#fff0f0!important;color:#a23d3d!important}
.cart-item-meta-v1635{display:flex!important;align-items:center!important;gap:7px!important;min-width:0!important;margin-top:4px!important;color:#7890a2!important}.cart-item-meta-v1635 code{direction:ltr!important;display:block!important;min-width:0!important;max-width:68%!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;font-size:8.5px!important;color:#6f889a!important}.cart-item-meta-v1635 span{padding:2px 6px!important;border-radius:7px!important;background:#f3f6f8!important;color:#6d8292!important;font-size:8px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;max-width:30%!important}
.cart-fefo-v1635{display:flex!important;align-items:center!important;gap:6px!important;min-width:0!important;margin-top:7px!important;color:#8093a1!important;font-size:8.5px!important}.cart-fefo-v1635>span{flex:0 0 auto!important;padding:2px 6px!important;border-radius:6px!important;background:#eef6fd!important;color:#0c659f!important;font-weight:850!important}.cart-fefo-v1635>em{font-style:normal!important;min-width:0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;direction:ltr!important;text-align:left!important}
.cart-item-control-v1635,.cart-item-money-v1635{min-width:0!important}.cart-item-control-v1635>small,.cart-item-money-v1635>small{display:block!important;margin-bottom:5px!important;color:#8396a5!important;font-size:8.5px!important;font-weight:750!important;text-align:center!important}.cart-stepper-v1635{direction:ltr!important;display:grid!important;grid-template-columns:42px minmax(54px,1fr) 42px!important;align-items:center!important;gap:5px!important;padding:4px!important;border:1px solid #cfe0eb!important;border-radius:12px!important;background:#f6fafd!important}.cart-stepper-v1635 button{width:42px!important;height:38px!important;border:1px solid #c9ddea!important;border-radius:9px!important;background:#fff!important;color:#0870bc!important;font:850 21px/1 Arial,sans-serif!important;display:grid!important;place-items:center!important;cursor:pointer!important;transition:.14s ease!important}.cart-stepper-v1635 button:hover:not(:disabled){background:#eaf6ff!important;border-color:#86bfe7!important;transform:translateY(-1px)!important}.cart-stepper-v1635 button:disabled{opacity:.32!important;cursor:not-allowed!important;transform:none!important}.cart-stepper-v1635 input{width:100%!important;min-width:0!important;height:38px!important;border:0!important;outline:0!important;background:transparent!important;text-align:center!important;padding:0 2px!important;font:850 14px/1 'Cairo',sans-serif!important;color:#123b60!important;appearance:textfield!important}.cart-stepper-v1635 input::-webkit-inner-spin-button,.cart-stepper-v1635 input::-webkit-outer-spin-button{-webkit-appearance:none!important;margin:0!important}
.cart-item-money-v1635{padding:9px 8px!important;border:1px solid #edf1f4!important;border-radius:11px!important;background:#f9fbfc!important;text-align:center!important}.cart-item-money-v1635 strong{display:block!important;color:#173e60!important;font-size:13px!important;font-weight:850!important;white-space:nowrap!important}.cart-item-money-v1635 strong span{font-size:8px!important;font-weight:700!important;color:#8193a2!important}.cart-item-total-v1635{border-color:#d7eafb!important;background:#edf7ff!important}.cart-item-total-v1635 strong{color:#0968aa!important;font-size:14px!important}.cart-remove-v1635{width:40px!important;height:40px!important;border:1px solid #f0cfd0!important;border-radius:11px!important;background:#fff8f8!important;color:#d64c52!important;font-size:20px!important;font-weight:600!important;display:grid!important;place-items:center!important;cursor:pointer!important;transition:.14s ease!important}.cart-remove-v1635:hover{background:#fff0f0!important;border-color:#e9aeb1!important;transform:translateY(-1px)!important}.cart-empty-v1635{padding:28px!important}

@media(max-width:1120px) and (min-width:821px){.cart-item-v1635{grid-template-columns:minmax(230px,1fr) 160px 108px 124px 40px!important;gap:8px!important;padding:11px!important}.cart-item-title-row-v1635>b{font-size:11.5px!important}.cart-stepper-v1635{grid-template-columns:38px minmax(48px,1fr) 38px!important}.cart-stepper-v1635 button{width:38px!important}}
@media(max-width:820px){.cart-item-v1635{grid-template-columns:minmax(0,1fr) 42px!important;gap:10px!important;padding:12px!important}.cart-item-product-v1635{grid-column:1/-1!important}.cart-item-control-v1635{grid-column:1/2!important}.cart-remove-v1635{grid-column:2!important;grid-row:2!important;align-self:end!important}.cart-item-money-v1635{grid-column:1/-1!important;display:flex!important;align-items:center!important;justify-content:space-between!important;text-align:initial!important;padding:8px 10px!important}.cart-item-money-v1635>small{margin:0!important}.cart-fefo-v1635{max-width:100%!important}}

.sidebar-toggle-v1635{display:flex;position:fixed;z-index:70;top:88px;right:238px;align-items:center;gap:6px;height:38px;padding:0 10px;border:1px solid #cfe1ee;border-radius:11px;background:#fff;color:#0b659f;box-shadow:0 7px 20px rgba(5,39,67,.12);font:800 9px/1 'Cairo',sans-serif;cursor:pointer;transition:right .22s ease,transform .14s ease,box-shadow .14s ease}.sidebar-toggle-v1635:hover{transform:translateY(-1px);box-shadow:0 10px 24px rgba(5,39,67,.16)}.sidebar-toggle-glyph{font:800 24px/1 Arial,sans-serif;margin-top:-2px}.sidebar-toggle-text{white-space:nowrap}
@media(min-width:821px){.app{grid-template-columns:minmax(0,1fr) 256px!important;align-items:start!important;transition:grid-template-columns .22s ease!important}.main{min-width:0!important;width:100%!important}.content{min-width:0!important;width:100%!important}.sidebar{position:sticky!important;top:0!important;align-self:start!important;width:100%!important;height:100dvh!important;max-height:100dvh!important;overflow-y:hidden!important;overflow-x:hidden!important;transition:transform .22s ease,opacity .16s ease!important}.app.sidebar-collapsed-v1635{grid-template-columns:minmax(0,1fr) 0!important}.app.sidebar-collapsed-v1635 .sidebar{transform:translateX(105%)!important;opacity:0!important;pointer-events:none!important}.app.sidebar-collapsed-v1635+.sidebar-toggle-v1635,.app.sidebar-collapsed-v1635 .sidebar-toggle-v1635{right:14px!important}.app.sidebar-collapsed-v1635~.sidebar-toggle-v1635{right:14px!important}.sidebar-toggle-v1635{right:238px}.app.sidebar-collapsed-v1635>.sidebar-toggle-v1635{right:14px!important}}
@media(min-width:821px) and (max-width:1050px){.app{grid-template-columns:minmax(0,1fr) 82px!important}.app.sidebar-collapsed-v1635{grid-template-columns:minmax(0,1fr) 0!important}.sidebar-toggle-v1635{right:64px}.app.sidebar-collapsed-v1635>.sidebar-toggle-v1635{right:14px!important}}
@media(min-width:821px) and (max-height:820px){.sidebar .side-brand{height:54px!important;margin-bottom:7px!important}.sidebar .nav-title{margin:8px 0 4px!important}.sidebar .nav{gap:2px!important}.sidebar .nav button{height:38px!important;min-height:38px!important}.sidebar .side-foot{padding-top:7px!important;font-size:7px!important;line-height:1.45!important}}
@media(min-width:821px) and (max-height:650px){.sidebar{overflow-y:auto!important}}
@media(max-width:820px){.sidebar-toggle-v1635{display:none!important}.app.sidebar-collapsed-v1635{display:block!important}.app.sidebar-collapsed-v1635 .sidebar{transform:none!important;opacity:1!important;pointer-events:auto!important}}


/* =========================================================
   HERMED v1.6.50 POLISHED SHELL / CART / INVOICE DENSITY R1
   Desktop presentation only. No backend or business-write changes.
   ========================================================= */
html,body{max-width:100%;overflow-x:hidden}
@media(min-width:821px){
  :root{--hermed-side-v1636:244px}
  .app{display:block!important;min-height:100vh!important;background:var(--p-canvas)!important}
  .main{width:auto!important;min-width:0!important;margin-right:var(--hermed-side-v1636)!important;transition:margin-right .22s ease!important}
  .sidebar{position:fixed!important;z-index:46!important;top:0!important;right:0!important;bottom:0!important;left:auto!important;width:var(--hermed-side-v1636)!important;height:100dvh!important;max-height:100dvh!important;padding:14px 12px!important;overflow-x:hidden!important;overflow-y:auto!important;transform:none!important;opacity:1!important;transition:transform .22s ease,opacity .16s ease!important;overscroll-behavior:contain!important}
  .sidebar .side-brand{height:70px!important}.sidebar .nav-title{display:block!important}.sidebar .nav button{justify-content:flex-start!important;padding-inline:11px!important}.sidebar .nav button span{display:inline!important}.sidebar .side-foot{display:block!important}
  .app.sidebar-collapsed-v1635 .main{margin-right:0!important}
  .app.sidebar-collapsed-v1635 .sidebar{transform:translateX(102%)!important;opacity:0!important;pointer-events:none!important}
  .sidebar-toggle-v1635{display:grid!important;place-items:center!important;position:fixed!important;z-index:55!important;top:18px!important;right:calc(var(--hermed-side-v1636) - 18px)!important;width:38px!important;height:38px!important;min-width:38px!important;padding:0!important;border-radius:11px!important;background:#fff!important;border:1px solid #cfe0eb!important;box-shadow:0 7px 20px rgba(5,39,67,.12)!important;transition:right .22s ease,transform .14s ease!important}
  .sidebar-toggle-v1635 .sidebar-toggle-text{display:none!important}.sidebar-toggle-v1635 .sidebar-toggle-glyph{font-size:24px!important;margin:0!important;line-height:1!important}
  .app.sidebar-collapsed-v1635>.sidebar-toggle-v1635{right:14px!important}
  .content{width:100%!important;max-width:none!important;margin:0!important;padding:24px 24px 52px!important}
  .view{width:100%!important;max-width:none!important;min-width:0!important}
  .topbar{width:100%!important}
}
@media(min-width:821px) and (max-width:1100px){
  :root{--hermed-side-v1636:224px}
  .content{padding-inline:18px!important}
}

/* Cart: product identity gets its own row; controls never collide with summary panel. */
.cart-item-v1636{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px!important;width:100%!important;min-width:0!important;margin:10px 0!important;padding:14px!important;border:1px solid #dfe8ef!important;border-radius:15px!important;background:#fff!important;box-shadow:0 5px 18px rgba(15,50,80,.035)!important}
.cart-product-v1636{min-width:0!important}.cart-product-head-v1636{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:12px!important;min-width:0!important}.cart-product-copy-v1636{min-width:0!important;flex:1!important}.cart-product-copy-v1636>b{display:block!important;color:#113d62!important;font-size:13px!important;font-weight:800!important;line-height:1.4!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}.cart-meta-v1636{margin-top:4px!important;gap:8px!important}.cart-meta-v1636 code{max-width:70%!important}.cart-stock-v1636{margin:0!important;flex:0 0 auto!important}.cart-fefo-v1636{margin-top:7px!important;padding-top:7px!important;border-top:1px dashed #e7edf2!important;font-size:8.5px!important}
.cart-controls-v1636{display:grid!important;grid-template-columns:minmax(210px,1.25fr) minmax(120px,.72fr) minmax(140px,.82fr) 42px!important;gap:9px!important;align-items:end!important;min-width:0!important}.cart-qty-block-v1636,.cart-money-v1636{min-width:0!important}.cart-qty-block-v1636>small,.cart-money-v1636>small{display:block!important;margin:0 0 5px!important;color:#7f91a0!important;font-size:8.5px!important;font-weight:750!important;text-align:center!important}.cart-stepper-v1636{width:100%!important;grid-template-columns:40px minmax(54px,1fr) 40px!important;min-width:0!important}.cart-stepper-v1636 button{width:40px!important;height:38px!important}.cart-money-v1636{height:52px!important;padding:7px 8px!important;display:flex!important;flex-direction:column!important;justify-content:center!important;border-radius:11px!important}.cart-total-v1636{background:#eef7fd!important;border-color:#d5e9f8!important}.cart-remove-v1636{align-self:end!important;margin-bottom:1px!important;width:40px!important;height:40px!important}.cart-remove-v1636:hover{transform:none!important}
@media(min-width:821px) and (max-width:1040px){.cart-controls-v1636{grid-template-columns:minmax(190px,1.1fr) minmax(110px,.7fr) minmax(125px,.75fr) 40px!important;gap:7px!important}.cart-product-copy-v1636>b{font-size:12px!important}}
@media(max-width:820px){.cart-item-v1636{padding:12px!important}.cart-product-head-v1636{gap:8px!important}.cart-product-copy-v1636>b{white-space:normal!important;display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important}.cart-controls-v1636{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}.cart-qty-block-v1636{grid-column:1/-1!important}.cart-remove-v1636{position:absolute!important;left:12px!important;top:12px!important}.cart-item-v1636{position:relative!important}.cart-product-v1636{padding-left:44px!important}.cart-total-v1636{grid-column:auto!important}}
@media(max-width:480px){.cart-controls-v1636{grid-template-columns:1fr!important}.cart-money-v1636{height:46px!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important}.cart-money-v1636>small{margin:0!important}}

/* Invoice browser: readable desktop table, no 8px compression, horizontal safety only when truly needed. */
@media(min-width:821px){
  #sales .invoice-table-card-v1636{width:100%!important;max-width:100%!important;overflow-x:auto!important;overflow-y:visible!important;border-radius:16px!important}
  #sales .invoice-table-v1636{width:100%!important;min-width:1120px!important;table-layout:fixed!important}
  #sales .invoice-table-v1636 th{padding:11px 9px!important;font-size:10.5px!important;font-weight:800!important;color:#5c7385!important;background:#f8fafc!important;text-align:center!important}
  #sales .invoice-table-v1636 td{padding:10px 9px!important;font-size:10.7px!important;line-height:1.5!important;border-bottom:1px solid #edf2f5!important;white-space:normal!important;overflow-wrap:normal!important;word-break:normal!important}
  #sales .invoice-table-v1636 tbody tr:hover td{background:#fbfdff!important}
  #sales .invoice-table-v1636 th:nth-child(1),#sales .invoice-table-v1636 td:nth-child(1){width:15%!important}
  #sales .invoice-table-v1636 th:nth-child(2),#sales .invoice-table-v1636 td:nth-child(2){width:11%!important}
  #sales .invoice-table-v1636 th:nth-child(3),#sales .invoice-table-v1636 td:nth-child(3){width:17%!important}
  #sales .invoice-table-v1636 th:nth-child(4),#sales .invoice-table-v1636 td:nth-child(4){width:8%!important}
  #sales .invoice-table-v1636 th:nth-child(5),#sales .invoice-table-v1636 td:nth-child(5){width:10%!important}
  #sales .invoice-table-v1636 th:nth-child(6),#sales .invoice-table-v1636 td:nth-child(6){width:9%!important}
  #sales .invoice-table-v1636 th:nth-child(7),#sales .invoice-table-v1636 td:nth-child(7){width:9%!important}
  #sales .invoice-table-v1636 th:nth-child(8),#sales .invoice-table-v1636 td:nth-child(8){width:8%!important}
  #sales .invoice-table-v1636 th:nth-child(9),#sales .invoice-table-v1636 td:nth-child(9){width:13%!important}
  .invoice-id-cell-v1636{direction:ltr!important;text-align:left!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}.invoice-date-cell-v1636{white-space:nowrap!important;text-align:center!important}.invoice-customer-v1636 b{font-size:10.8px!important;line-height:1.4!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}.invoice-customer-v1636 small{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}.invoice-total-cell-v1636{font-weight:800!important;color:#173e60!important;white-space:nowrap!important}.invoice-actions-v1636{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important;width:100%!important}.invoice-actions-v1636 .btn{min-height:34px!important;padding:5px 7px!important;font-size:9.5px!important}
}
.invoice-pager{display:flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;direction:rtl!important;margin:14px 0 2px!important;padding:2px!important;overflow-x:auto!important}.invoice-pager button{min-width:36px!important;height:36px!important;border-radius:9px!important;border:1px solid #d7e3eb!important;background:#fff!important;color:#37546a!important;font-size:11px!important;font-weight:750!important}.invoice-pager button.active{background:#0b4b72!important;border-color:#0b4b72!important;color:#fff!important;box-shadow:0 5px 12px rgba(11,75,114,.16)!important}

/* General desktop tables: readable, contained, and never crushed by the sidebar. */
@media(min-width:821px){
  .view .table-card{max-width:100%!important;overflow-x:auto!important;overflow-y:visible!important}
  .view .table-card>table{min-width:900px!important}
  #dashboard .table-card>table{min-width:760px!important}
  .view .table-card th,.view .table-card td{font-size:10.5px!important;padding:9px 8px!important}
}

/* =========================================================
   HERMED v1.6.50 BALANCED CART + INVOICE WORKSPACE R1
   Visual density / workspace balance only. No business-write changes.
   ========================================================= */
@media(min-width:821px){
  /* Cart becomes a compact POS row: product + qty + unit + line total + delete. */
  .cart-item-v1636{
    display:grid!important;
    grid-template-columns:minmax(300px,1.7fr) minmax(180px,.8fr) minmax(115px,.5fr) minmax(145px,.62fr) 42px!important;
    gap:12px!important;align-items:center!important;
    margin:8px 0!important;padding:12px 14px!important;
    min-height:0!important;border-radius:14px!important;
  }
  .cart-controls-v1636{display:contents!important}
  .cart-product-v1636{align-self:center!important}
  .cart-product-head-v1636{align-items:center!important;gap:10px!important}
  .cart-product-copy-v1636>b{font-size:12.5px!important;line-height:1.35!important}
  .cart-meta-v1636{margin-top:3px!important;gap:6px!important}
  .cart-meta-v1636 code{max-width:62%!important;font-size:8.5px!important}
  .cart-stock-v1636{font-size:9px!important;padding:4px 7px!important}
  .cart-fefo-v1636{margin-top:5px!important;padding-top:5px!important;font-size:8px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .cart-qty-block-v1636>small,.cart-money-v1636>small{margin-bottom:4px!important;font-size:8px!important}
  .cart-stepper-v1636{height:44px!important;grid-template-columns:38px minmax(48px,1fr) 38px!important;border-radius:11px!important}
  .cart-stepper-v1636 button{width:38px!important;height:38px!important;font-size:18px!important}
  .cart-stepper-v1636 input{height:38px!important;font-size:13px!important}
  .cart-money-v1636{height:50px!important;padding:6px 8px!important;border-radius:10px!important}
  .cart-money-v1636 strong{font-size:13px!important}
  .cart-total-v1636 strong{font-size:15px!important}
  .cart-remove-v1636{width:38px!important;height:38px!important;border-radius:10px!important}

  /* Invoice browser: fit the whole 9-column table in the workspace without hiding actions. */
  #sales .invoice-table-card-v1636{overflow-x:hidden!important;overflow-y:visible!important}
  #sales .invoice-table-v1636{width:100%!important;min-width:0!important;table-layout:fixed!important}
  #sales .invoice-table-v1636 th{padding:10px 6px!important;font-size:10px!important}
  #sales .invoice-table-v1636 td{padding:10px 6px!important;font-size:10.2px!important;line-height:1.42!important}
  #sales .invoice-table-v1636 th:nth-child(1),#sales .invoice-table-v1636 td:nth-child(1){width:15%!important}
  #sales .invoice-table-v1636 th:nth-child(2),#sales .invoice-table-v1636 td:nth-child(2){width:10%!important}
  #sales .invoice-table-v1636 th:nth-child(3),#sales .invoice-table-v1636 td:nth-child(3){width:18%!important}
  #sales .invoice-table-v1636 th:nth-child(4),#sales .invoice-table-v1636 td:nth-child(4){width:7%!important}
  #sales .invoice-table-v1636 th:nth-child(5),#sales .invoice-table-v1636 td:nth-child(5){width:9%!important}
  #sales .invoice-table-v1636 th:nth-child(6),#sales .invoice-table-v1636 td:nth-child(6){width:8%!important}
  #sales .invoice-table-v1636 th:nth-child(7),#sales .invoice-table-v1636 td:nth-child(7){width:8%!important}
  #sales .invoice-table-v1636 th:nth-child(8),#sales .invoice-table-v1636 td:nth-child(8){width:8%!important}
  #sales .invoice-table-v1636 th:nth-child(9),#sales .invoice-table-v1636 td:nth-child(9){width:17%!important}
  #sales .invoice-table-v1636 td:nth-child(1),
  #sales .invoice-table-v1636 td:nth-child(2),
  #sales .invoice-table-v1636 td:nth-child(4),
  #sales .invoice-table-v1636 td:nth-child(5),
  #sales .invoice-table-v1636 td:nth-child(6),
  #sales .invoice-table-v1636 td:nth-child(7),
  #sales .invoice-table-v1636 td:nth-child(8){white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  #sales .invoice-table-v1636 .customer-cell b,
  #sales .invoice-table-v1636 .customer-cell small{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  #sales .invoice-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:5px!important;width:100%!important}
  #sales .invoice-actions .btn{min-height:32px!important;padding:4px 6px!important;font-size:9.5px!important}

  /* Invoice preview uses the modal space instead of showing a tiny sheet in a large dialog. */
  #invoiceViewModal .invoice-dialog{width:min(1180px,96vw)!important;height:min(90vh,900px)!important;max-height:90vh!important}
  #invoiceViewModal .invoice-modal-toolbar{flex:0 0 auto!important;padding-bottom:10px!important}
  #invoiceViewModal .invoice-preview-stage{margin-top:10px!important;padding:12px!important;align-items:flex-start!important;overflow:auto!important}
  #invoiceViewModal .invoice-a5-preview{width:min(720px,100%)!important;max-width:720px!important;min-height:0!important;flex:0 0 auto!important;padding:30px!important;border-radius:12px!important;box-shadow:0 12px 30px rgba(2,31,61,.10)!important}
  #invoiceViewModal .invoice-brand-copy b{font-size:10.5px!important}
  #invoiceViewModal .invoice-brand-copy small{font-size:8.5px!important}
  #invoiceViewModal .invoice-brand .invoice-no b{font-size:17px!important}
  #invoiceViewModal .invoice-brand .invoice-no small{font-size:10px!important}
  #invoiceViewModal .invoice-card h4{font-size:10.5px!important}
  #invoiceViewModal .invoice-meta{font-size:10.5px!important}
  #invoiceViewModal .invoice-items{font-size:9.6px!important}
  #invoiceViewModal .invoice-items th,#invoiceViewModal .invoice-items td{padding:7px 6px!important}
  #invoiceViewModal .invoice-total-row{font-size:10px!important}
  #invoiceViewModal .invoice-total-row.net{font-size:13px!important}
  #invoiceViewModal .invoice-notes{font-size:9px!important}
  #invoiceViewModal .invoice-footer{font-size:8px!important}
}
@media(min-width:821px) and (max-width:1180px){
  .cart-item-v1636{grid-template-columns:minmax(250px,1.45fr) minmax(165px,.82fr) 105px 125px 38px!important;gap:8px!important;padding:10px!important}
  #sales .invoice-table-v1636 th,#sales .invoice-table-v1636 td{padding-inline:4px!important;font-size:9.4px!important}
  #invoiceViewModal .invoice-dialog{width:min(1040px,96vw)!important}
  #invoiceViewModal .invoice-a5-preview{width:min(680px,100%)!important;padding:24px!important}
}
@media(max-width:820px){
  .cart-controls-v1636{display:grid!important}
  #invoiceViewModal .invoice-dialog{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important}
  #invoiceViewModal .invoice-a5-preview{width:100%!important;max-width:100%!important}
}


/* =========================================================
   HERMED v1.6.50 CART CONTAINMENT / POS ROW R2
   Fixes desktop cart overflow/clipping inside the sales workspace.
   Read-only presentation change; quantity/write semantics unchanged.
   ========================================================= */
#sales,#sales .sale-layout,#sales .sale-workspace,#sales .invoice-builder,#sales .invoice-entry,#sales .cart-lines,
#sales #cartLines{min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
#sales #cartLines{width:100%!important;overflow:hidden!important}
#sales .cart-item-v1636{box-sizing:border-box!important;max-width:100%!important;min-width:0!important;overflow:hidden!important}
#sales .cart-item-v1636>*{min-width:0!important;max-width:100%!important;box-sizing:border-box!important}

@media(min-width:821px){
  /* Reliable two-band POS card: product context on top, editing controls below. */
  #sales .cart-item-v1636{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:auto auto!important;
    gap:9px!important;
    width:100%!important;
    padding:11px 12px!important;
    margin:7px 0!important;
    border-radius:14px!important;
  }
  #sales .cart-product-v1636{
    width:100%!important;min-width:0!important;
    padding:0 1px 8px!important;
    border-bottom:1px dashed #e2ebf1!important;
  }
  #sales .cart-product-head-v1636{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;min-width:0!important}
  #sales .cart-product-copy-v1636{min-width:0!important;flex:1 1 auto!important}
  #sales .cart-product-copy-v1636>b{display:block!important;max-width:100%!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;font-size:12.5px!important;line-height:1.35!important}
  #sales .cart-meta-v1636{display:flex!important;align-items:center!important;gap:6px!important;min-width:0!important;margin-top:4px!important;overflow:hidden!important}
  #sales .cart-meta-v1636 code{display:block!important;min-width:0!important;max-width:55%!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;font-size:8.6px!important}
  #sales .cart-meta-v1636 span{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;font-size:8.8px!important}
  #sales .cart-stock-v1636{flex:0 0 auto!important;white-space:nowrap!important;padding:4px 8px!important;font-size:9px!important}
  #sales .cart-fefo-v1636{display:flex!important;align-items:center!important;gap:7px!important;min-width:0!important;margin-top:5px!important;padding-top:0!important;border:0!important;font-size:8.4px!important;white-space:nowrap!important;overflow:hidden!important}
  #sales .cart-fefo-v1636 span{flex:0 0 auto!important}
  #sales .cart-fefo-v1636 em{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;font-style:normal!important}

  #sales .cart-controls-v1636{
    display:grid!important;
    grid-template-columns:minmax(190px,1.15fr) minmax(112px,.68fr) minmax(132px,.78fr) 38px!important;
    align-items:end!important;
    gap:9px!important;
    width:100%!important;min-width:0!important;max-width:100%!important;
  }
  #sales .cart-controls-v1636>*{min-width:0!important;max-width:100%!important}
  #sales .cart-qty-block-v1636,#sales .cart-money-v1636{width:100%!important;min-width:0!important}
  #sales .cart-qty-block-v1636>small,#sales .cart-money-v1636>small{display:block!important;margin:0 0 4px!important;font-size:8px!important;color:#8193a0!important;font-weight:750!important}
  #sales .cart-stepper-v1636{
    display:grid!important;grid-template-columns:36px minmax(44px,1fr) 36px!important;
    width:100%!important;min-width:0!important;height:42px!important;
    padding:2px!important;border-radius:11px!important;overflow:hidden!important;
  }
  #sales .cart-stepper-v1636 button{width:36px!important;height:36px!important;min-width:36px!important;padding:0!important;font-size:18px!important;border-radius:9px!important}
  #sales .cart-stepper-v1636 input{width:100%!important;min-width:0!important;height:36px!important;padding:0 4px!important;font-size:13px!important;text-align:center!important}
  #sales .cart-money-v1636{height:42px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:7px!important;padding:5px 9px!important;border-radius:10px!important;overflow:hidden!important}
  #sales .cart-money-v1636>small{margin:0!important;white-space:nowrap!important}
  #sales .cart-money-v1636 strong{min-width:0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;font-size:12.5px!important}
  #sales .cart-total-v1636{background:#eef8ff!important;border-color:#d6ebf8!important}
  #sales .cart-total-v1636 strong{font-size:14px!important;color:#0871b9!important}
  #sales .cart-remove-v1636{align-self:end!important;width:38px!important;height:42px!important;min-width:38px!important;margin:0!important;border-radius:10px!important}
}

@media(min-width:821px) and (max-width:1120px){
  #sales .cart-controls-v1636{grid-template-columns:minmax(165px,1.05fr) minmax(100px,.65fr) minmax(118px,.72fr) 36px!important;gap:7px!important}
  #sales .cart-money-v1636{padding:5px 7px!important}
  #sales .cart-money-v1636>small{font-size:7.5px!important}
  #sales .cart-money-v1636 strong{font-size:11.5px!important}
}

@media(max-width:820px){
  #sales .cart-item-v1636{width:100%!important;max-width:100%!important;overflow:hidden!important}
  #sales .cart-controls-v1636{width:100%!important;max-width:100%!important;min-width:0!important}
}


/* =========================================================
   HERMED v1.6.50 CART METRIC VERTICAL FIT / R3
   Prevents unit-price and line-total values from being clipped vertically.
   Presentation-only; cart quantity and invoice write semantics unchanged.
   ========================================================= */
@media(min-width:821px){
  #sales .cart-controls-v1636{
    align-items:stretch!important;
  }
  #sales .cart-qty-block-v1636{
    align-self:stretch!important;
    display:grid!important;
    grid-template-rows:auto 1fr!important;
    min-height:60px!important;
  }
  #sales .cart-qty-block-v1636>small,
  #sales .cart-money-v1636>small{
    line-height:1.25!important;
    min-height:12px!important;
  }
  #sales .cart-stepper-v1636{
    align-self:end!important;
    height:44px!important;
  }
  #sales .cart-money-v1636{
    height:auto!important;
    min-height:60px!important;
    overflow:visible!important;
    display:grid!important;
    grid-template-rows:auto auto!important;
    align-content:center!important;
    justify-content:stretch!important;
    row-gap:5px!important;
    padding:8px 10px!important;
  }
  #sales .cart-money-v1636>small{
    display:block!important;
    margin:0!important;
    text-align:center!important;
  }
  #sales .cart-money-v1636 strong{
    display:block!important;
    width:100%!important;
    min-height:20px!important;
    line-height:1.25!important;
    overflow:visible!important;
    text-overflow:clip!important;
    text-align:center!important;
  }
  #sales .cart-remove-v1636{
    align-self:end!important;
    margin-bottom:0!important;
  }
}
@media(max-width:820px){
  #sales .cart-money-v1636{
    height:auto!important;
    min-height:48px!important;
    overflow:visible!important;
  }
  #sales .cart-money-v1636 strong{line-height:1.25!important;overflow:visible!important}
}


/* =========================================================
   HERMED v1.6.50 CART METRIC HARD FIT / R4
   Final desktop cart metric geometry: two explicit rows, no vertical clipping.
   Presentation-only; no invoice write or quantity semantics changed.
   ========================================================= */
@media (min-width:821px){
  #sales .cart-controls-v1636{
    align-items:stretch!important;
  }
  #sales .cart-qty-block-v1636{
    display:grid!important;
    grid-template-rows:16px 44px!important;
    align-content:start!important;
    min-height:64px!important;
    height:auto!important;
    overflow:visible!important;
  }
  #sales .cart-qty-block-v1636>small{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    height:16px!important;
    min-height:16px!important;
    margin:0 0 4px!important;
    line-height:16px!important;
  }
  #sales .cart-stepper-v1636{
    align-self:start!important;
    width:100%!important;
    height:44px!important;
    min-height:44px!important;
    overflow:hidden!important;
  }
  #sales .cart-money-v1636{
    display:grid!important;
    grid-template-rows:16px 28px!important;
    align-content:center!important;
    justify-items:center!important;
    gap:4px!important;
    width:100%!important;
    height:64px!important;
    min-height:64px!important;
    max-height:none!important;
    padding:7px 9px!important;
    overflow:visible!important;
    box-sizing:border-box!important;
  }
  #sales .cart-money-v1636>small{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    height:16px!important;
    min-height:16px!important;
    margin:0!important;
    line-height:16px!important;
    overflow:visible!important;
  }
  #sales .cart-money-v1636 strong{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    height:28px!important;
    min-height:28px!important;
    margin:0!important;
    padding:0!important;
    line-height:28px!important;
    white-space:nowrap!important;
    overflow:visible!important;
    text-overflow:clip!important;
    transform:none!important;
  }
  #sales .cart-money-v1636 strong span{
    display:inline!important;
    margin-inline-start:4px!important;
    line-height:inherit!important;
    vertical-align:baseline!important;
  }
  #sales .cart-total-v1636 strong{
    font-size:15px!important;
  }
  #sales .cart-remove-v1636{
    align-self:end!important;
    height:44px!important;
    min-height:44px!important;
    margin:0!important;
  }
}
@media (max-width:820px){
  #sales .cart-money-v1636{
    min-height:52px!important;
    height:auto!important;
    overflow:visible!important;
  }
  #sales .cart-money-v1636 strong{
    min-height:22px!important;
    line-height:1.35!important;
    overflow:visible!important;
  }
}


/* =========================================================
   HERMED v1.6.50 CART DIMENSIONS BALANCE / R5
   Final desktop geometry pass: compact premium proportions, no clipping.
   Presentation-only; no invoice/cart business-write semantics changed.
   ========================================================= */
@media (min-width:821px){
  #sales #cartLines{
    display:grid!important;
    gap:10px!important;
    width:100%!important;
    max-width:100%!important;
  }
  #sales .cart-item-v1636{
    width:100%!important;
    max-width:100%!important;
    min-height:0!important;
    padding:14px 16px!important;
    margin:0!important;
    gap:12px!important;
    border-radius:16px!important;
    overflow:visible!important;
  }
  #sales .cart-product-v1636{
    padding:0 2px 10px!important;
  }
  #sales .cart-product-head-v1636{
    justify-content:flex-start!important;
    align-items:center!important;
    gap:12px!important;
  }
  #sales .cart-product-copy-v1636{
    flex:0 1 auto!important;
    max-width:min(78%,980px)!important;
  }
  #sales .cart-product-copy-v1636>b{
    font-size:14px!important;
    line-height:1.4!important;
  }
  #sales .cart-meta-v1636{
    margin-top:5px!important;
    gap:8px!important;
  }
  #sales .cart-meta-v1636 code{
    max-width:70%!important;
    font-size:9px!important;
  }
  #sales .cart-meta-v1636 span{
    font-size:9px!important;
  }
  #sales .cart-stock-v1636{
    padding:5px 9px!important;
    font-size:9.5px!important;
  }
  #sales .cart-fefo-v1636{
    margin-top:6px!important;
    font-size:8.8px!important;
  }
  #sales .cart-controls-v1636{
    display:grid!important;
    grid-template-columns:minmax(280px,1fr) 190px 220px 52px!important;
    align-items:stretch!important;
    gap:12px!important;
    width:100%!important;
    max-width:1180px!important;
    margin-inline-start:auto!important;
    margin-inline-end:0!important;
  }
  #sales .cart-qty-block-v1636,
  #sales .cart-money-v1636{
    min-height:70px!important;
    height:70px!important;
    max-height:70px!important;
    box-sizing:border-box!important;
  }
  #sales .cart-qty-block-v1636{
    display:grid!important;
    grid-template-rows:18px 48px!important;
    gap:4px!important;
  }
  #sales .cart-qty-block-v1636>small,
  #sales .cart-money-v1636>small{
    height:18px!important;
    min-height:18px!important;
    margin:0!important;
    line-height:18px!important;
    font-size:9px!important;
    text-align:center!important;
  }
  #sales .cart-stepper-v1636{
    width:100%!important;
    height:48px!important;
    min-height:48px!important;
    grid-template-columns:44px minmax(64px,1fr) 44px!important;
    padding:3px!important;
    border-radius:12px!important;
  }
  #sales .cart-stepper-v1636 button{
    width:42px!important;
    height:40px!important;
    min-width:42px!important;
    min-height:40px!important;
    border-radius:9px!important;
    font-size:20px!important;
  }
  #sales .cart-stepper-v1636 input{
    height:40px!important;
    font-size:15px!important;
  }
  #sales .cart-money-v1636{
    display:grid!important;
    grid-template-rows:18px 34px!important;
    align-content:center!important;
    justify-items:center!important;
    gap:5px!important;
    padding:7px 10px!important;
    overflow:visible!important;
    border-radius:12px!important;
  }
  #sales .cart-money-v1636 strong{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    height:34px!important;
    min-height:34px!important;
    margin:0!important;
    padding:0!important;
    line-height:34px!important;
    font-size:15px!important;
    white-space:nowrap!important;
    overflow:visible!important;
    text-overflow:clip!important;
  }
  #sales .cart-total-v1636 strong{
    font-size:17px!important;
  }
  #sales .cart-remove-v1636{
    align-self:end!important;
    width:52px!important;
    min-width:52px!important;
    height:48px!important;
    min-height:48px!important;
    margin:0!important;
    border-radius:12px!important;
    font-size:22px!important;
  }
}
@media (min-width:821px) and (max-width:1180px){
  #sales .cart-controls-v1636{
    grid-template-columns:minmax(220px,1fr) 160px 180px 46px!important;
    gap:9px!important;
    max-width:100%!important;
  }
  #sales .cart-product-copy-v1636{max-width:85%!important}
  #sales .cart-remove-v1636{width:46px!important;min-width:46px!important}
}
@media (max-width:820px){
  #sales .cart-item-v1636{padding:12px!important;gap:10px!important}
  #sales .cart-controls-v1636{gap:8px!important}
  #sales .cart-money-v1636{min-height:56px!important;height:auto!important}
}

/* =========================================================
   HERMED v1.6.50 COMPACT INVOICE ITEMS / R1
   Replaces tall per-item cart cards with compact POS rows and a bounded
   scroll region. Presentation-only; quantity, FEFO and invoice writes unchanged.
   ========================================================= */
@media (min-width:821px){
  #sales #cartLines{
    display:grid!important;
    grid-auto-rows:max-content!important;
    gap:8px!important;
    width:100%!important;
    max-width:100%!important;
    max-height:430px!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    scrollbar-gutter:stable!important;
    padding:2px 6px 2px 2px!important;
  }
  #sales #cartLines::-webkit-scrollbar{width:9px!important}
  #sales #cartLines::-webkit-scrollbar-thumb{background:#c8dce8!important;border:2px solid transparent!important;background-clip:padding-box!important;border-radius:999px!important}
  #sales #cartLines::-webkit-scrollbar-track{background:transparent!important}

  #sales .cart-item-v1636{
    display:grid!important;
    grid-template-columns:minmax(300px,1.35fr) minmax(500px,1fr)!important;
    align-items:center!important;
    gap:12px!important;
    width:100%!important;
    max-width:100%!important;
    min-height:88px!important;
    margin:0!important;
    padding:10px 12px!important;
    border-radius:14px!important;
    overflow:hidden!important;
  }
  #sales .cart-product-v1636{
    min-width:0!important;
    padding:0!important;
    border-bottom:0!important;
    align-self:center!important;
  }
  #sales .cart-product-head-v1636{
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:10px!important;
    min-width:0!important;
  }
  #sales .cart-product-copy-v1636{
    min-width:0!important;
    max-width:none!important;
    flex:1 1 auto!important;
  }
  #sales .cart-product-copy-v1636>b{
    display:block!important;
    max-width:100%!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    font-size:12.5px!important;
    line-height:1.35!important;
  }
  #sales .cart-meta-v1636{
    display:flex!important;
    align-items:center!important;
    gap:7px!important;
    margin-top:3px!important;
    min-width:0!important;
  }
  #sales .cart-meta-v1636 code{
    max-width:66%!important;
    font-size:8px!important;
  }
  #sales .cart-meta-v1636 span{
    max-width:31%!important;
    font-size:8px!important;
  }
  #sales .cart-stock-v1636{
    flex:0 0 auto!important;
    padding:3px 7px!important;
    font-size:8.5px!important;
  }
  #sales .cart-fefo-v1636{
    display:flex!important;
    align-items:center!important;
    gap:6px!important;
    min-width:0!important;
    margin-top:4px!important;
    font-size:8px!important;
    line-height:1.25!important;
  }
  #sales .cart-fefo-v1636 span{flex:0 0 auto!important}
  #sales .cart-fefo-v1636 em{
    display:block!important;
    min-width:0!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }

  #sales .cart-controls-v1636{
    display:grid!important;
    grid-template-columns:minmax(170px,1fr) 118px 132px 42px!important;
    align-items:end!important;
    gap:8px!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
  }
  #sales .cart-qty-block-v1636,
  #sales .cart-money-v1636{
    height:58px!important;
    min-height:58px!important;
    max-height:58px!important;
  }
  #sales .cart-qty-block-v1636{
    grid-template-rows:14px 40px!important;
    gap:4px!important;
  }
  #sales .cart-qty-block-v1636>small,
  #sales .cart-money-v1636>small{
    height:14px!important;
    min-height:14px!important;
    line-height:14px!important;
    font-size:8px!important;
  }
  #sales .cart-stepper-v1636{
    height:40px!important;
    min-height:40px!important;
    grid-template-columns:36px minmax(42px,1fr) 36px!important;
    padding:2px!important;
    border-radius:10px!important;
  }
  #sales .cart-stepper-v1636 button{
    width:34px!important;
    min-width:34px!important;
    height:34px!important;
    min-height:34px!important;
    border-radius:8px!important;
    font-size:18px!important;
  }
  #sales .cart-stepper-v1636 input{
    height:34px!important;
    font-size:13px!important;
  }
  #sales .cart-money-v1636{
    grid-template-rows:14px 28px!important;
    align-content:center!important;
    gap:3px!important;
    padding:6px 7px!important;
    border-radius:10px!important;
  }
  #sales .cart-money-v1636 strong{
    height:28px!important;
    min-height:28px!important;
    line-height:28px!important;
    font-size:12.5px!important;
  }
  #sales .cart-total-v1636 strong{font-size:13.5px!important}
  #sales .cart-remove-v1636{
    align-self:end!important;
    width:40px!important;
    min-width:40px!important;
    height:40px!important;
    min-height:40px!important;
    border-radius:10px!important;
    font-size:19px!important;
  }
}

@media (min-width:821px) and (max-width:1180px){
  #sales #cartLines{max-height:390px!important}
  #sales .cart-item-v1636{
    grid-template-columns:minmax(230px,.95fr) minmax(430px,1.2fr)!important;
    gap:9px!important;
    padding:9px 10px!important;
  }
  #sales .cart-controls-v1636{
    grid-template-columns:minmax(145px,1fr) 105px 116px 38px!important;
    gap:6px!important;
  }
  #sales .cart-product-copy-v1636>b{font-size:11px!important}
  #sales .cart-remove-v1636{width:38px!important;min-width:38px!important}
}

@media (max-width:820px){
  #sales #cartLines{
    max-height:55vh!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    scrollbar-gutter:stable!important;
  }
  #sales .cart-item-v1636{margin:0 0 8px!important}
}

/* =========================================================
   HERMED v1.6.50 COMPACT CART ROWS / R2
   Final POS density pass: product identity + quantity + unit + line total + delete
   must fit inside the invoice workspace with no horizontal clipping.
   Presentation-only; cart quantity, FEFO, totals and invoice writes unchanged.
   ========================================================= */
@media (min-width:821px){
  #sales #cartLines{
    max-height:340px!important;
    gap:7px!important;
    padding:2px 4px 2px 2px!important;
  }
  #sales .cart-item-v1636{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(370px,430px)!important;
    align-items:center!important;
    gap:10px!important;
    min-height:68px!important;
    height:auto!important;
    padding:8px 10px!important;
    margin:0!important;
    border-radius:12px!important;
    overflow:hidden!important;
  }
  #sales .cart-product-v1636{
    min-width:0!important;
    padding:0!important;
    border:0!important;
    align-self:center!important;
  }
  #sales .cart-product-head-v1636{gap:8px!important;align-items:center!important}
  #sales .cart-product-copy-v1636>b{
    font-size:11.5px!important;
    line-height:1.3!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  #sales .cart-meta-v1636{margin-top:2px!important;gap:5px!important}
  #sales .cart-meta-v1636 code{font-size:7.7px!important;max-width:68%!important}
  #sales .cart-meta-v1636 span{font-size:7.7px!important;max-width:30%!important}
  #sales .cart-stock-v1636{padding:3px 6px!important;font-size:8px!important}
  #sales .cart-fefo-v1636{margin-top:2px!important;font-size:7.5px!important;gap:5px!important}

  #sales .cart-controls-v1636{
    display:grid!important;
    grid-template-columns:minmax(145px,1fr) 88px 104px 34px!important;
    align-items:center!important;
    gap:6px!important;
    width:100%!important;
    max-width:430px!important;
    min-width:0!important;
    margin:0!important;
  }
  #sales .cart-controls-v1636>*{min-width:0!important}
  #sales .cart-qty-block-v1636,
  #sales .cart-money-v1636{
    height:52px!important;
    min-height:52px!important;
    max-height:52px!important;
  }
  #sales .cart-qty-block-v1636{
    display:grid!important;
    grid-template-rows:12px 36px!important;
    gap:3px!important;
  }
  #sales .cart-qty-block-v1636>small,
  #sales .cart-money-v1636>small{
    height:12px!important;
    min-height:12px!important;
    line-height:12px!important;
    margin:0!important;
    font-size:7.4px!important;
    text-align:center!important;
  }
  #sales .cart-stepper-v1636{
    height:36px!important;
    min-height:36px!important;
    grid-template-columns:32px minmax(40px,1fr) 32px!important;
    padding:2px!important;
    border-radius:9px!important;
  }
  #sales .cart-stepper-v1636 button{
    width:30px!important;
    min-width:30px!important;
    height:30px!important;
    min-height:30px!important;
    border-radius:7px!important;
    font-size:16px!important;
  }
  #sales .cart-stepper-v1636 input{height:30px!important;font-size:12px!important}
  #sales .cart-money-v1636{
    display:grid!important;
    grid-template-rows:12px 28px!important;
    align-content:center!important;
    justify-items:center!important;
    gap:2px!important;
    padding:5px 6px!important;
    border-radius:9px!important;
    overflow:hidden!important;
  }
  #sales .cart-money-v1636 strong{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    height:28px!important;
    min-height:28px!important;
    line-height:28px!important;
    font-size:11px!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  #sales .cart-total-v1636 strong{font-size:12px!important}
  #sales .cart-remove-v1636{
    align-self:center!important;
    width:34px!important;
    min-width:34px!important;
    height:34px!important;
    min-height:34px!important;
    margin:0!important;
    border-radius:8px!important;
    font-size:17px!important;
  }
}
@media (min-width:821px) and (max-width:1180px){
  #sales .cart-item-v1636{grid-template-columns:minmax(0,1fr) minmax(345px,390px)!important;gap:7px!important;padding:7px 8px!important}
  #sales .cart-controls-v1636{grid-template-columns:minmax(132px,1fr) 82px 94px 32px!important;max-width:390px!important;gap:5px!important}
  #sales .cart-product-copy-v1636>b{font-size:10.5px!important}
  #sales .cart-meta-v1636 code,#sales .cart-meta-v1636 span{font-size:7.2px!important}
  #sales .cart-remove-v1636{width:32px!important;min-width:32px!important;height:32px!important;min-height:32px!important}
}


/* HERMED v1.6.50 DRAFT INVOICE PREVIEW / PRE-COMMIT REVIEW */
.draft-preview-btn-v1644{display:flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;border-color:#b9d9ee!important;background:#f5fbff!important;color:#0d639f!important;font-weight:850!important}
.draft-preview-btn-v1644:hover{background:#eaf6ff!important;border-color:#91c6e7!important}
.draft-preview-btn-v1644:disabled{opacity:.5!important;cursor:not-allowed!important}
.invoice-draft-banner-v1644{margin:0 0 10px;padding:8px 10px;border:1px solid #f1d89b;border-radius:9px;background:#fff8e8;color:#765317;display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:7.8px}
.invoice-draft-banner-v1644 b{font-size:8.5px;color:#9a6700;white-space:nowrap}.invoice-draft-banner-v1644 span{line-height:1.5}
@media(max-width:700px){.invoice-draft-banner-v1644{align-items:flex-start;flex-direction:column}}


/* HERMED v1.6.50 INVOICE ENGINE — discount/offer pricing + accounting summary */
.sale-pricing-v1645{display:grid;grid-template-columns:minmax(170px,.8fr) minmax(150px,.7fr) minmax(240px,1.2fr);gap:12px;align-items:end;margin:12px 0;padding:12px;border:1px solid #dcecf6;border-radius:16px;background:#f8fcff}.sale-pricing-hint-v1645{grid-column:1/-1;padding:8px 10px;border-radius:10px;background:#edf8ff;color:#286785;font-size:12px}.sale-pricing-hint-v1645.is-error{background:#fff2f1;color:#a33}.summary-box .discount-v1645 b{color:#b34b4b}.invoice-total-v1645 b{display:block}.invoice-total-v1645 small{display:block;margin-top:2px;color:#a35a5a;font-size:10px}.invoice-items-v1645 th:nth-child(1),.invoice-items-v1645 td:nth-child(1){width:6%!important}.invoice-items-v1645 th:nth-child(2),.invoice-items-v1645 td:nth-child(2){width:28%!important}.invoice-items-v1645 th:nth-child(3),.invoice-items-v1645 td:nth-child(3){width:17%!important}.invoice-items-v1645 th:nth-child(4),.invoice-items-v1645 td:nth-child(4){width:10%!important}.invoice-items-v1645 th:nth-child(5),.invoice-items-v1645 td:nth-child(5){width:14%!important}.invoice-items-v1645 th:nth-child(6),.invoice-items-v1645 td:nth-child(6){width:12%!important}.invoice-items-v1645 th:nth-child(7),.invoice-items-v1645 td:nth-child(7){width:13%!important}.invoice-total-row.discount-v1645{color:#a34d4d;background:#fffafa}@media(max-width:900px){.sale-pricing-v1645{grid-template-columns:1fr 1fr}.sale-pricing-v1645 .sale-offer-field-v1645{grid-column:1/-1}}@media(max-width:620px){.sale-pricing-v1645{grid-template-columns:1fr}}

/* HERMED v1.6.50 PRINT / PDF PARITY R1 — standalone A5 document waits for fonts/images; numeric print cells never wrap. */

/* HERMED v1.6.50 PRINT/PDF 7-COLUMN A5 TABLE FIT R2 */
.invoice-items-v1645 td:nth-child(4),.invoice-items-v1645 td:nth-child(5),.invoice-items-v1645 td:nth-child(6),.invoice-items-v1645 td:nth-child(7){white-space:nowrap!important;font-variant-numeric:tabular-nums!important}

/* =========================================================
   HERMED v1.6.50 INVOICE ACCOUNTING DIRECTION / R1
   Accounting-first reading order on A5 preview, Print and PDF:
   serial at far left, net line total at far right, totals box at bottom-right.
   ========================================================= */
.invoice-accounting-direction-v1648{direction:rtl!important}
.invoice-accounting-direction-v1648 th:nth-child(1),.invoice-accounting-direction-v1648 td:nth-child(1){width:13%!important;text-align:right!important}
.invoice-accounting-direction-v1648 th:nth-child(2),.invoice-accounting-direction-v1648 td:nth-child(2){width:12%!important;text-align:right!important}
.invoice-accounting-direction-v1648 th:nth-child(3),.invoice-accounting-direction-v1648 td:nth-child(3){width:14%!important;text-align:right!important}
.invoice-accounting-direction-v1648 th:nth-child(4),.invoice-accounting-direction-v1648 td:nth-child(4){width:10%!important;text-align:center!important}
.invoice-accounting-direction-v1648 th:nth-child(5),.invoice-accounting-direction-v1648 td:nth-child(5){width:17%!important;text-align:left!important}
.invoice-accounting-direction-v1648 th:nth-child(6),.invoice-accounting-direction-v1648 td:nth-child(6){width:28%!important;text-align:left!important}
.invoice-accounting-direction-v1648 th:nth-child(7),.invoice-accounting-direction-v1648 td:nth-child(7){width:6%!important;text-align:center!important}
.invoice-accounting-direction-v1648 td:nth-child(1),.invoice-accounting-direction-v1648 td:nth-child(2),.invoice-accounting-direction-v1648 td:nth-child(3),.invoice-accounting-direction-v1648 td:nth-child(4),.invoice-accounting-direction-v1648 td:nth-child(7){white-space:nowrap!important;overflow-wrap:normal!important;word-break:normal!important;font-variant-numeric:tabular-nums!important}
.invoice-summary-v1648{display:grid!important;grid-template-columns:56% 1fr!important;direction:rtl!important;gap:10px!important;align-items:start!important}
.invoice-total-box-v1648{grid-column:1!important;justify-self:stretch!important;margin:0!important}
.invoice-summary-space-v1648{grid-column:2!important;min-width:0!important}
.invoice-total-box-v1648 .invoice-total-row{direction:rtl!important}
.invoice-total-box-v1648 .invoice-total-row>b{direction:ltr!important;unicode-bidi:embed!important;font-variant-numeric:tabular-nums!important}
@media(max-width:700px){.invoice-summary-v1648{grid-template-columns:1fr!important}.invoice-total-box-v1648,.invoice-summary-space-v1648{grid-column:1!important}}



/* =========================================================
   HERMED v1.6.50 INVOICE TABLE LEGIBILITY / R2
   Robust 7-column preview: product and batch wrap inside their cells;
   numeric columns remain compact and never overlap.
   ========================================================= */
.invoice-table-legibility-v1649{table-layout:fixed!important;width:100%!important;max-width:100%!important;min-width:0!important;direction:rtl!important}
.invoice-table-legibility-v1649 th,.invoice-table-legibility-v1649 td{box-sizing:border-box!important;min-width:0!important;max-width:none!important;overflow:hidden!important;text-overflow:clip!important}
.invoice-table-legibility-v1649 th:nth-child(1),.invoice-table-legibility-v1649 td:nth-child(1){width:14%!important;text-align:right!important;white-space:nowrap!important}
.invoice-table-legibility-v1649 th:nth-child(2),.invoice-table-legibility-v1649 td:nth-child(2){width:10%!important;text-align:right!important;white-space:nowrap!important}
.invoice-table-legibility-v1649 th:nth-child(3),.invoice-table-legibility-v1649 td:nth-child(3){width:13%!important;text-align:right!important;white-space:nowrap!important}
.invoice-table-legibility-v1649 th:nth-child(4),.invoice-table-legibility-v1649 td:nth-child(4){width:8%!important;text-align:center!important;white-space:nowrap!important}
.invoice-table-legibility-v1649 th:nth-child(5),.invoice-table-legibility-v1649 td:nth-child(5){width:20%!important;text-align:left!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:break-word!important;line-height:1.4!important}
.invoice-table-legibility-v1649 th:nth-child(6),.invoice-table-legibility-v1649 td:nth-child(6){width:28%!important;text-align:left!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:break-word!important;line-height:1.4!important}
.invoice-table-legibility-v1649 th:nth-child(7),.invoice-table-legibility-v1649 td:nth-child(7){width:7%!important;text-align:center!important;white-space:nowrap!important}
.invoice-table-legibility-v1649 td:nth-child(5),.invoice-table-legibility-v1649 td:nth-child(6){font-size:7.45px!important;vertical-align:top!important;direction:ltr!important;unicode-bidi:embed!important}
.invoice-table-legibility-v1649 tbody tr{height:auto!important;min-height:0!important}
.invoice-summary-v1648{width:100%!important}
.invoice-total-box-v1648{max-width:none!important}
@media(max-width:700px){.invoice-table-legibility-v1649 td:nth-child(5),.invoice-table-legibility-v1649 td:nth-child(6){font-size:7px!important}}


/* HERMED v1.6.57 REFRESH AUTH/ROUTE BOOT GATE / R1
   Prevent Login/Dashboard flash while an existing session and saved route are restored. */
.hermed-boot-gate{display:none;position:fixed;inset:0;z-index:2147483000;background:var(--bg,#f4f7fb);align-items:center;justify-content:center;direction:rtl}
body.hermed-boot-pending #login,body.hermed-boot-pending .app{visibility:hidden!important;pointer-events:none!important}
body.hermed-boot-pending .hermed-boot-gate{display:flex}
.hermed-boot-gate-card{min-width:220px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:24px 28px;border-radius:18px;background:#fff;box-shadow:0 14px 44px rgba(29,48,76,.10);font-family:Cairo,Arial,sans-serif;color:#53657a}
.hermed-boot-gate-logo{font-family:Alexandria,Cairo,Arial,sans-serif;font-weight:800;letter-spacing:.08em;color:#1b6ca8;font-size:22px}
.hermed-boot-gate-spinner{width:28px;height:28px;border:3px solid rgba(27,108,168,.16);border-top-color:#1b6ca8;border-radius:50%;animation:hermedBootSpinV1657 .72s linear infinite}
.hermed-boot-gate-card small{font-size:12px;font-weight:700}
@keyframes hermedBootSpinV1657{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.hermed-boot-gate-spinner{animation-duration:1.5s}}


/* HERMED v1.6.59 HARD FIRST-PAINT ROUTE GATE / R1 — backup to inline critical gate */
body.hermed-hard-boot-pending-v1658{overflow:hidden!important}
body.hermed-hard-boot-pending-v1658 #login,body.hermed-hard-boot-pending-v1658 .app{display:none!important;visibility:hidden!important;pointer-events:none!important}
body.hermed-hard-boot-pending-v1658 #hermedBootGate{display:flex!important;visibility:visible!important;z-index:2147483646!important}
