/* ==========================================================================
   المنصة التعليمية — نظام التصميم
   ثيمان مأخوذان من هوية "آفاق" (كحلي/بنفسجي/تركوازي/ذهبي) و"زونارا" (عنابي/وردي)
   ========================================================================== */

:root {
  --font-ar: 'Tajawal', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --font-en: 'Montserrat', 'Tajawal', system-ui, sans-serif;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --sidebar-w: 272px;
  --danger: #E5484D;
  --danger-soft: rgba(229, 72, 77, .12);
}

html[data-theme="afaq"] {
  --c1: #0B1F44;          /* كحلي عميق */
  --c2: #6A4EBF;          /* بنفسجي ملكي */
  --c3: #00B3A4;          /* تركوازي هادئ */
  --c4: #D4AF7C;          /* ذهبي ناعم */
  --c5: #F4F6FB;          /* رمادي فاتح */
  --c2-rgb: 106, 78, 191;
  --c1-rgb: 11, 31, 68;
  --bg: #F4F6FB;
  --bg-2: #EBEEF8;
  --surface: #FFFFFF;
  --surface-2: #F7F8FC;
  --text: #0B1F44;
  --text-2: #3B4767;
  --muted: #7A84A0;
  --border: #E3E7F2;
  --primary: #0B1F44;
  --primary-ink: #FFFFFF;
  --accent: #6A4EBF;
  --accent-soft: rgba(106, 78, 191, .12);
  --accent-2: #00B3A4;
  --accent-2-soft: rgba(0, 179, 164, .12);
  --gold: #D4AF7C;
  --gold-soft: rgba(212, 175, 124, .18);
  --success: #00A596;
  --success-soft: rgba(0, 179, 164, .13);
  --warning: #C8913F;
  --warning-soft: rgba(212, 175, 124, .22);
  --sidebar-bg: radial-gradient(120% 60% at 100% 0%, rgba(106, 78, 191, .45) 0%, transparent 60%), linear-gradient(180deg, #0B1F44 0%, #111f4f 55%, #1b1f5e 100%);
  --sidebar-text: #C3CBE6;
  --sidebar-active: rgba(255, 255, 255, .1);
  --hero-bg: radial-gradient(90% 120% at 0% 100%, rgba(0, 179, 164, .35) 0%, transparent 55%), radial-gradient(80% 90% at 15% 0%, rgba(106, 78, 191, .65) 0%, transparent 60%), linear-gradient(135deg, #0B1F44 0%, #1d2563 60%, #3b2f8c 100%);
  --grad: linear-gradient(90deg, #0B1F44, #6A4EBF 50%, #00B3A4);
  --grad-soft: linear-gradient(135deg, #6A4EBF, #00B3A4);
  --logo-1: #A78BFA; --logo-2: #6A4EBF; --logo-3: #F6E2C0; --logo-4: #D4AF7C;
  --page-3d: linear-gradient(135deg, #8E74E0, #6A4EBF);
  --page-3d-b: linear-gradient(135deg, #F3DDB7, #D4AF7C);
  --shadow-sm: 0 1px 2px rgba(11, 31, 68, .06), 0 2px 8px rgba(11, 31, 68, .04);
  --shadow: 0 10px 30px -12px rgba(11, 31, 68, .18), 0 2px 6px rgba(11, 31, 68, .05);
  --shadow-lg: 0 30px 60px -20px rgba(11, 31, 68, .35);
  --glass: rgba(255, 255, 255, .72);
  --chart-1: #6A4EBF; --chart-2: #00B3A4; --chart-3: #D4AF7C; --chart-4: #0B1F44; --chart-5: #E5484D;
}

html[data-theme="zunara"] {
  --c1: #581C35;          /* عنابي ملكي */
  --c2: #873653;          /* وردي مائل للموف */
  --c3: #D9A6B5;          /* وردي فاتح */
  --c4: #F7EDEF;          /* وردي عاجي */
  --c5: #30252B;          /* بنفسجي داكن */
  --c2-rgb: 135, 54, 83;
  --c1-rgb: 88, 28, 53;
  --bg: #FBF4F6;
  --bg-2: #F5E7EB;
  --surface: #FFFFFF;
  --surface-2: #FDF8F9;
  --text: #30252B;
  --text-2: #5A4750;
  --muted: #977F89;
  --border: #EFDDE3;
  --primary: #581C35;
  --primary-ink: #FFFFFF;
  --accent: #873653;
  --accent-soft: rgba(135, 54, 83, .11);
  --accent-2: #B5677F;
  --accent-2-soft: rgba(217, 166, 181, .3);
  --gold: #C99A86;
  --gold-soft: rgba(217, 166, 181, .28);
  --success: #3A9479;
  --success-soft: rgba(58, 148, 121, .13);
  --warning: #B9783F;
  --warning-soft: rgba(201, 140, 90, .18);
  --sidebar-bg: radial-gradient(120% 60% at 100% 0%, rgba(217, 166, 181, .28) 0%, transparent 60%), linear-gradient(180deg, #3d1124 0%, #581C35 55%, #6d2443 100%);
  --sidebar-text: #EBCFD8;
  --sidebar-active: rgba(255, 255, 255, .12);
  --hero-bg: radial-gradient(90% 120% at 0% 100%, rgba(217, 166, 181, .45) 0%, transparent 55%), radial-gradient(80% 90% at 15% 0%, rgba(135, 54, 83, .8) 0%, transparent 60%), linear-gradient(135deg, #3d1124 0%, #581C35 55%, #873653 100%);
  --grad: linear-gradient(90deg, #581C35, #873653 50%, #D9A6B5);
  --grad-soft: linear-gradient(135deg, #873653, #D9A6B5);
  --logo-1: #F2C9D5; --logo-2: #D9A6B5; --logo-3: #FFFFFF; --logo-4: #F7EDEF;
  --page-3d: linear-gradient(135deg, #E9B9C7, #B5677F);
  --page-3d-b: linear-gradient(135deg, #FFF7F9, #EBCFD8);
  --shadow-sm: 0 1px 2px rgba(88, 28, 53, .06), 0 2px 8px rgba(88, 28, 53, .04);
  --shadow: 0 10px 30px -12px rgba(88, 28, 53, .2), 0 2px 6px rgba(88, 28, 53, .05);
  --shadow-lg: 0 30px 60px -20px rgba(88, 28, 53, .38);
  --glass: rgba(255, 255, 255, .74);
  --chart-1: #873653; --chart-2: #D9A6B5; --chart-3: #581C35; --chart-4: #C99A86; --chart-5: #E5484D;
}

html[data-theme="lagoon"] {
  --c1: #0E2A3B;          /* أزرق البحر العميق */
  --c2: #FF6B4A;          /* مرجاني */
  --c3: #14B8A6;          /* فيروزي البحيرة */
  --c4: #FFC447;          /* أصفر الشمس */
  --c5: #F3F7F6;
  --c2-rgb: 255, 107, 74;
  --c1-rgb: 14, 42, 59;
  --bg: #F3F7F6;
  --bg-2: #E8F0EE;
  --surface: #FFFFFF;
  --surface-2: #F6FAF9;
  --text: #0E2A3B;
  --text-2: #3E5868;
  --muted: #7B8F99;
  --border: #DFE9E7;
  --primary: #0E2A3B;
  --primary-ink: #FFFFFF;
  --accent: #F2603F;
  --accent-soft: rgba(255, 107, 74, .12);
  --accent-2: #0FA595;
  --accent-2-soft: rgba(20, 184, 166, .13);
  --gold: #F2B634;
  --gold-soft: rgba(255, 196, 71, .2);
  --success: #0FA595;
  --success-soft: rgba(20, 184, 166, .13);
  --warning: #D9921C;
  --warning-soft: rgba(255, 196, 71, .22);
  --sidebar-bg: radial-gradient(120% 60% at 100% 0%, rgba(20, 184, 166, .32) 0%, transparent 60%), radial-gradient(100% 50% at 0% 100%, rgba(255, 107, 74, .22) 0%, transparent 60%), linear-gradient(180deg, #0E2A3B 0%, #113549 55%, #0F4250 100%);
  --sidebar-text: #BFD3D8;
  --sidebar-active: rgba(255, 255, 255, .1);
  --hero-bg: radial-gradient(90% 120% at 0% 100%, rgba(255, 107, 74, .42) 0%, transparent 55%), radial-gradient(80% 90% at 15% 0%, rgba(20, 184, 166, .6) 0%, transparent 60%), linear-gradient(135deg, #0E2A3B 0%, #12405A 60%, #0F5A63 100%);
  --grad: linear-gradient(90deg, #0E2A3B, #14B8A6 50%, #FF6B4A);
  --grad-soft: linear-gradient(135deg, #FF6B4A, #FF9F43);
  --logo-1: #FFB199; --logo-2: #FF6B4A; --logo-3: #FFF1C9; --logo-4: #FFC447;
  --page-3d: linear-gradient(135deg, #3FD0C0, #14B8A6);
  --page-3d-b: linear-gradient(135deg, #FFE7B5, #FFC447);
  --shadow-sm: 0 1px 2px rgba(14, 42, 59, .06), 0 2px 8px rgba(14, 42, 59, .04);
  --shadow: 0 10px 30px -12px rgba(14, 42, 59, .2), 0 2px 6px rgba(14, 42, 59, .05);
  --shadow-lg: 0 30px 60px -20px rgba(14, 42, 59, .38);
  --glass: rgba(255, 255, 255, .74);
  --chart-1: #FF6B4A; --chart-2: #14B8A6; --chart-3: #FFC447; --chart-4: #0E2A3B; --chart-5: #E5484D;
}

/* بوابة عشتار — لازوردي بابلي وذهب الرافدين على رقّ عتيق (هوية منصة الحضارات) */
html[data-theme="ishtar"] {
  --c1: #0B1E4A;          /* لازوردي عميق */
  --c2: #C9A04E;          /* ذهب الرافدين */
  --c3: #2F7E8C;          /* فيروزي مزجّج */
  --c4: #E9CF8E;          /* ذهب فاتح */
  --c5: #F7F1E4;
  --c2-rgb: 201, 160, 78;
  --c1-rgb: 11, 30, 74;
  --bg: #F7F1E4;
  --bg-2: #EFE5D0;
  --surface: #FFFDF8;
  --surface-2: #FAF5EA;
  --text: #16203F;
  --text-2: #464C63;
  --muted: #8C8574;
  --border: #E8DDC6;
  --primary: #0B1E4A;
  --primary-ink: #FFFFFF;
  --accent: #A97E2C;
  --accent-soft: rgba(201, 160, 78, .16);
  --accent-2: #2F7E8C;
  --accent-2-soft: rgba(47, 126, 140, .13);
  --gold: #C9A04E;
  --gold-soft: rgba(233, 207, 142, .3);
  --success: #2E8A6A;
  --success-soft: rgba(46, 138, 106, .13);
  --warning: #C07A1C;
  --warning-soft: rgba(233, 180, 90, .22);
  --sidebar-bg: radial-gradient(120% 50% at 100% 0%, rgba(201, 160, 78, .28) 0%, transparent 60%), radial-gradient(100% 50% at 0% 100%, rgba(47, 126, 140, .3) 0%, transparent 60%), linear-gradient(180deg, #0B1E4A 0%, #10275C 55%, #14306B 100%);
  --sidebar-text: #C9CFE3;
  --sidebar-active: rgba(233, 207, 142, .14);
  --hero-bg: radial-gradient(90% 120% at 0% 100%, rgba(201, 160, 78, .45) 0%, transparent 55%), radial-gradient(80% 90% at 15% 0%, rgba(47, 126, 140, .55) 0%, transparent 60%), linear-gradient(135deg, #0B1E4A 0%, #15317A 60%, #1B3A8C 100%);
  --grad: linear-gradient(90deg, #0B1E4A, #2F7E8C 50%, #C9A04E);
  --grad-soft: linear-gradient(135deg, #C9A04E, #E9CF8E);
  --logo-1: #E9CF8E; --logo-2: #C9A04E; --logo-3: #FFF6DE; --logo-4: #E9CF8E;
  --page-3d: linear-gradient(135deg, #2456B8, #1B3A8C);
  --page-3d-b: linear-gradient(135deg, #F3DFA6, #C9A04E);
  --shadow-sm: 0 1px 2px rgba(11, 30, 74, .06), 0 2px 8px rgba(11, 30, 74, .04);
  --shadow: 0 10px 30px -12px rgba(11, 30, 74, .22), 0 2px 6px rgba(11, 30, 74, .05);
  --shadow-lg: 0 30px 60px -20px rgba(11, 30, 74, .4);
  --glass: rgba(255, 253, 248, .78);
  --chart-1: #C9A04E; --chart-2: #2F7E8C; --chart-3: #1B3A8C; --chart-4: #B4532A; --chart-5: #E5484D;
}

/* ----------------------------- أساسيات ----------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font-ar);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 800; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
code, .mono, [dir="ltr"].mono { font-family: var(--font-en); }
code { background: var(--accent-soft); color: var(--accent); padding: 2px 6px; border-radius: 6px; font-size: .85em; direction: ltr; unicode-bidi: embed; }
.muted { color: var(--muted); }
.latin { font-family: var(--font-en); letter-spacing: .25em; }
.num { font-family: var(--font-en); font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
::selection { background: rgba(var(--c2-rgb), .25); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
svg.i { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ----------------------------- الشعار ----------------------------- */
.logo-mark { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; }
.logo-mark svg, .logo-mark img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .18)); }
.logo-mark.md { width: 46px; height: 46px; }
.logo-mark.lg { width: 64px; height: 64px; }
.logo-mark.xl { width: 128px; height: 108px; }

/* ----------------------------- الأزرار ----------------------------- */
.btn {
  --b-bg: var(--surface); --b-fg: var(--text); --b-bd: var(--border);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--b-bd);
  background: var(--b-bg); color: var(--b-fg); font-weight: 700; font-size: 14px; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s, opacity .2s; white-space: nowrap; position: relative;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.primary { --b-bg: var(--primary); --b-fg: var(--primary-ink); --b-bd: transparent; }
.btn.accent { --b-bg: var(--accent); --b-fg: #fff; --b-bd: transparent; }
.btn.gradient { background: var(--grad-soft); color: #fff; border: 0; }
.btn.ghost { --b-bg: transparent; --b-fg: var(--accent); --b-bd: color-mix(in srgb, var(--accent) 35%, transparent); }
.btn.soft { --b-bg: var(--accent-soft); --b-fg: var(--accent); --b-bd: transparent; }
.btn.danger { --b-bg: var(--danger-soft); --b-fg: var(--danger); --b-bd: transparent; }
.btn.danger.solid { --b-bg: var(--danger); --b-fg: #fff; }
.btn.success { --b-bg: var(--success-soft); --b-fg: var(--success); --b-bd: transparent; }
.btn.sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn.lg { height: 52px; padding: 0 28px; font-size: 16px; }
.btn.block { width: 100%; }
.btn.icon { width: 38px; padding: 0; }
.btn.sm.icon { width: 34px; }
.btn.glow { box-shadow: 0 14px 40px -10px rgba(var(--c2-rgb), .7); }
.btn.loading { color: transparent !important; pointer-events: none; }
.btn.loading::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-color: rgba(255,255,255,.9) rgba(255,255,255,.9) transparent transparent; animation: spin .7s linear infinite; }
.btn.loading:not(.primary):not(.accent):not(.gradient)::after { border-color: var(--accent) var(--accent) transparent transparent; }
.icon-btn { width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; position: relative; transition: .2s var(--ease); }
.icon-btn:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); transform: translateY(-1px); }
.badge-dot { position: absolute; top: 7px; inset-inline-end: 7px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--surface); font-family: var(--font-en); }

/* ----------------------------- الحقول ----------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 700; color: var(--text-2); }
.field small.hint { font-size: 12px; color: var(--muted); }
.field small.ok { color: var(--success); font-size: 12px; }
.field small.err, .field .error-text { color: var(--danger); font-size: 12px; }
.input, .field input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"]), .field select, .field textarea, select.input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--border);
  background: var(--surface); transition: border-color .2s, box-shadow .2s; outline: none; font-size: 14px;
}
.field textarea { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); }
.field select, select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237A84A0' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 14px center; padding-left: 36px; }
.input-wrap { position: relative; }
.input-wrap .input-icon { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); cursor: pointer; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; }
.input-wrap input { padding-inline-end: 44px !important; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.section-title { font-size: 15px; color: var(--accent); margin-top: 6px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-weight: 600; font-size: 14px; }
.switch input { appearance: none; width: 46px; height: 26px; border-radius: 99px; background: var(--border); position: relative; cursor: pointer; transition: .25s var(--ease); flex: none; margin: 0; }
.switch input::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,.2); transition: .25s var(--ease); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { inset-inline-start: 23px; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); padding: 4px; border-radius: 999px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; transition: .2s; display: inline-flex; gap: 6px; align-items: center; }
.seg button.active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm); }
.seg button .count { font-family: var(--font-en); font-size: 11px; background: var(--accent-soft); color: var(--accent); padding: 0 7px; border-radius: 99px; }

/* ----------------------------- التنبيهات والشارات ----------------------------- */
.alert { padding: 12px 16px; border-radius: 14px; font-size: 14px; margin-bottom: 14px; border: 1px solid transparent; }
.alert.success { background: var(--success-soft); color: var(--success); }
.alert.danger { background: var(--danger-soft); color: var(--danger); }
.alert.info { background: var(--accent-soft); color: var(--accent); }
.alert.warning { background: var(--warning-soft); color: var(--warning); }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: 99px; font-size: 12px; font-weight: 800; white-space: nowrap; background: var(--surface-2); color: var(--text-2); }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge.active { background: var(--success-soft); color: var(--success); }
.badge.trial { background: var(--accent-soft); color: var(--accent); }
.badge.expired { background: var(--warning-soft); color: var(--warning); }
.badge.suspended, .badge.cancelled { background: var(--danger-soft); color: var(--danger); }
.badge.none { background: var(--surface-2); color: var(--muted); }
.badge.scheduled { background: var(--accent-2-soft); color: var(--accent-2); }
.badge.lesson { background: var(--accent-2-soft); color: var(--accent-2); }
.badge.exam { background: var(--gold-soft); color: var(--warning); }

/* ----------------------------- البطاقات ----------------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 22px; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.card-head h3 { font-size: 17px; display: flex; align-items: center; gap: 10px; }
.card-head p { font-size: 13px; }
.card-head .head-icon { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.glass { background: var(--glass); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border: 1px solid rgba(255, 255, 255, .6); }
.grid { display: grid; gap: 20px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.span-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: 20px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }

/* ----------------------------- التخطيط ----------------------------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: none; background: var(--sidebar-bg); color: var(--sidebar-text);
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 16px; overflow-y: auto; overflow-x: hidden; z-index: 40;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent;
}
.sidebar::before { content: ''; position: absolute; inset: auto -60px -80px auto; width: 240px; height: 240px; border-radius: 50%; border: 1px solid rgba(255,255,255,.08); pointer-events: none; }
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 14px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { color: #fff; font-size: 19px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { font-size: 12px; opacity: .75; }
.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.nav-label { font-size: 11px; font-weight: 800; letter-spacing: .04em; opacity: .5; padding: 14px 12px 6px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; color: var(--sidebar-text); font-weight: 600; font-size: 14.5px; transition: background .2s, color .2s, transform .25s var(--ease); position: relative; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; transform: translateX(-3px); }
.nav a.active { background: var(--sidebar-active); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.nav a.active::before { content: ''; position: absolute; inset-inline-start: -16px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--gold); box-shadow: 0 0 14px var(--gold); }
html[dir="rtl"] .nav a.active::before { border-radius: 4px 0 0 4px; }
.nav a .i { opacity: .9; }
.nav a .nav-count { margin-inline-start: auto; font-family: var(--font-en); font-size: 11px; background: rgba(255,255,255,.12); padding: 1px 8px; border-radius: 99px; }
.sidebar-promo { margin-top: 18px; padding: 18px; border-radius: 20px; background: linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.03)); border: 1px solid rgba(255,255,255,.1); color: #fff; display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; }
.sidebar-promo small { opacity: .75; font-size: 12px; margin-bottom: 10px; }
.sidebar-promo .btn.ghost { --b-fg: #fff; --b-bd: rgba(255,255,255,.3); align-self: flex-start; }
.promo-3d { position: absolute; top: 14px; inset-inline-end: 18px; perspective: 400px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; padding: 16px 32px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.page-heading { min-width: 0; }
.page-heading h1 { font-size: 22px; white-space: nowrap; }
.page-heading p { font-size: 13px; }
.topbar-search { position: relative; flex: 1; max-width: 440px; margin-inline-start: auto; }
.topbar-search input { width: 100%; height: 44px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); padding: 0 44px 0 14px; outline: none; transition: .2s; }
.topbar-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search-icon { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); display: grid; }
.search-results { position: absolute; top: calc(100% + 8px); inset-inline: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 8px; max-height: 420px; overflow: auto; }
.search-results .sr-group { font-size: 11px; font-weight: 800; color: var(--muted); padding: 8px 10px 4px; }
.search-results a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; color: var(--text); }
.search-results a:hover, .search-results a.focus { background: var(--accent-soft); }
.search-results .empty { padding: 16px; text-align: center; color: var(--muted); font-size: 13px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.user-menu { position: relative; }
.user-chip { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); background: var(--surface); padding: 4px 4px 4px 14px; border-radius: 99px; cursor: pointer; }
.user-meta { display: flex; flex-direction: column; text-align: start; line-height: 1.2; }
.user-meta strong { font-size: 13px; }
.user-meta small { font-size: 11px; color: var(--muted); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--grad-soft); font-size: 14px; flex: none; box-shadow: inset 0 -3px 6px rgba(0,0,0,.15), 0 4px 10px -2px rgba(var(--c2-rgb), .45); }
.avatar.lg { width: 72px; height: 72px; font-size: 26px; border-radius: 24px; }
.dropdown { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; min-width: 200px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 50; animation: pop .2s var(--ease); }
.dropdown a, .dropdown button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 0; background: transparent; color: var(--text); font-size: 14px; cursor: pointer; text-align: start; }
.dropdown a:hover, .dropdown button:hover { background: var(--surface-2); }
.dropdown .danger { color: var(--danger); }
.view { padding: 28px 32px 48px; outline: none; animation: viewIn .45s var(--ease); }
.only-mobile { display: none; }
.sidebar-backdrop { display: none; }

/* ----------------------------- البطل ثلاثي الأبعاد ----------------------------- */
.hero { position: relative; overflow: hidden; border-radius: var(--radius-xl); background: var(--hero-bg); color: #fff; padding: 34px 38px; min-height: 230px; display: flex; align-items: center; isolation: isolate; box-shadow: var(--shadow-lg); }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(1px 1px at 20% 30%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 70% 20%, rgba(255,255,255,.8) 50%, transparent 51%), radial-gradient(1.5px 1.5px at 40% 80%, rgba(255,255,255,.7) 50%, transparent 51%), radial-gradient(1px 1px at 85% 65%, #fff 50%, transparent 51%); opacity: .6; z-index: -1; }
.hero::after { content: ''; position: absolute; inset: auto -10% -60% -10%; height: 90%; background: radial-gradient(50% 50% at 50% 50%, rgba(255, 221, 170, .35), transparent 70%); z-index: -1; }
.hero-copy { position: relative; z-index: 2; max-width: 56%; }
.hero-copy .eyebrow { font-family: var(--font-en); letter-spacing: .3em; font-size: 11px; color: var(--gold); text-transform: uppercase; margin-bottom: 8px; }
.hero-copy h2 { font-size: 30px; margin-bottom: 8px; }
.hero-copy p { opacity: .8; margin-bottom: 20px; }
.hero .btn.light { --b-bg: #fff; --b-fg: var(--primary); --b-bd: transparent; }
.hero .btn.glass-btn { --b-bg: rgba(255,255,255,.12); --b-fg: #fff; --b-bd: rgba(255,255,255,.25); backdrop-filter: blur(8px); }
.hero .scene3d { position: absolute; inset-inline-end: 3%; top: 50%; transform: translateY(-50%); width: 340px; height: 260px; }
.hero-wave { position: absolute; inset: auto 0 0 0; height: 70px; z-index: -1; opacity: .5; }

.scene3d { perspective: 1100px; pointer-events: none; }
.scene3d-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transform: rotateX(calc(52deg + var(--py, 0deg))) rotateZ(calc(-24deg + var(--px, 0deg))); transition: transform .6s var(--ease); }
.book3d { position: absolute; left: 50%; top: 52%; width: 0; height: 0; transform-style: preserve-3d; animation: floatY 6s ease-in-out infinite; }
.page3d { position: absolute; width: 120px; height: 150px; top: -75px; border-radius: 6px 18px 18px 6px; transform-style: preserve-3d; background: var(--page-3d); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.page3d.left { right: 0; transform-origin: right center; transform: rotateY(-28deg); border-radius: 18px 6px 6px 18px; }
.page3d.right { left: 0; transform-origin: left center; transform: rotateY(28deg); }
.page3d i { display: block; height: 5px; margin: 22px 18px 0; border-radius: 3px; background: rgba(255,255,255,.4); }
.page3d i:nth-child(2) { width: 60%; margin-top: 12px; }
.page3d i:nth-child(3) { width: 75%; margin-top: 12px; }
.page3d.flip { left: 0; transform-origin: left center; background: var(--page-3d-b); animation: flip 5s var(--ease) infinite; opacity: .96; }
.spine3d { position: absolute; width: 8px; height: 150px; top: -75px; left: -4px; background: linear-gradient(180deg, var(--c4, #D4AF7C), rgba(0,0,0,.25)); border-radius: 4px; transform: translateZ(-6px); }
.star3d { position: absolute; left: 50%; top: 52%; width: 46px; height: 46px; margin: -23px; transform: translateZ(150px) rotateX(-52deg); background: linear-gradient(135deg, #FFF3DA, var(--gold)); clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); filter: drop-shadow(0 0 18px rgba(255, 220, 160, .9)); animation: starPulse 3s ease-in-out infinite; }
.ring3d { position: absolute; left: 50%; top: 52%; width: 300px; height: 300px; margin: -150px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.22); transform: translateZ(-10px); box-shadow: 0 0 40px rgba(var(--c2-rgb), .25) inset; }
.ring3d.r1::after { content: ''; position: absolute; top: -6px; left: 50%; width: 12px; height: 12px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 16px var(--accent-2); }
.ring3d.r1 { animation: orbit 14s linear infinite; }
.ring3d.r2 { width: 220px; height: 220px; margin: -110px; border-style: dashed; border-color: rgba(255,255,255,.14); animation: orbit 22s linear infinite reverse; }
.cube3d { position: absolute; width: 34px; height: 34px; transform-style: preserve-3d; animation: cubeSpin 12s linear infinite; }
.cube3d b { position: absolute; inset: 0; border-radius: 6px; background: var(--grad-soft); opacity: .92; box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.cube3d b:nth-child(1) { transform: translateZ(17px); }
.cube3d b:nth-child(2) { transform: rotateY(180deg) translateZ(17px); }
.cube3d b:nth-child(3) { transform: rotateY(90deg) translateZ(17px); filter: brightness(.85); }
.cube3d b:nth-child(4) { transform: rotateY(-90deg) translateZ(17px); filter: brightness(.85); }
.cube3d b:nth-child(5) { transform: rotateX(90deg) translateZ(17px); filter: brightness(1.15); }
.cube3d b:nth-child(6) { transform: rotateX(-90deg) translateZ(17px); filter: brightness(.7); }
.cube3d.c1 { left: 8%; top: 18%; transform: translateZ(60px); }
.cube3d.c2 { right: 6%; bottom: 14%; width: 22px; height: 22px; animation-duration: 9s; }
.cube3d.c2 b:nth-child(1) { transform: translateZ(11px); } .cube3d.c2 b:nth-child(2) { transform: rotateY(180deg) translateZ(11px); }
.cube3d.c2 b:nth-child(3) { transform: rotateY(90deg) translateZ(11px); } .cube3d.c2 b:nth-child(4) { transform: rotateY(-90deg) translateZ(11px); }
.cube3d.c2 b:nth-child(5) { transform: rotateX(90deg) translateZ(11px); } .cube3d.c2 b:nth-child(6) { transform: rotateX(-90deg) translateZ(11px); }
.cube3d.mini { position: relative; display: block; width: 26px; height: 26px; }
.cube3d.mini b:nth-child(1) { transform: translateZ(13px); } .cube3d.mini b:nth-child(2) { transform: rotateY(180deg) translateZ(13px); }
.cube3d.mini b:nth-child(3) { transform: rotateY(90deg) translateZ(13px); } .cube3d.mini b:nth-child(4) { transform: rotateY(-90deg) translateZ(13px); }
.cube3d.mini b:nth-child(5) { transform: rotateX(90deg) translateZ(13px); } .cube3d.mini b:nth-child(6) { transform: rotateX(-90deg) translateZ(13px); }
.spark { position: absolute; width: 14px; height: 14px; background: var(--gold); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: twinkle 2.8s ease-in-out infinite; }
.spark.s1 { left: 18%; top: 70%; } .spark.s2 { right: 20%; top: 10%; animation-delay: .8s; width: 10px; height: 10px; } .spark.s3 { left: 60%; bottom: 0; animation-delay: 1.6s; width: 8px; height: 8px; background: #fff; }

/* tilt */
[data-tilt] { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0); transition: transform .5s var(--ease), box-shadow .3s; transform-style: preserve-3d; will-change: transform; }
[data-tilt].tilting { transition: transform .08s linear, box-shadow .3s; }

/* ----------------------------- KPI ----------------------------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.kpi { position: relative; overflow: hidden; padding: 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 14px; cursor: default; }
.kpi:hover { box-shadow: var(--shadow); }
.kpi::after { content: ''; position: absolute; inset-inline-end: -40px; bottom: -50px; width: 140px; height: 140px; border-radius: 50%; background: var(--kpi-c, var(--accent)); opacity: .07; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-icon { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, color-mix(in srgb, var(--kpi-c, var(--accent)) 75%, #fff), var(--kpi-c, var(--accent))); box-shadow: 0 12px 22px -8px var(--kpi-c, var(--accent)), inset 0 2px 0 rgba(255,255,255,.35), inset 0 -4px 8px rgba(0,0,0,.15); transform: translateZ(30px); }
.kpi-icon .i { width: 24px; height: 24px; }
.kpi-value { font-size: 30px; font-weight: 800; font-family: var(--font-en); line-height: 1; letter-spacing: -.02em; transform: translateZ(20px); }
.kpi-label { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.kpi-trend { font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 99px; background: var(--success-soft); color: var(--success); font-family: var(--font-en); }
.kpi-trend.down { background: var(--danger-soft); color: var(--danger); }
.kpi-trend.flat { background: var(--surface-2); color: var(--muted); }
.kpi.link { cursor: pointer; }

/* ----------------------------- الرسوم البيانية ----------------------------- */
.chart { width: 100%; height: 240px; position: relative; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .grid-line { stroke: var(--border); stroke-dasharray: 3 5; }
.chart .axis-label { fill: var(--muted); font-size: 10px; font-family: var(--font-en); }
.chart .dot { fill: var(--surface); stroke-width: 2.5; opacity: 0; transition: opacity .2s; }
.chart .hover-col:hover + .dot, .chart .dot.show { opacity: 1; }
.chart-tip { position: absolute; pointer-events: none; background: var(--primary); color: #fff; font-size: 12px; padding: 8px 12px; border-radius: 12px; box-shadow: var(--shadow-lg); transform: translate(50%, -110%); white-space: nowrap; z-index: 3; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 10px; height: 10px; border-radius: 4px; display: inline-block; }
.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; justify-content: center; }
.donut { width: 180px; height: 180px; position: relative; flex: none; }
.donut svg { transform: rotate(-90deg); width: 100%; height: 100%; filter: drop-shadow(0 10px 16px rgba(var(--c1-rgb), .15)); }
.donut circle { fill: none; stroke-width: 22; transition: stroke-dasharray .9s var(--ease); }
.donut-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; align-content: center; }
.donut-center strong { font-size: 28px; font-family: var(--font-en); display: block; line-height: 1; }
.donut-center small { color: var(--muted); font-size: 12px; }
.donut-legend { display: flex; flex-direction: column; gap: 10px; min-width: 150px; flex: 1; }
.donut-legend div { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.donut-legend i { width: 10px; height: 10px; border-radius: 4px; }
.donut-legend b { margin-inline-start: auto; font-family: var(--font-en); }
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 90px 1fr 44px; gap: 10px; align-items: center; font-size: 13px; }
.bar-track { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; background: var(--grad-soft); width: 0; transition: width 1s var(--ease); }
.bar-row b { font-family: var(--font-en); text-align: end; }

/* ----------------------------- القوائم ----------------------------- */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 6px; border-bottom: 1px dashed var(--border); min-width: 0; }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .sub { font-size: 12px; color: var(--muted); }
.list-item a.title { color: var(--text); }
.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty-state .empty-ico { width: 72px; height: 72px; border-radius: 24px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); transform: rotate(-8deg); }
.empty-state .empty-ico .i { width: 32px; height: 32px; }
.empty-state h4 { color: var(--text); font-size: 16px; }

/* ----------------------------- الجداول ----------------------------- */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .search { position: relative; flex: 1; min-width: 220px; max-width: 360px; }
.toolbar .search input { width: 100%; height: 42px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); padding: 0 40px 0 12px; outline: none; }
.toolbar .search input:focus { border-color: var(--accent); }
.toolbar .search .i { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.toolbar select.input { height: 42px; width: auto; min-width: 150px; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
table.table { width: 100%; border-collapse: collapse; min-width: 760px; }
.table th { text-align: start; font-size: 12px; font-weight: 800; color: var(--muted); padding: 13px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: color-mix(in srgb, var(--accent-soft) 40%, transparent); }
.table tbody tr.clickable { cursor: pointer; }
.cell-user { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cell-user .avatar { width: 38px; height: 38px; font-size: 14px; border-radius: 13px; }
.cell-user strong { display: block; font-size: 14px; white-space: nowrap; }
.cell-user small { color: var(--muted); font-size: 12px; font-family: var(--font-en); }
.cell-actions { display: flex; gap: 6px; justify-content: flex-end; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.pagination .pages { display: flex; gap: 6px; }
.pagination button { min-width: 36px; height: 36px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-family: var(--font-en); font-weight: 700; }
.pagination button.active { background: var(--primary); color: var(--primary-ink); border-color: transparent; }
.pagination button:disabled { opacity: .4; cursor: default; }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--bg-2) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 12px; }
.countdown { font-family: var(--font-en); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 13px; direction: ltr; display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
.countdown.warn { color: var(--warning); }
.countdown.over { color: var(--danger); }

/* ----------------------------- عداد الاشتراك الكبير ----------------------------- */
.timer { display: flex; gap: 10px; justify-content: center; perspective: 600px; }
.timer-unit { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.timer-box { width: 68px; height: 72px; border-radius: 18px; display: grid; place-items: center; font-family: var(--font-en); font-size: 28px; font-weight: 700; color: #fff; background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 80%, #fff 0%), var(--primary)); box-shadow: 0 14px 24px -12px rgba(var(--c1-rgb), .6), inset 0 1px 0 rgba(255,255,255,.25), inset 0 -10px 20px rgba(0,0,0,.18); position: relative; transform: rotateX(8deg); }
.timer-box::after { content: ''; position: absolute; inset: 50% 0 auto; height: 1px; background: rgba(0,0,0,.18); }
.timer-unit small { font-size: 12px; color: var(--muted); }
.timer.dead .timer-box { background: linear-gradient(160deg, #b9bfcf, #8a91a5); }

/* ----------------------------- النوافذ ----------------------------- */
.modal-layer { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(var(--c1-rgb), .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .2s ease; overflow-y: auto; }
.modal { width: min(560px, 100%); background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); animation: modalIn .4s var(--ease); display: flex; flex-direction: column; max-height: calc(100vh - 40px); }
.modal.lg { width: min(860px, 100%); }
.modal.xl { width: min(1100px, 100%); }
.modal-head { display: flex; align-items: center; gap: 14px; padding: 22px 24px 0; }
.modal-head h3 { font-size: 19px; flex: 1; }
.modal-head .head-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.modal-body { padding: 20px 24px; overflow-y: auto; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 0 24px 22px; flex-wrap: wrap; }
.modal-layer.closing { animation: fade .2s ease reverse forwards; }
.modal-layer.closing .modal { animation: modalOut .2s ease forwards; }
.preview-frame { width: 100%; height: 70vh; border: 0; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 1px var(--border); }
.preview-video { width: 100%; max-height: 70vh; border-radius: 18px; background: #000; }

/* ----------------------------- الإشعارات ----------------------------- */
.toasts { position: fixed; bottom: 24px; inset-inline-start: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; gap: 12px; min-width: 260px; max-width: 380px; padding: 14px 16px; border-radius: 16px; background: var(--primary); color: #fff; box-shadow: var(--shadow-lg); animation: toastIn .4s var(--ease); font-size: 14px; font-weight: 600; }
.toast .t-ico { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.15); flex: none; }
.toast.success .t-ico { background: var(--success); }
.toast.error .t-ico { background: var(--danger); }
.toast.out { animation: toastOut .3s ease forwards; }

/* ----------------------------- تفاصيل الطالب ----------------------------- */
.profile-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.profile-head h2 { font-size: 22px; }
.profile-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.info-item { padding: 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); }
.info-item small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 2px; }
.info-item strong { font-size: 14px; word-break: break-word; }
.timer-card { padding: 22px; border-radius: 24px; background: linear-gradient(160deg, var(--surface-2), var(--surface)); border: 1px solid var(--border); text-align: center; }
.timer-card h4 { margin-bottom: 14px; font-size: 14px; color: var(--text-2); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 16px; font-weight: 700; color: var(--muted); cursor: pointer; border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.active { color: var(--accent); border-color: var(--accent); }
.preset-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.preset { border: 1.5px solid var(--border); background: var(--surface); border-radius: 16px; padding: 12px 8px; cursor: pointer; text-align: center; transition: .2s var(--ease); }
.preset strong { display: block; font-size: 20px; font-family: var(--font-en); }
.preset small { color: var(--muted); font-size: 12px; }
.preset:hover { border-color: var(--accent); transform: translateY(-2px); }
.preset.active { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-soft); }
.preset.active strong { color: var(--accent); }
.summary-box { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); font-weight: 700; flex-wrap: wrap; font-size: 14px; }

/* ----------------------------- الدروس ----------------------------- */
.lessons-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.lesson-card { position: relative; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.lesson-card:hover { box-shadow: var(--shadow); }
.lesson-cover { height: 132px; position: relative; overflow: hidden; background: linear-gradient(135deg, var(--sc, var(--accent)), color-mix(in srgb, var(--sc, var(--accent)) 50%, var(--primary))); display: grid; place-items: center; color: #fff; }
.lesson-cover::before { content: ''; position: absolute; width: 180px; height: 180px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); inset-inline-end: -50px; top: -60px; }
.lesson-cover::after { content: ''; position: absolute; width: 120px; height: 120px; border-radius: 40px; background: rgba(255,255,255,.08); inset-inline-start: -30px; bottom: -50px; transform: rotate(30deg); }
.lesson-cover .cover-ico { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: rgba(255,255,255,.18); backdrop-filter: blur(6px); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 14px 26px -10px rgba(0,0,0,.4); transform: translateZ(40px) rotate(-6deg); z-index: 1; }
.lesson-cover .cover-ico .i { width: 30px; height: 30px; }
.lesson-cover .badges { position: absolute; top: 12px; inset-inline: 12px; display: flex; justify-content: space-between; z-index: 2; }
.lesson-cover .badge { background: rgba(255,255,255,.92); }
.lesson-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.lesson-body h4 { font-size: 15.5px; }
.lesson-meta { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.lesson-meta span { background: var(--surface-2); padding: 2px 9px; border-radius: 99px; }
.lesson-foot { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-top: 1px solid var(--border); }
.lesson-foot .views { font-size: 12px; color: var(--muted); display: inline-flex; gap: 4px; align-items: center; margin-inline-end: auto; }
.lesson-card.draft .lesson-cover { filter: grayscale(.7); }

/* معالج الرفع */
.wizard { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.step-card { position: relative; }
.step-card .step-num { width: 32px; height: 32px; border-radius: 11px; display: grid; place-items: center; background: var(--grad-soft); color: #fff; font-weight: 800; font-family: var(--font-en); font-size: 14px; box-shadow: 0 8px 16px -6px rgba(var(--c2-rgb), .6); }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.choice { position: relative; border: 2px solid var(--border); border-radius: 22px; padding: 20px; cursor: pointer; background: var(--surface); transition: .25s var(--ease); display: flex; gap: 14px; align-items: center; text-align: start; overflow: hidden; }
.choice:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); transform: translateY(-2px); }
.choice.active { border-color: var(--accent); background: linear-gradient(160deg, var(--accent-soft), transparent); box-shadow: 0 14px 30px -18px rgba(var(--c2-rgb), .8); }
.choice.active::after { content: '✓'; position: absolute; top: 10px; inset-inline-end: 12px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; display: grid; place-items: center; font-weight: 800; }
.choice .ch-ico { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; flex: none; color: #fff; background: var(--grad-soft); box-shadow: 0 12px 20px -8px rgba(var(--c2-rgb), .6), inset 0 2px 0 rgba(255,255,255,.3); transform: rotate(-6deg); transition: transform .4s var(--ease); }
.choice:hover .ch-ico, .choice.active .ch-ico { transform: rotate(0) scale(1.05); }
.choice .ch-ico .i { width: 26px; height: 26px; }
.choice strong { display: block; font-size: 15px; }
.choice small { color: var(--muted); font-size: 12.5px; }
.dropzone { border: 2px dashed color-mix(in srgb, var(--accent) 40%, var(--border)); border-radius: 22px; padding: 30px 20px; text-align: center; background: linear-gradient(180deg, var(--accent-soft), transparent); transition: .2s; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.dropzone.drag { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.01); }
.dropzone .dz-ico { width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center; background: var(--surface); color: var(--accent); box-shadow: var(--shadow); animation: floatY 4s ease-in-out infinite; }
.dropzone .dz-ico .i { width: 30px; height: 30px; }
.file-list { max-height: 240px; overflow: auto; border: 1px solid var(--border); border-radius: 16px; margin-top: 14px; }
.file-row { display: flex; align-items: center; gap: 10px; padding: 9px 14px; font-size: 13px; border-bottom: 1px solid var(--border); }
.file-row:last-child { border-bottom: 0; }
.file-row .fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: left; font-family: var(--font-en); font-size: 12px; }
.file-row .fsize { color: var(--muted); font-family: var(--font-en); font-size: 12px; }
.file-row.entry { background: var(--accent-soft); }
.file-row input[type="radio"] { accent-color: var(--accent); }
.progress { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; position: relative; }
.progress-bar { height: 100%; width: 0; background: var(--grad); background-size: 200% 100%; border-radius: 99px; transition: width .25s; animation: slide 2s linear infinite; }
.progress-info { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-top: 6px; font-family: var(--font-en); }
.summary-side { position: sticky; top: 96px; }
.summary-line { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.summary-line span { color: var(--muted); }
.summary-line strong { text-align: end; }
.video-preview { width: 100%; border-radius: 16px; margin-top: 14px; background: #000; max-height: 300px; }

.choice-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice-grid.cols-3 .choice { flex-direction: column; text-align: center; }
svg.i.rot90 { transform: rotate(90deg); }

/* منشئ الأسئلة */
.q-builder { display: flex; flex-direction: column; gap: 14px; }
.q-card { border: 1.5px solid var(--border); border-radius: 20px; padding: 16px; background: var(--surface-2); display: flex; flex-direction: column; gap: 12px; transition: border-color .2s; }
.q-card:focus-within { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); background: var(--surface); box-shadow: var(--shadow); }
.q-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.q-num { min-width: 38px; height: 32px; padding: 0 8px; border-radius: 10px; display: inline-grid; place-items: center; background: var(--grad-soft); color: #fff; font-weight: 800; font-size: 13px; flex: none; }
.q-type { width: auto !important; height: 36px !important; min-width: 150px; font-size: 13px !important; }
.q-points { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 700; }
.q-points input { width: 62px; height: 36px; border-radius: 10px; border: 1.5px solid var(--border); padding: 0 8px; text-align: center; background: var(--surface); }
.input.q-text, .input.q-exp { height: auto; min-height: 44px; padding: 10px 14px; resize: vertical; }
.input.q-exp { font-size: 13px; }
.q-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.q-opt { display: flex; align-items: center; gap: 8px; padding: 4px; border-radius: 14px; border: 1.5px solid transparent; }
.q-opt.correct { border-color: var(--success); background: var(--success-soft); }
.q-opt .input { height: 40px; }
.q-mark { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--border); background: var(--surface); cursor: pointer; display: grid; place-items: center; flex: none; font-weight: 800; font-size: 12px; color: var(--muted); }
.q-opt.correct .q-mark { background: var(--success); border-color: var(--success); color: #fff; }
.q-review { display: flex; flex-direction: column; gap: 12px; }
.qr { border: 1px solid var(--border); border-radius: 18px; padding: 14px; }
.qr.ok { border-color: color-mix(in srgb, var(--success) 50%, var(--border)); }
.qr.bad { border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); }
.qr-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.qr-head strong { flex: 1; min-width: 200px; }
.qr-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.qr-opt { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.qr-opt > span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); font-size: 11px; font-weight: 800; flex: none; }
.qr-opt.right { background: var(--success-soft); color: var(--success); font-weight: 700; }
.qr-opt.wrong { background: var(--danger-soft); color: var(--danger); }
.qr-opt small { margin-inline-start: auto; font-size: 11px; opacity: .8; }
.qr-exp { margin-top: 10px; font-size: 13px; color: var(--text-2); background: var(--accent-soft); padding: 8px 12px; border-radius: 12px; display: flex; gap: 6px; align-items: center; }
.mini-bar { display: inline-block; width: 60px; height: 6px; border-radius: 9px; background: var(--surface-2); overflow: hidden; vertical-align: middle; margin-inline-end: 6px; }
.mini-bar i { display: block; height: 100%; background: var(--grad-soft); }

/* المناهج */
.curr-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.select-list { display: flex; flex-direction: column; gap: 6px; max-height: 620px; overflow-y: auto; }
.select-item { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 14px; border: 1px solid transparent; cursor: pointer; transition: .15s; }
.select-item:hover { background: var(--surface-2); }
.select-item.active { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.select-item .grow { flex: 1; min-width: 0; }
.select-item strong { font-size: 14px; display: block; }
.select-item small { font-size: 12px; color: var(--muted); }
.select-item .acts { display: flex; gap: 2px; opacity: 0; transition: .15s; }
.select-item:hover .acts, .select-item.active .acts { opacity: 1; }
.subject-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.subject-tile { position: relative; padding: 18px; border-radius: 20px; color: #fff; background: linear-gradient(145deg, color-mix(in srgb, var(--sc) 80%, #fff), var(--sc)); box-shadow: 0 16px 30px -18px var(--sc); overflow: hidden; min-height: 120px; display: flex; flex-direction: column; justify-content: space-between; }
.subject-tile::after { content: ''; position: absolute; inset-inline-end: -26px; bottom: -26px; width: 90px; height: 90px; border-radius: 30px; background: rgba(255,255,255,.14); transform: rotate(25deg); }
.subject-tile .acts { position: absolute; top: 10px; inset-inline-end: 10px; display: flex; gap: 4px; z-index: 2; }
.subject-tile .acts button { width: 30px; height: 30px; border-radius: 10px; border: 0; background: rgba(255,255,255,.2); color: #fff; cursor: pointer; display: grid; place-items: center; }
.subject-tile .acts button:hover { background: rgba(255,255,255,.35); }
.subject-tile strong { font-size: 16px; z-index: 1; }
.subject-tile small { opacity: .85; font-size: 12px; z-index: 1; }
.subject-tile .st-ico { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: rgba(255,255,255,.2); }
.subject-tile.off { filter: grayscale(.8); opacity: .7; }
.color-row { display: flex; gap: 8px; flex-wrap: wrap; }
.color-row button { width: 32px; height: 32px; border-radius: 10px; border: 3px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.color-row button.active { border-color: var(--surface); box-shadow: 0 0 0 2px var(--accent); }
.icon-pick { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.icon-pick button { height: 38px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; display: grid; place-items: center; color: var(--text-2); }
.icon-pick button.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* الإعدادات */
.settings-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 22px; align-items: start; }
.settings-nav { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 4px; padding: 10px; }
.settings-nav a { display: flex; gap: 10px; align-items: center; padding: 11px 14px; border-radius: 14px; color: var(--text-2); font-weight: 600; font-size: 14px; }
.settings-nav a:hover { background: var(--surface-2); }
.settings-nav a.active { background: var(--accent-soft); color: var(--accent); }
.theme-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.theme-card { border: 2px solid var(--border); border-radius: 24px; padding: 0; overflow: hidden; cursor: pointer; background: var(--surface); text-align: start; transition: .25s var(--ease); }
.theme-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.theme-card.active { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.theme-preview { height: 130px; position: relative; display: flex; align-items: flex-end; padding: 14px; gap: 6px; }
.theme-preview.afaq { background: radial-gradient(80% 90% at 15% 0%, rgba(106, 78, 191, .7), transparent 60%), linear-gradient(135deg, #0B1F44, #2a2f7a); }
.theme-preview.lagoon { background: radial-gradient(80% 90% at 15% 0%, rgba(20, 184, 166, .6), transparent 60%), radial-gradient(70% 80% at 100% 100%, rgba(255, 107, 74, .5), transparent 60%), linear-gradient(135deg, #0E2A3B, #12405A); }
.theme-preview.ishtar { background: radial-gradient(80% 90% at 15% 0%, rgba(201, 160, 78, .55), transparent 60%), radial-gradient(70% 80% at 100% 100%, rgba(47, 126, 140, .5), transparent 60%), linear-gradient(135deg, #0B1E4A, #1B3A8C); }
.theme-preview.zunara { background: radial-gradient(80% 90% at 15% 0%, rgba(217, 166, 181, .55), transparent 60%), linear-gradient(135deg, #3d1124, #873653); }
.theme-preview .sw { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(255,255,255,.7); box-shadow: 0 6px 12px rgba(0,0,0,.25); }
.theme-preview .mock { position: absolute; top: 16px; inset-inline-start: 16px; width: 46%; height: 52px; border-radius: 12px; background: rgba(255,255,255,.14); backdrop-filter: blur(4px); }
.theme-preview .mock::after { content: ''; position: absolute; top: 12px; inset-inline-start: 12px; width: 60%; height: 8px; border-radius: 4px; background: rgba(255,255,255,.6); box-shadow: 0 16px 0 -1px rgba(255,255,255,.35); }
.theme-card .tc-body { padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; }
.theme-card strong { font-size: 15px; }
.logo-uploader { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.logo-box { width: 110px; height: 110px; border-radius: 28px; display: grid; place-items: center; background: var(--hero-bg); box-shadow: var(--shadow); padding: 16px; }
.logo-box .logo-mark { width: 100%; height: 100%; }
.code-block { background: #0d1530; color: #d6defa; border-radius: 16px; padding: 16px 18px; font-family: Consolas, 'Courier New', monospace; font-size: 12.5px; direction: ltr; text-align: left; overflow-x: auto; white-space: pre; line-height: 1.7; }
html[data-theme="zunara"] .code-block { background: #2a1520; color: #f3dbe3; }
.token-reveal { display: flex; gap: 8px; align-items: center; padding: 12px; border-radius: 14px; background: var(--success-soft); border: 1px dashed var(--success); }
.token-reveal code { flex: 1; background: transparent; color: var(--text); word-break: break-all; font-size: 12px; }
.endpoint { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 13px; }
.endpoint:last-child { border-bottom: 0; }
.endpoint .path { font-family: Consolas, monospace; direction: ltr; text-align: left; font-size: 12.5px; word-break: break-all; }
.endpoint .desc { grid-column: 2 / -1; color: var(--muted); font-size: 12.5px; margin-top: -6px; }
.method { font-family: var(--font-en); font-weight: 700; font-size: 11px; padding: 3px 0; border-radius: 8px; text-align: center; color: #fff; }
.method.GET { background: #00A596; } .method.POST { background: #6A4EBF; } .method.PUT { background: #C8913F; } .method.DELETE { background: #E5484D; }
.auth-tag { font-size: 11px; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.timeline { position: relative; padding-inline-start: 26px; }
.timeline::before { content: ''; position: absolute; inset-inline-start: 8px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--accent), transparent); }
.tl-item { position: relative; padding: 10px 0 14px; }
.tl-item::before { content: ''; position: absolute; inset-inline-start: -23px; top: 16px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); }
.tl-item.system::before { border-color: var(--gold); }
.tl-item .tl-text { font-size: 14px; font-weight: 600; }
.tl-item .tl-meta { font-size: 12px; color: var(--muted); }

/* ----------------------------- صفحات الدخول ----------------------------- */
.auth-body { min-height: 100vh; background: var(--bg); overflow-x: hidden; }
.auth-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(60% 50% at 80% 0%, var(--accent-soft), transparent 70%), radial-gradient(50% 60% at 0% 100%, var(--accent-2-soft), transparent 70%), var(--bg); }
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: drift 18s ease-in-out infinite; }
.orb.o1 { width: 420px; height: 420px; background: var(--accent); top: -140px; right: -100px; opacity: .25; }
.orb.o2 { width: 360px; height: 360px; background: var(--accent-2); bottom: -160px; left: -80px; opacity: .2; animation-delay: -6s; }
.orb.o3 { width: 260px; height: 260px; background: var(--gold); top: 40%; left: 40%; opacity: .14; animation-delay: -12s; }
.grid-floor { position: absolute; inset: auto -50% -30% -50%; height: 60%; background-image: linear-gradient(rgba(var(--c2-rgb), .12) 1px, transparent 1px), linear-gradient(90deg, rgba(var(--c2-rgb), .12) 1px, transparent 1px); background-size: 48px 48px; transform: perspective(500px) rotateX(62deg); mask-image: linear-gradient(to top, #000 10%, transparent 80%); -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 80%); }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-visual { position: relative; margin: 18px; border-radius: 36px; background: var(--hero-bg); color: #fff; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 48px; min-height: 560px; box-shadow: var(--shadow-lg); isolation: isolate; }
.login-visual::after { content: ''; position: absolute; inset: auto -20% -40% -20%; height: 70%; background: radial-gradient(50% 50% at 50% 50%, rgba(255, 220, 170, .32), transparent 70%); z-index: -1; }
.login-visual-copy { position: relative; z-index: 2; max-width: 440px; }
.login-visual-copy .eyebrow { font-family: var(--font-en); letter-spacing: .35em; font-size: 12px; color: var(--gold); margin-bottom: 10px; }
.login-visual-copy h2 { font-size: 34px; margin-bottom: 10px; }
.login-visual-copy p { opacity: .8; }
.login-scene { position: absolute; inset: 0 0 30% 0; }
.login-scene .scene3d-inner { transform: rotateX(calc(55deg + var(--py, 0deg))) rotateZ(calc(-28deg + var(--px, 0deg))) scale(1.35); }
.float-chip { position: absolute; padding: 10px 16px; border-radius: 99px; font-size: 13px; font-weight: 700; color: var(--text); display: flex; gap: 8px; align-items: center; animation: floatY 5s ease-in-out infinite; box-shadow: var(--shadow); z-index: 3; }
.float-chip .dot { width: 9px; height: 9px; border-radius: 50%; }
.dot.teal { background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2); } .dot.gold { background: var(--gold); box-shadow: 0 0 10px var(--gold); } .dot.violet { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.chip-a { top: 12%; right: 10%; } .chip-b { top: 30%; left: 8%; animation-delay: -1.5s; } .chip-c { top: 50%; right: 18%; animation-delay: -3s; }
.login-panel { display: grid; place-items: center; padding: 32px 24px; }
.login-card { width: min(440px, 100%); padding: 36px; border-radius: 32px; box-shadow: var(--shadow-lg); }
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.login-brand h1 { font-size: 22px; }
.login-card h3 { font-size: 22px; margin-bottom: 4px; }
.login-card form { display: flex; flex-direction: column; gap: 16px; margin-top: 22px; }
.back-link { display: block; text-align: center; margin-top: 18px; font-size: 13px; color: var(--muted); }
.home { min-height: 100vh; display: grid; place-items: center; position: relative; padding: 24px; overflow: hidden; }
.home-brand { position: relative; z-index: 2; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.home-brand h1 { font-size: clamp(34px, 6vw, 56px); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-top: 8px; }
.home-brand .tagline { font-size: 18px; color: var(--text-2); }
.home-brand .latin { font-size: 12px; color: var(--gold); margin-bottom: 22px; }
.home-scene { position: absolute; inset: 40% 0 -10% 0; opacity: .28; }
.home-scene .scene3d-inner { transform: rotateX(calc(64deg + var(--py, 0deg))) rotateZ(calc(-25deg + var(--px, 0deg))) scale(2.4); }
.home-scene .ring3d { border-color: rgba(var(--c2-rgb), .25); }
.install-wrap { min-height: 100vh; display: grid; place-items: center; padding: 30px 16px; }
.install-card { width: min(720px, 100%); border-radius: 32px; padding: 34px; box-shadow: var(--shadow-lg); }
.install-head { display: flex; gap: 16px; align-items: center; margin-bottom: 24px; }
.install-head h1 { font-size: 22px; }

/* ----------------------------- الحركة ----------------------------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } }
@keyframes modalIn { from { opacity: 0; transform: translateY(24px) scale(.96) rotateX(8deg); } }
@keyframes modalOut { to { opacity: 0; transform: translateY(12px) scale(.97); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.95); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(-30px); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.book3d { animation-name: bookFloat; }
@keyframes bookFloat { 0%, 100% { transform: translateZ(10px); } 50% { transform: translateZ(34px); } }
@keyframes flip { 0%, 15% { transform: rotateY(28deg); } 45%, 60% { transform: rotateY(152deg); } 90%, 100% { transform: rotateY(28deg); } }
@keyframes orbit { to { transform: translateZ(-10px) rotate(360deg); } }
@keyframes cubeSpin { from { transform: translateZ(60px) rotateX(0) rotateY(0); } to { transform: translateZ(60px) rotateX(360deg) rotateY(720deg); } }
@keyframes starPulse { 0%, 100% { transform: translateZ(150px) rotateX(-52deg) scale(1); } 50% { transform: translateZ(170px) rotateX(-52deg) scale(1.15) rotate(20deg); } }
@keyframes twinkle { 0%, 100% { opacity: .2; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.1); } }
@keyframes drift { 0%, 100% { transform: translate(0, 0); } 33% { transform: translate(40px, -30px); } 66% { transform: translate(-30px, 20px); } }
@keyframes slide { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ----------------------------- الاستجابة ----------------------------- */
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .curr-grid { grid-template-columns: 260px minmax(0, 1fr); }
  .curr-grid > :last-child { grid-column: 1 / -1; }
  .hero .scene3d { opacity: .55; }
}
@media (max-width: 1080px) {
  .grid.span-main, .grid.cols-3, .wizard { grid-template-columns: minmax(0, 1fr); }
  .summary-side { position: static; }
  .settings-layout { grid-template-columns: minmax(0, 1fr); }
  .settings-nav { position: static; flex-direction: row; overflow-x: auto; }
  .login-shell { grid-template-columns: 1fr; }
  .login-visual { min-height: 320px; padding: 30px; }
  .float-chip { display: none; }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; transform: translateX(100%); transition: transform .35s var(--ease); box-shadow: var(--shadow-lg); }
  .app.nav-open .sidebar { transform: none; }
  .app.nav-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 35; }
  .only-mobile { display: inline-grid; }
  .topbar { padding: 12px 16px; flex-wrap: wrap; }
  .topbar-search { order: 5; max-width: none; flex-basis: 100%; }
  .user-meta { display: none; }
  .user-chip { padding: 3px; }
  .view { padding: 20px 16px 40px; }
  .grid.cols-2, .grid.cols-4, .curr-grid { grid-template-columns: minmax(0, 1fr); }
  .hero { padding: 26px; }
  .hero-copy { max-width: 100%; }
  .hero .scene3d { opacity: .25; inset-inline-end: -60px; }
  .page-heading h1 { font-size: 18px; }
  .page-heading p { display: none; }
}
@media (max-width: 600px) {
  .kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .kpi { padding: 16px; }
  .kpi-value { font-size: 24px; }
  .form-grid, .form-grid.cols-3, .choice-grid, .theme-cards { grid-template-columns: minmax(0, 1fr); }
  .preset-grid { grid-template-columns: repeat(2, 1fr); }
  .timer-box { width: 56px; height: 60px; font-size: 22px; }
  .modal-layer { padding: 10px; align-items: end; }
  .modal { border-radius: 26px; }
  .toasts { inset-inline: 12px; bottom: 12px; }
  .toast { max-width: none; }
  .login-card { padding: 26px; }
  .login-visual { margin: 10px; border-radius: 26px; }
  .install-card { padding: 22px; }
  .icon-pick { grid-template-columns: repeat(6, 1fr); }
  .choice-grid.cols-3, .q-options, .qr-opts { grid-template-columns: minmax(0, 1fr); }
}

/* =====================================================================
   الساحة المباشرة — واجهة المعلّم
   ===================================================================== */
.arena-hero { position: relative; overflow: hidden; border-radius: var(--radius-xl); color: #fff; padding: 30px 34px; display: flex; align-items: center; gap: 24px; min-height: 220px; isolation: isolate;
  background: radial-gradient(70% 120% at 0% 100%, rgba(255,107,74,.55), transparent 60%), radial-gradient(60% 90% at 100% 0%, rgba(124,92,255,.55), transparent 60%), linear-gradient(135deg, #0E2A3B, #143f57 60%, #0F5A63); box-shadow: var(--shadow-lg); }
.arena-copy { flex: 1; position: relative; z-index: 2; max-width: 560px; }
.arena-tag { display: inline-flex; gap: 6px; align-items: center; background: rgba(255,255,255,.14); padding: 4px 12px; border-radius: 99px; font-size: 12px; font-weight: 800; margin-bottom: 10px; }
.arena-copy h2 { font-size: 28px; margin-bottom: 8px; }
.arena-copy p { opacity: .85; margin-bottom: 18px; }
.arena-hero .btn.light { --b-bg: #fff; --b-fg: #0E2A3B; --b-bd: transparent; }
.btn.glass-btn { --b-bg: rgba(255,255,255,.12); --b-fg: #fff; --b-bd: rgba(255,255,255,.25); backdrop-filter: blur(8px); }
.arena-art { position: relative; width: 250px; height: 170px; flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; transform: perspective(700px) rotateY(-14deg) rotateX(8deg); }
.arena-art .tile { border-radius: 18px; display: grid; place-items: center; color: #fff; background: var(--c); box-shadow: 0 10px 0 color-mix(in srgb, var(--c) 70%, #000), 0 20px 30px -10px rgba(0,0,0,.4); animation: tileBob 3s ease-in-out infinite; }
.arena-art .t1 { animation-delay: -.7s; } .arena-art .t2 { animation-delay: -1.4s; } .arena-art .t3 { animation-delay: -2.1s; }
@keyframes tileBob { 50% { transform: translateY(-6px); } }
.arena-pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-6deg); background: #fff; color: #0E2A3B; font-family: var(--font-en); font-weight: 800; font-size: 20px; letter-spacing: 3px; padding: 6px 14px; border-radius: 12px; box-shadow: 0 10px 20px rgba(0,0,0,.3); }
.quiz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.quiz-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); }
.qc-head { position: relative; height: 112px; padding: 14px; display: flex; justify-content: space-between; align-items: flex-start; color: #fff; overflow: hidden;
  background: radial-gradient(80% 120% at 100% 0%, rgba(255,255,255,.22), transparent 60%), linear-gradient(135deg, var(--qc), color-mix(in srgb, var(--qc) 55%, #0E2A3B)); }
.qc-head .badge { background: rgba(255,255,255,.92); }
.qc-count { background: rgba(0,0,0,.18); padding: 4px 12px; border-radius: 99px; font-size: 13px; font-weight: 700; }
.qc-count b { font-size: 16px; }
.qc-tiles { position: absolute; inset-inline-start: 14px; bottom: -14px; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; transform: rotate(-12deg); opacity: .9; }
.qc-tiles i { width: 26px; height: 26px; border-radius: 8px; border: 2px solid rgba(255,255,255,.7); }
.qc-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.qc-body h4 { font-size: 16px; }
.qc-body p { font-size: 13px; }
.qc-foot { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.big-pin { font-size: 54px; font-weight: 800; letter-spacing: 8px; color: var(--primary); line-height: 1.1; }

/* منشئ المسابقة */
.builder { display: grid; grid-template-columns: 250px minmax(0, 1fr) 250px; grid-template-areas: "head head head" "slides editor settings"; gap: 18px; align-items: start; }
.builder-head { grid-area: head; display: flex; flex-direction: column; gap: 12px; }
.title-input { border: 0; outline: none; font: inherit; font-size: 24px; font-weight: 800; background: transparent; color: var(--text); padding: 4px 0; border-bottom: 2px dashed var(--border); }
.title-input:focus { border-bottom-color: var(--accent); }
.slides { grid-area: slides; padding: 12px; position: sticky; top: 96px; max-height: calc(100vh - 120px); display: flex; flex-direction: column; gap: 10px; }
.slides-list { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; flex: 1; min-height: 80px; }
.slide { display: flex; gap: 8px; padding: 10px; border-radius: 16px; border: 2px solid var(--border); cursor: pointer; background: var(--surface); position: relative; transition: .15s; }
.slide:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.slide.active { border-color: var(--accent); background: var(--accent-soft); }
.slide.bad::after { content: '!'; position: absolute; top: -6px; inset-inline-end: -6px; width: 18px; height: 18px; border-radius: 50%; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.slide-n { width: 24px; height: 24px; border-radius: 8px; background: var(--primary); color: #fff; font-size: 12px; display: grid; place-items: center; flex: none; }
.slide-body { flex: 1; min-width: 0; }
.slide-body small { font-size: 10.5px; color: var(--muted); font-weight: 700; display: block; }
.slide-body strong { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slide-tiles { display: flex; gap: 3px; margin-top: 5px; }
.slide-tiles i { flex: 1; height: 6px; border-radius: 3px; }
.slide-acts { display: none; position: absolute; top: 6px; inset-inline-end: 6px; gap: 2px; background: var(--surface); border-radius: 8px; box-shadow: var(--shadow); padding: 2px; }
.slide:hover .slide-acts, .slide.active .slide-acts { display: flex; }
.slide-acts button { width: 22px; height: 22px; border: 0; background: none; cursor: pointer; font-size: 10px; border-radius: 6px; color: var(--text-2); }
.slide-acts button:hover:not(:disabled) { background: var(--surface-2); }
.slide-acts button:disabled { opacity: .3; }
.add-q { display: grid; grid-template-columns: 1fr; gap: 4px; border-top: 1px solid var(--border); padding-top: 10px; }
.add-q button { display: flex; align-items: center; gap: 8px; border: 0; background: var(--surface-2); padding: 8px 10px; border-radius: 12px; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--text-2); cursor: pointer; }
.add-q button:hover { background: var(--accent-soft); color: var(--accent); }
.add-q button::before { content: '+'; font-weight: 800; color: var(--accent); }
.q-editor { grid-area: editor; display: flex; flex-direction: column; gap: 16px; }
.type-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.type-pick button { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--border); background: var(--surface); padding: 7px 12px; border-radius: 99px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; color: var(--text-2); }
.type-pick button.active { background: var(--primary); color: #fff; border-color: transparent; }
.q-big { width: 100%; border: 2px solid var(--border); border-radius: 20px; padding: 16px 18px; font: inherit; font-size: 21px; font-weight: 800; text-align: center; resize: vertical; outline: none; background: var(--surface-2); color: var(--text); }
.q-big:focus { border-color: var(--accent); background: var(--surface); }
.q-media { display: grid; place-items: center; min-height: 150px; border-radius: 20px; border: 2px dashed var(--border); background: var(--surface-2); position: relative; overflow: hidden; }
.q-media.has { border-style: solid; padding: 10px; gap: 10px; }
.q-media img { max-height: 240px; border-radius: 14px; }
.q-media.loading-media { opacity: .5; }
.media-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); cursor: pointer; font-weight: 700; font-size: 14px; padding: 30px; width: 100%; }
.media-drop .i { width: 34px; height: 34px; color: var(--accent); }
.answer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.q-editor, .slides, .q-settings { min-width: 0; }
.answer-tile { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 18px; background: var(--c); color: #fff; min-height: 76px; box-shadow: 0 6px 0 color-mix(in srgb, var(--c) 70%, #000); transition: transform .15s; }
.answer-tile input { flex: 1; min-width: 0; border: 0; background: rgba(255,255,255,.18); border-radius: 12px; padding: 12px; color: #fff; font: inherit; font-weight: 800; font-size: 15px; outline: none; }
.answer-tile input::placeholder { color: rgba(255,255,255,.75); }
.answer-tile input:focus { background: rgba(255,255,255,.28); }
.answer-tile .glyph { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.2); display: grid; place-items: center; flex: none; }
.answer-tile .mark { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,.9); background: transparent; color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.answer-tile.correct .mark { background: #22c55e; border-color: #fff; box-shadow: 0 0 0 3px rgba(34,197,94,.4); }
.answer-tile.correct { transform: scale(1.02); }
.order-list { display: flex; flex-direction: column; gap: 8px; }
.order-item { display: flex; align-items: center; gap: 10px; background: var(--c); color: #fff; border-radius: 16px; padding: 8px 10px; box-shadow: 0 5px 0 color-mix(in srgb, var(--c) 70%, #000); }
.order-item span { width: 30px; height: 30px; border-radius: 10px; background: rgba(255,255,255,.25); display: grid; place-items: center; font-weight: 800; }
.order-item input { flex: 1; border: 0; background: rgba(255,255,255,.18); border-radius: 10px; padding: 10px; color: #fff; font: inherit; font-weight: 700; outline: none; }
.order-item input::placeholder { color: rgba(255,255,255,.75); }
.accepted { display: flex; flex-direction: column; gap: 8px; }
.acc-row { display: flex; gap: 8px; }
.acc-row .input { height: 46px; border: 1.5px solid var(--border); border-radius: 14px; padding: 0 14px; flex: 1; background: var(--surface); }
.q-settings { grid-area: settings; position: sticky; top: 96px; display: flex; flex-direction: column; gap: 12px; }
.q-settings h4 { font-size: 14px; display: flex; align-items: center; gap: 6px; color: var(--text-2); }
.time-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.time-grid button, .pts-btn { border: 1.5px solid var(--border); background: var(--surface); padding: 9px 4px; border-radius: 12px; font: inherit; font-weight: 800; font-size: 13px; cursor: pointer; color: var(--text-2); }
.time-grid button.active, .pts-btn.active { background: var(--accent); border-color: transparent; color: #fff; }
.pts-btn:disabled { opacity: .4; cursor: default; }
.q-tip { font-size: 12.5px; color: var(--text-2); background: var(--accent-2-soft); border-radius: 14px; padding: 10px 12px; display: flex; gap: 6px; line-height: 1.6; }
/* التقرير */
.podium-mini { display: flex; justify-content: center; align-items: flex-end; gap: 16px; padding-top: 30px; }
.pm { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 140px; text-align: center; }
.pm-medal { font-size: 34px; }
.pm strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pm b { color: var(--muted); font-size: 13px; }
.pm-block { width: 100%; border-radius: 14px 14px 0 0; display: grid; place-items: center; color: #fff; font-size: 28px; font-weight: 800; margin-top: 6px; }
.pm1 .pm-block { height: 110px; background: linear-gradient(180deg, #FFC447, #E8A11A); }
.pm2 .pm-block { height: 80px; background: linear-gradient(180deg, #CBD5E1, #94A3B8); }
.pm3 .pm-block { height: 60px; background: linear-gradient(180deg, #F2A97A, #C77745); }
.qacc p { font-weight: 700; font-size: 14px; margin: 4px 0 6px; }
.opt-dist { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.opt-dist span { font-size: 12px; background: var(--surface-2); padding: 3px 10px; border-radius: 99px; }
.opt-dist span.ok { background: var(--success-soft); color: var(--success); font-weight: 800; }
@media (max-width: 1200px) {
  .builder { grid-template-columns: 220px minmax(0, 1fr); grid-template-areas: "head head" "slides editor" "slides settings"; }
  .q-settings { position: static; }
}
@media (max-width: 800px) {
  .builder { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "editor" "settings" "slides"; }
  .slides { position: static; max-height: none; }
  .arena-art { display: none; }
  .answer-grid { grid-template-columns: 1fr; }
}

/* طلبات المعلّمين */
.nav-count { margin-inline-start: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--gold); color: #1a1405; font-size: 12px; display: grid; place-items: center; }
.pending-card { border: 1px solid var(--gold-soft); }
.pending-list { display: flex; flex-direction: column; gap: 10px; }
.pending-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--surface-2); }
.pending-item .pi-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pending-item small { color: var(--text-2); }
@media (max-width: 640px) { .pending-item { flex-wrap: wrap; } .pending-item .cell-actions { width: 100%; justify-content: flex-end; } }

/* صفحة دخول الإدارة — ليل بابل */
.login-visual.babylon { justify-content: flex-end; background: radial-gradient(70% 60% at 50% 30%, rgba(36, 86, 184, .55), transparent 70%), radial-gradient(60% 40% at 50% 100%, rgba(233, 180, 100, .3), transparent 70%), linear-gradient(170deg, #081638, #0B1E4A 50%, #15317A); padding-bottom: 70px; }
.login-visual.babylon::after { display: none; }
.lv-stars { position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 20% 30%, #FFF6DE 0 1px, transparent 1.6px) 0 0 / 70px 60px, radial-gradient(circle at 60% 70%, rgba(243,220,156,.8) 0 1px, transparent 1.6px) 0 0 / 110px 90px, radial-gradient(circle at 40% 50%, rgba(255,255,255,.6) 0 .8px, transparent 1.4px) 0 0 / 46px 52px; animation: lvTwinkle 6s ease-in-out infinite alternate; }
@keyframes lvTwinkle { to { opacity: .5; } }
.lv-ring { position: absolute; top: 40%; left: 50%; width: 440px; height: 440px; margin: -220px 0 0 -220px; z-index: -1; transform: rotateX(60deg); }
.lv-ring i { position: absolute; inset: 0; border-radius: 50%; border: 1.5px dashed rgba(233, 207, 142, .35); animation: spin 60s linear infinite; }
.lv-ring i + i { inset: 14%; border-style: dotted; border-width: 2px; animation-duration: 90s; animation-direction: reverse; }
.lv-logo { position: absolute; top: 40%; left: 50%; width: min(230px, 46%); transform: translate(-50%, -55%); filter: drop-shadow(0 20px 50px rgba(233, 207, 142, .45)); animation: lvFloat 6s ease-in-out infinite; }
@keyframes lvFloat { 50% { transform: translate(-50%, calc(-55% - 12px)); } }
.login-visual.babylon .login-visual-copy h2 { font-family: 'Reem Kufi', var(--font-ar); font-weight: 700; background: linear-gradient(100deg, #C9A04E, #FFF2CC 45%, #C9A04E 70%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lv-glaze { position: absolute; left: 0; right: 0; bottom: 0; height: 26px; background: radial-gradient(circle at 50% 50%, #FFF2CC 0 2.5px, #C9A04E 3px 5px, transparent 5.5px) 0 0 / 32px 26px, linear-gradient(180deg, #2456B8, #1B3A8C 50%, #0E2558); border-top: 3px solid #C9A04E; }
html[data-theme="ishtar"] .login-brand h1, html[data-theme="ishtar"] .sidebar .brand-name { font-family: 'Reem Kufi', var(--font-ar); }
@media (max-width: 900px) { .login-visual.babylon { min-height: 400px; } .lv-logo { top: 30%; width: 130px; } .lv-ring { top: 30%; width: 280px; height: 280px; margin: -140px 0 0 -140px; } }

/* الإشعارات */
.notify-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.n-results { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.n-results button { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); text-align: start; cursor: pointer; }
.n-results button:hover { border-color: var(--accent); }
.n-results .avatar { width: 32px; height: 32px; font-size: 12px; }
.n-results span:last-child { display: flex; flex-direction: column; }
.n-results small { color: var(--muted); font-size: 12px; text-align: right; }
.n-history { display: flex; flex-direction: column; }
.n-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px 4px; border-bottom: 1px solid var(--border); }
.n-item:last-child { border: 0; }
.n-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.n-ico.auto { background: var(--accent-2-soft); color: var(--accent-2); }
.n-body { flex: 1; min-width: 0; }
.n-body p { color: var(--text-2); font-size: 14px; margin: 2px 0 4px; white-space: pre-line; }
.n-stats { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); flex: none; }
.n-stats span { display: flex; align-items: center; gap: 5px; }
.n-stats svg.i { width: 1em; height: 1em; }
.n-phone { margin-top: 10px; padding: 34px 12px 70px; border-radius: 30px; background: linear-gradient(170deg, #081638, #1B3A8C 60%, #E2A770); }
.n-toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 18px; background: rgba(255,255,255,.88); backdrop-filter: blur(10px); color: #111; box-shadow: 0 10px 24px -10px rgba(0,0,0,.5); }
.n-toast img { width: 36px; height: 36px; border-radius: 9px; background: #0B1E4A; object-fit: contain; flex: none; }
.n-toast div { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; line-height: 1.45; }
.n-toast b { font-size: 13.5px; }
.n-toast span { color: #444; white-space: pre-line; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.n-toast em { font-style: normal; font-size: 11px; color: #777; }
.n-counts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.n-counts > div { text-align: center; padding: 10px; border-radius: 14px; background: var(--surface-2); }
.n-counts b { display: block; font-size: 22px; color: var(--primary); }
.n-counts small { color: var(--muted); }
@media (max-width: 1100px) { .notify-layout { grid-template-columns: 1fr; } }
