/* =============================================================================
   عِيار — Luxury Glass Theme
   طبقة شكل كاملة فوق AdminKit: سايدبار عائم، هيدر زجاجي، جرادينت دهبي.
   يُحمَّل بعد components.css في كل الصفحات.
============================================================================= */

:root {
  --eyaar-gold-grad: linear-gradient(135deg, #e3c766 0%, #d4af37 45%, #a16207 100%);
  --eyaar-gold-grad-soft: linear-gradient(135deg, rgba(212,175,55,.16), rgba(161,98,7,.05));
  --eyaar-sidebar-grad: linear-gradient(180deg, #23201d 0%, #171412 55%, #121009 130%);
  --eyaar-glass-bg: rgba(250, 250, 249, 0.72);
  --eyaar-float-gap: 14px;
  --eyaar-radius-panel: 22px;
}
[data-theme="dark"] {
  --eyaar-glass-bg: rgba(12, 10, 9, 0.65);
  --eyaar-sidebar-grad: linear-gradient(180deg, #191614 0%, #0e0c0a 60%, #0a0806 130%);
}

/* -----------------------------------------------------------------------------
   الخلفية — دفء + هالة دهبي خفيفة أعلى الصفحة
----------------------------------------------------------------------------- */
body {
  background:
    radial-gradient(900px 420px at 85% -80px, rgba(212, 175, 55, 0.10), transparent 60%),
    radial-gradient(700px 380px at 8% 110%, rgba(212, 175, 55, 0.05), transparent 55%),
    var(--color-bg);
  background-attachment: fixed;
}

/* -----------------------------------------------------------------------------
   السايدبار — لوح عائم بحواف دائرية وتوهج دهبي (ديسكتوب فقط)
----------------------------------------------------------------------------- */
@media (min-width: 992px) {
  .app-sidebar {
    inset-block: var(--eyaar-float-gap);
    inset-inline-start: var(--eyaar-float-gap);
    border-radius: var(--eyaar-radius-panel);
    border: 1px solid rgba(212, 175, 55, 0.16);
    box-shadow:
      0 22px 45px -18px rgba(20, 15, 5, 0.45),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
  }
  .app-shell {
    padding-inline-start: calc(var(--app-sidebar-width) + (var(--eyaar-float-gap) * 2));
  }
}

.app-sidebar {
  background: var(--eyaar-sidebar-grad);
}
/* هالة دهبي أعلى السايدبار */
.app-sidebar::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: -60px;
  height: 190px;
  background: radial-gradient(220px 150px at 50% 0%, rgba(212, 175, 55, 0.20), transparent 70%);
  pointer-events: none;
}

/* البراند — شفاف وأنضف، لوجو بجرادينت دهبي متوهج */
.app-sidebar__brand {
  background: transparent;
  border-bottom: 1px solid rgba(212, 175, 55, 0.12);
  height: 72px;
  position: relative;
}
.app-sidebar__brand-logo {
  background: var(--eyaar-gold-grad);
  color: #1c1917;
  border-radius: 12px;
  box-shadow: 0 4px 16px -4px rgba(212, 175, 55, 0.55);
}
.app-sidebar__brand-name {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.01em;
}
.app-sidebar__brand-sub { color: rgba(212, 175, 55, 0.75); }

/* بطاقة الفرع */
.app-sidebar__org {
  background: var(--eyaar-gold-grad-soft);
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 14px;
  backdrop-filter: blur(4px);
}
.app-sidebar__org-avatar {
  background: var(--eyaar-gold-grad);
  color: #1c1917;
  border-radius: 10px;
}

/* عناوين الأقسام — شرطة دهبي قبل النص */
.app-sidebar__section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(212, 175, 55, 0.65);
  font-weight: var(--fw-bold);
  letter-spacing: 0.14em;
}
.app-sidebar__section-label::before {
  content: "";
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--eyaar-gold-grad);
  flex-shrink: 0;
}

