/* تحليل محافظ — shared design tokens and components. Visual identity = حصّل (SPEC §19): Droid Arabic Kufi, green primary
   buttons, navy titles, light grey page, white cards, a white top bar and a white right sidebar (rendered by nav.js).
   Components reused by every page:
   .card / .card-title / .card-sub        white card            .kpi-grid / .kpi / .kpi .value / .kpi .label   KPI cards
   .kpi-grad.g1..g4                        Hassel gradient KPI cards (المؤشرات)
   .table-wrap / table.data                scrolling table (navy header, zebra rows)
   .btn .btn-primary .btn-blue .btn-danger .btn-ghost .btn-sm .btn-outline     buttons (تطبيق / تصدير / حذف / عرض)
   .input .select .textarea .field         form controls        .badge .ok .warn .danger .info   pills
   .progress > .bar                        progress bars        .toast (PA.toast)  .spinner  .muted  .num
   .hs-top / .hs-side / .hs-foot           app chrome (nav.js)  .page / .page.narrow  content container
   .help-tip .sys-badge .t1-na .t1-asof .t1-pending .t1-line   النظام الجديد: «؟» tips, badge, unavailable cells (nav.js) */
@font-face { font-family: 'Droid Arabic Kufi'; font-style: normal; font-weight: 400; font-display: swap; src: url(/vendor/fonts/DroidKufi-Regular.woff) format('woff'), url(/vendor/fonts/DroidKufi-Regular.ttf) format('truetype'); }
:root {
  --green: #0c9f24;
  --green-dark: #117b22;
  --green-soft: #e6f6e9;
  --blue: #162fa8;
  --navy: #0b1754;
  --link-blue: #1a73e8;
  --danger: #cd2828;
  --danger-soft: #fbe9e9;
  --warn: #e08a00;
  --warn-soft: #fdf3e2;
  --ok: #0c9f24;
  --ok-soft: #e6f6e9;
  --info: #1a73e8;
  --info-soft: #e8f0fd;
  --bg: #f1f1f1;
  --card: #ffffff;
  --text: #222222;
  --muted: #6b6b6b;
  --border: #e3e3e3;
  --border-strong: #cfcfcf;
  --radius: 5px;
  --radius-sm: 4px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .08);
  --shadow-lg: 0 6px 20px rgba(0, 0, 0, .18);
  --font: "Droid Arabic Kufi", Tahoma, Arial, sans-serif;
  --mono: Consolas, "Courier New", monospace;
  --topbar-h: 58px;
  --side-w: 232px;
  /* kept for older page styles */
  --header: var(--navy);
  --header-2: var(--blue);
  --accent: var(--green);
  --accent-dark: var(--green-dark);
  --accent-soft: var(--green-soft);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 13.5px; line-height: 1.7; color: var(--text); background: var(--bg); direction: rtl; min-height: 100vh; }
