/* ============================================================
   AGENCY — Dark Metal / Chrome Design System (RTL)
   لوحة مستخرجة من الشعار: أسود عميق + معدن مصقول
   ============================================================ */
:root {
  --primary: #C6CFD8;          /* الفضي الأساسي */
  --primary-dark: #98A2AC;
  --secondary: #4A525B;        /* حواف مرتفعة */
  --bg: #0E1013;               /* خلفية الصفحة */
  --card: #16191D;             /* الأسطح */
  --card-2: #1E232A;           /* أسطح أعلى */
  --text: #E4E9EE;             /* النص الأساسي */
  --muted: #7E8892;            /* النص الثانوي */
  --border: #262C33;           /* الحدود */
  --gold: #E9EEF3;             /* البريق المعدني */
  --wood: #8A939C;
  --stone: #6B747E;
  --metal: linear-gradient(140deg, #FFFFFF 0%, #C9D2DA 20%, #7C858E 46%, #EDF2F6 62%, #939CA5 82%, #DDE4EA 100%);
  --ok: #5FBF89;
  --ok-bg: rgba(95, 191, 137, .12);
  --warn: #D9A441;
  --warn-bg: rgba(217, 164, 65, .12);
  --err: #E06A6A;
  --err-bg: rgba(224, 106, 106, .12);
  --info: #6E97DB;
  --info-bg: rgba(110, 151, 219, .12);
  --line: #1E242B;             /* فواصل داخلية خفيفة */
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --shadow-lg: 0 26px 64px rgba(0, 0, 0, .62);
  --font: 'Cairo', Tahoma, sans-serif;
}
/* ضباب خلفي خفيف يعطي العمق نفسه الموجود في الشعار */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(900px 520px at 50% -8%, rgba(190, 205, 220, .07), transparent 62%),
    radial-gradient(700px 460px at 6% 92%, rgba(140, 155, 170, .05), transparent 62%),
    radial-gradient(700px 460px at 94% 96%, rgba(140, 155, 170, .045), transparent 62%);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.icn { vertical-align: -3px; flex-shrink: 0; }

/* ---------- أزرار مجسّمة ----------
   البنية: حافة ضوئية داخلية أعلى + حافة داكنة أسفل + «سماكة» صلبة تحت الزر + ظل ناعم.
   عند الضغط ينزل الزر وتقلّ السماكة فيُحسّ الضغط فعلياً. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 22px; border-radius: 14px; border: 1px solid transparent;
  font-family: var(--font); font-size: 14px; font-weight: 600; cursor: pointer;
  white-space: nowrap; position: relative;
  transition: transform .16s cubic-bezier(.2,.7,.3,1), box-shadow .16s ease,
              background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:active { transform: translateY(2px); }

/* الزر الأساسي — معدن مصقول بارز */
.btn-gold {
  background: var(--metal); color: #0B0D0F;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.9),
    inset 0 -2px 2px rgba(0,0,0,.28),
    0 3px 0 #5A636C,
    0 5px 10px rgba(0,0,0,.5),
    0 12px 26px -6px rgba(0,0,0,.6);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,1),
    inset 0 -2px 2px rgba(0,0,0,.28),
    0 5px 0 #5A636C,
    0 10px 18px rgba(0,0,0,.55),
    0 22px 40px -8px rgba(0,0,0,.68);
}
.btn-gold:active {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.7),
    inset 0 2px 5px rgba(0,0,0,.35),
    0 1px 0 #5A636C,
    0 2px 5px rgba(0,0,0,.5);
}

/* الزر المفرّغ */
.btn-outline {
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,0));
  border-color: var(--primary); color: var(--primary);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 2px 0 rgba(0,0,0,.5), 0 5px 12px -3px rgba(0,0,0,.5);
}
.btn-outline:hover {
  background: var(--primary); color: #0B0D0F; transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 4px 0 #6E777F, 0 10px 20px -4px rgba(0,0,0,.6);
}
.btn-outline:active { box-shadow: inset 0 2px 5px rgba(0,0,0,.35), 0 1px 0 rgba(0,0,0,.5); }

.btn-ghost {
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.03)); color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 2px 0 rgba(0,0,0,.45), 0 5px 12px -3px rgba(0,0,0,.45);
}
.btn-ghost:hover { background: linear-gradient(180deg, rgba(255,255,255,.15), rgba(255,255,255,.06)); transform: translateY(-2px); }
.btn-ghost:active { box-shadow: inset 0 2px 5px rgba(0,0,0,.3), 0 1px 0 rgba(0,0,0,.45); }