/* روابط القائمة */
.app-sidebar__link { border-radius: 11px; }
.app-sidebar__link.is-active {
  background: var(--eyaar-gold-grad-soft);
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: #f5e9c9;
}
.app-sidebar__link.is-active::before {
  width: 3.5px;
  background: var(--eyaar-gold-grad);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.7);
}
.app-sidebar__link.is-active .app-sidebar__link-icon { color: var(--gold-400); }

/* فوتر السايدبار */
.app-sidebar__footer { border-top: 1px solid rgba(212, 175, 55, 0.12); }
.app-sidebar__footer-avatar {
  background: var(--eyaar-gold-grad);
  color: #1c1917;
  border: 0;
}

/* -----------------------------------------------------------------------------
   الهيدر — زجاجي طافي على المحتوى
----------------------------------------------------------------------------- */
.app-header {
  background: var(--eyaar-glass-bg);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.14);
  height: 66px;
}
.app-header__clock {
  border: 1px solid rgba(212, 175, 55, 0.25);
  background: var(--eyaar-gold-grad-soft);
  border-radius: 12px;
}
.app-header__icon-btn { border-radius: 10px; }
.app-header__icon-btn:hover {
  background: var(--brand-accent-soft);
  color: var(--gold-700);
}
[data-theme="dark"] .app-header__icon-btn:hover { color: var(--gold-300); }

/* -----------------------------------------------------------------------------
   عناوين الصفحات — Serif Display + شرطة دهبي
----------------------------------------------------------------------------- */
.app-page-header__title {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  position: relative;
  padding-bottom: 10px;
}
.app-page-header__title::after {
  content: "";
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  width: 44px;
  height: 3px;
  border-radius: 3px;
  background: var(--eyaar-gold-grad);
}

/* -----------------------------------------------------------------------------
   الكروت — حواف أكبر، حدود أنعم، ارتفاع عند الهوفر
----------------------------------------------------------------------------- */
.card-app {
  border-radius: 18px;
  border: 1px solid var(--color-border);
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04), 0 8px 24px -16px rgba(28, 25, 23, 0.10);
  transition: transform var(--duration) var(--easing),
              box-shadow var(--duration) var(--easing),
              border-color var(--duration) var(--easing);
}
a.card-app:hover,
.card-app.is-clickable:hover {
  transform: translateY(-3px);
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: 0 6px 14px -6px rgba(28, 25, 23, 0.10), 0 22px 40px -20px rgba(161, 98, 7, 0.25);
}

/* أيقونات الإحصائيات */
.stat-mini__icon { border-radius: 12px; }

