/* Status: PROTOTYPE (not production code) — DRAFT for the owner's review, 2026-11-18 (CR-657 follow-up, the standards the owner sent on
 * Decided (CR-657, 2026-11-18): GOV-R274-A shared controls; GOV-R279-A, GOV-R277-A theme builder, additive controls; GOV-R278-A organisation theme (Security follow-up SEC-R037).
 * 2026-11-17). The design tokens every module will use: one type scale, one radius set, an 8pt spacing scale, the elevation rule
 * (1px borders on surfaces, shadows only on what floats), the chart palette derived from the theme colour, and the motion timing.
 * CR-715 (FA-1, GOV-R370-A; P1 of the theme roadmap, G-02 / GOV-R321-A, G-28 / GOV-R347-A): the scoped rules also cover the pop-up roots
 * (#modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer), and the card rules also take .es-tw-card, the mark of emis-cards.js on the
 * Tailwind panels; every rule still waits for an explicit builder choice, so with no choice nothing changes.
 * The card rules carry :not(#es-no-id) (an id that never exists, specificity only): in dark mode the shared remap .dark :is(.bg-white, …) (0,4,0) outranked
 * them (0,2,1), so a card choice reached the Tailwind panels in light mode only; the rules still apply only with a builder choice.
 * Presentation only. Load after emis-theme.css.
 * GOV-R322-A (CR-723, gap G-03): the third tier of the tokens. emis-theme.css holds the primitive tokens (the ramps) and the semantic tokens
 * (the meanings) with the Tailwind mapping; this file holds the sizes, the fixed meanings and the chart series below, the COMPONENT tokens
 * (--btn-*, --card-*, --field-*, --table-*, --pop-*), each an alias of the value its rules use today, and the builder variant rules.
 * GOV-R333-A (CR-723, gap G-14): the variant rules that name module-specific legacy markup are in emis-adapters.css, loaded right after this
 * file; a pointer comment marks the place of each moved block. */
/* CR-727, GOV-R391-A */
/* #modal-overlay, the pop-up root of Payroll (Prototypes/Payroll/index.html; its dialog content is drawn in its child #modal-container), joins
 * every list of covered pop-up roots right after #modal-container; an :is() takes its most specific argument, an id either way, so the
 * specificity of no rule changes, and every rule still waits for its builder choice. */
:root {
  /* type scale (px): 12 / 13 / 14 / 16 / 20 / 24 / 30 / 38 */
  --fs-1: 12px; --fs-2: 13px; --fs-3: 14px; --fs-4: 16px; --fs-5: 20px; --fs-6: 24px; --fs-7: 30px; --fs-8: 38px;
  /* 8pt grid */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 40px; --sp-8: 48px;
  /* radius: controls and buttons 10, cards 16, chips and pills full */
  --r-ctl: 10px; --r-card: 16px; --r-pill: 999px;
  /* layout */
  --side-w: 260px; --side-rail: 72px; --top-h: 64px; --row-h: 44px; --row-h-dense: 36px; --row-h-comfy: 52px;
  /* elevation: surfaces carry a 1px line; only floating layers (menus, windows, toasts) carry a shadow */
  --edge: 1px solid rgb(var(--border));
  /* GOV-R331-A (CR-723): one shadow colour for the literal shadows of the variant rules (the slate-900 triplet they wrote, light and dark).
   * --float-1..3 keep their values: none equals a step of --shadow-1..3 (emis-theme.css), so they are not aliased to it; they read --shadow-color */
  --shadow-color: 15 23 42;
  --float-1: 0 4px 12px -4px rgb(var(--shadow-color) / .12); --float-2: 0 12px 28px -8px rgb(var(--shadow-color) / .18); --float-3: 0 24px 48px -12px rgb(var(--shadow-color) / .28);
  /* GOV-R332-A (CR-723): the layout tokens, with the values the shared shell draws today (emis-shell.css: #es-bar 30, .es-modal-w and
   * .es-drawer-w 90, the command palette opens in the same modal layer, #es-toasts 95; #es-main padding; .es-kpis gap; the frame has no
   * maximum width). Declared only: the shell reads its literal values until a change request moves it. Breakpoints cannot be variables in a
   * media query: they are documented constants of the token catalogue (640, 767/768, 900, 1000, 1023/1024, 1100, 1180, 1279/1280 px). */
  --z-base: 1; --z-sticky: 30; --z-drawer: 90; --z-modal: 90; --z-toast: 95; --z-palette: 90;
  --layout-max: none; --content-max: none; --page-pad: 16px 20px 32px; --grid-gap: 12px;
  /* motion */
  --ease: cubic-bezier(.22, 1, .36, 1); --t-fast: 150ms; --t: 200ms; --t-slow: 250ms;
  /* the chart palette: eight series told apart by lightness and pattern as well as hue; the first two are the theme colour */
  --ch-1: var(--brand-600); --ch-2: var(--brand-300); --ch-3: 245 158 11; --ch-4: 14 165 233; --ch-5: 236 72 153; --ch-6: 100 116 139; --ch-7: 132 204 22; --ch-8: 168 85 247;
  /* fixed meanings (never the theme colour) */
  --ok: 5 150 105; --warn: 217 119 6; --bad: 225 29 72; --info: 2 132 199;
  /* the contrasting series palette a theme may choose for charts with many series (theme builder, «متباينة»): told apart by hue and lightness */
  --chv-1: 37 99 235; --chv-2: 234 88 12; --chv-3: 22 163 74; --chv-4: 219 39 119; --chv-5: 147 51 234; --chv-6: 8 145 178; --chv-7: 202 138 4; --chv-8: 71 85 105;
  --chart-bar-r: 6px;
}
.dark { --edge: 1px solid rgb(var(--border-strong)); --ch-2: var(--brand-400);
  /* GOV-R330-A (CR-723, gap G-11): the dark values of the fixed meanings. Many shared and module rules read --ok / --warn / --bad / --info
   * in dark mode today (emis-shell.css, emis-states.css, emis-theme-studio.css, the module prototypes), so a new dark value would change
   * what they draw: the dark values are kept EQUAL to the light ones here. The values proposed to meet 4.5:1 on the dark surface
   * (17 24 39), the 300 steps the dark Tailwind mapping of emis-theme.css already draws for these meanings, to be taken by a change
   * request that measures the screens: --ok-dark-proposed: 110 231 183; --warn-dark-proposed: 252 211 77; --bad-dark-proposed: 253 164 175;
   * --info-dark-proposed: 125 211 252 (comment only, not live variables). */
  --ok: 5 150 105; --warn: 217 119 6; --bad: 225 29 72; --info: 2 132 199; }
/* GOV-R322-A (CR-723): TIER 3, the component tokens. Each is an alias of the semantic token or the value its rules draw today, so nothing
 * changes until a theme sets it. Declared on :root and on every [data-hue] element, as the semantic tokens of emis-theme.css are, so an
 * alias resolves against the ramp of a local hue the same way the rule it replaces did. */
:root, [data-hue] {
  --btn-radius: var(--r-ctl);
  --card-bg: rgb(var(--surface)); --card-radius: var(--r-card); --card-border: rgb(var(--border));
  --field-bg: rgb(var(--surface)); --field-border: rgb(var(--control-border)); --field-radius: var(--r-ctl);
  --table-head-bg: rgb(var(--surface-2));
  --pop-bg: rgb(var(--surface)); --pop-radius: 18px;
  /* CR-724, GOV-R348-A */
  /* the tab indicator, the alert side bar and the square pager corner; read only by the rules of tabLook, alertLook and pagerLook below */
  --tab-indicator-w: 2px; --alert-bar-w: 4px; --pager-square-radius: 4px;
  /* CR-727, GOV-R334-A */
  /* the width of the start-side bar of the current menu item; read only by the rules of navActive below (the side menu draws 3px today) */
  --nav-indicator-w: 3px;
}
.tabular, .kpi-v, table td.num, table th.num { font-variant-numeric: tabular-nums; }
/* the user's appearance (emis-theme-studio.js / My profile): top bar height and reduce motion, for pages that use the tokens */
html[data-bar="s"] { --top-h: 56px; } html[data-bar="l"] { --top-h: 72px; }
html[data-es-motion="reduce"] *, html[data-es-motion="reduce"] *::before, html[data-es-motion="reduce"] *::after { animation: none !important; transition: none !important; }
/* ---- the cards of a theme (theme builder, owner 2026-11-18; GOV-R275-A): no attribute = the card as the module draws it.
 * They reach every .card / .es-card of every module, because a module's card takes its look from these rules, not from fixed values. */
/* GOV-R322-A, GOV-R331-A (CR-723): the base, line and soft cards read the component tokens --card-bg, --card-radius, --card-border and the
 * shadow colour --shadow-color, each the same value the rule wrote before */
