/* Application launcher, top bar and Home Page Settings.
   All colours, sizes and spacing come from the custom properties set per scope (see home.js vars()). */

.lx { position: relative; color: var(--text); font-size: var(--fs); font-family: 'IBM Plex Sans Arabic', 'Readex Pro', system-ui, sans-serif; isolation: isolate; }
.lx-page { min-height: 100vh; min-height: 100dvh; background: var(--bg); overflow-x: hidden; }
.lx :where(button, input, select) { font: inherit; color: inherit; }
.lx :focus-visible { outline: 2px solid var(--secondary); outline-offset: 3px; }

/* ── background ── */
.lx-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--bg); }
.lx-page > .lx-bg { position: fixed; }
.lx.grad .lx-bg { background:
  radial-gradient(1100px 520px at 50% -12%, var(--glow1), transparent 70%),
  radial-gradient(720px 480px at 105% 108%, var(--glow2), transparent 70%),
  radial-gradient(620px 420px at -8% 100%, var(--glow1), transparent 70%),
  linear-gradient(180deg, var(--bg2), var(--bg) 62%); }
.lx-img { position: absolute; inset: calc(var(--bg-blur) * -2); background-size: cover; background-position: center; opacity: var(--bg-opacity); filter: blur(var(--bg-blur)); }
.lx-pattern { position: absolute; inset: 0; opacity: 0; transition: opacity .4s; }
.lx.pat .lx-pattern { opacity: 1;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px; background-position: center -1px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 10%, transparent 75%); mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 10%, transparent 75%); }
.lx.pat.is-light .lx-pattern { opacity: .7; }