/* -----------------------------------------------------------------------------
   الأزرار — الأساسي بجرادينت دهبي (توقيع عيار)
----------------------------------------------------------------------------- */
.btn-app--primary {
  background: var(--eyaar-gold-grad);
  border: 0;
  color: #231d0e;
  font-weight: var(--fw-bold);
  box-shadow: 0 4px 14px -4px rgba(161, 98, 7, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform var(--duration-fast) var(--easing),
              box-shadow var(--duration) var(--easing),
              filter var(--duration) var(--easing);
}
.btn-app--primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 6px 20px -4px rgba(161, 98, 7, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  color: #231d0e;
}
.btn-app--primary:active { transform: translateY(1px); }

/* -----------------------------------------------------------------------------
   الجداول والفورم
----------------------------------------------------------------------------- */
.table-app thead th {
  letter-spacing: 0.04em;
  border-bottom: 2px solid rgba(212, 175, 55, 0.30);
}
.form-app__input:focus,
.form-app__select:focus,
.form-app__textarea:focus {
  border-color: var(--gold-500);
}

/* -----------------------------------------------------------------------------
   المودالات + السكرولبار
----------------------------------------------------------------------------- */
.modal-app__dialog, .modal-content { border-radius: 18px; }

/* قائمة الإشعارات — نفس شخصية القائمة الشخصية */
.notif-panel {
  border-radius: 16px;
  border: 1px solid var(--color-border);
  box-shadow: 0 12px 32px -12px rgba(28, 25, 23, 0.25);
}
.notif-panel__head { border-bottom: 2px solid rgba(212, 175, 55, 0.25); }
.notif-panel__action { color: var(--gold-700); }
[data-theme="dark"] .notif-panel__action { color: var(--gold-400); }

.app-shell::-webkit-scrollbar { width: 10px; }
.app-shell::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.app-shell::-webkit-scrollbar-thumb:hover { background: var(--gold-500); background-clip: padding-box; border: 2px solid transparent; }

/* -----------------------------------------------------------------------------
   صفحات الدخول — لمسة عيار
----------------------------------------------------------------------------- */
.auth-visual {
  background:
    radial-gradient(700px 400px at 80% -60px, rgba(212, 175, 55, 0.22), transparent 60%),
    radial-gradient(500px 500px at 0% 110%, rgba(212, 175, 55, 0.10), transparent 55%),
    var(--eyaar-sidebar-grad) !important;
}
.auth-visual__logo {
  background: var(--eyaar-gold-grad) !important;
  color: #1c1917 !important;
  box-shadow: 0 6px 24px -6px rgba(212, 175, 55, 0.6);
}
/* لوجو عيار الفعلي بدل أيقونة عامة */
.auth-visual__logo--img {
  background: transparent !important;
  box-shadow: 0 6px 24px -6px rgba(212, 175, 55, 0.45);
  overflow: hidden;
  border-radius: 14px;
}
.auth-visual__logo--img img {
  width: 100%;
  height: 100%;
  display: block;
}
.auth-visual__name {
  font-family: var(--font-display);
  font-size: 30px !important;
}
.auth-visual__hero-pill {
  background: var(--eyaar-gold-grad-soft) !important;
  border: 1px solid rgba(212, 175, 55, 0.35) !important;
  color: #ecdcae !important;
}
.auth-visual__hero-title span { color: var(--gold-400) !important; }
.auth-form__submit {
  background: var(--eyaar-gold-grad) !important;
  border: 0 !important;
  color: #231d0e !important;
  font-weight: var(--fw-bold) !important;
  box-shadow: 0 4px 14px -4px rgba(161, 98, 7, 0.5);
}
.auth-form__submit:hover { filter: brightness(1.06); }
.feat-list li i { color: var(--gold-400) !important; }

/* -----------------------------------------------------------------------------
   شريط الأسعار الحي (تحت الهيدر)
----------------------------------------------------------------------------- */
.price-ticker {
  position: sticky;
  top: 66px;
  z-index: calc(var(--z-header) - 1);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 18px;
  background: linear-gradient(90deg, rgba(28, 25, 23, 0.97), rgba(35, 30, 24, 0.97));
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  overflow: hidden;
  transition: box-shadow 0.4s;
}
.price-ticker.is-flash { box-shadow: inset 0 0 30px rgba(212, 175, 55, 0.25); }
.price-ticker__badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--eyaar-gold-grad);
  color: #231d0e;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}
