/* مدار — الهيكل والمكوّنات */
.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.i-lg { width: 1.5em; height: 1.5em; } .i-xl { width: 2em; height: 2em; }

/* ---------- الهيكل ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; inset-block-start: 0; height: 100vh; background: var(--side-bg); color: var(--side-ink); display: flex; flex-direction: column; border-inline-end: 1px solid rgba(148, 170, 224, .12); z-index: 40; }
.side-brand { display: flex; align-items: center; gap: 12px; padding: 20px 18px 16px; text-decoration: none !important; color: #fff; }
.side-brand img { width: 46px; height: 46px; border-radius: 14px; background: #fff; padding: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .15), 0 8px 24px -8px rgba(44, 196, 244, .6); }
.side-brand b { display: block; font: 800 1.22rem/1.1 var(--font-head); letter-spacing: .01em; }
.side-brand small { display: block; color: #8fa2c6; font-size: .72rem; margin-block-start: 3px; }
.side-nav { flex: 1; overflow-y: auto; padding: 6px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.side-nav h6 { margin: 16px 10px 6px; font: 600 .7rem var(--font-body); letter-spacing: .08em; color: #6f82a8; text-transform: none; }
.nav-a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; color: var(--side-ink); font-weight: 500; font-size: .93rem; text-decoration: none !important; position: relative; transition: background .2s, color .2s; }
.nav-a:hover { background: rgba(148, 170, 224, .09); color: #fff; }
.nav-a[aria-current='page'] { background: linear-gradient(90deg, rgba(44, 196, 244, .2), rgba(44, 196, 244, .05)); color: #fff; box-shadow: inset 0 0 0 1px rgba(44, 196, 244, .28); }
.nav-a[aria-current='page']::before { content: ''; position: absolute; inset-inline-end: -12px; inset-block: 10px; width: 3px; border-radius: 3px; background: var(--brand); box-shadow: 0 0 12px var(--brand); }
.nav-a .i { opacity: .85; } .nav-a .pill { margin-inline-start: auto; }
.side-foot { padding: 12px; border-block-start: 1px solid rgba(148, 170, 224, .12); }
.userbox { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; width: 100%; background: rgba(148, 170, 224, .07); border: 0; cursor: pointer; text-align: start; color: #fff; }
.userbox:hover { background: rgba(148, 170, 224, .13); }
.userbox div { min-width: 0; flex: 1; } .userbox b { display: block; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .userbox small { color: #8fa2c6; font-size: .73rem; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; inset-block-start: 0; z-index: 30; height: var(--top); display: flex; align-items: center; gap: 10px; padding: 0 clamp(14px, 3vw, 32px); background: var(--glass); backdrop-filter: blur(16px) saturate(1.4); border-block-end: 1px solid var(--line); }
.top-title { font: 700 1.02rem var(--font-head); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.searchbtn { display: flex; align-items: center; gap: 10px; min-width: 240px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface2); color: var(--ink3); cursor: pointer; font-size: .88rem; }
.searchbtn:hover { border-color: var(--line2); color: var(--ink2); } .searchbtn kbd { margin-inline-start: auto; }
kbd { font-size: .72rem; border: 1px solid var(--line2); border-radius: 6px; padding: 1px 6px; background: var(--surface3); color: var(--ink2); }
#view { padding: clamp(16px, 3vw, 34px); max-width: var(--max); width: 100%; margin-inline: auto; flex: 1; animation: fadeUp .4s var(--ease); }
.menu-btn { display: none; }
.bnav { display: none; }
.scrim { position: fixed; inset: 0; background: rgba(2, 6, 16, .6); backdrop-filter: blur(3px); z-index: 35; opacity: 0; pointer-events: none; transition: opacity .25s; }
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset-block: 0; inset-inline-start: 0; width: min(86vw, 310px); transform: translateX(100%); transition: transform .3s var(--ease); box-shadow: var(--shadow-lg); }
  [dir='ltr'] .side { transform: translateX(-100%); }
  .side.open { transform: none; } .side.open ~ .scrim, .scrim.on { opacity: 1; pointer-events: auto; }
  .menu-btn { display: inline-grid; } .searchbtn { min-width: 0; padding: 9px; } .searchbtn span, .searchbtn kbd { display: none; }
  .bnav { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 30; background: var(--glass); backdrop-filter: blur(16px); border-block-start: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .bnav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; font-size: .68rem; color: var(--ink3); border-radius: 12px; text-decoration: none !important; } .bnav a[aria-current='page'] { color: var(--brand); background: var(--brand-bg); } .bnav .i { width: 1.4em; height: 1.4em; }
  #view { padding-block-end: 92px; }
}

/* ---------- أزرار وحقول ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 18px; border-radius: 12px; border: 1px solid var(--line2); background: var(--surface2); color: var(--ink); font-weight: 600; font-size: .92rem; cursor: pointer; text-decoration: none !important; transition: transform .15s, background .2s, border-color .2s, box-shadow .25s; white-space: nowrap; line-height: 1.5; }
.btn:hover { background: var(--surface3); border-color: var(--brand); } .btn:active { transform: translateY(1px) scale(.99); }
.btn.primary { background: linear-gradient(135deg, var(--brand), var(--brand-d)); color: var(--brand-ink); border-color: transparent; box-shadow: 0 8px 22px -10px var(--brand); }
.btn.primary:hover { box-shadow: var(--glow); filter: brightness(1.06); }
.btn.gold { background: linear-gradient(135deg, #f7d58a, #d9a441); color: #2a1c02; border-color: transparent; }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); background: var(--bad-bg); } .btn.danger:hover { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink2); } .btn.ghost:hover { background: var(--surface3); color: var(--ink); }
.btn.sm { padding: 5px 12px; font-size: .82rem; border-radius: 10px; } .btn.lg { padding: 13px 26px; font-size: 1rem; border-radius: 14px; } .btn.block { width: 100%; }
.btn.icon { padding: 9px; aspect-ratio: 1; border-radius: 12px; } .btn.icon.sm { padding: 6px; }
.btn[disabled], .btn.busy { opacity: .55; pointer-events: none; } .btn.busy::after { content: ''; width: 1em; height: 1em; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.field { display: grid; gap: 6px; align-content: start; } .field > label, .lbl { font-weight: 600; font-size: .85rem; color: var(--ink2); }
.field .hint { font-size: .78rem; color: var(--ink3); }
.input, .select, .textarea { width: 100%; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line2); background: var(--surface2); color: var(--ink); transition: border-color .2s, box-shadow .2s, background .2s; min-height: 42px; }
.textarea { min-height: 96px; resize: vertical; line-height: 1.7; } .select { appearance: none; padding-inline-end: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238aa0c8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 12px center; background-size: 18px; }
[dir='ltr'] .select { background-position: right 12px center; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink3); } .input:focus, .select:focus, .textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent); background: var(--surface); }
.input::placeholder, .textarea::placeholder { color: var(--ink3); } .input[type='number'], .input[dir='ltr'], .input.ltr { text-align: start; }
input[type='checkbox'], input[type='radio'] { width: 18px; height: 18px; accent-color: var(--brand); flex: none; cursor: pointer; } input[type='range'] { accent-color: var(--brand); width: 100%; } input[type='file'].input { padding: 8px 12px; }
.chk { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 6px 0; }
.form { display: grid; gap: 14px; } .row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; } .row.end { justify-content: flex-end; } .row.between { justify-content: space-between; } .grow { flex: 1 1 0; min-width: 0; }
.cols2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } .cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 640px) { .cols2, .cols3 { grid-template-columns: 1fr; } }
.pwbox { position: relative; } .pwbox .btn { position: absolute; inset-inline-end: 6px; inset-block-start: 50%; transform: translateY(-50%); } .pwbox .input { padding-inline-end: 50px; }
.meter { height: 6px; background: var(--surface3); border-radius: 6px; overflow: hidden; } .meter > i { display: block; height: 100%; width: 0; border-radius: 6px; transition: width .3s, background .3s; background: var(--bad); }

/* ---------- بطاقات ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: clamp(16px, 2vw, 24px); box-shadow: var(--shadow); position: relative; }
.card.flat { box-shadow: none; } .card.pad0 { padding: 0; overflow: hidden; } .card.glow { background: linear-gradient(160deg, var(--surface2), var(--surface)); }
.card.hover { transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; cursor: pointer; } .card.hover:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); box-shadow: var(--shadow), 0 20px 40px -24px var(--brand); }
.card-h { display: flex; align-items: center; gap: 10px; justify-content: space-between; margin-block-end: 14px; flex-wrap: wrap; } .card-h h2, .card-h h3 { display: flex; align-items: center; gap: 9px; } .card-h .i { color: var(--brand); }
.grid { display: grid; gap: 16px; } .g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); } .g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); } .g4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 16px; align-items: start; } .split.even { grid-template-columns: 1fr 1fr; } @media (max-width: 1000px) { .split, .split.even { grid-template-columns: 1fr; } }
.stack { display: grid; gap: 16px; align-content: start; } .stack.s { gap: 8px; } .stack.l { gap: 24px; }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-block-end: 24px; } .page-h p { color: var(--ink2); margin-block-start: 4px; max-width: 70ch; } .page-h .crumbs { font-size: .8rem; color: var(--ink3); margin-block-end: 6px; display: flex; gap: 6px; align-items: center; } .page-h .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.stat { display: flex; gap: 14px; align-items: center; padding: 16px 18px; } .stat .ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-bg); color: var(--brand); flex: none; }
.stat .ico.ok { background: var(--ok-bg); color: var(--ok); } .stat .ico.warn { background: var(--warn-bg); color: var(--warn); } .stat .ico.bad { background: var(--bad-bg); color: var(--bad); } .stat .ico.gold { background: var(--gold-bg); color: var(--gold); } .stat .ico.info { background: var(--info-bg); color: var(--info); }
.stat b { display: block; font: 800 1.65rem/1.15 var(--font-head); font-variant-numeric: tabular-nums; } .stat > div > span { color: var(--ink2); font-size: .84rem; display: block; } .stat small { color: var(--ink3); display: block; font-size: .75rem; }
.hero { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: clamp(22px, 3.5vw, 40px); background: radial-gradient(600px 300px at 100% 0%, rgba(44, 196, 244, .28), transparent 65%), radial-gradient(500px 300px at 0% 100%, rgba(123, 140, 255, .25), transparent 65%), linear-gradient(135deg, #0b1a36, #0a1226); color: #eaf0ff; border: 1px solid rgba(148, 170, 224, .2); box-shadow: var(--shadow-lg); }
.hero::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(148, 170, 224, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 170, 224, .07) 1px, transparent 1px); background-size: 34px 34px; mask-image: radial-gradient(circle at 80% 20%, #000, transparent 70%); pointer-events: none; }
.hero > * { position: relative; z-index: 1; } .hero h1 { color: #fff; } .hero p { color: #b6c4e4; } .hero .btn:not(.primary) { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .2); }

/* ---------- شارات وأشرطة ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: .74rem; font-weight: 600; background: var(--surface3); color: var(--ink2); border: 1px solid var(--line); white-space: nowrap; line-height: 1.7; }
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; } .badge.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; } .badge.bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; } .badge.info { background: var(--info-bg); color: var(--info); border-color: transparent; } .badge.brand { background: var(--brand-bg); color: var(--brand); border-color: transparent; } .badge.gold { background: var(--gold-bg); color: var(--gold); border-color: transparent; }
.pill { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--bad); color: #fff; font: 700 .68rem/20px var(--font-body); text-align: center; display: inline-block; }
.avatar { --s: 38px; width: var(--s); height: var(--s); border-radius: 50%; display: inline-grid; place-items: center; flex: none; font: 700 calc(var(--s) * .38) var(--font-head); color: #fff; background: linear-gradient(135deg, var(--h1, #2cc4f4), var(--h2, #7b8cff)); box-shadow: 0 0 0 2px rgba(255, 255, 255, .12); user-select: none; }
.progress { height: 8px; border-radius: 8px; background: var(--surface3); overflow: hidden; } .progress > i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--brand), var(--brand2)); transition: width .8s var(--ease); } .progress.ok > i { background: linear-gradient(90deg, #10b981, #34d399); } .progress.warn > i { background: linear-gradient(90deg, #f59e0b, #fbbf24); } .progress.bad > i { background: linear-gradient(90deg, #e11d48, #fb7185); } .progress.thin { height: 5px; }
.ring { position: relative; display: inline-grid; place-items: center; } .ring svg { transform: rotate(-90deg); } .ring .t { position: absolute; text-align: center; font: 800 1.15rem/1.1 var(--font-head); } .ring .t small { display: block; font: 500 .66rem var(--font-body); color: var(--ink3); }
.callout { display: flex; gap: 12px; padding: 12px 16px; border-radius: var(--r-m); background: var(--info-bg); color: var(--ink); border: 1px solid color-mix(in srgb, var(--info) 30%, transparent); font-size: .92rem; } .callout .i { color: var(--info); margin-block-start: 3px; } .callout.warn { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 35%, transparent); } .callout.warn .i { color: var(--warn); } .callout.ok { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 35%, transparent); } .callout.ok .i { color: var(--ok); } .callout.bad { background: var(--bad-bg); border-color: color-mix(in srgb, var(--bad) 35%, transparent); } .callout.bad .i { color: var(--bad); }
.empty { text-align: center; padding: 40px 20px; color: var(--ink2); display: grid; gap: 10px; justify-items: center; } .empty .i { width: 44px; height: 44px; color: var(--ink3); opacity: .8; } .empty h3 { color: var(--ink); }
.skel { border-radius: 10px; background: linear-gradient(90deg, var(--surface2) 25%, var(--surface3) 50%, var(--surface2) 75%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; min-height: 18px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 4px; background: var(--surface2); border: 1px solid var(--line); border-radius: 14px; margin-block-end: 18px; scrollbar-width: none; } .tabs::-webkit-scrollbar { display: none; }
.tab { padding: 8px 16px; border-radius: 10px; font-weight: 600; font-size: .88rem; color: var(--ink2); white-space: nowrap; cursor: pointer; border: 0; background: none; display: inline-flex; gap: 7px; align-items: center; text-decoration: none !important; } .tab:hover { color: var(--ink); background: var(--surface3); } .tab[aria-selected='true'], .tab.on { background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }
.seg { display: inline-flex; background: var(--surface2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; } .seg button { border: 0; background: none; padding: 5px 14px; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: .84rem; color: var(--ink2); } .seg button.on { background: var(--brand); color: var(--brand-ink); }

/* ---------- جداول وقوائم ---------- */
.tbl-wrap { overflow-x: auto; border-radius: var(--r-m); } table.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: start; font-weight: 600; font-size: .78rem; color: var(--ink3); padding: 10px 14px; border-block-end: 1px solid var(--line2); background: var(--surface2); white-space: nowrap; position: sticky; inset-block-start: 0; } .tbl td { padding: 11px 14px; border-block-end: 1px solid var(--line); vertical-align: middle; } .tbl tr:last-child td { border-block-end: 0; } .tbl tbody tr:hover td { background: color-mix(in srgb, var(--brand) 5%, transparent); } .tbl td.num, .tbl th.num { text-align: center; display: table-cell; direction: inherit; unicode-bidi: normal; }
.list { display: grid; } .li { display: flex; gap: 12px; align-items: center; padding: 12px 4px; border-block-end: 1px solid var(--line); } .li:last-child { border-block-end: 0; } .li > .grow b { display: block; } .li small { color: var(--ink3); }
a.li { color: inherit; text-decoration: none !important; border-radius: 10px; padding-inline: 10px; margin-inline: -6px; } a.li:hover { background: var(--surface2); }
.tl { position: relative; padding-inline-start: 22px; display: grid; gap: 16px; } .tl::before { content: ''; position: absolute; inset-inline-start: 6px; inset-block: 6px; width: 2px; background: var(--line2); } .tl > div { position: relative; } .tl > div::before { content: ''; position: absolute; inset-inline-start: -21px; inset-block-start: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-bg); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: .92rem; } .kv dt { color: var(--ink3); } .kv dd { margin: 0; font-weight: 500; }