a { color: var(--link-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.4; font-weight: 700; color: var(--navy); }
h1 { font-size: 1.25rem; } h2 { font-size: 1.08rem; } h3 { font-size: .98rem; }
p { margin: 0 0 .75rem; }
[hidden] { display: none !important; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.num, .ltr { direction: ltr; unicode-bidi: embed; }
.money { color: var(--green); font-weight: 700; }
.count { color: var(--link-blue); }
.neg-money { color: var(--danger); font-weight: 700; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 800px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
svg.ico { width: 1em; height: 1em; vertical-align: -.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }

/* ---------- app chrome (حصّل Default.aspx): full-height white right sidebar, white top bar in the main column, footer ---------- */
body.hs-app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); grid-template-rows: var(--topbar-h) minmax(0, 1fr) auto; grid-template-areas: "side top" "side main" "side foot"; min-height: 100vh; background: #f0f0f0; }
body.hs-app > main, body.hs-app > .layout, body.hs-app > .page, body.hs-app > .db-main { grid-area: main; min-width: 0; }
.hs-top { grid-area: top; position: sticky; top: 0; z-index: 60; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .12); display: flex; align-items: center; gap: .6rem; padding: 0 1rem 0 0; height: var(--topbar-h); }
.hs-top .hs-menu-btn { display: none; background: #fff; border: 1px solid var(--border-strong); color: #555; border-radius: var(--radius); width: 38px; height: 36px; cursor: pointer; font-size: 1.1rem; align-items: center; justify-content: center; }
.hs-top .hs-brand { display: none; }
.hs-brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--navy); font-weight: 700; font-size: 1rem; white-space: nowrap; }
.hs-brand:hover { text-decoration: none; }
.hs-brand img { height: 34px; width: auto; display: block; }
.hs-user { display: inline-flex; align-items: center; gap: .3rem; position: relative; }
.hs-user .who { background: transparent; border: 0; font: inherit; color: #333; cursor: pointer; display: inline-flex; align-items: center; gap: .45rem; padding: .25rem .4rem; border-radius: var(--radius); white-space: nowrap; font-size: .9rem; }
.hs-user .who:hover { background: #f4f4f4; }
.hs-user .who .caret { color: #555; font-size: .8rem; }
.hs-user .who .role { display: none; }
.hs-user .avatar { width: 36px; height: 36px; border-radius: 4px; background: #e9ecf3; color: var(--navy); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; border: 1px solid #d5d9e3; font-size: 1rem; }
.hs-user .hs-dd { position: absolute; top: calc(100% + 6px); right: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 190px; padding: .3rem; z-index: 70; }
.hs-user .hs-dd a, .hs-user .hs-dd button { display: flex; align-items: center; gap: .55rem; width: 100%; text-align: right; background: transparent; border: 0; font: inherit; font-size: .88rem; color: #333; padding: .45rem .6rem; border-radius: var(--radius-sm); cursor: pointer; }
.hs-user .hs-dd a svg, .hs-user .hs-dd button svg { color: #8a8a8a; }
.hs-user .hs-dd a:hover, .hs-user .hs-dd button:hover { background: #f4f4f4; text-decoration: none; }
.hs-bell { background: transparent; border: 0; color: #cd2828; cursor: pointer; font-size: 1.35rem; padding: .3rem .35rem; border-radius: 4px; display: inline-flex; position: relative; line-height: 1; }
.hs-bell:hover { background: #f4f4f4; text-decoration: none; }
.hs-bell .dot { position: absolute; top: -2px; left: -4px; min-width: 17px; height: 17px; border-radius: 9px; background: var(--danger); color: #fff; font-size: .66rem; font-weight: 700; line-height: 17px; text-align: center; padding: 0 4px; font-family: Arial, sans-serif; }
.hs-bell.quiet { color: #8a8a8a; }
.hs-mail { color: #c0392b; font-size: 1.35rem; display: inline-flex; padding: .3rem .35rem; border-radius: 4px; line-height: 1; }
.hs-mail:hover { background: #f4f4f4; }
.hs-search { margin-right: auto; display: flex; align-items: stretch; gap: 0; max-width: 780px; flex: 1 1 360px; min-width: 0; height: var(--topbar-h); border-left: 1px solid #e8e8e8; border-right: 1px solid #e8e8e8; }
.hs-search select { font: inherit; font-size: .85rem; border: 0; background: #fff; padding: 0 .9rem; color: #333; max-width: 150px; cursor: pointer; }
.hs-search .sep { width: 1px; background: #e8e8e8; margin: .8rem 0; }
.hs-search input { font: inherit; font-size: .82rem; border: 0; padding: 0 .8rem; flex: 1; min-width: 0; outline: none; color: #333; text-align: right; }
.hs-search input::placeholder { color: #9a9a9a; }
.hs-search button { background: var(--link-blue); color: #fff; border: 0; width: 48px; flex: 0 0 48px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem; }
.hs-search button:hover { background: #1560c4; }
.hs-side { grid-area: side; background: #fff; border-left: 1px solid #e6e6e6; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.hs-side .hs-logo { text-align: center; padding: .55rem .6rem .35rem; height: var(--topbar-h); display: flex; align-items: center; justify-content: center; }
.hs-side .hs-logo img { height: 40px; width: auto; }
.hs-side .hs-logo .name, .hs-side .hs-logo .tag { display: none; }
.hs-menu { list-style: none; margin: .9rem 0 0; padding: 0; }
.hs-menu li a, .hs-menu li button { display: flex; align-items: center; gap: .8rem; padding: .62rem 1.35rem .62rem 1rem; color: #3a3a3a; font-size: .86rem; border: 0; background: transparent; width: 100%; text-align: right; font: inherit; cursor: pointer; line-height: 1.5; }
.hs-menu li a svg, .hs-menu li button svg { color: #6d6d6d; font-size: 1.15rem; width: 1.15em; height: 1.15em; }
.hs-menu li a:hover, .hs-menu li button:hover { background: #f7f7f7; text-decoration: none; color: #000; }
.hs-menu li a.active { font-weight: 700; color: #000; }
.hs-menu li a.active svg { color: #444; }
.hs-menu li .chev { margin-right: auto; font-size: .7rem; color: #999; transition: transform .15s; }
.hs-menu li.open .chev { transform: rotate(180deg); }
.hs-menu li ul { list-style: none; margin: 0; padding: 0 0 .2rem; background: #fafafa; display: none; }
.hs-menu li.open ul { display: block; }
.hs-menu li ul li a { padding: .4rem 3.1rem .4rem 1rem; font-size: .8rem; }
.hs-menu li ul li a.active { font-weight: 700; }
.hs-menu .cnt { margin-right: auto; background: var(--danger); color: #fff; font-size: .66rem; font-weight: 700; border-radius: 3px; padding: 0 .35rem; line-height: 1.5; font-family: Arial, sans-serif; }
.hs-ask { display: flex; align-items: center; justify-content: center; gap: .45rem; margin: 1rem .9rem .6rem; background: var(--link-blue); color: #fff; text-align: center; padding: .48rem .6rem; border-radius: 4px; font-weight: 700; font-size: .86rem; box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.hs-ask:hover { background: #1560c4; text-decoration: none; color: #fff; }
.hs-ask svg { font-size: 1rem; }
.hs-side .hs-side-foot { margin-top: auto; padding: .7rem 1rem; color: #9a9a9a; font-size: .68rem; text-align: center; }
.hs-foot { grid-area: foot; text-align: center; color: #8a8a8a; font-size: .74rem; padding: .8rem 1rem 1rem; font-family: Arial, Helvetica, sans-serif; }
.hs-foot .ar { font-family: var(--font); }
.hs-backdrop { display: none; }
@media (max-width: 900px) {
  body.hs-app { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "main" "foot"; }
  .hs-top { padding: 0 .6rem; }
  .hs-top .hs-menu-btn { display: inline-flex; }
  .hs-top .hs-brand { display: inline-flex; }
  .hs-side { position: fixed; top: 0; right: 0; bottom: 0; width: min(84vw, 280px); height: auto; transform: translateX(100%); transition: transform .2s ease-out; z-index: 65; box-shadow: var(--shadow-lg); }
  .hs-side.open { transform: none; }
  .hs-side .hs-logo { border-bottom: 1px solid #eee; }
  .hs-backdrop.open { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 62; }
  .hs-search { display: none; }
  .hs-mail { display: none; }
  .hs-user .who .name { display: none; }
  .hs-user .who .caret { display: none; }
}
@media (max-width: 600px) { .hs-user .avatar { width: 32px; height: 32px; } }


/* ---------- utilities (CSP style-src 'self': pages use classes, never style="") ---------- */
.w-auto { width: auto; display: inline-block; padding: .2rem .4rem; }
.p-2 { padding: .5rem; }
.mt14 { margin-top: 14px; }
.mt-3 { margin-top: .8rem; }
.min-w-0 { min-width: 0; }
.gap-1 { gap: .25rem; }
.cell-wide { max-width: 260px; }
.field.tight { margin: .4rem 0 .3rem; }
.select.inline-sm { width: auto; display: inline-block; padding: .15rem .4rem; font-size: .8rem; }
.pf-box { max-height: 170px; border: 1px solid var(--border); border-radius: 6px; padding: .3rem; margin-top: .3rem; }
.pre-out { background: var(--navy); color: #e8eef5; padding: .7rem; border-radius: 6px; max-height: 420px; overflow: auto; font-size: .8rem; direction: ltr; text-align: left; min-height: 120px; margin: 0; }
.sidebar-section.flat { border-bottom: 0; padding-bottom: .25rem; }
.dim { opacity: .45; }

/* ---------- التقارير page ---------- */
.rp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .8rem; }
.rp-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.rp-card h3 { display: flex; align-items: center; gap: .5rem; margin: 0; }
.rp-card h3 svg { color: var(--green); font-size: 1.2rem; }
.rp-card p { color: var(--muted); font-size: .82rem; margin: 0; flex: 1; }
.rp-card .acts { display: flex; gap: .4rem; flex-wrap: wrap; }

/* ---------- الادارة page: section tabs, targets grid, settings key/values, scheduler, dormant ---------- */
.ad-tabs { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: .9rem; }
.ad-tabs a { background: #fff; border: 1px solid var(--border-strong); border-radius: 4px; padding: .25rem .8rem; font-size: .84rem; color: #444; }
.ad-tabs a.active { background: #555; color: #fff; border-color: #555; }
.ad-tabs a:hover { text-decoration: none; background: #f4f4f4; }
.ad-tabs a.active:hover { background: #444; }
section.card[id] { scroll-margin-top: calc(var(--topbar-h) + 10px); }
table.targets td.cell { cursor: pointer; direction: ltr; text-align: right; font-variant-numeric: tabular-nums; min-width: 110px; }
table.targets td.cell:hover { background: #f2f8f3; }
table.targets td.cell.stored { color: var(--green); font-weight: 700; }
table.targets td.cell.registry { color: #777; }
table.targets td.cell.none { color: #bbb; }
table.targets td.cell input { width: 120px; font: inherit; font-size: .86rem; padding: .15rem .4rem; border: 1px solid var(--green); border-radius: 4px; direction: ltr; text-align: right; outline: none; }
table.targets td.cell.saving { opacity: .55; }
table.targets th.month { direction: ltr; text-align: right; }
table.targets th.month.cur { color: #fff; background: var(--green); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1rem; font-size: .86rem; align-items: baseline; }
.kv dt { color: #666; margin: 0; }
.kv dd { margin: 0; direction: ltr; text-align: left; font-family: var(--mono); font-size: .82rem; word-break: break-all; }
.kv dd.ar { direction: rtl; text-align: right; font-family: var(--font); font-size: .86rem; }
.sched .lastErr { color: var(--danger); font-size: .78rem; white-space: normal; max-width: 320px; }
.dormant-legend { font-size: .8rem; color: #666; margin-bottom: .5rem; }
@media (max-width: 800px) { .kv { grid-template-columns: 1fr; } .kv dd { text-align: right; } }

/* ---------- old top bar (placeholder pages) ---------- */
.topbar { background: #fff; color: var(--navy); height: var(--topbar-h); position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--border); }
.topbar-inner { max-width: 1400px; margin: 0 auto; height: 100%; display: flex; align-items: center; gap: 1rem; padding: 0 1rem; }
.brand { color: var(--navy); font-weight: 700; font-size: 1.1rem; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: .15rem; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav a { color: #444; padding: .4rem .7rem; border-radius: var(--radius-sm); white-space: nowrap; font-size: .9rem; }
.nav a.active { color: var(--navy); font-weight: 700; }
.user-chip { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.menu-btn { display: none; background: #fff; border: 1px solid var(--border-strong); color: var(--navy); border-radius: var(--radius-sm); padding: .3rem .55rem; cursor: pointer; font-size: 1.05rem; }

/* ---------- page / cards ---------- */
.page { max-width: 1400px; margin: 0 auto; padding: 1rem; width: 100%; }
.page.narrow { max-width: 760px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: .8rem; flex-wrap: wrap; margin-bottom: .9rem; }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--muted); font-size: .82rem; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: .9rem 1rem; margin-bottom: 1rem; min-width: 0; }
.card-title { font-size: .98rem; font-weight: 700; color: var(--navy); margin: 0 0 .6rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.card-title .spacer { flex: 1; }
.card-sub { color: var(--muted); font-size: .82rem; margin-top: -.4rem; margin-bottom: .6rem; }
.filters { display: flex; align-items: flex-end; gap: .5rem; flex-wrap: wrap; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem .8rem; margin-bottom: .9rem; }
.filters .field { margin: 0; min-width: 140px; }
.filters .select, .filters .input { padding: .35rem .5rem; font-size: .85rem; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.kpi { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem .9rem; box-shadow: var(--shadow); min-width: 0; }
.kpi .value { font-size: 1.35rem; font-weight: 700; direction: ltr; unicode-bidi: embed; text-align: right; line-height: 1.25; color: var(--green); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .value small { font-size: .7rem; font-weight: 400; color: var(--muted); margin-left: .25rem; }
.kpi .label { color: var(--muted); font-size: .8rem; margin-top: .15rem; }
.kpi .delta { font-size: .8rem; margin-top: .2rem; }
.kpi.danger .value { color: var(--danger); } .kpi.warn .value { color: var(--warn); } .kpi.info .value { color: var(--link-blue); } .kpi.plain .value { color: var(--navy); }
/* Hassel gradient KPI cards (المؤشرات): icon, big number, caption, small badge */
/* the small badge has its own band above the number (padding-top), so it never overlaps the digits; long values (≥ 9 digits)
   get a smaller size and the number scales with the viewport instead of being cut with an ellipsis (fixer, round 2) */
.kpi-grad { position: relative; color: #fff; border: 0; border-radius: 6px; padding: 2.15rem 1rem .8rem; min-height: 108px; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); overflow: hidden; }
.kpi-grad.g1 { background: linear-gradient(135deg, #e53935, #fb8c00); }
.kpi-grad.g2 { background: linear-gradient(135deg, #9ccc65, #2e7d32); }
.kpi-grad.g3 { background: linear-gradient(135deg, #43a047, #00897b); }
.kpi-grad.g4 { background: linear-gradient(135deg, #ec407a, #8e24aa); }
.kpi-grad.g5 { background: linear-gradient(135deg, #1e88e5, #0b1754); }
.kpi-grad.g6 { background: linear-gradient(135deg, #fb8c00, #f4511e); }
.kpi-grad .value { color: #fff; font-size: clamp(1.05rem, 1.45vw, 1.5rem); font-weight: 700; direction: ltr; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.kpi-grad .value.long { font-size: clamp(.95rem, 1.15vw, 1.25rem); }
@media (max-width: 900px) { .kpi-grad .value, .kpi-grad .value.long { font-size: 1.4rem; } }
.kpi-grad .value small { color: rgba(255, 255, 255, .85); font-size: .7rem; margin-left: .25rem; }
.kpi-grad .label { color: rgba(255, 255, 255, .92); font-size: .82rem; }
.kpi-grad .badge { position: absolute; top: .6rem; left: .6rem; background: rgba(255, 255, 255, .22); color: #fff; border: 1px solid rgba(255, 255, 255, .4); font-size: .7rem; }
.kpi-grad .ico-bg { position: absolute; left: .7rem; bottom: .4rem; font-size: 2.6rem; opacity: .22; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; max-width: 100%; }
/* admin users table: the e-mail column may break inside the address on phone width instead of being cut at the edge */
#usersTable td:nth-child(3) { white-space: normal; word-break: break-all; direction: ltr; text-align: right; max-width: 180px; }
table.data { width: 100%; border-collapse: collapse; font-size: .86rem; min-width: 480px; }
table.data th, table.data td { padding: .45rem .6rem; border-bottom: 1px solid #ececec; text-align: right; white-space: nowrap; }
table.data th { background: var(--navy); color: #fff; font-weight: 700; position: sticky; top: 0; font-size: .82rem; }
table.data.plain th { background: #fafafa; color: #555; font-weight: 700; border-bottom: 1px solid var(--border); }
table.data tbody tr:nth-child(even) { background: #fafafa; }
table.data tbody tr:hover { background: #f2f8f3; }
table.data td.num, table.data th.num { direction: ltr; text-align: right; font-variant-numeric: tabular-nums; }
table.data td.money { color: var(--green); font-weight: 700; }
table.data tr.total td { font-weight: 700; background: #f2f2f2; }
table.data th.sortable { cursor: pointer; user-select: none; }
table.data th.sortable::after { content: " ↕"; opacity: .6; font-size: .75rem; }
table.data th.sorted-asc::after { content: " ↑"; opacity: 1; } table.data th.sorted-desc::after { content: " ↓"; opacity: 1; }

/* ---------- buttons / inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; background: #fff; color: var(--text); border: 1px solid var(--border-strong); padding: .35rem .8rem; border-radius: var(--radius); cursor: pointer; font: inherit; font-size: .88rem; line-height: 1.5; transition: background .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover { background: #f4f4f4; text-decoration: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--green); border-color: var(--green); color: #fff; font-size: 15px; padding: .3rem .9rem; }
.btn-primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn-blue { background: var(--link-blue); border-color: var(--link-blue); color: #fff; }
.btn-blue:hover { background: #1560c4; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #a92020; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--link-blue); }
.btn-ghost:hover { background: var(--info-soft); }
.btn-outline { background: #fff; border-color: var(--green); color: var(--green-dark); }
.btn-outline:hover { background: var(--green-soft); }
.btn-outline.blue { border-color: var(--link-blue); color: var(--link-blue); }
.btn-outline.blue:hover { background: var(--info-soft); }
.btn-sm { padding: .2rem .55rem; font-size: .8rem; }
.btn-block { width: 100%; }
.input, .select, .textarea { width: 100%; font: inherit; font-size: .9rem; color: var(--text); background: #fff; border: 1px solid var(--border-strong); border-radius: var(--radius); padding: .42rem .6rem; outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(12, 159, 36, .16); }
.input.ltr { direction: ltr; text-align: left; }
.input.code { letter-spacing: .45em; font-size: 1.4rem; text-align: center; direction: ltr; font-family: var(--mono); }
.field { margin-bottom: .8rem; }
.field label { display: block; font-size: .85rem; font-weight: 700; margin-bottom: .3rem; color: #444; }
.field .hint { font-size: .78rem; color: var(--muted); margin-top: .25rem; }
.check { display: flex; align-items: center; gap: .45rem; font-size: .88rem; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--green); }
.badge { display: inline-block; padding: .08rem .55rem; border-radius: 999px; font-size: .76rem; font-weight: 700; background: #f0f0f0; color: var(--muted); border: 1px solid var(--border); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--green-dark); border-color: #bfe5c7; }
.badge.warn { background: var(--warn-soft); color: #9a5b00; border-color: #f2cfa5; }
.badge.danger { background: var(--danger-soft); color: var(--danger); border-color: #f0b6b6; }
.badge.info { background: var(--info-soft); color: var(--link-blue); border-color: #b9cfe9; }
.status-ontrack { color: var(--green); } .status-atrisk { color: var(--warn); } .status-offtrack { color: var(--danger); }
.progress { height: 8px; background: #e6e6e6; border-radius: 999px; overflow: hidden; direction: ltr; }
.progress > .bar { height: 100%; background: var(--green); width: 0; transition: width .4s; }
.progress > .bar.warn { background: var(--warn); } .progress > .bar.danger { background: var(--danger); }
.alert { padding: .55rem .8rem; border-radius: var(--radius); border: 1px solid; font-size: .88rem; margin-bottom: .75rem; }
.alert.error { background: var(--danger-soft); border-color: #f0b6b6; color: var(--danger); }
.alert.ok { background: var(--ok-soft); border-color: #bfe5c7; color: var(--green-dark); }
.alert.info { background: var(--info-soft); border-color: #b9cfe9; color: #1a4f9c; }
.alert.warn { background: var(--warn-soft); border-color: #f2cfa5; color: #8a4f12; }
.tabs { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: .6rem; }
.tabs button { background: #fff; border: 1px solid var(--border-strong); border-radius: 999px; padding: .2rem .7rem; cursor: pointer; font: inherit; font-size: .8rem; color: #444; }
.tabs button.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- toasts / spinner ---------- */
.toast-host { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: .5rem; align-items: center; pointer-events: none; }
.toast { background: var(--navy); color: #fff; padding: .5rem 1rem; border-radius: var(--radius); box-shadow: var(--shadow-lg); font-size: .88rem; max-width: 90vw; animation: toast-in .2s ease-out; pointer-events: auto; }
.toast.error { background: var(--danger); } .toast.ok { background: var(--green); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(0, 0, 0, .15); border-top-color: var(--green); border-radius: 50%; animation: spin .7s linear infinite; vertical-align: middle; }
.spinner.light { border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
/* centre-screen data loader (PA.loading): frosted backdrop + white card + double green ring; never blocks the page */
.pa-loading { position: fixed; inset: 0; z-index: 150; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .55); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); pointer-events: none; animation: pa-fade .18s ease-out; }
.pa-loading[hidden] { display: none; }
.pa-loading-card { background: #fff; border-radius: 14px; box-shadow: 0 10px 40px rgba(0, 0, 0, .18), 0 0 0 1px rgba(0, 0, 0, .04); padding: 1.5rem 2.2rem 1.25rem; min-width: 210px; text-align: center; }
.pa-ring { position: relative; width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; border: 5px solid #e9ecef; border-top-color: var(--green); animation: spin .85s cubic-bezier(.45, .1, .55, .9) infinite; }
.pa-ring-inner { position: absolute; inset: 7px; border-radius: 50%; border: 4px solid transparent; border-bottom-color: var(--green-dark, #117b22); animation: spin 1.3s linear infinite reverse; }
.pa-loading-text { margin-top: .85rem; color: #444; font-size: .92rem; font-weight: 700; letter-spacing: .01em; }
@keyframes pa-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pa-ring, .pa-ring-inner { animation-duration: 2s; } .pa-loading { animation: none; } }
.skeleton { background: linear-gradient(90deg, #eee 25%, #e4e4e4 37%, #eee 63%); background-size: 400% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius-sm); min-height: 1em; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ---------- modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; padding: 1.1rem 1.2rem; }
.modal h2 { margin-bottom: .8rem; }
.modal .actions { display: flex; gap: .5rem; justify-content: flex-start; margin-top: 1rem; }

/* ---------- login = replica of حصّل loginx.aspx: looping video, right rgba(0,0,0,.5) 400 px panel, white borderless inputs, black دخول ---------- */
body.login-body { background: #0b1220; margin: 0; padding: 0; overflow: hidden; }
.login-bg { position: fixed; inset: 0; background: radial-gradient(1200px 600px at 20% 10%, rgba(22, 47, 168, .55), transparent 60%), radial-gradient(900px 500px at 80% 90%, rgba(12, 159, 36, .35), transparent 60%), linear-gradient(160deg, #0b1754 0%, #0a1230 55%, #04070f 100%); }
#myVideo { position: fixed; right: 0; bottom: 0; min-width: 100%; min-height: 100%; width: auto; height: auto; object-fit: cover; }
.login-panel { position: fixed; top: 0; right: 0; bottom: 0; height: 100%; width: 400px; max-width: 100vw; background: rgba(0, 0, 0, .5); color: #f1f1f1; padding: 30px; overflow-y: auto; font-family: var(--font); }
.login-panel .inner { padding: 35px 25px 20px; text-align: right; }
.login-panel h1 { color: #fff; font-size: 2em; font-weight: 700; margin: .67em 0; line-height: 1.3; }
.login-panel .intro { color: #f1f1f1; font-size: .92rem; line-height: 1.8; margin: 0 0 .6rem; }
.login-row { display: flex; align-items: center; gap: 11px; border-bottom: 1px solid #ddd; padding: 9px 0 6px; margin-top: 21px; margin-bottom: 25px; }
.login-row svg.ico { font-size: 25px; width: 1em; height: 1em; color: #fff; fill: currentColor; stroke: none; flex: 0 0 auto; }
.login-row input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: #fff; font: inherit; font-size: 21px; text-align: right; padding: 0; }
.login-row input::placeholder { color: #cfcfcf; font-size: 19px; }
.login-row input.ltr { text-align: left; }
.login-row input:-webkit-autofill, .login-row input:-webkit-autofill:focus { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 40px rgba(0, 0, 0, 0) inset; transition: background-color 9999s ease-in-out 0s; }
.login-btn { width: 100%; display: block; font-family: var(--font); font-size: 18px; padding: 10px; border: 0; background: #000; color: #fff; cursor: pointer; }
.login-btn:hover { background: #ddd; color: #000; }
.login-btn:disabled { opacity: .6; cursor: not-allowed; }
.login-err { display: none; margin-top: 9px; font-size: 15px; background: #cd2828; color: #fff; padding: 3px 5px; border-radius: 5px; }
.login-err.show { display: inline-block; }
.login-note { margin-top: .8rem; font-size: .82rem; background: rgba(255, 193, 7, .18); border: 1px solid rgba(255, 193, 7, .5); color: #ffe082; padding: .4rem .6rem; border-radius: 5px; }
.login-panel .links { display: flex; gap: 1rem; margin-top: 19px; font-size: 15px; }
.login-panel .links button { background: transparent; border: 0; color: #fff; font: inherit; font-size: 12px; cursor: pointer; text-decoration: none; padding: 0; }
.login-panel .links button:hover { text-decoration: underline; }
.login-panel .links button:disabled { opacity: .6; cursor: not-allowed; text-decoration: none; }
.login-panel .check { color: #eee; margin-top: .3rem; font-size: .85rem; }
.login-panel .check input { accent-color: #fff; }
.login-panel .otp-hint { color: #f1f1f1; font-size: .92rem; margin-bottom: .4rem; }
.login-panel .foot-line { margin-top: 19px; font-size: 12px; color: #fff; }
/* owner (28 Sep 2026): no logo/tagline/copyright block on the login page — only the video and the panel */
@media (max-width: 760px) {
  body.login-body { overflow: auto; min-height: 100vh; }
  .login-panel { position: absolute; bottom: auto; height: auto; min-height: 100vh; width: 100vw; padding: 24px 12px; display: flex; flex-direction: column; }
  .login-panel .inner { padding: 20px 14px 10px; }
}

/* ---------- home card (Hassel Default.aspx: افضل محصل لشهر + today's number with the green arrow + carousel dots) ---------- */
.home-card { background: #fff; border: 1px solid #e6e6e6; border-radius: 3px; margin: 1rem 1rem 0; padding: 1.2rem 1.4rem 1rem; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.hc-row { display: flex; align-items: flex-start; gap: 1.2rem; }
.hc-photo { width: 140px; height: 140px; border-radius: 6px; background: #eef1f6; border: 1px solid #dde2ea; display: flex; align-items: center; justify-content: center; color: #9aa4b5; flex: 0 0 auto; overflow: hidden; }
.hc-photo svg { width: 70%; height: 70%; }
.hc-text { flex: 1 1 auto; min-width: 0; padding-top: 1.4rem; }
.hc-text h2 { font-size: 1.35rem; color: #111; margin: 0 0 .45rem; }
.hc-sub { font-size: 1rem; color: #333; }
.hc-sub b { font-family: Arial, Helvetica, sans-serif; }
.hc-mtd { margin-top: .4rem; }
.hc-number { flex: 0 0 auto; text-align: left; direction: ltr; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; max-width: 40%; }
.hc-number .num { font-family: Arial, Helvetica, sans-serif; font-size: 2rem; color: #444; font-weight: 400; line-height: 1.1; white-space: nowrap; }
.hc-number .hc-cap { width: 100%; font-size: .78rem; color: #8a8a8a; text-align: left; }
.hc-arrow { color: var(--green); font-size: 1.1rem; display: inline-flex; }
.hc-arrow.down { color: var(--danger); transform: rotate(180deg); }
.hc-arrow.flat { color: #b5b5b5; }
.hc-dots { display: flex; justify-content: center; gap: .5rem; margin-top: 1.3rem; }
.hc-dots button { width: 44px; height: 6px; border-radius: 2px; border: 0; background: #d5d5d5; cursor: pointer; padding: 0; }
.hc-dots button.active { background: #222; }
.hc-dots button:hover { background: #999; }
.hc-note { margin-top: .6rem; }
@media (max-width: 860px) {
  .home-card { margin: .6rem .6rem 0; padding: .9rem; }
  .hc-row { flex-wrap: wrap; }
  .hc-photo { width: 84px; height: 84px; }
  .hc-text { padding-top: 0; flex-basis: calc(100% - 84px - 1.2rem); }
  .hc-number { max-width: 100%; width: 100%; justify-content: flex-end; }
  .hc-number .num { font-size: 1.7rem; }
}

/* ---------- chat layout ---------- */
.layout { display: flex; height: calc(100vh - var(--topbar-h)); overflow: hidden; }
.sidebar { width: 280px; flex: 0 0 280px; background: #fff; border-left: 1px solid var(--border); display: flex; flex-direction: column; overflow: hidden; }
.sidebar-section { padding: .7rem .8rem; border-bottom: 1px solid var(--border); }
.sidebar-section h3 { font-size: .82rem; color: var(--muted); margin-bottom: .45rem; display: flex; align-items: center; justify-content: space-between; }
.conv-list { flex: 1; overflow-y: auto; padding: .35rem .5rem; }
.conv-item { display: flex; align-items: center; gap: .3rem; padding: .4rem .55rem; border-radius: var(--radius-sm); cursor: pointer; font-size: .86rem; color: var(--text); }
.conv-item:hover { background: #f4f4f4; }
.conv-item.active { background: var(--green-soft); color: var(--green-dark); font-weight: 700; }
.conv-item .title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-item .icon-btn { opacity: 0; }
.conv-item:hover .icon-btn, .conv-item.active .icon-btn { opacity: 1; }
.icon-btn { background: transparent; border: 0; cursor: pointer; color: var(--muted); padding: .15rem .3rem; border-radius: 4px; font-size: .9rem; line-height: 1; display: inline-flex; align-items: center; }
.icon-btn:hover { background: #e9e9e9; color: var(--text); }
.sidebar-foot { padding: .6rem .8rem; border-top: 1px solid var(--border); font-size: .82rem; color: var(--muted); }
.portfolio-list { display: flex; flex-direction: column; gap: .2rem; max-height: 200px; overflow-y: auto; }
.portfolio-item { display: flex; align-items: center; justify-content: space-between; gap: .4rem; padding: .3rem .5rem; border-radius: var(--radius-sm); cursor: pointer; font-size: .85rem; border: 1px solid transparent; }
.portfolio-item:hover { background: #f4f4f4; }
.portfolio-item.selected { background: var(--green-soft); border-color: #bfe5c7; color: var(--green-dark); font-weight: 700; }
.portfolio-item .client { color: var(--muted); font-size: .75rem; font-weight: 400; }
.chat { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-bar { display: none; align-items: center; gap: .5rem; padding: .4rem .7rem; background: #fff; border-bottom: 1px solid var(--border); font-size: .85rem; }
.messages { flex: 1; overflow-y: auto; padding: 1rem; scroll-behavior: smooth; }
.messages-inner { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: .9rem; }
.empty-state { text-align: center; color: var(--muted); padding: 3rem 1rem; }
.empty-state h2 { color: var(--navy); }
.msg { display: flex; flex-direction: column; gap: .3rem; max-width: 100%; }
.msg .bubble { border-radius: 8px; padding: .7rem .95rem; box-shadow: var(--shadow); word-wrap: break-word; overflow-wrap: anywhere; }
.msg.user { align-items: flex-start; }
.msg.user .bubble { background: var(--navy); color: #fff; border-bottom-right-radius: 3px; max-width: 85%; white-space: pre-wrap; }
.msg.assistant { align-items: stretch; }
.msg.assistant .bubble { background: #fff; border: 1px solid var(--border); border-bottom-left-radius: 3px; }
.msg .meta { font-size: .74rem; color: var(--muted); display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.msg.user .meta { padding-right: .2rem; }
.md { line-height: 1.75; }
.md > :first-child { margin-top: 0; } .md > :last-child { margin-bottom: 0; }
.md p { margin: .35rem 0 .6rem; }
.md h1, .md h2, .md h3, .md h4 { margin: .8rem 0 .4rem; color: var(--navy); }
.md h1 { font-size: 1.15rem; } .md h2 { font-size: 1.05rem; } .md h3 { font-size: .98rem; }
.md ul, .md ol { padding-right: 1.4rem; padding-left: 0; margin: .3rem 0 .6rem; }
.md li { margin: .15rem 0; }
.md code { font-family: var(--mono); background: #f2f2f2; padding: .05rem .3rem; border-radius: 4px; font-size: .88em; direction: ltr; unicode-bidi: embed; }
.md pre { background: var(--navy); color: #e8eef5; padding: .7rem .9rem; border-radius: var(--radius); overflow-x: auto; direction: ltr; text-align: left; font-size: .85rem; }
.md pre code { background: transparent; color: inherit; padding: 0; }
.md blockquote { border-right: 3px solid var(--green); margin: .5rem 0; padding: .2rem .8rem; color: var(--muted); }
.md hr { border: 0; border-top: 1px solid var(--border); margin: .8rem 0; }
.md table { border-collapse: collapse; margin: .5rem 0 .8rem; font-size: .86rem; display: block; overflow-x: auto; max-width: 100%; }
.md th, .md td { border: 1px solid var(--border); padding: .3rem .55rem; text-align: right; white-space: nowrap; }
.md th { background: var(--navy); color: #fff; font-weight: 700; }
.md tr:nth-child(even) td { background: #fafafa; }
.md a { color: var(--link-blue); text-decoration: underline; }
.md strong { color: var(--navy); }
.cursor::after { content: "▍"; color: var(--green); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.tool-chips { display: flex; gap: .35rem; flex-wrap: wrap; }
.tool-chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .76rem; padding: .15rem .6rem; border-radius: 999px; background: var(--info-soft); color: var(--link-blue); border: 1px solid #b9cfe9; }
.tool-chip.start .spinner { width: 11px; height: 11px; border-width: 2px; }
.tool-chip.done { background: var(--ok-soft); color: var(--green-dark); border-color: #bfe5c7; }
.tool-chip.error { background: var(--danger-soft); color: var(--danger); border-color: #f0b6b6; }
.tool-chip .headline { color: var(--muted); font-weight: 400; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-cards { display: flex; gap: .5rem; flex-wrap: wrap; }
.file-card { display: inline-flex; align-items: center; gap: .55rem; padding: .4rem .75rem; border: 1px solid #bfe5c7; background: var(--ok-soft); border-radius: var(--radius); color: var(--green-dark); font-size: .86rem; }
.file-card:hover { background: #d4ecdc; text-decoration: none; }
.file-card .ico { font-size: 1.1rem; display: inline-flex; }
.usage-line { font-size: .74rem; color: var(--muted); direction: rtl; }
.composer-wrap { border-top: 1px solid var(--border); background: #fff; padding: .6rem 1rem .8rem; }
.composer-inner { max-width: 900px; margin: 0 auto; }
.chips { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .45rem; scrollbar-width: thin; }
.chip { flex: 0 0 auto; background: #fff; border: 1px solid var(--border-strong); border-radius: 999px; padding: .25rem .75rem; font-size: .8rem; cursor: pointer; color: var(--navy); white-space: nowrap; font: inherit; }
.chip:hover { background: var(--green-soft); border-color: var(--green); }
.composer { display: flex; align-items: flex-end; gap: .5rem; border: 1px solid var(--border-strong); border-radius: 8px; padding: .4rem .5rem .4rem .6rem; background: #fff; transition: border-color .15s, box-shadow .15s; }
.composer:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(12, 159, 36, .14); }
.composer textarea { flex: 1; border: 0; outline: none; resize: none; font: inherit; font-size: .95rem; max-height: 180px; min-height: 24px; padding: .35rem .2rem; background: transparent; line-height: 1.5; }
.send-btn { background: var(--green); color: #fff; border: 0; border-radius: 6px; width: 42px; height: 40px; cursor: pointer; font-size: 1.15rem; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.send-btn:hover { background: var(--green-dark); }
.send-btn:disabled { opacity: .5; cursor: not-allowed; }
.send-btn.stop { background: var(--danger); }
.composer-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .4rem; font-size: .78rem; color: var(--muted); flex-wrap: wrap; }
.toggle { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; user-select: none; }
.toggle input { display: none; }
.toggle .track { width: 34px; height: 18px; border-radius: 999px; background: #c9c9c9; position: relative; transition: background .15s; }
.toggle .track::after { content: ""; position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle input:checked + .track { background: var(--warn); }
.toggle input:checked + .track::after { transform: translateX(-16px); }
.toggle .lbl { font-weight: 700; color: var(--text); }
.deep-note { background: var(--warn-soft); border: 1px solid #f2cfa5; color: #8a4f12; padding: .3rem .6rem; border-radius: var(--radius); font-size: .78rem; }
.sidebar-backdrop { display: none; }
@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  .chat-bar { display: flex; }
  .layout { height: calc(100vh - var(--topbar-h)); height: calc(100dvh - var(--topbar-h)); }
  .sidebar { position: fixed; top: var(--topbar-h); right: 0; bottom: 0; width: min(84vw, 320px); transform: translateX(100%); transition: transform .2s ease-out; z-index: 60; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .sidebar-backdrop.open { display: block; position: fixed; inset: var(--topbar-h) 0 0 0; background: rgba(0, 0, 0, .35); z-index: 55; }
  .messages { padding: .7rem; }
  .msg.user .bubble { max-width: 92%; }
  .composer-wrap { padding: .5rem .6rem .6rem; }
  .kpi .value { font-size: 1.2rem; }
  .page { padding: .75rem; }
  table.data { min-width: 0; }
}
@media print { .hs-top, .hs-side, .hs-foot, .topbar, .sidebar, .composer-wrap, .toast-host { display: none !important; } body.hs-app { display: block; } .layout { height: auto; } .messages { overflow: visible; } }

/* ---- النظام الجديد (tahseel1): «؟» help tips (PA.help / DB.help), system badge, unavailable cells, balances time ----------
   The explanation lives only in data-tip and is shown by CSS on hover and on keyboard focus (strict CSP: no inline
   handler, no inline style). Owner rule: explanations behind a «؟», never as inline text. */
.help-tip { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 1.15em; height: 1.15em; margin-inline-start: .3em; border-radius: 50%; background: var(--info-soft); color: var(--navy); border: 1px solid #b9cfe9; font-size: .78em; font-weight: 700; line-height: 1; cursor: help; vertical-align: middle; user-select: none; text-decoration: none; }
.help-tip:hover, .help-tip:focus { background: var(--navy); color: #fff; border-color: var(--navy); outline: none; }
.help-tip:hover::after, .help-tip:focus::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 7px); left: 50%; transform: translateX(-50%); z-index: 80; width: max-content; max-width: min(300px, 80vw); padding: .45rem .65rem; border-radius: 6px; background: #1f2a44; color: #fff; box-shadow: var(--shadow-lg); font-size: .78rem; font-weight: 400; line-height: 1.6; white-space: normal; text-align: start; direction: rtl; pointer-events: none; }
.help-tip:hover::before, .help-tip:focus::before { content: ""; position: absolute; bottom: calc(100% + 1px); left: 50%; transform: translateX(-50%); z-index: 81; border: 6px solid transparent; border-top-color: #1f2a44; border-bottom: 0; pointer-events: none; }
.sys-badge { display: inline-block; padding: .05rem .5rem; border-radius: 999px; background: var(--info-soft); color: var(--link-blue); border: 1px solid #b9cfe9; font-size: .74rem; font-weight: 700; white-space: nowrap; vertical-align: middle; }
.t1-na { color: var(--muted); font-weight: 600; font-size: .9em; }
.t1-asof { color: var(--muted); font-size: .78rem; white-space: nowrap; }
.t1-line { display: block; margin-top: .15rem; }
.t1-pending { display: block; margin-top: .15rem; color: #9a5b00; font-size: .76rem; font-weight: 600; white-space: nowrap; }
.lp-kpi .val.t1-na-val { overflow: visible; white-space: normal; direction: rtl; font-size: .85rem; color: var(--muted); }