/* ── top bar ── */
.tb { position: sticky; top: 0; z-index: 30; height: 56px; padding: 0 clamp(12px, 2.4vw, 28px); display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: color-mix(in srgb, var(--bg) 72%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.shell .tb { color: var(--text); }
.tb-side { display: flex; align-items: center; gap: 4px; min-width: 0; }
.tb-btn { position: relative; width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 11px; border: 0; background: transparent; color: var(--muted); cursor: pointer; text-decoration: none; transition: background .15s, color .15s; flex: none; }
.tb-btn svg { width: 19px; height: 19px; }
.tb-btn:hover, .tb-btn.on, .tb-btn[aria-expanded="true"] { background: var(--hover); color: var(--text); }
.tb-home { color: var(--text); }
.tb-lang { font-size: 12.5px; font-weight: 700; letter-spacing: .02em; font-family: 'Readex Pro', 'IBM Plex Sans Arabic', sans-serif; }
.tb-badge { position: absolute; top: 4px; inset-inline-end: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: #ef4444; color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); }
.tb-co { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px 0 8px; border-radius: 11px; border: 0; background: transparent; cursor: pointer; color: var(--text); max-width: 42vw; }
.tb-co:hover:not(:disabled), .tb-co[aria-expanded="true"] { background: var(--hover); }
.tb-co:disabled { cursor: default; }
.tb-co-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-chev svg { width: 15px; height: 15px; color: var(--muted); display: block; }
.co-dot { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 700; flex: none; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .18); }
.co-dot.both { background: linear-gradient(135deg, var(--primary), var(--secondary)); }
.co-dot.both svg { width: 14px; height: 14px; }
.tb-avatar { width: 34px; height: 34px; margin-inline-start: 6px; border-radius: 50%; border: 0; cursor: pointer; color: #fff; font-weight: 700; font-size: 12.5px; letter-spacing: .02em;
  background: linear-gradient(140deg, var(--primary), var(--secondary)); box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--line); }
.tb-menu { position: relative; }
.tb-pop { position: absolute; top: 46px; inset-inline-end: 0; min-width: 230px; padding: 6px; border-radius: 14px; background: var(--pop); border: 1px solid var(--line);
  box-shadow: 0 24px 48px -20px rgb(0 0 0 / .55); z-index: 40; animation: pop .14s ease-out; }
.tb-side:first-child .tb-pop { inset-inline-end: auto; inset-inline-start: 0; }
.tb-pop.wide { min-width: 300px; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.tb-pop > button, .tb-pop > a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 10px; cursor: pointer; text-align: start; color: var(--text); text-decoration: none; font-size: 13.5px; }
.tb-pop > button:hover, .tb-pop > a:hover, .tb-pop > button:focus-visible { background: var(--hover); outline: none; }
.tb-pop > button svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.tb-pop > button.danger, .tb-pop > button.danger svg { color: #f87171; }
.tb-check { margin-inline-start: auto; color: var(--secondary); } .tb-check svg { color: var(--secondary) !important; }
.tb-pop-note, .tb-empty { margin: 4px 10px 6px; font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.tb-empty { padding: 14px 0; text-align: center; font-size: 13px; }
.tb-pop-title { margin: 6px 10px 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.tb-me { padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); display: grid; gap: 2px; }
.tb-me b { font-size: 14px; } .tb-me small { color: var(--muted); font-size: 12px; text-align: start; }
.tb-note { align-items: flex-start !important; }
.tb-note span:last-child { display: grid; gap: 2px; } .tb-note small { color: var(--muted); font-size: 12px; }

/* ── launcher ── */
.lx-main { width: 100%; max-width: 1240px; margin: 0 auto; padding: clamp(28px, 7vh, 72px) clamp(16px, 3vw, 32px) 72px; }
.lx-title { margin: 0 0 22px; text-align: center; font-family: 'Readex Pro', 'IBM Plex Sans Arabic', sans-serif; font-weight: 600; font-size: clamp(25px, 2.6vw, 36px); letter-spacing: -.012em; line-height: 1.2;
  background: linear-gradient(180deg, var(--text) 30%, color-mix(in srgb, var(--text) 72%, var(--muted))); -webkit-background-clip: text; background-clip: text; color: transparent; direction: ltr; }
.lx-search { position: relative; max-width: 520px; margin: 0 auto 38px; display: flex; align-items: center; height: 46px; border-radius: 14px; background: var(--field); border: 1px solid var(--line); transition: border-color .15s, box-shadow .15s, background .15s; }
.lx.is-light .lx-search { box-shadow: 0 6px 18px -12px rgb(15 23 42 / .25); }
.lx-search:focus-within { border-color: color-mix(in srgb, var(--primary) 70%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); }
.lx-search-ic { display: grid; place-items: center; width: 44px; color: var(--muted); flex: none; } .lx-search-ic svg { width: 18px; height: 18px; }
.lx-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none !important; background: transparent; font-size: 14.5px; color: var(--text); }
.lx-search input::placeholder { color: var(--muted); opacity: .85; }
.lx-search input::-webkit-search-cancel-button { display: none; }
.lx-kbd { margin-inline-end: 10px; padding: 3px 7px; border-radius: 7px; font: 600 11px/1 'Readex Pro', system-ui, sans-serif; color: var(--muted); border: 1px solid var(--line); background: var(--hover); direction: ltr; }
.lx-clear { display: grid; place-items: center; width: 34px; height: 34px; margin-inline-end: 6px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.lx-clear:hover { background: var(--hover); color: var(--text); } .lx-clear svg { width: 16px; height: 16px; }
.lx-clear[hidden] { display: none; }
.lx-search:has(.lx-clear:not([hidden])) .lx-kbd { display: none; }
@media (hover: none) { .lx-kbd { display: none; } }

.lx-sec + .lx-sec { margin-top: 34px; }
.lx-sec-title { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 18px; font-size: 12.5px; font-weight: 600; letter-spacing: .03em; color: var(--muted); }
.lx.al-start .lx-sec-title { justify-content: flex-start; }
.lx-sec-title svg { width: 15px; height: 15px; }
.lx-sec-title::before, .lx-sec-title::after { content: ''; height: 1px; width: 48px; background: linear-gradient(90deg, transparent, var(--line)); }
.lx-sec-title::after { transform: scaleX(-1); }
.lx.al-start .lx-sec-title::before { display: none; }

.lx-grid { --cell: max(calc(var(--tile) + 30px), 104px);
  display: grid; grid-template-columns: repeat(auto-fit, var(--cell)); column-gap: var(--gx); row-gap: var(--gy);
  justify-content: center; margin: 0 auto; max-width: calc(var(--cols) * var(--cell) + (var(--cols) - 1) * var(--gx)); }
.lx.al-start .lx-grid { justify-content: start; margin: 0; }
.lx-cell { display: flex; justify-content: center; min-width: 0; }
.lx-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; padding: 8px 4px 6px; border-radius: 18px; text-decoration: none; color: var(--text); cursor: pointer; -webkit-tap-highlight-color: transparent; outline: none; }
.lx-tile:focus-visible { box-shadow: 0 0 0 2px var(--secondary); }
.lx-icon { position: relative; width: var(--tile); height: var(--tile); border-radius: var(--radius); display: grid; place-items: center; flex: none;
  color: #fff; --tint: rgb(255 255 255 / .26);
  background: linear-gradient(150deg, var(--c1), var(--c2)); box-shadow: var(--tile-shadow), inset 0 1px 0 rgb(255 255 255 / .28), inset 0 0 0 1px rgb(255 255 255 / .12);
  transition: transform .28s cubic-bezier(.2,.8,.2,1), box-shadow .28s, filter .2s; }
.lx-icon::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(180deg, rgb(255 255 255 / .22), rgb(255 255 255 / 0) 46%); }
.lx-icon > svg { width: var(--glyph); height: var(--glyph); position: relative; z-index: 1; filter: drop-shadow(0 1px 1px rgb(0 0 0 / .18)); }
.lx.ic-soft .lx-icon { background: color-mix(in srgb, var(--c1) 16%, var(--surface)); color: var(--c2); --tint: color-mix(in srgb, var(--c1) 34%, transparent); box-shadow: var(--tile-shadow), inset 0 0 0 1px color-mix(in srgb, var(--c1) 30%, transparent); }
.lx.ic-soft.is-dark .lx-icon { color: var(--c1); background: color-mix(in srgb, var(--c1) 14%, var(--surface)); }
.lx.ic-soft .lx-icon::after { display: none; }
.lx.ic-soft .lx-icon > svg { filter: none; }
.lx.ic-theme .lx-icon { background: linear-gradient(150deg, var(--accent), var(--primary)); }
.lx-label { max-width: 100%; font-size: var(--label); font-weight: 500; line-height: 1.35; text-align: center; color: var(--text); opacity: .92;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; transition: opacity .2s; }
.lx.nolabels .lx-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.lx-badge { position: absolute; top: -6px; inset-inline-end: -6px; z-index: 2; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center;
  background: #ef4444; color: #fff; font: 700 11.5px/1 'Readex Pro', system-ui, sans-serif; box-shadow: 0 0 0 2.5px var(--bg), 0 4px 10px -2px rgb(239 68 68 / .6); }
.lx-fav { position: absolute; bottom: -5px; inset-inline-start: -5px; z-index: 2; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: #f59e0b; box-shadow: 0 0 0 2px var(--bg); }
.lx-fav svg { width: 12px; height: 12px; }
.lx-soon { font-size: 10.5px; font-weight: 700; color: var(--muted); padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line); }
.lx-tile.soon { cursor: default; } .lx-tile.soon .lx-icon { filter: grayscale(.85) opacity(.55); } .lx-tile.soon .lx-label { opacity: .55; }

.lx.hov .lx-tile:not(.soon):hover .lx-icon, .lx.hov .lx-tile:focus-visible .lx-icon { transform: translateY(-4px); box-shadow: var(--tile-shadow), 0 18px 32px -14px var(--c2), inset 0 1px 0 rgb(255 255 255 / .3), inset 0 0 0 1px rgb(255 255 255 / .16); }
.lx.hov .lx-tile:not(.soon):hover .lx-label { opacity: 1; }
.lx-tile:not(.soon):active .lx-icon { transform: scale(.93); transition-duration: .08s; }

.lx-empty { display: grid; justify-items: center; gap: 6px; padding: 36px 16px; color: var(--muted); text-align: center; }
.lx-empty svg { width: 30px; height: 30px; opacity: .6; margin-bottom: 4px; }
.lx-empty b { color: var(--text); font-size: 15px; font-weight: 600; }
.lx-empty span { font-size: 13px; }

/* entrance */
.lx.anim .lx-title, .lx.anim .lx-search { animation: rise .55s cubic-bezier(.2,.8,.2,1) both; }
.lx.anim .lx-search { animation-delay: .06s; }
.lx.anim .lx-tile { animation: tileIn .5s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(80ms + min(var(--i), 24) * 28ms); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes tileIn { from { opacity: 0; transform: translateY(12px) scale(.94); } }
.lx-preview .lx-tile, .lx-preview .lx-title, .lx-preview .lx-search { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  .lx *, .lx *::before, .lx *::after { animation: none !important; transition: none !important; }
}

/* ── Home Page Settings ── */
.st-main { max-width: 1320px; margin: 0 auto; padding: 22px clamp(14px, 2.6vw, 30px) 64px; }
.st-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.st-title { display: flex; align-items: center; gap: 10px; }
.st-title h1 { margin: 0; font-family: 'Readex Pro', 'IBM Plex Sans Arabic', sans-serif; font-size: 22px; font-weight: 600; }
.st-title p { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
[dir="ltr"] .st-title .tb-btn svg { transform: none; } [dir="rtl"] .st-title .tb-btn svg { transform: scaleX(-1); }
.st-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.st-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 11px; border: 1px solid transparent; cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--text); background: transparent; transition: background .15s, opacity .15s, border-color .15s; text-decoration: none; }
.st-btn svg { width: 16px; height: 16px; }
.st-btn.primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px -10px var(--primary); }
.st-btn.primary:hover:not(:disabled) { filter: brightness(1.08); }
.st-btn.soft { background: var(--hover); border-color: var(--line); }
.st-btn.ghost { border-color: var(--line); color: var(--muted); }
.st-btn.ghost:hover, .st-btn.soft:hover { color: var(--text); background: var(--hover); }
.st-btn:disabled { opacity: .45; cursor: default; box-shadow: none; }
.st-file { position: relative; overflow: hidden; } .st-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.st-tabs { display: flex; gap: 4px; margin: 20px 0 16px; padding: 4px; border-radius: 13px; background: var(--hover); border: 1px solid var(--line); width: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.st-tabs button { height: 36px; padding: 0 16px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.st-tabs button:hover { color: var(--text); }
.st-tabs button[aria-selected="true"] { background: var(--pop); color: var(--text); box-shadow: 0 4px 12px -6px rgb(0 0 0 / .35), inset 0 0 0 1px var(--line); }
.st-note { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; font-size: 13px; background: color-mix(in srgb, #10b981 14%, transparent); color: color-mix(in srgb, #10b981 70%, var(--text)); border: 1px solid color-mix(in srgb, #10b981 30%, transparent); }
.st-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 22px; align-items: start; }
.st-panel { padding: 6px 20px 22px; border-radius: 18px; background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--line); }
.lx.is-light .st-panel { background: var(--surface); box-shadow: 0 10px 30px -22px rgb(15 23 42 / .35); }
.st-h { margin: 20px 0 10px; font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.st-hint { margin: 4px 0 10px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.st-field { display: grid; grid-template-columns: 170px minmax(0, 1fr); align-items: center; gap: 6px 14px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.st-field .st-hint { grid-column: 2; margin: 0; }
.st-label { font-size: 13.5px; font-weight: 500; }
.st-seg { display: inline-flex; flex-wrap: wrap; gap: 3px; padding: 3px; border-radius: 11px; background: var(--hover); border: 1px solid var(--line); }
.st-seg button { height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.st-seg button[aria-checked="true"] { background: var(--primary); color: #fff; }
.st-range { display: flex; align-items: center; gap: 12px; }
.st-range input { flex: 1; accent-color: var(--primary); min-width: 0; }
.st-range output { min-width: 52px; text-align: end; font: 600 12.5px 'Readex Pro', system-ui, sans-serif; color: var(--muted); direction: ltr; }
.st-toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px dashed var(--line); cursor: pointer; margin: 0; font-weight: 400; }
.st-toggle span { display: grid; gap: 2px; } .st-toggle b { font-size: 13.5px; font-weight: 500; } .st-toggle small { font-size: 12px; color: var(--muted); }
.st-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.st-toggle i { position: relative; width: 42px; height: 24px; border-radius: 99px; background: var(--line); flex: none; transition: background .2s; box-shadow: inset 0 0 0 1px var(--line); }
.st-toggle i::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .35); transition: transform .2s cubic-bezier(.2,.8,.2,1); }
.st-toggle input:checked + i { background: var(--primary); }
[dir="ltr"] .st-toggle input:checked + i::after { transform: translateX(18px); }
[dir="rtl"] .st-toggle input:checked + i::after { transform: translateX(-18px); }
.st-toggle input:focus-visible + i { outline: 2px solid var(--secondary); outline-offset: 2px; }
.st-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.st-theme { display: grid; gap: 8px; padding: 8px; border-radius: 14px; border: 1px solid var(--line); background: transparent; cursor: pointer; text-align: start; transition: border-color .15s, transform .15s; }
.st-theme:hover { transform: translateY(-1px); }
.st-theme[aria-pressed="true"] { border-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 40%, transparent); }
.st-theme .sw { position: relative; height: 54px; border-radius: 9px; box-shadow: inset 0 0 0 1px rgb(127 127 127 / .2); display: flex; align-items: flex-end; gap: 4px; padding: 7px; }
.st-theme .sw i { width: 14px; height: 14px; border-radius: 5px; }
.st-theme b { font-size: 12.5px; font-weight: 600; }
.st-colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.st-color { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 10px; padding: 7px; border-radius: 12px; border: 1px solid var(--line); margin: 0; cursor: pointer; font-weight: 400; }
.st-color input { grid-row: span 2; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 9px; background: none; cursor: pointer; }
.st-color input::-webkit-color-swatch-wrapper { padding: 0; } .st-color input::-webkit-color-swatch { border: 1px solid rgb(127 127 127 / .3); border-radius: 9px; }
.st-color span { font-size: 12.5px; } .st-color code { font-size: 11px; color: var(--muted); text-align: start; }
.st-contrast { margin: 10px 0 2px; padding: 8px 12px; border-radius: 10px; font-size: 12.5px; }
.st-contrast.ok { background: color-mix(in srgb, #10b981 12%, transparent); color: color-mix(in srgb, #10b981 75%, var(--text)); }
.st-contrast.weak { background: color-mix(in srgb, #f59e0b 14%, transparent); color: color-mix(in srgb, #f59e0b 70%, var(--text)); }
.st-contrast.bad { background: color-mix(in srgb, #ef4444 14%, transparent); color: color-mix(in srgb, #ef4444 70%, var(--text)); }
.st-apps { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.st-app { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 13px; border: 1px solid var(--line); background: var(--hover); transition: opacity .15s, border-color .15s, transform .15s; }
.st-app.hid { opacity: .55; }
.st-app.dragging { opacity: .35; } .st-app.over { border-color: var(--primary); transform: translateY(2px); }
.st-grip { cursor: grab; color: var(--muted); display: grid; } .st-grip svg { width: 18px; height: 18px; }
.lx-icon.mini { --tile: 34px; width: 34px; height: 34px; border-radius: 10px; box-shadow: inset 0 1px 0 rgb(255 255 255 / .25); }
.lx-icon.mini > svg { width: 19px; height: 19px; }
.st-app-name { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 500; display: grid; } .st-app-name small { font-size: 11px; color: var(--muted); }
.st-gsel { width: auto !important; max-width: 140px; height: 32px !important; padding: 0 8px !important; border-radius: 9px !important; font-size: 12.5px; background: var(--field) !important; border: 1px solid var(--line) !important; }
.st-ic { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; flex: none; }
.st-ic:hover:not(:disabled) { background: var(--hover); color: var(--text); }
.st-ic.on { color: #f59e0b; }
.st-ic:disabled { opacity: .3; cursor: default; }
.st-ic svg { width: 17px; height: 17px; }
.st-groups { display: grid; gap: 6px; margin: 10px 0 12px; }
.st-group { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 12px; border: 1px solid var(--line); }
.st-gic { color: var(--muted); display: grid; } .st-gic svg { width: 18px; height: 18px; }
.st-group input { flex: 1; min-width: 0; height: 34px !important; border-radius: 9px !important; background: var(--field) !important; border: 1px solid var(--line) !important; padding: 0 10px !important; }
.st-group small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.st-scopes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.st-scope { display: grid; gap: 4px; padding: 12px; border-radius: 13px; border: 1px solid var(--line); background: transparent; cursor: pointer; text-align: start; }
.st-scope[aria-pressed="true"] { border-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 35%, transparent); }
.st-scope b { font-size: 13.5px; } .st-scope small { font-size: 11.5px; color: var(--muted); } .st-scope small.set { color: #10b981; }
.st-preview-wrap { position: sticky; top: 72px; }
.st-preview-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 3px color-mix(in srgb, #10b981 25%, transparent); }
.st-unsaved { margin-inline-start: auto; font-size: 11.5px; padding: 2px 9px; border-radius: 99px; background: color-mix(in srgb, #f59e0b 16%, transparent); color: #f59e0b; }
.st-preview { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 30px 60px -34px rgb(0 0 0 / .6); }
.lx-preview { min-height: 460px; max-height: calc(100vh - 140px); overflow: auto; background: var(--bg); }
.lx-preview .lx-main { padding: 34px 18px 30px; }
.lx-preview .lx-title { font-size: 24px; margin-bottom: 16px; }
.lx-preview .lx-search { margin-bottom: 26px; height: 40px; max-width: 380px; }
.lx-preview .lx-grid { --cell: max(calc(var(--tile) + 24px), 92px); }
.lx-mini-top { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 70%, transparent); }
.lx-mini-top span { width: 18px; height: 6px; border-radius: 3px; background: var(--line); } .lx-mini-top span:first-child { width: 12px; height: 12px; border-radius: 4px; }
.lx-mini-top i { margin-inline-start: auto; width: 16px; height: 16px; border-radius: 50%; background: linear-gradient(140deg, var(--primary), var(--secondary)); }

/* the legacy portal screens (admin) inside the new shell */
.shell { min-height: 100vh; background: rgb(var(--bg)); --text: rgb(var(--ink)); --muted: rgb(var(--muted)); --line: rgb(var(--line) / .08); --hover: rgb(var(--line) / .06); --pop: rgb(var(--surface)); --bg: rgb(var(--bg) / 1); --secondary: rgb(var(--primary)); --primary: rgb(var(--primary)); }
.shell .tb { background: rgb(var(--bg) / .85); }
.logo svg { width: 22px; height: 22px; }

/* ── responsive ── */
@media (max-width: 1080px) { .st-body { grid-template-columns: 1fr; } .st-preview-wrap { position: static; order: -1; } .lx-preview { min-height: 360px; max-height: 420px; } }
@media (max-width: 640px) {
  .tb { height: 54px; padding: 0 8px; } .tb-btn { width: 36px; height: 36px; } .tb-side { gap: 0; }
  .tb-co-name { max-width: 28vw; }
  #tbtheme, .tb-end > a.tb-btn { display: none; }
  .lx-main { padding-top: 30px; }
  .lx-title { font-size: 23px; margin-bottom: 16px; }
  .lx-search { margin-bottom: 28px; }
  .lx-grid { --cell: calc(min(var(--tile), 62px) + 20px); column-gap: min(var(--gx), 10px); row-gap: min(var(--gy), 18px); }
  .lx-page .lx-icon { width: min(var(--tile), 62px); height: min(var(--tile), 62px); }
  .lx-page .lx-icon > svg { width: min(var(--glyph), 34px); height: min(var(--glyph), 34px); }
  .lx-label { font-size: min(var(--label), 12.5px); }
  .st-field { grid-template-columns: 1fr; } .st-field .st-hint { grid-column: 1; }
  .st-actions { width: 100%; } .st-actions .st-btn { flex: 1 1 auto; }
  .st-panel { padding: 4px 14px 18px; }
  .tb-pop.wide { min-width: min(300px, calc(100vw - 24px)); }
}

/* ── company switch: circular reveal in the new company's colour ── */
.ij-veil { position: fixed; inset: 0; z-index: 100; pointer-events: none; clip-path: circle(0 at var(--x) var(--y)); transition: clip-path 400ms cubic-bezier(0.2, 0, 0, 1), opacity 220ms cubic-bezier(0, 0, 0.2, 1); }
.ij-veil.cover { clip-path: circle(150vmax at var(--x) var(--y)); }
.ij-veil.leave { opacity: 0; }
.ij-veil.fade { clip-path: none; opacity: 0; transition: opacity 180ms; }
.ij-veil.fade.cover { opacity: 1; }
.ij-veil.fade.leave { opacity: 0; }

/* ── entry sequence (once per session, skippable) ── */
.ij-entry { position: fixed; inset: 0; z-index: 110; display: grid; place-content: center; justify-items: center; gap: 14px; cursor: pointer;
  background: radial-gradient(600px 400px at 50% 42%, color-mix(in srgb, var(--glow) 40%, transparent), transparent 70%), var(--brand);
  color: #fff; clip-path: circle(150vmax at 50% 50%); transition: clip-path 420ms cubic-bezier(0.2, 0, 0, 1); }
.ij-entry.out { clip-path: circle(0 at 50% 50%); }
.ij-entry.small { transition: opacity 220ms; clip-path: none; }
.ij-entry.small.out { opacity: 0; }
.ij-entry-mark { position: relative; width: 84px; height: 84px; display: grid; place-items: center; animation: ijMark 520ms cubic-bezier(0, 0, 0.2, 1) both; }
.ij-entry-mark svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ij-entry-mark rect { fill: rgb(255 255 255 / .08); stroke: #fff; stroke-width: 2.2; stroke-dasharray: 1; stroke-dashoffset: 1; animation: ijDraw 640ms 80ms cubic-bezier(0.2, 0, 0, 1) forwards; }
.ij-entry-mark b { font: 700 34px/1 'Readex Pro', 'IBM Plex Sans Arabic', sans-serif; opacity: 0; animation: ijFade 260ms 360ms forwards; }
.ij-entry-mark img { width: 84px; height: 84px; object-fit: contain; border-radius: 18px; background: #fff; padding: 8px; }
.ij-entry-name { font: 600 20px/1.3 'Readex Pro', 'IBM Plex Sans Arabic', sans-serif; opacity: 0; animation: ijRise 320ms 300ms cubic-bezier(0, 0, 0.2, 1) forwards; }
.ij-entry-sub { font: 500 12.5px/1 'Readex Pro', sans-serif; letter-spacing: .08em; opacity: 0; color: rgb(255 255 255 / .7); animation: ijRise 320ms 420ms cubic-bezier(0, 0, 0.2, 1) forwards; direction: ltr; }
@keyframes ijDraw { to { stroke-dashoffset: 0; } }
@keyframes ijFade { to { opacity: 1; } }
@keyframes ijRise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes ijMark { from { opacity: 0; transform: scale(.9); } }
@media (prefers-reduced-motion: reduce) { .ij-entry, .ij-veil { display: none; } }

/* ── Main Settings → Companies ── */
.st-body.full { grid-template-columns: 1fr; }
.st-body.full .st-preview-wrap { display: none; }
.cm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 14px 0 14px; }
.cm-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.cm-tools input, .cm-tools select, .cm-users select, #cmaddsel { height: 38px; border-radius: 11px; border: 1px solid var(--line); background: var(--field); color: var(--text); padding: 0 12px; min-width: 0; }
.cm-tools input { width: 240px; max-width: 100%; }
.cm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.cm-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 18px; color: #fff; overflow: hidden;
  background: radial-gradient(420px 220px at 100% 0%, color-mix(in srgb, var(--brand2) 45%, transparent), transparent 70%), var(--brand);
  box-shadow: 0 18px 36px -22px color-mix(in srgb, var(--brand) 80%, #000); animation: cmIn 400ms cubic-bezier(0, 0, 0.2, 1) both; transition: transform 220ms cubic-bezier(0.2, 0, 0, 1), box-shadow 220ms; }
.cm-card:hover { transform: translateY(-3px); box-shadow: 0 24px 44px -22px color-mix(in srgb, var(--brand) 85%, #000); }
.cm-card:nth-child(2) { animation-delay: 50ms; } .cm-card:nth-child(3) { animation-delay: 100ms; } .cm-card:nth-child(4) { animation-delay: 150ms; }
@keyframes cmIn { from { opacity: 0; transform: translateY(12px); } }
.cm-card.off { filter: grayscale(.7); opacity: .8; }
.cm-card-top { display: flex; align-items: center; justify-content: space-between; }
.cm-logo { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgb(255 255 255 / .14); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .22); font: 700 20px/1 'Readex Pro', sans-serif; color: #fff; overflow: hidden; }
.cm-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 4px; }
.cm-status { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: rgb(16 185 129 / .22); color: #a7f3d0; }
.cm-status.inactive { background: rgb(239 68 68 / .22); color: #fecaca; }
.cm-card h3 { margin: 4px 0 0; font: 600 18px/1.3 'Readex Pro', 'IBM Plex Sans Arabic', sans-serif; }
.cm-legal { margin: 0; font-size: 12.5px; color: rgb(255 255 255 / .72); }
.cm-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin: 4px 0 0; }
.cm-card dt { font-size: 11px; color: rgb(255 255 255 / .6); } .cm-card dd { margin: 2px 0 0; font-size: 13px; font-weight: 600; text-align: start; }
.cm-apps { display: flex; flex-wrap: wrap; gap: 6px; } .cm-apps span { font-size: 11.5px; padding: 3px 9px; border-radius: 99px; background: rgb(255 255 255 / .14); } .cm-apps .none { opacity: .7; }
.cm-actions { display: flex; gap: 6px; margin-top: auto; padding-top: 6px; border-top: 1px solid rgb(255 255 255 / .14); }
.cm-actions button { flex: 1; height: 34px; border: 0; border-radius: 10px; background: rgb(255 255 255 / .12); color: #fff; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.cm-actions button:hover { background: rgb(255 255 255 / .22); }
.cm-add { min-height: 230px; display: grid; place-content: center; justify-items: center; gap: 6px; border-radius: 18px; border: 2px dashed var(--line); background: transparent; color: var(--muted); cursor: pointer; transition: border-color 220ms, color 220ms, background 220ms; }
.cm-add:hover { border-color: var(--primary); color: var(--text); background: var(--hover); }
.cm-add svg { width: 26px; height: 26px; } .cm-add b { font-size: 15px; color: var(--text); } .cm-add span { font-size: 12px; }
.cm-form { margin-top: 12px; }
.cm-form-head { display: flex; align-items: center; gap: 10px; } .cm-form-head h2 { margin: 0; font: 600 19px/1.3 'Readex Pro', 'IBM Plex Sans Arabic', sans-serif; }
[dir="rtl"] .cm-form-head .tb-btn svg { transform: scaleX(-1); }
.cm-warn { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; padding: 12px 14px; border-radius: 13px; background: color-mix(in srgb, #f59e0b 13%, transparent); border: 1px solid color-mix(in srgb, #f59e0b 35%, transparent); font-size: 13px; line-height: 1.7; }
.cm-warn svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: #f59e0b; }
.cm-steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 14px 0; overflow-x: auto; scrollbar-width: none; }
.cm-steps button { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.cm-steps i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--hover); font-size: 11.5px; }
.cm-steps .on button { border-color: var(--primary); color: var(--text); } .cm-steps .on i { background: var(--primary); color: #fff; }
.cm-steps .done i { background: #10b981; color: #fff; }
.cm-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 60%, transparent); animation: cmIn 220ms cubic-bezier(0, 0, 0.2, 1); }
.cm-field { display: grid; gap: 6px; margin: 0; font-weight: 400; } .cm-field.wide, .cm-fields .wide { grid-column: 1 / -1; }
.cm-field > span { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.cm-field input, .cm-field select, .cm-field textarea { height: 40px; border-radius: 11px; border: 1px solid var(--line); background: var(--field); color: var(--text); padding: 0 12px; font: inherit; }
.cm-field textarea { height: auto; padding: 10px 12px; resize: vertical; }
.cm-field input[type=color] { padding: 3px; width: 64px; cursor: pointer; }
.cm-field input:disabled { opacity: .6; }
.cm-logo-prev { width: 40px; height: 40px; object-fit: contain; border-radius: 10px; background: #fff; }
.cm-brand-prev { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; color: #fff; background: radial-gradient(300px 120px at 100% 0%, color-mix(in srgb, var(--brand2) 50%, transparent), transparent 70%), var(--brand); }
.cm-brand-prev b { font: 600 15px 'Readex Pro', 'IBM Plex Sans Arabic', sans-serif; } .cm-brand-prev i { margin-inline-start: auto; width: 60px; height: 6px; border-radius: 3px; background: var(--brand2); }
.cm-applist { display: grid; gap: 2px; }
.cm-form-foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.cm-users { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.cm-users li { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; border: 1px solid var(--line); }
.cm-users li.none { justify-content: center; color: var(--muted); }
.cm-ava { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(140deg, var(--primary), var(--secondary)); color: #fff; font-weight: 700; }
.cm-uname { flex: 1; display: grid; } .cm-uname small { color: var(--muted); font-size: 12px; text-align: start; }
@media (max-width: 640px) { .cm-fields { grid-template-columns: 1fr; } .cm-tools input { width: 100%; } }

/* Users & Access: lock micro-animation when access changes */
.ij-lock-toast { position: fixed; bottom: 24px; inset-inline-start: 50%; transform: translateX(-50%); z-index: 90; display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 99px;
  background: #0f172a; color: #fff; font-size: 13.5px; font-weight: 600; box-shadow: 0 16px 32px -14px rgb(0 0 0 / .5); animation: ijToastIn 260ms cubic-bezier(0, 0, 0.2, 1) both; transition: opacity 260ms, transform 260ms; }
[dir="rtl"] .ij-lock-toast { transform: translateX(50%); }
.ij-lock-toast svg { color: #34d399; } .ij-lock-toast:not(.open) svg { color: #fca5a5; }
.ij-lock-toast .shackle { transform-origin: 16px 11px; transition: transform 300ms cubic-bezier(0.2, 0, 0, 1) 120ms; }
.ij-lock-toast.open .shackle { animation: ijUnlock 420ms cubic-bezier(0.2, 0, 0, 1) 120ms both; }
.ij-lock-toast:not(.open) .shackle { animation: ijLock 420ms cubic-bezier(0.2, 0, 0, 1) 120ms both; }
.ij-lock-toast.out { opacity: 0; }
@keyframes ijToastIn { from { opacity: 0; translate: 0 10px; } }
@keyframes ijUnlock { to { transform: translateY(-3px) rotate(-28deg); } }
@keyframes ijLock { from { transform: translateY(-3px) rotate(-28deg); } to { transform: none; } }

/* ═════════ unified INJAZ design: Main Settings (slate) and Users & Access (green) ═════════
   Both take the shared shell look: a floating header in the company colour, white cards,
   the app accent for actions; Settings toggles snap, Users & Access locks open and close. */
html.ij-topbar .tb, html.ij-topbar .shell .tb {
  margin: 12px 12px 0; border-radius: 20px; height: 62px; color: #fff; background: color-mix(in srgb, var(--ij-co) 94%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 14px 30px -18px color-mix(in srgb, var(--ij-co) 85%, transparent);
  border: 0; top: 12px;
}
html.ij-topbar .tb .tb-btn, html.ij-topbar .tb .tb-co { color: #fff; background: rgb(255 255 255 / .08); border: 1px solid rgb(255 255 255 / .10); }
html.ij-topbar .tb .tb-btn:hover, html.ij-topbar .tb .tb-btn.on, html.ij-topbar .tb .tb-co:hover { background: rgb(255 255 255 / .16); color: #fff; }
html.ij-topbar .tb .tb-home { background: #fff; color: var(--ij-co); }
html.ij-topbar .tb-side { gap: 6px; }
html.ij-topbar .tb-badge { box-shadow: 0 0 0 2px var(--ij-co); }
html.ij-topbar .tb-pop, html.ij-ds .menu-list { color: var(--ij-ink); }
html.ij-ds .shell { background: transparent; --text: var(--ij-ink); --muted: var(--ij-muted); }
html.ij-ds .shell main { max-width: 1320px; padding-top: 22px; }
html.ij-ds .shell .stats .stat { background: var(--ij-surface); border: 1px solid var(--ij-line); border-radius: 20px; box-shadow: var(--ij-shadow-1); padding: 16px; }
html.ij-ds .shell .section-title { font-family: var(--ij-font-display); font-weight: 600; color: var(--ij-ink); }
html.ij-ds .shell .note { background: rgb(var(--ij-accent-rgb) / .10); color: var(--ij-ink); border-radius: 14px; }
/* permission matrix */
.ij-matrix { margin-top: 4px; }
.ij-matrix .ij-table td, .ij-matrix .ij-table th { white-space: nowrap; }
.ij-matrix .ij-table td:first-child b { font-weight: 600; }
.ij-perm { display: flex; align-items: center; gap: 8px; }
.ij-perm .ij-lock { width: 30px; height: 30px; border-radius: 10px; background: rgb(15 23 42 / .06); color: var(--ij-muted); flex-shrink: 0; }
.ij-perm.on .ij-lock { background: rgb(var(--ij-accent-rgb) / .12); color: var(--ij-accent); }
.ij-perm-sw { margin: 0; display: flex; gap: 6px; align-items: center; font-weight: 400; }
.ij-perm-role { min-height: 34px; height: 34px; width: auto; padding: 0 8px; font-size: 12.5px; border-radius: 10px; }
.ij-switch { -webkit-appearance: none; appearance: none; width: 40px; height: 24px; margin: 0; border-radius: 99px; cursor: pointer; flex-shrink: 0;
  background: radial-gradient(circle 9px at 12px 50%, #fff 96%, transparent 100%) no-repeat, rgb(15 23 42 / .18);
  transition: background-position 260ms cubic-bezier(.34, 1.56, .64, 1), background-color var(--ij-dur); background-position: 0 0; box-shadow: none !important; padding: 0 !important; border: 0 !important; }
.ij-switch:checked { background-color: var(--ij-accent); background-position: 16px 0; }
[dir="rtl"] .ij-switch { background-position: 16px 0; } [dir="rtl"] .ij-switch:checked { background-position: 0 0; }
.ij-switch:disabled { opacity: .45; cursor: not-allowed; }
/* Main Settings: grouped setting cards, toggles snap */
html.ij-ds .st-page { --primary: var(--ij-accent); --secondary: var(--ij-accent); }
html.ij-ds .st-panel { background: var(--ij-surface) !important; border: 1px solid var(--ij-line); border-radius: 24px; box-shadow: var(--ij-shadow-2); padding: 8px 22px 24px; }
html.ij-ds .st-h { color: var(--ij-ink); font-family: var(--ij-font-display); font-size: 14px; font-weight: 600; padding-top: 6px; }
html.ij-ds .st-title h1 { font-weight: 700; letter-spacing: -.01em; }
html.ij-ds .st-btn.primary { background: var(--ij-accent); box-shadow: var(--ij-glow); }
html.ij-ds .st-tabs { background: var(--ij-surface); box-shadow: var(--ij-shadow-1); border-color: var(--ij-line); }
html.ij-ds .st-tabs button[aria-selected="true"] { background: var(--ij-accent); color: #fff; box-shadow: var(--ij-glow); }
html.ij-ds .st-toggle input:checked + i { background: #059669; } /* "on" must read as on, whatever the accent */
html.ij-ds .st-toggle i::after { transition: transform 260ms cubic-bezier(.34, 1.56, .64, 1); }

/* Main Settings → Seasonal mode */
.ss-wrap { display: grid; gap: 16px; }
.ss-hero { margin-bottom: 0; }
.ss-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.ss-wide { grid-column: 1 / -1; }
@media (max-width: 900px) { .ss-grid { grid-template-columns: 1fr; } }
.ss-card h3 { margin: 0 0 12px; font-family: var(--ij-font-display); font-size: 15.5px; font-weight: 600; color: var(--ij-ink); }
.ss-field { display: grid; gap: 6px; margin-top: 12px; font-size: 12.5px; font-weight: 600; color: var(--ij-ink-2); }
.ss-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ss-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--ij-line); font-size: 13px; }
.ss-st { font-weight: 700; font-size: 12.5px; padding: 4px 10px; border-radius: 99px; }
.ss-st.on { background: rgb(16 185 129 / .12); color: #047857; } .ss-st.off { background: rgb(15 23 42 / .06); color: var(--ij-muted); } .ss-st.wait { background: rgb(245 158 11 / .14); color: #a15c07; }
.ss-flag { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--ij-line); }
.ss-flag-img { width: 96px; height: 64px; border-radius: 12px; display: grid; place-items: center; background: var(--ij-surface-2); border: 1px solid var(--ij-line); overflow: hidden; font-size: 11px; color: var(--ij-muted); flex-shrink: 0; }
.ss-flag-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ss-flag-side { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ss-flag-side b { width: 100%; font-size: 13px; font-weight: 600; }
.ss-seg { margin-top: 2px; }
.ss-range { display: grid; grid-template-columns: 150px 1fr 56px; align-items: center; gap: 10px; margin-top: 12px; font-size: 12.5px; font-weight: 600; color: var(--ij-ink-2); }
.ss-range input { accent-color: var(--ij-accent); width: 100%; }
.ss-range output { text-align: end; font: 600 12.5px var(--ij-font-display); color: var(--ij-muted); direction: ltr; }
.ss-look { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 900px) { .ss-look { grid-template-columns: 1fr; } .ss-range { grid-template-columns: 1fr 56px; } .ss-range span { grid-column: 1 / -1; } }
.ss-mini-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ij-ink-2); margin: 12px 0 6px; }
.ss-band { position: relative; height: 150px; border-radius: 16px; overflow: hidden; border: 1px dashed var(--ij-line-2); background: linear-gradient(180deg, var(--ij-co) 0 42px, var(--ij-surface-2) 42px); }
.ss-band-zone { position: absolute; inset: 0 0 auto 0; overflow: hidden; }
.ss-band-zone img { position: absolute; border-radius: 2px; box-shadow: 0 2px 6px rgb(0 0 0 / .18); transform: translate(-50%, -50%); }
.ss-band-line { position: absolute; inset: 0 0 auto 0; border-bottom: 2px dashed var(--ij-accent); pointer-events: none; }
.ss-band-tag { position: absolute; bottom: 8px; inset-inline-end: 10px; font: 600 11px var(--ij-font-display); color: var(--ij-muted); direction: ltr; }

/* ═════════ Command Center (home screen) ═════════ */
.cc-root { position: relative; z-index: 1; max-width: 1240px; margin: 8px auto 64px; padding: 0 clamp(14px, 2.6vw, 28px); }
.cc { color: var(--text, #111827); }
.cc-in .cc-app { animation: ij-in 420ms cubic-bezier(0,0,.2,1) both; }
.cc-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.cc-title { display: flex; align-items: center; gap: 12px; }
.cc-ic { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--ij-co), color-mix(in srgb, var(--ij-co) 60%, var(--ij-co-2))); box-shadow: 0 12px 26px -12px var(--ij-co); }
.cc-title h2 { margin: 0; font-family: 'Readex Pro', 'IBM Plex Sans Arabic', sans-serif; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.cc-title h2 em { font-style: normal; background: linear-gradient(90deg, var(--ij-co-2), #0f766e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cc-title p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted, #5b6474); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cc-live { width: 7px; height: 7px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 3px rgb(16 185 129 / .2); display: inline-block; }
.cc-cos { display: flex; flex-wrap: wrap; gap: 8px; }
.cc-co { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 6px; border-radius: 13px; cursor: pointer; font: 600 13px 'IBM Plex Sans Arabic', sans-serif;
  background: var(--pop, #fff); color: var(--text, #111827); border: 1px solid var(--line, rgb(15 23 42 / .1)); box-shadow: 0 2px 8px -4px rgb(15 23 42 / .15); }
[dir="rtl"] .cc-co { padding: 0 6px 0 12px; }
.cc-co:hover { transform: translateY(-2px); }
.cc-co[aria-pressed="true"] { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 20%, transparent); }
.cc-co-mark { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; overflow: hidden; color: #fff; font: 700 13px 'Readex Pro', sans-serif; background: var(--c); }
.cc-co-mark.all { background: linear-gradient(135deg, #0d1b40 0 50%, #4c0d21 50% 100%); }
.cc-co-mark img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.cc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.cc-app { position: relative; overflow: hidden; border-radius: 24px; padding: 18px; background: var(--pop, #fff); border: 1px solid var(--line, rgb(15 23 42 / .08));
  box-shadow: 0 1px 2px rgb(15 23 42 / .04), 0 18px 36px -22px rgb(15 23 42 / .28); transition: transform 220ms cubic-bezier(.2,0,0,1), box-shadow 220ms; }
.cc-app::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--a), color-mix(in srgb, var(--a) 40%, transparent)); }
.cc-app:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgb(15 23 42 / .05), 0 26px 46px -24px rgb(15 23 42 / .36); }
.cc-app-head { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; text-decoration: none; color: inherit; }
.cc-app-head b { font-family: 'Readex Pro', sans-serif; font-size: 15px; font-weight: 600; flex: 1; }
.cc-app-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--a); box-shadow: 0 0 0 4px rgb(var(--a-rgb) / .15); }
.cc-open { font-size: 12px; font-weight: 600; color: var(--a); opacity: .85; }
.cc-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cc-m { position: relative; display: grid; gap: 2px; padding: 12px; border-radius: 16px; background: rgb(var(--a-rgb) / .06); }
.cc-m.lead { grid-column: 1 / -1; padding: 14px 16px; background: linear-gradient(120deg, rgb(var(--a-rgb) / .14), rgb(var(--a-rgb) / .04)); }
.cc-m-ic { color: var(--a); }
.cc-m-v { font: 700 24px/1.1 'Readex Pro', sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.cc-m.lead .cc-m-v { font-size: 34px; }
.cc-m-l { font-size: 12px; font-weight: 600; color: var(--muted, #5b6474); }
.cc-m.tone-warn .cc-m-v { color: #b45309; } .cc-m.tone-bad .cc-m-v { color: #b42318; }
.cc-bar { display: block; height: 5px; border-radius: 99px; background: rgb(var(--a-rgb) / .14); overflow: hidden; margin-top: 6px; }
.cc-bar i { display: block; height: 100%; border-radius: inherit; background: var(--a); transform-origin: left center; animation: ij-fill 800ms cubic-bezier(0,0,.2,1) both; }
[dir="rtl"] .cc-bar i { transform-origin: right center; }
.cc-feed { --a: var(--ij-co-2); --a-rgb: 84 98 120; }
.cc-feed ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-height: 300px; overflow: auto; }
.cc-feed li { display: flex; gap: 10px; font-size: 12.5px; line-height: 1.5; }
.cc-feed-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.cc-feed li span { color: var(--muted, #5b6474); }
.cc-feed li small { display: block; color: var(--muted, #5b6474); font-size: 11px; }
@media (prefers-reduced-motion: reduce) { .cc-in .cc-app, .cc-bar i { animation: none; } }
@media print { .cc-root { display: none; } }

/* Main Settings → Backup */
.bk-wrap { display: grid; gap: 16px; }
.bk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.bk-wide { grid-column: 1 / -1; }
@media (max-width: 900px) { .bk-grid { grid-template-columns: 1fr; } }
.bk-grid h3 { margin: 0 0 12px; font-family: var(--ij-font-display); font-size: 15.5px; font-weight: 600; color: var(--ij-ink); }
.bk-grid h3 small { color: var(--ij-muted); font-weight: 500; }
.bk-path { font-size: 12px; color: var(--ij-muted); direction: ltr; }
.bk-last { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 14px; margin-bottom: 8px; }
.bk-last.ok { background: rgb(16 185 129 / .1); color: #047857; } .bk-last.bad { background: rgb(239 68 68 / .1); color: #b42318; }
.bk-last span { font-size: 12.5px; color: var(--ij-muted); }
.bk-kv { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--ij-line); font-size: 13px; }
.bk-kv span { color: var(--ij-muted); } .bk-kv bdi { font-size: 12px; direction: ltr; }
.bk-run { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: rgb(var(--ij-accent-rgb) / .1); font-size: 13px; font-weight: 600; }
.bk-spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgb(var(--ij-accent-rgb) / .25); border-top-color: var(--ij-accent); animation: bk-spin .8s linear infinite; }
@keyframes bk-spin { to { transform: rotate(360deg); } }

/* Command Center as its own module (/command) */
.cc-page .cc-main { max-width: 1320px; margin: 0 auto; padding: 22px clamp(14px, 2.6vw, 28px) 64px; }
.cc-page .cc-root { max-width: none; margin: 0; padding: 0; }
.cc-page .cc-head { position: relative; overflow: hidden; isolation: isolate; padding: 24px 24px 22px; border-radius: 24px; color: #fff; margin-bottom: 18px;
  background: linear-gradient(120deg, var(--ij-co) 0%, color-mix(in srgb, var(--ij-co) 78%, var(--ij-co-2)) 100%); box-shadow: 0 22px 44px -26px var(--ij-co); }
.cc-page .cc-head::before { content: ''; position: absolute; z-index: -1; width: 420px; height: 420px; border-radius: 50%; inset-inline-end: -120px; top: -220px; background: radial-gradient(circle, rgb(var(--ij-accent-rgb) / .6), transparent 68%); }
.cc-page .cc-title h2 { color: #fff; font-size: clamp(22px, 2.6vw, 30px); }
.cc-page .cc-title h2 em { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--ij-accent-on-dark); }
.cc-page .cc-title p { color: rgb(255 255 255 / .74); }
.cc-page .cc-ic { background: rgb(255 255 255 / .12); border: 1px solid rgb(255 255 255 / .16); box-shadow: none; }
.cc-page .cc-co { background: rgb(255 255 255 / .1); color: #fff; border-color: rgb(255 255 255 / .16); box-shadow: none; }
.cc-page .cc-co[aria-pressed="true"] { background: #fff; color: var(--ij-co); border-color: #fff; }
.cc-page .cc { --text: var(--ij-ink); --muted: var(--ij-muted); --pop: var(--ij-surface); --line: var(--ij-line); }

/* ═════════ portal ⇄ system transition (cross-document View Transitions; no side slide) ═════════
   going home: the system's page shrinks back into its tile (spring), its content fading fast; the
   other tiles return from depth in a ripple from that tile; the tile settles with a short glow. */
@view-transition { navigation: auto; }
::view-transition-group(ij-app) { animation-duration: 330ms; animation-timing-function: cubic-bezier(.2, 1.1, .36, 1); border-radius: 20px; overflow: hidden; }
::view-transition-old(ij-app) { animation: ijvt-out 100ms cubic-bezier(.4, 0, 1, 1) both; }
::view-transition-new(ij-app) { animation: ijvt-in 160ms 170ms cubic-bezier(0, 0, .2, 1) both; }
::view-transition-old(root) { animation: ijvt-out 150ms cubic-bezier(.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: ijvt-in 180ms cubic-bezier(0, 0, .2, 1) both; }
/* going home: a slide from left to right — the system's page moves out to the right while the
   home screen comes in from the left (one movement, no morph) */
html.ij-returning::view-transition-group(root), html.ij-returning::view-transition-group(ij-app) { animation-duration: 200ms; }
html.ij-returning::view-transition-old(root), html.ij-returning::view-transition-old(ij-app) { animation: ijvt-slide-away 200ms cubic-bezier(.3, 0, .1, 1) both; }
html.ij-returning::view-transition-new(root) { animation: ijvt-slide-from 200ms cubic-bezier(.3, 0, .1, 1) both; }
@keyframes ijvt-slide-away { to { transform: translateX(100%); } }
@keyframes ijvt-slide-from { from { transform: translateX(-100%); } }
@keyframes ijvt-out { to { opacity: 0; } }
@keyframes ijvt-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: ijvt-fade 160ms ease both !important; }
  ::view-transition-old(*) { animation-name: ijvt-out !important; }
}
@keyframes ijvt-fade { from { opacity: 0; } }

/* ═════════ home, modern layout: welcome strip + each section in its own glass panel ═════════ */
.lx-page .lx-main { max-width: 1180px; padding-top: clamp(22px, 4.5vh, 48px); }
.lx-hello { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; margin: 0 0 26px; padding: 22px 26px; border-radius: 26px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 22%, transparent), color-mix(in srgb, var(--secondary) 14%, transparent)), color-mix(in srgb, var(--surface) 55%, transparent);
  border: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 18px 40px -26px rgb(0 0 0 / .55);
  animation: lxHello .55s cubic-bezier(.2,.8,.2,1) both; }
@keyframes lxHello { from { opacity: 0; transform: translateY(8px); } }
.lx-hello h2 { margin: 2px 0 0; font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; color: var(--text); letter-spacing: -.01em; }
.lx-hello-date { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.lx-hello-co { margin: 4px 0 0; font-size: 13px; font-weight: 700; color: var(--accent); }
.lx-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lx-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--text); text-decoration: none;
  background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--line); transition: transform .18s, border-color .18s, background .18s; }
.lx-chip svg { width: 16px; height: 16px; opacity: .85; }
a.lx-chip:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
a.lx-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lx-chip.hot { background: color-mix(in srgb, #ef4444 18%, var(--surface)); border-color: color-mix(in srgb, #ef4444 45%, transparent); }
.lx-chip.quiet { color: var(--muted); }
.lx-page .lx-title { font-size: clamp(18px, 2vw, 22px); opacity: .9; margin-bottom: 14px; }
.lx-page .lx-search { margin-bottom: 26px; }
.lx-page .lx-sec { padding: 18px 20px 20px; border-radius: 24px; background: color-mix(in srgb, var(--surface) 48%, transparent); border: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.lx-page .lx-sec + .lx-sec { margin-top: 18px; }
.lx-page .lx-sec-title { justify-content: flex-start; margin-bottom: 14px; font-size: 13px; color: var(--text); opacity: .82; }
.lx-page .lx-sec-title::before { display: none; }
.lx-page .lx-sec-title::after { flex: 1; width: auto; transform: none; background: linear-gradient(90deg, var(--line), transparent); }
[dir="rtl"] .lx-page .lx-sec-title::after { background: linear-gradient(270deg, var(--line), transparent); }
.lx-page .lx-tile { transition: transform .22s cubic-bezier(.2,.8,.2,1), background .22s; }
.lx-page a.lx-tile:hover { background: var(--hover); transform: translateY(-3px); }
@media (max-width: 640px) { .lx-hello { padding: 18px; border-radius: 22px; } .lx-page .lx-sec { padding: 14px 10px 14px; border-radius: 20px; } }
@media (prefers-reduced-motion: reduce) { .lx-hello { animation: none; } .lx-page a.lx-tile:hover { transform: none; } }
/* small sections (one or two systems) sit side by side instead of each taking a full row */
@media (min-width: 900px) {
  .lx-page .lx-main { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; align-content: start; }
  .lx-page .lx-main > * { grid-column: 1 / -1; }
  .lx-page .lx-main > .lx-sec:not(:has(.lx-cell:nth-child(3))) { grid-column: auto; }
  .lx-page .lx-main > .lx-sec + .lx-sec { margin-top: 0; }
  .lx-page .lx-main > .lx-sec { margin-bottom: 18px; }
  .lx-page .lx-main > .lx-sec:not(:has(.lx-cell:nth-child(3))) .lx-grid { justify-content: start; margin: 0; }
}

/* users & access: summary, search/filter bar, sticky name column */
.ij-adm-stats { margin: 4px 0 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ij-adm-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px; }
.ij-adm-search { position: relative; flex: 1; min-width: 220px; max-width: 420px; margin: 0; }
.ij-adm-search span { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ij-muted); pointer-events: none; }
.ij-adm-search span svg { width: 16px; height: 16px; }
.ij-adm-search input { width: 100%; padding-inline-start: 36px; height: 42px; }
.ij-adm-seg { display: inline-flex; gap: 3px; padding: 3px; border-radius: 12px; background: var(--ij-surface); border: 1px solid var(--ij-line); }
.ij-adm-seg button { height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--ij-muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.ij-adm-seg button[aria-checked="true"] { background: var(--ij-accent); color: #fff; }
.ij-adm-n { font-size: 12.5px; color: var(--ij-muted); font-weight: 600; }
.ij-matrix .ij-table th:first-child, .ij-matrix .ij-table td:first-child { position: sticky; inset-inline-start: 0; z-index: 1; background: var(--ij-surface); box-shadow: -6px 0 12px -10px rgb(0 0 0 / .35); }
[dir="rtl"] .ij-matrix .ij-table th:first-child, [dir="rtl"] .ij-matrix .ij-table td:first-child { box-shadow: 6px 0 12px -10px rgb(0 0 0 / .35); }
.ij-matrix tbody tr:hover td { background: color-mix(in srgb, var(--ij-accent) 5%, var(--ij-surface)); }

/* unified notification center */
.nc-pop { width: min(420px, calc(100vw - 24px)); max-height: min(72vh, 620px); overflow: auto; padding: 10px; }
.nc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nc-all { border: 0; background: transparent; color: var(--accent, var(--ij-accent)); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.nc-all:hover { background: var(--hover); }
.nc-tabs { display: flex; gap: 4px; margin: 6px 0 8px; }
.nc-tabs button { flex: 1; height: 32px; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.nc-tabs button[aria-selected="true"] { background: var(--hover); color: var(--text); }
.nc-tabs b { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #dc2626; color: #fff; font-size: 10.5px; }
.nc-item { position: relative; align-items: flex-start; }
.nc-item small { display: block; line-height: 1.5; }
.nc-item .nc-meta { opacity: .75; font-size: 11px; margin-top: 2px; }
.nc-item.unread b { font-weight: 800; }
.nc-dot { position: absolute; top: 14px; inset-inline-end: 10px; width: 8px; height: 8px; border-radius: 50%; background: #3b82f6; box-shadow: 0 0 0 3px color-mix(in srgb, #3b82f6 25%, transparent); }

/* unified permissions modal */
.pm-modal { width: min(920px, calc(100vw - 24px)); max-height: min(88vh, 900px); overflow: auto; text-align: start; }
.pm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.pm-tabs { margin-bottom: 12px; flex-wrap: wrap; }
.pm-tabs small { opacity: .7; font-weight: 500; }
.pm-h { margin: 14px 0 8px; font-size: 13px; font-weight: 800; color: var(--ij-muted); }
.pm-grid { overflow: auto; border: 1px solid var(--ij-line); border-radius: 14px; }
.pm-table th, .pm-table td { text-align: center; white-space: nowrap; }
.pm-table td:first-child, .pm-table th:first-child { text-align: start; }
.pm-flow { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; }
.pm-chk { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--ij-line); cursor: pointer; font-size: 13px; }
.pm-table .pm-chk { border: 0; padding: 0; min-height: 28px; justify-content: center; }
.pm-chk input { width: 17px; height: 17px; accent-color: var(--ij-accent); }
.pm-foot { position: sticky; bottom: -1px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 12px 0 2px; background: var(--ij-surface); border-top: 1px solid var(--ij-line); }
.modal.pm-modal { max-width: none; }
.pm-table td, .pm-table th { padding-top: 6px !important; padding-bottom: 6px !important; }
/* modals above everything (the top bar used to cover them), in the design system's colours */
.modal-bg { z-index: 1000; backdrop-filter: blur(3px); }
html.ij-ds .modal { background: var(--ij-surface); color: var(--ij-ink); border: 1px solid var(--ij-line); box-shadow: 0 30px 80px -30px rgb(0 0 0 / .6); }
.modal.pm-modal { display: flex; flex-direction: column; padding: 0; overflow: hidden; height: min(88vh, 900px); }
.pm-modal .pm-head { padding: 18px 22px 0; margin: 0; }
.pm-modal .pm-tabs { margin: 12px 22px 0; }
.pm-modal .pm-note { margin: 10px 22px 0; }
.pm-modal .pm-body { flex: 1; min-height: 0; overflow: auto; padding: 4px 22px 18px; overscroll-behavior: contain; }
.pm-modal .pm-foot { position: static; margin: 0; padding: 12px 22px; }
body.pm-open { overflow: hidden; }
.pm-modal .pm-note { padding: 9px 12px; border-radius: 10px; font-size: 13px; font-weight: 700; }
.pm-note.ok { background: color-mix(in srgb, #16a34a 14%, transparent); color: #15803d; }
.pm-note.bad { background: color-mix(in srgb, #dc2626 14%, transparent); color: #b91c1c; }
html.ij-dark .pm-note.ok { color: #86efac; } html.ij-dark .pm-note.bad { color: #fca5a5; }
.pm-cb { width: 17px; height: 17px; accent-color: var(--ij-accent); cursor: pointer; }
.pm-row { all: unset; cursor: pointer; font-weight: 600; padding: 2px 6px; border-radius: 8px; }
.pm-row:hover, .pm-row:focus-visible { background: color-mix(in srgb, var(--ij-accent) 12%, transparent); outline: none; }
.pm-table thead th { position: sticky; top: 0; z-index: 1; background: var(--ij-surface); }
.pm-table td:first-child, .pm-table th:first-child { position: sticky; inset-inline-start: 0; background: var(--ij-surface); z-index: 1; }
.pm-table thead th:first-child { z-index: 2; }
.pm-grid { max-height: none; } /* one scroll for the whole window, not a box inside a box */
.pm-sel { min-width: 220px; height: 38px; }
.pm-full { margin: 16px 0; padding: 16px; border-radius: 14px; border: 1px dashed var(--ij-line); font-weight: 700; line-height: 1.9; }
.pm-new { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, #f59e0b 14%, transparent); }
.pm-foot { border-top: 1px solid var(--ij-line); background: var(--ij-surface); }
.pm-texts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 12px; }
.pm-txt { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--ij-muted); }
.pm-txt .ij-input { height: 38px; font-weight: 500; color: var(--ij-ink); }
.pm-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.pm-tpl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pm-tpl .pm-sel { width: auto; flex: 0 1 320px; }
.nc-tag { font-style: normal; font-weight: 800; font-size: 10px; padding: 1px 6px; border-radius: 6px; background: color-mix(in srgb, #f59e0b 18%, transparent); color: #b45309; }
.nc-tag.hi { background: color-mix(in srgb, #dc2626 16%, transparent); color: #b91c1c; }
html.ij-dark .nc-tag { color: #fcd34d; } html.ij-dark .nc-tag.hi { color: #fca5a5; }
.nc-tabs b.nc-warn { background: #b45309; }
html:not(.ij-dark) .pill.ok { color: #15803d; } /* readable on its light green (≥ 4.5:1) */

/* ═══ header v2 on the home screen: the same light glass bar as every system and the central
   dashboard (dark glass in dark mode); it shrinks a little once the page is scrolled ═══ */
html.ij-topbar .tb, html.ij-topbar .shell .tb {
  --hd-btn: #ffffff; --hd-btn-bd: rgb(15 23 42 / .08); --hd-btn-hov: #f1f5f9; --hd-fg: #0f172a;
  color: var(--hd-fg); background: rgb(255 255 255 / .78); border: 1px solid rgb(15 23 42 / .07); border-radius: 999px; height: 60px; padding: 0 10px;
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 1px 1px rgb(15 23 42 / .04), 0 18px 40px -24px rgb(15 23 42 / .35);
  transition: height 220ms cubic-bezier(.2, .8, .2, 1), top 220ms cubic-bezier(.2, .8, .2, 1), margin 220ms cubic-bezier(.2, .8, .2, 1);
}
html.ij-topbar.ij-dark .tb, html.ij-topbar.ij-dark .shell .tb {
  --hd-btn: rgb(255 255 255 / .06); --hd-btn-bd: rgb(255 255 255 / .1); --hd-btn-hov: rgb(255 255 255 / .12); --hd-fg: #eef1f8;
  background: rgb(22 28 42 / .72); border-color: rgb(255 255 255 / .09); box-shadow: 0 1px 1px rgb(0 0 0 / .3), 0 24px 50px -28px rgb(0 0 0 / .8);
}
html.ij-topbar .tb .tb-btn, html.ij-topbar .tb .tb-co { color: var(--hd-fg); background: var(--hd-btn); border: 1px solid var(--hd-btn-bd); border-radius: 999px; transition: width 220ms ease, height 220ms ease, background-color 160ms ease; }
html.ij-topbar .tb .tb-btn:hover, html.ij-topbar .tb .tb-btn.on, html.ij-topbar .tb .tb-co:hover, html.ij-topbar .tb .tb-btn[aria-expanded="true"] { background: var(--hd-btn-hov); color: var(--hd-fg); }
html.ij-topbar .tb .tb-home { background: var(--hd-btn); color: var(--hd-fg); }
html.ij-topbar .tb-badge { box-shadow: 0 0 0 2px var(--hd-btn); }
html.ij-topbar .tb .tb-avatar { border-radius: 50%; }
html.ij-topbar .tb.is-compact { height: 48px; top: 6px; margin-top: 6px; }
html.ij-topbar .tb.is-compact .tb-btn { width: 34px; height: 34px; }
html.ij-topbar .tb.is-compact .tb-co, html.ij-topbar .tb.is-compact .tb-avatar { height: 34px; }
html.ij-topbar .tb.is-compact .tb-avatar { width: 34px; }
html.ij-topbar .tb .tb-avatar { background: linear-gradient(140deg, #2563eb, #1e3a8a); box-shadow: 0 0 0 2px var(--hd-btn), 0 0 0 3px var(--hd-btn-bd); }
.ij-perm-auto { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: rgb(100 116 139 / .14); color: var(--ij-muted, #5b6678); white-space: nowrap; }
/* company identity on the home screen: logos in the company choice, and the greeting strip in the
   chosen company's colours (Injaz navy/blue, Nabdh burgundy/rose, both = neutral graphite) */
.co-dot.logo { background: #fff; overflow: hidden; box-shadow: inset 0 0 0 1px rgb(15 23 42 / .12); }
.co-dot.logo img { width: 100%; height: 100%; object-fit: contain; }
.lx-hello { background: linear-gradient(120deg, color-mix(in srgb, var(--ij-co-2, #546278) 16%, rgb(255 255 255 / .85)), color-mix(in srgb, var(--ij-co, #1e242e) 10%, rgb(255 255 255 / .7))) !important; border-color: color-mix(in srgb, var(--ij-co-2, #546278) 22%, transparent) !important; }
html.ij-dark .lx-hello { background: linear-gradient(120deg, color-mix(in srgb, var(--ij-co, #1e242e) 70%, rgb(22 28 42 / .8)), color-mix(in srgb, var(--ij-co-2, #546278) 28%, rgb(22 28 42 / .8))) !important; border-color: color-mix(in srgb, var(--ij-co-2, #546278) 30%, transparent) !important; }
.lx-hello-co { color: var(--ij-co-2, #4f46e5) !important; font-weight: 700; }
html.ij-dark .lx-hello-co { color: color-mix(in srgb, var(--ij-co-2, #a5b4fc) 55%, #fff) !important; }
/* the header carries the company colour as a thin line at its base (same in every system) */
html.ij-topbar .tb { background-image: linear-gradient(90deg, transparent 8%, color-mix(in srgb, var(--ij-co-2, #546278) 70%, transparent) 50%, transparent 92%); background-size: 100% 2px; background-position: bottom; background-repeat: no-repeat; }
/* one "create account" for every system */
.modal.nu-modal { width: min(760px, calc(100vw - 24px)); max-width: none; padding: 0; display: flex; flex-direction: column; max-height: min(90vh, 860px); overflow: hidden; text-align: start; }
.nu-head { padding: 20px 22px 8px; } .nu-head h2 { font-size: 18px; margin: 0 0 4px; }
.nu-body { flex: 1; min-height: 0; overflow: auto; padding: 4px 22px 16px; overscroll-behavior: contain; }
.nu-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 22px; border-top: 1px solid var(--ij-line); background: var(--ij-surface); }
.nu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.nu-f { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 700; color: var(--ij-muted); margin: 0; }
.nu-f .ij-input { height: 40px; font-weight: 500; color: var(--ij-ink); }
.nu-f .ij-input.bad { border-color: #dc2626; }
.nu-apps { display: grid; gap: 8px; }
.nu-app { border: 1px solid var(--ij-line); border-radius: 14px; padding: 10px 12px; transition: border-color 160ms ease, background-color 160ms ease; }
.nu-app.on { border-color: color-mix(in srgb, var(--ij-accent, #047857) 55%, transparent); background: color-mix(in srgb, var(--ij-accent, #047857) 6%, transparent); }
.nu-on { display: flex; align-items: center; gap: 12px; cursor: pointer; margin: 0; }
.nu-on span { display: flex; flex-direction: column; } .nu-on b { font-size: 14px; color: var(--ij-ink); } .nu-on small { font-size: 11.5px; color: var(--ij-muted); font-weight: 500; }
.nu-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--ij-line); }
.nu-cos { display: flex; flex-wrap: wrap; gap: 6px; }
/* Users & Access: the whole table fits the screen (no sideways scrolling) */
.ij-matrix { overflow: hidden !important; }
.ij-matrix .ij-table.ij-fit { table-layout: fixed; width: 100%; min-width: 0 !important; }
.ij-matrix .ij-table.ij-fit td, .ij-matrix .ij-table.ij-fit th { white-space: normal; padding-inline: 8px; vertical-align: middle; }
.ij-matrix .ij-table.ij-fit th { font-size: 12px; line-height: 1.35; }
.ij-fit col.c-who { width: 22%; } .ij-fit col.c-acts { width: 150px; }
.ij-matrix .ij-table.ij-fit td:first-child, .ij-matrix .ij-table.ij-fit th:first-child { position: static; box-shadow: none; }
.ij-who b { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.ij-who small { display: block; color: var(--ij-muted); font-size: 11.5px; text-align: start; }
.ij-who-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 5px 0 3px; }
.ij-who-tags .pill { font-size: 10.5px; padding: 1px 8px; }
.ij-who-last { font-size: 10.5px !important; }
.ij-fit .ij-perm { flex-direction: column; align-items: stretch; gap: 6px; }
.ij-fit .ij-perm-sw { justify-content: flex-start; font-size: 12px; }
.ij-fit .ij-perm-role { width: 100%; min-width: 0; height: 32px; min-height: 32px; font-size: 12px; padding: 0 6px; text-overflow: ellipsis; }
.ij-fit .ij-perm-auto { align-self: flex-start; }
.ij-acts { display: table-cell; }
.ij-acts .ij-acts-main { width: 100%; justify-content: center; white-space: nowrap; font-size: 12px; }
.ij-acts-row { display: flex; gap: 4px; margin-top: 5px; }
.ij-acts-row .ij-btn { flex: 1; justify-content: center; font-size: 11.5px; padding-inline: 6px; white-space: nowrap; }
@media (max-width: 900px) { .ij-fit col.c-who { width: 30%; } .ij-fit col.c-acts { width: 120px; } }
.pm-cos-top { margin: 12px 22px 0; padding: 12px 14px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--ij-accent, #047857) 35%, var(--ij-line)); background: color-mix(in srgb, var(--ij-accent, #047857) 5%, transparent); display: grid; grid-template-columns: 1fr auto; gap: 10px 14px; align-items: center; }
.pm-cos-top .pm-cos { grid-column: 1 / -1; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.pm-cos-top [data-savecos] { grid-row: 1; grid-column: 2; }