/* ---------- نوافذ وقوائم منبثقة ---------- */
dialog.modal { border: 1px solid var(--line2); border-radius: var(--r-xl); padding: 0; background: var(--surface); color: var(--ink); width: min(94vw, 560px); max-height: 92vh; box-shadow: var(--shadow-lg); overflow: hidden; }
dialog.modal.wide { width: min(96vw, 880px); } dialog.modal::backdrop { background: rgba(2, 6, 16, .62); backdrop-filter: blur(4px); }
dialog.modal[open] { animation: fadeUp .25s var(--ease); display: flex; flex-direction: column; } .modal-h { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-block-end: 1px solid var(--line); } .modal-b { padding: 22px; overflow-y: auto; flex: 1; } .modal-f { padding: 14px 22px; border-block-start: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; background: var(--surface2); }
.pop { position: fixed; z-index: 70; min-width: 220px; max-width: 92vw; background: var(--surface); border: 1px solid var(--line2); border-radius: var(--r-m); box-shadow: var(--shadow-lg); padding: 6px; animation: fadeUp .18s var(--ease); }
.pop .mi { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 9px; background: none; border: 0; cursor: pointer; text-align: start; font-size: .9rem; color: var(--ink); text-decoration: none !important; } .pop .mi:hover { background: var(--surface3); } .pop .mi.bad { color: var(--bad); } .pop hr { margin: 6px 0; }
.cmdk { position: fixed; inset: 0; z-index: 80; display: grid; place-items: start center; padding-block-start: 12vh; background: rgba(2, 6, 16, .6); backdrop-filter: blur(5px); }
.cmdk-box { width: min(94vw, 640px); background: var(--surface); border: 1px solid var(--line2); border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden; animation: fadeUp .2s var(--ease); } .cmdk input { width: 100%; border: 0; background: none; padding: 18px 22px; font-size: 1.05rem; outline: 0; border-block-end: 1px solid var(--line); color: var(--ink); } .cmdk-list { max-height: 52vh; overflow-y: auto; padding: 8px; } .cmdk-list h6 { margin: 8px 10px 4px; font-size: .72rem; color: var(--ink3); font-weight: 600; } .cmdk-i { display: flex; gap: 12px; align-items: center; padding: 9px 12px; border-radius: 12px; cursor: pointer; text-decoration: none !important; color: var(--ink); } .cmdk-i[aria-selected='true'] { background: var(--brand-bg); } .cmdk-i small { color: var(--ink3); display: block; }
#toasts { position: fixed; inset-block-end: 20px; inset-inline-end: 20px; z-index: 100; display: grid; gap: 10px; max-width: min(92vw, 400px); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line2); box-shadow: var(--shadow-lg); animation: fadeUp .3s var(--ease); font-size: .92rem; } .toast .i { margin-block-start: 3px; } .toast.ok .i { color: var(--ok); } .toast.bad .i { color: var(--bad); } .toast.warn .i { color: var(--warn); } .toast.info .i { color: var(--info); }
@media (max-width: 980px) { #toasts { inset-block-end: 86px; inset-inline: 12px; max-width: none; } }

/* ---------- تقويم وجدول ---------- */
.tt { display: grid; grid-template-columns: 64px repeat(5, minmax(120px, 1fr)); min-width: 760px; border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; } .tt > div { padding: 8px; border-inline-start: 1px solid var(--line); border-block-end: 1px solid var(--line); min-height: 64px; font-size: .82rem; } .tt .th { background: var(--surface2); font-weight: 700; text-align: center; min-height: 0; } .tt .hr { background: var(--surface2); color: var(--ink3); text-align: center; font-family: var(--font-mono); font-size: .72rem; }
.ev { padding: 6px 9px; border-radius: 9px; background: var(--brand-bg); border-inline-start: 3px solid var(--brand); font-size: .8rem; line-height: 1.45; margin-block-end: 4px; } .ev b { display: block; } .ev small { color: var(--ink2); } .ev.lab { background: var(--ok-bg); border-color: var(--ok); } .ev.warn { background: var(--warn-bg); border-color: var(--warn); } .ev.bad { background: var(--bad-bg); border-color: var(--bad); } .ev.gold { background: var(--gold-bg); border-color: var(--gold); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; } .cal .dh { text-align: center; font-size: .75rem; color: var(--ink3); font-weight: 600; padding: 4px; } .cal .d { min-height: 98px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 6px; overflow: hidden; } .cal .d.out { opacity: .4; } .cal .d.today { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); } .cal .d > b { font-size: .8rem; color: var(--ink2); display: block; margin-block-end: 3px; } .cal .ev { padding: 2px 6px; font-size: .7rem; margin-block-end: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 720px) { .cal .d { min-height: 62px; padding: 3px; } .cal .ev { display: none; } .cal .d.has::after { content: ''; display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); margin: 2px auto 0; } }
.kan { display: grid; grid-template-columns: repeat(3, minmax(220px, 1fr)); gap: 14px; overflow-x: auto; } .kan-col { background: var(--surface2); border: 1px solid var(--line); border-radius: var(--r-l); padding: 12px; min-height: 160px; display: grid; gap: 10px; align-content: start; } .kan-col.over { outline: 2px dashed var(--brand); } .kan-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; cursor: grab; box-shadow: var(--shadow); font-size: .9rem; } .kan-card.dragging { opacity: .4; }

