/* HERMED emergency rollback local font preamble. Font binaries remain fetched from the live generic /assets/fonts paths during build; no font files are packaged here. */
@font-face{font-family:'Cairo';font-style:normal;font-display:swap;font-weight:200 1000;src:url('/assets/fonts/cairo-arabic-wght-normal.woff2') format('woff2');unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF}
@font-face{font-family:'Cairo';font-style:normal;font-display:swap;font-weight:200 1000;src:url('/assets/fonts/cairo-latin-ext-wght-normal.woff2') format('woff2');unicode-range:U+0100-024F,U+1E00-1EFF}
@font-face{font-family:'Cairo';font-style:normal;font-display:swap;font-weight:200 1000;src:url('/assets/fonts/cairo-latin-wght-normal.woff2') format('woff2');unicode-range:U+0000-00FF}
@font-face{font-family:'Alexandria';font-style:normal;font-display:swap;font-weight:100 900;src:url('/assets/fonts/alexandria-arabic-wght-normal.woff2') format('woff2');unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF}
@font-face{font-family:'Alexandria';font-style:normal;font-display:swap;font-weight:100 900;src:url('/assets/fonts/alexandria-vietnamese-wght-normal.woff2') format('woff2');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}
@font-face{font-family:'Alexandria';font-style:normal;font-display:swap;font-weight:100 900;src:url('/assets/fonts/alexandria-latin-ext-wght-normal.woff2') format('woff2');unicode-range:U+0100-024F,U+1E00-1EFF}
@font-face{font-family:'Alexandria';font-style:normal;font-display:swap;font-weight:100 900;src:url('/assets/fonts/alexandria-latin-wght-normal.woff2') format('woff2');unicode-range:U+0000-00FF}

/* =====================================================================
   HERMED 1.6.88 — PAGE-BY-PAGE REBUILD R1
   Clean presentation layer rebuilt page-by-page.
   ===================================================================== */

:root{
  --h-bg:#f4f7fa;
  --h-surface:#ffffff;
  --h-surface-soft:#f8fafc;
  --h-border:#dbe5ec;
  --h-border-soft:#e9eff4;
  --h-text:#1b3850;
  --h-title:#0b3556;
  --h-muted:#71879a;
  --h-primary:#0876bd;
  --h-primary-2:#075d97;
  --h-primary-soft:#edf6fb;
  --h-sidebar:#083b5b;
  --h-sidebar-2:#062f49;
  --h-success:#0b8664;
  --h-success-soft:#e8f6f1;
  --h-warning:#a96500;
  --h-warning-soft:#fff3dc;
  --h-danger:#c93b3b;
  --h-danger-soft:#fff0f0;
  --h-info:#0a70b2;
  --h-info-soft:#ebf5fb;
  --h-neutral:#657b8d;
  --h-neutral-soft:#eef2f5;
  --h-radius:14px;
  --h-radius-sm:10px;
  --h-shadow:0 7px 22px rgba(13,47,72,.055);
  --h-sidebar-w:228px;
  --h-topbar-h:66px;
  --h-content-max:1640px;
}

*{box-sizing:border-box}
html{background:var(--h-bg);max-width:100%;overflow-x:hidden}
body{margin:0;background:var(--h-bg);color:var(--h-text);font-family:"Cairo","Tahoma","Segoe UI",Arial,sans-serif;font-size:13.5px;line-height:1.5;max-width:100%;overflow-x:hidden}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
a{color:inherit}
svg{display:block}
.hidden{display:none!important}
.ltr{direction:ltr;text-align:left}
.muted{color:var(--h-muted)}
.empty{padding:28px!important;text-align:center!important;color:var(--h-muted)!important}
.svg-sprite{position:absolute!important;width:0!important;height:0!important;overflow:hidden!important}

