﻿/* ==========================================================================
   FONTS
   Roboto for Latin, Cairo for Arabic.

   Cairo was designed by Google to pair with Roboto - same x-height and weight
   system - so mixed-script lines sit on the same baseline instead of one script
   looking larger than the other.

   The previous stack named 'Tajawal' but never loaded it. Tajawal is not
   installed on Windows, so Arabic silently fell back to Segoe UI, which has no
   real Arabic hinting: connected letterforms break up at small sizes. That is
   the "not perfect" you were seeing.

   SELF-HOSTED. Both families are served from /Content/css/fonts/ (the URLs
   below are relative to this stylesheet), so nothing reaches Google and an
   isolated LAN gets the same type as the cloud. woff2 only: every browser
   this system supports reads it. font-display:swap paints text in the
   fallback at once and swaps when the file lands, instead of a blank line.
   ========================================================================== */
@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/Roboto-Regular.woff2') format('woff2');}
@font-face{font-family:'Roboto';font-style:normal;font-weight:500;font-display:swap;src:url('fonts/Roboto-Medium.woff2') format('woff2');}
@font-face{font-family:'Roboto';font-style:normal;font-weight:700;font-display:swap;src:url('fonts/Roboto-Bold.woff2') format('woff2');}
@font-face{font-family:'Cairo';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/Cairo-Regular.woff2') format('woff2');}
@font-face{font-family:'Cairo';font-style:normal;font-weight:600;font-display:swap;src:url('fonts/Cairo-SemiBold.woff2') format('woff2');}
@font-face{font-family:'Cairo';font-style:normal;font-weight:700;font-display:swap;src:url('fonts/Cairo-Bold.woff2') format('woff2');}

/* ==========================================================================
   ERP - erp.css
   THE single stylesheet for the entire application (Blueprint 5.2).
   No page-level <style> blocks. No second CSS file.
   Logical properties (inline-start/end) are used throughout so one sheet
   serves both LTR and RTL without a mirrored copy.
   ========================================================================== */

/* --- Design tokens (Blueprint 5.1) -------------------------------------- */
:root{
  --clr-bg:#FFFFFF;
  --clr-surface:#FFFFFF;
  --clr-surface-alt:#FAFBFD;
  --clr-text:#000000;
  --clr-label:#000000;
  --clr-muted:#6C7293;
  --clr-border:#E8EAF0;
  --clr-border-strong:#D3D7E3;

  --clr-primary:#4B49AC;
  --clr-primary-dark:#3F3D92;
  --clr-primary-soft:#EEEDF8;
  --clr-success:#0FBF61;
  --clr-warning:#FFAA00;
  --clr-danger:#DE3B3B;
  --clr-info:#1F9BCF;

  --sp-1:4px; --sp-2:8px; --sp-3:12px; --sp-4:16px; --sp-5:24px; --sp-6:32px;

  --ctl-h:30px;
  --radius:6px;
  --radius-sm:4px;
  --font:'Roboto','Segoe UI',system-ui,-apple-system,sans-serif;
  --font-ar:'Cairo','Segoe UI','Tahoma','Traditional Arabic',sans-serif;
  --fs-base:13px;
  /* Arabic needs a touch more size and leading to stay legible at the same
     optical weight as Latin - 13px Cairo reads smaller than 13px Roboto. */
  --fs-base-ar:14px;
  --lh-ar:1.7;
  --fs-sm:12px;
  --fs-lg:15px;

  --header-h:56px;
  --sidebar-w:248px;
  --sidebar-w-collapsed:56px;
  --tabbar-h:38px;
  --footer-h:32px;
  --cmdbar-h:46px;          /* command bar at the foot of every framed page */

  --shadow-sm:0 1px 2px rgba(16,24,40,.06);
  --shadow-md:0 4px 12px rgba(16,24,40,.10);
  --shadow-lg:0 12px 32px rgba(16,24,40,.14);
}

/* --- Reset --------------------------------------------------------------- */
*,*::before,*::after{box-sizing:border-box;}
html,body{height:100%;}
body{
  margin:0;
  font-family:var(--font);
  font-size:var(--fs-base);
  line-height:1.5;
  color:var(--clr-text);
  background:var(--clr-bg);
  -webkit-font-smoothing:antialiased;
}
button,input,select,textarea{font-family:inherit;font-size:inherit;color:inherit;}
button{cursor:pointer;}
a{color:var(--clr-primary);text-decoration:none;}
ul{list-style:none;margin:0;padding:0;}
h1,h2,h3,h4,h5,h6{margin:0;font-weight:600;}

/* Keyboard focus must always be visible (accessibility floor). */
:focus-visible{outline:2px solid var(--clr-primary);outline-offset:2px;}

@media (prefers-reduced-motion:reduce){
  *{animation-duration:.001ms !important;transition-duration:.001ms !important;}
}

/* --- RTL and Arabic typography ------------------------------------------- */
html[dir="rtl"] body{
  direction:rtl;text-align:right;
  font-family:var(--font-ar);
  font-size:var(--fs-base-ar);
  line-height:var(--lh-ar);
}

/* Arabic input fields, whatever the interface language. Sizing them up a
   little stops Arabic looking cramped beside a Latin field on the same row. */
input[data-lang="ar"],textarea[data-lang="ar"]{
  direction:rtl;text-align:right;
  font-family:var(--font-ar);
  font-size:var(--fs-base-ar);
  line-height:1.6;
}

/* Arabic content inside an otherwise Latin page: grid cells, picker lines. */
.cell-arabic,
.picker-sub:lang(ar),
[lang="ar"]{
  font-family:var(--font-ar);
}

/* Arabic headings need slightly tighter leading than Arabic body text,
   otherwise they drift apart. */
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3{line-height:1.4;}

/* Keep numbers, codes and money in the Latin face even on an Arabic page:
   Arabic-Indic shaping of a document number helps nobody. */
html[dir="rtl"] .num,
html[dir="rtl"] .cell-code,
html[dir="rtl"] .grid .num,
html[dir="rtl"] input[type="number"]{
  font-family:var(--font);
  direction:ltr;
  text-align:end;
}

/* ==========================================================================
   FORM CONTROLS
   ========================================================================== */
.field{margin-bottom:var(--sp-3);}
.field-label{
  display:block;margin-bottom:var(--sp-1);
  font-size:var(--fs-sm);font-weight:600;color:var(--clr-label);
}
.field-label .req{color:var(--clr-danger);margin-inline-start:2px;}

.ctl{
  width:100%;height:var(--ctl-h);
  padding:0 var(--sp-3);
  border:1px solid var(--clr-border-strong);
  border-radius:var(--radius-sm);
  background:var(--clr-surface);color:var(--clr-text);
  transition:border-color .15s ease, box-shadow .15s ease;
}
select.ctl{padding-inline-end:var(--sp-5);}
.ctl:hover{border-color:#B9BFD1;}
.ctl:focus{outline:none;border-color:var(--clr-primary);box-shadow:0 0 0 3px var(--clr-primary-soft);}
.ctl:disabled{background:#F3F4F8;color:var(--clr-muted);cursor:not-allowed;}
.ctl.is-invalid{border-color:var(--clr-danger);}

/* --- Buttons ------------------------------------------------------------- */
.btn-erp{
  display:inline-flex;align-items:center;justify-content:center;gap:var(--sp-2);
  height:var(--ctl-h);padding:0 var(--sp-4);
  border:1px solid transparent;border-radius:var(--radius-sm);
  font-size:var(--fs-base);font-weight:600;
  transition:background-color .15s ease,border-color .15s ease,color .15s ease;
}
.btn-erp:disabled{opacity:.55;cursor:not-allowed;}
.btn-erp.primary{background:var(--clr-primary);color:#fff;}
.btn-erp.primary:hover:not(:disabled){background:var(--clr-primary-dark);}
.btn-erp.success{background:var(--clr-success);color:#fff;}
.btn-erp.success:hover:not(:disabled){background:#0CA652;}
.btn-erp.danger{background:var(--clr-danger);color:#fff;}
.btn-erp.danger:hover:not(:disabled){background:#C42F2F;}
.btn-erp.neutral{background:#fff;color:var(--clr-text);border-color:var(--clr-border-strong);}
.btn-erp.neutral:hover:not(:disabled){background:var(--clr-surface-alt);border-color:#B9BFD1;}
.btn-erp.ghost{background:transparent;color:var(--clr-muted);}
.btn-erp.ghost:hover:not(:disabled){background:var(--clr-surface-alt);color:var(--clr-text);}
.btn-block{width:100%;}

/* fp-v1: every file picker's "Choose file" button is our neutral button */
input[type="file"]{max-width:100%;color:var(--clr-muted);font-size:var(--fs-sm);cursor:pointer;}
input[type="file"].ctl{height:var(--ctl-h);padding:2px 3px;line-height:calc(var(--ctl-h) - 8px);}
input[type="file"]::file-selector-button{
  height:calc(var(--ctl-h) - 8px);margin-inline-end:var(--sp-3);padding:0 var(--sp-3);
  border:1px solid var(--clr-border-strong);border-radius:var(--radius-sm);
  background:#fff;color:var(--clr-text);font:inherit;font-size:var(--fs-base);font-weight:600;cursor:pointer;
  transition:background-color .15s ease,border-color .15s ease;
}
input[type="file"]::-webkit-file-upload-button{
  height:calc(var(--ctl-h) - 8px);margin-inline-end:var(--sp-3);padding:0 var(--sp-3);
  border:1px solid var(--clr-border-strong);border-radius:var(--radius-sm);
  background:#fff;color:var(--clr-text);font:inherit;font-size:var(--fs-base);font-weight:600;cursor:pointer;
}
input[type="file"]:hover::file-selector-button{background:var(--clr-surface-alt);border-color:#B9BFD1;}
input[type="file"]:focus-visible{outline:none;}
input[type="file"]:focus-visible::file-selector-button{border-color:var(--clr-primary);box-shadow:0 0 0 3px var(--clr-primary-soft);}
input[type="file"]:disabled{cursor:not-allowed;}
input[type="file"]:disabled::file-selector-button{opacity:.55;cursor:not-allowed;}

/* --- Messages ------------------------------------------------------------ */
.alert{
  display:flex;align-items:flex-start;gap:var(--sp-2);
  padding:var(--sp-3);border-radius:var(--radius-sm);
  border:1px solid transparent;font-size:var(--fs-sm);margin-bottom:var(--sp-4);
}
.alert.error{background:#FDECEC;border-color:#F5C2C2;color:#8E1F1F;}
.alert.warn{background:#FFF6E5;border-color:#FFE0A3;color:#7A5200;}
.alert.info{background:#E9F5FB;border-color:#B7DEEF;color:#14607F;}
.alert.success{background:#E7F8EF;border-color:#A9E6C6;color:#0A6B39;}
.alert[hidden]{display:none;}

/* Inline SVG with no dimensions defaults to 300x150. Size it globally so a
   stale stylesheet or a missed rule can never produce giant icons. */
svg{max-width:100%;}
.feat-icon svg{width:17px;height:17px;}

/* ==========================================================================
   LOGIN
   ========================================================================== */
.login-page{
  min-height:100vh;display:grid;grid-template-columns:1fr;
  background:var(--clr-bg);
}
.login-aside{display:none;}
.login-main{
  display:flex;align-items:center;justify-content:center;
  padding:var(--sp-5);
}
.login-card{
  width:100%;max-width:420px;
  background:var(--clr-surface);
  border:1px solid var(--clr-border);
  border-radius:var(--radius);
  box-shadow:var(--shadow-md);
  padding:var(--sp-6);
}
.login-brand{text-align:center;margin-bottom:var(--sp-5);}
.login-brand .mark{
  display:inline-flex;align-items:center;justify-content:center;
  width:52px;height:52px;
  color:var(--clr-primary);
  margin-bottom:var(--sp-3);
}
.login-brand .mark svg{width:100%;height:100%;}
.login-brand h1{font-size:20px;margin-bottom:var(--sp-1);}
.login-brand p{margin:0;color:var(--clr-muted);font-size:var(--fs-sm);}

.login-row{display:grid;grid-template-columns:1fr 1fr;gap:var(--sp-3);}
.login-foot{
  margin-top:var(--sp-5);padding-top:var(--sp-4);
  border-top:1px solid var(--clr-border);
  display:flex;align-items:center;justify-content:space-between;gap:var(--sp-3);
  font-size:var(--fs-sm);color:var(--clr-muted);
}
.login-lang{display:flex;gap:var(--sp-1);}
.login-lang button{
  border:1px solid var(--clr-border-strong);background:#fff;
  border-radius:var(--radius-sm);padding:2px var(--sp-2);
  font-size:var(--fs-sm);color:var(--clr-muted);
  transition:background-color .15s ease,border-color .15s ease,color .15s ease;
}
.login-lang button:hover{border-color:var(--clr-primary);color:var(--clr-primary);}
.login-lang button.active{background:var(--clr-primary);border-color:var(--clr-primary);color:#fff;}

/* --------------------------------------------------------------------------
   LEFT PANEL
   Introduces the product. Hidden below 1024px so it can never push the sign-in
   form down the page - on a small screen the form is the only thing that matters.
   -------------------------------------------------------------------------- */
@media (min-width:1024px){
  .login-page{grid-template-columns:1.05fr 1fr;}

  .login-aside{
    display:flex;align-items:center;
    position:relative;overflow:hidden;
    padding:var(--sp-6);
    background:
      radial-gradient(circle at 18% 12%, rgba(255,255,255,.16), transparent 42%),
      radial-gradient(circle at 88% 82%, rgba(255,255,255,.10), transparent 46%),
      linear-gradient(148deg, #3F3D92 0%, var(--clr-primary) 52%, #6D6BC9 100%);
    color:#fff;
  }

  /* Two soft rings for depth. Decorative only, so aria-hidden is unnecessary -
     they are pure CSS and never reach the accessibility tree. */
  .login-aside::before,
  .login-aside::after{
    content:"";position:absolute;border-radius:50%;
    border:1px solid rgba(255,255,255,.14);
    pointer-events:none;
  }
  .login-aside::before{width:520px;height:520px;top:-190px;inset-inline-end:-170px;}
  .login-aside::after{width:360px;height:360px;bottom:-150px;inset-inline-start:-120px;}

  .aside-inner{position:relative;z-index:1;max-width:46ch;}

  .aside-brand{
    display:flex;align-items:center;gap:var(--sp-3);
    margin-bottom:var(--sp-5);
  }
  .aside-mark{
    display:inline-flex;align-items:center;justify-content:center;
    width:44px;height:44px;flex:0 0 auto;border-radius:12px;
    background:rgba(255,255,255,.16);
    border:1px solid rgba(255,255,255,.22);
    color:#fff;
  }
  .aside-mark svg{width:24px;height:24px;}

  /* The name sits beside the mark and takes whatever width it needs, so a
     longer product name lengthens the lockup instead of being cut. */
  .aside-wordmark{
    font-size:20px;font-weight:700;letter-spacing:-.01em;
    line-height:1.15;color:#fff;
  }

  .login-aside h2{
    font-size:30px;line-height:1.22;font-weight:700;
    margin-bottom:var(--sp-3);max-width:20ch;
  }
  .aside-lead{
    margin:0 0 var(--sp-6);
    color:rgba(255,255,255,.80);font-size:var(--fs-lg);
  }

  .aside-features{display:grid;gap:var(--sp-4);}
  .aside-features li{display:flex;gap:var(--sp-3);align-items:flex-start;}

  .feat-icon{
    flex:0 0 auto;width:34px;height:34px;border-radius:9px;
    display:inline-flex;align-items:center;justify-content:center;
    background:rgba(255,255,255,.13);
    border:1px solid rgba(255,255,255,.18);
  }
  .feat-icon svg{width:17px;height:17px;}

  .feat-text b{display:block;font-weight:600;margin-bottom:2px;}
  .feat-text span{
    color:rgba(255,255,255,.74);font-size:var(--fs-sm);line-height:1.5;
  }

  .aside-foot{
    margin:var(--sp-6) 0 0;
    padding-top:var(--sp-4);
    border-top:1px solid rgba(255,255,255,.16);
  }

  /* Regions the system is deployed in. Reads as a list, not a sentence. */
  .aside-regions{
    display:flex;align-items:center;flex-wrap:wrap;
    gap:var(--sp-3);
  }
  .aside-regions .rg{
    font-size:12px;font-weight:600;
    color:rgba(255,255,255,.80);
    letter-spacing:.02em;white-space:nowrap;
  }
  /* The divider is a style, so a caption edit cannot break the spacing. */
  .aside-regions .rg-sep{
    width:1px;height:12px;flex:0 0 auto;
    background:rgba(255,255,255,.28);
  }
}

/* Wider panel on large screens, where 46ch would look lost. */
@media (min-width:1500px){
  .login-aside{padding:var(--sp-6) 6vw;}
  .login-aside h2{font-size:34px;}
}

/* ==========================================================================
   LANGUAGE-DRIVEN VISIBILITY
   Arabic content is hidden when the interface language is French. Mark the
   wrapper with .field-ar and it disappears - no per-screen code.
   ========================================================================== */
.lang-fr .field-ar{display:none !important;}
/* When the Arabic field is hidden (French interface) the primary name takes
   the whole row, so the layout does not leave an empty half. */
.lang-fr .field-primary{grid-column:span 12;}

/* Arabic label sits over an RTL field, so align it to that field's start. */
.field-label-ar{text-align:right;}
html[dir="rtl"] .field-label-ar{text-align:right;}

/* Hide but keep in the DOM, so form controls still post their value.
   Visible=False on the server would drop the value entirely. */
.is-hidden{display:none !important;}

.visually-hidden{
  position:absolute !important;
  width:1px;height:1px;padding:0;margin:-1px;border:0;
  overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;
}

/* ==========================================================================
   TWO-LINE PICKER
   A native <option> renders one line only. This shows a code on the first
   line and the names on the second, and mirrors into a hidden <select> so
   the server side stays an ordinary DropDownList.
   ========================================================================== */
.picker{position:relative;}

.picker-btn{
  width:100%;min-height:52px;
  display:flex;align-items:center;justify-content:space-between;gap:var(--sp-2);
  padding:var(--sp-2) var(--sp-3);
  border:1px solid var(--clr-border-strong);border-radius:var(--radius-sm);
  background:var(--clr-surface);text-align:start;
  transition:border-color .15s ease, box-shadow .15s ease;
}
.picker-btn:hover{border-color:#B9BFD1;}
.picker-btn:focus-visible{border-color:var(--clr-primary);box-shadow:0 0 0 3px var(--clr-primary-soft);}

.picker-lines{display:flex;flex-direction:column;gap:1px;min-width:0;}
.picker-code{
  font-weight:700;font-size:var(--fs-base);color:var(--clr-text);
  line-height:1.25;
}
.picker-sub{
  font-size:var(--fs-sm);color:var(--clr-muted);line-height:1.3;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.picker-caret{
  width:0;height:0;flex:0 0 auto;
  border-inline-start:5px solid transparent;border-inline-end:5px solid transparent;
  border-top:5px solid var(--clr-muted);
}

/* Single company: the control shows which company you are signing into, but
   there is nothing to pick, so it reads as information rather than a control. */
.picker.is-static .picker-btn{
  cursor:default;
  background:var(--clr-surface-alt);
  border-style:dashed;
}
.picker.is-static .picker-btn:hover{border-color:var(--clr-border-strong);}
.picker.is-static .picker-caret{display:none;}
.picker.is-static .picker-list{display:none !important;}

.picker-list{
  position:absolute;inset-inline:0;top:calc(100% + 4px);z-index:70;
  max-height:280px;overflow-y:auto;
  background:var(--clr-surface);
  border:1px solid var(--clr-border);border-radius:var(--radius);
  box-shadow:var(--shadow-lg);
  padding:var(--sp-1);
}
.picker-list[hidden]{display:none;}

.picker-item{
  display:flex;flex-direction:column;gap:1px;
  width:100%;padding:var(--sp-2) var(--sp-3);
  border:0;background:transparent;border-radius:var(--radius-sm);
  text-align:start;
}
.picker-item:hover{background:var(--clr-primary-soft);}
.picker-item .picker-code{font-weight:700;}
.picker-item .picker-sub{white-space:normal;}

/* ==========================================================================
   APPLICATION SHELL (Blueprint 5.3)
   Flex column on body keeps the footer at the bottom with no JS.

   height, not min-height. With min-height the shell grows to fit whichever
   column is tallest -- and the sidebar menu is taller than most windows --
   so the tab host, and every module iframe inside it, ran past the bottom
   of the screen and the command bar at the foot of each form sat below the
   fold until the OUTER page was scrolled. Bounding the shell to the viewport
   makes the sidebar scroll on its own (it already has overflow-y:auto) and
   keeps the iframe exactly the visible area. dvh follows the mobile address
   bar; vh is the fallback for browsers without it.
   ========================================================================== */
.app{
  display:flex;flex-direction:column;
  height:100vh;height:100dvh;overflow:hidden;
}

/* --- Header -------------------------------------------------------------- */
.app-header{
  height:var(--header-h);flex:0 0 auto;
  display:flex;align-items:center;gap:var(--sp-3);
  padding:0 var(--sp-4);
  background:var(--clr-surface);
  border-bottom:1px solid var(--clr-border);
  position:sticky;top:0;z-index:40;
}
/* --------------------------------------------------------------------------
   PRODUCT BRAND (left)
   Logo, hairline divider, then name over slogan.
   -------------------------------------------------------------------------- */
.app-brand{display:flex;align-items:center;gap:var(--sp-3);min-width:0;}

.brand-mark{
  width:32px;height:32px;flex:0 0 auto;
  display:flex;align-items:center;justify-content:center;
  color:var(--clr-primary);
}
.brand-mark svg{width:100%;height:100%;}

/* The divider carries the whole layout: without it the two marks read as one
   logo. Full-height hairline, not a bullet. */
.brand-rule{
  width:1px;height:26px;flex:0 0 auto;
  background:var(--clr-border-strong);
}

.brand-text{display:flex;flex-direction:column;justify-content:center;min-width:0;}
.brand-name{
  font-size:15px;font-weight:700;line-height:1.15;
  color:var(--clr-text);white-space:nowrap;
  letter-spacing:-.01em;
}
.brand-slogan{
  font-size:10px;line-height:1.25;color:var(--clr-muted);
  white-space:nowrap;
}

.hdr-spacer{flex:1 1 auto;}

/* --------------------------------------------------------------------------
   COMPANY BRAND (right)
   Logo before the name, in the "Powered by" pattern. Falls back to a generic
   mark until a logo is uploaded, so the header never looks half-built.
   -------------------------------------------------------------------------- */
.app-company{
  display:flex;align-items:center;gap:var(--sp-2);
  padding-inline-start:var(--sp-3);
  border-inline-start:1px solid var(--clr-border);
  min-width:0;
}

.co-logo{
  width:28px;height:28px;flex:0 0 auto;
  display:flex;align-items:center;justify-content:center;
  border-radius:6px;overflow:hidden;
  background:var(--clr-surface-alt);
  border:1px solid var(--clr-border);
  color:var(--clr-muted);
}
.co-img{max-width:100%;max-height:100%;object-fit:contain;display:block;padding:3px;}

.co-text{display:flex;flex-direction:column;justify-content:center;min-width:0;}
.co-label{
  font-size:9px;line-height:1.2;color:var(--clr-muted);
  text-transform:uppercase;letter-spacing:.06em;
}
.co-name{
  font-size:13px;font-weight:700;line-height:1.2;
  color:var(--clr-text);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:22ch;
}

.scope-chips{display:flex;align-items:center;gap:var(--sp-2);min-width:0;}
.chip{
  display:inline-flex;align-items:center;gap:var(--sp-1);
  height:26px;padding:0 var(--sp-2);
  background:var(--clr-surface-alt);border:1px solid var(--clr-border);
  border-radius:999px;font-size:var(--fs-sm);color:var(--clr-muted);
  white-space:nowrap;max-width:200px;overflow:hidden;text-overflow:ellipsis;
}
.chip b{color:var(--clr-text);font-weight:600;}

.icon-btn{
  width:34px;height:34px;display:inline-flex;align-items:center;justify-content:center;
  border:1px solid transparent;border-radius:var(--radius-sm);
  background:transparent;color:var(--clr-muted);position:relative;
}
.icon-btn:hover{background:var(--clr-surface-alt);color:var(--clr-text);}
.icon-btn .badge{
  position:absolute;top:2px;inset-inline-end:2px;
  min-width:16px;height:16px;padding:0 4px;border-radius:8px;
  background:var(--clr-danger);color:#fff;font-size:10px;font-weight:700;
  display:flex;align-items:center;justify-content:center;
}

.user-menu{position:relative;}
.user-btn{
  display:flex;align-items:center;gap:var(--sp-2);
  height:34px;padding:0 var(--sp-2);
  background:transparent;border:1px solid transparent;border-radius:var(--radius-sm);
}
.user-btn:hover{background:var(--clr-surface-alt);}
.avatar{
  width:26px;height:26px;border-radius:50%;
  background:var(--clr-primary);color:#fff;
  display:flex;align-items:center;justify-content:center;
  font-size:11px;font-weight:700;flex:0 0 auto;
}
.user-btn .who{text-align:start;line-height:1.15;}
.user-btn .who small{display:block;color:var(--clr-muted);font-size:11px;}

.dropdown{
  position:absolute;inset-inline-end:0;top:calc(100% + 6px);
  min-width:220px;background:#fff;
  border:1px solid var(--clr-border);border-radius:var(--radius);
  box-shadow:var(--shadow-lg);padding:var(--sp-1);z-index:60;
}
.dropdown[hidden]{display:none;}
.dropdown a,.dropdown button{
  display:flex;width:100%;align-items:center;gap:var(--sp-2);
  padding:var(--sp-2) var(--sp-3);border:0;background:transparent;
  border-radius:var(--radius-sm);color:var(--clr-text);text-align:start;
}
.dropdown a:hover,.dropdown button:hover{background:var(--clr-surface-alt);}
.dropdown .sep{height:1px;background:var(--clr-border);margin:var(--sp-1) 0;}

/* --- Body split ---------------------------------------------------------- */
.app-body{flex:1 1 auto;display:flex;min-height:0;}

/* --- Sidebar ------------------------------------------------------------- */
.app-sidebar{
  width:var(--sidebar-w);flex:0 0 auto;min-height:0;
  background:var(--clr-surface);
  border-inline-end:1px solid var(--clr-border);
  overflow-y:auto;overflow-x:hidden;
  transition:width .18s ease;
}
.app.is-collapsed .app-sidebar{width:var(--sidebar-w-collapsed);}
.app.is-collapsed .nav-text,
.app.is-collapsed .nav-caret,
.app.is-collapsed .nav-sub{display:none;}

.nav-list{padding:var(--sp-2) var(--sp-2) var(--sp-5);}
.nav-item{margin-bottom:1px;}
.nav-link{
  position:relative;                       /* holds the active marker */
  display:flex;align-items:center;gap:var(--sp-2);
  width:100%;padding:var(--sp-2) var(--sp-3);
  border:0;background:transparent;border-radius:var(--radius-sm);
  color:var(--clr-text);text-align:start;
  transition:background-color .12s ease,color .12s ease;
}
.nav-link:hover{background:var(--clr-surface-alt);}

/* --- Active entry --------------------------------------------------------
   Three quiet signals rather than one loud one: a deeper tint, a hairline that
   gives the block an edge, and a bar down the leading side. The bar is what the
   eye finds first, so the background can stay soft enough to read against.
   The icon returns to full opacity - it is dimmed at rest.
-------------------------------------------------------------------------- */
.nav-link.is-active{
  background:var(--clr-primary-soft);
  color:var(--clr-primary);
  font-weight:600;
  box-shadow:inset 0 0 0 1px rgba(29,78,216,.12);
}
.nav-link.is-active .nav-icon{opacity:1;}

.nav-link.is-active::before{
  content:"";position:absolute;
  inset-block:5px;inset-inline-start:0;
  width:3px;border-radius:3px;
  background:currentColor;
  transform:scaleY(.35);opacity:.55;
  transform-origin:center;
}

/* The marker grows into place, so moving between pages reads as movement
   rather than as the highlight teleporting. */
@media (prefers-reduced-motion:no-preference){
  .nav-link.is-active{animation:navActiveIn .22s ease both;}
  .nav-link.is-active::before{animation:navMarkIn .26s cubic-bezier(.2,.8,.3,1) .04s both;}
}
@keyframes navActiveIn{
  from{background-color:transparent;box-shadow:inset 0 0 0 1px rgba(29,78,216,0);}
}
@keyframes navMarkIn{
  from{transform:scaleY(0);opacity:0;}
  to{transform:scaleY(1);opacity:1;}
}

/* A folder holding the active page carries a trace of it, so the trail back up
   is visible when the submenu is closed. */
.nav-folder.has-active > .nav-toggle{color:var(--clr-primary);font-weight:600;}
.nav-folder.has-active > .nav-toggle .nav-icon{opacity:.95;}

/* --- Icons-only rail -----------------------------------------------------
   On a 56px rail a full-width highlight is a stripe with the icon shoved to
   one edge. The entry becomes a centred tile instead, and the tile itself is
   the signal, so the side marker is dropped - at this width it would sit on
   the rail edge and read as an artefact rather than an indicator.

   .is-icons-only is set by erp-flyout-menu.js from the only reliable test,
   because .is-collapsed means the opposite below 1024px.
-------------------------------------------------------------------------- */
.app.is-icons-only .nav-list{padding-inline:var(--sp-2);}

.app.is-icons-only .nav-link,
.app.is-icons-only .nav-toggle{
  justify-content:center;
  padding-inline:0;
  border-radius:10px;
  aspect-ratio:1/1;
  transition:background-color .14s ease,color .14s ease,transform .14s ease;
}

.app.is-icons-only .nav-link:hover,
.app.is-icons-only .nav-toggle:hover{
  background:var(--clr-surface-alt);
}

.app.is-icons-only .nav-link.is-active,
.app.is-icons-only .nav-folder.has-active > .nav-toggle{
  background:var(--clr-primary-soft);
  color:var(--clr-primary);
  box-shadow:inset 0 0 0 1px rgba(29,78,216,.20);
}
.app.is-icons-only .nav-link.is-active .nav-icon,
.app.is-icons-only .nav-folder.has-active > .nav-toggle .nav-icon{opacity:1;}

/* the side bar belongs to the wide rail only */
.app.is-icons-only .nav-link.is-active::before{display:none;}

@media (prefers-reduced-motion:no-preference){
  .app.is-icons-only .nav-link.is-active,
  .app.is-icons-only .nav-folder.has-active > .nav-toggle{
    animation:navTileIn .2s cubic-bezier(.2,.8,.3,1) both;
  }
}
@keyframes navTileIn{
  from{transform:scale(.86);background-color:transparent;
       box-shadow:inset 0 0 0 1px rgba(29,78,216,0);}
  to{transform:scale(1);}
}

/* --- The icon whose fly-out is open --------------------------------------
   The panel names the menu, but without this the rail gives no clue which
   icon it came from and the panel looks unattached. The tile is filled and
   ringed so the eye joins the two.

   Deliberately distinct from .is-active: the page you are ON and the menu you
   are LOOKING AT are different facts, and both can be true at once.
-------------------------------------------------------------------------- */
.app.is-icons-only .nav-item.is-flyout-open > .nav-link,
.app.is-icons-only .nav-item.is-flyout-open > .nav-toggle{
  background:var(--clr-primary);
  color:#fff;
  box-shadow:0 2px 6px rgba(29,78,216,.28);
}
.app.is-icons-only .nav-item.is-flyout-open > .nav-link .nav-icon,
.app.is-icons-only .nav-item.is-flyout-open > .nav-toggle .nav-icon{
  opacity:1;color:#fff;
}

/* on the wide rail it is only a hover, so a tint is enough */
.app:not(.is-icons-only) .nav-item.is-flyout-open > .nav-link,
.app:not(.is-icons-only) .nav-item.is-flyout-open > .nav-toggle{
  background:var(--clr-surface-alt);
}
.nav-icon{
  width:18px;height:18px;flex:0 0 auto;
  display:inline-block;opacity:.75;
  background:currentColor;
  -webkit-mask:no-repeat center/contain;mask:no-repeat center/contain;
}
.nav-text{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.nav-caret{
  width:0;height:0;flex:0 0 auto;
  border-inline-start:5px solid currentColor;
  border-top:4px solid transparent;border-bottom:4px solid transparent;
  opacity:.5;transition:transform .15s ease;
}
html[dir="rtl"] .nav-caret{transform:scaleX(-1);}
.nav-folder.open > .nav-toggle .nav-caret{transform:rotate(90deg);}
html[dir="rtl"] .nav-folder.open > .nav-toggle .nav-caret{transform:scaleX(-1) rotate(90deg);}

.nav-sub{
  max-height:0;overflow:hidden;
  transition:max-height .2s ease;
  padding-inline-start:var(--sp-4);
}
.nav-folder.open > .nav-sub{max-height:1200px;}

/* --- Main column --------------------------------------------------------- */
.app-main{flex:1 1 auto;display:flex;flex-direction:column;min-width:0;min-height:0;}

.breadcrumb{
  height:34px;flex:0 0 auto;display:flex;align-items:center;gap:var(--sp-2);
  padding:0 var(--sp-4);
  background:var(--clr-surface-alt);border-bottom:1px solid var(--clr-border);
  font-size:var(--fs-sm);color:var(--clr-muted);
}
.breadcrumb .sep{opacity:.5;}
.breadcrumb .current{color:var(--clr-text);font-weight:600;}

/* --- Tab bar (Blueprint 5.4) --------------------------------------------- */
.tab-bar{
  height:var(--tabbar-h);flex:0 0 auto;
  display:flex;align-items:stretch;gap:2px;
  padding:0 var(--sp-2);
  background:var(--clr-surface);
  border-bottom:1px solid var(--clr-border);
  overflow-x:auto;overflow-y:hidden;
}
.tab-bar::-webkit-scrollbar{height:0;}
.tab{
  display:inline-flex;align-items:center;gap:var(--sp-2);
  height:calc(var(--tabbar-h) - 1px);
  padding:0 var(--sp-3);
  border:0;background:transparent;color:var(--clr-muted);
  border-bottom:2px solid transparent;
  white-space:nowrap;max-width:220px;
}
.tab:hover{background:var(--clr-surface-alt);color:var(--clr-text);}
.tab.is-active{color:var(--clr-primary);border-bottom-color:var(--clr-primary);font-weight:600;}
.tab .tab-title{overflow:hidden;text-overflow:ellipsis;}
.tab .tab-close{
  width:16px;height:16px;flex:0 0 auto;border-radius:3px;
  display:inline-flex;align-items:center;justify-content:center;
  font-size:14px;line-height:1;color:var(--clr-muted);
}
.tab .tab-close:hover{background:var(--clr-border);color:var(--clr-danger);}

.tab-host{flex:1 1 auto;position:relative;min-height:0;background:var(--clr-surface-alt);}
.tab-frame{
  position:absolute;inset:0;width:100%;height:100%;
  border:0;background:var(--clr-bg);
  display:none;
}
.tab-frame.is-active{display:block;}

/* ==========================================================================
   WELCOME PANEL
   Fills the tab host whenever no form is showing. An empty grey rectangle
   reads as something failing to load; this reads as "ready when you are".

   Motion is deliberately slow and low-contrast - this sits behind the user's
   work all day, and anything lively becomes irritating by the second hour.
   The global prefers-reduced-motion rule disables all of it.
   ========================================================================== */
.welcome{
  position:relative;
  display:flex;align-items:center;justify-content:center;
  min-height:clamp(260px, 42vh, 420px);
  overflow:hidden;
  margin:calc(var(--sp-4) * -1) calc(var(--sp-4) * -1) var(--sp-5);
  padding:var(--sp-5) var(--sp-4);
  border-bottom:1px solid var(--clr-border);
  background:
    radial-gradient(1200px 600px at 50% -20%, #F5F5FC 0%, transparent 62%),
    var(--clr-surface-alt);
}

/* --- Drifting background shapes ----------------------------------------- */
.welcome-bg{position:absolute;inset:0;pointer-events:none;}
.welcome-bg .wb{
  position:absolute;border-radius:50%;
  border:1px solid rgba(75,73,172,.10);
  will-change:transform;
}
.wb-1{
  width:420px;height:420px;top:-120px;inset-inline-start:-90px;
  animation:wbDrift 22s ease-in-out infinite;
}
.wb-2{
  width:300px;height:300px;bottom:-90px;inset-inline-end:-60px;
  border-color:rgba(75,73,172,.14);
  animation:wbDrift 28s ease-in-out infinite reverse;
}
.wb-3{
  width:180px;height:180px;top:22%;inset-inline-end:18%;
  border-color:rgba(75,73,172,.08);
  animation:wbDrift 34s ease-in-out infinite;
}
@keyframes wbDrift{
  0%,100%{transform:translate3d(0,0,0) scale(1);}
  50%    {transform:translate3d(18px,-22px,0) scale(1.04);}
}

/* --- Content ------------------------------------------------------------- */
.welcome-inner{
  position:relative;z-index:1;text-align:center;
  padding:var(--sp-6) var(--sp-4);max-width:52ch;
  animation:welcomeRise .5s ease both;
}
@keyframes welcomeRise{
  from{opacity:0;transform:translateY(10px);}
  to  {opacity:1;transform:translateY(0);}
}

.welcome-mark{
  width:76px;height:76px;margin:0 auto var(--sp-4);
  border-radius:20px;
  display:flex;align-items:center;justify-content:center;
  background:linear-gradient(140deg, var(--clr-primary) 0%, #6D6BC9 100%);
  color:#fff;font-weight:700;font-size:20px;letter-spacing:.5px;
  box-shadow:0 10px 26px rgba(75,73,172,.26);
  animation:markFloat 5.5s ease-in-out infinite;
}
@keyframes markFloat{
  0%,100%{transform:translateY(0);box-shadow:0 10px 26px rgba(75,73,172,.26);}
  50%    {transform:translateY(-7px);box-shadow:0 18px 34px rgba(75,73,172,.20);}
}

.welcome-title{
  font-size:24px;font-weight:700;line-height:1.25;
  margin-bottom:var(--sp-2);
  animation:welcomeRise .5s ease .06s both;
}
.welcome-sub{
  margin:0 0 var(--sp-5);color:var(--clr-muted);font-size:var(--fs-lg);
  animation:welcomeRise .5s ease .12s both;
}

.welcome-scope{
  display:inline-flex;align-items:center;flex-wrap:wrap;
  justify-content:center;gap:var(--sp-2);
  padding:var(--sp-2) var(--sp-4);
  background:var(--clr-surface);
  border:1px solid var(--clr-border);border-radius:999px;
  box-shadow:var(--shadow-sm);
  font-size:var(--fs-sm);
  animation:welcomeRise .5s ease .18s both;
}
.welcome-scope .ws{font-weight:600;}
.welcome-scope .ws-sep{color:var(--clr-border-strong);}

.welcome-hint{
  margin:var(--sp-5) 0 0;color:var(--clr-muted);font-size:var(--fs-sm);
  animation:welcomeRise .5s ease .24s both;
}

@media (max-width:600px){
  .welcome-mark{width:60px;height:60px;font-size:16px;}
  .welcome-title{font-size:19px;}
  .welcome-scope{flex-direction:column;border-radius:var(--radius);}
  .welcome-scope .ws-sep{display:none;}
}

/* ==========================================================================
   COMING SOON
   Shown instead of a 404 when a menu item has no page yet.
   ========================================================================== */
.soon{
  position:relative;
  display:flex;align-items:center;justify-content:center;
  min-height:100vh;overflow:hidden;
  background:
    radial-gradient(900px 500px at 50% -10%, #F5F5FC 0%, transparent 60%),
    var(--clr-surface-alt);
}
.soon-bg{position:absolute;inset:0;pointer-events:none;}

.soon-inner{
  position:relative;z-index:1;text-align:center;
  padding:var(--sp-6) var(--sp-4);max-width:46ch;
  animation:welcomeRise .45s ease both;
}
.soon-icon{
  width:64px;height:64px;margin:0 auto var(--sp-4);
  border-radius:18px;
  display:flex;align-items:center;justify-content:center;
  background:var(--clr-surface);color:var(--clr-primary);
  border:1px solid var(--clr-border);
  box-shadow:var(--shadow-sm);
}
.soon-module{font-size:22px;font-weight:700;margin-bottom:var(--sp-2);}
.soon-lead{margin:0 0 var(--sp-4);color:var(--clr-muted);font-size:var(--fs-lg);}

.soon-badge{
  display:inline-block;margin-bottom:var(--sp-5);
  padding:var(--sp-1) var(--sp-4);border-radius:999px;
  background:#FFF6E5;border:1px solid #FFE0A3;color:#7A5200;
  font-size:var(--fs-sm);font-weight:600;
}
.soon-hint{margin:0 0 var(--sp-5);color:var(--clr-muted);font-size:var(--fs-sm);}

/* Sidebar marker: a menu that looks finished and is not is worse than one
   that admits it. */
.nav-soon{
  width:6px;height:6px;border-radius:50%;flex:0 0 auto;
  background:var(--clr-warning);opacity:.75;
}

/* --- Pinned tab ---------------------------------------------------------- */
.tab.is-pinned{
  font-weight:600;
  padding-inline-end:var(--sp-3);
}
.tab.is-pinned::before{
  content:"";width:5px;height:5px;border-radius:50%;
  background:var(--clr-primary);opacity:.55;flex:0 0 auto;
}
.tab.is-pinned.is-active::before{opacity:1;}

/* --- Footer -------------------------------------------------------------- */
.app-footer{
  height:var(--footer-h);flex:0 0 auto;
  display:flex;align-items:center;justify-content:space-between;
  padding:0 var(--sp-4);
  background:var(--clr-surface);border-top:1px solid var(--clr-border);
  font-size:var(--fs-sm);color:var(--clr-muted);
}

/* ==========================================================================
   DASHBOARD
   ========================================================================== */
.page{padding:var(--sp-4);}
.page-head{margin-bottom:var(--sp-4);}
.page-head h1{font-size:18px;margin-bottom:2px;}
.page-head p{margin:0;color:var(--clr-muted);font-size:var(--fs-sm);}

/* --- KPI tiles ------------------------------------------------------------
   White cards on the standard surface, so the row sits with the rest of the
   page furniture rather than shouting over it. All the colour is spent on the
   icon itself: the glyph is filled with a gradient and lifted off the card by
   a bevel highlight and two cast shadows, so the shape of the icon IS the
   three-dimensional object - no disc, no plate, nothing behind it.

   Colour still means something. Teal money in, indigo money out, amber/rose/
   violet who owes whom, emerald/sky/bronze what is held - so a glance at the
   icons alone groups the figures before a single label is read.

   Rows are explicit rather than one wrapping grid: the grouping is the
   meaning, and a tile that wrapped into the row above would say something
   untrue about the figure it holds.
-------------------------------------------------------------------------- */
.kpi-row{
  display:grid;gap:var(--sp-3);
  grid-template-columns:repeat(4,minmax(0,1fr));
  margin-bottom:var(--sp-3);
}
.kpi-row.k-3{grid-template-columns:repeat(3,minmax(0,1fr));}
.kpi-row:last-of-type{margin-bottom:var(--sp-4);}

.k-tile{
  display:flex;align-items:center;gap:var(--sp-4);
  min-height:88px;padding:var(--sp-4);
  background:var(--clr-surface);
  border:1px solid var(--clr-border);
  border-radius:var(--radius);
  box-shadow:var(--shadow-sm);
  transition:transform .18s ease,box-shadow .18s ease;
}
.k-tile:hover{transform:translateY(-2px);box-shadow:var(--shadow-md);}

/* A sizing box only - it draws nothing. */
.k-tile .k-glyph{
  flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;
  width:44px;height:44px;font-size:34px;line-height:1;
}
/* Flat colour is the floor: if the browser cannot clip a background to the
   glyph, the icon is still there and still the right colour. */
.k-tile .k-glyph i{display:block;color:var(--k2);transition:transform .18s ease;}

/* The gradient goes on ::before, NOT on the <i>.
   Bootstrap Icons draw the glyph from the pseudo-element's generated content,
   so clipping a background to the <i> clips it to that element's own text -
   which is empty - and a transparent text-fill on the <i> inherits down and
   erases the glyph. Both together render nothing at all. */
@supports ((-webkit-background-clip:text) or (background-clip:text)){
  .k-tile .k-glyph i::before{
    display:block;
    background-image:linear-gradient(155deg,var(--k1) 0%,var(--k2) 52%,var(--k3) 100%);
    -webkit-background-clip:text;background-clip:text;
    -webkit-text-fill-color:transparent;
    /* drop-shadow follows the glyph outline, not a box: one hairline of white
       above for the bevel, then two shadows below for the lift. */
    filter:
      drop-shadow(0 1px 0 rgba(255,255,255,.85))
      drop-shadow(0 2px 2px rgba(16,24,40,.22))
      drop-shadow(0 5px 8px rgba(16,24,40,.16));
  }
}
.k-tile:hover .k-glyph i{transform:translateY(-1px) scale(1.04);}

.k-tile .k-body{display:flex;flex-direction:column;gap:2px;min-width:0;}
.k-tile .k-label{
  font-size:11px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;
  color:var(--clr-muted);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
/* Tabular figures: a column of amounts that jitters as digits change is
   harder to compare than one that does not. */
.k-tile .k-value{
  font-size:24px;font-weight:700;line-height:1.15;color:var(--clr-text);
  font-variant-numeric:tabular-nums lining-nums;
}
.k-tile .k-foot{
  font-size:11px;color:var(--clr-muted);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}

/* Nothing to show yet. Only the icon loses its colour and its lift, so the
   tile still names the figure that is missing - the useful half of an empty
   state. */
.k-tile.is-empty{--k1:#DFE4EC;--k2:#C9D0DC;--k3:#AEB7C6;}
.k-tile.is-empty .k-glyph i::before{filter:drop-shadow(0 1px 0 rgba(255,255,255,.9));}
.k-tile.is-empty .k-value{font-size:15px;font-weight:600;color:var(--clr-muted);}
.k-tile.is-empty:hover{transform:none;box-shadow:var(--shadow-sm);}
.k-tile.is-empty:hover .k-glyph i{transform:none;}

/* The icon palette. --k1 is the lit edge and --k3 the shaded one, far enough
   apart to model a surface but not so far that the glyph reads as two
   colours. */
.k-teal   {--k1:#5FE0C4;--k2:#12A08A;--k3:#0A5F53;}
.k-indigo {--k1:#A3B0FF;--k2:#4C5FD7;--k3:#2A3480;}
.k-amber  {--k1:#FFD489;--k2:#E2911D;--k3:#96560A;}
.k-rose   {--k1:#FF9DAE;--k2:#D94A68;--k3:#8C233C;}
.k-violet {--k1:#D0B4FF;--k2:#8B5CD6;--k3:#51308A;}
.k-emerald{--k1:#89E9AE;--k2:#22A35F;--k3:#0F6236;}
.k-sky    {--k1:#8AD5FA;--k2:#2189CD;--k3:#0C4E7D;}
.k-bronze {--k1:#EBC29B;--k2:#A97A52;--k3:#644127;}

.card{
  background:var(--clr-surface);border:1px solid var(--clr-border);
  border-radius:var(--radius);margin-bottom:var(--sp-4);
}
.card-head{
  padding:var(--sp-3) var(--sp-4);border-bottom:1px solid var(--clr-border);
  display:flex;align-items:center;justify-content:space-between;gap:var(--sp-3);
}
.card-head h2{font-size:var(--fs-lg);}
.card-body{padding:var(--sp-4);}

.info-grid{display:grid;gap:var(--sp-3);grid-template-columns:repeat(auto-fill,minmax(200px,1fr));}
.info-item .k{font-size:var(--fs-sm);color:var(--clr-muted);}
.info-item .v{font-weight:600;}

/* --- Grid standard (Blueprint 5.6) --------------------------------------- */
.grid-wrap{border:1px solid var(--clr-border);border-radius:var(--radius);overflow:auto;max-height:60vh;}
table.grid{width:100%;border-collapse:collapse;font-size:var(--fs-base);}
table.grid thead th{
  position:sticky;top:0;z-index:2;
  background:var(--clr-surface-alt);
  text-align:start;font-weight:600;
  padding:var(--sp-2) var(--sp-3);
  border-bottom:1px solid var(--clr-border-strong);
  border-inline-end:1px solid var(--clr-border);
  white-space:nowrap;
}
table.grid tbody td{
  height:var(--ctl-h);padding:var(--sp-1) var(--sp-3);
  border-bottom:1px solid var(--clr-border);
  border-inline-end:1px solid var(--clr-border);
}
table.grid tbody tr:nth-child(even){background:var(--clr-surface-alt);}
table.grid tbody tr:hover{background:var(--clr-primary-soft);}
table.grid .num{text-align:end;font-variant-numeric:tabular-nums;}
.grid-empty{padding:var(--sp-6);text-align:center;color:var(--clr-muted);}

/* ==========================================================================
   FORM CHASSIS (Blueprint 5.5)
   Every data-entry screen uses this skeleton, so all ~250 of them feel alike:
     form-card > form-head > form-body > [section-card...] > form-actions
   ========================================================================== */

/* Module pages render inside a shell iframe: no page chrome of their own. */
body.in-tab{background:var(--clr-surface-alt);}

.form-card{
  display:flex;flex-direction:column;min-height:100vh;
  background:var(--clr-bg);
}
/*  Framed (inside a shell tab or a modal iframe): the card IS the frame.

    It is positioned against the iframe, not sized through html > body >
    form > card with percentages or flex. ScriptManager injects hidden
    fields as siblings of the card, and a percentage chain has to account
    for every one of them; inset:0 cannot fail that way.

    The head and the command bar are fixed-size flex items; only .form-body
    scrolls. min-height:0 on the body is not optional: a flex item will not
    shrink below its content size unless told to, and without it a tall form
    pushes the card past the frame and takes the command bar with it. Short
    forms hide that bug; it appears the first time a form is taller than
    the tab.                                                                */
body.in-tab .form-card{position:absolute;inset:0;min-height:0;}

.form-head{
  flex:0 0 auto;
  display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--sp-3);
  padding:var(--sp-3) var(--sp-4);
  background:var(--clr-surface);
  border-bottom:1px solid var(--clr-border);
}
.form-head h1{font-size:16px;font-weight:700;}
.form-badge{
  font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;
  color:var(--clr-primary);background:var(--clr-primary-soft);
  padding:3px var(--sp-2);border-radius:999px;
}

.form-body{
  flex:1 1 auto;min-height:0;min-width:0;
  padding:var(--sp-4);overflow:auto;-webkit-overflow-scrolling:touch;
}

/* --- Section card -------------------------------------------------------- */
.section-card{
  background:var(--clr-surface);
  border:1px solid var(--clr-border);
  border-radius:var(--radius);
  margin-bottom:var(--sp-4);
}
.section-head{
  display:flex;align-items:center;justify-content:space-between;gap:var(--sp-3);
  flex-wrap:wrap;
  padding:var(--sp-2) var(--sp-4);
  border-bottom:1px solid var(--clr-border);
  font-weight:600;font-size:var(--fs-base);
  background:var(--clr-surface-alt);
  border-radius:var(--radius) var(--radius) 0 0;
}
.section-body{padding:var(--sp-4);}
.section-body.no-pad{padding:0;}
.section-tools{display:flex;align-items:center;gap:var(--sp-2);}

/* --- 12-column form grid ------------------------------------------------- */
.row{
  display:grid;grid-template-columns:repeat(12,1fr);
  gap:0 var(--sp-3);
}
.col-1{grid-column:span 1}   .col-2{grid-column:span 2}
.col-3{grid-column:span 3}   .col-4{grid-column:span 4}
.col-5{grid-column:span 5}   .col-6{grid-column:span 6}
.col-7{grid-column:span 7}   .col-8{grid-column:span 8}
.col-9{grid-column:span 9}   .col-10{grid-column:span 10}
.col-11{grid-column:span 11} .col-12{grid-column:span 12}

.field-check{display:flex;align-items:center;gap:var(--sp-2);padding-top:var(--sp-5);}
.field-label.inline{margin:0;}
.check-inline{display:inline-flex;align-items:center;gap:var(--sp-1);font-size:var(--fs-sm);}
.ctl-sm{height:30px;width:auto;min-width:180px;}

/* ==========================================================================
   PICK FRAME
   A selection list rendered as a real grid, identical in style to the Users
   list: sticky header, row separators, alternating rows, hover.

   The height is FIXED, not max-height. Two frames side by side must stay the
   same size whether one holds three rows and the other three hundred, and a
   frame that grows with its content shifts everything below it.
   ========================================================================== */
:root{ --pick-h:196px; }

.pick-frame{
  height:var(--pick-h);
  overflow-y:auto;overflow-x:hidden;
  border:1px solid var(--clr-border);
  border-radius:var(--radius);
  background:var(--clr-surface);
}

table.pick-grid{width:100%;border-collapse:collapse;font-size:var(--fs-base);}

table.pick-grid thead th{
  position:sticky;top:0;z-index:2;
  background:var(--clr-surface-alt);
  text-align:start;font-weight:600;
  padding:var(--sp-2) var(--sp-3);
  border-bottom:1px solid var(--clr-border-strong);
  white-space:nowrap;
}
table.pick-grid tbody td{
  padding:0;
  border-bottom:1px solid var(--clr-border);
  border-inline-end:1px solid var(--clr-border);
}
table.pick-grid tbody td:last-child{border-inline-end:0;}
table.pick-grid tbody tr:nth-child(even){background:var(--clr-surface-alt);}
table.pick-grid tbody tr:hover{background:var(--clr-primary-soft);}
table.pick-grid tbody tr:last-child td{border-bottom:0;}

/* The whole first cell is the click target, not just the small control. */
.pick-label{
  display:flex;align-items:center;gap:var(--sp-2);
  min-height:32px;padding:var(--sp-1) var(--sp-3);
  cursor:pointer;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.pick-name{overflow:hidden;text-overflow:ellipsis;}
.pick-tag{flex:0 0 auto;}

th.pick-sel,td.pick-sel{
  width:64px;text-align:center;
}
td.pick-sel input{margin:0;cursor:pointer;}

.pick-empty{
  padding:var(--sp-5) var(--sp-3);
  text-align:center;color:var(--clr-muted);font-size:var(--fs-sm);
}

/* A visible scrollbar is the hint that there is more below. */
.pick-frame::-webkit-scrollbar{width:10px;}
.pick-frame::-webkit-scrollbar-track{background:var(--clr-surface-alt);}
.pick-frame::-webkit-scrollbar-thumb{
  background:var(--clr-border-strong);border-radius:5px;
  border:2px solid var(--clr-surface-alt);
}
.pick-frame::-webkit-scrollbar-thumb:hover{background:var(--clr-muted);}

@media (max-width:900px){
  :root{ --pick-h:170px; }
}

/* ==========================================================================
   PERMISSION MATRIX
   Wide, dense, and scrolled in both directions: the menu column is frozen so
   you can always see WHICH menu you are ticking, and the header is frozen so
   you can always see WHICH right.
   ========================================================================== */
.matrix-wrap{
  max-height:60vh;overflow:auto;
  border-top:1px solid var(--clr-border);
}
table.matrix{width:100%;border-collapse:separate;border-spacing:0;font-size:var(--fs-base);}

table.matrix thead th{
  position:sticky;top:0;z-index:3;
  background:var(--clr-surface-alt);
  padding:var(--sp-2) var(--sp-2);
  border-bottom:1px solid var(--clr-border-strong);
  font-weight:600;white-space:nowrap;
  text-align:center;
}
table.matrix thead th.mx-menu{
  inset-inline-start:0;z-index:4;text-align:start;
  border-inline-end:1px solid var(--clr-border-strong);
}

table.matrix td{
  padding:0;border-bottom:1px solid var(--clr-border);
}
td.mx-menu{
  position:sticky;inset-inline-start:0;z-index:2;
  background:var(--clr-surface);
  border-inline-end:1px solid var(--clr-border-strong);
  padding:var(--sp-1) var(--sp-3);
  min-width:260px;max-width:340px;
}
tr:nth-child(even) td.mx-menu{background:var(--clr-surface-alt);}
tr.mx-row:hover td{background:var(--clr-primary-soft);}
tr.mx-row:hover td.mx-menu{background:var(--clr-primary-soft);}

.mx-name{display:block;line-height:1.35;}
.mx-code{
  display:block;font-size:10px;color:var(--clr-muted);
  letter-spacing:.03em;text-transform:uppercase;
}

/* Folder rows are headings, not permission rows. */
tr.mx-folder td{
  background:#EFF0F6;
  border-bottom:1px solid var(--clr-border-strong);
}
tr.mx-folder td.mx-menu{
  background:#EFF0F6;font-weight:700;
}
tr.mx-folder .mx-code{display:none;}

th.mx-col,td.mx-col{width:74px;text-align:center;}
td.mx-col input{margin:0;cursor:pointer;}

/* Column toggle in the header. */
.mx-all{
  display:block;margin-top:2px;
  font-size:11px;color:var(--clr-primary);cursor:pointer;
  user-select:none;line-height:1;
}
.mx-all:hover{color:var(--clr-primary-dark);}

.inline-pair{display:flex;gap:var(--sp-2);align-items:center;}
.inline-pair .ctl{flex:1 1 auto;min-width:0;}
.inline-pair .btn-erp{flex:0 0 auto;}

@media print{
  .matrix-wrap{max-height:none;overflow:visible;}
  table.matrix thead th,td.mx-menu{position:static;}
}

/* --- Permissions page: give the vertical space to the matrix ------------- */
.perm-page .form-body{padding:var(--sp-3) var(--sp-4);}
.perm-page .section-card{margin-bottom:var(--sp-3);}
.perm-page .alert{margin-bottom:var(--sp-3);padding:var(--sp-2) var(--sp-3);}
.perm-page .matrix-wrap{max-height:none;height:calc(100vh - 300px);min-height:280px;}

/* --- Tri-state override cell -------------------------------------------- */
.tri{
  width:26px;height:24px;line-height:1;
  border:1px solid var(--clr-border-strong);border-radius:var(--radius-sm);
  background:var(--clr-surface);
  font-size:13px;font-weight:700;cursor:pointer;
  transition:background-color .12s ease,border-color .12s ease,color .12s ease;
}
.tri:disabled{cursor:not-allowed;opacity:.55;}

/* Inherit shows the ROLE value faintly, so it never reads as "unknown". */
.tri.inherit{color:var(--clr-muted);border-style:dashed;background:transparent;}
.tri.allow{background:#E7F8EF;border-color:#A9E6C6;color:#0A6B39;}
.tri.deny{background:#FDECEC;border-color:#F5C2C2;color:#8E1F1F;}

/* ==========================================================================
   PERMISSION TOOLBAR
   Everything that selects WHAT you are editing sits on one row. Stacking it
   wastes vertical space on a screen whose whole value is showing rows.
   ========================================================================== */
.perm-bar{
  display:flex;flex-wrap:wrap;align-items:flex-end;
  gap:var(--sp-3) var(--sp-4);
  padding:var(--sp-3) var(--sp-4);
  background:var(--clr-surface);
  border:1px solid var(--clr-border);
  border-radius:var(--radius);
  margin-bottom:var(--sp-3);
}

.pb-item{display:flex;flex-direction:column;gap:var(--sp-1);min-width:0;}
.pb-grow{flex:1 1 240px;max-width:360px;}
.pb-end{margin-inline-start:auto;flex:0 0 auto;}

.pb-label{
  font-size:var(--fs-sm);font-weight:600;color:var(--clr-label);
  white-space:nowrap;line-height:1.2;
}
.pb-label .req{color:var(--clr-danger);margin-inline-start:2px;}

/* Select plus button on one line, the select taking the slack. */
.pb-pair{display:flex;gap:var(--sp-2);align-items:center;min-width:0;}
.pb-pair .ctl{flex:1 1 auto;min-width:0;}
.pb-pair .btn-erp{flex:0 0 auto;}

.pb-chip{
  display:inline-flex;align-items:center;
  height:var(--ctl-h);padding:0 var(--sp-3);
  background:var(--clr-surface-alt);
  border:1px solid var(--clr-border);border-radius:999px;
  font-size:var(--fs-sm);font-weight:600;white-space:nowrap;
}

/* --------------------------------------------------------------------------
   Scope switch.
   RadioButtonList in Flow layout emits bare <input><label> pairs and, in
   Vertical mode, a <br> after each. Killing the <br> and forcing inline-flex
   makes it horizontal whatever the control decides to render.
   -------------------------------------------------------------------------- */
.scope-switch{
  display:inline-flex;align-items:center;gap:var(--sp-4);
  height:var(--ctl-h);white-space:nowrap;
}
.scope-switch br{display:none;}
.scope-switch label{
  display:inline-flex;align-items:center;gap:var(--sp-1);
  cursor:pointer;font-size:var(--fs-base);
  margin-inline-end:var(--sp-3);
}
.scope-switch input{margin:0;flex:0 0 auto;}
.scope-switch input:last-of-type + label{margin-inline-end:0;}

.tri-legend{
  display:flex;gap:var(--sp-3);align-items:center;
  font-size:var(--fs-sm);color:var(--clr-muted);
}
.tri-legend span{display:inline-flex;align-items:center;gap:var(--sp-1);}
.tri-chip{
  width:12px;height:12px;border-radius:3px;display:inline-block;
  border:1px solid var(--clr-border-strong);
}
.tri-chip.inherit{border-style:dashed;background:transparent;}
.tri-chip.allow{background:#A9E6C6;border-color:#A9E6C6;}
.tri-chip.deny{background:#F5C2C2;border-color:#F5C2C2;}

/* A row that differs from its role should be findable at a glance. */
tr.mx-overridden td.mx-menu{
  border-inline-start:3px solid var(--clr-warning);
}

/* ==========================================================================
   QUICK ACCESS - dashboard panel
   1 card fills the row, 2 split it, 3+ share equally. flex:1 1 0 with a
   min-width does all of that on its own; past the minimum the strip scrolls
   rather than crushing the cards into unreadable slivers.
   ========================================================================== */
.qa-panel{
  background:var(--clr-surface);
  border:1px solid var(--clr-border);
  border-radius:var(--radius);
  margin-bottom:var(--sp-4);
  overflow:hidden;
}
.qa-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:var(--sp-2) var(--sp-4);
  border-bottom:1px solid var(--clr-border);
  background:var(--clr-surface-alt);
}
.qa-title{font-weight:700;font-size:var(--fs-base);}
.qa-config{font-size:var(--fs-sm);color:var(--clr-primary);text-decoration:none;}
.qa-config:hover{text-decoration:underline;}

.qa-scroll{
  overflow-x:auto;overflow-y:hidden;
  padding:var(--sp-3) var(--sp-4);
  scroll-behavior:smooth;
  cursor:grab;
}
.qa-scroll.is-dragging{cursor:grabbing;scroll-behavior:auto;user-select:none;}
.qa-scroll::-webkit-scrollbar{height:8px;}
.qa-scroll::-webkit-scrollbar-track{background:var(--clr-surface-alt);border-radius:4px;}
.qa-scroll::-webkit-scrollbar-thumb{background:var(--clr-border-strong);border-radius:4px;}

.qa-list{display:flex;gap:var(--sp-3);min-width:min-content;}

.qa-card{
  flex:1 1 0;
  background-image:linear-gradient(180deg,#FFFFFF 0%,#FAFAFD 100%);
  /* 9 across before it scrolls, on a typical desktop width. */
  min-width:150px;
  display:flex;align-items:center;gap:var(--sp-2);
  padding:var(--sp-3);
  background:var(--clr-surface);
  border:1px solid var(--clr-border);border-radius:var(--radius-sm);
  text-align:start;cursor:pointer;
  transition:border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}
.qa-card:hover{
  border-color:var(--clr-primary);
  box-shadow:0 4px 12px rgba(75,73,172,.12);
  transform:translateY(-1px);
}
.qa-card:active{transform:translateY(0);}

/* --------------------------------------------------------------------------
   OFFICE 2007 TILE
   Four layers make the look, and each one matters:
     1. a two-stop gradient, lighter above the midpoint, darker below
     2. a gloss sweep across the top half, cut off at 50% with a hard stop
     3. a 1px inner highlight, so the edge catches light
     4. an outer shadow, so the tile sits above the card rather than on it
   Take away the hard stop at 50% and it stops reading as glass.
   -------------------------------------------------------------------------- */
.qa-icon{
  position:relative;
  width:42px;height:42px;flex:0 0 auto;
  border-radius:8px;
  display:flex;align-items:center;justify-content:center;
  color:#fff;
  background-image:linear-gradient(180deg, var(--t-hi) 0%, var(--t-mid) 50%, var(--t-lo) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.55),      /* top edge catches light */
    inset 0 -1px 0 rgba(0,0,0,.14),           /* bottom edge in shadow  */
    0 1px 2px rgba(16,24,40,.22),
    0 3px 6px rgba(16,24,40,.14);
  overflow:hidden;
  /* Default tint, overridden by the .t-* class. */
  --t-hi:#7B79D6; --t-mid:#4B49AC; --t-lo:#39377F;
}

/* The gloss. A hard stop, not a fade - Office 2007 glass has an edge. */
.qa-icon::before{
  content:"";position:absolute;inset:0 0 50% 0;
  background:linear-gradient(180deg, rgba(255,255,255,.42) 0%, rgba(255,255,255,.10) 100%);
  pointer-events:none;
}

.qa-icon i,.qa-icon .ico{
  position:relative;z-index:1;
  width:20px;height:20px;
  /* A dark rim under a white glyph is what stops it dissolving into the
     lighter half of the gradient. */
  filter:drop-shadow(0 1px 1px rgba(0,0,0,.35));
}
.qa-icon .bi{
  position:relative;z-index:1;
  font-size:21px;line-height:1;
  text-shadow:0 1px 1px rgba(0,0,0,.35);
}

/* An uploaded logo needs a light tile: a white glyph gradient would swallow it. */
.qa-icon.has-img{
  background-image:linear-gradient(180deg,#FFFFFF 0%,#F2F3F8 50%,#E4E6EF 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.9),
    inset 0 -1px 0 rgba(0,0,0,.08),
    0 1px 2px rgba(16,24,40,.16),
    0 3px 6px rgba(16,24,40,.10);
}
.qa-icon.has-img::before{opacity:.5;}
.qa-icon .qa-img{position:relative;z-index:1;width:26px;height:26px;}

/* --- Tints, assigned per module so colour carries meaning ---------------- */
.t-blue  {--t-hi:#5BA8E8; --t-mid:#2C7BC4; --t-lo:#1D5C97;}
.t-green {--t-hi:#7BC96F; --t-mid:#4A9C3E; --t-lo:#35762C;}
.t-amber {--t-hi:#F5C25B; --t-mid:#D99A21; --t-lo:#A97516;}
.t-orange{--t-hi:#F59B5B; --t-mid:#D96F21; --t-lo:#A85317;}
.t-red   {--t-hi:#E87B7B; --t-mid:#C43C3C; --t-lo:#962B2B;}
.t-violet{--t-hi:#A88BE0; --t-mid:#7A56C4; --t-lo:#5B3E96;}
.t-teal  {--t-hi:#5BD1C4; --t-mid:#21A396; --t-lo:#177A70;}
.t-cyan  {--t-hi:#5BBFE8; --t-mid:#2196C4; --t-lo:#177297;}
.t-pink  {--t-hi:#E88BC0; --t-mid:#C4568F; --t-lo:#96406C;}
.t-slate {--t-hi:#8B93AD; --t-mid:#5C6580; --t-lo:#434A60;}

/* Lift on hover, press on click. Office 2007 buttons had physical weight. */
.qa-card:hover .qa-icon{
  transform:translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.6),
    inset 0 -1px 0 rgba(0,0,0,.16),
    0 2px 4px rgba(16,24,40,.24),
    0 6px 12px rgba(16,24,40,.18);
}
.qa-card:active .qa-icon{
  transform:translateY(1px);
  box-shadow:
    inset 0 1px 3px rgba(0,0,0,.28),
    0 1px 1px rgba(16,24,40,.14);
}
.qa-icon{transition:transform .13s ease, box-shadow .13s ease;}

.qa-text{display:flex;flex-direction:column;min-width:0;gap:1px;}
.qa-name{
  font-weight:600;font-size:var(--fs-base);line-height:1.25;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.qa-desc{
  font-size:11px;color:var(--clr-muted);line-height:1.3;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.qa-desc:empty{display:none;}

.qa-empty{padding:var(--sp-5) var(--sp-4);text-align:center;}
.qa-empty p{margin:0 0 var(--sp-3);color:var(--clr-muted);font-size:var(--fs-sm);}

/* Tablet: cards get wider so the text stays readable, and the strip scrolls
   sooner rather than shrinking them. */
@media (max-width:1024px){
  .qa-card{min-width:180px;}
}
@media (max-width:640px){
  .qa-card{min-width:200px;}
  .qa-scroll{padding:var(--sp-3);}
}

.dash-greet{margin-bottom:var(--sp-4);}
.dash-greet h1{font-size:19px;font-weight:700;line-height:1.25;}
.dash-greet p{margin:2px 0 0;color:var(--clr-muted);font-size:var(--fs-sm);}

/* Picker cells get the same treatment at a smaller size, so what you choose
   is what you see on the dashboard. */
.icon-opt .ico,.icon-opt .bi{
  position:relative;
}
.icon-opt-tile{
  position:relative;
  width:34px;height:34px;border-radius:7px;
  display:flex;align-items:center;justify-content:center;
  color:#fff;overflow:hidden;
  background-image:linear-gradient(180deg,#8B93AD 0%,#5C6580 50%,#434A60 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.5),
    inset 0 -1px 0 rgba(0,0,0,.14),
    0 1px 2px rgba(16,24,40,.18);
}
.icon-opt-tile::before{
  content:"";position:absolute;inset:0 0 50% 0;
  background:linear-gradient(180deg, rgba(255,255,255,.4) 0%, rgba(255,255,255,.08) 100%);
}
.icon-opt-tile .ico{width:17px;height:17px;position:relative;z-index:1;
  filter:drop-shadow(0 1px 1px rgba(0,0,0,.32));}
.icon-opt-tile .bi{font-size:17px;line-height:1;position:relative;z-index:1;
  text-shadow:0 1px 1px rgba(0,0,0,.32);}
.icon-opt:hover .icon-opt-tile{
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.6),
    inset 0 -1px 0 rgba(0,0,0,.16),
    0 2px 5px rgba(16,24,40,.22);
}

/* --- File input ----------------------------------------------------------
   The browser's own "Choose File" button cannot be styled, so the input is
   hidden and a <label for> drives it. The label is a real control: clicking
   it opens the same dialog, and it stays keyboard-reachable through the input.
   -------------------------------------------------------------------------- */
.file-field{display:flex;align-items:center;gap:var(--sp-2);min-width:0;}

.file-native{
  position:absolute !important;
  width:1px;height:1px;padding:0;margin:-1px;border:0;
  overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;
}
.file-btn{flex:0 0 auto;cursor:pointer;}

/* Focus lives on the hidden input, so the ring has to be drawn on the label. */
.file-native:focus-visible + .file-btn{
  border-color:var(--clr-primary);
  box-shadow:0 0 0 3px var(--clr-primary-soft);
}

.file-name{
  flex:1 1 auto;min-width:0;
  font-size:var(--fs-sm);color:var(--clr-muted);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.file-name.has-file{color:var(--clr-text);font-weight:600;}

.icon-pick-search{margin-bottom:var(--sp-3);}
.icon-pick-search .ctl{width:100%;}
.icon-opt[hidden]{display:none;}

/* Bootstrap Icons are a font, so they size with font-size, not width/height. */
.icon-opt .bi{font-size:20px;line-height:1;}
.qa-icon .bi{font-size:19px;line-height:1;color:inherit;}
.qa-row-icon .bi{font-size:16px;line-height:1;}
.nav-link .bi{font-size:16px;line-height:1;opacity:.75;}

/* --- Quick Access: images and the icon picker ---------------------------- */
.qa-img{
  max-width:100%;max-height:100%;object-fit:contain;
  display:block;border-radius:4px;
}
.qa-icon .qa-img{width:22px;height:22px;}
.qa-row-icon .qa-img{width:18px;height:18px;}

/* The glyph on a pinned row is a button that opens the picker. */
.qa-row-icon.is-pick{
  border:1px solid transparent;cursor:pointer;
  transition:border-color .12s ease,background-color .12s ease;
}
.qa-row-icon.is-pick:hover{
  border-color:var(--clr-primary);
  background:var(--clr-surface);
}

/* NOT .icon-grid: that is also the name of an ICON in the set, so the mask
   rule would apply to this container and clip away its own children. Any
   layout class sharing a name with an icon does the same, hence .icon-pick. */
.icon-pick{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(84px, 1fr));
  gap:var(--sp-2);
}
.icon-opt{
  min-height:72px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:var(--sp-1);padding:var(--sp-2) var(--sp-1);
  background:var(--clr-surface);
  border:1px solid var(--clr-border);border-radius:var(--radius-sm);
  color:var(--clr-text);cursor:pointer;
  transition:border-color .12s ease,background-color .12s ease,color .12s ease;
}
.icon-opt:hover{
  border-color:var(--clr-primary);
  background:var(--clr-primary-soft);
  color:var(--clr-primary);
}
.icon-opt .ico{width:22px;height:22px;}

/* The name under each glyph. A picker where one mask fails to load is
   unusable without it, and the labels help even when nothing is broken. */
.icon-opt-label{
  font-size:10px;line-height:1.2;color:var(--clr-muted);
  text-align:center;text-transform:capitalize;
  max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.icon-opt:hover .icon-opt-label{color:var(--clr-primary);}

/* ==========================================================================
   QUICK ACCESS - configuration page
   ========================================================================== */
.qa-cfg{display:grid;grid-template-columns:1.25fr 1fr;gap:var(--sp-4);}

.qa-col{
  display:flex;flex-direction:column;
  border:1px solid var(--clr-border);border-radius:var(--radius);
  background:var(--clr-surface);overflow:hidden;
}
.qa-col-head{
  display:flex;align-items:center;justify-content:space-between;gap:var(--sp-2);
  padding:var(--sp-2) var(--sp-3);
  background:var(--clr-surface-alt);
  border-bottom:1px solid var(--clr-border);
  font-size:var(--fs-sm);font-weight:600;color:var(--clr-muted);
}

.qa-drop,.qa-avail{
  height:420px;overflow-y:auto;padding:var(--sp-2);
}
.qa-drop-empty{
  padding:var(--sp-6) var(--sp-3);text-align:center;
  color:var(--clr-muted);font-size:var(--fs-sm);
  border:1px dashed var(--clr-border-strong);border-radius:var(--radius-sm);
}

.qa-row{
  display:flex;align-items:center;gap:var(--sp-2);
  padding:var(--sp-2);margin-bottom:var(--sp-2);
  background:var(--clr-surface);
  border:1px solid var(--clr-border);border-radius:var(--radius-sm);
}
.qa-row:last-child{margin-bottom:0;}
.qa-row.is-dragging{opacity:.4;}
.qa-row.is-new{border-color:var(--clr-primary);}

.qa-grip{
  flex:0 0 auto;cursor:grab;color:var(--clr-border-strong);
  font-size:11px;letter-spacing:-3px;line-height:1;user-select:none;
}
.qa-row:active .qa-grip{cursor:grabbing;}

.qa-row-icon{
  position:relative;
  width:32px;height:32px;flex:0 0 auto;border-radius:7px;
  display:flex;align-items:center;justify-content:center;
  color:#fff;overflow:hidden;
  background-image:linear-gradient(180deg, var(--t-hi) 0%, var(--t-mid) 50%, var(--t-lo) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.5),
    inset 0 -1px 0 rgba(0,0,0,.14),
    0 1px 2px rgba(16,24,40,.18);
  --t-hi:#7B79D6; --t-mid:#4B49AC; --t-lo:#39377F;
}
.qa-row-icon::before{
  content:"";position:absolute;inset:0 0 50% 0;
  background:linear-gradient(180deg, rgba(255,255,255,.4) 0%, rgba(255,255,255,.08) 100%);
  pointer-events:none;
}
.qa-row-icon i,.qa-row-icon .ico{
  position:relative;z-index:1;width:16px;height:16px;
  filter:drop-shadow(0 1px 1px rgba(0,0,0,.32));
}
.qa-row-icon .bi{
  position:relative;z-index:1;font-size:16px;line-height:1;
  text-shadow:0 1px 1px rgba(0,0,0,.32);
}
.qa-row-icon.has-img{
  background-image:linear-gradient(180deg,#FFFFFF 0%,#F2F3F8 50%,#E4E6EF 100%);
}
.qa-row-icon .qa-img{position:relative;z-index:1;width:20px;height:20px;}

.qa-row-text{display:flex;flex-direction:column;min-width:0;flex:1 1 auto;}
.qa-row-name{
  font-weight:600;font-size:var(--fs-base);line-height:1.2;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.qa-row-group{font-size:10px;color:var(--clr-muted);line-height:1.2;}

.qa-desc-in{flex:1 1 140px;min-width:100px;}
.qa-icon-in{flex:0 0 110px;}
.qa-on{flex:0 0 auto;white-space:nowrap;}

.qa-remove{
  flex:0 0 auto;width:24px;height:24px;line-height:1;
  border:0;background:transparent;border-radius:var(--radius-sm);
  color:var(--clr-muted);font-size:16px;cursor:pointer;
}
.qa-remove:hover{background:#FDECEC;color:var(--clr-danger);}

.qa-avail-row{
  display:flex;align-items:center;gap:var(--sp-2);width:100%;
  padding:var(--sp-2);margin-bottom:var(--sp-1);
  background:transparent;border:1px solid transparent;
  border-radius:var(--radius-sm);text-align:start;cursor:pointer;
}
.qa-avail-row:hover{background:var(--clr-primary-soft);border-color:var(--clr-border);}
.qa-avail-row[hidden]{display:none;}
.qa-add{
  flex:0 0 auto;width:22px;height:22px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  background:var(--clr-surface-alt);color:var(--clr-primary);
  font-weight:700;font-size:14px;line-height:1;
}

@media (max-width:1024px){
  .qa-cfg{grid-template-columns:1fr;}
  .qa-drop,.qa-avail{height:300px;}
  .qa-desc-in,.qa-icon-in{display:none;}
}

/* --- Fiscal year ---------------------------------------------------------- */
.status-bar{display:flex;align-items:center;gap:var(--sp-2);flex-wrap:wrap;min-height:var(--ctl-h);}

/* The year today falls in. Worth marking: it is the one people mean when
   they say "this year", and it is not always the default. */
tr.fy-current td{background:#F2FBF6;}
tr.fy-current:hover td{background:#E7F8EF;}
tr.fy-current td:first-child{border-inline-start:3px solid var(--clr-success);}

/* --- Two-line grid cell: primary name above, Arabic below --------------- */
.cell-code{font-weight:700;}
.cell-primary{display:block;line-height:1.3;}
.cell-arabic{
  display:block;line-height:1.55;
  font-size:13px;color:var(--clr-muted);
  direction:rtl;text-align:start;
  font-family:var(--font-ar);
}
.cell-arabic:empty{display:none;}
/* French interface has no Arabic content on screen. */
.lang-fr .cell-arabic{display:none;}

/* --- ZATCA status badge -------------------------------------------------- */
.zatca-status{
  display:inline-flex;align-items:center;gap:var(--sp-2);
  height:var(--ctl-h);padding:0 var(--sp-3);
  border:1px solid var(--clr-border);border-radius:999px;
  font-size:var(--fs-sm);font-weight:600;white-space:nowrap;
}
.zatca-status .zdot{
  width:8px;height:8px;border-radius:50%;flex:0 0 auto;
  background:var(--clr-muted);
}
.zatca-status.green{background:#E7F8EF;border-color:#A9E6C6;color:#0A6B39;}
.zatca-status.green .zdot{background:var(--clr-success);}
.zatca-status.amber{background:#FFF6E5;border-color:#FFE0A3;color:#7A5200;}
.zatca-status.amber .zdot{background:var(--clr-warning);}
.zatca-status.red{background:#FDECEC;border-color:#F5C2C2;color:#8E1F1F;}
.zatca-status.red .zdot{background:var(--clr-danger);}

@media (max-width:900px){
  .zatca-status .ztext{display:none;}
  .zatca-status{padding:0 var(--sp-2);}
}

/* --- Live search (Blueprint 5.8) ---------------------------------------- */
.search-box{position:relative;display:inline-flex;align-items:center;}
.search-box .ctl-sm{padding-inline-end:26px;}

/* Spinner sits inside the box so the layout never shifts mid-typing. */
.search-spin{
  position:absolute;inset-inline-end:8px;top:50%;margin-top:-6px;
  width:12px;height:12px;border-radius:50%;
  border:2px solid var(--clr-border);border-top-color:var(--clr-primary);
  animation:spin .7s linear infinite;
  pointer-events:none;
}

/* The debounce timer clicks this. Kept in the DOM and focusable-free rather
   than display:none, so ASP.NET still posts back reliably. */
.hidden-trigger{
  position:absolute !important;
  width:1px;height:1px;padding:0;margin:-1px;border:0;
  overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;
}

/* --- Grid footer --------------------------------------------------------- */
.grid-foot{
  display:flex;align-items:center;justify-content:space-between;gap:var(--sp-3);
  padding:var(--sp-2) var(--sp-4);
  border-top:1px solid var(--clr-border);
  font-size:var(--fs-sm);color:var(--clr-muted);
}
.grid-pager{display:flex;align-items:center;gap:var(--sp-2);}
.grid-pager .btn-erp{height:26px;padding:0 var(--sp-2);}

/* --- Button bar ---------------------------------------------------------
   Fixed order on every screen:
     [New][Delete]   « ‹ › »   [Excel][Print][Save][Close]
   Sticky to the bottom so it is reachable without scrolling a long form.  */
.form-actions{
  position:sticky;bottom:0;z-index:10;
  display:flex;align-items:center;gap:var(--sp-3);
  padding:var(--sp-3) var(--sp-4);
  background:var(--clr-surface);
  border-top:1px solid var(--clr-border);
  box-shadow:0 -2px 6px rgba(16,24,40,.04);
}
.act-left{display:flex;gap:var(--sp-2);}
.act-center{display:flex;gap:var(--sp-1);margin-inline:auto;}
.act-right{display:flex;gap:var(--sp-2);}
.act-center .btn-erp{min-width:34px;padding:0 var(--sp-2);font-size:15px;}

/*  Framed: the bar is the last child of .form-card and a flex item at the
    foot of the frame, so it is always on screen without sticky or fixed
    positioning. Its height is fixed -- the BUTTONS shrink or scroll, the
    bar never grows -- so the body above it always knows its own height.
    On a narrow screen the row scrolls sideways under the finger instead of
    wrapping onto a second and third line.

    Only the bar that is a direct child of .form-card is treated this way.
    A .form-actions inside a modal body keeps the sticky behaviour, because
    there the modal body is the scroll container and sticky is correct.   */
body.in-tab .form-card > .form-actions{
  position:static;flex:0 0 auto;height:var(--cmdbar-h);
  flex-wrap:nowrap;padding-top:0;padding-bottom:0;
  overflow-x:auto;overflow-y:hidden;scrollbar-width:none;
}
body.in-tab .form-card > .form-actions::-webkit-scrollbar{display:none;}
body.in-tab .form-card > .form-actions .act-left,
body.in-tab .form-card > .form-actions .act-center,
body.in-tab .form-card > .form-actions .act-right{flex:0 0 auto;flex-wrap:nowrap;}
body.in-tab .form-card > .form-actions .btn-erp{flex:0 0 auto;}

/*  Entry / List tabs in the head, caption after them. One row of chrome
    instead of two: the head no longer spends its height on a title alone,
    and the strip no longer spends fourteen pixels of margin below itself.
    The record nav stays at the far end whether the strip is present or not. */
.form-head > .tab-strip{margin-bottom:0;flex:0 0 auto;}
.form-head > .tab-strip + h1{margin-inline-start:var(--sp-4);}
.form-head > .doc-nav{margin-inline-start:auto;}
/*  A read-only fact in the head (branch, period, status): a small label and
    a chip, pushed to the end just before the record nav.                    */
.form-head > .head-field{
  display:flex;align-items:center;gap:6px;margin-inline-start:auto;
  font-size:12.5px;color:var(--clr-muted);white-space:nowrap;
}
.form-head > .head-field ~ .doc-nav{margin-inline-start:0;}
/*  A status line in the head (linked / received / locked): takes no room
    while it is empty.                                                       */
.form-head > .head-status{display:flex;align-items:center;font-size:12.5px;}
.form-head > .head-status:empty{display:none;}
.form-head > .form-badge:empty{display:none;}
.head-field .head-chip{
  width:22ch;max-width:260px;field-sizing:content;height:auto;
  border:1px solid var(--clr-border);background:var(--clr-surface-alt);
  border-radius:999px;padding:3px 10px;
  font-family:inherit;font-size:12.5px;font-weight:600;line-height:1.3;color:var(--clr-text);
  cursor:default;
}
.head-field .head-chip:focus{outline:none;}

@media (max-width:900px){
  .row{gap:0;}
  .row > [class^="col-"]{grid-column:span 12;}
  .field-check{padding-top:0;padding-bottom:var(--sp-3);}
}

@media (max-width:600px){
  .form-actions{flex-wrap:wrap;gap:var(--sp-2);}
  .act-center{margin-inline:0;order:3;width:100%;justify-content:center;}
  .section-tools{width:100%;}
  .ctl-sm{flex:1 1 auto;min-width:0;}
}

/* --- Print: strip the chrome, keep the data --------------------------- */
@media print{
  .form-actions,.section-tools,.grid-foot,.form-badge{display:none !important;}
  /*  Position must be reset too, or a framed card prints as one clipped
      screen instead of flowing across pages.                             */
  body.in-tab{overflow:visible !important;}
  .form-card,body.in-tab .form-card{
    position:static !important;display:block !important;
    height:auto !important;min-height:auto;
  }
  .form-body{overflow:visible !important;height:auto !important;padding:0;}
  .section-card{border:0;margin-bottom:var(--sp-4);break-inside:avoid;}
  .grid-wrap{max-height:none;overflow:visible;border:0;}
}

/* ==========================================================================
   MODAL
   Server-rendered: the Panel is simply Visible=False when closed, so there is
   no client state to fall out of step with the server.
   ========================================================================== */
/* A modal hidden with Visible=false is not in the DOM at all, so script
   cannot open it. Render it and hide it here instead. */
.modal-backdrop.is-hidden{display:none !important;}

.modal-backdrop{
  position:fixed;inset:0;z-index:100;
  background:rgba(16,24,40,.45);
  display:flex;align-items:flex-start;justify-content:center;
  padding:var(--sp-5) var(--sp-4);
  overflow-y:auto;
}
.modal-box{
  width:100%;max-width:720px;
  background:var(--clr-surface);
  border-radius:var(--radius);
  box-shadow:var(--shadow-lg);
  display:flex;flex-direction:column;
  max-height:calc(100vh - var(--sp-6));
}
.modal-box.modal-lg{max-width:980px;}

.modal-head{
  flex:0 0 auto;
  display:flex;align-items:center;justify-content:space-between;gap:var(--sp-3);
  padding:var(--sp-3) var(--sp-4);
  border-bottom:1px solid var(--clr-border);
}
.modal-head h2{font-size:var(--fs-lg);font-weight:700;}
.modal-x{
  width:30px;height:30px;line-height:1;
  border:0;background:transparent;border-radius:var(--radius-sm);
  font-size:20px;color:var(--clr-muted);
}
.modal-x:hover{background:var(--clr-surface-alt);color:var(--clr-danger);}

.modal-body{flex:1 1 auto;overflow-y:auto;padding:var(--sp-4);}
.modal-foot{
  flex:0 0 auto;
  display:flex;justify-content:flex-end;gap:var(--sp-2);
  padding:var(--sp-3) var(--sp-4);
  border-top:1px solid var(--clr-border);
  background:var(--clr-surface-alt);
  border-radius:0 0 var(--radius) var(--radius);
}

.modal-note{
  padding:var(--sp-2) var(--sp-3);margin-bottom:var(--sp-4);
  background:#E9F5FB;border:1px solid #B7DEEF;border-radius:var(--radius-sm);
  font-size:var(--fs-sm);color:#14607F;
}

/* Sub-heading inside a modal: lighter than a full section-card header. */
.section-head.sub{
  background:transparent;border:0;border-bottom:1px solid var(--clr-border);
  padding:var(--sp-2) 0;margin:var(--sp-4) 0 var(--sp-3);
  border-radius:0;
  font-size:var(--fs-sm);text-transform:uppercase;letter-spacing:.04em;
  color:var(--clr-muted);
}
.section-head.sub:first-child{margin-top:0;}

.field-hint{
  display:block;margin-top:2px;
  font-size:11px;color:var(--clr-muted);line-height:1.4;
}

.status-strip{
  min-height:var(--ctl-h);display:flex;align-items:center;
  padding:0 var(--sp-3);
  background:var(--clr-surface-alt);
  border:1px dashed var(--clr-border-strong);border-radius:var(--radius-sm);
  font-size:var(--fs-sm);color:var(--clr-muted);
}

@media (max-width:900px){
  .modal-box,.modal-box.modal-lg{max-width:100%;}
}

/* ==========================================================================
   OVERLAYS
   ========================================================================== */
.overlay{
  position:fixed;inset:0;z-index:80;
  background:rgba(255,255,255,.72);
  display:flex;align-items:center;justify-content:center;
}
.overlay[hidden]{display:none;}
.spinner{
  width:28px;height:28px;border-radius:50%;
  border:3px solid var(--clr-border);border-top-color:var(--clr-primary);
  animation:spin .7s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg);}}

.toast-host{
  position:fixed;inset-block-end:var(--sp-4);inset-inline-end:var(--sp-4);
  z-index:90;display:flex;flex-direction:column;gap:var(--sp-2);
}
.toast{
  min-width:260px;max-width:380px;
  padding:var(--sp-3);border-radius:var(--radius);
  background:#fff;border:1px solid var(--clr-border);
  box-shadow:var(--shadow-lg);font-size:var(--fs-sm);
}
.toast.success{border-inline-start:3px solid var(--clr-success);}
.toast.error{border-inline-start:3px solid var(--clr-danger);}
.toast.info{border-inline-start:3px solid var(--clr-info);}

/* --- Sidebar backdrop for mobile drawer ---------------------------------- */
.sidebar-backdrop{
  position:fixed;inset:0;z-index:44;background:rgba(16,24,40,.35);
}
.sidebar-backdrop[hidden]{display:none;}

/* ==========================================================================
   RESPONSIVE (Blueprint 5.7)
   ========================================================================== */
@media (max-width:1279px){
  /* Slogan goes first - it is decoration once you are signed in. */
  .brand-slogan{display:none;}
  .co-name{max-width:14ch;}
}

@media (max-width:1023px){
  .app-sidebar{width:var(--sidebar-w-collapsed);}
  .app .nav-text,.app .nav-caret{display:none;}
  .app.is-collapsed .app-sidebar{width:var(--sidebar-w);}
  .app.is-collapsed .nav-text,.app.is-collapsed .nav-caret{display:block;}
  .app.is-collapsed .nav-sub{display:block;}
  .scope-chips .chip.opt{display:none;}
}

@media (max-width:767px){
  .app-sidebar{
    position:fixed;inset-block:var(--header-h) 0;inset-inline-start:0;
    z-index:45;width:var(--sidebar-w);
    transform:translateX(-100%);
    box-shadow:var(--shadow-lg);
  }
  html[dir="rtl"] .app-sidebar{transform:translateX(100%);}
  .app.is-drawer-open .app-sidebar{transform:translateX(0);}
  .app .nav-text,.app .nav-caret{display:block;}
  .app .nav-sub{display:block;}
  .scope-chips{display:none;}
  .user-btn .who{display:none;}
  /* Keep the company MARK - it is the identity - but drop the words. */
  .co-text{display:none;}
  .app-company{padding-inline-start:var(--sp-2);}
  .brand-text{display:none;}
  .brand-rule{display:none;}
  .login-card{padding:var(--sp-4);box-shadow:none;border:0;}
  .login-row{grid-template-columns:1fr;}
  .kpi-row,.kpi-row.k-3{grid-template-columns:repeat(2,minmax(0,1fr));}
}

@media (max-width:479px){
  .kpi-row,.kpi-row.k-3{grid-template-columns:minmax(0,1fr);}
}

/* ==========================================================================
   ICONS
   CSS masks: one stylesheet carries the set, and the glyph takes its colour
   from the element, so hover and active states need no second asset.

   .ico is the machinery, .icon-x only the shape - an element needs BOTH.

   NOTE the %23 in every data URI. A raw '#' inside url() starts a URL
   fragment and truncates the SVG mid-attribute, which produces an invalid
   mask and an invisible icon with no error anywhere.
   ========================================================================== */
.ico,.nav-icon{
  width:18px;height:18px;flex:0 0 auto;
  display:inline-block;
  background:currentColor;
  -webkit-mask:no-repeat center/contain;mask:no-repeat center/contain;
}
.nav-icon{opacity:.75;}

.icon-grid{-webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='3'%20y='3'%20width='7'%20height='7'/%3E%3Crect%20x='14'%20y='3'%20width='7'%20height='7'/%3E%3Crect%20x='14'%20y='14'%20width='7'%20height='7'/%3E%3Crect%20x='3'%20y='14'%20width='7'%20height='7'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='3'%20y='3'%20width='7'%20height='7'/%3E%3Crect%20x='14'%20y='3'%20width='7'%20height='7'/%3E%3Crect%20x='14'%20y='14'%20width='7'%20height='7'/%3E%3Crect%20x='3'%20y='14'%20width='7'%20height='7'/%3E%3C/svg%3E");}
.icon-settings{-webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='12'%20cy='12'%20r='3'/%3E%3Cpath%20d='M19.4%2015a1.65%201.65%200%200%200%20.33%201.82l.06.06a2%202%200%201%201-2.83%202.83l-.06-.06a1.65%201.65%200%200%200-1.82-.33%201.65%201.65%200%200%200-1%201.51V21a2%202%200%201%201-4%200v-.09A1.65%201.65%200%200%200%209%2019.4a1.65%201.65%200%200%200-1.82.33l-.06.06a2%202%200%201%201-2.83-2.83l.06-.06a1.65%201.65%200%200%200%20.33-1.82%201.65%201.65%200%200%200-1.51-1H3a2%202%200%201%201%200-4h.09A1.65%201.65%200%200%200%204.6%209a1.65%201.65%200%200%200-.33-1.82l-.06-.06a2%202%200%201%201%202.83-2.83l.06.06A1.65%201.65%200%200%200%209%204.6h.09A1.65%201.65%200%200%200%2010%203.09V3a2%202%200%201%201%204%200v.09a1.65%201.65%200%200%200%201%201.51%201.65%201.65%200%200%200%201.82-.33l.06-.06a2%202%200%201%201%202.83%202.83l-.06.06A1.65%201.65%200%200%200%2019.4%209v.09a1.65%201.65%200%200%200%201.51%201H21a2%202%200%201%201%200%204h-.09a1.65%201.65%200%200%200-1.51%201z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='12'%20cy='12'%20r='3'/%3E%3Cpath%20d='M19.4%2015a1.65%201.65%200%200%200%20.33%201.82l.06.06a2%202%200%201%201-2.83%202.83l-.06-.06a1.65%201.65%200%200%200-1.82-.33%201.65%201.65%200%200%200-1%201.51V21a2%202%200%201%201-4%200v-.09A1.65%201.65%200%200%200%209%2019.4a1.65%201.65%200%200%200-1.82.33l-.06.06a2%202%200%201%201-2.83-2.83l.06-.06a1.65%201.65%200%200%200%20.33-1.82%201.65%201.65%200%200%200-1.51-1H3a2%202%200%201%201%200-4h.09A1.65%201.65%200%200%200%204.6%209a1.65%201.65%200%200%200-.33-1.82l-.06-.06a2%202%200%201%201%202.83-2.83l.06.06A1.65%201.65%200%200%200%209%204.6h.09A1.65%201.65%200%200%200%2010%203.09V3a2%202%200%201%201%204%200v.09a1.65%201.65%200%200%200%201%201.51%201.65%201.65%200%200%200%201.82-.33l.06-.06a2%202%200%201%201%202.83%202.83l-.06.06A1.65%201.65%200%200%200%2019.4%209v.09a1.65%201.65%200%200%200%201.51%201H21a2%202%200%201%201%200%204h-.09a1.65%201.65%200%200%200-1.51%201z'/%3E%3C/svg%3E");}
.icon-activity{-webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpolyline%20points='22%2012%2018%2012%2015%2021%209%203%206%2012%202%2012'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpolyline%20points='22%2012%2018%2012%2015%2021%209%203%206%2012%202%2012'/%3E%3C/svg%3E");}
.icon-briefcase{-webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='2'%20y='7'%20width='20'%20height='14'%20rx='2'/%3E%3Cpath%20d='M16%2021V5a2%202%200%200%200-2-2h-4a2%202%200%200%200-2%202v16'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='2'%20y='7'%20width='20'%20height='14'%20rx='2'/%3E%3Cpath%20d='M16%2021V5a2%202%200%200%200-2-2h-4a2%202%200%200%200-2%202v16'/%3E%3C/svg%3E");}
.icon-map-pin{-webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M21%2010c0%207-9%2013-9%2013s-9-6-9-13a9%209%200%200%201%2018%200z'/%3E%3Ccircle%20cx='12'%20cy='10'%20r='3'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M21%2010c0%207-9%2013-9%2013s-9-6-9-13a9%209%200%200%201%2018%200z'/%3E%3Ccircle%20cx='12'%20cy='10'%20r='3'/%3E%3C/svg%3E");}
.icon-calendar{-webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='3'%20y='4'%20width='18'%20height='18'%20rx='2'/%3E%3Cline%20x1='16'%20y1='2'%20x2='16'%20y2='6'/%3E%3Cline%20x1='8'%20y1='2'%20x2='8'%20y2='6'/%3E%3Cline%20x1='3'%20y1='10'%20x2='21'%20y2='10'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='3'%20y='4'%20width='18'%20height='18'%20rx='2'/%3E%3Cline%20x1='16'%20y1='2'%20x2='16'%20y2='6'/%3E%3Cline%20x1='8'%20y1='2'%20x2='8'%20y2='6'/%3E%3Cline%20x1='3'%20y1='10'%20x2='21'%20y2='10'/%3E%3C/svg%3E");}
.icon-user{-webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M20%2021v-2a4%204%200%200%200-4-4H8a4%204%200%200%200-4%204v2'/%3E%3Ccircle%20cx='12'%20cy='7'%20r='4'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M20%2021v-2a4%204%200%200%200-4-4H8a4%204%200%200%200-4%204v2'/%3E%3Ccircle%20cx='12'%20cy='7'%20r='4'/%3E%3C/svg%3E");}
.icon-users{-webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M17%2021v-2a4%204%200%200%200-4-4H5a4%204%200%200%200-4%204v2'/%3E%3Ccircle%20cx='9'%20cy='7'%20r='4'/%3E%3Cpath%20d='M23%2021v-2a4%204%200%200%200-3-3.87'/%3E%3Cpath%20d='M16%203.13a4%204%200%200%201%200%207.75'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M17%2021v-2a4%204%200%200%200-4-4H5a4%204%200%200%200-4%204v2'/%3E%3Ccircle%20cx='9'%20cy='7'%20r='4'/%3E%3Cpath%20d='M23%2021v-2a4%204%200%200%200-3-3.87'/%3E%3Cpath%20d='M16%203.13a4%204%200%200%201%200%207.75'/%3E%3C/svg%3E");}
.icon-shield{-webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%2022s8-4%208-10V5l-8-3-8%203v7c0%206%208%2010%208%2010z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%2022s8-4%208-10V5l-8-3-8%203v7c0%206%208%2010%208%2010z'/%3E%3C/svg%3E");}
.icon-lock{-webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='3'%20y='11'%20width='18'%20height='11'%20rx='2'/%3E%3Cpath%20d='M7%2011V7a5%205%200%200%201%2010%200v4'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='3'%20y='11'%20width='18'%20height='11'%20rx='2'/%3E%3Cpath%20d='M7%2011V7a5%205%200%200%201%2010%200v4'/%3E%3C/svg%3E");}
.icon-list{-webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cline%20x1='8'%20y1='6'%20x2='21'%20y2='6'/%3E%3Cline%20x1='8'%20y1='12'%20x2='21'%20y2='12'/%3E%3Cline%20x1='8'%20y1='18'%20x2='21'%20y2='18'/%3E%3Cline%20x1='3'%20y1='6'%20x2='3.01'%20y2='6'/%3E%3Cline%20x1='3'%20y1='12'%20x2='3.01'%20y2='12'/%3E%3Cline%20x1='3'%20y1='18'%20x2='3.01'%20y2='18'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cline%20x1='8'%20y1='6'%20x2='21'%20y2='6'/%3E%3Cline%20x1='8'%20y1='12'%20x2='21'%20y2='12'/%3E%3Cline%20x1='8'%20y1='18'%20x2='21'%20y2='18'/%3E%3Cline%20x1='3'%20y1='6'%20x2='3.01'%20y2='6'/%3E%3Cline%20x1='3'%20y1='12'%20x2='3.01'%20y2='12'/%3E%3Cline%20x1='3'%20y1='18'%20x2='3.01'%20y2='18'/%3E%3C/svg%3E");}
.icon-search{-webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='11'%20cy='11'%20r='8'/%3E%3Cline%20x1='21'%20y1='21'%20x2='16.65'%20y2='16.65'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='11'%20cy='11'%20r='8'/%3E%3Cline%20x1='21'%20y1='21'%20x2='16.65'%20y2='16.65'/%3E%3C/svg%3E");}
.icon-clock{-webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='12'%20cy='12'%20r='10'/%3E%3Cpolyline%20points='12%206%2012%2012%2016%2014'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='12'%20cy='12'%20r='10'/%3E%3Cpolyline%20points='12%206%2012%2012%2016%2014'/%3E%3C/svg%3E");}
.icon-log-in{-webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M15%203h4a2%202%200%200%201%202%202v14a2%202%200%200%201-2%202h-4'/%3E%3Cpolyline%20points='10%2017%2015%2012%2010%207'/%3E%3Cline%20x1='15'%20y1='12'%20x2='3'%20y2='12'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M15%203h4a2%202%200%200%201%202%202v14a2%202%200%200%201-2%202h-4'/%3E%3Cpolyline%20points='10%2017%2015%2012%2010%207'/%3E%3Cline%20x1='15'%20y1='12'%20x2='3'%20y2='12'/%3E%3C/svg%3E");}
.icon-alert{-webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M10.29%203.86%201.82%2018a2%202%200%200%200%201.71%203h16.94a2%202%200%200%200%201.71-3L13.71%203.86a2%202%200%200%200-3.42%200z'/%3E%3Cline%20x1='12'%20y1='9'%20x2='12'%20y2='13'/%3E%3Cline%20x1='12'%20y1='17'%20x2='12.01'%20y2='17'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M10.29%203.86%201.82%2018a2%202%200%200%200%201.71%203h16.94a2%202%200%200%200%201.71-3L13.71%203.86a2%202%200%200%200-3.42%200z'/%3E%3Cline%20x1='12'%20y1='9'%20x2='12'%20y2='13'/%3E%3Cline%20x1='12'%20y1='17'%20x2='12.01'%20y2='17'/%3E%3C/svg%3E");}
.icon-file-text{-webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M14%202H6a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h12a2%202%200%200%200%202-2V8z'/%3E%3Cpolyline%20points='14%202%2014%208%2020%208'/%3E%3Cline%20x1='16'%20y1='13'%20x2='8'%20y2='13'/%3E%3Cline%20x1='16'%20y1='17'%20x2='8'%20y2='17'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M14%202H6a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h12a2%202%200%200%200%202-2V8z'/%3E%3Cpolyline%20points='14%202%2014%208%2020%208'/%3E%3Cline%20x1='16'%20y1='13'%20x2='8'%20y2='13'/%3E%3Cline%20x1='16'%20y1='17'%20x2='8'%20y2='17'/%3E%3C/svg%3E");}
.icon-box{-webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M21%2016V8a2%202%200%200%200-1-1.73l-7-4a2%202%200%200%200-2%200l-7%204A2%202%200%200%200%203%208v8a2%202%200%200%200%201%201.73l7%204a2%202%200%200%200%202%200l7-4A2%202%200%200%200%2021%2016z'/%3E%3Cpolyline%20points='3.27%206.96%2012%2012.01%2020.73%206.96'/%3E%3Cline%20x1='12'%20y1='22.08'%20x2='12'%20y2='12'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M21%2016V8a2%202%200%200%200-1-1.73l-7-4a2%202%200%200%200-2%200l-7%204A2%202%200%200%200%203%208v8a2%202%200%200%200%201%201.73l7%204a2%202%200%200%200%202%200l7-4A2%202%200%200%200%2021%2016z'/%3E%3Cpolyline%20points='3.27%206.96%2012%2012.01%2020.73%206.96'/%3E%3Cline%20x1='12'%20y1='22.08'%20x2='12'%20y2='12'/%3E%3C/svg%3E");}
.icon-cart{-webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='9'%20cy='21'%20r='1'/%3E%3Ccircle%20cx='20'%20cy='21'%20r='1'/%3E%3Cpath%20d='M1%201h4l2.68%2013.39a2%202%200%200%200%202%201.61h9.72a2%202%200%200%200%202-1.61L23%206H6'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='9'%20cy='21'%20r='1'/%3E%3Ccircle%20cx='20'%20cy='21'%20r='1'/%3E%3Cpath%20d='M1%201h4l2.68%2013.39a2%202%200%200%200%202%201.61h9.72a2%202%200%200%200%202-1.61L23%206H6'/%3E%3C/svg%3E");}
.icon-trending{-webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpolyline%20points='23%206%2013.5%2015.5%208.5%2010.5%201%2018'/%3E%3Cpolyline%20points='17%206%2023%206%2023%2012'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpolyline%20points='23%206%2013.5%2015.5%208.5%2010.5%201%2018'/%3E%3Cpolyline%20points='17%206%2023%206%2023%2012'/%3E%3C/svg%3E");}
.icon-pie{-webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M21.21%2015.89A10%2010%200%201%201%208%202.83'/%3E%3Cpath%20d='M22%2012A10%2010%200%200%200%2012%202v10z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M21.21%2015.89A10%2010%200%201%201%208%202.83'/%3E%3Cpath%20d='M22%2012A10%2010%200%200%200%2012%202v10z'/%3E%3C/svg%3E");}
.icon-truck{-webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='1'%20y='3'%20width='15'%20height='13'/%3E%3Cpolygon%20points='16%208%2020%208%2023%2011%2023%2016%2016%2016%2016%208'/%3E%3Ccircle%20cx='5.5'%20cy='18.5'%20r='2.5'/%3E%3Ccircle%20cx='18.5'%20cy='18.5'%20r='2.5'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='1'%20y='3'%20width='15'%20height='13'/%3E%3Cpolygon%20points='16%208%2020%208%2023%2011%2023%2016%2016%2016%2016%208'/%3E%3Ccircle%20cx='5.5'%20cy='18.5'%20r='2.5'/%3E%3Ccircle%20cx='18.5'%20cy='18.5'%20r='2.5'/%3E%3C/svg%3E");}
.icon-home{-webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M3%209l9-7%209%207v11a2%202%200%200%201-2%202H5a2%202%200%200%201-2-2z'/%3E%3Cpolyline%20points='9%2022%209%2012%2015%2012%2015%2022'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M3%209l9-7%209%207v11a2%202%200%200%201-2%202H5a2%202%200%200%201-2-2z'/%3E%3Cpolyline%20points='9%2022%209%2012%2015%2012%2015%2022'/%3E%3C/svg%3E");}
.icon-dot{-webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='12'%20cy='12'%20r='3.2'%20fill='%23000'%20stroke='none'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='12'%20cy='12'%20r='3.2'%20fill='%23000'%20stroke='none'/%3E%3C/svg%3E");}

/* --- Print (Blueprint 5.2 exception) ------------------------------------- */
@media print{
  .app-header,.app-sidebar,.tab-bar,.app-footer,.breadcrumb{display:none !important;}
  .app-body,.app-main{display:block;}
}

/* ============================================================
   Master-form components (tabs, header identity, media,
   translate link, multi-unit editor, search highlight).
   Reusable across forms — do not duplicate in page markup.
   ============================================================ */

/* Tabbed sections inside a form-card */
.tabs{
  display:flex;gap:var(--sp-1);flex-wrap:wrap;
  border-bottom:2px solid var(--clr-border);margin-bottom:var(--sp-4);
}
.tab-btn{
  appearance:none;border:0;background:transparent;cursor:pointer;font:inherit;
  padding:var(--sp-2) var(--sp-4);font-weight:600;color:var(--clr-muted);
  border-bottom:3px solid transparent;border-radius:var(--radius) var(--radius) 0 0;margin-bottom:-2px;
}
.tab-btn:hover{color:var(--clr-primary);background:var(--clr-primary-soft);}
.tab-btn.active{color:#fff;background:var(--clr-primary);border-bottom-color:var(--clr-primary);}
.tab-panel{display:none;}
.tab-panel.active{display:block;max-height:60vh;overflow-y:auto;}

/* Record identity shown on the right of a form header */
.head-right{display:flex;align-items:center;gap:var(--sp-3);margin-inline-start:auto;min-width:0;}
.head-id{display:flex;flex-direction:column;align-items:flex-end;line-height:1.25;min-width:0;}
.head-code{font-weight:700;font-size:var(--fs-base);color:var(--clr-primary);}
.head-name{
  font-size:var(--fs-sm);color:var(--clr-muted);max-width:360px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}

/* Inline flag group (checkbox + label pairs on one row) */
.flags{display:flex;gap:var(--sp-4);align-items:center;flex-wrap:wrap;}

/* Media (image preview + catalogue) */
.media-row{display:flex;gap:var(--sp-5);flex-wrap:wrap;}
.media-box{display:flex;flex-direction:column;gap:var(--sp-2);max-width:320px;}
.img-preview{
  width:160px;height:160px;object-fit:contain;background:var(--clr-surface-alt);
  border:1px solid var(--clr-border-strong);border-radius:var(--radius);
}
.media-actions{display:flex;gap:var(--sp-2);align-items:center;flex-wrap:wrap;}

/* Field label row carrying an inline action link (e.g. Translate) */
.label-row{display:flex;align-items:center;justify-content:space-between;gap:var(--sp-2);}
.translate-link{font-size:var(--fs-sm);font-weight:600;color:var(--clr-primary);cursor:pointer;}
.translate-link:hover{text-decoration:underline;}
.translate-link.busy{opacity:.5;pointer-events:none;}

/* Multi-unit / pack editor */
.units-add{display:flex;gap:var(--sp-2);flex-wrap:wrap;align-items:center;margin:var(--sp-1) 0 var(--sp-3);}
.units-add .ctl-sm{min-width:0;max-width:150px;}
.units-grid{width:100%;}

/* Search-match highlight in grids */
mark.hl{background:#FFF3A0;color:inherit;padding:0 1px;border-radius:2px;}

/* iOS-style on/off switch (e.g. Print Design Mode toggle in the sidebar) */
.ios-switch{position:relative;display:inline-block;width:40px;height:22px;flex:0 0 auto;vertical-align:middle;}
.ios-switch input{position:absolute;opacity:0;width:0;height:0;}
.ios-switch .track{position:absolute;inset:0;background:#C7CCD8;border-radius:22px;transition:background .2s;cursor:pointer;}
.ios-switch .track::before{content:"";position:absolute;width:18px;height:18px;left:2px;top:2px;background:#fff;border-radius:50%;box-shadow:0 1px 2px rgba(0,0,0,.3);transition:transform .2s;}
.ios-switch input:checked + .track{background:var(--clr-primary,#2b3a67);}
.ios-switch input:checked + .track::before{transform:translateX(18px);}
.ios-switch.busy{opacity:.5;pointer-events:none;}
/* a menu row that carries a switch instead of navigating */
.menu-toggle-row{display:flex;align-items:center;justify-content:space-between;gap:var(--sp-2);width:100%;}
/* ============================================================
   APPEND these rules to the END of your current erp.css.
   Do NOT replace your erp.css — this only adds/overrides.
   (compact density + master-form components + iOS switch)
   ============================================================ */

/* --- compact density: override the control-height token + field gap --- */
:root{ --ctl-h:30px; }
.field{ margin-bottom:var(--sp-3); }


/* ============================================================
   Master-form components (tabs, header identity, media,
   translate link, multi-unit editor, search highlight).
   Reusable across forms — do not duplicate in page markup.
   ============================================================ */

/* Tabbed sections inside a form-card */
.tabs{
  display:flex;gap:var(--sp-1);flex-wrap:wrap;
  border-bottom:2px solid var(--clr-border);margin-bottom:var(--sp-4);
}
.tab-btn{
  appearance:none;border:0;background:transparent;cursor:pointer;font:inherit;
  padding:var(--sp-2) var(--sp-4);font-weight:600;color:var(--clr-muted);
  border-bottom:3px solid transparent;border-radius:var(--radius) var(--radius) 0 0;margin-bottom:-2px;
}
.tab-btn:hover{color:var(--clr-primary);background:var(--clr-primary-soft);}
.tab-btn.active{color:#fff;background:var(--clr-primary);border-bottom-color:var(--clr-primary);}
.tab-panel{display:none;}
.tab-panel.active{display:block;max-height:60vh;overflow-y:auto;}

/* Record identity shown on the right of a form header */
.head-right{display:flex;align-items:center;gap:var(--sp-3);margin-inline-start:auto;min-width:0;}
.head-id{display:flex;flex-direction:column;align-items:flex-end;line-height:1.25;min-width:0;}
.head-code{font-weight:700;font-size:var(--fs-base);color:var(--clr-primary);}
.head-name{
  font-size:var(--fs-sm);color:var(--clr-muted);max-width:360px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}

/* Inline flag group (checkbox + label pairs on one row) */
.flags{display:flex;gap:var(--sp-4);align-items:center;flex-wrap:wrap;}

/* Media (image preview + catalogue) */
.media-row{display:flex;gap:var(--sp-5);flex-wrap:wrap;}
.media-box{display:flex;flex-direction:column;gap:var(--sp-2);max-width:320px;}
.img-preview{
  width:160px;height:160px;object-fit:contain;background:var(--clr-surface-alt);
  border:1px solid var(--clr-border-strong);border-radius:var(--radius);
}
.media-actions{display:flex;gap:var(--sp-2);align-items:center;flex-wrap:wrap;}

/* Field label row carrying an inline action link (e.g. Translate) */
.label-row{display:flex;align-items:center;justify-content:space-between;gap:var(--sp-2);}
.translate-link{font-size:var(--fs-sm);font-weight:600;color:var(--clr-primary);cursor:pointer;}
.translate-link:hover{text-decoration:underline;}
.translate-link.busy{opacity:.5;pointer-events:none;}

/* Multi-unit / pack editor */
.units-add{display:flex;gap:var(--sp-2);flex-wrap:wrap;align-items:center;margin:var(--sp-1) 0 var(--sp-3);}
.units-add .ctl-sm{min-width:0;max-width:150px;}
.units-grid{width:100%;}

/* Search-match highlight in grids */
mark.hl{background:#FFF3A0;color:inherit;padding:0 1px;border-radius:2px;}

/* iOS-style on/off switch (e.g. Print Design Mode toggle in the sidebar) */
.ios-switch{position:relative;display:inline-block;width:40px;height:22px;flex:0 0 auto;vertical-align:middle;}
.ios-switch input{position:absolute;opacity:0;width:0;height:0;}
.ios-switch .track{position:absolute;inset:0;background:#C7CCD8;border-radius:22px;transition:background .2s;cursor:pointer;}
.ios-switch .track::before{content:"";position:absolute;width:18px;height:18px;left:2px;top:2px;background:#fff;border-radius:50%;box-shadow:0 1px 2px rgba(0,0,0,.3);transition:transform .2s;}
.ios-switch input:checked + .track{background:var(--clr-primary,#2b3a67);}
.ios-switch input:checked + .track::before{transform:translateX(18px);}
.ios-switch.busy{opacity:.5;pointer-events:none;}
/* a menu row that carries a switch instead of navigating */
.menu-toggle-row{display:flex;align-items:center;justify-content:space-between;gap:var(--sp-2);width:100%;}


/* ============================================================
   APPEND to the END of your current erp.css (do NOT replace the file).
   PART 1 restores the inventory / currency menu icons that a full-file
   overwrite had dropped. PART 2 is the compact density + form components
   + iOS switch. Duplicate rules are harmless (the later one wins).
   ============================================================ */

/* ===================== PART 1: MENU ICONS ===================== */
/* ==========================================================================
   INVENTORY + CURRENCY MENU ICONS
   Thin-line CSS masks in the same style as the built-in set. They ride on
   the existing .ico base class (background:currentColor + mask), so they
   pick up the sidebar colour exactly like every other menu icon.
   Append anywhere in erp.css - mask rules are position-independent.
   ========================================================================== */
.icon-currency {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cline%20x1='12'%20y1='1'%20x2='12'%20y2='23'/%3E%3Cpath%20d='M17%205H9.5a3.5%203.5%200%200%200%200%207h5a3.5%203.5%200%200%201%200%207H6'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cline%20x1='12'%20y1='1'%20x2='12'%20y2='23'/%3E%3Cpath%20d='M17%205H9.5a3.5%203.5%200%200%200%200%207h5a3.5%203.5%200%200%201%200%207H6'/%3E%3C/svg%3E");
}

.icon-inventory {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='2'%20y='3'%20width='20'%20height='5'%20rx='1'/%3E%3Cpath%20d='M4%208v11a1%201%200%200%200%201%201h14a1%201%200%200%200%201-1V8'/%3E%3Cline%20x1='10'%20y1='12'%20x2='14'%20y2='12'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='2'%20y='3'%20width='20'%20height='5'%20rx='1'/%3E%3Cpath%20d='M4%208v11a1%201%200%200%200%201%201h14a1%201%200%200%200%201-1V8'/%3E%3Cline%20x1='10'%20y1='12'%20x2='14'%20y2='12'/%3E%3C/svg%3E");
}

.icon-warehouse {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M22%208.35V20a2%202%200%200%201-2%202H4a2%202%200%200%201-2-2V8.35a2%202%200%200%201%201.26-1.86l8-3.2a2%202%200%200%201%201.48%200l8%203.2A2%202%200%200%201%2022%208.35Z'/%3E%3Cpath%20d='M6%2018h12'/%3E%3Cpath%20d='M6%2014h12'/%3E%3Cpath%20d='M6%2010h12'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M22%208.35V20a2%202%200%200%201-2%202H4a2%202%200%200%201-2-2V8.35a2%202%200%200%201%201.26-1.86l8-3.2a2%202%200%200%201%201.48%200l8%203.2A2%202%200%200%201%2022%208.35Z'/%3E%3Cpath%20d='M6%2018h12'/%3E%3Cpath%20d='M6%2014h12'/%3E%3Cpath%20d='M6%2010h12'/%3E%3C/svg%3E");
}

.icon-bin {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpolyline%20points='22%2012%2016%2012%2014%2015%2010%2015%208%2012%202%2012'/%3E%3Cpath%20d='M5.45%205.11%202%2012v6a2%202%200%200%200%202%202h16a2%202%200%200%200%202-2v-6l-3.45-6.89A2%202%200%200%200%2016.76%204H7.24a2%202%200%200%200-1.79%201.11z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpolyline%20points='22%2012%2016%2012%2014%2015%2010%2015%208%2012%202%2012'/%3E%3Cpath%20d='M5.45%205.11%202%2012v6a2%202%200%200%200%202%202h16a2%202%200%200%200%202-2v-6l-3.45-6.89A2%202%200%200%200%2016.76%204H7.24a2%202%200%200%200-1.79%201.11z'/%3E%3C/svg%3E");
}

.icon-manufacturer {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M2%2020a1%201%200%200%200%201%201h18a1%201%200%200%200%201-1V8l-6%204V8l-6%204V4a1%201%200%200%200-1-1H3a1%201%200%200%200-1%201Z'/%3E%3Cline%20x1='7'%20y1='18'%20x2='7'%20y2='14'/%3E%3Cline%20x1='12'%20y1='18'%20x2='12'%20y2='14'/%3E%3Cline%20x1='17'%20y1='18'%20x2='17'%20y2='14'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M2%2020a1%201%200%200%200%201%201h18a1%201%200%200%200%201-1V8l-6%204V8l-6%204V4a1%201%200%200%200-1-1H3a1%201%200%200%200-1%201Z'/%3E%3Cline%20x1='7'%20y1='18'%20x2='7'%20y2='14'/%3E%3Cline%20x1='12'%20y1='18'%20x2='12'%20y2='14'/%3E%3Cline%20x1='17'%20y1='18'%20x2='17'%20y2='14'/%3E%3C/svg%3E");
}

.icon-group {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpolygon%20points='12%202%202%207%2012%2012%2022%207%2012%202'/%3E%3Cpolyline%20points='2%2017%2012%2022%2022%2017'/%3E%3Cpolyline%20points='2%2012%2012%2017%2022%2012'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpolygon%20points='12%202%202%207%2012%2012%2022%207%2012%202'/%3E%3Cpolyline%20points='2%2017%2012%2022%2022%2017'/%3E%3Cpolyline%20points='2%2012%2012%2017%2022%2012'/%3E%3C/svg%3E");
}

.icon-category {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M20.59%2013.41l-7.17%207.17a2%202%200%200%201-2.83%200L2%2012V2h10l8.59%208.59a2%202%200%200%201%200%202.82z'/%3E%3Cline%20x1='7'%20y1='7'%20x2='7.01'%20y2='7'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M20.59%2013.41l-7.17%207.17a2%202%200%200%201-2.83%200L2%2012V2h10l8.59%208.59a2%202%200%200%201%200%202.82z'/%3E%3Cline%20x1='7'%20y1='7'%20x2='7.01'%20y2='7'/%3E%3C/svg%3E");
}

.icon-uom {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M21.3%208.7%208.7%2021.3a1%201%200%200%201-1.4%200l-4.6-4.6a1%201%200%200%201%200-1.4L15.3%202.7a1%201%200%200%201%201.4%200l4.6%204.6a1%201%200%200%201%200%201.4Z'/%3E%3Cpath%20d='m7.5%2010.5%202%202'/%3E%3Cpath%20d='M10.5%207.5l2%202'/%3E%3Cpath%20d='M13.5%204.5l2%202'/%3E%3Cpath%20d='M4.5%2013.5l2%202'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M21.3%208.7%208.7%2021.3a1%201%200%200%201-1.4%200l-4.6-4.6a1%201%200%200%201%200-1.4L15.3%202.7a1%201%200%200%201%201.4%200l4.6%204.6a1%201%200%200%201%200%201.4Z'/%3E%3Cpath%20d='m7.5%2010.5%202%202'/%3E%3Cpath%20d='M10.5%207.5l2%202'/%3E%3Cpath%20d='M13.5%204.5l2%202'/%3E%3Cpath%20d='M4.5%2013.5l2%202'/%3E%3C/svg%3E");
}

.icon-item {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M21%2016V8a2%202%200%200%200-1-1.73l-7-4a2%202%200%200%200-2%200l-7%204A2%202%200%200%200%203%208v8a2%202%200%200%200%201%201.73l7%204a2%202%200%200%200%202%200l7-4A2%202%200%200%200%2021%2016z'/%3E%3Cpolyline%20points='3.27%206.96%2012%2012.01%2020.73%206.96'/%3E%3Cline%20x1='12'%20y1='22.08'%20x2='12'%20y2='12'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M21%2016V8a2%202%200%200%200-1-1.73l-7-4a2%202%200%200%200-2%200l-7%204A2%202%200%200%200%203%208v8a2%202%200%200%200%201%201.73l7%204a2%202%200%200%200%202%200l7-4A2%202%200%200%200%2021%2016z'/%3E%3Cpolyline%20points='3.27%206.96%2012%2012.01%2020.73%206.96'/%3E%3Cline%20x1='12'%20y1='22.08'%20x2='12'%20y2='12'/%3E%3C/svg%3E");
}


/* ===================== PART 2: FORM STYLES + iOS SWITCH ===================== */
:root {
    --ctl-h: 30px;
}

.field {
    margin-bottom: var(--sp-3);
}

/* ============================================================
   Master-form components (tabs, header identity, media,
   translate link, multi-unit editor, search highlight).
   Reusable across forms — do not duplicate in page markup.
   ============================================================ */

/* Tabbed sections inside a form-card */
.tabs {
    display: flex;
    gap: var(--sp-1);
    flex-wrap: wrap;
    border-bottom: 2px solid var(--clr-border);
    margin-bottom: var(--sp-4);
}

.tab-btn {
    appearance: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    padding: var(--sp-2) var(--sp-4);
    font-weight: 600;
    color: var(--clr-muted);
    border-bottom: 3px solid transparent;
    border-radius: var(--radius) var(--radius) 0 0;
    margin-bottom: -2px;
}

    .tab-btn:hover {
        color: var(--clr-primary);
        background: var(--clr-primary-soft);
    }

    .tab-btn.active {
        color: #fff;
        background: var(--clr-primary);
        border-bottom-color: var(--clr-primary);
    }

.tab-panel {
    display: none;
}

    .tab-panel.active {
        display: block;
        max-height: 60vh;
        overflow-y: auto;
    }

/* Record identity shown on the right of a form header */
.head-right {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    margin-inline-start: auto;
    min-width: 0;
}

.head-id {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.25;
    min-width: 0;
}

.head-code {
    font-weight: 700;
    font-size: var(--fs-base);
    color: var(--clr-primary);
}

.head-name {
    font-size: var(--fs-sm);
    color: var(--clr-muted);
    max-width: 360px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Inline flag group (checkbox + label pairs on one row) */
.flags {
    display: flex;
    gap: var(--sp-4);
    align-items: center;
    flex-wrap: wrap;
}

/* Media (image preview + catalogue) */
.media-row {
    display: flex;
    gap: var(--sp-5);
    flex-wrap: wrap;
}

.media-box {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    max-width: 320px;
}

.img-preview {
    width: 160px;
    height: 160px;
    object-fit: contain;
    background: var(--clr-surface-alt);
    border: 1px solid var(--clr-border-strong);
    border-radius: var(--radius);
}

.media-actions {
    display: flex;
    gap: var(--sp-2);
    align-items: center;
    flex-wrap: wrap;
}

/* Field label row carrying an inline action link (e.g. Translate) */
.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-2);
}

.translate-link {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--clr-primary);
    cursor: pointer;
}

    .translate-link:hover {
        text-decoration: underline;
    }

    .translate-link.busy {
        opacity: .5;
        pointer-events: none;
    }

/* Multi-unit / pack editor */
.units-add {
    display: flex;
    gap: var(--sp-2);
    flex-wrap: wrap;
    align-items: center;
    margin: var(--sp-1) 0 var(--sp-3);
}

    .units-add .ctl-sm {
        min-width: 0;
        max-width: 150px;
    }

.units-grid {
    width: 100%;
}

/* Search-match highlight in grids */
mark.hl {
    background: #FFF3A0;
    color: inherit;
    padding: 0 1px;
    border-radius: 2px;
}

/* iOS-style on/off switch (e.g. Print Design Mode toggle in the sidebar) */
.ios-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex: 0 0 auto;
    vertical-align: middle;
}

    .ios-switch input {
        position: absolute;
        opacity: 0;
        width: 0;
        height: 0;
    }

    .ios-switch .track {
        position: absolute;
        inset: 0;
        background: #C7CCD8;
        border-radius: 22px;
        transition: background .2s;
        cursor: pointer;
    }

        .ios-switch .track::before {
            content: "";
            position: absolute;
            width: 18px;
            height: 18px;
            left: 2px;
            top: 2px;
            background: #fff;
            border-radius: 50%;
            box-shadow: 0 1px 2px rgba(0,0,0,.3);
            transition: transform .2s;
        }

    .ios-switch input:checked + .track {
        background: var(--clr-primary,#2b3a67);
    }

        .ios-switch input:checked + .track::before {
            transform: translateX(18px);
        }

    .ios-switch.busy {
        opacity: .5;
        pointer-events: none;
    }
/* a menu row that carries a switch instead of navigating */
.menu-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-2);
    width: 100%;
}


/* ============================================================
   APPEND to the END of your current erp.css (do NOT replace the file).
   PART 1 restores the inventory / currency menu icons that a full-file
   overwrite had dropped. PART 2 is the compact density + form components
   + iOS switch. Duplicate rules are harmless (the later one wins).
   ============================================================ */

/* ===================== PART 1: MENU ICONS ===================== */
/* ==========================================================================
   INVENTORY + CURRENCY MENU ICONS
   Thin-line CSS masks in the same style as the built-in set. They ride on
   the existing .ico base class (background:currentColor + mask), so they
   pick up the sidebar colour exactly like every other menu icon.
   Append anywhere in erp.css - mask rules are position-independent.
   ========================================================================== */
.icon-currency {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cline%20x1='12'%20y1='1'%20x2='12'%20y2='23'/%3E%3Cpath%20d='M17%205H9.5a3.5%203.5%200%200%200%200%207h5a3.5%203.5%200%200%201%200%207H6'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cline%20x1='12'%20y1='1'%20x2='12'%20y2='23'/%3E%3Cpath%20d='M17%205H9.5a3.5%203.5%200%200%200%200%207h5a3.5%203.5%200%200%201%200%207H6'/%3E%3C/svg%3E");
}

.icon-inventory {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='2'%20y='3'%20width='20'%20height='5'%20rx='1'/%3E%3Cpath%20d='M4%208v11a1%201%200%200%200%201%201h14a1%201%200%200%200%201-1V8'/%3E%3Cline%20x1='10'%20y1='12'%20x2='14'%20y2='12'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='2'%20y='3'%20width='20'%20height='5'%20rx='1'/%3E%3Cpath%20d='M4%208v11a1%201%200%200%200%201%201h14a1%201%200%200%200%201-1V8'/%3E%3Cline%20x1='10'%20y1='12'%20x2='14'%20y2='12'/%3E%3C/svg%3E");
}

.icon-warehouse {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M22%208.35V20a2%202%200%200%201-2%202H4a2%202%200%200%201-2-2V8.35a2%202%200%200%201%201.26-1.86l8-3.2a2%202%200%200%201%201.48%200l8%203.2A2%202%200%200%201%2022%208.35Z'/%3E%3Cpath%20d='M6%2018h12'/%3E%3Cpath%20d='M6%2014h12'/%3E%3Cpath%20d='M6%2010h12'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M22%208.35V20a2%202%200%200%201-2%202H4a2%202%200%200%201-2-2V8.35a2%202%200%200%201%201.26-1.86l8-3.2a2%202%200%200%201%201.48%200l8%203.2A2%202%200%200%201%2022%208.35Z'/%3E%3Cpath%20d='M6%2018h12'/%3E%3Cpath%20d='M6%2014h12'/%3E%3Cpath%20d='M6%2010h12'/%3E%3C/svg%3E");
}

.icon-bin {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpolyline%20points='22%2012%2016%2012%2014%2015%2010%2015%208%2012%202%2012'/%3E%3Cpath%20d='M5.45%205.11%202%2012v6a2%202%200%200%200%202%202h16a2%202%200%200%200%202-2v-6l-3.45-6.89A2%202%200%200%200%2016.76%204H7.24a2%202%200%200%200-1.79%201.11z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpolyline%20points='22%2012%2016%2012%2014%2015%2010%2015%208%2012%202%2012'/%3E%3Cpath%20d='M5.45%205.11%202%2012v6a2%202%200%200%200%202%202h16a2%202%200%200%200%202-2v-6l-3.45-6.89A2%202%200%200%200%2016.76%204H7.24a2%202%200%200%200-1.79%201.11z'/%3E%3C/svg%3E");
}

.icon-manufacturer {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M2%2020a1%201%200%200%200%201%201h18a1%201%200%200%200%201-1V8l-6%204V8l-6%204V4a1%201%200%200%200-1-1H3a1%201%200%200%200-1%201Z'/%3E%3Cline%20x1='7'%20y1='18'%20x2='7'%20y2='14'/%3E%3Cline%20x1='12'%20y1='18'%20x2='12'%20y2='14'/%3E%3Cline%20x1='17'%20y1='18'%20x2='17'%20y2='14'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M2%2020a1%201%200%200%200%201%201h18a1%201%200%200%200%201-1V8l-6%204V8l-6%204V4a1%201%200%200%200-1-1H3a1%201%200%200%200-1%201Z'/%3E%3Cline%20x1='7'%20y1='18'%20x2='7'%20y2='14'/%3E%3Cline%20x1='12'%20y1='18'%20x2='12'%20y2='14'/%3E%3Cline%20x1='17'%20y1='18'%20x2='17'%20y2='14'/%3E%3C/svg%3E");
}

.icon-group {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpolygon%20points='12%202%202%207%2012%2012%2022%207%2012%202'/%3E%3Cpolyline%20points='2%2017%2012%2022%2022%2017'/%3E%3Cpolyline%20points='2%2012%2012%2017%2022%2012'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpolygon%20points='12%202%202%207%2012%2012%2022%207%2012%202'/%3E%3Cpolyline%20points='2%2017%2012%2022%2022%2017'/%3E%3Cpolyline%20points='2%2012%2012%2017%2022%2012'/%3E%3C/svg%3E");
}

.icon-category {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M20.59%2013.41l-7.17%207.17a2%202%200%200%201-2.83%200L2%2012V2h10l8.59%208.59a2%202%200%200%201%200%202.82z'/%3E%3Cline%20x1='7'%20y1='7'%20x2='7.01'%20y2='7'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M20.59%2013.41l-7.17%207.17a2%202%200%200%201-2.83%200L2%2012V2h10l8.59%208.59a2%202%200%200%201%200%202.82z'/%3E%3Cline%20x1='7'%20y1='7'%20x2='7.01'%20y2='7'/%3E%3C/svg%3E");
}

.icon-uom {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M21.3%208.7%208.7%2021.3a1%201%200%200%201-1.4%200l-4.6-4.6a1%201%200%200%201%200-1.4L15.3%202.7a1%201%200%200%201%201.4%200l4.6%204.6a1%201%200%200%201%200%201.4Z'/%3E%3Cpath%20d='m7.5%2010.5%202%202'/%3E%3Cpath%20d='M10.5%207.5l2%202'/%3E%3Cpath%20d='M13.5%204.5l2%202'/%3E%3Cpath%20d='M4.5%2013.5l2%202'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M21.3%208.7%208.7%2021.3a1%201%200%200%201-1.4%200l-4.6-4.6a1%201%200%200%201%200-1.4L15.3%202.7a1%201%200%200%201%201.4%200l4.6%204.6a1%201%200%200%201%200%201.4Z'/%3E%3Cpath%20d='m7.5%2010.5%202%202'/%3E%3Cpath%20d='M10.5%207.5l2%202'/%3E%3Cpath%20d='M13.5%204.5l2%202'/%3E%3Cpath%20d='M4.5%2013.5l2%202'/%3E%3C/svg%3E");
}

.icon-item {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M21%2016V8a2%202%200%200%200-1-1.73l-7-4a2%202%200%200%200-2%200l-7%204A2%202%200%200%200%203%208v8a2%202%200%200%200%201%201.73l7%204a2%202%200%200%200%202%200l7-4A2%202%200%200%200%2021%2016z'/%3E%3Cpolyline%20points='3.27%206.96%2012%2012.01%2020.73%206.96'/%3E%3Cline%20x1='12'%20y1='22.08'%20x2='12'%20y2='12'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M21%2016V8a2%202%200%200%200-1-1.73l-7-4a2%202%200%200%200-2%200l-7%204A2%202%200%200%200%203%208v8a2%202%200%200%200%201%201.73l7%204a2%202%200%200%200%202%200l7-4A2%202%200%200%200%2021%2016z'/%3E%3Cpolyline%20points='3.27%206.96%2012%2012.01%2020.73%206.96'/%3E%3Cline%20x1='12'%20y1='22.08'%20x2='12'%20y2='12'/%3E%3C/svg%3E");
}


/* ===================== PART 2: FORM STYLES + iOS SWITCH ===================== */
:root {
    --ctl-h: 30px;
}

.field {
    margin-bottom: var(--sp-3);
}

/* ============================================================
   Master-form components (tabs, header identity, media,
   translate link, multi-unit editor, search highlight).
   Reusable across forms — do not duplicate in page markup.
   ============================================================ */

/* Tabbed sections inside a form-card */
.tabs {
    display: flex;
    gap: var(--sp-1);
    flex-wrap: wrap;
    border-bottom: 2px solid var(--clr-border);
    margin-bottom: var(--sp-4);
}

.tab-btn {
    appearance: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    padding: var(--sp-2) var(--sp-4);
    font-weight: 600;
    color: var(--clr-muted);
    border-bottom: 3px solid transparent;
    border-radius: var(--radius) var(--radius) 0 0;
    margin-bottom: -2px;
}

    .tab-btn:hover {
        color: var(--clr-primary);
        background: var(--clr-primary-soft);
    }

    .tab-btn.active {
        color: #fff;
        background: var(--clr-primary);
        border-bottom-color: var(--clr-primary);
    }

.tab-panel {
    display: none;
}

    .tab-panel.active {
        display: block;
        max-height: 60vh;
        overflow-y: auto;
    }

/* Record identity shown on the right of a form header */
.head-right {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    margin-inline-start: auto;
    min-width: 0;
}

.head-id {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.25;
    min-width: 0;
}

.head-code {
    font-weight: 700;
    font-size: var(--fs-base);
    color: var(--clr-primary);
}

.head-name {
    font-size: var(--fs-sm);
    color: var(--clr-muted);
    max-width: 360px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Inline flag group (checkbox + label pairs on one row) */
.flags {
    display: flex;
    gap: var(--sp-4);
    align-items: center;
    flex-wrap: wrap;
}

/* Media (image preview + catalogue) */
.media-row {
    display: flex;
    gap: var(--sp-5);
    flex-wrap: wrap;
}

.media-box {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    max-width: 320px;
}

.img-preview {
    width: 160px;
    height: 160px;
    object-fit: contain;
    background: var(--clr-surface-alt);
    border: 1px solid var(--clr-border-strong);
    border-radius: var(--radius);
}

.media-actions {
    display: flex;
    gap: var(--sp-2);
    align-items: center;
    flex-wrap: wrap;
}

/* Field label row carrying an inline action link (e.g. Translate) */
.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-2);
}

.translate-link {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--clr-primary);
    cursor: pointer;
}

    .translate-link:hover {
        text-decoration: underline;
    }

    .translate-link.busy {
        opacity: .5;
        pointer-events: none;
    }

/* Multi-unit / pack editor */
.units-add {
    display: flex;
    gap: var(--sp-2);
    flex-wrap: wrap;
    align-items: center;
    margin: var(--sp-1) 0 var(--sp-3);
}

    .units-add .ctl-sm {
        min-width: 0;
        max-width: 150px;
    }

.units-grid {
    width: 100%;
}

/* Search-match highlight in grids */
mark.hl {
    background: #FFF3A0;
    color: inherit;
    padding: 0 1px;
    border-radius: 2px;
}

/* iOS-style on/off switch (e.g. Print Design Mode toggle in the sidebar) */
.ios-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex: 0 0 auto;
    vertical-align: middle;
}

    .ios-switch input {
        position: absolute;
        opacity: 0;
        width: 0;
        height: 0;
    }

    .ios-switch .track {
        position: absolute;
        inset: 0;
        background: #C7CCD8;
        border-radius: 22px;
        transition: background .2s;
        cursor: pointer;
    }

        .ios-switch .track::before {
            content: "";
            position: absolute;
            width: 18px;
            height: 18px;
            left: 2px;
            top: 2px;
            background: #fff;
            border-radius: 50%;
            box-shadow: 0 1px 2px rgba(0,0,0,.3);
            transition: transform .2s;
        }

    .ios-switch input:checked + .track {
        background: var(--clr-primary,#2b3a67);
    }

        .ios-switch input:checked + .track::before {
            transform: translateX(18px);
        }

    .ios-switch.busy {
        opacity: .5;
        pointer-events: none;
    }
/* a menu row that carries a switch instead of navigating */
.menu-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-2);
    width: 100%;
}

/* ===================== PART 3: ITEM ALLOCATION DUAL-LIST ===================== */
.alloc-wrap {
    display: flex;
    gap: var(--sp-3);
    align-items: stretch;
    margin-top: var(--sp-3);
}

.alloc-col {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius);
    overflow: hidden;
}

.alloc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-2) var(--sp-3);
    background: var(--clr-surface-alt);
    border-bottom: 1px solid var(--clr-border);
    font-weight: 600;
}

.alloc-count {
    font-size: var(--fs-sm);
    color: var(--clr-muted);
    background: #fff;
    border: 1px solid var(--clr-border);
    border-radius: 999px;
    padding: 1px var(--sp-2);
}

.alloc-col > .ctl {
    margin: var(--sp-2);
    width: auto;
}

.alloc-list {
    flex: 1 1 auto;
    overflow-y: auto;
    height: 52vh;
}

.alloc-row {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    padding: 3px var(--sp-3);
    cursor: pointer;
    font-size: var(--fs-sm);
}

    .alloc-row:hover {
        background: var(--clr-primary-soft);
    }

.alloc-txt {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.alloc-more {
    padding: var(--sp-2) var(--sp-3);
    color: var(--clr-muted);
    font-size: var(--fs-sm);
    text-align: center;
}

.alloc-actions {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    justify-content: center;
    flex: 0 0 auto;
}

    .alloc-actions .btn-erp {
        min-width: 44px;
    }

@media (max-width:767px) {
    .alloc-wrap {
        flex-direction: column;
    }

    .alloc-actions {
        flex-direction: row;
        justify-content: center;
    }
}

/* Item allocation dual-list */
.alloc-wrap{display:flex;gap:var(--sp-3);align-items:stretch;margin-top:var(--sp-3);}
.alloc-col{flex:1 1 0;min-width:0;display:flex;flex-direction:column;border:1px solid var(--clr-border);border-radius:var(--radius);overflow:hidden;}
.alloc-head{display:flex;align-items:center;justify-content:space-between;padding:var(--sp-2) var(--sp-3);background:var(--clr-surface-alt);border-bottom:1px solid var(--clr-border);font-weight:600;}
.alloc-count{font-size:var(--fs-sm);color:var(--clr-muted);background:#fff;border:1px solid var(--clr-border);border-radius:999px;padding:1px var(--sp-2);}
.alloc-col > .ctl{margin:var(--sp-2);width:auto;}
.alloc-list{flex:1 1 auto;overflow-y:auto;height:52vh;}
.alloc-row{display:flex;align-items:center;gap:var(--sp-2);padding:4px var(--sp-3);cursor:pointer;font-size:var(--fs-sm);border-bottom:1px solid var(--clr-border);}
.alloc-row:hover{background:var(--clr-primary-soft);}
.alloc-txt{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.alloc-more{padding:var(--sp-2) var(--sp-3);color:var(--clr-muted);font-size:var(--fs-sm);text-align:center;}
.alloc-actions{display:flex;flex-direction:column;gap:var(--sp-2);justify-content:center;flex:0 0 auto;}
.alloc-actions .btn-erp{min-width:44px;}
@media (max-width:767px){.alloc-wrap{flex-direction:column;}.alloc-actions{flex-direction:row;justify-content:center;}}

/* Transaction entry grid (Opening Stock etc.) */
/*  The grid wrap is the grid's own scroll box: the body scrolls inside it
    while the header, sticky to the wrap, stays put.                          */
.txn-grid-wrap{overflow:auto;}
.txn-grid thead th{position:sticky;top:0;z-index:2;}
/*  Totals as the last row of the grid itself, pinned to the foot of the
    scroll box so it lines up with the columns and never moves.             */
.txn-grid tfoot td{
  position:sticky;bottom:0;z-index:2;
  background:#DDEBF7;color:#0C447C;font-weight:600;
  padding:6px 8px;border-top:1px solid #B5D4F4;border-right:1px solid #c9dbee;
}
.txn-grid tfoot td:last-child{border-right:0;}
.txn-grid tfoot td.r{text-align:right;}
/*  The sales rounding target lives in the total row now: same box, same
    message colours as it had under the old foot.                            */
.txn-grid tfoot .si-target{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;font-weight:500;}
.txn-grid tfoot .si-target input{
  width:110px;max-width:100%;min-width:88px;height:24px;padding:2px 8px;
  text-align:right;font-weight:600;font-variant-numeric:tabular-nums;
  border:1px solid #b9c4d8;border-radius:4px;background:#fffdf5;color:#1f2937;
}
.txn-grid tfoot .si-target input:focus{outline:none;border-color:#2b3a67;background:#fff;box-shadow:0 0 0 2px rgba(43,58,103,.15);}
.txn-grid tfoot .si-target-msg{font-size:11.5px;font-weight:600;white-space:nowrap;font-variant-numeric:tabular-nums;margin-inline-start:10px;}
.txn-grid tfoot .si-target-msg.ok{color:#1f7a4d;}
.txn-grid tfoot .si-target-msg.bad{color:#c0392b;}
.txn-grid tfoot .si-target-msg:empty{display:none;}
/*  A balance figure in the total row: green when it balances, red until.  */
.txn-grid tfoot .ok{color:#047857;}
.txn-grid tfoot .bad{color:#b91c1c;}
/*  The grid box carries a soft shadow instead of a hard outline.           */
.txn-grid-wrap.shadow{border-radius:6px;box-shadow:0 1px 3px rgba(16,24,40,.08),0 4px 14px rgba(16,24,40,.08);}
.txn-grid-wrap.shadow .txn-grid{border:0;}
/*  Expanded: no scroll box of its own -- every line on the page.           */
.txn-grid-wrap.is-expanded{flex:0 0 auto;max-height:none;overflow-y:visible;}
/*  Expand / collapse toggle in the last header cell.                       */
.txn-grid thead th .grid-toggle{
  width:22px;height:22px;padding:0;border:1px solid rgba(255,255,255,.65);border-radius:4px;
  background:transparent;color:#fff;font:inherit;font-size:16px;line-height:1;cursor:pointer;
}
.txn-grid thead th .grid-toggle:hover{background:rgba(255,255,255,.18);}

/*  FILL LAYOUT -- .form-card.is-fill
    A transaction screen whose page never scrolls. The body is a column that
    hands every spare pixel down to the grid box: header line fixed, grid
    body scrolling, totals fixed under it, command bar fixed under that. The
    screen pads its grid to the height it is given, so the box is always
    full of lines and a scrollbar means "more lines than fit".

    Below tablet width the header fields stack four deep and there is no
    height left to hand down, so the layout falls back to the ordinary
    scrolling body rather than clip the grid to nothing.                     */
@media (min-width:768px){
  .form-card.is-fill > .form-body{display:flex;flex-direction:column;overflow:hidden;}
  .form-card.is-fill .form-body > .tabpane{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;}
  .form-card.is-fill .tabpane > .section-card{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;margin-bottom:0;}
  /*  A pane with a header card AND a grid card: only the last card fills.  */
  .form-card.is-fill .tabpane > .section-card:not(:last-child){flex:0 0 auto;margin-bottom:var(--sp-4);}
  .form-card.is-fill .section-card > .section-body{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;}
  .form-card.is-fill .txn-grid-wrap{flex:1 1 auto;min-height:0;}
  .form-card.is-fill .txn-foot{flex:0 0 auto;}
  .form-card.is-fill .tabpane > .list-wrap{flex:1 1 auto;min-height:0;overflow:auto;}
  /*  Denser chrome above the grid: every pixel the head, paddings and field
      gaps give up is another line in the grid box. Roughly 40px on a
      three-line header, a line and a half of grid.                          */
  .form-card.is-fill > .form-head{padding-top:var(--sp-2);padding-bottom:var(--sp-2);}
  .form-card.is-fill > .form-body{padding:var(--sp-3);}
  .form-card.is-fill .section-card > .section-body{padding:var(--sp-3) var(--sp-4);}
  .form-card.is-fill .section-body .field{margin-bottom:var(--sp-2);}
  .form-card.is-fill .section-body .field-label{margin-bottom:2px;}
  .form-card.is-fill .list-grid thead th{position:sticky;top:0;z-index:2;}
}
.txn-grid{table-layout:fixed;width:100%;min-width:820px;border-collapse:collapse;font-size:var(--fs-sm);border:1px solid var(--clr-border);}
.txn-grid th,.txn-grid td{border-right:1px solid var(--clr-border);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.txn-grid th:last-child,.txn-grid td:last-child{border-right:0;}
.txn-grid td.gcell{cursor:default;}
.txn-grid td.gcell:focus{outline:none;background:var(--clr-primary-soft);box-shadow:inset 0 0 0 2px var(--clr-primary);}
.txn-grid .gi:focus{outline:none;box-shadow:inset 0 0 0 2px var(--clr-primary);}
.txn-grid thead th{background:var(--clr-primary);color:#fff;font-weight:600;padding:6px 8px;text-align:left;}
.txn-grid thead th.r{text-align:right;} .txn-grid thead th.c{text-align:center;}
.txn-grid tbody td{border-bottom:1px solid var(--clr-border);padding:3px 8px;vertical-align:middle;}
.txn-grid td.c{text-align:center;color:var(--clr-muted);} .txn-grid td.r{text-align:right;}
.txn-grid .mono{font-family:'Consolas','Courier New',monospace;color:var(--clr-muted);}
.txn-grid .gi{height:26px;width:100%;box-sizing:border-box;border:1px solid var(--clr-border);border-radius:4px;padding:0 6px;font-size:var(--fs-sm);}
/*  Every number in the grid reads right, typed or calculated. Only qty and
    cost were listed, so a rate and a discount sat left against a right-aligned
    net beside them and the column looked broken. */
.txn-grid .gi.qty,.txn-grid .gi.cost,.txn-grid .gi.rate,
.txn-grid .gi.disc,.txn-grid .gi.num{text-align:right;}

/*  The browser's spinner on a number input eats about 20px of a narrow cell
    and pushes the digits off centre. */
.txn-grid .gi[type=number]{-moz-appearance:textfield;}
.txn-grid .gi[type=number]::-webkit-outer-spin-button,
.txn-grid .gi[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}
.txn-grid .lx{border:0;background:transparent;color:var(--clr-muted);cursor:pointer;font-size:15px;line-height:1;}
.txn-grid .lx:hover{color:var(--clr-danger,#b3261e);}
/*  A line that is shown but not yet open for entry: the one below the
    active line. Quiet, flat, and plainly not the place to type yet.        */
.txn-grid tr.is-off td{color:var(--clr-muted);}
.txn-grid tr.is-off .gi{background:var(--clr-surface-alt);border-color:transparent;color:var(--clr-muted);cursor:default;}
.txn-grid tr.is-off .gi::placeholder{color:#b8c0cc;}
.ost-new td{background:var(--clr-primary-soft);}
.ost-hint{color:var(--clr-muted);font-size:var(--fs-sm);}
.ost-search-cell{position:relative;}
.ost-tbl{width:100%;border-collapse:collapse;table-layout:fixed;font-size:var(--fs-sm);}
.ost-tbl thead th{position:sticky;top:0;z-index:1;background:var(--clr-surface-alt);color:var(--clr-label);font-weight:600;text-align:left;padding:5px 10px;border-bottom:1px solid var(--clr-border-strong);border-right:1px solid var(--clr-border);}
.ost-tbl thead th:last-child{border-right:0;}
.ost-tbl td{padding:4px 10px;border-right:1px solid var(--clr-border);border-bottom:1px solid var(--clr-border);vertical-align:top;}
.ost-tbl td:last-child{border-right:0;}
.ost-tbl td.mono{font-family:'Consolas','Courier New',monospace;color:var(--clr-muted);white-space:nowrap;}
.ost-tbl td.name{white-space:normal;word-break:break-word;}
.ost-c-code{width:130px;}
.ost-tbl tr.ost-di{cursor:pointer;}
.ost-tbl tr.ost-di.sel td,.ost-tbl tr.ost-di:hover td{background:var(--clr-primary-soft);}
.ost-di.muted{padding:6px 10px;color:var(--clr-muted);}
.txn-foot{display:flex;justify-content:flex-end;gap:24px;border-top:2px solid var(--clr-primary);padding:8px 8px 0;margin-top:2px;font-size:var(--fs-base);}
.txn-foot b{font-weight:700;}

/* transaction grid: no number-input spinner arrows */
.txn-grid input[type=number]::-webkit-inner-spin-button,
.txn-grid input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0;}
.txn-grid input[type=number]{-moz-appearance:textfield;appearance:textfield;}

/* Transaction screen: tabs, header doc-nav, and List grid */
.form-head{display:flex;align-items:center;justify-content:space-between;gap:12px;}
.doc-nav{display:flex;gap:2px;}
.btn-nav{min-width:30px;height:28px;border:1px solid var(--clr-border);background:#fff;border-radius:5px;cursor:pointer;font-size:15px;line-height:1;color:var(--clr-primary);}
.btn-nav:disabled{opacity:.35;cursor:default;}
.tab-strip{display:flex;gap:4px;margin-bottom:14px;}
.tab-btn{padding:8px 22px;font-size:13px;border:0;background:var(--clr-surface-alt);color:var(--clr-muted);cursor:pointer;border-radius:6px 6px 0 0;font-family:inherit;}
.tab-btn:hover{color:var(--clr-primary);}
.tab-btn.active{background:var(--clr-primary);color:#fff;font-weight:600;}
.list-wrap{overflow-x:auto;border:1px solid var(--clr-border);border-radius:var(--radius);}
.list-grid{width:100%;border-collapse:collapse;table-layout:fixed;font-size:var(--fs-sm);}
.list-grid thead th{background:var(--clr-primary);color:#fff;font-weight:600;text-align:left;padding:6px 8px;border-right:1px solid rgba(255,255,255,.15);}
.list-grid thead th.r{text-align:right;}
.list-grid thead th.c{text-align:center;}
.list-grid tbody td{padding:5px 8px;border-bottom:1px solid var(--clr-border);border-right:1px solid var(--clr-border);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.list-grid tbody td.r{text-align:right;}
.list-grid tbody td.c{text-align:center;}
.list-grid tbody tr:hover td{background:var(--clr-primary-soft);cursor:pointer;}
.list-grid .mono{font-family:'Consolas','Courier New',monospace;color:var(--clr-muted);}
.list-grid .la{border:0;background:transparent;cursor:pointer;color:var(--clr-primary);font-size:15px;padding:2px 4px;line-height:1;}
.list-grid .la.lpdf{color:var(--clr-danger,#b3261e);}
/*==============================================================================
  Erp.Web / Content/css/erp.css   --   APPEND THIS BLOCK

  Numbers read right-aligned everywhere: quantity, rate, discount, amount, tax,
  total, in transaction grids, report tables and entry forms alike.

  It is a rule about a TYPE of value rather than about particular columns, so a
  new numeric column is aligned the day it is added and nobody has to remember.
  That is why it belongs here and not in any one page.

  The purchase screens carry a local copy of the first two rules so they behave
  correctly before this is applied. Once this block is in erp.css those local
  copies can be deleted -- they are marked with the comment
  "every number reads right-aligned".
==============================================================================*/

/* ---- typed numbers -------------------------------------------------------*/
input[type=number],
input.num,
input[data-numeric="1"] {
    text-align: right;
}

/* ---- transaction grids ---------------------------------------------------*/
.txn-grid input[type=number] {
    text-align: right;
}

.txn-grid td.r,
.txn-grid th.r {
    text-align: right;
}

/* calculated cells in a transaction grid are numbers by definition */
.txn-grid td.gcell.r,
.txn-grid td.val,
.txn-grid td.net,
.txn-grid td.vatamt,
.txn-grid td.vatpct,
.txn-grid td.outq {
    text-align: right;
}

/* ---- report tables -------------------------------------------------------*/
table.tb th,
table.tb td {
    text-align: right;
}

    table.tb th.l,
    table.tb td.l {
        text-align: left;
    }

    table.tb td.code {
        text-align: left;
    }

/* ---- money and quantity in read-only spans -------------------------------*/
.amount, .qty-val, .money {
    text-align: right;
    display: inline-block;
    width: 100%;
}

/* ---- right-to-left ------------------------------------------------------
  Under RTL a right-aligned number would sit against the wrong edge, so the
  logical property is used and the browser resolves the side.
---------------------------------------------------------------------------*/
[dir="rtl"] input[type=number],
[dir="rtl"] .txn-grid input[type=number] {
    text-align: left;
}

[dir="rtl"] .txn-grid td.r,
[dir="rtl"] .txn-grid th.r,
[dir="rtl"] table.tb th,
[dir="rtl"] table.tb td {
    text-align: left;
}

    [dir="rtl"] table.tb th.l,
    [dir="rtl"] table.tb td.l,
    [dir="rtl"] table.tb td.code {
        text-align: right;
    }

/*==============================================================================
  Erp.Web / Content/css/erp.css   --   APPEND THIS BLOCK

  THE PICKER AND DATA TABLE STANDARD

  One definition for every search popup, selection list and data table in the
  application. Screens stop carrying their own copies: a rule here changes all
  of them, and none of them can drift.

  ---------------------------------------------------------------------------
  NO COLUMN BORDERS
  ---------------------------------------------------------------------------
  A grid of boxes makes the eye stop at every cell, which is the opposite of
  what a list is for. Rows are separated by a hairline and nothing else; the
  ROW is what gets emphasis, on hover and on selection. Columns are held apart
  by alignment and space, which is enough.

  ---------------------------------------------------------------------------
  WHAT TO USE
  ---------------------------------------------------------------------------
      .erp-modal            the scrim; add .open to show it
        .erp-modal-box      the panel
        .erp-modal-head     title and close
        .erp-modal-tools    filter row, select-all, keyboard hint
        .erp-modal-body     the scrolling area
        .erp-modal-foot     count on one side, buttons on the other

      table.erp-tbl         the list itself
        tr.is-sel           chosen
        tr.is-cur           where the keyboard is
        tr.erp-grp          a grouping heading
        td.r / th.r         right aligned
        .erp-empty          the nothing-to-show message

  The older class names used by existing screens -- pin-modal, pin-tbl, pm-box
  and the rest -- are mapped onto the same appearance below, so those screens
  adopt this standard without their markup being touched. New screens should
  use the erp- names.
==============================================================================*/

/* ---- modal shell --------------------------------------------------------*/
.erp-modal, .pin-modal, .pm-scrim{
  position:fixed; inset:0; z-index:9000; padding:24px;
  background:rgba(15,39,64,.42);
  display:none; align-items:center; justify-content:center;
}
.erp-modal.open, .pin-modal.open, .pm-scrim.open{ display:flex; }

.erp-modal-box, .pin-modal-box, .pm-box{
  background:#fff; border-radius:12px; width:min(880px,100%); max-height:86vh;
  display:flex; flex-direction:column; overflow:hidden;
  box-shadow:0 1px 3px rgba(16,24,40,.08), 0 18px 44px rgba(16,24,40,.18);
}

.erp-modal-head, .pin-modal-head, .pm-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 18px; border-bottom:1px solid var(--clr-border,#e5e7eb);
  font-weight:700; font-size:14px; color:#0f2740;
}
.erp-modal-head button, .pin-modal-head button, .pm-head button{
  border:0; background:transparent; font-size:22px; line-height:1;
  cursor:pointer; color:#94a3b8;
}
.erp-modal-head button:hover, .pin-modal-head button:hover, .pm-head button:hover{ color:#0f2740; }

.erp-modal-tools, .pm-tools{
  display:flex; align-items:center; gap:14px;
  padding:10px 18px; background:#f8fafc; border-bottom:1px solid #eef1f5;
}
/*  A list that runs into the bottom edge looks unfinished and the last row is
    hard to hit. The body keeps a little air below it whether or not the modal
    has a footer.                                                             */
.erp-modal-body, .pin-modal-body, .pm-body{
  overflow:auto; flex:1 1 auto; padding-bottom:6px;
}

.erp-modal-foot, .pm-foot{
  display:flex; align-items:center; justify-content:space-between; gap:20px;
  padding:12px 18px; border-top:1px solid var(--clr-border,#e5e7eb); background:#fff;
}
.erp-modal-count, .pm-count{ font-size:12.5px; color:#475569; white-space:nowrap; }
.erp-modal-actions, .pm-actions{ display:flex; gap:10px; }

.erp-filter, .pm-filter{
  flex:1 1 auto; min-width:0; border:1px solid #cbd5e1; border-radius:7px;
  padding:6px 10px; font:inherit; font-size:13px; background:#fff;
}
.erp-filter:focus, .pm-filter:focus{
  outline:none; border-color:var(--clr-primary,#1d4ed8);
  box-shadow:0 0 0 3px rgba(29,78,216,.12);
}
.erp-chk, .pm-chk{
  display:inline-flex; align-items:center; gap:7px;
  font-size:12.5px; color:#334155; cursor:pointer; white-space:nowrap;
}
.erp-hint, .pm-hint{ font-size:11px; color:#94a3b8; white-space:nowrap; }

/* ---- the list -----------------------------------------------------------
   Rows, not boxes. No vertical rules anywhere.
--------------------------------------------------------------------------*/
table.erp-tbl, table.pin-tbl, table.pm-tbl{
  width:100%; border-collapse:collapse; font-size:13px; background:#fff;
}
table.erp-tbl th, table.pin-tbl th, table.pm-tbl th{
  position:sticky; top:0; z-index:1;
  background:#f1f5f9; color:#475569;
  font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.05em;
  padding:10px 14px; text-align:start;
  border-bottom:1px solid #dde3ec; border-inline-end:0;
}
table.erp-tbl td, table.pin-tbl td, table.pm-tbl td{
  padding:9px 14px; color:#1f2937;
  border-bottom:1px solid #f1f4f8; border-inline-end:0;
}
table.erp-tbl tbody tr:last-child td,
table.pin-tbl tbody tr:last-child td,
table.pm-tbl  tbody tr:last-child td{ border-bottom:0; }

table.erp-tbl .r, table.pin-tbl .r, table.pm-tbl .r{ text-align:end; }
table.erp-tbl .c, table.pin-tbl .c, table.pm-tbl .c{ text-align:center; }

/* the row is the thing being chosen, so the row is what lights up */
table.erp-tbl tbody tr, table.pin-tbl tbody tr, table.pm-tbl tbody tr.pm-item{
  cursor:pointer; transition:background-color .1s ease;
}
table.erp-tbl tbody tr:hover,
table.pin-tbl tbody tr:hover,
table.pm-tbl  tbody tr.pm-item:hover{ background:#f5f8ff; }

table.erp-tbl tbody tr.is-sel,
table.pm-tbl  tbody tr.pm-item.on{ background:#e9f0ff; }

/*  Where the keyboard is. A leading bar rather than a ring: it marks the row
    without competing with the selection tint.                               */
table.erp-tbl tbody tr.is-cur td:first-child,
table.pm-tbl  tbody tr.pm-item.cur td:first-child{
  box-shadow:inset 3px 0 0 var(--clr-primary,#1d4ed8);
}
table.erp-tbl tbody tr.is-cur,
table.pm-tbl  tbody tr.pm-item.cur{ background:#eef4ff; }

/* ---- grouping heading ---------------------------------------------------*/
table.erp-tbl tr.erp-grp td, table.pm-tbl tr.pm-grp td{
  background:#f8fafc; color:#0f2740; font-weight:700;
  font-size:11.5px; letter-spacing:.02em; padding:8px 14px;
  border-top:1px solid #dde3ec; border-bottom:1px solid #dde3ec;
  cursor:pointer;
}
table.erp-tbl tr.erp-grp:hover td, table.pm-tbl tr.pm-grp:hover td{ background:#eef2f7; }
table.erp-tbl tr.erp-grp .sub, table.pm-tbl tr.pm-grp .sub{
  font-weight:400; color:#64748b; margin-inline-start:10px;
}
table.erp-tbl tr.erp-grp .rem, table.pm-tbl tr.pm-grp .rem{
  float:inline-end; font-weight:600; color:#334155;
}

.erp-empty, .pin-empty, .pm-empty{
  padding:26px; text-align:center; color:var(--clr-muted,#6b7280); font-size:13px;
}

/* ---- the lookup button beside a field ----------------------------------*/
.erp-pick, .pin-pick{ display:flex; gap:4px; }
.erp-pick .ctl, .pin-pick .ctl{ flex:1 1 auto; min-width:0; }
.erp-pick-btn, .pin-pick-btn{
  flex:0 0 auto; width:32px; border:1px solid #cbd5e1; background:#f8fafc;
  border-radius:7px; cursor:pointer; color:#475569;
}
.erp-pick-btn:hover, .pin-pick-btn:hover{ background:#eef2f7; color:#0f2740; }

@media print{
  .erp-modal, .pin-modal, .pm-scrim{ display:none !important; }
}


/*==============================================================================
  NUMERIC FIELDS CARRY NO SPINNERS

  The little up/down buttons are a mouse affordance nobody uses during data
  entry, they narrow the field, and they advertise a behaviour we deliberately
  disable: erp-numeric.js also stops the arrow keys changing a value, because
  in an entry grid the arrows are how a person MOVES.

  Both halves are needed. Hiding the buttons without blocking the keys leaves
  the surprise; blocking the keys without hiding the buttons leaves a control
  that does nothing when clicked.
==============================================================================*/
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button{
  -webkit-appearance:none; appearance:none; margin:0;
}
input[type=number]{ -moz-appearance:textfield; appearance:textfield; }


/*==============================================================================
  TOTAL ROW UNDER A GRID

  Global, because a total that looks different on each screen reads as a
  different kind of number.

  The .is-diff variant is for a figure that should be zero. It is meant to be
  shown ONLY when it is not -- a permanent "Difference 0.00" is a line people
  learn to skip, and then miss on the one document where it matters.
==============================================================================*/
table.grid tr.grid-total td,
tr.grid-total td{
  background:#f1f5f9; font-weight:700; color:#0f2740;
  border-top:2px solid #cbd5e1; padding:8px 10px;
}
table.grid tr.grid-total.is-diff td,
tr.grid-total.is-diff td{
  background:#fef2f2; color:#b91c1c; border-top:0; font-weight:800;
}


/*==============================================================================
  A WIDER MODAL

  For content that is read rather than chosen: a voucher and its audit trail
  need more room than a picker, and forcing them into the same 880px means
  horizontal scrolling inside a dialog, which is worse than the layout it
  replaced.
==============================================================================*/
.erp-modal-box.erp-modal-wide{ width:min(1180px,100%); max-height:90vh; }


/*==============================================================================
  CONTROL ACCOUNT EXPANDER

  A control account is the total of a sub-ledger, so a line against one is only
  half an entry until the party is named. The plus appears on those lines and
  nowhere else: an account with nothing behind it must not look as though it is
  hiding something.
==============================================================================*/
.sl-expand{
  display:inline-flex; align-items:center; justify-content:center;
  width:17px; height:17px; margin-inline-end:6px; padding:0;
  border:1px solid #cbd5e1; border-radius:4px; background:#f8fafc;
  color:#334155; font:inherit; font-size:12px; line-height:1; cursor:pointer;
  vertical-align:middle;
}
.sl-expand:hover{ background:#e6ecf5; border-color:#94a3b8; }
tr.sl-child td{
  background:#f8fafc; border-bottom:1px solid #e5e7eb;
  color:#334155; font-size:12.5px; padding:7px 10px 7px 34px;
}
tr.sl-child .sl-code{ font-weight:700; color:#0f2740; margin-inline-end:8px; }
tr.sl-child .sl-type{ color:#64748b; margin-inline-start:8px; }
tr.sl-child .sl-bal{ float:inline-end; font-variant-numeric:tabular-nums; }
tr.sl-child .sl-problem{ color:#b91c1c; font-weight:600; }


/*==============================================================================
  SLIDE-IN DETAIL PANEL, AND THE "MORE" LINK THAT OPENS IT

  These lived in one screen's own style block, so the second screen to use the
  markup rendered with no styling at all. A pattern used by more than one screen
  belongs in the shared sheet: otherwise every screen that adopts it either
  copies the rules or looks broken.
==============================================================================*/
/* terms button and the slide-in panel */
        .tp-scrim{position:fixed;inset:0;background:rgba(15,39,64,.35);opacity:0;visibility:hidden;
                  transition:opacity .18s ease;z-index:8900}
.tp-scrim.open{opacity:1;visibility:visible}
.tp-panel{position:fixed;top:0;inset-inline-end:0;height:100%;width:min(480px,92vw);background:#fff;
                  box-shadow:-14px 0 40px rgba(0,0,0,.22);z-index:8950;display:flex;flex-direction:column;
                  transform:translateX(100%);transition:transform .22s ease}
[dir="rtl"] .tp-panel{transform:translateX(-100%)}
.tp-panel.open{transform:translateX(0)}
.tp-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;
                 background:#0f2740;color:#fff;font-weight:700}
.tp-head button{border:0;background:transparent;color:#fff;font-size:22px;line-height:1;cursor:pointer}
.tp-body{padding:16px;overflow:auto;flex:1 1 auto;display:flex;flex-direction:column;gap:14px}
.tp-hint{color:var(--clr-muted,#6b7280);font-size:11.5px}
.tp-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;
                 padding:12px 16px;border-top:1px solid #e5e7eb}
/* party link and detail panel */
        .party-more{margin-inline-start:8px;font-size:11px;font-weight:600;text-transform:none;
                    letter-spacing:0;color:var(--clr-primary,#1d4ed8);text-decoration:none;cursor:pointer}
.party-more:hover{text-decoration:underline}
.party-more.off{display:none}
.lbl-row{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.pf-sec{font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;
                color:var(--clr-primary,#1d4ed8);padding:14px 0 6px;border-bottom:1px solid var(--clr-border,#e5e7eb);
                margin-bottom:10px}
.pf-sec:first-child{padding-top:0}
.pf-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px 14px;margin-bottom:4px}
.pf-grid .wide{grid-column:1 / -1}
.pf{display:flex;flex-direction:column;gap:3px;min-width:0}
.pf-k{font-size:10.5px;font-weight:600;text-transform:uppercase;letter-spacing:.03em;
              color:var(--clr-muted,#6b7280)}
.pf-k.pf-ar{opacity:.75}
.pf-v{border:1px solid #cbd5e1;border-radius:7px;padding:6px 9px;font:inherit;font-size:13px;
              background:#fff;width:100%;min-width:0}
.pf-v[readonly]{background:#f8fafc;color:#64748b;cursor:not-allowed}
.tp-panel.party{width:min(640px,94vw)}

/*  Values the system wrote rather than fields somebody fills. Flat, so they do
    not pretend to be inputs sitting beside real ones. */
.pf-v.ro{display:block;padding:6px 2px;min-height:30px;color:#1f2937;
         border-bottom:1px dotted #cbd5e1;font-size:13px;background:transparent}


/*==============================================================================
  PURCHASE REPORT CHASSIS

  The toolbar, the summary cards, the pipeline table and the views rail. Written
  here rather than in the page: a second report copying the markup would
  otherwise copy the stylesheet with it, and the two would drift apart the first
  time either was touched.
==============================================================================*/
/*  The report chassis, as the landed cost report uses it. Only what is
    particular to a pipeline is added below. */
.tb-wrap{padding:16px;}
.tb-head{display:flex;align-items:end;gap:14px;flex-wrap:wrap;margin-bottom:14px;}
.tb-fld{display:flex;flex-direction:column;gap:3px;}
.tb-fld label{font-size:11px;font-weight:600;color:var(--clr-muted,#6b7280);
              text-transform:uppercase;letter-spacing:.03em;}
.tb-fld input[type=date],.tb-fld select{border:1px solid #cbd5e1;border-radius:7px;padding:6px 9px;font:inherit;}
.tb-fld select{min-width:190px;background:#fff;height:33px;}
.tb-tools{margin-inline-start:auto;display:flex;gap:8px;flex-wrap:wrap;}

/* ---------- the views, at the right edge ---------------------------
   A tab strip across the top costs a band of the page on every visit,
   and the views are wanted occasionally rather than constantly. The
   rail sits at the edge; hovering it brings the list out; choosing one
   sends it away again. */
.rp-rail{position:fixed;right:0;top:96px;z-index:40;
         width:30px;padding:14px 0;cursor:pointer;
         border:1px solid #8ba9c7;border-right:0;border-radius:6px 0 0 6px;
         background:linear-gradient(to bottom,#fdfefe 0,#eaf2fb 45%,#d6e6f7 50%,#e8f1fb 100%);
         box-shadow:-1px 1px 3px rgba(15,39,64,.18);}
.rp-rail:hover{background:linear-gradient(to bottom,#fffdf5 0,#ffeeba 45%,#ffe08a 50%,#fff3cd 100%);
               border-color:#e0a51a;}
/*  Pinned to the physical right in both directions: the logical property put
    it on the left in Arabic, where the app chrome already is. */
.rp-rail-txt{display:block;writing-mode:vertical-rl;text-orientation:mixed;
             font-size:11.5px;font-weight:700;letter-spacing:.06em;color:#15428b;
             text-transform:uppercase;text-align:center;}

/*  Held off-screen rather than hidden, so it slides rather than
    appears: an element that pops into place reads as a glitch. */
.rp-fly{position:fixed;right:0;top:96px;z-index:41;width:250px;
        transform:translateX(105%);opacity:0;visibility:hidden;
        transition:transform .22s ease-out,opacity .18s ease-out,visibility .22s;
        border:1px solid #8ba9c7;border-right:0;border-radius:6px 0 0 6px;
        background:linear-gradient(to bottom,#f6fafe 0,#e4eefa 100%);
        box-shadow:-3px 3px 10px rgba(15,39,64,.28);overflow:hidden;}
.rp-fly.open{transform:translateX(0);opacity:1;visibility:visible;}

.rp-fly-head{padding:7px 12px;font-size:11px;font-weight:700;letter-spacing:.05em;
             text-transform:uppercase;color:#15428b;
             background:linear-gradient(to bottom,#eaf2fb 0,#cfe1f5 100%);
             border-bottom:1px solid #a8c2dc;}

.rp-fly a{display:block;padding:8px 14px;font-size:12.5px;color:#15428b;
          text-decoration:none;border-bottom:1px solid #e3edf8;}
.rp-fly a:hover{background:linear-gradient(to bottom,#fffdf5 0,#ffe9a6 48%,#ffd76e 52%,#fff3cd 100%);
                color:#7a4b00;}
.rp-fly a.on{font-weight:700;color:#0f2740;
             background:linear-gradient(to bottom,#ffffff 0,#dce9f7 100%);
             border-left:3px solid #e0a51a;}
.rp-fly a:last-child{border-bottom:0;}
.tb-rh{display:flex;align-items:baseline;justify-content:space-between;gap:12px;
       border-bottom:2px solid #0f2740;padding-bottom:6px;margin-bottom:10px;}
.tb-rh .ttl{font-size:16px;font-weight:700;color:#0f2740;}
.tb-rh .as{font-size:12px;color:#64748b;}
.tb-note{margin-top:10px;font-size:11.5px;color:#64748b;}

/*  A stage is only legible next to the others, so the summary leads and
    the detail follows. */
.pl-cards{display:flex;flex-wrap:wrap;gap:12px;margin-bottom:16px;}
.pl-card{flex:1 1 220px;border:1px solid var(--clr-border,#e5e7eb);border-radius:10px;overflow:hidden;background:#fff;}
.pl-card h3{margin:0;padding:8px 12px;background:#f1f5f9;color:#334155;font-size:11px;
            font-weight:700;text-transform:uppercase;letter-spacing:.05em;}
.pl-row{display:flex;justify-content:space-between;align-items:baseline;gap:10px;
        padding:7px 12px;border-top:1px solid #f1f4f8;font-size:13px;}
.pl-row b{font-variant-numeric:tabular-nums;color:#0f2740;}
.pl-row .age{font-size:11px;color:#b45309;}

/*  The three states, coloured the same way everywhere they appear. */
.pl-st{display:inline-block;padding:2px 9px;border-radius:999px;font-size:11.5px;font-weight:600;}
.pl-st.PENDING{background:#fee2e2;color:#991b1b;}
.pl-st.PARTIAL{background:#fef3c7;color:#92400e;}
.pl-st.COMPLETE{background:#dcfce7;color:#166534;}

/*  Progress read at a glance, rather than by comparing two numbers on
    every row. */
.pl-bar{position:relative;height:6px;border-radius:999px;background:#e5e7eb;min-width:70px;}
.pl-bar i{position:absolute;inset-inline-start:0;top:0;bottom:0;border-radius:999px;background:#2563eb;}

table.pl-tbl{width:100%;border-collapse:collapse;font-size:13px;background:#fff;}
/*  Column dividers as well as row ones: a wide table of figures is
    read down a column, and without a rule the eye drifts across. */
table.pl-tbl th{background:#0f2740;color:#fff;font-size:10.5px;font-weight:700;text-transform:uppercase;
                letter-spacing:.04em;padding:8px 10px;text-align:start;
                border-inline-end:1px solid rgba(255,255,255,.18);}
table.pl-tbl th:last-child{border-inline-end:0;}
table.pl-tbl td{padding:6px 10px;color:#1f2937;
                border-bottom:1px solid #eef2f7;
                border-inline-end:1px solid #eef2f7;}
table.pl-tbl td:last-child{border-inline-end:0;}
/*  The outer edge, so the grid is closed rather than trailing off. */
table.pl-tbl{border:1px solid #dde3ec;border-radius:8px;overflow:hidden;}
table.pl-tbl tbody tr:hover{background:#f7faff;}
table.pl-tbl .r{text-align:end;font-variant-numeric:tabular-nums;}
table.pl-tbl .c{text-align:center;}
.pl-stage{font-weight:700;color:#0f2740;background:#eef2f7;border-inline-end:0 !important;}
.pl-empty{padding:22px;text-align:center;color:var(--clr-muted,#6b7280);font-size:13px;
          border:1px solid var(--clr-border,#e5e7eb);border-radius:10px;background:#fff;}

@media print{
    .tb-head,.rp-rail,.rp-fly{display:none;}
    .tb-wrap{padding:0;}
    body{background:#fff;}
    /*  A table split across pages is unreadable without its heading
        repeated, and a row split down the middle is worse. */
    table.pl-tbl{page-break-inside:auto;}
    table.pl-tbl thead{display:table-header-group;}
    table.pl-tbl tr{page-break-inside:avoid;}
    .pl-card{break-inside:avoid;}
    /*  Backgrounds are dropped by default, and the status pills carry
        their meaning in colour. */
    .pl-st,.pl-bar i,table.pl-tbl th{-webkit-print-color-adjust:exact;print-color-adjust:exact;}
    /*  A printer renders a pale rule as nothing at all, so the
        dividers are darkened rather than lost. */
    table.pl-tbl td{border-color:#c7cedb;}
}

/*------------------------------------------------------------------------------
  THE VIEWS RAIL ON A NARROW SCREEN

  A rail pinned to the side edge assumes there is a side to spare. On a phone
  there is not: it would sit over the figures it exists to help read.

  Below 900px it becomes a button at the bottom corner, and the list rises from
  the bottom rather than sliding in from the side -- the edge a thumb reaches.
------------------------------------------------------------------------------*/
@media (max-width: 900px){
  .rp-rail{top:auto;bottom:16px;right:16px;width:auto;padding:0;
           border-radius:999px;border:1px solid #8ba9c7;
           box-shadow:0 2px 8px rgba(15,39,64,.28);}
  .rp-rail-txt{writing-mode:horizontal-tb;padding:10px 18px;letter-spacing:.04em;}

  .rp-fly{top:auto;bottom:0;right:0;width:100%;max-height:70vh;overflow-y:auto;
          border-radius:10px 10px 0 0;border:1px solid #8ba9c7;border-bottom:0;
          transform:translateY(105%);}
  .rp-fly.open{transform:translateY(0);}

  /*  A finger is not a mouse pointer: the rows need room to be hit. */
  .rp-fly a{padding:13px 16px;font-size:13.5px;}
}

/*  Where the pointer has no hover at all, the rail is a button and nothing
    opens by accident. */
@media (hover: none){
  .rp-rail:hover{background:linear-gradient(to bottom,#fdfefe 0,#eaf2fb 45%,#d6e6f7 50%,#e8f1fb 100%);
                 border-color:#8ba9c7;}
}

/*  The read-only companion to a lookup box -- the name beside the code. It sat
    in one report's own style block, so the second report to show a name had
    nowhere to take it from. */
.tb-itemname{min-width:240px}
.tb-ro{display:block;border:1px solid transparent;border-bottom:1px dotted #cbd5e1;padding:6px 2px;
min-height:32px;color:#1f2937;font-size:13px}

/*------------------------------------------------------------------------------
  A NAME IN TWO LANGUAGES, IN ONE CELL

  Two columns would double the width of the widest thing on the row, and the
  names are read together anyway. The Arabic sits under the English, smaller and
  right-to-left whatever the page direction, because a name does not change
  direction with the interface.
------------------------------------------------------------------------------*/
.sl-name{display:block;color:#1f2937}
.sl-name-ar{display:block;font-size:11.5px;color:#64748b;margin-top:1px;direction:rtl}
.sl-off{display:inline-block;margin-inline-start:6px;padding:1px 7px;border-radius:999px;
        font-size:10.5px;font-weight:600;background:#fee2e2;color:#991b1b;vertical-align:middle}

/*------------------------------------------------------------------------------
  A LIST READ AT A GLANCE

  A register is scanned, not studied: the rows want to be close enough together
  that a page holds a useful number of them. Applied as a modifier so the
  reports that need room keep it.
------------------------------------------------------------------------------*/
.pl-tbl.compact td{padding:3px 10px;line-height:1.35}
.pl-tbl.compact th{padding:6px 10px}
.pl-tbl.compact .sl-name-ar{margin-top:0}
.pl-tbl.compact .la{padding:2px 4px}

/*------------------------------------------------------------------------------
  A MASTER SCREEN OPENED INSIDE ANOTHER

  Framed, the page has no tab chrome of its own and no room to waste: the outer
  padding goes, the card loses its shadow and border because the modal already
  draws one, and the action bar sits at the bottom of the frame rather than
  after a long scroll.
------------------------------------------------------------------------------*/
body.embedded{background:#fff}
body.embedded.in-tab{padding:0;margin:0}
body.embedded .form-card{border:0;border-radius:0;box-shadow:none;margin:0}
body.embedded .form-head{display:none}
body.embedded .form-actions{position:sticky;bottom:0;background:#fff;
                            border-top:1px solid var(--clr-border,#e5e7eb);
                            padding:10px 14px;margin:0;z-index:5}
body.embedded .toast-host{position:fixed}

/*------------------------------------------------------------------------------
  COLOUR AND DEPTH IN THE SIDEBAR

  Every icon was one grey at three-quarters opacity, so a module was told apart
  by reading its name. A colour per family lets the eye find the row first,
  which is the whole reason for having icons.

  ---------------------------------------------------------------------------
  WHY A GRADIENT AND NOT A COLOUR
  ---------------------------------------------------------------------------
  These icons are masks: the shape is cut out of whatever the element paints,
  which was a flat currentColor. Painting a gradient instead costs nothing and
  the shape picks it up -- lighter at the top left, deeper at the bottom right,
  the way a lit object is.

  The rest of the depth is two shadows: a pale one above for the highlight, a
  soft dark one below for the lift. Both are small on purpose. An icon that
  announces itself competes with the figures on the page, and the sidebar sits
  behind the work rather than in front of it.
------------------------------------------------------------------------------*/
.nav-icon{
  opacity:.92;
  filter:drop-shadow(0 -0.5px 0 rgba(255,255,255,.65))
         drop-shadow(0 1px 1.5px rgba(15,39,64,.28));
  transition:opacity .12s ease, filter .12s ease, transform .12s ease;
}

/*  Home and dashboard  */
.nav-icon.icon-home,
.nav-icon.icon-grid{background:linear-gradient(145deg,#8fa4cc 0%,#5069a0 55%,#3d5487 100%)}

/*  General ledger: money  */
.nav-icon.icon-currency,
.nav-icon.icon-file-text{background:linear-gradient(145deg,#7fd8b4 0%,#3f9f7c 55%,#2c7359 100%)}

/*  Payable: what the business owes  */
.nav-icon.icon-briefcase{background:linear-gradient(145deg,#e0a878 0%,#bc7f47 55%,#94602f 100%)}

/*  People  */
.nav-icon.icon-users,
.nav-icon.icon-group,
.nav-icon.icon-user{background:linear-gradient(145deg,#a9a3e0 0%,#7a72c2 55%,#5b539d 100%)}

/*  Inventory  */
.nav-icon.icon-inventory,
.nav-icon.icon-box,
.nav-icon.icon-warehouse,
.nav-icon.icon-item{background:linear-gradient(145deg,#7cc2ea 0%,#4791c4 55%,#2f6f9c 100%)}

/*  Purchase  */
.nav-icon.icon-cart,
.nav-icon.icon-truck{background:linear-gradient(145deg,#f0c67e 0%,#cc9440 55%,#a3722b 100%)}

/*  Reporting  */
.nav-icon.icon-pie,
.nav-icon.icon-trending,
.nav-icon.icon-activity,
.nav-icon.icon-list{background:linear-gradient(145deg,#c4a3e2 0%,#9370c2 55%,#71539c 100%)}

/*  Administration  */
.nav-icon.icon-settings,
.nav-icon.icon-shield,
.nav-icon.icon-lock{background:linear-gradient(145deg,#b6bfcb 0%,#7d8794 55%,#5f6975 100%)}

/*  Time, and anything about when  */
.nav-icon.icon-clock,
.nav-icon.icon-calendar{background:linear-gradient(145deg,#95c9c6 0%,#549a96 55%,#3c7673 100%)}

/*  Under the pointer it lifts very slightly; on the row in use it stands at
    full strength. Both are small enough to be felt rather than watched. */
.nav-link:hover .nav-icon,
.nav-toggle:hover .nav-icon{
  opacity:1;
  transform:translateY(-0.5px);
  filter:drop-shadow(0 -0.5px 0 rgba(255,255,255,.75))
         drop-shadow(0 2px 2.5px rgba(15,39,64,.32));
}

.nav-link.is-active .nav-icon,
.nav-folder.has-active > .nav-toggle .nav-icon{
  opacity:1;
  filter:drop-shadow(0 -0.5px 0 rgba(255,255,255,.8))
         drop-shadow(0 2px 3px rgba(15,39,64,.38))
         saturate(1.15);
}

/*  Collapsed to icons alone, they are all the user has to go on, so the
    shading is allowed to be a shade stronger. */
.app.is-icons-only .nav-icon{
  opacity:1;
  filter:drop-shadow(0 -0.5px 0 rgba(255,255,255,.75))
         drop-shadow(0 2px 3px rgba(15,39,64,.34));
}

/*  The rest, so nothing sits flat grey beside a coloured neighbour and looks
    like a mistake. Master data shares one family deliberately: they belong
    together and the sidebar should say so. */
.nav-icon.icon-category,
.nav-icon.icon-manufacturer,
.nav-icon.icon-uom{background:linear-gradient(145deg,#9dc9b7 0%,#5f9d86 55%,#457a67 100%)}

.nav-icon.icon-map-pin{background:linear-gradient(145deg,#eda3a3 0%,#c86c6c 55%,#a04e4e 100%)}
.nav-icon.icon-search{background:linear-gradient(145deg,#a8b6c8 0%,#6f8199 55%,#546477 100%)}
.nav-icon.icon-log-in{background:linear-gradient(145deg,#8fbfe0 0%,#548bb8 55%,#3d6b91 100%)}

/*  The two that mean something has gone wrong or is about to. Red on purpose:
    it is the one place in the sidebar where colour carries a warning rather
    than an identity. */
.nav-icon.icon-alert,
.nav-icon.icon-bin{background:linear-gradient(145deg,#f0a5a0 0%,#cf6b64 55%,#a84a44 100%)}

/*  A printed page has no sidebar, and a screen that asks for less motion
    should not get any. */
@media (prefers-reduced-motion: reduce){
  .nav-icon{transition:none}
  .nav-link:hover .nav-icon,
  .nav-toggle:hover .nav-icon{transform:none}
}


/*==============================================================================
  ICONS FOR THE PURCHASE AND PAYABLE MODULES

  The set held thirty-one shapes for more menus than that, so unrelated screens
  were sharing one -- a receipt and a return wearing the same box, an invoice
  and a statement the same page. An icon that appears twice tells the eye
  nothing.

  These are built the same way as the rest: 24 by 24, no fill, two-pixel round
  strokes. A new icon that is drawn differently reads as imported, however good
  it is on its own.

  Each says what its screen does rather than what module it is in: goods coming
  in have an arrow into the box, goods going back an arrow out of it, money out
  a card, money in a card with an arrow down.
==============================================================================*/
.icon-order{-webkit-mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M9%203h6a1%201%200%200%201%201%201v1H8V4a1%201%200%200%201%201-1z'/><path%20d='M16%205h2a1%201%200%200%201%201%201v13a1%201%200%200%201-1%201H6a1%201%200%200%201-1-1V6a1%201%200%200%201%201-1h2'/><path%20d='M9%2011h6M9%2015h4'/></svg>");mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M9%203h6a1%201%200%200%201%201%201v1H8V4a1%201%200%200%201%201-1z'/><path%20d='M16%205h2a1%201%200%200%201%201%201v13a1%201%200%200%201-1%201H6a1%201%200%200%201-1-1V6a1%201%200%200%201%201-1h2'/><path%20d='M9%2011h6M9%2015h4'/></svg>");}
.icon-receipt{-webkit-mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M12%202%203%206.5v11L12%2022l9-4.5v-11L12%202z'/><path%20d='M3%206.5%2012%2011l9-4.5'/><path%20d='M12%2011v11'/><path%20d='m8.5%2015.5%202%202%204-4'/></svg>");mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M12%202%203%206.5v11L12%2022l9-4.5v-11L12%202z'/><path%20d='M3%206.5%2012%2011l9-4.5'/><path%20d='M12%2011v11'/><path%20d='m8.5%2015.5%202%202%204-4'/></svg>");}
.icon-goods-return{-webkit-mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M12%202%203%206.5v11L12%2022l9-4.5v-11L12%202z'/><path%20d='M3%206.5%2012%2011l9-4.5'/><path%20d='M12%2011v11'/><path%20d='M15%2016h-4.5'/><path%20d='m12.5%2013.5-2%202.5%202%202.5'/></svg>");mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M12%202%203%206.5v11L12%2022l9-4.5v-11L12%202z'/><path%20d='M3%206.5%2012%2011l9-4.5'/><path%20d='M12%2011v11'/><path%20d='M15%2016h-4.5'/><path%20d='m12.5%2013.5-2%202.5%202%202.5'/></svg>");}
.icon-invoice{-webkit-mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M6%202h9l4%204v15a1%201%200%200%201-1%201H6a1%201%200%200%201-1-1V3a1%201%200%200%201%201-1z'/><path%20d='M15%202v4h4'/><path%20d='M9%2012h6M9%2016h6'/></svg>");mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M6%202h9l4%204v15a1%201%200%200%201-1%201H6a1%201%200%200%201-1-1V3a1%201%200%200%201%201-1z'/><path%20d='M15%202v4h4'/><path%20d='M9%2012h6M9%2016h6'/></svg>");}
.icon-invoice-in{-webkit-mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M6%202h9l4%204v15a1%201%200%200%201-1%201H6a1%201%200%200%201-1-1V3a1%201%200%200%201%201-1z'/><path%20d='M15%202v4h4'/><path%20d='M12%2010v6'/><path%20d='m9.5%2013.5%202.5%202.5%202.5-2.5'/></svg>");mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M6%202h9l4%204v15a1%201%200%200%201-1%201H6a1%201%200%200%201-1-1V3a1%201%200%200%201%201-1z'/><path%20d='M15%202v4h4'/><path%20d='M12%2010v6'/><path%20d='m9.5%2013.5%202.5%202.5%202.5-2.5'/></svg>");}
.icon-purchase-return{-webkit-mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M6%202h9l4%204v15a1%201%200%200%201-1%201H6a1%201%200%200%201-1-1V3a1%201%200%200%201%201-1z'/><path%20d='M15%202v4h4'/><path%20d='M14.5%2015H10'/><path%20d='m12%2012.5-2%202.5%202%202.5'/></svg>");mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M6%202h9l4%204v15a1%201%200%200%201-1%201H6a1%201%200%200%201-1-1V3a1%201%200%200%201%201-1z'/><path%20d='M15%202v4h4'/><path%20d='M14.5%2015H10'/><path%20d='m12%2012.5-2%202.5%202%202.5'/></svg>");}
.icon-landed-cost{-webkit-mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='m12%203%209%204.5-9%204.5-9-4.5L12%203z'/><path%20d='m3%2012%209%204.5L21%2012'/><path%20d='m3%2016.5%209%204.5%209-4.5'/></svg>");mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='m12%203%209%204.5-9%204.5-9-4.5L12%203z'/><path%20d='m3%2012%209%204.5L21%2012'/><path%20d='m3%2016.5%209%204.5%209-4.5'/></svg>");}
.icon-payment{-webkit-mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><rect%20x='2'%20y='5'%20width='20'%20height='14'%20rx='2'/><path%20d='M2%2010h20'/><path%20d='M6%2015h4'/></svg>");mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><rect%20x='2'%20y='5'%20width='20'%20height='14'%20rx='2'/><path%20d='M2%2010h20'/><path%20d='M6%2015h4'/></svg>");}
.icon-receive{-webkit-mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><rect%20x='2'%20y='5'%20width='20'%20height='14'%20rx='2'/><path%20d='M2%2010h20'/><path%20d='M17%2017.5v-4'/><path%20d='m15%2015.5%202%202%202-2'/></svg>");mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><rect%20x='2'%20y='5'%20width='20'%20height='14'%20rx='2'/><path%20d='M2%2010h20'/><path%20d='M17%2017.5v-4'/><path%20d='m15%2015.5%202%202%202-2'/></svg>");}
.icon-statement{-webkit-mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M6%202h12a1%201%200%200%201%201%201v18a1%201%200%200%201-1%201H6a1%201%200%200%201-1-1V3a1%201%200%200%201%201-1z'/><path%20d='M9%207h6M9%2011h6M9%2015h3'/></svg>");mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M6%202h12a1%201%200%200%201%201%201v18a1%201%200%200%201-1%201H6a1%201%200%200%201-1-1V3a1%201%200%200%201%201-1z'/><path%20d='M9%207h6M9%2011h6M9%2015h3'/></svg>");}
.icon-balance{-webkit-mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M12%203v18'/><path%20d='M5%207h14'/><path%20d='M7.5%207%205%2013h5L7.5%207z'/><path%20d='M16.5%207%2014%2013h5l-2.5-6z'/><path%20d='M8%2021h8'/></svg>");mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M12%203v18'/><path%20d='M5%207h14'/><path%20d='M7.5%207%205%2013h5L7.5%207z'/><path%20d='M16.5%207%2014%2013h5l-2.5-6z'/><path%20d='M8%2021h8'/></svg>");}
.icon-aging{-webkit-mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><circle%20cx='12'%20cy='12'%20r='9'/><path%20d='M12%207v5l3%202'/><path%20d='M12%2021a9%209%200%200%200%200-18'/></svg>");mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><circle%20cx='12'%20cy='12'%20r='9'/><path%20d='M12%207v5l3%202'/><path%20d='M12%2021a9%209%200%200%200%200-18'/></svg>");}
.icon-pipeline{-webkit-mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><circle%20cx='5'%20cy='6'%20r='2'/><circle%20cx='12'%20cy='12'%20r='2'/><circle%20cx='19'%20cy='18'%20r='2'/><path%20d='M7%206h3a2%202%200%200%201%202%202v2'/><path%20d='M14%2012h3a2%202%200%200%201%202%202v2'/></svg>");mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><circle%20cx='5'%20cy='6'%20r='2'/><circle%20cx='12'%20cy='12'%20r='2'/><circle%20cx='19'%20cy='18'%20r='2'/><path%20d='M7%206h3a2%202%200%200%201%202%202v2'/><path%20d='M14%2012h3a2%202%200%200%201%202%202v2'/></svg>");}
.icon-register{-webkit-mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M4%204h7a2%202%200%200%201%202%202v14a2%202%200%200%200-2-2H4V4z'/><path%20d='M20%204h-7a2%202%200%200%200-2%202v14a2%202%200%200%201%202-2h7V4z'/></svg>");mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M4%204h7a2%202%200%200%201%202%202v14a2%202%200%200%200-2-2H4V4z'/><path%20d='M20%204h-7a2%202%200%200%200-2%202v14a2%202%200%200%201%202-2h7V4z'/></svg>");}
.icon-trace{-webkit-mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><circle%20cx='11'%20cy='11'%20r='7'/><path%20d='m20%2020-3.5-3.5'/><path%20d='M8%2011h6M11%208v6'/></svg>");mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><circle%20cx='11'%20cy='11'%20r='7'/><path%20d='m20%2020-3.5-3.5'/><path%20d='M8%2011h6M11%208v6'/></svg>");}
.icon-supplier{-webkit-mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M3%2021V8l6-4%206%204v13'/><path%20d='M15%2021V11h6v10'/><path%20d='M7%2012h2M7%2016h2M18%2015h1'/><path%20d='M2%2021h20'/></svg>");mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M3%2021V8l6-4%206%204v13'/><path%20d='M15%2021V11h6v10'/><path%20d='M7%2012h2M7%2016h2M18%2015h1'/><path%20d='M2%2021h20'/></svg>");}
.icon-branch{-webkit-mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M3%2021V9l5-3%205%203v12'/><path%20d='M13%2021V13h8v8'/><path%20d='M6%2012h2M6%2016h2M16%2017h2'/><path%20d='M2%2021h20'/></svg>");mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M3%2021V9l5-3%205%203v12'/><path%20d='M13%2021V13h8v8'/><path%20d='M6%2012h2M6%2016h2M16%2017h2'/><path%20d='M2%2021h20'/></svg>");}
.icon-account{-webkit-mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M3%206h18'/><path%20d='M5%206v13a1%201%200%200%200%201%201h12a1%201%200%200%200%201-1V6'/><path%20d='M9%203h6v3H9z'/><path%20d='M12%2010v7'/><path%20d='M9.5%2012.5h5'/></svg>");mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M3%206h18'/><path%20d='M5%206v13a1%201%200%200%200%201%201h12a1%201%200%200%200%201-1V6'/><path%20d='M9%203h6v3H9z'/><path%20d='M12%2010v7'/><path%20d='M9.5%2012.5h5'/></svg>");}
.icon-transfer{-webkit-mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M4%208h13'/><path%20d='m14%205%203%203-3%203'/><path%20d='M20%2016H7'/><path%20d='m10%2013-3%203%203%203'/></svg>");mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M4%208h13'/><path%20d='m14%205%203%203-3%203'/><path%20d='M20%2016H7'/><path%20d='m10%2013-3%203%203%203'/></svg>");}
.icon-adjust{-webkit-mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M4%206h16M4%2012h16M4%2018h16'/><circle%20cx='9'%20cy='6'%20r='2'/><circle%20cx='15'%20cy='12'%20r='2'/><circle%20cx='7'%20cy='18'%20r='2'/></svg>");mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M4%206h16M4%2012h16M4%2018h16'/><circle%20cx='9'%20cy='6'%20r='2'/><circle%20cx='15'%20cy='12'%20r='2'/><circle%20cx='7'%20cy='18'%20r='2'/></svg>");}
.icon-payment-rpt{-webkit-mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><rect%20x='2'%20y='5'%20width='20'%20height='14'%20rx='2'/><path%20d='M2%2010h20'/><path%20d='M7%2016v-2M11%2016v-4M15%2016v-3'/></svg>");mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><rect%20x='2'%20y='5'%20width='20'%20height='14'%20rx='2'/><path%20d='M2%2010h20'/><path%20d='M7%2016v-2M11%2016v-4M15%2016v-3'/></svg>");}
.icon-damage{-webkit-mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M12%202%203%206.5v11L12%2022l9-4.5v-11L12%202z'/><path%20d='m9%209%206%206M15%209l-6%206'/></svg>");mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M12%202%203%206.5v11L12%2022l9-4.5v-11L12%202z'/><path%20d='m9%209%206%206M15%209l-6%206'/></svg>");}

/*  And their colours, in the families already established: the purchase chain
    amber, money green, reporting violet, master data blue. */
.nav-icon.icon-order,
.nav-icon.icon-receipt,
.nav-icon.icon-invoice,
.nav-icon.icon-invoice-in{background:linear-gradient(145deg,#f0c67e 0%,#cc9440 55%,#a3722b 100%)}

/*  The returns run warmer, so sending something back never reads as receiving
    it at a glance. */
.nav-icon.icon-goods-return,
.nav-icon.icon-purchase-return{background:linear-gradient(145deg,#eda88f 0%,#c9714f 55%,#9e5539 100%)}

.nav-icon.icon-landed-cost{background:linear-gradient(145deg,#d3b58a 0%,#a8834f 55%,#856539 100%)}

.nav-icon.icon-payment,
.nav-icon.icon-payment-rpt,
.nav-icon.icon-receive,
.nav-icon.icon-balance,
.nav-icon.icon-statement{background:linear-gradient(145deg,#7fd8b4 0%,#3f9f7c 55%,#2c7359 100%)}

/*  Aging is a warning about money, so it borrows the warning colour. */
.nav-icon.icon-aging{background:linear-gradient(145deg,#f0b98f 0%,#cf8452 55%,#a5643a 100%)}

.nav-icon.icon-pipeline,
.nav-icon.icon-register,
.nav-icon.icon-trace{background:linear-gradient(145deg,#c4a3e2 0%,#9370c2 55%,#71539c 100%)}

.nav-icon.icon-supplier,
.nav-icon.icon-branch,
.nav-icon.icon-account{background:linear-gradient(145deg,#a9a3e0 0%,#7a72c2 55%,#5b539d 100%)}

.nav-icon.icon-transfer,
.nav-icon.icon-adjust{background:linear-gradient(145deg,#7cc2ea 0%,#4791c4 55%,#2f6f9c 100%)}

.nav-icon.icon-damage{background:linear-gradient(145deg,#f0a5a0 0%,#cf6b64 55%,#a84a44 100%)}


/*==============================================================================
  ICONS FOR INVENTORY, ITS REPORTS, AND UTILITIES

  The same problem one module along: transfer in and transfer out shared an
  icon, as did every stock report. Direction is the thing being distinguished
  here, so it is drawn rather than implied -- an arrow into the building, an
  arrow out of it.
==============================================================================*/
.icon-transfer-in{-webkit-mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M3%2021V9l5-3%205%203v12'/><path%20d='M2%2021h20'/><path%20d='M20%204v9'/><path%20d='m16.5%209.5%203.5%203.5%203.5-3.5'/></svg>");mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M3%2021V9l5-3%205%203v12'/><path%20d='M2%2021h20'/><path%20d='M20%204v9'/><path%20d='m16.5%209.5%203.5%203.5%203.5-3.5'/></svg>");}
.icon-transfer-out{-webkit-mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M3%2021V9l5-3%205%203v12'/><path%20d='M2%2021h20'/><path%20d='M20%2013V4'/><path%20d='m16.5%207.5%203.5-3.5%203.5%203.5'/></svg>");mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M3%2021V9l5-3%205%203v12'/><path%20d='M2%2021h20'/><path%20d='M20%2013V4'/><path%20d='m16.5%207.5%203.5-3.5%203.5%203.5'/></svg>");}
.icon-movement{-webkit-mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M3%2017h4l3-9%203%2012%203-9h5'/><circle%20cx='3'%20cy='17'%20r='1'/></svg>");mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M3%2017h4l3-9%203%2012%203-9h5'/><circle%20cx='3'%20cy='17'%20r='1'/></svg>");}
.icon-valuation{-webkit-mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><rect%20x='4'%20y='2'%20width='16'%20height='20'%20rx='2'/><path%20d='M8%206h8'/><path%20d='M8%2011h2M12%2011h2M16%2011h0'/><path%20d='M8%2015h2M12%2015h2'/><path%20d='M16%2015v4'/></svg>");mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><rect%20x='4'%20y='2'%20width='16'%20height='20'%20rx='2'/><path%20d='M8%206h8'/><path%20d='M8%2011h2M12%2011h2M16%2011h0'/><path%20d='M8%2015h2M12%2015h2'/><path%20d='M16%2015v4'/></svg>");}
.icon-summary{-webkit-mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><rect%20x='4'%20y='3'%20width='16'%20height='18'%20rx='2'/><path%20d='M9%201h6v3H9z'/><path%20d='M8%2011h3M8%2015h3'/><path%20d='M14%209v8M17%2012v5'/></svg>");mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><rect%20x='4'%20y='3'%20width='16'%20height='18'%20rx='2'/><path%20d='M9%201h6v3H9z'/><path%20d='M8%2011h3M8%2015h3'/><path%20d='M14%209v8M17%2012v5'/></svg>");}
.icon-alert-stock{-webkit-mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M12%202%203%206.5v11L12%2022l9-4.5v-11L12%202z'/><path%20d='M12%208v5'/><path%20d='M12%2016.5h.01'/></svg>");mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M12%202%203%206.5v11L12%2022l9-4.5v-11L12%202z'/><path%20d='M12%208v5'/><path%20d='M12%2016.5h.01'/></svg>");}
.icon-terms{-webkit-mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M6%202h12a1%201%200%200%201%201%201v18a1%201%200%200%201-1%201H6a1%201%200%200%201-1-1V3a1%201%200%200%201%201-1z'/><path%20d='M9%207h6M9%2011h6M9%2015h4'/><path%20d='m14.5%2018.5%201.5%201.5%203-3'/></svg>");mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M6%202h12a1%201%200%200%201%201%201v18a1%201%200%200%201-1%201H6a1%201%200%200%201-1-1V3a1%201%200%200%201%201-1z'/><path%20d='M9%207h6M9%2011h6M9%2015h4'/><path%20d='m14.5%2018.5%201.5%201.5%203-3'/></svg>");}
.icon-tools{-webkit-mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M14.7%206.3a4%204%200%200%200%205%205L21%2021H3l7.7-12.3a4%204%200%200%200%204-2.4z'/><path%20d='m9%209%206%206'/></svg>");mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M14.7%206.3a4%204%200%200%200%205%205L21%2021H3l7.7-12.3a4%204%200%200%200%204-2.4z'/><path%20d='m9%209%206%206'/></svg>");}
.icon-doc-type{-webkit-mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M6%202h9l4%204v15a1%201%200%200%201-1%201H6a1%201%200%200%201-1-1V3a1%201%200%200%201%201-1z'/><path%20d='M15%202v4h4'/><path%20d='M9%2013h6M9%2017h3'/></svg>");mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M6%202h9l4%204v15a1%201%200%200%201-1%201H6a1%201%200%200%201-1-1V3a1%201%200%200%201%201-1z'/><path%20d='M15%202v4h4'/><path%20d='M9%2013h6M9%2017h3'/></svg>");}
.icon-stock-branch{-webkit-mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M3%2021V9l5-3%205%203v12'/><path%20d='M2%2021h20'/><path%20d='M6%2012h2M6%2016h2'/><rect%20x='15'%20y='12'%20width='6'%20height='6'%20rx='1'/><path%20d='M15%2015h6'/></svg>");mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M3%2021V9l5-3%205%203v12'/><path%20d='M2%2021h20'/><path%20d='M6%2012h2M6%2016h2'/><rect%20x='15'%20y='12'%20width='6'%20height='6'%20rx='1'/><path%20d='M15%2015h6'/></svg>");}

/*  Inventory blue, its reports violet with the rest of the reporting, utilities
    the neutral grey that administration already uses. */
.nav-icon.icon-transfer-in,
.nav-icon.icon-transfer-out,
.nav-icon.icon-stock-branch{background:linear-gradient(145deg,#7cc2ea 0%,#4791c4 55%,#2f6f9c 100%)}

.nav-icon.icon-movement,
.nav-icon.icon-valuation,
.nav-icon.icon-summary{background:linear-gradient(145deg,#c4a3e2 0%,#9370c2 55%,#71539c 100%)}

/*  A stock alert warns, so it takes the warning colour rather than the
    inventory one. */
.nav-icon.icon-alert-stock{background:linear-gradient(145deg,#f0a5a0 0%,#cf6b64 55%,#a84a44 100%)}

.nav-icon.icon-terms,
.nav-icon.icon-doc-type,
.nav-icon.icon-tools{background:linear-gradient(145deg,#b6bfcb 0%,#7d8794 55%,#5f6975 100%)}

/*  A line that subtracts, in a list where most add. Without it a return reads
    as a purchase and the totals look wrong to anybody checking by eye. */
.pl-tbl tr.is-return td{color:#a84a44;background:#fdf5f4}
.pl-tbl tr.is-return td:first-child::before{content:'\2212';margin-inline-end:5px;font-weight:700}

/*  A supplier in debit: the company is owed rather than owing. Rare enough
    that it reads as an error in a column of payables unless it is marked. */
.pl-tbl td.sb-debit{color:#047857;font-weight:600}


/*==============================================================================
  TRANSACTION SCREEN PARTS THAT WERE STILL LOCAL

  The rest of what PurchaseInvoice.aspx kept in its own style block. Most of it
  had already been promoted; these are what was left, and they belong here for
  the same reason: the sales invoice needs the identical panel, the identical
  read-only number, the identical party detail grid. Two copies would look the
  same on the day they were written and not for long after.
==============================================================================*/
.tro-lock{display:inline-flex;align-items:center;gap:6px;background:#eef4ff;border:1px solid #93c5fd; border-left:4px solid #2563eb;color:#0d47a1;font-size:12px;font-weight:600; padding:4px 10px;border-radius:4px;white-space:nowrap}
.tro-lock.warn{background:#fff7ed;border-color:#fdba74;border-left-color:#ea580c;color:#9a3412}
#ostBody.grid-locked .gi{background:#f1f5f9 !important;color:#64748b !important;cursor:not-allowed}
#ostBody.grid-locked .lx{display:none}
.tp-scrim{position:fixed;inset:0;background:rgba(15,39,64,.35);opacity:0;visibility:hidden; transition:opacity .18s ease;z-index:8900}
[dir="rtl"] .tp-panel{transform:translateX(-100%)}
.tp-field{display:flex;flex-direction:column;gap:4px}
.tp-grow{flex:1 1 auto;min-height:0}
.tp-terms{width:100%;height:100%;min-height:240px;resize:vertical;font-family:inherit;line-height:1.5}
.tp-note{color:var(--clr-muted,#6b7280);font-size:11.5px}
.party-more{margin-inline-start:8px;font-size:11px;font-weight:600;text-transform:none; letter-spacing:0;color:var(--clr-primary,#1d4ed8);text-decoration:none;cursor:pointer}
.pd-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px 14px}
.pd-grid .wide{grid-column:1 / -1}
.pd-k{display:block;font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.04em; color:var(--clr-muted,#6b7280)}
.pd-v{display:block;font-size:13px;color:#1f2937;min-height:18px;word-break:break-word}
.txn-grid input[type=number]{text-align:right}
/*  Read-only party name (customer / supplier): the same box as every other
    field on the line, just not editable.                                     */
.pin-ro{
  display:flex;align-items:center;height:var(--ctl-h);padding:0 var(--sp-3);
  border:1px solid var(--clr-border-strong);border-radius:var(--radius-sm);
  background:var(--clr-surface);color:var(--clr-text);font-size:13px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}

/*------------------------------------------------------------------------------
  THREE THAT WERE NEVER DEFINED

  The purchase screens use .tabpane, .grand and .hint and none of them is in
  this file. They have been relying on browser defaults, which is why a tab pane
  has no spacing and the grand total does not stand out from the figures beside
  it. Defined here rather than carried into sales as another gap.
------------------------------------------------------------------------------*/
.tabpane{display:block}
.tabpane[style*="display:none"]{display:none}

/*  The figure the eye should land on in a row of totals. */
.txn-foot .grand{font-weight:700;color:var(--clr-text,#0f2740)}
.txn-foot .grand b{font-size:15px}

/*  A note under a field: present, and quiet. */
.hint{display:block;margin-top:3px;font-size:11.5px;color:var(--clr-muted,#6b7280);
      min-height:14px;line-height:1.2}
/*  An empty hint reserved 17px under its field and made that whole line
    taller than its neighbours. It takes room only when it has something
    to say.                                                                  */
.hint:empty{display:none;}

/*  The button that opens the terms panel. Lives in PurchaseOrder.aspx's own
    style block today; the quotation needs the same one, so it comes here
    rather than being written twice. */
.terms-btn{width:100%;display:inline-flex;align-items:center;justify-content:center;
           gap:6px;position:relative}

@media print{
  .tp-panel,.tp-scrim,.tp-peek,.terms-btn{display:none !important}
}

/*  The item code cell and the read-only stock cell. Both are used by every
    transaction grid and neither was defined, so the code box sat at a
    different height from the boxes beside it and the whole row looked out of
    line. */
.txn-grid .gi.codesearch{font-family:'Consolas','Courier New',monospace}
.txn-grid td.onhand{color:var(--clr-muted);font-variant-numeric:tabular-nums}

/*  Figures line up column to column only if the digits are the same width.
    Without this a 1 is narrower than an 8 and a column of totals wanders. */
.txn-grid td.r,.txn-grid .gi.qty,.txn-grid .gi.rate,.txn-grid .gi.disc{
  font-variant-numeric:tabular-nums}

/*  A line whose wording was chosen rather than copied from the item master.
    Marked so a reader can tell the two apart at a glance. */
.txn-grid .ov-mark{color:var(--clr-primary);font-weight:700;margin-inline-start:3px}
.txn-grid td.itemname{cursor:pointer}
.txn-grid td.itemname:hover{background:var(--clr-primary-soft)}

/*  The item name is the widest thing in a transaction line and the only column
    that has no fixed width, so it absorbs whatever is left. Below this it is
    not worth showing, and the grid scrolls sideways instead -- which is what
    .txn-grid-wrap is already there for. */
.txn-grid td.itemname,.txn-grid th.namecol{min-width:240px;max-width:520px}

/*------------------------------------------------------------------------------
  ENGLISH AND ARABIC, SIDE BY SIDE

  A dialog holding a name in two languages puts them next to each other. Stacked
  they scroll, and the second one -- usually the one being filled -- ends up
  below the fold.

  Global rather than per screen: every form with an English and an Arabic name
  wants the same shape.
------------------------------------------------------------------------------*/
.nm-body{padding:14px 16px 10px}
.nm-body .row{gap:14px}
.nm-body .field{display:flex;flex-direction:column}

/*  Tall enough for a long description, short enough that the footer stays on
    screen on a laptop. */
.nm-name{min-height:120px;max-height:34vh;resize:vertical;line-height:1.45}

/*  An Arabic field reads right to left and looks it, so nobody has to check
    which box they are in. */
.field-ar .ctl,input[data-arabic="1"],textarea[data-arabic="1"]{
  direction:rtl;text-align:right;
  font-family:'Segoe UI','Tahoma','Arial',sans-serif}

/*  And it is marked while the caret is in it, since the keys are typing
    something other than what is printed on them. */
input[data-arabic="1"]:focus,textarea[data-arabic="1"]:focus{
  border-color:var(--clr-primary);
  box-shadow:0 0 0 2px var(--clr-primary-soft,rgba(37,99,235,.15))}

.field-label-ar{direction:rtl}

/*  The convert column of a transaction list, once the document has been
    converted: the number it became, and a way to clear the row away. */
.list-grid td.conv-done{white-space:nowrap}
.list-grid td.conv-done a{font-family:'Consolas','Courier New',monospace;
                          color:var(--clr-primary);text-decoration:none}
.list-grid td.conv-done a:hover{text-decoration:underline}
.list-grid td.conv-done .lhide{color:var(--clr-muted);font-size:14px;
                               margin-inline-start:6px}
.list-grid td.conv-done .lhide:hover{color:var(--clr-danger,#c0392b)}

/*  The convert button itself sits inside a narrow cell, so it loses the
    padding a form button carries. */
.list-grid td .lconv{padding:2px 8px;font-size:11.5px;line-height:1.6}

/*------------------------------------------------------------------------------
  RECEIPT / PAYMENT PANEL

  A short grid inside a dialog, not a transaction grid on a page. The row height
  and padding of the entry grid are tuned for a hundred lines seen at once;
  three or four lines in a dialog want more room, or they read as cramped
  against the dialog's own edges.

  Global rather than per screen: a receipt looks the same wherever it is taken.
------------------------------------------------------------------------------*/
.pay-grid{width:100%;border-collapse:separate;border-spacing:0}
.pay-grid th{
  padding:8px 10px;text-align:left;font-size:11.5px;font-weight:600;
  letter-spacing:.02em;text-transform:uppercase;
  color:var(--clr-muted,#6b7280);
  background:var(--clr-surface-alt,#f8fafc);
  border-bottom:1px solid var(--clr-border,#e5e7eb)}
.pay-grid th.r{text-align:right}
.pay-grid th.c{text-align:center}
.pay-grid td{padding:6px 8px;border-bottom:1px solid var(--clr-border-soft,#f1f5f9);
             vertical-align:middle}
.pay-grid tr:last-child td{border-bottom:0}
.pay-grid .gi{width:100%;height:32px;padding:4px 8px;line-height:1.4}
.pay-grid .gi:disabled{background:var(--clr-surface-alt,#f8fafc);
                       color:var(--clr-muted,#9ca3af);cursor:not-allowed}
.pay-grid input[type="number"]{text-align:right}

/*  Removing a line: quiet until it is wanted. */
.pay-grid .lx{border:0;background:transparent;cursor:pointer;
              color:var(--clr-muted,#9ca3af);font-size:17px;line-height:1;
              padding:2px 6px;border-radius:4px}
.pay-grid .lx:hover{color:var(--clr-danger,#c0392b);
                    background:var(--clr-danger-soft,rgba(192,57,43,.08))}

/*  The three figures under the grid. The balance is the one being watched, so
    it is the one that carries weight. */
.pay-sum{display:flex;justify-content:flex-end;gap:26px;
         padding:12px 12px 4px;font-size:12.5px}
.pay-sum span{color:var(--clr-muted,#6b7280)}
.pay-sum b{margin-inline-start:8px;color:var(--clr-text,#1f2937);
           font-variant-numeric:tabular-nums}
.pay-sum .grand b{font-size:15px;font-weight:700;color:var(--clr-primary)}

/*  Said in words beside the figures, and coloured by what it means. */
.pay-note{font-size:12px;font-weight:600}
.pay-note.ok{color:var(--clr-success,#15803d)}
.pay-note.short{color:var(--clr-warn,#b45309)}
.pay-note.over{color:var(--clr-danger,#c0392b)}

.pay-body{padding:4px 6px 10px}

/*  A document number carried inside a button, beside its label.

    Smaller and lighter than the label so it reads as a fact about the button
    rather than part of what the button does. Kept on one line: a second line
    makes the cell taller than its neighbours and pulls the whole row out of
    alignment, which is what putting it underneath did. */
.btn-erp .rfnd-no{
  margin-inline-start:6px;padding-inline-start:6px;
  border-inline-start:1px solid currentColor;
  font-size:10.5px;font-weight:400;opacity:.75;
  font-family:'Consolas','Courier New',monospace;
  white-space:nowrap}
.btn-erp.rfnd{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/*  A limit shown beside the field it limits.

    Read-only and quieter than the number being typed, so the eye lands on the
    editable cell -- but tabular figures, because the two are compared at a
    glance and ragged digits make that harder than it needs to be. */
.txn-grid td.bal{
  color:var(--clr-muted,#6b7280);
  font-variant-numeric:tabular-nums;
  background:var(--clr-surface-alt,#f8fafc)}
/*  A quotation with nothing left on it, shown only when asked for. Marked
    rather than hidden, and quiet: it is context, not a warning. */
.qt-done{color:var(--clr-success,#15803d);font-weight:700;margin-inline-start:4px}

/*  A picker row that is already on the document being built.

    The tick alone is easy to miss in a long list, so the quantity already
    taken is shown beside it and the heading of any document with lines on the
    invoice carries a marker. Quiet: this is state, not a warning. */
.pm-tbl td.taken{color:var(--clr-primary);font-weight:600;
                 font-variant-numeric:tabular-nums}
.pm-tbl tr.pm-grp.has-on td{border-inline-start:3px solid var(--clr-primary)}
.pm-tbl tr.pm-grp.has-on td::after{
  content:'';display:inline-block;width:6px;height:6px;border-radius:50%;
  background:var(--clr-primary);margin-inline-start:8px;vertical-align:middle}

/*  The working, then the answer.

    Delivered and already-invoiced are context: quieter, so the eye is not
    asked to weigh four numbers equally. What is left to invoice is the one
    being acted on, so it carries the weight. All tabular figures, because the
    row only makes sense read across. */
.pm-tbl td.dq,
.pm-tbl td.iq{color:var(--clr-muted,#6b7280);font-variant-numeric:tabular-nums}
.pm-tbl td.avail{font-weight:700;font-variant-numeric:tabular-nums}

/*  How an invoice was raised, in a picker row.

    A quiet tag rather than a colour-coded badge: it is a fact about the
    document, not a warning about it. The delivery numbers sit underneath in
    smaller type, because they are what somebody holding a signed note will
    quote, but they are longer than the tag and should not lead. */
.org-tag{display:inline-block;padding:1px 7px;border-radius:10px;
  font-size:11px;font-weight:600;letter-spacing:.02em;
  background:var(--clr-surface-2,#f1f5f9);color:var(--clr-muted,#6b7280);
  border:1px solid var(--clr-border,#e2e8f0)}
.org-tag.delivery{background:#eef6ff;color:#1d4ed8;border-color:#c7ddff}
.org-tag.mixed{background:#fff7ed;color:#c2410c;border-color:#fed7aa}
.org-dlv{display:block;margin-top:2px;font-size:11px;
  color:var(--clr-muted,#6b7280);font-variant-numeric:tabular-nums}


/*  The party position on a cash voucher: what they owe, what is already on
    account, and the net. Sits under the party name.                        */
.pp-balance{display:flex;gap:18px;flex-wrap:wrap;margin-top:4px;min-height:18px}
.pp-balance .pb-item{display:flex;align-items:baseline;gap:6px;font-size:12px}
.pp-balance .pb-lbl{color:var(--muted,#6b7280)}
.pp-balance .pb-val{font-weight:600;font-variant-numeric:tabular-nums}
.pp-balance .pb-adv{color:var(--warn,#b45309)}
.pp-balance .pb-net{color:var(--accent,#1d4ed8)}
.pp-balance .pb-err{color:var(--danger,#b91c1c);font-size:12px}


/* tab panes: entry vs list */
/*  A light wash so the two are told apart at a glance without either looking
    like a different application. Entry stays the paper the rest of the system
    uses; the list sits a shade cooler, because it is a place you look rather
    than a place you type. */
.tabpane{background:var(--surface,#fff);border-radius:6px}
#tabTxn{background:var(--surface,#fff)}
#tabList{background:var(--surface-alt,#f7f9fc);padding:12px;border:1px solid var(--line,#e5e7eb)}
.tab-strip .tab-btn[data-tab="list"].active{background:var(--surface-alt,#f7f9fc)}


/*  The balance column in the party picker. A party who owes nothing is left
    blank rather than showing a zero: the eye should land on the ones that
    matter.                                                                 */
.erp-tbl td.pk-owes{font-weight:600;font-variant-numeric:tabular-nums;color:var(--accent,#1d4ed8)}
.erp-tbl td.pk-clear{color:var(--muted,#9ca3af)}

.list-grid td.pl-err{color:var(--danger,#b91c1c);white-space:normal;text-align:left}


/*  The allocation grid footer. Outstanding is the figure the conversation is
    about, so it carries the weight; the label sits quietly to its left.     */
.pg tfoot td{border-top:2px solid var(--line,#e5e7eb);font-weight:600;
             font-variant-numeric:tabular-nums;padding-top:6px}
.pg tfoot td.pf-lbl{font-weight:500;color:var(--muted,#6b7280)}
.pg tfoot td.pf-out{color:var(--accent,#1d4ed8)}
.pg tfoot td.pf-alloc{color:var(--ok,#047857)}
/*  The out-of-balance figure on a contra voucher: shown only when there is
    one, so it should be impossible to miss when it appears.              */
.pg tfoot td.pf-diff{color:var(--danger,#b91c1c)}


/* ==========================================================================
   Cash voucher tab colours

   The TAB BUTTONS only. Four vouchers share one screen and the tab is where
   the eye goes first, so that is where the colour belongs -- the panes below
   keep the same paper as every other screen in the system.

   An earlier version washed the whole pane. It made four vouchers look like
   four different applications, which is not what a tint is for.

   The class comes from the voucher role, so nothing here is decided in code.
   ========================================================================== */
.pv-cust-receipt .tab-btn{background:#f6fbf8;color:#1d6b41}
.pv-cust-payment .tab-btn{background:#fdf7f7;color:#8f2f2b}
.pv-supp-payment .tab-btn{background:#faf7fd;color:#54388f}
.pv-supp-receipt .tab-btn{background:#f5fafd;color:#215c85}
.pv-cust-receipt .tab-btn.active{background:#cdebd9;color:#14532d;
                                         border-bottom:3px solid #2f9e5f}
.pv-cust-payment .tab-btn.active{background:#f7d6d4;color:#7f1d1d;
                                         border-bottom:3px solid #c0453f}
.pv-supp-payment .tab-btn.active{background:#e4d9f7;color:#4c1d95;
                                         border-bottom:3px solid #7c56c9}
.pv-supp-receipt .tab-btn.active{background:#d2e9f7;color:#0c4a6e;
                                         border-bottom:3px solid #2f80b8}


/*  Where a voucher came from, in the list. A row created by a document cannot
    be edited or deleted, so it should not look like one that can.          */
.list-grid .lo{display:inline-block;padding:1px 8px;border-radius:10px;font-size:11px;white-space:nowrap}
.list-grid .lo-doc{background:#eef2ff;color:#3730a3}
.list-grid .lo-vch{background:#f1f5f9;color:#475569}
.pv-owned{margin-bottom:10px}


/* ==========================================================================
   Voucher entry screens

   These were written inline in PaymentVoucher.aspx and copied into
   ContraVoucher.aspx, which put the same rules in two pages and neither in
   the stylesheet. Style belongs here.

   The pp- prefix is kept because both screens already use it; renaming it
   would touch markup for no gain.
   ========================================================================== */
.pp-wrap{padding:16px}
.pp-ro{display:block;border-bottom:1px dotted #cbd5e1;padding:6px 2px;min-height:32px}
.pp-pick{display:flex;gap:4px}
.pp-pick .ctl{flex:1 1 auto;min-width:0}
.pp-pick-btn{flex:0 0 auto;width:32px;border:1px solid #cbd5e1;background:#f8fafc;
                     border-radius:7px;cursor:pointer;color:#475569}
.pp-pick-btn:hover{background:#eef2f7}
.pp-empty{padding:22px;text-align:center;color:var(--clr-muted,#6b7280);font-size:13px}
.pp-foot{display:flex;flex-wrap:wrap;gap:22px;justify-content:flex-end;align-items:center;
                 padding:11px 14px;background:#f8fafc;border-top:1px solid #dde3ec;font-size:13px}
.pp-foot b{font-size:15px;color:#0f2740;margin-inline-start:6px}
.pp-foot .adv b{color:#b45309}
.pp-foot .over b{color:#b91c1c}
.pp-note{font-size:11.5px;color:#475569;background:#f8fafc;border:1px solid #e5e7eb;
                 border-radius:7px;padding:7px 11px;margin:0 14px 12px}
.actions{display:flex;gap:8px;flex-wrap:wrap;padding-top:4px}
.actions .right{margin-inline-start:auto;display:flex;gap:8px}

/*  Expense voucher: a document with lines on it, which is what an expense
    voucher is -- several heads paid on one piece of paper.               */
.icon-expense{-webkit-mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M6%202h9l3%203v15l-3-2-3%202-3-2-3%202V2z'/><path%20d='M9%208h6'/><path%20d='M9%2012h6'/><path%20d='M9%2016h3'/></svg>");mask-image:url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M6%202h9l3%203v15l-3-2-3%202-3-2-3%202V2z'/><path%20d='M9%208h6'/><path%20d='M9%2012h6'/><path%20d='M9%2016h3'/></svg>");}
/* AI Assistant menu (ai-v4): a robot head, same 24px / stroke 2 style as the set */
.icon-ai{-webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%208V4H8'/%3E%3Crect%20x='4'%20y='8'%20width='16'%20height='12'%20rx='2'/%3E%3Cpath%20d='M2%2014h2'/%3E%3Cpath%20d='M20%2014h2'/%3E%3Cpath%20d='M15%2013v2'/%3E%3Cpath%20d='M9%2013v2'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%208V4H8'/%3E%3Crect%20x='4'%20y='8'%20width='16'%20height='12'%20rx='2'/%3E%3Cpath%20d='M2%2014h2'/%3E%3Cpath%20d='M20%2014h2'/%3E%3Cpath%20d='M15%2013v2'/%3E%3Cpath%20d='M9%2013v2'/%3E%3C/svg%3E");}
/* Messages (msg-v1): chats, general messages, the bell */
.icon-message{-webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M21%2015a2%202%200%200%201-2%202H7l-4%204V5a2%202%200%200%201%202-2h14a2%202%200%200%201%202%202z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M21%2015a2%202%200%200%201-2%202H7l-4%204V5a2%202%200%200%201%202-2h14a2%202%200%200%201%202%202z'/%3E%3C/svg%3E");}
.icon-megaphone{-webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='m3%2011%2018-5v12L3%2014v-3z'/%3E%3Cpath%20d='M11.6%2016.8a3%203%200%201%201-5.8-1.6'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='m3%2011%2018-5v12L3%2014v-3z'/%3E%3Cpath%20d='M11.6%2016.8a3%203%200%201%201-5.8-1.6'/%3E%3C/svg%3E");}
.icon-bell{-webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M18%208A6%206%200%200%200%206%208c0%207-3%209-3%209h18s-3-2-3-9'/%3E%3Cpath%20d='M13.73%2021a2%202%200%200%201-3.46%200'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M18%208A6%206%200%200%200%206%208c0%207-3%209-3%209h18s-3-2-3-9'/%3E%3Cpath%20d='M13.73%2021a2%202%200%200%201-3.46%200'/%3E%3C/svg%3E");}
.icon-factory{-webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M2%2020h20'/%3E%3Cpath%20d='M3%2020V9l5%203V9l5%203V9l5%203V4h3v16'/%3E%3Cpath%20d='M7%2016h2'/%3E%3Cpath%20d='M12%2016h2'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M2%2020h20'/%3E%3Cpath%20d='M3%2020V9l5%203V9l5%203V9l5%203V4h3v16'/%3E%3Cpath%20d='M7%2016h2'/%3E%3Cpath%20d='M12%2016h2'/%3E%3C/svg%3E");}
.icon-recipe{-webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='5'%20y='3'%20width='14'%20height='18'%20rx='2'/%3E%3Cpath%20d='M9%203v2h6V3'/%3E%3Cpath%20d='M9%2010h6'/%3E%3Cpath%20d='M9%2014h6'/%3E%3Cpath%20d='M9%2018h3'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='5'%20y='3'%20width='14'%20height='18'%20rx='2'/%3E%3Cpath%20d='M9%203v2h6V3'/%3E%3Cpath%20d='M9%2010h6'/%3E%3Cpath%20d='M9%2014h6'/%3E%3Cpath%20d='M9%2018h3'/%3E%3C/svg%3E");}


/* ==========================================================================
   Lookup panels

   The account and payee pickers. Written here rather than inline on each
   screen, so a picker looks the same wherever one appears.
   ========================================================================== */
.pick-panel{position:fixed;z-index:9999;max-height:300px;overflow-y:auto;
            background:#fff;border:1px solid var(--line,#c3ccdf);border-radius:6px;
            box-shadow:0 8px 24px rgba(20,30,60,.18)}
.pick-panel .pick-tbl{width:100%;border-collapse:collapse;table-layout:fixed;font-size:12.5px}
.pick-panel .pick-tbl th{position:sticky;top:0;background:#2b3a67;color:#fff;font-weight:600;
                         text-align:left;padding:7px 10px;font-size:12px;
                         border-right:1px solid #46567f}
.pick-panel .pick-tbl th:last-child{border-right:0}
.pick-panel .pick-tbl th.r,.pick-panel .pick-tbl td.r{text-align:right}
.pick-panel .pick-tbl td{padding:6px 10px;border-bottom:1px solid #edf0f6;
                         white-space:normal;word-break:break-word;color:#1f2937}
.pick-panel .pick-tbl td.mono{font-family:Consolas,monospace;color:#4a5568;white-space:nowrap}
.pick-panel .pick-kind{color:#7c3aed;font-weight:600;white-space:nowrap}
.pick-panel .pick-row{cursor:pointer}
.pick-panel .pick-row.sel td{background:#dbe3f4}
.pick-panel .pick-empty{padding:14px;color:var(--muted,#6b7280);text-align:center}

/*  A payee row carries a code, a name, a kind and a balance, so it needs more
    room than a two-column lookup.                                           */
.pick-wide{min-width:720px}


/*  A field switched off because it does not apply -- the cash boxes on a
    credit expense. Dimmed and disabled rather than hidden, so the row keeps
    its shape and nothing jumps about as the mode changes.                   */
.field.is-off{opacity:.45}
.field.is-off .ctl{background:var(--surface-alt,#f7f9fc);cursor:not-allowed}


/*  The account name in a transaction grid.

    One line, like every other cell. Wrapping it made the row grow to two lines
    whenever a name was long, and a grid whose rows change height as you type
    is worse to read than a name that ends in an ellipsis.

    The full text is on the cell as a tooltip instead, and the column was
    widened to make truncation rarer.                                        */
.txn-grid td.gname{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}


/*  Movement switched off for a moment.

    Used when the sidebar collapses because a screen was opened: the collapse
    is a consequence of the click, not something to watch happen, and animating
    it while the screen loads reads as the menu hanging.                     */
.app.no-anim,
.app.no-anim *{transition:none !important;animation:none !important}


/*==============================================================================
  APPEND TO THE END OF erp.css

  Nothing else in the file changes. These are the only rules the breadcrumb
  trail needs, and no selector here appears anywhere above -- .breadcrumb, .sep
  and .current are untouched.
==============================================================================*/

/*==============================================================================
  THE MENU TRAIL IN THE BREADCRUMB

  Home / Cost center / General ledger

  The trailing entries are the menus the active form sits under. Clicking one
  opens that folder in the sidebar and marks the way down to the page; the tab
  does not change.

  Shown only when TOP_MENU_VISIBLE is TRUE. When it is not, erp-crumb-trail.js
  never writes anything into the host and these rules match nothing.
==============================================================================*/

/*  inline-flex rather than inline, so the trail inherits the gap the
    breadcrumb already sets on its own children instead of carrying a second
    set of margins that would have to be kept in step with it.               */
.breadcrumb #crumbTrail {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
}

/*  A button, not a link.

    It moves the sidebar rather than navigating, and a link that does not
    navigate is a promise the page does not keep -- middle-click, copy address
    and open-in-new-tab all do nothing on it.                                */
.breadcrumb .crumb-menu {
    border: 0;
    background: transparent;
    padding: 0;
    font: inherit;
    line-height: inherit;
    color: var(--clr-primary);
    cursor: pointer;
}

    .breadcrumb .crumb-menu:hover {
        text-decoration: underline;
    }

/*  The current form keeps the weight: the trail behind it is the way back,
    not the thing being looked at.                                           */
.breadcrumb .crumb-menu {
    font-weight: 400;
}

/*  Printed, the breadcrumb is already hidden by the print rule further up, so
    nothing is needed here.                                                  */


/*==============================================================================
  erp.css  |  HR module additions

  Extracted from the <style> blocks that were sitting inside five HR screens.
  Inline style is not allowed in this codebase and I put it there anyway --
  five times, while writing comments about following conventions.

  APPEND THIS TO Content/css/erp.css. It is written as an addition rather than
  a replacement because erp.css is not mine to rewrite.

  Every class here is prefixed by the screen that owns it, so nothing collides
  with a rule already in erp.css and a selector can be traced to the one screen
  that needs it.
==============================================================================*/


/*---- PayrollRun.aspx -----------------------------------------------*/
/*  The status, said once and prominently. A payroll that has been
            approved behaves completely differently from one that has not, and
            the reader should never have to work out which they are looking at. */
.run-status {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
}

.st-DRAFT {
    background: #eef0f4;
    color: #4b5563;
}

.st-CALCULATED {
    background: #e7f0ff;
    color: #1d4ed8;
}

.st-REVIEWED {
    background: #fff4e0;
    color: #b45309;
}

.st-APPROVED {
    background: #e8f7ee;
    color: #166534;
}

.st-POSTED {
    background: #e6f6f4;
    color: #0f766e;
}

.st-PAID {
    background: #e6f6f4;
    color: #0f766e;
}

.st-REVERSED {
    background: #fdeaea;
    color: #b91c1c;
}

/*  Four numbers people actually look at. */
.kpi-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.kpi {
    flex: 1 1 150px;
    border: 1px solid var(--clr-border,#e3e6ef);
    border-radius: var(--radius,6px);
    padding: 8px 12px;
    background: var(--clr-surface-alt,#fafbfd);
}

.kpi-label {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--clr-muted,#6C7293);
}

.kpi-value {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
}

/*  A flagged variance. Not red -- it is a question, not an error. */
.var-flag {
    background: #fff8e6;
}

.var-new {
    background: #eef4ff;
}

.chg-up {
    color: #166534;
    font-weight: 600;
}

.chg-down {
    color: #b91c1c;
    font-weight: 600;
}

.why {
    font-size: 10.5px;
    color: var(--clr-muted,#6C7293);
    text-transform: uppercase;
    letter-spacing: .04em;
}

/*  A row that opens something should say so before it is clicked. */
.row-open {
    cursor: pointer;
}

    .row-open:hover {
        background: var(--clr-surface-alt,#f4f6fb);
    }

.lnk-undo {
    font-size: 11px;
}

/*  The amendment dialog. A payslip is a lot of numbers about one
            person, and it deserves the screen rather than a panel appended
            under a grid the reader has scrolled past. */
.pay-modal {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: rgba(17,24,39,.45);
    padding: 28px 16px;
    overflow-y: auto;
}

.pay-modal-box {
    background: var(--clr-surface,#fff);
    border-radius: var(--radius,8px);
    box-shadow: 0 18px 48px rgba(17,24,39,.28);
    width: 100%;
    max-width: 1080px;
    overflow: hidden;
}

/*  The header answers "am I about to change the right person's pay"
            before anything below it is read. */
.pay-modal-head {
    padding: 16px 22px;
    border-bottom: 1px solid var(--clr-border,#e3e6ef);
    background: var(--clr-surface-alt,#fafbfd);
    display: flex;
    align-items: flex-start;
    gap: 18px;
}

.pmh-code {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: .02em;
}

.pmh-name {
    font-size: 15px;
    font-weight: 600;
    margin-top: 2px;
}

.pmh-meta {
    margin-top: 6px;
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
}

.pmh-item {
    min-width: 0;
}

.pmh-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--clr-muted,#6C7293);
}

.pmh-value {
    font-size: 13px;
    font-weight: 600;
}

.pay-modal-close {
    margin-inline-start: auto;
    border: 0;
    background: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: var(--clr-muted,#6C7293);
    padding: 0 4px;
}

    .pay-modal-close:hover {
        color: var(--clr-text,#1f2937);
    }

.pay-modal-body {
    padding: 18px 22px 22px;
    max-height: 70vh;
    overflow-y: auto;
}

    .pay-modal-body .section-card {
        margin-bottom: 16px;
    }

        .pay-modal-body .section-card:last-child {
            margin-bottom: 0;
        }

/*---- EmployeeAdvance.aspx ------------------------------------------*/
.adv-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 11px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
}

.st-REQUESTED {
    background: #eef0f4;
    color: #4b5563;
}

.st-APPROVED {
    background: #e7f0ff;
    color: #1d4ed8;
}

.st-PAID {
    background: #e8f7ee;
    color: #166534;
}

.st-RECOVERING {
    background: #fff4e0;
    color: #b45309;
}

.st-CLEARED {
    background: #e6f6f4;
    color: #0f766e;
}

.st-CANCELLED {
    background: #fdeaea;
    color: #b91c1c;
}

.adv-kpi {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

    .adv-kpi div {
        flex: 1 1 150px;
        border: 1px solid var(--clr-border,#e3e6ef);
        border-radius: var(--radius,6px);
        padding: 8px 12px;
        background: var(--clr-surface-alt,#fafbfd);
    }

    .adv-kpi .k {
        font-size: 10.5px;
        text-transform: uppercase;
        letter-spacing: .05em;
        color: var(--clr-muted,#6C7293);
    }

    .adv-kpi .v {
        font-size: 18px;
        font-weight: 700;
    }

.why {
    font-size: 10.5px;
    color: var(--clr-muted,#6C7293);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.row-open {
    cursor: pointer;
}

    .row-open:hover {
        background: var(--clr-surface-alt,#f4f6fb);
    }

/*  An instalment already taken should not read the same as one still
            to come: the first is history, the second is a promise. */
.inst-done {
    color: var(--clr-muted,#6C7293);
}

.inst-part {
    background: #fff8e6;
}

.pay-modal {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: rgba(17,24,39,.45);
    padding: 28px 16px;
    overflow-y: auto;
}

.pay-modal-box {
    background: var(--clr-surface,#fff);
    border-radius: var(--radius,8px);
    box-shadow: 0 18px 48px rgba(17,24,39,.28);
    width: 100%;
    max-width: 520px;
}

.pay-modal-head {
    padding: 16px 22px;
    border-bottom: 1px solid var(--clr-border,#e3e6ef);
    background: var(--clr-surface-alt,#fafbfd);
    font-size: 17px;
    font-weight: 700;
}

.pay-modal-body {
    padding: 18px 22px 22px;
}

/*---- Holiday.aspx --------------------------------------------------*/
.why {
    font-size: 10.5px;
    color: var(--clr-muted,#6C7293);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.row-open {
    cursor: pointer;
}

    .row-open:hover {
        background: var(--clr-surface-alt,#f4f6fb);
    }

/*  Coverage first, because a year with no holidays is the fault this
            screen exists to catch, and it cannot be seen in a list of rows
            that are there. */
.cov {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

    .cov div {
        border: 1px solid var(--clr-border,#e3e6ef);
        border-radius: var(--radius,6px);
        padding: 8px 14px;
        min-width: 110px;
        background: var(--clr-surface-alt,#fafbfd);
    }

    .cov .c {
        font-size: 11px;
        font-weight: 700;
        letter-spacing: .03em;
    }

    .cov .y {
        font-size: 10.5px;
        color: var(--clr-muted,#6C7293);
    }

    .cov .n {
        font-size: 20px;
        font-weight: 700;
        margin-top: 2px;
    }

    .cov .none {
        border-color: #f0c9c9;
        background: #fdf5f5;
    }

        .cov .none .n {
            color: #b91c1c;
        }

.lock-tag {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 11px;
    font-size: 10.5px;
    font-weight: 700;
    background: #eef0f4;
    color: #4b5563;
}

.paid-no {
    color: #b45309;
}

.pay-modal {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: rgba(17,24,39,.45);
    padding: 28px 16px;
    overflow-y: auto;
}

.pay-modal-box {
    background: var(--clr-surface,#fff);
    border-radius: var(--radius,8px);
    box-shadow: 0 18px 48px rgba(17,24,39,.28);
    width: 100%;
    max-width: 520px;
}

.pay-modal-head {
    padding: 16px 22px;
    border-bottom: 1px solid var(--clr-border,#e3e6ef);
    background: var(--clr-surface-alt,#fafbfd);
    font-size: 17px;
    font-weight: 700;
}

.pay-modal-body {
    padding: 18px 22px 22px;
}

/*---- EmployeeChange.aspx -------------------------------------------*/
.why {
    font-size: 10.5px;
    color: var(--clr-muted,#6C7293);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.row-open {
    cursor: pointer;
}

    .row-open:hover {
        background: var(--clr-surface-alt,#f4f6fb);
    }

.chg-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 11px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
}

.st-REQUESTED {
    background: #eef0f4;
    color: #4b5563;
}

.st-APPROVED {
    background: #e7f0ff;
    color: #1d4ed8;
}

.st-APPLIED {
    background: #e8f7ee;
    color: #166534;
}

.st-CANCELLED {
    background: #fdeaea;
    color: #b91c1c;
}

/*  A rise and a cut should not look alike at a glance. The colour
            follows the direction, not whether it is good news. */
.up {
    color: #166534;
    font-weight: 600;
}

.down {
    color: #b91c1c;
    font-weight: 600;
}

/*  A row somebody has actually changed, against the many they have
            not. Without this the grid is thirteen identical lines. */
.changed {
    background: #fff8e6;
}

/*  What they are on now. Tiles rather than a form, because nothing
            here is editable and laying it out as fields invites a click.

            A GRID, not flex-wrap. Flex sizes each tile to its own content, so
            "Current designation" wrapping to two lines pushed its value down
            while "Joined" stayed up -- six values at four different heights.
            Equal columns make every tile the same width, and stretch makes
            them the same height, whatever any translation does to the labels. */
.cur {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
}

    /*  Two rows per tile: the label takes what it needs, the value is
            pushed to the bottom by margin-top:auto. That is what puts every
            value on the same line even when one label wraps and another
            does not -- and it keeps working in Arabic and French, where the
            wrapping is different again. */
    .cur .f {
        display: flex;
        flex-direction: column;
        border: 1px solid var(--clr-border,#e3e6ef);
        border-radius: var(--radius,6px);
        padding: 8px 12px;
        background: var(--clr-surface-alt,#fafbfd);
        min-width: 0;
    }

    .cur .k {
        font-size: 10.5px;
        text-transform: uppercase;
        letter-spacing: .05em;
        color: var(--clr-muted,#6C7293);
        line-height: 1.35;
    }

    .cur .v {
        font-size: 15px;
        font-weight: 600;
        margin-top: auto;
        padding-top: 4px;
        /*  A long designation must not widen the column and break the
                    grid; it wraps inside its own tile instead. */
        overflow-wrap: anywhere;
    }

/*  Two columns on a narrow screen, one on a phone. Six tiles across
            at 380px would be unreadable. */
@media (max-width: 900px) {
    .cur {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .cur {
        grid-template-columns: 1fr;
    }
}

.pay-modal {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: rgba(17,24,39,.45);
    padding: 28px 16px;
    overflow-y: auto;
}

.pay-modal-box {
    background: var(--clr-surface,#fff);
    border-radius: var(--radius,8px);
    box-shadow: 0 18px 48px rgba(17,24,39,.28);
    width: 100%;
    max-width: 520px;
}

.pay-modal-head {
    padding: 16px 22px;
    border-bottom: 1px solid var(--clr-border,#e3e6ef);
    background: var(--clr-surface-alt,#fafbfd);
    font-size: 17px;
    font-weight: 700;
}

.pay-modal-body {
    padding: 18px 22px 22px;
}

/*---- AttendanceReview.aspx -----------------------------------------*/
.why {
    font-size: 10.5px;
    color: var(--clr-muted,#6C7293);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.row-open {
    cursor: pointer;
}

    .row-open:hover {
        background: var(--clr-surface-alt,#f4f6fb);
    }

/*  Absence is what this screen is for finding, so it is the only
            status that is coloured. Making every status a colour would make
            none of them stand out. */
.st-ABSENT {
    color: #b91c1c;
    font-weight: 700;
}

.st-LEAVE, .st-LEAVE_UNPAID {
    color: #b45309;
}

.st-WEEKEND, .st-HOLIDAY {
    color: var(--clr-muted,#6C7293);
}

/*  A day somebody corrected. Tinted rather than badged, so a month
            with many of them reads as a pattern at a glance -- which is
            usually a device problem rather than a discipline one. */
.manual {
    background: #fff8e6;
}

.locked {
    background: #f4f6fb;
    color: var(--clr-muted,#6C7293);
}

.tag {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 11px;
    font-size: 10.5px;
    font-weight: 700;
    background: #eef0f4;
    color: #4b5563;
}

.pay-modal {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: rgba(17,24,39,.45);
    padding: 28px 16px;
    overflow-y: auto;
}

.pay-modal-box {
    background: var(--clr-surface,#fff);
    border-radius: var(--radius,8px);
    box-shadow: 0 18px 48px rgba(17,24,39,.28);
    width: 100%;
    max-width: 560px;
}

.pay-modal-head {
    padding: 16px 22px;
    border-bottom: 1px solid var(--clr-border,#e3e6ef);
    background: var(--clr-surface-alt,#fafbfd);
    font-size: 17px;
    font-weight: 700;
}

.pay-modal-body {
    padding: 18px 22px 22px;
}
.field-label:empty::before {
    content: "\00A0";
}


/*==============================================================================
  APPEND TO THE END OF Content/css/erp.css

  THE EMPLOYEE SEARCH CONTROL

  A dropdown works at forty records and fails at ten thousand. Above twenty,
  a code box with a lookup beside it replaces it everywhere in the system:

      [ 10211002              x ] [search]  Anil Kumar Nair

  Three parts, and each earns its place:

    the box      a code can be typed straight in by somebody who knows it,
                 which is faster than any picker
    the clear    sits INSIDE the box, because it belongs to the value rather
                 than beside it as a fourth control
    the lookup   opens the modal for when the code is not known

  The name to the right is the confirmation. Without it, a typed code is a
  number somebody hopes is right.

  Built on the .erp-modal and .erp-tbl classes already in this sheet, so the
  modal matches every other picker in the system and a change there reaches
  this too.
==============================================================================*/

/*  The row: box, then button, then the name. ---------------------------- */
.emp-find {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    min-width: 0;
}

/*  The box and its clear button share a box, so the x can sit inside the
    field rather than after it.                                            */
.emp-find-box {
    position: relative;
    flex: 0 0 auto;
    width: 180px;
    min-width: 0;
}

    .emp-find-box .ctl {
        width: 100%;
        /*  Room for the x, so a long code does not run underneath it.           */
        padding-inline-end: 26px;
    }

/*  The clear. Inside the field, quiet until the field has something in it,
    and it never takes the tab focus -- somebody tabbing through a form is
    going somewhere, not clearing a value.                                 */
.emp-find-clear {
    position: absolute;
    inset-inline-end: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    border-radius: 50%;
    color: var(--clr-muted,#6C7293);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

    .emp-find-clear:hover {
        background: var(--clr-border,#e8eaf0);
        color: var(--clr-danger,#DE3B3B);
    }
    /*  Nothing to clear: no button. Shown by the server, so it cannot disagree
    with whether a value is actually held.                                 */
    .emp-find-clear[hidden] {
        display: none;
    }

.emp-find-btn {
    flex: 0 0 auto;
    width: 32px;
    height: var(--ctl-h,30px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--clr-border-strong,#D3D7E3);
    background: var(--clr-surface-alt,#f8fafc);
    border-radius: var(--radius-sm,4px);
    cursor: pointer;
    color: var(--clr-muted,#475569);
    font-size: 13px;
    line-height: 1;
}

    .emp-find-btn:hover {
        background: var(--clr-border,#eef2f7);
        color: var(--clr-text,#0f2740);
        border-color: #B9BFD1;
    }

/*  The name. This is the confirmation that the code was right, so it is
    readable rather than a hint -- but it is not an input, so it does not
    get a border that would make it look like one.                        */
.emp-find-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: var(--fs-base,13px);
    font-weight: 600;
    color: var(--clr-text,#0f2740);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
    /*  A code that did not validate. The message says why; this says that the
    box is not holding anybody.                                            */
    .emp-find-name.bad {
        color: var(--clr-danger,#DE3B3B);
        font-weight: 400;
    }

    .emp-find-name.none {
        color: var(--clr-muted,#6C7293);
        font-weight: 400;
    }

/*  A leaver picked deliberately. Findable, and marked, so nobody prints a
    sheet for somebody who left without noticing.                          */
.emp-find-left {
    flex: 0 0 auto;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 10.5px;
    font-weight: 700;
    background: #fff4e0;
    color: #b45309;
    white-space: nowrap;
}

/*  ---- the rows inside the modal --------------------------------------- */

/*  The code leads: it is what the box will hold, and what somebody will
    type next time instead of opening the modal at all.                    */
.emp-row-code {
    font-weight: 700;
    color: var(--clr-primary,#4B49AC);
    font-variant-numeric: tabular-nums;
}

.emp-row-sub {
    display: block;
    font-size: 10.5px;
    color: var(--clr-muted,#6C7293);
    margin-top: 1px;
}
/*  A leaver in the list.                                                  */
.erp-tbl tbody tr.emp-left td {
    background: #fffaf0;
}

.erp-tbl tbody tr.emp-left .emp-row-code {
    color: #b45309;
}

/*  Said when a search hit the cap, because the employee somebody wants may
    be the fifty first and a silent truncation would hide that.            */
.emp-more {
    padding: var(--sp-2) var(--sp-3);
    font-size: var(--fs-sm,12px);
    color: var(--clr-muted,#6C7293);
    background: var(--clr-surface-alt,#f8fafc);
    border-top: 1px solid var(--clr-border,#e8eaf0);
}

@media (max-width:640px) {
    /*  The name drops below the box rather than being squeezed to nothing. */
    .emp-find {
        flex-wrap: wrap;
    }

    .emp-find-box {
        width: 140px;
    }

    .emp-find-name {
        flex: 1 1 100%;
    }
}
/*==============================================================================
  APPEND TO THE END OF Content/css/erp.css

  THE LOADER

  Three rings, turning at different speeds, the middle one against the others.
  A single ring at a constant speed is hard to tell from a frozen image;
  three at different rates cannot be mistaken for a stopped page.

  IT DOES NOT APPEAR IMMEDIATELY

  A loader that flashes on a fast postback is worse than none: the screen
  blinks and the reader loses their place. This one is invisible for the
  first fifth of a second, which covers the great majority of postbacks, and
  fades in only when a page is genuinely slow.

  IT DOES NOT BLOCK READING

  The panel behind stays legible. Somebody waiting for a payroll to total
  should still be able to read the row they were looking at.
==============================================================================*/
/*==============================================================================
  APPEND TO THE END OF Content/css/erp.css

  THE LOADER

  Three rings, turning at different speeds, the middle one against the others.
  A single ring at a constant speed is hard to tell from a frozen image;
  three at different rates cannot be mistaken for a stopped page.

  IT DOES NOT APPEAR IMMEDIATELY

  A loader that flashes on a fast postback is worse than none: the screen
  blinks and the reader loses their place. This one is invisible for the
  first fifth of a second, which covers the great majority of postbacks, and
  fades in only when a page is genuinely slow.

  IT DOES NOT BLOCK READING

  The panel behind stays legible. Somebody waiting for a payroll to total
  should still be able to read the row they were looking at.
==============================================================================*/

.erp-loading {
    position: fixed;
    inset: 0;
    z-index: 9500;
    display: flex;
    align-items: center;
    justify-content: center;
    /*  Light enough to read through. The point is to say "working", not to
      hide what somebody was in the middle of reading.                    */
    background: rgba(248,250,252,.62);
    backdrop-filter: blur(1px);
    opacity: 0;
    pointer-events: none;
    /*  THE DELAY LIVES HERE, NOT IN SCRIPT.

      A full page postback begins navigating the moment the form submits,
      and the browser stops painting the outgoing document soon after. An
      overlay added by a timer 200ms later is added to a document nobody
      is rendering any more, and never appears at all -- which is exactly
      what happened to the first version of this.

      So the element is created and shown IMMEDIATELY, and the fade is
      delayed by the transition instead. The browser has it, painted and
      composited, before it stops; the delay still spares a fast postback
      from flashing.                                                      */
    transition: opacity .18s ease-out .2s;
}

    /*  Added by script only after the wait has been long enough to be worth
    mentioning.                                                           */
    .erp-loading.on {
        opacity: 1;
        pointer-events: auto;
    }

    /*  Going away is immediate: a fade out on a page that has just arrived
    would sit over the new content for a fifth of a second.              */
    .erp-loading:not(.on) {
        transition: opacity .1s ease-out 0s;
    }

.erp-loading-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

/*  ---- the three rings -------------------------------------------------- */
.erp-rings {
    position: relative;
    width: 58px;
    height: 58px;
}

    .erp-rings i {
        position: absolute;
        inset: 0;
        border-radius: 50%;
        border: 2px solid transparent;
        display: block;
    }

        /*  Outer: slowest, and the only one that carries the full accent colour.
    A single moving arc on a circle reads as rotation at a glance.        */
        .erp-rings i:nth-child(1) {
            border-top-color: var(--clr-primary,#4B49AC);
            border-right-color: var(--clr-primary,#4B49AC);
            animation: erp-spin 1.5s linear infinite;
        }

        /*  Middle: turns the OTHER way. This is what makes it unmistakably alive
    rather than a static image with a gradient.                           */
        .erp-rings i:nth-child(2) {
            inset: 9px;
            border-top-color: var(--clr-accent,#7978E9);
            border-left-color: var(--clr-accent,#7978E9);
            animation: erp-spin-back 1.1s linear infinite;
        }

        /*  Inner: fastest, lightest. Gives the eye something to settle on in the
    middle without competing with the outer ring.                         */
        .erp-rings i:nth-child(3) {
            inset: 18px;
            border-top-color: var(--clr-info,#4CB8C4);
            animation: erp-spin .75s linear infinite;
        }

@keyframes erp-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes erp-spin-back {
    to {
        transform: rotate(-360deg);
    }
}

/*  ---- the word ---------------------------------------------------------- */
.erp-loading-text {
    font-size: var(--fs-sm,12px);
    font-weight: 600;
    letter-spacing: .03em;
    color: var(--clr-muted,#6C7293);
    text-align: center;
}

/*  Said only when the wait becomes long enough that somebody starts to
    wonder whether anything is happening at all.                          */
.erp-loading-slow {
    font-size: 11px;
    font-weight: 400;
    color: var(--clr-muted,#6C7293);
    opacity: 0;
    transition: opacity .3s ease-in;
}

.erp-loading.long .erp-loading-slow {
    opacity: 1;
}

/*  ---- somebody who does not want movement ------------------------------ */
/*  Spinning things can make people ill, and the operating system already
    knows who they are. The rings hold still and the colour pulses instead,
    which still says "working" without moving anything across the screen. */
@media (prefers-reduced-motion:reduce) {
    .erp-rings i {
        animation: erp-fade 1.4s ease-in-out infinite !important;
    }

    @keyframes erp-fade {
        0%,100% {
            opacity: .25;
        }

        50% {
            opacity: 1;
        }
    }
}

/*  Never on paper.                                                        */
@media print {
    .erp-loading {
        display: none !important;
    }
}

/* =============================================================================
   THE AMOUNT THE CUSTOMER IS TO PAY

   Sits in the transaction footer after the grand total, with a short line
   beside it saying what the rounding did or why it could not be done.

   APPEND TO THE END OF erp.css. If a si-target block is already there,
   replace it rather than adding a second one. Hard-refresh afterwards.

   NOTHING HERE MOVES THE OTHER TOTALS. The box is one more item in the row
   and the row lays itself out exactly as it did before.
   ============================================================================= */

.txn-foot .si-target {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    /*  Right-aligned like every other figure in the row, and the same height as
    the text beside it -- a taller box would push the whole footer down.
    Tabular figures so the digits do not shuffle while they are typed.       */
    .txn-foot .si-target input {
        width: 120px;
        height: 26px;
        padding: 3px 8px;
        text-align: right;
        font-weight: 600;
        font-variant-numeric: tabular-nums;
        border: 1px solid #b9c4d8;
        border-radius: 4px;
        background: #fffdf5;
        color: #1f2937;
    }

        .txn-foot .si-target input:focus {
            outline: none;
            border-color: #2b3a67;
            background: #fff;
            box-shadow: 0 0 0 2px rgba(43, 58, 103, .15);
        }

/*  What the rounding did, or why it could not. Written as the amount is
    typed, so a refusal arrives before the save rather than after it.

    Quiet when it worked -- it is confirming something the person already
    asked for. Loud only when it could not be done, because that is the case
    where they have to choose something else.                                */
.txn-foot .si-target-msg {
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

    .txn-foot .si-target-msg.ok {
        color: #1f7a4d;
    }

    .txn-foot .si-target-msg.bad {
        color: #c0392b;
    }

    /*  Nothing to say: the span keeps no space at all, so the footer does not
    shift as the message comes and goes.                                     */
    .txn-foot .si-target-msg:empty {
        display: none;
    }

/* =============================================================================
   THE ROUNDING BOX, THE PROFIT WINDOW, AND THE TAB HEADINGS

   APPEND TO THE END OF erp.css, REPLACING any earlier si-target, profitModal
   or tab-strip block from me. This one file supersedes both of the earlier
   ones. Hard-refresh afterwards.

   BREAKPOINTS

   900, 767, 640, 600 and 479 -- the ones erp.css already uses, and no new
   numbers. A stylesheet with two sets of breakpoints behaves differently in
   the gaps between them and nobody can hold both sets in mind.

   WHAT WAS WRONG WITH THE FIRST VERSION

   Nothing in it adapted. A 120px box in a flex row that already held four
   totals, and a seven-column table with fixed widths inside a modal, on a
   sheet whose every other block has breakpoints. It worked on the screen I
   was picturing and nowhere else.
   ============================================================================= */


/* -----------------------------------------------------------------------------
   THE AMOUNT THE CUSTOMER IS TO PAY
   -------------------------------------------------------------------------- */

.txn-foot .si-target {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    /*  Right-aligned like every other figure in the row and the same height as the
    text beside it. Tabular figures so the digits do not shuffle while they are
    typed.

    A MAXIMUM rather than a fixed width, so it may shrink on a narrow screen --
    and a MINIMUM, because below the width of a seven-figure amount it cannot
    be read at all.                                                           */
    .txn-foot .si-target input {
        width: 120px;
        max-width: 100%;
        min-width: 92px;
        height: 26px;
        padding: 3px 8px;
        text-align: right;
        font-weight: 600;
        font-variant-numeric: tabular-nums;
        border: 1px solid #b9c4d8;
        border-radius: 4px;
        background: #fffdf5;
        color: #1f2937;
    }

        .txn-foot .si-target input:focus {
            outline: none;
            border-color: #2b3a67;
            background: #fff;
            box-shadow: 0 0 0 2px rgba(43, 58, 103, .15);
        }

/*  What the rounding did, or why it could not. Quiet when it worked -- it is
    confirming something already asked for -- and loud only when it could not
    be done, which is the case where another amount has to be chosen.        */
.txn-foot .si-target-msg {
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

    .txn-foot .si-target-msg.ok {
        color: #1f7a4d;
    }

    .txn-foot .si-target-msg.bad {
        color: #c0392b;
    }

    .txn-foot .si-target-msg:empty {
        display: none;
    }

/*  The footer wraps rather than overflowing. Four totals and a labelled input
    do not fit on a narrow screen in one line, and a row that runs off the edge
    hides the grand total -- the one figure nobody can do without.            */
@media (max-width: 900px) {
    .txn-foot {
        flex-wrap: wrap;
        gap: 10px 18px;
    }
}

/*  On a phone each total takes its own line, label to the left and figure to
    the right, and the target box goes full width: a number typed on a touch
    keyboard wants room, and it is the last thing entered before saving.     */
@media (max-width: 640px) {
    .txn-foot {
        justify-content: space-between;
        gap: 6px 14px;
        padding-inline: 4px;
    }

        .txn-foot > span {
            flex: 1 1 100%;
            display: flex;
            justify-content: space-between;
            align-items: baseline;
        }

        .txn-foot .si-target {
            flex-wrap: wrap;
            border-top: 1px solid #e2e8f0;
            padding-top: 8px;
            margin-top: 2px;
        }

            .txn-foot .si-target input {
                width: auto;
                flex: 1 1 120px;
                height: 32px;
            }

        /*  The message drops below the box rather than being squeezed beside it,
        and may wrap: "Not reachable. Nearest: 69.99 70.01" does not fit on one
        line at this width and matters too much to truncate.                 */
        .txn-foot .si-target-msg {
            flex: 1 1 100%;
            white-space: normal;
            text-align: end;
        }
}







/* =============================================================================
   THE ROUNDING BOX, THE PROFIT WINDOW, AND THE TAB HEADINGS

   APPEND TO THE END OF erp.css, REPLACING any earlier si-target, profitModal
   or tab-strip block from me. This one file supersedes both of the earlier
   ones. Hard-refresh afterwards.

   BREAKPOINTS

   900, 767, 640, 600 and 479 -- the ones erp.css already uses, and no new
   numbers. A stylesheet with two sets of breakpoints behaves differently in
   the gaps between them and nobody can hold both sets in mind.

   WHAT WAS WRONG WITH THE FIRST VERSION

   Nothing in it adapted. A 120px box in a flex row that already held four
   totals, and a seven-column table with fixed widths inside a modal, on a
   sheet whose every other block has breakpoints. It worked on the screen I
   was picturing and nowhere else.
   ============================================================================= */


/* -----------------------------------------------------------------------------
   THE AMOUNT THE CUSTOMER IS TO PAY
   -------------------------------------------------------------------------- */

.txn-foot .si-target {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    /*  Right-aligned like every other figure in the row and the same height as the
    text beside it. Tabular figures so the digits do not shuffle while they are
    typed.

    A MAXIMUM rather than a fixed width, so it may shrink on a narrow screen --
    and a MINIMUM, because below the width of a seven-figure amount it cannot
    be read at all.                                                           */
    .txn-foot .si-target input {
        width: 120px;
        max-width: 100%;
        min-width: 92px;
        height: 26px;
        padding: 3px 8px;
        text-align: right;
        font-weight: 600;
        font-variant-numeric: tabular-nums;
        border: 1px solid #b9c4d8;
        border-radius: 4px;
        background: #fffdf5;
        color: #1f2937;
    }

        .txn-foot .si-target input:focus {
            outline: none;
            border-color: #2b3a67;
            background: #fff;
            box-shadow: 0 0 0 2px rgba(43, 58, 103, .15);
        }

/*  What the rounding did, or why it could not. Quiet when it worked -- it is
    confirming something already asked for -- and loud only when it could not
    be done, which is the case where another amount has to be chosen.        */
.txn-foot .si-target-msg {
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

    .txn-foot .si-target-msg.ok {
        color: #1f7a4d;
    }

    .txn-foot .si-target-msg.bad {
        color: #c0392b;
    }

    .txn-foot .si-target-msg:empty {
        display: none;
    }

/*  The footer wraps rather than overflowing. Four totals and a labelled input
    do not fit on a narrow screen in one line, and a row that runs off the edge
    hides the grand total -- the one figure nobody can do without.            */
@media (max-width: 900px) {
    .txn-foot {
        flex-wrap: wrap;
        gap: 10px 18px;
    }
}

/*  On a phone each total takes its own line, label to the left and figure to
    the right, and the target box goes full width: a number typed on a touch
    keyboard wants room, and it is the last thing entered before saving.     */
@media (max-width: 640px) {
    .txn-foot {
        justify-content: space-between;
        gap: 6px 14px;
        padding-inline: 4px;
    }

        .txn-foot > span {
            flex: 1 1 100%;
            display: flex;
            justify-content: space-between;
            align-items: baseline;
        }

        .txn-foot .si-target {
            flex-wrap: wrap;
            border-top: 1px solid #e2e8f0;
            padding-top: 8px;
            margin-top: 2px;
        }

            .txn-foot .si-target input {
                width: auto;
                flex: 1 1 120px;
                height: 32px;
            }

        /*  The message drops below the box rather than being squeezed beside it,
        and may wrap: "Not reachable. Nearest: 69.99 70.01" does not fit on one
        line at this width and matters too much to truncate.                 */
        .txn-foot .si-target-msg {
            flex: 1 1 100%;
            white-space: normal;
            text-align: end;
        }
}











/* =============================================================================
   THE ROUNDING BOX, THE PROFIT WINDOW, AND THE TAB HEADINGS

   APPEND TO THE END OF erp.css, REPLACING any earlier si-target, profitModal
   or tab-strip block from me. This one file supersedes both of the earlier
   ones. Hard-refresh afterwards.

   BREAKPOINTS

   900, 767, 640, 600 and 479 -- the ones erp.css already uses, and no new
   numbers. A stylesheet with two sets of breakpoints behaves differently in
   the gaps between them and nobody can hold both sets in mind.

   WHAT WAS WRONG WITH THE FIRST VERSION

   Nothing in it adapted. A 120px box in a flex row that already held four
   totals, and a seven-column table with fixed widths inside a modal, on a
   sheet whose every other block has breakpoints. It worked on the screen I
   was picturing and nowhere else.
   ============================================================================= */


/* -----------------------------------------------------------------------------
   THE AMOUNT THE CUSTOMER IS TO PAY
   -------------------------------------------------------------------------- */

.txn-foot .si-target {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    /*  Right-aligned like every other figure in the row and the same height as the
    text beside it. Tabular figures so the digits do not shuffle while they are
    typed.

    A MAXIMUM rather than a fixed width, so it may shrink on a narrow screen --
    and a MINIMUM, because below the width of a seven-figure amount it cannot
    be read at all.                                                           */
    .txn-foot .si-target input {
        width: 120px;
        max-width: 100%;
        min-width: 92px;
        height: 26px;
        padding: 3px 8px;
        text-align: right;
        font-weight: 600;
        font-variant-numeric: tabular-nums;
        border: 1px solid #b9c4d8;
        border-radius: 4px;
        background: #fffdf5;
        color: #1f2937;
    }

        .txn-foot .si-target input:focus {
            outline: none;
            border-color: #2b3a67;
            background: #fff;
            box-shadow: 0 0 0 2px rgba(43, 58, 103, .15);
        }

/*  What the rounding did, or why it could not. Quiet when it worked -- it is
    confirming something already asked for -- and loud only when it could not
    be done, which is the case where another amount has to be chosen.        */
.txn-foot .si-target-msg {
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

    .txn-foot .si-target-msg.ok {
        color: #1f7a4d;
    }

    .txn-foot .si-target-msg.bad {
        color: #c0392b;
    }

    .txn-foot .si-target-msg:empty {
        display: none;
    }

/*  The footer wraps rather than overflowing. Four totals and a labelled input
    do not fit on a narrow screen in one line, and a row that runs off the edge
    hides the grand total -- the one figure nobody can do without.            */
@media (max-width: 900px) {
    .txn-foot {
        flex-wrap: wrap;
        gap: 10px 18px;
    }
}

/*  On a phone each total takes its own line, label to the left and figure to
    the right, and the target box goes full width: a number typed on a touch
    keyboard wants room, and it is the last thing entered before saving.     */
@media (max-width: 640px) {
    .txn-foot {
        justify-content: space-between;
        gap: 6px 14px;
        padding-inline: 4px;
    }

        .txn-foot > span {
            flex: 1 1 100%;
            display: flex;
            justify-content: space-between;
            align-items: baseline;
        }

        .txn-foot .si-target {
            flex-wrap: wrap;
            border-top: 1px solid #e2e8f0;
            padding-top: 8px;
            margin-top: 2px;
        }

            .txn-foot .si-target input {
                width: auto;
                flex: 1 1 120px;
                height: 32px;
            }

        /*  The message drops below the box rather than being squeezed beside it,
        and may wrap: "Not reachable. Nearest: 69.99 70.01" does not fit on one
        line at this width and matters too much to truncate.                 */
        .txn-foot .si-target-msg {
            flex: 1 1 100%;
            white-space: normal;
            text-align: end;
        }
}


/* -----------------------------------------------------------------------------
   THE ROUNDING SHARE, UNDER THE LINE DISCOUNT
   -------------------------------------------------------------------------- */

.txn-grid td.disc-cell {
    position: relative;
    padding-bottom: 9px;
}

    /*  Absolute, so a row carrying one is exactly as tall as a row that does not.
    A grid whose rows change height as a target is typed is worse to read than
    one that holds still.                                                     */
    .txn-grid td.disc-cell .rd-note {
        position: absolute;
        inset-inline-end: 8px;
        bottom: -1px;
        font-size: 9.5px;
        line-height: 1;
        color: #94a3b8;
        font-variant-numeric: tabular-nums;
        pointer-events: none;
    }

        .txn-grid td.disc-cell .rd-note:empty {
            display: none;
        }

/*  No breakpoint here on purpose. The grid already scrolls sideways below its
    820px minimum, so the cell keeps its size and travels with it. Shrinking
    the figure would make it unreadable on the device least able to spare the
    legibility.                                                               */


/* -----------------------------------------------------------------------------
   WHAT THE INVOICE MADE
   -------------------------------------------------------------------------- */

#profitModal .erp-tbl td.r,
#profitModal .erp-tbl th.r {
    font-variant-numeric: tabular-nums;
}

/*  A line sold at or below what it cost.                                     */
#profitModal tr.pf-loss td {
    background: #fdf5f4;
    color: #a84a44;
}

    #profitModal tr.pf-loss td:first-child::before {
        content: "\2212";
        margin-inline-end: 5px;
        font-weight: 700;
    }

/*  The totals row: heavier, with a rule above it, so the eye lands there first
    and goes up into the detail only if the answer is surprising.             */
#profitModal tfoot td {
    border-top: 2px solid #cbd5e1;
    background: #f1f5f9;
    font-weight: 700;
    color: #0f2740;
    padding: 9px 14px;
    font-variant-numeric: tabular-nums;
}

#profitModal tfoot tr.pf-loss td {
    background: #fdf0ee;
    color: #a01f1f;
}

/*  A negative figure, red wherever it appears. The row tint says "look at this
    line"; the red figure says WHICH of the seven numbers is the bad one -- and
    a minus sign at the end of a number is easy to miss in a column of them.  */
#profitModal .pf-amt.neg {
    color: #c0392b;
    font-weight: 700;
}

/*  Darker on the totals row, where the ground is already tinted.             */
#profitModal tfoot .pf-amt.neg {
    color: #8e1f1f;
}

/*  Seven columns need about 620px. Below that the table scrolls sideways
    inside the window rather than crushing the item name to nothing -- the same
    answer .txn-grid-wrap already gives for the entry grid.

    The scroll is on the BODY, so head, lines and totals travel together. Put
    on the table alone, the totals would slide out from under their headings.
                                                                              */
@media (max-width: 767px) {
    #profitModal .pin-modal-body {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    #profitModal .erp-tbl {
        min-width: 620px;
    }
}

/*  On a phone the per-line margin percentage goes. It is the one column that
    can be worked out from the two beside it, and dropping it buys eighty
    pixels back for the item name, which cannot be worked out from anything.

    The TOTAL percentage stays -- that is the figure somebody opened the window
    to read -- so the footer keeps all its cells and only the body loses one.
    The foot therefore spans one fewer column to stay under its headings.     */
@media (max-width: 479px) {
    #profitModal .erp-tbl th:nth-child(7),
    #profitModal .erp-tbl tbody td:nth-child(7) {
        display: none;
    }

    #profitModal .erp-tbl tfoot td:last-child {
        display: none;
    }

    #profitModal .erp-tbl {
        min-width: 520px;
        font-size: 12px;
    }

        #profitModal .erp-tbl th,
        #profitModal .erp-tbl td {
            padding: 7px 9px;
        }
}

/*  Neither belongs on paper. The invoice prints; what it cost does not print
    with it, and a scrim rendered as a grey rectangle helps nobody.           */
@media print {
    #profitModal,
    .txn-foot .si-target {
        display: none !important;
    }
}


/* -----------------------------------------------------------------------------
   THE TAB HEADINGS

   A rule earlier in this file gives the active list tab a near-white ground
   and leaves the text at #fff -- white on white. Only the HEADING is corrected
   here; the pane below keeps the paper it has.
   -------------------------------------------------------------------------- */

.tab-strip .tab-btn[data-tab="list"].active {
    background: #f7f9fc;
    color: #1f2937;
    font-weight: 700;
    border: 1px solid #cbd5e1;
    border-bottom: 3px solid var(--clr-primary, #4B49AC);
}

.tab-strip .tab-btn[data-tab="txn"].active {
    border: 1px solid var(--clr-primary, #4B49AC);
    border-bottom: 3px solid var(--clr-primary, #4B49AC);
}

/*  The one you are not on. Readable -- a heading nobody can read is not a
    heading -- but plainly the quieter of the two.                            */
.tab-strip .tab-btn:not(.active) {
    color: #475569;
    border: 1px solid #e2e8f0;
    border-bottom: 3px solid transparent;
}

    .tab-strip .tab-btn:not(.active):hover {
        color: var(--clr-primary, #4B49AC);
        border-color: #cbd5e1;
    }

/*  Two tabs share the width on a phone rather than sitting at their natural
    size with a gap after them, and the padding comes in so a caption of two
    or three words still fits on one line.                                    */
@media (max-width: 640px) {
    .tab-strip {
        gap: 2px;
    }

        .tab-strip .tab-btn {
            flex: 1 1 0;
            padding: 8px 10px;
            font-size: 12.5px;
            text-align: center;
        }
}


/* -----------------------------------------------------------------------------
   THE ACTION BAR ON A NARROW SCREEN

   erp.css already wraps .form-actions below 600px. Profit is a seventh button
   in that row, so on a phone the buttons share the width instead of each
   taking its natural size and pushing the rest onto a third line.
   -------------------------------------------------------------------------- */

@media (max-width: 600px) {
    .act-left,
    .act-right {
        flex: 1 1 100%;
        flex-wrap: wrap;
        gap: var(--sp-2);
    }

        .act-left .btn-erp,
        .act-right .btn-erp {
            flex: 1 1 auto;
            min-width: 84px;
        }
}


/* -----------------------------------------------------------------------------
   TOUCH

   A finger is not a pointer. Where the device has no hover at all, the controls
   that were sized for a mouse get the room a thumb needs -- and the hover
   states that can never fire stop pretending they might.
   -------------------------------------------------------------------------- */

@media (hover: none) {
    .txn-foot .si-target input {
        height: 34px;
        font-size: 15px;
    }

    #profitModal .erp-tbl td {
        padding-top: 11px;
        padding-bottom: 11px;
    }

    .tab-strip .tab-btn:not(.active):hover {
        color: #475569;
        border-color: #e2e8f0;
    }
}


/*  The note under the profit window. Quiet when it is only saying the figure
    is an estimate; amber when it is saying the margin cannot be trusted,
    because those are different weights of warning.                           */
#profitModal .erp-modal-count.pf-warn {
    color: #b45309;
    font-weight: 600;
}


/* -----------------------------------------------------------------------------
   THE QUESTION DIALOG

   The application does not use the browser's own confirm box anywhere. This is
   the same shell as every other dialog here, narrowed: a question is one
   sentence and a box of picker width around one sentence looks like something
   failed to load.
   -------------------------------------------------------------------------- */

.pin-modal-box.erp-modal-ask {
    width: min(460px, 100%);
}

    .pin-modal-box.erp-modal-ask .pin-modal-body {
        padding: 18px 20px;
    }

.ask-text {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.55;
    color: #1f2937;
}

/*  On a phone the two answers share the width and are tall enough to hit with
    a thumb. They keep their order -- the safe one first -- so a hurried tap
    lands on the one that does nothing.                                       */
@media (max-width: 479px) {
    .pin-modal-box.erp-modal-ask .erp-modal-actions {
        width: 100%;
        gap: 8px;
    }

        .pin-modal-box.erp-modal-ask .erp-modal-actions .btn-erp {
            flex: 1 1 0;
            min-height: 40px;
        }
}


/* -----------------------------------------------------------------------------
   MOTION

   erp.css already turns animation off for anybody who asks for less of it.
   Nothing here animates, so there is nothing to disable -- said here so the
   next person does not add a rule looking for one.
   -------------------------------------------------------------------------- */

/* ============ CRM Pipeline Board ============ */
.pb-sum{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:12px;}
.pb-card{flex:1 1 150px;min-width:150px;background:#fff;border:1px solid var(--clr-border);border-radius:8px;padding:10px 12px;box-shadow:0 1px 2px rgba(16,24,40,.05);}
.pb-card .t{font-size:11.5px;color:#6b7280;margin-bottom:2px;}
.pb-card .v{font-size:17px;font-weight:700;}
.pb-board{display:flex;gap:10px;align-items:flex-start;overflow-x:auto;padding-bottom:8px;-webkit-overflow-scrolling:touch;}
.pb-col{flex:0 0 240px;max-width:240px;background:#f8f9fb;border:1px solid var(--clr-border);border-radius:8px;display:flex;flex-direction:column;max-height:100%;}
.pb-col.pb-closed{background:#f5f6f8;}
.pb-colhead{padding:8px 10px;border-bottom:1px solid var(--clr-border);display:flex;align-items:center;gap:6px;position:sticky;top:0;}
.pb-colhead .nm{font-weight:600;font-size:13px;flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.pb-colhead .ct{background:#fff;border:1px solid var(--clr-border);border-radius:10px;padding:0 7px;font-size:11.5px;}
.pb-colhead .amt{font-size:11.5px;color:#6b7280;}
.pb-colhead .mv{border:0;background:transparent;cursor:pointer;color:#6b7280;padding:0 2px;font-size:12px;line-height:1;}
.pb-colhead .mv:hover{color:var(--clr-primary);}
.pb-cards{padding:8px;display:flex;flex-direction:column;gap:8px;overflow-y:auto;min-height:60px;}
.pb-deal{background:#fff;border:1px solid var(--clr-border);border-radius:8px;padding:8px 10px;box-shadow:0 1px 2px rgba(16,24,40,.06);cursor:grab;user-select:none;touch-action:none;}
.pb-deal:active{cursor:grabbing;}
.pb-deal .r1{display:flex;align-items:center;gap:8px;margin-bottom:2px;}
.pb-av{width:26px;height:26px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;color:#fff;flex:0 0 26px;}
.pb-deal .co{font-weight:600;font-size:12.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.pb-deal .ti{font-size:11.5px;color:#6b7280;margin-bottom:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.pb-deal .r2{display:flex;align-items:center;gap:6px;font-size:11.5px;}
.pb-deal .val{font-weight:700;}
.pb-deal .dt{color:#6b7280;margin-inline-start:auto;}
.pb-drag{position:fixed;z-index:1000;pointer-events:none;opacity:.92;transform:rotate(2deg);box-shadow:0 8px 20px rgba(16,24,40,.25);width:224px;}
.pb-ghost{opacity:.35;}
.pb-col.pb-over{outline:2px dashed var(--clr-primary);outline-offset:-2px;background:#eef2ff;}
.pb-col.pb-no{outline:2px dashed #b3261e;outline-offset:-2px;}
.pb-drop{border:1.5px dashed var(--clr-primary);border-radius:8px;color:var(--clr-primary);font-size:12px;text-align:center;padding:14px 6px;background:#fff;}
.pb-tools{display:flex;gap:8px;align-items:center;margin-bottom:10px;flex-wrap:wrap;}
.pb-hint{font-size:12px;color:#6b7280;margin:-4px 0 10px;}
.form-card.is-fill .pb-wrap{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;}
.form-card.is-fill .pb-board{flex:1 1 auto;min-height:0;}
.form-card.is-fill .pb-col{max-height:100%;}
@media (max-width:760px){.pb-col{flex-basis:200px;max-width:200px;}.pb-card{min-width:120px;}}

/* ============ account parent tree picker ============ */
.at-pick{position:relative;}
.at-panel{position:absolute;z-index:60;inset-inline-start:0;top:calc(100% + 4px);min-width:100%;max-height:320px;overflow:auto;background:#fff;border:1px solid var(--clr-border);border-radius:8px;box-shadow:0 10px 24px rgba(16,24,40,.18);padding:6px;}
.at-tree{list-style:none;margin:0;padding:0;}
.at-tree.at-sub{padding-inline-start:18px;}
.at-node{margin:1px 0;}
.at-cell{display:flex;align-items:center;gap:6px;padding:4px 8px;border-radius:6px;cursor:pointer;font-size:13px;}
.at-cell:hover{background:#eef2ff;}
.at-caret{width:14px;height:14px;flex:0 0 14px;position:relative;cursor:pointer;}
.at-caret:not(.at-leaf)::before{content:"";position:absolute;inset:3px 4px;border-style:solid;border-width:5px 0 5px 7px;border-color:transparent transparent transparent #6b7280;transition:transform .12s;}
.at-caret.at-open::before{transform:rotate(90deg);}
.at-code{font-family:ui-monospace,monospace;color:#4f46e5;font-weight:600;}
[dir="rtl"] .at-caret:not(.at-leaf)::before{border-width:5px 7px 5px 0;border-color:transparent #6b7280 transparent transparent;}
[dir="rtl"] .at-caret.at-open::before{transform:rotate(-90deg);}

.at-cell.at-ledger{color:#9ca3af;cursor:default;}
.at-cell.at-ledger .at-code{color:#9ca3af;font-weight:400;}
.at-cell.at-control{cursor:not-allowed;}
.at-cell.at-control .at-code{color:#b3261e;}
.at-tag{font-size:10px;font-weight:700;color:#b3261e;border:1px solid #b3261e;border-radius:4px;padding:0 4px;margin-inline-start:4px;}

/* ============================================================================
   STANDARD GRID (gs-v1) - the one look for every transaction entry grid
   (.txn-grid), its frame (.txn-grid-wrap) and every list grid (.list-grid /
   .list-wrap). Taken from the Sales Invoice grid, which is the reference.

   CHANGE THE GRID HERE, AND ONLY HERE. Colours, lines, padding and row
   height are the --grid-* values just below; the rules after them read
   those values. No screen may restyle these grids in its own <style> block.

   Why ":is(.desk-grid, body)" in front of every rule: it matches every page
   (every page has a body) while weighing the same as one class, exactly
   what ".desk-grid" weighed when this look was Sales Invoice only. So the
   rules win over the older base grid rules earlier in this file, Sales
   Invoice renders exactly as before, and every other screen now matches it.
   ============================================================================ */
:root{
  --grid-head-bg:linear-gradient(#fdfefe,#dcebfa); /* header cells          */
  --grid-head-ink:#15428b;                         /* header text           */
  --grid-head-line:#a8c3e0;                        /* header cell borders   */
  --grid-line:#c9daed;                             /* body cell borders     */
  --grid-row-alt:#f2f7fd;                          /* every second line     */
  --grid-row-hover:#eaf3fc;                        /* line under the mouse  */
  --grid-foot-bg:#f8fbfe;                          /* totals line           */
  --grid-foot-ink:#000;
  --grid-foot-rule:#4a7fc1;                        /* double rule over totals */
  --grid-focus-line:#7da2ce;                       /* border of the cell being typed in */
  --grid-head-pad:4px 6px;
  --grid-cell-pad:2px 4px;
  --grid-input-h:26px;                             /* sets the line height  */
  --grid-foot-h:32px;                              /* totals line height    */
  --grid-head-h:31px;                              /* header line height    */
  --grid-frame-line:#c9daed;
  --grid-frame-shadow:0 2px 10px rgba(21,66,139,.16);
}

/*  The frame: white, a thin blue line, a soft shadow.                      */
:is(.desk-grid, body) .txn-grid-wrap,
:is(.desk-grid, body) .list-wrap,
:is(.desk-grid, body) .txn-grid-wrap.shadow{
  background:#fff;border:1px solid var(--grid-frame-line);border-radius:4px;
  box-shadow:var(--grid-frame-shadow);
}
/*  The frame draws the outer line, so the table inside it never adds one.  */
:is(.desk-grid, body) .txn-grid-wrap .txn-grid{border:0;}

/*  Header and body cells.                                                  */
:is(.desk-grid, body) .txn-grid th,
:is(.desk-grid, body) .list-grid th{
  background:var(--grid-head-bg);color:var(--grid-head-ink);
  border:1px solid var(--grid-head-line);padding:var(--grid-head-pad);font-weight:700;
}
:is(.desk-grid, body) .txn-grid td,
:is(.desk-grid, body) .list-grid td{border:1px solid var(--grid-line);padding:var(--grid-cell-pad);}
:is(.desk-grid, body) .txn-grid tbody tr:nth-child(even) td,
:is(.desk-grid, body) .list-grid tbody tr:nth-child(even) td{background:var(--grid-row-alt);}
:is(.desk-grid, body) .txn-grid tbody tr:hover td,
:is(.desk-grid, body) .list-grid tbody tr:hover td{background:var(--grid-row-hover);}

/*  Totals line: pale, black figures, a double rule above it.               */
:is(.desk-grid, body) .txn-grid tfoot td,
:is(.desk-grid, body) .list-grid tfoot td{border:1px solid var(--grid-head-line);background:var(--grid-foot-bg);color:var(--grid-foot-ink);
  border-top:3px double var(--grid-foot-rule);}
/*  The totals line is the same height on every screen - Sales Invoice's,
    whose total line carries the Rounding button. Screens with plain text
    totals came out 8px thinner without this.                              */
:is(.desk-grid, body) .txn-grid tfoot td{height:var(--grid-foot-h);}
/*  Same for the header line: every grid's header is Sales Invoice's
    height, with or without the + button in its last cell.               */
:is(.desk-grid, body) .txn-grid thead th{height:var(--grid-head-h);}

/*  Inputs and lists inside a cell have no border of their own - it shows
    only while the cell is being typed in, desktop-grid style. Covers every
    input and select in a grid cell whatever its class.                     */
:is(.desk-grid, body) .txn-grid td input:not([type="checkbox"]):not([type="radio"]),
:is(.desk-grid, body) .txn-grid td select{
  border:1px solid transparent;background:transparent;
  border-radius:0;box-shadow:none;
}
:is(.desk-grid, body) .txn-grid td input:hover{border-color:transparent;}
:is(.desk-grid, body) .txn-grid td input:focus,
:is(.desk-grid, body) .txn-grid td select:focus{
  border:1px solid var(--grid-focus-line);background:#fff;outline:none;box-shadow:none;
}

/*  One line height for every grid: the cell editor's height.              */
:is(.desk-grid, body) .txn-grid .gi{height:var(--grid-input-h);}

/*  Every number sits on the reading end of its cell, typed or calculated,
    whatever the input is called (Journal and Contra call theirs dr / cr /
    r): right in English, left in Arabic - the same side as calculated
    figures, which the [dir="rtl"] rules above already move.             */
:is(.desk-grid, body) .txn-grid .gi.r,
:is(.desk-grid, body) .txn-grid .gi.dr,
:is(.desk-grid, body) .txn-grid .gi.cr,
:is(.desk-grid, body) .txn-grid .gi.num{text-align:end;}   /* end = right, and left in Arabic */

/*  A field the line may not change: plain, muted text. A box filled from a
    picker (class "pick") is read-only too, but what it shows is real, so
    it keeps the normal ink.                                               */
:is(.desk-grid, body) .txn-grid .gi[readonly]:not(.pick),
:is(.desk-grid, body) .txn-grid .gi:disabled{color:var(--clr-muted);cursor:default;}
:is(.desk-grid, body) .txn-grid .gi.pick{cursor:pointer;}

/*  A grid placed straight inside a card (Payment Voucher, Landed Cost):
    the card's own border is the frame, so the grid adds none of its own.  */
:is(.desk-grid, body) .card > .txn-grid-wrap,
:is(.desk-grid, body) .card > .card-body > .txn-grid-wrap{border:0;border-radius:0;box-shadow:none;}
:is(.desk-grid, body) .card > .txn-grid-wrap .txn-grid tr > :first-child,
:is(.desk-grid, body) .card > .card-body > .txn-grid-wrap .txn-grid tr > :first-child{border-inline-start:0;}
:is(.desk-grid, body) .card > .txn-grid-wrap .txn-grid tr > :last-child,
:is(.desk-grid, body) .card > .card-body > .txn-grid-wrap .txn-grid tr > :last-child{border-inline-end:0;}

/*  Expand / collapse toggle: drawn in the header's own ink so it shows on
    the light header (it was white-on-white).                              */
:is(.desk-grid, body) .txn-grid thead th .grid-toggle{
  color:var(--grid-head-ink);border-color:var(--grid-head-line);background:#fff;
}
:is(.desk-grid, body) .txn-grid thead th .grid-toggle:hover{background:var(--grid-row-hover);}

/* ============ desk-grid: Sales Invoice extras (scoped) ======================
   The grid itself is the STANDARD GRID above. What stays here belongs to the
   Sales Invoice page only: its flat cards, its white list tab, and the grids
   inside its receipt and party windows (.pay-grid / .pf-grid).             */
.desk-grid #tabList,
.desk-grid #tabList .section-card{background:#fff;box-shadow:none;}
.desk-grid .tabpane .field:has(> #siPageSize){grid-column:-3 / -1;margin-inline-start:auto;}
.desk-grid .card,
.desk-grid .form-card{box-shadow:none;background:#fff;}

.desk-grid .pay-grid th,
.desk-grid .pf-grid th{
  background:linear-gradient(#fdfefe,#dcebfa);color:#15428b;
  border:1px solid #a8c3e0;padding:4px 6px;font-weight:700;
}
.desk-grid .pay-grid td,
.desk-grid .pf-grid td{border:1px solid #c9daed;padding:2px 4px;}
.desk-grid .pay-grid tbody tr:nth-child(even) td{background:#f2f7fd;}
.desk-grid .pay-grid tbody tr:hover td{background:#eaf3fc;}
.desk-grid .pay-grid td input:not([type="checkbox"]):not([type="radio"]),
.desk-grid .pf-grid td input:not([type="checkbox"]):not([type="radio"]),
.desk-grid .pay-grid td select,
.desk-grid .pf-grid td select{
  border:1px solid transparent;background:transparent;
  border-radius:0;box-shadow:none;
}
.desk-grid .pay-grid td input:hover,
.desk-grid .pf-grid td input:hover{border-color:transparent;}
.desk-grid .pay-grid td input:focus,
.desk-grid .pf-grid td input:focus,
.desk-grid .pay-grid td select:focus,
.desk-grid .pf-grid td select:focus{
  border:1px solid #7da2ce;background:#fff;outline:none;box-shadow:none;
}

/* ---- rounding dialog ---- */
.rnd-box{min-width:340px;max-width:400px;}
.rnd-body{display:flex;flex-direction:column;gap:10px;padding:16px 18px;}
.rnd-row{display:flex;align-items:center;justify-content:space-between;gap:14px;}
.rnd-lbl{font-weight:600;color:#3a4a63;}
.rnd-actual{font-size:22px;font-weight:800;color:#15428b;letter-spacing:.5px;}
.rnd-in{width:150px;text-align:end;font-weight:700;}
.rnd-diff-row{border-top:1px dashed #c9daed;padding-top:10px;}
.rnd-diff{font-size:15px;font-weight:700;color:#5a6b85;}
.rnd-diff.neg{color:#b3261e;}
.rnd-diff.pos{color:#0a7a3d;}
.rnd-msg{min-height:18px;font-size:12px;}
.rnd-foot{display:flex;justify-content:flex-end;gap:8px;padding:12px 18px;border-top:1px solid #e3ecf6;background:#f7fafd;border-radius:0 0 10px 10px;}
.rnd-plain{border:1px solid #b9c6d8;background:#fff;border-radius:8px;padding:5px 14px;cursor:pointer;font:inherit;}
.rnd-plain:hover{background:#f0f4f9;}
.si-round-btn:disabled{opacity:.45;cursor:default;box-shadow:none;transform:none;background:linear-gradient(#f4f7fb,#e4ebf4);}
.si-round-btn{
  display:inline-flex;align-items:center;gap:6px;white-space:nowrap;
  padding:5px 14px;font:inherit;font-weight:600;color:#15428b;cursor:pointer;
  background:linear-gradient(#ffffff,#dcebfa 45%,#c7ddf5);
  border:1px solid #a8c3e0;border-radius:14px;
  box-shadow:0 1px 2px rgba(21,66,139,.25), inset 0 1px 0 #ffffff;
  transition:box-shadow .15s ease, transform .05s ease, background .15s ease;
}
.si-round-btn:hover{background:linear-gradient(#ffffff,#e8f2fc 45%,#d3e5f8);box-shadow:0 2px 5px rgba(21,66,139,.3), inset 0 1px 0 #fff;}
.si-round-btn:active{transform:translateY(1px);box-shadow:inset 0 2px 4px rgba(21,66,139,.35);}
.si-round-btn svg{flex:0 0 auto;}
.rnd-box .pin-modal-body{display:flex;justify-content:center;padding:18px;}
.hdrname{height:24px;padding:0 6px;font-weight:600;min-width:220px;}

/* ---- past-invoice party lookup ---- */
.pf-vwrap{display:flex;gap:4px;align-items:center;}
.pf-vwrap .pf-v{flex:1 1 auto;min-width:0;}
.pf-find{border:1px solid #7f9db9;background:#e7eef7;border-radius:4px;width:26px;height:24px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;color:#15428b;flex:0 0 auto;}
.pf-find:hover{background:#dbe9f9;}
.dp-host{max-height:340px;overflow:auto;margin-top:10px;border:1px solid #c9daed;}
#dpModal .pin-tbl tbody tr{cursor:pointer;}
#dpModal .pin-tbl tbody tr:hover td{background:#cde0f7;}


/* ---- pay-pro: the receipt window, office finish ---- */
#payModal .pin-modal-box{max-width:720px;}
#payModal .pay-body{padding:14px 16px 10px;}
.pay-grid{width:100%;border-collapse:separate;border-spacing:0;border:1px solid #a8c3e0;border-radius:4px;overflow:hidden;}
.pay-grid th{background:linear-gradient(#fdfefe,#dcebfa);color:#15428b;font-weight:600;font-size:12px;
  padding:7px 10px;border-bottom:1px solid #a8c3e0;border-inline-end:1px solid #c9daed;text-align:start;}
.pay-grid th.r{text-align:end;}
.pay-grid td{padding:5px 8px;border-bottom:1px solid #e3edf9;border-inline-end:1px solid #eef4fc;background:#fff;}
.pay-grid tbody tr:hover td{background:#f2f7fd;}
.pay-grid td:last-child,.pay-grid th:last-child{border-inline-end:0;}
.pay-grid .ctl{width:100%;height:26px;}
.pay-grid input.pay-amt{text-align:end;font-weight:600;}
.pay-grid .lx{border:0;background:transparent;color:#b03a2e;font-size:15px;cursor:pointer;line-height:1;}
.pay-grid .lx:hover{color:#7d241b;}
.pay-sum{display:flex;gap:10px;justify-content:flex-end;margin-top:12px;}
.pay-sum span{background:#f4f8fd;border:1px solid #c9daed;border-radius:4px;padding:8px 14px;
  display:flex;flex-direction:column;align-items:flex-end;gap:2px;font-size:11px;color:#5b7aa5;min-width:130px;}
.pay-sum b{font-size:15px;color:#1b2a41;font-variant-numeric:tabular-nums;}
.pay-sum .grand{background:linear-gradient(#eef6ee,#dcefdc);border-color:#a9cfa9;}
.pay-sum .grand b{font-size:18px;color:#1e6b1e;}
.pay-sum .grand.due{background:linear-gradient(#fdf0ee,#f8dcd7);border-color:#dcaea5;}
.pay-sum .grand.due b{color:#b03a2e;}
#payNote{color:#8aa2c0;font-size:11px;}

/* ---- paste-from-excel ---- */
#peBox{width:100%;min-height:220px;resize:vertical;font:12px/1.5 Consolas,monospace;
  border:1px solid #a8c3e0;border-radius:4px;padding:8px;background:#fff;}
.pe-hint{font-size:11px;color:#5b7aa5;margin-bottom:8px;}
.pe-out{margin-top:8px;font-size:12px;}
.pe-ok{color:#1e6b1e;font-weight:600;}
.pe-err{color:#b03a2e;margin-top:3px;}

/* ---- paste window, office finish + progress ---- */
#peModal .pin-modal-box{max-width:640px;}
#peModal .pin-modal-body{padding:16px 18px 12px;}
#peModal .pe-hint{background:#f4f8fd;border:1px solid #c9daed;border-inline-start:3px solid #15428b;
  border-radius:4px;padding:9px 12px;font-size:12px;line-height:1.6;color:#3d5a80;margin-bottom:10px;}
#peBox{min-height:200px;box-shadow:inset 0 1px 3px rgba(21,66,139,.08);}
#peBox:focus{border-color:#15428b;outline:none;}
.pe-prog{margin-top:10px;}
.pe-prog-track{height:16px;background:#e7eef7;border:1px solid #a8c3e0;border-radius:8px;overflow:hidden;}
.pe-prog-fill{height:100%;width:0;background:linear-gradient(#5b8fd4,#2f66b3);
  border-radius:8px;transition:width .25s ease;}
.pe-prog-lbl{text-align:center;font-size:11px;color:#5b7aa5;margin-top:4px;
  font-variant-numeric:tabular-nums;}
.pe-out{margin-top:10px;}
.pe-ok{background:#eef6ee;border:1px solid #a9cfa9;border-radius:4px;padding:7px 12px;color:#1e6b1e;font-weight:600;}
.pe-err{background:#fdf0ee;border:1px solid #dcaea5;border-radius:4px;padding:7px 12px;color:#b03a2e;margin-top:5px;}

/* ---- zatca seller modal, office finish ---- */
.zs-box{max-width:600px;}
.zs-body{padding:20px 24px 14px;}
.zs-intro{margin:0 0 16px;padding:10px 14px;background:#f4f8fd;border:1px solid #c9daed;
  border-inline-start:3px solid #15428b;border-radius:4px;font-size:12px;line-height:1.7;color:#3d5a80;}
.zs-sec{border:1px solid #dce7f5;border-radius:6px;padding:14px 16px 16px;margin-bottom:14px;
  background:#fdfefe;position:relative;}
.zs-legend{position:absolute;top:-9px;inset-inline-start:12px;background:#fdfefe;padding:0 8px;
  font-size:11px;font-weight:700;color:#15428b;letter-spacing:.3px;}
.zs-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px 16px;margin-top:4px;}
.zs-grid label{display:flex;flex-direction:column;gap:5px;}
.zs-grid label > span{font-size:11px;font-weight:600;color:#5b7aa5;}
.zs-grid label em,.zs-req em{color:#b03a2e;font-style:normal;font-weight:700;}
.zs-grid .ctl{height:30px;padding:0 10px;border:1px solid #a8c3e0;border-radius:4px;
  transition:border-color .12s, box-shadow .12s;}
.zs-grid .ctl:focus{border-color:#2f66b3;box-shadow:0 0 0 2px rgba(47,102,179,.18);outline:none;}
.zs-grid .ctl::placeholder{color:#b9c9dd;}
.zs-w{grid-column:1 / -1;}
.zs-req{font-size:11px;color:#8aa2c0;}

/* ---- zatca copyable message panel ---- */
.zx-errbox{position:fixed;left:50%;bottom:64px;transform:translateX(-50%);width:600px;max-width:92vw;
  background:#fff;border:1px solid #dcaea5;border-radius:6px;box-shadow:0 8px 28px rgba(21,66,139,.22);
  z-index:9500;}
.zx-errbox-head{display:flex;align-items:center;justify-content:space-between;
  background:linear-gradient(#fdf6f5,#f6e3df);border-bottom:1px solid #dcaea5;border-radius:6px 6px 0 0;
  padding:8px 14px;font-weight:700;color:#b03a2e;font-size:12px;}
.zx-errbox-head button{border:0;background:none;font-size:18px;color:#b03a2e;cursor:pointer;line-height:1;}
.zx-errbox textarea{display:block;width:100%;box-sizing:border-box;border:0;min-height:150px;
  padding:12px 14px;font:11.5px/1.65 Consolas,monospace;color:#5a2d28;background:#fdfbfa;
  resize:vertical;outline:none;white-space:pre-wrap;word-break:break-all;}
.zx-errbox-foot{padding:8px 14px;border-top:1px solid #efdedb;display:flex;justify-content:flex-end;}

/* ---- confirm toast: a question with Yes/No, house style ---- */
.cf-toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);
  display:flex;align-items:center;gap:10px;max-width:92vw;
  background:#fff8ef;border:1px solid #e3c692;border-inline-start:4px solid #b8860b;
  border-radius:6px;box-shadow:0 6px 22px rgba(90,60,10,.25);
  padding:10px 14px;z-index:9600;font-size:12.5px;color:#6b4e0e;font-weight:600;}
.cf-toast .cf-toast-msg{max-width:520px;}
.cf-toast .btn-erp{height:26px;padding:0 14px;font-size:12px;}

/* ==========================================================================
   Dashboard insights  (dash-v2)
   Charts are server-drawn SVG; colours match the tile palette so a teal bar
   is the same money-in as the teal tile above it. Logical properties only,
   so Arabic mirrors without a second rule set.
   ========================================================================== */
.k-delta{
  display:inline-block;margin-inline-start:6px;padding:0 6px;border-radius:99px;
  font-size:11px;font-weight:600;line-height:17px;font-variant-numeric:tabular-nums;
  direction:ltr;unicode-bidi:isolate;   /* '+11.9%' must not flip in Arabic */
}
.k-delta:empty{display:none;}
.k-delta.up  {background:#E4F6EE;color:#12724C;}
.k-delta.dn  {background:#FCE9EC;color:#A62A40;}
.k-delta.flat{background:#EEF0F7;color:var(--clr-muted);}

.dx-row{display:grid;gap:var(--sp-3);margin-bottom:var(--sp-3);}
.dx-row.dx-a{grid-template-columns:minmax(0,2fr) minmax(0,1fr);}
.dx-row.dx-b{grid-template-columns:minmax(0,1fr) minmax(0,1.5fr) minmax(0,1fr);}
.dx-row > .dx-card:only-child{grid-column:1 / -1;}
.dx-card{margin-bottom:0;box-shadow:var(--shadow-sm);}
.dx-card .card-body{min-width:0;}
.dx-card .dx-flush{padding:0;}

.dx-legend{display:flex;gap:var(--sp-4);margin-bottom:var(--sp-2);font-size:var(--fs-sm);color:var(--clr-muted);}
.dx-legend i,.dx-keys i{display:inline-block;width:10px;height:10px;border-radius:3px;margin-inline-end:6px;}
.dx-svg{display:block;width:100%;height:auto;}
.dx-grid{stroke:#EEF0F7;stroke-width:1;}
.dx-axis{font-size:11px;fill:var(--clr-muted);}
.dx-hit{fill:transparent;}
.dx-hit:hover{fill:rgba(75,73,172,.05);}

.dx-mix{display:flex;align-items:center;gap:var(--sp-4);flex-wrap:wrap;}
.dx-donut{flex:0 0 150px;width:150px;height:150px;}
.dx-donut circle:hover{stroke-width:21;}
.dx-keys{list-style:none;margin:0;padding:0;flex:1 1 130px;min-width:0;}
.dx-keys li{display:flex;align-items:center;padding:5px 0;border-bottom:1px solid var(--clr-border);}
.dx-keys li:last-child{border-bottom:0;}
.dx-keys li span{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.dx-keys li b{font-variant-numeric:tabular-nums;}

.dx-hbar{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(48px,1fr) auto;gap:var(--sp-3);align-items:center;padding:6px 0;}
.dx-nm{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.dx-track{height:8px;background:#EEF0F7;border-radius:4px;overflow:hidden;}
.dx-track i{display:block;height:100%;background:var(--clr-primary);border-radius:4px;}
.dx-num{font-variant-numeric:tabular-nums lining-nums;}

.dx-table{margin:0;}
.dx-table .dx-r,.dx-table th.dx-r{text-align:end;}
.dx-ok,.dx-warn{display:flex;align-items:center;gap:var(--sp-3);padding:var(--sp-3);border-radius:var(--radius);}
.dx-ok  {background:#E4F6EE;color:#12724C;}
.dx-warn{background:#FFF3D6;color:#8A5A00;}
.dx-ok i,.dx-warn i{font-size:18px;}
.dx-empty{color:var(--clr-muted);padding:var(--sp-4) 0;text-align:center;}
.dx-ver{margin-top:var(--sp-4);font-size:10px;color:#A0A5BF;text-align:center;}

@media (max-width:860px){
  .dx-row.dx-a,.dx-row.dx-b{grid-template-columns:minmax(0,1fr);}
}

/* dash-v2: a second, older ".kpi-row" rule further up this file (flex, for the
   small .kpi boxes on report screens) was beating the tile grid above, so the
   dashboard tiles shrank to their content and wrapped. Scoped to the dashboard
   rows only; the report screens keep theirs. */
.kpi-row.dash-kpis{display:grid;gap:var(--sp-3);grid-template-columns:repeat(4,minmax(0,1fr));flex-wrap:nowrap;}
.kpi-row.dash-kpis.k-3{grid-template-columns:repeat(3,minmax(0,1fr));}
.kpi-row.dash-kpis .k-tile{min-width:0;}
@media (max-width:860px){.kpi-row.dash-kpis,.kpi-row.dash-kpis.k-3{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width:640px){.kpi-row.dash-kpis,.kpi-row.dash-kpis.k-3{grid-template-columns:minmax(0,1fr);}}

/* ==========================================================================
   Dashboard  (dash-v3)
   Flat white cards on a soft grey page, one indigo lead card. Colours reuse
   the tile palette (--k2 of k-teal / k-indigo / ...), so the meaning of each
   colour is unchanged; only the 3-D glyph and the upper-case labels are gone.
   Scoped to body.dv3-page so no other screen is touched.
   ========================================================================== */
body.dv3-page{background:#F4F5FA;}
.dv3-page .page{max-width:1480px;margin:0 auto;}

.dv3-greet{display:flex;align-items:flex-end;justify-content:space-between;gap:var(--sp-3);flex-wrap:wrap;}
.dv3-date{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;background:#fff;border:1px solid var(--clr-border);
  border-radius:99px;font-size:var(--fs-sm);color:var(--clr-muted);white-space:nowrap;}

.dv3-page .qa-panel{border-radius:12px;box-shadow:0 1px 2px rgba(16,24,40,.04);}

/* lead row: hero + 2x2 */
.dv3-top{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:var(--sp-3);margin-bottom:var(--sp-3);}
.dv3-top > .dv3-mini:only-child{grid-column:1 / -1;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));}

/* dash-v6 hero: a white card like the rest, the figure in ink, this month's
   column in the brand accent, earlier months receded in the same hue. */
.dv3-hero{position:relative;display:flex;flex-direction:column;min-height:230px;min-width:0;
  padding:18px 20px 12px;border-radius:14px;background:#fff;color:var(--clr-text,#1F2340);
  border:1px solid var(--clr-border);box-shadow:0 1px 2px rgba(16,24,40,.04),0 8px 24px rgba(75,73,172,.06);}
.dh-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.dh-ic{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#EEEDF8;color:#4B49AC;font-size:16px;}
.dh-lab{font-size:13.5px;font-weight:600;color:#3F4562;}
.dh-cmp{display:inline-flex;align-items:center;gap:8px;margin-inline-start:auto;font-size:12px;color:var(--clr-muted);}
.dh-delta{display:inline-flex;align-items:center;gap:3px;padding:2px 9px 2px 7px;border-radius:99px;font-weight:700;font-size:12px;line-height:18px;
  background:#F1F3F9;color:#4A5072;direction:ltr;unicode-bidi:isolate;}
.dh-delta.up{background:#E4F6EE;color:#0E7A55;}
.dh-delta.dn{background:#FDECEF;color:#B42318;}
.dh-val{margin-top:14px;font-size:40px;font-weight:700;line-height:1.05;letter-spacing:-.8px;color:#1F2340;font-variant-numeric:lining-nums;}
.dh-sub{margin-top:6px;font-size:12.5px;color:var(--clr-muted);min-height:16px;}
.dh-cols{display:block;width:100%;height:auto;margin-top:auto;padding-top:10px;overflow:visible;}
.dh-base{stroke:#E6E8F0;stroke-width:1;}
.dh-cap{font-size:12px;font-weight:700;fill:#2E2C8A;}
.dh-mon{font-size:10.5px;fill:#9AA0B8;}
.dh-mon.is-now{fill:#2E2C8A;font-weight:700;}

/* columns shared by the hero and the 12-month chart: a wide invisible hit
   area per month, the hovered month lifts, the rest stay put */
.dc-hit{fill:transparent;}
.dc-col{outline:none;cursor:default;}
.dc-col:hover .dc-hit,.dc-col:focus .dc-hit{fill:rgba(75,73,172,.05);}
.dc-col .dc-bar{transition:opacity .12s ease;}
.dh-cols:hover .dc-col:not(:hover) .dc-bar{opacity:.55;}
.dx-svg:hover .dc-col:not(:hover) .dc-bar{opacity:.45;}

.dv3-mini{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--sp-3);}
.dv3-bal{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:var(--sp-3);margin-bottom:var(--sp-3);}

/* the card */
.dk{display:flex;flex-direction:column;gap:6px;min-width:0;padding:14px 16px;background:#fff;
  border:1px solid var(--clr-border);border-radius:12px;box-shadow:0 1px 2px rgba(16,24,40,.04);
  transition:box-shadow .15s ease,border-color .15s ease;}
.dk:hover{box-shadow:0 6px 16px rgba(16,24,40,.08);border-color:#DCDFEA;}
.dk-top{display:flex;align-items:center;gap:10px;min-width:0;}
.dk-ic{flex:0 0 auto;display:grid;place-items:center;width:34px;height:34px;border-radius:10px;
  background:var(--k2,#4B49AC);color:#fff;font-size:16px;}
.dk-lab{min-width:0;font-size:12.5px;font-weight:500;color:var(--clr-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.dk-val{font-size:22px;font-weight:700;line-height:1.2;color:var(--clr-text);font-variant-numeric:tabular-nums lining-nums;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.dk-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;font-size:12px;color:var(--clr-muted);}
.dk-foot > span:first-child{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.dk .k-delta{margin-inline-start:0;}
.dk.is-empty .dk-ic{background:#E3E7EF;color:#8A93A8;}
.dk.is-empty .dk-val{font-size:15px;font-weight:600;color:var(--clr-muted);}

/* the insight cards follow the same shape */
.dv3-page .dx-card{border-radius:12px;box-shadow:0 1px 2px rgba(16,24,40,.04);}
.dv3-page .dx-card .card-head{border-bottom-color:#EEF0F5;}
.dv3-page .card{border-radius:12px;}

@media (max-width:1100px){
  .dv3-top{grid-template-columns:minmax(0,1fr);}
}
@media (max-width:640px){
  .dv3-mini{grid-template-columns:minmax(0,1fr);}
  .dh-val{font-size:28px;}
}
/* dash-v3: a card may shrink below its content (the invoices table scrolls
   inside its own card instead of widening the page on a phone). */
.dv3-page .dx-card,.dv3-page .dk,.dv3-page .qa-panel{min-width:0;}
.dv3-page .dx-flush{overflow-x:auto;}
.dv3-page .dx-table{min-width:420px;}
@media (max-width:640px){
  .dv3-page .page{padding:var(--sp-3);}
  .dv3-bal{grid-template-columns:repeat(2,minmax(0,1fr));}
  .dk-val{font-size:18px;}
}

/* ==========================================================================
   Account picker popup (acp-)  -  shared by Journal Voucher and Contra Voucher.
   Opened by the grid's account cell; the page script fills it.
   ========================================================================== */
.acp-pop.is-open{display:flex;flex-direction:column;position:fixed;z-index:9999;overflow:hidden;
    background:#fff;border:1px solid #D3D7E3;border-radius:10px;box-shadow:0 16px 40px rgba(16,24,40,.18),0 2px 6px rgba(16,24,40,.06);}
.acp-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px;border-bottom:1px solid #EEF0F5;background:#FAFBFD;}
.acp-title{font-weight:600;font-size:13px;color:var(--clr-text,#1F2340);}
.acp-count{font-size:12px;color:var(--clr-muted,#6C7293);}
.acp-scroll{flex:1 1 auto;min-height:0;overflow-y:auto;}
.acp-tbl{width:100%;border-collapse:collapse;table-layout:fixed;font-size:13.5px;}
.acp-tbl th{position:sticky;top:0;z-index:1;background:#fff;text-align:start;font-weight:600;font-size:12px;color:var(--clr-muted,#6C7293);
    padding:8px 14px;border-bottom:1px solid #E8EAF0;}
.acp-tbl td{padding:9px 14px;border-bottom:1px solid #F1F2F7;vertical-align:middle;color:#1F2340;}
.acp-tbl tr.acp-row{cursor:pointer;}
.acp-tbl tr.acp-row:hover td{background:#F6F7FC;}
.acp-tbl tr.acp-row.is-sel td{background:#EEEDF8;}
.acp-tbl tr.acp-row.is-sel td:first-child{box-shadow:inset 3px 0 0 var(--clr-primary,#4B49AC);}
[dir=rtl] .acp-tbl tr.acp-row.is-sel td:first-child{box-shadow:inset -3px 0 0 var(--clr-primary,#4B49AC);}
.acp-code{font-family:Consolas,'Courier New',monospace;font-size:13px;color:#3F4562;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.acp-name{word-break:break-word;}
.acp-tbl mark{background:#FFF1B8;color:inherit;padding:0 1px;border-radius:2px;}
.acp-type{display:inline-block;padding:2px 9px;border-radius:99px;font-size:11.5px;font-weight:600;white-space:nowrap;}
.acp-type.led{background:#EEF2FF;color:#3730A3;}
.acp-type.sub{background:#F3E8FF;color:#6B21A8;}
.acp-empty{padding:28px 14px;text-align:center;color:var(--clr-muted,#6C7293);}
/* an account already on another line of this voucher */
.acp-tbl tr.acp-row.is-used td{background:#FFFBEB;}
.acp-tbl tr.acp-row.is-used.is-sel td{background:#EEEDF8;}
.acp-used{display:inline-block;margin-inline-start:8px;padding:1px 7px;border-radius:99px;background:#FEF3C7;color:#92400E;
    font-size:11px;font-weight:600;white-space:nowrap;vertical-align:1px;}
.acp-foot{padding:7px 14px;border-top:1px solid #EEF0F5;background:#FAFBFD;font-size:11.5px;color:var(--clr-muted,#6C7293);}
.acp-foot kbd{display:inline-block;min-width:18px;padding:0 5px;margin:0 2px;border:1px solid #D3D7E3;border-bottom-width:2px;border-radius:4px;
    background:#fff;font:600 11px/16px Roboto,'Segoe UI',sans-serif;text-align:center;color:#3F4562;}
.acp-pop:not(.is-open){display:none;}
/*  Search box inside the picker (ex-v6, Expense Entry; any acp- popup may use it). */
.acp-search{position:relative;padding:8px 14px;border-bottom:1px solid #EEF0F5;background:#fff;flex:0 0 auto;}
.acp-search svg{position:absolute;inset-inline-start:25px;top:50%;transform:translateY(-50%);width:15px;height:15px;color:#9AA0B8;pointer-events:none;}
.acp-search input{display:block;width:100%;box-sizing:border-box;height:34px;padding:0 12px;padding-inline-start:34px;
    border:1px solid #D3D7E3;border-radius:8px;font:inherit;font-size:13.5px;color:#1F2340;background:#FAFBFD;outline:none;}
.acp-search input:focus{border-color:var(--clr-primary,#4B49AC);background:#fff;box-shadow:0 0 0 3px rgba(75,73,172,.12);}
.acp-search input::placeholder{color:#9AA0B8;}
.acp-head,.acp-foot{flex:0 0 auto;}
.acp-tbl th.r,.acp-tbl td.r{text-align:end;}
.acp-tbl td.acp-num{font-variant-numeric:tabular-nums;white-space:nowrap;}
/*  cp-v3. Search row with a Type filter (Cash Pipeline party picker):
    type combo, then a compact search box. Popups without the combo keep
    the full-width box above.                                            */
.acp-search.has-type{display:flex;align-items:center;gap:8px;padding:7px 14px;}
.acp-search .acp-type-sel{flex:0 0 190px;height:30px;padding:0 8px;border:1px solid #D3D7E3;border-radius:7px;
    font:inherit;font-size:12.5px;color:#1F2340;background:#FAFBFD;outline:none;}
.acp-search .acp-type-sel:focus{border-color:var(--clr-primary,#4B49AC);background:#fff;box-shadow:0 0 0 3px rgba(75,73,172,.12);}
.acp-search .acp-q{position:relative;flex:0 1 260px;min-width:150px;}
.acp-search .acp-q svg{inset-inline-start:10px;width:13px;height:13px;}
.acp-search .acp-q input{height:30px;font-size:12.5px;padding-inline-start:30px;}

/* ==========================================================================
   Expense Report (er-v1) - Erp.Web\Modules\Expenses\ExpenseReport.aspx
   ========================================================================== */
.xr-tabs{margin:4px 0 12px;}
.xr-pane{margin-bottom:14px;}
.xr-scroll{overflow-x:auto;}
.xr-tbl td.nw{white-space:nowrap;}
.xr-tbl tfoot td{background:#DDEBF7;font-weight:700;color:#0f2740;border-top:2px solid #b9cde6;}
.xr-tbl td.xr-bad{color:#b42318;font-weight:600;}
.xr-chip{display:inline-block;padding:1px 8px;border-radius:99px;background:#FEF3C7;color:#92400E;font-size:11.5px;font-weight:600;white-space:nowrap;}
.tb-fld select.xr-narrow{min-width:120px;}

/* ==========================================================================
   Daily Cash Report (dcr-v1) - Erp.Web\Modules\CashBank\DailyCashReport.aspx
   A cash book on one page: opening, plus receipts, less payments, closing.
   ========================================================================== */
.dcr-seg{display:inline-flex;border:1px solid #cbd5e1;border-radius:8px;overflow:hidden;background:#fff;height:33px;}
.dcr-seg .dcr-seg-btn{border:0;background:transparent;padding:0 16px;font:inherit;font-size:13px;color:#3F4562;cursor:pointer;
    border-inline-end:1px solid #E3E6EE;}
.dcr-seg .dcr-seg-btn:last-child{border-inline-end:0;}
.dcr-seg .dcr-seg-btn:hover{background:#F4F5FA;}
.dcr-seg .dcr-seg-btn.is-on{background:var(--clr-primary,#4B49AC);color:#fff;font-weight:600;}
.dcr-seg .dcr-seg-btn:focus-visible{outline:2px solid var(--clr-primary,#4B49AC);outline-offset:-2px;}

.dcr-head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;flex-wrap:wrap;
    margin:2px 0 16px;padding-bottom:14px;border-bottom:1px solid #E6E9F0;}
.dcr-title{font-size:20px;font-weight:700;color:#1F2340;margin:0 0 8px;}
.dcr-tags{display:flex;flex-wrap:wrap;gap:6px;}
.dcr-tag{display:inline-block;padding:3px 10px;border-radius:99px;background:#F1F3F9;color:#4A5072;font-size:12px;}
.dcr-tag.k-cash{background:#E6F6EF;color:#0E7A55;font-weight:600;}
.dcr-tag.k-bank{background:#E6F0FB;color:#1D5FA0;font-weight:600;}
.dcr-tag.k-all{background:#EEEDF8;color:#4B49AC;font-weight:600;}
.dcr-answer{text-align:end;}
.dcr-answer span{display:block;font-size:12px;color:#6C7293;margin-bottom:2px;}
.dcr-answer b{font-size:26px;font-weight:700;color:#1F2340;font-variant-numeric:tabular-nums;letter-spacing:-.01em;}

.dcr-grid{display:grid;grid-template-columns:minmax(360px,1fr) minmax(360px,1.15fr);gap:18px;align-items:start;margin-bottom:20px;}
@media (max-width:1000px){.dcr-grid{grid-template-columns:1fr;}}

.dcr-stmt{background:#fff;border:1px solid #E3E6EE;border-radius:12px;overflow:hidden;font-variant-numeric:tabular-nums;}
.dcr-line{display:flex;justify-content:space-between;align-items:baseline;padding:13px 18px;font-weight:600;color:#1F2340;}
.dcr-line b{font-size:16px;}
.dcr-open{background:#F7F8FB;border-bottom:1px solid #EEF0F5;}
.dcr-sec{padding:12px 18px 10px;border-bottom:1px solid #EEF0F5;}
.dcr-sec h3{margin:0 0 6px;font-size:13px;font-weight:700;color:#1F2340;display:flex;align-items:center;gap:8px;}
.dcr-sec h3::before{content:'';width:4px;height:14px;border-radius:2px;background:#12A08A;}
.dcr-sec.dcr-out h3::before{background:#D94A68;}
.dcr-row{display:flex;justify-content:space-between;align-items:baseline;padding:6px 0 6px 12px;border-bottom:1px dashed #EEF0F5;font-size:13.5px;}
.dcr-row:last-of-type{border-bottom:0;}
.dcr-row b{font-weight:500;color:#1F2340;}
.dcr-lab{color:#3F4562;display:inline-flex;align-items:center;gap:8px;}
.dcr-n{font-style:normal;font-size:11px;min-width:20px;text-align:center;padding:0 6px;border-radius:99px;background:#F1F3F9;color:#6C7293;}
.dcr-none .dcr-lab,.dcr-none b{color:#9AA0B8;}
.dcr-total{display:flex;justify-content:space-between;align-items:baseline;padding:8px 0 2px 12px;font-weight:700;font-size:13.5px;}
.dcr-total b{border-top:1px solid #1F2340;padding-top:4px;min-width:120px;text-align:end;}
.dcr-in .dcr-total b{color:#0E7A55;}
.dcr-out .dcr-total b{color:#B42318;}
.dcr-close{background:#EEEDF8;}
.dcr-close b{font-size:20px;color:#2E2C8A;border-bottom:3px double #2E2C8A;padding-bottom:1px;}
.dcr-close.is-neg b{color:#B42318;border-bottom-color:#B42318;}

.dcr-h{margin:0 0 8px;font-size:14px;font-weight:700;color:#1F2340;}
.dcr-side .pl-tbl td,.dcr-side .pl-tbl th{white-space:nowrap;}
.dcr-acode{font-family:Consolas,'Courier New',monospace;color:#6C7293;font-size:12px;}
.dcr-det td.nw{white-space:nowrap;}
.dcr-det td.dcr-in{color:#0E7A55;font-weight:600;}
.dcr-det td.dcr-out{color:#B42318;font-weight:600;}
.dcr-det tr.dcr-orow td{background:#F7F8FB;font-weight:600;color:#3F4562;}
.dcr-det tfoot td{background:#EEEDF8;font-weight:700;color:#1F2340;}
.dcr-kind{display:inline-block;padding:1px 8px;border-radius:99px;font-size:11.5px;font-weight:600;}
.dcr-kind.in{background:#E6F6EF;color:#0E7A55;}
.dcr-kind.out{background:#FDECEF;color:#B42318;}

/* Dashboard: the Cash and Bank balance tiles open the Daily Cash Report. */
.dk.is-link{cursor:pointer;transition:box-shadow .15s ease,transform .15s ease;}
.dk.is-link:hover{box-shadow:0 6px 18px rgba(16,24,40,.12);transform:translateY(-1px);}
.dk.is-link:focus-visible{outline:2px solid var(--clr-primary,#4B49AC);outline-offset:2px;}

/* =============================================================================
   Cash Flow Statement (cf-v2) - Erp.Web\Modules\GL\CashFlowStatement.aspx
   Reuses the Daily Cash Report frame (.dcr-head/.dcr-stmt/.dcr-row/...).
   ============================================================================= */
.dcr-row b.neg,.dcr-total b.neg,.dcr-answer b.neg{color:#B42318;}
.dcr-total b.pos,.dcr-answer b.pos{color:#0E7A55;}
.cf-sec{padding:12px 18px 10px;border-bottom:1px solid #EEF0F5;}
.cf-sec h3{margin:0 0 6px;font-size:13px;font-weight:700;color:#1F2340;display:flex;align-items:center;gap:8px;}
.cf-l{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:6px;
      background:#EEEDF8;color:#4B49AC;font-size:11.5px;font-weight:700;}
.cf-acc{display:flex;justify-content:space-between;padding:3px 0 3px 30px;font-size:12.5px;color:#6C7293;}
.cf-acc span:last-child{font-variant-numeric:tabular-nums;}
html[dir=rtl] .cf-acc{padding:3px 30px 3px 0;}
html[dir=rtl] .dcr-row,html[dir=rtl] .dcr-total{padding-left:0;padding-right:12px;}
.cf-net{border-top:1px solid #EEF0F5;}
.cf-check{display:flex;align-items:flex-start;gap:8px;padding:10px 18px;font-size:12.5px;color:#0E7A55;background:#F2FAF6;
          border-top:1px solid #E3F2EA;}
.cf-check.is-bad{color:#9A3412;background:#FFF7ED;border-top-color:#FDE7CF;}
.cf-ok{display:inline-flex;align-items:center;justify-content:center;flex:0 0 18px;height:18px;border-radius:50%;
       background:#0E7A55;color:#fff;font-size:11px;font-weight:700;}
.cf-check.is-bad .cf-ok{background:#C2410C;}
.cf-bars{background:#fff;border:1px solid #E3E6EE;border-radius:12px;padding:14px 16px;display:grid;gap:14px;}
.cf-bar{display:grid;grid-template-columns:1fr auto;grid-template-areas:"lab val" "bar bar";gap:4px 10px;font-size:13px;}
.cf-bar span{grid-area:lab;color:#3F4562;}
.cf-bar b{grid-area:val;font-variant-numeric:tabular-nums;font-weight:600;color:#1F2340;}
.cf-bar i{grid-area:bar;display:block;height:10px;border-radius:0 4px 4px 0;min-width:2px;background:#12A08A;}
.cf-bar i.neg{background:#D94A68;}
html[dir=rtl] .cf-bar i{border-radius:4px 0 0 4px;}
.cf-chk{display:inline-flex;align-items:center;gap:6px;height:33px;font-size:13px;color:#3F4562;}
.tb-fld .cf-chk label{text-transform:none;letter-spacing:0;font-size:13px;font-weight:500;color:#3F4562;margin:0;cursor:pointer;}
@media print{.cf-check{background:none;}}

/* Session keeper notice (ka-v1) - Content/js/erp.js SessionKeeper. Shown two
   minutes before the idle sign-out; any click or key hides it. */
.ka-note{position:fixed;left:50%;bottom:22px;transform:translateX(-50%);z-index:100000;max-width:min(560px,calc(100vw - 32px));
         padding:10px 16px;border-radius:10px;background:#FFF7ED;color:#9A3412;border:1px solid #FED7AA;
         box-shadow:0 8px 24px rgba(16,24,40,.16);font-size:13px;line-height:1.45;}
.ka-note[hidden]{display:none;}

/* Dashboard refresh chip (dash-v5) - Erp.Web\Modules\Dashboard\Dashboard.aspx */
.dv3-greet-side{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.dv3-refresh{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;background:#fff;border:1px solid var(--clr-border);
  border-radius:99px;font:inherit;font-size:var(--fs-sm);color:var(--clr-primary,#4B49AC);cursor:pointer;white-space:nowrap;}
.dv3-refresh:hover{background:#F4F5FA;}
.dv3-refresh:focus-visible{outline:2px solid var(--clr-primary,#4B49AC);outline-offset:2px;}
.dv3-refresh-lbl{font-weight:600;}
.dv3-refresh-at{color:var(--clr-muted);}
.dv3-refresh-at:empty{display:none;}
.dv3-refresh.is-busy svg{animation:dv3-spin .8s linear infinite;}
.dv3-refresh[disabled]{cursor:progress;opacity:.75;}
@keyframes dv3-spin{to{transform:rotate(360deg);}}
@media (prefers-reduced-motion:reduce){.dv3-refresh.is-busy svg{animation:none;}}

/* =============================================================================
   Dashboard charts dash-v6 - Erp.Web\Modules\Dashboard\Dashboard.aspx
   ============================================================================= */
.dv3-page .dx-legend{gap:18px;flex-wrap:wrap;margin-bottom:10px;font-size:12.5px;color:#4A5072;}
.dv3-page .dx-legend span{display:inline-flex;align-items:center;}
.dv3-page .dx-legend b{margin-inline-start:8px;font-weight:700;color:#1F2340;}
.dv3-page .dx-legend i{width:10px;height:10px;border-radius:3px;}
.dv3-page .dx-grid{stroke:#F0F1F6;}
.dx-base{stroke:#DCDFEA;stroke-width:1;}
.dx-now{fill:#F5F5FC;}
.dv3-page .dx-axis{font-size:11px;fill:#9AA0B8;}
.dv3-page .dx-axis.is-now{fill:#2E2C8A;font-weight:700;}

.dv3-page .dx-mix{display:flex;align-items:center;gap:22px;flex-wrap:wrap;}
.dx-donut-wrap{position:relative;flex:0 0 172px;width:172px;height:172px;}
.dv3-page .dx-donut{width:172px;height:172px;flex:none;}
.dx-ring{stroke:#F1F3F9;stroke-width:22;}
.dx-seg{transition:opacity .12s ease,stroke-width .12s ease;cursor:default;}
.dx-donut-wrap.is-focus .dx-seg{opacity:.3;}
.dx-donut-wrap.is-focus .dx-seg.is-on{opacity:1;stroke-width:25;}
.dx-dc{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;pointer-events:none;padding:0 42px;}
.dx-dc b{font-size:19px;font-weight:700;color:#1F2340;line-height:1.15;font-variant-numeric:lining-nums;white-space:nowrap;}
.dx-dc span{margin-top:3px;font-size:10.5px;color:var(--clr-muted);line-height:1.25;}
.dv3-page .dx-keys{flex:1 1 180px;}
.dv3-page .dx-keys li{gap:10px;padding:8px 6px;border-radius:8px;border-bottom:1px solid #F0F1F6;cursor:default;transition:background .12s ease;}
.dv3-page .dx-keys li:hover,.dv3-page .dx-keys li.is-on{background:#F6F7FB;}
.dv3-page .dx-keys li i{flex:0 0 10px;margin:0;align-self:flex-start;margin-top:4px;}
.dv3-page .dx-keys li span{color:#3F4562;}
.dv3-page .dx-keys li em{display:block;font-style:normal;font-size:11.5px;color:var(--clr-muted);font-variant-numeric:tabular-nums;}
.dv3-page .dx-keys li b{min-width:42px;text-align:end;color:#1F2340;}

.dx-top{display:flex;align-items:center;gap:12px;padding:8px 0;}
.dx-top + .dx-top{border-top:1px solid #F3F4F8;}
.dx-rank{flex:0 0 26px;display:grid;place-items:center;width:26px;height:26px;border-radius:8px;background:#F1F3F9;color:#4A5072;font-size:12px;font-weight:700;}
.dx-top:first-child .dx-rank{background:#EEEDF8;color:#4B49AC;}
.dx-top-main{flex:1;min-width:0;}
.dx-top-line{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:6px;}
.dx-top-line .dx-nm{min-width:0;font-size:13px;color:#1F2340;}
.dx-top-line b{font-size:13px;color:#1F2340;}
.dv3-page .dx-top .dx-track{display:block;height:6px;background:#EEEDF8;border-radius:3px;}
.dv3-page .dx-top .dx-track i{background:#4B49AC;border-radius:3px;}
.dx-top:not(:first-child) .dx-track i{background:#8583D0;}

/* hover card for the charts (page script reads data-tip / data-tip-rows) */
.dv-tip{position:fixed;z-index:1000;min-width:150px;max-width:260px;padding:9px 12px;border-radius:10px;background:#fff;
  border:1px solid #E3E6EE;box-shadow:0 10px 28px rgba(16,24,40,.14);font-size:12.5px;color:#1F2340;pointer-events:none;}
.dv-tip[hidden]{display:none;}
.dv-tip h4{margin:0 0 6px;font-size:12px;font-weight:700;color:#4A5072;}
.dv-tip div{display:flex;align-items:center;gap:8px;padding:2px 0;}
.dv-tip div i{width:9px;height:9px;border-radius:3px;flex:0 0 9px;}
.dv-tip div span{flex:1;color:#4A5072;}
.dv-tip div b{font-variant-numeric:tabular-nums;}
@media (max-width:640px){
  .dh-val{font-size:30px;}
  .dh-cmp{margin-inline-start:0;width:100%;}
  .dv3-page .dx-mix{justify-content:center;}
  /* the charts scale with their card; on a phone their text is set larger
     in chart units so it still lands at a readable 9-10px */
  .dh-mon{font-size:19px;}
  .dh-cap{font-size:22px;}
  .dv3-page .dx-axis{font-size:21px;}
  .dv3-page .dx-svg{overflow:visible;}
}
@media (prefers-reduced-motion:reduce){.dc-col .dc-bar,.dx-seg,.dv3-page .dx-keys li{transition:none;}}

/* ==========================================================================
   DATA TOOL (dt-v1) - Modules/Admin/DataTool.aspx, developer only.
   Grids are the standard grid (gs-v1); only row tints and the monospace
   table names are added here.
   ========================================================================== */
.form-badge.dt-badge{color:#8E1F1F;background:#FDECEC;}
.dt .dt-off{max-width:760px;font-size:var(--fs-base);line-height:1.6;}

/* which database: read before anything else */
.dt-db{display:flex;flex-wrap:wrap;align-items:center;gap:var(--sp-3) var(--sp-6);
  padding:var(--sp-3) var(--sp-4);margin-bottom:var(--sp-4);
  background:var(--clr-surface);border:1px solid var(--clr-border);
  border-inline-start:4px solid var(--clr-danger);border-radius:var(--radius);}
.dt-db-name{display:flex;flex-direction:column;gap:2px;min-width:180px;}
.dt-db-k{font-size:var(--fs-sm);font-weight:600;color:var(--clr-muted);}
.dt-db-v{font-size:24px;font-weight:700;line-height:1.15;color:var(--clr-text);}
.dt-db-srv{font-size:var(--fs-sm);color:var(--clr-muted);}
.dt-db-facts{display:flex;flex-wrap:wrap;gap:var(--sp-2) var(--sp-5);margin:0;flex:1 1 380px;}
.dt-fact{display:flex;flex-direction:column;gap:1px;min-width:64px;}
.dt-fact dt{font-size:var(--fs-sm);color:var(--clr-muted);}
.dt-fact dd{margin:0;font-size:16px;font-weight:700;font-variant-numeric:tabular-nums;}
.dt-fact-wide{flex:1 1 260px;min-width:0;}
.dt-fact dd.dt-path{font:500 12px/1.5 Consolas,'Courier New',monospace;word-break:break-all;}

/* the three delete options */
.dt-opts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--sp-3);}
.dt-opt{display:grid;grid-template-columns:auto 1fr;column-gap:var(--sp-2);row-gap:4px;align-content:start;
  padding:var(--sp-3);background:var(--clr-surface);border:1px solid var(--clr-border-strong);
  border-radius:var(--radius);cursor:pointer;transition:border-color .15s ease, box-shadow .15s ease;}
.dt-opt input{grid-row:1 / span 2;margin:3px 0 0;}
.dt-opt-t{font-weight:700;}
.dt-opt-d{grid-column:2;font-size:var(--fs-sm);line-height:1.5;color:var(--clr-muted);}
.dt-opt:hover{border-color:var(--clr-primary);}
.dt-opt:has(input:checked){border-color:var(--clr-primary);box-shadow:0 0 0 3px var(--clr-primary-soft);}
.dt-opt-all .dt-opt-t{color:#8E1F1F;}
.dt-opt-all:hover,.dt-opt-all:has(input:checked){border-color:var(--clr-danger);}
.dt-opt-all:has(input:checked){box-shadow:0 0 0 3px #FBE1E1;}
.dt-actions{display:flex;flex-wrap:wrap;gap:var(--sp-2);margin-top:var(--sp-3);}

/* preview and results */
.dt-lead{margin:var(--sp-4) 0 var(--sp-2);font-weight:600;}
.dt-cols{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,2fr);gap:var(--sp-3);align-items:start;}
.dt .list-grid td.dt-tname{font-family:Consolas,'Courier New',monospace;font-size:12px;}
.dt .list-grid tbody tr.dt-zero td{color:var(--clr-muted);}
.dt .list-grid tbody tr:hover td{cursor:default;}
.dt .list-grid td.dt-wrap,.dt .list-grid td.dt-chips{white-space:normal;overflow:visible;}
.dt .list-grid tbody tr.dt-bad td{background:#FFF4F4;}
.dt .list-grid tbody tr.dt-warn td{background:#FFFAEE;}
.dt-others{margin-top:var(--sp-3);}
.dt-others summary{cursor:pointer;font-weight:600;color:var(--clr-primary);}
.dt-others-list{display:flex;flex-wrap:wrap;gap:6px;margin-top:var(--sp-2);}
.dt-tbl{font-size:12px;padding:1px 8px;color:var(--clr-muted);background:var(--clr-surface-alt);
  border:1px solid var(--clr-border);border-radius:999px;}
.dt-tbl b{font:600 12px Consolas,'Courier New',monospace;color:var(--clr-text);}
.dt-confirm{margin-top:var(--sp-4);padding:var(--sp-3);background:#FFF8F8;border:1px solid #F5C2C2;border-radius:var(--radius);}
.dt-confirm .field-label{color:#8E1F1F;}
.dt-confirm-row{display:flex;flex-wrap:wrap;gap:var(--sp-2);}
.dt-confirm-box{max-width:260px;font-family:Consolas,'Courier New',monospace;}
.dt-done{margin-top:var(--sp-3);}
.dt-note{margin:0 0 var(--sp-3);max-width:110ch;font-size:var(--fs-sm);line-height:1.55;color:var(--clr-muted);}

/* users */
.dt-chip{display:inline-block;margin:1px 0;margin-inline-end:4px;padding:0 8px;font-size:11px;font-weight:600;line-height:1.7;
  border:1px solid transparent;border-radius:999px;white-space:nowrap;}
.dt-chip.is-ok{color:#0A6B39;background:#E7F8EF;border-color:#A9E6C6;}
.dt-chip.is-del{color:#8E1F1F;background:#FDECEC;border-color:#F5C2C2;}
.dt-chip.is-keep{color:#5B6475;background:#F1F3F7;border-color:#D6DAE3;}
.dt-chip.is-warn{color:#7A5200;background:#FFF6E5;border-color:#FFE0A3;}
.dt-chip.is-super{color:#14607F;background:#E9F5FB;border-color:#B7DEEF;}
.dt-chip.is-me{color:var(--clr-primary);background:var(--clr-primary-soft);}
.dt .list-grid td.dt-login{font-weight:600;}
.dt .list-grid td.dt-row-act{text-align:end;}
.dt-link{margin-inline-start:12px;font-size:12px;font-weight:600;color:var(--clr-primary);text-decoration:none;}
.dt-link:hover{text-decoration:underline;}
.dt-link.dt-link-del{color:var(--clr-danger);}
.dt-uact{margin-bottom:var(--sp-3);padding:var(--sp-3);background:var(--clr-primary-soft);
  border:1px solid #CFCDEE;border-radius:var(--radius);}
.dt-uact-who{margin-bottom:var(--sp-2);}
.dt-uact-who span{margin-inline-start:6px;color:var(--clr-muted);}
.dt-pwd-row{display:flex;gap:var(--sp-2);max-width:460px;}
.dt-pwd{font:600 15px/1 Consolas,'Courier New',monospace;letter-spacing:.06em;}
.dt-must{margin-top:var(--sp-2);}
.dt-del-say{margin:0;}
code.dt-pwd-show{padding:1px 8px;font:700 15px/1.4 Consolas,'Courier New',monospace;letter-spacing:.06em;
  background:#fff;border:1px solid #A9E6C6;border-radius:var(--radius-sm);user-select:all;}

/* demo data */
.dt-counts{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:var(--sp-2) var(--sp-3);}
.dt-count{display:flex;flex-direction:column;gap:4px;font-size:var(--fs-sm);font-weight:600;color:var(--clr-label);}
.dt-count > span{min-height:2.7em;display:flex;align-items:flex-end;line-height:1.3;}
.dt-count .ctl.num{text-align:end;}
.dt-count-chk input{width:18px;height:var(--ctl-h);margin:0;}

/* recent runs */
.dt-log{border:0;border-radius:0 0 var(--radius) var(--radius);}
.dt-sub{margin-top:2px;font-size:11.5px;color:var(--clr-muted);white-space:normal;word-break:break-all;}
.dt-sub.dt-err{color:#8E1F1F;word-break:normal;}
.dt-empty{margin:0;padding:var(--sp-4);color:var(--clr-muted);}

@media (max-width:900px){
  .dt-opts,.dt-cols{grid-template-columns:1fr;}
  .dt-counts{grid-template-columns:repeat(4,minmax(0,1fr));}
}
@media (max-width:520px){
  .dt-counts{grid-template-columns:repeat(2,minmax(0,1fr));}
  .dt-db-v{font-size:20px;}
}

/* ==========================================================================
   ERP ASSISTANT (ai-v1, voice ai-v2) - Modules/AI/Assistant.aspx
   The thread scrolls; the question box stays at the foot of the tab.
   ========================================================================== */
.form-body.ai-body{display:flex;flex-direction:column;padding:0;overflow:hidden;}
.ai-nokey{margin:var(--sp-4);max-width:760px;line-height:1.6;}
.ai{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;}
.ai-thread{flex:1 1 auto;min-height:0;overflow:auto;padding:var(--sp-5) var(--sp-5) var(--sp-3);
  display:flex;flex-direction:column;gap:var(--sp-3);background:var(--clr-surface-alt);}
.ai-intro{max-width:760px;width:100%;margin:0 auto;padding-bottom:var(--sp-2);}
.ai-intro-text{margin:0 0 var(--sp-4);font-size:var(--fs-lg);line-height:1.6;color:var(--clr-text);}
.ai-intro.is-small .ai-intro-text,.ai-intro.is-small .ai-sugg-head,.ai-intro.is-small .ai-sugg{display:none;}
.ai-sugg-head{margin:var(--sp-3) 0 var(--sp-2);font-size:var(--fs-sm);font-weight:600;color:var(--clr-muted);}
.ai-sugg{display:flex;flex-wrap:wrap;gap:var(--sp-2);}
.ai-chip{padding:6px 12px;font:inherit;font-size:var(--fs-sm);line-height:1.4;text-align:start;color:var(--clr-primary-dark);
  background:var(--clr-surface);border:1px solid #D6D5F0;border-radius:999px;cursor:pointer;
  transition:background-color .15s ease,border-color .15s ease;}
.ai-chip:hover{background:var(--clr-primary-soft);border-color:var(--clr-primary);}
.ai-chip:focus-visible{outline:2px solid var(--clr-primary);outline-offset:2px;}
.ai-recent .ai-chip{color:var(--clr-text);border-color:var(--clr-border-strong);}

.ai-msg{max-width:760px;width:100%;margin:0 auto;padding:var(--sp-3) var(--sp-4);line-height:1.6;
  border-radius:var(--radius);overflow-wrap:anywhere;}
.ai-msg p{margin:0 0 var(--sp-2);}
.ai-msg p:last-child{margin-bottom:0;}
.ai-msg ul,.ai-msg ol{margin:0 0 var(--sp-2);padding-inline-start:20px;}
.ai-msg ul{list-style:disc;}
.ai-msg ol{list-style:decimal;}
.ai-msg code{font:12px Consolas,'Courier New',monospace;padding:0 4px;background:var(--clr-surface-alt);border-radius:3px;}
.ai-msg .ai-h{font-weight:700;}
.ai-me{background:var(--clr-primary-soft);border:1px solid #DCDBF2;}
.ai-who{margin-bottom:2px;font-size:11px;font-weight:700;color:var(--clr-primary);}
.ai-bot{background:var(--clr-surface);border:1px solid var(--clr-border);box-shadow:var(--shadow-sm);}
.ai-bot.is-err{color:#8E1F1F;background:#FDECEC;border-color:#F5C2C2;box-shadow:none;}
.ai-bot.is-wait{color:var(--clr-muted);background:transparent;border-color:transparent;box-shadow:none;}
.ai-used{margin-top:var(--sp-2);font-size:11.5px;color:var(--clr-muted);}
.ai-tbl{margin:var(--sp-2) 0;overflow-x:auto;border:1px solid var(--clr-border);border-radius:var(--radius-sm);}
.ai-tbl .list-grid{table-layout:auto;}
.ai-tbl .list-grid td{white-space:nowrap;}
.ai-tbl .list-grid tbody tr:hover td{cursor:default;}
.ai-dots{display:inline-flex;gap:3px;vertical-align:middle;}
.ai-dots i{width:6px;height:6px;border-radius:50%;background:var(--clr-primary);opacity:.3;animation:aiDot 1s infinite ease-in-out;}
.ai-dots i:nth-child(2){animation-delay:.15s;}
.ai-dots i:nth-child(3){animation-delay:.3s;}
@keyframes aiDot{0%,80%,100%{opacity:.25;transform:translateY(0);}40%{opacity:1;transform:translateY(-3px);}}
@media (prefers-reduced-motion:reduce){.ai-dots i{animation:none;opacity:.7;}}

.ai-compose{flex:0 0 auto;display:flex;align-items:flex-end;gap:var(--sp-2);
  padding:var(--sp-3) var(--sp-5) var(--sp-1);background:var(--clr-surface);border-top:1px solid var(--clr-border);}
.ai-compose{justify-content:center;}
.ai-q{flex:1 1 auto;max-width:680px;height:auto;min-height:38px;max-height:160px;padding:8px 12px;
  line-height:1.45;resize:none;overflow-y:auto;font:inherit;}
.ai-send{height:38px;}
.ai-foot{flex:0 0 auto;padding:2px var(--sp-5) var(--sp-2);text-align:center;font-size:11px;color:var(--clr-muted);background:var(--clr-surface);}
.form-head .ai-new{height:28px;}
/* voice (ai-v2): microphone beside Send, a speaker on each answer,
   "Read answers aloud" in the head. All start hidden; the script shows
   only what this browser can do. */
.ai-head-tools{display:flex;align-items:center;gap:var(--sp-3);}
.ai-auto{display:inline-flex;align-items:center;gap:6px;font-size:var(--fs-sm);color:var(--clr-text);cursor:pointer;user-select:none;}
.ai-auto input{width:16px;height:16px;margin:0;accent-color:var(--clr-primary);}
.ai-mic{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;padding:0;
  color:var(--clr-primary-dark);background:var(--clr-surface);border:1px solid var(--clr-border-strong);border-radius:50%;cursor:pointer;
  transition:background-color .15s ease,border-color .15s ease,color .15s ease;}
.ai-mic:hover{background:var(--clr-primary-soft);border-color:var(--clr-primary);}
.ai-mic:focus-visible,.ai-say:focus-visible{outline:2px solid var(--clr-primary);outline-offset:2px;}
.ai-mic:disabled{opacity:.45;cursor:default;}
.ai-mic.is-on{color:#fff;background:#C62828;border-color:#C62828;animation:aiMic 1.4s infinite ease-out;}
@keyframes aiMic{0%{box-shadow:0 0 0 0 rgba(198,40,40,.45);}100%{box-shadow:0 0 0 10px rgba(198,40,40,0);}}
@media (prefers-reduced-motion:reduce){.ai-mic.is-on{animation:none;}}
.ai-bot{position:relative;}
.ai-bot .ai-say{float:inline-end;margin-inline-start:var(--sp-2);margin-top:-2px;}
.ai-say{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;
  color:var(--clr-muted);background:transparent;border:1px solid transparent;border-radius:50%;cursor:pointer;}
.ai-say:hover{color:var(--clr-primary-dark);background:var(--clr-primary-soft);}
.ai-say.is-on{color:var(--clr-primary-dark);background:var(--clr-primary-soft);border-color:var(--clr-primary);}
.ai-vmsg{flex:0 0 auto;padding:4px var(--sp-5) 0;text-align:center;font-size:var(--fs-sm);color:#8E1F1F;background:var(--clr-surface);}
.ai-mic[hidden],.ai-auto[hidden],.ai-vmsg[hidden]{display:none;}
@media (max-width:600px){
  .ai-thread{padding:var(--sp-3);}
  .ai-compose{padding:var(--sp-2) var(--sp-3) var(--sp-1);}
}

/* ==========================================================================
   FIXED ASSETS (fa-v1) - Modules/Assets/*.aspx
   Grids are the standard grid (gs-v1); these are the few page parts.
   ========================================================================== */
.fa-note{margin:0 0 var(--sp-3);max-width:120ch;font-size:var(--fs-sm);line-height:1.55;color:var(--clr-muted);}
.fa-figs{display:flex;flex-wrap:wrap;gap:var(--sp-2) var(--sp-6);align-items:flex-end;
  margin-top:var(--sp-2);padding-top:var(--sp-3);border-top:1px solid var(--clr-border);}
.fa-fig{display:flex;flex-direction:column;gap:1px;}
.fa-fig span{font-size:var(--fs-sm);color:var(--clr-muted);}
.fa-fig b{font-size:16px;font-variant-numeric:tabular-nums;}
.fa-fig-nbv b{color:var(--clr-primary);}
.fa-fig-note{margin-inline-start:auto;font-size:var(--fs-sm);color:var(--clr-muted);}
#faOpenBox[hidden]{display:none;}
.fa-hist{border:0;border-radius:0 0 var(--radius) var(--radius);}

.fa-runbar{display:flex;flex-wrap:wrap;align-items:flex-end;gap:var(--sp-3);}
.fa-runbar .field{margin:0;min-width:130px;}
.fa-runbar-btns{display:flex;gap:var(--sp-2);}
.fa-lead{margin:var(--sp-4) 0 var(--sp-2);font-weight:600;}
.fa-cols{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,2fr);gap:var(--sp-3);align-items:start;}
.fa .list-grid tbody tr:hover td{cursor:default;}
.fa-reverse{margin-bottom:var(--sp-3);padding:var(--sp-3);background:#FFF8F8;border:1px solid #F5C2C2;border-radius:var(--radius);}
.fa-reverse-say{margin:0 0 var(--sp-2);}
.fa-reverse-row{display:flex;flex-wrap:wrap;gap:var(--sp-2);}
.fa-reverse-row .ctl{flex:1 1 280px;max-width:520px;}
.fa-chip{display:inline-block;margin-inline-end:6px;padding:0 8px;font-size:11px;font-weight:600;line-height:1.7;
  border:1px solid transparent;border-radius:999px;}
.fa-chip.is-ok{color:#0A6B39;background:#E7F8EF;border-color:#A9E6C6;}
.fa-chip.is-off{color:#5B6475;background:#F1F3F7;border-color:#D6DAE3;}
.fa .list-grid td.fa-runstate{white-space:normal;}
.fa-link-del{font-size:12px;font-weight:600;color:var(--clr-danger);text-decoration:none;}
.fa-link-del:hover{text-decoration:underline;}
@media (max-width:900px){ .fa-cols{grid-template-columns:1fr;} }
.fa-cols .list-wrap + .list-wrap .list-grid td{white-space:normal;}
/* ---- fixed assets, set 2 (fa-v4): capitalise, transfer, disposal, labels ---- */
.fa-empty{padding:var(--sp-4);max-width:110ch;line-height:1.55;color:var(--clr-muted);}
.fa .list-grid.fa-pick td{white-space:normal;vertical-align:middle;}
.fa .list-grid.fa-pick td .ctl.num{display:block;width:100%;max-width:140px;min-width:0;box-sizing:border-box;margin-inline-start:auto;text-align:end;}
.fa-act{display:flex;align-items:flex-end;justify-content:flex-end;gap:var(--sp-2);}
.fa-now{display:flex;flex-direction:column;gap:2px;margin-top:22px;padding:var(--sp-2) var(--sp-3);
    background:#F6F8FB;border:1px solid #E1E6EE;border-radius:var(--radius);}
.fa-now-lbl{font-size:var(--fs-sm);color:var(--clr-muted);}
.fa-sub{font-size:var(--fs-sm);color:var(--clr-muted);}
.fa-chip.is-gl{color:#1D4E89;background:#EAF2FC;border-color:#B9D2F0;margin-inline-start:6px;}
.fa-neg{color:var(--clr-danger);}
.fa .list-grid tr.fa-undone td{color:var(--clr-muted);}
.fa-src:empty{display:none;}
.fa-sheet{display:none;}
.fa-labels{display:flex;flex-wrap:wrap;gap:3mm;}
.fa-label{box-sizing:border-box;display:flex;flex-direction:column;justify-content:space-between;overflow:hidden;
    padding:2mm 2.5mm;border:1px solid #000;border-radius:1.5mm;color:#000;background:#fff;break-inside:avoid;page-break-inside:avoid;}
.fa-labels-s .fa-label{width:50mm;height:25mm;font-size:6.5pt;}
.fa-labels-l .fa-label{width:70mm;height:35mm;font-size:8pt;}
.fa-label-name{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.fa-label-bar{flex:1 1 auto;min-height:0;margin:1mm 0 0.5mm;}
.fa-label-bar svg{display:block;width:100%;height:100%;fill:#000;}
.fa-label-tag{font-family:Consolas,"Courier New",monospace;font-weight:700;text-align:center;letter-spacing:.5px;}
.fa-label-meta{display:flex;justify-content:space-between;gap:2mm;white-space:nowrap;overflow:hidden;}
@media print{
    body.in-tab{background:#fff;}
    .fa-noprint{display:none !important;}
    .fa-sheet{display:block;}
    @page{margin:8mm;}
}
.fa .list-grid.fa-wrap td{white-space:normal;}
/* ---- fixed assets, set 3 (fa-v7): Asset Reports, Zakat Pools ---- */
.xr-pane > .fa-note{margin:var(--sp-2) 0 var(--sp-3);}
.xr-tbl td.b{font-weight:600;}
.xr-tbl td.fa-ok{color:#0A6B39;}
.xr-tbl td.fa-neg, .pl-sub.fa-neg{color:var(--clr-danger);}
.xr-tbl td.fa-muted{color:var(--clr-muted);font-style:italic;}
.xr-tbl.fa-wide{min-width:1180px;}
.fa-cbl{display:flex;flex-wrap:wrap;gap:6px 18px;padding:6px 0;}
.fa-cbl input{margin-inline-end:6px;}
.fa-cbl label{cursor:pointer;}
.xr-pane .pl-sub{margin-top:var(--sp-4);}


/* ==========================================================================
   MESSAGES (msg-v1) - Modules/Messages/*.aspx and the bell (erp-msg.js)
   Chats: list on the start side, the thread beside it; on a phone the list
   and the thread take turns. Mine on the end side, theirs on the start side.
   ========================================================================== */
.msg-card .form-head.msg-head{gap:var(--sp-4);}
.msg-head .msg-tabs{margin:0;}
.msg-tabs .tab-btn{display:inline-flex;align-items:center;gap:6px;}
.msg-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;
  font-size:11px;font-weight:700;line-height:1;color:#fff;background:#C62828;border-radius:9px;}
.msg-badge[hidden]{display:none;}
.form-body.msg-body{display:flex;flex-direction:column;padding:0;overflow:hidden;}
.msg-chats{flex:1 1 auto;min-height:0;display:grid;grid-template-columns:300px minmax(0,1fr);}
.msg-chats[hidden],.msg-general[hidden]{display:none;}
.msg-side{display:flex;flex-direction:column;min-height:0;border-inline-end:1px solid var(--clr-border);background:var(--clr-surface);}
.msg-side-head{padding:var(--sp-3);border-bottom:1px solid var(--clr-border);}
.msg-side-head .msg-new{width:100%;}
.msg-convs{flex:1 1 auto;overflow:auto;}
.msg-conv{display:flex;gap:var(--sp-3);width:100%;padding:10px var(--sp-3);text-align:start;font:inherit;color:var(--clr-text);
  background:transparent;border:0;border-bottom:1px solid var(--clr-border);cursor:pointer;}
.msg-conv:hover{background:var(--clr-surface-alt);}
.msg-conv.is-active{background:var(--clr-primary-soft);}
.msg-conv:focus-visible,.msg-person:focus-visible,.msg-ann-head:focus-visible,.msg-bell:focus-visible{outline:2px solid var(--clr-primary);outline-offset:-2px;}
.msg-avatar{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;
  font-size:13px;font-weight:700;color:var(--clr-primary-dark);background:var(--clr-primary-soft);}
.msg-avatar.is-group{border-radius:10px;}
.msg-conv-main{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:2px;}
.msg-conv-top,.msg-conv-bottom{display:flex;align-items:center;gap:var(--sp-2);min-width:0;}
.msg-conv-name{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600;}
.msg-conv-time{flex:0 0 auto;font-size:11px;color:var(--clr-muted);}
.msg-conv-last{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--fs-sm);color:var(--clr-muted);}
.msg-conv.is-unread .msg-conv-name,.msg-conv.is-unread .msg-conv-last{color:var(--clr-text);font-weight:700;}
.msg-none{padding:var(--sp-5);text-align:center;color:var(--clr-muted);}

.msg-thread{position:relative;display:flex;flex-direction:column;min-height:0;background:var(--clr-surface-alt);}
.msg-empty{margin:auto;padding:var(--sp-5);color:var(--clr-muted);text-align:center;}
.msg-empty[hidden],.msg-th[hidden]{display:none;}
.msg-th{flex:1 1 auto;display:flex;flex-direction:column;min-height:0;}
.msg-th-head{display:flex;align-items:center;gap:var(--sp-2);padding:var(--sp-2) var(--sp-4);background:var(--clr-surface);border-bottom:1px solid var(--clr-border);}
.msg-back{display:none;width:32px;height:32px;font-size:22px;line-height:1;color:var(--clr-text);background:transparent;border:0;cursor:pointer;}
.msg-th-title{font-weight:700;}
.msg-th-sub{font-size:11.5px;color:var(--clr-muted);}
.msg-th-body{flex:1 1 auto;min-height:0;overflow:auto;padding:var(--sp-4);display:flex;flex-direction:column;gap:6px;}
.msg-older{align-self:center;margin-bottom:var(--sp-2);padding:4px 12px;font:inherit;font-size:var(--fs-sm);color:var(--clr-primary-dark);
  background:var(--clr-surface);border:1px solid var(--clr-border);border-radius:999px;cursor:pointer;}
.msg-row{display:flex;}
.msg-row.is-mine{justify-content:flex-end;}
.msg-bubble{max-width:min(560px,78%);padding:8px 12px;line-height:1.5;overflow-wrap:anywhere;background:var(--clr-surface);
  border:1px solid var(--clr-border);border-radius:12px;border-start-start-radius:4px;}
.msg-row.is-mine .msg-bubble{background:var(--clr-primary-soft);border-color:#DCDBF2;border-start-start-radius:12px;border-start-end-radius:4px;}
.msg-from{margin-bottom:2px;font-size:11.5px;font-weight:700;color:var(--clr-primary);}
.msg-gone{color:var(--clr-muted);}
.msg-meta{display:flex;align-items:center;justify-content:flex-end;gap:6px;margin-top:2px;font-size:11px;color:var(--clr-muted);}
.msg-tick{letter-spacing:-3px;font-weight:700;}
.msg-tick.is-part{color:var(--clr-muted);}
.msg-tick.is-read{color:#1D7EC2;}
.msg-del{padding:0;font:inherit;font-size:11px;color:#8E1F1F;background:none;border:0;cursor:pointer;text-decoration:underline;}
.msg-err{padding:6px var(--sp-4);font-size:var(--fs-sm);color:#8E1F1F;background:#FDECEC;}
.msg-err[hidden]{display:none;}
.msg-compose{display:flex;align-items:flex-end;gap:var(--sp-2);padding:var(--sp-3) var(--sp-4);background:var(--clr-surface);border-top:1px solid var(--clr-border);}
.msg-txt{flex:1 1 auto;min-height:38px;max-height:140px;padding:8px 12px;line-height:1.45;resize:none;font:inherit;}
.msg-compose .btn-erp{height:38px;}

.msg-general{flex:1 1 auto;min-height:0;overflow:auto;padding:var(--sp-4);background:var(--clr-surface-alt);}
.msg-ann-list{max-width:820px;margin:0 auto;display:flex;flex-direction:column;gap:var(--sp-2);}
.msg-ann{background:var(--clr-surface);border:1px solid var(--clr-border);border-radius:var(--radius);overflow:hidden;}
.msg-ann.is-unread{border-inline-start:4px solid var(--clr-primary);}
.msg-ann.is-urgent{border-inline-start:4px solid #C62828;}
.msg-ann-head{display:flex;flex-wrap:wrap;align-items:center;gap:6px var(--sp-2);width:100%;padding:var(--sp-3) var(--sp-4);
  text-align:start;font:inherit;color:var(--clr-text);background:transparent;border:0;cursor:pointer;}
.msg-ann-title{flex:1 1 auto;min-width:200px;font-weight:600;}
.msg-ann.is-unread .msg-ann-title{font-weight:800;}
.msg-ann-meta{flex:1 0 100%;font-size:11.5px;color:var(--clr-muted);}
.msg-ann-body{padding:0 var(--sp-4) var(--sp-4);}
.msg-ann-body[hidden]{display:none;}
.msg-ann-text{line-height:1.6;white-space:normal;overflow-wrap:anywhere;margin-bottom:var(--sp-3);}
.msg-acked{font-size:var(--fs-sm);color:#1F6F43;}
.msg-tag{display:inline-block;padding:1px 8px;font-size:11px;font-weight:700;color:var(--clr-primary-dark);
  background:var(--clr-primary-soft);border-radius:9px;}
.msg-tag.is-urgent{color:#fff;background:#C62828;}

.msg-modal{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:var(--sp-4);background:rgba(15,23,42,.45);}
.msg-modal[hidden]{display:none;}
.msg-modal-box{width:min(480px,100%);max-height:90vh;display:flex;flex-direction:column;background:var(--clr-surface);border-radius:10px;
  box-shadow:0 18px 50px rgba(0,0,0,.3);overflow:hidden;}
.msg-modal-head{padding:12px 16px;font-weight:700;border-bottom:1px solid var(--clr-border);}
.msg-modal-body{flex:1 1 auto;min-height:0;overflow:auto;padding:var(--sp-4);display:flex;flex-direction:column;gap:var(--sp-3);}
.msg-modal-body input[hidden]{display:none;}
.msg-modal-foot{display:flex;justify-content:flex-end;gap:var(--sp-2);padding:12px 16px;background:var(--clr-surface-alt);border-top:1px solid var(--clr-border);}
.msg-chips{display:flex;flex-wrap:wrap;gap:6px;}
.msg-chip{padding:3px 10px;font:inherit;font-size:var(--fs-sm);color:var(--clr-primary-dark);background:var(--clr-primary-soft);
  border:1px solid #D6D5F0;border-radius:999px;cursor:pointer;}
.msg-people{display:flex;flex-direction:column;max-height:300px;overflow:auto;border:1px solid var(--clr-border);border-radius:var(--radius-sm);}
.msg-person{display:flex;align-items:center;gap:var(--sp-3);padding:8px var(--sp-3);text-align:start;font:inherit;color:var(--clr-text);
  background:transparent;border:0;border-bottom:1px solid var(--clr-border);cursor:pointer;}
.msg-person small{color:var(--clr-muted);}
.msg-person:hover{background:var(--clr-surface-alt);}
.msg-person.is-picked{background:var(--clr-primary-soft);}

/* general messages screen */
.msg-ann-input{min-height:110px;}
.msg-aud label,.msg-checks label{margin-inline-end:var(--sp-4);font-weight:400;}
.msg-checks{display:flex;flex-wrap:wrap;gap:6px var(--sp-4);max-height:160px;overflow:auto;padding:var(--sp-2);
  border:1px solid var(--clr-border);border-radius:var(--radius-sm);}
.msg-aud-pick[hidden]{display:none;}
.msg-note{font-size:11.5px;color:var(--clr-muted);}
.msg-login{color:var(--clr-muted);}
.msg-sent tr.msg-row-off td{color:var(--clr-muted);}
.msg-who-text{margin-bottom:var(--sp-3);padding:var(--sp-3);line-height:1.6;background:var(--clr-surface-alt);border-radius:var(--radius-sm);}

/* the bell (shell top bar) */
.msg-bell{position:relative;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;
  color:inherit;background:transparent;border:0;border-radius:50%;cursor:pointer;}
.msg-bell:hover{background:rgba(0,0,0,.06);}
.msg-bell .ico{width:20px;height:20px;}
.msg-bell-count{position:absolute;top:2px;inset-inline-end:0;min-width:17px;height:17px;padding:0 4px;font-size:10.5px;font-weight:700;
  line-height:17px;text-align:center;color:#fff;background:#C62828;border-radius:9px;}
.msg-bell-count[hidden],.msg-bell[hidden]{display:none;}
.msg-bell.is-floating{position:fixed;bottom:16px;inset-inline-end:16px;z-index:900;width:48px;height:48px;color:#fff;
  background:var(--clr-primary);box-shadow:0 6px 18px rgba(0,0,0,.25);}
.msg-notices{position:fixed;bottom:16px;inset-inline-end:16px;z-index:950;display:flex;flex-direction:column;gap:8px;width:min(340px,calc(100vw - 32px));}
.msg-bell.is-floating ~ .msg-notices{bottom:76px;}
.msg-notice{display:flex;flex-direction:column;gap:2px;padding:10px 14px;text-align:start;font:inherit;font-size:var(--fs-sm);color:var(--clr-text);
  background:var(--clr-surface);border:1px solid var(--clr-border);border-inline-start:4px solid var(--clr-primary);border-radius:8px;
  box-shadow:0 8px 24px rgba(0,0,0,.18);cursor:pointer;transition:opacity .35s ease,transform .35s ease;}
.msg-notice span{color:var(--clr-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.msg-notice.is-going{opacity:0;transform:translateY(6px);}
.msg-urgent{position:fixed;inset:0;z-index:2000;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(15,23,42,.55);}
.msg-urgent-box{width:min(560px,100%);max-height:90vh;overflow:auto;padding:20px 22px;background:var(--clr-surface);border-top:5px solid #C62828;
  border-radius:10px;box-shadow:0 18px 50px rgba(0,0,0,.35);}
.msg-urgent-tag{font-size:11.5px;font-weight:700;color:#C62828;}
.msg-urgent-box h2{margin:6px 0 2px;font-size:18px;}
.msg-urgent-meta{font-size:11.5px;color:var(--clr-muted);margin-bottom:var(--sp-3);}
.msg-urgent-text{line-height:1.6;overflow-wrap:anywhere;}
.msg-urgent-foot{display:flex;justify-content:flex-end;gap:var(--sp-2);margin-top:var(--sp-4);}
@media (prefers-reduced-motion:reduce){.msg-notice{transition:none;}}

/* msg-v2: the header bell (#btnNotify) and its notification panel */
#btnNotify.has-new{color:var(--clr-primary);}
#btnNotify.is-open{background:var(--clr-surface-alt);color:var(--clr-text);}
#btnNotify.msg-ring svg{animation:msgRing .9s ease-in-out 1;transform-origin:50% 10%;}
@keyframes msgRing{0%,100%{transform:rotate(0)}20%{transform:rotate(14deg)}40%{transform:rotate(-12deg)}60%{transform:rotate(8deg)}80%{transform:rotate(-4deg)}}
.msg-panel{position:fixed;z-index:1500;width:min(380px,calc(100vw - 16px));max-height:min(560px,calc(100vh - 80px));display:flex;flex-direction:column;
  background:var(--clr-surface);border:1px solid var(--clr-border);border-radius:var(--radius);box-shadow:var(--shadow-lg);color:var(--clr-text);font-size:var(--fs-sm);}
.msg-panel[hidden]{display:none;}
.msg-panel-head{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-bottom:1px solid var(--clr-border);}
.msg-panel-head h2{margin:0;font-size:var(--fs-base);font-weight:700;}
.msg-panel-x{width:28px;height:28px;border:0;background:transparent;border-radius:var(--radius-sm);color:var(--clr-muted);font-size:18px;line-height:1;cursor:pointer;}
.msg-panel-x:hover{background:var(--clr-surface-alt);color:var(--clr-text);}
.msg-panel-body{overflow:auto;flex:1;}
.msg-panel-sec{padding:8px 14px 4px;font-size:11.5px;font-weight:700;color:var(--clr-muted);background:var(--clr-surface-alt);border-bottom:1px solid var(--clr-border);}
.msg-pi{border-bottom:1px solid var(--clr-border);}
.msg-pi-main{display:grid;grid-template-columns:10px minmax(0,1fr) auto;gap:8px;align-items:start;width:100%;padding:10px 14px;text-align:start;font:inherit;color:inherit;
  background:transparent;border:0;cursor:pointer;}
.msg-pi-main:hover{background:var(--clr-surface-alt);}
.msg-pi-main > span:nth-child(2){min-width:0;}
.msg-pi-dot{width:8px;height:8px;margin-top:6px;border-radius:50%;background:transparent;}
.msg-pi.is-waiting .msg-pi-dot{background:var(--clr-primary);}
.msg-pi-title{display:block;overflow-wrap:anywhere;}
.msg-pi.is-waiting .msg-pi-title{font-weight:700;}
.msg-pi-meta{display:block;margin-top:2px;font-size:11.5px;color:var(--clr-muted);}
.msg-pi-tags{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px;}
.msg-panel .msg-tag.is-done{color:#2E7D32;background:#E8F5E9;}
.msg-pi-count{min-width:20px;height:20px;padding:0 6px;font-size:11px;font-weight:700;line-height:20px;text-align:center;color:#fff;background:var(--clr-danger);border-radius:10px;}
.msg-pi-text{display:block;margin-top:2px;color:var(--clr-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.msg-pi-body{padding:0 14px 12px;padding-inline-start:32px;line-height:1.6;overflow-wrap:anywhere;}
.msg-pi-body[hidden]{display:none;}
.msg-pi-act{display:flex;justify-content:flex-end;margin-top:8px;}
.msg-panel-empty{padding:28px 14px;text-align:center;color:var(--clr-muted);}
.msg-panel-foot{display:flex;justify-content:space-between;gap:8px;padding:8px 14px;border-top:1px solid var(--clr-border);}
.msg-panel-foot button{padding:4px 2px;font:inherit;font-weight:600;color:var(--clr-primary);background:transparent;border:0;cursor:pointer;}
.msg-panel-foot button:hover{text-decoration:underline;}
.msg-panel .btn-erp{height:28px;padding:0 12px;font-size:12px;}
.msg-panel-head h2:focus{outline:none;}
@media (prefers-reduced-motion:reduce){#btnNotify.msg-ring svg{animation:none;}}

@media (max-width:760px){
  .msg-chats{grid-template-columns:1fr;}
  .msg-chats .msg-thread{display:none;}
  .msg-chats.is-open .msg-side{display:none;}
  .msg-chats.is-open .msg-thread{display:flex;}
  .msg-back{display:inline-flex;align-items:center;justify-content:center;}
  .msg-card .form-head.msg-head{flex-wrap:wrap;}
}

/* ==========================================================================
   Manufacturing (mfg-v1.1): Bill of Materials and Production Entry
   ========================================================================== */
.mfg-sec{margin:var(--sp-3) 0 4px;font-size:12.5px;font-weight:700;color:var(--clr-label);}
.form-card.is-fill .mfg-sec{flex:0 0 auto;}
.txn-grid-wrap.mfg-by{max-height:150px;overflow:auto;}
.form-card.is-fill .txn-grid-wrap.mfg-by{flex:0 0 auto;max-height:150px;}
.form-card.is-fill .section-body > #mfgBySec{flex:0 0 auto;}
.form-card.is-fill .section-body > .bom-used{flex:0 0 auto;margin:var(--sp-2) 0 0;}
.txn-grid td.is-neg{color:var(--clr-danger);font-weight:600;}
.mfg-tag{display:inline-block;margin-inline-start:6px;padding:0 7px;font-size:10.5px;font-weight:600;line-height:17px;
  color:var(--clr-primary-dark);background:var(--clr-primary-soft);border-radius:9px;vertical-align:1px;}

/* the cost of the entry, read-only figures from the server */
.mfg-cost{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:flex-end;gap:4px var(--sp-4);
  min-height:var(--ctl-h);padding:4px var(--sp-3);border:1px solid var(--clr-border);border-radius:var(--radius-sm);
  background:var(--clr-surface-alt);}
.mfg-cost > div{display:flex;flex-direction:column;align-items:flex-end;min-width:84px;}
.mfg-cost span{font-size:11px;color:var(--clr-muted);white-space:nowrap;}
.mfg-cost b{font-size:13.5px;font-variant-numeric:tabular-nums;white-space:nowrap;}
.mfg-cost .is-total b{color:var(--clr-primary-dark);}
.mfg-cost .is-unit b{font-size:14.5px;}
.mfg-cost.is-stale b{color:var(--clr-muted);font-weight:500;}
.mfg-cost .btn-erp{align-self:center;}
.btn-erp.btn-sm{height:28px;padding:0 12px;font-size:12px;}
.ctl.ctl-ro{display:flex;align-items:center;justify-content:flex-end;background:var(--clr-surface-alt);font-variant-numeric:tabular-nums;}
.hint-inline{font-weight:400;color:var(--clr-muted);}
.list-grid tr.is-muted td{color:var(--clr-muted);}
.form-badge.is-locked{color:var(--clr-danger);background:#FDECEC;background:color-mix(in srgb, var(--clr-danger) 10%, var(--clr-surface));text-transform:none;letter-spacing:0;}
/* a figure waiting for "Calculate cost" (the server's figure is out of date) */
.txn-grid td.is-stale, .txn-grid tfoot b.is-stale{color:var(--clr-muted);font-weight:400;}
/* a recipe version used in production: its batch and rates are read-only */
.ctl.is-ro{background:var(--clr-surface-alt);color:var(--clr-muted);}

/* lk-v6: the item / finished-item search is the common popup (.acp-* / .elk-*); the old .mfg-drop and .ost-drop lists are gone */

/* ==========================================================================
   Manufacturing reports (mfg-v2): Production Report and Cost & Shortage
   ========================================================================== */
/* a line that needs attention under the cards: no recipe, no cost, all in stock */
.mfg-note{margin:0 0 var(--sp-3);padding:8px 12px;font-size:12.5px;line-height:1.5;border-radius:var(--radius-sm);
  color:var(--clr-label);background:var(--clr-surface-alt);border-inline-start:3px solid var(--clr-border-strong);}
.mfg-note.is-warn{border-inline-start-color:var(--clr-warning);}
.mfg-note.is-ok{border-inline-start-color:var(--clr-success);}
/* make-and-buy tree: each level steps in from the one above */
.xr-tbl td.mfg-lvl{padding-inline-start:calc(10px + var(--lvl, 0) * 18px);}
.xr-tbl tr.is-make td{background:var(--clr-surface-alt);}

/* --------------------------------------------------------------------------
   Fill layout that scrolls (mfg-v2.1/2.3, Bill of Materials, Production
   Entry): every grid keeps
   room for at least six lines (header included) and grows into any spare
   height; when the window is too short for that, the form itself scrolls
   instead of squeezing the grids. More lines than a grid shows scroll
   inside the grid, under its fixed header. Opt-in: add fill-scroll to an
   is-fill card.
   -------------------------------------------------------------------------- */
.form-card.is-fill.fill-scroll{
  --grid-six-rows:calc(var(--grid-head-h, 31px) + 6 * (var(--grid-input-h, 26px) + 5px) + 2px);
}
.form-card.is-fill.fill-scroll > .form-body{overflow-x:hidden;overflow-y:auto;}
.form-card.is-fill.fill-scroll .form-body > .tabpane,
.form-card.is-fill.fill-scroll .tabpane > .section-card,
.form-card.is-fill.fill-scroll .section-card > .section-body{min-height:auto;}
.form-card.is-fill.fill-scroll .section-body > .txn-grid-wrap{flex:2 1 0;min-height:var(--grid-six-rows);max-height:none;}
.form-card.is-fill.fill-scroll .section-body > .txn-grid-wrap.mfg-by{flex-grow:1;}   /* components get the larger share */
.form-card.is-fill.fill-scroll .section-body > .txn-grid-wrap + .mfg-sec{margin-top:var(--sp-3);}
.form-card.is-fill.fill-scroll .section-body > .txn-grid-wrap + #mfgBySec .mfg-sec{margin-top:var(--sp-3);}
/* a grid with a totals line keeps six lines above it */
.form-card.is-fill.fill-scroll .section-body > .txn-grid-wrap:has(> table > tfoot){min-height:calc(var(--grid-six-rows) + var(--grid-foot-h, 32px));}
/* Production Entry: the by-products section only shows when the recipe has some */
.form-card.is-fill.fill-scroll .section-body > #mfgBySec:not([hidden]){flex:1 1 0;min-height:auto;display:flex;flex-direction:column;}
.form-card.is-fill.fill-scroll #mfgBySec > .txn-grid-wrap{flex:1 1 0;min-height:var(--grid-six-rows);max-height:none;}

/* --------------------------------------------------------------------------
   About (help-v1): product, version, this session, links to the manuals.
   -------------------------------------------------------------------------- */
.icon-info{-webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='12'%20cy='12'%20r='10'/%3E%3Cline%20x1='12'%20y1='16'%20x2='12'%20y2='11'/%3E%3Cline%20x1='12'%20y1='7.5'%20x2='12.01'%20y2='7.5'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='12'%20cy='12'%20r='10'/%3E%3Cline%20x1='12'%20y1='16'%20x2='12'%20y2='11'/%3E%3Cline%20x1='12'%20y1='7.5'%20x2='12.01'%20y2='7.5'/%3E%3C/svg%3E");}
.nav-icon.icon-info{background:linear-gradient(145deg,#b6bfcb 0%,#7d8794 55%,#5f6975 100%)}

.form-body.about-body{max-width:860px;display:flex;flex-direction:column;gap:var(--sp-5, 20px);}
.about-hero{display:flex;align-items:center;gap:18px;padding-bottom:var(--sp-4, 16px);border-bottom:1px solid var(--clr-border);}
.about-mark{flex:0 0 auto;width:56px;height:56px;border-radius:14px;display:grid;place-items:center;
  font-size:26px;font-weight:700;color:#fff;background:var(--clr-primary);}
.about-name h2{font-size:22px;font-weight:700;line-height:1.2;margin:0;}
.about-slogan{margin:2px 0 0;color:var(--clr-muted);}
.about-version{margin:6px 0 0;font-size:12.5px;color:var(--clr-muted);font-variant-numeric:tabular-nums;}
.about-body h3{font-size:14px;font-weight:700;margin:0 0 8px;}
.about-note{margin:0 0 12px;color:var(--clr-muted);max-width:68ch;line-height:1.5;}
.about-langs{display:flex;flex-wrap:wrap;gap:12px;}
.about-lang{display:flex;flex-direction:column;gap:2px;min-width:170px;padding:12px 16px;border:1px solid var(--clr-border-strong);
  border-radius:10px;text-decoration:none;color:var(--clr-text);background:var(--clr-surface);transition:border-color .12s ease, background .12s ease;}
a.about-lang:hover{border-color:var(--clr-primary);background:var(--clr-primary-soft);}
a.about-lang:focus-visible{outline:2px solid var(--clr-primary);outline-offset:2px;}
.about-lang.is-mine{border-color:var(--clr-primary);border-width:2px;padding:11px 15px;}
.about-lang-name{font-size:16px;font-weight:700;}
.about-lang-hint{font-size:12px;color:var(--clr-muted);}
.about-lang.is-missing{opacity:.55;border-style:dashed;}
.about-facts{display:grid;grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));gap:var(--sp-5, 20px);}
.about-dl{display:grid;grid-template-columns:max-content 1fr;gap:6px 16px;margin:0;}
.about-dl dt{color:var(--clr-muted);}
.about-dl dd{margin:0;font-weight:600;overflow-wrap:anywhere;}
.about-powered{margin:0;font-size:12px;color:var(--clr-muted);}

/* --------------------------------------------------------------------------
   Data Tool v4 (dt-v4): tabs, overview numbers, the reset choices, the table
   browser, maintenance, checks and logs. Builds on the .dt-* rules above.
   -------------------------------------------------------------------------- */
.dt4 .dt4-pane[hidden]{display:none !important;}
.dt4-hidden-btn{display:none !important;}
.dt4-access{margin-inline-start:var(--sp-2);}
.dt4-access .dt-chip{font-size:11.5px;}

.dt4-db{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--sp-2) var(--sp-5);
  margin-bottom:var(--sp-3);padding:var(--sp-3) var(--sp-4);background:var(--clr-surface-alt);
  border:1px solid var(--clr-border);border-inline-start:4px solid var(--clr-danger);border-radius:var(--radius);}
.dt4-db-id{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px var(--sp-3);}
.dt4-db-k{font-size:var(--fs-sm);font-weight:600;color:var(--clr-muted);}
.dt4-db-v{font-size:22px;font-weight:700;line-height:1.1;color:var(--clr-text);}
.dt4-db-srv{font-size:var(--fs-sm);color:var(--clr-muted);}
.dt4-db-meta{display:flex;flex-wrap:wrap;gap:4px 6px;}
.dt4-db-meta span{padding:1px 8px;font-size:11.5px;color:var(--clr-muted);background:var(--clr-surface);
  border:1px solid var(--clr-border);border-radius:999px;font-variant-numeric:tabular-nums;}
.dt4-maint-note{margin-bottom:var(--sp-3);}

.dt4-tabs{flex-wrap:wrap;margin:0 0 var(--sp-4);padding-bottom:0;border-bottom:1px solid var(--clr-border);}
.dt4-tabs .tab-btn{padding:8px 16px;}
.dt4-tabs .tab-btn.dt4-tab-danger:not(.active){color:#8E1F1F;}
.dt4-pane{min-width:0;}

/* overview */
.dt4-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:var(--sp-3);margin-bottom:var(--sp-4);}
.dt4-stat{padding:var(--sp-3) var(--sp-4);background:var(--clr-surface);border:1px solid var(--clr-border);border-radius:var(--radius);}
.dt4-stat-h{margin-bottom:var(--sp-2);font-size:12px;font-weight:700;color:var(--clr-muted);}
.dt4-stat dl{margin:0;display:grid;gap:4px;}
.dt4-stat dl div{display:flex;justify-content:space-between;gap:var(--sp-3);font-size:13px;}
.dt4-stat dt{color:var(--clr-muted);}
.dt4-stat dd{margin:0;font-weight:700;font-variant-numeric:tabular-nums;text-align:end;}

/* reset choices */
.dt4-opts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--sp-3);}
.dt4-opt{display:grid;grid-template-columns:auto 1fr;column-gap:var(--sp-2);row-gap:6px;align-content:start;
  padding:var(--sp-3) var(--sp-4);background:var(--clr-surface);border:1px solid var(--clr-border-strong);
  border-radius:var(--radius);cursor:pointer;}
.dt4-opt input[type=radio]{grid-row:1 / span 2;margin:3px 0 0;}
.dt4-opt-t{font-weight:700;}
.dt4-opt-d{grid-column:2;font-size:var(--fs-sm);line-height:1.55;color:var(--clr-muted);}
.dt4-opt-x{grid-column:2;display:flex;align-items:center;gap:6px;margin-top:2px;font-size:var(--fs-sm);font-weight:600;}
.dt4-opt:hover{border-color:var(--clr-primary);}
.dt4-opt:has(input[type=radio]:checked){border-color:var(--clr-primary);box-shadow:0 0 0 3px var(--clr-primary-soft);}
.dt4-opt-danger .dt4-opt-t{color:#8E1F1F;}
.dt4-opt-danger:hover,.dt4-opt-danger:has(input[type=radio]:checked){border-color:var(--clr-danger);}
.dt4-opt-danger:has(input[type=radio]:checked){box-shadow:0 0 0 3px #FBE1E1;}

.dt4-sum{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px var(--sp-4);margin:0 0 var(--sp-3);color:var(--clr-muted);font-size:var(--fs-sm);}
.dt4-sum-big{font-size:18px;font-weight:700;color:var(--clr-text);font-variant-numeric:tabular-nums;}
.dt4-blocked{margin:0 0 var(--sp-3);padding:var(--sp-3);background:#FFF8F8;border:1px solid #F5C2C2;border-radius:var(--radius);}
.dt4-blocked-say{margin:0 0 var(--sp-2);font-weight:600;color:#8E1F1F;}
.dt4-blocked .list-wrap{background:var(--clr-surface);}
.dt4-ok{margin:0 0 var(--sp-3);padding:var(--sp-2) var(--sp-3);background:#F2FBF6;border:1px solid #A9E6C6;border-radius:var(--radius);}
.dt4-ok .dt4-blocked-say{margin:0;color:#0A6B39;}
.dt4-steps{max-height:420px;overflow:auto;}
.dt4-confirm{margin-top:var(--sp-4);padding:var(--sp-3);background:#FFF8F8;border:1px solid #F5C2C2;border-radius:var(--radius);}
.dt4-confirm .field-label{color:#8E1F1F;}
.dt4-signedout{margin-top:var(--sp-4);padding:var(--sp-4);text-align:center;background:var(--clr-primary-soft);border-radius:var(--radius);}
.dt4-signedout p{margin:0 0 var(--sp-3);font-weight:600;}

/* kinds */
.dt4-kind{display:inline-block;padding:0 8px;font-size:11px;font-weight:600;line-height:1.7;border-radius:999px;
  border:1px solid transparent;white-space:nowrap;}
.dt4-kind.k-txn,.dt4-kchip.k-txn{color:#8E1F1F;background:#FDECEC;border-color:#F5C2C2;}
.dt4-kind.k-master,.dt4-kchip.k-master{color:#7A5200;background:#FFF6E5;border-color:#FFE0A3;}
.dt4-kind.k-log,.dt4-kchip.k-log{color:#5B6475;background:#F1F3F7;border-color:#D6DAE3;}
.dt4-kind.k-setup,.dt4-kchip.k-setup{color:#14607F;background:#E9F5FB;border-color:#B7DEEF;}
.dt4-kind.k-system,.dt4-kchip.k-system{color:#fff;background:#4A5163;border-color:#4A5163;}
.dt4-kind.k-other,.dt4-kchip.k-other{color:#5B3E96;background:#F3EEFC;border-color:#D9CCF3;}
.dt4-kind.k-upd{color:var(--clr-primary);background:var(--clr-primary-soft);}

/* table browser */
.dt4-tbar{display:flex;flex-wrap:wrap;align-items:center;gap:var(--sp-2) var(--sp-3);margin-bottom:var(--sp-3);}
.dt4-filter{flex:0 1 260px;}
.dt4-kinds{display:flex;flex-wrap:wrap;gap:6px;flex:1 1 auto;}
.dt4-kchip{padding:2px 10px;font-family:inherit;font-size:12px;font-weight:600;line-height:1.6;border-radius:999px;border:1px solid;cursor:pointer;}
.dt4-kchip b{font-weight:700;margin-inline-start:2px;}
.dt4-kchip.on{box-shadow:0 0 0 2px var(--clr-primary);}
.dt4-kchip:focus-visible{outline:2px solid var(--clr-primary);outline-offset:2px;}
.dt4-picked:not(:empty){min-width:26px;padding:1px 8px;text-align:center;font-weight:700;color:#fff;background:var(--clr-danger);border-radius:999px;}
.dt4-tables{max-height:calc(100vh - 330px);min-height:240px;overflow:auto;}
.dt4-tables tr[hidden]{display:none;}
.dt4-tables input.dt4-pick{width:16px;height:16px;margin:0;cursor:pointer;}
.dt4-tables input.dt4-pick:disabled{cursor:not-allowed;opacity:.35;}
.dt4-tables tr:has(input.dt4-pick:checked) td{background:#FFF4F4;}
.dt4-links{white-space:nowrap;color:var(--clr-muted);font-size:12px;font-variant-numeric:tabular-nums;}
.dt4-tblcheck{margin-bottom:var(--sp-4);padding:var(--sp-3) var(--sp-4);background:var(--clr-surface);
  border:1px solid var(--clr-border-strong);border-radius:var(--radius);}
.dt4-cols{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,2fr);gap:var(--sp-3);align-items:start;}
.dt4-h{margin:var(--sp-2) 0 6px;font-size:13px;font-weight:700;}

/* maintenance */
.dt4-grid2{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,2fr);gap:var(--sp-3);align-items:start;}
.dt4-biggest{max-height:330px;overflow:auto;}
.dt4-head-act{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--sp-2);}
.dt4-head-btns{display:flex;flex-wrap:wrap;align-items:center;gap:6px;}
.dt4-card-danger{border-inline-start:4px solid var(--clr-danger);}
.dt4-bar{display:inline-block;width:110px;height:8px;vertical-align:middle;background:var(--clr-surface-alt);
  border:1px solid var(--clr-border);border-radius:999px;overflow:hidden;}
.dt4-bar i{display:block;height:100%;background:var(--clr-primary);}
.dt4-idx{max-height:420px;overflow:auto;}
.dt4-logq{width:220px;}

/* checks, logs, any result */
.dt4-chk-acts{margin:0 0 var(--sp-3);}
.dt4-checks{margin-bottom:var(--sp-4);}
.dt4-checks tr.dt4-chk-fail td{background:#FFF8F8;}
.dt4-checks tr.dt4-chk-warn td{background:#FFFCF3;}
.dt4-rows{max-height:460px;overflow:auto;}
.dt4-any td{white-space:nowrap;max-width:420px;overflow:hidden;text-overflow:ellipsis;font-size:12px;}
.dt4-any th{white-space:nowrap;}
.dt4-logs{margin-bottom:var(--sp-4);}

@media (max-width:1100px){
  .dt4-opts,.dt4-cols,.dt4-grid2{grid-template-columns:minmax(0,1fr);}
}
.dt4 .list-grid tfoot td.r{text-align:end;}

/* ---------------------------------------------------------------------------
   Data Tool v5 (dt-v5): the complete sample - the "fill afterwards" box on
   the reset tab, its result, and the complete-sample row on the demo tab.
--------------------------------------------------------------------------- */
.dt5-fill{display:grid;grid-template-columns:auto 1fr;column-gap:var(--sp-2);row-gap:4px;align-items:start;
  margin-top:var(--sp-3);padding:var(--sp-2) var(--sp-3);border:1px dashed var(--clr-border);border-radius:var(--radius);cursor:pointer;}
.dt5-fill input[type=checkbox]{grid-row:1 / span 2;margin:3px 0 0;width:16px;height:16px;}
.dt5-fill-t{font-weight:700;}
.dt5-fill-d{grid-column:2;font-size:var(--fs-sm);line-height:1.55;color:var(--clr-muted);}
.dt5-fill:has(input:checked){border-style:solid;border-color:var(--clr-primary);}
.dt5-filldone{margin-top:var(--sp-3);}
.dt5-all{display:flex;flex-wrap:wrap;align-items:center;gap:var(--sp-2) var(--sp-4);margin-top:var(--sp-4);
  padding-top:var(--sp-3);border-top:1px solid var(--clr-border);}
.dt5-all .dt-note{flex:1 1 340px;margin:0;}

/* ---------------------------------------------------------------------------
   Item barcode labels (il-v2): Inventory > Reports > Item Labels.
   Screen: add items (tabs) and the print list on the left, the label with
   its live preview and Print on the right. Print tab (.il-print-page): the
   labels alone; each print adds its own @page size - a roll prints one label
   per page, A4 a grid of stickers per sheet.
--------------------------------------------------------------------------- */
.il-work{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:var(--sp-3);align-items:start;}
@media (max-width:1100px){.il-work{grid-template-columns:1fr;}}
.il-main{display:flex;flex-direction:column;gap:var(--sp-3);min-width:0;}
.il-side{position:sticky;top:0;}
.il .section-card{margin:0;}

/* add items */
.il-add-head{padding-top:6px;padding-bottom:0;border-bottom:1px solid var(--clr-border);}
.il-tabs{margin:0;border-bottom:0;}
.il-pane[hidden]{display:none !important;}
.il-filter{display:flex;gap:var(--sp-2);padding:var(--sp-3);flex-wrap:wrap;}
.il-filter .il-group{flex:0 0 220px;}
.il-filter .il-q{flex:1 1 220px;min-width:0;}
.il-scroll{max-height:300px;overflow:auto;border-top:1px solid var(--clr-border);}
.il-bar{display:flex;align-items:center;justify-content:flex-end;gap:var(--sp-3);padding:var(--sp-2) var(--sp-3);border-top:1px solid var(--clr-border);background:var(--clr-surface-alt);}
.il-bar-note{margin-inline-end:auto;font-size:var(--fs-sm);color:var(--clr-muted);line-height:1.45;}
.il .list-grid td.il-code{font-variant-numeric:tabular-nums;}
.il .list-grid td.il-nm{white-space:normal;}
.il .list-grid th.c,.il .list-grid td.c{text-align:center;}
.il .ctl.il-qty{width:64px;min-width:0;height:28px;text-align:end;padding:0 6px;}
.il .il-list .section-head{justify-content:flex-start;}
.il .il-list .section-tools{margin-inline-start:auto;}
.il-bc{font-variant-numeric:tabular-nums;}
.il-src{display:inline-block;margin-inline-start:4px;padding:0 6px;border-radius:9px;font-size:11px;line-height:17px;border:1px solid var(--clr-border);color:var(--clr-muted);white-space:nowrap;}
.il-src-unit{color:#1D5E3A;background:#EAF6EF;border-color:#B8DEC7;}
.il-src-item{color:#1D4E89;background:#EAF2FC;border-color:#B9D2F0;}
.il-src-code{color:#7A4B00;background:#FFF4DE;border-color:#F0D49B;}
.il-dt{display:inline-block;padding:1px 8px;border-radius:10px;font-size:12px;font-weight:600;white-space:nowrap;background:var(--clr-primary-soft);color:var(--clr-primary);}
.il-dt-grn{background:#EAF6EF;color:#1D5E3A;}
.il-dt-ost{background:#FFF4DE;color:#7A4B00;}
.il-dt-tri{background:#EAF2FC;color:#1D4E89;}
.il-dt-prd{background:#F6ECFA;color:#6B2C86;}
.il-addbtn{padding:2px 12px;min-height:0;}

/* print list */
.il-count{margin-inline-start:var(--sp-2);padding:1px 9px;border-radius:10px;background:var(--clr-primary-soft);color:var(--clr-primary);font-size:12px;font-weight:700;}
.il-count:empty{display:none;}
.il-setall{display:flex;align-items:center;gap:6px;font-size:var(--fs-sm);color:var(--clr-muted);}
.il-setall .ctl{width:64px;min-width:0;text-align:end;}
.il-danger{color:var(--clr-danger) !important;}
.il-step{display:inline-flex;align-items:center;border:1px solid var(--clr-border-strong);border-radius:6px;overflow:hidden;background:#fff;}
.il-step .ctl.il-qty{border:0;border-radius:0;width:48px;height:26px;text-align:center;box-shadow:none;-moz-appearance:textfield;}
.il-step .il-qty::-webkit-outer-spin-button,.il-step .il-qty::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}
.il-step-btn{width:26px;height:26px;border:0;background:var(--clr-surface-alt);color:var(--clr-primary);font-size:15px;font-weight:700;line-height:1;cursor:pointer;}
.il-step-btn:hover{background:var(--clr-primary-soft);}
.il-step-btn:focus-visible{outline:2px solid var(--clr-primary);outline-offset:-2px;}
.il-acts{white-space:nowrap;text-align:end;}
.il-ico{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:6px;color:var(--clr-muted);}
.il-ico:hover{background:var(--clr-primary-soft);color:var(--clr-primary);}
.il-ico-del:hover{background:#FDECEC;color:var(--clr-danger);}
.il .list-grid tr.is-preview td{background:var(--clr-primary-soft) !important;}
.il .list-grid tr.is-preview td:first-child{box-shadow:inset 3px 0 0 var(--clr-primary);}
.il-empty{display:flex;flex-direction:column;align-items:center;gap:var(--sp-2);padding:var(--sp-6) var(--sp-4);color:var(--clr-muted);text-align:center;}
.il-empty svg{color:var(--clr-border-strong);}
.il-empty p{margin:0;max-width:420px;line-height:1.55;}

/* the label panel */
.il-design .section-body{display:flex;flex-direction:column;gap:var(--sp-3);}
.il-stage{display:flex;align-items:center;justify-content:center;min-height:190px;padding:var(--sp-4) var(--sp-3);border-radius:8px;
    background:#E9EBF2;background-image:radial-gradient(#D7DAE6 1px,transparent 1px);background-size:12px 12px;}
.il-stage-cap{margin-top:-6px;font-size:12px;color:var(--clr-muted);text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.il-preview{position:relative;}
.il-preview .il-label{position:absolute;top:0;left:0;transform-origin:0 0;box-shadow:0 1px 2px rgba(20,22,60,.18),0 6px 18px rgba(20,22,60,.12);border-radius:1.2mm;}
.il-start-row{display:flex;align-items:center;gap:var(--sp-2);}
.il-start-row .ctl{width:80px;flex:0 0 80px;text-align:end;}
.il-hint{font-size:12px;line-height:1.45;color:var(--clr-muted);}
.il-show{display:grid;grid-template-columns:auto 1fr auto 1fr;align-items:center;gap:6px 0;padding-top:2px;}
.il-show input{margin:0;vertical-align:-2px;}
.il-show label{margin-inline-start:6px;font-size:var(--fs-sm);}
.il-summary{padding:var(--sp-2) var(--sp-3);border-radius:8px;background:var(--clr-surface-alt);border:1px solid var(--clr-border);text-align:center;font-size:var(--fs-sm);}
.il-summary:empty{display:none;}
.il-print{width:100%;min-height:40px;font-size:15px;}
.il-print-hint{margin:-4px 0 0;text-align:center;}

/* one label */
.il-label{box-sizing:border-box;display:flex;flex-direction:column;overflow:hidden;padding:1.3mm 2mm 1.1mm;
    color:#000;background:#fff;font-family:Arial,"Segoe UI",Tahoma,sans-serif;font-size:6.6pt;line-height:1.15;
    break-inside:avoid;page-break-inside:avoid;}
.il-big .il-label{font-size:8.2pt;padding:2mm 2.6mm 1.6mm;}
.il-small .il-label{font-size:5.6pt;padding:1mm 1.3mm 0.9mm;}
.il-co{font-size:.82em;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:.2px;}
.il-name{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.il-name.il-ar{font-family:Tahoma,Arial,sans-serif;text-align:right;}
.il-bars{position:relative;flex:1 1 0;min-height:4mm;margin:0.7mm 0 0.3mm;}
.il-bars svg{position:absolute;inset:0;display:block;width:100%;height:100%;fill:#000;}
.il-digits{font-family:Consolas,"Courier New",monospace;font-size:.95em;text-align:center;letter-spacing:.8px;white-space:nowrap;overflow:hidden;}
.il-foot{display:flex;justify-content:space-between;align-items:flex-end;gap:1.5mm;margin-top:0.3mm;white-space:nowrap;}
.il-meta{overflow:hidden;text-overflow:ellipsis;font-size:.92em;}
.il-price{display:inline-flex;align-items:baseline;gap:0.6mm;flex:0 0 auto;}
.il-price small{font-size:.8em;font-weight:700;}
.il-price b{font-size:1.45em;line-height:1;}
.il-price em{font-style:normal;font-size:.72em;margin-inline-start:0.6mm;}
.il-extra{font-size:.82em;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:0.3mm;}

/* the print tab */
.il-print-page{margin:0;background:#E9EBF2;font-family:Roboto,Arial,sans-serif;}
.il-pbar{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:var(--sp-3);padding:10px 16px;background:#fff;border-bottom:1px solid var(--clr-border);font-size:14px;}
.il-pbar span{color:var(--clr-muted);}
.il-pbar .il-pbar-msg{color:#7A4B00;background:#FFF4DE;padding:3px 10px;border-radius:6px;}
.il-pbar-sp{flex:1 1 auto;}
.il-print-page .il-labels{padding:16px;}
.il-print-page .il-roll{display:flex;flex-wrap:wrap;gap:4mm;}
.il-print-page .il-roll .il-label{box-shadow:0 1px 3px rgba(20,22,60,.2);}
.il-a4 .il-page{display:grid;justify-content:center;align-content:start;width:210mm;height:296.5mm;overflow:hidden;background:#fff;}
.il-print-page .il-a4 .il-page{margin:0 auto 6mm;box-shadow:0 2px 10px rgba(20,22,60,.18);}
.il-print-page .il-a4 .il-label{outline:1px dashed #CDD1DE;outline-offset:-1px;}
.il-label.il-blank{background:repeating-linear-gradient(45deg,#fff 0 3mm,#F3F4F8 3mm 6mm);}
@media print{
    .il-print-page{background:#fff;}
    .il-pbar{display:none !important;}
    .il-print-page .il-labels{padding:0;}
    .il-print-page .il-roll{display:block;}
    .il-print-page .il-roll .il-label{box-shadow:none;}
    .il-print-page .il-roll .il-label:not(:last-child){page-break-after:always;break-after:page;}
    .il-print-page .il-a4 .il-page{margin:0;box-shadow:none;break-after:page;page-break-after:always;}
    .il-print-page .il-a4 .il-page:last-child{break-after:auto;page-break-after:auto;}
    .il-print-page .il-a4 .il-label{outline:0;}
    .il-label.il-blank{background:#fff;}
}

/* ---------------------------------------------------------------------------
   Processing Entry (proc-v1): Production > Processing Entry - cleaning /
   recovery. Input -> output boxes, waste and cost lines, and the result
   panel (yield against the expected range, cost per unit before -> after).
--------------------------------------------------------------------------- */
.pe .section-card{margin:0;}
.pe-pane{display:flex;flex-direction:column;gap:var(--sp-3);}
.pe-pane[hidden]{display:none !important;}
.pe-work{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:var(--sp-3);align-items:start;}
@media (max-width:1100px){.pe-work{grid-template-columns:1fr;}}
.pe-main{display:flex;flex-direction:column;gap:var(--sp-3);min-width:0;}
.pe-side{position:sticky;top:0;}
.pe-io{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:var(--sp-3);align-items:stretch;}
@media (max-width:700px){.pe-io{grid-template-columns:1fr;}.pe-io-arrow{transform:rotate(90deg);}}
.pe-io-box{display:flex;flex-direction:column;gap:6px;padding:var(--sp-3);border:1px solid var(--clr-border);border-radius:8px;background:var(--clr-surface-alt);}
.pe-io-box.is-out{background:#F2FBF6;border-color:#C7E9D5;}
.pe-io-k{font-size:12px;font-weight:700;color:var(--clr-muted);}
.pe-io-item{font-weight:700;min-height:1.3em;}
.pe-io-qty{display:flex;align-items:center;gap:8px;}
.pe-io-qty .ctl{max-width:180px;height:38px;font-size:18px;font-weight:700;text-align:end;font-variant-numeric:tabular-nums;}
.pe-io-u{font-weight:600;color:var(--clr-muted);}
.pe-io-arrow{display:flex;align-items:center;justify-content:center;color:var(--clr-primary);}
.pe-abn{display:flex;align-items:center;gap:8px;margin-top:4px;font-size:var(--fs-sm);}
.pe-abn .ctl{width:110px;min-width:0;text-align:end;}
.pe-hint{font-size:12px;line-height:1.45;color:var(--clr-muted);}
.pe .list-grid .pe-cell{width:100%;min-width:0;}
.pe .list-grid .ctl.num{text-align:end;}
.pe-none{padding:var(--sp-3) var(--sp-4);color:var(--clr-muted);font-size:var(--fs-sm);line-height:1.5;}
.pe-ico{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:6px;color:var(--clr-muted);}
.pe-ico:hover{background:#FDECEC;color:var(--clr-danger);}
.pe-src{margin-inline-start:auto;font-size:12px;font-weight:600;color:var(--clr-muted);}
.pe-result .section-body{display:flex;flex-direction:column;gap:var(--sp-3);}
.pe-yield{display:flex;flex-direction:column;align-items:center;gap:4px;padding:var(--sp-2) 0 0;}
.pe-yield-k{font-size:12px;font-weight:700;color:var(--clr-muted);}
.pe-yield-v{font-size:34px;font-weight:700;line-height:1;font-variant-numeric:tabular-nums;color:var(--clr-text);}
.pe-yield-v small{font-size:18px;margin-inline-start:2px;color:var(--clr-muted);}
.pe-yield-state{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:6px;font-size:12px;color:var(--clr-muted);}
.pe-chip{display:inline-block;padding:1px 9px;border-radius:10px;font-size:12px;font-weight:700;}
.pe-chip.is-ok{background:#EAF6EF;color:#1D5E3A;}
.pe-chip.is-low,.pe-chip.is-high{background:#FFF4DE;color:#7A4B00;}
.pe-warn{padding:var(--sp-2) var(--sp-3);border-radius:8px;background:#FFF4DE;color:#5E3B00;font-size:var(--fs-sm);line-height:1.45;}
.pe-figs{margin:0;display:flex;flex-direction:column;border-top:1px solid var(--clr-border);}
.pe-fig{display:flex;justify-content:space-between;gap:var(--sp-2);padding:6px 0;border-bottom:1px solid var(--clr-border);font-size:var(--fs-sm);}
.pe-fig dt{color:var(--clr-muted);}
.pe-fig dd{margin:0;font-weight:600;font-variant-numeric:tabular-nums;text-align:end;}
.pe-fig.is-total dd{font-size:15px;font-weight:700;}
.pe-fig.is-bad dd,.pe-fig.is-loss dd{color:#B23A3A;}
.pe-fig.is-gain dd{color:#1D5E3A;}
.pe-unit{display:flex;align-items:center;justify-content:space-between;gap:var(--sp-2);padding:var(--sp-2) var(--sp-3);border-radius:8px;background:var(--clr-surface-alt);color:var(--clr-primary);}
.pe-unit > div{display:flex;flex-direction:column;gap:2px;color:var(--clr-text);}
.pe-unit > div.is-out{text-align:end;}
.pe-unit span{font-size:11px;color:var(--clr-muted);}
.pe-unit b{font-size:17px;font-variant-numeric:tabular-nums;}
.pe-unit small{font-size:11px;font-weight:600;color:var(--clr-muted);}
.pe-rule{margin:0;}
.pe-range{display:flex;flex-direction:column;gap:6px;padding-top:var(--sp-2);border-top:1px dashed var(--clr-border);}
.pe-range-row{display:flex;align-items:center;gap:6px;}
.pe-range-row .ctl{width:72px;min-width:0;text-align:end;}
.pe-listbar{display:flex;gap:var(--sp-2);}
.pe-listbar .ctl{max-width:360px;}
.pe-bad{color:#B23A3A;font-weight:700;}

/* ==========================================================================
   Common search popup (lk-v1): Content/js/erp-lookup.js. The same popup for
   every item field (and, from delivery 3, accounts and parties); it reuses
   the account picker's .acp-* look and adds paging and the branch note.
   ========================================================================== */
.elk-pop .acp-search{padding:8px 14px;}
/* lk-v9: the search box wrapper, and the optional filter beside it (a party type) */
.elk-pop .elk-qw{display:block;}
.elk-pop .acp-search.has-type .elk-qw{flex:1 1 260px;}
.elk-pop .acp-type-sel[hidden]{display:none;}
.elk-pop .acp-tbl td{padding:8px 12px;}
.elk-pop .acp-tbl th{padding:8px 12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.elk-pos{color:#1B7F4B;font-weight:600;}
.elk-off td{color:var(--clr-muted);font-style:italic;}
.elk-zero{color:#9AA0B8;}
.elk-err{color:#B23A3A;}
.elk-more-wrap{padding:8px 14px 10px;text-align:center;}
.elk-more{border:1px solid #D3D7E3;background:#fff;color:var(--clr-primary,#4B49AC);font:600 12.5px/1 inherit;font-family:inherit;
    padding:7px 16px;border-radius:7px;cursor:pointer;}
.elk-more:hover{background:#F6F7FC;}
.elk-more:focus-visible{outline:2px solid var(--clr-primary,#4B49AC);outline-offset:2px;}
.elk-note{flex:0 0 auto;padding:8px 14px;border-top:1px solid #F5E3B3;background:#FFF8E6;color:#7A5300;font-size:12.5px;line-height:1.45;}
/* a text box that opens the popup shows it can be searched */
.elk-field{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%239AA0B8'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398l3.85 3.85a1 1 0 0 0 1.415-1.414zm-5.242.656a5 5 0 1 1 0-10 5 5 0 0 1 0 10'/%3E%3C/svg%3E");
    background-repeat:no-repeat;background-size:13px 13px;background-position:right 9px center;padding-inline-end:28px;}
[dir=rtl] .elk-field{background-position:left 9px center;}

/* Processing Entry: stock left of the item put in (pk-v1) */
.pe-stock{display:block;margin-top:4px;font-size:12px;}
.pe-stock-ok{color:#1B7F4B;font-weight:600;}
.pe-stock-none{color:#B23A3A;font-weight:600;}
/* Production > Waste and Cost Types (pk-v1) */
.pk-hint{margin:0 0 10px;font-size:12.5px;line-height:1.45;color:var(--clr-muted,#6C7293);max-width:80ch;}

/* ==========================================================================
   Tab bar overflow (tb-v1): no limit on open tabs. Arrows at both ends when
   the tabs do not fit, wheel scrolling, a thin scroll bar, and the list of
   every open tab. A paused tab (page unloaded to save memory) is dimmed.
   ========================================================================== */
.tab-strip-wrap{position:relative;flex:0 0 auto;display:flex;align-items:stretch;min-width:0;
  background:var(--clr-surface);border-bottom:1px solid var(--clr-border);}
.tab-strip-wrap .tab-bar{flex:1 1 auto;min-width:0;border-bottom:0;scroll-behavior:smooth;
  scrollbar-width:thin;scrollbar-color:#C9CCDA transparent;}
.tab-strip-wrap .tab-bar::-webkit-scrollbar{height:4px;}
.tab-strip-wrap .tab-bar::-webkit-scrollbar-thumb{background:#C9CCDA;border-radius:4px;}
.tab-strip-wrap .tab-bar::-webkit-scrollbar-track{background:transparent;}
.tab-nav{flex:0 0 auto;width:30px;border:0;background:var(--clr-surface);color:var(--clr-muted);
  font-size:18px;line-height:1;cursor:pointer;display:none;align-items:center;justify-content:center;}
.tab-nav:hover:not(:disabled){background:var(--clr-surface-alt);color:var(--clr-primary);}
.tab-nav:disabled{opacity:.35;cursor:default;}
.tab-nav:focus-visible{outline:2px solid var(--clr-primary);outline-offset:-2px;}
.tab-strip-wrap.has-overflow .tab-nav-prev,.tab-strip-wrap.has-overflow .tab-nav-next{display:inline-flex;}
.tab-strip-wrap .tab-nav-prev{border-inline-end:1px solid var(--clr-border);}
.tab-strip-wrap .tab-nav-next{border-inline-start:1px solid var(--clr-border);}
.tab-nav-list{display:inline-flex;width:auto;gap:5px;padding:0 10px;border-inline-start:1px solid var(--clr-border);font-size:12px;}
.tab-nav-list .tab-count{font-weight:600;font-variant-numeric:tabular-nums;}
.tab.is-asleep .tab-title{opacity:.55;font-style:italic;}
.tab-list-menu{position:absolute;top:100%;inset-inline-end:6px;z-index:60;min-width:240px;max-width:min(420px,92vw);
  max-height:min(60vh,520px);overflow-y:auto;padding:6px;background:#fff;border:1px solid #D3D7E3;border-radius:10px;
  box-shadow:0 16px 40px rgba(16,24,40,.18),0 2px 6px rgba(16,24,40,.06);}
.tab-list-menu .tl-item{display:flex;align-items:center;gap:8px;width:100%;padding:7px 10px;border:0;border-radius:7px;
  background:transparent;color:var(--clr-text,#1F2340);font:inherit;font-size:13px;text-align:start;cursor:pointer;}
.tab-list-menu .tl-item:hover{background:#F6F7FC;}
.tab-list-menu .tl-item.is-active{background:#EEEDF8;color:var(--clr-primary,#4B49AC);font-weight:600;}
.tab-list-menu .tl-item.is-asleep .tl-title{opacity:.6;font-style:italic;}
.tab-list-menu .tl-title{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.tab-list-menu .tl-x{flex:0 0 auto;width:18px;height:18px;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;color:var(--clr-muted);}
.tab-list-menu .tl-x:hover{background:var(--clr-border);color:var(--clr-danger,#B23A3A);}
.tab-list-menu .tl-sep{height:1px;margin:5px 4px;background:#EEF0F5;}
.tab-list-menu .tl-others{color:var(--clr-muted);}

/* tb-v2: right end of the tab bar as in MahalluERP - refresh, open tabs, Close all */
.tab-nav-refresh{display:inline-flex;width:34px;border-inline-start:1px solid var(--clr-border);}
.tab-nav-refresh:active:not(:disabled) svg{transform:rotate(180deg);transition:transform .25s;}
.tab-nav-closeall{display:inline-flex;width:auto;padding:0 12px;border-inline-start:1px solid var(--clr-border);
  font-size:12.5px;font-weight:500;color:var(--clr-danger,#B23A3A);white-space:nowrap;}
.tab-nav-closeall:hover:not(:disabled){background:#FDF1F1;color:var(--clr-danger,#B23A3A);text-decoration:underline;}

/* ==========================================================================
   Van Sales (van-v1): VanApp (salesman, phone first), VanLoad, VanSettlement,
   VanSetup, VanReport. Proojee colours; touch targets of 44px; the
   navigation sits at the bottom on a phone and at the side from 900px.
   ========================================================================== */
body.vn{
  --vn-bg:#F3F4F9; --vn-card:#fff; --vn-line:#E3E5EE; --vn-ink:#1B1D33; --vn-muted:#6C7293;
  --vn-pri:var(--clr-primary,#4B49AC); --vn-pri-soft:#ECEBFA; --vn-ok:#12945A; --vn-ok-soft:#E3F6EC;
  --vn-info:#1B7FB0; --vn-info-soft:#E3F2FA; --vn-warn:#A86A00; --vn-warn-soft:#FFF4DC;
  --vn-err:#C42F2F; --vn-err-soft:#FDECEC; --vn-r:12px; --vn-nav-h:64px;
  margin:0;min-height:100%;background:var(--vn-bg);color:var(--vn-ink);font-size:14px;
  -webkit-tap-highlight-color:transparent;
}
body.vn *, body.vn *::before, body.vn *::after{box-sizing:border-box;}
.vn-ico{flex:0 0 auto;display:inline-block;vertical-align:middle;}
:where(.vn) button{font:inherit;color:inherit;}
.vn h1,.vn h2,.vn h3{margin:0;color:var(--vn-ink);}
.vn small{color:var(--vn-muted);}
.vn .r{text-align:end;}
.vn .c{text-align:center;}
.vn .is-neg{color:var(--vn-err);}
.vn .is-pos{color:var(--vn-ok);}
.vn-tap{cursor:pointer;}
.vn-tap:active{transform:scale(.99);}

/* ---- buttons, inputs ---------------------------------------------------- */
.vn-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:0 18px;border-radius:10px;
  border:1px solid transparent;font-weight:600;font-size:14px;cursor:pointer;text-decoration:none;white-space:nowrap;
  transition:background-color .15s,border-color .15s,box-shadow .15s;}
.vn-btn.primary{background:var(--vn-pri);color:#fff;}
.vn-btn.primary:hover:not(:disabled){background:var(--clr-primary-dark,#3F3D92);}
.vn-btn.ghost{background:#fff;border-color:var(--vn-line);color:var(--vn-ink);}
.vn-btn.ghost:hover:not(:disabled){border-color:var(--vn-pri);color:var(--vn-pri);}
.vn-btn.danger{background:var(--vn-err);color:#fff;}
.vn-btn.danger.ghost{background:#fff;color:var(--vn-err);border-color:#F2C7C7;}
.vn-btn.sm{min-height:34px;padding:0 12px;font-size:13px;border-radius:8px;}
.vn-btn.lg{min-height:52px;font-size:15.5px;}
.vn-btn.block{display:flex;width:100%;}
.vn-btn:disabled{opacity:.45;cursor:not-allowed;}
.vn-btn.is-busy{position:relative;color:transparent !important;}
.vn-btn.is-busy::after{content:"";position:absolute;width:18px;height:18px;border-radius:50%;border:2px solid rgba(255,255,255,.5);border-top-color:#fff;animation:vnSpin .7s linear infinite;}
.vn-btn.ghost.is-busy::after{border-color:#D5D6EA;border-top-color:var(--vn-pri);}
.vn-btn:focus-visible,.vn-icon-btn:focus-visible,.vn-nav-btn:focus-visible,.vn-tap:focus-visible,.vn-chip-btn:focus-visible,.vn-act:focus-visible{outline:3px solid #A9A7F0;outline-offset:2px;}
.vn-icon-btn{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border:0;border-radius:10px;background:transparent;color:var(--vn-muted);cursor:pointer;flex:0 0 auto;}
.vn-icon-btn:hover:not(:disabled){background:var(--vn-pri-soft);color:var(--vn-pri);}
.vn-icon-btn.sm{width:34px;height:34px;}
.vn-icon-btn:disabled{opacity:.3;}
.vn-input,.vn-field input,.vn-field select,.vn-filter select{width:100%;min-height:44px;padding:0 12px;border:1px solid var(--vn-line);border-radius:10px;background:#fff;
  font:inherit;font-size:15px;color:var(--vn-ink);}
.vn-input.sm{min-height:36px;width:auto;font-size:13.5px;}
.vn-input:focus,.vn-field input:focus,.vn-field select:focus,.vn-qin:focus,.vn-step input:focus,.vn-pr:focus,.vn-unit:focus{outline:none;border-color:var(--vn-pri);box-shadow:0 0 0 3px #DCDBF6;}
.vn-field{display:flex;flex-direction:column;gap:5px;margin:0 0 12px;}
.vn-field > span{font-size:12.5px;font-weight:600;color:var(--vn-muted);}
.vn-field > small{font-size:12px;line-height:1.4;}
.vn-field.big input{min-height:56px;font-size:24px;font-weight:700;text-align:end;font-variant-numeric:tabular-nums;}
.vn-check{display:flex;align-items:center;gap:10px;min-height:40px;margin:2px 0 8px;font-size:14px;cursor:pointer;}
.vn-check input{width:20px;height:20px;accent-color:var(--vn-pri);}
.vn-search{display:flex;align-items:center;gap:8px;min-height:46px;padding:0 6px 0 12px;margin:0 0 12px;background:#fff;border:1px solid var(--vn-line);border-radius:12px;}
.vn-search:focus-within{border-color:var(--vn-pri);box-shadow:0 0 0 3px #DCDBF6;}
.vn-search > span{color:var(--vn-muted);display:flex;}
.vn-search input{flex:1 1 auto;min-width:0;border:0;outline:0;background:transparent;font:inherit;font-size:15px;min-height:44px;}
.vn-search.big{min-height:52px;}
.vn-chips{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px;}
.vn-chip-btn{min-height:38px;padding:0 14px;border:1px solid var(--vn-line);border-radius:999px;background:#fff;font-size:13.5px;cursor:pointer;}
.vn-chip-btn.is-on{background:var(--vn-pri);border-color:var(--vn-pri);color:#fff;}
.vn-seg{display:inline-flex;padding:3px;border-radius:12px;background:#E9E9F4;gap:2px;flex:0 0 auto;}
.vn-seg button{min-height:38px;min-width:76px;padding:0 14px;border:0;border-radius:9px;background:transparent;font-weight:600;font-size:13.5px;color:var(--vn-muted);cursor:pointer;}
.vn-seg button.is-on{background:#fff;color:var(--vn-pri);box-shadow:0 1px 3px rgba(20,20,60,.12);}
.vn-seg button:disabled{opacity:.4;cursor:not-allowed;}
.vn-pill{display:inline-flex;align-items:center;min-height:22px;padding:0 9px;border-radius:999px;font-size:11.5px;font-weight:600;white-space:nowrap;}
.vn-pill.ok{background:var(--vn-ok-soft);color:var(--vn-ok);}
.vn-pill.info{background:var(--vn-info-soft);color:var(--vn-info);}
.vn-pill.warn{background:var(--vn-warn-soft);color:var(--vn-warn);}
.vn-pill.err{background:var(--vn-err-soft);color:var(--vn-err);}
.vn-pill.muted{background:#EEEFF4;color:var(--vn-muted);}
.vn-pill.todo{background:transparent;color:var(--vn-pri);box-shadow:inset 0 0 0 1px #C9C8EE;}
.vn-note{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:10px 12px;margin:0 0 12px;border-radius:10px;font-size:13.5px;line-height:1.4;}
.vn-note > span{flex:1 1 200px;}
.vn-note.is-info{background:var(--vn-info-soft);color:#155F84;}
.vn-note.is-warn{background:var(--vn-warn-soft);color:#7A4E00;}
.vn-note.is-err{background:var(--vn-err-soft);color:#962323;}
.vn-note.is-ok{background:var(--vn-ok-soft);color:#0D6B41;}
.vn-hint{margin:0 0 12px;font-size:12.5px;color:var(--vn-muted);line-height:1.45;}
.vn-lead{margin:0 0 12px;font-weight:600;}
.vn-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:48px 20px;text-align:center;color:var(--vn-muted);}
.vn-empty h2{font-size:17px;}
.vn-empty p{margin:0;max-width:42ch;line-height:1.5;}
.vn-empty.sm{padding:22px 12px;}
.vn-loading{height:3px;margin:16px 0;border-radius:3px;background:linear-gradient(90deg,transparent,var(--vn-pri),transparent) 0 0/40% 100% no-repeat #E6E6F2;animation:vnBar 1s ease-in-out infinite;}
@keyframes vnBar{0%{background-position:-40% 0}100%{background-position:140% 0}}
@keyframes vnSpin{to{transform:rotate(360deg)}}
.vn-card{background:var(--vn-card);border:1px solid var(--vn-line);border-radius:var(--vn-r);padding:14px;margin:0 0 14px;}
.vn-card h3{font-size:15px;margin:0 0 10px;}
.vn-section-head{display:flex;align-items:center;gap:10px;margin:4px 0 10px;flex-wrap:wrap;}
.vn-section-head h2,.vn-section-head h3{font-size:16px;margin:0;flex:1 1 auto;}
.vn-count{font-weight:700;color:var(--vn-pri);font-variant-numeric:tabular-nums;}
.vn-avatar{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:50%;background:var(--vn-pri-soft);color:var(--vn-pri);font-weight:700;font-size:15px;flex:0 0 auto;}
.vn-avatar.sm{width:36px;height:36px;font-size:13px;}

/* ---- the app frame -------------------------------------------------------- */
body.vn-app{display:flex;flex-direction:column;height:100vh;height:100dvh;overflow:hidden;}
.vn-top{flex:0 0 auto;display:flex;align-items:center;gap:8px;min-height:56px;padding:6px 10px;padding-top:max(6px,env(safe-area-inset-top));
  background:#fff;border-bottom:1px solid var(--vn-line);}
.vn-van{display:flex;align-items:center;gap:8px;min-height:44px;padding:0 8px;border:0;border-radius:10px;background:transparent;cursor:pointer;min-width:0;text-align:start;color:var(--vn-pri);}
.vn-van span{display:flex;flex-direction:column;min-width:0;}
.vn-van b{color:var(--vn-ink);font-size:15px;}
.vn-van small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:42vw;}
.vn-top-right{margin-inline-start:auto;display:flex;align-items:center;gap:8px;}
.vn-chip{display:inline-flex;align-items:center;gap:5px;min-height:32px;padding:0 10px;border-radius:999px;background:var(--vn-ok-soft);color:var(--vn-ok);font-variant-numeric:tabular-nums;}
.vn-chip b{color:#0C6A40;}
.vn-date{font-size:12.5px;color:var(--vn-muted);white-space:nowrap;}
.vn-main{flex:1 1 auto;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;}
.vn-view{padding:14px 14px calc(var(--vn-nav-h) + 24px);max-width:1180px;margin:0 auto;}
.vn-nav{position:fixed;inset-inline:0;bottom:0;z-index:40;display:flex;height:calc(var(--vn-nav-h) + env(safe-area-inset-bottom));
  padding-bottom:env(safe-area-inset-bottom);background:#fff;border-top:1px solid var(--vn-line);box-shadow:0 -4px 16px rgba(20,22,60,.05);}
.vn-nav-btn{flex:1 1 0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:0;background:transparent;color:var(--vn-muted);
  font-size:11.5px;font-weight:600;cursor:pointer;min-width:0;}
.vn-nav-btn .vn-ico{width:44px;height:30px;padding:4px 11px;border-radius:999px;transition:background-color .15s;}
.vn-nav-btn.is-on{color:var(--vn-pri);}
.vn-nav-btn.is-on .vn-ico{background:var(--vn-pri-soft);}

/* ---- Route ---------------------------------------------------------------- */
.vn-kpis{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0 0 14px;}
.vn-kpi{background:#fff;border:1px solid var(--vn-line);border-radius:var(--vn-r);padding:10px 12px;border-inline-start:4px solid #D9D9EA;min-width:0;}
.vn-kpi span{display:block;font-size:12px;color:var(--vn-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.vn-kpi b{display:block;font-size:19px;font-variant-numeric:tabular-nums;margin-top:2px;}
.vn-kpi.cash{border-inline-start-color:var(--vn-ok);}
.vn-kpi.credit{border-inline-start-color:var(--vn-info);}
.vn-kpi.coll{border-inline-start-color:var(--vn-pri);}
.vn-kpi.ret,.vn-kpi.neg{border-inline-start-color:var(--vn-err);}
.vn-kpi.cashnow{border-inline-start-color:#0C6A40;background:var(--vn-ok-soft);}
.vn-route{list-style:none;margin:0;padding:0;position:relative;}
.vn-route::before{content:"";position:absolute;top:22px;bottom:22px;inset-inline-start:31px;width:2px;background:repeating-linear-gradient(to bottom,#C9C8EE 0 6px,transparent 6px 11px);}
.vn-route li{position:relative;margin:0 0 8px;}
.vn-stop{display:flex;align-items:center;gap:12px;width:100%;min-height:64px;padding:10px 12px;border:1px solid var(--vn-line);border-radius:var(--vn-r);background:#fff;text-align:start;}
.vn-stop:hover{border-color:#C9C8EE;}
.vn-stop-no{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;
  background:#fff;border:2px solid #C9C8EE;color:var(--vn-pri);font-weight:700;font-variant-numeric:tabular-nums;flex:0 0 auto;}
.vn-stop.is-S .vn-stop-no{background:var(--vn-ok);border-color:var(--vn-ok);color:#fff;}
.vn-stop.is-C .vn-stop-no{background:var(--vn-info);border-color:var(--vn-info);color:#fff;}
.vn-stop.is-N .vn-stop-no{background:#E4E5EC;border-color:#E4E5EC;color:var(--vn-muted);}
.vn-stop.is-S,.vn-stop.is-N{background:#FBFBFD;}
.vn-stop-main,.vn-row-main{display:flex;flex-direction:column;min-width:0;flex:1 1 auto;gap:2px;}
.vn-stop-main b,.vn-row-main b{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.vn-stop-main small,.vn-row-main small{font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.vn-stop-side,.vn-row-side{display:flex;flex-direction:column;align-items:flex-end;gap:4px;flex:0 0 auto;font-variant-numeric:tabular-nums;}
.vn-bal{font-weight:600;font-size:13.5px;color:var(--vn-muted);}
.vn-bal.is-due{color:var(--vn-ink);}

/* lists */
.vn-list{display:flex;flex-direction:column;gap:6px;}
.vn-row{display:flex;align-items:center;gap:12px;width:100%;min-height:58px;padding:8px 10px;border:1px solid var(--vn-line);border-radius:10px;background:#fff;text-align:start;}
.vn-row:hover{border-color:#C9C8EE;}
.vn-row-ico{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:10px;background:var(--vn-pri-soft);color:var(--vn-pri);flex:0 0 auto;}

/* customer sheet */
.vn-cust-head{display:flex;align-items:center;gap:12px;margin:0 0 16px;}
.vn-cust-head > div{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;}
.vn-cust-head b{font-size:17px;}
.vn-cust-bal{text-align:end;flex:0 0 auto !important;}
.vn-cust-bal b{font-size:18px;font-variant-numeric:tabular-nums;}
.vn-actions{display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:10px;}
.vn-act{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:86px;border:1px solid var(--vn-line);border-radius:12px;background:#fff;
  color:var(--vn-pri);font-weight:600;font-size:13.5px;text-decoration:none;cursor:pointer;}
.vn-act span{color:var(--vn-ink);}
.vn-act:hover:not(:disabled){border-color:var(--vn-pri);background:#FAFAFF;}
.vn-act:disabled{opacity:.4;cursor:not-allowed;}

/* ---- Sell ------------------------------------------------------------------- */
.vn-custbar{display:flex;align-items:center;gap:10px;margin:0 0 12px;flex-wrap:wrap;}
.vn-custpick{display:flex;align-items:center;gap:10px;flex:1 1 220px;min-width:0;min-height:56px;padding:6px 10px;border:1px solid var(--vn-line);border-radius:12px;background:#fff;text-align:start;}
.vn-custpick span:last-child{display:flex;flex-direction:column;min-width:0;}
.vn-custpick b{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.vn-cat{display:flex;flex-direction:column;gap:6px;}
.vn-item{background:#fff;border:1px solid var(--vn-line);border-radius:12px;overflow:hidden;}
.vn-item.in-cart{border-color:#B9B7EC;box-shadow:inset 3px 0 0 var(--vn-pri);}
html[dir="rtl"] .vn-item.in-cart{box-shadow:inset -3px 0 0 var(--vn-pri);}
.vn-item-main{position:relative;display:grid;grid-template-columns:1fr auto;grid-template-areas:"n p" "s p";align-items:center;column-gap:10px;row-gap:2px;
  width:100%;min-height:60px;padding:9px 12px;border:0;background:transparent;text-align:start;}
.vn-item-main b{grid-area:n;font-size:15px;line-height:1.3;}
.vn-item-main small{grid-area:s;font-size:12px;}
.vn-price{grid-area:p;font-weight:700;font-size:15.5px;font-variant-numeric:tabular-nums;color:var(--vn-ink);white-space:nowrap;}
.vn-price small{font-weight:400;}
.vn-incart{position:absolute;top:6px;inset-inline-end:6px;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:var(--vn-pri);color:#fff;
  font-size:12px;font-weight:700;display:flex;align-items:center;justify-content:center;}
.vn-item.in-cart .vn-price{margin-top:14px;}
.vn-units{display:flex;flex-wrap:wrap;gap:6px;padding:0 12px 10px;}
.vn-unit-btn{min-height:34px;padding:0 10px;border:1px dashed #C9C8EE;border-radius:8px;background:#FAFAFF;color:var(--vn-pri);font-size:12.5px;font-weight:600;cursor:pointer;}
.vn-unit-btn small{color:var(--vn-muted);font-weight:400;}
.vn-cart{display:none;}
.vn-cartbar{position:fixed;inset-inline:10px;bottom:calc(var(--vn-nav-h) + env(safe-area-inset-bottom) + 8px);z-index:39;display:none;}
.vn-cartbar.is-on{display:block;}
.vn-cartbar-btn{display:flex;align-items:center;gap:10px;width:100%;min-height:54px;padding:0 16px;border:0;border-radius:14px;background:var(--vn-ink);color:#fff;
  box-shadow:0 10px 26px rgba(20,22,60,.25);cursor:pointer;}
.vn-cartbar-btn b{margin-inline-start:auto;font-size:16px;font-variant-numeric:tabular-nums;}
.vn-go{padding:5px 12px;border-radius:999px;background:var(--vn-pri);font-weight:600;font-size:13px;}
.vn-cart-head{display:flex;align-items:center;justify-content:space-between;margin:0 0 8px;}
.vn-cart-head h2{font-size:16px;}
.vn-cart-empty{display:flex;flex-direction:column;align-items:center;gap:8px;padding:40px 12px;color:var(--vn-muted);text-align:center;}
.vn-lines{list-style:none;margin:0 0 12px;padding:0;display:flex;flex-direction:column;gap:8px;}
.vn-line{border:1px solid var(--vn-line);border-radius:12px;padding:8px 10px;background:#fff;}
.vn-line.in-cart{border-color:#B9B7EC;}
.vn-line-top{display:flex;align-items:center;gap:8px;justify-content:space-between;margin:0 0 6px;flex-wrap:wrap;}
.vn-line-top b{font-size:14.5px;flex:1 1 auto;min-width:0;}
.vn-line-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-variant-numeric:tabular-nums;}
.vn-step{display:inline-flex;align-items:center;border:1px solid var(--vn-line);border-radius:10px;overflow:hidden;background:#fff;}
.vn-step button{width:44px;height:44px;border:0;background:#F6F6FB;color:var(--vn-pri);cursor:pointer;display:flex;align-items:center;justify-content:center;}
.vn-step button:active{background:var(--vn-pri-soft);}
.vn-step input{width:62px;height:44px;border:0;border-inline:1px solid var(--vn-line);text-align:center;font:inherit;font-size:16px;font-weight:700;}
.vn-unit{min-height:44px;padding:0 8px;border:1px solid var(--vn-line);border-radius:10px;background:#fff;font:inherit;}
.vn-unit-txt{color:var(--vn-muted);font-size:13px;min-width:28px;}
.vn-x{color:var(--vn-muted);}
.vn-pr{width:92px;min-height:44px;padding:0 8px;border:1px solid var(--vn-line);border-radius:10px;text-align:end;font:inherit;font-size:15px;}
.vn-pr-txt{font-size:14px;}
.vn-amt{margin-inline-start:auto;font-size:15px;}
.vn-cart-foot{border-top:1px solid var(--vn-line);padding-top:12px;display:flex;flex-direction:column;gap:10px;}
.vn-est{display:flex;align-items:baseline;justify-content:space-between;}
.vn-est span{font-size:12.5px;color:var(--vn-muted);}
.vn-est b{font-size:20px;font-variant-numeric:tabular-nums;}
.vn-rev-head{display:flex;align-items:center;gap:10px;margin:0 0 10px;}
.vn-rev{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums;}
.vn-rev td{padding:8px 4px;border-bottom:1px solid var(--vn-line);vertical-align:top;}
.vn-rev td small{display:block;margin-top:2px;}
.vn-rev tfoot td{border-bottom:0;padding:5px 4px;color:var(--vn-muted);}
.vn-rev .vn-grand td{padding-top:10px;border-top:2px solid var(--vn-ink);color:var(--vn-ink);font-size:19px;font-weight:700;}
.vn-done{display:flex;flex-direction:column;align-items:center;gap:6px;padding:18px 0 6px;text-align:center;}
.vn-done .vn-ico{color:#fff;background:var(--vn-ok);border-radius:50%;padding:8px;width:60px;height:60px;}
.vn-done b{font-size:19px;}
.vn-done span{font-size:28px;font-weight:700;font-variant-numeric:tabular-nums;}
.vn-cam{width:100%;max-height:60vh;border-radius:12px;background:#000;}

/* ---- Collect, Stock, Day ------------------------------------------------------- */
.vn-balance{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0 0 12px;}
.vn-balance > div{background:#fff;border:1px solid var(--vn-line);border-radius:12px;padding:12px;}
.vn-balance small{display:block;font-size:12px;}
.vn-balance b{font-size:22px;font-variant-numeric:tabular-nums;}
.vn-open,.vn-stock,.vn-docs{list-style:none;margin:0 0 14px;padding:0;background:#fff;border:1px solid var(--vn-line);border-radius:12px;overflow:hidden;}
.vn-open li,.vn-stock li,.vn-docs li{display:flex;align-items:center;gap:10px;min-height:52px;padding:8px 12px;border-bottom:1px solid var(--vn-line);font-variant-numeric:tabular-nums;}
.vn-open li:last-child,.vn-stock li:last-child,.vn-docs li:last-child{border-bottom:0;}
.vn-open li > span,.vn-stock li > span:first-child{display:flex;flex-direction:column;min-width:0;flex:1 1 auto;}
.vn-open li > span.r{flex:0 0 auto;align-items:flex-end;}
.vn-qty{font-weight:700;font-size:15px;white-space:nowrap;}
.vn-form{margin-top:4px;}
.vn-two{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:0 10px;}
.vn-doc-time{font-size:12px;color:var(--vn-muted);width:42px;flex:0 0 auto;}
.vn-doc-main{display:flex;flex-direction:column;min-width:0;flex:1 1 auto;}
.vn-doc-amt{font-weight:700;flex:0 0 auto;}
.vn-docs li{border-inline-start:3px solid transparent;}
.vn-docs li.k-sale{border-inline-start-color:var(--vn-ok);}
.vn-docs li.k-collect{border-inline-start-color:var(--vn-pri);}
.vn-docs li.k-return{border-inline-start-color:var(--vn-err);}
.vn-docs li.k-load,.vn-docs li.k-unload{border-inline-start-color:var(--vn-info);}
.vn-docs li.k-nosale{border-inline-start-color:#C7C8D3;}

/* ---- sheet, toast ------------------------------------------------------------ */
.vn-sheet-wrap{position:fixed;inset:0;z-index:1000;display:flex;align-items:flex-end;justify-content:center;}
.vn-scrim{position:absolute;inset:0;background:rgba(20,22,46,.42);opacity:0;transition:opacity .2s;}
.vn-sheet{position:relative;display:flex;flex-direction:column;width:100%;max-height:90vh;max-height:90dvh;background:#fff;border-radius:18px 18px 0 0;
  box-shadow:0 -12px 40px rgba(20,22,60,.25);transform:translateY(30px);opacity:0;transition:transform .22s ease,opacity .22s ease;}
.vn-sheet-wrap.is-on .vn-scrim{opacity:1;}
.vn-sheet-wrap.is-on .vn-sheet{transform:none;opacity:1;}
.vn-sheet::before{content:"";position:absolute;top:7px;left:50%;width:40px;height:4px;margin-left:-20px;border-radius:4px;background:#D8D9E4;}
.vn-sheet-head{display:flex;align-items:center;gap:8px;padding:14px 8px 6px 16px;}
html[dir="rtl"] .vn-sheet-head{padding:14px 16px 6px 8px;}
.vn-sheet-head h2{flex:1 1 auto;font-size:17px;min-width:0;}
.vn-sheet-body{flex:1 1 auto;overflow-y:auto;padding:4px 16px 16px;-webkit-overflow-scrolling:touch;}
.vn-sheet-foot{display:flex;gap:10px;justify-content:flex-end;padding:10px 16px calc(12px + env(safe-area-inset-bottom));border-top:1px solid var(--vn-line);}
.vn-sheet-foot .vn-btn{flex:1 1 0;}
.vn-confirm-text{margin:4px 0 8px;font-size:15px;line-height:1.5;}
.vn-toast{position:fixed;left:50%;bottom:calc(var(--vn-nav-h) + 80px);z-index:1100;max-width:min(92vw,520px);padding:12px 16px;border-radius:12px;
  background:var(--vn-ink);color:#fff;font-size:14px;line-height:1.4;box-shadow:0 10px 30px rgba(0,0,0,.25);
  transform:translate(-50%,20px);opacity:0;pointer-events:none;transition:transform .2s,opacity .2s;}
.vn-toast.is-on{transform:translate(-50%,0);opacity:1;}
.vn-toast.is-err{background:var(--vn-err);}
.vn-toast.is-warn{background:#8A5A00;}
.vn-toast.is-ok{background:#0F7A4A;}
body.vn-admin .vn-toast{bottom:24px;}

/* ---- the screens with a list and a pane (Load, Settlement, Setup) ---------- */
body.vn-admin{display:flex;flex-direction:column;height:100vh;height:100dvh;overflow:hidden;background:var(--vn-bg);}
.vn-bar{flex:0 0 auto;display:flex;align-items:center;gap:12px;flex-wrap:wrap;min-height:56px;padding:8px 16px;background:#fff;border-bottom:1px solid var(--vn-line);}
.vn-bar h1{font-size:17px;margin-inline-end:auto;}
.vn-tabs{display:inline-flex;gap:4px;padding:3px;border-radius:12px;background:#ECECF5;}
.vn-tabs button{min-height:36px;padding:0 16px;border:0;border-radius:9px;background:transparent;font-weight:600;font-size:13.5px;color:var(--vn-muted);cursor:pointer;}
.vn-tabs button.is-on{background:#fff;color:var(--vn-pri);box-shadow:0 1px 3px rgba(20,20,60,.12);}
.vn-body{flex:1 1 auto;min-height:0;display:flex;}
.vn-side{flex:0 0 auto;width:100%;overflow-y:auto;padding:12px;display:flex;flex-direction:column;gap:8px;}
.vn-pane{display:none;flex:1 1 auto;min-width:0;overflow-y:auto;padding:14px 16px 28px;}
body.vn-has-pane .vn-side{display:none;}
body.vn-has-pane .vn-pane{display:block;}
.vn-vancard{display:flex;align-items:center;gap:12px;width:100%;min-height:64px;padding:10px 12px;border:1px solid var(--vn-line);border-radius:12px;background:#fff;text-align:start;}
.vn-vancard:hover{border-color:#C9C8EE;}
.vn-vancard.is-on{border-color:var(--vn-pri);box-shadow:0 0 0 2px #DCDBF6;}
.vn-vancard.is-away{opacity:.6;}
.vn-vancard .vn-row-side small{font-size:11.5px;}
.vn-away{color:var(--vn-warn) !important;}
.vn-pane-head{display:flex;align-items:center;gap:10px;margin:0 0 14px;flex-wrap:wrap;}
.vn-pane-head > div:not(.vn-seg){flex:1 1 auto;min-width:0;}
.vn-pane-head h2{font-size:18px;}
.vn-pane-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:12px 0;}
.vn-pane-tools .vn-input{flex:1 1 220px;width:auto;}
.vn-filter{margin:0 0 4px;}
.vn-filters{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap;margin:0 0 12px;}
.vn-filters .vn-field{margin:0;min-width:140px;}
.vn-filters .vn-check{min-height:44px;margin:0;}
.vn-grid-wrap{max-width:100%;overflow-x:auto;margin:0 0 12px;border-radius:10px;}
.vn .vn-grid{table-layout:auto;min-width:640px;}
.vn .vn-grid td small{display:block;font-size:11.5px;}
.vn .vn-grid td,.vn .vn-grid th{white-space:nowrap;}
.vn .vn-grid td:nth-child(2),.vn .vn-count td:first-child{white-space:normal;}
.vn .vn-grid tr.vn-diff td{background:#FFF8E6;}
.vn .vn-empty-row td{text-align:center;color:var(--vn-muted);padding:18px 8px;white-space:normal;}
.vn-qcol{width:110px;}
.vn-qin{width:96px;min-height:34px;padding:0 8px;border:1px solid var(--vn-line);border-radius:8px;text-align:end;font:inherit;font-size:14px;font-variant-numeric:tabular-nums;background:#fff;}
.vn-cash-grid{display:grid;grid-template-columns:1fr;gap:10px;margin:0 0 10px;align-items:end;}
.vn-cash-grid > div{display:flex;flex-direction:column;padding:10px 12px;border-radius:10px;background:#F7F7FB;}
.vn-cash-grid > div b{font-size:22px;font-variant-numeric:tabular-nums;}
.vn-cash-grid .vn-field{margin:0;}
.vn-grid-form{display:grid;grid-template-columns:1fr;gap:0 14px;}
.vn-grid-form h3{font-size:14px;margin:8px 0 10px;padding-bottom:6px;border-bottom:1px solid var(--vn-line);color:var(--vn-pri);}
.vn-span{grid-column:1 / -1;}
.vn-pickbox{display:flex;gap:6px;}
.vn-pickbox input{flex:1 1 auto;}
.vn-days{display:flex;flex-wrap:wrap;gap:6px;}
.vn-day{min-width:52px;min-height:40px;border:1px solid var(--vn-line);border-radius:10px;background:#fff;font-weight:600;cursor:pointer;}
.vn-day.is-on{background:var(--vn-pri);border-color:var(--vn-pri);color:#fff;}
.vn-rclist{list-style:none;margin:0;padding:0;}
.vn-rclist li{display:flex;align-items:center;gap:8px;min-height:52px;padding:6px 0;border-bottom:1px solid var(--vn-line);}
.vn-rclist li:last-child{border-bottom:0;}
.vn-rclist .vn-stop-no{width:32px;height:32px;font-size:13px;}
.vn-empty-li{color:var(--vn-muted);justify-content:center;}

/* reports */
body.vn-report{height:auto;min-height:100%;overflow:auto;}
.vn-report-filters{padding:12px 16px 0;}
.vn-tabs-line{display:flex;margin:0 16px 12px;width:auto;overflow-x:auto;}
.vn-report-out{padding:0 16px 24px;}
.vn-report-out .vn-kpis{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));}

/* settlement sheet (screen and print) */
.vn-print-sheet header{margin:0 0 10px;}
.vn-print-sheet header p{margin:2px 0;font-size:13px;}
.vn-ptab{width:100%;border-collapse:collapse;margin:0 0 14px;font-size:13px;font-variant-numeric:tabular-nums;}
.vn-ptab td,.vn-ptab th{padding:5px 6px;border-bottom:1px solid var(--vn-line);text-align:start;}
.vn-ptab th{background:#F3F3F9;font-weight:600;}
.vn-ptab .r{text-align:end;}
.vn-sign{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;margin-top:40px;}
.vn-sign span{border-top:1px solid #000;padding-top:6px;text-align:center;font-size:12.5px;}
#vnPrint{display:none;}

@media (min-width:600px){
  .vn-kpis{grid-template-columns:repeat(3,minmax(0,1fr));}
  .vn-cash-grid{grid-template-columns:1fr 1fr 1fr;}
  .vn-grid-form{grid-template-columns:1fr 1fr;}
  .vn-grid-form .vn-check{grid-column:auto;}
}
@media (min-width:720px){
  .vn-sheet-wrap{align-items:center;padding:24px;}
  .vn-sheet{width:min(560px,100%);border-radius:18px;max-height:86vh;}
  .vn-sheet.is-wide{width:min(860px,100%);}
  .vn-sheet::before{display:none;}
  .vn-sheet-foot .vn-btn{flex:0 0 auto;}
}
@media (min-width:900px){
  /* the app: navigation at the side; Sell shows the cart beside the items */
  body.vn-app{padding-inline-start:88px;}
  .vn-nav{inset-inline-end:auto;inset-inline-start:0;top:0;bottom:0;width:88px;height:auto;flex-direction:column;justify-content:flex-start;gap:6px;
    padding:76px 0 12px;border-top:0;border-inline-end:1px solid var(--vn-line);box-shadow:none;}
  .vn-nav-btn{flex:0 0 auto;min-height:68px;}
  .vn-view{padding-bottom:28px;}
  .vn-kpis{grid-template-columns:repeat(4,minmax(0,1fr));}
  .vn-toast{bottom:28px;}
  .vn-sell{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:16px;align-items:start;}
  .vn-cart{display:block;position:sticky;top:0;max-height:calc(100dvh - 90px);overflow-y:auto;background:#fff;border:1px solid var(--vn-line);border-radius:14px;padding:14px;}
  .vn-cartbar{display:none !important;}
  .vn-cat{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:8px;}
  /* list and pane side by side */
  .vn-side{width:340px;border-inline-end:1px solid var(--vn-line);background:#FAFAFD;}
  body.vn-has-pane .vn-side{display:flex;}
  .vn-pane{display:block;}
  .vn-back{display:none;}
}
@media (min-width:1200px){
  .vn-grid-form{grid-template-columns:1fr 1fr 1fr;}
}
@media (prefers-reduced-motion:reduce){
  .vn-sheet,.vn-scrim,.vn-toast{transition:none;}
  .vn-loading{animation:none;}
}
@media print{
  body.vn-printing > *:not(#vnPrint){display:none !important;}
  body.vn-printing #vnPrint{display:block;}
  body.vn-printing{height:auto;overflow:visible;background:#fff;}
  body.vn-report .vn-bar,body.vn-report .vn-filters,body.vn-report .vn-tabs-line{display:none;}
  body.vn-report .vn-grid-wrap{overflow:visible;}
  body.vn-report .vn-grid{min-width:0;}
}
/* van-v1 refinements */
.vn-cart-sheet .vn-cart-head h2{visibility:hidden;}
.vn-tabs button{white-space:nowrap;flex:0 0 auto;}
.vn-act span{font-weight:600;}
@media (min-width:640px){
  .vn-cat{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
}
@media (min-width:900px){
  .vn-cart .vn-step button{width:38px;}
  .vn-cart .vn-step input{width:46px;}
  .vn-cart .vn-pr{width:76px;}
  .vn-cart .vn-line-row{gap:6px;flex-wrap:nowrap;}
  .vn-cart .vn-unit{padding:0 4px;}
}
@media (max-width:719px){
  .vn .vn-count{min-width:0;}
  .vn .vn-count .vn-mv{display:none;}
  .vn .vn-count .vn-qin{width:80px;min-height:40px;font-size:15px;}
}

/* van-v1b: the app's bar is hidden until a van is open (display:flex above beat [hidden]) */
.vn-nav[hidden]{display:none;}
.vn-nav-btn:disabled{opacity:.4;cursor:default;}
.vn-empty-acts{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-top:14px;}
body.vn-app.vn-novan{padding-inline-start:0;}
body.vn-novan .vn-top{display:none;}

/* ==========================================================================
   van-v2: Van Reports (VanReport.aspx, van-report.js). Bars and columns take
   their lengths from the server (BarPct / Pct); colours carry one meaning
   each: indigo = sales, blue = collections, red = loss / overdue.
   ========================================================================== */
.vr-bar{gap:10px 14px;}
.vr-quick{display:flex;gap:6px;flex-wrap:wrap;}
.vr-quick .vn-chip-btn{min-height:34px;padding:0 12px;font-size:13px;}
.vr-actions{display:flex;gap:8px;}
.vr-help{margin:0 0 12px;font-size:12.5px;line-height:1.5;color:var(--vn-muted);max-width:110ch;}
.vr-only{display:flex;align-items:center;gap:10px;margin:0 0 12px;}
.vr-kpis{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0 0 14px;}
.vr-kpi{border-inline-start-color:#D9D9EA;}
.vr-kpi b{font-size:20px;letter-spacing:-.01em;}
.vr-kpi small{display:block;margin-top:2px;font-size:11.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.vr-kpi.k-pri{border-inline-start-color:var(--vn-pri);}
.vr-kpi.k-ok{border-inline-start-color:var(--vn-ok);}
.vr-kpi.k-info{border-inline-start-color:var(--vn-info);}
.vr-kpi.k-neg{border-inline-start-color:var(--vn-err);}
.vr-kpi.k-neg b{color:var(--vn-err);}
.vr-charts{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;margin:0 0 14px;}
.vr-charts .vn-card{margin:0;}
.vr-chart h3{font-size:14px;margin:0 0 12px;}
/* horizontal bars */
.vr-hbars{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px;}
.vr-hbars li{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"l v" "t t";gap:4px 10px;align-items:center;border-radius:8px;}
.vr-hbars li.vn-tap{cursor:pointer;padding:4px 6px;margin:-4px -6px;}
.vr-hbars li.vn-tap:hover,.vr-hbars li.vn-tap:focus-visible{background:var(--vn-pri-soft);outline:none;}
.vr-hb-l{grid-area:l;min-width:0;font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.vr-hb-l small{display:block;font-weight:400;font-size:11.5px;overflow:hidden;text-overflow:ellipsis;}
.vr-hb-t{grid-area:t;display:flex;flex-direction:column;gap:3px;height:auto;}
.vr-hb-b{display:block;height:10px;border-radius:5px;background:var(--vn-pri);min-width:2px;}
.vr-hb-b.is-2{background:var(--vn-info);}
.vr-hb-b.is-neg,.vr-hb-v.is-neg{background:var(--vn-err);}
.vr-hb-v.is-neg{background:none;color:var(--vn-err);}
.vr-hb-v{grid-area:v;font-size:13px;font-variant-numeric:tabular-nums;white-space:nowrap;}
.vr-hbars.is-two .vr-hb-b{height:7px;}
/* columns over days */
.vr-legend{display:flex;gap:14px;flex-wrap:wrap;margin:0 0 8px;font-size:12px;color:var(--vn-muted);}
.vr-legend i{display:inline-block;width:10px;height:10px;border-radius:3px;background:var(--vn-pri);margin-inline-end:5px;vertical-align:-1px;}
.vr-legend i.is-2{background:var(--vn-info);}
.vr-cols{display:flex;align-items:stretch;gap:2px;height:170px;padding-bottom:18px;position:relative;
  background:linear-gradient(to top,#ECEDF4 1px,transparent 1px) 0 0/100% 25%;border-bottom:1px solid var(--vn-line);}
.vr-col{flex:1 1 0;min-width:0;display:flex;flex-direction:column;}
.vr-col-bars{flex:1 1 auto;display:flex;align-items:flex-end;justify-content:center;gap:1px;}
.vr-col-bars i{display:block;flex:1 1 0;max-width:22px;min-height:1px;border-radius:3px 3px 0 0;background:var(--vn-pri);}
.vr-col-bars i.is-2{background:var(--vn-info);}
.vr-col > span{height:18px;margin-bottom:-18px;font-size:10.5px;color:var(--vn-muted);text-align:center;white-space:nowrap;overflow:visible;}
.vr-col:hover .vr-col-bars i{filter:brightness(1.15);}
/* open invoices by age */
.vr-stack{display:flex;height:22px;border-radius:11px;overflow:hidden;background:#EEEFF4;margin:4px 0 14px;}
.vr-stack i{display:block;height:100%;}
.vr-stack .b0,.vr-stack-keys .b0{background:var(--vn-ok);}
.vr-stack .b1,.vr-stack-keys .b1{background:#E3B341;}
.vr-stack .b2,.vr-stack-keys .b2{background:#D98A1E;}
.vr-stack .b3,.vr-stack-keys .b3{background:#D2602A;}
.vr-stack .b4,.vr-stack-keys .b4{background:var(--vn-err);}
.vr-stack-keys{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:minmax(0,1fr);gap:6px;}
.vr-stack-keys li{display:grid;grid-template-columns:12px minmax(0,1fr) auto 52px;gap:8px;align-items:center;font-size:13px;}
.vr-stack-keys i{width:12px;height:12px;border-radius:3px;}
.vr-stack-keys b{font-variant-numeric:tabular-nums;}
.vr-stack-keys small{text-align:end;font-variant-numeric:tabular-nums;}
/* the table */
.vr-table-card{padding:12px;}
.vr-table-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 10px;}
.vr-table-head h3{font-size:14px;margin:0;}
.vr-table-head .vn-seg{flex:0 1 auto;overflow-x:auto;max-width:100%;}
.vr-table-head .vn-seg button{min-width:0;white-space:nowrap;}
.vr-search{flex:1 1 220px;max-width:340px;min-height:40px;margin:0;}
.vr-search input{min-height:38px;border:0;outline:none;background:transparent;font:inherit;width:100%;}
.vr-count{font-size:12.5px;color:var(--vn-muted);margin-inline-start:auto;white-space:nowrap;}
.vr-hint{margin:-4px 0 8px;font-size:12px;color:var(--vn-muted);}
.vr-grid-wrap{max-height:70vh;overflow:auto;margin:0;}
.vn .vr-grid thead th{position:sticky;top:0;z-index:1;cursor:pointer;user-select:none;}
.vn .vr-grid thead th.is-sorted{color:var(--vn-pri);}
.vn .vr-grid thead th:focus-visible{outline:2px solid var(--vn-pri);outline-offset:-2px;}
.vn .vr-grid tbody tr.vn-tap{cursor:pointer;}
.vn .vr-grid tbody tr.vn-tap:hover td,.vn .vr-grid tbody tr.vn-tap:focus-visible td{background:var(--vn-pri-soft);}
.vn .vr-grid tbody tr.vn-tap:focus-visible{outline:none;}
.vn .vr-grid tfoot td{position:sticky;bottom:0;background:#F6F6FB;font-weight:700;border-top:2px solid var(--vn-line);}
.vn .vr-grid td.is-neg{color:var(--vn-err);}
.vr-phone{margin:0 0 10px;}
@media (min-width:640px){
  .vr-kpis{grid-template-columns:repeat(3,minmax(0,1fr));}
  .vr-stack-keys{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:24px;}
}
@media (min-width:900px){
  .vr-kpis{grid-template-columns:repeat(auto-fit,minmax(160px,1fr));}
  .vr-charts{grid-template-columns:repeat(2,minmax(0,1fr));}
  .vr-charts .is-wide{grid-column:1 / -1;}
  .vr-hbars li{grid-template-columns:minmax(140px,30%) minmax(0,1fr) auto;grid-template-areas:"l t v";}
  .vr-hb-t{align-self:center;}
}
@media (max-width:719px){
  .vr-bar h1{flex:1 1 auto;order:1;}
  .vr-actions{order:2;}
  .vr-quick{order:3;flex:1 1 100%;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;}
  .vr-quick::-webkit-scrollbar{display:none;}
  .vr-quick .vn-chip-btn{flex:0 0 auto;}
  .vr-van{flex:1 1 100%;}
}
@media print{
  body.vn-report .vr-quick,body.vn-report .vr-actions,body.vn-report .vr-search,body.vn-report .vr-hint,body.vn-report .vr-only button{display:none;}
  body.vn-report .vr-grid-wrap{max-height:none;overflow:visible;}
  body.vn-report .vr-charts{grid-template-columns:repeat(2,minmax(0,1fr));}
}

/* ==========================================================================
   Business Intelligence dashboard (bi-v1)  -  Modules/BI/BiDashboard.aspx
   Reuses .card / .dx-card / .dk / .k-delta / .dx-svg / .dx-legend / table.grid
   / .ctl / .btn-erp / .tab-btn; only the pieces those do not cover are here.
   Series colours: s1 this year / main (brand indigo), s2 last year (the same
   hue, receded), s3 a second measure (teal). Good / bad always come with a
   signed figure, never colour alone.
   ========================================================================== */
.bi-page{background:#F5F6FA;}
.bi-page .page{max-width:1480px;margin:0 auto;}
.bi{--bi-s1:#4B49AC;--bi-s2:#C9CAEE;--bi-s3:#12A08A;--bi-good:#12A08A;--bi-bad:#C2410C;}

.bi-top{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px;margin-bottom:12px;}
.bi-top h1{margin:0;font-size:20px;font-weight:700;line-height:1.3;}
.bi-filter{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px 12px;width:100%;padding:12px;
  background:#fff;border:1px solid var(--clr-border);border-radius:12px;}
.bi-f{display:flex;flex-direction:column;gap:2px;min-width:0;margin:0;}
.bi-f .field-label{margin:0;}
.bi-f .ctl{min-width:150px;}
.bi-date .ctl{min-width:140px;}
.bi-seg{display:block;border:0;padding:0;margin:0;}
.bi-seg legend{padding:0;margin:0 0 2px;}
.bi-seg label{display:inline-block;position:relative;}
.bi-seg input{position:absolute;opacity:0;width:1px;height:1px;margin:0;}
.bi-seg span{display:inline-flex;align-items:center;height:var(--ctl-h);padding:0 10px;cursor:pointer;
  border:1px solid var(--clr-border-strong);background:#fff;color:var(--clr-text);}
.bi-seg label + label span{margin-inline-start:-1px;}
.bi-seg label:first-of-type span{border-start-start-radius:var(--radius);border-end-start-radius:var(--radius);}
.bi-seg label:last-of-type span{border-start-end-radius:var(--radius);border-end-end-radius:var(--radius);}
.bi-seg input:checked + span{background:var(--clr-primary);border-color:var(--clr-primary);color:#fff;}
.bi-seg input:focus-visible + span{outline:2px solid var(--clr-primary);outline-offset:1px;}
.bi-apply{height:var(--ctl-h);}

.bi-checkslot:empty{display:none;}
.bi-check{flex-wrap:wrap;align-items:baseline;gap:4px 8px;margin-bottom:12px;font-size:12.5px;}
.bi-check.bi-info{display:flex;padding:var(--sp-3);border-radius:var(--radius);background:#EEF0F7;color:var(--clr-muted);}
.bi-tabs{margin-bottom:12px;}
.bi-pane[hidden]{display:none;}
.bi-pane.is-loading > :not(.bi-wait){opacity:.45;transition:opacity .15s ease;}

.bi-period{display:flex;flex-wrap:wrap;gap:4px 16px;margin-bottom:4px;font-size:12px;color:var(--clr-muted);}
.bi-range{font-weight:600;color:var(--clr-text);}
.bi-group{margin:16px 0 8px;font-size:13px;font-weight:600;color:var(--clr-muted);}
.bi-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;}
.bi-kpi{width:100%;font:inherit;text-align:start;cursor:pointer;}
.bi-kpi.is-empty{cursor:default;}
.bi-kpi:focus-visible{outline:2px solid var(--clr-primary);outline-offset:2px;}
.bi-kpi .dk-top{justify-content:space-between;}
.bi-kpi .k-delta{flex:0 0 auto;}
.bi-kfoot{font-size:12px;color:var(--clr-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.bi-spark{display:block;width:100%;height:24px;margin-top:2px;}
.bi-spark polyline{fill:none;stroke:var(--bi-s1);stroke-width:1.5;vector-effect:non-scaling-stroke;}

.bi-charts,.bi-grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px;}
.bi-wide{grid-column:1 / -1;}
.bi-card{margin:0;min-width:0;border-radius:12px;}
.bi-card .card-head h2{margin:0;font-size:14px;}
.bi-legend b{margin-inline-start:6px;color:var(--clr-text);font-variant-numeric:tabular-nums;}
.bi-sw{display:inline-block;width:10px;height:10px;border-radius:3px;margin-inline-end:6px;background:var(--bi-s1);}
.bi-sw.s2{background:var(--bi-s2);}
.bi-sw.s3{background:var(--bi-s3);}
.bi-svg .dc-hit{fill:transparent;}
.bi-svg .dc-col:hover .dc-hit{fill:rgba(75,73,172,.05);}
.bi-svg .dc-col:focus{outline:none;}
.dc-bar.s1{fill:var(--bi-s1);}
.dc-bar.s2{fill:var(--bi-s2);}
.dc-bar.s3{fill:var(--bi-s3);}
.bi-line{fill:none;stroke-width:2;stroke-linejoin:round;stroke-linecap:round;}
.bi-line.s1{stroke:var(--bi-s1);}
.bi-line.s3{stroke:var(--bi-s3);}
.bi-dot{stroke:#fff;stroke-width:2;}
.bi-dot.s1{fill:var(--bi-s1);}
.bi-dot.s3{fill:var(--bi-s3);}
.bi-zero{stroke:#9AA0B8;stroke-width:1;}

.bi-rows{display:flex;flex-direction:column;}
.bi-hrow{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(60px,1.4fr) minmax(72px,auto);gap:12px;align-items:center;
  padding:6px 4px;border-bottom:1px solid var(--clr-border);}
.bi-hrow:last-child{border-bottom:0;}
.bi-hrow.is-link{cursor:pointer;}
.bi-hrow.is-link:hover{background:var(--clr-primary-soft);}
.bi-hrow:focus-visible{outline:2px solid var(--clr-primary);outline-offset:-2px;}
.bi-hname{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.bi-hbar,.bi-dbar{display:block;width:100%;height:14px;}
.bi-hbar .s1{fill:var(--bi-s1);}
.bi-hbar .s2{fill:var(--bi-s2);}
.bi-hval{text-align:end;font-variant-numeric:tabular-nums;white-space:nowrap;}
.bi-good{fill:var(--bi-good);}
.bi-bad{fill:var(--bi-bad);}
.bi-good-t{color:#0E7A62;}
.bi-bad-t{color:#A63A0A;}
.bi-axis0{stroke:#9AA0B8;stroke-width:1;vector-effect:non-scaling-stroke;}
[dir="rtl"] .bi-hbar,[dir="rtl"] .bi-dbar{transform:scaleX(-1);}

.bi-tbl{overflow-x:auto;-webkit-overflow-scrolling:touch;}
.bi-grid th,.bi-grid td{white-space:nowrap;}
.bi-grid thead th{text-align:start;}
.bi-grid thead th.num{text-align:end;}
.bi-grid .bi-wrap{white-space:normal;min-width:180px;}
.bi-grid tr.is-link{cursor:pointer;}
.bi-grid tr.is-link:focus-visible{outline:2px solid var(--clr-primary);outline-offset:-2px;}
.bi-grid .bi-sub th,.bi-grid .bi-sub td{font-weight:600;border-top:1px solid var(--clr-border-strong);background:#FAFBFD;}
.bi-grid .bi-sub th{text-align:start;}
.bi-grid .is-total th,.bi-grid .is-total td{font-weight:700;}
.bi-grid .bi-grp th{text-align:start;font-weight:600;background:var(--clr-primary-soft);}
.bi-barcol{width:140px;min-width:120px;}
.bi-tag{display:inline-block;padding:0 6px;border-radius:4px;background:#EEF0F7;color:var(--clr-muted);font-size:11px;}
.bi-note{margin:8px 0 0;font-size:12px;color:var(--clr-muted);}
.bi-muted{color:var(--clr-muted);}
.bi-err{color:#A62A40;}
.bi-nowrap{white-space:nowrap;}

.bi-drawer{position:fixed;inset:0;z-index:1000;display:flex;justify-content:flex-end;background:rgba(16,24,40,.32);}
.bi-drawer[hidden]{display:none;}
.bi-drawer-panel{display:flex;flex-direction:column;width:min(960px,100%);height:100%;background:#fff;box-shadow:var(--shadow-lg);}
.bi-drawer-bar{display:flex;align-items:center;gap:8px;padding:10px 16px;border-bottom:1px solid var(--clr-border);}
.bi-drawer-bar [hidden]{display:none;}
.bi-drawer-title{flex:1;min-width:0;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.bi-drawer-body{flex:1;overflow:auto;padding:16px;}
.bi-dhead h3{margin:0 0 2px;font-size:16px;}
.bi-dhead p{margin:0 0 12px;font-size:12px;color:var(--clr-muted);}
.bi-dfoot{display:flex;justify-content:flex-end;margin-top:12px;}
body.bi-noscroll{overflow:hidden;}

.bi-tip{position:fixed;left:var(--bi-tx,0);top:var(--bi-ty,0);z-index:1100;min-width:170px;max-width:280px;padding:8px 10px;
  pointer-events:none;background:#fff;border:1px solid var(--clr-border);border-radius:8px;box-shadow:var(--shadow-md);font-size:12px;}
.bi-tip[hidden]{display:none;}
.bi-tip-h{margin-bottom:4px;font-weight:600;}
.bi-tip-r{display:flex;align-items:center;gap:6px;}
.bi-tip-r span{flex:1;color:var(--clr-muted);}
.bi-tip-r b{font-variant-numeric:tabular-nums;}

@media (max-width:760px){
  .bi-page .page{padding:12px;}
  .bi-filter .bi-f{flex:1 1 140px;}
  .bi-f .ctl{min-width:0;width:100%;}
  .bi-seg{flex:1 1 100%;}
  .bi-apply{flex:1 1 100%;}
  .bi-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
  .bi-kpi .dk-val{font-size:17px;}
  .bi-kpi{padding:12px;}
  .bi-kpi .dk-foot,.bi-kfoot{font-size:11px;}
  .bi-charts,.bi-grid2{grid-template-columns:minmax(0,1fr);}
  .bi-hrow{grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;}
  .bi-hrow .bi-hbar,.bi-hrow .bi-dbar{grid-column:1 / -1;grid-row:2;}
}
@media (max-width:340px){
  .bi-kpis{grid-template-columns:minmax(0,1fr);}
}
@media (prefers-reduced-motion:reduce){
  .bi-pane.is-loading > :not(.bi-wait){transition:none;}
}

/* ---- bi-v2: Balances, Customer and Item views ---------------------------- */
.bi-kpi.is-plain{cursor:default;}
.bi-charts1{grid-template-columns:minmax(0,1fr);}
.bi-sw.bad{background:var(--bi-bad);}
.bi-age .bi-hrow{grid-template-columns:minmax(0,9em) minmax(60px,1fr) minmax(120px,auto);}
.bi-bar{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px 16px;margin-bottom:12px;}
.bi-switch{display:inline-flex;}
.bi-switch .btn-erp{border-radius:0;margin-inline-start:-1px;}
.bi-switch .btn-erp:first-child{border-start-start-radius:var(--radius);border-end-start-radius:var(--radius);margin-inline-start:0;}
.bi-switch .btn-erp:last-child{border-start-end-radius:var(--radius);border-end-end-radius:var(--radius);}
.bi-switch .btn-erp[aria-pressed="true"]{background:var(--clr-primary);border-color:var(--clr-primary);color:#fff;}
.bi-find{display:flex;flex-direction:column;gap:2px;min-width:0;flex:0 1 360px;margin:0;}
.bi-find .field-label{margin:0;}
.bi-find .ctl{width:100%;}
.bi-pick{flex:1 1 520px;}
.bi-pickrow{display:flex;gap:8px;}
.bi-pickrow .ctl{flex:1;min-width:0;}
.bi-gap{margin-top:16px;}
.bi-strong{font-weight:600;}
.bi-who{margin-bottom:4px;}
.bi-who h2{margin:0 0 4px;font-size:17px;font-weight:700;}
.bi-who p{display:flex;flex-wrap:wrap;gap:4px 16px;margin:0;font-size:12.5px;color:var(--clr-muted);}
.bi-tree td:first-child{white-space:nowrap;}
.bi-tcell{display:inline-flex;align-items:center;gap:4px;}
.bi-tcode{color:var(--clr-muted);font-variant-numeric:tabular-nums;}
.bi-tg,.bi-tg-none{display:inline-block;flex:0 0 auto;width:18px;height:18px;margin:0;padding:0;border:0;background:transparent;}
.bi-tg{cursor:pointer;border-radius:4px;position:relative;}
.bi-tg::before{content:"";position:absolute;inset:0;margin:auto;width:0;height:0;
  border-style:solid;border-width:4px 0 4px 6px;border-color:transparent transparent transparent var(--clr-muted);transition:transform .12s ease;}
[dir="rtl"] .bi-tg::before{transform:scaleX(-1);}
.bi-tg[aria-expanded="true"]::before{transform:rotate(90deg);}
.bi-tg:hover{background:var(--clr-primary-soft);}
.bi-tg:focus-visible{outline:2px solid var(--clr-primary);}
.bi-tree tr[hidden]{display:none;}
.bi-tree .bi-kG td:first-child{font-weight:600;}
.bi-tree .bi-kS td:first-child{color:var(--clr-muted);}
.bi-tree .bi-hit td:first-child{background:#FFF7D6;}
.bi-lv1 td:first-child{padding-inline-start:28px;}
.bi-lv2 td:first-child{padding-inline-start:44px;}
.bi-lv3 td:first-child{padding-inline-start:60px;}
.bi-lv4 td:first-child{padding-inline-start:76px;}
.bi-lv5 td:first-child{padding-inline-start:92px;}
.bi-lv6 td:first-child,.bi-lv7 td:first-child{padding-inline-start:108px;}
@media (max-width:760px){
  .bi-tabs{overflow-x:auto;flex-wrap:nowrap;-webkit-overflow-scrolling:touch;}
  .bi-tabs .tab-btn{flex:0 0 auto;white-space:nowrap;}
  .bi-switch{flex:1 1 100%;}
  .bi-switch .btn-erp{flex:1;}
  .bi-find,.bi-pick{flex:1 1 100%;}
}
@media (prefers-reduced-motion:reduce){ .bi-tg::before{transition:none;} }
/* ---- bi-v3: Customers / Suppliers / Items lists ---------------------------- */
.bi-back{align-self:flex-end;}
.bi-back[hidden]{display:none;}
.bi-tag{display:inline-block;margin-inline-start:6px;padding:0 6px;border-radius:8px;font-size:11px;font-weight:600;line-height:18px;vertical-align:middle;color:var(--clr-muted);background:var(--bi-s2);}
.bi-who h2 .bi-tag{font-size:11px;}
.bi-list td.bi-wrap{min-width:200px;}
.bi-list tbody tr.is-link:hover td{background:rgba(75,73,172,.06);}
.bi-apply[disabled]{opacity:.65;cursor:progress;}
@media (max-width:720px){
  .bi-back{flex:0 0 auto;}
  .bi-list td.bi-wrap{min-width:160px;}
}
/* ---- bi-v4: Bank reconciliation (Modules/CashBank/BankRecon.aspx) --------- */
.bk-acc{min-width:240px;}
.bk-flash{margin:0 0 12px;padding:8px 12px;border-radius:8px;font-size:13px;}
.bk-flash.is-ok{background:#E7F6F2;color:#0B6B5B;}
.bk-flash.is-bad{background:#FBEDE6;color:#A63A0A;}
.bk-flash[hidden]{display:none;}
.bk-warn{background:#FFF7E6;color:#7A4B00;border-radius:8px;margin-bottom:10px;padding:10px 14px;text-align:start;}
.bk-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin:0 0 10px;}
.bk-acts{white-space:nowrap;text-align:end;}
.bk-acts .bk-btn{padding:3px 10px;min-height:0;font-size:12px;}
.bk-acts .bk-btn + .bk-btn{margin-inline-start:6px;}
.bk-chk{width:32px;text-align:center;}
.bk-sug{display:block;font-weight:600;}
.bk-sub{display:block;font-size:12px;color:var(--clr-muted);}
.bi-tag.bk-tag-bad{background:#FBEDE6;color:#A63A0A;}
.bk-exact td{background:rgba(18,160,138,.06);}
.bk-stmt{min-width:0;width:100%;}
.bk-stmt th,.bk-stmt td{white-space:normal;}
.bk-stmt td.num{white-space:nowrap;}
.bk-stmt th[scope="row"]{font-weight:500;text-align:start;}
.bk-stmt .bi-sub th,.bk-stmt .bi-sub td{font-weight:700;}
.bk-form{display:flex;flex-wrap:wrap;gap:12px 16px;align-items:flex-end;}
.bk-group{flex:1 1 100%;display:flex;flex-wrap:wrap;gap:10px 16px;align-items:flex-end;border:1px solid #E4E5F0;border-radius:10px;padding:10px 14px 14px;margin:0;}
.bk-group legend{font-weight:600;font-size:13px;padding:0 6px;}
.bk-f{display:flex;flex-direction:column;gap:2px;flex:0 1 150px;min-width:0;margin:0;}
.bk-f .ctl{width:100%;}
.bk-f.bk-wide{flex:1 1 280px;}
.bk-f[hidden]{display:none;}
.bk-check,.bk-radio{flex-direction:row;align-items:center;gap:6px;flex:0 1 auto;}
.bk-msg.is-ok{color:#0B6B5B;}
.bk-msg.is-bad{color:#A63A0A;}
.bk-hint{flex:1 1 100%;margin:0;}
/* br-v2: the file's columns, read from the file, each with what it is read as */
.bk-cols{margin:14px 0 0;border:1px solid var(--clr-border);border-radius:10px;overflow:hidden;background:var(--clr-surface);}
.bk-cols-hd{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px;padding:10px 14px;background:var(--clr-surface-alt);border-bottom:1px solid var(--clr-border);}
.bk-cols-hd b{font-size:14px;color:var(--clr-text);}
.bk-cols-hd .bi-note{margin:0;flex:1 1 320px;}
.bk-chk-chip{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;border-radius:20px;padding:3px 10px;background:var(--clr-surface);color:var(--clr-muted);border:1px solid var(--clr-border);}
.bk-chk-chip.is-ok{background:#E7F6F2;color:#0B6B5B;border-color:transparent;}
.bk-chk-chip.is-ok::before{content:"\2713";}
.bk-chk-chip.is-bad{background:#FBEDE6;color:#A63A0A;border-color:transparent;}
.bk-chk-chip.is-bad::before{content:"!";font-weight:700;}
.bk-ctab{overflow:auto;}
.bk-ctab table{border-collapse:collapse;min-width:100%;font-size:12px;}
.bk-ctab th{vertical-align:top;text-align:start;padding:8px;border-inline-end:1px solid var(--clr-border);min-width:140px;font-weight:400;background:var(--clr-surface);}
.bk-ctab td{padding:5px 8px;border-top:1px solid var(--clr-border);border-inline-end:1px solid var(--clr-border);white-space:nowrap;max-width:240px;overflow:hidden;text-overflow:ellipsis;color:var(--clr-text);}
.bk-ctab td.bk-off{color:var(--clr-muted);opacity:.6;}
.bk-role{height:28px;font-size:12px;font-weight:600;width:100%;}
.bk-role.is-set{border-color:var(--clr-primary);background:var(--clr-primary-soft);color:var(--clr-primary);}
.bk-colno{display:block;font-size:11px;color:var(--clr-muted);margin-top:6px;}
.bk-colh{display:block;font-size:12px;color:var(--clr-text);overflow-wrap:anywhere;}
.bk-cols-ft{display:flex;flex-wrap:wrap;gap:10px 16px;align-items:flex-end;padding:10px 14px;border-top:1px solid var(--clr-border);}
.bk-cols-ft .bk-f{flex:0 0 160px;}
.bk-cols-ft .bk-check{flex:0 1 auto;}
.bk-cols-ft .bk-keep{margin:0 0 6px;flex:1 1 260px;}
/* br-v3: the Reconciled tab */
.bk-done-f{margin:0 0 12px;}
.bk-done-f .bk-bar{margin:0;align-self:flex-end;}
.bk-done-led .bk-done-e + .bk-done-e{margin-top:4px;padding-top:4px;border-top:1px dashed var(--clr-border);}
.bk-done-led .bk-sub{display:block;}
.bk-done-bad td{background:rgba(222,59,59,.05);}
/* br-v1a: the Preview button sits on the line of the boxes beside it */
.bk-import .bk-bar{margin:0;align-self:flex-end;}
.bk-preview{margin-top:12px;}
.bk-raw td{font-size:12px;white-space:nowrap;}
.bk-drawer-find{padding:8px 16px 0;}
/* br-v1: the matching panel lists matched ledger lines too */
.bk-drawer-find:not([hidden]){display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px 12px;}
.bk-drawer-find .bi-find{flex:1 1 260px;min-width:0;}
.bk-show{display:inline-flex;border:1px solid var(--clr-border-strong);border-radius:var(--radius-sm);overflow:hidden;height:var(--ctl-h);}
.bk-show button{border:0;background:var(--clr-surface);color:var(--clr-muted);font:inherit;font-size:var(--fs-sm);font-weight:600;padding:0 12px;cursor:pointer;}
.bk-show button + button{border-inline-start:1px solid var(--clr-border-strong);}
.bk-show button:hover{background:var(--clr-surface-alt);color:var(--clr-text);}
.bk-show button[aria-pressed="true"]{background:var(--clr-primary-soft);color:var(--clr-primary);}
.bk-show button:focus-visible{outline:2px solid var(--clr-primary);outline-offset:-2px;}
.bk-matched td{color:var(--clr-muted);}
.bk-matched td.num{color:var(--clr-text);}
.bi-tag.bk-tag-done{background:#E7F6F2;color:#0B6B5B;}
.bk-vno{border:0;background:none;padding:0;font:inherit;color:var(--clr-primary);font-weight:600;cursor:pointer;text-decoration:underline;text-underline-offset:2px;}
.bk-vno:hover{color:var(--clr-primary-dark);}
.bk-vno:focus-visible{outline:2px solid var(--clr-primary);outline-offset:2px;border-radius:2px;}
.bk-lock{display:inline-block;width:14px;height:14px;background:var(--clr-muted);vertical-align:middle;
  -webkit-mask:var(--bk-lock) center/contain no-repeat;mask:var(--bk-lock) center/contain no-repeat;
  --bk-lock:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E");}
/* br-v1: a ledger line opens its transaction (double-click or Enter) */
.bk-open{cursor:pointer;}
.bk-open:focus-visible{outline:2px solid var(--clr-primary);outline-offset:-2px;}
.bk-dbl{margin:0 0 6px;}
.bk-txn-drawer .bi-drawer-panel{width:min(760px,100%);}
.bk-txn-hd{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px 10px;margin:0 0 12px;}
.bk-txn-no{font-size:18px;font-weight:700;color:var(--clr-text);font-variant-numeric:tabular-nums;}
.bk-txn-type{font-size:12px;font-weight:600;color:var(--clr-muted);background:var(--clr-surface-alt);border:1px solid var(--clr-border);border-radius:20px;padding:1px 8px;}
.bk-txn-facts{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:10px 16px;margin:0 0 14px;padding:12px 14px;border:1px solid var(--clr-border);border-radius:10px;background:var(--clr-surface-alt);}
.bk-txn-facts>div{min-width:0;}
.bk-txn-facts .bk-txn-wide{grid-column:1/-1;}
.bk-txn-facts dt{font-size:11.5px;color:var(--clr-muted);margin:0 0 2px;}
.bk-txn-facts dd{margin:0;font-weight:600;color:var(--clr-text);overflow-wrap:anywhere;}
.bk-txn-lines tr.bk-this td{background:var(--clr-primary-soft);font-weight:600;}
.bk-txn-lines tr.bk-this td:first-child{box-shadow:inset 3px 0 0 var(--clr-primary);}
[dir="rtl"] .bk-txn-lines tr.bk-this td:first-child{box-shadow:inset -3px 0 0 var(--clr-primary);}
.bk-txn-foot{align-items:center;gap:10px;}
.bk-txn-foot .bi-note{margin:0;}
@media (max-width:720px){
  .bk-acc{min-width:0;flex:1 1 100%;}
  .bk-f{flex:1 1 45%;}
  .bk-acts{white-space:normal;}
  .bk-acts .bk-btn{margin:2px 0;}
}
/* ---- bi-v6: Monthly profit, Profit plan, Expenses, Planning setup --------- */
.bi{--bi-s4:#D9962B;--bi-s5:#7C8AA5;--bi-warn:#B7791F;}
.bi-sw.s4,.dc-bar.s4,.bi-dot.s4{background:var(--bi-s4);fill:var(--bi-s4);}
.bi-sw.s5,.dc-bar.s5,.bi-dot.s5{background:var(--bi-s5);fill:var(--bi-s5);}
.bi-dot.s2{fill:var(--bi-s2);}
.bi-line.s2{stroke:var(--bi-s2);}
.bi-line.s4{stroke:var(--bi-s4);}
.bi-line.s5{stroke:var(--bi-s5);}
.bi-hbar .s3{fill:var(--bi-s3);}
.bi-bar .bi-f .ctl{min-width:150px;}
.bi-flash{margin-bottom:12px;padding:var(--sp-3);border-radius:var(--radius);}
.bi-flash.is-ok{background:#E7F6F1;color:#0E7A62;}

.bi-tag.is-imp{background:#FFF1D6;color:#8A5A00;}
.bi-tag.is-season{background:#E9E8F8;color:var(--bi-s1);}
.bi-tag.is-good{background:#E1F4EE;color:#0E7A62;}
.bi-tag.is-bad{background:#FCE7DF;color:#A63A0A;}
.bi-tag.is-warn{background:#FFF1D6;color:#8A5A00;}
.bi-tag.is-var{background:#E1F1F4;color:#0B6B7A;}

/* the profit plan: target and sliders side by side, the output below */
.bi-planform{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:12px;margin-bottom:12px;}
.bi-plancard .card-head{display:flex;align-items:center;justify-content:space-between;gap:8px;}
.bi-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px;}
.bi-fields .ctl{width:100%;min-width:0;}
.bi-sliders{display:flex;flex-direction:column;gap:10px;}
.bi-slide{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1.4fr) 76px;align-items:center;gap:10px;}
.bi-slide label{min-width:0;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.bi-slide input[type="range"]{width:100%;accent-color:var(--bi-s1);}
.bi-slv{text-align:end;font-weight:600;font-variant-numeric:tabular-nums;direction:ltr;unicode-bidi:isolate;}
.bi-planout.is-loading,.bi-simout.is-loading{opacity:.55;transition:opacity .15s ease;}
.bi-verdict{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin-bottom:12px;padding:12px 14px;border-radius:12px;
  border:1px solid var(--clr-border);background:#fff;font-weight:600;}
.bi-verdict.is-A{background:#E7F6F1;border-color:#9BD9C5;color:#0B5E4B;}
.bi-verdict.is-S{background:#FFF6E3;border-color:#F0CE86;color:#7A4E00;}
.bi-verdict.is-U{background:#FDEDE6;border-color:#F2B8A0;color:#8C3209;}
.bi-verdict.is-N{background:#FBE7EA;border-color:#EDB0BA;color:#8A1F33;}
.bi-verdict.is-none{color:var(--clr-muted);font-weight:500;}
.bi-verdict .bi-tag{margin-inline-start:auto;}

/* expenses: findings and the savings simulator */
.bi-finds{list-style:none;margin:0;padding:0;}
.bi-finds li{display:flex;gap:12px;align-items:baseline;justify-content:space-between;padding:8px 10px;border-inline-start:3px solid var(--bi-warn);
  border-bottom:1px solid var(--clr-border);}
.bi-finds li.is-bad{border-inline-start-color:var(--bi-bad);}
.bi-finds li b{white-space:nowrap;font-variant-numeric:tabular-nums;}
.bi-simgrid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:16px;align-items:start;}
.bi-kpis2{grid-template-columns:repeat(auto-fit,minmax(170px,1fr));}
.bi-kpis2 .dk-lab{white-space:normal;}
.bi-grid tbody th{text-align:start;}

/* planning setup */
.bi-sub3{margin:16px 0 8px;font-size:13px;font-weight:600;}
.bi-rowform{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px 12px;}
.bi-grow{flex:1 1 220px;}
.bi-savebar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:12px;}
.bi-msg{font-size:12.5px;}
.bi-msg.is-ok{color:#0E7A62;}
.bi-msg.is-bad{color:#A62A40;}
.bi-input td{vertical-align:top;}
.bi-input .ctl{min-width:0;}
.bi-cell{width:100%;min-width:90px;text-align:end;}
.bi-ly{display:block;margin-top:2px;font-size:11px;color:var(--clr-muted);text-align:end;font-variant-numeric:tabular-nums;}
.bi-grid tr.is-sel td,.bi-grid tr.is-sel th{background:var(--clr-primary-soft);}
.bi-newrow td{background:#FAFBFD;}
.bi-setlist{display:flex;flex-direction:column;gap:8px;max-width:720px;}
.bi-setrow{display:grid;grid-template-columns:minmax(0,1fr) 120px;align-items:center;gap:12px;margin:0;}
.bi-setrow .ctl{width:100%;text-align:end;}
@media (max-width:900px){
  .bi-planform,.bi-simgrid{grid-template-columns:minmax(0,1fr);}
}
@media (max-width:760px){
  .bi-fields{grid-template-columns:minmax(0,1fr);}
  .bi-slide{grid-template-columns:minmax(0,1fr) 70px;}
  .bi-slide input[type="range"]{grid-column:1 / -1;grid-row:2;}
  .bi-setrow{grid-template-columns:minmax(0,1fr) 96px;}
  .bi-bar .bi-f{flex:1 1 140px;}
  .bi-bar .bi-f .ctl{min-width:0;width:100%;}
}
@media (prefers-reduced-motion:reduce){
  .bi-planout.is-loading,.bi-simout.is-loading{transition:none;}
}
/* ---- ms-v1: menu search in the header (Content/js/erp-menu-search.js) ---- */
.menu-search{position:relative;flex:0 1 360px;min-width:0;margin-inline-start:var(--sp-4);}
.ms-open{display:none;}
.ms-box{position:relative;display:flex;align-items:center;}
.ms-icon{position:absolute;inset-inline-start:10px;color:var(--clr-muted);pointer-events:none;}
.ms-input{width:100%;height:34px;padding:0 64px 0 34px;padding-inline-start:34px;padding-inline-end:64px;
  border:1px solid var(--clr-border);border-radius:8px;background:var(--clr-surface-alt);color:var(--clr-text);font:inherit;font-size:13px;}
.ms-input:focus{outline:none;border-color:var(--clr-primary);background:var(--clr-surface);box-shadow:0 0 0 3px var(--clr-primary-soft);}
.ms-input::-webkit-search-cancel-button{display:none;}
.ms-kbd{position:absolute;inset-inline-end:8px;padding:1px 6px;border:1px solid var(--clr-border);border-radius:4px;
  font:11px/16px inherit;color:var(--clr-muted);background:var(--clr-surface);pointer-events:none;}
.ms-input:focus + .ms-kbd{display:none;}
.ms-pop{position:absolute;top:calc(100% + 6px);inset-inline-start:0;width:min(520px,92vw);z-index:60;
  background:var(--clr-surface);border:1px solid var(--clr-border);border-radius:10px;box-shadow:var(--shadow-lg);overflow:hidden;}
.ms-pop[hidden]{display:none;}
.ms-count{padding:8px 12px;font-size:12px;color:var(--clr-muted);}
.ms-list{border-top:1px solid var(--clr-border);}
.ms-list:empty{display:none;}
.ms-list{list-style:none;margin:0;padding:4px;max-height:min(60vh,480px);overflow-y:auto;}
.ms-item{display:flex;flex-direction:column;gap:1px;padding:7px 10px;border-radius:6px;cursor:pointer;}
.ms-item.is-active{background:var(--clr-primary-soft);}
.ms-t{font-size:13.5px;font-weight:600;color:var(--clr-text);}
.ms-t mark{background:transparent;color:var(--clr-primary);text-decoration:underline;text-underline-offset:2px;}
.ms-p{font-size:11.5px;color:var(--clr-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.ms-soon{margin-inline-start:8px;padding:0 6px;border-radius:8px;background:#FFF1D6;color:#8A5A00;font-size:10.5px;font-weight:600;}
@media (max-width:1100px){ .ms-kbd{display:none;} .menu-search{flex-basis:260px;} }
@media (max-width:767px){
  .menu-search{flex:0 0 auto;margin:0;position:static;}
  .ms-open{display:inline-flex;}
  .ms-box{display:none;}
  .menu-search.is-open .ms-box{display:flex;position:absolute;inset-inline:8px;top:calc(var(--header-h) - 2px);z-index:61;}
  .menu-search.is-open .ms-input{height:40px;background:var(--clr-surface);box-shadow:var(--shadow-lg);}
  .ms-pop{position:fixed;top:calc(var(--header-h) + 44px);inset-inline:8px;width:auto;}
}
/* ms-v2: the chosen screen flashes in the sidebar once its folders open */
.app-sidebar .nav-open.ms-flash{animation:msFlash 1.6s ease-out 1;}
@keyframes msFlash{0%,35%{background:var(--clr-primary-soft);box-shadow:inset 0 0 0 2px var(--clr-primary);}100%{box-shadow:inset 0 0 0 0 transparent;}}
@media (prefers-reduced-motion:reduce){ .app-sidebar .nav-open.ms-flash{animation:none;box-shadow:inset 0 0 0 2px var(--clr-primary);} }

/* ---- log-v1: Log Management screens (Modules/Log/*.aspx, Content/js/log/log.js) ----
   Built on the bi chassis (filter, tiles, cards, drawer, hover cards); only the
   chips, pager, field lists and timelines are new. Chips always carry a word,
   never colour alone. */
.lg{--lg-ok:#0E7A62;--lg-ok-bg:#E1F4EE;--lg-no:#A63A0A;--lg-no-bg:#FCE7DF;--lg-warn:#8A5A00;--lg-warn-bg:#FFF1D6;
  --lg-off:#4F5670;--lg-off-bg:#EEF0F7;--lg-live:#1D4ED8;--lg-live-bg:#E3ECFD;--lg-adm:#4B49AC;--lg-adm-bg:#E9E8F8;
  --lg-teal:#0B6B7A;--lg-teal-bg:#E1F1F4;}
.lg .bi-filter .lg-q .ctl{min-width:220px;}
.lg-check{display:inline-flex;align-items:center;gap:6px;min-height:var(--ctl-h);margin:0;font-size:12.5px;color:var(--clr-muted);cursor:pointer;}
.lg-check input{margin:0;}
.lg-btns{display:flex;gap:8px;margin-inline-start:auto;}
.lg-kpis{grid-template-columns:repeat(auto-fit,minmax(170px,1fr));}

.lg-chip{display:inline-block;padding:1px 8px;border-radius:10px;font-size:11.5px;font-weight:600;line-height:18px;white-space:nowrap;
  background:var(--lg-off-bg);color:var(--lg-off);}
.lg-chip.lg-ok,.lg-chip.lg-g-doc{background:var(--lg-ok-bg);color:var(--lg-ok);}
.lg-chip.lg-no,.lg-chip.lg-sev3,.lg-chip.lg-g-err{background:var(--lg-no-bg);color:var(--lg-no);}
.lg-chip.lg-warn,.lg-chip.lg-sev2,.lg-chip.lg-g-tool{background:var(--lg-warn-bg);color:var(--lg-warn);}
.lg-chip.lg-live,.lg-chip.lg-g-login{background:var(--lg-live-bg);color:var(--lg-live);}
.lg-chip.lg-adm,.lg-chip.lg-g-sec{background:var(--lg-adm-bg);color:var(--lg-adm);}
.lg-chip.lg-g-ai,.lg-chip.lg-g-zatca{background:var(--lg-teal-bg);color:var(--lg-teal);}
.lg-sub{color:var(--clr-muted);font-size:11.5px;}
.lg-user{font-weight:500;}
.lg-time{font-variant-numeric:tabular-nums;}
.lg-addr{font-variant-numeric:tabular-nums;}

.lg-grid tbody tr.is-link:hover td{background:var(--clr-primary-soft);}
.lg-grid tbody tr.lg-bad > td:first-child{border-inline-start:3px solid var(--lg-no);}
.lg-grid tbody tr.lg-cur td{background:#FFF8E6;}
.lg-grid .lg-detail{max-width:440px;}
.lg-grid .lg-detail:empty::after{content:"";}

.lg-pager{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px;margin-top:10px;font-size:12.5px;}
.lg-count{margin-inline-end:auto;color:var(--clr-muted);}

.lg-srow{width:100%;border:0;border-bottom:1px solid var(--clr-border);background:none;font:inherit;color:inherit;text-align:start;}
.lg-srow:last-child{border-bottom:0;}
.lg-svg{display:block;width:100%;height:auto;}
.dc-bar.lg-sb{fill:var(--bi-bad);}
.bi-sw.lg-sb{background:var(--bi-bad);}

.lg-dl{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:10px 18px;margin:0 0 8px;}
.lg-f{min-width:0;}
.lg-f.is-long{grid-column:1 / -1;}
.lg-f dt{margin:0 0 1px;font-size:11.5px;color:var(--clr-muted);}
.lg-f dd{margin:0;font-weight:500;overflow-wrap:anywhere;}
.lg-pre{max-height:260px;overflow:auto;padding:8px 10px;border-radius:8px;background:#F7F8FB;font-size:12px;font-weight:400;white-space:pre-wrap;}
.lg-h{margin:18px 0 8px;font-size:13.5px;font-weight:600;}

.lg-tl{list-style:none;margin:0;padding:0;}
.lg-tl li{display:grid;grid-template-columns:150px 150px minmax(0,1fr) minmax(0,1.4fr);gap:8px 12px;align-items:center;
  padding:7px 0;border-bottom:1px solid var(--clr-border);font-size:13px;}
.lg-tl li:last-child{border-bottom:0;}
.lg-tl-time{font-variant-numeric:tabular-nums;color:var(--clr-muted);}
.lg-tl-more{color:var(--clr-muted);overflow-wrap:anywhere;}

.lg-alerts{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;list-style:none;}
.lg-alerts li{display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-size:13px;}

@media (max-width:767px){
  .lg .bi-filter .lg-q .ctl{min-width:0;}
  .lg-btns{margin-inline-start:0;width:100%;}
  .lg-btns .btn-erp{flex:1;}
  .lg-tl li{grid-template-columns:minmax(0,1fr) auto;}
  .lg-tl-who,.lg-tl-more{grid-column:1 / -1;}
}

/* ---- vat-v1: VAT Statements and VAT Setup (Modules/VAT/*.aspx, Content/js/vat/vat.js) ----
   Built on the bi chassis (filter, tabs, tiles, cards, drawer); only the
   return grid, notes, chips, period actions and the setup grids are new.
   Chips always carry a word, never colour alone. */
.vt{--vt-ok:#0E7A62;--vt-ok-bg:#E1F4EE;--vt-no:#A63A0A;--vt-no-bg:#FCE7DF;--vt-warn:#8A5A00;--vt-warn-bg:#FFF1D6;
  --vt-off:#4F5670;--vt-off-bg:#EEF0F7;--vt-info:#1D4ED8;--vt-info-bg:#E3ECFD;--vt-teal:#0B6B7A;--vt-teal-bg:#E1F1F4;}
.vt .bi-filter .vt-q .ctl{min-width:220px;}
.vt .bi-filter .vt-pe .ctl{min-width:200px;}
.vt .bi-filter .vt-one{display:none;}
.vt .bi-filter [hidden]{display:none;}
.vt-btns{display:flex;gap:8px;margin-inline-start:auto;}
.vt-kpis{grid-template-columns:repeat(auto-fit,minmax(170px,1fr));}
.vt-tabs{margin-top:4px;}
.vt-head{align-items:center;}
.vt-vno,.vt-mono{font-variant-numeric:tabular-nums;letter-spacing:.02em;}
.vt-due{font-weight:600;color:var(--vt-warn);}
.vt-muted{color:var(--clr-muted);font-size:12px;}
.vt-nowrap{white-space:nowrap;}
.vt-payable{color:var(--vt-no);}
.vt-credit{color:var(--vt-ok);}
.vt-warn-t{color:var(--vt-warn);}

.vt-chip{display:inline-block;padding:1px 8px;border-radius:10px;font-size:11.5px;font-weight:600;line-height:18px;white-space:nowrap;
  background:var(--vt-off-bg);color:var(--vt-off);}
.vt-chip.vt-c-ok{background:var(--vt-ok-bg);color:var(--vt-ok);}
.vt-chip.vt-c-bad{background:var(--vt-no-bg);color:var(--vt-no);}
.vt-chip.vt-c-warn{background:var(--vt-warn-bg);color:var(--vt-warn);}
.vt-chip.vt-c-info{background:var(--vt-info-bg);color:var(--vt-info);}
.vt-chip.vt-c-teal{background:var(--vt-teal-bg);color:var(--vt-teal);}

.vt-notes{list-style:none;margin:8px 0 12px;padding:0;display:flex;flex-direction:column;gap:6px;}
.vt-n{padding:8px 12px;border-radius:8px;border-inline-start:3px solid var(--vt-off);background:var(--vt-off-bg);font-size:13px;line-height:1.45;}
.vt-n.vt-n-info{border-inline-start-color:var(--vt-info);background:var(--vt-info-bg);}
.vt-n.vt-n-warn{border-inline-start-color:#B7791F;background:var(--vt-warn-bg);}
.vt-n.vt-n-bad{border-inline-start-color:var(--vt-no);background:var(--vt-no-bg);}
.vt-link{border:0;background:none;padding:0;margin-inline-start:4px;font:inherit;font-weight:600;color:var(--clr-primary);text-decoration:underline;cursor:pointer;}

.vt-grid tbody tr.is-link{cursor:pointer;}
.vt-grid tbody tr.is-link:hover td{background:var(--clr-primary-soft);}
.vt-grid tbody tr.vt-cur td{background:var(--clr-primary-soft);font-weight:600;}
.vt-grid .vt-neg{color:var(--vt-no);}
.vt-grid tfoot td,.vt-grid tr.vt-tot td{font-weight:600;border-top:1px solid var(--clr-border-strong);}
.vt-grid tr.vt-unposted > td:first-child{border-inline-start:3px solid #B7791F;}
.vt-grid tr.vt-undone td{color:var(--clr-muted);text-decoration:line-through;}
.vt-grid tr.vt-undone td .vt-chip{text-decoration:none;}
.vt-grid tr.vt-sevrow3 > td:first-child{border-inline-start:3px solid var(--vt-no);}
.vt-grid tr.vt-sevrow2 > td:first-child{border-inline-start:3px solid #B7791F;}
.vt-grid tr.vt-tofile > td:first-child{border-inline-start:3px solid var(--clr-primary);}
.vt-ck{font-size:12.5px;}
.vt-of{display:block;font-size:11px;font-weight:400;color:var(--clr-muted);}

/* the return: section rows, box numbers, the filed / today columns */
.vt-ret .vt-sec th{padding-top:14px;text-align:start;font-size:12px;font-weight:700;color:var(--clr-primary);background:var(--clr-surface-alt);}
.vt-ret .vt-box{width:56px;font-weight:700;font-variant-numeric:tabular-nums;color:var(--clr-primary);}
.vt-ret tr.vt-tot td{background:var(--clr-surface-alt);}
.vt-ret tr.vt-sub th{font-size:11px;font-weight:500;color:var(--clr-muted);}
.vt-ret td.vt-same{color:var(--clr-muted);}
.vt-ret td.vt-diff{font-weight:700;color:var(--vt-no);}

.vt-pager{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px;margin-top:10px;font-size:12.5px;}
.vt-count{margin-inline-end:auto;color:var(--clr-muted);}

/* the period drawer */
.vt-pd-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px;}
.vt-dl{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px 18px;margin:8px 0 12px;}
.vt-f{min-width:0;}
.vt-f.is-long{grid-column:1 / -1;}
.vt-f dt{margin:0 0 1px;font-size:11.5px;color:var(--clr-muted);}
.vt-f dd{margin:0;font-weight:600;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;}
.vt-h{margin:18px 0 6px;font-size:14px;font-weight:600;}
.vt-cap{margin:10px 0 4px;font-size:12px;color:var(--clr-muted);}
.vt-act{margin:14px 0;padding:12px 14px;border:1px solid var(--clr-border);border-radius:10px;background:var(--clr-surface-alt);}
.vt-act .vt-h{margin-top:0;}
.vt-act-back{border-color:#F3C9B8;}
.vt-fields{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px 14px;margin-top:10px;}
.vt-fld{display:flex;flex-direction:column;gap:3px;margin:0;}
.vt-hint{font-size:11.5px;color:var(--clr-muted);}
.vt-check{display:inline-flex;align-items:center;gap:6px;margin:8px 0 0;font-size:13px;cursor:pointer;}
.vt-check input{margin:0;}
.vt-foot{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:12px;}
.vt-msg{font-size:13px;}
.vt-msg.is-ok{color:var(--vt-ok);}
.vt-msg.is-bad{color:var(--vt-no);font-weight:600;}
.dx-empty.vt-flash{margin-bottom:10px;padding:10px 12px;border-radius:8px;background:var(--vt-ok-bg);color:var(--vt-ok);font-weight:600;text-align:start;}
.vt-tl{list-style:none;margin:0;padding:0;}
.vt-tl li{display:grid;grid-template-columns:140px 150px minmax(0,1fr) 120px minmax(0,1.4fr);gap:6px 12px;align-items:center;
  padding:7px 0;border-bottom:1px solid var(--clr-border);font-size:13px;}
.vt-tl li:last-child{border-bottom:0;}
.vt-tl-time{font-variant-numeric:tabular-nums;color:var(--clr-muted);}
.vt-tl-more{color:var(--clr-muted);overflow-wrap:anywhere;}

/* VAT Setup */
.vt-setup .vt-panel{margin-top:6px;}
.vt-setup .vt-panel[hidden],.vt-setup .vt-ccmap[hidden]{display:none;}
.vt-su-form{margin-bottom:18px;}
.vt-su-h{margin:4px 0 6px;font-size:15px;font-weight:600;}
.vt-edit td{vertical-align:top;}
.vt-edit .ctl{min-width:0;width:100%;}
.vt-edit .vt-num{max-width:110px;}
.vt-edit .vt-acc{min-width:260px;}
.vt-edit .vt-list{min-width:150px;}
.vt-edit .vt-boxsel{min-width:240px;}
.vt-edit .vt-side{min-width:150px;}
.vt-edit .vt-src{min-width:150px;}
.vt-edit .vt-dt{min-width:200px;}
.vt-edit .vt-tr{min-width:170px;}
.vt-edit .vt-kind{min-width:120px;}
.vt-edit .vt-rmcol{width:1%;white-space:nowrap;}
.vt-edit .vt-check{margin:6px 0 0;}
.vt-edit .vt-newrow td{background:var(--clr-surface-alt);}
.vt-rules tr.vt-none{display:none;}
.vt-rules.vt-showall tr.vt-none{display:table-row;}
.vt-code{font-weight:700;font-variant-numeric:tabular-nums;}
.vt-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
.vt-newrow .vt-sr{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto;white-space:normal;}
.vt-ccpick{max-width:320px;margin-bottom:10px;}
.vt-rm{white-space:nowrap;}

/* tax-v1: Tax templates (Modules/VAT/TaxSetup.aspx) on the VAT Setup chassis */
.tx-setup .tx-out{margin-top:12px;}
.tx-setup .tx-out:empty{display:none;}
.tx-setup .tx-cats .tx-cat{min-width:180px;}
.tx-setup .vt-edit .tx-kind{min-width:170px;}
.tx-setup .vt-edit .tx-act{min-width:110px;}
.tx-setup .vt-edit .vt-hint{display:block;margin-top:3px;}
.tx-setup .tx-cats .tx-reason{min-width:240px;}
.tx-setup .tx-cats input.ctl{min-width:200px;}
.tx-setup .vt-edit .tx-slab{min-width:240px;}
.tx-setup .tx-undo{padding-top:12px;border-top:1px solid var(--clr-border);}

@media (max-width:767px){
  .vt .bi-filter .vt-q .ctl,.vt .bi-filter .vt-pe .ctl{min-width:0;}
  .vt-btns{margin-inline-start:0;width:100%;}
  .vt-btns .btn-erp{flex:1;}
  .vt-tl li{grid-template-columns:minmax(0,1fr) auto;}
  .vt-tl-more{grid-column:1 / -1;}
  .vt-edit .vt-acc,.vt-edit .vt-boxsel{min-width:180px;}
}
/* vat-v5: VAT Payment */
.vt .vt-act-cell{width:1%;white-space:nowrap;text-align:end;}
.vt-paylines{margin-top:12px;}
.vt-edit .vt-mode{min-width:160px;}
.vt-paylines .vt-num{min-width:100px;width:110px;}
.vt-paylines input[name="pl_r"]{min-width:90px;}
.vt-paylines .vt-acc{min-width:0;width:150px;}
.vt-paylines .vt-mode{min-width:0;width:125px;}
.vt-paylines input[name="pl_d"]{width:130px;}
.vt-paylines th,.vt-paylines td{padding-inline:4px;}
.vt-page .bi-filter[hidden],#vtFilter[hidden]{display:none !important;}
.vt-paylines .vt-kind{min-width:0;width:95px;}
.bi-drawer-panel.vt-paydrawer{width:min(1100px,100%);}
/* vat-v7 */
.vt-cardbar{display:flex;justify-content:flex-end;margin-bottom:8px;}
.vt .vt-print{margin-inline-end:4px;}
.msg-pi-vat.is-late .msg-pi-meta{color:var(--clr-danger);font-weight:600;}
/* prof-v1: My Profile and Change Password (Profile.aspx, ChangePassword.aspx) */
.prof-page .form-body.prof-body{max-width:860px;}
.prof-page .prof-pwd{max-width:520px;}
.prof-page .prof-contact{margin-bottom:0;}
.prof-page .prof-act-right{margin-inline-start:auto;}
.prof-page a.btn-erp{text-decoration:none;}
.prof-recent{max-height:none;}
.prof-recent td.nowrap{white-space:nowrap;font-variant-numeric:tabular-nums;}
.prof-recent tr.prof-fail td{color:var(--clr-danger);}
@media (max-width:767px){
  .prof-page .row > [class*="col-"]{grid-column:span 12;}
}
/* notes-v2: credit / debit notes (Modules/Notes/NoteEntry.aspx). The lines
   use the STANDARD GRID (.txn-grid) unchanged; only the invoice box is here. */
.nt-hidden{display:none !important;}
.nt .nt-inv{display:flex;flex-direction:column;justify-content:flex-end;gap:4px;}
.nt .nt-invdl{grid-template-columns:max-content 1fr;gap:2px 12px;font-size:12.5px;width:100%;margin:0;
  padding:6px 10px;border:1px solid var(--clr-border);border-radius:var(--radius);background:var(--clr-surface-alt);}
.nt .nt-invdl dd{font-weight:600;text-align:end;}
a.btn-erp.nt-zatca{text-decoration:none;}
@media (max-width:767px){
  .nt .row > [class*="col-"]{grid-column:span 12;}
}

/*------------------------------------------------------------------------------
  cc-v1: the document's cost centre in the head (beside the branch), and the
  Profit and Loss by Cost Centre grid (the standard list grid, wider).
------------------------------------------------------------------------------*/
.head-field .cc-lbl{margin-inline-start:10px;}
.head-field .head-chip.is-pick{width:auto;max-width:240px;cursor:pointer;font-weight:600;}
.head-field .head-chip.is-pick:focus-visible{outline:2px solid var(--clr-primary,#4B49AC);outline-offset:1px;}
.head-field .head-chip.is-pick:disabled{cursor:default;opacity:.75;}
.ccr-wrap{margin-bottom:16px;}
.list-grid.ccr{table-layout:auto;min-width:100%;}
.list-grid.ccr col.ccr-acc{width:260px;}
.list-grid.ccr col.ccr-num{width:120px;}
.list-grid.ccr th{white-space:nowrap;}
.list-grid.ccr td.r{font-variant-numeric:tabular-nums;}
.list-grid.ccr td.ccr-zero{color:var(--clr-muted);}
.list-grid.ccr td.neg{color:var(--clr-danger,#b3261e);}
.list-grid.ccr th.ccr-parent{font-size:11.5px;opacity:.9;}
.list-grid.ccr tr.ccr-sec td{font-weight:700;background:var(--grid-foot-bg,#F4F5FA);}
.list-grid.ccr tr.ccr-sub td{font-weight:700;border-top:2px solid var(--grid-head-line,#cbd5e1);}
.list-grid.ccr tfoot tr.ccr-profit td{font-weight:700;font-size:13.5px;}
.list-grid.ccr td.ccr-tot{font-weight:600;}
@media (max-width:767px){.head-field .cc-lbl{display:none;}}

/*------------------------------------------------------------------------------
  pj-v1: projects. The project box beside the cost centre in a document's head;
  the Projects screen (Modules/GL/Project.aspx - the budget lines use the
  STANDARD GRID unchanged, only the figures strip is here); the two project
  reports (the cost-centre report's grid, .ccr, with status and flag chips).
------------------------------------------------------------------------------*/
/*  two boxes now share the head: both narrower, so the head still fits one
    line on a 1280px screen (the full name is in the list when it opens)  */
.head-field .head-chip.is-pick,.head-field .head-chip.is-pick.pj-pick{max-width:170px;}
.pj-hidden{display:none !important;}
.pj .pj-figs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:2px 0 12px;}
.pj .pj-figs > div{padding:6px 10px;border:1px solid var(--clr-border);border-radius:var(--radius);background:var(--clr-surface-alt);}
.pj .pj-figs dt{font-size:11.5px;color:var(--clr-muted);}
.pj .pj-figs dd{margin:2px 0 0;font-weight:700;font-size:14px;font-variant-numeric:tabular-nums;}
.pj .pj-figs dd.neg,.txn-grid td.pj-over{color:var(--clr-danger,#b3261e);}
.pj-st{display:inline-block;padding:1px 8px;border-radius:99px;font-size:11.5px;font-weight:600;background:#F1F3F9;color:#4A5072;}
.pj-st.pj-st-o{background:#E6F6EF;color:#0E7A55;}
.pj-st.pj-st-h{background:#FFF4E0;color:#8A5A00;}
.pj-st.pj-st-c{background:#EEF0F4;color:#5B6178;}
.pj-flag{display:inline-block;padding:1px 8px;border-radius:99px;font-size:11px;font-weight:600;white-space:nowrap;}
.pj-flag.pj-flag-over{background:#FDECEA;color:#b3261e;}
.pj-flag.pj-flag-nobudget{background:#FFF4E0;color:#8A5A00;}
.list-grid.pjr .pj-cust{font-weight:400;color:var(--clr-muted);margin-inline-start:8px;}
.list-grid.pjr tr.ccr-sec .pj-st{margin-inline-start:8px;}
@media (max-width:767px){
  .pj .row > [class*="col-"]{grid-column:span 12;}
  .pj .pj-figs{grid-template-columns:repeat(2,minmax(0,1fr));}
}

/* ==========================================================================
   lk-v11 - THE COMMON SEARCH POPUP (erp-lookup.js), one block, one look.
   - Buttons are the application's own .btn-erp (primary / neutral), the
     search box and the type list look like .ctl, at the global --ctl-h.
   - The result grid is the standard grid (gs-v1): it reads the same
     --grid-* values as the Sales Invoice entry grid - header, lines,
     every-second-line tint, hover, frame and shadow. Change those values
     there, never here.
   - erp-lookup.js sizes the grid to whole rows (the last row is never cut)
     and the rows snap while scrolling; scroll-padding keeps the selected
     row clear of the fixed header.
   - Inter for Latin text (self-hosted, like Roboto and Cairo), Cairo for
     Arabic.
   ========================================================================== */
@font-face{font-family:'Inter';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/Inter-Regular.woff2') format('woff2');}
@font-face{font-family:'Inter';font-style:normal;font-weight:500;font-display:swap;src:url('fonts/Inter-Medium.woff2') format('woff2');}
@font-face{font-family:'Inter';font-style:normal;font-weight:600;font-display:swap;src:url('fonts/Inter-SemiBold.woff2') format('woff2');}
@font-face{font-family:'Inter';font-style:normal;font-weight:700;font-display:swap;src:url('fonts/Inter-Bold.woff2') format('woff2');}
/* The smooth screen face, in ONE place: the search popup and every grid
   (entry grids and list grids) read --font-ui. Latin in Inter; Arabic
   letters fall to Cairo, as everywhere else in the application. */
:root{--font-ui:'Inter','Cairo',var(--font,'Roboto'),'Segoe UI',sans-serif;}
html[dir=rtl],html[lang=ar]{--font-ui:'Inter',var(--font-ar,'Cairo'),'Segoe UI',sans-serif;}

.elk-pop{--elk-pad:18px;--elk-sel:#cfe2f9;}
.elk-pop.acp-pop.is-open{background:#fff;border:1px solid var(--grid-frame-line);border-radius:8px;
    box-shadow:0 18px 48px rgba(21,66,139,.20),0 4px 12px rgba(21,66,139,.08);color:var(--clr-text);}
.elk-pop, .elk-pop input, .elk-pop select, .elk-pop button{font-family:var(--font-ui);font-feature-settings:'cv11';}
.elk-pop *{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;}

/* head: title and close */
.elk-pop .acp-head{padding:12px var(--elk-pad);background:#fff;border-bottom:1px solid var(--clr-border);}
.elk-pop .acp-title{font-size:16px;font-weight:700;letter-spacing:-.01em;color:var(--clr-text);}
html[dir=rtl] .elk-pop .acp-title{letter-spacing:0;}
.elk-pop .elk-x{display:inline-flex;align-items:center;justify-content:center;width:var(--ctl-h);height:var(--ctl-h);padding:0;border:0;
    border-radius:var(--radius-sm);background:transparent;color:var(--clr-muted);cursor:pointer;flex:0 0 auto;}
.elk-pop .elk-x svg{width:15px;height:15px;}
.elk-pop .elk-x:hover{background:var(--clr-surface-alt);color:var(--clr-text);}
.elk-pop .elk-x:focus-visible{outline:none;box-shadow:0 0 0 3px var(--clr-primary-soft);}

/* search row: [type] [search box] [Search] [Clear] */
.elk-pop .acp-search{display:flex;align-items:center;gap:8px;padding:14px var(--elk-pad) 12px;border-bottom:0;background:#fff;}
.elk-pop .elk-qw{display:block;position:relative;flex:1 1 auto;min-width:0;}
.elk-pop .acp-search.has-type .elk-qw{flex:1 1 auto;}
.elk-pop .elk-qw svg{position:absolute;inset-inline-start:10px;top:50%;transform:translateY(-50%);width:14px;height:14px;color:var(--clr-muted);pointer-events:none;}
.elk-pop .acp-search input.elk-q,
.elk-pop .acp-search .acp-type-sel{height:var(--ctl-h);border:1px solid var(--clr-border-strong);border-radius:var(--radius-sm);
    background:#fff;color:var(--clr-text);font-size:var(--fs-base);box-shadow:none;transition:border-color .15s ease,box-shadow .15s ease;}
.elk-pop .acp-search input.elk-q{width:100%;padding:0 10px;padding-inline-start:32px;}
.elk-pop .acp-search .acp-type-sel{flex:0 0 180px;padding:0 8px;}
.elk-pop .acp-search input.elk-q::placeholder{color:var(--clr-muted);}
.elk-pop .acp-search input.elk-q:hover,.elk-pop .acp-search .acp-type-sel:hover{border-color:#B9BFD1;}
.elk-pop .acp-search input.elk-q:focus,
.elk-pop .acp-search .acp-type-sel:focus{outline:none;border-color:var(--clr-primary);box-shadow:0 0 0 3px var(--clr-primary-soft);}
.elk-pop .btn-erp{flex:0 0 auto;white-space:nowrap;}
.elk-pop .btn-erp svg{position:static;transform:none;width:13px;height:13px;color:currentColor;}
.elk-pop .btn-erp:focus-visible{outline:none;box-shadow:0 0 0 3px var(--clr-primary-soft);}

/* the grid - the standard grid's look (gs-v1 --grid-* values) */
.elk-pop .acp-scroll{margin:0 var(--elk-pad) 4px;background:#fff;border:1px solid var(--grid-frame-line);border-radius:4px;
    box-shadow:var(--grid-frame-shadow);scroll-snap-type:y proximity;}
.elk-pop .acp-tbl{border-collapse:collapse;font-size:var(--fs-base);}
.elk-pop .acp-tbl th{position:sticky;top:0;z-index:1;height:var(--grid-head-h);padding:var(--grid-head-pad);padding-inline:10px;
    background:var(--grid-head-bg);color:var(--grid-head-ink);font-size:var(--fs-base);font-weight:700;text-transform:none;letter-spacing:0;
    border:1px solid var(--grid-head-line);border-top:0;box-shadow:inset 0 -1px 0 var(--grid-head-line);}
.elk-pop .acp-tbl td{height:calc(var(--grid-input-h) + 4px);padding:var(--grid-cell-pad);padding-inline:10px;line-height:1.3;color:var(--clr-text);
    border:1px solid var(--grid-line);}
.elk-pop .acp-tbl tr > :first-child{border-inline-start:0;}
.elk-pop .acp-tbl tr > :last-child{border-inline-end:0;}
.elk-pop .acp-tbl tbody tr:last-child td{border-bottom:0;}
.elk-pop .acp-tbl tr.acp-row{scroll-snap-align:start;cursor:pointer;}
.elk-pop .acp-tbl tbody tr.acp-row:nth-child(even) td{background:var(--grid-row-alt);}
.elk-pop .acp-tbl tbody tr.acp-row:hover td{background:var(--grid-row-hover);}
.elk-pop .acp-tbl tbody tr.acp-row.is-used td{background:#FFFBEB;}
.elk-pop .acp-tbl tbody tr.acp-row.is-sel td{background:var(--elk-sel);}
.elk-pop .acp-tbl tr.acp-row.is-sel td:first-child{box-shadow:inset 3px 0 0 var(--grid-foot-rule);}
html[dir=rtl] .elk-pop .acp-tbl tr.acp-row.is-sel td:first-child{box-shadow:inset -3px 0 0 var(--grid-foot-rule);}
.elk-pop .acp-code{font-family:inherit;font-size:var(--fs-base);font-weight:500;color:var(--clr-text);}
.elk-pop .acp-num{font-feature-settings:'cv11','tnum';}
.elk-pop .acp-empty{height:auto;padding:28px 16px;font-size:var(--fs-base);color:var(--clr-muted);text-align:center;}
.elk-pop .elk-more-wrap{padding:8px 12px 10px;}
.elk-pop .elk-note{margin:10px var(--elk-pad) 0;border:1px solid #F5E3B3;border-radius:var(--radius-sm);}

/* footer: count and keys | Select  Cancel */
.elk-pop .acp-foot{display:flex;align-items:center;gap:14px;margin-top:12px;padding:10px var(--elk-pad);
    border-top:1px solid var(--clr-border);background:var(--clr-surface-alt);font-size:var(--fs-base);color:var(--clr-text);}
.elk-pop .acp-count{font-size:var(--fs-base);font-weight:500;white-space:nowrap;}
.elk-pop .elk-keys{font-size:12px;color:var(--clr-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.elk-pop .elk-acts{display:flex;gap:8px;margin-inline-start:auto;}
.elk-pop .elk-acts .btn-erp{min-width:88px;}

@media (max-width:640px){
    .elk-pop{--elk-pad:12px;}
    .elk-pop .acp-search{flex-wrap:wrap;}
    .elk-pop .elk-qw{flex-basis:100%;}
    .elk-pop .elk-keys{display:none;}
}
/* lk-v12: options beside the search box of a search (a document picker's "Show all") */
.elk-pop .elk-checks{display:inline-flex;align-items:center;gap:12px;flex:0 0 auto;}
.elk-pop .elk-checks[hidden]{display:none;}
.elk-pop .elk-check{display:inline-flex;align-items:center;gap:6px;margin:0;font-size:var(--fs-base);font-weight:400;color:var(--clr-text);white-space:nowrap;cursor:pointer;}
.elk-pop .elk-check input{display:inline-block;width:15px;height:15px;margin:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none;accent-color:var(--clr-primary);cursor:pointer;}
.elk-pop .elk-check input:focus-visible{outline:2px solid var(--clr-primary);outline-offset:2px;}
.elk-pop .acp-code .ov-mark{color:var(--clr-danger);font-weight:700;}

/* ==========================================================================
   gf-v1 - the grids in the smooth font. Every entry grid (.txn-grid) and
   list grid (.list-grid) uses --font-ui (Inter, Arabic in Cairo), drawn
   antialiased, the same face as the search popup. Codes are no longer in
   Consolas; figures line up (tabular digits) in number cells only, never
   in codes. Sizes, colours and row heights stay the standard grid's
   (gs-v1 --grid-* values).
   ========================================================================== */
:is(.desk-grid, body) .txn-grid,
:is(.desk-grid, body) .list-grid{font-family:var(--font-ui);font-feature-settings:'cv11';
  -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;}
:is(.desk-grid, body) .txn-grid :is(input,select,textarea,button):not([data-lang="ar"]),
:is(.desk-grid, body) .list-grid :is(input,select,textarea,button):not([data-lang="ar"]){font-family:var(--font-ui);font-feature-settings:'cv11';}
:is(.desk-grid, body) .txn-grid th,
:is(.desk-grid, body) .list-grid th{font-weight:600;}
/* codes: the grid face, not a typewriter face */
:is(.desk-grid, body) .txn-grid .gi.codesearch,
:is(.desk-grid, body) .txn-grid .mono,
:is(.desk-grid, body) .list-grid .mono{font-family:var(--font-ui);font-weight:500;letter-spacing:0;}
/* figures under each other: number cells and number boxes only */
:is(.desk-grid, body) .txn-grid :is(td.r,th.r,td.num,td.val,td.net,td.vatamt,td.vatpct,td.outq,td.onhand,td.bal),
:is(.desk-grid, body) .txn-grid tfoot td,
:is(.desk-grid, body) .txn-grid .gi:is(.qty,.rate,.cost,.disc,.num,.r,.dr,.cr),
:is(.desk-grid, body) .txn-grid input[type=number],
:is(.desk-grid, body) .list-grid :is(td.r,th.r,td.num),
:is(.desk-grid, body) .list-grid tfoot td{font-feature-settings:'cv11','tnum';font-variant-numeric:tabular-nums;}


/* ===== bp-v1 Bank transactions (Modules/CashBank/BankPlanner.aspx) =====
   Day list (list-grid), calendar, chosen day's details, accounts.
   Green = money in, red = money out, dashed/italic = still expected.     */
.bp [hidden]{display:none !important;}
.bp .dcr-answer b.is-neg{color:#B42318;}
.bp-kpis{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:10px;margin:0 0 16px;}
.bp-kpi{background:#fff;border:1px solid #E3E6EE;border-radius:10px;padding:10px 14px;font-variant-numeric:tabular-nums;}
.bp-kpi span{display:block;font-size:12px;color:#6C7293;margin-bottom:3px;}
.bp-kpi b{font-size:17px;font-weight:700;color:#1F2340;}
.bp-kpi i{display:block;font-style:normal;font-size:11.5px;color:#6C7293;margin-top:2px;}
.bp-kpi.in b{color:#0E7A55;}
.bp-kpi.out b{color:#B42318;}
.bp-kpi.exp{border-style:dashed;}
.bp-kpi.neg{background:#FEF3F2;border-color:#F4B4AE;}
.bp-kpi.neg b{color:#B42318;}

.bp td.bp-in,.bp span.bp-in{color:#0E7A55;}
.bp td.bp-out,.bp span.bp-out{color:#B42318;}
.bp-cell .bp-exp{opacity:.75;}
.bp td.bp-neg{color:#B42318;font-weight:700;}
/* Normal view: the report grid (pl-tbl compact), a day opens under its own line */
.bp-days th.bp-date,.bp-days td.bp-date{width:150px;}
.bp-days td.bp-date{font-variant-numeric:tabular-nums;}
.bp-days .bp-dw{display:inline-block;min-width:3.4em;color:#6C7293;}
.bp-days .bp-dt{display:inline-block;}
.bp-days tr.bp-row{cursor:pointer;}
.bp-days tr.bp-row.is-today td{font-weight:700;}
.bp-days tr.bp-row.is-short td.bp-bal{color:#B42318;}
.bp-days tr.bp-row.is-pick td{background:#F7FAFF;}
.bp-days tr.bp-row.is-pick td:first-child{box-shadow:inset 3px 0 0 #1D5FA0;}
[dir="rtl"] .bp-days tr.bp-row.is-pick td:first-child{box-shadow:inset -3px 0 0 #1D5FA0;}
.bp-days tr.bp-open > td{padding:10px 12px 14px;background:#fff;}
.bp-days tr.bp-open:hover{background:#fff;}
.bp-days tr.bp-open .dcr-h{margin-top:4px;}
.bp-days tr.bp-open .pl-empty{margin:0;}

.bp-month{margin:0 0 18px;}
.bp-month h3{margin:0 0 8px;font-size:14px;font-weight:700;color:#1F2340;}
.bp-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;font-variant-numeric:tabular-nums;}
.bp-wd{font-size:11.5px;font-weight:600;color:var(--grid-head-ink,#15428b);text-align:center;padding:4px 0;
    background:var(--grid-head-bg,#dcebfa);border:1px solid var(--grid-head-line,#a8c3e0);border-radius:4px;}
.bp-cell{min-height:86px;background:#fff;border:1px solid var(--grid-line,#c9daed);border-radius:6px;padding:4px 6px;
    display:flex;flex-direction:column;gap:1px;font-size:11.5px;text-align:end;cursor:pointer;overflow:hidden;}
.bp-cell:hover{background:var(--grid-row-hover,#eaf3fc);}
.bp-cell:focus-visible{outline:2px solid var(--clr-primary,#4B49AC);outline-offset:1px;}
.bp-cell .bp-dn{font-weight:700;color:#1F2340;text-align:start;font-size:12.5px;}
.bp-cell .bp-bal{margin-top:auto;padding-top:2px;border-top:1px dashed #E3E6EE;font-weight:600;color:#3F4562;}
.bp-cell.is-blank{visibility:hidden;}
.bp-cell.is-out{background:#F7F8FB;color:#B0B5C9;cursor:default;}
.bp-cell.is-today{border-color:var(--clr-primary,#4B49AC);box-shadow:inset 0 0 0 1px var(--clr-primary,#4B49AC);}
.bp-cell.is-short{background:#FEF3F2;border-color:#F4B4AE;}
.bp-cell.is-short .bp-bal{color:#B42318;}
.bp-cell.is-pick{box-shadow:inset 0 0 0 2px var(--grid-foot-rule,#4a7fc1);}
@media (max-width:760px){.bp-cell{min-height:58px;font-size:10.5px;}.bp-cell .bp-exp{display:none;}}

.bp-detail{margin:6px 0 20px;scroll-margin-top:12px;}
.bp-hint{margin:0 0 8px;font-size:12.5px;color:#6C7293;}
.bp-detail td.nw{white-space:nowrap;}
.bp-limit-row{display:flex;gap:6px;align-items:center;}
.bp-limit-row .bp-limit{width:120px;text-align:end;}

/* ===== ia-v1 Item analysis (Modules/Inventory/ItemAnalysis.aspx) =====
   Report chassis (tb-wrap, pl-cards, xr-tabs, pl-tbl compact). Each card
   opens its tab; class chips name the movement class.                     */
.ia [hidden]{display:none !important;}
.ia-cards .ia-card{font:inherit;text-align:start;padding:0;cursor:pointer;color:inherit;flex:1 1 170px;
    display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;
    transition:border-color .15s, box-shadow .15s;}
.ia-cards .ia-card .pl-row{flex:1;}
.ia-cards .ia-card:hover{border-color:#94a3b8;box-shadow:0 2px 8px rgba(15,39,64,.08);}
.ia-cards .ia-card:focus-visible{outline:2px solid var(--clr-primary,#4B49AC);outline-offset:2px;}
.ia-cards .ia-card .pl-row{flex-direction:column;align-items:flex-start;gap:2px;}
.ia-cards .ia-card .pl-row b{font-size:20px;line-height:1.2;}
.ia-cards .ia-card .pl-row span{font-size:12px;color:#64748b;font-variant-numeric:tabular-nums;}
.ia-cards .ia-card.is-warn h3{background:#FEF6E7;color:#92400E;}
.ia-cards .ia-card.is-bad h3{background:#FEF3F2;color:#B42318;}
.ia-cards .ia-card.is-bad .pl-row b{color:#B42318;}
.ia-chip{display:inline-block;padding:1px 8px;border-radius:99px;font-size:11.5px;font-weight:600;white-space:nowrap;}
.ia-chip.ia-fast{background:#E6F6EF;color:#0E7A55;}
.ia-chip.ia-normal{background:#E6F0FB;color:#1D5FA0;}
.ia-chip.ia-slow{background:#FEF6E7;color:#92400E;}
.ia-chip.ia-none{background:#F1F3F9;color:#4A5072;}
.ia-tbl td.ia-neg{color:#B42318;font-weight:600;}
.ia-tbl td.nw{white-space:nowrap;}
.ia-tbl.ia-age{max-width:560px;}

/* ===== db-v1 Day book (Modules/GL/DayBook.aspx) =====
   Report chassis (pl-cards, pl-tbl compact dcr-det). Day heading rows,
   voucher rows, indented entry rows, day totals; cash and bank by payment
   type with the account rows bold and the payment types indented under them. */
.dbk-cards .pl-card{flex:1 1 160px;}
.dbk-cards .pl-row span{font-size:12px;color:#64748b;}
.dbk-tbl th.dbk-c-date{width:104px;}
.dbk-tbl th.dbk-c-type{width:150px;}
.dbk-tbl th.dbk-c-no{width:120px;}
.dbk-tbl th.dbk-c-amt{width:124px;}
.dbk-tbl td.nw{white-space:nowrap;}
.dbk-tbl tr.dbk-day td{background:#EEF2F8;font-weight:700;color:#0f2740;padding-top:7px;padding-bottom:7px;}
.dbk-tbl tr.dbk-day td span{font-weight:600;color:#4A5072;margin-inline-start:14px;}
.dbk-tbl tr.dbk-v td{font-weight:600;color:#1f2937;}
.dbk-tbl tr.dbk-v td.dbk-no{color:#1D5FA0;}
.dbk-tbl tr.dbk-l td{color:#4A5072;font-size:12.5px;}
.dbk-tbl tr.dbk-l td i{font-style:normal;display:inline-block;min-width:2.2em;color:#6C7293;}
.dbk-tbl tr.dbk-sub td{background:#F7F9FC;font-weight:700;border-top:1px solid #c7cedb;}
.dbk-type{display:inline-block;padding:1px 8px;border-radius:99px;font-size:11.5px;font-weight:600;background:#F1F3F9;color:#4A5072;white-space:nowrap;}
td.dbk-ind{padding-inline-start:26px !important;}
.dbk-money{width:100%;}
.dbk-money th.r,.dbk-money td.r{width:150px;}
.dbk-money tr.dbk-acc td{font-weight:700;color:#0f2740;}
.dbk-money tr.dbk-mode td{color:#4A5072;font-size:12.5px;}
.dbk-money tr.dbk-mode.is-other td.dbk-ind{font-style:italic;}
.dbk-money tr.dbk-kind td{background:#F7F9FC;font-weight:700;border-top:1px solid #c7cedb;}
.dbk-money td.dbk-in{color:#0E7A55;}
.dbk-money td.dbk-out{color:#B42318;}
.dbk-money td.dbk-neg{color:#B42318;}
/* db-v1b: balance block - cash, bank, total (closing large, opening / in / out under it) */
.dbk-bal{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin:0 0 12px;}
.dbk-bcard{border:1px solid #dde3ec;border-radius:10px;background:#fff;padding:10px 14px 12px;font-variant-numeric:tabular-nums;}
.dbk-bcard h3{margin:0 0 4px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:#334155;}
.dbk-bcard > b{display:block;font-size:22px;font-weight:700;color:#0f2740;line-height:1.25;}
.dbk-bcard > b.is-neg{color:#B42318;}
.dbk-bcard dl{display:grid;grid-template-columns:auto 1fr;gap:2px 12px;margin:8px 0 0;padding-top:8px;border-top:1px solid #EEF0F5;font-size:12.5px;}
.dbk-bcard dt{color:#64748b;}
.dbk-bcard dd{margin:0;text-align:end;color:#1f2937;}
.dbk-bcard dd.in{color:#0E7A55;}
.dbk-bcard dd.out{color:#B42318;}
.dbk-bcard.is-all{background:#0f2740;border-color:#0f2740;}
.dbk-bcard.is-all h3,.dbk-bcard.is-all dt{color:#C9D3E3;}
.dbk-bcard.is-all > b,.dbk-bcard.is-all dd{color:#fff;}
.dbk-bcard.is-all > b.is-neg{color:#FCA5A5;}
.dbk-bcard.is-all dd.in{color:#86EFAC;}
.dbk-bcard.is-all dd.out{color:#FCA5A5;}
.dbk-bcard.is-all dl{border-top-color:rgba(255,255,255,.15);}

/* ---- bp-v2: the reason asked when a correction passes the bank guard ------
   (Content/js/erp-bankpass.js; the shell is the standard .erp-modal)       */
.bpx-box{width:min(560px,100%);}
.bpx-body{padding:14px 18px;display:flex;flex-direction:column;gap:8px;}
.bpx-msg{margin:0;font-weight:600;color:var(--clr-danger);}
.bpx-ask{margin:0;color:var(--clr-text);}
.bpx-reason{height:auto;min-height:76px;resize:vertical;}
.bpx-need{margin:0;color:var(--clr-danger);font-size:12.5px;}
.bpx-need[hidden]{display:none;}

/* ---- cs-v1: setup changes reaching an open screen (Content/js/erp-sync.js) */
.cs-bar{position:sticky;top:0;z-index:60;display:flex;align-items:center;flex-wrap:wrap;gap:10px;
  padding:8px 14px;border-bottom:1px solid var(--clr-border);font-size:13px;background:#EEF4FF;color:#1E3A8A;}
.cs-bar[hidden]{display:none;}
.cs-bar.cs-warn{background:#FFF7E6;color:#6B4E0E;border-bottom-color:#F3D9A4;}
.cs-bar .cs-text{font-weight:600;}
.cs-bar .cs-kept{flex:1 1 240px;min-width:0;}
.cs-bar .btn-erp{padding:4px 12px;}
.cs-bar .cs-x{margin-inline-start:auto;border:0;background:transparent;font-size:20px;line-height:1;cursor:pointer;color:inherit;opacity:.6;}
.cs-bar .cs-x:hover{opacity:1;}
.ctl.cs-locked{background:#F3F4F8;color:var(--clr-text);cursor:not-allowed;}
/* dc-v2: the Date control balloon over a locked date box (erp-sync.js);
   approvers get "Override date" inside it - nothing is added under the box */
.dmg-balloon.cs-tip{pointer-events:auto;display:flex;flex-direction:column;align-items:flex-start;gap:6px;}
.dmg-balloon.cs-tip .cs-tip-ov{font:inherit;font-size:12px;font-weight:700;color:#1f2d55;background:#fff;
  border:0;border-radius:4px;padding:3px 10px;cursor:pointer;}
.dmg-balloon.cs-tip .cs-tip-ov:hover{background:#E8ECF8;}

/* ==========================================================================
   hdr-v1 (30 Oct 2026): less height above every form.
   1. The breadcrumb row is merged into the tab row (erp.js Tabs.initStrip
      moves it there): the menu path sits after the tabs, before Refresh /
      open tabs / Close all, and gives way first when tabs need the room.
   2. The form head is compact: Transaction / List smaller, the caption in
      the middle so it is not read as a third tab, branch chip and record
      navigation a size smaller.
   ========================================================================== */
.tab-strip-wrap > .breadcrumb.in-tabs{
  height:auto;flex:0 1 auto;min-width:0;max-width:40%;overflow:hidden;white-space:nowrap;
  padding:0 var(--sp-3);background:transparent;border-bottom:0;
  border-inline-start:1px solid var(--clr-border);
}
.tab-strip-wrap > .breadcrumb.in-tabs > span:first-child,
.tab-strip-wrap > .breadcrumb.in-tabs > span:first-child + .sep{display:none;}
.tab-strip-wrap > .breadcrumb.in-tabs .current{overflow:hidden;text-overflow:ellipsis;}
@media (max-width:767px){ .tab-strip-wrap > .breadcrumb.in-tabs{display:none;} }

.form-card > .form-head,
.form-card.is-fill > .form-head{padding-top:4px;padding-bottom:4px;gap:10px;}
.form-head > .tab-strip .tab-btn{padding:4px 14px;font-size:12px;border-bottom-width:2px;}
.form-head > .tab-strip + h1{
  flex:1 1 auto;min-width:0;margin-inline-start:0;text-align:center;
  font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.form-head > .head-field{font-size:11.5px;}
.form-head > .head-field .head-chip{font-size:11.5px;padding:2px 9px;}
.form-head .doc-nav .btn-nav{min-width:26px;height:24px;font-size:14px;}

/* hdr-v2 (ribbon): the form caption as a ribbon just before the branch */
.form-head > .tab-strip + h1{
  flex:0 1 auto;min-width:0;max-width:34%;margin-inline-start:auto;
  position:relative;padding:4px 16px 4px 22px;
  background:var(--clr-primary,#4B49AC);color:#fff;
  font-size:12px;font-weight:700;line-height:1.3;letter-spacing:.2px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  clip-path:polygon(0 0,100% 0,100% 100%,0 100%,9px 50%);       /* swallow-tail notch at the start */
}
[dir="rtl"] .form-head > .tab-strip + h1{
  padding:4px 22px 4px 16px;
  clip-path:polygon(0 0,100% 0,calc(100% - 9px) 50%,100% 100%,0 100%);
}
.form-head > .tab-strip + h1 ~ .head-field{margin-inline-start:0;}
.form-head > .tab-strip + h1 ~ .doc-nav{margin-inline-start:0;}

/* ---- pdc-v1: Cheque Register (Modules/CashBank/ChequeRegister.aspx) ------ */
.chq .chq-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:var(--sp-3);
  font-size:12.5px;color:var(--clr-muted);}
.chq .chq-actions .ctl{width:auto;}
.chq-tbl tr.chq-due > td:nth-child(2){color:#B42318;font-weight:700;}
.chq-tbl td.chq-act{white-space:nowrap;text-align:end;}
.chq-tbl td.chq-act .btn-erp{padding:2px 10px;font-size:12px;}
.chq-tbl td.chq-act .btn-erp + .btn-erp{margin-inline-start:6px;}
.chq-box{width:min(520px,100%);}
.chq-form{padding:14px 18px;display:flex;flex-direction:column;gap:6px;}
.chq-form .chq-what{margin:0 0 6px;font-weight:600;}
.chq-form .chq-reason{height:auto;min-height:60px;resize:vertical;}

/* ==========================================================================
   LOGIN lg-v3 (Web/Login.aspx): the night-indigo sign-in screen.
   The introduction sits on the start side over a faint eight-point lattice,
   the card on the end side; small screens show the card alone with the
   brand above it. Arabic is set in Noto Kufi Arabic (SIL OFL, self-hosted
   in Content/fonts), Latin in Inter. The lg-v2 .login-* rules above are no
   longer used by the page.
   ========================================================================== */
@font-face{font-family:'Noto Kufi Arabic';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/NotoKufiArabic-Regular.woff2') format('woff2');}
@font-face{font-family:'Noto Kufi Arabic';font-style:normal;font-weight:600;font-display:swap;src:url('fonts/NotoKufiArabic-SemiBold.woff2') format('woff2');}
@font-face{font-family:'Noto Kufi Arabic';font-style:normal;font-weight:700;font-display:swap;src:url('fonts/NotoKufiArabic-Bold.woff2') format('woff2');}

.lg{
  --lg-night:#17153F; --lg-ink:#1D1B33; --lg-muted:#6A6886; --lg-line:#E3E2EE; --lg-field:#F6F6FB; --lg-gold:#E2B659;
  --lg-font:'Inter','Segoe UI',system-ui,sans-serif;
  min-height:100vh;position:relative;overflow:hidden;
  display:grid;grid-template-columns:1fr;
  background:var(--lg-night);color:#fff;font-family:var(--lg-font);
}
html[dir=rtl] .lg, .lg :lang(ar){--lg-font:'Noto Kufi Arabic','Inter','Cairo','Segoe UI',sans-serif;}
html[dir=rtl] .lg, .lg input, .lg select, .lg button{font-family:var(--lg-font);}
.lg *,.lg *::before,.lg *::after{box-sizing:border-box;}
.lg ul{list-style:none;margin:0;padding:0;}
.lg h1,.lg h2,.lg p{margin:0;}

.lg-lattice{position:absolute;inset:0;pointer-events:none;
  -webkit-mask-image:radial-gradient(ellipse 70% 80% at 18% 30%,#000 0%,rgba(0,0,0,.55) 45%,transparent 78%);
          mask-image:radial-gradient(ellipse 70% 80% at 18% 30%,#000 0%,rgba(0,0,0,.55) 45%,transparent 78%);}
html[dir=rtl] .lg-lattice{
  -webkit-mask-image:radial-gradient(ellipse 70% 80% at 82% 30%,#000 0%,rgba(0,0,0,.55) 45%,transparent 78%);
          mask-image:radial-gradient(ellipse 70% 80% at 82% 30%,#000 0%,rgba(0,0,0,.55) 45%,transparent 78%);}
.lg-lattice svg{width:100%;height:100%;display:block;max-width:none;}
.lg-glow{position:absolute;pointer-events:none;width:900px;height:900px;border-radius:50%;
  background:radial-gradient(circle,rgba(75,73,172,.55) 0%,rgba(75,73,172,0) 62%);top:-260px;inset-inline-start:-260px;}

/* the mark: the configured logo, or the built-in one */
.lg-mark{width:42px;height:42px;border-radius:12px;flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;
  background:linear-gradient(150deg,#6C6AD0,var(--clr-primary));color:#fff;overflow:hidden;
  box-shadow:0 0 0 1px rgba(255,255,255,.18) inset,0 8px 24px rgba(10,8,40,.45);}
.lg-mark svg{width:24px;height:24px;}
.lg-mark.has-logo{background:#fff;padding:5px;}
.lg-mark.has-logo img{width:100%;height:100%;object-fit:contain;display:block;}
.lg-brand,.lg-top{display:flex;align-items:center;gap:12px;}
.lg-name{font-size:20px;font-weight:700;letter-spacing:-.01em;line-height:1.2;color:#fff;}

/* the introduction */
.lg-intro{display:none;position:relative;z-index:1;}
.lg .lg-head{font-size:46px;line-height:1.08;font-weight:700;letter-spacing:-.025em;max-width:600px;margin:56px 0 18px;color:#fff;}
html[dir=rtl] .lg .lg-head{letter-spacing:0;line-height:1.45;font-size:38px;}
.lg .lg-lead{font-size:17px;line-height:1.55;color:rgba(255,255,255,.72);max-width:460px;}
.lg .lg-facts{margin-top:48px;display:grid;gap:22px;max-width:520px;}
.lg-facts li{display:grid;grid-template-columns:36px 1fr;gap:14px;align-items:start;}
.lg-ico{width:36px;height:36px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;
  background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.12);color:#C9C8F4;}
.lg-ico svg{width:18px;height:18px;}
.lg-facts b{display:block;font-weight:600;font-size:15px;margin-bottom:3px;color:#fff;}
.lg-facts .t{font-size:14px;line-height:1.55;color:rgba(255,255,255,.62);}
html[dir=rtl] .lg-facts .t{line-height:1.8;}
.lg .lg-regions{font-weight:400;display:flex;align-items:center;flex-wrap:wrap;gap:10px;font-size:13px;color:rgba(255,255,255,.55);}
.lg-regions .rg{font-weight:400;}
.lg-regions .rg-sep{width:4px;height:4px;border-radius:50%;background:var(--lg-gold);opacity:.8;}

/* the card */
.lg-main{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:28px 16px 32px;}
.lg-top{margin-bottom:22px;}
.lg-card{width:100%;max-width:440px;background:#fff;color:var(--lg-ink);border-radius:18px;padding:34px 34px 26px;
  box-shadow:0 1px 0 rgba(255,255,255,.5) inset,0 30px 80px -20px rgba(5,3,30,.65),0 12px 24px -12px rgba(5,3,30,.4);
  animation:lg-in .5s cubic-bezier(.2,.7,.2,1) both;}
@keyframes lg-in{from{opacity:0;transform:translateY(14px);}to{opacity:1;transform:none;}}
@media (prefers-reduced-motion:reduce){.lg-card{animation:none;}}
.lg-title{font-size:24px;font-weight:700;letter-spacing:-.015em;color:var(--lg-ink);}
html[dir=rtl] .lg-title{letter-spacing:0;}
.lg .lg-sub{font-size:14px;color:var(--lg-muted);margin-top:4px;}

/* messages (pnlMessage: alert error / success / warn / info) */
.lg-card .alert{margin:18px 0 0;display:flex;gap:10px;align-items:flex-start;padding:10px 12px;border-radius:10px;border:0;
  font-size:13.5px;line-height:1.5;background:#FDEDED;color:#9B1C1C;}
.lg-card .alert svg{width:18px;height:18px;flex:0 0 auto;margin-top:1px;}
.lg-card .alert.success{background:#E7F7EE;color:#0B6B3A;}
.lg-card .alert.warn{background:#FFF4DE;color:#8A5A00;}
.lg-card .alert.info{background:#E6F3FA;color:#0E5F82;}

.lg-form{margin-top:24px;display:grid;gap:16px;}
.lg-row{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.lg-f{min-width:0;margin:0;}
.lg-lbl{display:block;font-size:12.5px;font-weight:600;color:#45435E;margin-bottom:6px;}
.lg-lbl .req{color:var(--clr-danger);margin-inline-start:2px;}
.lg-in{position:relative;}
.lg-in > svg{position:absolute;top:50%;transform:translateY(-50%);inset-inline-start:13px;width:17px;height:17px;color:#8C8AA8;pointer-events:none;}
.lg .lg-ctl{width:100%;height:44px;border:1px solid var(--lg-line);background:var(--lg-field);border-radius:10px;
  padding:0 14px;font-size:14.5px;color:var(--lg-ink);outline:none;box-shadow:none;
  transition:border-color .15s,background-color .15s,box-shadow .15s;}
.lg .lg-in > svg ~ .lg-ctl{padding-inline-start:40px;}
.lg .lg-ctl.lg-pw{padding-inline-end:46px;}
.lg .lg-ctl:hover{border-color:#CFCDE3;}
.lg .lg-ctl:focus{border-color:var(--clr-primary);background:#fff;box-shadow:0 0 0 4px rgba(75,73,172,.14);}
.lg .lg-sel{appearance:none;-webkit-appearance:none;cursor:pointer;padding-inline-end:34px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238C8AA8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 13px center;}
html[dir=rtl] .lg .lg-sel{background-position:left 13px center;}

/* the company picker (ERP.wirePicker: picker-btn / picker-list / picker-item) */
.lg-picker{position:relative;}
.lg-picker .picker-btn{width:100%;min-height:56px;display:flex;align-items:center;gap:12px;text-align:start;cursor:pointer;
  border:1px solid var(--lg-line);background:var(--lg-field);border-radius:12px;padding:8px 14px;color:var(--lg-ink);height:auto;box-shadow:none;
  transition:border-color .15s,box-shadow .15s,background-color .15s;}
.lg-picker .picker-btn:hover{border-color:#CFCDE3;}
.lg-picker .picker-btn:focus-visible{outline:none;border-color:var(--clr-primary);background:#fff;box-shadow:0 0 0 4px rgba(75,73,172,.14);}
.lg-co{width:38px;height:38px;border-radius:9px;flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;background:#EEEDF8;color:var(--clr-primary);}
.lg-co svg{width:19px;height:19px;}
.lg-picker .picker-lines{flex:1;min-width:0;display:grid;gap:1px;}
.lg-picker .picker-code{font-size:14.5px;font-weight:600;color:var(--lg-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.lg-picker .picker-sub{font-size:12.5px;color:var(--lg-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.lg-picker .picker-caret{width:16px;height:16px;flex:0 0 auto;border:0;margin:0;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238C8AA8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat center;}
.lg-picker .picker-list{position:absolute;z-index:20;inset-inline:0;top:calc(100% + 6px);max-height:260px;overflow:auto;
  background:#fff;border:1px solid var(--lg-line);border-radius:12px;padding:6px;box-shadow:0 18px 40px -12px rgba(20,18,60,.35);}
.lg-picker .picker-list[hidden]{display:none;}
.lg-picker .picker-item{width:100%;display:grid;gap:1px;text-align:start;border:0;background:transparent;border-radius:8px;padding:8px 10px;cursor:pointer;color:var(--lg-ink);}
.lg-picker .picker-item:hover,.lg-picker .picker-item:focus-visible{background:#EEEDF8;outline:none;}
.lg-picker .picker-item .picker-sub{white-space:normal;}
.lg-picker.is-static .picker-btn{cursor:default;}
.lg-picker.is-static .picker-btn:hover{border-color:var(--lg-line);}
.lg-picker.is-static .picker-caret{display:none;}

/* password: show / hide, Caps Lock */
.lg-eye{position:absolute;top:50%;transform:translateY(-50%);inset-inline-end:6px;width:34px;height:34px;border:0;border-radius:8px;padding:0;
  background:transparent;color:#8C8AA8;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;}
.lg-eye:hover,.lg-eye[aria-pressed=true]{color:var(--clr-primary);background:#EEEDF8;}
.lg-eye:focus-visible{outline:2px solid var(--clr-primary);outline-offset:1px;}
.lg-eye svg{width:18px;height:18px;}
.lg-caps{display:none;margin-top:6px;font-size:12.5px;color:#9A6400;align-items:center;gap:6px;}
.lg-caps.on{display:flex;}
.lg-caps svg{width:14px;height:14px;}

.lg .lg-btn{margin-top:6px;height:46px;width:100%;border:0;border-radius:11px;cursor:pointer;
  background:linear-gradient(180deg,#5856BF 0%,var(--clr-primary) 100%);color:#fff;font-weight:600;font-size:15px;
  box-shadow:0 1px 0 rgba(255,255,255,.25) inset,0 8px 18px -6px rgba(75,73,172,.6);
  transition:transform .12s,box-shadow .15s,filter .15s;}
.lg .lg-btn:hover{filter:brightness(1.06);box-shadow:0 1px 0 rgba(255,255,255,.25) inset,0 12px 24px -8px rgba(75,73,172,.7);}
.lg .lg-btn:active{transform:translateY(1px);}
.lg .lg-btn:focus-visible{outline:3px solid rgba(75,73,172,.35);outline-offset:2px;}

.lg-foot{margin-top:22px;padding-top:18px;border-top:1px solid var(--lg-line);display:flex;align-items:center;justify-content:space-between;gap:12px;}
.lg-foot .k{font-size:12.5px;color:var(--lg-muted);display:inline-flex;align-items:center;gap:6px;}
.lg-foot .k svg{width:14px;height:14px;}
.lg .lg-lang{display:inline-flex;gap:0;padding:3px;background:var(--lg-field);border:1px solid var(--lg-line);border-radius:9px;}
.lg .lg-lang a{min-width:40px;height:28px;padding:0 10px;border-radius:7px;display:inline-flex;align-items:center;justify-content:center;
  font-size:12.5px;font-weight:600;color:var(--lg-muted);text-decoration:none;border:0;background:transparent;}
.lg .lg-lang a:hover{color:var(--clr-primary);}
.lg .lg-lang a.active{background:#fff;color:var(--clr-primary);box-shadow:0 1px 3px rgba(20,18,60,.12);}
.lg .lg-lang a[lang=ar]{font-family:'Noto Kufi Arabic','Cairo',sans-serif;}
.lg .lg-lang a:focus-visible{outline:2px solid var(--clr-primary);outline-offset:1px;}

/* wide screens: introduction on the start side, the card on the end side */
@media (min-width:1024px){
  .lg{grid-template-columns:minmax(0,1.15fr) minmax(460px,1fr);}
  .lg-intro{display:block;padding:56px 64px 56px 72px;min-height:100vh;}
  html[dir=rtl] .lg-intro{padding:56px 72px 56px 64px;}
  .lg-intro-in{position:relative;min-height:calc(100vh - 112px);display:flex;flex-direction:column;}
  .lg .lg-regions{margin-top:auto;padding-top:40px;}
  .lg-main{padding:48px 56px;}
  .lg-top{display:none;}
}
@media (max-width:480px){
  .lg-card{padding:26px 20px 20px;border-radius:16px;}
  .lg-row{grid-template-columns:1fr;}
}

/* --------------------------------------------------------------------------
   lg-v3a (user, 30 Oct 2026): Branch and Financial Year on their own rows,
   tighter rows, every text in the sign-in card pure black, smooth fonts.
   -------------------------------------------------------------------------- */
.lg{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;}
.lg-card{--lg-ink:#000;padding:28px 30px 20px;}
.lg-title,.lg .lg-sub,.lg-lbl,.lg .lg-ctl,.lg-picker .picker-code,.lg-picker .picker-sub,
.lg-picker .picker-item,.lg-foot .k,.lg .lg-lang a{color:#000;}
.lg .lg-sub{margin-top:2px;}
.lg-card .alert{margin-top:14px;}
.lg-form{margin-top:16px;gap:10px;}
.lg-lbl{margin-bottom:4px;}
.lg .lg-ctl{height:40px;}
.lg-picker .picker-btn{min-height:50px;padding-top:6px;padding-bottom:6px;}
.lg-co{width:34px;height:34px;}
.lg .lg-btn{margin-top:4px;height:44px;}
.lg-foot{margin-top:16px;padding-top:14px;}
@media (max-width:480px){.lg-card{padding:22px 18px 16px;}}

/* --------------------------------------------------------------------------
   lg-v3b (user, 30 Oct 2026): the whole sign-in card visible at any zoom and
   on any device. Sizes follow the window HEIGHT (vh, clamped), the language
   switch sits beside the title, and when the window is still too short the
   page scrolls from the top - nothing is ever cut off above the card.
   -------------------------------------------------------------------------- */
.lg{min-height:100vh;min-height:100dvh;}
.lg-main{justify-content:flex-start;min-height:100vh;min-height:100dvh;padding:clamp(10px,3vh,40px) 16px;}
.lg-card{margin-block:auto;padding:clamp(14px,3vh,28px) clamp(18px,2.2vw,30px);}
.lg-top{margin-bottom:clamp(8px,2vh,22px);}

.lg-cardhead{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;}
.lg-cardtitle{min-width:0;}
.lg-title{font-size:clamp(19px,3vh,24px);line-height:1.2;}
.lg .lg-sub{font-size:13.5px;line-height:1.35;}
.lg-cardhead .lg-lang{flex:0 0 auto;margin-top:2px;}

.lg-card .alert{margin-top:clamp(8px,1.4vh,14px);padding:8px 12px;}
.lg-form{margin-top:clamp(8px,1.6vh,16px);gap:clamp(6px,1.1vh,10px);}
.lg-lbl{margin-bottom:3px;line-height:1.3;}
.lg .lg-ctl{height:clamp(34px,5vh,40px);}
.lg-picker .picker-btn{min-height:clamp(42px,6.2vh,50px);padding-top:4px;padding-bottom:4px;}
.lg-co{width:clamp(30px,4.4vh,34px);height:clamp(30px,4.4vh,34px);}
.lg .lg-btn{margin-top:clamp(2px,.6vh,6px);height:clamp(36px,5.4vh,44px);}
.lg .lg-eye{width:30px;height:30px;}

/* the introduction shrinks with the window too */
@media (min-width:1024px){
  .lg-intro{min-height:100vh;min-height:100dvh;padding-top:clamp(20px,6vh,56px);padding-bottom:clamp(20px,6vh,56px);}
  .lg-intro-in{min-height:calc(100dvh - 2 * clamp(20px,6vh,56px));}
  .lg .lg-head{font-size:clamp(28px,5.4vh,46px);margin:clamp(18px,6vh,56px) 0 clamp(8px,2vh,18px);}
  html[dir=rtl] .lg .lg-head{font-size:clamp(26px,4.6vh,38px);}
  .lg .lg-lead{font-size:clamp(14px,2vh,17px);}
  .lg-facts{margin-top:clamp(14px,5vh,48px);gap:clamp(10px,2.4vh,22px);}
  .lg-main{padding-inline:clamp(24px,4vw,56px);}
}
/* short windows (a laptop at 125-150 %): drop what is only decoration */
@media (max-height:620px){
  .lg .lg-sub{display:none;}
  .lg-facts .t{display:none;}
}
@media (max-height:520px){
  .lg-facts{display:none;}
  .lg-top{display:none;}
}
/* very short windows (175 % and more): labels beside their boxes */
@media (max-height:460px) and (min-width:360px){
  .lg-form .lg-f{display:grid;grid-template-columns:minmax(84px,30%) minmax(0,1fr);align-items:center;column-gap:10px;}
  .lg-form .lg-lbl{margin:0;}
  .lg-form .lg-caps{grid-column:2;}
}
@media (max-width:480px){
  .lg-card{padding:clamp(14px,2.6vh,22px) 16px;}
  .lg-cardhead .lg-lang a{min-width:34px;padding:0 8px;}
}
/* Noto Kufi's lines are taller than Inter's: Arabic gets tighter line heights,
   and the introduction never makes the page taller than the window */
html[dir=rtl] .lg-lbl{line-height:1.15;}
html[dir=rtl] .lg-title{line-height:1.15;}
html[dir=rtl] .lg-card .alert{line-height:1.3;padding-top:6px;padding-bottom:6px;}
html[dir=rtl] .lg .lg-ctl, html[dir=rtl] .lg-picker .picker-btn{line-height:1.2;}
@media (min-width:1024px){
  .lg-intro{max-height:100vh;max-height:100dvh;overflow:hidden;}
}
@media (min-width:1024px) and (max-height:760px){
  html[dir=rtl] .lg-facts .t{display:none;}
}
@media (max-height:560px){
  .lg-form{gap:5px;}
  .lg-card .alert{margin-top:6px;}
}
/* 200 % zoom on a laptop (about 320px of window): the smallest usable sizes */
@media (max-height:400px){
  .lg-main{padding-top:6px;padding-bottom:6px;}
  .lg-card{padding:10px 16px;border-radius:12px;}
  .lg-title{font-size:17px;}
  .lg-form{margin-top:6px;gap:4px;}
  .lg .lg-ctl{height:30px;font-size:13.5px;}
  .lg-picker .picker-btn{min-height:36px;padding-top:2px;padding-bottom:2px;}
  .lg-co{display:none;}
  .lg .lg-btn{height:32px;margin-top:2px;}
  .lg-card .alert{padding:4px 10px;font-size:12.5px;}
  .lg .lg-lang a{height:24px;}
}

/* ==========================================================================
   cp-v2 (30 Oct 2026): Change Password - one centred card. In a shell tab
   (cp-tab) it sits on the page surface; on the first-time change after
   sign-in (cp-first) the page wears the sign-in screen's night background.
   ========================================================================== */
body.cp-body{margin:0;background:var(--clr-surface-alt,#F6F7FB);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;}
body.cp-body.in-tab{overflow:auto;}
.cp-page{min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;
  padding:clamp(12px,4vh,48px) 16px;box-sizing:border-box;font-family:var(--font-ui,var(--font));}
.cp-card{margin-block:auto;width:100%;max-width:440px;background:var(--clr-surface,#fff);color:var(--clr-text,#000);
  border:1px solid var(--clr-border,#E8EAF0);border-radius:16px;padding:clamp(18px,3.4vh,30px) clamp(18px,3vw,30px) clamp(16px,3vh,26px);
  box-shadow:0 1px 2px rgba(20,18,60,.04),0 18px 40px -18px rgba(20,18,60,.22);box-sizing:border-box;}

.cp-top{display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;margin-bottom:clamp(12px,2.4vh,20px);}
.cp-ico{width:52px;height:52px;border-radius:15px;display:inline-flex;align-items:center;justify-content:center;
  background:var(--clr-primary-soft,#EEEDF8);color:var(--clr-primary,#4B49AC);}
.cp-ico svg{width:26px;height:26px;}
.cp-title{margin:4px 0 0;font-size:clamp(19px,2.8vh,22px);line-height:1.25;font-weight:700;letter-spacing:-.01em;color:var(--clr-text,#000);}
html[dir=rtl] .cp-title{letter-spacing:0;}
.cp-user{display:inline-flex;align-items:center;gap:6px;max-width:100%;padding:4px 12px;border-radius:999px;
  background:var(--clr-surface-alt,#FAFBFD);border:1px solid var(--clr-border,#E8EAF0);font-size:12.5px;font-weight:500;color:var(--clr-muted,#6C7293);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.cp-user svg{width:14px;height:14px;flex:0 0 auto;}

.cp-card .cp-alert{margin:0 0 14px;padding:10px 12px;border-radius:10px;font-size:13px;line-height:1.5;}

.cp-form{display:grid;gap:clamp(10px,1.8vh,14px);}
.cp-lbl{display:block;font-size:12.5px;font-weight:600;color:var(--clr-label,#000);margin-bottom:5px;}
.cp-lbl .req{color:var(--clr-danger);margin-inline-start:2px;}
.cp-in{position:relative;}
.cp-in > svg{position:absolute;top:50%;transform:translateY(-50%);inset-inline-start:13px;width:17px;height:17px;color:var(--clr-muted,#8C8AA8);pointer-events:none;}
.cp-ctl{width:100%;height:clamp(38px,5.4vh,42px);box-sizing:border-box;border:1px solid var(--clr-border-strong,#D3D7E3);border-radius:10px;
  background:var(--clr-surface,#fff);color:var(--clr-text,#000);font:inherit;font-size:14.5px;
  padding-inline:40px 44px;outline:none;transition:border-color .15s,box-shadow .15s;}
.cp-ctl:hover{border-color:var(--clr-muted,#9EA3BF);}
.cp-ctl:focus{border-color:var(--clr-primary);box-shadow:0 0 0 4px rgba(75,73,172,.14);}
.cp-eye{position:absolute;top:50%;transform:translateY(-50%);inset-inline-end:6px;width:32px;height:32px;border:0;border-radius:8px;
  background:transparent;color:var(--clr-muted,#8C8AA8);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;}
.cp-eye:hover,.cp-eye[aria-pressed=true]{color:var(--clr-primary);background:var(--clr-primary-soft,#EEEDF8);}
.cp-eye:focus-visible{outline:2px solid var(--clr-primary);outline-offset:1px;}
.cp-eye svg{width:18px;height:18px;}
.cp-sep{height:1px;background:var(--clr-border,#E8EAF0);margin:2px 0;}
.cp-hint{display:flex;align-items:flex-start;gap:6px;margin-top:6px;font-size:12.5px;line-height:1.45;color:var(--clr-muted,#6C7293);}
.cp-hint svg{width:14px;height:14px;flex:0 0 auto;margin-top:2px;}
.cp-caps{display:none;align-items:center;gap:6px;font-size:12.5px;color:#9A6400;margin-top:-4px;}
.cp-caps.on{display:flex;}
.cp-caps svg{width:14px;height:14px;}

.cp-card .cp-btn{width:100%;height:clamp(40px,5.6vh,44px);margin-top:4px;border-radius:10px;font-size:15px;font-weight:600;}
.cp-link{justify-self:center;border:0;background:transparent;color:var(--clr-muted,#6C7293);font:inherit;font-size:13px;
  padding:6px 10px;border-radius:8px;cursor:pointer;text-decoration:underline;text-underline-offset:3px;}
.cp-link:hover{color:var(--clr-danger);}

/* first-time change: the sign-in screen's night background */
body.cp-first{background:#17153F;}
body.cp-first .cp-page{background:radial-gradient(900px 700px at 15% -10%,rgba(75,73,172,.55),rgba(75,73,172,0) 62%),
  radial-gradient(700px 600px at 110% 110%,rgba(75,73,172,.35),rgba(75,73,172,0) 60%),#17153F;}
body.cp-first .cp-card{border-color:transparent;box-shadow:0 30px 80px -20px rgba(5,3,30,.65),0 12px 24px -12px rgba(5,3,30,.4);}

@media (max-width:480px){.cp-card{border-radius:14px;}}

/* cp-v2: short windows - the whole card stays on screen */
@media (max-height:760px){
  .cp-ico{width:42px;height:42px;border-radius:12px;}
  .cp-ico svg{width:22px;height:22px;}
  .cp-top{gap:6px;margin-bottom:12px;}
  .cp-form{gap:10px;}
  .cp-card .cp-alert{margin-bottom:10px;padding:8px 12px;}
}
@media (max-height:640px){
  .cp-ico{display:none;}
  .cp-title{margin-top:0;}
  .cp-sep{display:none;}
  .cp-lbl{margin-bottom:3px;}
  .cp-ctl{height:36px;}
  .cp-card .cp-btn{height:38px;}
  .cp-hint{margin-top:4px;}
}
/* inside a shell tab on a small laptop or at 125-200 % zoom */
@media (max-height:580px){
  .cp-page{padding-top:8px;padding-bottom:8px;}
  .cp-card{padding:14px 20px;}
  .cp-top{flex-direction:row;justify-content:space-between;gap:10px;margin-bottom:10px;}
  .cp-title{font-size:18px;}
  .cp-form{gap:6px;}
  .cp-ctl{height:34px;font-size:14px;}
  .cp-card .cp-btn{height:36px;margin-top:2px;}
  .cp-card .cp-alert{margin-bottom:8px;padding:6px 10px;font-size:12.5px;}
}
@media (max-height:480px) and (min-width:400px){
  .cp-f{display:grid;grid-template-columns:minmax(110px,34%) minmax(0,1fr);align-items:center;column-gap:10px;}
  .cp-f .cp-lbl{margin:0;}
  .cp-f .cp-hint{grid-column:2;}
  .cp-link{padding:2px 8px;}
}
@media (max-height:400px){
  .cp-hint{display:none;}
  .cp-user{display:none;}
}

/* ==========================================================================
   ih-v1 (30 Oct 2026): Item Sales & Purchase History - the screen
   (Modules/Inventory/ItemHistory.aspx) and its F8 window (erp-itemhist.js).
   ========================================================================== */
/* the window over the current screen */
.ihx-scrim{position:fixed;inset:0;z-index:4000;background:rgba(15,17,40,.46);display:flex;align-items:center;justify-content:center;
  padding:clamp(8px,3vh,32px) clamp(8px,3vw,32px);box-sizing:border-box;animation:ihx-in .14s ease-out both;}
@keyframes ihx-in{from{opacity:0;}to{opacity:1;}}
@media (prefers-reduced-motion:reduce){.ihx-scrim{animation:none;}}
.ihx-win{width:min(1240px,100%);height:min(820px,100%);background:var(--clr-surface,#fff);border-radius:14px;overflow:hidden;
  box-shadow:0 30px 80px -20px rgba(10,8,40,.55),0 0 0 1px rgba(20,18,60,.08);display:flex;}
.ihx-frame{flex:1 1 auto;width:100%;height:100%;border:0;display:block;background:var(--clr-surface,#fff);}

/* the screen */
body.ih-page{margin:0;background:var(--clr-bg,#fff);}
.ih-ovbar{display:none;}
body.ih-overlay .ih-ovbar{display:flex;align-items:center;gap:10px;position:sticky;top:0;z-index:5;padding:10px 16px;
  background:var(--clr-surface,#fff);border-bottom:1px solid var(--clr-border,#E8EAF0);}
.ih-ovtitle{font-size:16px;font-weight:700;color:var(--clr-text,#000);}
.ih-ovkey{font-size:11px;font-weight:600;padding:2px 7px;border-radius:6px;border:1px solid var(--clr-border-strong,#D3D7E3);color:var(--clr-muted,#6C7293);}
.ih-ovclose{margin-inline-start:auto;width:32px;height:32px;border:0;border-radius:8px;background:transparent;font-size:22px;line-height:1;
  color:var(--clr-muted,#6C7293);cursor:pointer;}
.ih-ovclose:hover{background:var(--clr-primary-soft,#EEEDF8);color:var(--clr-primary,#4B49AC);}
.ih-ovclose:focus-visible{outline:2px solid var(--clr-primary);outline-offset:1px;}

.tb-wrap.ih .tb-fld.ih-item{min-width:220px;}
.tb-wrap.ih .tb-fld.ih-party{min-width:180px;}
.tb-wrap.ih .tb-ro{min-height:1.2em;font-size:12px;color:var(--clr-muted,#6C7293);padding:3px 2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:260px;}
.ih-kpis{margin-top:4px;}
.tb-wrap.ih .tb-head{align-items:flex-start;}
.ih-kpis .bp-kpi i{display:block;font-style:normal;font-size:11.5px;color:var(--clr-muted,#6C7293);margin-top:2px;}
.ih-note{font-size:12.5px;color:#8A5A00;background:#FFF7E6;border:1px solid #F5DDA8;border-radius:8px;padding:6px 10px;margin:0 0 10px;}
.ih-empty{padding:40px 22px;font-size:14px;}

.ih-tbl td.nowrap{white-space:nowrap;}
.ih-tbl .ih-sub{display:block;font-size:11.5px;color:var(--clr-muted,#6C7293);}
.ih-chip{display:inline-block;padding:1px 8px;border-radius:999px;font-size:11.5px;font-weight:600;white-space:nowrap;}
.ih-chip.ih-s{background:#E6F6EE;color:#0B6B3A;}
.ih-chip.ih-sr{background:#FFF1E0;color:#9A5200;}
.ih-chip.ih-p{background:#E8F1FD;color:#1E4FA3;}
.ih-chip.ih-pr{background:#F1E9FB;color:#5B2E9C;}
.ih-tbl tr.ih-sr td.r:nth-child(5), .ih-tbl tr.ih-pr td.r:nth-child(5){color:#B42318;}
.ih-pager{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:10px 0 4px;font-size:12.5px;color:var(--clr-muted,#6C7293);}
.ih-pg{display:flex;gap:6px;}
.ih-tbl .ih-hid{color:var(--clr-muted,#9EA3BF);}

/* ==========================================================================
   DARK THEME (dt-v1, 30 Oct 2026). Light is untouched: everything below
   applies only under html[data-theme=dark], set by Content/js/erp-theme.js
   (device dark mode, or the sun/moon button). Part 1 is GENERATED from the
   rules above (every colour mapped to its dark counterpart) - regenerate it
   when colours above change; part 2 is hand-tuned and wins over part 1.
   ========================================================================== */
/* ---- part 1: generated ---- */
html[data-theme=dark]{--clr-bg:#1A1B23;--clr-surface:#1A1B23;--clr-surface-alt:#1C1D25;--clr-text:#EFF1FD;--clr-label:#EFF1FD;--clr-muted:#ABB1D5;--clr-border:#34353E;--clr-border-strong:#3C4152;--clr-primary:#4B49AC;--clr-primary-dark:#3F3D92;--clr-primary-soft:#292638;--clr-success:#0FBF61;--clr-warning:#FFAA00;--clr-danger:#DE3B3B;--clr-info:#1F9BCF}
html[data-theme=dark] .ctl:hover{border-color:#44495A}
html[data-theme=dark] .ctl:disabled{background:#1F2129}
html[data-theme=dark] .btn-erp.primary{color:#FFFFFF}
html[data-theme=dark] .btn-erp.success{color:#FFFFFF}
html[data-theme=dark] .btn-erp.success:hover:not(:disabled){background:#0CA652}
html[data-theme=dark] .btn-erp.danger{color:#FFFFFF}
html[data-theme=dark] .btn-erp.danger:hover:not(:disabled){background:#C42F2F}
html[data-theme=dark] .btn-erp.neutral{background:#1A1B23}
html[data-theme=dark] .btn-erp.neutral:hover:not(:disabled){border-color:#44495A}
html[data-theme=dark] .alert.error{background:#362222;border-color:#683F40;color:#FEA59C}
html[data-theme=dark] .alert.warn{background:#2D2413;border-color:#423002;color:#E0B471}
html[data-theme=dark] .alert.info{background:#162A34;border-color:#0D3E4F;color:#82C8EA}
html[data-theme=dark] .alert.success{background:#182C23;border-color:#05442C;color:#7FD29A}
@media (min-width:1024px){html[data-theme=dark] .aside-mark{color:#FFFFFF}}
@media (min-width:1024px){html[data-theme=dark] .aside-wordmark{color:#FFFFFF}}
html[data-theme=dark] .picker-btn:hover{border-color:#44495A}
html[data-theme=dark] .icon-btn .badge{color:#FFFFFF}
html[data-theme=dark] .avatar{color:#FFFFFF}
html[data-theme=dark] .dropdown{background:#1A1B23}
html[data-theme=dark] .app.is-icons-only .nav-item.is-flyout-open > .nav-link, html[data-theme=dark] .app.is-icons-only .nav-item.is-flyout-open > .nav-toggle{color:#FFFFFF}
html[data-theme=dark] .app.is-icons-only .nav-item.is-flyout-open > .nav-link .nav-icon, html[data-theme=dark] .app.is-icons-only .nav-item.is-flyout-open > .nav-toggle .nav-icon{color:#FFFFFF}
html[data-theme=dark] .welcome{background:radial-gradient(1200px 600px at 50% -20%, #1F2028 0%, transparent 62%),
    var(--clr-surface-alt)}
html[data-theme=dark] .welcome-mark{background:linear-gradient(140deg, var(--clr-primary) 0%, #6D6BC9 100%);color:#FFFFFF}
html[data-theme=dark] .soon{background:radial-gradient(900px 500px at 50% -10%, #1F2028 0%, transparent 60%),
    var(--clr-surface-alt)}
html[data-theme=dark] .soon-badge{background:#2D2413;border:1px solid #423002;color:#E0B471}
html[data-theme=dark] .k-tile.is-empty{--k1:#232D3D;--k2:#2B3545;--k3:#3D4451}
html[data-theme=dark] .k-teal{--k1:#5FE0C4;--k2:#12A08A;--k3:#0A5F53}
html[data-theme=dark] .k-indigo{--k1:#A3B0FF;--k2:#4C5FD7;--k3:#2A3480}
html[data-theme=dark] .k-amber{--k1:#483205;--k2:#E2911D;--k3:#96560A}
html[data-theme=dark] .k-rose{--k1:#FF9DAE;--k2:#D94A68;--k3:#8C233C}
html[data-theme=dark] .k-violet{--k1:#D0B4FF;--k2:#8B5CD6;--k3:#51308A}
html[data-theme=dark] .k-emerald{--k1:#89E9AE;--k2:#22A35F;--k3:#0F6236}
html[data-theme=dark] .k-sky{--k1:#8AD5FA;--k2:#2189CD;--k3:#0C4E7D}
html[data-theme=dark] .k-bronze{--k1:#EBC29B;--k2:#A97A52;--k3:#644127}
html[data-theme=dark] tr.mx-folder td{background:#21222B}
html[data-theme=dark] tr.mx-folder td.mx-menu{background:#21222B}
html[data-theme=dark] .tri.allow{background:#182C23;border-color:#05442C;color:#7FD29A}
html[data-theme=dark] .tri.deny{background:#362222;border-color:#683F40;color:#FEA59C}
html[data-theme=dark] .tri-chip.allow{background:#05442C;border-color:#05442C}
html[data-theme=dark] .tri-chip.deny{background:#F5C2C2;border-color:#683F40}
html[data-theme=dark] .qa-card{background-image:linear-gradient(180deg,#1A1B23 0%,#1C1D26 100%)}
html[data-theme=dark] .qa-icon{color:#FFFFFF;--t-hi:#7B79D6;--t-mid:#4B49AC;--t-lo:#39377F}
html[data-theme=dark] .qa-icon.has-img{background-image:linear-gradient(180deg,#1A1B23 0%,#202129 50%,#272B3C 100%)}
html[data-theme=dark] .t-blue{--t-hi:#5BA8E8;--t-mid:#2C7BC4;--t-lo:#1D5C97}
html[data-theme=dark] .t-green{--t-hi:#7BC96F;--t-mid:#4A9C3E;--t-lo:#35762C}
html[data-theme=dark] .t-amber{--t-hi:#F5C25B;--t-mid:#D99A21;--t-lo:#A97516}
html[data-theme=dark] .t-orange{--t-hi:#F59B5B;--t-mid:#D96F21;--t-lo:#A85317}
html[data-theme=dark] .t-red{--t-hi:#E87B7B;--t-mid:#C43C3C;--t-lo:#962B2B}
html[data-theme=dark] .t-violet{--t-hi:#A88BE0;--t-mid:#7A56C4;--t-lo:#5B3E96}
html[data-theme=dark] .t-teal{--t-hi:#5BD1C4;--t-mid:#21A396;--t-lo:#177A70}
html[data-theme=dark] .t-cyan{--t-hi:#5BBFE8;--t-mid:#2196C4;--t-lo:#177297}
html[data-theme=dark] .t-pink{--t-hi:#E88BC0;--t-mid:#C4568F;--t-lo:#96406C}
html[data-theme=dark] .t-slate{--t-hi:#53596B;--t-mid:#5C6580;--t-lo:#888EA2}
html[data-theme=dark] .icon-opt-tile{color:#FFFFFF;background-image:linear-gradient(180deg,#53596B 0%,#5C6580 50%,#888EA2 100%)}
html[data-theme=dark] .qa-row-icon{color:#FFFFFF;--t-hi:#7B79D6;--t-mid:#4B49AC;--t-lo:#39377F}
html[data-theme=dark] .qa-row-icon.has-img{background-image:linear-gradient(180deg,#1A1B23 0%,#202129 50%,#272B3C 100%)}
html[data-theme=dark] .qa-remove:hover{background:#362222}
html[data-theme=dark] tr.fy-current td{background:#1D1E27}
html[data-theme=dark] tr.fy-current:hover td{background:#182C23}
html[data-theme=dark] .zatca-status.green{background:#182C23;border-color:#05442C;color:#7FD29A}
html[data-theme=dark] .zatca-status.amber{background:#2D2413;border-color:#423002;color:#E0B471}
html[data-theme=dark] .zatca-status.red{background:#362222;border-color:#683F40;color:#FEA59C}
html[data-theme=dark] .modal-note{background:#162A34;border:1px solid #0D3E4F;color:#82C8EA}
html[data-theme=dark] .toast{background:#1A1B23}
html[data-theme=dark] .tab-btn.active{color:#FFFFFF}
html[data-theme=dark] mark.hl{background:#362F00}
html[data-theme=dark] .ios-switch .track{background:#2F3647}
html[data-theme=dark] .ios-switch .track::before{background:#1A1B23}
html[data-theme=dark] .ios-switch input:checked + .track{background:var(--clr-primary,#2B3A67)}
html[data-theme=dark] .tab-btn.active{color:#FFFFFF}
html[data-theme=dark] mark.hl{background:#362F00}
html[data-theme=dark] .ios-switch .track{background:#2F3647}
html[data-theme=dark] .ios-switch .track::before{background:#1A1B23}
html[data-theme=dark] .ios-switch input:checked + .track{background:var(--clr-primary,#2B3A67)}
html[data-theme=dark] .tab-btn.active{color:#FFFFFF}
html[data-theme=dark] mark.hl{background:#362F00}
html[data-theme=dark] .ios-switch .track{background:#2F3647}
html[data-theme=dark] .ios-switch .track::before{background:#1A1B23}
html[data-theme=dark] .ios-switch input:checked + .track{background:var(--clr-primary,#2B3A67)}
html[data-theme=dark] .tab-btn.active{color:#FFFFFF}
html[data-theme=dark] mark.hl{background:#362F00}
html[data-theme=dark] .ios-switch .track{background:#2F3647}
html[data-theme=dark] .ios-switch .track::before{background:#1A1B23}
html[data-theme=dark] .ios-switch input:checked + .track{background:var(--clr-primary,#2B3A67)}
html[data-theme=dark] .alloc-count{background:#1A1B23}
html[data-theme=dark] .alloc-count{background:#1A1B23}
html[data-theme=dark] .txn-grid tfoot td{background:#1D2D3A;color:#9CC8FD;border-top:1px solid #344F69;border-right:1px solid #354351}
html[data-theme=dark] .txn-grid tfoot .si-target input{border:1px solid #404959;background:#1B1C24;color:#ABB7CA}
html[data-theme=dark] .txn-grid tfoot .si-target input:focus{border-color:#2B3A67;background:#1A1B23}
html[data-theme=dark] .txn-grid tfoot .si-target-msg.ok{color:#78CD9B}
html[data-theme=dark] .txn-grid tfoot .si-target-msg.bad{color:#FA9686}
html[data-theme=dark] .txn-grid tfoot .ok{color:#71CEA9}
html[data-theme=dark] .txn-grid tfoot .bad{color:#FE998D}
html[data-theme=dark] .txn-grid thead th .grid-toggle{color:#FFFFFF}
html[data-theme=dark] .txn-grid thead th{color:#FFFFFF}
html[data-theme=dark] .txn-grid .lx:hover{color:var(--clr-danger,#FF998B)}
html[data-theme=dark] .txn-grid tr.is-off .gi::placeholder{color:#D6DFEB}
html[data-theme=dark] .btn-nav{background:#1A1B23}
html[data-theme=dark] .tab-btn.active{color:#FFFFFF}
html[data-theme=dark] .list-grid thead th{color:#FFFFFF}
html[data-theme=dark] .list-grid .la.lpdf{color:var(--clr-danger,#FF998B)}
html[data-theme=dark] .erp-modal-box, html[data-theme=dark] .pin-modal-box, html[data-theme=dark] .pm-box{background:#1A1B23}
html[data-theme=dark] .erp-modal-head, html[data-theme=dark] .pin-modal-head, html[data-theme=dark] .pm-head{border-bottom:1px solid var(--clr-border,#35363F);color:#B6D3F4}
html[data-theme=dark] .erp-modal-head button, html[data-theme=dark] .pin-modal-head button, html[data-theme=dark] .pm-head button{color:#93A0B1}
html[data-theme=dark] .erp-modal-head button:hover, html[data-theme=dark] .pin-modal-head button:hover, html[data-theme=dark] .pm-head button:hover{color:#B6D3F4}
html[data-theme=dark] .erp-modal-tools, html[data-theme=dark] .pm-tools{background:#1D1E26;border-bottom:1px solid #31323B}
html[data-theme=dark] .erp-modal-foot, html[data-theme=dark] .pm-foot{border-top:1px solid var(--clr-border,#35363F);background:#1A1B23}
html[data-theme=dark] .erp-modal-count, html[data-theme=dark] .pm-count{color:#939FB1}
html[data-theme=dark] .erp-filter, html[data-theme=dark] .pm-filter{border:1px solid #384453;background:#1A1B23}
html[data-theme=dark] .erp-filter:focus, html[data-theme=dark] .pm-filter:focus{border-color:var(--clr-primary,#1D4ED8)}
html[data-theme=dark] .erp-chk, html[data-theme=dark] .pm-chk{color:#97A4B6}
html[data-theme=dark] .erp-hint, html[data-theme=dark] .pm-hint{color:#93A0B1}
html[data-theme=dark] table.erp-tbl, html[data-theme=dark] table.pin-tbl, html[data-theme=dark] table.pm-tbl{background:#1A1B23}
html[data-theme=dark] table.erp-tbl th, html[data-theme=dark] table.pin-tbl th, html[data-theme=dark] table.pm-tbl th{background:#1F2029;color:#939FB1;border-bottom:1px solid #353F4E}
html[data-theme=dark] table.erp-tbl td, html[data-theme=dark] table.pin-tbl td, html[data-theme=dark] table.pm-tbl td{color:#ABB7CA;border-bottom:1px solid #30313A}
html[data-theme=dark] table.erp-tbl tbody tr:hover, html[data-theme=dark] table.pin-tbl tbody tr:hover, html[data-theme=dark] table.pm-tbl  tbody tr.pm-item:hover{background:#1E1F27}
html[data-theme=dark] table.erp-tbl tbody tr.is-sel, html[data-theme=dark] table.pm-tbl  tbody tr.pm-item.on{background:#212838}
html[data-theme=dark] table.erp-tbl tbody tr.is-cur, html[data-theme=dark] table.pm-tbl  tbody tr.pm-item.cur{background:#1F2737}
html[data-theme=dark] table.erp-tbl tr.erp-grp td, html[data-theme=dark] table.pm-tbl tr.pm-grp td{background:#1D1E26;color:#B6D3F4;border-top:1px solid #353F4E;border-bottom:1px solid #353F4E}
html[data-theme=dark] table.erp-tbl tr.erp-grp:hover td, html[data-theme=dark] table.pm-tbl tr.pm-grp:hover td{background:#21222A}
html[data-theme=dark] table.erp-tbl tr.erp-grp .sub, html[data-theme=dark] table.pm-tbl tr.pm-grp .sub{color:#A4B6CF}
html[data-theme=dark] table.erp-tbl tr.erp-grp .rem, html[data-theme=dark] table.pm-tbl tr.pm-grp .rem{color:#97A4B6}
html[data-theme=dark] .erp-empty, html[data-theme=dark] .pin-empty, html[data-theme=dark] .pm-empty{color:var(--clr-muted,#979FAD)}
html[data-theme=dark] .erp-pick-btn, html[data-theme=dark] .pin-pick-btn{border:1px solid #384453;background:#1D1E26;color:#939FB1}
html[data-theme=dark] .erp-pick-btn:hover, html[data-theme=dark] .pin-pick-btn:hover{background:#21222A;color:#B6D3F4}
html[data-theme=dark] table.grid tr.grid-total td, html[data-theme=dark] tr.grid-total td{background:#1F2029;color:#B6D3F4;border-top:2px solid #384453}
html[data-theme=dark] table.grid tr.grid-total.is-diff td, html[data-theme=dark] tr.grid-total.is-diff td{background:#342021;color:#FE998D}
html[data-theme=dark] .sl-expand{border:1px solid #384453;background:#1D1E26;color:#97A4B6}
html[data-theme=dark] .sl-expand:hover{background:#202A3A;border-color:#495565}
html[data-theme=dark] tr.sl-child td{background:#1D1E26;border-bottom:1px solid #35363F;color:#97A4B6}
html[data-theme=dark] tr.sl-child .sl-code{color:#B6D3F4}
html[data-theme=dark] tr.sl-child .sl-type{color:#A4B6CF}
html[data-theme=dark] tr.sl-child .sl-problem{color:#FE998D}
html[data-theme=dark] .tp-panel{background:#1A1B23}
html[data-theme=dark] .tp-head{background:#2D4661;color:#FFFFFF}
html[data-theme=dark] .tp-head button{color:#FFFFFF}
html[data-theme=dark] .tp-hint{color:var(--clr-muted,#979FAD)}
html[data-theme=dark] .tp-foot{border-top:1px solid #35363F}
html[data-theme=dark] .party-more{color:var(--clr-primary,#9ABAFC)}
html[data-theme=dark] .pf-sec{color:var(--clr-primary,#9ABAFC);border-bottom:1px solid var(--clr-border,#35363F)}
html[data-theme=dark] .pf-k{color:var(--clr-muted,#979FAD)}
html[data-theme=dark] .pf-v{border:1px solid #384453;background:#1A1B23}
html[data-theme=dark] .pf-v[readonly]{background:#1D1E26;color:#A4B6CF}
html[data-theme=dark] .pf-v.ro{color:#ABB7CA;border-bottom:1px dotted #384453}
html[data-theme=dark] .tb-fld label{color:var(--clr-muted,#979FAD)}
html[data-theme=dark] .tb-fld input[type=date], html[data-theme=dark] .tb-fld select{border:1px solid #384453}
html[data-theme=dark] .tb-fld select{background:#1A1B23}
html[data-theme=dark] .rp-rail{border:1px solid #425E79;background:linear-gradient(to bottom,#1B1C24 0,#1C2937 45%,#202E3C 50%,#1C2A38 100%)}
html[data-theme=dark] .rp-rail:hover{background:linear-gradient(to bottom,#1B1C24 0,#3A2E01 45%,#403200 50%,#382C00 100%);border-color:#6D521B}
html[data-theme=dark] .rp-rail-txt{color:#A3C5FC}
html[data-theme=dark] .rp-fly{border:1px solid #425E79;background:linear-gradient(to bottom,#1D1E26 0,#1E2A39 100%)}
html[data-theme=dark] .rp-fly-head{color:#A3C5FC;background:linear-gradient(to bottom,#1C2937 0,#23303F 100%);border-bottom:1px solid #3E556B}
html[data-theme=dark] .rp-fly a{color:#A3C5FC;border-bottom:1px solid #303D4B}
html[data-theme=dark] .rp-fly a:hover{background:linear-gradient(to bottom,#1B1C24 0,#3D2F00 48%,#443403 52%,#382C00 100%);color:#E7B275}
html[data-theme=dark] .rp-fly a.on{color:#B6D3F4;background:linear-gradient(to bottom,#1A1B23 0,#1F2D3B 100%);border-left:3px solid #6D521B}
html[data-theme=dark] .tb-rh{border-bottom:2px solid #0F2740}
html[data-theme=dark] .tb-rh .ttl{color:#B6D3F4}
html[data-theme=dark] .tb-rh .as{color:#A4B6CF}
html[data-theme=dark] .tb-note{color:#A4B6CF}
html[data-theme=dark] .pl-card{border:1px solid var(--clr-border,#35363F);background:#1A1B23}
html[data-theme=dark] .pl-card h3{background:#1F2029;color:#97A4B6}
html[data-theme=dark] .pl-row{border-top:1px solid #30313A}
html[data-theme=dark] .pl-row b{color:#B6D3F4}
html[data-theme=dark] .pl-row .age{color:#FD955A}
html[data-theme=dark] .pl-st.PENDING{background:#392425;color:#FCA49A}
html[data-theme=dark] .pl-st.PARTIAL{background:#372D02;color:#FEA275}
html[data-theme=dark] .pl-st.COMPLETE{background:#123622;color:#88D29B}
html[data-theme=dark] .pl-bar{background:#262730}
html[data-theme=dark] .pl-bar i{background:#2563EB}
html[data-theme=dark] table.pl-tbl{background:#1A1B23}
html[data-theme=dark] table.pl-tbl th{background:#2D4661;color:#FFFFFF}
html[data-theme=dark] table.pl-tbl td{color:#ABB7CA;border-bottom:1px solid #31323B;border-inline-end:1px solid #31323B}
html[data-theme=dark] table.pl-tbl{border:1px solid #353F4E}
html[data-theme=dark] table.pl-tbl tbody tr:hover{background:#1D1E26}
html[data-theme=dark] .pl-stage{color:#B6D3F4;background:#21222A}
html[data-theme=dark] .pl-empty{color:var(--clr-muted,#979FAD);border:1px solid var(--clr-border,#35363F);background:#1A1B23}
@media (max-width: 900px){html[data-theme=dark] .rp-rail{border:1px solid #425E79}}
@media (max-width: 900px){html[data-theme=dark] .rp-fly{border:1px solid #425E79}}
@media (hover: none){html[data-theme=dark] .rp-rail:hover{background:linear-gradient(to bottom,#1B1C24 0,#1C2937 45%,#202E3C 50%,#1C2A38 100%);border-color:#425E79}}
html[data-theme=dark] .tb-ro{border-bottom:1px dotted #384453;color:#ABB7CA}
html[data-theme=dark] .sl-name{color:#ABB7CA}
html[data-theme=dark] .sl-name-ar{color:#A4B6CF}
html[data-theme=dark] .sl-off{background:#392425;color:#FCA49A}
html[data-theme=dark] body.embedded{background:#1A1B23}
html[data-theme=dark] body.embedded .form-actions{background:#1A1B23;border-top:1px solid var(--clr-border,#35363F)}
html[data-theme=dark] .nav-icon.icon-home, html[data-theme=dark] .nav-icon.icon-grid{background:linear-gradient(145deg,#8FA4CC 0%,#5069A0 55%,#3D5487 100%)}
html[data-theme=dark] .nav-icon.icon-currency, html[data-theme=dark] .nav-icon.icon-file-text{background:linear-gradient(145deg,#7FD8B4 0%,#3F9F7C 55%,#2C7359 100%)}
html[data-theme=dark] .nav-icon.icon-briefcase{background:linear-gradient(145deg,#E0A878 0%,#BC7F47 55%,#94602F 100%)}
html[data-theme=dark] .nav-icon.icon-users, html[data-theme=dark] .nav-icon.icon-group, html[data-theme=dark] .nav-icon.icon-user{background:linear-gradient(145deg,#A9A3E0 0%,#7A72C2 55%,#5B539D 100%)}
html[data-theme=dark] .nav-icon.icon-inventory, html[data-theme=dark] .nav-icon.icon-box, html[data-theme=dark] .nav-icon.icon-warehouse, html[data-theme=dark] .nav-icon.icon-item{background:linear-gradient(145deg,#7CC2EA 0%,#4791C4 55%,#2F6F9C 100%)}
html[data-theme=dark] .nav-icon.icon-cart, html[data-theme=dark] .nav-icon.icon-truck{background:linear-gradient(145deg,#F0C67E 0%,#CC9440 55%,#A3722B 100%)}
html[data-theme=dark] .nav-icon.icon-pie, html[data-theme=dark] .nav-icon.icon-trending, html[data-theme=dark] .nav-icon.icon-activity, html[data-theme=dark] .nav-icon.icon-list{background:linear-gradient(145deg,#C4A3E2 0%,#9370C2 55%,#71539C 100%)}
html[data-theme=dark] .nav-icon.icon-settings, html[data-theme=dark] .nav-icon.icon-shield, html[data-theme=dark] .nav-icon.icon-lock{background:linear-gradient(145deg,#313D4C 0%,#5A6470 55%,#6F7986 100%)}
html[data-theme=dark] .nav-icon.icon-clock, html[data-theme=dark] .nav-icon.icon-calendar{background:linear-gradient(145deg,#95C9C6 0%,#549A96 55%,#3C7673 100%)}
html[data-theme=dark] .nav-icon.icon-category, html[data-theme=dark] .nav-icon.icon-manufacturer, html[data-theme=dark] .nav-icon.icon-uom{background:linear-gradient(145deg,#9DC9B7 0%,#5F9D86 55%,#457A67 100%)}
html[data-theme=dark] .nav-icon.icon-map-pin{background:linear-gradient(145deg,#EDA3A3 0%,#C86C6C 55%,#A04E4E 100%)}
html[data-theme=dark] .nav-icon.icon-search{background:linear-gradient(145deg,#3A4655 0%,#6F8199 55%,#707E8E 100%)}
html[data-theme=dark] .nav-icon.icon-log-in{background:linear-gradient(145deg,#8FBFE0 0%,#548BB8 55%,#3D6B91 100%)}
html[data-theme=dark] .nav-icon.icon-alert, html[data-theme=dark] .nav-icon.icon-bin{background:linear-gradient(145deg,#F0A5A0 0%,#CF6B64 55%,#A84A44 100%)}
html[data-theme=dark] .nav-icon.icon-order, html[data-theme=dark] .nav-icon.icon-receipt, html[data-theme=dark] .nav-icon.icon-invoice, html[data-theme=dark] .nav-icon.icon-invoice-in{background:linear-gradient(145deg,#F0C67E 0%,#CC9440 55%,#A3722B 100%)}
html[data-theme=dark] .nav-icon.icon-goods-return, html[data-theme=dark] .nav-icon.icon-purchase-return{background:linear-gradient(145deg,#EDA88F 0%,#C9714F 55%,#9E5539 100%)}
html[data-theme=dark] .nav-icon.icon-landed-cost{background:linear-gradient(145deg,#D3B58A 0%,#A8834F 55%,#856539 100%)}
html[data-theme=dark] .nav-icon.icon-payment, html[data-theme=dark] .nav-icon.icon-payment-rpt, html[data-theme=dark] .nav-icon.icon-receive, html[data-theme=dark] .nav-icon.icon-balance, html[data-theme=dark] .nav-icon.icon-statement{background:linear-gradient(145deg,#7FD8B4 0%,#3F9F7C 55%,#2C7359 100%)}
html[data-theme=dark] .nav-icon.icon-aging{background:linear-gradient(145deg,#F0B98F 0%,#CF8452 55%,#A5643A 100%)}
html[data-theme=dark] .nav-icon.icon-pipeline, html[data-theme=dark] .nav-icon.icon-register, html[data-theme=dark] .nav-icon.icon-trace{background:linear-gradient(145deg,#C4A3E2 0%,#9370C2 55%,#71539C 100%)}
html[data-theme=dark] .nav-icon.icon-supplier, html[data-theme=dark] .nav-icon.icon-branch, html[data-theme=dark] .nav-icon.icon-account{background:linear-gradient(145deg,#A9A3E0 0%,#7A72C2 55%,#5B539D 100%)}
html[data-theme=dark] .nav-icon.icon-transfer, html[data-theme=dark] .nav-icon.icon-adjust{background:linear-gradient(145deg,#7CC2EA 0%,#4791C4 55%,#2F6F9C 100%)}
html[data-theme=dark] .nav-icon.icon-damage{background:linear-gradient(145deg,#F0A5A0 0%,#CF6B64 55%,#A84A44 100%)}
html[data-theme=dark] .nav-icon.icon-transfer-in, html[data-theme=dark] .nav-icon.icon-transfer-out, html[data-theme=dark] .nav-icon.icon-stock-branch{background:linear-gradient(145deg,#7CC2EA 0%,#4791C4 55%,#2F6F9C 100%)}
html[data-theme=dark] .nav-icon.icon-movement, html[data-theme=dark] .nav-icon.icon-valuation, html[data-theme=dark] .nav-icon.icon-summary{background:linear-gradient(145deg,#C4A3E2 0%,#9370C2 55%,#71539C 100%)}
html[data-theme=dark] .nav-icon.icon-alert-stock{background:linear-gradient(145deg,#F0A5A0 0%,#CF6B64 55%,#A84A44 100%)}
html[data-theme=dark] .nav-icon.icon-terms, html[data-theme=dark] .nav-icon.icon-doc-type, html[data-theme=dark] .nav-icon.icon-tools{background:linear-gradient(145deg,#313D4C 0%,#5A6470 55%,#6F7986 100%)}
html[data-theme=dark] .pl-tbl tr.is-return td{color:#FD968C;background:#1E1F27}
html[data-theme=dark] .pl-tbl td.sb-debit{color:#71CEA9}
html[data-theme=dark] .tro-lock{background:#1F2737;border:1px solid #2E547C;border-left:4px solid #2563EB;color:#9EC2FD}
html[data-theme=dark] .tro-lock.warn{background:#2F2313;border-color:#6C4517;border-left-color:#EA580C;color:#FDA186}
html[data-theme=dark] #ostBody.grid-locked .gi{background:#1F2029 !important;color:#A4B6CF !important}
html[data-theme=dark] .tp-note{color:var(--clr-muted,#979FAD)}
html[data-theme=dark] .party-more{color:var(--clr-primary,#9ABAFC)}
html[data-theme=dark] .pd-k{color:var(--clr-muted,#979FAD)}
html[data-theme=dark] .pd-v{color:#ABB7CA}
html[data-theme=dark] .txn-foot .grand{color:var(--clr-text,#B6D3F4)}
html[data-theme=dark] .hint{color:var(--clr-muted,#979FAD)}
html[data-theme=dark] .list-grid td.conv-done .lhide:hover{color:var(--clr-danger,#FA9686)}
html[data-theme=dark] .pay-grid th{color:var(--clr-muted,#979FAD);background:var(--clr-surface-alt,#1D1E26);border-bottom:1px solid var(--clr-border,#35363F)}
html[data-theme=dark] .pay-grid td{border-bottom:1px solid var(--clr-border-soft,#30313A)}
html[data-theme=dark] .pay-grid .gi:disabled{background:var(--clr-surface-alt,#1D1E26);color:var(--clr-muted,#989FAB)}
html[data-theme=dark] .pay-grid .lx{color:var(--clr-muted,#989FAB)}
html[data-theme=dark] .pay-grid .lx:hover{color:var(--clr-danger,#FA9686)}
html[data-theme=dark] .pay-sum span{color:var(--clr-muted,#979FAD)}
html[data-theme=dark] .pay-sum b{color:var(--clr-text,#ABB7CA)}
html[data-theme=dark] .pay-note.ok{color:var(--clr-success,#70CF87)}
html[data-theme=dark] .pay-note.short{color:var(--clr-warn,#FD955A)}
html[data-theme=dark] .pay-note.over{color:var(--clr-danger,#FA9686)}
html[data-theme=dark] .txn-grid td.bal{color:var(--clr-muted,#979FAD);background:var(--clr-surface-alt,#1D1E26)}
html[data-theme=dark] .qt-done{color:var(--clr-success,#70CF87)}
html[data-theme=dark] .pm-tbl td.dq, html[data-theme=dark] .pm-tbl td.iq{color:var(--clr-muted,#979FAD)}
html[data-theme=dark] .org-tag{background:var(--clr-surface-2,#1F2029);color:var(--clr-muted,#979FAD);border:1px solid var(--clr-border,#323E4D)}
html[data-theme=dark] .org-tag.delivery{background:#1B2836;color:#9ABAFC;border-color:#223656}
html[data-theme=dark] .org-tag.mixed{background:#2F2313;color:#FE9371;border-color:#4C2E01}
html[data-theme=dark] .org-dlv{color:var(--clr-muted,#979FAD)}
html[data-theme=dark] .pp-balance .pb-lbl{color:var(--muted,#979FAD)}
html[data-theme=dark] .pp-balance .pb-adv{color:var(--warn,#FD955A)}
html[data-theme=dark] .pp-balance .pb-net{color:var(--accent,#9ABAFC)}
html[data-theme=dark] .pp-balance .pb-err{color:var(--danger,#FE998D)}
html[data-theme=dark] .tabpane{background:var(--surface,#1A1B23)}
html[data-theme=dark] #tabTxn{background:var(--surface,#1A1B23)}
html[data-theme=dark] #tabList{background:var(--surface-alt,#1D1E26);border:1px solid var(--line,#35363F)}
html[data-theme=dark] .tab-strip .tab-btn[data-tab="list"].active{background:var(--surface-alt,#1D1E26)}
html[data-theme=dark] .erp-tbl td.pk-owes{color:var(--accent,#9ABAFC)}
html[data-theme=dark] .erp-tbl td.pk-clear{color:var(--muted,#989FAB)}
html[data-theme=dark] .list-grid td.pl-err{color:var(--danger,#FE998D)}
html[data-theme=dark] .pg tfoot td{border-top:2px solid var(--line,#35363F)}
html[data-theme=dark] .pg tfoot td.pf-lbl{color:var(--muted,#979FAD)}
html[data-theme=dark] .pg tfoot td.pf-out{color:var(--accent,#9ABAFC)}
html[data-theme=dark] .pg tfoot td.pf-alloc{color:var(--ok,#71CEA9)}
html[data-theme=dark] .pg tfoot td.pf-diff{color:var(--danger,#FE998D)}
html[data-theme=dark] .pv-cust-receipt .tab-btn{background:#1D1E26;color:#85D0A0}
html[data-theme=dark] .pv-cust-payment .tab-btn{background:#1D1E27;color:#FBA39A}
html[data-theme=dark] .pv-supp-payment .tab-btn{background:#1D1E27;color:#C5B4FC}
html[data-theme=dark] .pv-supp-receipt .tab-btn{background:#1D1E26;color:#8AC5F3}
html[data-theme=dark] .pv-cust-receipt .tab-btn.active{background:#1F3228;color:#97D5A8;border-bottom:3px solid #2F9E5F}
html[data-theme=dark] .pv-cust-payment .tab-btn.active{background:#3D2827;color:#FCABA3;border-bottom:3px solid #C0453F}
html[data-theme=dark] .pv-supp-payment .tab-btn.active{background:#3A2E4C;color:#C7BAFA;border-bottom:3px solid #7C56C9}
html[data-theme=dark] .pv-supp-receipt .tab-btn.active{background:#1C2F3A;color:#92CBF6;border-bottom:3px solid #2F80B8}
html[data-theme=dark] .list-grid .lo-doc{background:#222637;color:#B4BEFE}
html[data-theme=dark] .list-grid .lo-vch{background:#1F2029;color:#939FB1}
html[data-theme=dark] .pp-ro{border-bottom:1px dotted #384453}
html[data-theme=dark] .pp-pick-btn{border:1px solid #384453;background:#1D1E26;color:#939FB1}
html[data-theme=dark] .pp-pick-btn:hover{background:#21222A}
html[data-theme=dark] .pp-empty{color:var(--clr-muted,#979FAD)}
html[data-theme=dark] .pp-foot{background:#1D1E26;border-top:1px solid #353F4E}
html[data-theme=dark] .pp-foot b{color:#B6D3F4}
html[data-theme=dark] .pp-foot .adv b{color:#FD955A}
html[data-theme=dark] .pp-foot .over b{color:#FE998D}
html[data-theme=dark] .pp-note{color:#939FB1;background:#1D1E26;border:1px solid #35363F}
html[data-theme=dark] .pick-panel{background:#1A1B23;border:1px solid var(--line,#3E4656)}
html[data-theme=dark] .pick-panel .pick-tbl th{background:#2B3A67;color:#FFFFFF;border-right:1px solid #46567F}
html[data-theme=dark] .pick-panel .pick-tbl td{border-bottom:1px solid #32333C;color:#ABB7CA}
html[data-theme=dark] .pick-panel .pick-tbl td.mono{color:#949FB2}
html[data-theme=dark] .pick-panel .pick-kind{color:#B8A6FD}
html[data-theme=dark] .pick-panel .pick-row.sel td{background:#252D3E}
html[data-theme=dark] .pick-panel .pick-empty{color:var(--muted,#979FAD)}
html[data-theme=dark] .field.is-off .ctl{background:var(--surface-alt,#1D1E26)}
html[data-theme=dark] .st-DRAFT{background:#22232B;color:#949FAF}
html[data-theme=dark] .st-CALCULATED{background:#1F2938;color:#9ABAFC}
html[data-theme=dark] .st-REVIEWED{background:#2E2514;color:#FD955A}
html[data-theme=dark] .st-APPROVED{background:#192C22;color:#88D29B}
html[data-theme=dark] .st-POSTED{background:#132D2A;color:#73CAC1}
html[data-theme=dark] .st-PAID{background:#132D2A;color:#73CAC1}
html[data-theme=dark] .st-REVERSED{background:#372223;color:#FE998D}
html[data-theme=dark] .kpi{border:1px solid var(--clr-border,#373C4D);background:var(--clr-surface-alt,#1C1D25)}
html[data-theme=dark] .kpi-label{color:var(--clr-muted,#ABB1D5)}
html[data-theme=dark] .var-flag{background:#2B2512}
html[data-theme=dark] .var-new{background:#1F2737}
html[data-theme=dark] .chg-up{color:#88D29B}
html[data-theme=dark] .chg-down{color:#FE998D}
html[data-theme=dark] .why{color:var(--clr-muted,#ABB1D5)}
html[data-theme=dark] .row-open:hover{background:var(--clr-surface-alt,#1F2028)}
html[data-theme=dark] .pay-modal-box{background:var(--clr-surface,#1A1B23)}
html[data-theme=dark] .pay-modal-head{border-bottom:1px solid var(--clr-border,#373C4D);background:var(--clr-surface-alt,#1C1D25)}
html[data-theme=dark] .pmh-label{color:var(--clr-muted,#ABB1D5)}
html[data-theme=dark] .pay-modal-close{color:var(--clr-muted,#ABB1D5)}
html[data-theme=dark] .pay-modal-close:hover{color:var(--clr-text,#ABB7CA)}
html[data-theme=dark] .st-REQUESTED{background:#22232B;color:#949FAF}
html[data-theme=dark] .st-APPROVED{background:#1F2938;color:#9ABAFC}
html[data-theme=dark] .st-PAID{background:#192C22;color:#88D29B}
html[data-theme=dark] .st-RECOVERING{background:#2E2514;color:#FD955A}
html[data-theme=dark] .st-CLEARED{background:#132D2A;color:#73CAC1}
html[data-theme=dark] .st-CANCELLED{background:#372223;color:#FE998D}
html[data-theme=dark] .adv-kpi div{border:1px solid var(--clr-border,#373C4D);background:var(--clr-surface-alt,#1C1D25)}
html[data-theme=dark] .adv-kpi .k{color:var(--clr-muted,#ABB1D5)}
html[data-theme=dark] .why{color:var(--clr-muted,#ABB1D5)}
html[data-theme=dark] .row-open:hover{background:var(--clr-surface-alt,#1F2028)}
html[data-theme=dark] .inst-done{color:var(--clr-muted,#ABB1D5)}
html[data-theme=dark] .inst-part{background:#2B2512}
html[data-theme=dark] .pay-modal-box{background:var(--clr-surface,#1A1B23)}
html[data-theme=dark] .pay-modal-head{border-bottom:1px solid var(--clr-border,#373C4D);background:var(--clr-surface-alt,#1C1D25)}
html[data-theme=dark] .why{color:var(--clr-muted,#ABB1D5)}
html[data-theme=dark] .row-open:hover{background:var(--clr-surface-alt,#1F2028)}
html[data-theme=dark] .cov div{border:1px solid var(--clr-border,#373C4D);background:var(--clr-surface-alt,#1C1D25)}
html[data-theme=dark] .cov .y{color:var(--clr-muted,#ABB1D5)}
html[data-theme=dark] .cov .none{border-color:#522D2E;background:#1E1F27}
html[data-theme=dark] .cov .none .n{color:#FE998D}
html[data-theme=dark] .lock-tag{background:#22232B;color:#949FAF}
html[data-theme=dark] .paid-no{color:#FD955A}
html[data-theme=dark] .pay-modal-box{background:var(--clr-surface,#1A1B23)}
html[data-theme=dark] .pay-modal-head{border-bottom:1px solid var(--clr-border,#373C4D);background:var(--clr-surface-alt,#1C1D25)}
html[data-theme=dark] .why{color:var(--clr-muted,#ABB1D5)}
html[data-theme=dark] .row-open:hover{background:var(--clr-surface-alt,#1F2028)}
html[data-theme=dark] .st-REQUESTED{background:#22232B;color:#949FAF}
html[data-theme=dark] .st-APPROVED{background:#1F2938;color:#9ABAFC}
html[data-theme=dark] .st-APPLIED{background:#192C22;color:#88D29B}
html[data-theme=dark] .st-CANCELLED{background:#372223;color:#FE998D}
html[data-theme=dark] .up{color:#88D29B}
html[data-theme=dark] .down{color:#FE998D}
html[data-theme=dark] .changed{background:#2B2512}
html[data-theme=dark] .cur .f{border:1px solid var(--clr-border,#373C4D);background:var(--clr-surface-alt,#1C1D25)}
html[data-theme=dark] .cur .k{color:var(--clr-muted,#ABB1D5)}
html[data-theme=dark] .pay-modal-box{background:var(--clr-surface,#1A1B23)}
html[data-theme=dark] .pay-modal-head{border-bottom:1px solid var(--clr-border,#373C4D);background:var(--clr-surface-alt,#1C1D25)}
html[data-theme=dark] .why{color:var(--clr-muted,#ABB1D5)}
html[data-theme=dark] .row-open:hover{background:var(--clr-surface-alt,#1F2028)}
html[data-theme=dark] .st-ABSENT{color:#FE998D}
html[data-theme=dark] .st-LEAVE, html[data-theme=dark] .st-LEAVE_UNPAID{color:#FD955A}
html[data-theme=dark] .st-WEEKEND, html[data-theme=dark] .st-HOLIDAY{color:var(--clr-muted,#ABB1D5)}
html[data-theme=dark] .manual{background:#2B2512}
html[data-theme=dark] .locked{background:#1F2028;color:var(--clr-muted,#ABB1D5)}
html[data-theme=dark] .tag{background:#22232B;color:#949FAF}
html[data-theme=dark] .pay-modal-box{background:var(--clr-surface,#1A1B23)}
html[data-theme=dark] .pay-modal-head{border-bottom:1px solid var(--clr-border,#373C4D);background:var(--clr-surface-alt,#1C1D25)}
html[data-theme=dark] .emp-find-clear{color:var(--clr-muted,#ABB1D5)}
html[data-theme=dark] .emp-find-clear:hover{background:var(--clr-border,#25262E);color:var(--clr-danger,#FB8B82)}
html[data-theme=dark] .emp-find-btn{border:1px solid var(--clr-border-strong,#3C4152);background:var(--clr-surface-alt,#1D1E26);color:var(--clr-muted,#939FB1)}
html[data-theme=dark] .emp-find-btn:hover{background:var(--clr-border,#21222A);color:var(--clr-text,#B6D3F4);border-color:#44495A}
html[data-theme=dark] .emp-find-name{color:var(--clr-text,#B6D3F4)}
html[data-theme=dark] .emp-find-name.bad{color:var(--clr-danger,#FB8B82)}
html[data-theme=dark] .emp-find-name.none{color:var(--clr-muted,#ABB1D5)}
html[data-theme=dark] .emp-find-left{background:#2E2514;color:#FD955A}
html[data-theme=dark] .emp-row-code{color:var(--clr-primary,#AFB6FD)}
html[data-theme=dark] .emp-row-sub{color:var(--clr-muted,#ABB1D5)}
html[data-theme=dark] .erp-tbl tbody tr.emp-left td{background:#2C2312}
html[data-theme=dark] .erp-tbl tbody tr.emp-left .emp-row-code{color:#FD955A}
html[data-theme=dark] .emp-more{color:var(--clr-muted,#ABB1D5);background:var(--clr-surface-alt,#1D1E26);border-top:1px solid var(--clr-border,#34353E)}
html[data-theme=dark] .erp-rings i:nth-child(1){border-top-color:var(--clr-primary,#4B49AC);border-right-color:var(--clr-primary,#4B49AC)}
html[data-theme=dark] .erp-rings i:nth-child(2){border-top-color:var(--clr-accent,#7978E9);border-left-color:var(--clr-accent,#7978E9)}
html[data-theme=dark] .erp-rings i:nth-child(3){border-top-color:var(--clr-info,#016770)}
html[data-theme=dark] .erp-loading-text{color:var(--clr-muted,#ABB1D5)}
html[data-theme=dark] .erp-loading-slow{color:var(--clr-muted,#ABB1D5)}
html[data-theme=dark] .txn-foot .si-target input{border:1px solid #404959;background:#1B1C24;color:#ABB7CA}
html[data-theme=dark] .txn-foot .si-target input:focus{border-color:#2B3A67;background:#1A1B23}
html[data-theme=dark] .txn-foot .si-target-msg.ok{color:#78CD9B}
html[data-theme=dark] .txn-foot .si-target-msg.bad{color:#FA9686}
html[data-theme=dark] .txn-foot .si-target input{border:1px solid #404959;background:#1B1C24;color:#ABB7CA}
html[data-theme=dark] .txn-foot .si-target input:focus{border-color:#2B3A67;background:#1A1B23}
html[data-theme=dark] .txn-foot .si-target-msg.ok{color:#78CD9B}
html[data-theme=dark] .txn-foot .si-target-msg.bad{color:#FA9686}
@media (max-width: 640px){html[data-theme=dark] .txn-foot .si-target{border-top:1px solid #323E4D}}
html[data-theme=dark] .txn-foot .si-target input{border:1px solid #404959;background:#1B1C24;color:#ABB7CA}
html[data-theme=dark] .txn-foot .si-target input:focus{border-color:#2B3A67;background:#1A1B23}
html[data-theme=dark] .txn-foot .si-target-msg.ok{color:#78CD9B}
html[data-theme=dark] .txn-foot .si-target-msg.bad{color:#FA9686}
@media (max-width: 640px){html[data-theme=dark] .txn-foot .si-target{border-top:1px solid #323E4D}}
html[data-theme=dark] .txn-foot .si-target input{border:1px solid #404959;background:#1B1C24;color:#ABB7CA}
html[data-theme=dark] .txn-foot .si-target input:focus{border-color:#2B3A67;background:#1A1B23}
html[data-theme=dark] .txn-foot .si-target-msg.ok{color:#78CD9B}
html[data-theme=dark] .txn-foot .si-target-msg.bad{color:#FA9686}
@media (max-width: 640px){html[data-theme=dark] .txn-foot .si-target{border-top:1px solid #323E4D}}
html[data-theme=dark] .txn-grid td.disc-cell .rd-note{color:#93A0B1}
html[data-theme=dark] #profitModal tr.pf-loss td{background:#1E1F27;color:#FD968C}
html[data-theme=dark] #profitModal tfoot td{border-top:2px solid #384453;background:#1F2029;color:#B6D3F4}
html[data-theme=dark] #profitModal tfoot tr.pf-loss td{background:#35211E;color:#FBA298}
html[data-theme=dark] #profitModal .pf-amt.neg{color:#FA9686}
html[data-theme=dark] #profitModal tfoot .pf-amt.neg{color:#FEA59C}
html[data-theme=dark] .tab-strip .tab-btn[data-tab="list"].active{background:#1D1E26;color:#ABB7CA;border:1px solid #384453;border-bottom:3px solid var(--clr-primary, #4B49AC)}
html[data-theme=dark] .tab-strip .tab-btn[data-tab="txn"].active{border:1px solid var(--clr-primary, #4B49AC);border-bottom:3px solid var(--clr-primary, #4B49AC)}
html[data-theme=dark] .tab-strip .tab-btn:not(.active){color:#939FB1;border:1px solid #323E4D}
html[data-theme=dark] .tab-strip .tab-btn:not(.active):hover{color:var(--clr-primary, #AFB6FD);border-color:#384453}
@media (hover: none){html[data-theme=dark] .tab-strip .tab-btn:not(.active):hover{color:#939FB1;border-color:#323E4D}}
html[data-theme=dark] #profitModal .erp-modal-count.pf-warn{color:#FD955A}
html[data-theme=dark] .ask-text{color:#ABB7CA}
html[data-theme=dark] .pb-card{background:#1A1B23}
html[data-theme=dark] .pb-card .t{color:#979FAD}
html[data-theme=dark] .pb-col{background:#1D1E26}
html[data-theme=dark] .pb-col.pb-closed{background:#1F2028}
html[data-theme=dark] .pb-colhead .ct{background:#1A1B23}
html[data-theme=dark] .pb-colhead .amt{color:#979FAD}
html[data-theme=dark] .pb-colhead .mv{color:#979FAD}
html[data-theme=dark] .pb-deal{background:#1A1B23}
html[data-theme=dark] .pb-av{color:#FFFFFF}
html[data-theme=dark] .pb-deal .ti{color:#979FAD}
html[data-theme=dark] .pb-deal .dt{color:#979FAD}
html[data-theme=dark] .pb-col.pb-over{background:#222637}
html[data-theme=dark] .pb-col.pb-no{outline:2px dashed #B3261E}
html[data-theme=dark] .pb-drop{background:#1A1B23}
html[data-theme=dark] .pb-hint{color:#979FAD}
html[data-theme=dark] .at-panel{background:#1A1B23}
html[data-theme=dark] .at-cell:hover{background:#222637}
html[data-theme=dark] .at-caret:not(.at-leaf)::before{border-color:transparent transparent transparent #636A78}
html[data-theme=dark] .at-code{color:#A8B3F8}
html[data-theme=dark] [dir="rtl"] .at-caret:not(.at-leaf)::before{border-color:transparent #636A78 transparent transparent}
html[data-theme=dark] .at-cell.at-ledger{color:#989FAB}
html[data-theme=dark] .at-cell.at-ledger .at-code{color:#989FAB}
html[data-theme=dark] .at-cell.at-control .at-code{color:#FF998B}
html[data-theme=dark] .at-tag{color:#FF998B;border:1px solid #B3261E}
html[data-theme=dark]{--grid-head-bg:linear-gradient(#1B1C24,#1E2C3A);--grid-head-ink:#A3C5FC;--grid-head-line:#3C546D;--grid-line:#364351;--grid-row-alt:#1E1F28;--grid-row-hover:#1B2937;--grid-foot-bg:#1C1D26;--grid-foot-ink:#EFF1FD;--grid-foot-rule:#4A7FC1;--grid-focus-line:#3D6088;--grid-frame-line:#364351}
html[data-theme=dark] :is(.desk-grid, html[data-theme=dark] body) .txn-grid-wrap, html[data-theme=dark] :is(.desk-grid, html[data-theme=dark] body) .list-wrap, html[data-theme=dark] :is(.desk-grid, html[data-theme=dark] body) .txn-grid-wrap.shadow{background:#1A1B23}
html[data-theme=dark] :is(.desk-grid, html[data-theme=dark] body) .txn-grid td input:focus, html[data-theme=dark] :is(.desk-grid, html[data-theme=dark] body) .txn-grid td select:focus{background:#1A1B23}
html[data-theme=dark] :is(.desk-grid, html[data-theme=dark] body) .txn-grid thead th .grid-toggle{background:#1A1B23}
html[data-theme=dark] .desk-grid #tabList, html[data-theme=dark] .desk-grid #tabList .section-card{background:#1A1B23}
html[data-theme=dark] .desk-grid .card, html[data-theme=dark] .desk-grid .form-card{background:#1A1B23}
html[data-theme=dark] .desk-grid .pay-grid th, html[data-theme=dark] .desk-grid .pf-grid th{background:linear-gradient(#1B1C24,#1E2C3A);color:#A3C5FC;border:1px solid #3C546D}
html[data-theme=dark] .desk-grid .pay-grid td, html[data-theme=dark] .desk-grid .pf-grid td{border:1px solid #364351}
html[data-theme=dark] .desk-grid .pay-grid tbody tr:nth-child(even) td{background:#1E1F28}
html[data-theme=dark] .desk-grid .pay-grid tbody tr:hover td{background:#1B2937}
html[data-theme=dark] .desk-grid .pay-grid td input:focus, html[data-theme=dark] .desk-grid .pf-grid td input:focus, html[data-theme=dark] .desk-grid .pay-grid td select:focus, html[data-theme=dark] .desk-grid .pf-grid td select:focus{border:1px solid #3D6088;background:#1A1B23}
html[data-theme=dark] .rnd-lbl{color:#B0C4E1}
html[data-theme=dark] .rnd-actual{color:#A3C5FC}
html[data-theme=dark] .rnd-diff-row{border-top:1px dashed #364351}
html[data-theme=dark] .rnd-diff{color:#A6B8D5}
html[data-theme=dark] .rnd-diff.neg{color:#FF998B}
html[data-theme=dark] .rnd-diff.pos{color:#72D08E}
html[data-theme=dark] .rnd-foot{border-top:1px solid #303D4B;background:#1D1E26}
html[data-theme=dark] .rnd-plain{border:1px solid #3E4958;background:#1A1B23}
html[data-theme=dark] .rnd-plain:hover{background:#202129}
html[data-theme=dark] .si-round-btn:disabled{background:linear-gradient(#1E1F28,#1F2B3A)}
html[data-theme=dark] .si-round-btn{color:#A3C5FC;background:linear-gradient(#1A1B23,#1E2C3A 45%,#213951);border:1px solid #3C546D}
html[data-theme=dark] .si-round-btn:hover{background:linear-gradient(#1A1B23,#1B2A37 45%,#212F3D)}
html[data-theme=dark] .pf-find{border:1px solid #7F9DB9;background:#1E2A39;color:#A3C5FC}
html[data-theme=dark] .pf-find:hover{background:#202D3B}
html[data-theme=dark] .dp-host{border:1px solid #364351}
html[data-theme=dark] #dpModal .pin-tbl tbody tr:hover td{background:#24303F}
html[data-theme=dark] .pay-grid{border:1px solid #3C546D}
html[data-theme=dark] .pay-grid th{background:linear-gradient(#1B1C24,#1E2C3A);color:#A3C5FC;border-bottom:1px solid #3C546D;border-inline-end:1px solid #364351}
html[data-theme=dark] .pay-grid td{border-bottom:1px solid #303C4B;border-inline-end:1px solid #2F3A49;background:#1A1B23}
html[data-theme=dark] .pay-grid tbody tr:hover td{background:#1E1F28}
html[data-theme=dark] .pay-grid .lx{color:#FE9788}
html[data-theme=dark] .pay-grid .lx:hover{color:#FDAA9D}
html[data-theme=dark] .pay-sum span{background:#1E1F27;border:1px solid #364351;color:#93B5E3}
html[data-theme=dark] .pay-sum b{color:#BCD0EE}
html[data-theme=dark] .pay-sum .grand{background:linear-gradient(#1D2B1D,#212F21);border-color:#395A3A}
html[data-theme=dark] .pay-sum .grand b{color:#87D383}
html[data-theme=dark] .pay-sum .grand.due{background:linear-gradient(#35211E,#3C2724);border-color:#6F4841}
html[data-theme=dark] .pay-sum .grand.due b{color:#FE9788}
html[data-theme=dark] #payNote{color:#90A8C7}
html[data-theme=dark] #peBox{border:1px solid #3C546D;background:#1A1B23}
html[data-theme=dark] .pe-hint{color:#93B5E3}
html[data-theme=dark] .pe-ok{color:#87D383}
html[data-theme=dark] .pe-err{color:#FE9788}
html[data-theme=dark] #peModal .pe-hint{background:#1E1F27;border:1px solid #364351;border-inline-start:3px solid #15428B;color:#9FC0EB}
html[data-theme=dark] #peBox:focus{border-color:#15428B}
html[data-theme=dark] .pe-prog-track{background:#1E2A39;border:1px solid #3C546D}
html[data-theme=dark] .pe-prog-fill{background:linear-gradient(#5B8FD4,#2F66B3)}
html[data-theme=dark] .pe-prog-lbl{color:#93B5E3}
html[data-theme=dark] .pe-ok{background:#1D2B1D;border:1px solid #395A3A;color:#87D383}
html[data-theme=dark] .pe-err{background:#35211E;border:1px solid #6F4841;color:#FE9788}
html[data-theme=dark] .zs-intro{background:#1E1F27;border:1px solid #364351;border-inline-start:3px solid #15428B;color:#9FC0EB}
html[data-theme=dark] .zs-sec{border:1px solid #333E4D;background:#1B1C24}
html[data-theme=dark] .zs-legend{background:#1B1C24;color:#A3C5FC}
html[data-theme=dark] .zs-grid label > span{color:#93B5E3}
html[data-theme=dark] .zs-grid label em, html[data-theme=dark] .zs-req em{color:#FE9788}
html[data-theme=dark] .zs-grid .ctl{border:1px solid #3C546D}
html[data-theme=dark] .zs-grid .ctl:focus{border-color:#2F66B3}
html[data-theme=dark] .zs-grid .ctl::placeholder{color:#CFE0F4}
html[data-theme=dark] .zs-req{color:#90A8C7}
html[data-theme=dark] .zx-errbox{background:#1A1B23;border:1px solid #6F4841}
html[data-theme=dark] .zx-errbox-head{background:linear-gradient(#1E1F27,#3A2521);border-bottom:1px solid #6F4841;color:#FE9788}
html[data-theme=dark] .zx-errbox-head button{color:#FE9788}
html[data-theme=dark] .zx-errbox textarea{color:#F0B7AF;background:#1C1D25}
html[data-theme=dark] .zx-errbox-foot{border-top:1px solid #4D3935}
html[data-theme=dark] .cf-toast{background:#2E2313;border:1px solid #634A16;border-inline-start:4px solid #B8860B;color:#DABA7F}
html[data-theme=dark] .k-delta.up{background:#172D25;color:#7ACFA4}
html[data-theme=dark] .k-delta.dn{background:#372226;color:#FC9BA2}
html[data-theme=dark] .k-delta.flat{background:#21232B}
html[data-theme=dark] .dx-grid{stroke:#21232B}
html[data-theme=dark] .dx-track{background:#21232B}
html[data-theme=dark] .dx-ok{background:#172D25;color:#7ACFA4}
html[data-theme=dark] .dx-warn{background:#382B09;color:#E2AE67}
html[data-theme=dark] .dx-ver{color:#999DB2}
html[data-theme=dark] body.dv3-page{background:#1F2028}
html[data-theme=dark] .dv3-date{background:#1A1B23}
html[data-theme=dark] .dv3-hero{background:#1A1B23;color:var(--clr-text,#C5CDF4)}
html[data-theme=dark] .dh-ic{background:#292638;color:#AFB6FD}
html[data-theme=dark] .dh-lab{color:#B9C1E4}
html[data-theme=dark] .dh-delta{background:#20212A;color:#B5BDE4}
html[data-theme=dark] .dh-delta.up{background:#172D25;color:#72CEA4}
html[data-theme=dark] .dh-delta.dn{background:#362126;color:#FF9A8A}
html[data-theme=dark] .dh-val{color:#C5CDF4}
html[data-theme=dark] .dh-base{stroke:#26272F}
html[data-theme=dark] .dh-cap{fill:#B8C3FB}
html[data-theme=dark] .dh-mon{fill:#989DB2}
html[data-theme=dark] .dh-mon.is-now{fill:#B8C3FB}
html[data-theme=dark] .dk{background:#1A1B23}
html[data-theme=dark] .dk:hover{border-color:#3A3E4F}
html[data-theme=dark] .dk-ic{background:var(--k2,#4B49AC);color:#FFFFFF}
html[data-theme=dark] .dk.is-empty .dk-ic{background:#262830;color:#969EB2}
html[data-theme=dark] .dv3-page .dx-card .card-head{border-bottom-color:#32333C}
html[data-theme=dark] .acp-pop.is-open{background:#1A1B23;border:1px solid #3C4152}
html[data-theme=dark] .acp-head{border-bottom:1px solid #32333C;background:#1C1D25}
html[data-theme=dark] .acp-title{color:var(--clr-text,#C5CDF4)}
html[data-theme=dark] .acp-count{color:var(--clr-muted,#ABB1D5)}
html[data-theme=dark] .acp-tbl th{background:#1A1B23;color:var(--clr-muted,#ABB1D5);border-bottom:1px solid #34353E}
html[data-theme=dark] .acp-tbl td{border-bottom:1px solid #31323B;color:#C5CDF4}
html[data-theme=dark] .acp-tbl tr.acp-row:hover td{background:#1E1F27}
html[data-theme=dark] .acp-tbl tr.acp-row.is-sel td{background:#292638}
html[data-theme=dark] .acp-code{color:#B9C1E4}
html[data-theme=dark] .acp-tbl mark{background:#382E00}
html[data-theme=dark] .acp-type.led{background:#222637;color:#B4BEFE}
html[data-theme=dark] .acp-type.sub{background:#2D2536;color:#CEADFA}
html[data-theme=dark] .acp-empty{color:var(--clr-muted,#ABB1D5)}
html[data-theme=dark] .acp-tbl tr.acp-row.is-used td{background:#292412}
html[data-theme=dark] .acp-tbl tr.acp-row.is-used.is-sel td{background:#292638}
html[data-theme=dark] .acp-used{background:#372D02;color:#FEA275}
html[data-theme=dark] .acp-foot{border-top:1px solid #32333C;background:#1C1D25;color:var(--clr-muted,#ABB1D5)}
html[data-theme=dark] .acp-foot kbd{border:1px solid #3C4152;background:#1A1B23;color:#B9C1E4}
html[data-theme=dark] .acp-search{border-bottom:1px solid #32333C;background:#1A1B23}
html[data-theme=dark] .acp-search svg{color:#989DB2}
html[data-theme=dark] .acp-search input{border:1px solid #3C4152;color:#C5CDF4;background:#1C1D25}
html[data-theme=dark] .acp-search input:focus{border-color:var(--clr-primary,#4B49AC);background:#1A1B23}
html[data-theme=dark] .acp-search input::placeholder{color:#989DB2}
html[data-theme=dark] .acp-search .acp-type-sel{border:1px solid #3C4152;color:#C5CDF4;background:#1C1D25}
html[data-theme=dark] .acp-search .acp-type-sel:focus{border-color:var(--clr-primary,#4B49AC);background:#1A1B23}
html[data-theme=dark] .xr-tbl tfoot td{background:#1D2D3A;color:#B6D3F4;border-top:2px solid #3E4F64}
html[data-theme=dark] .xr-tbl td.xr-bad{color:#FF9A8A}
html[data-theme=dark] .xr-chip{background:#372D02;color:#FEA275}
html[data-theme=dark] .dcr-seg{border:1px solid #384453;background:#1A1B23}
html[data-theme=dark] .dcr-seg .dcr-seg-btn{color:#B9C1E4;border-inline-end:1px solid #353740}
html[data-theme=dark] .dcr-seg .dcr-seg-btn:hover{background:#1F2028}
html[data-theme=dark] .dcr-seg .dcr-seg-btn.is-on{background:var(--clr-primary,#4B49AC);color:#FFFFFF}
html[data-theme=dark] .dcr-seg .dcr-seg-btn:focus-visible{outline:2px solid var(--clr-primary,#4B49AC)}
html[data-theme=dark] .dcr-head{border-bottom:1px solid #34353F}
html[data-theme=dark] .dcr-title{color:#C5CDF4}
html[data-theme=dark] .dcr-tag{background:#20212A;color:#B5BDE4}
html[data-theme=dark] .dcr-tag.k-cash{background:#172D25;color:#72CEA4}
html[data-theme=dark] .dcr-tag.k-bank{background:#1D2A38;color:#8CC0FA}
html[data-theme=dark] .dcr-tag.k-all{background:#292638;color:#AFB6FD}
html[data-theme=dark] .dcr-answer span{color:#ABB1D5}
html[data-theme=dark] .dcr-answer b{color:#C5CDF4}
html[data-theme=dark] .dcr-stmt{background:#1A1B23;border:1px solid #353740}
html[data-theme=dark] .dcr-line{color:#C5CDF4}
html[data-theme=dark] .dcr-open{background:#1D1F27;border-bottom:1px solid #32333C}
html[data-theme=dark] .dcr-sec{border-bottom:1px solid #32333C}
html[data-theme=dark] .dcr-sec h3{color:#C5CDF4}
html[data-theme=dark] .dcr-sec h3::before{background:#12A08A}
html[data-theme=dark] .dcr-sec.dcr-out h3::before{background:#D94A68}
html[data-theme=dark] .dcr-row{border-bottom:1px dashed #32333C}
html[data-theme=dark] .dcr-row b{color:#C5CDF4}
html[data-theme=dark] .dcr-lab{color:#B9C1E4}
html[data-theme=dark] .dcr-n{background:#20212A;color:#ABB1D5}
html[data-theme=dark] .dcr-none .dcr-lab, html[data-theme=dark] .dcr-none b{color:#989DB2}
html[data-theme=dark] .dcr-total b{border-top:1px solid #1F2340}
html[data-theme=dark] .dcr-in .dcr-total b{color:#72CEA4}
html[data-theme=dark] .dcr-out .dcr-total b{color:#FF9A8A}
html[data-theme=dark] .dcr-close{background:#292638}
html[data-theme=dark] .dcr-close b{color:#B8C3FB;border-bottom:3px double #2E2C8A}
html[data-theme=dark] .dcr-close.is-neg b{color:#FF9A8A;border-bottom-color:#B42318}
html[data-theme=dark] .dcr-h{color:#C5CDF4}
html[data-theme=dark] .dcr-acode{color:#ABB1D5}
html[data-theme=dark] .dcr-det td.dcr-in{color:#72CEA4}
html[data-theme=dark] .dcr-det td.dcr-out{color:#FF9A8A}
html[data-theme=dark] .dcr-det tr.dcr-orow td{background:#1D1F27;color:#B9C1E4}
html[data-theme=dark] .dcr-det tfoot td{background:#292638;color:#C5CDF4}
html[data-theme=dark] .dcr-kind.in{background:#172D25;color:#72CEA4}
html[data-theme=dark] .dcr-kind.out{background:#362126;color:#FF9A8A}
html[data-theme=dark] .dk.is-link:focus-visible{outline:2px solid var(--clr-primary,#4B49AC)}
html[data-theme=dark] .dcr-row b.neg, html[data-theme=dark] .dcr-total b.neg, html[data-theme=dark] .dcr-answer b.neg{color:#FF9A8A}
html[data-theme=dark] .dcr-total b.pos, html[data-theme=dark] .dcr-answer b.pos{color:#72CEA4}
html[data-theme=dark] .cf-sec{border-bottom:1px solid #32333C}
html[data-theme=dark] .cf-sec h3{color:#C5CDF4}
html[data-theme=dark] .cf-l{background:#292638;color:#AFB6FD}
html[data-theme=dark] .cf-acc{color:#ABB1D5}
html[data-theme=dark] .cf-net{border-top:1px solid #32333C}
html[data-theme=dark] .cf-check{color:#72CEA4;background:#1E1F27;border-top:1px solid #2C4036}
html[data-theme=dark] .cf-check.is-bad{color:#FDA186;background:#2F2313;border-top-color:#46392B}
html[data-theme=dark] .cf-ok{background:#0E7A55;color:#FFFFFF}
html[data-theme=dark] .cf-check.is-bad .cf-ok{background:#C2410C}
html[data-theme=dark] .cf-bars{background:#1A1B23;border:1px solid #353740}
html[data-theme=dark] .cf-bar span{color:#B9C1E4}
html[data-theme=dark] .cf-bar b{color:#C5CDF4}
html[data-theme=dark] .cf-bar i{background:#12A08A}
html[data-theme=dark] .cf-bar i.neg{background:#D94A68}
html[data-theme=dark] .cf-chk{color:#B9C1E4}
html[data-theme=dark] .tb-fld .cf-chk label{color:#B9C1E4}
html[data-theme=dark] .ka-note{background:#2F2313;color:#FDA186;border:1px solid #4C2E01}
html[data-theme=dark] .dv3-refresh{background:#1A1B23;color:var(--clr-primary,#AFB6FD)}
html[data-theme=dark] .dv3-refresh:hover{background:#1F2028}
html[data-theme=dark] .dv3-refresh:focus-visible{outline:2px solid var(--clr-primary,#4B49AC)}
html[data-theme=dark] .dv3-page .dx-legend{color:#B5BDE4}
html[data-theme=dark] .dv3-page .dx-legend b{color:#C5CDF4}
html[data-theme=dark] .dv3-page .dx-grid{stroke:#21222B}
html[data-theme=dark] .dx-base{stroke:#292D3F}
html[data-theme=dark] .dx-now{fill:#F5F5FC}
html[data-theme=dark] .dv3-page .dx-axis{fill:#989DB2}
html[data-theme=dark] .dv3-page .dx-axis.is-now{fill:#B8C3FB}
html[data-theme=dark] .dx-ring{stroke:#20212A}
html[data-theme=dark] .dx-dc b{color:#C5CDF4}
html[data-theme=dark] .dv3-page .dx-keys li{border-bottom:1px solid #31323B}
html[data-theme=dark] .dv3-page .dx-keys li:hover, html[data-theme=dark] .dv3-page .dx-keys li.is-on{background:#1E1F27}
html[data-theme=dark] .dv3-page .dx-keys li span{color:#B9C1E4}
html[data-theme=dark] .dv3-page .dx-keys li b{color:#C5CDF4}
html[data-theme=dark] .dx-top + .dx-top{border-top:1px solid #30313A}
html[data-theme=dark] .dx-rank{background:#20212A;color:#B5BDE4}
html[data-theme=dark] .dx-top:first-child .dx-rank{background:#292638;color:#AFB6FD}
html[data-theme=dark] .dx-top-line .dx-nm{color:#C5CDF4}
html[data-theme=dark] .dx-top-line b{color:#C5CDF4}
html[data-theme=dark] .dv3-page .dx-top .dx-track{background:#292638}
html[data-theme=dark] .dv3-page .dx-top .dx-track i{background:#4B49AC}
html[data-theme=dark] .dx-top:not(:first-child) .dx-track i{background:#8583D0}
html[data-theme=dark] .dv-tip{background:#1A1B23;border:1px solid #353740;color:#C5CDF4}
html[data-theme=dark] .dv-tip h4{color:#B5BDE4}
html[data-theme=dark] .dv-tip div span{color:#B5BDE4}
html[data-theme=dark] .form-badge.dt-badge{color:#FEA59C;background:#362222}
html[data-theme=dark] .dt-opt-all .dt-opt-t{color:#FEA59C}
html[data-theme=dark] .dt .list-grid tbody tr.dt-bad td{background:#1E1F28}
html[data-theme=dark] .dt .list-grid tbody tr.dt-warn td{background:#2B2412}
html[data-theme=dark] .dt-confirm{background:#1D1E26;border:1px solid #683F40}
html[data-theme=dark] .dt-confirm .field-label{color:#FEA59C}
html[data-theme=dark] .dt-chip.is-ok{color:#7FD29A;background:#182C23;border-color:#05442C}
html[data-theme=dark] .dt-chip.is-del{color:#FEA59C;background:#362222;border-color:#683F40}
html[data-theme=dark] .dt-chip.is-keep{color:#959FB1;background:#20212A;border-color:#3A4151}
html[data-theme=dark] .dt-chip.is-warn{color:#E0B471;background:#2D2413;border-color:#423002}
html[data-theme=dark] .dt-chip.is-super{color:#82C8EA;background:#162A34;border-color:#0D3E4F}
html[data-theme=dark] .dt-uact{border:1px solid #393556}
html[data-theme=dark] code.dt-pwd-show{background:#1A1B23;border:1px solid #05442C}
html[data-theme=dark] .dt-sub.dt-err{color:#FEA59C}
html[data-theme=dark] .ai-chip{border:1px solid #403F51}
html[data-theme=dark] .ai-me{border:1px solid #3F3E4F}
html[data-theme=dark] .ai-bot.is-err{color:#FEA59C;background:#362222;border-color:#683F40}
html[data-theme=dark] .ai-mic.is-on{color:#FFFFFF;background:#C62828;border-color:#C62828}
html[data-theme=dark] .ai-vmsg{color:#FEA59C}
html[data-theme=dark] .fa-reverse{background:#1D1E26;border:1px solid #683F40}
html[data-theme=dark] .fa-chip.is-ok{color:#7FD29A;background:#182C23;border-color:#05442C}
html[data-theme=dark] .fa-chip.is-off{color:#959FB1;background:#20212A;border-color:#3A4151}
html[data-theme=dark] .fa-now{background:#1E1F27;border:1px solid #343E4D}
html[data-theme=dark] .fa-chip.is-gl{color:#99C4FA;background:#1D2937;border-color:#394E67}
html[data-theme=dark] .fa-label{border:1px solid #BBBDC8;color:#EFF1FD;background:#1A1B23}
html[data-theme=dark] .fa-label-bar svg{fill:#EFF1FD}
html[data-theme=dark] .xr-tbl td.fa-ok{color:#7FD29A}
html[data-theme=dark] .msg-badge{color:#FFFFFF;background:#C62828}
html[data-theme=dark] .msg-row.is-mine .msg-bubble{border-color:#3F3E4F}
html[data-theme=dark] .msg-tick.is-read{color:#6CBAFA}
html[data-theme=dark] .msg-del{color:#FEA59C}
html[data-theme=dark] .msg-err{color:#FEA59C;background:#362222}
html[data-theme=dark] .msg-ann.is-urgent{border-inline-start:4px solid #C62828}
html[data-theme=dark] .msg-acked{color:#83CF9D}
html[data-theme=dark] .msg-tag.is-urgent{color:#FFFFFF;background:#C62828}
html[data-theme=dark] .msg-chip{border:1px solid #403F51}
html[data-theme=dark] .msg-bell-count{color:#FFFFFF;background:#C62828}
html[data-theme=dark] .msg-bell.is-floating{color:#FFFFFF}
html[data-theme=dark] .msg-urgent-box{border-top:5px solid #C62828}
html[data-theme=dark] .msg-urgent-tag{color:#FB958B}
html[data-theme=dark] .msg-panel .msg-tag.is-done{color:#7FCD7F;background:#1D2C1F}
html[data-theme=dark] .msg-pi-count{color:#FFFFFF}
html[data-theme=dark] .form-badge.is-locked{background:#362222}
html[data-theme=dark] .nav-icon.icon-info{background:linear-gradient(145deg,#313D4C 0%,#5A6470 55%,#6F7986 100%)}
html[data-theme=dark] .about-mark{color:#FFFFFF}
html[data-theme=dark] .dt4-tabs .tab-btn.dt4-tab-danger:not(.active){color:#FEA59C}
html[data-theme=dark] .dt4-opt-danger .dt4-opt-t{color:#FEA59C}
html[data-theme=dark] .dt4-blocked{background:#1D1E26;border:1px solid #683F40}
html[data-theme=dark] .dt4-blocked-say{color:#FEA59C}
html[data-theme=dark] .dt4-ok{background:#1D1E27;border:1px solid #05442C}
html[data-theme=dark] .dt4-ok .dt4-blocked-say{color:#7FD29A}
html[data-theme=dark] .dt4-confirm{background:#1D1E26;border:1px solid #683F40}
html[data-theme=dark] .dt4-confirm .field-label{color:#FEA59C}
html[data-theme=dark] .dt4-kind.k-txn, html[data-theme=dark] .dt4-kchip.k-txn{color:#FEA59C;background:#362222;border-color:#683F40}
html[data-theme=dark] .dt4-kind.k-master, html[data-theme=dark] .dt4-kchip.k-master{color:#E0B471;background:#2D2413;border-color:#423002}
html[data-theme=dark] .dt4-kind.k-log, html[data-theme=dark] .dt4-kchip.k-log{color:#959FB1;background:#20212A;border-color:#3A4151}
html[data-theme=dark] .dt4-kind.k-setup, html[data-theme=dark] .dt4-kchip.k-setup{color:#82C8EA;background:#162A34;border-color:#0D3E4F}
html[data-theme=dark] .dt4-kind.k-system, html[data-theme=dark] .dt4-kchip.k-system{color:#FFFFFF;background:#82899C;border-color:#737B8D}
html[data-theme=dark] .dt4-kind.k-other, html[data-theme=dark] .dt4-kchip.k-other{color:#C3B2F9;background:#2B2435;border-color:#3F3156}
html[data-theme=dark] .dt4-picked:not(:empty){color:#FFFFFF}
html[data-theme=dark] .dt4-tables tr:has(input.dt4-pick:checked) td{background:#1E1F28}
html[data-theme=dark] .dt4-checks tr.dt4-chk-fail td{background:#1D1E26}
html[data-theme=dark] .dt4-checks tr.dt4-chk-warn td{background:#2A2311}
html[data-theme=dark] .il-src-unit{color:#91D1A7;background:#192C22;border-color:#19432E}
html[data-theme=dark] .il-src-item{color:#99C4FA;background:#1D2937;border-color:#394E67}
html[data-theme=dark] .il-src-code{color:#E7B275;background:#2E2514;border-color:#483402}
html[data-theme=dark] .il-dt-grn{background:#192C22;color:#91D1A7}
html[data-theme=dark] .il-dt-ost{background:#2E2514;color:#E7B275}
html[data-theme=dark] .il-dt-tri{background:#1D2937;color:#99C4FA}
html[data-theme=dark] .il-dt-prd{background:#2F2333;color:#E0A5FE}
html[data-theme=dark] .il-step{background:#1A1B23}
html[data-theme=dark] .il-ico-del:hover{background:#362222}
html[data-theme=dark] .il-stage{background:#24252E;background-image:radial-gradient(#2B2F41 1px,transparent 1px)}
html[data-theme=dark] .il-label{color:#EFF1FD;background:#1A1B23}
html[data-theme=dark] .il-bars svg{fill:#EFF1FD}
html[data-theme=dark] .il-print-page{background:#24252E}
html[data-theme=dark] .il-pbar{background:#1A1B23}
html[data-theme=dark] .il-pbar .il-pbar-msg{color:#E7B275;background:#2E2514}
html[data-theme=dark] .il-a4 .il-page{background:#1A1B23}
html[data-theme=dark] .il-print-page .il-a4 .il-label{outline:1px dashed #3E4354}
html[data-theme=dark] .il-label.il-blank{background:repeating-linear-gradient(45deg,#1A1B23 0 3mm,#1F2129 3mm 6mm)}
html[data-theme=dark] .pe-io-box.is-out{background:#1D1E27;border-color:#173E2B}
html[data-theme=dark] .pe-ico:hover{background:#362222}
html[data-theme=dark] .pe-chip.is-ok{background:#192C22;color:#91D1A7}
html[data-theme=dark] .pe-chip.is-low, html[data-theme=dark] .pe-chip.is-high{background:#2E2514;color:#E7B275}
html[data-theme=dark] .pe-warn{background:#2E2514;color:#E6BC89}
html[data-theme=dark] .pe-fig.is-bad dd, html[data-theme=dark] .pe-fig.is-loss dd{color:#FE968F}
html[data-theme=dark] .pe-fig.is-gain dd{color:#91D1A7}
html[data-theme=dark] .pe-bad{color:#FE968F}
html[data-theme=dark] .elk-pos{color:#72CD94}
html[data-theme=dark] .elk-zero{color:#989DB2}
html[data-theme=dark] .elk-err{color:#FE968F}
html[data-theme=dark] .elk-more{border:1px solid #3C4152;background:#1A1B23;color:var(--clr-primary,#AFB6FD)}
html[data-theme=dark] .elk-more:hover{background:#1E1F27}
html[data-theme=dark] .elk-more:focus-visible{outline:2px solid var(--clr-primary,#4B49AC)}
html[data-theme=dark] .elk-note{border-top:1px solid #403101;background:#2B2512;color:#DFB471}
html[data-theme=dark] .pe-stock-ok{color:#72CD94}
html[data-theme=dark] .pe-stock-none{color:#FE968F}
html[data-theme=dark] .pk-hint{color:var(--clr-muted,#ABB1D5)}
html[data-theme=dark] .tab-strip-wrap .tab-bar::-webkit-scrollbar-thumb{background:#313446}
html[data-theme=dark] .tab-list-menu{background:#1A1B23;border:1px solid #3C4152}
html[data-theme=dark] .tab-list-menu .tl-item{color:var(--clr-text,#C5CDF4)}
html[data-theme=dark] .tab-list-menu .tl-item:hover{background:#1E1F27}
html[data-theme=dark] .tab-list-menu .tl-item.is-active{background:#292638;color:var(--clr-primary,#AFB6FD)}
html[data-theme=dark] .tab-list-menu .tl-x:hover{color:var(--clr-danger,#FE968F)}
html[data-theme=dark] .tab-list-menu .tl-sep{background:#22232B}
html[data-theme=dark] .tab-nav-closeall{color:var(--clr-danger,#FE968F)}
html[data-theme=dark] .tab-nav-closeall:hover:not(:disabled){background:#352021;color:var(--clr-danger,#FE968F)}
html[data-theme=dark] body.vn{--vn-bg:#1F2029;--vn-card:#1A1B23;--vn-line:#393C4D;--vn-ink:#CACFED;--vn-muted:#ABB1D5;--vn-pri:var(--clr-primary,#4B49AC);--vn-pri-soft:#292738;--vn-ok:#12945A;--vn-ok-soft:#192D24;--vn-info:#1B7FB0;--vn-info-soft:#172C35;--vn-warn:#A86A00;--vn-warn-soft:#2D2514;--vn-err:#C42F2F;--vn-err-soft:#362222}
html[data-theme=dark] .vn-btn.primary{color:#FFFFFF}
html[data-theme=dark] .vn-btn.primary:hover:not(:disabled){background:var(--clr-primary-dark,#3F3D92)}
html[data-theme=dark] .vn-btn.ghost{background:#1A1B23}
html[data-theme=dark] .vn-btn.danger{color:#FFFFFF}
html[data-theme=dark] .vn-btn.danger.ghost{background:#1A1B23;border-color:#542C2E}
html[data-theme=dark] .vn-btn.is-busy::after{border-top-color:#2C2D36}
html[data-theme=dark] .vn-btn.ghost.is-busy::after{border-color:#3F4051}
html[data-theme=dark] .vn-btn:focus-visible, html[data-theme=dark] .vn-icon-btn:focus-visible, html[data-theme=dark] .vn-nav-btn:focus-visible, html[data-theme=dark] .vn-tap:focus-visible, html[data-theme=dark] .vn-chip-btn:focus-visible, html[data-theme=dark] .vn-act:focus-visible{outline:3px solid #535082}
html[data-theme=dark] .vn-input, html[data-theme=dark] .vn-field input, html[data-theme=dark] .vn-field select, html[data-theme=dark] .vn-filter select{background:#1A1B23}
html[data-theme=dark] .vn-search{background:#1A1B23}
html[data-theme=dark] .vn-chip-btn{background:#1A1B23}
html[data-theme=dark] .vn-chip-btn.is-on{color:#FFFFFF}
html[data-theme=dark] .vn-seg{background:#29283A}
html[data-theme=dark] .vn-seg button.is-on{background:#1A1B23}
html[data-theme=dark] .vn-pill.muted{background:#22232C}
html[data-theme=dark] .vn-note.is-info{color:#82C6F0}
html[data-theme=dark] .vn-note.is-warn{color:#E4B374}
html[data-theme=dark] .vn-note.is-err{color:#FEA299}
html[data-theme=dark] .vn-note.is-ok{color:#80D1A1}
html[data-theme=dark] .vn-loading{background:linear-gradient(90deg,transparent,var(--vn-pri),transparent) 0 0/40% 100% no-repeat #2A293B}
html[data-theme=dark] .vn-top{background:#1A1B23}
html[data-theme=dark] .vn-chip b{color:#80D2A1}
html[data-theme=dark] .vn-nav{background:#1A1B23}
html[data-theme=dark] .vn-kpi{background:#1A1B23;border-inline-start:4px solid #3F3F50}
html[data-theme=dark] .vn-kpi.cashnow{border-inline-start-color:#0C6A40}
html[data-theme=dark] .vn-route::before{background:repeating-linear-gradient(to bottom,#C9C8EE 0 6px,transparent 6px 11px)}
html[data-theme=dark] .vn-stop{background:#1A1B23}
html[data-theme=dark] .vn-stop:hover{border-color:#4B4969}
html[data-theme=dark] .vn-stop-no{background:#1A1B23;border:2px solid #4B4969}
html[data-theme=dark] .vn-stop.is-S .vn-stop-no{color:#FFFFFF}
html[data-theme=dark] .vn-stop.is-C .vn-stop-no{color:#FFFFFF}
html[data-theme=dark] .vn-stop.is-N .vn-stop-no{background:#272831;border-color:#363740}
html[data-theme=dark] .vn-stop.is-S, html[data-theme=dark] .vn-stop.is-N{background:#1C1D25}
html[data-theme=dark] .vn-row{background:#1A1B23}
html[data-theme=dark] .vn-row:hover{border-color:#4B4969}
html[data-theme=dark] .vn-act{background:#1A1B23}
html[data-theme=dark] .vn-act:hover:not(:disabled){background:#1C1D26}
html[data-theme=dark] .vn-custpick{background:#1A1B23}
html[data-theme=dark] .vn-item{background:#1A1B23}
html[data-theme=dark] .vn-item.in-cart{border-color:#4F4C7A}
html[data-theme=dark] .vn-incart{color:#FFFFFF}
html[data-theme=dark] .vn-unit-btn{border:1px dashed #4B4969;background:#1C1D26}
html[data-theme=dark] .vn-cartbar-btn{color:#FFFFFF}
html[data-theme=dark] .vn-line{background:#1A1B23}
html[data-theme=dark] .vn-line.in-cart{border-color:#4F4C7A}
html[data-theme=dark] .vn-step{background:#1A1B23}
html[data-theme=dark] .vn-step button{background:#1E1F28}
html[data-theme=dark] .vn-unit{background:#1A1B23}
html[data-theme=dark] .vn-done .vn-ico{color:#FFFFFF}
html[data-theme=dark] .vn-cam{background:#EAECF8}
html[data-theme=dark] .vn-balance > div{background:#1A1B23}
html[data-theme=dark] .vn-open, html[data-theme=dark] .vn-stock, html[data-theme=dark] .vn-docs{background:#1A1B23}
html[data-theme=dark] .vn-docs li.k-nosale{border-inline-start-color:#444557}
html[data-theme=dark] .vn-sheet{background:#1A1B23}
html[data-theme=dark] .vn-sheet::before{background:#2E2F41}
html[data-theme=dark] .vn-toast{color:#FFFFFF}
html[data-theme=dark] .vn-toast.is-warn{background:#8A5A00}
html[data-theme=dark] .vn-toast.is-ok{background:#0F7A4A}
html[data-theme=dark] .vn-bar{background:#1A1B23}
html[data-theme=dark] .vn-tabs{background:#282739}
html[data-theme=dark] .vn-tabs button.is-on{background:#1A1B23}
html[data-theme=dark] .vn-vancard{background:#1A1B23}
html[data-theme=dark] .vn-vancard:hover{border-color:#4B4969}
html[data-theme=dark] .vn .vn-grid tr.vn-diff td{background:#2B2512}
html[data-theme=dark] .vn-qin{background:#1A1B23}
html[data-theme=dark] .vn-cash-grid > div{background:#1E1F27}
html[data-theme=dark] .vn-day{background:#1A1B23}
html[data-theme=dark] .vn-day.is-on{color:#FFFFFF}
html[data-theme=dark] .vn-ptab th{background:#202129}
html[data-theme=dark] .vn-sign span{border-top:1px solid #BBBDC8}
@media (min-width:900px){html[data-theme=dark] .vn-cart{background:#1A1B23}}
@media (min-width:900px){html[data-theme=dark] .vn-side{background:#1C1D26}}
html[data-theme=dark] .vr-kpi{border-inline-start-color:#3F3F50}
html[data-theme=dark] .vr-cols{background:linear-gradient(to top,#23242D 1px,transparent 1px) 0 0/100% 25%}
html[data-theme=dark] .vr-stack{background:#22232C}
html[data-theme=dark] .vr-stack .b1, html[data-theme=dark] .vr-stack-keys .b1{background:#E3B341}
html[data-theme=dark] .vr-stack .b2, html[data-theme=dark] .vr-stack-keys .b2{background:#D98A1E}
html[data-theme=dark] .vr-stack .b3, html[data-theme=dark] .vr-stack-keys .b3{background:#D2602A}
html[data-theme=dark] .vn .vr-grid tfoot td{background:#1E1F28}
html[data-theme=dark] .bi-page{background:#1E2028}
html[data-theme=dark] .bi{--bi-s1:#4B49AC;--bi-s2:#C9CAEE;--bi-s3:#12A08A;--bi-good:#12A08A;--bi-bad:#C2410C}
html[data-theme=dark] .bi-filter{background:#1A1B23}
html[data-theme=dark] .bi-seg span{background:#1A1B23}
html[data-theme=dark] .bi-seg input:checked + span{color:#FFFFFF}
html[data-theme=dark] .bi-check.bi-info{background:#21232B}
html[data-theme=dark] .bi-dot{stroke:#1A1B23}
html[data-theme=dark] .bi-zero{stroke:#4C5062}
html[data-theme=dark] .bi-good-t{color:#71CCB1}
html[data-theme=dark] .bi-bad-t{color:#FC9D7D}
html[data-theme=dark] .bi-axis0{stroke:#4C5062}
html[data-theme=dark] .bi-grid .bi-sub th, html[data-theme=dark] .bi-grid .bi-sub td{background:#1C1D25}
html[data-theme=dark] .bi-tag{background:#21232B}
html[data-theme=dark] .bi-err{color:#FC9BA2}
html[data-theme=dark] .bi-drawer-panel{background:#1A1B23}
html[data-theme=dark] .bi-tag.bk-tag-done{background:#123B2A;color:#7EE2B0}
html[data-theme=dark] .bk-chk-chip.is-ok{background:#123B2A;color:#7EE2B0}
html[data-theme=dark] .bk-chk-chip.is-bad{background:#45201E;color:#F6A39A}
html[data-theme=dark] .bk-vno{color:#A9A7F0}
html[data-theme=dark] input[type="file"]::file-selector-button{background:#1A1B23;color:var(--clr-text)}
html[data-theme=dark] input[type="file"]::-webkit-file-upload-button{background:#1A1B23;color:var(--clr-text)}
html[data-theme=dark] input[type="file"]:hover::file-selector-button{background:var(--clr-surface-alt);border-color:#44495A}
html[data-theme=dark] .bi-tip{background:#1A1B23}
html[data-theme=dark] .bi-switch .btn-erp[aria-pressed="true"]{color:#FFFFFF}
html[data-theme=dark] .bi-tree .bi-hit td:first-child{background:#342C05}
html[data-theme=dark] .bk-flash.is-ok{background:#152D28;color:#7DCEBB}
html[data-theme=dark] .bk-flash.is-bad{background:#35241A;color:#FC9D7D}
html[data-theme=dark] .bk-warn{background:#2C2413;color:#E7B275}
html[data-theme=dark] .bi-tag.bk-tag-bad{background:#35241A;color:#FC9D7D}
html[data-theme=dark] .bk-group{border:1px solid #3A3B4D}
html[data-theme=dark] .bk-msg.is-ok{color:#7DCEBB}
html[data-theme=dark] .bk-msg.is-bad{color:#FC9D7D}
html[data-theme=dark] .bi{--bi-s4:#D9962B;--bi-s5:#7C8AA5;--bi-warn:#B7791F}
html[data-theme=dark] .bi-flash.is-ok{background:#152D26;color:#71CCB1}
html[data-theme=dark] .bi-tag.is-imp{background:#2F2615;color:#E2AE67}
html[data-theme=dark] .bi-tag.is-season{background:#2A283A}
html[data-theme=dark] .bi-tag.is-good{background:#162E28;color:#71CCB1}
html[data-theme=dark] .bi-tag.is-bad{background:#38251D;color:#FC9D7D}
html[data-theme=dark] .bi-tag.is-warn{background:#2F2615;color:#E2AE67}
html[data-theme=dark] .bi-tag.is-var{background:#152E32;color:#79C9D9}
html[data-theme=dark] .bi-verdict{background:#1A1B23}
html[data-theme=dark] .bi-verdict.is-A{background:#152D26;border-color:#1C5B4A;color:#89D1BA}
html[data-theme=dark] .bi-verdict.is-S{background:#2D2513;border-color:#4B3600;color:#E4B374}
html[data-theme=dark] .bi-verdict.is-U{background:#35231B;border-color:#71412C;color:#FAA78A}
html[data-theme=dark] .bi-verdict.is-N{background:#372327;border-color:#723F49;color:#FCA5AB}
html[data-theme=dark] .bi-msg.is-ok{color:#71CCB1}
html[data-theme=dark] .bi-msg.is-bad{color:#FC9BA2}
html[data-theme=dark] .bi-newrow td{background:#1C1D25}
html[data-theme=dark] .ms-soon{background:#2F2615;color:#E2AE67}
html[data-theme=dark] .vt{--vt-ok:#0E7A62;--vt-ok-bg:#162E28;--vt-no:#A63A0A;--vt-no-bg:#38251D;--vt-warn:#8A5A00;--vt-warn-bg:#2F2615;--vt-off:#4F5670;--vt-off-bg:#21232B;--vt-info:#1D4ED8;--vt-info-bg:#222A3A;--vt-teal:#0B6B7A;--vt-teal-bg:#152E32}
html[data-theme=dark] .vt-n.vt-n-warn{border-inline-start-color:#B7791F}
html[data-theme=dark] .vt-grid tr.vt-unposted > td:first-child{border-inline-start:3px solid #B7791F}
html[data-theme=dark] .vt-grid tr.vt-sevrow2 > td:first-child{border-inline-start:3px solid #B7791F}
html[data-theme=dark] .vt-act-back{border-color:#542E1E}
html[data-theme=dark] .head-field .head-chip.is-pick:focus-visible{outline:2px solid var(--clr-primary,#4B49AC)}
html[data-theme=dark] .list-grid.ccr td.neg{color:var(--clr-danger,#FF998B)}
html[data-theme=dark] .list-grid.ccr tr.ccr-sec td{background:var(--grid-foot-bg,#1F2028)}
html[data-theme=dark] .list-grid.ccr tr.ccr-sub td{border-top:2px solid var(--grid-head-line,#384453)}
html[data-theme=dark] .pj .pj-figs dd.neg, html[data-theme=dark] .txn-grid td.pj-over{color:var(--clr-danger,#FF998B)}
html[data-theme=dark] .pj-st{background:#20212A;color:#B5BDE4}
html[data-theme=dark] .pj-st.pj-st-o{background:#172D25;color:#72CEA4}
html[data-theme=dark] .pj-st.pj-st-h{background:#2E2514;color:#E2AE67}
html[data-theme=dark] .pj-st.pj-st-c{background:#22232B;color:#989EB2}
html[data-theme=dark] .pj-flag.pj-flag-over{background:#362220;color:#FF998B}
html[data-theme=dark] .pj-flag.pj-flag-nobudget{background:#2E2514;color:#E2AE67}
html[data-theme=dark] .elk-pop{--elk-sel:#232F3E}
html[data-theme=dark] .elk-pop.acp-pop.is-open{background:#1A1B23}
html[data-theme=dark] .elk-pop .acp-head{background:#1A1B23}
html[data-theme=dark] .elk-pop .acp-search{background:#1A1B23}
html[data-theme=dark] .elk-pop .acp-search input.elk-q, html[data-theme=dark] .elk-pop .acp-search .acp-type-sel{background:#1A1B23}
html[data-theme=dark] .elk-pop .acp-search input.elk-q:hover, html[data-theme=dark] .elk-pop .acp-search .acp-type-sel:hover{border-color:#44495A}
html[data-theme=dark] .elk-pop .acp-scroll{background:#1A1B23}
html[data-theme=dark] .elk-pop .acp-tbl tbody tr.acp-row.is-used td{background:#292412}
html[data-theme=dark] .elk-pop .elk-note{border:1px solid #403101}
html[data-theme=dark] .bp .dcr-answer b.is-neg{color:#FF9A8A}
html[data-theme=dark] .bp-kpi{background:#1A1B23;border:1px solid #353740}
html[data-theme=dark] .bp-kpi span{color:#ABB1D5}
html[data-theme=dark] .bp-kpi b{color:#C5CDF4}
html[data-theme=dark] .bp-kpi i{color:#ABB1D5}
html[data-theme=dark] .bp-kpi.in b{color:#72CEA4}
html[data-theme=dark] .bp-kpi.out b{color:#FF9A8A}
html[data-theme=dark] .bp-kpi.neg{background:#1F2028;border-color:#733E3A}
html[data-theme=dark] .bp-kpi.neg b{color:#FF9A8A}
html[data-theme=dark] .bp td.bp-in, html[data-theme=dark] .bp span.bp-in{color:#72CEA4}
html[data-theme=dark] .bp td.bp-out, html[data-theme=dark] .bp span.bp-out{color:#FF9A8A}
html[data-theme=dark] .bp td.bp-neg{color:#FF9A8A}
html[data-theme=dark] .bp-days .bp-dw{color:#ABB1D5}
html[data-theme=dark] .bp-days tr.bp-row.is-short td.bp-bal{color:#FF9A8A}
html[data-theme=dark] .bp-days tr.bp-row.is-pick td{background:#1D1E26}
html[data-theme=dark] .bp-days tr.bp-open > td{background:#1A1B23}
html[data-theme=dark] .bp-days tr.bp-open:hover{background:#1A1B23}
html[data-theme=dark] .bp-month h3{color:#C5CDF4}
html[data-theme=dark] .bp-wd{color:var(--grid-head-ink,#A3C5FC);background:var(--grid-head-bg,#1E2C3A);border:1px solid var(--grid-head-line,#3C546D)}
html[data-theme=dark] .bp-cell{background:#1A1B23;border:1px solid var(--grid-line,#364351)}
html[data-theme=dark] .bp-cell:hover{background:var(--grid-row-hover,#1B2937)}
html[data-theme=dark] .bp-cell:focus-visible{outline:2px solid var(--clr-primary,#4B49AC)}
html[data-theme=dark] .bp-cell .bp-dn{color:#C5CDF4}
html[data-theme=dark] .bp-cell .bp-bal{border-top:1px dashed #353740;color:#B9C1E4}
html[data-theme=dark] .bp-cell.is-out{background:#1D1F27;color:#999DB1}
html[data-theme=dark] .bp-cell.is-today{border-color:var(--clr-primary,#4B49AC)}
html[data-theme=dark] .bp-cell.is-short{background:#1F2028;border-color:#733E3A}
html[data-theme=dark] .bp-cell.is-short .bp-bal{color:#FF9A8A}
html[data-theme=dark] .bp-hint{color:#ABB1D5}
html[data-theme=dark] .ia-cards .ia-card:hover{border-color:#495565}
html[data-theme=dark] .ia-cards .ia-card:focus-visible{outline:2px solid var(--clr-primary,#4B49AC)}
html[data-theme=dark] .ia-cards .ia-card .pl-row span{color:#A4B6CF}
html[data-theme=dark] .ia-cards .ia-card.is-warn h3{background:#2D2413;color:#FEA275}
html[data-theme=dark] .ia-cards .ia-card.is-bad h3{background:#1F2028;color:#FF9A8A}
html[data-theme=dark] .ia-cards .ia-card.is-bad .pl-row b{color:#FF9A8A}
html[data-theme=dark] .ia-chip.ia-fast{background:#172D25;color:#72CEA4}
html[data-theme=dark] .ia-chip.ia-normal{background:#1D2A38;color:#8CC0FA}
html[data-theme=dark] .ia-chip.ia-slow{background:#2D2413;color:#FEA275}
html[data-theme=dark] .ia-chip.ia-none{background:#20212A;color:#B5BDE4}
html[data-theme=dark] .ia-tbl td.ia-neg{color:#FF9A8A}
html[data-theme=dark] .dbk-cards .pl-row span{color:#A4B6CF}
html[data-theme=dark] .dbk-tbl tr.dbk-day td{background:#21222A;color:#B6D3F4}
html[data-theme=dark] .dbk-tbl tr.dbk-day td span{color:#B5BDE4}
html[data-theme=dark] .dbk-tbl tr.dbk-v td{color:#ABB7CA}
html[data-theme=dark] .dbk-tbl tr.dbk-v td.dbk-no{color:#8CC0FA}
html[data-theme=dark] .dbk-tbl tr.dbk-l td{color:#B5BDE4}
html[data-theme=dark] .dbk-tbl tr.dbk-l td i{color:#ABB1D5}
html[data-theme=dark] .dbk-tbl tr.dbk-sub td{background:#1D1E26;border-top:1px solid #3D4555}
html[data-theme=dark] .dbk-type{background:#20212A;color:#B5BDE4}
html[data-theme=dark] .dbk-money tr.dbk-acc td{color:#B6D3F4}
html[data-theme=dark] .dbk-money tr.dbk-mode td{color:#B5BDE4}
html[data-theme=dark] .dbk-money tr.dbk-kind td{background:#1D1E26;border-top:1px solid #3D4555}
html[data-theme=dark] .dbk-money td.dbk-in{color:#72CEA4}
html[data-theme=dark] .dbk-money td.dbk-out{color:#FF9A8A}
html[data-theme=dark] .dbk-money td.dbk-neg{color:#FF9A8A}
html[data-theme=dark] .dbk-bcard{border:1px solid #353F4E;background:#1A1B23}
html[data-theme=dark] .dbk-bcard h3{color:#97A4B6}
html[data-theme=dark] .dbk-bcard > b{color:#B6D3F4}
html[data-theme=dark] .dbk-bcard > b.is-neg{color:#FF9A8A}
html[data-theme=dark] .dbk-bcard dl{border-top:1px solid #32333C}
html[data-theme=dark] .dbk-bcard dt{color:#A4B6CF}
html[data-theme=dark] .dbk-bcard dd{color:#ABB7CA}
html[data-theme=dark] .dbk-bcard dd.in{color:#72CEA4}
html[data-theme=dark] .dbk-bcard dd.out{color:#FF9A8A}
html[data-theme=dark] .dbk-bcard.is-all{background:#2D4661;border-color:#0F2740}
html[data-theme=dark] .dbk-bcard.is-all h3, html[data-theme=dark] .dbk-bcard.is-all dt{color:#C9D3E3}
html[data-theme=dark] .dbk-bcard.is-all > b, html[data-theme=dark] .dbk-bcard.is-all dd{color:#FFFFFF}
html[data-theme=dark] .dbk-bcard.is-all > b.is-neg{color:#FCA5A5}
html[data-theme=dark] .dbk-bcard.is-all dd.in{color:#86EFAC}
html[data-theme=dark] .dbk-bcard.is-all dd.out{color:#FCA5A5}
html[data-theme=dark] .cs-bar{background:#1F2737;color:#ACC4FB}
html[data-theme=dark] .cs-bar.cs-warn{background:#2C2413;color:#DABA7F;border-bottom-color:#453305}
html[data-theme=dark] .ctl.cs-locked{background:#1F2129}
html[data-theme=dark] .dmg-balloon.cs-tip .cs-tip-ov{color:#B6CBFD;background:#1A1B23}
html[data-theme=dark] .dmg-balloon.cs-tip .cs-tip-ov:hover{background:#24293A}
html[data-theme=dark] .form-head > .tab-strip + h1{background:var(--clr-primary,#4B49AC);color:#FFFFFF}
html[data-theme=dark] .chq-tbl tr.chq-due > td:nth-child(2){color:#FF9A8A}
html[data-theme=dark] body.cp-body{background:var(--clr-surface-alt,#1E1F27)}
html[data-theme=dark] .cp-card{background:var(--clr-surface,#1A1B23);color:var(--clr-text,#EFF1FD);border:1px solid var(--clr-border,#34353E)}
html[data-theme=dark] .cp-ico{background:var(--clr-primary-soft,#292638);color:var(--clr-primary,#AFB6FD)}
html[data-theme=dark] .cp-title{color:var(--clr-text,#EFF1FD)}
html[data-theme=dark] .cp-user{background:var(--clr-surface-alt,#1C1D25);border:1px solid var(--clr-border,#34353E);color:var(--clr-muted,#ABB1D5)}
html[data-theme=dark] .cp-lbl{color:var(--clr-label,#EFF1FD)}
html[data-theme=dark] .cp-in > svg{color:var(--clr-muted,#AAA8C7)}
html[data-theme=dark] .cp-ctl{border:1px solid var(--clr-border-strong,#3C4152);background:var(--clr-surface,#1A1B23);color:var(--clr-text,#EFF1FD)}
html[data-theme=dark] .cp-ctl:hover{border-color:var(--clr-muted,#555973)}
html[data-theme=dark] .cp-eye{color:var(--clr-muted,#AAA8C7)}
html[data-theme=dark] .cp-eye:hover, html[data-theme=dark] .cp-eye[aria-pressed=true]{background:var(--clr-primary-soft,#292638)}
html[data-theme=dark] .cp-sep{background:var(--clr-border,#25262E)}
html[data-theme=dark] .cp-hint{color:var(--clr-muted,#ABB1D5)}
html[data-theme=dark] .cp-caps{color:#E2A85A}
html[data-theme=dark] .cp-link{color:var(--clr-muted,#ABB1D5)}
html[data-theme=dark] body.cp-first{background:#333461}
html[data-theme=dark] body.cp-first .cp-page{background:radial-gradient(900px 700px at 15% -10%,rgba(75,73,172,.55),rgba(75,73,172,0) 62%),
  radial-gradient(700px 600px at 110% 110%,rgba(75,73,172,.35),rgba(75,73,172,0) 60%),#333461}
html[data-theme=dark] .ihx-win{background:var(--clr-surface,#1A1B23)}
html[data-theme=dark] .ihx-frame{background:var(--clr-surface,#1A1B23)}
html[data-theme=dark] body.ih-page{background:var(--clr-bg,#1A1B23)}
html[data-theme=dark] body.ih-overlay .ih-ovbar{background:var(--clr-surface,#1A1B23);border-bottom:1px solid var(--clr-border,#34353E)}
html[data-theme=dark] .ih-ovtitle{color:var(--clr-text,#EFF1FD)}
html[data-theme=dark] .ih-ovkey{border:1px solid var(--clr-border-strong,#3C4152);color:var(--clr-muted,#ABB1D5)}
html[data-theme=dark] .ih-ovclose{color:var(--clr-muted,#ABB1D5)}
html[data-theme=dark] .ih-ovclose:hover{background:var(--clr-primary-soft,#292638);color:var(--clr-primary,#AFB6FD)}
html[data-theme=dark] .tb-wrap.ih .tb-ro{color:var(--clr-muted,#ABB1D5)}
html[data-theme=dark] .ih-kpis .bp-kpi i{color:var(--clr-muted,#ABB1D5)}
html[data-theme=dark] .ih-note{color:#E2AE67;background:#2C2413;border:1px solid #433204}
html[data-theme=dark] .ih-tbl .ih-sub{color:var(--clr-muted,#ABB1D5)}
html[data-theme=dark] .ih-chip.ih-s{background:#182D24;color:#7FD29B}
html[data-theme=dark] .ih-chip.ih-sr{background:#312515;color:#F2A364}
html[data-theme=dark] .ih-chip.ih-p{background:#1E2938;color:#9BC0FD}
html[data-theme=dark] .ih-chip.ih-pr{background:#2D2536;color:#C7B3F9}
html[data-theme=dark] .ih-tbl tr.ih-sr td.r:nth-child(5), html[data-theme=dark] .ih-tbl tr.ih-pr td.r:nth-child(5){color:#FF9A8A}
html[data-theme=dark] .ih-pager{color:var(--clr-muted,#ABB1D5)}
html[data-theme=dark] .ih-tbl .ih-hid{color:var(--clr-muted,#9EA3BF)}

/* ---- part 2: hand-tuned ---- */
/* ---- dt-v1: hand-set dark-theme base (after the generated rules) ---- */
html[data-theme=dark]{color-scheme:dark;
  --clr-primary:#6E6CE0;--clr-primary-dark:#5B59CC;--clr-primary-soft:#2A2950;
  --clr-bg:#13141C;--clr-surface:#1B1D28;--clr-surface-alt:#20222E;
  --clr-text:#ECEEF8;--clr-label:#DADDEB;--clr-muted:#9EA3BF;
  --clr-border:#2E3140;--clr-border-strong:#3A3E50;}
html[data-theme=dark] body{background:var(--clr-bg);color:var(--clr-text);}
html[data-theme=dark] ::selection{background:#4B49AC;color:#fff;}
html[data-theme=dark] img:not([src$=".svg"]){filter:none;}

/* the theme switch (shell header, sign-in card): a moon in light, a sun in dark */
.theme-btn .th-sun{display:none;}
html[data-theme=dark] .theme-btn .th-sun{display:block;}
html[data-theme=dark] .theme-btn .th-moon{display:none;}
.lg-cardhead .theme-btn{width:36px;height:36px;flex:0 0 auto;border:1px solid var(--lg-line);background:var(--lg-field);border-radius:9px;
  display:inline-flex;align-items:center;justify-content:center;color:#000;cursor:pointer;}
.lg-cardhead .theme-btn svg{width:17px;height:17px;}
.lg-cardhead .lg-tools{display:flex;align-items:flex-start;gap:8px;flex:0 0 auto;}

/* the sign-in card in dark: the page is already night, the card follows it */
html[data-theme=dark] .lg{--lg-line:#2F3247;--lg-field:#20222F;}
html[data-theme=dark] .lg-card{background:#171926;box-shadow:0 0 0 1px rgba(255,255,255,.06) inset,0 30px 80px -20px rgba(0,0,0,.7);}
html[data-theme=dark] .lg-title,html[data-theme=dark] .lg .lg-sub,html[data-theme=dark] .lg-lbl,html[data-theme=dark] .lg .lg-ctl,
html[data-theme=dark] .lg-picker .picker-code,html[data-theme=dark] .lg-picker .picker-sub,html[data-theme=dark] .lg-picker .picker-item,
html[data-theme=dark] .lg .lg-lang a,html[data-theme=dark] .lg-cardhead .theme-btn{color:#ECEEF8;}
html[data-theme=dark] .lg .lg-sub,html[data-theme=dark] .lg-picker .picker-sub{color:#A9AECB;}
html[data-theme=dark] .lg .lg-ctl:hover,html[data-theme=dark] .lg-picker .picker-btn:hover{border-color:#40445C;}
html[data-theme=dark] .lg .lg-ctl:focus{background:#262939;border-color:#7C7AE6;box-shadow:0 0 0 4px rgba(124,122,230,.22);}
html[data-theme=dark] .lg-picker .picker-btn{background:var(--lg-field);color:#ECEEF8;}
html[data-theme=dark] .lg-picker .picker-list{background:#1D1F2D;border-color:#2F3247;}
html[data-theme=dark] .lg-picker .picker-item:hover{background:#2A2950;}
html[data-theme=dark] .lg-co{background:#2A2950;color:#B9B8FF;}
html[data-theme=dark] .lg .lg-lang a.active{background:#2E3044;color:#C9C8FF;box-shadow:none;}
html[data-theme=dark] .lg-card .alert{background:#3A1E22;color:#FFB4AE;}
html[data-theme=dark] .lg-caps{color:#F2C46B;}
html[data-theme=dark] .lg-eye:hover{background:#2A2950;color:#C9C8FF;}

/* cp-v2 first-time change: the card in dark, as the sign-in card */
html[data-theme=dark] body.cp-first .cp-card{background:#171926;border-color:rgba(255,255,255,.06);}

/* mt-v1 (2 Nov 2026): one screen open in several tabs (entry screens) - the copy
   number once a second copy is open, "+" on the open tab for another copy, a dot
   for unsaved work, and the right-click menu of the main menu */
.tab .tab-n{display:none;min-width:18px;height:18px;padding:0 5px;margin-inline-start:6px;border-radius:9px;background:#c9cdf0;color:#2b2f6b;font-size:10.5px;font-weight:700;line-height:18px;text-align:center;flex:none;}
.tab.has-copies .tab-n{display:inline-block;}
.tab.is-active .tab-n{background:var(--clr-primary,#4b4fe0);color:#fff;}
.tab .tab-more{display:none;width:22px;height:22px;margin-inline-start:6px;border-radius:6px;border:1px solid #d5d8fa;background:#fff;color:var(--clr-primary,#4b4fe0);font-size:15px;font-weight:600;line-height:20px;text-align:center;cursor:pointer;flex:none;}
.tab.is-active .tab-more{display:inline-block;}
.tab .tab-more:hover{background:#eef1ff;border-color:#b9bdf3;}
.tab .tab-dot{display:none;width:7px;height:7px;margin-inline-start:6px;border-radius:50%;background:#e59a00;flex:none;}
.tab.is-dirty .tab-dot{display:inline-block;}
.tab-copy-menu{position:fixed;z-index:9999;min-width:250px;padding:6px;background:#fff;border:1px solid #e3e7fb;border-radius:12px;box-shadow:0 12px 24px -16px rgba(60,80,180,.6),0 2px 6px -3px rgba(60,80,180,.16);font-size:13px;}
.tab-copy-menu button{display:flex;align-items:center;justify-content:space-between;gap:18px;width:100%;padding:8px 10px;border:0;border-radius:8px;background:none;color:#0e1240;font:inherit;text-align:start;cursor:pointer;}
.tab-copy-menu button:hover,.tab-copy-menu button:focus-visible{background:#eef1ff;color:#4b4fe0;outline:none;}
.tab-copy-menu kbd{font:inherit;font-size:11px;color:#6a719a;white-space:nowrap;}
html[data-theme=dark] .tab .tab-n{background:#2c3160;color:#c3c8ee;}
html[data-theme=dark] .tab.is-active .tab-n{background:#8f93ff;color:#11132b;}
html[data-theme=dark] .tab .tab-more{background:#1a1d3d;border-color:#2c3160;color:#a9acff;}
html[data-theme=dark] .tab .tab-more:hover{background:#23275a;}
html[data-theme=dark] .tab-copy-menu{background:#1a1d3d;border-color:#2c3160;}
html[data-theme=dark] .tab-copy-menu button{color:#e8eaff;}
html[data-theme=dark] .tab-copy-menu button:hover,html[data-theme=dark] .tab-copy-menu button:focus-visible{background:#23275a;color:#c9cbff;}

/* ca-v1 (2 Nov 2026): a question as a toast (Close all, close / refresh a page
   with unsaved work) - never the browser's confirm box */
.toast.erp-ask{min-width:300px;max-width:400px;padding:14px 16px;border-inline-start:3px solid #e59a00;box-shadow:0 16px 32px -14px rgba(45,55,160,.45),0 2px 8px -4px rgba(45,55,160,.2);}
.erp-ask-msg{font-size:13.5px;font-weight:600;color:#0e1240;line-height:1.45;}
.erp-ask-detail{margin-top:4px;font-size:12.5px;color:#b26a00;}
.erp-ask-acts{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;justify-content:flex-end;}
.erp-ask-btn{height:32px;padding:0 14px;border-radius:9px;border:1px solid #dfe3f7;background:#fff;color:#0e1240;font:inherit;font-size:13px;font-weight:600;cursor:pointer;}
.erp-ask-btn:hover{background:#f7f6ff;border-color:#b9bdf3;}
.erp-ask-btn.danger{background:#e5484d;border-color:#e5484d;color:#fff;}
.erp-ask-btn.danger:hover{background:#cf3a3f;}
.erp-ask-btn.primary{background:linear-gradient(90deg,#4b4fe0,#7b5cf5);border-color:transparent;color:#fff;}
.erp-ask-btn:focus-visible{outline:3px solid #c9cff8;outline-offset:2px;}
html[data-theme=dark] .erp-ask-msg{color:#e8eaff;}
html[data-theme=dark] .erp-ask-detail{color:#f2c46b;}
html[data-theme=dark] .erp-ask-btn{background:#1a1d3d;border-color:#2c3160;color:#e8eaff;}
html[data-theme=dark] .erp-ask-btn.danger{background:#c9373c;border-color:#c9373c;}

/* ta-v1: a question opened beside its button (the tab strip's: under Close all) */
.toast.erp-ask.is-anchored{position:fixed;z-index:3000;margin:0;bottom:auto;animation:none;}

/* ==========================================================================
   mv-v1 (0766): F9 Item movement history, F8 Stock status, the read-only
   document window - Modules/Inventory/ItemHistory.aspx (one page, three
   views). Rows 32px with column dividers, purchases block before sales.
   ========================================================================== */
body.mv-page{--mv-ink:#14183d;--mv-mu:#6b7096;--mv-ln:#e4e6f2;--mv-ln2:#eceef6;--mv-bg:#f5f6fb;--mv-soft:#fafbff;
  --mv-p:#4b4fe0;--mv-p2:#7b5cf5;--mv-pl:#eeefff;--mv-ok:#0f9d6b;--mv-okl:#e6f6ef;--mv-bl:#2563c9;--mv-bll:#e8f0fc;
  --mv-dn:#d23f4a;--mv-dnl:#fdecee;--mv-wa:#b26a00;--mv-wal:#fff4e0;--mv-vi:#6a3fd1;--mv-vil:#f1ecff;--mv-st:#4b5068;--mv-stl:#eef0f4;
  margin:0;height:100vh;overflow:hidden;background:#fff;color:var(--mv-ink);font-family:var(--font-ui,'Inter','Cairo','Segoe UI',sans-serif);}
body.mv-page form{height:100%;}
.mv-win{display:flex;flex-direction:column;height:100%;min-height:0;background:#fff;}
.mv-head{display:flex;align-items:center;gap:12px;padding:12px 18px;border-bottom:1px solid var(--mv-ln);flex:none;flex-wrap:wrap;}
.mv-title{margin:0;font-size:17px;font-weight:600;letter-spacing:-.01em;}
.mv-key{font-size:11px;font-weight:600;border:1px solid var(--mv-ln);border-radius:6px;padding:2px 7px;color:var(--mv-mu);background:var(--mv-soft);white-space:nowrap;}
.mv-sw{display:flex;gap:4px;background:var(--mv-bg);padding:4px;border-radius:12px;margin-inline-start:10px;}
.mv-sw a,.mv-sw span{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:0 14px;border-radius:9px;font-size:13px;font-weight:500;color:var(--mv-mu);text-decoration:none;}
.mv-sw a:hover{color:var(--mv-ink);background:#fff;}
.mv-sw .on{background:#fff;color:var(--mv-p);box-shadow:0 2px 8px -3px rgba(40,44,120,.3);}
.mv-sw .mv-key{padding:1px 5px;font-size:10.5px;}
.mv-x{margin-inline-start:auto;width:40px;height:40px;border:0;border-radius:10px;background:transparent;color:var(--mv-mu);font-size:24px;line-height:1;cursor:pointer;}
.mv-x:hover{background:var(--mv-pl);color:var(--mv-p);}
.mv-x:focus-visible,.mv-btn:focus-visible,.mv-pick-btn:focus-visible,.mv-sw a:focus-visible,.mv-doc:focus-visible{outline:3px solid #c9cff8;outline-offset:1px;}
body.ih-tab:not(.mv-v-doc) .mv-x{display:none;}
.mv-body{flex:1 1 auto;min-height:0;overflow:auto;padding:14px 18px 18px;display:flex;flex-direction:column;gap:12px;}
.mv-foot{display:flex;align-items:center;gap:8px;padding:10px 18px;border-top:1px solid var(--mv-ln);background:#fff;flex:none;flex-wrap:wrap;}
.mv-hint{font-size:12.5px;color:var(--mv-mu);}
.mv-sp{flex:1;}
.mv-btn{height:42px;padding:0 16px;border-radius:12px;border:1px solid var(--mv-ln);background:#fff;font:inherit;font-size:14px;font-weight:500;color:var(--mv-ink);cursor:pointer;white-space:nowrap;}
.mv-btn:hover{border-color:#b7b9f3;background:#fafaff;}
.mv-btn.pri{background:linear-gradient(90deg,var(--mv-p),var(--mv-p2));color:#fff;border-color:transparent;box-shadow:0 8px 18px -8px rgba(75,79,224,.7);}
.mv-btn.pri:hover{filter:brightness(1.05);}

/* the filters */
.mv-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px;align-items:end;position:relative;}
body.mv-v-hist .mv-filters{grid-template-columns:minmax(220px,1.5fr) minmax(200px,1.3fr) minmax(190px,1.3fr) minmax(130px,.9fr) minmax(280px,1.8fr) auto;}
body.mv-v-stock .mv-filters{grid-template-columns:minmax(240px,1.6fr) minmax(150px,1fr) minmax(130px,1fr) minmax(150px,1fr) auto;}
.mv-f{min-width:0;position:relative;}
.mv-f label{display:block;font-size:12px;color:var(--mv-mu);margin-bottom:5px;}
.mv-pick{display:flex;align-items:center;height:44px;border:1px solid var(--mv-ln);border-radius:12px;padding:0 5px 0 10px;background:#fff;gap:8px;min-width:0;}
.mv-pick:focus-within{border-color:#b7b9f3;box-shadow:0 0 0 3px var(--mv-pl);}
.mv-pick input.ctl{border:0 !important;outline:0;box-shadow:none !important;background:transparent;height:34px;width:96px;flex:0 1 96px;min-width:60px;padding:0;font:inherit;font-size:14px;font-weight:500;color:var(--mv-ink);}
.mv-pick-name{flex:1 1 auto;min-width:0;font-size:12px;color:var(--mv-mu);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
.mv-pick-btn{flex:none;width:34px;height:34px;border:0;border-radius:9px;background:var(--mv-bg);color:var(--mv-mu);font-size:15px;cursor:pointer;}
.mv-pick-btn:hover{background:var(--mv-pl);color:var(--mv-p);}
.mv-sel,.mv-date{height:44px;width:100%;border:1px solid var(--mv-ln);border-radius:12px;padding:0 10px;background:#fff;font:inherit;font-size:14px;color:var(--mv-ink);box-sizing:border-box;min-width:0;}
.mv-sel:focus,.mv-date:focus{outline:0;border-color:#b7b9f3;box-shadow:0 0 0 3px var(--mv-pl);}
.mv-period{display:flex;align-items:center;gap:6px;color:var(--mv-mu);}
.mv-period .mv-date{flex:1 1 0;padding:0 6px;}
.mv-typesbtn{width:100%;cursor:pointer;font:inherit;text-align:start;overflow:hidden;}
.mv-chip{white-space:nowrap;display:inline-flex;align-items:center;padding:4px 10px;border-radius:99px;background:var(--mv-pl);color:var(--mv-p);font-size:12.5px;font-weight:500;}
.mv-caret{margin-inline-start:auto;color:var(--mv-mu);padding:0 8px;}
.mv-dd{position:absolute;z-index:20;top:calc(100% + 6px);inset-inline-start:0;width:300px;background:#fff;border:1px solid var(--mv-ln);border-radius:14px;
  box-shadow:0 20px 40px -12px rgba(20,24,61,.35);padding:8px;}
.mv-dd h6{margin:6px 8px 4px;font-size:11.5px;color:var(--mv-mu);font-weight:600;}
.mv-f .mv-dd .mv-ck{display:flex;align-items:center;gap:10px;margin:0;padding:0 8px;border-radius:9px;font-size:13.5px;color:var(--mv-ink);min-height:42px;cursor:pointer;position:relative;}
.mv-ck:hover{background:var(--mv-bg);}
.mv-ck input{position:absolute;opacity:0;width:1px;height:1px;}
.mv-box{width:20px;height:20px;border-radius:6px;border:1.6px solid #c4c7e0;display:grid;place-items:center;flex:none;background:#fff;}
.mv-ck input:checked + .mv-box{background:var(--mv-p);border-color:var(--mv-p);}
.mv-ck input:checked + .mv-box::after{content:"";width:10px;height:6px;border:2px solid #fff;border-top:0;border-inline-end:0;transform:translateY(-1px) rotate(-45deg);}
.mv-ck input:focus-visible + .mv-box{outline:3px solid #c9cff8;outline-offset:1px;}
.mv-f .mv-dd .mv-ck.is-off{opacity:.45;cursor:not-allowed;}
.mv-c{margin-inline-start:auto;font-size:12px;color:var(--mv-mu);}
.mv-acts{display:flex;gap:4px;border-top:1px solid var(--mv-ln);margin-top:6px;padding-top:6px;}
.mv-acts a{font-size:12.5px;color:var(--mv-p);text-decoration:none;padding:8px;border-radius:8px;}
.mv-acts a:hover{background:var(--mv-pl);}

/* the summary cards */
.mv-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px;}
.mv-kpi{border:1px solid var(--mv-ln);border-radius:14px;padding:11px 14px;background:linear-gradient(180deg,#fff,#fbfbff);min-width:0;}
.mv-kpi small{display:block;font-size:12px;color:var(--mv-mu);}
.mv-kpi b{display:block;font-size:20px;font-weight:600;margin-top:3px;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.mv-kpi b em{font-style:normal;font-size:12px;font-weight:500;color:var(--mv-mu);}
.mv-kpi span{display:block;font-size:12px;color:var(--mv-mu);margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.mv-kpi.is-good b{color:var(--mv-ok);}
.mv-kpi.is-bad b{color:var(--mv-dn);}
.mv-kpi.is-mu b{color:var(--mv-mu);}
.mv-note{font-size:12.5px;color:#8A5A00;background:#FFF7E6;border:1px solid #F5DDA8;border-radius:10px;padding:7px 12px;}
.mv-alert{display:flex;gap:8px;align-items:center;padding:10px 14px;border-radius:12px;background:var(--mv-wal);color:var(--mv-wa);font-size:13px;font-weight:500;}
.mv-empty{padding:48px 20px;text-align:center;color:var(--mv-mu);font-size:14px;border:1px dashed var(--mv-ln);border-radius:16px;}

/* blocks and grids */
.mv-blk{border:1px solid var(--mv-ln);border-radius:16px;overflow:hidden;background:#fff;min-width:0;}
.mv-bh{display:flex;align-items:center;gap:10px;padding:9px 14px;background:var(--mv-soft);border-bottom:1px solid var(--mv-ln);flex-wrap:wrap;}
.mv-bh2{border-top:1px solid var(--mv-ln);}
.mv-bh h2{margin:0;font-size:14px;font-weight:600;}
.mv-n{font-size:12px;color:var(--mv-mu);}
.mv-dot{width:10px;height:10px;border-radius:3px;background:var(--mv-st);}
.mv-blk-p .mv-dot{background:var(--mv-bl);}
.mv-blk-s .mv-dot{background:var(--mv-ok);}
.mv-tot{margin-inline-start:auto;font-size:12.5px;color:var(--mv-mu);}
.mv-tot b{color:var(--mv-ink);font-weight:600;}
.mv-scroll{overflow-x:auto;}
.mv-grid{width:100%;border-collapse:collapse;font-size:13px;}
.mv-grid th{font-size:11.5px;font-weight:600;color:var(--mv-mu);text-align:start;padding:7px 10px;background:#f7f8fd;border-bottom:1px solid var(--mv-ln);border-inline-end:1px solid var(--mv-ln2);white-space:nowrap;}
.mv-grid td{height:32px;padding:0 10px;border-bottom:1px solid var(--mv-ln2);border-inline-end:1px solid var(--mv-ln2);}
.mv-grid th:last-child,.mv-grid td:last-child{border-inline-end:0;}
.mv-grid tbody tr:last-child td{border-bottom:0;}
.mv-grid tbody tr:hover td{background:#fafaff;}
.mv-grid .n{text-align:end;font-variant-numeric:tabular-nums;white-space:nowrap;}
.mv-grid .nw{white-space:nowrap;}
.mv-grid .neg{color:var(--mv-dn);}
.mv-grid small{color:var(--mv-mu);font-size:11px;}
.mv-party{max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.mv-sub{display:block;font-size:11px;color:var(--mv-mu);line-height:1.2;}
.mv-mu{color:var(--mv-mu);}
.mv-doc{color:var(--mv-p);font-weight:500;text-decoration:none;border-bottom:1px dashed #b7b9f3;cursor:pointer;}
.mv-doc:hover{border-bottom-style:solid;}
.mv-tag{display:inline-block;padding:1px 7px;border-radius:7px;font-size:11px;font-weight:600;white-space:nowrap;background:var(--mv-stl);color:var(--mv-st);}
.mv-tag.t-si{background:var(--mv-okl);color:var(--mv-ok);}
.mv-tag.t-sr{background:var(--mv-dnl);color:var(--mv-dn);}
.mv-tag.t-pi{background:var(--mv-bll);color:var(--mv-bl);}
.mv-tag.t-pr{background:var(--mv-wal);color:var(--mv-wa);}
.mv-tag.t-sd,.mv-tag.t-so,.mv-tag.t-pg{background:var(--mv-vil);color:var(--mv-vi);}
.mv-none{padding:18px 14px;color:var(--mv-mu);font-size:13px;}
.mv-more{padding:8px 14px;font-size:12px;color:var(--mv-mu);border-top:1px solid var(--mv-ln2);background:var(--mv-soft);}

/* F8: two columns, bars, facts */
.mv-two{display:grid;grid-template-columns:1.05fr 1fr;gap:12px;align-items:start;}
.mv-col{display:flex;flex-direction:column;gap:12px;min-width:0;}
.mv-barcol{width:26%;}
.mv-bar{height:8px;border-radius:99px;background:#eef0f7;overflow:hidden;}
.mv-bar i{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,var(--mv-p),var(--mv-p2));}
.mv-facts td{height:34px;}
.mv-facts .mv-fl{width:38%;font-size:12px;color:var(--mv-mu);}

/* the document */
.mv-dochead{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px 18px;}
.mv-dochead small{display:block;font-size:11.5px;color:var(--mv-mu);}
.mv-dochead b{font-size:14px;font-weight:500;}
.mv-doclines tr.is-this td{background:#f3f3ff;font-weight:500;}
.mv-doclines tr.is-this td:first-child{box-shadow:inset 3px 0 0 var(--mv-p);}
[dir=rtl] .mv-doclines tr.is-this td:first-child{box-shadow:inset -3px 0 0 var(--mv-p);}
.mv-tots{display:grid;grid-template-columns:auto auto;justify-content:end;gap:6px 26px;font-size:13px;padding:4px 4px 0;}
.mv-tots b{font-weight:600;text-align:end;font-variant-numeric:tabular-nums;}
.mv-tots .g{font-size:16px;}
.mv-docscrim{position:fixed;inset:0;z-index:50;background:rgba(15,17,40,.42);display:flex;align-items:flex-start;justify-content:center;padding:clamp(8px,4vh,40px) clamp(8px,4vw,60px);box-sizing:border-box;}
.mv-docscrim[hidden]{display:none;}
.mv-docwin{width:min(1060px,100%);height:min(720px,100%);background:#fff;border-radius:18px;overflow:hidden;box-shadow:0 40px 80px -20px rgba(20,24,61,.55);display:flex;}
.mv-docframe{flex:1;border:0;width:100%;height:100%;background:#fff;}
@media (prefers-reduced-motion:no-preference){.mv-docscrim:not([hidden]) .mv-docwin{animation:mv-pop .16s ease-out both;}}
@keyframes mv-pop{from{transform:translateY(8px);opacity:0;}to{transform:none;opacity:1;}}

@media (max-width:980px){
  body.mv-v-hist .mv-filters,body.mv-v-stock .mv-filters{grid-template-columns:1fr 1fr;}
  .mv-two{grid-template-columns:1fr;}
  .mv-sw{margin-inline-start:0;}
}
@media (max-width:560px){
  body.mv-v-hist .mv-filters,body.mv-v-stock .mv-filters{grid-template-columns:1fr;}
  .mv-head,.mv-body,.mv-foot{padding-inline:12px;}
}
@media print{
  body.mv-page{height:auto;overflow:visible;}
  .mv-win{height:auto;}
  .mv-body{overflow:visible;}
  .mv-filters,.mv-foot,.mv-x,.mv-sw,.mv-docscrim,.hidden-trigger{display:none !important;}
  .mv-blk,.mv-kpi{break-inside:avoid;}
}

html[data-theme=dark] body.mv-page{--mv-ink:#e8eaff;--mv-mu:#a9aed6;--mv-ln:#2c3160;--mv-ln2:#262a52;--mv-bg:#181b38;--mv-soft:#1a1d3d;
  --mv-pl:#262a5e;--mv-okl:#16302a;--mv-ok:#5fd3a4;--mv-bll:#1b2a48;--mv-bl:#8fb4ff;--mv-dnl:#3a1d25;--mv-dn:#ff8d95;
  --mv-wal:#33270f;--mv-wa:#f2c46b;--mv-vil:#2a2150;--mv-vi:#c2a8ff;--mv-stl:#23263f;--mv-st:#c0c4e0;background:#14162e;}
html[data-theme=dark] .mv-win,html[data-theme=dark] .mv-foot,html[data-theme=dark] .mv-blk,html[data-theme=dark] .mv-pick,
html[data-theme=dark] .mv-sel,html[data-theme=dark] .mv-date,html[data-theme=dark] .mv-btn:not(.pri),html[data-theme=dark] .mv-dd,
html[data-theme=dark] .mv-docwin,html[data-theme=dark] .mv-docframe,html[data-theme=dark] .mv-box{background:#14162e;color:var(--mv-ink);}
html[data-theme=dark] .mv-kpi{background:linear-gradient(180deg,#171a36,#14162e);}
html[data-theme=dark] .mv-grid th{background:#1a1d3d;}
html[data-theme=dark] .mv-grid tbody tr:hover td{background:#1b1e40;}
html[data-theme=dark] .mv-sw .on{background:#23275a;}
html[data-theme=dark] .mv-sw a:hover{background:#1f2350;}
html[data-theme=dark] .mv-note{color:#E2AE67;background:#2C2413;border-color:#433204;}
html[data-theme=dark] .mv-doclines tr.is-this td{background:#20245a;}
html[data-theme=dark] .mv-bar{background:#23263f;}

/* ==========================================================================
   ks-v1: the keyboard shortcut panel of a document screen (erp-keys.js).
   An edge tab, the panel sliding in from the right (left in Arabic), pin
   narrows the screen instead of covering it.
   ========================================================================== */
.ks-root{--ks-ink:#14183d;--ks-mu:#6b7096;--ks-ln:#e4e6f2;--ks-bg:#f5f6fb;--ks-p:#4b4fe0;--ks-pl:#eeefff;--ks-w:340px;font-family:var(--font-ui,'Inter','Cairo','Segoe UI',sans-serif);}
.ks-edge{position:fixed;top:0;bottom:0;inset-inline-end:0;width:8px;z-index:2990;}
.ks-handle{position:fixed;top:50%;inset-inline-end:0;transform:translateY(-50%);z-index:2995;width:28px;height:120px;padding:0;
  border:1px solid var(--ks-ln);border-inline-end:0;border-start-start-radius:12px;border-end-start-radius:12px;background:#fff;color:var(--ks-p);
  box-shadow:-6px 0 18px -10px rgba(40,44,120,.45);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;cursor:pointer;
  transition:opacity .15s ease;}
[dir=rtl] .ks-handle{box-shadow:6px 0 18px -10px rgba(40,44,120,.45);}
.ks-handle svg{width:16px;height:16px;flex:none;}
.ks-handle span{writing-mode:vertical-rl;font-size:11px;font-weight:600;color:var(--ks-mu);}
.ks-handle:hover{background:var(--ks-pl);}
.ks-handle:focus-visible,.ks-ib:focus-visible{outline:3px solid #c9cff8;outline-offset:1px;}
body.ks-open .ks-handle{opacity:0;pointer-events:none;}
.ks-panel{position:fixed;top:0;bottom:0;inset-inline-end:0;width:var(--ks-w);max-width:92vw;z-index:3000;background:#fff;color:var(--ks-ink);
  border-inline-start:1px solid var(--ks-ln);box-shadow:-24px 0 48px -24px rgba(20,24,61,.35);display:flex;flex-direction:column;
  transform:translateX(105%);visibility:hidden;transition:transform .22s ease,visibility 0s linear .22s;}
[dir=rtl] .ks-panel{transform:translateX(-105%);box-shadow:24px 0 48px -24px rgba(20,24,61,.35);}
body.ks-open .ks-panel{transform:none;visibility:visible;transition:transform .22s ease,visibility 0s;}
body.ks-pinned .ks-panel{box-shadow:none;}
@media (min-width:1100px){ body.ks-pinned{padding-inline-end:var(--ks-w,340px);box-sizing:border-box;} }
@media (prefers-reduced-motion:reduce){ .ks-panel{transition:none;} }
.ks-head{display:flex;align-items:center;gap:6px;padding:12px 12px 10px 18px;border-bottom:1px solid var(--ks-ln);}
[dir=rtl] .ks-head{padding:12px 18px 10px 12px;}
.ks-head h2{margin:0;flex:1;font-size:15px;font-weight:600;color:var(--ks-ink);}
.ks-ib{width:38px;height:38px;border-radius:10px;border:1px solid transparent;background:transparent;color:var(--ks-mu);display:grid;place-items:center;cursor:pointer;padding:0;}
.ks-ib svg{width:17px;height:17px;}
.ks-ib:hover{background:var(--ks-bg);color:var(--ks-ink);}
.ks-pin[aria-pressed=true]{background:var(--ks-pl);color:var(--ks-p);border-color:#d9dbfb;}
.ks-find{display:flex;align-items:center;gap:8px;margin:12px 14px 2px 18px;height:40px;border:1px solid var(--ks-ln);border-radius:10px;padding:0 10px;color:var(--ks-mu);}
[dir=rtl] .ks-find{margin:12px 18px 2px 14px;}
.ks-find:focus-within{border-color:#b7b9f3;box-shadow:0 0 0 3px var(--ks-pl);}
.ks-find svg{width:15px;height:15px;flex:none;}
.ks-find input{flex:1;min-width:0;border:0;outline:0;background:transparent;font:inherit;font-size:13.5px;color:var(--ks-ink);height:36px;}
.ks-list{flex:1;min-height:0;overflow:auto;padding:2px 14px 14px 18px;}
[dir=rtl] .ks-list{padding:2px 18px 14px 14px;}
.ks-g{margin-top:14px;}
.ks-g h3{margin:0 0 4px;font-size:11.5px;font-weight:600;color:var(--ks-mu);display:flex;align-items:center;gap:8px;}
.ks-g h3 i{width:8px;height:8px;border-radius:3px;}
.ks-r{display:flex;align-items:center;gap:10px;min-height:42px;padding:0 8px;border-radius:9px;font-size:13.5px;}
.ks-r:hover{background:var(--ks-bg);}
.ks-t{flex:1;min-width:0;}
.ks-keys{display:inline-flex;align-items:center;gap:4px;flex:none;}
.ks-plus,.ks-or{font-size:11px;color:var(--ks-mu);}
.ks-k{min-width:26px;height:26px;padding:0 7px;display:inline-grid;place-items:center;border-radius:7px;font:600 11.5px var(--font-ui,'Inter','Segoe UI',sans-serif);
  color:var(--ks-ink);background:linear-gradient(#fff,#f3f4fa);border:1px solid #d5d8e8;box-shadow:0 2px 0 #d5d8e8,inset 0 1px 0 #fff;white-space:nowrap;}
.ks-none{padding:18px 8px;font-size:13px;color:var(--ks-mu);}
.ks-foot{display:flex;align-items:center;gap:8px;border-top:1px solid var(--ks-ln);padding:10px 18px;font-size:12px;color:var(--ks-mu);}
@media (pointer:coarse){ .ks-handle{width:34px;height:132px;} .ks-r{min-height:46px;} }
@media print{ .ks-root{display:none !important;} body.ks-pinned{padding:0 !important;} }
html[data-theme=dark] .ks-root{--ks-ink:#e8eaff;--ks-mu:#a9aed6;--ks-ln:#2c3160;--ks-bg:#1b1e40;--ks-pl:#262a5e;--ks-p:#aab0ff;}
html[data-theme=dark] .ks-panel,html[data-theme=dark] .ks-handle{background:#14162e;}
html[data-theme=dark] .ks-k{color:#e8eaff;background:linear-gradient(#22264a,#1a1d3d);border-color:#3a3f74;box-shadow:0 2px 0 #3a3f74;}
/* ks-v3: a key whose button cannot be used just now */
.ks-r.is-off{opacity:.42;}

/* ==========================================================================
   vm-v1: open a screen by voice - the microphone in the menu search box and
   the listening state at the top of its list (erp-menu-search.js)
   ========================================================================== */
.ms-mic{position:absolute;inset-inline-end:5px;top:50%;transform:translateY(-50%);width:32px;height:32px;border:0;border-radius:9px;
  background:transparent;color:var(--clr-primary,#4B49AC);display:grid;place-items:center;cursor:pointer;padding:0;z-index:1;}
.ms-mic[hidden]{display:none;}
.ms-mic:hover{background:var(--clr-primary-soft,#EEEDF8);}
.ms-mic:focus-visible{outline:3px solid #c9cff8;outline-offset:1px;}
.menu-search.has-mic .ms-kbd{inset-inline-end:44px;}
.menu-search.has-mic .ms-input,.app.sh2 .menu-search.has-mic .ms-input{padding-inline-end:104px;}
.menu-search.is-listening .ms-mic{background:linear-gradient(135deg,#4b4fe0,#7b5cf5);color:#fff;}
.menu-search.is-listening .ms-mic::before,.menu-search.is-listening .ms-mic::after{content:"";position:absolute;inset:-5px;border-radius:13px;
  border:2px solid rgba(75,79,224,.35);animation:ms-ring 1.4s ease-out infinite;pointer-events:none;}
.menu-search.is-listening .ms-mic::after{animation-delay:.7s;}
.menu-search.is-listening .ms-input{border-color:#b7b9f3;box-shadow:0 0 0 4px rgba(75,79,224,.12);}
@keyframes ms-ring{from{transform:scale(.85);opacity:1;}to{transform:scale(1.35);opacity:0;}}
.ms-voice{display:flex;align-items:center;gap:12px;padding:12px 14px;border-bottom:1px solid var(--clr-border,#e4e6f2);}
.ms-voice[hidden]{display:none;}
.ms-wave{display:none;align-items:center;gap:3px;height:22px;flex:none;}
.ms-voice.is-listen .ms-wave{display:flex;}
.ms-wave i{width:3px;border-radius:2px;background:linear-gradient(#4b4fe0,#7b5cf5);animation:ms-w 1s ease-in-out infinite;}
.ms-wave i:nth-child(1){height:8px;}.ms-wave i:nth-child(2){height:16px;animation-delay:.1s;}.ms-wave i:nth-child(3){height:22px;animation-delay:.2s;}
.ms-wave i:nth-child(4){height:14px;animation-delay:.3s;}.ms-wave i:nth-child(5){height:9px;animation-delay:.4s;}
@keyframes ms-w{50%{transform:scaleY(.4);}}
.ms-vtxt{flex:1;min-width:0;}
.ms-vtxt b{display:block;font-size:14.5px;font-weight:600;color:var(--clr-text,#14183d);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.ms-vtxt small{display:block;font-size:12px;color:var(--clr-muted,#6b7096);margin-top:2px;}
.ms-voice.is-err .ms-vtxt b{color:#c2353f;white-space:normal;}
.ms-vstop{height:32px;padding:0 12px;border-radius:9px;border:1px solid var(--clr-border,#e4e6f2);background:var(--clr-surface,#fff);
  font:inherit;font-size:12.5px;color:var(--clr-muted,#6b7096);cursor:pointer;flex:none;}
.ms-vstop[hidden]{display:none;}
.ms-vstop:hover{color:var(--clr-text,#14183d);}
@media (prefers-reduced-motion:reduce){.ms-wave i,.menu-search.is-listening .ms-mic::before,.menu-search.is-listening .ms-mic::after{animation:none;}}
@media (max-width:767px){ .menu-search.is-open .ms-box .ms-mic{inset-inline-end:6px;} }
html[data-theme=dark] .ms-vtxt b{color:#e8eaff;}
html[data-theme=dark] .ms-voice.is-err .ms-vtxt b{color:#ff8d95;}
/* vm-v1b: the microphone where this browser / address cannot listen */
.ms-mic.is-off{color:var(--clr-muted,#9a9ebd);opacity:.7;}

/* ---- vd-v1: VAT Discrepancies (Modules/VAT/VatDiscrepancies.aspx; drawn by VatRender.DiscrepView) ---- */
.vd-page .vt-tabs[hidden]{display:none !important;}
.vd-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:14px 0 6px;}
.vd-g{display:grid;grid-template-columns:minmax(0,1fr) auto auto;grid-template-areas:"t n r" "f f f";gap:2px 12px;align-items:center;
  text-align:start;width:100%;padding:10px 14px;border:1px solid var(--clr-border);border-inline-start-width:4px;border-radius:12px;
  background:var(--clr-surface,#fff);font:inherit;color:inherit;cursor:pointer;}
.vd-g:hover{background:var(--clr-primary-soft);}
.vd-g:focus-visible{outline:2px solid var(--clr-primary);outline-offset:2px;}
.vd-g.vd-s3{border-inline-start-color:var(--vt-no);}
.vd-g.vd-s2{border-inline-start-color:#B7791F;}
.vd-g.vd-s1{border-inline-start-color:var(--vt-off);}
.vd-g.is-cur{background:var(--clr-primary-soft);border-color:var(--clr-primary);}
.vd-gt{grid-area:t;font-weight:600;}
.vd-gn{grid-area:n;}
.vd-gr{grid-area:r;font-weight:600;font-variant-numeric:tabular-nums;min-width:90px;text-align:end;}
.vd-gf{grid-area:f;font-size:12px;color:var(--clr-muted);line-height:1.4;}
.vd-clean{margin:4px 0 12px;font-size:12px;color:var(--clr-muted);}
.vd-list .card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;}
.vd-fix{margin:0 0 10px;padding:8px 12px;border-radius:8px;background:var(--vt-info-bg);font-size:13px;line-height:1.45;}
.vd-grid .vd-risk{font-weight:600;}
.vd-grid .vd-no{font-weight:600;color:var(--clr-primary);}
@media (max-width: 900px){ .vd-groups{grid-template-columns:minmax(0,1fr);} }
/* vd-v2 (0792): the Fix column of VAT Discrepancies (Content/js/vat/vat-fix.js) */
.vd-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.vd-tg{display:inline-flex;align-items:center;gap:6px;border:0;background:none;padding:0;font:inherit;font-size:13px;color:var(--clr-text);cursor:pointer;}
.vd-tg .bi{color:var(--clr-primary);}
.vd-fx{height:28px;padding:0 10px;border:1px solid var(--clr-border);border-radius:8px;background:var(--clr-surface,#fff);color:var(--clr-text);
  font:inherit;font-size:12.5px;font-weight:600;display:inline-flex;align-items:center;gap:5px;cursor:pointer;white-space:nowrap;}
.vd-fx:hover{background:var(--clr-primary-soft);}
.vd-fx:focus-visible,.vd-tg:focus-visible{outline:2px solid var(--clr-primary);outline-offset:2px;}
.vd-fx.pri{background:linear-gradient(90deg,#4b4fe0,#7b5cf5);color:#fff;border-color:transparent;}
.vd-fx:disabled{opacity:.5;cursor:default;}
.vd-fixc{white-space:nowrap;}
.vd-fixc > * + *{margin-inline-start:6px;}
.vd-lock{display:inline-flex;align-items:center;gap:4px;font-size:12px;color:#8a5a00;background:var(--vt-warn-bg);border-radius:8px;padding:3px 8px;}
.vd-grid .vd-sel{width:30px;text-align:center;}
.vd-grid tr.vd-rv td{color:var(--clr-muted);}
.vd-rvtag{font-size:11.5px;background:var(--vt-ok-bg);color:var(--vt-ok);border-radius:9px;padding:1px 8px;font-weight:600;}
.vd-rvtxt{font-size:12px;white-space:normal;}
.vd-docwin{position:fixed;inset:0;background:rgba(14,18,64,.38);display:grid;place-items:center;z-index:2000;}
.vd-docwin[hidden]{display:none;}
.vd-docbox{position:relative;width:min(1100px,94vw);height:min(760px,90vh);background:var(--clr-surface,#fff);border-radius:14px;overflow:hidden;box-shadow:0 20px 60px rgba(14,18,64,.3);}
.vd-docbox iframe{width:100%;height:100%;border:0;}
.vd-docx{position:absolute;top:8px;inset-inline-end:10px;width:32px;height:32px;border-radius:8px;border:1px solid var(--clr-border);background:var(--clr-surface,#fff);font-size:18px;cursor:pointer;z-index:1;}
.vd-dlg{width:min(520px,92vw);background:var(--clr-surface,#fff);border-radius:16px;box-shadow:0 20px 60px rgba(14,18,64,.3);padding:18px 20px;}
.vd-dlg h3{margin:0 0 4px;font-size:17px;}
.vd-dlgp{margin:0 0 12px;color:var(--clr-muted);font-size:13px;}
.vd-dlgkv{display:grid;grid-template-columns:120px 1fr;gap:4px 10px;margin:0 0 12px;padding:10px 12px;border-radius:10px;background:var(--clr-primary-soft);font-size:13px;}
.vd-dlgkv dt{color:var(--clr-muted);}
.vd-dlgkv dd{margin:0;font-weight:600;}
.vd-dlg label{display:block;font-size:12.5px;font-weight:600;margin:0 0 4px;}
.vd-dlg select,.vd-dlg textarea{width:100%;box-sizing:border-box;border:1px solid var(--clr-border);border-radius:9px;padding:8px 10px;font:inherit;margin-bottom:10px;background:var(--clr-surface,#fff);color:var(--clr-text);}
.vd-dlgm{color:var(--vt-no);font-size:12.5px;min-height:18px;}
.vd-dlga{display:flex;justify-content:flex-end;gap:8px;}
.vd-dlga .vd-fx{height:34px;padding:0 14px;}
.vd-grid .vd-ckc{min-width:220px;}
.vd-grid .vd-det{display:block;margin-top:2px;font-size:11.5px;color:var(--clr-muted);white-space:normal;}
.vd-grid .vd-noc{white-space:nowrap;}
.vd-grid .vd-noc .vd-no{font-weight:600;color:var(--clr-primary);}
.vd-grid td.vd-fixc{white-space:normal;min-width:190px;}
.vd-grid td.vd-fixc > *{margin:2px 0;}
.vd-grid td.vd-fixc > * + *{margin-inline-start:4px;}
