/* Status: PROTOTYPE (not production code)
   GOV-R160-A (CR-330): the styles of emis-shell-pages.js — the shell pages Home, enterprise home and My profile, the announcements
   (ticker, bell tabs, strip under the home bar), the card «للمتابعة», the tile colour from ADMN_FORMS, record history and action history.
   Moved from the Payroll prototype (PAY-R977-A, PAY-R979-A, PAY-R986-A, PAY-R994-A, PAY-R995-A, PAY-R997-A). Load after emis-shell.css.
   Neutrals and the brand come from emis-theme.css only; the status hues are the four core meanings (emerald, amber, rose, slate) plus
   sky and violet. Every class starts with «es-». Presentation only. */

/* ---- common parts */
.es-ltr { direction: ltr; unicode-bidi: isolate; }
.es-faint { color: rgb(var(--ink-muted)); font-weight: 600; }
.es-grow { flex: 1; }
.es-gold { color: rgb(245 158 11); }
.es-quiet { margin: 8px 0 0; font-size: 11.5px; color: rgb(var(--ink-muted)); }
.es-chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 18px; white-space: nowrap; border: 1px solid; }
.es-chip.t-brand { background: rgb(var(--brand-50)); color: rgb(var(--brand-800)); border-color: rgb(var(--brand-200)); }
.es-chip.t-emerald { background: rgb(236 253 245); color: rgb(6 95 70); border-color: rgb(110 231 183); }
.es-chip.t-amber { background: rgb(255 251 235); color: rgb(146 64 14); border-color: rgb(252 211 77); }
.es-chip.t-rose { background: rgb(255 241 242); color: rgb(159 18 57); border-color: rgb(253 164 175); }
.es-chip.t-slate { background: rgb(var(--surface-2)); color: rgb(var(--ink-2)); border-color: rgb(var(--border-strong)); }
.es-chip.t-sky { background: rgb(240 249 255); color: rgb(7 89 133); border-color: rgb(125 211 252); }
.es-panel { background: rgb(var(--surface)); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-1); min-width: 0; }
.es-panel-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px 8px; }
.es-panel-h h3 { margin: 0; display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: rgb(var(--ink)); }
.es-panel-h h3 i { color: rgb(var(--brand-600)); }
.es-panel-b { display: flex; flex-direction: column; gap: 4px; padding: 4px 8px 10px; }
.es-panel-f { padding: 8px 14px 10px; border-top: 1px solid var(--line); font-size: 11px; color: rgb(var(--ink-muted)); }
.es-panel .es-note { text-decoration: none; }
.es-panel .es-note b { font-size: 12px; color: rgb(var(--ink)); }
.es-nrow small { direction: inherit; }
.es-empty-b { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 10px; text-align: center; font-size: 12.5px; color: rgb(var(--ink-muted)); border: 1px dashed var(--line); border-radius: 12px; }
.es-empty-b > i { font-size: 20px; color: rgb(var(--ink-muted)); }
.es-empty-b.ok > i { color: rgb(16 185 129); }
.es-empty-b b { color: rgb(var(--ink-2)); }
.es-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.es-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 16px; margin: 0; }
.es-dl > div.w { grid-column: 1 / -1; }
.es-dl dt { font-size: 11px; color: rgb(var(--ink-muted)); }
.es-dl dd { margin: 2px 0 0; font-size: 13px; color: rgb(var(--ink)); }
.es-m-fx { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.es-m-sub { display: block; font-size: 11.5px; font-weight: 400; color: rgb(var(--ink-muted)); }
.es-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 12px; margin-bottom: 12px; border-radius: 10px; background: rgb(var(--surface-2)); border: 1px solid var(--line); font-size: 12px; color: rgb(var(--ink-muted)); }
.es-meta i { color: rgb(var(--brand-600)); margin-inline-end: 6px; }
.es-meta code { direction: ltr; font: 700 11.5px ui-monospace, monospace; color: rgb(var(--brand-700)); }
.es-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; color: rgb(var(--ink-2)); }
.es-tbl th { text-align: start; font-size: 11px; font-weight: 600; color: rgb(var(--ink-muted)); padding: 8px; border-bottom: 1px solid var(--line); background: rgb(var(--surface-2)); }
.es-tbl td { padding: 8px; border-bottom: 1px solid var(--line); }
/* the drawer slides in from the inline-end side */
.es-drawer.es-slide { animation: es-slide .25s ease-out; }
[dir="rtl"] .es-drawer.es-slide { animation-name: es-slide-rtl; }
@keyframes es-slide { from { transform: translateX(100%); } to { transform: none; } }
@keyframes es-slide-rtl { from { transform: translateX(-100%); } to { transform: none; } }