/* ---------- صفحات الدخول ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-hero { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(28px, 5vw, 64px); background: radial-gradient(700px 500px at 20% 10%, rgba(44, 196, 244, .3), transparent 60%), radial-gradient(600px 500px at 90% 100%, rgba(123, 140, 255, .28), transparent 60%), linear-gradient(160deg, #081327, #050a16 70%); color: #eaf0ff; }
.auth-hero::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(148, 170, 224, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 170, 224, .06) 1px, transparent 1px); background-size: 42px 42px; mask-image: radial-gradient(ellipse at 30% 40%, #000, transparent 75%); }
.auth-hero > * { position: relative; } .auth-hero h1 { font-size: clamp(2rem, 1.2rem + 3vw, 3.4rem); line-height: 1.25; color: #fff; } .auth-hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--brand), #9db0ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-logo { display: flex; align-items: center; gap: 14px; } .auth-logo img { width: 60px; height: 60px; border-radius: 18px; background: #fff; padding: 4px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .2), 0 12px 40px -10px rgba(44, 196, 244, .7); }
.auth-feats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-block-start: 28px; } .auth-feats div { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: rgba(148, 170, 224, .07); border: 1px solid rgba(148, 170, 224, .14); font-size: .86rem; color: #c3d0ee; } .auth-feats .i { color: var(--brand); margin-block-start: 3px; }
.auth-form { display: grid; place-items: center; padding: 28px; } .auth-card { width: min(100%, 440px); display: grid; gap: 18px; } .auth-card h2 { font-size: 1.6rem; }
.orbit { position: absolute; inset-inline-end: -120px; inset-block-start: 14%; width: 460px; height: 460px; opacity: .28; pointer-events: none; animation: spin 90s linear infinite; } html[data-motion='off'] .orbit { animation: none; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-hero { padding-block: 28px 36px; } .auth-feats, .orbit { display: none; } }
.demo-box { border: 1px dashed var(--line2); border-radius: var(--r-m); padding: 12px; display: grid; gap: 8px; } .demo-box .row .btn { flex: 1; }

/* ---------- تفاصيل ---------- */
.course-hero { display: grid; gap: 10px; } .chip-row { display: flex; gap: 8px; flex-wrap: wrap; } .copy-code { font: 800 2.6rem/1 var(--font-mono); letter-spacing: .25em; direction: ltr; padding: 14px 22px; border-radius: 18px; background: var(--surface2); border: 1px dashed var(--brand); color: var(--brand); text-align: center; }
.qa { display: grid; gap: 10px; } .opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line2); background: var(--surface2); cursor: pointer; transition: border-color .2s, background .2s; } .opt:hover { border-color: var(--brand); } .opt:has(input:checked) { border-color: var(--brand); background: var(--brand-bg); } .opt.right { border-color: var(--ok); background: var(--ok-bg); } .opt.wrong { border-color: var(--bad); background: var(--bad-bg); }
.fc { perspective: 1200px; } .fc-in { position: relative; min-height: 220px; transition: transform .6s var(--ease); transform-style: preserve-3d; cursor: pointer; } .fc.flip .fc-in { transform: rotateY(180deg); } .fc-f, .fc-b { position: absolute; inset: 0; backface-visibility: hidden; display: grid; place-content: center; text-align: center; padding: 28px; border-radius: var(--r-xl); background: linear-gradient(160deg, var(--surface2), var(--surface)); border: 1px solid var(--line2); font-size: 1.2rem; box-shadow: var(--shadow); } .fc-b { transform: rotateY(180deg); border-color: var(--brand); }
.heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 14px); gap: 4px; direction: ltr; } .heat i { width: 14px; height: 14px; border-radius: 4px; background: var(--surface3); } .heat i[data-l='1'] { background: color-mix(in srgb, var(--brand) 30%, var(--surface3)); } .heat i[data-l='2'] { background: color-mix(in srgb, var(--brand) 55%, var(--surface3)); } .heat i[data-l='3'] { background: color-mix(in srgb, var(--brand) 80%, var(--surface3)); } .heat i[data-l='4'] { background: var(--brand); }
.idcard { width: min(100%, 440px); aspect-ratio: 1.586; border-radius: 22px; padding: 22px; color: #fff; position: relative; overflow: hidden; background: radial-gradient(420px 260px at 100% 0%, rgba(44, 196, 244, .5), transparent 60%), linear-gradient(135deg, #0b1d3d, #060d1e); box-shadow: var(--shadow-lg); border: 1px solid rgba(255, 255, 255, .15); display: grid; grid-template-rows: auto 1fr auto; }
.idcard .qr { background: #fff; padding: 6px; border-radius: 12px; width: 92px; height: 92px; } .idcard .qr svg { width: 100%; height: 100%; display: block; }
.sig { display: inline-flex; align-items: center; gap: 4px; direction: ltr; } .rank1 { color: var(--gold); }
.chart { width: 100%; height: auto; display: block; overflow: visible; } .chart text { font-family: var(--font-body); fill: var(--ink3); font-size: 11px; } .chart .grid-l { stroke: var(--line); stroke-width: 1; } .chart .axis { stroke: var(--line2); } .bar { transition: opacity .2s; } .bar:hover { opacity: .8; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--ink2); } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 6px; vertical-align: -1px; }
.rtf { white-space: pre-wrap; word-break: break-word; line-height: 1.9; } .rtf a { text-decoration: underline; }
.drop { border: 2px dashed var(--line2); border-radius: var(--r-l); padding: 26px; text-align: center; color: var(--ink2); transition: border-color .2s, background .2s; cursor: pointer; } .drop.over, .drop:hover { border-color: var(--brand); background: var(--brand-bg); }
.sticky-r { position: sticky; inset-block-start: calc(var(--top) + 16px); }
.fab { position: fixed; inset-block-end: 24px; inset-inline-end: 24px; z-index: 25; }