.price-ticker__track {
  display: flex;
  align-items: center;
  gap: 18px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.price-ticker__track::-webkit-scrollbar { display: none; }
.price-ticker__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  white-space: nowrap;
  color: #d6d3d1;
  font-variant-numeric: tabular-nums;
}
.price-ticker__chip b { color: var(--gold-300); font-weight: 700; }
.price-ticker__sell { color: #86efac; font-weight: 800; direction: ltr; }
.price-ticker__buy { color: #a8a29e; font-size: 11px; direction: ltr; }
.price-ticker__buy::before { content: "شراء "; font-size: 10px; }

/* -----------------------------------------------------------------------------
   خلفية عيار المتحركة — جواهر ولمعات طايفة خلف المحتوى (كل الصفحات)
----------------------------------------------------------------------------- */
.eyaar-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.eyaar-bg i {
  position: absolute;
  display: block;
}
/* ماسة صغيرة (مربع مدور) */
.eyaar-bg .bg-gem {
  width: 16px; height: 16px;
  border: 2px solid rgba(161, 98, 7, 0.35);
  border-radius: 3px;
  transform: rotate(45deg);
  animation: bgDrift 16s ease-in-out infinite;
}
/* دايرة توهج ناعمة */
.eyaar-bg .bg-glow {
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.10), transparent 70%);
  animation: bgBreath 12s ease-in-out infinite;
}
/* حلقة (خاتم) */
.eyaar-bg .bg-ring {
  width: 46px; height: 46px;
  border: 3px solid rgba(212, 175, 55, 0.16);
  border-radius: 50%;
  animation: bgDrift 20s ease-in-out infinite reverse;
}
/* لمعة نجمة */
.eyaar-bg .bg-spark {
  width: 10px; height: 10px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.6), transparent 70%);
  border-radius: 50%;
  animation: bgTwinkle 5s ease-in-out infinite;
}
/* مواقع متوزعة */
.eyaar-bg i:nth-child(1)  { top: 12%; inset-inline-start: 8%;  animation-delay: 0s; }
.eyaar-bg i:nth-child(2)  { top: 68%; inset-inline-start: 12%; animation-delay: 2.5s; }
.eyaar-bg i:nth-child(3)  { top: 30%; inset-inline-start: 85%; animation-delay: 5s; }
.eyaar-bg i:nth-child(4)  { top: 80%; inset-inline-start: 78%; animation-delay: 1.2s; }
.eyaar-bg i:nth-child(5)  { top: 8%;  inset-inline-start: 55%; animation-delay: 3.8s; }
.eyaar-bg i:nth-child(6)  { top: 46%; inset-inline-start: 40%; animation-delay: 6s; }
.eyaar-bg i:nth-child(7)  { top: 22%; inset-inline-start: 28%; animation-delay: 4.4s; }
.eyaar-bg i:nth-child(8)  { top: 58%; inset-inline-start: 62%; animation-delay: 0.8s; }
.eyaar-bg i:nth-child(9)  { top: 86%; inset-inline-start: 38%; animation-delay: 7s; }
.eyaar-bg i:nth-child(10) { top: 40%; inset-inline-start: 5%;  animation-delay: 8.5s; }

@keyframes bgDrift {
  0%, 100% { transform: translate(0, 0) rotate(45deg); opacity: 0.55; }
  25%      { transform: translate(14px, -22px) rotate(65deg); opacity: 1; }
  50%      { transform: translate(-8px, -38px) rotate(45deg); opacity: 0.7; }
  75%      { transform: translate(-18px, -14px) rotate(25deg); opacity: 0.9; }
}
@keyframes bgBreath {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50%      { transform: scale(1.25); opacity: 1; }
}
@keyframes bgTwinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.7); }
  50%      { opacity: 0.9; transform: scale(1.3); }
}
[data-theme="dark"] .eyaar-bg .bg-gem  { border-color: rgba(212, 175, 55, 0.28); }
[data-theme="dark"] .eyaar-bg .bg-ring { border-color: rgba(212, 175, 55, 0.20); }
@media (prefers-reduced-motion: reduce) {
  .eyaar-bg i { animation: none; }
}

/* رسمة رأس الصفحة */
.app-page-header__art {
  width: 150px;
  height: auto;
  flex-shrink: 0;
  margin-inline-start: auto;
  user-select: none;
  -webkit-user-drag: none;
}
@media (max-width: 767.98px) {
  .app-page-header__art { display: none; }
}

/* رسمة المودال */
.cat-modal__art {
  width: 140px;
  margin: -4px auto 2px;
  display: block;
}

/* -----------------------------------------------------------------------------
   الرسومات التوضيحية (Illustrations) — عيار
----------------------------------------------------------------------------- */
.illus {
  display: block;
  margin-inline: auto;
  max-width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}
.illus--xs { width: 150px; }
.illus--sm { width: 220px; }
.illus--md { width: 300px; }
.illus--lg { width: 380px; }

/* حالة فارغة موحّدة */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 36px 16px;
  text-align: center;
}
.empty-state__title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text);
  margin: 10px 0 0;
}
.empty-state__text {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0;
  max-width: 340px;
}

/* -----------------------------------------------------------------------------
   احترام تفضيل تقليل الحركة
----------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .card-app, a.card-app:hover, .btn-app--primary, .btn-app--primary:active {
    transition: none;
    transform: none;
  }
}