.btn-danger {
  background: linear-gradient(180deg, rgba(224,106,106,.22), rgba(224,106,106,.1)); color: var(--err);
  border-color: rgba(224,106,106,.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 2px 0 rgba(0,0,0,.5), 0 5px 12px -3px rgba(0,0,0,.5);
}
.btn-danger:hover {
  background: linear-gradient(180deg, #E8807F, var(--err)); color: #fff; border-color: transparent;
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 4px 0 #8E3B3B, 0 10px 20px -4px rgba(0,0,0,.6);
}
.btn-danger:active { box-shadow: inset 0 2px 5px rgba(0,0,0,.35), 0 1px 0 #8E3B3B; }

.btn-light {
  background: linear-gradient(180deg, #22272E, var(--card)); border-color: var(--border); color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 2px 0 #0A0C0F, 0 5px 12px -3px rgba(0,0,0,.55);
}
.btn-light:hover {
  border-color: var(--primary); color: var(--primary); transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 4px 0 #0A0C0F, 0 10px 20px -4px rgba(0,0,0,.62);
}
.btn-light:active { box-shadow: inset 0 2px 5px rgba(0,0,0,.45), 0 1px 0 #0A0C0F; }

/* السماكة تتناسب مع حجم الزر */
.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: 10px; }
.btn-sm:active { transform: translateY(1px); }
.btn-lg { padding: 14px 34px; font-size: 16px; border-radius: 16px; }
.btn-block { width: 100%; }
.btn:disabled {
  opacity: .45; cursor: not-allowed; transform: none !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05) !important;
}

/* ---------- بطاقات ---------- */
/* البطاقات مجسّمة: تدرّج رأسي + حافة ضوئية علوية + حافة داكنة سفلية + ظلّان بعمقين */
.card {
  background: linear-gradient(180deg, #1C2128 0%, var(--card) 44%, #11141A 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  position: relative;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .085),
    inset 0 -1px 0 rgba(0, 0, 0, .6),
    0 4px 0 #090B0E,                          /* سماكة صلبة تحت البطاقة */
    0 8px 12px -2px rgba(0, 0, 0, .45),
    0 18px 34px -12px rgba(0, 0, 0, .68),
    0 40px 70px -28px rgba(0, 0, 0, .8);
  transition: transform .24s cubic-bezier(.2, .7, .3, 1), box-shadow .24s ease;
}
/* لمعة زجاجية خفيفة على الحافة العليا — ::before ليقع خلف المحتوى لا فوقه */
.card::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 46%;
  border-radius: var(--radius) var(--radius) 0 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, 0));
}
.card:hover {
  transform: translateY(-4px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .12),
    inset 0 -1px 0 rgba(0, 0, 0, .6),
    0 7px 0 #090B0E,
    0 13px 18px -3px rgba(0, 0, 0, .5),
    0 28px 48px -14px rgba(0, 0, 0, .75),
    0 58px 96px -32px rgba(0, 0, 0, .86);
}
/* البطاقات داخل النوافذ لا تُرفع ولا تُظلَّل — تربك العمق */
.modal .card, .modal .card:hover { transform: none; box-shadow: none; }
.card-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.card-title .icn { color: var(--primary); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.glass {
  background: rgba(20,23,27,.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.08);
}

/* ---------- شارات ---------- */
.badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-err { background: var(--err-bg); color: var(--err); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-muted { background: rgba(255,255,255,.07); color: var(--muted); }
.badge-gold { background: var(--metal); color: #0B0D0F; }

/* ---------- نماذج ---------- */
label.f-label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; color: var(--text); }
.f-input, .f-select, .f-textarea {
  width: 100%; padding: 11px 16px; border: 1px solid var(--border); border-radius: 14px;
  font-family: var(--font); font-size: 14px; background: rgba(255,255,255,.035); color: var(--text);
  transition: border .2s, box-shadow .2s;
}
.f-input:focus, .f-select:focus, .f-textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(198,207,216,.12); background: var(--card-2);
}
.f-textarea { min-height: 110px; resize: vertical; }
.f-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; background: #333A42; border-radius: 999px; transition: .25s; cursor: pointer; }
.switch .track:before { content: ''; position: absolute; height: 18px; width: 18px; right: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .25s; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.switch input:checked + .track { background: linear-gradient(140deg,#EDF2F6,#8F98A1); }
.switch input:checked + .track:before { transform: translateX(-20px); }

/* ---------- جداول ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); }
table.tbl { width: 100%; border-collapse: collapse; min-width: 640px; }
.tbl th { text-align: right; padding: 13px 18px; font-size: 12.5px; color: var(--muted); font-weight: 700; background: rgba(255,255,255,.03); border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 13px 18px; border-bottom: 1px solid var(--line); font-size: 13.5px; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: rgba(255,255,255,.035); }
.tbl .t-actions { display: flex; gap: 6px; }

/* ---------- أشرطة التمرير ---------- */
/* الافتراضي في المتصفحات فاتح — نوحّده على الهوية الداكنة في كل عنصر قابل للتمرير */
* { scrollbar-width: thin; scrollbar-color: #2E353D var(--bg); }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: #2E353D; border-radius: 999px; border: 3px solid var(--bg); background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: #414A54; background-clip: padding-box; }
::-webkit-scrollbar-corner { background: var(--bg); }
/* داخل الأسطح يتبع الشريط لون السطح لا لون الصفحة */
.sidebar, .modal, .table-wrap, .card { scrollbar-color: #2E353D var(--card); }
.sidebar::-webkit-scrollbar-track,
.modal::-webkit-scrollbar-track,
.table-wrap::-webkit-scrollbar-track,
.card::-webkit-scrollbar-track { background: var(--card); }
.sidebar::-webkit-scrollbar-thumb,
.modal::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb,
.card::-webkit-scrollbar-thumb { border-color: var(--card); }

/* ---------- الشل الرئيسي ---------- */
body.shell { background: var(--bg); }
.app-wrap { display: flex; min-height: 100vh; }
/* الشريط الجانبي لوح مرتفع: تدرّج جانبي + حافة ضوئية عند الحدّ + ظل يسقط على المحتوى */
.sidebar {
  width: 264px; flex-shrink: 0; border-left: 1px solid var(--border);
  background: linear-gradient(255deg, #1B2027 0%, var(--card) 38%, #101318 100%);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  scrollbar-width: thin; z-index: 40;
  box-shadow:
    inset 1px 0 0 rgba(255, 255, 255, .05),
    -2px 0 0 rgba(0, 0, 0, .5),
    -14px 0 30px -8px rgba(0, 0, 0, .55),
    -34px 0 64px -22px rgba(0, 0, 0, .5);
}
.sidebar-head { display: flex; align-items: center; justify-content: center; padding: 20px 20px 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; }
/* علامة الشعار: شيفرون معدني مجسّم يدور ببطء — نفس علامة الصفحة الرئيسية */
.brand-mark {
  width: 38px; height: 38px; position: relative; flex-shrink: 0;
  transform-style: preserve-3d; animation: brandSpin 14s linear infinite;
}
.brand-mark i {
  position: absolute; inset: 0; display: block;
  background: linear-gradient(135deg, #FFFFFF 0%, #C9D2DA 18%, #7C858E 42%,
              #EDF2F6 58%, #8C959E 78%, #DDE4EA 100%);
  clip-path: polygon(50% 4%, 96% 96%, 72% 96%, 50% 46%, 28% 96%, 4% 96%);
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .6));
}
@keyframes brandSpin { to { transform: rotateY(360deg); } }
/* من يفضّل تقليل الحركة لا تدور عنده */
@media (prefers-reduced-motion: reduce) { .brand-mark { animation: none; } }
.side-close { display: none; }
.ws-switch {
  margin: 8px 16px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 14px;
  background: linear-gradient(180deg, #262C34, #171B21);
  display: flex; align-items: center; gap: 10px; cursor: pointer; position: relative;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 3px 0 #0A0C0F, 0 7px 16px -5px rgba(0,0,0,.6);
  transition: transform .16s cubic-bezier(.2,.7,.3,1), box-shadow .16s, border-color .2s;
}
.ws-switch:hover {
  border-color: var(--primary); transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.13), 0 5px 0 #0A0C0F, 0 12px 24px -6px rgba(0,0,0,.65);
}
.ws-switch:active { transform: translateY(2px); box-shadow: inset 0 2px 5px rgba(0,0,0,.45), 0 1px 0 #0A0C0F; }
.ws-ico { font-size: 22px; }
.ws-meta { flex: 1; min-width: 0; }
.ws-meta b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-meta span { font-size: 11.5px; color: var(--muted); }
.admin-tag { margin: 8px 16px; padding: 10px 14px; border-radius: 14px; background: linear-gradient(150deg, #05070A, #1B2129); color: var(--gold); border: 1px solid rgba(255,255,255,.09); font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.side-nav { flex: 1; padding: 6px 12px 16px; }
.nav-section { font-size: 11px; color: var(--stone); font-weight: 700; margin: 16px 10px 6px; letter-spacing: .3px; }
/* عنوان قسم غير قابل للطي — يأخذ الأيقونة نفسها بحجم أصغر */
.nav-section-plain { display: flex; align-items: center; gap: 9px; font-size: 12.5px; }
.nav-section-plain .icn { color: var(--stone); }
/* فاصل بسيط بدل الترويسة للأقسام العارية */
.nav-bare { height: 10px; }
/* أقسام قابلة للطي — بحجم عناصر القائمة نفسها لتقرأ كخيار لا كعنوان صغير */
.nav-sec { margin-top: 8px; }
.nav-sec-toggle {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 9px 12px; border-radius: 12px; margin-bottom: 3px;
  background: none; border: 1px solid transparent; cursor: pointer;
  font-family: var(--font); font-size: 13.5px; font-weight: 700; color: var(--muted);
  text-align: right; letter-spacing: 0;
  transition: transform .16s cubic-bezier(.2,.7,.3,1), box-shadow .16s, background .18s, color .18s;
}
.nav-sec-toggle:hover {
  color: var(--text); background: linear-gradient(180deg, #262C34, #1A1F25);
  border-color: var(--border); transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 2px 0 #0A0C0F, 0 5px 12px -4px rgba(0,0,0,.55);
}
.nav-sec-toggle:active { transform: translateY(1px); box-shadow: inset 0 2px 4px rgba(0,0,0,.4); }
.nav-sec.open .nav-sec-toggle { color: var(--text); }
.nav-sec-toggle .chev { margin-right: auto; display: inline-flex; transition: transform .25s ease; color: var(--stone); }
.nav-sec.open .nav-sec-toggle .chev { transform: rotate(180deg); }
/* عناصر القسم تنزاح قليلاً لتبيّن التبعية */
.nav-sec-items { padding-right: 10px; }
.nav-sec-items { display: none; }
.nav-sec.open .nav-sec-items { display: block; animation: pop .2s ease; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 12px;
  color: var(--muted); font-size: 13.5px; font-weight: 600; margin-bottom: 3px;
  border: 1px solid transparent; position: relative;
  transition: transform .16s cubic-bezier(.2,.7,.3,1), box-shadow .16s, background .18s, color .18s;
}
.nav-item .icn { color: var(--stone); transition: .18s; }
/* عند المرور يبرز العنصر قليلاً بحافة علوية مضيئة وسماكة تحته */
.nav-item:hover {
  background: linear-gradient(180deg, #262C34, #1A1F25); color: var(--text);
  border-color: var(--border); transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 2px 0 #0A0C0F, 0 5px 12px -4px rgba(0,0,0,.55);
}
.nav-item:hover .icn { color: var(--primary); }
.nav-item:active { transform: translateY(1px); box-shadow: inset 0 2px 4px rgba(0,0,0,.4); }
/* العنصر النشط لوح بارز بشريط معدني على حدّه */
.nav-item.active {
  background: linear-gradient(180deg, #2C333C 0%, #1D232A 55%, #171C22 100%);
  color: var(--text); border-color: #333B45; transform: none;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.13),
    inset 0 -1px 0 rgba(0,0,0,.5),
    inset -3px 0 0 0 var(--primary),
    0 3px 0 #08090C,
    0 8px 18px -5px rgba(0,0,0,.6);
}
.nav-item.active .icn { color: var(--primary); }
/* مجموعة جانبية قابلة للفتح */
.nav-group-toggle { width: 100%; background: none; border: none; cursor: pointer; font-family: var(--font); text-align: right; }
.nav-group-toggle .chev { margin-right: auto; display: inline-flex; transition: transform .25s ease; color: var(--stone); }
.nav-group.open .nav-group-toggle .chev { transform: rotate(180deg); }
.nav-group-items { display: none; padding-right: 14px; border-right: 1.5px solid var(--border); margin-right: 20px; }
.nav-group.open .nav-group-items { display: block; animation: pop .2s ease; }
.nav-group-items .nav-item { font-size: 13px; padding: 8px 10px; }
.side-plan {
  margin: 0 16px 18px; padding: 14px; border-radius: var(--radius);
  background: linear-gradient(160deg, #232A32 0%, #171C22 55%, #0E1116 100%);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.1),
    inset 0 -1px 0 rgba(0,0,0,.55),
    0 3px 0 #08090C,
    0 10px 22px -7px rgba(0,0,0,.65);
}
.side-plan-name { font-size: 13px; font-weight: 700; margin-bottom: 10px; display: flex; gap: 6px; align-items: center; color: var(--primary-dark); }
.side-plan-max { font-size: 12px; font-weight: 700; color: var(--ok); text-align: center;
  background: var(--ok-bg); border: 1px solid rgba(95,191,137,.28); border-radius: 10px; padding: 7px 10px; }

.main-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: center; gap: 14px; padding: 14px 28px; position: sticky; top: 0; z-index: 30;
  background: rgba(11, 13, 16, .78); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border);
}
.page-title { font-size: 19px; font-weight: 800; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-tools { display: flex; align-items: center; gap: 10px; position: relative; }
.top-search { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 7px 14px; color: var(--muted); }
.top-search input { border: none; outline: none; background: none; font-family: var(--font); font-size: 13px; width: 150px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--border);
  background: linear-gradient(180deg, #22272E, var(--card));
  display: grid; place-items: center; cursor: pointer; color: var(--muted); position: relative;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 2px 0 #0A0C0F, 0 5px 12px -3px rgba(0,0,0,.55);
  transition: transform .16s cubic-bezier(.2,.7,.3,1), box-shadow .16s ease, color .2s, border-color .2s;
}
.icon-btn:hover {
  color: var(--primary); border-color: var(--primary); transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 4px 0 #0A0C0F, 0 10px 20px -4px rgba(0,0,0,.62);
}
.icon-btn:active {
  transform: translateY(2px);
  box-shadow: inset 0 2px 5px rgba(0,0,0,.45), 0 1px 0 #0A0C0F;
}
.dot-badge { position: absolute; top: -5px; left: -5px; background: var(--err); color: #fff; font-size: 10px; min-width: 17px; height: 17px; border-radius: 999px; display: grid; place-items: center; font-weight: 700; padding: 0 4px; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 5px 12px 5px 9px; background: var(--card); border: 1px solid var(--border); border-radius: 999px; cursor: pointer; transition: .2s; }
.user-chip:hover { border-color: var(--primary); }
.user-chip img, .avatar-fallback { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.avatar-fallback { background: var(--metal); color: #0B0D0F; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.user-name { font-size: 13.5px; font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-open { display: none; }

.content { flex: 1; padding: 28px; max-width: 1500px; width: 100%; margin: 0 auto; }
.app-footer { padding: 18px 28px; text-align: center; color: var(--stone); font-size: 12.5px; border-top: 1px solid var(--border); }

/* Dropdowns */
.dropdown {
  position: absolute; top: calc(100% + 10px); left: 0; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); min-width: 230px; padding: 8px; display: none; z-index: 90;
}
.dropdown.open { display: block; animation: pop .18s ease; }
.ws-drop { top: auto; right: 16px; left: 16px; }
.drop-item { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 600; color: var(--text); cursor: pointer; }
.drop-item:hover { background: rgba(255,255,255,.06); }
.drop-item.active { background: rgba(255,255,255,.07); color: var(--text); }
.drop-item.danger { color: var(--err); }
.drop-item.add { color: var(--primary); }
.drop-title { font-size: 13px; font-weight: 700; padding: 8px 12px; color: var(--muted); }
.drop-empty { padding: 18px; text-align: center; color: var(--muted); font-size: 13px; }
.notif-drop { min-width: 320px; max-height: 420px; overflow-y: auto; }
.notif-item { display: flex; gap: 10px; padding: 10px 12px; border-radius: 10px; align-items: center;
  color: inherit; text-decoration: none; transition: background .15s, transform .15s; }
.notif-item.unread { background: rgba(198, 207, 216, .07); }
.notif-item.has-link { cursor: pointer; }
.notif-item:hover { background: rgba(198, 207, 216, .12); }
.notif-item.has-link:hover { transform: translateX(-2px); }
.notif-item > div { flex: 1; min-width: 0; }
.notif-go { color: var(--muted); display: grid; place-items: center; flex-shrink: 0; }
.notif-item.has-link:hover .notif-go { color: var(--primary); }
.notif-item b { font-size: 13px; display: block; }
.notif-item p { font-size: 12px; color: var(--muted); margin: 1px 0; }
.notif-item time { font-size: 11px; color: var(--stone); }
.notif-ico { font-size: 20px; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.impersonate-bar { background: #05070A; color: #fff; padding: 9px 24px; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.impersonate-bar a { color: var(--gold); font-weight: 700; margin-right: auto; text-decoration: underline; }

/* Toasts */
.toast { padding: 13px 18px; border-radius: 14px; margin-bottom: 16px; font-size: 14px; font-weight: 600; animation: pop .3s ease; }
.toast-success { background: var(--ok-bg); color: var(--ok); border: 1px solid #cfe7da; }
.toast-error { background: var(--err-bg); color: var(--err); border: 1px solid rgba(224, 106, 106, .32); }
.toast-info { background: var(--info-bg); color: var(--info); border: 1px solid rgba(110, 151, 219, .32); }

/* ---------- شبكات وإحصاءات ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.stat-card {
  background: linear-gradient(180deg, #1E242B 0%, var(--card) 46%, #101318 100%);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px;
  position: relative; overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .095),
    inset 0 -1px 0 rgba(0, 0, 0, .62),
    0 4px 0 #08090C,
    0 8px 13px -2px rgba(0, 0, 0, .48),
    0 20px 36px -12px rgba(0, 0, 0, .7),
    0 42px 72px -30px rgba(0, 0, 0, .82);
  transition: transform .24s cubic-bezier(.2, .7, .3, 1), box-shadow .24s ease;
}
/* وميض قطري يمرّ فوق البطاقة كأنها سطح معدني */
.stat-card::before {
  content: ''; position: absolute; top: -60%; right: -20%; width: 70%; height: 220%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .05), transparent);
  transform: rotate(14deg); pointer-events: none;
}
.stat-card:hover {
  transform: translateY(-5px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .14),
    inset 0 -1px 0 rgba(0, 0, 0, .62),
    0 8px 0 #08090C,
    0 15px 20px -3px rgba(0, 0, 0, .52),
    0 32px 54px -14px rgba(0, 0, 0, .78),
    0 62px 104px -34px rgba(0, 0, 0, .88);
}
/* الأيقونة قرص مرتفع له حافة علوية مضيئة وظل داخلي سفلي */
.stat-card .s-icon {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(160deg, rgba(255,255,255,.18), rgba(255,255,255,.04) 55%, rgba(0,0,0,.25));
  color: var(--primary); margin-bottom: 12px; position: relative;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .3),
    inset 0 -2px 3px rgba(0, 0, 0, .45),
    0 4px 10px -2px rgba(0, 0, 0, .6);
}
.stat-card .s-value { font-size: 26px; font-weight: 800; line-height: 1.2; }
.stat-card .s-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat-card .s-trend { font-size: 12px; font-weight: 700; margin-top: 6px; display: inline-flex; gap: 4px; align-items: center; }
.s-trend.up { color: var(--ok); } .s-trend.down { color: var(--err); }

/* Widgets (لوحة تحكم قابلة للسحب) */
.widgets-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.widget { grid-column: span 4; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; position: relative; transition: box-shadow .2s; }
.widget.w-6 { grid-column: span 6; }
.widget.w-8 { grid-column: span 8; }
.widget.w-12 { grid-column: span 12; }
.widget.dragging { opacity: .5; box-shadow: var(--shadow-lg); }
.widget.drag-over { outline: 2px dashed var(--primary); outline-offset: 4px; }
.widget-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.widget-head h3 { font-size: 14.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.widget-head h3 .icn { color: var(--primary); }
.drag-handle { cursor: grab; color: var(--stone); opacity: .5; }
.widget:hover .drag-handle { opacity: 1; }

/* Charts */
.chart-box { position: relative; width: 100%; }
.chart-box canvas { width: 100% !important; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 10px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 5px; }

/* Progress */
.prog { height: 8px; background: var(--card-2); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.prog > i { display: block; height: 100%; border-radius: 999px; transition: width .6s ease;
  background: linear-gradient(90deg, #3C444C 0%, #7C858E 42%, #C9D2DA 78%, #EDF2F6 100%); }
.prog.warn > i { background: linear-gradient(90deg, #6B5427, var(--warn)); }
.prog.err > i { background: linear-gradient(90deg, #6B2F2F, var(--err)); }
.usage-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.usage-row .u-label { width: 130px; font-size: 13px; font-weight: 600; }
.usage-row .prog { flex: 1; }
.usage-row .u-val { font-size: 12px; color: var(--muted); min-width: 90px; text-align: left; }

/* ---------- Modal ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(46, 46, 46, .45); backdrop-filter: blur(4px); z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; padding: 26px; animation: pop .25s ease; }
.modal.modal-lg { max-width: 760px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.modal-head h3 { font-size: 17px; font-weight: 800; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; }
.tab { padding: 10px 18px; font-size: 13.5px; font-weight: 700; color: var(--muted); border-bottom: 2.5px solid transparent; cursor: pointer; white-space: nowrap; transition: .2s; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary-dark); border-color: var(--primary); }
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: pop .25s ease; }

/* ---------- صفحة الهبوط ---------- */
.land-nav { position: sticky; top: 0; z-index: 50; background: rgba(11, 13, 16, .82); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(255,255,255,.07); }
.land-nav-inner { max-width: 1200px; margin: auto; display: flex; align-items: center; gap: 26px; padding: 16px 24px; }
.land-links { display: flex; gap: 24px; flex: 1; justify-content: center; }
.land-links a { font-size: 14px; font-weight: 600; color: var(--muted); transition: .2s; }
.land-links a:hover { color: var(--primary); }
.hero { max-width: 1200px; margin: auto; padding: 70px 24px 50px; display: grid; grid-template-columns: 1.05fr 1fr; gap: 50px; align-items: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.18); color: var(--primary-dark); padding: 7px 16px; border-radius: 999px; font-size: 13px; font-weight: 700; margin-bottom: 22px; }
.hero h1 { font-size: 44px; font-weight: 800; line-height: 1.35; margin-bottom: 18px; }
.hero h1 .gold-text { background: linear-gradient(135deg, var(--gold), var(--primary-dark)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 17px; color: var(--muted); margin-bottom: 30px; max-width: 480px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-trust { margin-top: 28px; font-size: 13px; color: var(--stone); display: flex; align-items: center; gap: 8px; }
.hero-mock { position: relative; }
.mock-window { background: var(--card); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-lg); overflow: hidden; transform: perspective(1200px) rotateY(6deg) rotateX(2deg); }
.mock-bar { display: flex; gap: 6px; padding: 13px 16px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.03); }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--secondary); }
.mock-bar i:first-child { background: var(--gold); }
.mock-body { padding: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mock-tile { border: 1px solid var(--border); border-radius: 14px; padding: 14px; }
.mock-tile b { font-size: 18px; display: block; }
.mock-tile span { font-size: 11px; color: var(--muted); }
.mock-chart { grid-column: span 2; height: 110px; border: 1px solid var(--border); border-radius: 14px; padding: 10px; }
.float-chip { position: absolute; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 10px 16px; box-shadow: var(--shadow-lg); font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 8px; animation: floaty 4s ease-in-out infinite; }
.float-chip.c1 { top: -18px; right: -14px; color: var(--ok); }
.float-chip.c2 { bottom: 30px; left: -20px; color: var(--primary); animation-delay: 1.2s; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

.section { max-width: 1200px; margin: auto; padding: 60px 24px; }
.sec-head { text-align: center; max-width: 620px; margin: 0 auto 44px; }
.sec-head .kicker { color: var(--primary); font-weight: 800; font-size: 14px; letter-spacing: .5px; }
.sec-head h2 { font-size: 32px; font-weight: 800; margin: 8px 0 10px; }
.sec-head p { color: var(--muted); font-size: 15.5px; }
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); transition: .25s; }
.feat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--secondary); }
.feat-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(255,255,255,.13), rgba(255,255,255,.04)); color: var(--primary); margin-bottom: 18px; }
.feat-card h3 { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.feat-card p { font-size: 13.5px; color: var(--muted); }

.numbers-band { background: linear-gradient(155deg, #1A1F25 0%, #0C0E12 60%, #171C22 100%); border: 1px solid rgba(255,255,255,.08); box-shadow: 0 30px 70px rgba(0,0,0,.55); border-radius: 28px; padding: 50px 30px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.num-item b { display: block; font-size: 38px; font-weight: 800; color: var(--gold); }
.num-item span { color: #cfc4b3; font-size: 14px; font-weight: 600; }

.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: stretch; }
.price-card { background: var(--card); border: 1px solid var(--border); border-radius: 22px; padding: 28px 24px; display: flex; flex-direction: column; box-shadow: var(--shadow); position: relative; transition: .25s; }
.price-card:hover { transform: translateY(-5px); }
.price-card.featured { border: 2px solid var(--primary); box-shadow: 0 16px 44px rgba(198,207,216,.24); }
.price-pop { position: absolute; top: -13px; right: 24px; background: var(--metal); color: #0B0D0F; font-size: 12px; font-weight: 700; padding: 4px 14px; border-radius: 999px; }
.price-name { font-size: 16px; font-weight: 800; }
.price-desc { font-size: 12.5px; color: var(--muted); margin: 4px 0 14px; min-height: 36px; }
.price-amount { font-size: 34px; font-weight: 800; }
.price-amount small { font-size: 13px; color: var(--muted); font-weight: 600; }
.price-feats { list-style: none; margin: 18px 0 22px; flex: 1; }
.price-feats li { font-size: 13px; padding: 6px 0; display: flex; gap: 8px; align-items: center; color: var(--text); }
.price-feats li .icn { color: var(--ok); }

.faq-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden; }
.faq-q { padding: 17px 22px; font-weight: 700; font-size: 14.5px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.faq-q .icn { transition: .25s; color: var(--primary); }
.faq-item.open .faq-q .icn { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; color: var(--muted); font-size: 14px; padding: 0 22px; }
.faq-item.open .faq-a { max-height: 260px; padding-bottom: 18px; }

.land-footer { background: #08090A; color: var(--muted); border-top: 1px solid var(--border); margin-top: 60px; }
.footer-inner { max-width: 1200px; margin: auto; padding: 50px 24px 30px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
.footer-inner h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer-inner a { display: block; font-size: 13.5px; padding: 4px 0; color: var(--muted); }
.footer-inner a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid #443e36; padding: 18px 24px; text-align: center; font-size: 13px; }

/* ---------- صفحات المصادقة ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: linear-gradient(160deg, #05070A 0%, #171C22 55%, #2A323B 100%); color: #fff; padding: 60px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.auth-side:before { content: ''; position: absolute; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(198,207,216,.18), transparent 70%); top: -120px; left: -120px; }
.auth-side h2 { font-size: 30px; font-weight: 800; margin: 22px 0 12px; position: relative; }
.auth-side p { color: #B6BEC6; font-size: 15px; max-width: 380px; position: relative; }
.auth-side .auth-points { margin-top: 30px; position: relative; }
.auth-side .auth-points div { display: flex; gap: 10px; align-items: center; padding: 7px 0; font-size: 14px; color: #C9D2DA; }
.auth-side .auth-points .icn { color: var(--gold); }
.auth-form-col { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.oauth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.oauth-btn { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 11px; border-radius: 14px; border: 1px solid var(--border); background: var(--card); font-family: var(--font); font-size: 13.5px; font-weight: 700; cursor: pointer; transition: .2s; color: var(--text); }
.oauth-btn:hover { border-color: var(--primary); transform: translateY(-1px); }
.oauth-btn.discord { color: #5865F2; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--stone); font-size: 12.5px; margin: 18px 0; }
.divider:before, .divider:after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-foot { text-align: center; margin-top: 20px; font-size: 13.5px; color: var(--muted); }
.auth-foot a { color: var(--primary); font-weight: 700; }

/* ---------- Automation Builder ---------- */
.flow-canvas { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 30px 10px; }
.flow-node { width: 100%; max-width: 460px; background: var(--card); border: 1.5px solid var(--border); border-radius: 16px; padding: 15px 18px; display: flex; gap: 12px; align-items: center; position: relative; box-shadow: var(--shadow); }
.flow-node .fn-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.flow-node.n-event .fn-icon { background: var(--info-bg); color: var(--info); }
.flow-node.n-condition .fn-icon { background: var(--warn-bg); color: var(--warn); }
.flow-node.n-action .fn-icon { background: var(--ok-bg); color: var(--ok); }
.flow-node.n-delay .fn-icon { background: rgba(255,255,255,.07); color: var(--stone); }
.flow-node .fn-body { flex: 1; min-width: 0; }
.flow-node .fn-type { font-size: 11px; color: var(--muted); font-weight: 700; }
.flow-node .fn-title { font-size: 14px; font-weight: 700; }
.flow-connector { width: 2px; height: 34px; background: repeating-linear-gradient(to bottom, var(--primary) 0 4px, transparent 4px 8px); position: relative; }
.flow-connector:after { content: ''; position: absolute; bottom: 0; right: -4px; border: 5px solid transparent; border-top-color: var(--primary); }
.flow-add { border: 1.5px dashed var(--secondary); background: none; color: var(--primary); border-radius: 14px; padding: 10px 24px; font-family: var(--font); font-weight: 700; cursor: pointer; font-size: 13.5px; transition: .2s; }
.flow-add:hover { border-color: var(--primary); background: rgba(255,255,255,.05); }

/* ---------- AI ---------- */
.ai-tools-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ai-tool { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; cursor: pointer; transition: .22s; }
.ai-tool:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: var(--shadow-lg); }
.ai-tool .icn { color: var(--primary); }
.ai-tool h4 { font-size: 14px; font-weight: 700; margin: 10px 0 4px; }
.ai-tool p { font-size: 12px; color: var(--muted); }
.chat-box { display: flex; flex-direction: column; height: 560px; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 6px 4px; display: flex; flex-direction: column; gap: 14px; }
.chat-msg { max-width: 82%; padding: 12px 16px; border-radius: 16px; font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.chat-msg.user { align-self: flex-start; background: var(--metal); color: #0B0D0F; border-radius: 16px 16px 16px 4px; }
.chat-msg.assistant { align-self: flex-end; background: var(--card-2); border: 1px solid var(--border); border-radius: 16px 16px 4px 16px; }
.chat-input-row { display: flex; gap: 10px; margin-top: 14px; }
.chat-input-row .f-input { flex: 1; }
.typing { display: inline-flex; gap: 4px; padding: 14px 18px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

/* ---------- عناصر متفرقة ---------- */
.empty-state { text-align: center; padding: 54px 20px; color: var(--muted); }
.empty-state .icn { color: var(--secondary); margin-bottom: 14px; }
.empty-state h3 { color: var(--text); font-size: 17px; margin-bottom: 6px; }
.empty-state p { font-size: 13.5px; max-width: 380px; margin: 0 auto 18px; }
.page-actions { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; align-items: center; }
.page-actions .spacer { flex: 1; }
/* شريط الفلاتر: مجرى غائر والأزرار بارزة داخله */
.pill-filter {
  display: inline-flex; background: linear-gradient(180deg, #0C0E12, #171B21);
  border: 1px solid var(--border); border-radius: 999px; padding: 4px; gap: 2px;
  box-shadow: inset 0 2px 5px rgba(0,0,0,.55), 0 1px 0 rgba(255,255,255,.04);
}
.pill-filter a, .pill-filter button {
  padding: 6px 16px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted);
  border: none; background: none; cursor: pointer; font-family: var(--font);
  transition: transform .16s cubic-bezier(.2,.7,.3,1), box-shadow .16s, color .2s, background .2s;
}
.pill-filter a:hover, .pill-filter button:hover { color: var(--text); }
.pill-filter .active {
  background: var(--metal); color: #0B0D0F;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 2px 0 #5A636C, 0 4px 9px rgba(0,0,0,.5);
}
.pill-filter a:active, .pill-filter button:active { transform: translateY(1px); }
.srv-card { display: flex; align-items: center; gap: 14px; }
.srv-ico { width: 52px; height: 52px; border-radius: 16px; background: linear-gradient(135deg, var(--secondary), var(--bg)); display: grid; place-items: center; font-size: 24px; overflow: hidden; }
.srv-ico img { width: 100%; height: 100%; object-fit: cover; }
.mini-stat { text-align: center; }
.mini-stat b { display: block; font-size: 19px; font-weight: 800; }
.mini-stat span { font-size: 11.5px; color: var(--muted); }
.status-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-left: 5px; }
.status-dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(77,158,111,.18); }
.status-dot.off { background: var(--err); }
.status-dot.idle { background: var(--warn); }
.kv-list { display: flex; flex-direction: column; }
.kv-list .kv { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.kv-list .kv:last-child { border: none; }
.kv-list .kv b { font-weight: 700; }
.kv-list .kv span { color: var(--muted); }
.code-chip { font-family: monospace; background: var(--card-2); color: var(--text); border: 1px solid var(--border); padding: 3px 10px; border-radius: 8px; font-size: 12.5px; direction: ltr; display: inline-block; }
.avatar-sm { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--secondary); }
.item-flex { display: flex; align-items: center; gap: 10px; }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 22px; }
.pagination a, .pagination span { min-width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--border); background: var(--card); font-size: 13px; font-weight: 700; color: var(--muted); }
.pagination .cur { background: var(--metal); color: #0B0D0F; border-color: transparent; }
.section-gap { margin-top: 26px; }
.mt { margin-top: 16px; } .mb { margin-bottom: 16px; }
.text-muted { color: var(--muted); } .text-sm { font-size: 12.5px; }
.qr-box { background: #E9EEF3; padding: 14px; border-radius: 14px; border: 1px solid var(--border); display: inline-block; }

/* ---------- استجابة ---------- */
@media (max-width: 1200px) {
  .grid-4, .pricing-grid, .ai-tools-grid { grid-template-columns: repeat(2, 1fr); }
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .numbers-band { grid-template-columns: repeat(2, 1fr); }
  .widget, .widget.w-6, .widget.w-8 { grid-column: span 6; }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; right: 0; top: 0; transform: translateX(100%); transition: transform .3s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .side-open, .side-close { display: grid; }
  .hero { grid-template-columns: 1fr; padding-top: 40px; text-align: center; }
  .hero p.lead { margin: 0 auto 30px; }
  .hero-cta { justify-content: center; }
  .hero-trust { justify-content: center; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .land-links { display: none; }
  .top-search { display: none; }
  .content { padding: 18px; }
  .widget, .widget.w-6, .widget.w-8 { grid-column: span 12; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .f-row { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .grid-4, .pricing-grid, .feat-grid, .ai-tools-grid { grid-template-columns: 1fr; }
  .numbers-band { grid-template-columns: 1fr; }
  .hero h1 { font-size: 31px; }
  .user-name { display: none; }
}