/* ---------- 2.3: الهوية — الصفحة الشخصية، الشارات، البطاقة الحية، صفحة التحقق ---------- */
.pf-hero { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; }
.pf-hero .avatar, .pf-photo { width: 112px; height: 112px; border-radius: 30px; font-size: 2.2rem; border: 3px solid rgba(255, 255, 255, .22); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); object-fit: cover; }
.pf-hero h1 { font-size: clamp(1.4rem, 3vw, 2rem); margin: 0; }
.pf-handle { font: 600 .92rem var(--font-mono); color: #8fd8ff; direction: ltr; display: inline-block; }
.pf-head { color: #dbe6ff; font-size: 1.02rem; margin-top: 6px; }
.pf-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pf-links a { display: inline-flex; gap: 6px; align-items: center; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .18); font-size: .84rem; }
.pf-links a:hover { background: rgba(255, 255, 255, .2); }
@media (max-width: 720px) { .pf-hero { grid-template-columns: 1fr; text-align: center; justify-items: center; } .pf-links { justify-content: center; } }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.bdg { position: relative; display: grid; justify-items: center; text-align: center; gap: 6px; padding: 16px 10px 14px; border-radius: var(--r-l); background: linear-gradient(170deg, var(--surface2), var(--surface)); border: 1px solid var(--line2); }
.bdg .bdg-i { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(135deg, var(--gold), #f59e0b); color: #1a1205; box-shadow: 0 6px 18px color-mix(in srgb, var(--gold) 40%, transparent); }
.bdg .bdg-i svg { width: 26px; height: 26px; }
.bdg b { font-size: .9rem; } .bdg small { color: var(--ink3); font-size: .74rem; line-height: 1.5; }
.bdg.locked { opacity: .62; } .bdg.locked .bdg-i { background: var(--surface3); color: var(--ink3); box-shadow: none; }
.bdg .progress { width: 100%; margin-top: 2px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; } .skill-tags span { padding: 6px 12px; border-radius: 10px; background: var(--brand-bg); color: var(--brand); font-size: .84rem; font-weight: 600; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.person { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); transition: border-color .2s, transform .2s; color: inherit; min-width: 0; }
.person:hover { border-color: var(--brand); transform: translateY(-2px); }
.person > div { min-width: 0; } .person b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person small { display: block; color: var(--ink3); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uname { font-family: var(--font-mono); direction: ltr; unicode-bidi: isolate; }
.uname-row { display: flex; align-items: stretch; direction: ltr; } .uname-row span { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--line2); border-inline-end: 0; border-radius: var(--r-m) 0 0 var(--r-m); background: var(--surface2); color: var(--ink3); font-family: var(--font-mono); font-size: .85rem; }
.uname-row .input { border-radius: 0 var(--r-m) var(--r-m) 0; font-family: var(--font-mono); }
.vcode { font: 700 1.05rem var(--font-mono); letter-spacing: .08em; direction: ltr; display: inline-block; padding: 6px 12px; border-radius: 10px; background: var(--surface2); border: 1px dashed var(--line2); }
/* البطاقة الحية: لمعان متحرك وساعة بالثواني تثبت أنها ليست لقطة شاشة */
.idcard.live::before { content: ''; position: absolute; inset: -40%; background: linear-gradient(115deg, transparent 42%, rgba(143, 216, 255, .16) 50%, transparent 58%); animation: holo 4.5s linear infinite; pointer-events: none; }
@keyframes holo { from { transform: translateX(-30%) } to { transform: translateX(30%) } }
.idcard .live-clock { font: 700 .78rem var(--font-mono); direction: ltr; color: #8fd8ff; display: inline-flex; align-items: center; gap: 6px; }
.idcard .live-clock i, .vf-live i { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52, 211, 153, .7); animation: pulse 1.6s infinite; display: inline-block; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0) } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0) } }
.idcard .avatar { border: 2px solid rgba(255, 255, 255, .3); }
/* صفحة التحقق العامة */
.vf { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--mesh, var(--bg)); background-color: var(--bg); }
.vf-box { width: min(100%, 460px); display: grid; gap: 16px; }
.vf-card { border-radius: 26px; overflow: hidden; background: var(--surface); border: 1px solid var(--line2); box-shadow: var(--shadow-lg); }
.vf-top { padding: 22px; display: grid; justify-items: center; gap: 10px; text-align: center; color: #fff; background: linear-gradient(135deg, #047857, #10b981); }
.vf-top.no { background: linear-gradient(135deg, #991b1b, #ef4444); } .vf-top.warn { background: linear-gradient(135deg, #92400e, #f59e0b); }
.vf-top .vf-ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .2); animation: pop .5s var(--ease); } .vf-top .vf-ic svg { width: 34px; height: 34px; }
@keyframes pop { from { transform: scale(.4); opacity: 0 } }
.vf-top h1 { color: #fff; font-size: 1.3rem; margin: 0; }
.vf-body { padding: 20px 22px; display: grid; gap: 14px; }
.vf-person { display: flex; gap: 14px; align-items: center; } .vf-person .avatar, .vf-person .pf-photo { width: 84px; height: 84px; border-radius: 22px; font-size: 1.6rem; border: 0; box-shadow: none; }
.vf-live { display: flex; justify-content: center; align-items: center; gap: 8px; font: 700 1.1rem var(--font-mono); direction: ltr; padding: 10px; border-radius: 14px; background: var(--surface2); }

/* 2.5: منع النصوص الطويلة بلا مسافات (بصمات، روابط) من توسيع الصفحة أفقياً */
.split.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 1000px) { .split.even { grid-template-columns: minmax(0, 1fr); } }
.kv { grid-template-columns: auto minmax(0, 1fr); } .kv dd { min-width: 0; overflow-wrap: anywhere; }
.grid > *, .stack > *, .split > * { min-width: 0; }

/* بطاقات الدخول المطبوعة */
.slips { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 14px; }
.slip { border: 1.5px dashed var(--line2); border-radius: 14px; padding: 14px 16px; background: var(--surface); break-inside: avoid; page-break-inside: avoid; display: grid; gap: 8px; }
.slip-h { display: flex; gap: 10px; align-items: center; } .slip-h img { border-radius: 9px; background: #fff; padding: 2px; }
.slip-h b { display: block; font: 800 1rem var(--font-head); } .slip-h small { color: var(--ink3); font-size: .74rem; }
.slip-b { display: flex; gap: 12px; align-items: center; } .slip-i { flex: 1; min-width: 0; }
.slip-name { font: 800 1.1rem var(--font-head); } .slip-meta { color: var(--ink3); font-size: .8rem; margin-bottom: 6px; }
.slip dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 10px; margin: 0; font-size: .85rem; }
.slip dt { color: var(--ink3); } .slip dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; text-align: right; }
.slip .mono { font-size: 1rem; letter-spacing: .03em; white-space: nowrap; }
.slip-link { margin: 6px 0 0; font-size: .74rem; color: var(--ink3); overflow-wrap: anywhere; text-align: left; }
.slip-qr { width: 96px; flex: none; } .slip-qr svg { width: 96px; height: 96px; display: block; }
.slip-n { font-size: .72rem; color: var(--ink3); margin: 0; }
@media print {
  .slips { grid-template-columns: 1fr 1fr; gap: 4mm; }
  .slip { background: #fff; color: #000; border-color: #888; padding: 3mm 4mm; gap: 4px; font-size: 11px; }
  .slip-name { font-size: 14px; } .slip .mono { font-size: 13px; } .slip-qr, .slip-qr svg { width: 72px; height: 72px; }
  .page-head p { display: none; }
  .slip dt, .slip-meta, .slip-n, .slip-h small { color: #444; }
}