html[data-card]:not(#es-no-id) :is(.card, .es-card, .es-tw-card) { background: var(--card-bg); border-radius: var(--card-radius); transition: box-shadow var(--t) var(--ease), transform var(--t) var(--ease), border-color var(--t) var(--ease); }
html[data-card="line"]:not(#es-no-id) :is(.card, .es-card, .es-tw-card) { border: 1px solid var(--card-border); box-shadow: none; }
html[data-card="soft"]:not(#es-no-id) :is(.card, .es-card, .es-tw-card) { border: 1px solid rgb(var(--border) / .55); box-shadow: 0 1px 2px rgb(var(--shadow-color) / .04), 0 6px 18px -8px rgb(var(--shadow-color) / .12); }
html[data-card="raised"]:not(#es-no-id) :is(.card, .es-card, .es-tw-card) { border: 1px solid transparent; box-shadow: var(--float-2); }
html[data-card="flat"]:not(#es-no-id) :is(.card, .es-card, .es-tw-card) { border: 1px solid transparent; box-shadow: none; background: rgb(var(--surface-2)); }
html[data-card="glass"]:not(#es-no-id) :is(.card, .es-card, .es-tw-card) { background: rgb(var(--surface) / .7); -webkit-backdrop-filter: blur(12px) saturate(1.3); backdrop-filter: blur(12px) saturate(1.3); border: 1px solid rgb(255 255 255 / .55); box-shadow: var(--float-1); }
html.dark[data-card="glass"]:not(#es-no-id) :is(.card, .es-card, .es-tw-card) { border-color: rgb(255 255 255 / .08); }
html[data-card-accent="top"]:not(#es-no-id) :is(.card, .es-card, .es-tw-card) { border-top: 3px solid rgb(var(--brand-600)); }
html[data-card-accent="side"]:not(#es-no-id) :is(.card, .es-card, .es-tw-card) { border-inline-start: 3px solid rgb(var(--brand-600)); }
html[data-card-accent="grad"]:not(#es-no-id) :is(.card, .es-card, .es-tw-card) { border: 1.5px solid transparent; background: linear-gradient(rgb(var(--surface)), rgb(var(--surface))) padding-box, var(--grad-brand) border-box; }
html[data-card-head="tint"]:not(#es-no-id) :is(.card, .es-card, .es-tw-card) > :is(.card-h, .card-head) { background: rgb(var(--brand-50)); padding-bottom: var(--sp-3); border-radius: var(--r-card) var(--r-card) 0 0; }
html.dark[data-card-head="tint"]:not(#es-no-id) :is(.card, .es-card, .es-tw-card) > :is(.card-h, .card-head) { background: rgb(var(--brand-600) / .12); }
html[data-card-head="line"]:not(#es-no-id) :is(.card, .es-card, .es-tw-card) > :is(.card-h, .card-head) { padding-bottom: var(--sp-3); border-bottom: 1px solid rgb(var(--border)); }
html[data-card-pad="s"]:not(#es-no-id) :is(.card, .es-card, .es-tw-card) > :is(.card-h, .card-b, .card-head, .card-body) { padding-inline: var(--sp-3); }
html[data-card-pad="l"]:not(#es-no-id) :is(.card, .es-card, .es-tw-card) > :is(.card-h, .card-b, .card-head, .card-body) { padding-inline: var(--sp-5); }
html[data-card-pad="l"]:not(#es-no-id) :is(.card, .es-card, .es-tw-card) > :is(.card-b, .card-body) { padding-bottom: var(--sp-5); }
html[data-card]:not([data-card-hover]) :is(.card, .es-card, .es-tw-card):is(:hover, .etb-hov), html[data-card-hover="lift"] :is(.card, .es-card, .es-tw-card, .kpi):is(:hover, .etb-hov) { transform: translateY(-2px); box-shadow: var(--float-2); }
html[data-card-hover="glow"]:not(#es-no-id) :is(.card, .es-card, .es-tw-card, .kpi):is(:hover, .etb-hov) { border-color: rgb(var(--brand-400)); box-shadow: 0 0 0 3px rgb(var(--brand-500) / .14); }
html[data-card-hover="still"]:not(#es-no-id) :is(.card, .es-card, .es-tw-card, .kpi):is(:hover, .etb-hov) { transform: none !important; }
/* ---- phase one of the theme builder (owner 2026-11-18): buttons, input fields and tables of a theme. As for the cards, no attribute =
 * the control as the module draws it; the rules reach the shared shell's buttons (.es-btn), the module buttons (.btn, .btn-p, .btn-s),
 * the form fields of every screen (#es-main, .emis-form) and every table, and the builder's preview (.etb-sample). */
/* GOV-R333-A (CR-723): the button rules (#modal-confirm-btn, #modal-cancel-btn, .lg-btn and the Payroll .btn / .btn-p / .btn-s, with the shared
 * .es-btn / .es-b in the same :is() lists) moved unchanged to emis-adapters.css */
/* input fields: the look of the field and of its focus (the height stays the one control height, --control-h) */
/* GOV-R322-A (CR-723): the outline and filled fields read the component tokens --field-bg and --field-radius (the same values) */
html[data-input] :is(#es-main, main, .emis-form, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]), select, textarea, .emsel-btn) { transition: background .15s, border-color .15s, box-shadow .15s; }
html[data-input="outline"] :is(#es-main, main, .emis-form, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]), select, textarea, .emsel-btn) { background: var(--field-bg); border: 1px solid rgb(var(--border-strong)); border-radius: var(--field-radius); }
html[data-input="filled"] :is(#es-main, main, .emis-form, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]), select, textarea, .emsel-btn) { background: rgb(var(--surface-2)); border: 1px solid transparent; border-radius: var(--field-radius); }
html[data-input="underline"] :is(#es-main, main, .emis-form, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]), select, textarea, .emsel-btn) { background: transparent; border: 0; border-bottom: 1.5px solid rgb(var(--border-strong)); border-radius: 0; }
html[data-input-focus="glow"] :is(#es-main, main, .emis-form, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) :is(input, select, textarea, .emsel-btn):is(:focus, .etb-foc) { outline: none; border-color: rgb(var(--brand-500)); box-shadow: 0 0 0 4px rgb(var(--brand-500) / .2); }
html[data-input-focus="line"] :is(#es-main, main, .emis-form, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) :is(input, select, textarea, .emsel-btn):is(:focus, .etb-foc) { outline: none; box-shadow: none; border-color: rgb(var(--brand-600)); border-bottom-width: 2px; }
html[data-input-focus="ring"] :is(#es-main, main, .emis-form, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) :is(input, select, textarea, .emsel-btn):is(:focus, .etb-foc) { outline: 2px solid rgb(var(--brand-600)); outline-offset: 1px; box-shadow: none; }
/* tables: the header, the rows, the row under the pointer and the chosen row */
html[data-t-head="plain"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table thead th { background: transparent; color: rgb(var(--ink-muted)); text-transform: none; border-bottom: 1px solid rgb(var(--border)); }
html[data-t-head="tint"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table thead th { background: rgb(var(--brand-50)); color: rgb(var(--brand-800)); border-bottom: 1px solid rgb(var(--brand-200)); }
html.dark[data-t-head="tint"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table thead th { background: rgb(var(--brand-600) / .15); color: rgb(var(--brand-200)); }
html[data-t-head="dark"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table thead th { background: rgb(var(--brand-800)); color: #fff; border-bottom: 0; }
html[data-t-rows="lines"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody tr { background: transparent; } html[data-t-rows="lines"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody td { border-bottom: 1px solid rgb(var(--border)); }
html[data-t-rows="zebra"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody tr:nth-child(even) td { background: rgb(var(--surface-2)); } html[data-t-rows="zebra"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody td { border-bottom: 0; }
html[data-t-rows="none"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody td { border-bottom: 0; }
/* the row under the pointer (owner 2026-11-18: «التحكم في استايل حركة الماوس على الجريد وأنماطها»): seven patterns and three speeds.
 * .etb-hov is the row the theme builder hovers by itself while its hover control is pointed at, so the pattern shows without moving the mouse. */
html[data-t-hover] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody tr { position: relative; }
html[data-t-hover="brand"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody tr:is(:hover, .etb-hov) td { background: rgb(var(--brand-50)); }
html.dark[data-t-hover="brand"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody tr:is(:hover, .etb-hov) td { background: rgb(var(--brand-600) / .12); }
html[data-t-hover="gray"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody tr:is(:hover, .etb-hov) td { background: rgb(var(--surface-2)); }
html[data-t-hover="bar"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody tr:is(:hover, .etb-hov) td { background: rgb(var(--brand-50) / .6); }
html[data-t-hover="bar"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody tr:is(:hover, .etb-hov) td:first-child { box-shadow: inset -3px 0 0 rgb(var(--brand-600)); }
html[dir="ltr"][data-t-hover="bar"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody tr:is(:hover, .etb-hov) td:first-child { box-shadow: inset 3px 0 0 rgb(var(--brand-600)); }
html.dark[data-t-hover="bar"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody tr:is(:hover, .etb-hov) td { background: rgb(var(--brand-600) / .1); }
/* GOV-R331-A (CR-723): the lifted row reads --shadow-color (the same 15 23 42) */
html[data-t-hover="lift"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody tr:is(:hover, .etb-hov) { transform: translateY(-1px); box-shadow: 0 8px 18px -12px rgb(var(--shadow-color) / .45); z-index: 1; }
html[data-t-hover="lift"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody tr:is(:hover, .etb-hov) td { background: rgb(var(--surface)); }
html[data-t-hover="outline"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody tr:is(:hover, .etb-hov) td { box-shadow: inset 0 1px 0 rgb(var(--brand-400)), inset 0 -1px 0 rgb(var(--brand-400)); }
html[data-t-hover="outline"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody tr:is(:hover, .etb-hov) td:first-child { box-shadow: inset 0 1px 0 rgb(var(--brand-400)), inset 0 -1px 0 rgb(var(--brand-400)), inset -1px 0 0 rgb(var(--brand-400)); }
html[data-t-hover="outline"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody tr:is(:hover, .etb-hov) td:last-child { box-shadow: inset 0 1px 0 rgb(var(--brand-400)), inset 0 -1px 0 rgb(var(--brand-400)), inset 1px 0 0 rgb(var(--brand-400)); }
html[data-t-hover="none"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody tr:is(:hover, .etb-hov) td { background: inherit; box-shadow: none; }
html[data-t-hover-fx="instant"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody :is(tr, td) { transition: none !important; }
html[data-t-hover-fx="smooth"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody :is(tr, td) { transition: background .15s ease, box-shadow .15s ease, transform .15s ease !important; }
html[data-t-hover-fx="slow"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody :is(tr, td) { transition: background .32s ease, box-shadow .32s ease, transform .32s ease !important; }
html[data-es-motion="reduce"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody tr { transform: none !important; }
html[data-t-sel="bar"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody tr:is(.sel, .selected, .on, .active, .eg-sel, [aria-selected="true"]) td:first-child { box-shadow: inset -3px 0 0 rgb(var(--brand-600)); }
html[dir="ltr"][data-t-sel="bar"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody tr:is(.sel, .selected, .on, .active, .eg-sel, [aria-selected="true"]) td:first-child { box-shadow: inset 3px 0 0 rgb(var(--brand-600)); }
html[data-t-sel="fill"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody tr:is(.sel, .selected, .on, .active, .eg-sel, [aria-selected="true"]) td { background: rgb(var(--brand-100)); } html.dark[data-t-sel="fill"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody tr:is(.sel, .selected, .on, .active, .eg-sel, [aria-selected="true"]) td { background: rgb(var(--brand-600) / .22); }
/* ---- phase one, item 1 (owner 2026-11-18): the header, its chips, the KPI deck and the stepper. No attribute = as the module draws them. */
/* GOV-R333-A (CR-723): the top bar look (#top-bar.hb-bar) and the chips of the page band (.page-hero) moved unchanged to emis-adapters.css */
/* the KPI deck: the first card as the hero (wide, framed and tinted in the theme colour; which KPI comes first is the screen's decision) */
/* the hero card keeps the module's own frame (Payroll draws its first KPI with the gradient frame): it adds the width, a soft tint inside the
 * frame and a larger figure; a module without a frame gets the theme colour's line (owner 2026-11-18: «دون المساس بالاستايلات الموجودة») */
html[data-kpi-hero="first"] :is(.kpis, .etb-kpis) > :first-child { grid-column: span 2; border: 1.5px solid transparent !important; background: linear-gradient(135deg, rgb(var(--brand-50)), rgb(var(--surface)) 72%) padding-box, var(--grad-brand) border-box !important; box-shadow: 0 10px 26px -18px rgb(var(--brand-600) / .7); }
html.dark[data-kpi-hero="first"] :is(.kpis, .etb-kpis) > :first-child { background: linear-gradient(135deg, rgb(var(--brand-900)), rgb(var(--surface)) 72%) padding-box, var(--grad-brand) border-box !important; }
html[data-kpi-hero="first"] :is(.kpis, .etb-kpis) > :first-child :is(.v, .kpi-v) { font-size: 1.4em; color: rgb(var(--brand-800)); }
html.dark[data-kpi-hero="first"] :is(.kpis, .etb-kpis) > :first-child :is(.v, .kpi-v) { color: rgb(var(--brand-200)); }
html[data-kpi-hero="first"] :is(.kpis, .etb-kpis) > :first-child::after { display: none; }
/* KPI icons in coloured circles: the chart series colours, never the status colours (amber = pending, green = approved, GOV-R143-A) */
/* the currency sign beside a figure */
html[data-kpi-cur="small"] :is(.kpi, .etb-kpi) :is(.v, .kpi-v) :is(small, .cur) { font-size: .52em; font-weight: 600; opacity: .7; margin-inline-start: 3px; letter-spacing: 0; }
html[data-kpi-cur="same"] :is(.kpi, .etb-kpi) :is(.v, .kpi-v) :is(small, .cur) { font-size: 1em; font-weight: inherit; opacity: 1; color: inherit; }
/* the alert chip of a KPI card (.kpi-alert, a shared class): the fixed meaning colour; where a click leads is the screen's decision */
.kpi-alert { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 3px 10px; border: 1px solid rgb(var(--warn) / .3); border-radius: 999px; background: rgb(var(--warn) / .1); color: rgb(var(--warn)); font: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.kpi-alert:hover { transform: translateY(-1px); box-shadow: 0 6px 12px -8px rgb(var(--warn) / .8); }
/* GOV-R333-A (CR-723): the first stepper rules (.guide-steps, with the shared .es-steps in the same :is() lists) moved unchanged to emis-adapters.css */
/* controls on what the KPI card already has (Payroll .kpi: the coloured side line ::after, the chips of its sub-line .s); icons act only where
 * the screen gives the card an icon element (.kpi-ic), a theme never invents one */
html[data-kpi-accent="thick"] :is(.kpi, .etb-kpi)::after { width: 5px !important; inset-block: 8px !important; }
html[data-kpi-accent="top"] :is(.kpi, .etb-kpi)::after { inset-block: 0 auto !important; inset-inline: 14px !important; width: auto !important; height: 3px !important; border-radius: 0 0 3px 3px !important; }
html[data-kpi-accent="none"] :is(.kpi, .etb-kpi)::after { display: none !important; }
html[data-kpi-alert="pill"] :is(.kpi, .etb-kpi) :is(.kpi-alert, .s .chip) { padding: 3px 10px; border-radius: 999px; border: 1px solid color-mix(in srgb, currentColor 35%, transparent); font-weight: 700; cursor: pointer; transition: transform .15s; }
html[data-kpi-alert="pill"] :is(.kpi, .etb-kpi) :is(.kpi-alert, .s .chip):hover { transform: translateY(-1px); }
html[data-kpi-alert="pulse"] :is(.kpi, .etb-kpi) :is(.kpi-alert, .s .chip) { display: inline-flex; align-items: center; gap: 6px; }
html[data-kpi-alert="pulse"] :is(.kpi, .etb-kpi) :is(.kpi-alert, .s .chip)::before { content: ''; width: 7px; height: 7px; flex: none; border-radius: 50%; background: currentColor; animation: kpi-ping2 1.6s ease-out infinite; }
@keyframes kpi-ping2 { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }
html[data-es-motion="reduce"] :is(.kpi, .etb-kpi) :is(.kpi-alert, .s .chip)::before { animation: none; }
/* the icon of a KPI card (.kpi-ic, a shared class a screen may give a card): in the card's top corner, so the card's layout does not move */
.kpi-ic { position: absolute; top: 12px; inset-inline-end: 12px; display: none; place-items: center; border-radius: 10px; background: rgb(var(--brand-50)); color: rgb(var(--brand-700)); font-size: 14px; }
.dark .kpi-ic { background: rgb(var(--brand-600) / .18); color: rgb(var(--brand-300)); }
/* ---- icons (owner 2026-11-18: «إضافة الأيقونات ضمن التحكمات: بأيقونة أم لا، واستايل الأيقونات وشكلها»). Font Awesome 6 stays the one set
 * (GOV-R213-A); a theme shows, hides, colours and shapes the icons a screen draws, it never invents one. No attribute = as the module draws them. */
/* KPI card icons (.kpi-ic): shown or hidden, colour (--ic-c), fill style, shape, size */
html[data-kpi-icon-show="hide"] :is(.kpi, .etb-kpi) .kpi-ic { display: none !important; }
html[data-kpi-icon="brand"] :is(.kpi, .etb-kpi) .kpi-ic { --ic-c: var(--brand-600); }
html[data-kpi-icon="gray"] :is(.kpi, .etb-kpi) .kpi-ic { --ic-c: var(--ink-muted); }
html[data-kpi-icon="series"] :is(.kpis, .etb-kpis) > :nth-child(4n+1) .kpi-ic { --ic-c: var(--ch-1); }
html[data-kpi-icon="series"] :is(.kpis, .etb-kpis) > :nth-child(4n+2) .kpi-ic { --ic-c: var(--ch-4); }
html[data-kpi-icon="series"] :is(.kpis, .etb-kpis) > :nth-child(4n+3) .kpi-ic { --ic-c: var(--ch-8); }
html[data-kpi-icon="series"] :is(.kpis, .etb-kpis) > :nth-child(4n) .kpi-ic { --ic-c: var(--ch-5); }
:is(html[data-kpi-icon], html[data-kpi-icon-fill]) :is(.kpi, .etb-kpi) .kpi-ic { background: rgb(var(--ic-c, var(--brand-600))); color: #fff; box-shadow: 0 6px 12px -6px rgb(var(--ic-c, var(--brand-600)) / .8); }
html[data-kpi-icon-fill="soft"] :is(.kpi, .etb-kpi) .kpi-ic { background: rgb(var(--ic-c, var(--brand-600)) / .14); color: rgb(var(--ic-c, var(--brand-600))); box-shadow: none; }
html[data-kpi-icon-fill="ring"] :is(.kpi, .etb-kpi) .kpi-ic { background: transparent; color: rgb(var(--ic-c, var(--brand-600))); box-shadow: inset 0 0 0 1.5px rgb(var(--ic-c, var(--brand-600))); }
html[data-kpi-icon-fill="plain"] :is(.kpi, .etb-kpi) .kpi-ic { background: transparent; color: rgb(var(--ic-c, var(--brand-600))); box-shadow: none; }
html[data-kpi-icon-shape="circle"] :is(.kpi, .etb-kpi) .kpi-ic { border-radius: 999px; }
html[data-kpi-icon-shape="rounded"] :is(.kpi, .etb-kpi) .kpi-ic { border-radius: 10px; }
html[data-kpi-icon-shape="square"] :is(.kpi, .etb-kpi) .kpi-ic { border-radius: 4px; }
/* the icons of card titles (.card-head h3 > i in Payroll, .card-h h3 > i in the shared cards) */
html[data-card-icon="brand"] :is(.card-head, .card-h) h3 > i { color: rgb(var(--brand-600)); }
html.dark[data-card-icon="brand"] :is(.card-head, .card-h) h3 > i { color: rgb(var(--brand-300)); }
html[data-card-icon="gray"] :is(.card-head, .card-h) h3 > i { color: rgb(var(--ink-muted)); }
html[data-card-icon="chip"] :is(.card-head, .card-h) h3 > i { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-inline-end: 4px; border-radius: 8px; background: rgb(var(--brand-50)); color: rgb(var(--brand-700)); font-size: 12px; }
html.dark[data-card-icon="chip"] :is(.card-head, .card-h) h3 > i { background: rgb(var(--brand-600) / .18); color: rgb(var(--brand-200)); }
html[data-card-icon="hide"] :is(.card-head, .card-h) h3 > i { display: none; }
/* the icons of buttons */
html[data-btn-icon="hide"] :is(.es-btn, .btn, .etb-btns button) > i { display: none; }
html[data-btn-icon="brand"] :is(.es-btn:not(.es-primary), .btn-s, .etb-b2) > i { color: rgb(var(--brand-600)); }
html[data-kpi-icon-show="show"] .kpi-ic, .kpi-ic.on { display: grid; }   /* a KPI icon shows only when the theme shows them (or the screen marks it .on): a card looks as before by default */
/* the size and the place of a KPI icon (owner 2026-11-18: «مكان الأيقونة بيغطي على التكست يحتاج تحكم أكثر وتظبيط»): the size is one
 * variable (--kic); in the corner the card keeps room for it, so the icon never covers the label, the figure or the chips */
.kpi-ic { width: var(--kic, 34px); height: var(--kic, 34px); font-size: calc(var(--kic, 34px) * .42); }
html[data-kpi-icon-size="28"] { --kic: 28px; } html[data-kpi-icon-size="34"] { --kic: 34px; } html[data-kpi-icon-size="40"] { --kic: 40px; }
/* in the corner (the default place): the text keeps clear of it */
html[data-kpi-icon-show="show"]:not([data-kpi-icon-pos="side"]):not([data-kpi-icon-pos="top"]):not([data-kpi-icon-pos="label"]) :is(.kpis, .etb-kpis) > :is(.kpi, .etb-kpi) { padding-inline-end: calc(var(--kic, 34px) + 22px); }
/* beside the content: the icon on the start side, the label, figure and chips beside it */
html[data-kpi-icon-show="show"][data-kpi-icon-pos="side"] :is(.kpis, .etb-kpis) > :is(.kpi, .etb-kpi) { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: center; align-content: center; }
html[data-kpi-icon-show="show"][data-kpi-icon-pos="side"] :is(.kpi, .etb-kpi) .kpi-ic { position: static; grid-row: 1 / span 3; align-self: center; }
html[data-kpi-icon-show="show"][data-kpi-icon-pos="side"] :is(.kpi, .etb-kpi) > :not(.kpi-ic) { grid-column: 2; min-width: 0; }
/* above the label */
html[data-kpi-icon-show="show"][data-kpi-icon-pos="top"] :is(.kpi, .etb-kpi) .kpi-ic { position: static; margin-bottom: 10px; }
/* next to the label, small */
html[data-kpi-icon-show="show"][data-kpi-icon-pos="label"] :is(.kpi, .etb-kpi) .kpi-ic { position: static; display: inline-grid; vertical-align: middle; width: calc(var(--kic, 34px) * .7); height: calc(var(--kic, 34px) * .7); font-size: calc(var(--kic, 34px) * .3); margin-inline-end: 8px; }
html[data-kpi-icon-show="show"][data-kpi-icon-pos="label"] :is(.kpi, .etb-kpi) .kpi-ic + .l { display: inline; }
/* GOV-R333-A (CR-723): «the stepper, all its controls» (.guide-steps, with the shared .es-steps in the same :is() lists) moved unchanged to emis-adapters.css */
/* ==== phase two of the theme builder (owner 2026-11-18; registry GOV-R277). Same principle as phase one: no attribute = what the module
 * draws; every rule waits for an explicit choice. Studied on Payroll (index.html #modal-overlay / #modal-container, app.js showModal,
 * screens-core.js slideOver, #toast-container) and the shared shell (.es-modal-w / .es-mb / .es-modal / .es-drawer / .es-m-h, #es-toasts .es-toast). */
/* GOV-R333-A (CR-723): the pop-up windows, the drawer and the notifications (#modal-overlay, #modal-container > div, .so-back / .so-head /
 * .so-panel, #toast-container, with the shared .es-modal / .es-drawer / .es-toast in the same :is() lists) moved unchanged to emis-adapters.css */
/* -- secondary colours: the page canvas, the links, a dark mode tinted with the theme colour */
html[data-canvas="white"] { --canvas: 255 255 255; } html[data-canvas="cool"] { --canvas: 241 245 249; } html[data-canvas="warm"] { --canvas: 247 244 239; }
html[data-canvas="tint"] { --canvas: var(--brand-50); }
/* GOV-R333-A (CR-723): the canvas rule of the page scroller (#main-scroll) moved unchanged to emis-adapters.css */
html[data-link="brand"] :is(main, #es-main, .etb-sample) a:not(.btn):not(.es-btn):not([class*="btn"]) { color: rgb(var(--brand-700)); }
html.dark[data-link="brand"] :is(main, #es-main, .etb-sample) a:not(.btn):not(.es-btn):not([class*="btn"]) { color: rgb(var(--brand-300)); }
html[data-link="underline"] :is(main, #es-main, .etb-sample) a:not(.btn):not(.es-btn):not([class*="btn"]) { color: rgb(var(--brand-700)); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
html.dark[data-link="underline"] :is(main, #es-main, .etb-sample) a:not(.btn):not(.es-btn):not([class*="btn"]) { color: rgb(var(--brand-300)); }
/* GOV-R333-A (CR-723): the two tinted dark mode rules (#main-scroll, #modal-container > div) moved unchanged to emis-adapters.css */
/* -- typography scale: headings, their weight, line height, numerals */
html[data-head-size="compact"] :is(main, #es-main, .etb-sample) h2 { font-size: 17px !important; } html[data-head-size="compact"] :is(main, #es-main, .etb-sample) h3 { font-size: 12.5px !important; }
html[data-head-size="large"] :is(main, #es-main, .etb-sample) h2 { font-size: 25px !important; } html[data-head-size="large"] :is(main, #es-main, .etb-sample) h3 { font-size: 15.5px !important; }
html[data-head-weight="600"] :is(main, #es-main, .etb-sample) :is(h1, h2, h3, h4) { font-weight: 600 !important; }
html[data-head-weight="800"] :is(main, #es-main, .etb-sample) :is(h1, h2, h3, h4) { font-weight: 800 !important; }
html[data-leading="tight"] :is(main, #es-main, .etb-sample) { line-height: 1.35; } html[data-leading="relaxed"] :is(main, #es-main, .etb-sample) { line-height: 1.75; }
html[data-leading] :is(main, #es-main, .etb-sample) :is(p, td, li, .l, .s, small, label) { line-height: inherit; }
html[data-nums="tabular"] :is(main, #es-main, .etb-sample) :is(td, th, .v, .kpi-v, .num, input) { font-variant-numeric: tabular-nums; }
html[data-nums="tabular"] :is(main, #es-main, .etb-sample) :is(.v, .kpi-v, .num) { letter-spacing: -.01em; }
/* -- shadows and depth of the surfaces (cards and KPI cards) */
/* GOV-R331-A (CR-723): the literal shadow colour reads --shadow-color (15 23 42, the same value) */
html[data-depth="flat"] :is(main, #es-main, .etb-sample) :is(.card, .es-card, .es-tw-card, .kpi) { box-shadow: none !important; }
html[data-depth="soft"] :is(main, #es-main, .etb-sample) :is(.card, .es-card, .es-tw-card, .kpi) { box-shadow: 0 1px 2px rgb(var(--shadow-color) / .05), 0 6px 18px -10px rgb(var(--shadow-color) / .18) !important; }
html[data-depth="deep"] :is(main, #es-main, .etb-sample) :is(.card, .es-card, .es-tw-card, .kpi) { box-shadow: 0 2px 4px rgb(var(--shadow-color) / .06), 0 18px 36px -16px rgb(var(--shadow-color) / .35) !important; }
/* GOV-R333-A (CR-723): «the close button of the page band» (.page-hero .page-head .band-x) moved unchanged to emis-adapters.css */
/* ---- the row highlight while moving across a grid, and the chosen row (owner 2026-11-18: «ستايل التظليل على السجل عندما تتحرك عبر السطور،
 * أي شكل تحديد السطر»): two more hover patterns, two more chosen-row looks (the shared grid marks a chosen row tr.eg-sel), and a keyboard focus look */
html[data-t-hover="grad"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody tr:is(:hover, .etb-hov) td { background: linear-gradient(to left, rgb(var(--brand-100)), rgb(var(--brand-50) / .4)); }
html[dir="ltr"][data-t-hover="grad"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody tr:is(:hover, .etb-hov) td { background: linear-gradient(to right, rgb(var(--brand-100)), rgb(var(--brand-50) / .4)); }
html[data-t-hover="glow"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody tr:is(:hover, .etb-hov) td { background: rgb(var(--brand-50) / .7); color: rgb(var(--brand-800)); box-shadow: inset 0 1px 0 rgb(var(--brand-200)), inset 0 -1px 0 rgb(var(--brand-200)); }
html.dark[data-t-hover="glow"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody tr:is(:hover, .etb-hov) td { background: rgb(var(--brand-600) / .14); color: rgb(var(--brand-100)); }
html[data-t-sel="outline"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody tr:is(.sel, .selected, .on, .active, .eg-sel, [aria-selected="true"]) td { background: rgb(var(--brand-50) / .5); box-shadow: inset 0 1.5px 0 rgb(var(--brand-500)), inset 0 -1.5px 0 rgb(var(--brand-500)); }
html[data-t-sel="strong"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody tr:is(.sel, .selected, .on, .active, .eg-sel, [aria-selected="true"]) td { background: rgb(var(--brand-600)) !important; color: #fff !important; }
html[data-t-sel="strong"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody tr:is(.sel, .selected, .on, .active, .eg-sel, [aria-selected="true"]) td * { color: inherit !important; }
html[data-t-sel] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody tr.eg-sel td:first-child { position: relative; }
/* the row that has the keyboard focus (a control inside it, or the row itself) */
html[data-t-focus="ring"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody tr:is(:focus-within, :focus-visible, .etb-foc) td { box-shadow: inset 0 2px 0 rgb(var(--brand-500)), inset 0 -2px 0 rgb(var(--brand-500)); }
html[data-t-focus="fill"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody tr:is(:focus-within, :focus-visible, .etb-foc) td { background: rgb(var(--brand-100)); }
html[data-t-focus="bar"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody tr:is(:focus-within, :focus-visible, .etb-foc) td:first-child { box-shadow: inset -4px 0 0 rgb(var(--brand-600)); }
html[dir="ltr"][data-t-focus="bar"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody tr:is(:focus-within, :focus-visible, .etb-foc) td:first-child { box-shadow: inset 4px 0 0 rgb(var(--brand-600)); }
/* ---- «تاريخ السجل / Record history» (owner 2026-11-18: «نعم أضف لها تحكمات أيضاً»): the shared shell's card (emis-shell-pages.css .es-rh,
 * GOV-R256-A, GOV-R271-A, GOV-R273-A) and its page-band icon (.es-hist-b). The changed state stays amber: it is a meaning, not a decoration. */
html[data-rh-width="340"] :is(#es-modal:has(.es-rh.is-win) .es-modal, .etb-demo .es-modal:has(.es-rh)) { max-width: min(340px, calc(100vw - 24px)) !important; }
html[data-rh-width="420"] :is(#es-modal:has(.es-rh.is-win) .es-modal, .etb-demo .es-modal:has(.es-rh)) { max-width: min(420px, calc(100vw - 24px)) !important; }
html[data-rh-width="520"] :is(#es-modal:has(.es-rh.is-win) .es-modal, .etb-demo .es-modal:has(.es-rh)) { max-width: min(520px, calc(100vw - 24px)) !important; }
html[data-rh-node="circle"] .es-rh-node { border-radius: 50% !important; } html[data-rh-node="rounded"] .es-rh-node { border-radius: 9px !important; } html[data-rh-node="square"] .es-rh-node { border-radius: 4px !important; }
html[data-rh-rail="thin"] .es-rh-tl::before { width: 1px !important; }
html[data-rh-rail="dashed"] .es-rh-tl::before { width: 0 !important; background: none !important; border-inline-start: 2px dashed rgb(var(--border-strong)); }
html[data-rh-rail="brand"] .es-rh-tl::before { background: rgb(var(--brand-300)) !important; }
html[data-rh-rail="grad"] .es-rh-tl::before { background: var(--grad-brand) !important; width: 3px !important; border-radius: 3px; }
html[data-rh-card="outline"] .es-rh-card { box-shadow: none !important; border: 1px solid rgb(var(--border-strong)) !important; }
/* GOV-R331-A (CR-723): the soft record history card reads --shadow-color (the same 15 23 42) */
html[data-rh-card="soft"] .es-rh-card { border-color: transparent !important; box-shadow: 0 1px 2px rgb(var(--shadow-color) / .05), 0 8px 18px -10px rgb(var(--shadow-color) / .22) !important; }
html[data-rh-card="flat"] .es-rh-card { border-color: transparent !important; box-shadow: none !important; background: rgb(var(--surface-2)) !important; }
html[data-rh-card="tint"] .es-rh-ev.new .es-rh-card { background: rgb(var(--brand-50)) !important; border-color: rgb(var(--brand-200)) !important; }
html.dark[data-rh-card="tint"] .es-rh-ev.new .es-rh-card { background: rgb(var(--brand-600) / .12) !important; }
html[data-rh-avatar="circle"] .es-rh-av { border-radius: 50% !important; } html[data-rh-avatar="rounded"] .es-rh-av { border-radius: 8px !important; } html[data-rh-avatar="square"] .es-rh-av { border-radius: 4px !important; }
html[data-rh-icon="soft"] .es-rh-hic { background: rgb(var(--brand-50)) !important; color: rgb(var(--brand-700)) !important; }
html[data-rh-icon="solid"] .es-rh-hic { background: rgb(var(--brand-600)) !important; color: #fff !important; }
html[data-rh-icon="grad"] .es-rh-hic { background: var(--grad-brand) !important; color: #fff !important; }
html[data-rh-band="glass"] .es-hist-b { background: rgb(255 255 255 / .14) !important; color: #fff !important; border: 1px solid rgb(255 255 255 / .3) !important; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
html[data-rh-band="solid"] .es-hist-b { background: #fff !important; color: rgb(var(--brand-700)) !important; border-color: #fff !important; }
html[data-rh-band="ghost"] .es-hist-b { background: transparent !important; border-color: transparent !important; color: rgb(255 255 255 / .9) !important; }

/* ---- the sign-in page (owner 2026-11-18: «اضف الى خصائص التحكم شكل صفحة log in فى تبويب داخل ثيم بلدر»), emis-login.html (.lg, .lg-side the
 * form, .lg-show the system showcase, .lg-stage its glass cards). Every rule waits for its choice; «حسب الشاشة» keeps the page as it draws itself.
 * The page belongs to the whole system: it takes the organisation theme, not a personal look (html[data-studio-scope="org"]). */
@media (min-width: 961px) {
  html[data-login-layout="swap"] .lg-show { order: -1; }
  html[data-login-layout="swap"] .lg { grid-template-columns: minmax(0, 1fr) minmax(400px, 540px); }
  html[data-login-layout="form"] .lg { grid-template-columns: minmax(0, 1fr); }
  html[data-login-layout="form"] .lg-show { display: none; }
  html[data-login-layout="center"] .lg { grid-template-columns: minmax(0, 1fr); place-items: center; padding: 32px; }
  html[data-login-layout="center"] .lg-show { position: fixed; inset: 0; z-index: 0; }
  html[data-login-layout="center"] .lg-side { width: min(520px, 100%); min-height: 0; border-radius: var(--r-card, 16px); box-shadow: var(--shadow-3, 0 24px 48px -16px rgb(15 23 42 / .35)); padding: 28px 40px; }
  html[data-login-layout="center"] .lg-stage { opacity: .35; }
}
html[data-login-side="grad"] .lg-show { background: var(--grad-hero); }
html[data-login-side="deep"] .lg-show { background: rgb(var(--brand-950)); }
html[data-login-side="solid"] .lg-show { background: rgb(var(--brand-800)); }
html[data-login-side="dots"] .lg-show { background: radial-gradient(rgb(255 255 255 / .14) 1.2px, transparent 1.6px) 0 0 / 18px 18px, var(--grad-hero); }
html[data-login-form="card"] .lg-side { background: rgb(var(--canvas)); }
html[data-login-form="card"] .lg-main { background: rgb(var(--surface)); border: 1px solid rgb(var(--border)); border-radius: var(--r-card, 16px); box-shadow: var(--shadow-2, 0 8px 24px -12px rgb(15 23 42 / .25)); padding: 28px 28px; }
html[data-login-form="tint"] .lg-side { background: linear-gradient(180deg, rgb(var(--brand-50)), rgb(var(--surface)) 55%); }
html.dark[data-login-form="tint"] .lg-side { background: linear-gradient(180deg, rgb(var(--brand-600) / .14), rgb(var(--surface)) 55%); }
html[data-login-form="glass"] .lg-side { background: rgb(var(--surface) / .8); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
html[data-login-cards="hide"] .lg-stage { display: none; }
html[data-login-head="center"] .lg-h { text-align: center; }
html[data-login-head="large"] .lg-h h1 { font-size: 36px; }
html[data-login-head="small"] .lg-h h1 { font-size: 24px; }
/* sign-in images, motion and logo (owner 2026-11-18: «اضافة صورة للبطاقة العائمة»); the image attributes exist only while a picture is chosen */
html[data-login-img="top"]:not([data-login-img-card]) .lg-glass::before, html[data-login-img="top"][data-login-img-card="first"] .lg-g1::before, html[data-login-img="top"][data-login-img-card="second"] .lg-g2::before, html[data-login-img="top"][data-login-img-card="third"] .lg-g3::before { content: ''; display: block; height: 92px; margin: -16px -18px 12px; border-radius: 16px 16px 0 0; background: var(--login-img) center / cover no-repeat; }
html[data-login-img="cover"]:not([data-login-img-card]) .lg-glass, html[data-login-img="cover"][data-login-img-card="first"] .lg-g1, html[data-login-img="cover"][data-login-img-card="second"] .lg-g2, html[data-login-img="cover"][data-login-img-card="third"] .lg-g3 { background: linear-gradient(rgb(var(--brand-950) / .55), rgb(var(--brand-950) / .78)), var(--login-img) center / cover no-repeat; }
html[data-login-bg="on"] .lg-show { background: linear-gradient(160deg, rgb(var(--brand-900) / .62), rgb(var(--brand-950) / .72)), var(--login-bgimg) center / cover no-repeat; }
html[data-login-bg="on"][data-login-shade="light"] .lg-show { background: linear-gradient(160deg, rgb(var(--brand-900) / .42), rgb(var(--brand-950) / .55)), var(--login-bgimg) center / cover no-repeat; }
html[data-login-bg="on"][data-login-shade="strong"] .lg-show { background: linear-gradient(160deg, rgb(var(--brand-900) / .8), rgb(var(--brand-950) / .88)), var(--login-bgimg) center / cover no-repeat; }
@keyframes lg-float { from { translate: 0 0; } to { translate: 0 -10px; } }
html[data-login-motion="float"] .lg-glass { animation: lg-float 4.5s ease-in-out infinite alternate; }
html[data-login-motion="float"] .lg-g2 { animation-delay: -1.5s; } html[data-login-motion="float"] .lg-g3 { animation-delay: -3s; }
@media (prefers-reduced-motion: reduce) { html[data-login-motion="float"] .lg-glass { animation: none; } }
html[data-es-motion="reduce"][data-login-motion="float"] .lg-glass { animation: none; }
html[data-login-logo="m"] .lg-cl-logo { width: 56px; height: 56px; }
html[data-login-logo="l"] .lg-cl-logo { width: 72px; height: 72px; border-radius: 14px; }
/* the organisation image above the welcome line (owner 2026-11-18: «اضافة صورة لمؤسسة العميل»); the attribute exists only with a picture */
html[data-login-form-img] .lg-main::before { content: ''; flex: none; align-self: center; background: var(--login-formimg) center / contain no-repeat; }
html[data-login-form-img="emblem"] .lg-main::before { width: 112px; height: 112px; }
html[data-login-form-img="round"] .lg-main::before { width: 112px; height: 112px; border-radius: 999px; background-size: cover; box-shadow: 0 0 0 4px rgb(var(--surface)), 0 0 0 5px rgb(var(--border)); }
html[data-login-form-img="banner"] .lg-main::before { align-self: stretch; height: 150px; border-radius: var(--r-card, 16px); background-size: cover; }
html[data-login-form-img-size="s"]:is([data-login-form-img="emblem"], [data-login-form-img="round"]) .lg-main::before { width: 80px; height: 80px; }
html[data-login-form-img-size="l"]:is([data-login-form-img="emblem"], [data-login-form-img="round"]) .lg-main::before { width: 150px; height: 150px; }
html[data-login-form-img-size="s"][data-login-form-img="banner"] .lg-main::before { height: 110px; }
html[data-login-form-img-size="l"][data-login-form-img="banner"] .lg-main::before { height: 200px; }
/* the floating cards one by one, their glass, the module pills and their size */
html[data-login-g1="hide"] .lg-g1, html[data-login-g2="hide"] .lg-g2, html[data-login-g3="hide"] .lg-g3 { display: none; }
html[data-login-glass="clear"] .lg-glass { background: rgb(var(--brand-950) / .22); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
html[data-login-glass="dense"] .lg-glass { background: rgb(var(--brand-950) / .72); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); }
html[data-login-pills="solid"] .lg-mods span { background: rgb(var(--brand-600)); border-color: transparent; color: #fff; }
html[data-login-pills="outline"] .lg-mods span { background: transparent; border: 1px solid rgb(255 255 255 / .55); }
html[data-login-pills="icons"] .lg-mods span { font-size: 0; gap: 0; padding: 8px; }
html[data-login-pills="icons"] .lg-mods span i { font-size: 14px; }
html[data-login-card-size="compact"] .lg-glass { padding: 11px 13px; font-size: 92%; }
html[data-login-card-size="compact"] .lg-g1 { width: 260px; } html[data-login-card-size="compact"] .lg-g2 { width: 240px; } html[data-login-card-size="compact"] .lg-g3 { width: 290px; }
/* ---- form controls of the shared components (owner 2026-11-18: «لا اجد ضمن الثيم بلدر التحكم فى صفحة component مثل دربون دون وغيرها»):
 * the dropdown list (emis-select .emsel-pop), check boxes, radios and switches, the progress bar, the file drop zone and the record picker
 * window (emis-picker .ep-head). Each rule waits for its html[data-fm-*] attribute; with none the controls are as the shared files draw them. */
html[data-fm-pop="flat"] .emsel-pop { box-shadow: none; border-color: rgb(var(--border-strong)); }
html[data-fm-pop="raised"] .emsel-pop { box-shadow: 0 24px 48px -12px rgb(var(--ink) / .32), 0 2px 6px rgb(var(--ink) / .08); border-color: transparent; }
html[data-fm-pop="glass"] .emsel-pop { background: rgb(var(--surface) / .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
html[data-fm-pop-r="sharp"] .emsel-pop { border-radius: 6px; } html[data-fm-pop-r="sharp"] .emsel-list li[role=option] { border-radius: 4px; }
html[data-fm-pop-r="round"] .emsel-pop { border-radius: 18px; } html[data-fm-pop-r="round"] .emsel-list li[role=option] { border-radius: 12px; }
html[data-fm-opt="tint"] .emsel-list li.emsel-act { background: rgb(var(--brand-100)); color: rgb(var(--brand-900)); }
html[data-fm-opt="solid"] .emsel-list li.emsel-act { background: rgb(var(--brand-600)); color: #fff; }
html[data-fm-opt="solid"] .emsel-list li.emsel-act i { color: #fff; }
html[data-fm-opt="bar"] .emsel-list li.emsel-act { background: rgb(var(--surface-2)); box-shadow: inset 3px 0 0 rgb(var(--brand-600)); }
html[data-fm-opt="bar"][dir="rtl"] .emsel-list li.emsel-act { box-shadow: inset -3px 0 0 rgb(var(--brand-600)); }
html[data-fm-sel="tint"] .emsel-list li[aria-selected=true]:not(.emsel-act) { background: rgb(var(--brand-50)); color: rgb(var(--brand-800)); }
html.dark[data-fm-sel="tint"] .emsel-list li[aria-selected=true]:not(.emsel-act) { background: rgb(var(--brand-600) / .16); color: rgb(var(--brand-200)); }
html[data-fm-sel="bar"] .emsel-list li[aria-selected=true] { box-shadow: inset 3px 0 0 rgb(var(--brand-500)); }
html[data-fm-sel="bar"][dir="rtl"] .emsel-list li[aria-selected=true] { box-shadow: inset -3px 0 0 rgb(var(--brand-500)); }
html[data-fm-dense="compact"] .emsel-list li[role=option] { padding: .3rem .55rem; font-size: .8125rem; }
html[data-fm-dense="comfy"] .emsel-list li[role=option] { padding: .7rem .8rem; }
html[data-fm-chip="outline"] .emsel-chip { background: transparent; box-shadow: inset 0 0 0 1px rgb(var(--brand-300)); }
html[data-fm-chip="solid"] .emsel-chip { background: rgb(var(--brand-600)); color: #fff; }
html[data-fm-chip="solid"] .emsel-chip :is(button, i) { color: #fff; }
/* check boxes, radios and switches */
html[data-fm-check="large"] input:is([type="checkbox"]:not([data-switch]):not([role="switch"]), [type="radio"]) { width: 20px; height: 20px; }
html[data-fm-switch="square"] input[type="checkbox"]:is([data-switch], [role="switch"]) { border-radius: 7px; }
html[data-fm-switch="square"] input[type="checkbox"]:is([data-switch], [role="switch"])::after { border-radius: 5px; }
html[data-fm-switch="large"] input[type="checkbox"]:is([data-switch], [role="switch"]) { width: 48px; height: 28px; }
html[data-fm-switch="large"] input[type="checkbox"]:is([data-switch], [role="switch"])::after { width: 22px; height: 22px; }
html[data-fm-switch="large"] input[type="checkbox"]:is([data-switch], [role="switch"]):checked::after { inset-inline-start: 23px; }
/* progress bars */
html[data-fm-prog="thin"] .emin-prog-t { height: 5px; }
html[data-fm-prog="thick"] .emin-prog-t { height: 14px; }
html[data-fm-prog-fill="grad"] .emin-prog:not(.is-done) .emin-prog-f { background: var(--grad-brand); }
html[data-fm-prog-fill="flat"] .emin-prog:not(.is-done) .emin-prog-f { background: rgb(var(--brand-600)); box-shadow: none; }
/* CR-724, GOV-R348-A */
/* the bar thickness also reaches a native <progress> and a module track drawn as [role=progressbar] in the covered roots, with the same heights.
 * Not the .emin-prog wrapper of emis-input.js (its track is .emin-prog-t above), and not a progressbar that holds text (a caption wrapper). */
html[data-fm-prog="thin"] :is(#es-main, main, .emis-form, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) :is(progress, [role="progressbar"]:not(.emin-prog):not(:has(:not(:empty)))) { height: 5px; }
html[data-fm-prog="thick"] :is(#es-main, main, .emis-form, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) :is(progress, [role="progressbar"]:not(.emin-prog):not(:has(:not(:empty)))) { height: 14px; }
/* the file drop zone */
html[data-fm-drop="solid"] .emin-drop { border-style: solid; }
html[data-fm-drop="tint"] .emin-drop { border-style: solid; border-color: rgb(var(--brand-200)); background: rgb(var(--brand-50) / .6); }
html.dark[data-fm-drop="tint"] .emin-drop { background: rgb(var(--brand-600) / .10); border-color: rgb(var(--brand-600) / .4); }
/* CR-724, GOV-R348-A */
/* the same two looks also reach a plain file field (input[type=file]) in the covered roots; the builder's own file fields are outside them */
html[data-fm-drop="solid"] :is(#es-main, main, .emis-form, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) input[type="file"] { border-style: solid; }
html[data-fm-drop="tint"] :is(#es-main, main, .emis-form, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) input[type="file"] { border-style: solid; border-color: rgb(var(--brand-200)); background: rgb(var(--brand-50) / .6); }
html.dark[data-fm-drop="tint"] :is(#es-main, main, .emis-form, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) input[type="file"] { background: rgb(var(--brand-600) / .10); border-color: rgb(var(--brand-600) / .4); }
/* the record picker window header */
html[data-fm-pick="plain"] .ep-head { background: rgb(var(--surface)); color: rgb(var(--ink)); border-bottom: 1px solid rgb(var(--border)); }
html[data-fm-pick="tint"] .ep-head { background: rgb(var(--brand-50)); color: rgb(var(--brand-900)); border-bottom: 1px solid rgb(var(--brand-100)); }
html.dark[data-fm-pick="tint"] .ep-head { background: rgb(var(--brand-600) / .16); color: rgb(var(--brand-100)); }
html[data-fm-pick]:is([data-fm-pick="plain"], [data-fm-pick="tint"]) .ep-head :is(.ep-tt h3, .ep-close) { color: inherit; }
html[data-fm-pick]:is([data-fm-pick="plain"], [data-fm-pick="tint"]) .ep-head .ep-tt p { color: rgb(var(--ink-muted)); }
html[data-fm-pick]:is([data-fm-pick="plain"], [data-fm-pick="tint"]) .ep-head .ep-ic { background: rgb(var(--brand-100)); color: rgb(var(--brand-700)); box-shadow: none; }
html[data-fm-pick]:is([data-fm-pick="plain"], [data-fm-pick="tint"]) .ep-head .ep-close:hover { background: rgb(var(--brand-100)); color: rgb(var(--brand-800)); }
html[data-fm-pick]:is([data-fm-pick="plain"], [data-fm-pick="tint"]) .ep-head .ep-close:focus-visible { outline-color: rgb(var(--brand-600)); }
/* GOV-R333-A (CR-723): «the stepper, more» and «the action bar under a step» (.guide-steps, .pb11-lock, .pb11-foot) moved unchanged to emis-adapters.css */
/* disabled buttons and fields (owner 2026-11-18, «Theme Builder User Experience»: states); the builder's own controls are left alone */
html[data-disabled="faded"] :is(button, input, select, textarea):disabled:not(.ets-wrap *):not(.etb-page *) { opacity: .45; filter: grayscale(.6); cursor: not-allowed; }
html[data-disabled="muted"] :is(button, input, select, textarea):disabled:not(.ets-wrap *):not(.etb-page *) { opacity: 1; filter: none; background: rgb(var(--surface-2)) !important; background-image: none !important; color: rgb(var(--ink-faint)) !important; border-color: rgb(var(--border)) !important; box-shadow: none !important; cursor: not-allowed; }
/* GOV-R298-A (CR-667, owner 2026-11-18 «كمل باقى توصيات الثيم بلدر»): high contrast, the setting «التباين: عالٍ» of the theme builder and of each
 * user's studio, and the looks «تباين عالٍ» / «تباين عالٍ داكن». Secondary and muted text reach 12:1 or more on the surface, lines and control
 * borders reach 3:1 (WCAG 2.2 1.4.11), the focus ring is 3px, links are underlined, placeholders stay readable. Status colours are not touched
 * (GOV-R143-A). No attribute = the interface as before. */
html[data-contrast="high"] { --ink-2: 15 23 42; --ink-muted: 30 41 59; --ink-faint: 71 85 105; --border: 100 116 139; --border-strong: 51 65 85; --control-border: 51 65 85; }
html.dark[data-contrast="high"] { --ink: 255 255 255; --ink-2: 241 245 249; --ink-muted: 226 232 240; --ink-faint: 203 213 225; --border: 148 163 184; --border-strong: 226 232 240; --control-border: 203 213 225; }
html[data-contrast="high"] :focus-visible { outline: 3px solid rgb(var(--brand-700)) !important; outline-offset: 2px !important; }
html.dark[data-contrast="high"] :focus-visible { outline-color: rgb(255 255 255) !important; }
html[data-contrast="high"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) a:not(.btn):not(.es-btn):not([role="button"]):not([class*="nav"]) { text-decoration: underline; text-underline-offset: 3px; }
html[data-contrast="high"] :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="range"]) { border-color: rgb(var(--control-border)) !important; }
html[data-contrast="high"] ::placeholder { color: rgb(var(--ink-muted)) !important; opacity: 1; }
/* GOV-R322-A (CR-723): the high-contrast card border reads --card-border (the same rgb(var(--border))) */
html[data-contrast="high"] :is(.card, .es-card, .es-tw-card) { border-color: var(--card-border) !important; }

/* GOV-R302-A (CR-678, owner 2026-11-18 «ما سبب شعورى ان هذه الجريد تصميمها هادى واحترافى» then «لا تغير فى الجريد الان ولكن ضيف الاستايل ضمن الثيم»):
 * the calm table style, chosen in the theme builder (Tables, «طابع الجدول: هادئ»). A light header, thin row lines, one strong and one muted text level,
 * numbers aligned in tabular figures, softer chips, and the «Actions n/n» button of a row drawn as a quiet ⋮ (its label stays for screen readers).
 * No attribute = every table as before; status colours keep their meanings. */
/* GOV-R303-A (CR-679, owner 2026-11-18 «المعاينة الحية لا تعمل فى منشئ الثيم فى حال تعديل الجداول»): «هادئ» is the base and yields: a header or rows choice made
 * in the same theme (data-t-head, data-t-rows) wins over its header background and row lines, so every table control shows in the preview. */
/* GOV-R322-A (CR-723): the calm table header reads --table-head-bg (the same rgb(var(--surface-2))) */
html[data-t-look="calm"]:not([data-t-head]) :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table thead th { background: var(--table-head-bg); color: rgb(var(--ink-2)); font-weight: 700; border-bottom: 1px solid rgb(var(--border)); }
html[data-t-look="calm"]:not([data-t-rows]) :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody td { border-bottom: 1px solid rgb(var(--border) / .7); vertical-align: middle; }
html[data-t-look="calm"]:not([data-t-rows]) :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody tr:last-child td { border-bottom: 0; }
html[data-t-look="calm"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody td :is(small, .text-xs, .src-note) { color: rgb(var(--ink-muted)); }
html[data-t-look="calm"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table tbody td:is(.t-end, .num, .tabular) { font-variant-numeric: tabular-nums; }
html[data-t-look="calm"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table td .chip { border-color: transparent; }
html[data-t-look="calm"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table .act-btn { width: 32px; min-width: 32px; height: 32px; padding: 0; gap: 0; justify-content: center; border-color: transparent; background: transparent; box-shadow: none; font-size: 0; }
html[data-t-look="calm"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table .act-btn i { font-size: 15px; color: rgb(var(--ink-muted)); }
html[data-t-look="calm"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table .act-btn .act-n { display: none; }
html[data-t-look="calm"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table .act-btn:is(:hover, :focus-visible, [aria-expanded="true"]) { background: rgb(var(--surface-2)); }
html[data-t-look="calm"] :is(#es-main, main, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) table .act-btn:focus-visible { outline: 2px solid rgb(var(--brand-600)); outline-offset: 2px; }

/* CR-724, GOV-R348-A */
/* (wave 4, gap G-29): the families shown with no builder rule — tabs, badges and chips, alerts and notices, pagination. One curated preset each
 * in the component tier of the theme document (GOV-R357-A). Every rule waits for its attribute, so «حسب الشاشة» (no attribute) draws every
 * screen as before (GOV-R277-A, GOV-R279-A). Scoped to the covered roots, so the side menu, the top bar and the builder's own controls are
 * not reached. A badge and an alert keep their own hue: the rules change the fill style and the border only, from currentColor, and never
 * assign a hue (GOV-R143-A, GOV-R355-A). */
/* tabs: [role=tablist] [role=tab]; the selected one carries aria-selected=true */
html[data-tab-look] :is(#es-main, main, .emis-form, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) [role="tablist"] [role="tab"] { transition: background-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast); }
html[data-tab-look="line"] :is(#es-main, main, .emis-form, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) [role="tablist"] [role="tab"] { background: transparent; border-color: transparent; border-radius: 0; box-shadow: inset 0 calc(-1 * var(--tab-indicator-w)) 0 transparent; }
html[data-tab-look="line"] :is(#es-main, main, .emis-form, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) [role="tablist"] [role="tab"][aria-selected="true"] { color: rgb(var(--brand-700)); box-shadow: inset 0 calc(-1 * var(--tab-indicator-w)) 0 rgb(var(--brand-600)); }
html.dark[data-tab-look="line"] :is(#es-main, main, .emis-form, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) [role="tablist"] [role="tab"][aria-selected="true"] { color: rgb(var(--brand-300)); box-shadow: inset 0 calc(-1 * var(--tab-indicator-w)) 0 rgb(var(--brand-400)); }
html[data-tab-look="pill"] :is(#es-main, main, .emis-form, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) [role="tablist"] [role="tab"] { background: transparent; border-color: transparent; border-radius: var(--r-pill); box-shadow: none; }
html[data-tab-look="pill"] :is(#es-main, main, .emis-form, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) [role="tablist"] [role="tab"][aria-selected="true"] { background: var(--selection); color: rgb(var(--brand-800)); box-shadow: inset 0 0 0 1px rgb(var(--brand-200)); }
html.dark[data-tab-look="pill"] :is(#es-main, main, .emis-form, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) [role="tablist"] [role="tab"][aria-selected="true"] { color: rgb(var(--brand-200)); box-shadow: inset 0 0 0 1px rgb(var(--brand-500) / .4); }
/* badges and chips: .badge, .chip, .es-badge (not the chips of the page band, which have their own setting «الشارات داخل الشريط») */
html[data-badge-look="soft"] :is(#es-main, main, .emis-form, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) :is(.badge, .chip, .es-badge):not(:is(.es-band, .page-hero, .etb-band) *) { background-color: color-mix(in srgb, currentColor 12%, transparent); background-image: none; border-color: color-mix(in srgb, currentColor 24%, transparent); box-shadow: none; }
html[data-badge-look="outline"] :is(#es-main, main, .emis-form, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) :is(.badge, .chip, .es-badge):not(:is(.es-band, .page-hero, .etb-band) *) { background-color: transparent; background-image: none; border: 1px solid color-mix(in srgb, currentColor 55%, transparent); box-shadow: none; }
/* solid: the fill is the badge's own colour deepened toward --ink (toward the light ink in dark mode), and the text is drawn in --surface, so a
 * light-mode badge reads white on its deep hue and a dark-mode badge reads dark on its light hue; the colour property itself is left as it is */
html[data-badge-look="solid"] :is(#es-main, main, .emis-form, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) :is(.badge, .chip, .es-badge):not(:is(.es-band, .page-hero, .etb-band) *) { background-color: color-mix(in srgb, currentColor 75%, rgb(var(--ink))); background-image: none; border-color: color-mix(in srgb, currentColor 75%, rgb(var(--ink))); box-shadow: none; -webkit-text-fill-color: rgb(var(--surface)); }
html[data-badge-look="solid"] :is(#es-main, main, .emis-form, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) :is(.badge, .chip, .es-badge):not(:is(.es-band, .page-hero, .etb-band) *) > :is(span, i, b):empty:not([class*="fa-"]) { background-color: rgb(var(--surface)); }
/* alerts and notices: [role=alert], .notice, .alert (not an empty live region, and not an inline span or small) */
html[data-alert-look="soft"] :is(#es-main, main, .emis-form, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) :is([role="alert"], .notice, .alert):not(:empty):not(span):not(small) { background-color: color-mix(in srgb, currentColor 9%, rgb(var(--surface))); background-image: none; border: 1px solid color-mix(in srgb, currentColor 24%, transparent); box-shadow: none; }
html[data-alert-look="line"] :is(#es-main, main, .emis-form, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) :is([role="alert"], .notice, .alert):not(:empty):not(span):not(small) { border-width: 0; border-inline-start: var(--alert-bar-w) solid currentColor; border-start-start-radius: 0; border-end-start-radius: 0; box-shadow: none; }
/* pagination: the buttons of .pager and of the shared grid's .eg-pg; the current page (.on, .active, aria-current) takes the brand fill */
html[data-pager-look="pill"] :is(#es-main, main, .emis-form, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) :is(.pager, .eg-pg) :is(button, a) { border-radius: var(--r-pill); }
html[data-pager-look="square"] :is(#es-main, main, .emis-form, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) :is(.pager, .eg-pg) :is(button, a) { border-radius: var(--pager-square-radius); }
html[data-pager-look] :is(#es-main, main, .emis-form, .etb-sample, #modal-container, #modal-overlay, #es-modal, .es-modal, .so-panel, .es-drawer) :is(.pager, .eg-pg) :is(button, a):is(.on, .active, [aria-current="page"], [aria-current="true"]) { background: rgb(var(--brand-600)); border-color: rgb(var(--brand-600)); color: rgb(var(--on-brand)); }

/* CR-727, GOV-R334-A */
/* (gap G-15, the rest): the shared screen states, the current item of the menus and the breadcrumb separator. One curated preset each in the
 * component tier of the theme document (GOV-R357-A); every rule waits for its attribute, so «حسب الشاشة» (no attribute) draws every screen as
 * before (GOV-R277-A, GOV-R279-A). The classes are those the shared layer really draws: emis-states.js (.est-box, .est-sk-cards) and
 * emis-shell.js (.es-item-n.active, .es-am.cur, .es-cr .es-cr-s); the builder's sample side menu (.etb-pside .etb-pi.on) shows the menu choice.
 * The error and no-access icons keep their meaning colours; a module's own state markup is not reached (control path, GOV-R353-A). */
/* states: the empty, error and no-access box .est-box, and the card skeleton boxes .est-sk-cards > div (the toast has its own settings) */
html[data-state-look="card"] .est-box { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--card-radius); }
html[data-state-look="card"] .est-sk-cards > div { background: var(--card-bg); border-color: var(--card-border); border-radius: var(--card-radius); }
html[data-state-look="plain"] .est-box { background: transparent; border: 0; border-radius: 0; box-shadow: none; align-items: center; text-align: center; }
html[data-state-look="plain"] .est-sk-cards > div { background: transparent; border-color: transparent; }
/* the current menu item: the open screen of the side menu (.es-item-n.active, aria-current=page) and the current application (.es-am.cur).
 * :not(#es-no-id) (an id that never exists, specificity only) lets a choice beat the look rules of emis-shell.css (body.es-look-light / -brand,
 * .dark …) without !important. «bar»: no fill, a start-side bar (logical inset, so it sits at the start in Arabic and English); «fill»: no bar,
 * a stronger tint — --selection with a brand ring on the light menu and the applications menu, a deeper brand tint under the white text of the
 * dark and brand menus (where the light --selection would not read) */
html[data-nav-active="bar"]:not(#es-no-id) .es-item-n.active { background: transparent; }
html[data-nav-active="bar"]:not(#es-no-id) .es-item-n.active::before { inset-block: 4px; width: var(--nav-indicator-w); border-radius: var(--nav-indicator-w); background: rgb(var(--brand-400)); }
html[data-nav-active="bar"]:not(#es-no-id) body.es-look-light .es-item-n.active::before { background: rgb(var(--brand-600)); }
html.dark[data-nav-active="bar"]:not(#es-no-id) body.es-look-light .es-item-n.active::before { background: rgb(var(--brand-400)); }
html[data-nav-active="bar"]:not(#es-no-id) body.es-look-brand .es-item-n.active::before { background: currentColor; }
html[data-nav-active="bar"]:not(#es-no-id) .es-am.cur { position: relative; background: transparent; }
html[data-nav-active="bar"]:not(#es-no-id) .es-am.cur::before { content: ''; position: absolute; inset-block: 4px; inset-inline-start: 0; width: var(--nav-indicator-w); border-radius: var(--nav-indicator-w); background: rgb(var(--brand-600)); }
html.dark[data-nav-active="bar"]:not(#es-no-id) .es-am.cur::before { background: rgb(var(--brand-400)); }
html[data-nav-active="fill"]:not(#es-no-id) .es-item-n.active { background: rgb(var(--brand-500) / .3); font-weight: 700; }
html[data-nav-active="fill"]:not(#es-no-id) .es-item-n.active::before { display: none; }
html[data-nav-active="fill"]:not(#es-no-id) body.es-look-brand .es-item-n.active { background: color-mix(in srgb, currentColor 24%, transparent); }
html[data-nav-active="fill"]:not(#es-no-id) body.es-look-light .es-item-n.active { background: var(--selection); color: rgb(var(--brand-800)); box-shadow: inset 0 0 0 1px rgb(var(--brand-200)); }
html.dark[data-nav-active="fill"]:not(#es-no-id) body.es-look-light .es-item-n.active { color: rgb(var(--brand-200)); box-shadow: inset 0 0 0 1px rgb(var(--brand-500) / .4); }
html[data-nav-active="fill"]:not(#es-no-id) .es-am.cur { background: var(--selection); box-shadow: inset 0 0 0 1px rgb(var(--brand-200)); }
html.dark[data-nav-active="fill"]:not(#es-no-id) .es-am.cur { box-shadow: inset 0 0 0 1px rgb(var(--brand-500) / .4); }
/* the builder's sample side menu (emis-theme-studio.css: .etb-pside .etb-pi.on, html[data-side-look]) shows the same two choices */
html[data-nav-active="bar"]:not(#es-no-id) .etb-pside .etb-pi.on { background: transparent; color: rgb(var(--brand-300)); border-inline-start: var(--nav-indicator-w) solid rgb(var(--brand-400)); border-start-start-radius: 0; border-end-start-radius: 0; }
html[data-nav-active="bar"][data-side-look="light"]:not(#es-no-id) .etb-pside .etb-pi.on { color: rgb(var(--brand-700)); border-inline-start-color: rgb(var(--brand-600)); }
html[data-nav-active="bar"][data-side-look="brand"]:not(#es-no-id) .etb-pside .etb-pi.on { color: rgb(var(--on-brand)); border-inline-start-color: currentColor; }
html[data-nav-active="fill"]:not(#es-no-id) .etb-pside .etb-pi.on { font-weight: 700; box-shadow: inset 0 0 0 1px rgb(var(--brand-300)); }
html[data-nav-active="fill"][data-side-look="light"]:not(#es-no-id) .etb-pside .etb-pi.on { background: var(--selection); color: rgb(var(--brand-800)); box-shadow: inset 0 0 0 1px rgb(var(--brand-200)); }
html[data-nav-active="fill"][data-side-look="brand"]:not(#es-no-id) .etb-pside .etb-pi.on { background: color-mix(in srgb, currentColor 24%, transparent); box-shadow: none; }
/* the breadcrumb separator: .es-cr .es-cr-s, a Font Awesome chevron that emis-shell.css mirrors in Arabic. Only the glyph and its colour change:
 * «chevron» keeps the chevron (still mirrored) in the theme colour; «slash» draws «/» in the page font, not mirrored. Inside the page band
 * (.es-cr-in) the separator keeps the band's own text colour */
html[data-crumb-look="chevron"] .es-cr .es-cr-s { color: rgb(var(--brand-600)); opacity: .85; }
html[data-crumb-look="chevron"] .es-cr .es-cr-s::before { content: "\f054"; }
html.dark[data-crumb-look="chevron"] .es-cr .es-cr-s { color: rgb(var(--brand-400)); }
html[data-crumb-look="slash"] .es-cr .es-cr-s { font: inherit; font-weight: 400; transform: none; color: rgb(var(--ink-muted)); opacity: 1; }
html[data-crumb-look="slash"] .es-cr .es-cr-s::before { content: "/"; }
html[data-crumb-look] .es-cr.es-cr-in .es-cr-s { color: inherit; opacity: .75; }