/* ==========================================================================
   ESSA ERP - erp-base.css  (structural base, loaded BEFORE erp-theme.css)

   Replaces the legacy stylesheets that are no longer loaded (Nicepage
   nicepage.css / nicepageAr.css, HomeEn/Ar.css, bootstrapEn/Ar.min.css
   (Bootstrap 3), bootstrap.min.css (Bootstrap 4, was inside two modals),
   StyleEn/Ar.css, Login_Style(Ar).css, Offline/bootstrap.min.css, animate,
   meanmenu, mCustomScrollbar, summernote, c3, responsive, adminpro icons,
   IgGrid themes, jsgrid-theme, StyleStGrid, StylePos).
   See docs/redesign/LEGACY_CSS.md for the inventory.

   Rules here are STRUCTURAL only (reset, display/visibility helpers that
   the .ts code toggles, grid/layout utilities the markup still uses,
   widget skeletons). Every colour is a design token from erp-theme.css,
   so the six themes and RTL/LTR keep working. The look lives in
   erp-theme.css, which is loaded after this file and wins.
   ========================================================================== */

/* 1. RESET ================================================================ */
*, *::before, *::after { box-sizing: border-box; }

html {
    font-family: sans-serif;
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary { display: block; }

body {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
    text-align: start;
}

/* Nicepage made these containing blocks; absolutely positioned children rely on it */
body, aside, section, header, footer { position: relative; }
section > *, header > *, footer > * { position: relative; }

[hidden] { display: none !important; }

h1, h2, h3, h4, h5, h6 { margin-top: 0; margin-bottom: .5rem; font-weight: 500; line-height: 1.2; color: inherit; }
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p { margin-top: 0; margin-bottom: 1rem; }
ol, ul, dl { margin-top: 0; margin-bottom: 1rem; }
ol, ul { padding-inline-start: 20px; }
ol ol, ul ul, ol ul, ul ol { margin-bottom: 0; }
dt { font-weight: 700; }
dd { margin-bottom: .5rem; margin-inline-start: 0; }
b, strong { font-weight: bolder; }
small { font-size: 80%; }

a { background-color: transparent; text-decoration: none; }
a:hover { text-decoration: none; }

img { vertical-align: middle; border-style: none; }
svg { overflow: hidden; vertical-align: middle; }

table { border-collapse: collapse; border-spacing: 0; }
th { text-align: inherit; }
td, th { padding: 0; }

label { display: inline-block; max-width: 100%; margin-bottom: .5rem; }

button { border-radius: 0; }
button, input, optgroup, select, textarea { margin: 0; font-family: inherit; font-size: inherit; line-height: inherit; color: inherit; }
button, input { overflow: visible; }
button, select { text-transform: none; }
select { word-wrap: normal; }
button, [type="button"], [type="reset"], [type="submit"] { -webkit-appearance: button; appearance: button; }
button:not(:disabled), [type="button"]:not(:disabled), [type="reset"]:not(:disabled), [type="submit"]:not(:disabled) { cursor: pointer; }
[role="button"] { cursor: pointer; }
input[type="checkbox"], input[type="radio"] { box-sizing: border-box; padding: 0; }
[type="number"]::-webkit-inner-spin-button, [type="number"]::-webkit-outer-spin-button { height: auto; }
textarea { overflow: auto; resize: vertical; }
::-webkit-file-upload-button { font: inherit; -webkit-appearance: button; }

/* 2. HELPERS TOGGLED BY CODE (exact effect of StyleEn/StyleAr + Bootstrap 3) */
.display_none { display: none !important; }
.hidden_Control { display: none !important; }
.hidden, .hide { display: none !important; }
.show { display: block !important; }
.invisible { visibility: hidden; }
.disabledDiv { pointer-events: none; }
.div_disabled { pointer-events: none !important; opacity: .5 !important; cursor: default !important; }
.text_Mandatory { border: 2px solid var(--erp-danger) !important; }
.collapse:not(.show) { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.clearfix::after, .u-clearfix::after { content: ""; display: table; clear: both; }
.u-clearfix::before { content: ""; display: table; }
.u-form-control-hidden { display: none !important; }
#layout_img_Profile { cursor: pointer !important; }

/* 3. BOOTSTRAP GRID / UTILITIES still used by markup ======================= */
.container, .container-fluid { width: 100%; padding-inline: 15px; margin-inline: auto; }
@media (min-width: 576px) { .container { max-width: 540px; } }
@media (min-width: 768px) { .container { max-width: 720px; } }
@media (min-width: 992px) { .container { max-width: 960px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }

.row { display: flex; flex-wrap: wrap; margin-inline: -15px; }

/* (never erp-col-*: [class^="col-"] / [class*=" col-"] only match a class that starts with col-) */
.col, [class^="col-"], [class*=" col-"] { position: relative; width: 100%; padding-inline: 15px; }
.col { flex-basis: 0; flex-grow: 1; max-width: 100%; }

.col-1, .col-xs-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
.col-2, .col-xs-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-3, .col-xs-3 { flex: 0 0 25%; max-width: 25%; }
.col-4, .col-xs-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-5, .col-xs-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-6, .col-xs-6 { flex: 0 0 50%; max-width: 50%; }
.col-7, .col-xs-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-8, .col-xs-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-9, .col-xs-9 { flex: 0 0 75%; max-width: 75%; }
.col-10, .col-xs-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-11, .col-xs-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.col-12, .col-xs-12 { flex: 0 0 100%; max-width: 100%; }

@media (min-width: 576px) {
    .col-sm-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-sm-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-sm-3 { flex: 0 0 25%; max-width: 25%; }
    .col-sm-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-sm-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-sm-6 { flex: 0 0 50%; max-width: 50%; }
    .col-sm-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-sm-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-sm-9 { flex: 0 0 75%; max-width: 75%; }
    .col-sm-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-sm-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .col-sm-12 { flex: 0 0 100%; max-width: 100%; }
}
@media (min-width: 768px) {
    .col-md-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-md-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-md-3 { flex: 0 0 25%; max-width: 25%; }
    .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-md-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-md-9 { flex: 0 0 75%; max-width: 75%; }
    .col-md-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-md-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .col-md-12 { flex: 0 0 100%; max-width: 100%; }
}
@media (min-width: 992px) {
    .col-lg-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-lg-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
    .col-lg-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-lg-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
    .col-lg-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-lg-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-lg-9 { flex: 0 0 75%; max-width: 75%; }
    .col-lg-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-lg-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .col-lg-12 { flex: 0 0 100%; max-width: 100%; }
}
@media (min-width: 1200px) {
    .col-xl-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-xl-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-xl-3 { flex: 0 0 25%; max-width: 25%; }
    .col-xl-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-xl-6 { flex: 0 0 50%; max-width: 50%; }
    .col-xl-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-xl-9 { flex: 0 0 75%; max-width: 75%; }
    .col-xl-12 { flex: 0 0 100%; max-width: 100%; }
}

.d-none { display: none !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-column { flex-direction: column !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-end { justify-content: flex-end !important; }
.align-items-center { align-items: center !important; }
.align-self-center { align-self: center !important; }
.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }
.text-center { text-align: center !important; }
.text-start { text-align: start !important; }
.text-end { text-align: end !important; }
.text-white { color: var(--erp-on-primary, #fff) !important; }
.border-0 { border: 0 !important; }
.mt-5 { margin-top: 3rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.ms-1 { margin-inline-start: .25rem !important; }
.pe-3 { padding-inline-end: 1rem !important; }
.fs-2 { font-size: calc(1.325rem + .9vw) !important; }
.pull-left { float: left !important; }
.pull-right { float: right !important; }

/* 4. BOOTSTRAP COMPONENT SKELETONS (look comes from erp-theme.css) ========== */
.form-group { margin-bottom: 1rem; }
.form-control, .form-select {
    display: block;
    width: 100%;
    min-height: var(--erp-control-h, 40px);
    padding: .375rem .75rem;
    font-size: inherit;
    line-height: 1.5;
    color: var(--erp-text);
    background-color: var(--erp-surface);
    background-clip: padding-box;
    border: 1px solid var(--erp-gray-300, var(--erp-border));
    border-radius: var(--erp-control-radius, 8px);
}
textarea.form-control { height: auto; }
.form-control:disabled, .form-control[readonly] { background-color: var(--erp-gray-50); opacity: 1; }
.input-sm { min-height: var(--erp-control-h-sm, 32px); padding: .25rem .5rem; }

.btn {
    display: inline-block;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
    user-select: none;
    border: 1px solid transparent;
    padding: .375rem .75rem;
    line-height: 1.5;
    border-radius: var(--erp-control-radius, 8px);
    cursor: pointer;
}
.btn:disabled, .btn.disabled { opacity: .65; cursor: not-allowed; }
.btn-sm { padding: .25rem .5rem; }
.btn-block { display: block; width: 100%; }
.btn-block + .btn-block { margin-top: .5rem; }
.btn-group { position: relative; display: inline-flex; vertical-align: middle; }
.btn-primary { color: var(--erp-on-primary, #fff); background-color: var(--erp-primary); border-color: var(--erp-primary); }
.btn-success { color: var(--erp-on-primary, #fff); background-color: var(--erp-success-solid); border-color: var(--erp-success-solid); }
.btn-danger { color: var(--erp-on-primary, #fff); background-color: var(--erp-danger-solid); border-color: var(--erp-danger-solid); }
.btn-warning { color: var(--erp-on-primary, #fff); background-color: var(--erp-warning-solid); border-color: var(--erp-warning-solid); }
.btn-info { color: var(--erp-on-primary, #fff); background-color: var(--erp-primary); border-color: var(--erp-primary); }

.card { position: relative; display: flex; flex-direction: column; min-width: 0; word-wrap: break-word; background-color: var(--erp-surface); background-clip: border-box; border: 1px solid var(--erp-border); border-radius: var(--erp-radius-lg, 14px); }
.card-body { flex: 1 1 auto; min-height: 1px; padding: 1.25rem; }
.card-header { padding: .75rem 1.25rem; margin-bottom: 0; }

.table { width: 100%; max-width: 100%; margin-bottom: 1rem; }
.table th, .table td { padding: .75rem; vertical-align: middle; border-top: 1px solid var(--erp-border); }
.table thead th { vertical-align: bottom; border-bottom: 2px solid var(--erp-border); }
.table-bordered, .table-bordered th, .table-bordered td { border: 1px solid var(--erp-border); }
.table-borderless th, .table-borderless td, .table-borderless thead th { border: 0; }

.close { float: inline-end; font-size: 1.5rem; font-weight: 700; line-height: 1; opacity: .6; }
.close:hover { opacity: 1; cursor: pointer; }
button.close { padding: 0; background-color: transparent; border: 0; }

/* Modals: hidden by default, shown by code through inline display */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    display: none;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
}
.modal-content { position: relative; display: flex; flex-direction: column; width: 100%; background-color: var(--erp-surface); background-clip: padding-box; outline: 0; }
.modal-backdrop { position: fixed; top: 0; left: 0; z-index: 1040; width: 100vw; height: 100vh; background-color: var(--erp-overlay, rgba(0, 0, 0, .5)); }
.fade { transition: opacity .15s linear; }
.fade:not(.show) { opacity: 0; }

/* Toasts: ShowMessage() animates opacity/transform inline and removes the
   element on transitionend, so the transition must exist. DisplayMassage()
   uses the Bootstrap .toast.show state. */
.toast-container { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 9999; }
.toast { opacity: 0; transform: translateY(100%); transition: opacity .5s ease, transform .5s ease; }
.toast.showing { opacity: 1; }
.toast.show { display: block; opacity: 1; }
.toast.hide { display: none; }
.bg-success { background-color: var(--erp-success-solid) !important; }
.bg-danger { background-color: var(--erp-danger-solid) !important; }
.bg-orange, .bg-warning { background-color: var(--erp-warning-solid) !important; }

/* 5. LEGACY APP WIDGETS (StyleEn/StyleAr structure) ======================= */
/* Global search popups (#SearchBox / #NewSearch_Box_Pagination): SystemTools.ts
   sets width/height/left/top inline */
.search-box { position: fixed; z-index: 999999999; padding-top: 19px; }
.search-box .search-content { position: absolute; top: 0; left: 0; width: 100%; height: 40px; cursor: move; }
.search-box .close-search-box { float: inline-start; width: 38px; height: 40px; border: 0; }
.search-box .search-title { line-height: 36px; text-align: start; font-size: 1rem; padding-inline-end: 1rem; }
.table-serach-container { position: absolute; left: 0; width: 100%; height: 85%; margin-top: 20px; padding-inline-start: 1%; overflow: auto; }
#SearchDataTable thead tr th { text-align: center !important; }

/* Floating corner buttons (language / quick search / Excel) */
.search-button-container { position: fixed; inset-inline-end: 20px; top: 100px; z-index: 999; }
.search-button { width: 50px; height: 50px; border-radius: 50%; border: 0; cursor: pointer; }
.Divsearch-TextID { width: 248px; height: 52px; border: 0; cursor: pointer; }

/* Archive popup (#archiveModal), file list built by uploadFile.js */
.archive-overlay { display: flex; align-items: center; justify-content: center; z-index: 9999; }
.archive-modal { width: 95%; max-width: 600px; max-height: 90vh; }
.archive-card { max-height: 90vh; display: flex; flex-direction: column; }
.archive-body { flex: 1 1 auto; overflow-y: auto; padding: 15px; }
.archive-file-list { max-height: 250px; overflow-y: auto; margin-bottom: 15px; padding: 18px; border: 1px solid var(--erp-border); border-radius: var(--erp-radius-sm, 6px); }
.archive-footer { flex-shrink: 0; padding: 12px; border-top: 1px solid var(--erp-border); background: var(--erp-surface); }
.file-item { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--erp-border); }
.file-item:hover { background: var(--erp-gray-50); }
.file-left { display: flex; align-items: center; gap: 10px; }
.file-icon { width: 40px; height: 40px; }
.file-info { display: flex; flex-direction: column; }
.file-name { font-weight: 600; max-width: 195px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-type { font-size: 12px; color: var(--erp-text-muted); }
.file-actions { display: flex; align-items: center; gap: 8px; }
.file-actions .download { font-size: 18px; }
.file-actions .delete { border: 0; background: transparent; color: var(--erp-danger); font-size: 18px; cursor: pointer; }

/* Legacy step list (.multi-steps): table layout + counters */
.multi-steps { display: table; table-layout: fixed; width: 100%; padding: 0; list-style: none; }
.multi-steps > li { counter-increment: stepNum; display: table-cell; position: relative; text-align: center; }

/* jsgrid body height (was an inline rule in _Layout) */
.jsgrid-grid-body { max-height: 600px; overflow-y: auto !important; }

/* 6. NICEPAGE LAYOUT UTILITIES still in markup ============================ */
.u-sheet { position: relative; margin: 0 auto; }
.u-sheet > * { position: relative; }
.u-container-layout { position: relative; flex: 1 1 0%; max-width: 100%; }
.u-valign-middle, .u-valign-top, .u-valign-bottom { display: flex; flex-direction: column; }
.u-valign-middle > *, .u-valign-top > *, .u-valign-bottom > * { flex-shrink: 0; }
.u-valign-middle { justify-content: center; }
.u-valign-bottom { justify-content: flex-end; }
.u-layout-col, .u-layout-row, .u-layout-col > *, .u-layout-row > * { display: flex; }
.u-layout-col, .u-layout-row { flex: 1 1 auto; }
.u-layout-row { flex-wrap: wrap; flex-direction: row; min-height: fit-content; max-width: 100%; }
.u-layout-col { flex-direction: column; }
.u-layout-row > * { max-height: 100%; min-height: fit-content; }
.u-layout-row > .u-size-30 { flex: 0 0 50%; max-width: 50%; min-width: 50%; }
.u-layout-row > .u-size-60 { flex: 0 0 100%; max-width: 100%; min-width: 100%; }
.u-layout-cell { position: relative; display: flex; }
.u-group { display: flex; }
.u-group .u-container-layout > * { position: relative; }
.u-repeater-item { display: flex; position: relative; }
.u-text { overflow-wrap: break-word; position: relative; }
.u-align-center { text-align: center; }
.u-align-left { text-align: left; }
[dir="rtl"] .u-align-left { text-align: right; } /* nicepageAr mirrored it */
.u-align-right { text-align: right; }
[dir="rtl"] .u-align-right { text-align: left; }
.u-unstyled { list-style: none; margin: 0; padding: 0; }
.u-icon { display: block; line-height: 0; border-width: 0; }
.u-svg-link { width: 100%; height: 100%; fill: currentColor; }
.u-svg-content { width: 0; height: 0; }
.u-social-icons { display: flex; }
.u-social-icons a { display: inline-block; height: 100%; flex: 1 1 0%; }
.u-social-icons .u-icon { display: flex; height: 100% !important; }
.u-input { display: block; width: 100%; padding: 10px 12px; background-clip: padding-box; border-style: solid; border-width: 0; }
.u-btn { display: table; margin: 0; padding: 10px 30px; cursor: pointer; text-decoration: none; border: 0; white-space: nowrap; user-select: none; vertical-align: middle; text-align: center; align-self: flex-start; }
.u-btn-submit, .u-btn-step { display: inline-block; }
.u-form { position: relative; font-size: 1rem; height: auto !important; }
.u-form .u-btn-submit, .u-form .u-btn-step { position: relative; }
.u-form-vertical { display: flex; flex-wrap: wrap; align-items: flex-end; }
.u-form .u-btn-submit, .u-form .u-btn-step { margin-top: 1px; margin-bottom: 1px; }
.u-form-vertical.u-form-spacing-10 { margin-inline-start: -10px; width: calc(100% + 10px); }
input[type="file"] { display: block; }

/* Nicepage tabs: ActiveTab() (App.ts) shows the active pane with an inline display */
.u-tabs { display: flex; flex-direction: column; }
.u-tabs .u-tab-list { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; }
.u-tabs .u-tab-link { display: block; }
.u-tabs .u-tab-pane { position: relative; }
.u-tabs .u-tab-content { display: flex; flex-direction: column; flex: 1 1 0%; }
.u-tabs .u-tab-content > .u-tab-pane { flex: 1 1 0%; display: none; }

/* 7. PRINT PREVIEWS (on screen) ============================================
   The Print* views (section.u-section-9) and the invoice containers keep the
   layout and type scale they had with nicepage.css + HomeEn/Ar.css, so the
   on-screen preview does not move. Paper output uses its own inline CSS. */
:where(section.u-section-9, #invoice, #invoiceJO, #invoiceCNT, .invoiceBra, #Body_Print_Inv) p:not(.u-text-variant) { font-size: 1.125rem; margin-top: 20px; margin-bottom: 20px; line-height: 1.6; }
:where(section.u-section-9, #invoice, #invoiceJO, #invoiceCNT, .invoiceBra, #Body_Print_Inv) h1:not(.u-title) { font-weight: 400; font-size: 4.5rem; line-height: 1.1; margin-top: 20px; margin-bottom: 20px; }
:where(section.u-section-9, #invoice, #invoiceJO, #invoiceCNT, .invoiceBra, #Body_Print_Inv) h2:not(.u-subtitle) { font-weight: 400; font-size: 3rem; line-height: 1.1; margin-top: 20px; margin-bottom: 20px; }
:where(section.u-section-9, #invoice, #invoiceJO, #invoiceCNT, .invoiceBra, #Body_Print_Inv) :is(h1, h2, h3, h4, h5, h6) { padding: 0; }
section.u-section-9 .u-btn { margin-top: 20px; margin-bottom: 20px; }
section.u-section-9 .u-form .u-btn-submit { margin-top: 1px; margin-bottom: 1px; }
.u-section-9 .u-sheet-1 { min-height: 996px; }
.u-section-9 .u-group-1 { min-height: 90px; width: 901px; height: auto; margin: 25px auto 0; }
.u-section-9 .u-container-layout-1 { padding-inline: 30px; }
.u-section-9 .u-text-1 { font-size: 3rem; font-weight: 700; text-transform: none; margin: 21px 0 0; }
.u-section-9 .u-form-1 { height: 599px; width: 855px; margin: 0 auto; }
.u-section-9 .u-form-group-3, .u-section-9 .u-form-group-4 { margin-inline-start: 0; margin-top: 0; margin-bottom: 10px !important; }
.u-section-9 .u-form-group-5, .u-section-9 .u-form-group-6 { margin-inline-start: 0; }
.u-section-9 .u-form-group-7 { margin-top: 0; margin-bottom: 10px !important; }
.u-section-9 .u-btn-1 { padding: 10px 7px 10px 5px; }
.u-section-9 .u-form-2 { height: 166px; margin: 0 157px 60px 128px; }
.u-section-9 .u-btn-2 { font-weight: 700; text-transform: uppercase; }
@media (max-width: 1199px) {
    :where(section.u-section-9, #invoice, #invoiceJO, #invoiceCNT, .invoiceBra, #Body_Print_Inv) h1:not(.u-title) { font-size: 3.75rem; }
    .u-section-9 .u-group-1 { min-height: 124px; height: auto; }
    .u-section-9 .u-container-layout-1 { padding-top: 23px; padding-bottom: 23px; }
    .u-section-9 .u-text-1 { width: auto; margin-top: 25px; margin-bottom: -2px; }
    .u-section-9 .u-form-2 { width: 855px; margin-left: 28px; margin-right: 57px; }
}
@media (max-width: 991px) {
    .u-section-9 .u-group-1, .u-section-9 .u-form-1 { width: 720px; }
    .u-section-9 .u-form-2 { width: 720px; margin-left: 0; margin-right: 0; }
}
@media (max-width: 767px) {
    :where(section.u-section-9, #invoice, #invoiceJO, #invoiceCNT, .invoiceBra, #Body_Print_Inv) p:not(.u-text-variant) { font-size: 1rem; }
    :where(section.u-section-9, #invoice, #invoiceJO, #invoiceCNT, .invoiceBra, #Body_Print_Inv) h1:not(.u-title) { font-size: 3rem; }
    :where(section.u-section-9, #invoice, #invoiceJO, #invoiceCNT, .invoiceBra, #Body_Print_Inv) h2:not(.u-subtitle) { font-size: 2.25rem; }
    .u-section-9 .u-group-1, .u-section-9 .u-form-1, .u-section-9 .u-form-2 { width: 540px; }
    .u-section-9 .u-container-layout-1 { padding-inline: 10px; }
}
@media (max-width: 575px) {
    :where(section.u-section-9, #invoice, #invoiceJO, #invoiceCNT, .invoiceBra, #Body_Print_Inv) h1:not(.u-title) { font-size: 2.25rem; }
    :where(section.u-section-9, #invoice, #invoiceJO, #invoiceCNT, .invoiceBra, #Body_Print_Inv) h2:not(.u-subtitle) { font-size: 1.875rem; }
    .u-section-9 .u-group-1, .u-section-9 .u-form-1, .u-section-9 .u-form-2 { width: 340px; }
    .u-section-9 .u-text-1 { font-size: 2.25rem; margin-top: 17px; }
}
@media screen and (max-width: 768px) { #invoice { width: 250px; } }

/* 8. POS PRODUCT CARDS (was StylePos.css; TR_Sales.ts builds this markup) === */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px; padding: 20px; max-width: 1400px; margin: 0 auto; }
.product-card { background: var(--erp-surface); border: 1px solid var(--erp-border); border-radius: var(--erp-radius-lg, 14px); overflow: hidden; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--erp-shadow-md); }
.product-image { position: relative; width: 100%; height: 200px; overflow: hidden; background: var(--erp-gray-50); }
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-quantity { position: absolute; top: 15px; right: 15px; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .9rem; font-weight: 600; background: var(--erp-surface); color: var(--erp-text); box-shadow: var(--erp-shadow-sm); }
.product-info { padding: 20px; }
.product-name { font-size: 1.2rem; font-weight: 600; margin: 0 0 8px; line-height: 1.4; color: var(--erp-gray-900); }
.product-desc { font-size: .9rem; margin: 0 0 15px; line-height: 1.5; color: var(--erp-text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--erp-gray-100); }
.product-price { font-size: 1.3rem; font-weight: 700; color: var(--erp-success); }
.btn-add-product { display: flex; align-items: center; gap: 8px; padding: 10px 20px; border: 0; border-radius: 999px; font-size: .9rem; font-weight: 600; cursor: pointer; background: var(--erp-primary); color: var(--erp-on-primary, #fff); }
.btn-add-product:hover { background: var(--erp-primary-hover); }
.btn-icon { font-size: 1.2rem; font-weight: 600; }
.empty-state { grid-column: 1 / -1; text-align: center; padding: 60px 20px; background: var(--erp-surface); border-radius: var(--erp-radius-lg, 14px); }
.empty-icon { font-size: 4rem; margin-bottom: 20px; opacity: .5; }
@media (max-width: 768px) {
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 15px; padding: 15px; }
    .product-image { height: 160px; }
    .product-name { font-size: 1rem; }
    .product-price { font-size: 1.1rem; }
    .btn-add-product { padding: 8px 16px; font-size: .85rem; }
}
@media (max-width: 480px) { .products-grid { grid-template-columns: 1fr; } .product-card { max-width: 100%; } }