/* ---- Home (napp /): tools, tiles, side column */
.es-hp-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 14px; align-items: start; }
@media (max-width: 1100px) { .es-hp-wrap { grid-template-columns: minmax(0, 1fr); } }
.es-hp-main, .es-ent-main { display: flex; flex-direction: column; gap: 12px; padding: 14px; }
.es-hp-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.es-htools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.es-hsearch { flex: 1 1 240px; min-width: 0; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid rgb(var(--border-strong)); background: rgb(var(--surface)); color: rgb(var(--ink-muted)); }
.es-hsearch:focus-within { border-color: rgb(var(--brand-500)); box-shadow: 0 0 0 3px rgb(var(--brand-500) / .18); }
.es-hsearch input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 13px; color: rgb(var(--ink)); }
.es-pills { display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; -webkit-mask-image: linear-gradient(90deg, #000 94%, transparent); mask-image: linear-gradient(90deg, #000 94%, transparent); } /* GOV-R163-A: one row that scrolls, not a stack */
[dir="rtl"] .es-pills { -webkit-mask-image: linear-gradient(270deg, #000 94%, transparent); mask-image: linear-gradient(270deg, #000 94%, transparent); }
.es-pill { display: inline-flex; flex: none; white-space: nowrap; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid rgb(var(--border-strong)); background: rgb(var(--surface)); color: rgb(var(--ink-2)); font-size: 12px; font-weight: 600; cursor: pointer; }
.es-pill span { font-size: 11px; color: rgb(var(--ink-muted)); direction: ltr; }
.es-pill:hover { border-color: rgb(var(--brand-300)); }
.es-pill[aria-pressed="true"] { background: rgb(var(--brand-600)); border-color: rgb(var(--brand-600)); color: #fff; }
.es-pill[aria-pressed="true"] span { color: #fff; }
.es-pill .fa-star { color: rgb(245 158 11); }
.es-pill[aria-pressed="true"] .fa-star { color: #fff; }
.es-hsec { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: rgb(var(--ink-2)); }
.es-hsec .fa-star { color: rgb(245 158 11); }
.es-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(var(--es-tw, 190px), 100%), 1fr)); gap: 12px; }
.es-tile { position: relative; border-radius: 16px; border: 1px solid rgb(var(--brand-100)); background: rgb(var(--brand-50)); transition: transform .15s, box-shadow .15s, border-color .15s; }
.es-tile:hover, .es-tile:focus-within { transform: translateY(-2px); border-color: rgb(var(--brand-300)); box-shadow: 0 12px 26px -14px rgb(var(--brand-600) / .5); }
.es-tile-a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 12px 14px; text-align: center; color: rgb(var(--ink)); text-decoration: none; border-radius: 16px; }
.es-tile-a:focus-visible { outline: 2px solid rgb(var(--brand-500)); outline-offset: 2px; }
.es-tile-ic { width: 46px; height: 46px; flex: none; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; font-size: 19px; color: #fff; background: linear-gradient(135deg, rgb(var(--brand-500)), rgb(var(--brand-700))); box-shadow: 0 8px 18px -10px rgb(var(--brand-600) / .8); }
.es-tile-tx { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.es-tile-tx b { font-size: 12.5px; line-height: 1.35; }
.es-tile-tx small { font-size: 11px; color: rgb(var(--ink-muted)); }
.es-tile-star { position: absolute; top: 8px; inset-inline-end: 8px; width: 28px; height: 28px; border-radius: 999px; border: 0; background: transparent; color: rgb(var(--ink-muted)); cursor: pointer; }
.es-tile-star:hover { background: rgb(var(--surface) / .7); }
.es-tile-star.on { color: rgb(245 158 11); }
.es-tiles.list { grid-template-columns: 1fr; gap: 6px; }
.es-tiles.list .es-tile:hover, .es-tiles.list .es-tile:focus-within { transform: none; }
.es-tiles.list .es-tile-a { flex-direction: row; padding: 8px 46px 8px 10px; text-align: start; }
[dir="rtl"] .es-tiles.list .es-tile-a { padding: 8px 10px 8px 46px; }
.es-tiles.list .es-tile-ic { width: 34px; height: 34px; font-size: 14px; border-radius: 10px; }
.es-tiles.list .es-tile-star { top: 50%; margin-top: -14px; }
/* PAY-R997-A: the tile colour from the form registration ADMN_FORMS A, R, G, B; the icon square keeps the module gradient for contrast */
/* PAY-R999-A: a white card with a faint tint of the tile colour and a vivid icon square of the same hue, like the enterprise-home module cards */
.es-tile.argb { background: linear-gradient(160deg, rgb(var(--tile) / var(--tile-t, .9)), rgb(var(--surface)) 64%); border-color: var(--line); }
.es-tile.argb .es-tile-ic { background: linear-gradient(135deg, rgb(var(--tile-i1)), rgb(var(--tile-i2))); box-shadow: 0 10px 20px -12px rgb(var(--tile-i2) / .9); }
.es-tile.argb:hover, .es-tile.argb:focus-within { border-color: rgb(var(--tile-i1) / .45); box-shadow: 0 14px 28px -16px rgb(var(--tile-i2) / .55); }
.es-tile:not(.argb) { background: linear-gradient(160deg, rgb(var(--brand-50)), rgb(var(--surface)) 64%); border-color: var(--line); }

/* ---- the announcements ticker (PAY-R986-A): moves, stops on hover, focus or the button; still under reduced motion */
.es-ticker { display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin-bottom: 14px; border-radius: 12px; border: 1px solid var(--line); background: rgb(var(--surface)); overflow: hidden; }
.es-tk-l { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: #fff; background: rgb(var(--brand-600)); }
.es-tk-t { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.es-tk-track, .es-tk-dup { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; }
.es-tk-track { animation: es-tk 38s linear infinite; }
[dir="rtl"] .es-tk-track { animation-name: es-tk-rtl; }
@keyframes es-tk { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes es-tk-rtl { from { transform: translateX(0); } to { transform: translateX(50%); } }
.es-ticker:hover .es-tk-track, .es-ticker:focus-within .es-tk-track, .es-ticker.paused .es-tk-track { animation-play-state: paused; }
.es-tk-it { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px; border: 0; border-radius: 6px; background: transparent; font-size: 12.5px; color: rgb(var(--ink-muted)); cursor: pointer; }
.es-tk-it b { font-weight: 700; color: rgb(var(--ink)); }
.es-tk-it.unread b::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-inline-end: 5px; border-radius: 50%; background: rgb(var(--brand-500)); vertical-align: middle; }
.es-tk-it:hover b, .es-tk-it:focus-visible b { color: rgb(var(--brand-700)); text-decoration: underline; }
.es-tk-it .fa-thumbtack { font-size: 11px; color: rgb(var(--brand-600)); }
.es-tk-sep { color: rgb(var(--ink-muted)); }
.es-tk-p { flex: none; width: 28px; height: 28px; border-radius: 999px; border: 1px solid var(--line); background: rgb(var(--surface-2)); color: rgb(var(--ink-2)); font-size: 11px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.es-tk-p:hover { color: rgb(var(--brand-700)); border-color: rgb(var(--brand-300)); }

/* ---- announcements in the bell and the strip under the home bar (PAY-R986-A, PAY-R987-A) */
.es-news-dot { position: absolute; bottom: -2px; inset-inline-start: -2px; width: 10px; height: 10px; border-radius: 50%; background: rgb(251 191 36); border: 2px solid rgb(var(--brand-700)); }
.es-nt-tabs { display: flex; gap: 4px; padding: 6px 8px 0; }
.es-nt-tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px; border-radius: 9px; border: 1px solid var(--line); background: rgb(var(--surface-2)); color: rgb(var(--ink-2)); font-size: 12px; font-weight: 600; cursor: pointer; }
.es-nt-tabs button[aria-selected="true"] { background: rgb(var(--brand-600)); border-color: rgb(var(--brand-600)); color: #fff; }
.es-nt-n { min-width: 18px; padding: 0 5px; border-radius: 9px; font-size: 11px; line-height: 16px; background: rgb(var(--ink) / .08); direction: ltr; }
.es-nt-tabs button[aria-selected="true"] .es-nt-n { background: rgb(255 255 255 / .25); }
.es-nrow { align-items: flex-start; }
.es-nrow-f { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.es-udot { display: inline-block; width: 7px; height: 7px; margin-inline-start: 6px; border-radius: 50%; background: rgb(var(--brand-500)); vertical-align: middle; }
.es-note-ic.pr-urgent { background: rgb(255 228 230); color: rgb(190 18 60); }
.es-note-ic.pr-high { background: rgb(254 243 199); color: rgb(180 83 9); }
.es-note-ic.pr-low { background: rgb(var(--surface-2)); color: rgb(var(--ink-muted)); }
.es-news { position: relative; z-index: 19; display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 6px 16px; font-size: 12.5px; color: rgb(var(--ink)); background: rgb(var(--brand-50)); border-bottom: 1px solid rgb(var(--brand-200)); animation: es-in .2s ease-out; }
.es-news.pr-urgent { background: rgb(255 241 242); border-bottom-color: rgb(253 164 175); }
.es-news.pr-high { background: rgb(255 251 235); border-bottom-color: rgb(252 211 77); }
.es-news-ic { color: rgb(var(--brand-700)); }
.es-news.pr-urgent .es-news-ic { color: rgb(190 18 60); } .es-news.pr-high .es-news-ic { color: rgb(180 83 9); }
.es-news b { white-space: nowrap; }
.es-news-m { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgb(var(--ink-muted)); }
.es-news-a { flex: none; display: inline-flex; gap: 6px; }
.es-news-a .es-btn { padding: 4px 10px; font-size: 12px; }
@media (max-width: 700px) { .es-news-m { display: none; } .es-news b { white-space: normal; } .es-news { flex-wrap: wrap; } }
/* GOV-R287-A (CR-676, owner 2026-11-18 «كمل شريط الإشعارات R287»): on a narrow screen the strip is two tidy rows instead of three: the icon, the
 * priority chip and the title share the first row (the title up to two lines, never pushed to a row of its own), and the two buttons take the
 * second row at its end. The spill over the page seen first is gone: the strip grows with its content and the page starts under it. */
@media (max-width: 700px) {
  .es-news { row-gap: 6px; padding: 6px 12px; }
  .es-news b { flex: 1 1 140px; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.45; }
  .es-news-a { flex: 1 1 100%; justify-content: flex-end; }
}
@media print { .es-news { display: none !important; } }

/* ---- «للمتابعة» (PAY-R995-A) */
.es-fu-tabs { display: flex; gap: 4px; padding: 0 12px 6px; }
.es-fu-tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 8px; border-radius: 10px; border: 1px solid var(--line); background: rgb(var(--surface-2)); color: rgb(var(--ink-2)); font-size: 12px; font-weight: 700; cursor: pointer; }
.es-fu-tabs button[aria-selected="true"] { background: rgb(var(--brand-600)); border-color: rgb(var(--brand-600)); color: #fff; }
.es-fu-n { min-width: 18px; padding: 0 5px; border-radius: 9px; font-size: 11px; line-height: 16px; background: rgb(var(--ink) / .08); direction: ltr; }
.es-fu-n.rose { background: rgb(225 29 72); color: #fff; } .es-fu-n.amber { background: rgb(180 83 9); color: #fff; }
.es-fu-tabs button[aria-selected="true"] .es-fu-n:not(.rose):not(.amber) { background: rgb(255 255 255 / .25); }
.es-fu-seg { display: flex; gap: 4px; padding: 3px; margin-bottom: 4px; border-radius: 11px; background: rgb(var(--surface-2)); border: 1px solid var(--line); }
.es-fu-seg button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 6px; border-radius: 8px; border: 0; background: transparent; font-size: 11.5px; font-weight: 600; color: rgb(var(--ink-2)); cursor: pointer; }
.es-fu-seg button span { min-width: 18px; padding: 0 5px; border-radius: 9px; font-size: 11px; line-height: 16px; direction: ltr; }
.es-fu-seg .ex span { background: rgb(255 228 230); color: rgb(159 18 57); } .es-fu-seg .so span { background: rgb(254 243 199); color: rgb(146 64 14); }
.es-fu-seg .ex[aria-pressed="true"] { background: rgb(225 29 72); color: #fff; } .es-fu-seg .so[aria-pressed="true"] { background: rgb(180 83 9); color: #fff; }
.es-fu-seg button[aria-pressed="true"] span { background: rgb(255 255 255 / .25); color: #fff; }
.es-fu-doc { --fu: rgb(var(--brand-500)); display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); border-inline-start: 4px solid var(--fu); background: rgb(var(--surface)); color: rgb(var(--ink)); text-align: start; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.es-fu-doc:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -12px rgb(2 6 23 / .35); }
.es-fu-doc.ex { --fu: rgb(225 29 72); } .es-fu-doc.so { --fu: rgb(180 83 9); }   /* white counts keep 4.5:1 */
.es-fu-doc b { font-size: 12.5px; } .es-fu-doc small { font-size: 11px; color: rgb(var(--ink-muted)); }
.es-fu-doc .es-min { flex: 1; }
.es-fu-ic { width: 32px; height: 32px; flex: none; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.es-fu-doc.ex .es-fu-ic { background: rgb(255 228 230); color: rgb(190 18 60); } .es-fu-doc.so .es-fu-ic { background: rgb(254 243 199); color: rgb(180 83 9); }
.es-fu-cnt { min-width: 26px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 800; text-align: center; color: #fff; background: var(--fu); direction: ltr; }
.es-fu-go { font-size: 11px; color: rgb(var(--ink-muted)); }
[dir="rtl"] .es-fu-go { transform: scaleX(-1); }
.es-fu-circ { display: flex; flex-direction: column; gap: 5px; width: 100%; padding: 9px 11px; border-radius: 12px; border: 1px solid var(--line); background: rgb(var(--surface)); color: rgb(var(--ink)); text-align: start; cursor: pointer; }
.es-fu-circ:hover { border-color: rgb(var(--brand-300)); background: rgb(var(--brand-50) / .5); }
.es-fu-ct { display: flex; align-items: flex-start; gap: 8px; } .es-fu-ct b { flex: 1; font-size: 12.5px; line-height: 1.45; }
.es-fu-cm { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11px; color: rgb(var(--ink-muted)); } .es-fu-cm i { margin-inline-end: 4px; }

/* ---- the enterprise home (PAY-R979-A): each card in its module hue (data-hue) */
.es-ent-sec h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 14px; font-weight: 800; color: rgb(var(--ink)); }
.es-ent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.es-ent { position: relative; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(160deg, rgb(var(--brand-50)), rgb(var(--surface)) 62%); transition: transform .15s, box-shadow .15s, border-color .15s; }
.es-ent:hover, .es-ent:focus-within { transform: translateY(-2px); border-color: rgb(var(--brand-300)); box-shadow: 0 14px 28px -16px rgb(var(--brand-600) / .55); }
.es-ent.off { background: rgb(var(--surface)); }
.es-ent-a { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px; border: 0; border-radius: 16px; background: transparent; color: rgb(var(--ink)); text-align: start; cursor: pointer; }
.es-ent-a:focus-visible { outline: 2px solid rgb(var(--brand-500)); outline-offset: 2px; }
.es-ent-ic { width: 50px; height: 50px; border-radius: 15px; display: inline-flex; align-items: center; justify-content: center; font-size: 21px; color: #fff; background: linear-gradient(135deg, rgb(var(--brand-500)), rgb(var(--brand-700))); box-shadow: 0 10px 20px -12px rgb(var(--brand-600) / .9); }
.es-ent.off .es-ent-ic { filter: grayscale(.35); opacity: .85; }
.es-ent-a b { margin-top: 4px; font-size: 14px; }
.es-ent-a small { min-height: 30px; font-size: 11.5px; color: rgb(var(--ink-muted)); }
.es-ent-f { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

/* ---- My profile (PAY-R977-A): identity card, tabs, password rules, signature */
.es-pp-id { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; padding: 18px; margin-bottom: 12px; }
.es-av.es-av-xl { width: 88px; height: 88px; border-radius: 24px; font-size: 28px; color: #fff; background: linear-gradient(135deg, rgb(var(--brand-500)), rgb(var(--brand-800))); overflow: visible; }
.es-av.es-av-xl .es-photo { border-radius: 24px; }
.es-av.es-av-xl:has(.es-photo) { padding: 0; box-shadow: 0 0 0 3px rgb(var(--brand-100)); }
.es-av-xl .es-av-cam { width: 30px; height: 30px; bottom: -6px; inset-inline-end: -6px; font-size: 12px; }
.es-pp-tx { flex: 1; min-width: 240px; }
.es-pp-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.es-pp-name h3 { margin: 0; font-size: 19px; font-weight: 800; color: rgb(var(--ink)); }
.es-pp-tx > p { margin: 2px 0 10px; font-size: 12.5px; color: rgb(var(--ink-muted)); }
.es-pp-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 12px; color: rgb(var(--ink-muted)); }
.es-pp-facts > span { display: inline-flex; align-items: center; gap: 6px; }
.es-pp-facts b { color: rgb(var(--ink)); font-weight: 600; }
.es-pp-facts .es-av-del { margin-top: 0; }
.es-ptabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px 12px 0; border-bottom: 1px solid var(--line); }
.es-ptabs button { display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: rgb(var(--ink-muted)); font-size: 12.5px; font-weight: 600; cursor: pointer; margin-bottom: -1px; }
.es-ptabs button:hover { color: rgb(var(--ink)); }
.es-ptabs button[aria-selected="true"] { color: rgb(var(--brand-700)); border-bottom-color: rgb(var(--brand-600)); }
.es-pp-body { padding: 16px; }
.es-pp-pb { max-width: 720px; }
.es-pp-pb .es-prof-h { display: none; }   /* the identity card above already carries the photo and the name */
.es-sel { min-width: 200px; padding: 6px 10px; border-radius: 10px; border: 1px solid rgb(var(--border-strong)); background: rgb(var(--surface)); color: rgb(var(--ink)); font-size: 12.5px; }
.es-pw { max-width: 440px; display: flex; flex-direction: column; gap: 12px; }
.es-pw h4 { margin: 0; display: flex; align-items: center; gap: 7px; font-size: 14px; color: rgb(var(--ink)); }
.es-pw h4 i { color: rgb(var(--brand-600)); }
.es-fld { display: flex; flex-direction: column; gap: 4px; }
.es-fld label { font-size: 12px; font-weight: 600; color: rgb(var(--ink-2)); }
.es-fld input { padding: 8px 10px; border-radius: 10px; border: 1px solid rgb(var(--border-strong)); background: rgb(var(--surface)); color: rgb(var(--ink)); font-size: 13px; }
.es-fld input:focus { outline: 0; border-color: rgb(var(--brand-500)); box-shadow: 0 0 0 3px rgb(var(--brand-500) / .18); }
.es-req { color: rgb(225 29 72); }
.es-pw-rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: rgb(var(--ink-muted)); }
.es-pw-rules i { margin-inline-end: 6px; }
.es-pw-rules li.ok { color: rgb(4 120 87); }
.es-btn[disabled] { opacity: .55; cursor: not-allowed; }
.es-sig { max-width: 620px; display: flex; flex-direction: column; gap: 10px; }
.es-sig-tools { display: flex; align-items: center; gap: 8px; font-size: 12px; color: rgb(var(--ink-muted)); }
.es-pen { width: 24px; height: 24px; border-radius: 999px; border: 2px solid rgb(var(--surface)); box-shadow: 0 0 0 1px rgb(var(--border-strong)); cursor: pointer; }
.es-pen[aria-pressed="true"] { box-shadow: 0 0 0 2px rgb(var(--brand-500)); }
.es-sig-c { width: 100%; height: 180px; border: 2px dashed rgb(var(--border-strong)); border-radius: 16px; background: #fff; touch-action: none; cursor: crosshair; }
.es-sig-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.es-sig-saved { margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: #fff; text-align: center; }
.es-sig-saved figcaption { font-size: 11px; color: rgb(100 116 139); margin-bottom: 6px; }
.es-sig-saved img { max-height: 140px; max-width: 100%; }

/* ---- record history and action history (PAY-R994-A) */
.es-hh { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.es-hh-ic { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: rgb(var(--brand-50)); color: rgb(var(--brand-700)); }
.es-hh b { display: block; font-size: 15px; font-weight: 800; } .es-hh small { display: block; font-size: 11.5px; font-weight: 400; color: rgb(var(--ink-muted)); }
.es-tl { position: relative; list-style: none; margin: 0; padding: 0; }
.es-tl::before { content: ''; position: absolute; top: 14px; bottom: 14px; inset-inline-start: 15px; width: 2px; background: var(--line); }
.es-tl-it { position: relative; display: flex; gap: 12px; padding-bottom: 12px; }
.es-tl-mark { position: relative; z-index: 1; flex: none; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; background: rgb(var(--brand-600)); box-shadow: 0 0 0 4px rgb(var(--surface)); }
.es-tl-it.new .es-tl-mark { background: rgb(5 150 105); }
.es-tl-card { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgb(var(--surface)); }
.es-tl-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.es-tl-top b { font-size: 13px; color: rgb(var(--ink)); }
.es-tl-when { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: rgb(var(--ink-muted)); }
.es-tl-who { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.es-tl-who small { display: block; font-size: 11px; color: rgb(var(--ink-muted)); } .es-tl-who b { font-size: 13px; color: rgb(var(--ink)); }
.es-tl-av { width: 28px; height: 28px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; background: rgb(var(--brand-50)); color: rgb(var(--brand-700)); }
/* ---- «تاريخ السجل / Record history», one component on every screen (GOV-R256-A, CR-633); the owner's compact card (GOV-R271-A, CR-653,
   record-history-card.html): 365px, number strip with copy, connected timeline (32px nodes on a 2px rail 15px from the inline start), green
   «لم يُعدَّل منذ إنشائه» badge, amber changed state with before/after rows, folded data source */
#es-modal:has(.es-rh.is-win) .es-modal { max-width: min(365px, calc(100vw - 24px)); }
.es-rh { display: flex; flex-direction: column; gap: 12px; } .es-rh:not(.is-win) { max-width: 520px; }
.es-rh-hh { flex-wrap: nowrap; min-width: 0; gap: 8px; }
.es-rh-hic { flex: none; width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px;
  background: rgb(var(--brand-50)); color: rgb(var(--brand-600)); border: 1px solid rgb(var(--brand-200)); }
.es-rh-ht { display: flex; flex-direction: column; min-width: 0; } .es-rh-ht b { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 800; color: rgb(var(--ink)); }
.es-rh-ht small { font-size: 11px; font-weight: 400; color: rgb(var(--ink-muted)); }
.es-rh-live { width: 6px; height: 6px; border-radius: 50%; background: rgb(var(--brand-500)); }
.es-rh-idbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: rgb(var(--surface-2)); }
.es-rh-idv { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; color: rgb(var(--ink-2)); }
.es-rh-idv b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; color: rgb(var(--ink)); }
.es-rh-idv b.is-code, .es-rh-hash { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; } .es-rh-hash { color: rgb(var(--ink-muted)); }
.es-rh-copy { flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 26px; padding: 0 8px; border: 0; border-radius: 6px; background: none; font: inherit;
  font-size: 11.5px; font-weight: 700; color: rgb(var(--brand-700)); cursor: pointer; transition: background .15s ease; }
.es-rh-copy:hover { background: rgb(var(--brand-100)); } .es-rh-copy.is-done { color: rgb(var(--brand-700)); background: rgb(var(--brand-100)); }
.es-rh-copy:focus-visible, .es-rh-srcbtn:focus-visible { outline: 2px solid rgb(var(--brand-600)); outline-offset: 2px; }
.es-rh-tl { position: relative; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.es-rh-tl::before { content: ''; position: absolute; inset-inline-start: 15px; top: 14px; bottom: 14px; width: 2px; background: rgb(226 232 240); }
.es-rh-ev { position: relative; display: flex; align-items: flex-start; gap: 12px; }
.es-rh-node { position: relative; z-index: 1; flex: none; width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; box-shadow: 0 0 0 3px rgb(var(--surface)); }
.es-rh-ev.new .es-rh-node { background: rgb(var(--brand-600)); color: #fff; box-shadow: 0 0 0 3px rgb(var(--surface)), 0 2px 6px rgb(var(--brand-600) / .25); }
.es-rh-ev.upd .es-rh-node { background: rgb(245 158 11); color: #fff; box-shadow: 0 0 0 3px rgb(var(--surface)), 0 2px 6px rgb(245 158 11 / .25); }
.es-rh-ev.is-empty .es-rh-node { background: rgb(var(--surface-2)); color: rgb(var(--ink-muted)); box-shadow: 0 0 0 3px rgb(var(--surface)), inset 0 0 0 1px rgb(203 213 225); }
.es-rh-card { flex: 1; min-width: 0; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: rgb(var(--surface)); box-shadow: 0 1px 2px rgb(15 23 42 / .04); transition: border-color .15s ease; }
.es-rh-ev.new .es-rh-card:hover { border-color: rgb(var(--brand-200)); } .es-rh-ev.upd:not(.is-empty) .es-rh-card { border-color: rgb(253 230 138); }
.es-rh-ev.is-empty .es-rh-card { background: rgb(var(--surface-2)); box-shadow: none; }
.es-rh-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.es-rh-ev:not(.is-empty) .es-rh-head { padding-bottom: 6px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.es-rh-badge { display: inline-flex; align-items: center; gap: 5px; padding: 1px 7px; border-radius: 6px; font-size: 11px; font-weight: 700; border: 1px solid; }
.es-rh-badge.t-new { background: rgb(var(--brand-50)); color: rgb(var(--brand-700)); border-color: rgb(var(--brand-200)); }
.es-rh-badge.t-upd { background: rgb(255 251 235); color: rgb(146 64 14); border-color: rgb(253 230 138); }
.es-rh-badge.t-none { background: rgb(var(--surface)); color: rgb(var(--ink-2)); border-color: var(--line); }
.es-rh-bdot { width: 4px; height: 4px; border-radius: 50%; background: rgb(var(--brand-500)); }
.es-rh-rel { font-size: 11px; color: rgb(var(--ink-muted)); }
.es-rh-ok { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgb(var(--brand-50));
  color: rgb(var(--brand-700)); border: 1px solid rgb(var(--brand-200)); } .es-rh-ok i { font-size: 10px; color: rgb(var(--brand-600)); }
.es-rh-who { display: flex; align-items: center; gap: 8px; min-width: 0; } .es-rh-who b { min-width: 0; font-size: 12.5px; font-weight: 700; color: rgb(var(--ink)); overflow-wrap: anywhere; }
.es-rh-av { flex: none; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700;
  color: #fff; background: linear-gradient(45deg, rgb(var(--brand-600)), rgb(var(--brand-400))); }
.es-rh-ev.upd .es-rh-av { background: linear-gradient(45deg, rgb(217 119 6), rgb(245 158 11)); } .es-rh-av.is-sys { background: rgb(var(--surface-2)); color: rgb(var(--ink-2)); }
.es-rh-dt { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--line);
  font: 600 11px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: rgb(var(--ink-2)); font-variant-numeric: tabular-nums; }
.es-rh-dt span { display: inline-flex; align-items: center; gap: 5px; } .es-rh-dt i { font-size: 10.5px; color: rgb(var(--ink-muted)); }
.es-rh-diff { margin-top: 8px; padding: 6px 8px; border-radius: 6px; border: 1px solid var(--line); background: rgb(var(--surface-2)); display: flex; flex-direction: column; gap: 4px;
  font: 11px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; } .es-rh-diff div { display: flex; justify-content: space-between; gap: 8px; color: rgb(var(--ink-muted)); }
.es-rh-diff b { color: rgb(var(--brand-700)); } .es-rh-diff s { color: rgb(var(--ink-muted)); font-weight: 400; }
.es-rh-src { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: rgb(var(--surface-2)); }
.es-rh-srcbtn { width: 100%; display: flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; border: 0; background: none; font: inherit; font-size: 11.5px;
  font-weight: 700; color: rgb(var(--ink-2)); cursor: pointer; } .es-rh-srcbtn:hover { background: rgb(var(--surface)); } .es-rh-srcbtn > i:first-child { color: rgb(var(--brand-600)); }
.es-rh-chev { margin-inline-start: auto; font-size: 10.5px; color: rgb(var(--ink-muted)); transition: transform .18s ease; } .es-rh-srcbtn[aria-expanded="true"] .es-rh-chev { transform: rotate(180deg); }
.es-rh-srcp { padding: 8px 10px; border-top: 1px solid var(--line); background: rgb(var(--surface)); display: flex; flex-direction: column; gap: 4px;
  font: 11px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; } .es-rh-srcp div { display: flex; justify-content: space-between; gap: 8px; color: rgb(var(--ink-muted)); }
.es-rh-srcp b { color: rgb(var(--ink)); } .es-rh-srcp p { margin: 2px 0 0; font-family: inherit; color: rgb(var(--ink-muted)); }
@media (prefers-reduced-motion: reduce) { .es-rh-copy, .es-rh-chev, .es-rh-card { transition: none; } }
.dark .es-rh-hic, .dark .es-rh-badge.t-new, .dark .es-rh-ok { background: rgb(var(--brand-500) / .16); color: rgb(var(--brand-200)); border-color: rgb(var(--brand-500) / .35); }
.dark .es-rh-badge.t-upd { background: rgb(245 158 11 / .14); color: rgb(252 211 77); border-color: rgb(245 158 11 / .35); }
.dark .es-rh-tl::before { background: var(--line); } .dark .es-rh-card { box-shadow: none; } .dark .es-rh-copy { color: rgb(var(--brand-200)); } .dark .es-rh-diff b { color: rgb(var(--brand-200)); }
/* GOV-R273-A (CR-656, owner 2026-11-17): the card in the module's theme colour (above); smaller — 340px, tighter spacing, 28px nodes; small
   buttons (the close 26px, «إغلاق» 30px, copy 26px; owner's choice over the 44px targets of GOV-R232-A for this window and the page-band
   icon, still above the 24px minimum of WCAG 2.2 target size); a coloured close; no fog behind the window; a small photo of the person
   instead of the initials; and a lively record-history icon in the page band (EmisShell.histPaint) */
#es-modal:has(.es-rh.is-win) .es-modal { max-width: min(340px, calc(100vw - 24px)); }
.es-rh { gap: 10px; } .es-rh-tl { gap: 10px; } .es-rh-ev { gap: 10px; }
.es-rh-tl::before { inset-inline-start: 13px; top: 12px; bottom: 12px; }
.es-rh-node { width: 28px; height: 28px; font-size: 11px; border-radius: 7px; }
.es-rh-card { padding: 8px 10px; border-radius: 10px; }
.es-rh-ev:not(.is-empty) .es-rh-head { padding-bottom: 5px; margin-bottom: 6px; }
.es-rh-who { gap: 7px; } .es-rh-who b { font-size: 12px; } .es-rh-av { width: 24px; height: 24px; font-size: 10px; }
.es-rh-dt { margin-top: 6px; padding-top: 5px; }
.es-rh-idbar { padding: 4px 8px; } .es-rh-idv { font-size: 11.5px; }
.es-rh-copy { min-height: 26px; padding: 0 7px; font-size: 11px; position: relative; }
.es-rh-srcbtn { min-height: 32px; font-size: 11px; position: relative; }
.es-rh-hic { width: 28px; height: 28px; font-size: 12px; border-radius: 7px; } .es-rh-ht b { font-size: 13.5px; } .es-rh-ht small { font-size: 11px; }
.es-rh-av.is-photo { padding: 0; overflow: hidden; background: rgb(var(--surface-2)); box-shadow: 0 0 0 2px rgb(var(--surface)), 0 0 0 3px rgb(var(--brand-200)); }
.es-rh-av.is-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
#es-modal:has(.es-rh.is-win) .es-mb { background: rgb(15 23 42 / .12); backdrop-filter: none; -webkit-backdrop-filter: none; }
#es-modal:has(.es-rh.is-win) .es-hx { position: relative; width: 26px; height: 26px; min-width: 0; min-height: 0; font-size: 11px; border-radius: 7px;
  color: rgb(var(--brand-700)); background: rgb(var(--brand-50)); border: 1px solid rgb(var(--brand-200)); }
#es-modal:has(.es-rh.is-win) .es-hx:hover { background: rgb(var(--brand-100)); color: rgb(var(--brand-800)); }
#es-modal:has(.es-rh.is-win) .es-m-fx { margin-top: 10px; padding-top: 8px; }
#es-modal:has(.es-rh.is-win) .es-m-fx .es-btn { position: relative; min-height: 30px; padding: 0 14px; font-size: 12px; font-weight: 700; border-radius: 8px;
  background: rgb(var(--brand-600)); border-color: rgb(var(--brand-600)); color: #fff; }
#es-modal:has(.es-rh.is-win) .es-m-fx .es-btn:hover { background: rgb(var(--brand-700)); border-color: rgb(var(--brand-700)); }
#es-modal:has(.es-rh.is-win) .es-m-fx .es-btn:focus-visible, #es-modal:has(.es-rh.is-win) .es-hx:focus-visible { outline: 2px solid rgb(var(--brand-600)); outline-offset: 2px; }
.dark #es-modal:has(.es-rh.is-win) .es-hx { background: rgb(var(--brand-500) / .16); border-color: rgb(var(--brand-500) / .35); color: rgb(var(--brand-200)); }
/* the page-band icon */
.es-hist-b { position: relative; flex: none; align-self: flex-start; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; color: inherit; cursor: pointer; background: color-mix(in srgb, currentColor 10%, transparent); border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
  transition: transform .2s ease, background-color .2s ease, opacity .2s ease; }
.es-band .es-hist-b { color: #fff; } body.es-calm .es-band .es-hist-b { color: rgb(var(--brand-700)); }
.es-hist-b[aria-disabled="true"] { opacity: .6; }
.es-hist-b.is-ready:hover { background: color-mix(in srgb, currentColor 22%, transparent); transform: translateY(-1px); }
.es-hist-b:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.es-hist-pulse { position: absolute; top: 2px; inset-inline-end: 2px; width: 7px; height: 7px; border-radius: 50%; background: rgb(52 211 153); box-shadow: 0 0 0 2px rgb(var(--brand-700)); display: none; }
.es-hist-b.is-ready .es-hist-pulse { display: block; animation: es-hist-dot 2.4s ease-in-out infinite; }
.es-hist-b.is-new { animation: es-hist-pop .6s ease-out 1; }
@keyframes es-hist-dot { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: .65; } }
@keyframes es-hist-pop { 0% { transform: scale(.85); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
.page-hero.es-has-hist, #es-main .page-hero.es-has-hist, #main-content .page-hero.es-has-hist, body .page-hero.es-has-hist { position: relative; padding-inline-end: 92px !important; }
#es-main .page-hero.es-has-x:not(.es-has-hist), #main-content .page-hero.es-has-x:not(.es-has-hist) { padding-inline-end: 56px !important; }   /* a module rule fixes the head padding with !important: the close button and this icon keep their room */
.page-hero > .es-hist-b, body .page-hero > .es-hist-b, #main-content .page-hero > .es-hist-b, #es-main .page-hero > .es-hist-b { position: absolute; top: 13px; inset-inline-end: 50px; z-index: 1; }
html[data-es-motion="reduce"] .es-hist-b, html[data-es-motion="reduce"] .es-hist-pulse { animation: none !important; transition: none; }
@media (prefers-reduced-motion: reduce) { .es-hist-b, .es-hist-pulse { animation: none !important; transition: none; } }
@media print { .es-hist-b { display: none; } }
.es-ah-act { padding: 1px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; border: 1px solid var(--line); background: rgb(var(--surface-2)); color: rgb(var(--ink-2)); }
.es-ah-note { display: flex; align-items: flex-start; gap: 6px; margin-top: 7px; padding: 6px 9px; border-radius: 8px; font-size: 12px; background: rgb(var(--surface-2)); color: rgb(var(--ink-2)); }
.es-ah .k-submit .es-tl-mark { background: rgb(2 132 199); } .es-ah .k-submit .es-ah-act { background: rgb(240 249 255); color: rgb(7 89 133); border-color: rgb(125 211 252); }
.es-ah .k-approve .es-tl-mark { background: rgb(5 150 105); } .es-ah .k-approve .es-ah-act { background: rgb(236 253 245); color: rgb(6 95 70); border-color: rgb(110 231 183); }
.es-ah .k-reject .es-tl-mark { background: rgb(225 29 72); } .es-ah .k-reject .es-ah-act { background: rgb(255 241 242); color: rgb(159 18 57); border-color: rgb(253 164 175); }
.es-ah .k-return .es-tl-mark { background: rgb(180 83 9); } .es-ah .k-return .es-ah-act { background: rgb(255 251 235); color: rgb(146 64 14); border-color: rgb(252 211 77); }
.es-ah .k-withdraw .es-tl-mark { background: rgb(71 85 105); } .es-ah .k-withdraw .es-ah-act { background: rgb(var(--surface-2)); color: rgb(var(--ink-2)); border-color: rgb(var(--border-strong)); }
.es-ah .k-delegate .es-tl-mark { background: rgb(124 58 237); } .es-ah .k-delegate .es-ah-act { background: rgb(245 243 255); color: rgb(91 33 182); border-color: rgb(196 181 253); }
.es-ah .k-cancel .es-tl-mark { background: rgb(190 18 60); } .es-ah .k-cancel .es-ah-act { background: rgb(255 241 242); color: rgb(159 18 57); border-color: rgb(253 164 175); } /* GOV-R237-A, CR-651: cancel kind, core Cancelled badge colour */

/* ---- dark mode */
.dark .es-chip.t-brand { background: rgb(var(--brand-500) / .16); color: rgb(var(--brand-200)); border-color: rgb(var(--brand-500) / .35); }
.dark .es-chip.t-emerald { background: rgb(16 185 129 / .14); color: rgb(110 231 183); border-color: rgb(16 185 129 / .35); }
.dark .es-chip.t-amber { background: rgb(245 158 11 / .14); color: rgb(252 211 77); border-color: rgb(245 158 11 / .35); }
.dark .es-chip.t-rose { background: rgb(244 63 94 / .14); color: rgb(253 164 175); border-color: rgb(244 63 94 / .35); }
.dark .es-chip.t-sky { background: rgb(14 165 233 / .14); color: rgb(125 211 252); border-color: rgb(14 165 233 / .35); }
.dark .es-tile { background: rgb(var(--brand-500) / .10); border-color: rgb(var(--brand-500) / .25); }
.dark .es-tile.argb { background: linear-gradient(160deg, rgb(var(--tile-i1) / .16), rgb(var(--surface)) 64%); border-color: var(--line); }
.dark .es-ent { background: rgb(var(--surface)); }
.dark .es-news { background: rgb(var(--brand-500) / .12); border-bottom-color: rgb(var(--brand-500) / .3); }
.dark .es-news.pr-urgent { background: rgb(244 63 94 / .14); border-bottom-color: rgb(244 63 94 / .35); }
.dark .es-news.pr-high { background: rgb(245 158 11 / .14); border-bottom-color: rgb(245 158 11 / .35); }
.dark .es-note-ic.pr-urgent { background: rgb(244 63 94 / .16); color: rgb(253 164 175); }
.dark .es-note-ic.pr-high { background: rgb(245 158 11 / .16); color: rgb(252 211 77); }
.dark .es-fu-doc.ex .es-fu-ic, .dark .es-fu-seg .ex span { background: rgb(244 63 94 / .16); color: rgb(253 164 175); }
.dark .es-fu-doc.so .es-fu-ic, .dark .es-fu-seg .so span { background: rgb(245 158 11 / .16); color: rgb(252 211 77); }
.dark .es-fu-circ:hover { background: rgb(var(--brand-500) / .10); }
.dark .es-hh-ic, .dark .es-tl-av { background: rgb(var(--brand-500) / .16); color: rgb(var(--brand-200)); }
.dark .es-ah .es-ah-act { background: rgb(var(--surface-2)); color: rgb(var(--ink)); }
.dark .es-pw-rules li.ok { color: rgb(110 231 183); }
.dark .es-ptabs button[aria-selected="true"] { color: rgb(var(--brand-300)); }
.dark .es-panel-h h3 i, .dark .es-pw h4 i { color: rgb(var(--brand-400)); }
.dark .es-sel, .dark .es-fld input { background: rgb(var(--surface-2)); }

/* ---- reduced motion: nothing moves */
@media (prefers-reduced-motion: reduce) {
  .es-tk-track, .es-drawer.es-slide, .es-news { animation: none !important; }
  .es-tk-dup, .es-tk-p { display: none; }
  .es-tk-t { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .es-tile, .es-ent, .es-fu-doc { transition: none; }
  .es-tile:hover, .es-tile:focus-within, .es-ent:hover, .es-ent:focus-within, .es-fu-doc:hover { transform: none; }
}

/* GOV-R161-A (CR-333): the home side column is a div with role complementary, never an aside, so a module page rule on aside (Loans: #app aside dark gradient) cannot paint it */
.es-hp-side { background: transparent; }

/* ---- GOV-R163-A: the home tools row of napp (Payroll home) for every module: Screens / Modules switch, tile size (minus, slider, plus), grouped sections that fold */
.es-seg { display: inline-flex; padding: 2px; border-radius: 10px; border: 1px solid var(--line); background: rgb(var(--surface-2)); }
.es-seg button { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px; border: 0; background: transparent; color: rgb(var(--ink-muted)); font-size: 12px; font-weight: 600; cursor: pointer; }
.es-seg button[aria-pressed="true"] { background: rgb(var(--surface)); color: rgb(var(--brand-700)); box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
.es-hsize { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 4px; border-radius: 10px; border: 1px solid var(--line); background: rgb(var(--surface-2)); }
.es-hsize button { width: 24px; height: 24px; border-radius: 7px; border: 0; background: transparent; color: rgb(var(--ink-muted)); font-size: 11px; cursor: pointer; }
.es-hsize button:hover { background: rgb(var(--surface)); color: rgb(var(--brand-700)); }
.es-hsize input { width: 92px; accent-color: rgb(var(--brand-600)); cursor: pointer; }
.es-btn-s { height: 28px; padding: 0 10px; font-size: 11.5px; }
.es-gbar { display: flex; justify-content: flex-end; margin-top: -4px; }
.es-gsec { display: flex; flex-direction: column; gap: 10px; }
.es-gsec + .es-gsec { margin-top: 4px; }
.es-gsec-h { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 4px; border: 0; border-radius: 10px; background: transparent; color: rgb(var(--ink)); font-size: 13px; cursor: pointer; text-align: start; }
.es-gsec-h:hover { background: rgb(var(--surface-2)); }
.es-gsec-h:focus-visible { outline: 2px solid rgb(var(--brand-500)); outline-offset: 2px; }
.es-gsec-ic { width: 28px; height: 28px; flex: none; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; color: rgb(var(--brand-700)); background: rgb(var(--brand-100)); }
.es-gsec-h b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.es-gsec-line { flex: 1; height: 1px; background: var(--line); min-width: 16px; }
.es-gsec-cv { color: rgb(var(--ink-muted)); font-size: 11px; transition: transform .15s; }
.es-gsec.shut .es-gsec-cv { transform: rotate(90deg); }
[dir="rtl"] .es-gsec.shut .es-gsec-cv { transform: rotate(-90deg); }
/* tile size: small tiles turn into a compact row, large ones grow the icon */
.es-hp-main[data-tsize="sm"] .es-tiles:not(.list) .es-tile-a { flex-direction: row; padding: 10px 36px 10px 10px; text-align: start; gap: 8px; }
[dir="rtl"] .es-hp-main[data-tsize="sm"] .es-tiles:not(.list) .es-tile-a { padding: 10px 10px 10px 36px; }
.es-hp-main[data-tsize="sm"] .es-tiles:not(.list) .es-tile-ic { width: 32px; height: 32px; font-size: 13px; border-radius: 10px; }
.es-hp-main[data-tsize="sm"] .es-tiles:not(.list) .es-tile-star { top: 50%; margin-top: -14px; }
.es-hp-main[data-tsize="sm"] .es-tiles:not(.list) { gap: 8px; }
.es-hp-main[data-tsize="lg"] .es-tiles:not(.list) .es-tile-a { padding: 24px 16px 18px; gap: 10px; }
.es-hp-main[data-tsize="lg"] .es-tiles:not(.list) .es-tile-ic { width: 58px; height: 58px; font-size: 24px; border-radius: 18px; }
.es-hp-main[data-tsize="lg"] .es-tile-tx b { font-size: 13.5px; }
/* modules view: one card per screen group */
.es-mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 12px; }
.es-mod { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 16px; border: 1px solid rgb(var(--brand-100)); background: linear-gradient(160deg, rgb(var(--brand-50)), rgb(var(--surface))); color: rgb(var(--ink)); text-align: start; cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; }
.es-mod:hover, .es-mod:focus-visible { transform: translateY(-2px); border-color: rgb(var(--brand-300)); box-shadow: 0 12px 26px -14px rgb(var(--brand-600) / .5); outline: none; }
.es-mod-ic { width: 44px; height: 44px; flex: none; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; color: #fff; background: linear-gradient(135deg, rgb(var(--brand-500)), rgb(var(--brand-700))); }
.es-mod b { display: block; font-size: 13.5px; line-height: 1.35; }
.es-mod small { display: block; font-size: 11px; color: rgb(var(--ink-muted)); margin-top: 2px; }
.es-mod-ls { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.es-mod-ls i { font-style: normal; font-size: 11px; padding: 1px 8px; border-radius: 999px; background: rgb(var(--surface)); border: 1px solid var(--line); color: rgb(var(--ink-2)); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.es-mod-go { margin-inline-start: auto; color: rgb(var(--brand-600)); font-size: 12px; align-self: center; }
[dir="ltr"] .es-mod-go { transform: scaleX(-1); }
.dark .es-mod { background: rgb(var(--brand-500) / .10); border-color: rgb(var(--brand-500) / .25); }
@media (prefers-reduced-motion: reduce) { .es-mod, .es-gsec-cv { transition: none; } .es-mod:hover { transform: none; } }
/* GOV-R163-A: no empty space in the home grid: titles take two lines at most and the code line one, tiles centre their content, sections sit closer */
.es-tile-tx { min-width: 0; }
.es-tile-tx b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.es-tile-tx small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.es-tiles:not(.list) .es-tile { display: flex; } .es-tiles:not(.list) .es-tile-a { flex: 1; justify-content: center; }
.es-hp-main[data-tsize="sm"] .es-tiles:not(.list) .es-tile-a { justify-content: flex-start; align-items: center; padding-block: 8px; }
.es-hp-main[data-tsize="sm"] .es-tile-tx b { font-size: 12px; }
.es-gsec { gap: 8px; } .es-gsec + .es-gsec { margin-top: 0; }
.es-gsec-h { padding: 4px; }
@media (min-width: 1400px) { .es-hp-wrap { grid-template-columns: minmax(0, 1fr) 290px; } }
/* GOV-R163-A (owner): the favourite star of a tile shows only on hover or keyboard focus; a starred tile keeps its filled star; touch screens without hover always show it */
@media (hover: hover) {
  .es-tile-star:not(.on) { opacity: 0; transform: scale(.85); transition: opacity .15s, transform .15s; }
  .es-tile:hover .es-tile-star, .es-tile:focus-within .es-tile-star,
  .es-ent:hover .es-tile-star, .es-ent:focus-within .es-tile-star, .es-tile-star:focus-visible { opacity: 1; transform: none; } /* PAY-R998-A: the enterprise home module cards too */
}
@media (prefers-reduced-motion: reduce) { .es-tile-star { transition: none; } }
.es-gsec-h b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } /* GOV-R163-A: a long group name wraps to two lines on a narrow screen */
/* GOV-R163-A (owner: «ما زالت موجودة مشكلة الفراغات»): with every screen shown the groups are a board, not rows of a grid: each group is a card
   with its screens as compact rows, and the cards flow into columns (the tile size sets the column width), so a short group leaves no empty cells */
.es-gboard { column-width: calc(var(--es-tw, 190px) + 90px); column-gap: 12px; }
.es-gboard .es-gsec { display: block; break-inside: avoid; margin: 0 0 12px; padding: 8px; border-radius: 16px; border: 1px solid var(--line); background: rgb(var(--surface)); }
.es-gboard .es-gsec + .es-gsec { margin-top: 0; }
.es-gboard .es-gsec-h { margin-bottom: 6px; }
.es-gboard .es-gsec-line { visibility: hidden; }
.es-gboard .es-tiles, .es-gboard .es-tiles:not(.list) { grid-template-columns: 1fr; gap: 4px; }
.es-gboard .es-tile { border-radius: 12px; }
.es-gboard .es-tile:hover, .es-gboard .es-tile:focus-within { transform: none; }
.es-gboard .es-tiles .es-tile-a, .es-hp-main[data-tsize] .es-gboard .es-tiles:not(.list) .es-tile-a { flex-direction: row; justify-content: flex-start; align-items: center; gap: 10px; padding: 7px 40px 7px 8px; text-align: start; }
[dir="rtl"] .es-gboard .es-tiles .es-tile-a, [dir="rtl"] .es-hp-main[data-tsize] .es-gboard .es-tiles:not(.list) .es-tile-a { padding: 7px 8px 7px 40px; }
.es-gboard .es-tile-ic, .es-hp-main[data-tsize] .es-gboard .es-tiles:not(.list) .es-tile-ic { width: 32px; height: 32px; font-size: 13px; border-radius: 10px; box-shadow: none; }
.es-gboard .es-tile-star, .es-hp-main[data-tsize] .es-gboard .es-tiles:not(.list) .es-tile-star { top: 50%; margin-top: -14px; }
.es-gboard .es-tile-tx b { font-size: 12.5px; }
.es-gboard .es-tile-tx, .es-tiles.list .es-tile-tx, .es-hp-main[data-tsize="sm"] .es-tiles .es-tile-tx { flex: 1 1 auto; } /* the text takes the free width, so a short name does not wrap in a wide tile */

/* ---- GOV-R165-A: the napp expiry page and the circulars search page as wide drawers; the home card stays short however many circulars there are */
.es-drawer.wide { width: min(900px, 100vw); }
[dir="ltr"] .es-flip { transform: scaleX(-1); }
.es-fu-types { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.es-fu-types button { cursor: pointer; font: inherit; font-size: 11px; }
.es-fu-types button b { color: rgb(var(--brand-700)); }
.es-fu-all { width: 100%; justify-content: center; margin-top: 8px; }
.es-xp-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; }
.es-xp-tools .es-hsearch { flex: 1 1 220px; height: 36px; }
.es-xp-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
.es-xp-t { margin: 0; }
.es-xp-t thead th { position: sticky; top: 0; background: rgb(var(--surface-2)); }
.es-xp-th { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: inherit; cursor: pointer; }
.es-xp-th i { font-size: 11px; color: rgb(var(--ink-muted)); }
.es-xp-t tr.ex td:first-child { box-shadow: inset 3px 0 0 rgb(225 29 72); } [dir="rtl"] .es-xp-t tr.ex td:first-child { box-shadow: inset -3px 0 0 rgb(225 29 72); }
.es-xp-t tr.hot td:first-child { box-shadow: inset 3px 0 0 rgb(245 158 11); } [dir="rtl"] .es-xp-t tr.hot td:first-child { box-shadow: inset -3px 0 0 rgb(245 158 11); }
.es-xp-bar { display: flex; align-items: center; gap: 8px; min-width: 150px; }
.es-xp-bar i { flex: 1; height: 6px; border-radius: 999px; background: linear-gradient(90deg, rgb(var(--brand-500)) var(--p), rgb(var(--surface-2)) var(--p)); border: 1px solid var(--line); }
[dir="rtl"] .es-xp-bar i { background: linear-gradient(270deg, rgb(var(--brand-500)) var(--p), rgb(var(--surface-2)) var(--p)); }
.es-xp-bar i.hot { background: linear-gradient(90deg, rgb(245 158 11) var(--p), rgb(var(--surface-2)) var(--p)); }
[dir="rtl"] .es-xp-bar i.hot { background: linear-gradient(270deg, rgb(245 158 11) var(--p), rgb(var(--surface-2)) var(--p)); }
.es-xp-pg { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 10px; font-size: 12px; color: rgb(var(--ink-muted)); }
.es-xp-pg span { margin-inline-end: auto; }
.es-ca-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 12px; margin-top: 12px; }
.es-ca-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: rgb(var(--surface)); box-shadow: 0 1px 2px rgb(15 23 42 / .04); transition: box-shadow .15s, border-color .15s; }
.es-ca-card:hover { border-color: rgb(var(--brand-300)); box-shadow: 0 10px 24px -14px rgb(var(--brand-600) / .45); }
.es-ca-card.off { opacity: .75; }
.es-ca-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.es-ca-top time { margin-inline-start: auto; font-size: 11px; color: rgb(var(--ink-muted)); }
.es-ca-ic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: rgb(var(--brand-100)); color: rgb(var(--brand-700)); font-size: 12px; }
.es-ca-card h4 { margin: 0; font-size: 13.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.es-ca-card dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 11.5px; }
.es-ca-card dt { color: rgb(var(--ink-muted)); } .es-ca-card dd { margin: 0; font-weight: 600; color: rgb(var(--ink-2)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.es-ca-act { display: flex; gap: 6px; margin-top: auto; }
.es-ca-more { display: flex; justify-content: center; margin-top: 12px; }
.dark .es-ca-ic { background: rgb(var(--brand-500) / .18); color: rgb(var(--brand-200)); }
@media (prefers-reduced-motion: reduce) { .es-ca-card { transition: none; } }
.dark .es-tile:not(.argb) { background: rgb(var(--brand-500) / .10); border-color: rgb(var(--brand-500) / .25); } /* PAY-R999-A: keep the dark mode tint */

/* PAY-R1000-A (CR-337): the card «للمتابعة» redesigned to match the page: a quiet segmented control for the tabs, two small stat cards for Expired / Expiring soon,
   document rows with a thin inner accent bar (as the KPI cards, GOV-R162-A) and a soft count chip; no solid red or green blocks and no thick edge */
.es-fu-tabs { gap: 2px; margin: 0 12px; padding: 3px; border-radius: 12px; border: 1px solid var(--line); background: rgb(var(--surface-2)); }
.es-fu-tabs button { border: 0 !important; background: transparent !important; color: rgb(var(--ink-muted)) !important; border-radius: 9px; padding: 6px 8px; font-weight: 700; white-space: nowrap; }
.es-fu-tabs button:hover { color: rgb(var(--ink)) !important; }
.es-fu-tabs button[aria-selected="true"] { background: rgb(var(--surface)) !important; color: rgb(var(--brand-700)) !important; box-shadow: 0 1px 3px rgb(15 23 42 / .12); }
.es-fu-tabs .es-fu-n, .es-fu-tabs button[aria-selected="true"] .es-fu-n { background: rgb(var(--ink) / .07); color: rgb(var(--ink-2)); font-weight: 700; }
.es-fu-tabs .es-fu-n.rose { background: rgb(255 228 230); color: rgb(159 18 57); } .es-fu-tabs .es-fu-n.amber { background: rgb(254 243 199); color: rgb(146 64 14); }
.es-fu-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0; border: 0; background: none; margin-bottom: 6px; }
.es-fu-seg button { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; justify-items: start; gap: 2px 6px; padding: 9px 11px; border-radius: 12px; border: 1px solid var(--line) !important; background: rgb(var(--surface)) !important; color: rgb(var(--ink-2)) !important; font-size: 11.5px; font-weight: 600; white-space: nowrap; text-align: start; overflow: hidden; transition: border-color .15s, background .15s; }
.es-fu-seg button span { grid-column: 1 / -1; order: -1; padding: 0; min-width: 0; background: none !important; font-size: 20px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.es-fu-seg .ex span { color: rgb(190 18 60) !important; } .es-fu-seg .so span { color: rgb(180 83 9) !important; }
.es-fu-seg .ex i { color: rgb(225 29 72); } .es-fu-seg .so i { color: rgb(217 119 6); }
.es-fu-seg .ex[aria-pressed="true"] { background: rgb(255 241 242) !important; border-color: rgb(253 164 175) !important; color: rgb(159 18 57) !important; box-shadow: inset 0 0 0 1px rgb(253 164 175); }
.es-fu-seg .so[aria-pressed="true"] { background: rgb(255 251 235) !important; border-color: rgb(252 211 77) !important; color: rgb(146 64 14) !important; box-shadow: inset 0 0 0 1px rgb(252 211 77); }
.es-fu-doc { position: relative; border-inline-start-width: 1px !important; padding-inline-start: 16px; transition: transform .15s, box-shadow .15s, border-color .15s; }
.es-fu-doc::before { content: ''; position: absolute; inset-inline-start: 6px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--fu); }
.es-fu-doc:hover { border-color: rgb(var(--brand-300)); }
.es-fu-doc.ex:hover { border-color: rgb(253 164 175); } .es-fu-doc.so:hover { border-color: rgb(252 211 77); }
.es-fu-cnt { color: rgb(var(--ink-2)); }
.es-fu-doc.ex .es-fu-cnt { background: rgb(255 241 242); color: rgb(190 18 60); box-shadow: inset 0 0 0 1px rgb(253 164 175); }
.es-fu-doc.so .es-fu-cnt { background: rgb(255 251 235); color: rgb(180 83 9); box-shadow: inset 0 0 0 1px rgb(252 211 77); }
.dark .es-fu-seg button { background: rgb(var(--surface)) !important; }
.dark .es-fu-seg .ex[aria-pressed="true"] { background: rgb(244 63 94 / .12) !important; } .dark .es-fu-seg .so[aria-pressed="true"] { background: rgb(245 158 11 / .12) !important; }
.dark .es-fu-doc.ex .es-fu-cnt { background: rgb(244 63 94 / .16); color: rgb(253 164 175); } .dark .es-fu-doc.so .es-fu-cnt { background: rgb(245 158 11 / .16); color: rgb(252 211 77); }
@media (prefers-reduced-motion: reduce) { .es-fu-seg button { transition: none; } }

/* ---- PAY-R1001-A (CR-338): My profile completed to the napp MyProfile page: identity line, four info cards, office strip, job and contact rows, sign-in history, bank accounts */
.es-pp-line { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 4px 0 12px !important; }
.es-pp-line span { display: inline-flex; align-items: center; gap: 6px; } .es-pp-line b { color: rgb(var(--ink)); font-weight: 600; }
.es-pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.es-pic { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgb(var(--surface)); min-width: 0; }
.es-pic-l { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .02em; color: rgb(var(--ink-muted)); }
.es-pic-v { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-inline-end: 26px; color: rgb(var(--ink)); }
.es-pic-e { position: absolute; inset-inline-end: 8px; bottom: 8px; width: 26px; height: 26px; border-radius: 8px; border: 0; background: transparent; color: rgb(var(--brand-600)); cursor: pointer; }
.es-pic-e:hover { background: rgb(var(--brand-50)); }
.es-pstrip { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgb(var(--surface-2)); font-size: 12px; color: rgb(var(--ink-muted)); }
.es-pstrip span { display: inline-flex; align-items: center; gap: 6px; } .es-pstrip b { color: rgb(var(--ink)); font-weight: 600; }
.es-pstrip-end { margin-inline-start: auto; }
.es-x-indigo { color: rgb(79 70 229); } .es-x-green { color: rgb(5 150 105); } .es-x-sky { color: rgb(2 132 199); } .es-x-amber { color: rgb(217 119 6); } .es-x-rose { color: rgb(225 29 72); }
.es-pcols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 14px; align-items: start; }
.es-pcols-sec { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); } @media (max-width: 1000px) { .es-pcols-sec { grid-template-columns: minmax(0, 1fr); } }
.es-pstack { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.es-prow2 { display: flex; align-items: center; gap: 12px; padding: 8px 2px; border-bottom: 1px dashed var(--line); } .es-prow2:last-child { border-bottom: 0; }
.es-prow2-ic { width: 36px; height: 36px; flex: none; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.es-prow2 small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .02em; color: rgb(var(--ink-muted)); } .es-prow2 b { display: block; font-size: 13px; font-weight: 600; color: rgb(var(--ink)); }
.es-t-indigo { background: rgb(224 231 255); color: rgb(67 56 202); } .es-t-sky { background: rgb(224 242 254); color: rgb(3 105 161); } .es-t-amber { background: rgb(254 243 199); color: rgb(180 83 9); }
.es-t-slate { background: rgb(241 245 249); color: rgb(71 85 105); } .es-t-green { background: rgb(220 252 231); color: rgb(21 128 61); } .es-t-violet { background: rgb(237 233 254); color: rgb(109 40 217); } .es-t-rose { background: rgb(255 228 230); color: rgb(190 18 60); }
.es-pp-ls { height: 36px; margin-bottom: 10px; }
.es-ferr { display: block; min-height: 0; font-size: 11.5px; color: rgb(190 18 60); }
.dark .es-pic, .dark .es-pstrip { background: rgb(var(--surface)); }
.dark .es-prow2-ic { background: rgb(var(--brand-500) / .14); color: rgb(var(--brand-200)); }
@media (max-width: 760px) { .es-pstrip-end { margin-inline-start: 0; } }
/* GOV-R247 (CR-620): the home side column folds to a rail (slice 7 of ending the Payroll shell fork, GOV-R197; Payroll GOV-R183-A, CR-395) */
.es-hp-bar { display: flex; justify-content: flex-end; }
.es-hp-tg { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: none; border: 1px solid var(--line); border-radius: 10px; background: rgb(var(--surface)); color: rgb(var(--ink-2)); cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.es-hp-tg:hover { background: rgb(var(--brand-50)); border-color: rgb(var(--brand-300)); color: rgb(var(--brand-700)); }
.es-hp-wrap { transition: grid-template-columns .2s ease; }
.es-hp-wrap.es-rail { grid-template-columns: minmax(0, 1fr) 56px; }
.es-hp-side.es-rail { align-items: center; gap: 8px; }
.es-hp-side.es-rail .es-hp-bar { justify-content: center; }
.es-rail-b { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none; border: 1px solid var(--line); border-radius: 12px; background: rgb(var(--surface)); color: rgb(var(--ink-2)); font-size: 16px; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.es-rail-b:hover { background: rgb(var(--brand-50)); border-color: rgb(var(--brand-300)); color: rgb(var(--brand-700)); }
.es-hp-tg:focus-visible, .es-rail-b:focus-visible { outline: 2px solid rgb(var(--brand-500)); outline-offset: 2px; }
.es-rail-n { position: absolute; top: -5px; inset-inline-end: -5px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: rgb(225 29 72); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.dark .es-hp-tg:hover, .dark .es-rail-b:hover { background: rgb(var(--brand-500) / .16); color: rgb(var(--brand-100)); }
.es-hp-drawer { display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 1100px) { .es-hp-wrap.es-rail { grid-template-columns: minmax(0, 1fr); } .es-hp-side.es-rail { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; } .es-hp-side.es-rail .es-hp-bar { justify-content: flex-start; } }
html[data-es-motion="reduce"] .es-hp-wrap, html[data-es-motion="reduce"] .es-hp-tg, html[data-es-motion="reduce"] .es-rail-b { transition: none; }
/* GOV-R248 (CR-623): the drawer of a group of the Modules view (slice 8 of ending the Payroll shell fork, GOV-R197) */
.es-hm-dr { display: flex; flex-direction: column; gap: 10px; }
.es-hm-dr .es-hsearch { flex: none; }
.es-hm-n { margin: 0; font-size: 12px; color: rgb(var(--ink-muted)); }
.es-hm-list { display: flex; flex-direction: column; gap: 4px; }
.es-hm-list .es-note[hidden], .es-hm-none[hidden] { display: none; }
/* GOV-R249 (CR-624): signature upload and delete (slice 9 of ending the Payroll shell fork, GOV-R197) */
.es-sig-up { cursor: pointer; }
.es-sig-up:focus-within { outline: 2px solid rgb(var(--brand-500)); outline-offset: 2px; }
.es-sig-del { margin-top: 10px; color: rgb(190 18 60); }
.es-sig-del:hover { border-color: rgb(244 63 94 / .5); background: rgb(255 241 242); }
.dark .es-sig-del:hover { background: rgb(136 19 55 / .25); }
/* GOV-R290-A (CR-662): «ملاحظاتي على هذه الشاشة», the sticky-note icon of the page band, beside «تاريخ السجل»; its number in a small badge */
.es-ntb-b { position: relative; flex: none; align-self: flex-start; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; color: inherit; cursor: pointer; background: color-mix(in srgb, currentColor 10%, transparent); border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
  transition: transform .2s ease, background-color .2s ease; }
.es-band .es-ntb-b { color: #fff; } body.es-calm .es-band .es-ntb-b { color: rgb(var(--brand-700)); }
.es-ntb-b:hover { background: color-mix(in srgb, currentColor 22%, transparent); transform: translateY(-1px); }
.es-ntb-b:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.es-ntb-n { display: none; position: absolute; top: -6px; inset-inline-end: -6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; place-items: center;
  background: rgb(var(--surface)); color: rgb(var(--brand-700)); font: 700 10px/16px system-ui, sans-serif; box-shadow: 0 0 0 1px rgb(var(--brand-300)); }
.es-ntb-b.has-n .es-ntb-n { display: grid; }
.page-hero > .es-ntb-b, body .page-hero > .es-ntb-b, #main-content .page-hero > .es-ntb-b, #es-main .page-hero > .es-ntb-b { position: absolute; top: 13px; inset-inline-end: 50px; z-index: 1; }
.page-hero.es-has-hist > .es-ntb-b, body .page-hero.es-has-hist > .es-ntb-b, #main-content .page-hero.es-has-hist > .es-ntb-b, #es-main .page-hero.es-has-hist > .es-ntb-b { inset-inline-end: 86px; }
#es-main .page-hero.es-has-nt:not(.es-has-hist), #main-content .page-hero.es-has-nt:not(.es-has-hist) { position: relative; padding-inline-end: 92px !important; }
#es-main .page-hero.es-has-nt.es-has-hist, #main-content .page-hero.es-has-nt.es-has-hist { padding-inline-end: 128px !important; }
/* GOV-R291-A (owner 2026-11-18 «صلح مشكلة انقطاع الخط»): in a page band the title is never cut, and the description wraps to a second line
 * before it is cut; when even that is not enough the band's buttons move to the next line (the band head already wraps) */
#es-main .page-hero .page-head :is(h1, h2), #main-content .page-hero .page-head :is(h1, h2), #es-main .es-band :is(h1, h2) { flex-shrink: 0; overflow: visible; text-overflow: clip; max-width: none; }
#es-main .page-hero .page-head p, #main-content .page-hero .page-head p, #es-main .es-band p { min-width: 14ch; white-space: normal; overflow: hidden; text-overflow: clip; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
/* GOV-R292-A (owner 2026-11-18 «ما زالة فيه مشكلة عند تصغير الشاشة»): the page band on a narrow screen (640px and under) — the band icons
 * (close, record history, my notes) get a row of their own at the top, and the title, its description and the info button stack and wrap
 * inside the band instead of running under the icons or out of the band */
@media (max-width: 640px) {
  #es-main .page-hero:is(.es-has-x, .es-has-hist, .es-has-nt), #main-content .page-hero:is(.es-has-x, .es-has-hist, .es-has-nt) { padding-top: 48px !important; padding-inline-end: 16px !important; }
  #es-main .page-hero > :is(.es-hero-x, .es-hist-b, .es-ntb-b), #main-content .page-hero > :is(.es-hero-x, .es-hist-b, .es-ntb-b) { top: 10px; }
  #es-main .page-hero .page-head > div:first-child, #main-content .page-hero .page-head > div:first-child { flex-wrap: wrap; min-width: 0; max-width: 100%; }
  #es-main .page-hero .page-head :is(h1, h2), #main-content .page-hero .page-head :is(h1, h2) { white-space: normal; flex-shrink: 1; }
  #es-main .page-hero .page-head p, #main-content .page-hero .page-head p { flex: 1 1 100%; min-width: 0; padding-inline-start: 0; border: 0; }
  #es-main .page-hero .es-cr-in, #main-content .page-hero .es-cr-in { max-width: 100%; }
  #es-main .es-band .es-band-in, #es-main .es-band .es-band-t { flex-wrap: wrap; }
  #es-main .es-band p { flex: 1 1 100%; padding-inline-start: 0; border: 0; }
}
/* GOV-R293-A (CR-664): the screen description in a card from a quiet ⓘ right after the screen title */
.es-desc-src, .es-desc-hid { display: none !important; }
.es-desc-row { align-items: center; }
.es-desc-b { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-inline-start: 6px; border: 0; border-radius: 50%;
  background: transparent; color: inherit; opacity: .6; font-size: 14px; cursor: pointer; transition: opacity .15s, background-color .15s; vertical-align: middle; }
.es-desc-b:hover, .es-desc-b:focus-visible, .es-desc-b[aria-expanded="true"] { opacity: 1; background: color-mix(in srgb, currentColor 16%, transparent); }
.es-desc-b:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.es-desc-pop { position: fixed; z-index: 400; width: min(360px, calc(100vw - 16px)); padding: 12px 14px; border: 1px solid rgb(var(--border)); border-radius: 12px;
  background: rgb(var(--surface)); color: rgb(var(--ink)); box-shadow: 0 16px 36px -12px rgb(var(--ink) / .35); font-size: 13px; line-height: 1.6; animation: es-desc-in .14s ease-out; }
.es-desc-pop > b { display: block; margin-bottom: 4px; font-size: 13px; color: rgb(var(--brand-700)); }
html.dark .es-desc-pop > b { color: rgb(var(--brand-300)); }
.es-desc-pop p { margin: 0; color: rgb(var(--ink-2)); }
.es-desc-rv { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 0; border: 0; background: none; color: rgb(var(--brand-700)); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.es-desc-rv:hover { text-decoration: underline; text-underline-offset: 3px; }
.es-desc-rv:focus-visible { outline: 2px solid rgb(var(--brand-500)); outline-offset: 2px; border-radius: 4px; }
@keyframes es-desc-in { from { opacity: 0; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .es-desc-pop { animation: none; } }
/* GOV-R295-A (owner 2026-11-18 «احتاج اضافة زرار صغير احترافى لغلق التول تيب بعد الفتح»): a small close button in the corner of the card */
.es-desc-pop > b { padding-inline-end: 28px; }
.es-desc-x { position: absolute; top: 8px; inset-inline-end: 8px; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: rgb(var(--ink-muted)); font-size: 13px; cursor: pointer; transition: background-color .15s, color .15s; }
.es-desc-x:hover { background: rgb(var(--surface-2)); color: rgb(var(--ink)); }
.es-desc-x:focus-visible { outline: 2px solid rgb(var(--brand-500)); outline-offset: 1px; }
/* the close button moves (owner 2026-11-18 «افضل ان يكون الزرار فيه حركة», GOV-R295-A): the × turns a quarter turn and grows a little on hover
 * or focus, a soft ring on press, and it arrives with a small spin when the card opens; none of it under reduced motion */
.es-desc-x { transition: background-color .18s ease, color .18s ease, transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .18s ease; }
.es-desc-x i { transition: transform .25s cubic-bezier(.34, 1.56, .64, 1); }
.es-desc-x:hover, .es-desc-x:focus-visible { transform: scale(1.12); }
.es-desc-x:hover i, .es-desc-x:focus-visible i { transform: rotate(90deg); }
.es-desc-x:active { transform: scale(.92); box-shadow: 0 0 0 4px rgb(var(--brand-500) / .18); }
.es-desc-pop .es-desc-x { animation: es-desc-x-in .35s cubic-bezier(.34, 1.56, .64, 1) .05s backwards; }   /* backwards: once it has arrived, hover and focus move it freely */
@keyframes es-desc-x-in { from { opacity: 0; transform: rotate(-90deg) scale(.6); } }
@media (prefers-reduced-motion: reduce) { .es-desc-x, .es-desc-x i { transition: none; animation: none; } .es-desc-x:hover, .es-desc-x:focus-visible, .es-desc-x:hover i, .es-desc-x:focus-visible i { transform: none; } }
html[data-es-motion="reduce"] :is(.es-desc-x, .es-desc-x i) { transition: none !important; animation: none !important; transform: none !important; }
/* GOV-R296-A (CR-666, owner 2026-11-18 «ما زال فيه مشكلة قم بتظبيطه بطريقة احترافية», SCR-PB11 at a phone width): the band contents take the
 * whole width of the band on a narrow screen — the 640px rule above lost to the desktop rule that keeps 128px for three corner icons
 * (.es-has-nt.es-has-hist), so the title, the run selector and the facts sat in half the band. The repeated class only raises the
 * weight of this rule above that one; the actions row then fills its line, its selector stretching and its buttons the same height. */
@media (max-width: 640px) {
  #es-main .page-hero.page-hero.page-hero:is(.es-has-x, .es-has-hist, .es-has-nt), #main-content .page-hero.page-hero.page-hero:is(.es-has-x, .es-has-hist, .es-has-nt) { padding: 48px 16px 16px !important; }
  #es-main .page-hero .page-head > div:not(:first-child), #main-content .page-hero .page-head > div:not(:first-child) { flex: 1 1 100%; min-width: 0; align-items: stretch; }
  #es-main .page-hero .page-head > div:not(:first-child) > select, #main-content .page-hero .page-head > div:not(:first-child) > select { flex: 1 1 0; min-width: 0; max-width: none; }
}