/* boot / auth -------------------------------------------------------- */
.hermed-boot-gate{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;background:var(--h-bg)}
.hermed-boot-gate-card{min-width:260px;padding:30px 34px;display:grid;gap:12px;justify-items:center;background:#fff;border:1px solid var(--h-border);border-radius:20px;box-shadow:var(--h-shadow)}
.hermed-boot-gate-logo{font-size:28px;font-weight:900;letter-spacing:.04em;color:var(--h-title)}
.hermed-boot-gate-spinner,.loading-spinner{width:28px;height:28px;border-radius:50%;border:3px solid #dcebf5;border-top-color:var(--h-primary);animation:hspin .8s linear infinite}
@keyframes hspin{to{transform:rotate(360deg)}}

.login{min-height:100dvh;display:grid;place-items:center;padding:24px;background:linear-gradient(145deg,#eef5fb 0%,#f8fbfd 55%,#eef6fb 100%)}
.hermed-exact-stage{width:min(1160px,100%);min-height:650px;display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,470px);overflow:hidden;background:#fff;border:1px solid var(--h-border);border-radius:26px;box-shadow:0 25px 70px rgba(8,48,80,.11)}
.hermed-exact-left{display:grid;place-items:center;padding:46px;background:#fff}
.hermed-exact-card{width:min(430px,100%);display:grid;gap:22px}
.hermed-exact-logo .logo-img{display:block;width:210px;height:74px;margin:auto;background-size:contain;background-repeat:no-repeat;background-position:center}
.hermed-exact-title{text-align:center}.hermed-exact-title h1{margin:0;color:var(--h-title);font-size:31px}.hermed-exact-title p{margin:5px 0 0;color:var(--h-muted)}
.hermed-exact-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:5px;background:#f1f6fa;border-radius:14px}
.hermed-exact-tab{height:42px;display:flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:10px;background:transparent;color:#6c8295;font-weight:800}.hermed-exact-tab svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7}.hermed-exact-tab.active{background:#fff;color:var(--h-primary);box-shadow:0 3px 12px rgba(10,68,106,.08)}
.hermed-field{display:grid;gap:7px}.hermed-field label{font-weight:800;color:#385a73}.hermed-input-wrap{position:relative}.hermed-input-wrap input,.hermed-field input,.hermed-field select{width:100%;height:48px;padding:0 44px 0 14px;border:1px solid var(--h-border);border-radius:12px;background:#fbfdfe;outline:none}.hermed-input-wrap input:focus,.hermed-field input:focus{border-color:#8fc4e8;box-shadow:0 0 0 4px rgba(8,117,201,.08);background:#fff}.hermed-input-icon{position:absolute;right:14px;top:50%;transform:translateY(-50%);width:19px;height:19px;color:#7a91a5}.hermed-pass-eye{position:absolute;left:10px;top:50%;transform:translateY(-50%);border:0;background:transparent;color:#7890a4;padding:8px}
.hermed-exact-options{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:12px;color:#657e91}.hermed-exact-submit{width:100%;height:48px;border:0;border-radius:12px;background:linear-gradient(135deg,var(--h-primary),var(--h-primary-2));color:#fff;font-weight:900;box-shadow:0 10px 24px rgba(8,101,177,.18)}
.hermed-exact-hero{position:relative;overflow:hidden;padding:52px;background:linear-gradient(145deg,#0b5d9d,#0b3f69);color:#fff;display:flex;align-items:flex-end}.hermed-exact-hero:before,.hermed-exact-hero:after{content:"";position:absolute;border-radius:50%;border:1px solid rgba(255,255,255,.12)}.hermed-exact-hero:before{width:520px;height:520px;right:-160px;top:-170px}.hermed-exact-hero:after{width:330px;height:330px;left:-120px;bottom:-100px}.hermed-hero-inner{position:relative;z-index:1;max-width:500px}.hermed-hero-copy h2{font-size:36px;margin:0 0 10px}.hermed-hero-copy p{color:#c9e3f4;line-height:1.8}.auth-feedback{min-height:22px;color:var(--h-danger);font-size:12px}.auth-progress{height:4px;border-radius:4px;background:#e6eef4;overflow:hidden}.auth-progress:before{content:"";display:block;width:45%;height:100%;background:var(--h-primary)}

/* app shell ---------------------------------------------------------- */
.app{min-height:100vh;background:var(--h-bg);direction:rtl}
.sidebar{position:fixed;z-index:50;top:0;right:0;bottom:0;width:var(--h-sidebar-w);padding:14px 11px 12px;overflow-y:auto;overflow-x:hidden;background:linear-gradient(180deg,var(--h-sidebar-2),var(--h-sidebar));color:#eaf5fc;border-left:1px solid rgba(255,255,255,.06);box-shadow:-8px 0 24px rgba(3,36,58,.08);transition:transform .2s ease,width .2s ease}
.side-brand{min-height:70px;display:grid;place-items:center;margin-bottom:14px;padding:9px;background:#fff;border-radius:17px;box-shadow:0 8px 20px rgba(0,22,39,.12)}
.side-brand .logo-img{width:166px;height:54px;background-size:contain;background-position:center;background-repeat:no-repeat}.side-brand small{display:none}
.nav-title{padding:8px 11px 5px;color:#8eb1c9;font-size:10px;font-weight:800;letter-spacing:.04em}.nav{display:grid;gap:5px}.nav button{width:100%;min-height:42px;padding:0 12px;display:flex;align-items:center;justify-content:flex-start;gap:10px;border:1px solid transparent;border-radius:11px;background:transparent;color:#d6e8f4;font-weight:750;text-align:right}.nav button .icon,.nav button svg{width:20px;height:20px;flex:0 0 20px;fill:none;stroke:currentColor;stroke-width:1.7;color:#aac8dc}.nav button:hover{background:rgba(255,255,255,.07);color:#fff}.nav button.active,.nav button[aria-current="page"]{background:linear-gradient(90deg,rgba(35,139,207,.33),rgba(27,116,177,.18));border-color:rgba(97,193,247,.35);color:#fff;box-shadow:inset -3px 0 0 #5dc5ff}.nav-badge{margin-inline-start:auto;min-width:24px;height:24px;padding:0 7px;display:grid;place-items:center;border-radius:999px;background:#8fd8ff;color:#06456d;font-size:10px;font-weight:900}.side-foot{margin-top:16px;padding:14px 8px 0;border-top:1px solid rgba(255,255,255,.10);color:#87a9be;font-size:9px;line-height:1.7}
.main{min-width:0;margin-right:var(--h-sidebar-w);background:var(--h-bg);transition:margin-right .2s ease}
.sidebar-toggle-v1635{position:fixed;z-index:70;top:18px;right:calc(var(--h-sidebar-w) - 20px);width:42px;height:42px;padding:0;display:grid;place-items:center;border:1px solid #d8e5ee;border-radius:12px;background:#fff;color:var(--h-primary);box-shadow:0 7px 18px rgba(8,48,78,.10);transition:right .2s ease}.sidebar-toggle-text{display:none}.sidebar-toggle-glyph{font-size:26px;line-height:1}
.app.sidebar-collapsed-v1635 .sidebar{transform:translateX(103%)}.app.sidebar-collapsed-v1635 .main{margin-right:0}.app.sidebar-collapsed-v1635 .sidebar-toggle-v1635{right:18px}
.topbar{position:sticky;z-index:40;top:0;height:var(--h-topbar-h);display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 24px;background:rgba(255,255,255,.96);border-bottom:1px solid #e2eaf0;backdrop-filter:blur(10px)}
.topbar-start{display:flex;align-items:center;gap:14px;flex:1 1 auto;min-width:0}.search{width:min(690px,60vw);margin-inline:auto}.search input{width:100%;height:41px;padding:0 16px;border:1px solid #dde7ef;border-radius:12px;background:#f9fbfd;outline:none;color:#334f65}.search input:focus{background:#fff;border-color:#91c3e5;box-shadow:0 0 0 4px rgba(8,117,201,.07)}
.top-actions{display:flex;align-items:center;gap:9px}.userchip{min-width:210px;max-width:300px;height:46px;padding:5px 11px;display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:9px;align-items:center;border:1px solid #dfe8ef;border-radius:12px;background:#fff}.userchip .avatar{grid-row:1/3;width:34px;height:34px;border-radius:10px;background:#eaf4fb;color:var(--h-primary);display:grid;place-items:center;font-weight:900}.userchip b{font-size:12px}.userchip small{max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#8da0ae;font-size:9px}.sync-status{height:42px;padding:0 13px;display:flex;align-items:center;gap:7px;border:1px solid #cde7da;border-radius:12px;background:#eefaf5;color:#138260;font-weight:800}.live-chip,.inline-dot{width:8px;height:8px;border-radius:50%;background:#21a977;box-shadow:0 0 0 4px rgba(33,169,119,.12)}
.content{width:100%;max-width:var(--h-content-max);margin:0 auto;padding:24px 24px 52px;overflow-x:hidden}.view{display:none}.view.active{display:block}

/* common hierarchy -------------------------------------------------- */
.head,.invoice-browser-head{min-height:70px;margin:0 0 15px;padding-inline-start:4px;padding-inline-end:52px;display:flex;align-items:center;justify-content:space-between;gap:20px}.head>div:first-child,.invoice-browser-head>div:first-child{min-width:0}.head h2,.invoice-browser-head h2{margin:0;color:var(--h-title);font-size:clamp(27px,2vw,34px);line-height:1.18;font-weight:900;letter-spacing:-.035em}.head p,.invoice-browser-head p{margin:7px 0 0;color:#7e94a6;font-size:11.5px}.head-actions{display:flex;align-items:center;justify-content:flex-start;gap:8px;flex-wrap:wrap}
.card,.panel,.permission-note,.offline-banner{background:var(--h-surface);border:1px solid var(--h-border);border-radius:var(--h-radius);box-shadow:var(--h-shadow)}
.permission-note{padding:14px 16px;margin-bottom:16px;color:#5f778b;background:#fbfdfe;line-height:1.75}.permission-note strong{color:var(--h-title)}
.offline-banner{padding:14px 16px;margin-bottom:16px;background:#fff8e9;border-color:#f1d99c;color:#8c651b}
.toolbar,.invoice-filters{margin:0 0 16px;padding:11px;display:flex;align-items:end;gap:10px;flex-wrap:wrap;background:#fff;border:1px solid var(--h-border);border-radius:15px}.toolbar input,.toolbar select,.invoice-filters input,.invoice-filters select,.report-period{height:42px;padding:0 13px;border:1px solid #dbe6ee;border-radius:11px;background:#fbfdfe;outline:none}.toolbar input:focus,.toolbar select:focus,.invoice-filters input:focus,.invoice-filters select:focus{background:#fff;border-color:#8ec1e5;box-shadow:0 0 0 4px rgba(8,117,201,.06)}.toolbar .grow{flex:1 1 360px;min-width:230px}.filter-grid{display:grid;grid-template-columns:repeat(5,minmax(130px,1fr));gap:10px;width:100%}.filter-grid .field{min-width:0}.filter-reset{margin-inline-start:auto}
.field{display:grid;gap:6px}.field label{color:#516d83;font-size:11px;font-weight:800}.field input,.field select,.field textarea{width:100%;min-width:0;border:1px solid #dbe6ee;border-radius:11px;background:#fbfdfe;outline:none}.field input,.field select{height:42px;padding:0 12px}.field textarea{min-height:94px;padding:10px 12px;resize:vertical}.field input:focus,.field select:focus,.field textarea:focus{background:#fff;border-color:#8ec1e5;box-shadow:0 0 0 4px rgba(8,117,201,.06)}.form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.form .full{grid-column:1/-1}.compact-form{display:grid;gap:9px}

.btn{min-height:38px;padding:7px 13px;display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid transparent;border-radius:11px;background:#fff;color:#35546d;font-weight:850;white-space:nowrap;box-shadow:none}.btn svg,.btn .icon{width:18px;height:18px}.btn.primary,.primary{background:linear-gradient(135deg,var(--h-primary),var(--h-primary-2));border-color:transparent;color:#fff;box-shadow:0 8px 20px rgba(8,101,177,.16)}.btn.soft,.soft{background:var(--h-primary-soft);border-color:#d5e9f7;color:#0863ad}.btn.ghost,.ghost{background:#fff;border-color:#d9e4ec;color:#526e84}.btn:hover{filter:brightness(.985)}.btn:disabled{opacity:.5;cursor:not-allowed}.btn.xs{min-height:32px;padding:5px 10px;border-radius:9px;font-size:11px}.icon-btn{width:38px;height:38px;padding:0;border:1px solid var(--h-border);border-radius:10px;background:#fff;display:grid;place-items:center;color:#597388}.icon-btn svg{width:18px;height:18px}
.pill,.status-chip,.price-badge,.locked,.read-done,.sev{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:26px;padding:3px 9px;border-radius:999px;background:var(--h-neutral-soft);color:#61788a;font-size:10px;font-weight:850;white-space:nowrap}.pill.ok,.ok{background:var(--h-success-soft);color:var(--h-success)}.pill.warn,.warn,.sev.warn{background:var(--h-warning-soft);color:var(--h-warning)}.pill.alert,.alert,.sev.error{background:var(--h-danger-soft);color:var(--h-danger)}.pill.info,.info{background:var(--h-info-soft);color:var(--h-info)}.pill.neutral,.neutral{background:var(--h-neutral-soft);color:var(--h-neutral)}

/* KPI and cards ------------------------------------------------------ */
.kpis,.cards-3,.report-kpis,.stat-strip{display:grid;gap:14px;margin-bottom:16px}.kpis{grid-template-columns:repeat(4,minmax(0,1fr))}.cards-3,.stat-strip{grid-template-columns:repeat(3,minmax(0,1fr))}.report-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}.kpi,.cards-3>div,.stat-strip>div,.report-kpis>.kpi,.report-kpis>div{min-height:112px;padding:17px 18px;display:flex;flex-direction:column;justify-content:space-between;background:#fff;border:1px solid var(--h-border);border-radius:var(--h-radius);box-shadow:var(--h-shadow)}.kpi-top{display:flex;align-items:center;justify-content:space-between;gap:12px}.kpi-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:12px;background:#edf6fc;color:#4b7593}.kpi-icon svg{width:22px;height:22px}.kpi span,.cards-3>div span,.stat-strip>div span,.report-kpis>div span{color:#6e879a;font-size:12px;font-weight:800}.kpi b,.cards-3>div b,.stat-strip>div b,.report-kpis>div b{color:#0e4168;font-size:27px;line-height:1.1;font-weight:900}.kpi small{color:#97a8b5;font-size:10px}
.two,.report-two,.system-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}.panel{padding:16px 17px}.panel-title-row,.section-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.panel-title-row h3,.section-title-row h3,.panel h3{margin:0;color:var(--h-title);font-size:18px}.section-label{color:#7890a3;font-size:11px;font-weight:800}.summary-box{padding:14px;border:1px solid var(--h-border-soft);border-radius:13px;background:#fbfdfe}.metric{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 0;border-bottom:1px solid var(--h-border-soft)}.metric:last-child{border-bottom:0}.metric span{color:#708799}.metric b{color:var(--h-title)}

/* tables ------------------------------------------------------------- */
.table-card{overflow:hidden;background:#fff;border:1px solid var(--h-border);border-radius:14px;box-shadow:var(--h-shadow)}
.table-card table,.master-table,.inventory-table,.invoice-table-v1636,.quota-table{width:100%;max-width:100%;border-collapse:separate;border-spacing:0;table-layout:auto;background:#fff}
.table-card thead th,.table-card tbody td,.master-table th,.master-table td,.invoice-table-v1636 th,.invoice-table-v1636 td{vertical-align:middle;border-bottom:1px solid var(--h-border-soft)}
.table-card thead th,.master-table thead th,.invoice-table-v1636 thead th{height:46px;padding:9px 10px;background:#f7f9fb;color:#547086;font-size:10.5px;font-weight:900;text-align:right;white-space:nowrap;line-height:1.3}
.table-card tbody td,.master-table tbody td,.invoice-table-v1636 tbody td{padding:11px 10px;color:#193d5a;font-size:12.25px;line-height:1.45;white-space:normal;word-break:normal;overflow-wrap:normal}
.table-card tbody tr:last-child td,.master-table tbody tr:last-child td,.invoice-table-v1636 tbody tr:last-child td{border-bottom:0}
.table-card tbody tr:hover,.master-table tbody tr:hover,.invoice-table-v1636 tbody tr:hover{background:#fbfdff}
.table-card b,.master-table b,.invoice-table-v1636 b{color:#083e67;font-weight:900}
.table-card small,.master-table small,.invoice-table-v1636 small{display:block;margin-top:2px;color:#8aa0b1;font-size:9.5px;line-height:1.35}
.master-id-cell{white-space:normal;word-break:normal;overflow-wrap:normal}
.product-cell,.customer-cell,.message-cell,.master-name-cell{min-width:0}
.product-cell b,.customer-cell b,.message-cell b,.master-name-cell b{display:block}
.actions-cell,.invoice-actions,.row-actions{display:flex;align-items:center;gap:5px;flex-wrap:wrap;justify-content:flex-start}
.invoice-actions{display:flex;max-width:220px}
.invoice-actions .btn{width:auto}
.table-pager,.pager,.invoice-pager,.audit-pagination-shell{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:10px 12px;margin-top:9px;border:1px solid var(--h-border);border-radius:12px;background:#fff}
.audit-pagination-actions{display:flex;gap:7px}.audit-pagination-meta{color:#6d8698;font-size:11px}

/* semantic responsive column priorities — never nth-child sizing */
th[data-r43-priority="low"],td[data-r43-priority="low"],th[data-r43-priority="secondary"],td[data-r43-priority="secondary"]{transition:opacity .12s ease}
/* dashboard ---------------------------------------------------------- */
.dashboard-hero{min-height:218px;margin-bottom:18px;padding:28px 30px;display:grid;grid-template-columns:minmax(0,1.3fr) minmax(240px,.7fr);gap:22px;align-items:center;overflow:hidden;position:relative;border-radius:24px;background:linear-gradient(135deg,#0a4779 0%,#0874c7 100%);color:#fff;box-shadow:0 16px 40px rgba(8,72,121,.15)}.dashboard-hero:before,.dashboard-hero:after{content:"";position:absolute;border-radius:50%;border:1px solid rgba(255,255,255,.10)}.dashboard-hero:before{width:430px;height:430px;right:-170px;top:-220px}.dashboard-hero:after{width:300px;height:300px;left:-120px;bottom:-170px}.dashboard-copy,.dashboard-side{position:relative;z-index:1}.dashboard-eyebrow{display:inline-flex;align-items:center;gap:8px;padding:6px 10px;margin-bottom:12px;border-radius:999px;background:rgba(255,255,255,.12);font-size:11px;font-weight:800}.dashboard-copy h2{margin:0 0 8px;color:#fff;font-size:36px;line-height:1.15}.dashboard-copy p{margin:0;color:#d9effd;max-width:650px}.dashboard-side{display:grid;gap:10px;justify-items:start}.live-chip{display:inline-flex;width:auto;height:auto;padding:8px 11px;border-radius:999px;background:rgba(255,255,255,.12);color:#fff;box-shadow:none}.dashboard-side .btn{min-width:150px}
.dashboard-hero+.kpis{grid-template-columns:repeat(4,minmax(0,1fr))}

/* POS / sales -------------------------------------------------------- */
.pos-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(330px,.55fr);gap:16px;margin-bottom:22px}.pos-main,.pos-side{min-width:0}.pos-main,.pos-side>.card,.invoice-card{background:#fff;border:1px solid var(--h-border);border-radius:16px;box-shadow:var(--h-shadow)}.pos-main{padding:18px}.pos-side{display:grid;gap:14px;align-content:start}.pos-side>.card{padding:16px}.pos-top,.section-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.customer-mode-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;padding:5px;background:#f1f6fa;border-radius:12px}.customer-mode-tabs button{height:38px;border:0;border-radius:9px;background:transparent;font-weight:800;color:#6c8496}.customer-mode-tabs button.active{background:#fff;color:var(--h-primary);box-shadow:0 3px 10px rgba(8,60,95,.07)}.customer-mode-panel{margin-top:12px;padding:12px;border:1px solid var(--h-border-soft);border-radius:12px;background:#fbfdfe}.product-search-wrap,.customer-search-wrap{position:relative}.product-search-results,.customer-search-results{position:absolute;z-index:20;top:calc(100% + 6px);right:0;left:0;max-height:300px;overflow:auto;background:#fff;border:1px solid var(--h-border);border-radius:12px;box-shadow:0 14px 28px rgba(8,45,74,.12)}.product-result,.customer-result{padding:10px 12px;display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid var(--h-border-soft)}.product-result:last-child,.customer-result:last-child{border-bottom:0}.product-result:hover,.customer-result:hover{background:#f8fbfd}.cart-item-v1635,.cart-item-v1636{padding:13px;margin-top:10px;border:1px solid var(--h-border);border-radius:13px;background:#fff}.cart-product-head-v1636,.cart-controls-v1636{display:flex;align-items:center;justify-content:space-between;gap:10px}.cart-product-copy-v1636{min-width:0}.cart-product-copy-v1636 b{display:block;color:var(--h-title);font-weight:900}.cart-meta-v1636{display:flex;gap:8px;flex-wrap:wrap;color:#8096a7;font-size:10px}.cart-fefo-v1636{margin-top:8px;padding:8px 10px;border-radius:9px;background:#f4f8fb;color:#647e91;font-size:10px}.cart-controls-v1636{margin-top:10px}.cart-stepper-v1636{display:grid;grid-template-columns:34px 52px 34px;align-items:center;border:1px solid var(--h-border);border-radius:9px;overflow:hidden}.cart-stepper-v1636 button,.cart-stepper-v1636 input{height:34px;border:0;background:#fff;text-align:center}.cart-stepper-v1636 button{background:#f4f8fb;color:var(--h-primary);font-weight:900}.cart-money-v1636{display:grid;gap:2px}.cart-money-v1636 small{color:#8ca0ae}.cart-money-v1636 strong{color:var(--h-title)}.cart-remove-v1636{width:34px;height:34px;border:0;border-radius:9px;background:#fff0f0;color:var(--h-danger);font-size:20px}.selected-customer,.selected-product{padding:10px 12px;border-radius:10px;background:#eef7fd;color:#25516f}.summary-box.total,.invoice-summary{background:#f7fbfe}.invoice-browser-head{margin-top:8px}.quick-date-filters{display:flex;gap:7px;flex-wrap:wrap}

/* reports / accounts / treasury / finance -------------------------- */
.report-two .table-card,.two .table-card{min-width:0}.report-expiry-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.report-expiry-grid>div{padding:10px 12px;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--h-border-soft);border-radius:11px;background:#fbfdfe}.report-expiry-grid span{color:#758da0}.report-expiry-grid b{color:var(--h-title)}
.dl-grid,.sr11-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.dl-card,.sr11-card{background:#fff;border:1px solid var(--h-border);border-radius:16px;box-shadow:var(--h-shadow)}.dl-card{padding:16px}.dl-sub,.sr11-sub{color:#8095a5;font-size:11px}.dl-ledger,.sr11-ledger{display:grid;gap:8px}.dl-ledger-row,.sr11-ledger-row{padding:10px 12px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;border:1px solid var(--h-border-soft);border-radius:11px;background:#fbfdfe}.sr11-actions,.dl-actions{display:flex;gap:6px;flex-wrap:wrap}.sr11-pill{display:inline-flex;padding:4px 9px;border-radius:999px;background:#edf4f8;color:#627d91;font-size:10px;font-weight:800}.sr11-line,.sr11-stock-row{display:flex;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px solid var(--h-border-soft)}

/* health / system ---------------------------------------------------- */
.system-overall{margin-bottom:16px}.health-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:16px}.health-card{min-height:135px;padding:18px;background:#fff;border:1px solid var(--h-border);border-radius:16px;box-shadow:var(--h-shadow)}.health-label{display:flex;align-items:center;gap:8px;color:#6d879a;font-weight:800}.health-dot{width:10px;height:10px;border-radius:50%;background:#9bb0c0}.health-dot.ok{background:#22aa7b}.health-card b{display:block;margin-top:22px;color:var(--h-title);font-size:22px}.health-issues,.alert-list,.offline-queue-list{display:grid;gap:8px}.health-issue,.offline-queue-item{padding:10px 12px;border:1px solid var(--h-border-soft);border-radius:11px;background:#fbfdfe}.architecture-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.architecture-item{padding:14px;border:1px solid var(--h-border-soft);border-radius:12px;background:#fbfdfe}.quota-table{border:1px solid var(--h-border);border-radius:12px;overflow:hidden}.quota-table th,.quota-table td{padding:10px;border-bottom:1px solid var(--h-border-soft)}

/* modals ------------------------------------------------------------- */
.modal,.sr11-modal{position:fixed;inset:0;z-index:120;display:none;align-items:center;justify-content:center;padding:22px;background:rgba(5,31,50,.46);backdrop-filter:blur(4px)}.modal.open,.modal.active,.sr11-modal{display:flex}.dialog,.sr11-card{width:min(760px,96vw);max-height:90dvh;overflow:auto;background:#fff;border:1px solid var(--h-border);border-radius:20px;box-shadow:0 24px 70px rgba(0,28,48,.22)}.dialog>header,.sr11-head{position:sticky;top:0;z-index:2;padding:16px 18px;display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff;border-bottom:1px solid var(--h-border-soft)}.dialog>header h3,.sr11-head h3{margin:0;color:var(--h-title);font-size:20px}.dialog .form,.dialog .compact-form,.sr11-card>.form,.sr11-grid{padding:16px 18px}.dialog-foot,.sr11-footer{padding:14px 18px;display:flex;justify-content:flex-end;gap:8px;border-top:1px solid var(--h-border-soft)}
.toast{position:fixed;z-index:180;left:22px;bottom:22px;min-width:260px;max-width:420px;padding:13px 15px;border-radius:13px;background:#153e5e;color:#fff;box-shadow:0 14px 35px rgba(0,30,50,.22);opacity:0;transform:translateY(10px);pointer-events:none;transition:.2s}.toast.show{opacity:1;transform:none}.client-version-banner{position:fixed;z-index:160;left:20px;right:20px;top:16px;padding:14px 16px;display:flex;align-items:center;justify-content:space-between;gap:14px;background:#fff7df;border:1px solid #f0d08a;border-radius:14px;color:#75520c;box-shadow:0 12px 30px rgba(75,53,10,.13)}.client-version-banner-copy{display:grid;gap:2px}

/* invoice preview / print ------------------------------------------- */
.invoice-dialog{width:min(980px,96vw)}.invoice-modal-toolbar,.invoice-print-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 16px;border-bottom:1px solid var(--h-border-soft);background:#fff}.invoice-preview-stage,.invoice-print-stage{padding:20px;background:#eef3f7}.invoice-sheet,.invoice-print-sheet{width:min(760px,100%);margin:auto;padding:28px;background:#fff;color:#183b58;box-shadow:0 10px 35px rgba(0,30,48,.12)}.invoice-brand,.invoice-head-grid,.invoice-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.invoice-brand{align-items:center}.invoice-brand-main{font-size:27px;font-weight:900;color:var(--h-title)}.invoice-meta{display:grid;gap:6px}.invoice-items{width:100%;border-collapse:collapse;margin:18px 0}.invoice-items th,.invoice-items td{padding:9px;border-bottom:1px solid #e7edf2;font-size:12px}.invoice-total-box{margin-inline-start:auto;width:min(340px,100%);display:grid;gap:7px}.invoice-total-row{display:flex;justify-content:space-between;gap:10px}.invoice-total-row.net{font-size:18px;font-weight:900}.invoice-notes{margin-top:14px;padding:11px;background:#f7fafc;border-radius:9px}

/* compact desktop — fine pointer stays a real table */
@media (max-width:1180px) and (pointer:fine){
  :root{--h-sidebar-w:72px}
  .side-brand{min-height:58px;padding:7px}.side-brand .logo-img{width:46px;height:40px;background-size:contain}.nav-title,.side-foot{display:none}.nav button{justify-content:center;padding:0}.nav button span:not(.nav-badge){display:none}.nav button .icon,.nav button svg{width:21px;height:21px;flex-basis:21px}.nav-badge{position:absolute;top:3px;left:3px;min-width:18px;height:18px;padding:0;font-size:8px}.sidebar-toggle-v1635{right:52px}.topbar{padding-inline:16px}.content{padding-inline:16px}.head{padding-inline-end:48px}
  .userchip{min-width:162px}.userchip small{max-width:112px}.search{width:min(500px,54vw)}
  .kpis,.report-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pos-grid{grid-template-columns:1fr}.pos-side{grid-template-columns:repeat(2,minmax(0,1fr))}
  th[data-r43-priority="low"],td[data-r43-priority="low"]{display:none!important}
  .table-card thead th,.master-table thead th,.invoice-table-v1636 thead th{padding-inline:8px;font-size:10px}
  .table-card tbody td,.master-table tbody td,.invoice-table-v1636 tbody td{padding-inline:8px;font-size:11.75px}
}
@media (max-width:980px) and (pointer:fine){
  th[data-r43-priority="secondary"],td[data-r43-priority="secondary"]{display:none!important}
  .content{padding-inline:14px}
  .table-card thead th,.master-table thead th,.invoice-table-v1636 thead th{padding-inline:7px;font-size:9.75px}
  .table-card tbody td,.master-table tbody td,.invoice-table-v1636 tbody td{padding-inline:7px;font-size:11.5px}
  .actions-cell,.invoice-actions,.row-actions{gap:4px}.btn.xs{min-height:29px;padding:4px 8px;font-size:10px}
}


/* touch layout — activated by runtime pointer classification, not viewport alone */
@media(max-width:980px){
  .app.r43-touch{--h-sidebar-w:min(84vw,300px);--h-topbar-h:62px}
  .app.r43-touch .main{margin-right:0}
  .app.r43-touch .sidebar{width:var(--h-sidebar-w);transform:translateX(103%);box-shadow:-20px 0 45px rgba(0,28,48,.20)}
  .app.r43-touch:not(.sidebar-collapsed-v1635) .sidebar{transform:none}
  .app.r43-touch.sidebar-collapsed-v1635 .sidebar{transform:translateX(103%)}
  .app.r43-touch .sidebar-toggle-v1635,.app.r43-touch.sidebar-collapsed-v1635 .sidebar-toggle-v1635{top:10px;right:10px;width:42px;height:42px}
  .app.r43-touch .topbar{height:62px;padding:0 62px 0 10px}
  .app.r43-touch .topbar .search{width:100%;min-width:0}.app.r43-touch .top-actions .userchip,.app.r43-touch .top-actions .sync-status{display:none}.app.r43-touch .top-actions .btn{min-width:auto;padding-inline:10px}
  .app.r43-touch .content{padding:17px 11px 40px}.app.r43-touch .head,.app.r43-touch .invoice-browser-head{min-height:auto;padding:5px 0;margin-bottom:13px;align-items:flex-start}.app.r43-touch .head h2,.app.r43-touch .invoice-browser-head h2{font-size:27px}.app.r43-touch .head p,.app.r43-touch .invoice-browser-head p{font-size:10.5px}.app.r43-touch .head-actions{width:auto;justify-content:flex-start}
  .app.r43-touch .toolbar,.app.r43-touch .invoice-filters{padding:9px}.app.r43-touch .filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.app.r43-touch .kpis,.app.r43-touch .cards-3,.app.r43-touch .stat-strip,.app.r43-touch .report-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.app.r43-touch .two,.app.r43-touch .report-two,.app.r43-touch .system-two,.app.r43-touch .architecture-grid,.app.r43-touch .health-grid,.app.r43-touch .dl-grid,.app.r43-touch .sr11-grid{grid-template-columns:1fr}.app.r43-touch .pos-side{grid-template-columns:1fr}.app.r43-touch .form{grid-template-columns:1fr}.app.r43-touch .form .full{grid-column:auto}.app.r43-touch .dashboard-hero{grid-template-columns:1fr;padding:23px;min-height:205px}.app.r43-touch .dashboard-copy h2{font-size:31px}

  .app.r43-touch .table-card{overflow:visible;background:transparent;border:0;box-shadow:none}
  .app.r43-touch .table-card table,.app.r43-touch .master-table,.app.r43-touch .inventory-table,.app.r43-touch .invoice-table-v1636{display:block;width:100%;background:transparent}
  .app.r43-touch .table-card thead,.app.r43-touch .master-table thead,.app.r43-touch .invoice-table-v1636 thead{display:none}
  .app.r43-touch .table-card tbody,.app.r43-touch .master-table tbody,.app.r43-touch .invoice-table-v1636 tbody{display:grid;grid-template-columns:repeat(auto-fit,minmax(310px,1fr));gap:10px}
  .app.r43-touch .table-card tbody tr,.app.r43-touch .master-table tbody tr,.app.r43-touch .invoice-table-v1636 tbody tr{display:block;overflow:hidden;background:#fff;border:1px solid var(--h-border);border-radius:13px;box-shadow:0 5px 15px rgba(12,48,78,.035)}
  .app.r43-touch .table-card tbody td,.app.r43-touch .master-table tbody td,.app.r43-touch .invoice-table-v1636 tbody td{width:auto!important;max-width:none!important;min-width:0!important;padding:9px 11px;border-bottom:1px solid var(--h-border-soft);display:grid!important;grid-template-columns:106px minmax(0,1fr);gap:9px;align-items:start;white-space:normal;overflow:visible;word-break:normal;overflow-wrap:break-word}
  .app.r43-touch .table-card tbody td:before,.app.r43-touch .master-table tbody td:before,.app.r43-touch .invoice-table-v1636 tbody td:before{content:attr(data-label);color:#7b91a2;font-size:9.75px;font-weight:900;line-height:1.4}
  .app.r43-touch .table-card tbody td[colspan],.app.r43-touch .master-table tbody td[colspan],.app.r43-touch .invoice-table-v1636 tbody td[colspan]{display:block!important;text-align:center}.app.r43-touch .table-card tbody td[colspan]:before,.app.r43-touch .master-table tbody td[colspan]:before,.app.r43-touch .invoice-table-v1636 tbody td[colspan]:before{display:none}
  .app.r43-touch .table-card tbody td:last-child,.app.r43-touch .master-table tbody td:last-child,.app.r43-touch .invoice-table-v1636 tbody td:last-child{border-bottom:0}
  .app.r43-touch .actions-cell,.app.r43-touch .invoice-actions,.app.r43-touch .row-actions{display:flex;gap:6px;flex-wrap:wrap;max-width:none}.app.r43-touch .invoice-actions .btn{width:auto}
  .app.r43-touch .master-id-cell{word-break:normal;overflow-wrap:break-word}.app.r43-touch .table-pager,.app.r43-touch .pager,.app.r43-touch .invoice-pager,.app.r43-touch .audit-pagination-shell{background:#fff}
}

@media(max-width:560px){
  .app.r43-touch .content{padding-inline:8px}.app.r43-touch .head{display:grid;gap:9px}.app.r43-touch .head-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.app.r43-touch .head-actions .btn{width:100%}
  .app.r43-touch .kpis,.app.r43-touch .cards-3,.app.r43-touch .stat-strip,.app.r43-touch .report-kpis{grid-template-columns:1fr}.app.r43-touch .kpi,.app.r43-touch .cards-3>div,.app.r43-touch .stat-strip>div,.app.r43-touch .report-kpis>div{min-height:100px;padding:15px}.app.r43-touch .filter-grid{grid-template-columns:1fr}.app.r43-touch .toolbar>*{width:100%}.app.r43-touch .quick-date-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%}.app.r43-touch .quick-date-filters .btn{width:100%}.app.r43-touch .customer-mode-tabs{grid-template-columns:1fr}.app.r43-touch .cart-product-head-v1636,.app.r43-touch .cart-controls-v1636{align-items:flex-start;flex-wrap:wrap}.app.r43-touch .cart-controls-v1636{display:grid;grid-template-columns:1fr 1fr}.app.r43-touch .cart-remove-v1636{grid-column:2;justify-self:end}
  .app.r43-touch .table-card tbody,.app.r43-touch .master-table tbody,.app.r43-touch .invoice-table-v1636 tbody{grid-template-columns:1fr}
  .app.r43-touch .table-card tbody td,.app.r43-touch .master-table tbody td,.app.r43-touch .invoice-table-v1636 tbody td{grid-template-columns:98px minmax(0,1fr);padding:8px 10px}
  .app.r43-touch .invoice-brand,.app.r43-touch .invoice-head-grid,.app.r43-touch .invoice-summary{grid-template-columns:1fr}.dialog,.sr11-card{width:100%;max-height:94dvh;border-radius:15px}.modal,.sr11-modal{padding:8px}.login{padding:0}.hermed-exact-stage{min-height:100dvh;border:0;border-radius:0;grid-template-columns:1fr}.hermed-exact-left{padding:26px 18px}.hermed-exact-hero{display:none}
}


@media print{
  body{background:#fff!important}.sidebar,.topbar,.sidebar-toggle-v1635,.head-actions,.invoice-modal-toolbar,.invoice-print-toolbar{display:none!important}.main{margin:0!important}.content{padding:0!important;max-width:none!important}.invoice-print-stage,.invoice-preview-stage{padding:0!important;background:#fff!important}.invoice-sheet,.invoice-print-sheet{box-shadow:none!important;width:100%!important;max-width:none!important}
}

/* HERMED_R43_PAGE_BY_PAGE_REBUILD_R1 */

/* HERMED_R45_SAVED_SESSION_BOOT_RECOVERY_R1 — no visual delta from R43/R44 */


/* HERMED_R46_FUNCTIONAL_CONTROLS_RESTORE_R1 */
@media (pointer:fine){
  .table-card{overflow-x:auto;overflow-y:hidden}
  .table-card table,.master-table,.inventory-table,.invoice-table-v1636{width:max-content;min-width:100%;max-width:none}
  th[data-r43-priority="low"],td[data-r43-priority="low"],th[data-r43-priority="secondary"],td[data-r43-priority="secondary"]{display:table-cell!important}
  .r46-action-cell{position:sticky;left:0;z-index:3;background:#fff;box-shadow:8px 0 14px -14px rgba(8,48,78,.38)}
  thead .r46-action-cell{z-index:4;background:#f7f9fb}
  .actions-cell,.invoice-actions,.row-actions,.dl-actions,.hum-inline-actions{visibility:visible!important;opacity:1!important}
  .actions-cell .btn,.invoice-actions .btn,.row-actions .btn,.dl-actions .btn,.hum-inline-actions button{display:inline-flex!important;visibility:visible!important;opacity:1!important}
}
.app.r43-touch .r46-action-cell{position:static!important;box-shadow:none!important}


/* HERMED R47 — BOOT GATE VISUAL RELEASE R1 */
/* aria-hidden must be a visual state, not accessibility metadata only. */
#hermedBootGate[aria-hidden="true"],#hermedBootGate[hidden]{display:none!important;visibility:hidden!important;pointer-events:none!important}


/* =====================================================================
   HERMED R48 — ICON SVG CONTAINMENT R1
   Visual-only hotfix: bound inline SVG/icon geometry and restore HERMED
   logo binding. No business logic, permissions, data, or Worker changes.
   ===================================================================== */
.logo-img{background-image:url('/assets/logo-hermed.webp')}

/* Shared line-icon paint contract. Explicit selectors avoid touching charts,
   invoice artwork, the zero-size symbol sprite, or other non-icon SVGs. */
.hermed-exact-tab svg,
.hermed-input-icon svg,
.hermed-pass-eye svg,
.hermed-exact-submit svg,
.hermed-exact-security svg,
.hermed-auth-back svg,
.hermed-lang svg,
.hermed-system-line .shield svg,
.search .search-icon,
.sync-status svg,
.nav button svg,
.btn svg,
.icon-btn svg,
.kpi-icon svg{
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
  vector-effect:non-scaling-stroke;
}

.hermed-input-icon svg{width:19px;height:19px}
.hermed-pass-eye svg,
.hermed-exact-submit svg,
.hermed-exact-security svg,
.hermed-auth-back svg,
.hermed-lang svg{width:18px;height:18px;flex:0 0 18px}
.hermed-system-line{display:flex;align-items:center;gap:10px}
.hermed-system-line .shield{width:28px;height:28px;flex:0 0 28px;display:grid;place-items:center;color:#d8efff}
.hermed-system-line .shield svg{width:26px;height:26px}
.hermed-exact-security{display:flex;align-items:flex-start;gap:8px}
.hermed-lang{display:inline-flex;align-items:center;gap:7px}

.search{position:relative}
.search .search-icon{position:absolute;inset-inline-start:14px;top:50%;transform:translateY(-50%);width:18px;height:18px;color:#7890a4;z-index:1;pointer-events:none}
.search input{padding-inline-start:42px}
.sync-status svg{width:18px;height:18px;flex:0 0 18px}
.btn svg,.btn .icon,.btn .btn-icon{width:18px;height:18px;flex:0 0 18px}
.icon-btn svg{width:18px;height:18px;flex:0 0 18px}
.kpi-icon svg{width:22px;height:22px;max-width:22px;max-height:22px}

/* Hard containment: the affected chrome icons must never regain browser SVG
   intrinsic 300x150 geometry, even if an older selector is reintroduced. */
.hermed-exact-tab svg,
.hermed-input-icon svg,
.hermed-pass-eye svg,
.hermed-exact-submit svg,
.hermed-exact-security svg,
.hermed-auth-back svg,
.hermed-lang svg,
.hermed-system-line svg,
.topbar svg,
.kpi-icon svg,
.btn svg,
.icon-btn svg{
  max-width:32px;
  max-height:32px;
}

/* HERMED_R48_ICON_SVG_CONTAINMENT_R1 */
