/* =====================================================================
   نظام التصميم — شريط الراتب (هوية وزارة الكهرباء)
   ===================================================================== */
:root {
  --navy-950: #041a33; --navy-900: #062a52; --navy: #07315d; --blue: #0c539e; --sky: #5b8eba; --sky-100: #e7f0f9;
  --slate: #4a576d; --red: #b82525; --red-2: #e61f2f; --red-50: #fdecee;
  --bg: #f1f4f9; --card: #ffffff; --ink: #0f2238; --muted: #5d6b7c; --line: #e2e8f0; --line-2: #cfd9e6;
  --ok: #0f8a5f; --ok-bg: #e3f6ee; --warn: #9a5b06; --warn-bg: #fff3d6; --err: #b42318; --err-bg: #feeceb;
  --r: 16px; --r-sm: 11px;
  --sh-1: 0 1px 2px rgba(7, 49, 93, .06), 0 4px 14px rgba(7, 49, 93, .06);
  --sh-2: 0 2px 4px rgba(7, 49, 93, .06), 0 18px 48px rgba(4, 26, 51, .16);
  --font: "Readex Pro", system-ui, "Segoe UI", Tahoma, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.75; font-size: 17px; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; }
p { margin: 0; }
button { font-family: inherit; }
.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.ltr { direction: ltr; unicode-bidi: plaintext; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: plaintext; white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.i { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -0.2em; }

/* ---------- أزرار ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px;
  border: 0; border-radius: 12px; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none !important;
  background: var(--navy); color: #fff; transition: transform .08s, box-shadow .2s, background .2s, filter .2s;
  box-shadow: 0 6px 16px rgba(7, 49, 93, .25);
}
.btn:hover { background: var(--blue); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn.red { background: var(--red); box-shadow: 0 6px 16px rgba(184, 37, 37, .28); }
.btn.red:hover { background: var(--red-2); }
.btn.ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--line-2); box-shadow: none; }
.btn.ghost:hover { background: var(--sky-100); border-color: var(--sky); }
.btn.light { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: none; border: 1px solid rgba(255, 255, 255, .28); backdrop-filter: blur(6px); }
.btn.light:hover { background: rgba(255, 255, 255, .24); }
.btn.danger { background: transparent; color: var(--err); border: 1.5px solid #f2c6c2; box-shadow: none; }
.btn.danger:hover { background: var(--err-bg); }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn.lg { min-height: 54px; font-size: 16.5px; padding: 0 30px; }
.btn .spin { width: 18px; height: 18px; border: 2.5px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- حقول ---------- */
.field { display: block; margin-top: 16px; }
.field > span { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; color: var(--ink); }
.field small { display: block; margin-top: 5px; color: var(--muted); font-size: 12.5px; }
.input, select.input {
  width: 100%; min-height: 50px; padding: 0 14px; font: inherit; font-size: 16px; color: var(--ink); background: var(--card);
  border: 1.5px solid var(--line-2); border-radius: 12px; transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(12, 83, 158, .14); }
.input::placeholder { color: #9aa8b8; }
.input-wrap { position: relative; }
.input-wrap .input { padding-left: 48px; padding-right: 14px; }
.input-wrap .toggle { position: absolute; top: 0; bottom: 0; left: 6px; width: 40px; border: 0; background: transparent; color: var(--muted); cursor: pointer; border-radius: 10px; }
.input-wrap .toggle:hover { color: var(--navy); background: var(--sky-100); }
.strength { display: flex; gap: 5px; margin-top: 8px; align-items: center; }
.strength b { flex: 1; height: 5px; border-radius: 4px; background: var(--line); transition: background .2s; }
.strength span { font-size: 12px; color: var(--muted); min-width: 52px; text-align: end; }
.strength[data-s="1"] b:nth-child(-n+1) { background: var(--red-2); }
.strength[data-s="2"] b:nth-child(-n+2) { background: #e08a00; }
.strength[data-s="3"] b:nth-child(-n+3) { background: #5aa300; }
.strength[data-s="4"] b:nth-child(-n+4) { background: var(--ok); }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; margin-top: 14px; }
.alert.err { background: var(--err-bg); color: var(--err); }
.alert.ok { background: var(--ok-bg); color: var(--ok); }
.alert.warn { background: var(--warn-bg); color: var(--warn); }
.alert.info { background: var(--sky-100); color: var(--navy); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--sky-100); color: var(--navy); }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.red { background: var(--red-50); color: var(--red); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-1); padding: 22px; }
.card + .card { margin-top: 18px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-h h3 { font-size: 17px; }

/* =====================================================================
   بوابة الموظف — الواجهة الافتتاحية
   ===================================================================== */
.hero { position: relative; overflow: hidden; color: #fff; isolation: isolate;
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(91, 142, 186, .55), transparent 60%),
    radial-gradient(700px 420px at 0% 100%, rgba(230, 31, 47, .22), transparent 60%),
    linear-gradient(160deg, var(--navy-950) 0%, var(--navy) 48%, #0b4382 100%);
  min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 54px 54px; mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%); }
.hero-lines { position: absolute; inset-inline: 0; bottom: 0; width: 100%; height: 300px; object-fit: cover; object-position: bottom; z-index: -1; pointer-events: none; }
.glow { position: absolute; z-index: -1; width: 520px; height: 520px; border-radius: 50%; filter: blur(70px); opacity: .35; pointer-events: none; animation: breathe 7s ease-in-out infinite; }
.glow.a { background: #2a7fd6; top: -160px; inset-inline-start: -120px; }
.glow.b { background: var(--red-2); bottom: -240px; inset-inline-end: 8%; opacity: .22; animation-delay: -3s; }
@keyframes breathe { 50% { transform: scale(1.12); opacity: .5; } }

.nav { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 0; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; color: inherit; }
.brand:hover { text-decoration: none; }
.brand .logo { width: 52px; height: 52px; border-radius: 14px; background: #fff; padding: 4px; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); flex: none; }
.brand b { display: block; font-size: 17px; line-height: 1.25; }
.brand small { display: block; font-size: 12.5px; opacity: .82; line-height: 1.35; }
.nav-actions { display: flex; gap: 8px; align-items: center; }

.hero-grid { flex: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding: 28px 0 150px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); font-size: 13.5px; font-weight: 700; }
.eyebrow .dot { color: #ff6671; box-shadow: 0 0 0 4px rgba(255, 102, 113, .25); }
.hero h1 { font-size: clamp(30px, 4.6vw, 50px); font-weight: 700; margin: 18px 0 14px; letter-spacing: -.5px; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #8fc3ff, #fff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: clamp(15.5px, 1.6vw, 18.5px); opacity: .9; max-width: 560px; }
.points { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 12px; }
.points li { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.points .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .2); font-size: 18px; flex: none; }

.auth { background: rgba(255, 255, 255, .98); color: var(--ink); border-radius: 22px; padding: 26px; box-shadow: var(--sh-2); position: relative; }
.auth::before { content: ""; position: absolute; inset-inline: 26px; top: 0; height: 4px; border-radius: 0 0 6px 6px; background: linear-gradient(90deg, var(--red-2), var(--red)); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); border-radius: 13px; padding: 5px; gap: 4px; margin-bottom: 8px; }
.tab { border: 0; background: transparent; padding: 11px 8px; border-radius: 10px; font-weight: 700; font-size: 15px; color: var(--muted); cursor: pointer; transition: .15s; }
.tab[aria-selected="true"] { background: var(--card); color: var(--navy); box-shadow: 0 2px 8px rgba(7, 49, 93, .14); }
.auth h2 { font-size: 21px; margin-top: 16px; }
.auth .sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.auth .foot { margin-top: 16px; text-align: center; font-size: 13.5px; color: var(--muted); }
.auth .foot a { font-weight: 700; cursor: pointer; }
.code-input { text-transform: uppercase; letter-spacing: 3px; font-weight: 700; text-align: center; direction: ltr; }

.section { padding: 76px 0; }
.section.alt { background: var(--card); }
.sec-h { text-align: center; max-width: 640px; margin: 0 auto 38px; }
.sec-h .tag { color: var(--red); font-weight: 800; font-size: 14px; }
.sec-h h2 { font-size: clamp(25px, 3.2vw, 34px); margin: 6px 0 8px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.step { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 28px 24px 24px; box-shadow: var(--sh-1); transition: transform .2s, box-shadow .2s; }
.step:hover { transform: translateY(-4px); box-shadow: var(--sh-2); }
.step .n { position: absolute; top: -18px; inset-inline-start: 22px; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-weight: 800; font-size: 19px; color: #fff; background: linear-gradient(135deg, var(--navy), var(--blue)); box-shadow: 0 8px 18px rgba(7, 49, 93, .3); }
.step h3 { font-size: 18px; margin: 8px 0 6px; }
.step p { color: var(--muted); font-size: 14.5px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feat { display: flex; gap: 14px; padding: 20px; border-radius: 18px; background: var(--bg); }
.feat .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: #fff; color: var(--blue); font-size: 22px; box-shadow: var(--sh-1); flex: none; }
.feat h4 { font-size: 16px; margin-bottom: 2px; }
.feat p { font-size: 13.8px; color: var(--muted); }
.faq { max-width: 780px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px 18px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 13px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; color: var(--blue); line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); padding-bottom: 14px; font-size: 14.5px; }

.footer { background: var(--navy-950); color: rgba(255, 255, 255, .8); padding: 34px 0; font-size: 14px; }
.footer .container { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.footer .brand .logo { width: 44px; height: 44px; }

/* ---------- لوحة الموظف بعد الدخول ---------- */
.app-top { background: linear-gradient(135deg, var(--navy-950), var(--navy) 60%, var(--blue)); color: #fff; position: sticky; top: 0; z-index: 20; box-shadow: 0 6px 22px rgba(4, 26, 51, .25); }
.app-top .nav { padding: 12px 0; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 5px 6px 5px 14px; border-radius: 999px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); font-weight: 700; font-size: 14px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--navy); display: grid; place-items: center; font-weight: 800; }
.app-main { padding: 26px 0 60px; }
.welcome { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.welcome h1 { font-size: clamp(22px, 3vw, 30px); }
.meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: thin; }
.chip { flex: none; border: 1.5px solid var(--line-2); background: var(--card); color: var(--ink); padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; cursor: pointer; transition: .15s; }
.chip:hover { border-color: var(--sky); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: 0 6px 14px rgba(7, 49, 93, .25); }
.kpis { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.kpi { border-radius: 18px; padding: 20px 22px; color: #fff; position: relative; overflow: hidden; box-shadow: var(--sh-1); }
.kpi::after { content: ""; position: absolute; inset-inline-end: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.kpi small { display: block; opacity: .85; font-weight: 600; font-size: 13.5px; }
.kpi b { display: block; font-size: clamp(24px, 3.4vw, 34px); line-height: 1.25; font-weight: 800; }
.kpi i { font-style: normal; font-size: 13px; opacity: .85; margin-inline-start: 6px; font-weight: 600; }
.kpi.net { background: linear-gradient(135deg, var(--navy), var(--blue)); }
.kpi.earn { background: linear-gradient(135deg, #2b6aa8, var(--sky)); }
.kpi.ded { background: linear-gradient(135deg, #8f1a1a, var(--red-2)); }

.slip { padding: 0; overflow: hidden; }
.slip-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 22px; background: linear-gradient(180deg, var(--head-a, #f7fafd), var(--card)); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.slip-head .brand .logo { width: 46px; height: 46px; box-shadow: none; border: 1px solid var(--line); }
.slip-head .brand b { color: var(--navy); font-size: 15.5px; }
.slip-head .brand small { color: var(--muted); opacity: 1; }
.slip-period { text-align: end; }
.slip-period small { display: block; color: var(--muted); font-size: 12.5px; }
.slip-period b { color: var(--red); font-size: 19px; }
.slip-who { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px 18px; padding: 16px 22px; border-bottom: 1px dashed var(--line-2); }
.slip-who div small { display: block; color: var(--muted); font-size: 12.5px; }
.slip-who div b { font-size: 14.8px; }
.slip-tables { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.slip-tables > div { padding: 18px 22px; }
.slip-tables > div + div { border-inline-start: 1px dashed var(--line-2); }
table.t { width: 100%; border-collapse: collapse; font-size: 15px; }
table.t th { text-align: start; font-size: 12.8px; color: var(--muted); font-weight: 700; padding: 8px 4px; border-bottom: 2px solid var(--line); }
table.t th.num, table.t td.num { text-align: end; }
table.t td { padding: 10px 4px; border-bottom: 1px solid var(--line); }
table.t tr.total td { font-weight: 800; border-bottom: 0; padding-top: 14px; color: var(--navy); }
.slip-net { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; background: linear-gradient(135deg, var(--navy), var(--blue)); color: #fff; flex-wrap: wrap; }
.slip-net span { font-weight: 700; opacity: .92; }
.slip-net b { font-size: 28px; font-weight: 800; }
.slip-net b i { font-style: normal; font-size: 14px; font-weight: 600; opacity: .85; margin-inline-start: 6px; }
.slip-note { margin: 16px 22px 20px; padding: 12px 16px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); font-size: 14px; font-weight: 600; }
.app-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.trend h3 { font-size: 17px; margin-bottom: 4px; }
.bars { display: flex; align-items: flex-end; justify-content: safe center; gap: 12px; height: 190px; padding: 14px 4px 0; overflow-x: auto; }
.bar { flex: 1; min-width: 44px; max-width: 90px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; cursor: pointer; }
.bar i { display: block; width: 100%; border-radius: 10px 10px 4px 4px; background: linear-gradient(180deg, var(--sky), var(--blue)); min-height: 6px; transition: .25s; }
.bar.on i { background: linear-gradient(180deg, var(--red-2), var(--red)); }
.bar:hover i { filter: brightness(1.1); }
.bar small { font-size: 11.5px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.bar em { font-style: normal; font-size: 11px; color: var(--muted); }

/* ---------- نافذة + إشعار ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(4, 26, 51, .55); backdrop-filter: blur(3px); z-index: 100; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { background: var(--card); width: min(520px, 100%); max-height: 92vh; overflow: auto; border-radius: 20px; padding: 24px; box-shadow: var(--sh-2); animation: pop .18s; }
.modal.wide { width: min(860px, 100%); }
.modal h3 { font-size: 19px; margin-bottom: 6px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.toasts { position: fixed; inset-inline: 0; bottom: 18px; display: grid; gap: 8px; justify-items: center; z-index: 200; pointer-events: none; padding: 0 12px; }
.toast { pointer-events: auto; background: var(--navy-950); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: 14.5px; box-shadow: var(--sh-2); animation: pop .2s; max-width: 520px; }
.toast.err { background: var(--err); } .toast.ok { background: var(--ok); }

/* =====================================================================
   لوحة الإدارة
   ===================================================================== */
.gate { min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: 1.05fr .95fr; background: var(--bg); }
.gate-side { position: relative; overflow: hidden; color: #fff; isolation: isolate; padding: 44px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(700px 400px at 90% 0%, rgba(91, 142, 186, .5), transparent 60%), linear-gradient(160deg, var(--navy-950), var(--navy) 55%, #0b4382); }
.gate-side h1 { font-size: clamp(28px, 3.4vw, 40px); margin: 14px 0 10px; }
.gate-side .lead { opacity: .88; max-width: 420px; }
.gate-form { display: grid; place-items: center; padding: 28px; }
.gate-card { width: min(430px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 30px; box-shadow: var(--sh-2); }
.gate-card h2 { font-size: 22px; }

.shell { display: grid; grid-template-columns: 276px 1fr; min-height: 100vh; min-height: 100svh; }
.side { background: linear-gradient(180deg, var(--navy-950), var(--navy-900) 60%, var(--navy)); color: #fff; padding: 20px 16px; position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: 6px; overflow: auto; }
.side .brand { padding: 4px 8px 18px; border-bottom: 1px solid rgba(255, 255, 255, .12); margin-bottom: 10px; }
.side .brand .logo { width: 46px; height: 46px; }
.side .brand b { font-size: 15.5px; }
.nav-sec { font-size: 11.5px; letter-spacing: .5px; opacity: .55; padding: 14px 12px 4px; font-weight: 700; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; color: rgba(255, 255, 255, .78); font-weight: 600; font-size: 14.8px; cursor: pointer; border: 0; background: transparent; width: 100%; text-align: start; transition: .15s; position: relative; }
.nav-item:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav-item.on { background: linear-gradient(90deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .06)); color: #fff; box-shadow: inset 3px 0 0 var(--red-2); }
[dir="rtl"] .nav-item.on { box-shadow: inset -3px 0 0 var(--red-2); }
.nav-item .i { font-size: 19px; }
.nav-item .count { margin-inline-start: auto; background: var(--red-2); color: #fff; font-size: 11.5px; padding: 1px 8px; border-radius: 999px; }
.side .grow { flex: 1; }
.me { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .08); }
.me .avatar { background: linear-gradient(135deg, var(--red-2), var(--red)); color: #fff; }
.me small { display: block; opacity: .65; font-size: 12px; line-height: 1.3; }
.me b { font-size: 14px; }
.main { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 28px; background: rgba(255, 255, 255, .85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar h1 { font-size: 21px; }
.topbar .crumb { color: var(--muted); font-size: 13px; }
.menu-btn { display: none; }
.page { padding: 26px 28px 70px; max-width: 1280px; }
.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g2 { grid-template-columns: 1.4fr 1fr; }
.stat { display: flex; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: var(--sh-1); }
.stat .ic { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; font-size: 23px; flex: none; }
.stat .ic.b { background: var(--sky-100); color: var(--blue); } .stat .ic.g { background: var(--ok-bg); color: var(--ok); }
.stat .ic.r { background: var(--red-50); color: var(--red); } .stat .ic.a { background: var(--warn-bg); color: var(--warn); }
.stat small { display: block; color: var(--muted); font-size: 13px; font-weight: 600; }
.stat b { font-size: 25px; line-height: 1.2; }
.ring { --p: 0; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; margin: 4px auto 10px;
  background: conic-gradient(var(--ok) calc(var(--p) * 1%), var(--line) 0); }
.ring div { width: 98px; height: 98px; border-radius: 50%; background: var(--card); display: grid; place-items: center; text-align: center; line-height: 1.2; }
.ring b { font-size: 24px; } .ring small { display: block; color: var(--muted); font-size: 11.5px; }
.legend { display: flex; justify-content: center; gap: 16px; font-size: 13px; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-inline-end: 6px; background: var(--ok); }
.legend span + span::before { background: var(--line-2); }
table.list { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.list th { text-align: start; background: var(--th, #f6f8fc); color: var(--muted); font-size: 12.8px; font-weight: 700; padding: 11px 14px; border-block: 1px solid var(--line); white-space: nowrap; }
table.list th:first-child { border-start-start-radius: 11px; border-end-start-radius: 11px; } table.list th:last-child { border-start-end-radius: 11px; border-end-end-radius: 11px; }
table.list td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr:hover td { background: #fafcff; }
.tw { overflow-x: auto; }
.empty { text-align: center; padding: 38px 16px; color: var(--muted); }
.empty .ic { font-size: 40px; color: var(--line-2); display: block; margin: 0 auto 8px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .input { min-height: 44px; font-size: 15px; }
.toolbar .grow { flex: 1; min-width: 200px; position: relative; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }

.stepper { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.stepper .s { flex: 1; min-width: 150px; display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-weight: 700; font-size: 14px; color: var(--muted); }
.stepper .s b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--line); color: var(--muted); font-size: 13px; }
.stepper .s.on { color: var(--navy); border-color: var(--blue); box-shadow: 0 0 0 3px rgba(12, 83, 158, .1); }
.stepper .s.on b { background: var(--blue); color: #fff; }
.stepper .s.done b { background: var(--ok); color: #fff; }
.drop { border: 2px dashed var(--line-2); border-radius: 18px; padding: 34px 18px; text-align: center; background: #fafcff; transition: .15s; cursor: pointer; }
.drop:hover, .drop.over { border-color: var(--blue); background: var(--sky-100); }
.drop .ic { font-size: 40px; color: var(--blue); display: block; margin: 0 auto 6px; }
.drop b { display: block; font-size: 16px; }
.file-pill { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 7px 14px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); font-weight: 700; font-size: 14px; }
.mini-stats { display: flex; gap: 12px; flex-wrap: wrap; margin: 14px 0; }
.mini { background: var(--bg); border-radius: 14px; padding: 10px 16px; min-width: 130px; }
.mini small { display: block; color: var(--muted); font-size: 12.5px; }
.mini b { font-size: 19px; }
ul.issues { margin: 10px 0 0; padding-inline-start: 20px; font-size: 14px; max-height: 190px; overflow: auto; }
ul.issues.e { color: var(--err); } ul.issues.w { color: var(--warn); }
.progress { height: 12px; border-radius: 8px; background: var(--line); overflow: hidden; margin: 14px 0 6px; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--sky)); transition: width .25s; border-radius: 8px; }
.codes-note { border: 1.5px solid #f3d9a6; background: var(--warn-bg); color: var(--warn); padding: 14px 16px; border-radius: 14px; font-weight: 600; font-size: 14.5px; margin: 14px 0; }
.months-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.mcard { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: var(--sh-1); }
.mcard h4 { font-size: 17px; color: var(--navy); }
.mcard .v { font-size: 13px; color: var(--muted); margin-top: 6px; }
.mcard .v b { color: var(--ink); }
.log { list-style: none; margin: 0; padding: 0; }
.log li { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14.2px; align-items: flex-start; }
.log li:last-child { border: 0; }
.log .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--sky-100); color: var(--blue); display: grid; place-items: center; flex: none; }
.log small { color: var(--muted); display: block; font-size: 12.3px; }
.code-box { font-size: 30px; font-weight: 800; letter-spacing: 6px; text-align: center; background: var(--bg); border: 2px dashed var(--line-2); border-radius: 16px; padding: 18px; margin: 14px 0; direction: ltr; color: var(--navy); user-select: all; }

/* بطاقات رموز التفعيل للطباعة */
#print-area { display: none; }

/* ---------- تجاوب ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; padding-bottom: 130px; }
  .steps, .features { grid-template-columns: 1fr; }
  .steps { gap: 30px; }
  .kpis { grid-template-columns: 1fr 1fr; } .kpis .net { grid-column: 1 / -1; }
  .slip-who { grid-template-columns: 1fr 1fr; }
  .gate { grid-template-columns: 1fr; } .gate-side { padding: 28px; min-height: 260px; }
  .shell { grid-template-columns: minmax(0, 1fr); } body { overflow-x: clip; } .page > *, .card { min-width: 0; } .card:has(table) { overflow-x: auto; }
  .side { position: fixed; inset-block: 0; inset-inline-start: 0; width: 276px; z-index: 60; transform: translateX(100%); transition: transform .25s; box-shadow: var(--sh-2); }
  [dir="ltr"] .side { transform: translateX(-100%); }
  .side.open { transform: none; }
  .scrim { position: fixed; inset: 0; background: rgba(4, 26, 51, .5); z-index: 55; }
  .menu-btn { display: inline-flex; }
  .g4 { grid-template-columns: 1fr 1fr; } .g2 { grid-template-columns: 1fr; }
  .topbar, .page { padding-inline: 16px; }
}
@media (max-width: 640px) {
  .slip-tables { grid-template-columns: 1fr; } .slip-tables > div + div { border-inline-start: 0; border-top: 1px dashed var(--line-2); }
  .kpis { grid-template-columns: 1fr; }
  .auth { padding: 20px; border-radius: 20px; }
  .brand small { font-size: 11.5px; }
  .g4 { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .user-chip span.nm { display: none; }
  .hero-text .points { display: none; }
  .hero-grid { gap: 22px; padding-top: 6px; }
  .hero h1 { margin: 12px 0 8px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- الطباعة ---------- */
@media print {
  body { background: #fff; }
  .hero, .section, .footer, .app-top, .chips, .kpis, .app-actions, .trend, .toasts, .modal-back, .welcome, .side, .topbar, .no-print { display: none !important; }
  .app-main { padding: 0; } .container { width: 100%; }
  .slip { box-shadow: none; border: 1.5px solid #222; border-radius: 0; }
  .slip-net { background: #fff !important; color: #000 !important; border-top: 2px solid #000; }
  body.printing-codes > *:not(#print-area) { display: none !important; }
  body.printing-codes #print-area { display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px; padding: 8px; }
  .pcard { border: 1.5px dashed #444; border-radius: 10px; padding: 12px 14px; break-inside: avoid; font-size: 13px; }
  .pcard .h { display: flex; gap: 10px; align-items: center; border-bottom: 1px solid #ccc; padding-bottom: 8px; margin-bottom: 8px; }
  .pcard .h img { width: 36px; height: 36px; }
  .pcard .c { font-size: 24px; font-weight: 800; letter-spacing: 4px; direction: ltr; text-align: center; margin: 8px 0; }
}


/* ===== واجهة بسيطة: شاشة واحدة بحركات ناعمة ===== */
#landing { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
#landing .hero { flex: 1; display: flex; flex-direction: column; justify-content: center; }
#landing .hero-grid { align-items: center; }
.hero-text h1 { font-size: clamp(38px, 5.2vw, 64px); }
.hero-text .lead { max-width: 440px; }
@keyframes rise { from { opacity: 0; transform: translateY(26px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes sheen { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.hero .nav { animation: fadeIn .8s both; }
.hero-text .eyebrow { animation: rise .7s .05s both; }
.hero-text h1 { animation: rise .8s .15s both; }
.hero-text .lead { animation: rise .8s .28s both; }
.auth { animation: rise .9s .25s both cubic-bezier(.2,.8,.2,1); }
.hero-text h1 em { background: linear-gradient(90deg, #9cc6ff, #fff, #9cc6ff); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: sheen 6s linear infinite; }
.auth form:not([hidden]) { animation: fadeIn .35s both; }
.footer .alert { padding: 6px 12px; font-size: 13px; }
/* لوحة المنتسب */
.kpis.one { grid-template-columns: 1fr; }
.kpis.one .kpi.net { text-align: center; padding: 30px 20px; }
.kpis.one .kpi.net b { font-size: clamp(38px, 8vw, 58px); }
.slip, .kpis.one .kpi, .chips { animation: rise .6s both cubic-bezier(.2,.8,.2,1); }
.slip { animation-delay: .1s; }
.welcome { animation: fadeIn .6s both; }
.slip-net { display: none; }
@media print { .slip-net { display: flex; } .kpis.one { display: none; } }

/* ===================== طبقة الجمالية والحركة ===================== */
:root { --font-display: "Readex Pro", system-ui, sans-serif; --ease: cubic-bezier(.2, .8, .2, 1); }
h1, h2, .hero-text h1, .welcome h1, .gate-side h1, .auth h2, .gate-card h2 { font-family: var(--font-display); letter-spacing: 0; }
.hero-text h1 { font-weight: 700; line-height: 1.2; text-shadow: 0 6px 30px rgba(0, 0, 0, .25); }
.num, .kpi b, .stat b { font-feature-settings: "tnum" 1; font-variant-numeric: tabular-nums; }

/* خلفية حيّة */
@keyframes drift { 0%, 100% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(30px, -24px, 0) scale(1.12); } }
.glow.a { animation: drift 14s ease-in-out infinite; }
.glow.b { animation: drift 18s ease-in-out -6s infinite reverse; }
@keyframes gridMove { to { background-position: 48px 48px; } }
.hero::before { animation: gridMove 22s linear infinite; }

/* بطاقة الدخول: تحرّك خفيف مع المؤشر + مؤشر منزلق للتبويب */
.auth { transform-style: preserve-3d; transition: box-shadow .4s var(--ease); will-change: transform; }
.auth:hover { box-shadow: 0 40px 90px -24px rgba(0, 0, 0, .55); }
.tabs { position: relative; }
.tab { position: relative; z-index: 1; background: transparent !important; box-shadow: none !important; }
.tabs::before { content: ""; position: absolute; inset: 5px; inset-inline-start: 5px; width: calc(50% - 7px); background: var(--card); border-radius: 10px; box-shadow: 0 2px 10px rgba(7, 49, 93, .16); transition: transform .45s var(--ease); }
.tabs:has(.tab:last-child[aria-selected="true"])::before { transform: translateX(calc(-100% - 4px)); }
[dir="ltr"] .tabs:has(.tab:last-child[aria-selected="true"])::before { transform: translateX(calc(100% + 4px)); }
.tab[aria-selected="true"] { color: var(--navy); }

/* حقول وأزرار */
.input { transition: border-color .2s, box-shadow .25s, transform .25s var(--ease), background .2s; }
.input:focus { transform: translateY(-1px); }
.btn { position: relative; overflow: hidden; transition: transform .2s var(--ease), box-shadow .25s, background .2s; }
.btn:not(.ghost):not(.danger)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%); transform: translateX(120%); transition: transform .7s var(--ease); }
.btn:not(.ghost):not(.danger):hover::after { transform: translateX(-120%); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.alert:not([hidden]) { animation: rise .35s var(--ease) both; }

/* الشريط: ظهور متتابع للصفوف */
.slip table.t tbody tr { animation: rowIn .5s var(--ease) both; }
@keyframes rowIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.slip table.t tbody tr:nth-child(1) { animation-delay: .15s; } .slip table.t tbody tr:nth-child(2) { animation-delay: .21s; }
.slip table.t tbody tr:nth-child(3) { animation-delay: .27s; } .slip table.t tbody tr:nth-child(4) { animation-delay: .33s; }
.slip table.t tbody tr:nth-child(5) { animation-delay: .39s; } .slip table.t tbody tr:nth-child(6) { animation-delay: .45s; }
.slip table.t tbody tr:nth-child(n+7) { animation-delay: .5s; }
.slip-who > div { animation: rise .6s var(--ease) both; }
.slip-who > div:nth-child(2) { animation-delay: .06s; } .slip-who > div:nth-child(3) { animation-delay: .12s; } .slip-who > div:nth-child(4) { animation-delay: .18s; }
.kpis.one .kpi.net { position: relative; overflow: hidden; }
.kpis.one .kpi.net::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .16) 50%, transparent 65%); transform: translateX(120%); animation: sweep 5s 1.2s ease-in-out infinite; }
@keyframes sweep { 0% { transform: translateX(120%); } 40%, 100% { transform: translateX(-120%); } }
.chip { transition: transform .25s var(--ease), background .2s, color .2s, box-shadow .25s, border-color .2s; }
.chip:hover { transform: translateY(-2px); }
.chips .chip { animation: rise .5s var(--ease) both; }
.chips .chip:nth-child(2) { animation-delay: .06s; } .chips .chip:nth-child(3) { animation-delay: .12s; } .chips .chip:nth-child(4) { animation-delay: .18s; } .chips .chip:nth-child(n+5) { animation-delay: .24s; }

/* لوحة الإدارة */
.page > * { animation: rise .5s var(--ease) both; }
.page > *:nth-child(2) { animation-delay: .06s; } .page > *:nth-child(3) { animation-delay: .12s; } .page > *:nth-child(4) { animation-delay: .18s; }
.stat { transition: transform .3s var(--ease), box-shadow .3s; }
.stat:hover { transform: translateY(-4px); box-shadow: var(--sh-2); }
.grid.g4 > .stat { animation: rise .6s var(--ease) both; }
.grid.g4 > .stat:nth-child(2) { animation-delay: .07s; } .grid.g4 > .stat:nth-child(3) { animation-delay: .14s; } .grid.g4 > .stat:nth-child(4) { animation-delay: .21s; }
.nav-item { transition: background .2s, transform .25s var(--ease), padding .25s var(--ease); }
.nav-item:hover { transform: translateX(-4px); }
table.list tbody tr { animation: fadeIn .4s both; transition: background .15s; }
table.list tbody tr:hover { background: var(--sky-100); }
.bars .bar i, .ring circle { transition: height 1s var(--ease), stroke-dashoffset 1.2s var(--ease); }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.bars .bar i { transform-origin: bottom; animation: grow 1s var(--ease) both; }
.modal { animation: pop .35s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
.modal-back { animation: fadeIn .25s both; }
.toasts > * { animation: rise .4s var(--ease) both; }
.card.empty svg { animation: floaty 3s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) { .auth { transform: none !important; } .btn::after { display: none; } }

/* ===================== التنبيهات ===================== */
.notices { display: grid; gap: 10px; }
.notices:empty { display: none; }
.notice { --nc: #0c539e; --nb: #eaf3ff; display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border-radius: 16px; background: var(--nb); border: 1px solid color-mix(in srgb, var(--nc) 22%, transparent); border-inline-start: 4px solid var(--nc); animation: rise .6s calc(var(--i, 0) * .09s + .1s) var(--ease) both; position: relative; overflow: hidden; }
.notice::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .55) 50%, transparent 60%); transform: translateX(120%); animation: sweep 6s calc(var(--i, 0) * .6s + 1.5s) ease-in-out infinite; pointer-events: none; }
.notice .ni { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--nc); color: #fff; box-shadow: 0 6px 14px color-mix(in srgb, var(--nc) 40%, transparent); }
.notice .ni .i { width: 18px; height: 18px; }
.notice b { display: block; color: var(--ink); font-weight: 700; line-height: 1.5; }
.notice b .pin { width: 14px; height: 14px; color: var(--nc); vertical-align: -2px; }
.notice p { margin: 2px 0 0; color: var(--ink-2, #3b4a5e); font-size: 14px; line-height: 1.7; }
.notice.success { --nc: #0f8a55; --nb: #e8f7ef; }
.notice.warn { --nc: #c27a06; --nb: #fff5df; }
.notice.urgent { --nc: #c0262d; --nb: #fdebec; }
.notice.urgent .ni { animation: ring 2.4s ease-in-out infinite; }
@keyframes ring { 0%, 100% { transform: rotate(0); } 8%, 24% { transform: rotate(14deg); } 16%, 32% { transform: rotate(-14deg); } 40% { transform: rotate(0); } }
.notices.pub { margin-top: 22px; max-width: 520px; }
.notices.pub .notice { background: rgba(255, 255, 255, .12); backdrop-filter: blur(10px); border-color: rgba(255, 255, 255, .22); border-inline-start-color: var(--nc); }
.notices.pub .notice b, .notices.pub .notice p { color: #fff; }
.notices.pub .notice p { opacity: .85; }
#notices { margin-bottom: 14px; }
.bell { position: relative; padding-inline: 12px; }
.bell .bn { position: absolute; top: -6px; inset-inline-start: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--red); color: #fff; font-size: 11.5px; font-weight: 700; display: grid; place-items: center; animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(230, 31, 47, .5); } 70%, 100% { box-shadow: 0 0 0 10px rgba(230, 31, 47, 0); } }
.modal .notices { max-height: 60vh; overflow: auto; padding: 2px; }

/* أدوات الأدمن الجديدة */
.seg { display: grid; gap: 10px; }
.opt { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid var(--line-2); border-radius: 16px; cursor: pointer; transition: border-color .2s, background .2s, transform .25s var(--ease), box-shadow .25s; }
.opt:hover { transform: translateY(-2px); box-shadow: var(--sh-1); }
.opt input { margin-top: 5px; accent-color: var(--navy); width: 18px; height: 18px; }
.opt b { display: block; } .opt small { color: var(--muted); }
.opt:has(input:checked) { border-color: var(--navy); background: var(--sky-100); }
.kinds { display: flex; gap: 8px; flex-wrap: wrap; }
.kind { cursor: pointer; }
.kind input { position: absolute; opacity: 0; }
.kind span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line-2); font-weight: 600; font-size: 14px; transition: .2s var(--ease); }
.kind input:checked + span { color: #fff; border-color: transparent; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0, 0, 0, .18); }
.kind.info input:checked + span { background: #0c539e; } .kind.success input:checked + span { background: #0f8a55; }
.kind.warn input:checked + span { background: #c27a06; } .kind.urgent input:checked + span { background: #c0262d; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.switch-row:last-of-type { border-bottom: 0; }
.sw { position: relative; width: 46px; height: 26px; flex: none; }
.sw input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 1; margin: 0; }
.sw i { position: absolute; inset: 0; border-radius: 13px; background: var(--line-2); transition: background .25s; }
.sw i::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); transition: transform .3s var(--ease); }
.sw input:checked + i { background: var(--navy); }
.sw input:checked + i::after { transform: translateX(-20px); }
.n-row { display: flex; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); animation: fadeIn .4s both; }
.n-row:last-child { border-bottom: 0; }
.n-row .grow { flex: 1; min-width: 0; }
.n-row.off { opacity: .55; }
.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 980px) { .split { grid-template-columns: minmax(0, 1fr); } }
.sticky { position: sticky; top: 90px; }
.slip-mini { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--bg); margin-bottom: 8px; animation: rise .4s var(--ease) both; }
.who { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.who .avatar { width: 54px; height: 54px; font-size: 22px; flex: none; }
.row-actions { flex-wrap: wrap; justify-content: flex-end; }
.ico-btn { width: 36px; height: 36px; padding: 0; display: inline-grid; place-items: center; }
.bell { overflow: visible; }
.who .avatar { display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, var(--navy), var(--blue)); color: #fff; font-weight: 700; box-shadow: 0 8px 20px rgba(7, 49, 93, .3); }
@media (max-width: 640px) { .notices.pub .notice:nth-child(n+3) { display: none; } }
h1, h2, .hero-text h1, .welcome h1, .gate-side h1, .auth h2, .gate-card h2 { word-spacing: 0; line-height: 1.45; font-weight: 700; }

/* ---------- لوحة المراقبة المباشرة ---------- */
.g2-1 { grid-template-columns: 1.6fr 1fr; }
@media (max-width: 900px) { .g2-1 { grid-template-columns: 1fr; } }
.alert.trial { margin: 0 0 16px; }
.live-h { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.live-h h3 { margin: 0; font-family: var(--font-display, inherit); }
.live { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--ok); background: var(--ok-bg); padding: 5px 12px; border-radius: 99px; }
.live i, .people .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; position: relative; }
.live i::after, .people .dot::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--ok); animation: livepulse 1.6s ease-out infinite; }
@keyframes livepulse { from { transform: scale(.4); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }
.stat.hot { background: linear-gradient(135deg, #fff, var(--ok-bg)); border-color: #bfe6cf; }
.live-grid .stat { animation: rise .6s both; } .live-grid .stat:nth-child(2) { animation-delay: .06s; } .live-grid .stat:nth-child(3) { animation-delay: .12s; } .live-grid .stat:nth-child(4) { animation-delay: .18s; }
.tchart { width: 100%; height: 220px; display: block; overflow: visible; }
.tchart .gl { stroke: var(--line); stroke-dasharray: 3 5; } .tchart .gt { fill: var(--muted); font-size: 11px; }
.tchart .ln1, .tchart .ln2 { fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s .2s cubic-bezier(.3,.7,.2,1) forwards; vector-effect: non-scaling-stroke; }
.tchart .ln1 { stroke: #1d6fb8; } .tchart .ln2 { stroke: #c8102e; animation-delay: .5s; }
.tchart .d1 { fill: #fff; stroke: #1d6fb8; stroke-width: 2; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.legend-i { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.legend-i i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; } .legend-i .l1 { background: #1d6fb8; } .legend-i .l2 { background: #c8102e; margin-inline-start: 8px; }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 340px; overflow: auto; }
.people li { display: flex; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 12px; transition: background .2s; animation: rise .5s both; }
.people li:hover { background: var(--sky-100); }
.people .av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--sky-100); color: var(--blue); flex: none; }
.people .av.on { background: var(--ok-bg); color: var(--ok); }
.people div { flex: 1; min-width: 0; } .people b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.people small { color: var(--muted); font-size: 12.5px; }
.people em { font-style: normal; font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.still *, .still { animation: none !important; } .still .ln1, .still .ln2 { stroke-dashoffset: 0 !important; }

/* ---------- الوضع الليلي ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1423; --card: #101d33; --ink: #e6edf7; --muted: #93a4bb; --line: #1f3050; --line-2: #2a3f63;
  --sky-100: #14284a; --navy: #2f78c4; --blue: #4a95e0; --red: #e04a4a; --red-50: #2b1620;
  --ok: #3ccf93; --ok-bg: #0f2b24; --warn: #f0b24a; --warn-bg: #2d2412; --err: #ff7b6e; --err-bg: #2d1717;
  --head-a: #14253f; --th: #14233b;
}
:root[data-theme="dark"] .btn { color: #fff; }
:root[data-theme="dark"] .btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
:root[data-theme="dark"] .stat.hot { background: linear-gradient(135deg, var(--card), var(--ok-bg)); border-color: #1e5a46; }
:root[data-theme="dark"] .tchart .d1 { fill: var(--card); }
:root[data-theme="dark"] .modal-back { background: rgba(2, 8, 20, .7); }
:root[data-theme="dark"] .tab[aria-selected="true"], :root[data-theme="dark"] .chip[aria-pressed="true"] { color: #fff; }
:root[data-theme="dark"] .slip-head .brand b { color: var(--ink); }
:root[data-theme="dark"] .logo { background: #fff; }
:root[data-theme="dark"] .input { background: #0c182b; }

.theme-fab { position: fixed; inset-block-end: 16px; inset-inline-end: 14px; z-index: 60; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); display: grid; place-items: center; font-size: 20px; cursor: pointer; box-shadow: var(--sh-2); transition: transform .35s var(--ease), background .3s; }
.theme-fab:hover { transform: rotate(18deg) scale(1.08); }
.theme-fab .i { transition: transform .5s var(--ease); } .theme-fab:active .i { transform: rotate(180deg) scale(.8); }
body, .card, .stat, .modal, .input, .slip, .chip { transition: background-color .35s, color .35s, border-color .35s; }
@media print { .theme-fab { display: none !important; } :root[data-theme="dark"] { --bg: #fff; --card: #fff; --ink: #000; --muted: #444; --line: #ccc; } }

/* ---------- تبويبات العرض + المقارنة + الملخص السنوي ---------- */
.views { display: inline-flex; gap: 4px; padding: 5px; border-radius: 14px; background: var(--sky-100); margin: 4px 0 16px; position: relative; }
.views button { border: 0; background: transparent; padding: 9px 20px; border-radius: 10px; font: inherit; font-weight: 700; font-size: 14.5px; color: var(--muted); cursor: pointer; position: relative; z-index: 1; transition: color .25s, background .3s; }
.views button[aria-pressed="true"] { background: var(--card); color: var(--navy); box-shadow: 0 2px 10px rgba(7, 49, 93, .14); }
.cmp { margin-top: 16px; animation: rise .6s .1s both; }
.cmp-top { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.cmp-top > div { flex: 1; min-width: 150px; border-radius: 14px; padding: 12px 16px; background: var(--sky-100); }
.cmp-top small { display: block; color: var(--muted); font-weight: 600; font-size: 13px; }
.cmp-top b { font-size: 21px; }
.up { color: var(--ok); } .down { color: var(--err); } .same { color: var(--muted); }
.cmp-list { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 2px; }
.cmp-list li { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px dashed var(--line); font-size: 15px; }
.cmp-list li span:first-child { flex: 1; } .cmp-list em { font-style: normal; font-weight: 700; font-size: 13.5px; padding: 2px 10px; border-radius: 99px; background: var(--sky-100); }
.cmp-list li.new em { background: var(--warn-bg); color: var(--warn); }
.year-bars { display: flex; align-items: flex-end; gap: 8px; height: 190px; padding-top: 22px; }
.year-bars .yb { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; min-width: 0; }
.year-bars .yb i { width: 100%; max-width: 38px; border-radius: 9px 9px 3px 3px; background: linear-gradient(180deg, var(--blue), var(--navy)); transform-origin: bottom; animation: grow .9s var(--ease) both; }
.year-bars .yb.empty i { background: var(--line); height: 5px !important; }
.year-bars .yb small { font-size: 11px; color: var(--muted); } .year-bars .yb em { font-style: normal; font-size: 10.5px; color: var(--muted); }
@keyframes grow { from { transform: scaleY(0); } }
.year-sel { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.new-dot { display: inline-block; margin-inline-start: 6px; font-size: 11px; font-weight: 800; background: var(--red-2); color: #fff; padding: 1px 8px; border-radius: 99px; animation: pulse 2s infinite; }
.cap-slip { background: var(--card); padding: 4px; }
.slip-stamp { display: none; }
@media print { .slip-stamp { display: flex; justify-content: space-between; padding: 8px 22px; font-size: 12px; border-top: 1px dashed #555; } .views, .cmp, .year, .app-actions { display: none !important; } }
.sec-alert { margin: 0 0 14px; } .sec-alert ul { margin: 6px 0 0; padding-inline-start: 18px; font-weight: 500; } .sec-alert small { opacity: .75; }
.cmp-list em:empty { display: none; }
:root[data-theme="dark"] .kpi.net, :root[data-theme="dark"] .slip-net, :root[data-theme="dark"] .chip[aria-pressed="true"] { background: linear-gradient(135deg, #0c2f5a, #1d5fa8); border-color: transparent; }

/* ---------- شاشة البداية + الشبكة الكهربائية ---------- */
.splash { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 50% 40%, #0c539e, #041a33 70%); transition: opacity .6s ease, transform .7s var(--ease); }
.splash.out { opacity: 0; transform: scale(1.06); pointer-events: none; }
.sp-in { text-align: center; display: grid; justify-items: center; gap: 6px; padding: 24px; position: relative; }
.sp-in img { width: 92px; height: 92px; border-radius: 24px; background: #fff; padding: 8px; animation: spLogo 1s var(--ease) both; box-shadow: 0 20px 60px rgba(0, 0, 0, .4); }
.sp-in b { font-family: var(--font-display); font-size: 26px; margin-top: 14px; animation: rise .7s .35s both; }
.sp-in small { opacity: .8; animation: rise .7s .5s both; }
.sp-ring { position: absolute; top: 24px; width: 92px; height: 92px; }
.sp-ring i { position: absolute; inset: 0; border-radius: 28px; border: 2px solid rgba(143, 195, 255, .7); animation: spRing 1.6s ease-out infinite; }
.sp-ring i + i { animation-delay: .5s; }
.sp-bar { width: 140px; height: 3px; margin-top: 22px; border-radius: 3px; background: rgba(255, 255, 255, .18); overflow: hidden; position: relative; }
.sp-bar::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, #fff, transparent); animation: spBar 1.1s linear infinite; }
@keyframes spLogo { from { opacity: 0; transform: scale(.6) rotate(-8deg); } to { opacity: 1; transform: none; } }
@keyframes spRing { from { transform: scale(1); opacity: .9; } to { transform: scale(2.2); opacity: 0; } }
@keyframes spBar { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
body.is-splash { overflow: hidden; }
.net-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; opacity: .9; }
.grid-art { position: absolute; inset-inline: 0; bottom: 0; width: 100%; height: min(360px, 46vh); z-index: -1; pointer-events: none; opacity: .5; }
.grid-art .tl { stroke: #8fc3ff; stroke-width: 2.6; } .grid-art .tb { stroke: #8fc3ff; stroke-width: 1.1; opacity: .75; } .grid-art .ta { stroke: #8fc3ff; stroke-width: 2.4; }
.grid-art .tn { fill: #fff; animation: nodeGlow 2.6s ease-in-out infinite; } .grid-art .tw:nth-child(odd) .tn { animation-delay: -1.2s; }
.grid-art .wire { fill: none; stroke: rgba(143, 195, 255, .55); stroke-width: 1.2; }
.grid-art .flow { fill: none; stroke: #ffe28a; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 8 120; animation: flowDash 4s linear infinite; filter: drop-shadow(0 0 4px #ffd24d); }
@keyframes flowDash { to { stroke-dashoffset: -256; } }
@keyframes nodeGlow { 0%, 100% { opacity: .5; r: 3; } 50% { opacity: 1; r: 4.6; } }
@media (max-width: 700px) { .grid-art { opacity: .35; height: 200px; } }
.hero-lines { display: none; }

/* ---------- بطاقة الهوية الزجاجية ---------- */
.welcome { display: block; }
.idcard { --mx: 50%; --my: 0%; position: relative; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 20px 24px; border-radius: 24px; overflow: hidden; color: #fff; isolation: isolate;
  background: linear-gradient(135deg, rgba(7, 49, 93, .96), rgba(12, 83, 158, .92) 55%, rgba(46, 124, 205, .9)); box-shadow: 0 18px 50px rgba(7, 49, 93, .28), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .25s var(--ease), box-shadow .3s; animation: rise .7s both; will-change: transform; }
.idcard::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 255, 255, .22), transparent 60%); }
.idcard::after { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; inset-inline-end: -80px; top: -120px; z-index: -1; background: radial-gradient(circle, rgba(255, 210, 90, .35), transparent 65%); animation: breathe 6s ease-in-out infinite; }
.idcard .shine { position: absolute; inset: 0; z-index: -1; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .16) 45%, transparent 60%); transform: translateX(-120%); animation: cardSheen 5.5s 1s ease-in-out infinite; }
@keyframes cardSheen { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.id-av { width: 70px; height: 70px; border-radius: 22px; display: grid; place-items: center; font: 800 30px var(--font-display); background: linear-gradient(145deg, #fff, #cfe3fa); color: var(--navy); box-shadow: 0 10px 26px rgba(0, 0, 0, .3); flex: none; animation: pop .6s .15s both; }
.id-main { flex: 1; min-width: 200px; }
.id-main .greet { display: block; opacity: .85; font-weight: 600; font-size: 14px; }
.id-main h1 { color: #fff; font-size: clamp(21px, 3vw, 28px); margin: 2px 0 8px; }
.idcard .meta { display: flex; gap: 8px; flex-wrap: wrap; }
.idcard .badge { background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .25); backdrop-filter: blur(6px); }
.id-dates { text-align: end; line-height: 1.5; } .id-dates b { display: block; font-size: 14.5px; } .id-dates small { opacity: .8; font-size: 12.5px; }
@keyframes pop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) { .id-dates { text-align: start; width: 100%; } .id-av { width: 58px; height: 58px; font-size: 25px; border-radius: 18px; } }

/* ---------- عدّاد ميكانيكي ---------- */
.odo { display: inline-flex; direction: ltr; align-items: center; height: 1.2em; line-height: 1.2em; }
.odo .od { display: inline-block; height: 1.2em; overflow: hidden; }
.odo .od .col { display: block; transform: translateY(0); transition: transform var(--t, 1.2s) cubic-bezier(.16, .9, .25, 1); }
.odo.go .od .col { transform: translateY(calc(var(--d) * -1.2em)); }
.odo .od .dg { display: block; height: 1.2em; }
.odo.go { animation: netGlow 1.8s .9s both; }
@keyframes netGlow { 0% { text-shadow: 0 0 0 rgba(255, 226, 138, 0); } 50% { text-shadow: 0 0 28px rgba(255, 226, 138, .85); } 100% { text-shadow: 0 0 0 rgba(255, 226, 138, 0); } }

/* ---------- هيكل التحميل ---------- */
.skel, .sk-line { position: relative; overflow: hidden; border-radius: 18px; background: var(--line); }
.skel.big { height: 180px; margin-bottom: 16px; } .skel.card { height: 360px; }
.skel::after, .sk-line::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, color-mix(in srgb, var(--card) 70%, transparent) 50%, transparent 80%); transform: translateX(-100%); animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.sk-line { height: 18px; border-radius: 9px; margin: 12px 0; }

/* ---------- أيقونات متحركة ---------- */
.bell:not([hidden]) > .i { transform-origin: 50% 10%; animation: ringBell 4s 1.2s ease-in-out infinite; }
@keyframes ringBell { 0%, 12%, 100% { transform: rotate(0); } 3% { transform: rotate(16deg); } 6% { transform: rotate(-14deg); } 9% { transform: rotate(8deg); } }
.btn .i { transition: transform .45s var(--ease); }
#chpw:hover .i { transform: rotate(120deg) scale(1.1); } #pdf:hover .i { transform: translateY(3px); animation: bob .8s ease-in-out infinite; } #share:hover .i { transform: scale(1.18) rotate(-8deg); } #print:hover .i { transform: translateY(-2px); } #notif:hover .i { animation: ringBell 1s ease-in-out; }
@keyframes bob { 50% { transform: translateY(-3px); } }
.toast.ok::before { content: "✓"; display: inline-block; margin-inline-end: 8px; font-weight: 800; animation: pop .4s both; }
.nav-item:hover .i { transform: translateX(-3px) scale(1.12); } .nav-item .i { transition: transform .3s var(--ease); }

/* ---------- انتقال الأشهر (View Transitions) ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .38s; animation-timing-function: var(--ease); }
html[data-dir="older"]::view-transition-old(root) { animation-name: vtOutR; } html[data-dir="older"]::view-transition-new(root) { animation-name: vtInL; }
html[data-dir="newer"]::view-transition-old(root) { animation-name: vtOutL; } html[data-dir="newer"]::view-transition-new(root) { animation-name: vtInR; }
@keyframes vtOutR { to { opacity: 0; transform: translateX(-36px); } } @keyframes vtInL { from { opacity: 0; transform: translateX(36px); } }
@keyframes vtOutL { to { opacity: 0; transform: translateX(36px); } } @keyframes vtInR { from { opacity: 0; transform: translateX(-36px); } }
.slip-tables tbody tr { animation: rise .55s both; } .slip-tables tbody tr:nth-child(2) { animation-delay: .05s; } .slip-tables tbody tr:nth-child(3) { animation-delay: .1s; } .slip-tables tbody tr:nth-child(4) { animation-delay: .15s; } .slip-tables tbody tr:nth-child(5) { animation-delay: .2s; } .slip-tables tbody tr:nth-child(n+6) { animation-delay: .25s; }
.slip-who > div { animation: rise .5s both; } .slip-who > div:nth-child(2) { animation-delay: .06s; } .slip-who > div:nth-child(3) { animation-delay: .12s; } .slip-who > div:nth-child(4) { animation-delay: .18s; }
@media print { .idcard { display: none !important; } }
@media (prefers-reduced-motion: reduce) { *, ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; } }
.kpi b.odo { display: inline-flex; }
.kpi b.odo .od { overflow: hidden; }

/* ---------- تحليلات الإدارة ---------- */
.stat-sk { height: 86px; }
.heat { overflow-x: auto; }
.heat-grid { display: grid; grid-template-columns: 62px repeat(24, minmax(11px, 1fr)); gap: 3px; align-items: center; min-width: 480px; direction: ltr; }
.heat-grid b { font-size: 12px; color: var(--muted); font-weight: 600; text-align: end; padding-inline-end: 6px; direction: rtl; white-space: nowrap; }
.heat-grid i { aspect-ratio: 1; border-radius: 4px; background: color-mix(in srgb, var(--blue) calc(var(--a) * 100%), var(--line)); animation: pop .5s both; transition: transform .2s; }
.heat-grid i:hover { transform: scale(1.5); position: relative; z-index: 2; box-shadow: 0 4px 12px rgba(7, 49, 93, .35); }
.heat-grid small { text-align: center; font-size: 10px; color: var(--muted); }
.dist { display: grid; gap: 9px; }
.dr { display: grid; grid-template-columns: 96px 1fr 44px; align-items: center; gap: 10px; font-size: 13.5px; cursor: default; }
.dr span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.dr div { height: 12px; border-radius: 8px; background: var(--line); overflow: hidden; }
.dr i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--navy), var(--blue)); transform-origin: right; animation: barIn 1s var(--ease) both; transition: filter .2s; }
.dr:hover i { filter: brightness(1.25); } .dr em { font-style: normal; color: var(--muted); font-size: 12.5px; text-align: end; }
@keyframes barIn { from { transform: scaleX(0); } }
.hist-h { font-size: 12.5px; margin: 16px 0 6px; }
.hist { display: flex; gap: 6px; align-items: flex-end; height: 86px; direction: ltr; }
.hist div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; }
.hist i { width: 100%; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #e04a4a, #b82525); transform-origin: bottom; animation: grow .8s var(--ease) both; }
.hist small { font-size: 10px; color: var(--muted); }
.pulse-map { position: relative; height: 150px; margin-bottom: 10px; border-radius: 14px; overflow: hidden; background: radial-gradient(circle at 50% 50%, var(--ok-bg), transparent 75%), repeating-linear-gradient(0deg, transparent 0 22px, var(--line) 22px 23px), repeating-linear-gradient(90deg, transparent 0 22px, var(--line) 22px 23px); border: 1px solid var(--line); }
.pulse-map span { position: absolute; width: 26px; height: 26px; margin: -13px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; font-size: 12px; font-weight: 800; animation: pop .6s both; }
.pulse-map span::before, .pulse-map span::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--ok); animation: livepulse 2.2s ease-out infinite; }
.pulse-map span::after { animation-delay: 1.1s; }

/* ---------- شريط التنقل السفلي للهاتف ---------- */
.mbar { display: none; }
@media (max-width: 900px) {
  .mbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset-inline: 10px; bottom: 10px; z-index: 40; padding: 6px; border-radius: 22px; background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(14px); border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(4, 26, 51, .28); }
  .mbar button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 11px; font-weight: 700; display: grid; place-items: center; gap: 1px; padding: 6px 0; border-radius: 16px; cursor: pointer; transition: color .2s, background .25s; }
  .mbar button .i { font-size: 21px; transition: transform .35s var(--ease); }
  .mbar button.on { color: var(--navy); background: var(--sky-100); } .mbar button.on .i { transform: translateY(-2px) scale(1.12); }
  .mbar .mb-main { color: #fff; background: linear-gradient(135deg, var(--red-2), var(--red)); margin-top: -18px; width: 54px; height: 54px; justify-self: center; border-radius: 50%; box-shadow: 0 10px 24px rgba(184, 37, 37, .45); }
  .mbar .mb-main .i { font-size: 24px; } .mbar .mb-main.on { background: linear-gradient(135deg, var(--red-2), var(--red)); color: #fff; }
  .main, #page { padding-bottom: 96px; }
  .theme-fab { inset-block-end: 92px; }
}
@media (max-width: 900px) { .live-grid { grid-template-columns: 1fr 1fr !important; } .live-grid .stat { padding: 12px; gap: 10px; } .live-grid .stat .ic { width: 40px; height: 40px; font-size: 19px; } }
/* إصلاح الهاتف: فراغ أسفل الصفحة وتقطيع التمرير */
html { overflow-x: clip; -webkit-overflow-scrolling: touch; }
@media (max-width: 980px) {
  .hero-grid { padding-bottom: 56px !important; }
  .grid-art { height: 150px; opacity: .3; }
  .idcard { will-change: auto; }
}
@supports (-webkit-touch-callout: none) { .net-bg { display: none; } .splash { height: 100dvh; } }

/* ---------- بطاقة المشاركة (تُلتقط كصورة) — ألوان وأبعاد ثابتة ---------- */
.sc-host { position: fixed; left: -10000px; top: 0; width: 760px; pointer-events: none; }
.sc, .sc * { box-sizing: border-box; letter-spacing: 0 !important; animation: none !important; transition: none !important; }
.sc { width: 760px; background: #fff; color: #0f2238; font-family: "Readex Pro", Tahoma, sans-serif; font-size: 17px; line-height: 1.6; position: relative; overflow: hidden; }
.sc::before { content: ""; position: absolute; inset: 0; background: url(/logo.png) no-repeat 50% 56% / 340px; opacity: .045; }
.sc-top { display: flex; align-items: center; gap: 18px; padding: 26px 30px; color: #fff; background: linear-gradient(135deg, #041a33, #07315d 55%, #0c539e); position: relative; }
.sc-logo { width: 78px; height: 78px; border-radius: 20px; background: #fff; display: grid; place-items: center; flex: none; box-shadow: 0 8px 22px rgba(0, 0, 0, .3); }
.sc-logo img { width: 62px; height: 62px; object-fit: contain; }
.sc-org { flex: 1; } .sc-org b { display: block; font-size: 27px; font-family: "Readex Pro", Tahoma, sans-serif; line-height: 1.35; } .sc-org span { display: block; opacity: .85; font-size: 15px; margin-top: 2px; }
.sc-per { text-align: end; padding: 8px 18px; border-radius: 14px; background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .25); }
.sc-per small { display: block; opacity: .8; font-size: 13px; line-height: 1.4; margin-bottom: 2px; } .sc-per b { font-size: 21px; font-family: "Readex Pro", Tahoma, sans-serif; white-space: nowrap; }
.sc-bar { height: 6px; background: linear-gradient(90deg, #e61f2f, #ffc933 50%, #e61f2f); }
.sc-body { padding: 24px 30px 10px; position: relative; }
.sc-info { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 14px; padding: 16px 18px; border-radius: 16px; background: #eef4fb; border: 1px solid #d6e3f2; }
.sc-info small { display: block; color: #5d6b7c; font-size: 13px; } .sc-info b { display: block; font-size: 16px; }
.sc-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.sc-t { border: 1px solid #dbe4ef; border-radius: 16px; overflow: hidden; background: #fff; }
.sc-th { padding: 9px 16px; font-weight: 800; color: #fff; background: #0c539e; } .sc-t.d .sc-th { background: #b82525; }
.sc-r { display: flex; justify-content: space-between; gap: 12px; padding: 8px 16px; border-bottom: 1px solid #edf1f6; font-size: 16px; }
.sc-r b { direction: ltr; font-variant-numeric: tabular-nums; } .sc-r.tot { background: #f3f7fc; font-weight: 800; border-bottom: 0; }
.sc-net { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px; border-radius: 18px; color: #fff; background: linear-gradient(135deg, #07315d, #0c539e); border: 2px solid #f2c24a; }
.sc-net span { font-size: 18px; font-weight: 700; } .sc-net b { display: block; line-height: 1.5; padding-top: 14px; font-size: 36px; font-family: "Readex Pro", Tahoma, sans-serif; direction: ltr; white-space: nowrap; } .sc-net i { font-style: normal; font-size: 16px; font-weight: 600; opacity: .9; }
.sc-note { margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: #fff6df; color: #7a4b00; font-size: 14.5px; }
.sc-foot { display: flex; justify-content: space-between; padding: 14px 30px 18px; color: #6b7a8c; font-size: 13px; position: relative; }
.sc-prev { width: 100%; border-radius: 12px; border: 1px solid var(--line); }

/* =====================================================================
   طبقة الهدوء الهندسي: إزالة التوهج والتدرجات النصية، مظهر مؤسسي رصين
   ===================================================================== */
.glow, .net-bg { display: none !important; }
.hero h1 em, .hero-text h1 em { background: none !important; -webkit-text-fill-color: currentColor !important; color: #a9cdf5 !important; animation: none !important; }
.hero-text h1 { text-shadow: none; font-weight: 600; letter-spacing: 0; line-height: 1.3; }
.hero::before { animation: none !important; opacity: .35; }
.notice::after, .idcard .shine, .idcard::after, .idcard::before { display: none !important; }
.eyebrow .dot { box-shadow: none; }
.auth { transform: none !important; }
body { font-feature-settings: "kern" 1, "liga" 1; letter-spacing: 0; }
h1, h2, h3, h4 { font-weight: 600; letter-spacing: 0; }
.btn { font-weight: 600; box-shadow: 0 1px 2px rgba(7, 49, 93, .18); }
.btn:hover { box-shadow: 0 4px 12px rgba(7, 49, 93, .2); }
.sp-ring { display: none; }

/* بطاقة الهوية: مضغوطة وساكنة */
.idcard { padding: 14px 18px; gap: 14px; border-radius: 18px; background: linear-gradient(135deg, #062a52, #0b4382); box-shadow: 0 6px 20px rgba(7, 49, 93, .18); flex-wrap: nowrap; transform: none !important; }
.id-av { width: 52px; height: 52px; border-radius: 14px; font-size: 22px; background: #fff; box-shadow: none; }
.id-main { min-width: 0; } .id-main h1 { font-size: clamp(18px, 2.6vw, 22px); margin: 0 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.id-main .greet { font-size: 12.5px; }
.id-dates { display: none; } @media (min-width: 760px) { .id-dates { display: block; } }
.idcard .badge { font-size: 12px; padding: 2px 10px; backdrop-filter: none; }

/* صافي الراتب: بطاقة رئيسية واحدة */
.net-hero { margin-top: 12px; border-radius: 20px; padding: 18px 22px 20px; color: #fff; background: linear-gradient(160deg, #062a52, #0b4382); box-shadow: 0 8px 26px rgba(7, 49, 93, .22); position: relative; overflow: hidden; animation: rise .55s both; }
.net-hero::before { content: ""; position: absolute; inset: 0; opacity: .12; background-image: linear-gradient(rgba(255, 255, 255, .6) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .6) 1px, transparent 1px); background-size: 28px 28px; mask-image: linear-gradient(135deg, #000, transparent 60%); -webkit-mask-image: linear-gradient(135deg, #000, transparent 60%); }
.nh-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; position: relative; font-weight: 500; font-size: 14.5px; opacity: .95; }
.dpill { font-size: 13px; font-weight: 600; padding: 3px 12px; border-radius: 99px; background: rgba(255, 255, 255, .14); } .dpill small { opacity: .75; font-size: 11.5px; margin-inline-start: 4px; }
.dpill.up { background: rgba(60, 207, 147, .22); color: #a8f0cf; } .dpill.down { background: rgba(255, 123, 110, .22); color: #ffc2bb; }
.nh-num { display: flex; align-items: baseline; gap: 10px; margin: 8px 0 14px; position: relative; }
.nh-num b { font-size: clamp(38px, 11vw, 58px); line-height: 1.2; font-weight: 600; letter-spacing: 0; } .nh-num i { font-style: normal; opacity: .8; font-size: 16px; }
.split-bar { display: flex; height: 8px; border-radius: 6px; overflow: hidden; background: rgba(255, 255, 255, .15); gap: 2px; position: relative; }
.split-bar span { width: var(--w); transform-origin: right; animation: barIn 1.1s .25s var(--ease) both; } .sb-e { background: #5fd3a4; } .sb-d { background: #ff8a80; }
.nh-legend { display: flex; gap: 22px; margin-top: 12px; position: relative; }
.nh-legend div { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; }
.nh-legend i { width: 9px; height: 9px; border-radius: 3px; grid-row: span 2; } .nh-legend i.e { background: #5fd3a4; } .nh-legend i.d { background: #ff8a80; }
.nh-legend small { opacity: .75; font-size: 12px; line-height: 1.2; } .nh-legend b { font-size: 16px; font-weight: 600; line-height: 1.3; }
.net-hero .odo { height: 1.25em; line-height: 1.25em; } .net-hero .odo .od, .net-hero .odo .od .dg { height: 1.25em; } .net-hero.slip .odo.go .od .col { transform: translateY(calc(var(--d) * -1.25em)); }

/* لوحات قابلة للطي */
.acc-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 12px; }
@media (min-width: 900px) { .acc-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.acc { background: var(--card); border: 1px solid var(--line); border-radius: 16px; margin-top: 10px; overflow: hidden; box-shadow: var(--sh-1); animation: rise .5s .1s both; }
.acc-grid .acc { margin-top: 0; }
.acc summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 13px 16px; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary > div { flex: 1; min-width: 0; line-height: 1.35; } .acc summary b { display: block; font-weight: 600; font-size: 15.5px; } .acc summary small { color: var(--muted); font-size: 12.5px; }
.acc summary em { font-style: normal; font-weight: 600; font-size: 16.5px; }
.acc .ai { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--sky-100); color: var(--blue); flex: none; }
.acc.e .ai { background: var(--ok-bg); color: var(--ok); } .acc.d .ai { background: var(--err-bg); color: var(--err); } .acc.d summary em { color: var(--err); } .acc.e summary em { color: var(--ok); }
.acc .chev { color: var(--muted); transition: transform .3s var(--ease); display: grid; } .acc[open] .chev { transform: rotate(180deg); }
.lines { list-style: none; margin: 0; padding: 0 16px 8px; border-top: 1px solid var(--line); }
.lines li { position: relative; display: flex; justify-content: space-between; gap: 12px; padding: 11px 0 13px; border-bottom: 1px dashed var(--line); font-size: 15px; animation: rise .45s calc(var(--i) * 45ms) both; }
.lines li:last-child { border-bottom: 0; } .lines li.none { color: var(--muted); }
.lines li b { font-weight: 600; }
.lines .share { position: absolute; inset-inline-start: 0; bottom: 5px; height: 3px; width: var(--w); border-radius: 3px; opacity: .55; transform-origin: right; animation: barIn .9s calc(var(--i) * 60ms + .2s) var(--ease) both; }
.lines .share.e { background: var(--ok); } .lines .share.d { background: var(--err); }
.kv { margin: 0; padding: 4px 16px 12px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.kv div { padding: 8px 0; border-bottom: 1px dashed var(--line); } .kv dt { color: var(--muted); font-size: 12.5px; } .kv dd { margin: 0; font-weight: 600; font-size: 15px; }
.cmp-in { padding: 0 16px 14px; border-top: 1px solid var(--line); }
.acc.cmp { animation-delay: .15s; }
.print-head { display: none; }
@media print {
  .print-head { display: flex; align-items: center; gap: 14px; border-bottom: 2px solid #000; padding-bottom: 10px; margin-bottom: 14px; color: #000; }
  .print-head img { width: 54px; } .print-head div { flex: 1; } .print-head b { display: block; font-size: 18px; } .ph-p { text-align: end; flex: none !important; }
  .net-hero { background: #fff !important; color: #000 !important; box-shadow: none; border: 1.5px solid #000; } .net-hero::before { display: none; }
  .acc { box-shadow: none; border: 1px solid #333; break-inside: avoid; } .acc .chev { display: none; } .acc-grid { grid-template-columns: 1fr 1fr; }
  .dpill, .nh-legend small { color: #000 !important; background: none !important; }
}
.views { margin: 12px 0 0; }
.chips { margin-top: 6px; }

/* التذييل: اعتماد المطوّر */
.dev-credit { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); padding: 5px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); }
.dev-credit .i { color: var(--blue); }
.app-foot { text-align: center; padding: 22px 0 8px; }
.side .dev-credit { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .75); margin-top: 8px; font-size: 11.5px; }

/* ---------- الوضع الليلي: تصحيح التباين ---------- */
:root[data-theme="dark"] { --ink-2: #b9c7db; --sh-1: 0 1px 2px rgba(0, 0, 0, .4); }
:root[data-theme="dark"] .notice { --nb: #12243d; } :root[data-theme="dark"] .notice.success { --nb: #0f2b24; } :root[data-theme="dark"] .notice.warn { --nb: #2d2412; } :root[data-theme="dark"] .notice.urgent { --nb: #2d1720; }
:root[data-theme="dark"] .notice b { color: var(--ink); } :root[data-theme="dark"] .notice p { color: var(--ink-2); }
:root[data-theme="dark"] table.list tr:hover td, :root[data-theme="dark"] .drop { background: #14233b; }
:root[data-theme="dark"] .btn.danger { border-color: #6b2f2f; color: var(--err); }
:root[data-theme="dark"] .avatar { background: #dce9f8; color: #07315d; }
:root[data-theme="dark"] .code-box { background: #0c182b; }
:root[data-theme="dark"] .codes-note { border-color: #5a4720; }
:root[data-theme="dark"] .stepper .s { background: var(--card); }
:root[data-theme="dark"] .field > span, :root[data-theme="dark"] .field small { color: var(--ink); }
:root[data-theme="dark"] .field small { color: var(--muted); }
:root[data-theme="dark"] .input::placeholder { color: #6f819b; }
:root[data-theme="dark"] .acc .ai { color: #8fc3ff; }
:root[data-theme="dark"] .chip { color: var(--ink); }
:root[data-theme="dark"] .toast { background: #1c2f4d; }
:root[data-theme="dark"] .modal h3, :root[data-theme="dark"] .modal p { color: var(--ink); }
:root[data-theme="dark"] .section.alt, :root[data-theme="dark"] .footer { background: var(--card); color: var(--ink); }
:root[data-theme="dark"] .faq details, :root[data-theme="dark"] .step, :root[data-theme="dark"] .feat { background: var(--card); color: var(--ink); border-color: var(--line); }
:root[data-theme="dark"] .topbar { background: var(--card); color: var(--ink); border-color: var(--line); }
:root[data-theme="dark"] .gate-card { background: var(--card); }
:root[data-theme="dark"] .auth { background: var(--card); color: var(--ink); }
:root[data-theme="dark"] .pulse-map span { color: #04201a; }
:root[data-theme="dark"] .acc.e summary em { color: #5fd3a4; } :root[data-theme="dark"] .acc.d summary em { color: #ff9a90; }
:root[data-theme="dark"] .hero { background: radial-gradient(900px 480px at 85% -10%, rgba(40, 90, 150, .5), transparent 60%), linear-gradient(160deg, #03101f 0%, #062a52 55%, #08366a 100%); }
:root[data-theme="dark"] .app-top, :root[data-theme="dark"] .gate-side { background: linear-gradient(135deg, #03101f, #062a52 70%, #08366a); }
:root[data-theme="dark"] .side { background: linear-gradient(180deg, #03101f, #062a52); }
:root[data-theme="dark"] .btn.light { color: #fff; }
:root[data-theme="dark"] .btn:not(.ghost):not(.light):not(.danger):not(.red) { background: #2569b3; }
:root[data-theme="dark"] .chip[aria-pressed="true"], :root[data-theme="dark"] .kpi.net { background: #1d5fa8; }
@media (max-width: 600px) {
  .app-top .brand small { display: none; } .app-top .brand b { font-size: 15px; white-space: nowrap; }
  .app-top .user-chip .nm { display: none; }
}

/* ---------- الدخول بالبصمة ---------- */
.bio-box { margin-bottom: 4px; animation: rise .5s both; }
.bio-btn { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; border: 1.5px solid var(--blue); background: var(--sky-100); color: var(--ink); cursor: pointer; font: inherit; text-align: start; transition: transform .2s var(--ease), box-shadow .25s; }
.bio-btn:hover { box-shadow: 0 6px 18px rgba(12, 83, 158, .2); transform: translateY(-1px); } .bio-btn:active { transform: scale(.985); }
.bio-btn b { display: block; font-size: 16.5px; font-weight: 600; } .bio-btn small { color: var(--muted); font-size: 13px; }
.bio-ic { width: 50px; height: 50px; border-radius: 14px; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 26px; flex: none; position: relative; }
.bio-ic::after { content: ""; position: absolute; inset: -5px; border-radius: 18px; border: 2px solid var(--blue); opacity: 0; animation: livepulse 2.4s ease-out infinite; }
.bio-alt { display: block; margin: 10px auto 0; background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; }
.or { display: flex; align-items: center; gap: 12px; margin: 14px 0 4px; color: var(--muted); font-size: 12.5px; } .or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.bio-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.bio-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; } .bio-list li div { flex: 1; } .bio-list small { color: var(--muted); display: block; }

/* ---- health card ---- */
.hl-bars{display:flex;gap:8px;align-items:flex-end;height:90px;margin-bottom:6px}
.hl-b{flex:1;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:4px}
.hl-b i{display:block;width:100%;max-width:34px;border-radius:6px 6px 2px 2px;background:var(--blue);opacity:.85;transition:height .6s cubic-bezier(.2,.8,.2,1)}
.hl-b i.e{background:#c0392b}
.hl-b small{font-size:11px;color:var(--muted)}
.hl-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px}
.hl-grid>div{background:rgba(127,127,127,.1);border-radius:10px;padding:10px 12px}
.hl-grid small{display:block;font-size:12px;color:var(--muted)}
.hl-grid b{font-size:17px}
.hl-err{margin:12px 0 0;padding:10px 24px 10px 12px;border-radius:10px;background:rgba(192,57,43,.1);font-size:12.5px}
.badge.ok{background:rgba(22,163,74,.15);color:#15803d}
.badge.warn{background:rgba(217,119,6,.18);color:#b45309}
:root[data-theme="dark"] .badge.ok{color:#4ade80}
:root[data-theme="dark"] .badge.warn{color:#fbbf24}
:root[data-theme="dark"] .hl-grid>div{background:rgba(255,255,255,.06)}
:root[data-theme="dark"] .hl-err{background:rgba(248,113,113,.14);color:#fecaca}

/* ---- narrow header fix: no overlap on phones ---- */
@media (max-width: 520px) {
  .app-top .brand { flex: 1 1 auto; min-width: 0; }
  .app-top .brand > span { min-width: 0; overflow: hidden; }
  .app-top .brand b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
  .app-top .brand .logo { width: 42px; height: 42px; }
  .app-top .nav-actions { flex: none; gap: 6px; }
  .app-top #logout { font-size: 0; padding-inline: 10px; gap: 0; }
  .app-top #logout .i { width: 18px; height: 18px; }
}

/* =====================================================================
   v20 — أقل تمريراً: شريط سفلي + ورقة خيارات (هاتف) وصف تنقل واحد (حاسوب)
   ===================================================================== */
.navrow { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.navrow .views { margin: 0; }
.navrow .chips { margin: 0; padding: 4px 2px; flex: 1; min-width: 0; }
.only-m { display: none; }
.tabbar, .sheet, .sheet-bd { display: none; }
@media print { .tabbar, .sheet, .sheet-bd { display: none !important; } }

@media (min-width: 761px) {
  .sheet { display: block; position: static; background: none; padding: 0; box-shadow: none; transform: none; }
  .sheet-grip, .sheet-t { display: none; }
  .app-foot { padding: 4px 0 0; }
  .app-actions { margin: 10px 0 0; }
  .idcard { padding: 12px 20px; }
}

@media (max-width: 760px) {
  .app-main { padding: 10px 0 calc(86px + env(safe-area-inset-bottom)); }
  .app-top .nav { padding: 8px 0; }
  .welcome { margin-bottom: 0; }
  .idcard { padding: 10px 14px; gap: 12px; flex-wrap: nowrap; border-radius: 16px; }
  .id-av { width: 44px; height: 44px; font-size: 19px; border-radius: 12px; }
  .id-main { min-width: 0; }
  .id-main h1 { font-size: 17px; margin: 0 0 4px; }
  .id-main .greet { font-size: 11.5px; line-height: 1.2; }
  .idcard .meta { flex-wrap: nowrap; overflow: hidden; gap: 6px; }
  .idcard .badge { font-size: 11.5px; padding: 1px 9px; white-space: nowrap; }
  .navrow { margin-top: 10px; gap: 0; }
  .navrow .views { display: none; }
  .navrow .chips { padding: 2px 2px 6px; }
  .chip { padding: 6px 14px; font-size: 13.5px; }
  .net-hero { margin-top: 2px; padding: 13px 16px 15px; border-radius: 18px; }
  .nh-num { margin: 2px 0 10px; }
  .nh-num b { font-size: clamp(36px, 11.5vw, 46px); }
  .dpill small { display: none; }
  .nh-legend { margin-top: 9px; }
  .nh-legend b { font-size: 15px; }
  .acc-grid { margin-top: 8px; gap: 8px; }
  .acc { margin-top: 8px; border-radius: 14px; }
  .acc summary { padding: 8px 12px; gap: 10px; }
  .acc .ai { width: 30px; height: 30px; border-radius: 9px; }
  .acc summary b { font-size: 14.5px; }
  .acc summary em { font-size: 15.5px; }
  .app-foot { padding: 12px 0 0; }
  .dev-credit { font-size: 11px; padding: 4px 10px; text-align: start; line-height: 1.4; }
  .theme-fab { display: none; }
  .only-m { display: inline-flex; }

  /* الشريط السفلي */
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; inset-inline: 0; bottom: 0; z-index: 70; padding: 6px 10px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); box-shadow: 0 -8px 26px rgba(4, 26, 51, .08); }
  .tabbar[hidden] { display: none; }
  .tabbar button { position: relative; border: 0; background: none; display: grid; justify-items: center; gap: 1px; padding: 6px 0 4px; font: inherit; font-size: 11.5px; font-weight: 600; color: var(--muted); border-radius: 12px; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: color .25s, transform .2s var(--ease); }
  .tabbar button .i { font-size: 22px; transition: transform .35s var(--ease); }
  .tabbar button:active { transform: scale(.92); }
  .tabbar button[aria-pressed="true"], .tabbar button[aria-expanded="true"] { color: var(--navy); }
  .tabbar button[aria-pressed="true"] .i { transform: translateY(-2px) scale(1.12); }
  .tabbar button[aria-pressed="true"]::before { content: ""; position: absolute; top: -7px; width: 26px; height: 3px; border-radius: 0 0 4px 4px; background: linear-gradient(90deg, var(--red-2), var(--blue)); animation: tabInd .35s var(--ease) both; }
  @keyframes tabInd { from { transform: scaleX(0); } to { transform: scaleX(1); } }

  /* ورقة الخيارات */
  .sheet-bd { display: block; position: fixed; inset: 0; z-index: 80; background: rgba(4, 26, 51, .5); opacity: 0; pointer-events: none; transition: opacity .3s; }
  .sheet { display: block; position: fixed; inset-inline: 0; bottom: 0; z-index: 90; background: var(--card); border-radius: 22px 22px 0 0; padding: 10px 16px calc(16px + env(safe-area-inset-bottom)); box-shadow: 0 -14px 44px rgba(4, 26, 51, .3); transform: translateY(105%); visibility: hidden; transition: transform .38s var(--ease), visibility 0s .38s; max-height: 80svh; overflow: auto; }
  body.sheet-open .sheet-bd { opacity: 1; pointer-events: auto; }
  body.sheet-open .sheet { transform: none; visibility: visible; transition: transform .38s var(--ease); }
  .sheet-grip { display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--line-2); margin: 0 auto 10px; }
  .sheet-t { font-weight: 700; font-size: 15px; margin-bottom: 10px; color: var(--navy); }
  .sheet .app-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
  .sheet .app-actions .btn { width: 100%; justify-content: center; padding-inline: 8px; font-size: 14px; }
}
:root[data-theme="dark"] .tabbar { box-shadow: 0 -8px 26px rgba(0, 0, 0, .4); }
:root[data-theme="dark"] .tabbar button[aria-pressed="true"], :root[data-theme="dark"] .tabbar button[aria-expanded="true"] { color: #8fc3ff; }
:root[data-theme="dark"] .sheet-t { color: var(--ink); }
:root[data-theme="dark"] .sheet-bd { background: rgba(0, 0, 0, .6); }
@media (max-width:760px){.dc-long{display:none}}

/* حاسوب: الشريط في شاشة واحدة — الملخص يميناً والبنود يساراً */
@media (min-width: 1000px) {
  #slip-area.two { display: grid; grid-template-columns: 5fr 7fr; gap: 14px; align-items: start; margin-top: 12px; }
  #slip-area.two > .net-hero { grid-column: 1; margin-top: 0; }
  #slip-area.two > .acc-grid { grid-column: 2; grid-row: 1 / span 3; grid-template-columns: 1fr; margin-top: 0; }
  #slip-area.two > .acc.inf, #slip-area.two > .acc.cmp, #slip-area.two > .slip-note { grid-column: 1; margin-top: 0; }
  #slip-area.two .lines li { padding-block: 7px; }
}
@media (max-width: 760px) {
  .card.year { padding: 14px; }
  .cmp-top { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 4px; }
  .cmp-top > div { min-width: 0; padding: 9px 12px; }
  .cmp-top small { font-size: 11.5px; } .cmp-top b { font-size: 17px; }
  .year-sel { margin-bottom: 10px; }
  .year-bars { height: 150px; gap: 5px; } .year-bars .yb em { font-size: 9.5px; }
}

/* لوحة المعلومات: تبويبات بدل التمرير الطويل */
.dtabs { display: flex; gap: 6px; padding: 5px; margin: 16px 0 0; border-radius: 14px; background: var(--sky-100); overflow-x: auto; scrollbar-width: none; }
.dtabs::-webkit-scrollbar { display: none; }
.dtabs button { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; background: transparent; padding: 9px 16px; border-radius: 10px; font: inherit; font-weight: 700; font-size: 14px; color: var(--muted); cursor: pointer; white-space: nowrap; transition: background .25s, color .25s, box-shadow .25s, transform .2s var(--ease); }
.dtabs button:active { transform: scale(.96); }
.dtabs button[aria-pressed="true"] { background: var(--card); color: var(--navy); box-shadow: 0 2px 10px rgba(7, 49, 93, .14); }
.dtabs .i { font-size: 17px; }
.dpane.pin { animation: rise .45s var(--ease) both; }
.dpane > :first-child { margin-top: 14px !important; }
:root[data-theme="dark"] .dtabs button[aria-pressed="true"] { color: #8fc3ff; }
@media (max-width: 760px) { .dtabs button { padding: 9px 12px; font-size: 13px; } .dtabs .i { display: none; } }

/* لوحة الإدارة على الهاتف: ترويسة وبطاقات أخف لتقليل التمرير */
@media (max-width: 760px) {
  .topbar { padding: 8px 14px; gap: 8px; }
  .topbar h1 { font-size: 17px; white-space: nowrap; }
  .topbar .crumb { font-size: 11.5px; }
  .topbar .pt { display: none; }
  .page, .main { padding-top: 10px; }
  .alert { padding: 8px 12px; font-size: 12.5px; margin-top: 10px; line-height: 1.55; }
  .alert.trial { margin-bottom: 10px; }
  .sec-alert ul { margin: 2px 0 0; padding-inline-start: 16px; }
  .live-h { flex-wrap: wrap; gap: 6px 10px; margin-bottom: 8px; }
  .live-h h3 { font-size: 17px; flex: 1; }
  .live-h .btn.sm { padding: 6px 12px; font-size: 12.5px; }
  .live { font-size: 11px; padding: 3px 10px; }
  .live-grid .stat b { font-size: 21px; } .live-grid .stat small { font-size: 12px; }
  .dtabs { margin-top: 12px; }
  .card { padding: 14px; }
}

/* ---------- حركة أنيقة وهادئة ---------- */
/* فتح/إغلاق الأقسام بانسيابية (يعمل في المتصفحات الحديثة، ويبقى فورياً في غيرها) */
@supports (interpolate-size: allow-keywords) {
  .acc { interpolate-size: allow-keywords; }
  .acc::details-content { block-size: 0; overflow: clip; transition: block-size .38s var(--ease), content-visibility .38s allow-discrete; }
  .acc[open]::details-content { block-size: auto; }
}
.acc summary { transition: background .2s; } .acc summary:active { background: rgba(127, 127, 127, .07); }
.acc .lines li { animation: rise .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
/* دخول متتابع للصفحة */
#app:not([hidden]) .idcard { animation: rise .5s var(--ease) both; }
#app:not([hidden]) .navrow { animation: rise .45s .02s var(--ease) both; }
#app:not([hidden]) .net-hero { animation: rise .5s .04s var(--ease) both; }
#app:not([hidden]) .acc-grid > .acc:nth-child(1) { animation: rise .45s .1s var(--ease) both; }
#app:not([hidden]) .acc-grid > .acc:nth-child(2) { animation: rise .45s .15s var(--ease) both; }
#app:not([hidden]) #slip-area > .acc { animation: rise .45s .2s var(--ease) both; }
.tabbar { animation: tbUp .5s .2s var(--ease) both; }
@keyframes tbUp { from { transform: translateY(100%); } to { transform: none; } }
/* ضغط الأزرار والبطاقات */
.chip:active, .dtabs button:active, .views button:active { transform: scale(.95); }
.stat:active { transform: scale(.98); }
@media (prefers-reduced-motion: reduce) { .acc::details-content, .sheet, .sheet-bd, .tabbar { transition: none !important; animation: none !important; } }

/* =====================================================================
   v21 — إعدادات العرض، إخفاء الأرقام، كتابة تدريجية، جولة تعريفية، الصيانة
   ===================================================================== */
/* حجم الخط: تكبير/تصغير محتوى التطبيق كاملاً */
html[data-fs="sm"] .app-main { zoom: .92; }
html[data-fs="lg"] .app-main { zoom: 1.14; }
html[data-fs="xl"] .app-main { zoom: 1.28; }
html[data-fs="lg"] .tabbar, html[data-fs="lg"] .sheet { zoom: 1.08; }
html[data-fs="xl"] .tabbar, html[data-fs="xl"] .sheet { zoom: 1.16; }
html[data-fs="xl"] .nh-num b { font-size: clamp(30px, 8.6vw, 40px); }
html[data-fs="lg"] .nh-num b { font-size: clamp(32px, 9.6vw, 42px); }
html[data-fs="xl"] .app-main .id-main h1 { font-size: 15px; }
/* تباين عالٍ */
html[data-hc="1"] { --muted: #364354; --line: #a9b7c8; --line-2: #7f93ab; }
html[data-hc="1"][data-theme="dark"] { --muted: #d4deeb; --line: #4a6482; --line-2: #6b86a8; }
html[data-hc="1"] .acc, html[data-hc="1"] .card, html[data-hc="1"] .chip { border-width: 1.5px; }
html[data-hc="1"] .nh-legend small, html[data-hc="1"] .dpill small { opacity: 1; }
/* تقليل الحركة */
html[data-rm="1"] *, html[data-rm="1"] *::before, html[data-rm="1"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
/* إخفاء الأرقام */
.eye { display: none; align-items: center; gap: 6px; border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .14); color: #fff; font: inherit; font-weight: 700; font-size: 12.5px; padding: 3px 12px; border-radius: 99px; cursor: pointer; }
html[data-priv="1"] .eye { display: inline-flex; }
.eye .e-h { display: none; } #slip-area.rv .eye .e-h { display: inline-flex; align-items: center; gap: 6px; } #slip-area.rv .eye .e-s { display: none; }
.eye .e-s { display: inline-flex; align-items: center; gap: 6px; }
.year-sel .eye { margin-inline-start: auto; color: var(--navy); background: var(--sky-100); border-color: var(--line-2); }
html[data-priv="1"] #slip-area:not(.rv) :is(.num, .nh-num, .dpill, .cmp-top b, .yb em, .up, .down) { filter: blur(9px); user-select: none; -webkit-user-select: none; transition: filter .3s; }
#slip-area .num, #slip-area .nh-num { transition: filter .3s; }
@media print { .eye { display: none !important; } #slip-area :is(.num, .nh-num, .dpill) { filter: none !important; } }
/* كتابة تدريجية */
.typing::after { content: ""; display: inline-block; width: 2px; height: 1.05em; margin-inline-start: 3px; vertical-align: -.14em; background: currentColor; opacity: .9; animation: caret .75s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
/* نافذة الإعدادات */
.pf { padding: 2px 0 8px; } .pf > b { display: block; margin-bottom: 8px; }
.fs-seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fs-seg button { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--card); color: var(--ink); font: inherit; cursor: pointer; transition: border-color .2s, background .2s, transform .15s; }
.fs-seg button:active { transform: scale(.95); }
.fs-seg button[aria-pressed="true"] { border-color: var(--blue); background: var(--sky-100); }
.fs-seg .g { font-weight: 700; line-height: 1.2; } .g-sm { font-size: 14px; } .g-md { font-size: 18px; } .g-lg { font-size: 22px; } .g-xl { font-size: 27px; }
.fs-seg small { font-size: 11.5px; color: var(--muted); }
.pf-prev { margin-top: 10px; padding: 10px 14px; border-radius: 12px; background: var(--sky-100); color: var(--navy); font-size: 14px; }
.pf-prev b { font-size: 20px; }
.sr-t { display: grid; gap: 1px; } .sr-t small { color: var(--muted); font-size: 12.5px; line-height: 1.5; font-weight: 400; }
/* الجولة التعريفية */
.tour-bd { position: fixed; inset: 0; z-index: 300; }
.tour-hole { position: fixed; z-index: 301; border-radius: 16px; pointer-events: none; box-shadow: 0 0 0 100vmax rgba(4, 26, 51, .66), 0 0 0 2px rgba(255, 255, 255, .85) inset; opacity: 0; transition: opacity .3s; }
.tour-hole.go { transition: top .4s var(--ease), left .4s var(--ease), width .4s var(--ease), height .4s var(--ease), opacity .3s; }
.tour-hole.in { opacity: 1; }
/* الفقاعة تُوضَع بجوار الحقل المشروح (top/left تُحسب بالجافاسكربت) مع سهم يشير إليه */
.tour-card { position: fixed; z-index: 302; inset: auto; margin: 0; top: 0; left: 0; width: min(420px, calc(100vw - 28px)); background: var(--card); color: var(--ink); border-radius: 18px; padding: 14px 16px 14px; box-shadow: 0 18px 50px rgba(4, 26, 51, .45); opacity: 0; transition: opacity .3s; }
.tour-card.go { transition: opacity .3s, top .4s var(--ease), left .4s var(--ease); }
.tour-card.in { opacity: 1; }
.tc-arrow { position: absolute; width: 14px; height: 14px; background: var(--card); transform: rotate(45deg); border-radius: 3px; display: none; }
.tour-card.below .tc-arrow { display: block; top: -6px; }
.tour-card.above .tc-arrow { display: block; bottom: -6px; }
.tour-card.pop { animation: pop .35s var(--ease); } @keyframes pop { from { transform: translateY(8px) scale(.98); } to { transform: none; } }
.tc-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); font-weight: 600; }
.tc-skip { border: 0; background: none; color: var(--muted); font: inherit; font-size: 12.5px; cursor: pointer; padding: 2px 6px; }
.tour-card h4 { font-size: 16px; margin: 4px 0 4px; color: var(--navy); }
.tour-card p { font-size: 14px; line-height: 1.7; color: var(--ink); min-height: 3.4em; margin: 0; }
.tc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.dots { display: inline-flex; gap: 6px; } .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); transition: width .3s var(--ease), background .3s; } .dots i.on { width: 20px; border-radius: 6px; background: var(--blue); }
:root[data-theme="dark"] .tour-card h4 { color: #8fc3ff; }
/* تنصيب التطبيق */
.nav-actions { flex-shrink: 0; } .nav-actions .btn { white-space: nowrap; }
@media (max-width: 480px) { .nav-actions { gap: 6px; } .nav-actions .btn.sm { padding-inline: 11px; } .nav-actions .hs { display: none; } }
.install-bar { position: fixed; z-index: 80; inset-inline: 12px; bottom: calc(80px + env(safe-area-inset-bottom)); max-width: 460px; margin-inline: auto; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(4, 26, 51, .28); opacity: 0; transform: translateY(22px); transition: opacity .32s, transform .38s var(--ease); }
.install-bar.in { opacity: 1; transform: none; }
.ib-ic { flex: none; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--sky-100); color: var(--blue); }
.ib-ic .i { width: 22px; height: 22px; }
.ib-t { flex: 1; min-width: 0; display: grid; line-height: 1.45; } .ib-t b { font-size: 14px; color: var(--navy); } .ib-t small { font-size: 12px; color: var(--muted); }
.ib-x { flex: none; border: 0; background: none; color: var(--muted); padding: 8px; cursor: pointer; border-radius: 10px; } .ib-x .i { width: 16px; height: 16px; }
:root[data-theme="dark"] .ib-t b { color: #8fc3ff; }
.inst-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.inst-steps li { display: flex; gap: 12px; align-items: flex-start; }
.inst-steps li > b { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-size: 14px; }
.inst-steps li > span { line-height: 1.9; font-size: 14.5px; }
.inst-steps .i { width: 18px; height: 18px; vertical-align: -4px; color: var(--blue); }
.inst-note { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--sky-100); color: var(--navy); font-size: 13.5px; line-height: 1.7; }
/* شاشة الصيانة */
.maint { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; padding: 24px; background: linear-gradient(160deg, #041a33, #07315d 60%, #0c539e); color: #fff; animation: fadeIn .4s both; }
.maint-in { text-align: center; max-width: 380px; }
.maint-ic { width: 78px; height: 78px; margin: 0 auto 16px; border-radius: 24px; display: grid; place-items: center; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25); font-size: 36px; animation: maintPulse 2.4s ease-in-out infinite; }
@keyframes maintPulse { 50% { transform: scale(1.06); box-shadow: 0 0 0 14px rgba(255, 255, 255, .06); } }
.maint h2 { font-size: 24px; margin-bottom: 8px; color: #fff; } .maint p { color: #cfe0f3; min-height: 3em; margin-bottom: 18px; }
.maint .btn { background: #fff; color: var(--navy); }

.tc-n { direction: ltr; unicode-bidi: isolate; }
.modal { max-height: calc(100svh - 24px); overflow-y: auto; }
html[data-fs="lg"] .idcard .meta, html[data-fs="xl"] .idcard .meta { flex-wrap: wrap; }
html[data-fs="xl"] .idcard, html[data-fs="lg"] .idcard { flex-wrap: wrap; }
:root[data-theme="dark"] .sw input:checked + i { background: #2f7bd0; }
:root[data-theme="dark"] .sw i { background: #3a4a62; }
:root[data-theme="dark"] .pf-prev { color: var(--ink); background: rgba(255, 255, 255, .07); }
:root[data-theme="dark"] .fs-seg button[aria-pressed="true"] { background: rgba(47, 123, 208, .22); }
:root[data-theme="dark"] .year-sel .eye { color: #cfe2ff; background: rgba(255, 255, 255, .08); }

/* بطاقة استهلاك قاعدة البيانات */
.um-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.um-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.um-h small { color: var(--muted); font-weight: 500; }
.um-bar { height: 10px; border-radius: 8px; background: var(--line); overflow: hidden; margin-bottom: 5px; }
.um-bar i { display: block; height: 100%; border-radius: 8px; background: var(--ok); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.um-bar.w i { background: #d9890a; }
.um-bar.r i { background: var(--err); }
.ev-chips { display: flex; flex-wrap: wrap; gap: 8px; }
