@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&display=swap');
:root{--bg:#f3f7fd;--nav:#071e38;--blue:#1689e8;--sky:#e9f6ff;--line:#e5eaf3;--txt:#182c46;--muted:#6b7a90;--white:#fff;--green:#06a878}*{box-sizing:border-box}body{margin:0;font-family:Cairo,Tahoma,sans-serif;background:var(--bg);color:var(--txt);font-size:13px}a{text-decoration:none;color:inherit}.layout{display:flex;min-height:100vh}.sidebar{width:248px;min-width:248px;background:linear-gradient(165deg,#071e38,#123b64);color:#c7d8ea;padding:20px 12px;position:sticky;top:0;height:100vh;overflow:auto}.brand{display:flex;align-items:center;gap:10px;color:#fff;font-size:19px;font-weight:800;padding:14px 12px 27px}.logo{background:linear-gradient(130deg,#00bfff,#3081ff);color:#fff;padding:8px 13px;border-radius:13px}.sidebar .group{font-size:10px;color:#8baccd;margin:20px 16px 9px}.sidebar a.menu{display:flex;align-items:center;gap:11px;border-radius:12px;padding:10px 14px;margin:3px 0;transition:.2s}.sidebar a.menu:hover,.sidebar a.menu.active{background:#ffffff18;color:white}.sidebar .ico{font-size:18px;width:22px;text-align:center}.main{flex:1;min-width:0}.topbar{display:flex;align-items:center;justify-content:space-between;background:#fff;padding:17px 30px;border-bottom:1px solid var(--line);gap:14px;flex-wrap:wrap}.topbar small{color:var(--muted)}.container{padding:28px;max-width:1560px;margin:auto}.page-title{font-size:23px;font-weight:800;margin:0 0 5px}.subtitle{color:var(--muted);margin:0 0 22px}.cards{display:grid;grid-template-columns:repeat(4,minmax(160px,1fr));gap:17px;margin:0 0 25px}.metric,.panel{background:white;border:1px solid #eaf0f7;border-radius:18px;box-shadow:0 5px 22px #0d3d7110}.metric{padding:20px;position:relative;overflow:hidden}.metric:after{content:'';position:absolute;left:-24px;bottom:-28px;width:100px;height:100px;border-radius:50%;background:#45a9fd12}.metric .label{color:var(--muted);font-size:12px}.metric .value{font-size:25px;font-weight:800;margin-top:8px}.metric .glyph{float:left;background:var(--sky);font-size:22px;border-radius:12px;padding:8px}.panel{padding:22px;margin-bottom:22px;overflow:auto}.panel h3{margin:0 0 17px;font-size:16px}.btn{display:inline-flex;justify-content:center;align-items:center;gap:7px;background:#1689e8;color:#fff;border:0;border-radius:10px;padding:10px 17px;font-family:inherit;font-weight:700;cursor:pointer;white-space:nowrap}.btn:hover{filter:brightness(.94)}.btn.secondary{background:#ebf4fc;color:#24659e}.btn.danger{background:#fff0f1;color:#be3248}.actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:0 0 18px}.formgrid{display:grid;grid-template-columns:repeat(3,minmax(140px,1fr));gap:14px}.field{display:flex;flex-direction:column;gap:5px}.field label{color:#52647a;font-size:12px;font-weight:700}input,select,textarea{width:100%;border:1px solid #dbe4ef;border-radius:10px;padding:10px 12px;outline:0;font-family:inherit;font-size:13px;background:#fff;color:#182c46}input:focus,select:focus,textarea:focus{border-color:#31a1ff;box-shadow:0 0 0 3px #2d9aff17}table{width:100%;border-collapse:collapse;white-space:nowrap}th{background:#f5f9fe;font-size:12px;color:#6d7b8e;text-align:right;padding:13px}td{border-bottom:1px solid #eef2f8;padding:12px 13px}tr:hover td{background:#fbfdff}.muted{color:var(--muted)}.pill{display:inline-flex;padding:4px 10px;border-radius:30px;background:#e7f8f0;color:#0b966b;font-size:11px;font-weight:700}.notice{border-radius:12px;padding:12px 17px;margin:0 0 16px;background:#e7f8f0;color:#086c50}.notice.error{background:#fff0f0;color:#b8283b}.split{display:grid;grid-template-columns:1.4fr 1fr;gap:20px}.login-wrap{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 75% 10%,#c2edff,transparent 36%),#edf4fd}.login-box{width:min(440px,100%);background:white;padding:35px;border-radius:25px;box-shadow:0 25px 60px #15385b19}.login-box h1{font-size:26px;margin:0 0 10px}.num{font-variant-numeric:tabular-nums;direction:ltr;display:inline-block}.hint{color:#738197;font-size:11px}.end{display:flex;justify-content:flex-end}.totals{padding:20px;background:#f4faff;border-radius:15px;font-size:16px;font-weight:700}.rowflex{display:flex;justify-content:space-between;align-items:center;gap:20px}.printhead{display:none}@media(max-width:1000px){.sidebar{width:68px;min-width:68px;padding:14px 6px}.sidebar .brand{font-size:0}.sidebar .brand .logo{font-size:16px}.sidebar .menu span:not(.ico),.sidebar .group{display:none}.sidebar a.menu{justify-content:center;padding:12px 3px}.cards{grid-template-columns:repeat(2,1fr)}.formgrid{grid-template-columns:repeat(2,1fr)}}@media(max-width:640px){.layout{display:block}.sidebar{position:static;width:100%;height:auto;display:flex;gap:5px;overflow-x:auto;padding:8px}.sidebar .brand,.sidebar .group{display:none}.sidebar a.menu{min-width:46px;margin:0}.main{width:100%}.container{padding:15px}.topbar{padding:12px}.cards{grid-template-columns:1fr 1fr;gap:9px}.metric{padding:13px}.metric .value{font-size:19px}.formgrid,.split{grid-template-columns:1fr}.panel{padding:13px}}@media print{.sidebar,.topbar,.actions,.no-print,.btn{display:none!important}.main{width:100%}.container{padding:0}.panel{border:0;box-shadow:none}.printhead{display:block}body{background:white}}

/* Ajeal ERP UI Update 01 — responsive navigation and sales */
:root{--bg:#f5f6fa;--nav:#3535bb;--blue:#4340e3;--sky:#eeedff;--txt:#172441;--muted:#718096}
body{font-size:14px;line-height:1.75}
.sidebar{width:270px;min-width:270px;background:linear-gradient(180deg,#3833c2 0%,#3930b1 100%);padding:18px 12px;box-shadow:-2px 0 10px #22205c12}
.brand{font-size:23px;padding:15px 12px 29px;line-height:1.25}
.brand-cloud{display:block;font-size:10px;letter-spacing:1.2px;color:#cecfff;margin-top:7px}
.logo{background:#fff2;color:#fff;border-radius:50%;font-size:20px;min-width:45px;text-align:center}
.sidebar a.menu,.sidebar summary.menu{display:flex;align-items:center;gap:12px;border-radius:9px;padding:11px 13px;margin:3px 0;color:#f4f2ff;font-size:14px;font-weight:700;cursor:pointer;list-style:none;transition:background .16s}
.sidebar summary.menu::-webkit-details-marker{display:none}
.sidebar a.menu:hover,.sidebar summary.menu:hover,.sidebar a.menu.active,.sidebar summary.menu.active{background:#ffffff28;color:#fff}
.nav-caret{margin-inline-start:auto;font-size:18px;transition:transform .2s}.nav-accordion[open] .nav-caret{transform:rotate(180deg)}
.nav-children{padding:2px 12px 8px 0;margin:0 18px 5px 0;background:#17156a25;border-radius:9px}
.nav-children .sub-menu{display:block;padding:8px 14px;color:#e8e5ff;font-weight:600;border-radius:6px;font-size:13px}
.nav-children .sub-menu.active,.nav-children .sub-menu:hover{background:#ffffff22;color:#fff}
.sidebar .ico{width:26px;font-size:19px;line-height:1}
.topbar{padding:13px 25px;min-height:73px}.topbar-company{display:flex;flex-direction:column}.topbar-company strong{font-size:14px}.topbar-actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.toplink{color:#4439c7;font-weight:700}.account-chip{background:#f5f4ff;border-radius:50px;padding:5px 12px;font-weight:700}
.container{padding:28px 32px}.page-title{font-size:24px}.subtitle{font-size:12px}.btn{background:var(--blue);border-radius:9px}.btn.secondary{background:#eaeaff;color:#3934ab}.panel{border-radius:13px}.panel-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px}.panel-heading h3{margin:0}.metric{border-radius:13px}.metric .value{font-size:22px}
.dash-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:4px 0 16px}.dash-heading h2{font-size:19px;margin:0}.overview-three{display:grid;grid-template-columns:repeat(3,minmax(160px,1fr));gap:0;margin-bottom:24px;box-shadow:0 2px 6px #1524590c;border:1px solid #e2e4f1;border-radius:12px;overflow:hidden;background:#fff}.overview-card{padding:22px;text-align:center;min-height:133px;border-inline-end:1px solid #e5e8ef}.overview-card:last-child{border-inline-end:0}.overview-card .label{color:#283753;font-weight:700}.overview-icon{float:right;color:#4941db;background:#f0efff;border-radius:9px;padding:3px 9px;font-size:20px}.overview-value{color:#433ddd;font-size:25px;font-weight:800;margin-top:10px}.shortcut-row{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:26px}.shortcut{display:block;background:white;border:1px solid #eaedf6;box-shadow:0 2px 5px #15245909;border-radius:12px;padding:18px;text-align:center;color:#3938b1;font-weight:700}.shortcut:hover{background:#f0efff}.feature-status{max-width:760px}.invoice-filter{display:flex;gap:10px;align-items:center;margin-bottom:18px}.invoice-filter input{max-width:420px;flex:1}table{font-size:13px}th{background:#f6f7fc}
@media(max-width:1000px){.sidebar{width:225px;min-width:225px;padding:15px 8px}.sidebar .brand{font-size:19px}.sidebar .menu span:not(.ico),.sidebar .group{display:inline}.sidebar a.menu,.sidebar summary.menu{padding:9px}.nav-children{margin-right:5px}.container{padding:18px}.overview-value{font-size:20px}}
@media(max-width:700px){.layout{display:block}.sidebar{position:relative;width:100%;min-width:0;height:auto;max-height:260px;overflow:auto;display:block;padding:8px}.sidebar .brand{display:flex;padding:8px;font-size:17px}.sidebar a.menu,.sidebar summary.menu{display:inline-flex;margin:3px;padding:6px 10px}.sidebar .menu span:not(.ico){display:inline}.nav-accordion{display:inline-block;vertical-align:top}.nav-children{position:relative;padding:2px;max-height:160px;overflow:auto}.nav-children .sub-menu{display:block}.sidebar .group{display:none}.container{padding:15px}.topbar{padding:12px}.overview-three{grid-template-columns:1fr}.overview-card{min-height:100px;border-inline-end:0;border-bottom:1px solid #e5e8ef}.shortcut-row{grid-template-columns:repeat(2,1fr)}.invoice-filter{flex-wrap:wrap}.dash-heading{align-items:flex-start;flex-direction:column}.topbar-actions{gap:8px}}
@media print{.nav-accordion,.shortcut-row,.invoice-filter{display:none!important}}


/* Update 03 - internal sales pages */
.mini-cards{grid-template-columns:repeat(3,minmax(180px,1fr));gap:14px;margin-bottom:18px}.mini-cards-4{grid-template-columns:repeat(4,minmax(150px,1fr))}
.sales-actions{margin-bottom:14px}
.sales-search-bar{display:grid;grid-template-columns:2fr 1fr 1fr 1fr 1fr auto auto;gap:10px;align-items:end;margin-bottom:18px}
.sales-filter-grid{display:grid;grid-template-columns:2fr 1fr auto auto;gap:10px;align-items:end}
.compact-filter{margin:0;display:flex;gap:8px;align-items:center}
.compact-filter input{min-width:280px}
.form-panel{overflow:visible}
.sales-form-grid{grid-template-columns:repeat(3,minmax(180px,1fr));gap:16px}
.table-wrap{overflow:auto;margin-top:12px}
.invoice-summary-box{display:grid;grid-template-columns:repeat(3,minmax(140px,1fr));gap:14px;background:#f6f5ff;border:1px solid #e7e5ff;border-radius:14px;padding:16px;margin-top:18px}
.invoice-summary-box>div{background:white;border:1px solid #eceaf9;border-radius:12px;padding:13px 15px}.invoice-summary-box span{display:block;color:#6d78a1;font-size:12px}.invoice-summary-box strong{display:block;font-size:22px;color:#3535bb;margin-top:6px}
.invoice-summary-wide{margin-top:20px}
.mini-breadcrumb{color:#78839c;font-size:12px;margin-bottom:12px}
@media(max-width:1200px){.sales-search-bar{grid-template-columns:1fr 1fr 1fr}.sales-filter-grid{grid-template-columns:1fr 1fr}.sales-form-grid{grid-template-columns:repeat(2,minmax(180px,1fr))}.mini-cards-4{grid-template-columns:repeat(2,minmax(160px,1fr))}}
@media(max-width:700px){.mini-cards,.mini-cards-4,.invoice-summary-box{grid-template-columns:1fr}.sales-search-bar,.sales-filter-grid,.sales-form-grid{grid-template-columns:1fr}.compact-filter{flex-wrap:wrap}.compact-filter input{min-width:0;width:100%}}

/* Ajeal ERP POS Update 04 */
.pos-session-launch{max-width:560px;margin:4vh auto;text-align:center}.pos-launch-logo{display:grid;place-items:center;margin:auto;width:74px;height:74px;background:#5145df;color:#fff;font-weight:800;border-radius:20px;font-size:38px}.pos-session-launch h2{margin:20px 0}.pos-session-launch .panel{text-align:right}.pos-session-launch .field{margin-bottom:18px}.pos-fullscreen{background:#f8f9fc;border:1px solid #e8eaf3;border-radius:16px;overflow:hidden}.pos-toolbar{background:#4b42df;color:#fff;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;padding:14px 18px}.pos-toolbar a{color:inherit}.pos-tabs{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.pos-toolbar-active{background:#fff;color:#463dd1;padding:10px;border-radius:10px;font-weight:700}.pos-session-label{font-size:12px;opacity:.9}.pos-shell{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(330px,1fr);min-height:660px;direction:rtl}.pos-products-pane{padding:18px;min-width:0;border-left:1px solid #e5e7ef}.pos-search-row{display:flex;gap:10px;margin-bottom:20px}.pos-search-row input{flex:1}.pos-product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(155px,1fr));gap:12px;align-content:start}.pos-product{display:flex;flex-direction:column;gap:5px;align-items:stretch;cursor:pointer;background:#fff;border:1px solid #e7e8f3;border-radius:14px;text-align:right;padding:15px;color:#1d2943;min-height:145px;font-family:inherit}.pos-product:hover{border-color:#6258ec;background:#f6f5ff;transform:translateY(-1px)}.pos-product:disabled{opacity:.5;cursor:not-allowed}.pos-product b{color:#483bcb;margin-top:auto}.pos-product small{color:#7e879c}.pos-product-icon{color:#5249e5;font-size:27px}.pos-list-view{grid-template-columns:1fr}.pos-list-view .pos-product{min-height:65px;flex-direction:row;align-items:center}.pos-list-view .pos-product b{margin:0 0 0 auto}.pos-cart-pane{padding:17px;display:flex;flex-direction:column;background:#fff;min-width:0}.pos-cart-heading{display:flex;align-items:center;justify-content:space-between}.pos-cart-heading h2{font-size:20px;margin:0}.pos-cart-heading small{font-size:12px;color:#8290a1}.pos-customer{margin:14px 0}.pos-customer label{display:block;font-size:12px;color:#72809a}.pos-cart-items{min-height:140px;flex:1}.pos-cart-empty{text-align:center;padding:50px 8px;color:#9aa2b1}.pos-cart-row{display:grid;grid-template-columns:minmax(100px,1fr) auto auto auto;gap:10px;align-items:center;border-bottom:1px solid #ecedf4;padding:11px 0}.pos-cart-product{font-weight:700;overflow-wrap:anywhere}.pos-qty-controls{display:flex;gap:8px;align-items:center}.pos-qty-controls button{border:1px solid #dddfee;border-radius:6px;background:#f8f8fe;padding:3px 9px;cursor:pointer}.pos-remove{background:none;border:none;color:#d22;font-size:24px;cursor:pointer}.pos-cart-totals{border-top:1px solid #e4e6ef;padding-top:12px}.pos-cart-totals>div{display:flex;justify-content:space-between;padding:6px 0}.pos-cart-totals .pos-grand{font-size:23px;font-weight:800;color:#152744}.pos-payment{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:12px 0}.pos-change{grid-column:1/-1;color:#4b5670}.pos-pay-button{width:100%;padding:17px;border:none;background:#4d43e7;border-radius:11px;color:white;font:700 18px Cairo,Tahoma,sans-serif;cursor:pointer}.pos-pay-button:disabled{background:#c5cad6;cursor:not-allowed}.pos-success{text-align:center;max-width:700px;margin:auto}.pos-success h2{color:#0b9970;font-size:30px}.pos-success .actions{justify-content:center}.pos-empty{text-align:center;color:#8a92a6;padding:40px}.pos-product[hidden]{display:none!important}
@media(max-width:1050px){.pos-shell{grid-template-columns:1fr}.pos-products-pane{border-left:0;border-bottom:1px solid #e7e9f1}.pos-cart-items{min-height:190px}.pos-payment{grid-template-columns:1fr}}
@media(max-width:680px){.pos-toolbar{padding:10px}.pos-products-pane,.pos-cart-pane{padding:10px}.pos-product-grid{grid-template-columns:repeat(2,minmax(130px,1fr))}.pos-cart-row{grid-template-columns:1fr auto}.pos-cart-row strong{justify-self:start}}
/* Update 05 — inventory screens */
.container .actions .btn{min-height:42px}
.container table td .btn{font-size:12px;padding:7px 11px}
.container .panel textarea{min-height:76px}
@media(max-width:820px){.container table{min-width:800px}.container .panel{overflow-x:auto}}

/* Update 06 : Ajeal inventory dialogs inspired by the user-provided reference screenshots */
.inv-overlay{position:fixed;inset:0;z-index:1005;background:rgba(20,31,61,.52);display:flex;align-items:center;justify-content:center;padding:20px;overflow-y:auto}
.inv-dialog{width:min(690px,100%);max-height:calc(100vh - 45px);overflow:auto;border-radius:14px;background:#f7f8fc;box-shadow:0 20px 70px rgba(15,22,56,.26);direction:rtl}
.inv-dialog-large{width:min(960px,100%)}.inv-dialog-header{background:#fff;padding:17px 24px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e1e5ef}
.inv-dialog-header h3{margin:0}.inv-x{font-size:25px;color:#8995a8;text-decoration:none}.inv-dialog-body{padding:22px 24px}.inv-dialog-body .field{margin-bottom:13px}
.inv-dialog-body .field label{display:block;margin:0 0 7px;color:#263653;font-weight:700}.inv-dialog-body input,.inv-dialog-body select,.inv-dialog-body textarea{width:100%;max-width:100%;background:#fff}
.inv-fields-3,.inv-fields-4,.inv-fields-2{display:grid;gap:14px;align-items:start}.inv-fields-3{grid-template-columns:repeat(3,minmax(0,1fr))}.inv-fields-4{grid-template-columns:repeat(4,minmax(0,1fr))}.inv-fields-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.inv-section{margin:14px 0 12px;padding-top:16px;border-top:1px solid #e1e5ed;color:#23344f}.inv-type-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.inv-type{background:#fff;border:1px solid #dce3ef;border-radius:10px;padding:13px;display:block;font-weight:700}.inv-type small{display:block;color:#7a859e;font-size:11px;margin-top:6px}.inv-type.active{border:2px solid #5145e9}.inv-type.disabled{opacity:.52;cursor:not-allowed}.inv-type input{width:auto;margin-left:6px}
.inv-dialog-footer{display:flex;gap:10px;align-items:center;margin-top:20px;border-top:1px solid #dfe5ed;padding-top:16px}.inv-thumb{width:42px;height:42px;object-fit:contain;border-radius:6px;background:#f2f5fb;border:1px solid #e5eaf3}.inv-preview{width:100px;height:86px;object-fit:contain;display:block;margin-top:6px}.inv-warning{background:#fff3ef;color:#ad553e;border-radius:8px;padding:11px;font-size:12px;line-height:1.8}
@media(max-width:740px){.inv-overlay{padding:8px}.inv-dialog{max-height:calc(100vh - 16px)}.inv-fields-3,.inv-fields-4,.inv-fields-2,.inv-type-row{grid-template-columns:1fr}.inv-dialog-body{padding:14px}}

/* Update 07 visual alignment with supplied inventory reference screenshots */
.inv-overlay{padding:18px;background:rgba(34,46,73,.53);backdrop-filter:blur(1px)}
.inv-dialog{border-radius:7px;background:#f4f5f7;box-shadow:0 18px 45px rgba(19,29,48,.24)}
.inv-dialog-large{width:min(850px,96vw)}.inv-warehouse-modal{width:min(690px,96vw)}
.inv-dialog-header{padding:15px 22px;border-bottom:1px solid #dde1e7}.inv-dialog-header h3{font-size:19px}
.inv-dialog-body{padding:23px 24px}.inv-dialog-body .field label{font-size:13px;color:#303b50;font-weight:650}
.inv-dialog input,.inv-dialog select,.inv-dialog textarea{border-radius:5px;border:1px solid #d6dce6;min-height:39px}
.inv-section{padding-top:20px;border-top:1px solid #d6dce4;margin:20px 0 14px;font-size:14px}
.inv-type-row{gap:8px;max-width:610px}.inv-type{border-radius:5px;text-align:right;min-height:68px;font-size:13px;display:flex;flex-direction:column;justify-content:center;position:relative;padding:10px 13px}.inv-type input{position:absolute;right:8px;top:10px}.inv-type small{font-size:10px}
.inv-type.active{border:1.5px solid #5045e8;box-shadow:0 0 0 1px #5045e8 inset}
.inv-dialog-footer{justify-content:flex-start;direction:ltr}.inv-dialog-footer button{background:#11b981}.inv-dialog-footer .btn{padding:10px 16px}
.inv-separator{border:0;border-top:1px solid #d6dce4;margin:20px 0}.inv-disabled-block{border-top:1px solid #d6dce4;border-bottom:1px solid #d6dce4;padding:20px 0;display:grid;gap:12px;color:#788195;font-size:13px}.inv-disabled-block label{display:flex;align-items:center;gap:9px}.inv-disabled-block input[type=checkbox]{min-height:0;width:auto}.inv-readonly-placeholder{border:1px dashed #cfd5e2;color:#6f798c;border-radius:5px;padding:12px;min-height:50px}.inv-barcode-row{border-top:1px solid #d6dce4;margin-top:16px;padding-top:16px}.inv-barcode-row small{display:block;color:#8a92a4;margin-top:5px}
@media(max-width:720px){.inv-dialog-large{width:100%}.inv-dialog-body{padding:14px}.inv-type-row{grid-template-columns:1fr}.inv-fields-3,.inv-fields-4,.inv-fields-2{grid-template-columns:1fr}}

/* Update 10: inventory operational forms follow the same centered-dialog workflow as the reference. */
.inv10-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:16px 0 22px;direction:rtl}.inv10-menu{position:relative;display:inline-block;z-index:10}.inv10-menu summary{list-style:none;cursor:pointer;display:flex;gap:14px;align-items:center}.inv10-menu summary::-webkit-details-marker{display:none}.inv10-menu[open] summary{filter:brightness(.96)}.inv10-links{position:absolute;top:calc(100% + 8px);right:0;min-width:230px;background:#fff;border:1px solid #e2e5ec;border-radius:10px;box-shadow:0 14px 28px #14213d26;padding:8px;display:flex;flex-direction:column}.inv10-links a{display:block;padding:12px 14px;color:#1d2a47;text-decoration:none;border-radius:6px;font-size:15px}.inv10-links a:hover{background:#eeeeff;color:#4439d9}.inv10-backdrop{position:fixed;inset:0;background:#1f2f4a80;z-index:2000;display:flex;align-items:center;justify-content:center;padding:18px;direction:rtl}.inv10-dialog{width:min(900px,100%);max-height:calc(100vh - 36px);overflow:auto;background:#f6f7fa;border-radius:10px;box-shadow:0 24px 56px #111a3040}.inv10-head{position:sticky;top:0;z-index:2;padding:19px 24px;display:flex;align-items:center;justify-content:space-between;background:#fff;border-bottom:1px solid #dce1eb;font-size:19px}.inv10-head a{color:#8993a8;text-decoration:none;font-size:27px}.inv10-body{padding:20px 24px 24px}.inv10-body .formgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.inv10-body .field{min-width:0}.inv10-body .field label{display:block;margin-bottom:7px;font-weight:650}.inv10-body input,.inv10-body select,.inv10-body textarea{max-width:100%;width:100%}.inv10-body .table-wrap{overflow-x:auto;margin:16px 0}.inv10-body table{width:100%}.inv10-body .btn{margin:3px}.inv10-body .notice{margin:12px 0}.inv10-body form>div:last-child{border-top:1px solid #dce2ec;padding-top:14px}@media(max-width:720px){.inv10-backdrop{padding:5px}.inv10-dialog{max-height:calc(100dvh - 10px)}.inv10-body{padding:14px}.inv10-body .formgrid{grid-template-columns:1fr}.inv10-links{min-width:200px}}

/* Update 12: consistent inventory operation dialogs matching reference layout */
.inv12-dialog{width:min(1120px,calc(100vw - 36px));border-radius:6px;background:#f3f4f6}
.inv12-dialog .inv10-head{font-size:18px;padding:17px 24px}
.inv12-dialog .inv10-body{padding:24px}
.inv12-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;align-items:end}
.inv12-fields .field,.inv12-bottom .field{min-width:0}
.inv12-code{display:flex;justify-content:space-between;align-items:center;min-height:42px;background:#edeff3;border:1px solid #d4dae4;padding:10px;border-radius:5px;font-size:13px}
.inv12-muted{font-size:12px;color:#6b7485}.inv12-unposted{background:#edf0f5;padding:13px 8px;border-radius:4px;text-align:center}
.inv12-section{margin-top:24px;border-top:1px solid #d7dce6;padding-top:24px}.inv12-section h4{margin:0 0 14px;font-size:15px}
.inv12-table-head,.inv12-line{display:grid;align-items:center;gap:10px;direction:rtl}
.inv12-three{grid-template-columns:minmax(0,2fr) minmax(0,1.2fr) 90px}.inv12-four{grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr) 80px}
.inv12-table-head{padding:10px 0;border-bottom:1px solid #d6dce7;font-weight:700;font-size:13px;color:#303849}.inv12-line{padding:7px 0;border-bottom:1px solid #e4e7ef}
.inv12-line input,.inv12-line select{min-width:0;background:white}.inv12-right{display:flex;justify-content:flex-start;margin-top:6px}
.inv12-bottom{display:grid;grid-template-columns:1fr 1fr;gap:16px}.inv12-bottom textarea{min-height:90px;background:white}
.inv12-attachment{border:2px dashed #cfd5df;padding:15px 8px;display:grid;place-items:center;min-height:90px;text-align:center;color:#818c9c;background:#f6f7fa;border-radius:6px;font-size:13px}
.inv12-footer{border-top:1px solid #d6dce7;margin-top:20px;padding-top:15px;display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.inv12-dialog .inv12-save{background:#11b781;border-radius:5px}.inv12-dialog .inv12-cancel{background:#fff;color:#2d3a4e;border:1px solid #d3d8e0;border-radius:5px}
@media(max-width:750px){.inv12-dialog{width:100%}.inv12-dialog .inv10-body{padding:14px}.inv12-fields,.inv12-bottom{grid-template-columns:1fr}.inv12-three,.inv12-four{grid-template-columns:minmax(130px,1fr) minmax(100px,1fr) 80px}.inv12-four .inv12-unposted,.inv12-four+.inv12-line .inv12-unposted{display:none}.inv12-table-head.inv12-four span:nth-child(3){display:none}.inv12-line.inv12-four{grid-template-columns:minmax(130px,1fr) minmax(100px,1fr) 80px}}

/* Update 13: product form parity; limited to product modal */
.inv-dialog-large:has(.inv-product-media){width:min(890px,96vw)}
.inv-product-media{margin:17px 0 8px}
.inv-upload-area{min-height:102px;border:1.5px dashed #cbd4e2;border-radius:6px;display:flex!important;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;color:#5147e7!important;font-weight:600!important;gap:7px;background:#f5f7fc}
.inv-upload-symbol{font-size:28px;color:#9ca8bd}
.inv-photo-input{max-width:100%;margin-top:6px;font-size:12px;min-height:0!important}
.inv-product-bottom{border-top:1px solid #d6dce4;border-bottom:1px solid #d6dce4;padding:18px 0 14px;margin-top:17px}
.inv-product-bottom textarea{margin-top:9px}
.inv-product-bottom .hint{font-size:11px;line-height:1.6;margin:8px 0;color:#7f8a9e}
.inv-qty-line{border-top:1px solid #d6dce4;padding-top:19px;margin-top:15px}
.inv-stock-inline{display:flex;align-items:center;gap:10px}
.inv-stock-inline input{max-width:130px}
.inv-stock-inline span{font-size:12px;color:#7a8595}
.inv-switch-label{font-weight:500;font-size:12px;float:left;color:#6f7a8a}
.inv-switch-label input{width:auto;min-height:0;vertical-align:middle}
.inv-product-bottom #inv-add-barcode{font-size:12px;padding:7px 10px}
@media(max-width:740px){.inv-dialog-large:has(.inv-product-media){width:100%}.inv-stock-inline{flex-wrap:wrap}}

/* Update 15 - stocktake modal parity */
.inv15-stocktake-help{background:#f0f5ff;border:1px solid #d6e2ff;border-radius:5px;padding:12px 14px;font-size:13px;color:#334466;line-height:1.9;margin:14px 0 0}
.inv12-right{align-items:center;gap:16px;flex-wrap:wrap}
.inv12-dialog select:focus,.inv12-dialog input:focus,.inv12-dialog textarea:focus{outline:2px solid #6864e9;outline-offset:1px}
.inv12-dialog .inv12-rows{max-height:40vh;overflow-y:auto;scrollbar-width:thin}
@media(max-width:750px){.inv12-dialog .inv12-rows{max-height:35vh}}

/* UPDATE 16: stocktake quantity is deliberately blank until counted */
.inv12-dialog .inv12-line input::placeholder{color:#9aa3b5;opacity:1}
.inv12-dialog .inv12-line button.secondary{white-space:nowrap}
.inv12-dialog .inv12-right button:disabled{opacity:.5;cursor:not-allowed}
.inv12-dialog .inv12-stocktake-note{font-size:13px}

/* Update 17 — wide layouts and reference-sized product dialog */
@media(min-width:1100px){.container{max-width:none;width:100%;margin:0;padding:26px 30px}.main{width:calc(100% - 270px);min-width:0}.sidebar{width:270px;min-width:270px}.overview-three{width:100%}.shortcut-row{grid-template-columns:repeat(4,minmax(0,1fr))}.panel{width:100%}}
.inv-dialog-large:has(.inv-product-media){width:min(1010px,96vw);max-height:calc(100dvh - 30px);scrollbar-width:thin}
.inv-dialog-large:has(.inv-product-media) .inv-dialog-body{padding:24px 25px}
.inv-dialog-large:has(.inv-product-media) .inv-type-row{max-width:none}
.inv-unit-additional{border:1px solid #dbdff1;border-radius:7px;background:#fff;padding:15px;margin:13px 0}
.inv-unit-additional[hidden]{display:none!important}
.inv-unit-additional .hint{margin:8px 0 0}
@media(max-width:740px){.inv-dialog-large:has(.inv-product-media){width:100%;max-height:calc(100dvh - 12px)}.inv-unit-additional .inv-fields-4{grid-template-columns:1fr}}

/* UPDATE 18 — visual-only parity fixes. Does not affect inventory or accounting logic. */
/* The reference ERP uses a centered working canvas rather than stretching every card edge-to-edge. */
@media (min-width:1100px){
  .main{flex:1;width:auto;min-width:0}
  .main > .container{width:100%;max-width:1200px;margin-inline:auto;padding:25px 26px}
  .main .overview-three{width:100%}
  .main .shortcut-row{grid-template-columns:repeat(4,minmax(0,1fr))}
}
/* Product editing: use the same roomy centered dialog, aligned fields, and compact sections. */
@media (min-width:741px){
  .inv-dialog-large:has(.inv-product-media){
    width:min(1080px,calc(100vw - 48px));
    max-height:calc(100dvh - 28px);
    border-radius:6px;
    overflow-y:auto;
    overflow-x:hidden;
  }
  .inv-dialog-large:has(.inv-product-media) .inv-dialog-body{padding:18px 22px 20px}
  .inv-dialog-large:has(.inv-product-media) .inv-dialog-header{padding:14px 22px}
  .inv-dialog-large:has(.inv-product-media) .inv-fields-3,
  .inv-dialog-large:has(.inv-product-media) .inv-fields-4,
  .inv-dialog-large:has(.inv-product-media) .inv-fields-2{gap:12px}
  .inv-dialog-large:has(.inv-product-media) .inv-dialog-body .field{margin-bottom:8px}
  .inv-dialog-large:has(.inv-product-media) .inv-dialog-body .field label{margin-bottom:4px}
  .inv-dialog-large:has(.inv-product-media) .inv-section{margin:11px 0 10px;padding-top:12px}
  .inv-dialog-large:has(.inv-product-media) .inv-type-row{max-width:none;gap:10px}
  .inv-dialog-large:has(.inv-product-media) .inv-type{min-height:60px}
  .inv-dialog-large:has(.inv-product-media) .inv-product-media{margin:11px 0 7px}
  .inv-dialog-large:has(.inv-product-media) .inv-upload-area{min-height:88px}
  .inv-dialog-large:has(.inv-product-media) .inv-qty-line{margin-top:11px;padding-top:12px}
  .inv-dialog-large:has(.inv-product-media) .inv-product-bottom{margin-top:11px;padding:12px 0 10px}
  .inv-dialog-large:has(.inv-product-media) .inv-dialog-footer{margin-top:12px;padding-top:12px}
  .inv-dialog-large:has(.inv-product-media) input:not([type=checkbox]):not([type=radio]):not([type=file]),
  .inv-dialog-large:has(.inv-product-media) select{min-height:38px}
}
@media (min-width:741px) and (max-width:1099px){
  .inv-dialog-large:has(.inv-product-media){width:min(960px,calc(100vw - 24px))}
}
@media (max-width:740px){
  .inv-dialog-large:has(.inv-product-media){width:100%;max-height:calc(100dvh - 12px)}
}

/* UPDATE 19 — Alostaz-size UI, scoped visual changes only. */
@media(min-width:1100px){
  .layout>.sidebar{width:210px;min-width:210px;padding:12px 8px}
  .sidebar .brand{font-size:19px;padding:12px 8px 22px}
  .sidebar .logo{font-size:15px;min-width:36px;padding:8px}
  .sidebar a.menu,.sidebar summary.menu{font-size:13px;padding:8px 10px;gap:8px;margin:2px 0}
  .sidebar .ico{width:20px;font-size:16px}
  .sidebar .nav-children .sub-menu{font-size:12px;padding:6px 10px}
  .main{width:calc(100% - 210px);flex:1;min-width:0}
  .main>.container{max-width:1140px;width:100%;padding:18px 20px;margin:0 auto}
  .main .topbar{padding:10px 22px;min-height:58px}
  .container .page-title{font-size:19px;line-height:1.5}
  .container .subtitle{font-size:11px;margin-bottom:14px}
  .container .panel{padding:15px 17px;margin-bottom:16px;border-radius:9px}
  .container .panel h3{font-size:14px;margin-bottom:12px}
  .container .actions{gap:8px;margin-bottom:13px}
  .container .btn{font-size:12px;padding:8px 12px;min-height:35px}
  .container .panel table th,.container .panel table td{font-size:12px;padding:9px 10px}
  .container .overview-three{margin-bottom:16px;border-radius:8px}
  .container .overview-card{padding:15px 12px;min-height:95px}
  .container .overview-card .label{font-size:12px}
  .container .overview-value{font-size:20px;margin-top:4px}
  .container .shortcut-row{gap:10px;margin-bottom:18px}
  .container .shortcut{padding:12px;font-size:12px;border-radius:8px}
  .container .metric{padding:14px}
  .container .metric .value{font-size:18px}
}
@media(min-width:741px){
  .inv-overlay{padding:12px;align-items:center;justify-content:center}
  .inv-overlay .inv-dialog-large:has(.inv-product-media){width:min(990px,calc(100vw - 56px));max-width:990px;max-height:calc(100dvh - 26px);border-radius:5px;box-shadow:0 18px 50px #18203b45;overflow:auto}
  .inv-dialog-large:has(.inv-product-media) .inv-dialog-header{padding:11px 20px}
  .inv-dialog-large:has(.inv-product-media) .inv-dialog-header h3{font-size:16px}
  .inv-dialog-large:has(.inv-product-media) .inv-dialog-body{padding:14px 20px 16px}
  .inv-dialog-large:has(.inv-product-media) .inv-dialog-body .field{margin-bottom:5px;gap:3px}
  .inv-dialog-large:has(.inv-product-media) .inv-dialog-body .field label{font-size:11px;margin-bottom:2px;line-height:1.5}
  .inv-dialog-large:has(.inv-product-media) .inv-fields-3,
  .inv-dialog-large:has(.inv-product-media) .inv-fields-4,
  .inv-dialog-large:has(.inv-product-media) .inv-fields-2{gap:10px}
  .inv-dialog-large:has(.inv-product-media) .inv-section{font-size:12px;margin:8px 0;padding-top:9px}
  .inv-dialog-large:has(.inv-product-media) .inv-type-row{gap:8px}
  .inv-dialog-large:has(.inv-product-media) .inv-type{min-height:53px;padding:8px;font-size:12px}
  .inv-dialog-large:has(.inv-product-media) .inv-type small{font-size:10px;margin-top:3px}
  .inv-dialog-large:has(.inv-product-media) input:not([type=checkbox]):not([type=radio]):not([type=file]),
  .inv-dialog-large:has(.inv-product-media) select{min-height:33px;height:35px;padding:6px 9px;font-size:12px;border-radius:4px}
  .inv-dialog-large:has(.inv-product-media) textarea{min-height:72px;padding:6px 9px;font-size:12px;border-radius:4px}
  .inv-dialog-large:has(.inv-product-media) .inv-product-media{margin:8px 0 5px}
  .inv-dialog-large:has(.inv-product-media) .inv-upload-area{min-height:78px}
  .inv-dialog-large:has(.inv-product-media) .inv-qty-line{margin-top:8px;padding-top:9px}
  .inv-dialog-large:has(.inv-product-media) .inv-product-bottom{margin-top:8px;padding:9px 0 7px}
  .inv-dialog-large:has(.inv-product-media) .inv-dialog-footer{margin-top:8px;padding-top:10px}
  .inv-dialog-large:has(.inv-product-media) .hint{font-size:10px;line-height:1.5}
}
@media(max-width:740px){.inv-dialog-large:has(.inv-product-media){max-width:100%;width:100%}}

/* Update 20: compact stocktake dialog inspired by reference workflow; stocktake remains draft-only. */
@media(min-width:751px){
 .inv10-dialog.ajeal-stocktake-modal{width:min(990px,calc(100vw - 56px));max-height:calc(100dvh - 28px);border-radius:5px}
 .ajeal-stocktake-modal .inv10-head{padding:15px 22px;font-size:17px}
 .ajeal-stocktake-modal .inv10-body{padding:19px 23px 21px}
 .ajeal-stocktake-modal .inv12-fields{gap:13px;grid-template-columns:repeat(3,minmax(0,1fr))}
 .ajeal-stocktake-modal .inv12-section{margin-top:19px;padding-top:18px}
 .ajeal-stocktake-modal .inv12-bottom{gap:12px}
 .ajeal-stocktake-modal .inv12-bottom textarea{min-height:82px}
 .ajeal-stocktake-modal .inv12-attachment{min-height:82px}
 .ajeal-stocktake-modal .inv12-rows{max-height:30dvh}
}
.ajeal-stocktake-modal .inv12-table-head{color:#263451}
.ajeal-stocktake-modal .inv12-right{justify-content:flex-start;align-items:center}
.ajeal-stocktake-modal .inv12-footer{justify-content:flex-start}
.ajeal-stocktake-modal .inv12-save{background:#13b886}
.ajeal-stocktake-modal .inv12-line button.secondary{background:#eeedff;color:#3c35a7;border:0}
.ajeal-stocktake-modal .inv15-stocktake-help{margin-top:12px;font-size:12px;padding:10px 13px}
@media(max-width:750px){.inv10-dialog.ajeal-stocktake-modal{width:100%;max-height:calc(100dvh - 10px)}}

/* Update 21 — purchasing section: compact centered professor-style dialogs */
.purchase-toolbar{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin:12px 0 20px;direction:rtl}
.purchase-dialog{width:min(1160px,calc(100vw - 36px));max-height:calc(100dvh - 38px);background:#f3f4f6;border-radius:7px}
.purchase-dialog .inv10-head{font-size:17px;padding:16px 22px}.purchase-dialog .inv10-body{padding:20px 22px}
.purchase-dialog .field label{font-size:13px;font-weight:700;color:#303a52;margin-bottom:5px}
.purchase-dialog input,.purchase-dialog textarea,.purchase-dialog select{background:white;border:1px solid #d8dfea;border-radius:5px;min-height:41px;width:100%;font:inherit}
.purchase-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;margin-bottom:18px}.purchase-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.purchase-dialog .purchase-items{border-top:1px solid #d7dde6;padding-top:20px;margin-top:20px;overflow-x:auto}
.purchase-dialog .purchase-items table{min-width:590px;width:100%}.purchase-dialog .purchase-items th{background:transparent}.purchase-dialog .purchase-items td{padding:6px}
.purchase-payment-modal{width:min(880px,calc(100vw - 36px))}.purchase-dialog .purchase-toolbar{margin-top:15px;margin-bottom:4px}
@media(max-width:760px){.purchase-grid,.purchase-grid.two{grid-template-columns:1fr}.purchase-dialog{width:calc(100vw - 12px);max-height:calc(100dvh - 12px)}.purchase-dialog .inv10-body{padding:12px}.container .compact-filter{max-width:100%}}
/* UPDATE 22 purchase invoice: reference-sized centered dialog, scoped to purchase screen */
.ap22-backdrop{position:fixed;inset:0;background:#18223c80;z-index:300;display:flex;align-items:center;justify-content:center;padding:16px;direction:rtl}
.ap22-dialog{background:#f4f5f8;width:min(1208px,calc(100vw - 40px));max-height:calc(100dvh - 32px);display:flex;flex-direction:column;overflow:hidden;border-radius:7px;box-shadow:0 12px 38px #18203938;color:#202c43;font-size:12px}
.ap22-dialog form{display:flex;flex-direction:column;min-height:0}.ap22-head{background:#fff;display:flex;align-items:center;justify-content:space-between;padding:13px 21px;border-bottom:1px solid #e1e4ed}.ap22-head h2{font-size:16px;margin:0}.ap22-head a{font-size:20px;color:#8a95a8;text-decoration:none}
.ap22-body{padding:18px 20px;overflow:auto;max-height:calc(100dvh - 146px)}.ap22-dialog .field{min-width:0;margin:0}.ap22-dialog .field label{display:block;font-size:12px;margin:0 0 5px;font-weight:650}.ap22-dialog input:not([type=checkbox]),.ap22-dialog select,.ap22-dialog textarea{width:100%;box-sizing:border-box;border:1px solid #d5dce8;border-radius:4px;padding:7px 9px;min-height:34px;background:#fff;font:inherit;color:#23314b}.ap22-dialog input[readonly]{background:#f2f3f6}.ap22-top{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 12px;margin-bottom:20px}.ap22-top .field small{display:block;margin-top:4px}.ap22-top a{color:#4739cd}
.ap22-table-wrap{overflow-x:auto;border-top:1px solid #d9dde6;padding-top:15px}.ap22-table{width:100%;border-collapse:collapse;min-width:720px}.ap22-table th{font-size:12px;background:transparent;padding:10px 4px;border-bottom:1px solid #d6dce7}.ap22-table td{border-bottom:1px solid #d6dce7;padding:4px}.ap22-table td:first-child{width:27%}.ap22-table td:nth-child(2){width:17%}.ap22-table td:nth-child(3),.ap22-table td:nth-child(4){width:11%}.ap22-table td:nth-child(5),.ap22-table td:nth-child(6){width:10%;text-align:center}.ap22-table .btn{min-height:30px;padding:5px 7px}
.ap22-add{display:flex;justify-content:flex-start;padding:8px 0 3px}.ap22-totals{display:flex;gap:18px;flex-wrap:wrap;padding:9px 0 17px;border-bottom:1px solid #d6dce6;font-size:12px}.ap22-totals b{margin-inline-start:5px}.ap22-tabs{display:flex;gap:24px;flex-wrap:wrap;border-bottom:1px solid #d6dce6;margin-top:13px;padding:8px 0}.ap22-tabs span:first-child{color:#473bde;border-bottom:2px solid #473bde;padding-bottom:8px}.ap22-tabs span:not(:first-child){font-size:10px;color:#8992a4}
.ap22-payment{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px;align-items:end;margin:12px 0 16px}.ap22-paid{display:flex;gap:7px;align-items:center;padding-bottom:8px}.ap22-notes{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:8px}.ap22-notes textarea{min-height:76px}.ap22-attachment{border:1px dashed #cdd5e3;min-height:76px;display:flex;align-items:center;justify-content:center;color:#8590a3}.ap22-warning{font-size:11px;background:#fff1e8;color:#a35435;padding:10px 13px;margin-top:13px;border-radius:5px}.ap22-foot{background:#f4f5f8;display:flex;gap:8px;border-top:1px solid #d8dce6;padding:10px 20px}.ap22-submit{background:#11b887!important}
@media(max-width:750px){.ap22-backdrop{padding:4px}.ap22-dialog{width:100%;max-height:99dvh}.ap22-body{padding:12px;max-height:calc(99dvh - 126px)}.ap22-top{grid-template-columns:repeat(2,minmax(0,1fr))}.ap22-payment,.ap22-notes{grid-template-columns:1fr}.ap22-tabs{gap:10px}}

/* UPDATE 26 — styles served from assets/style.css (not root/style.css).
   Match reference table order, compact spacing and legible per-line price mode. */
.ap22-dialog{width:min(1208px,calc(100vw - 40px));font-size:12px}
.ap22-table{min-width:870px;table-layout:fixed}
.ap22-table th:nth-child(1),.ap22-table td:nth-child(1){width:23%}
.ap22-table th:nth-child(2),.ap22-table td:nth-child(2){width:16%}
.ap22-table th:nth-child(3),.ap22-table td:nth-child(3){width:9%}
.ap22-table th:nth-child(4),.ap22-table td:nth-child(4){width:16%}
.ap22-table th:nth-child(5),.ap22-table td:nth-child(5){width:9%}
.ap22-table th:nth-child(6),.ap22-table td:nth-child(6){width:13%}
.ap22-table th:nth-child(7),.ap22-table td:nth-child(7){width:9%}
.ap22-table th:nth-child(8),.ap22-table td:nth-child(8){width:5%}
.ap22-table td{padding:3px}
.ap22-table td>*{max-width:100%}
.ap22-table .ap24-price{display:flex;flex-direction:column;gap:3px}
.ap22-table .ap24-price input{min-height:30px;padding:4px 5px}
.ap22-table .ap24-price select{min-height:26px;padding:3px 4px;font-size:11px;color:#4d42a6;background:#f5f4ff}
.ap22-table .ap26-discount{display:flex;align-items:center;gap:3px;direction:ltr}
.ap22-table .ap26-discount input{min-width:0;min-height:30px;padding:3px 2px;text-align:center}
.ap22-table .ap26-discount span{font-weight:700;color:#69758a}
.ap22-table .ap22-rate{font-size:11px;padding:4px 2px}
.ap22-table .ap22-line{font-weight:700;white-space:nowrap}
@media(max-width:900px){.ap22-table-wrap{overflow-x:auto}}

/* Update 27: clean single-height price input, reference column order */
.ap22-table{table-layout:fixed;min-width:850px;direction:rtl}
.ap22-table th:nth-child(1),.ap22-table td:nth-child(1){width:24%}
.ap22-table th:nth-child(2),.ap22-table td:nth-child(2){width:16%}
.ap22-table th:nth-child(3),.ap22-table td:nth-child(3){width:9%}
.ap22-table th:nth-child(4),.ap22-table td:nth-child(4){width:13%}
.ap22-table th:nth-child(5),.ap22-table td:nth-child(5){width:11%}
.ap22-table th:nth-child(6),.ap22-table td:nth-child(6){width:13%}
.ap22-table th:nth-child(7),.ap22-table td:nth-child(7){width:9%}
.ap22-table th:nth-child(8),.ap22-table td:nth-child(8){width:5%}
.ap22-table td input:not([type=hidden]),.ap22-table td select{height:35px;min-height:35px!important}
.ap22-table td input[type=hidden]{display:none!important}
.ap22-table .ap26-discount{height:35px}

/* Ajeal purchase tax-inclusive entry, optional exclusive mode */
.ap30-pricemode{display:flex;align-items:flex-start;gap:8px;flex-wrap:wrap;margin:6px 0 14px;font-size:12px;color:#59677e}.ap30-pricemode label{display:inline-flex;align-items:center;gap:6px;font-weight:700;cursor:pointer}.ap30-pricemode input{accent-color:#5145df}.ap30-pricemode small{font-size:11px;color:#697994}

/* Product pricing form: four inputs, one tax selector near barcode only. */
@media(min-width:741px){.inv-overlay .inv-dialog-large:has(.inv-product-media){width:min(870px,calc(100vw - 56px));max-width:870px}}

/* Ajeal purchase order form - compact RTL */
.po-dialog{width:min(1210px,calc(100vw - 30px))}.po-dialog .inv10-body{padding:16px 20px}.po-dialog .purchase-grid{margin-bottom:12px}.po-dialog .purchase-items{margin-top:12px;padding-top:12px}.po-dialog .po-table{min-width:900px;table-layout:fixed;border-collapse:collapse}.po-table th,.po-table td{padding:5px 3px!important;text-align:right;font-size:12px}.po-table th:nth-child(1){width:24%}.po-table th:nth-child(2){width:17%}.po-table th:nth-child(3){width:9%}.po-table th:nth-child(4){width:10%}.po-table th:nth-child(5){width:10%}.po-table th:nth-child(6){width:15%}.po-table th:nth-child(7){width:9%}.po-table th:nth-child(8){width:6%}.po-table input,.po-table select{min-height:34px!important;font-size:12px;padding:4px!important}.po-line-total{white-space:nowrap}.po-sum{display:flex;gap:18px;justify-content:flex-end;font-size:13px;padding:8px 0;border-bottom:1px solid #d7dde6}.po-sum strong{margin-inline-start:5px}.po-tabs{display:flex;gap:18px;border-bottom:1px solid #d7dde6;margin-top:12px}.po-tab{background:none;border:0;border-bottom:2px solid transparent;padding:10px 3px;color:#65718b;cursor:pointer}.po-tab.active{color:#493ce8;border-color:#493ce8}.po-panel{min-height:67px;padding:10px 0;text-align:right}.po-panel[hidden]{display:none}.po-panel input,.po-panel select{max-width:230px;display:block;margin-top:4px}.po-bottom{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:8px}.po-dropzone{min-height:85px;border:1px dashed #bfc8d8;display:flex;align-items:center;justify-content:center;color:#697591}.po-footer{border-top:1px solid #d7dde6;padding-top:12px}.po-link{display:inline-block;margin-top:9px;color:#493ce8}@media(max-width:700px){.po-bottom{grid-template-columns:1fr}}

/* Ajeal PO 28: layout matches the purchase entry workflow and keeps actions reachable */
.inv10-dialog.po-dialog{width:min(1210px,calc(100vw - 34px));max-height:calc(100dvh - 24px);display:flex;flex-direction:column;overflow:hidden;border-radius:7px}
.po-dialog .inv10-head{flex:0 0 auto;padding:15px 21px;font-size:16px}
.po-dialog .inv10-body{overflow-y:auto;flex:1;min-height:0;padding:15px 20px 16px;scrollbar-gutter:stable}
.po-dialog .po-table{min-width:950px}
.po-dialog .po-version{font-size:11px;color:#7a8495;text-align:left;margin-bottom:3px}
.po-dialog .po-helper{font-size:11px;color:#67758f;margin:4px 0 0;text-align:right}
.po-dialog .po-footer{position:sticky;bottom:-16px;background:#f6f7fa;z-index:3;padding:12px 0;margin-top:10px;box-shadow:0 -5px 10px #f6f7fa}
.po-dialog .purchase-grid{column-gap:10px;row-gap:8px;margin-bottom:10px}
.po-dialog .po-bottom{margin-top:6px}
@media(max-width:780px){.inv10-dialog.po-dialog{width:calc(100vw - 10px);max-height:calc(100dvh - 10px)}.po-dialog .inv10-body{padding:12px 9px}.po-dialog .purchase-grid,.po-dialog .purchase-grid.two{grid-template-columns:1fr}}

/* Purchase order form patch — compact and readable, tax mode is one switch */
.po-dialog .po-version{display:none}
.po-dialog .purchase-grid{margin-bottom:8px}
.po-dialog .purchase-items{margin-top:12px;padding-top:10px}
.po-dialog .po-table th{white-space:nowrap}
.po-dialog .po-table td{vertical-align:middle}
.po-dialog .po-table select,.po-dialog .po-table input{width:100%;max-width:100%;box-sizing:border-box}
.po-pricemode{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:10px 0;padding:7px 0;font-size:12px}
.po-pricemode label{display:inline-flex;align-items:center;gap:7px;white-space:nowrap;font-weight:700}
.po-pricemode input[type=checkbox]{width:17px;height:17px;min-height:0;accent-color:#4b42e7}
.po-pricemode small{font-size:11px;color:#64748b}
.po-notice{font-size:11px;color:#856324;background:#fff8e7;padding:9px 12px;border-radius:5px}
.po-dialog .po-footer .btn{min-height:34px}
.po-dialog .po-table th:nth-child(1){width:24%}
.po-dialog .po-table th:nth-child(2){width:15%}
.po-dialog .po-table th:nth-child(3){width:8%}
.po-dialog .po-table th:nth-child(4){width:10%}
.po-dialog .po-table th:nth-child(5){width:9%}
.po-dialog .po-table th:nth-child(6){width:15%}
.po-dialog .po-table th:nth-child(7){width:11%}
.po-dialog .po-table th:nth-child(8){width:8%}

/* Ajeal Supplier Form - isolated styles */
.inv10-dialog.ajeal-supplier-modal{width:min(990px,calc(100vw - 24px));max-height:calc(100dvh - 24px)}
.ajeal-supplier-modal .inv10-body{padding:16px 20px}.ajeal-supplier-modal .purchase-grid{gap:9px 12px;margin-bottom:12px}
.ajeal-supplier-modal .field label{margin-bottom:4px;font-size:12px}.ajeal-supplier-modal .field input,.ajeal-supplier-modal .field select{min-height:37px}
.ajeal-supplier-modal .supplier-extras{display:grid;grid-template-columns:1fr 1.4fr;gap:15px;margin-top:14px}
.ajeal-supplier-modal .supplier-section-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:9px}
.ajeal-supplier-modal .ajeal-contact-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) auto;gap:7px;align-items:end;padding:9px 0;border-top:1px solid #dce2ec}
.ajeal-supplier-modal .ajeal-contact-row .btn{white-space:nowrap}
@media(max-width:760px){.ajeal-supplier-modal .supplier-extras{grid-template-columns:1fr}.ajeal-supplier-modal .ajeal-contact-row{grid-template-columns:repeat(2,minmax(0,1fr))}.ajeal-supplier-modal .ajeal-contact-row .btn{grid-column:1/-1}}

/* Ajeal Supplier extended form */
.ajeal-supplier-modal{width:min(1100px,calc(100vw - 20px))!important}.ajeal-supplier-modal .purchase-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 14px}
.ajeal-supplier-modal .supplier-account-section,.ajeal-supplier-modal .supplier-attachments{padding:13px 0;border-top:1px solid #d8dfeb;margin-top:12px}
.ajeal-supplier-modal .supplier-opening-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.ajeal-supplier-modal .supplier-confirm{display:flex;align-items:center;gap:7px;margin:12px 0}.ajeal-supplier-modal .supplier-confirm input,.ajeal-supplier-modal .supplier-file-remove input{width:auto}
.ajeal-supplier-modal .supplier-upload{display:block;padding:22px;border:1px dashed #abb9dc;text-align:center;border-radius:8px;cursor:pointer;background:#f7f8ff}.ajeal-supplier-modal .supplier-upload input{display:block;max-width:400px;margin:8px auto 0}.ajeal-supplier-modal .supplier-file-list>div{padding:7px;border-bottom:1px solid #e4e8f2;display:flex;gap:14px;align-items:center}.ajeal-supplier-modal .supplier-file-list a{color:#433de0}.ajeal-supplier-modal .supplier-file-remove{margin-inline-start:auto}
.ajeal-supplier-modal .supplier-opening-saved{padding:12px;background:#f1faf5;border-radius:7px}
@media(max-width:760px){.ajeal-supplier-modal .purchase-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ajeal-supplier-modal .supplier-opening-grid{grid-template-columns:1fr}}@media(max-width:480px){.ajeal-supplier-modal .purchase-grid{grid-template-columns:1fr}}

/* Finance V29: compact centered forms, matching Ajeal visual identity. */
.finance-nav{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0 16px}
.finance-panel{max-width:1020px;margin:0 auto 16px;padding:18px 22px}
.finance-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 14px}
.finance-panel .field input,.finance-panel .field select{height:39px;min-height:39px}
.finance-panel .hint{margin-top:12px;line-height:1.75}
@media(max-width:700px){.finance-grid{grid-template-columns:1fr}.finance-panel{padding:14px}.finance-nav .btn{flex:1 1 40%}}

/* Ajeal finance navigation: four sections, accounting nested under finance. */
.sidebar .finance-accounting-group{margin:0;padding:0}
.sidebar .finance-accounting-title{display:flex!important;align-items:center;justify-content:space-between;cursor:pointer;list-style:none;margin:0}
.sidebar .finance-accounting-title::-webkit-details-marker{display:none}
.sidebar .finance-accounting-title .nav-caret{font-size:15px;margin-inline-start:6px;transition:transform .16s}
.sidebar .finance-accounting-group[open] .finance-accounting-title .nav-caret{transform:rotate(180deg)}
.sidebar .finance-accounting-links{padding:2px 8px 5px 0;margin:0 10px 4px 0;border-right:2px solid #a9a4fa55}
.sidebar .finance-accounting-links .sub-menu{font-size:12px;padding:7px 12px}

/* AJEAL 2026-11-04 — responsive finance modal and desktop/laptop breakpoints */
html{overflow-x:hidden}body{min-width:0}.layout,.main,.container,.panel{min-width:0}
.fin-ref-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;max-width:1030px;margin:8px auto 15px}.fin-ref-toolbar strong{font-size:16px}.fin-ref-toolbar small{display:block;color:#758196;font-size:12px}.fin-ref-add{background:#4b42df}
.fin-ref-backdrop[hidden]{display:none!important}.fin-ref-backdrop{position:fixed;inset:0;z-index:6000;background:#202e4b78;display:flex;align-items:center;justify-content:center;padding:12px}.fin-ref-dialog{width:min(100%,1000px);max-height:calc(100dvh - 24px);background:#f4f5f8;border-radius:7px;display:flex;flex-direction:column;box-shadow:0 20px 70px #172b4d4a;overflow:hidden}.fin-ref-head{background:white;padding:13px 23px;display:flex;align-items:center;justify-content:space-between;flex:none;border-bottom:1px solid #e0e4ed}.fin-ref-head h3{font-size:17px;margin:0}.fin-ref-close{border:0;background:transparent;color:#8290a8;font-size:26px;cursor:pointer;line-height:1}.fin-ref-dialog form{display:flex;min-height:0;flex:1;flex-direction:column}.fin-ref-body{overflow-y:auto;min-height:0;flex:1;padding:18px 22px}.fin-ref-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 15px;align-items:start}.fin-ref-fields .field{min-width:0;gap:5px}.fin-ref-fields label{font-size:12px;color:#35445f}.fin-ref-fields input,.fin-ref-fields select{height:38px;min-height:38px;border-radius:5px;padding:6px 10px;max-width:100%}.fin-ref-fields textarea{min-height:65px;resize:vertical;border-radius:5px}.fin-ref-span{grid-column:1/-1}.fin-ref-tax{background:#e9edf6;padding:9px 12px;border-radius:5px;font-weight:700;color:#465372}.fin-ref-foot{background:#f4f5f8;border-top:1px solid #dde2eb;display:flex;gap:8px;padding:12px 22px;flex:none}.fin-ref-save{background:#11b981;border-radius:5px}.fin-ref-dialog .hint{font-size:11px;line-height:1.55}.finance-panel{max-width:1030px}
@media (min-width:1100px){.layout>.sidebar{width:clamp(185px,14vw,210px);min-width:clamp(185px,14vw,210px)}.main>.container{width:100%;max-width:1200px;padding:clamp(13px,1.5vw,23px)}.main .topbar{padding:10px clamp(12px,2vw,25px)}}
@media (min-width:741px) and (max-width:1365px){.main>.container{max-width:100%;padding:14px 16px}.layout>.sidebar{width:185px;min-width:185px}.sidebar .brand{font-size:16px}.sidebar .menu,.sidebar .sub-menu{font-size:12px!important}.topbar{padding:10px 15px}.fin-ref-body{padding:13px 17px}.fin-ref-fields{gap:9px 12px}.fin-ref-dialog{width:min(900px,calc(100vw - 35px))}.fin-ref-head{padding:10px 17px}.fin-ref-fields input,.fin-ref-fields select{height:36px;min-height:36px}.fin-ref-foot{padding:9px 17px}}
@media (max-width:740px){.main>.container{width:100%;padding:12px}.fin-ref-backdrop{padding:5px}.fin-ref-dialog{width:100%;max-height:calc(100dvh - 10px)}.fin-ref-fields{grid-template-columns:1fr}.fin-ref-span{grid-column:1}.fin-ref-body{padding:12px}.fin-ref-foot{padding:9px 12px}.fin-ref-toolbar{flex-wrap:wrap}.fin-ref-fields textarea{min-height:56px}.finance-grid{grid-template-columns:1fr}}
@media (max-height:760px){.fin-ref-body{padding-top:10px;padding-bottom:10px}.fin-ref-fields{gap:7px 12px}.fin-ref-fields input,.fin-ref-fields select{height:34px;min-height:34px}.fin-ref-fields textarea{min-height:50px}.fin-ref-head,.fin-ref-foot{padding-top:9px;padding-bottom:9px}}

.fin-ref-search{margin-bottom:10px;max-width:420px}.fin-ref-search input{border-radius:5px;height:37px}.fin-ref-list tbody tr[hidden]{display:none!important}

/* Ajeal Finance: compact, readable expense lines on 14-inch and larger screens */
.fin-exp-table-wrap{min-width:0;width:100%}.fin-exp-table-scroll{overflow-x:auto;max-width:100%}.fin-exp-table{width:100%;min-width:650px;border-collapse:collapse;table-layout:fixed;direction:rtl}.fin-exp-table th{font-size:13px;font-weight:700;padding:8px 5px;background:#e9edf7;color:#243653}.fin-exp-table td{padding:6px 4px;border-bottom:1px solid #e5e9f1}.fin-exp-table th:first-child{width:27%}.fin-exp-table th:nth-child(2){width:19%}.fin-exp-table th:nth-child(3){width:25%}.fin-exp-table th:nth-child(4){width:21%}.fin-exp-table th:last-child{width:8%}.fin-exp-table td input,.fin-exp-table td select{box-sizing:border-box;width:100%;min-width:0;font-size:13px;padding:9px 6px;border:1px solid #ccd5e5;border-radius:6px;background:#fff;color:#172b4d}.fin-exp-actions{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:10px 0}.fin-exp-remove{border:0;background:#fff0f0;color:#b42332;cursor:pointer;border-radius:5px;padding:7px 3px;font-size:12px}.fin-ref-dialog{max-width:min(1000px,calc(100vw - 30px));width:100%;box-sizing:border-box}.fin-ref-body{max-height:calc(100dvh - 170px);overflow-y:auto}.fin-ref-span.fin-exp-table-wrap{grid-column:1 / -1}.fin-exp-table select:focus,.fin-exp-table input:focus{outline:2px solid #6858dd;outline-offset:0}@media(max-width:800px){.fin-ref-dialog{max-width:calc(100vw - 14px)}.fin-ref-body{max-height:calc(100dvh - 125px)}.fin-exp-table{min-width:650px}.fin-exp-actions{flex-wrap:wrap}}

/* AJEAL FINANCE THEME 34 — consistent, readable forms inspired by the supplied reference.
   Scoped exclusively to finance dialogs. No data or accounting logic changed. */
.fin-ref-backdrop{padding:clamp(8px,1.5vw,22px);background:rgba(36,48,75,.50);z-index:6000}
.fin-ref-dialog{
  width:min(1320px,calc(100vw - 34px));
  max-width:calc(100vw - 34px);
  max-height:calc(100dvh - 28px);
  background:#f3f4f7;
  color:#1c2840;
  border-radius:7px;
  box-shadow:0 20px 55px rgba(24,35,56,.27);
}
.fin-ref-head{padding:18px 28px;background:#fff;border-bottom:1px solid #dfe3ea;min-height:68px}
.fin-ref-head h3{font-size:clamp(17px,1.2vw,21px);font-weight:750;color:#14223b}
.fin-ref-close{font-size:27px;min-width:30px;min-height:32px}
.fin-ref-body{padding:25px 30px 20px;max-height:none;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.fin-ref-fields{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:18px;row-gap:18px}
.fin-ref-fields .field{gap:7px}
.fin-ref-fields label,.fin-ref-body .fin-ref-span>label{font-size:clamp(13px,.95vw,16px);font-weight:700;color:#233049}
.fin-ref-fields input,.fin-ref-fields select{height:48px;min-height:48px;padding:9px 13px;font-size:clamp(14px,1vw,17px);background:#fff;border:1px solid #cdd4df;border-radius:6px;color:#1b2940}
.fin-ref-fields textarea{font-size:clamp(14px,1vw,17px);min-height:105px;padding:13px;border:1px solid #cdd4df;border-radius:6px;background:#fff}
.fin-exp-table-wrap{margin-top:6px}
.fin-exp-table-scroll{border:0;overflow-x:auto}
.fin-exp-table{min-width:740px;table-layout:fixed}
.fin-exp-table th{font-size:clamp(13px,.95vw,16px);padding:12px 8px;background:transparent;color:#26334a;border-bottom:1px solid #cfd6e1}
.fin-exp-table td{padding:5px 4px;border-bottom:1px solid #d9dfe8}
.fin-exp-table th:first-child{width:30%}
.fin-exp-table th:nth-child(2){width:16%}
.fin-exp-table th:nth-child(3){width:26%}
.fin-exp-table th:nth-child(4){width:20%}
.fin-exp-table th:last-child{width:8%}
.fin-exp-table td input,.fin-exp-table td select{height:48px;min-height:48px;font-size:clamp(13px,.96vw,16px);padding:8px 11px;border:1px solid #cbd3dd;border-radius:5px;background:#fff}
.fin-exp-table td select{cursor:pointer}
.fin-exp-actions{margin:12px 0 14px;font-size:16px}
.fin-exp-actions .btn{min-height:45px;padding:9px 15px;background:#5045e5}
.fin-exp-remove{font-size:14px;padding:9px 6px}
.fin-ref-tax{font-size:clamp(13px,.9vw,15px);padding:13px 15px;border-radius:4px;background:#e7ebf3}
.fin-ref-dialog .hint{font-size:clamp(12px,.85vw,14px);line-height:1.65}
.fin-ref-foot{padding:15px 29px;border-top:1px solid #d9dee7;background:#f3f4f7;gap:10px}
.fin-ref-foot .btn{min-height:45px;padding:10px 17px;font-size:clamp(13px,.95vw,16px);border-radius:5px}
.fin-ref-fields input:focus,.fin-ref-fields select:focus,.fin-ref-fields textarea:focus,.fin-exp-table td input:focus,.fin-exp-table td select:focus{outline:2px solid #5145e5;outline-offset:0;border-color:#5145e5}
@media(max-width:1100px){.fin-ref-dialog{width:calc(100vw - 24px);max-width:calc(100vw - 24px)}.fin-ref-body{padding:17px 20px}.fin-ref-head{padding:13px 20px;min-height:57px}.fin-ref-fields{gap:12px 14px}.fin-ref-fields input,.fin-ref-fields select,.fin-exp-table td input,.fin-exp-table td select{height:43px;min-height:43px}.fin-ref-foot{padding:12px 20px}}
@media(max-width:740px){.fin-ref-backdrop{padding:5px}.fin-ref-dialog{width:calc(100vw - 10px);max-width:calc(100vw - 10px);max-height:calc(100dvh - 10px)}.fin-ref-fields{grid-template-columns:1fr}.fin-ref-span{grid-column:1}.fin-ref-body{padding:12px}.fin-ref-head{padding:11px 14px}.fin-ref-foot{padding:10px 12px}.fin-exp-table{min-width:740px}.fin-exp-actions{flex-wrap:wrap}.fin-ref-fields textarea{min-height:75px}}
@media(max-height:740px){.fin-ref-dialog{max-height:calc(100dvh - 14px)}.fin-ref-body{padding-top:12px;padding-bottom:12px}.fin-ref-fields{row-gap:10px}.fin-ref-head{min-height:50px;padding-top:9px;padding-bottom:9px}.fin-ref-foot{padding-top:9px;padding-bottom:9px}}

/* AJEAL FINANCE INPUT 35: same entry workflow at 14-inch and 24-inch without browser zoom. */
.fin-exp-mode{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:0 0 8px}
.fin-exp-mode-btn{border:1px solid #d6dcef;border-radius:5px;background:white;color:#39486a;cursor:pointer;padding:7px 14px;font-weight:700}
.fin-exp-mode-btn.is-selected{background:#5045e5;border-color:#5045e5;color:white}
.fin-exp-mode span{color:#64748b;font-size:12px;margin-inline-start:8px}
.fin-exp-actions #fin-exp-add[hidden]{display:none!important}
@media(min-width:741px) and (max-width:1500px){
.fin-ref-dialog{width:min(1040px,calc(100vw - 26px));max-width:calc(100vw - 26px)}
.fin-ref-head{padding:11px 20px;min-height:52px}
.fin-ref-body{padding:12px 20px;scrollbar-gutter:auto}
.fin-ref-fields{gap:10px 14px}
.fin-ref-fields input,.fin-ref-fields select{height:38px;min-height:38px;font-size:13px;padding:6px 9px}
.fin-exp-table{min-width:650px}
.fin-exp-table th{font-size:13px;padding:7px 5px}
.fin-exp-table td input,.fin-exp-table td select{height:37px;min-height:37px;font-size:13px;padding:5px 7px}
.fin-ref-fields textarea{min-height:58px;font-size:13px}
.fin-exp-actions{margin:6px 0}
.fin-exp-actions .btn{min-height:35px;padding:6px 11px}
.fin-ref-tax{padding:8px 10px;font-size:12px}
.fin-ref-foot{padding:9px 20px}
.fin-ref-foot .btn{min-height:36px;padding:7px 12px;font-size:13px}
}
@media(max-width:740px){.fin-exp-mode span{width:100%;margin:0}.fin-exp-table-scroll{overflow-x:auto}.fin-ref-dialog{max-height:calc(100dvh - 12px)}}

/* Finance expense attachments */
.fin-exp-upload{display:grid;gap:8px}.fin-exp-drop{min-height:90px;border:2px dashed #cbd5e1;border-radius:8px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:6px;cursor:pointer;text-align:center;color:#64748b;background:#fafbff;padding:16px}.fin-exp-drop strong{color:#4f46e5}.fin-exp-drop.over{border-color:#4f46e5;background:#eef2ff}.fin-exp-drop small{font-size:12px}.fin-exp-upload input[type=file]{max-width:100%;font-size:12px}.fin-exp-upload #fin-exp-selected>div{padding:5px 0;font-size:12px;overflow-wrap:anywhere}.fin-exp-file-link{display:inline-block;max-width:210px;overflow-wrap:anywhere;padding:3px 0;color:#4338ca}

/* UPDATE 38: vouchers add menu and adaptive compact forms */
.fin-add-wrap{position:relative;display:flex;align-items:center;justify-content:flex-end}
.fin-add-menu[hidden]{display:none!important}
.fin-add-menu{position:absolute;top:calc(100% + 6px);left:0;min-width:190px;z-index:6501;background:#fff;border:1px solid #e0e3eb;border-radius:7px;box-shadow:0 10px 28px #1b28402a;padding:6px;display:flex;flex-direction:column;direction:rtl}
.fin-add-menu button{background:none;border:0;padding:11px 15px;text-align:right;color:#25324c;font:inherit;cursor:pointer;border-radius:4px}
.fin-add-menu button:hover,.fin-add-menu button:focus-visible{background:#efeeff;color:#4339d8;outline:0}
.fin-ref-toolbar{max-width:1120px}.fin-ref-list{max-width:1120px;margin-inline:auto}
.fin-ref-dialog{width:min(900px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 22px)}
.fin-ref-fields input,.fin-ref-fields select{font-size:clamp(13px,1vw,15px)}
@media(max-width:740px){.fin-ref-dialog{width:calc(100vw - 10px);max-width:calc(100vw - 10px)}.fin-add-menu{left:auto;right:0}}

/* Patch42 accounting pages only */
.ajeal-accounting-scroll{max-width:100%;overflow-x:auto;margin-top:18px}.ajeal-journal-table{min-width:760px}.ajeal-journal-table td{padding:7px}.ajeal-journal-table input,.ajeal-journal-table select{min-width:120px}.ajeal-journal-table th:nth-child(2),.ajeal-journal-table td:nth-child(2){width:55px;text-align:center}.container .panel form .formgrid{grid-template-columns:repeat(3,minmax(0,1fr))}@media(max-width:900px){.container .panel form .formgrid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:620px){.container .panel form .formgrid{grid-template-columns:1fr}}

/* POS editable unit price */
.pos-unit-price-wrap{display:flex;flex-direction:column;gap:4px;min-width:92px;font-size:11px;color:#66738b}.pos-unit-price{width:100%;min-width:82px;box-sizing:border-box;border:1px solid #cfd5e5;border-radius:7px;padding:7px 6px;background:#fff;color:#17233c;font:600 13px inherit;text-align:center;direction:ltr;font-variant-numeric:tabular-nums}.pos-line-total{white-space:nowrap;font-weight:800}

.pos-cart-row{grid-template-columns:minmax(90px,1fr) auto minmax(90px,auto) auto auto}
@media(max-width:900px){.pos-cart-row{grid-template-columns:minmax(75px,1fr) auto minmax(80px,auto) auto auto;gap:6px}.pos-unit-price{min-width:72px;padding:6px 3px}}


/* Ajeal POS fixed cashier panel — Update 151 */
@media (min-width: 1051px) {
  body:has(.pos-fullscreen) {
    height: 100vh;
    overflow: hidden;
  }
  body:has(.pos-fullscreen) .layout {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
  }
  body:has(.pos-fullscreen) .main {
    height: 100vh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  body:has(.pos-fullscreen) .main > .topbar {
    flex: 0 0 auto;
  }
  body:has(.pos-fullscreen) .main > .container {
    flex: 1 1 auto;
    min-height: 0;
    height: 0;
    overflow: hidden;
    padding: 10px;
    max-width: none;
    display: flex;
    flex-direction: column;
  }
  body:has(.pos-fullscreen) .container > .hint {
    display: none;
  }
  body:has(.pos-fullscreen) .pos-fullscreen {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
  }
  body:has(.pos-fullscreen) .pos-toolbar {
    flex: 0 0 auto;
  }
  body:has(.pos-fullscreen) .pos-shell {
    flex: 1 1 auto;
    min-height: 0;
    height: 0;
    overflow: hidden;
  }
  body:has(.pos-fullscreen) .pos-products-pane {
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  body:has(.pos-fullscreen) .pos-product-grid {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    align-content: start;
  }
  body:has(.pos-fullscreen) .pos-cart-pane {
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }
  body:has(.pos-fullscreen) .pos-cart-items {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
  }
  body:has(.pos-fullscreen) .pos-cart-heading,
  body:has(.pos-fullscreen) .pos-customer,
  body:has(.pos-fullscreen) .pos-cart-totals,
  body:has(.pos-fullscreen) .pos-payment,
  body:has(.pos-fullscreen) #pos-checkout-form,
  body:has(.pos-fullscreen) .pos-cart-pane > .hint {
    flex: 0 0 auto;
  }
}
@media (max-width: 1050px) {
  body:has(.pos-fullscreen) {
    height: auto;
    overflow: auto;
  }
  body:has(.pos-fullscreen) .layout,
  body:has(.pos-fullscreen) .main,
  body:has(.pos-fullscreen) .main > .container,
  body:has(.pos-fullscreen) .pos-fullscreen,
  body:has(.pos-fullscreen) .pos-shell,
  body:has(.pos-fullscreen) .pos-cart-pane {
    height: auto;
    min-height: initial;
    overflow: visible;
  }
  body:has(.pos-fullscreen) .main {
    display: block;
  }
  body:has(.pos-fullscreen) .main > .container {
    display: block;
  }
  body:has(.pos-fullscreen) .pos-cart-items,
  body:has(.pos-fullscreen) .pos-product-grid {
    overflow: visible;
    min-height: 190px;
  }
}

/* Ajeal POS invoice items visibility — Update 153 */
@media (min-width: 1051px) {
  body:has(.pos-fullscreen) .pos-cart-pane {
    display: grid !important;
    grid-template-rows: auto auto minmax(150px, 1fr) auto auto auto;
    align-content: stretch;
    gap: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }
  body:has(.pos-fullscreen) .pos-cart-items {
    display: block;
    min-height: 150px !important;
    height: auto;
    max-height: none;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding: 4px 2px 8px;
  }
  body:has(.pos-fullscreen) .pos-cart-pane > .hint {
    display: none !important;
  }
  body:has(.pos-fullscreen) .pos-customer {
    margin: 8px 0 10px;
  }
  body:has(.pos-fullscreen) .pos-cart-totals {
    padding-top: 7px;
  }
  body:has(.pos-fullscreen) .pos-cart-totals > div {
    padding: 3px 0;
  }
  body:has(.pos-fullscreen) .pos-cart-totals .pos-grand {
    font-size: 20px;
  }
  body:has(.pos-fullscreen) .pos-payment {
    gap: 7px;
    padding: 7px 0;
  }
  body:has(.pos-fullscreen) .pos-pay-button {
    padding: 13px 10px;
  }
  body:has(.pos-fullscreen) .pos-cart-row {
    min-height: 54px;
    grid-template-columns: minmax(90px, 1fr) auto minmax(76px, 92px) auto auto;
    gap: 7px;
    padding: 8px 0;
  }
}


/* POS compact invoice lines: remove repeated inclusive-tax caption */
.pos-price-edit{display:flex;align-items:center;justify-content:center;min-width:76px;margin:0;padding:0}
.pos-price-edit input{width:76px;min-width:76px;box-sizing:border-box;padding:6px 5px;border:1px solid #dce2ef;border-radius:9px;text-align:center;direction:ltr;font-variant-numeric:tabular-nums;font-size:12px}
.pos-cart-row{gap:7px;padding:8px 0}
@media(max-width:900px){.pos-price-edit{min-width:66px}.pos-price-edit input{width:66px;min-width:66px}}
