/* ============================================================
   YOUSSIF DESIGN SYSTEM — components.css
   30 مكوّن بكل حالاتهم
   ============================================================ */

/* ══════════════════════════════════════════════════════════
   01. BUTTON
   ══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-arabic);
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-smooth);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: background var(--duration-fast) var(--ease-smooth);
}

.btn:hover::after { background: rgba(255, 255, 255, 0.08); }
.btn:active       { transform: scale(0.98); }

/* Sizes */
.btn-xs { padding: var(--space-1) var(--space-3); font-size: var(--text-xs);  border-radius: var(--radius-md); height: 28px; }
.btn-sm { padding: var(--space-2) var(--space-4); font-size: var(--text-sm);  border-radius: var(--radius-md); height: 36px; }
.btn-md { padding: var(--space-3) var(--space-6); font-size: var(--text-sm);  border-radius: var(--radius-lg); height: 44px; }
.btn-lg { padding: var(--space-4) var(--space-8); font-size: var(--text-base);border-radius: var(--radius-lg); height: 52px; }
.btn-xl { padding: var(--space-5) var(--space-10);font-size: var(--text-lg);  border-radius: var(--radius-xl); height: 60px; }

/* Variants */
.btn-primary {
  background: linear-gradient(135deg, #5A2D8C, #461F72);
  color: white;
  box-shadow: var(--shadow-brand);
}
.btn-primary:hover {
  box-shadow: 0 12px 40px rgba(90, 45, 140, 0.40);
  transform: translateY(-1px);
}

.btn-gold {
  background: linear-gradient(135deg, #E8B043, #C8922A);
  color: white;
  box-shadow: var(--shadow-gold);
}
.btn-gold:hover {
  box-shadow: 0 8px 32px rgba(200, 146, 42, 0.40);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--color-border-brand);
  color: var(--color-brand-primary);
}
.btn-outline:hover { background: var(--color-brand-muted); }

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
}
.btn-ghost:hover {
  background: var(--primitive-neutral-100);
  color: var(--color-text-primary);
}
.btn-ghost::after { display: none; }

.btn-destructive {
  background: var(--color-error-bg);
  color: var(--color-error);
  border: 1px solid rgba(196, 43, 43, 0.2);
}

/* States */
.btn:disabled,
.btn[disabled],
.btn-disabled {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-loading { cursor: wait; }

/* Spinner */
.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin var(--duration-slower) linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }


/* ══════════════════════════════════════════════════════════
   02. CARD
   ══════════════════════════════════════════════════════════ */
.card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-base) var(--ease-smooth);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-brand {
  border: 1px solid rgba(90, 45, 140, 0.2);
  box-shadow: var(--shadow-brand), var(--shadow-sm);
  background: linear-gradient(160deg, var(--primitive-purple-50) 0%, var(--primitive-neutral-0) 60%);
}

.card-luxury {
  border: 1px solid var(--color-border-gold);
  box-shadow: var(--shadow-gold), var(--shadow-sm);
  background: linear-gradient(160deg, #FFFBF5 0%, var(--primitive-neutral-0) 60%);
}

.card-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-2);
}

.card-body {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}


/* ══════════════════════════════════════════════════════════
   03. INPUT
   ══════════════════════════════════════════════════════════ */
.input-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.input-label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-primary);
}

.input-hint {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
}

.input {
  font-family: var(--font-arabic);
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  background: var(--color-bg-surface);
  border: 1.5px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  width: 100%;
  outline: none;
  transition: all var(--duration-base) var(--ease-smooth);
  line-height: var(--leading-normal);
}

.input:focus {
  border-color: var(--color-brand-primary);
  box-shadow: 0 0 0 3px rgba(90, 45, 140, 0.12);
}

.input::placeholder { color: var(--color-text-tertiary); }

/* States */
.input.error  { border-color: var(--color-error); }
.input.error:focus { box-shadow: 0 0 0 3px rgba(196, 43, 43, 0.12); }
.input.success{ border-color: var(--color-success); }
.input:disabled { opacity: 0.5; cursor: not-allowed; background: var(--color-bg-elevated); }


/* ══════════════════════════════════════════════════════════
   04. BADGE / TAG
   ══════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  font-weight: 500;
  padding: 2px var(--space-3);
  border-radius: var(--radius-full);
  line-height: 1.6;
}

.badge-default  { background: var(--primitive-neutral-100); color: var(--primitive-neutral-600); }
.badge-brand    { background: var(--color-brand-muted);     color: var(--color-brand-primary); }
.badge-gold     { background: var(--primitive-gold-100);    color: var(--primitive-gold-700); }
.badge-success  { background: var(--color-success-bg);      color: var(--color-success); }
.badge-warning  { background: var(--color-warning-bg);      color: var(--color-warning); }
.badge-error    { background: var(--color-error-bg);        color: var(--color-error); }
.badge-info     { background: var(--color-info-bg);         color: var(--color-info); }


/* ══════════════════════════════════════════════════════════
   05. AVATAR
   ══════════════════════════════════════════════════════════ */
.avatar {
  border-radius: var(--radius-full);
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0;
  flex-shrink: 0;
}

.avatar-xs  { width: 24px; height: 24px; font-size: 9px; }
.avatar-sm  { width: 32px; height: 32px; font-size: 11px; }
.avatar-md  { width: 40px; height: 40px; font-size: 14px; }
.avatar-lg  { width: 48px; height: 48px; font-size: 17px; }
.avatar-xl  { width: 64px; height: 64px; font-size: 22px; }
.avatar-2xl { width: 80px; height: 80px; font-size: 28px; }

.avatar-brand   { background: linear-gradient(135deg, #5A2D8C, #9270F5); color: white; }
.avatar-gold    { background: linear-gradient(135deg, #E8B043, #C8922A); color: white; }
.avatar-neutral { background: var(--primitive-neutral-200); color: var(--primitive-neutral-600); }


/* ══════════════════════════════════════════════════════════
   06. TOGGLE / SWITCH
   ══════════════════════════════════════════════════════════ */
.toggle-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  user-select: none;
}

.toggle {
  position: relative;
  width: 44px;
  height: 26px;
  background: var(--primitive-neutral-200);
  border-radius: var(--radius-full);
  transition: background var(--duration-base) var(--ease-smooth);
  flex-shrink: 0;
}

.toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-base) var(--ease-spring);
}

.toggle.on { background: var(--color-brand-primary); }
.toggle.on::after { transform: translateX(-18px); }


/* ══════════════════════════════════════════════════════════
   07. CHECKBOX & RADIO
   ══════════════════════════════════════════════════════════ */
.check-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  user-select: none;
  font-size: var(--text-sm);
}

.custom-check {
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-border-default);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--duration-base) var(--ease-smooth);
  background: var(--color-bg-surface);
}

.custom-check.checked {
  background: var(--color-brand-primary);
  border-color: var(--color-brand-primary);
  color: white;
}

.custom-radio {
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-border-default);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--duration-base) var(--ease-smooth);
}

.custom-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-brand-primary);
  transform: scale(0);
  transition: transform var(--duration-base) var(--ease-spring);
}

.custom-radio.checked { border-color: var(--color-brand-primary); }
.custom-radio.checked::after { transform: scale(1); }


/* ══════════════════════════════════════════════════════════
   08. SELECT
   ══════════════════════════════════════════════════════════ */
.select-wrap { position: relative; }

.select {
  appearance: none;
  width: 100%;
  padding: var(--space-3) var(--space-10) var(--space-3) var(--space-4);
  border: 1.5px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  font-family: var(--font-arabic);
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  background: var(--color-bg-surface);
  cursor: pointer;
  transition: border-color var(--duration-base);
  outline: none;
}

.select:focus {
  border-color: var(--color-brand-primary);
  box-shadow: 0 0 0 3px rgba(90, 45, 140, 0.12);
}

.select-arrow {
  position: absolute;
  top: 50%;
  left: var(--space-4);
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--color-text-tertiary);
}


/* ══════════════════════════════════════════════════════════
   09. PROGRESS BAR
   ══════════════════════════════════════════════════════════ */
.progress-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.progress-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-label { font-size: var(--text-sm); color: var(--color-text-secondary); }
.progress-value { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-text-tertiary); }

.progress-track {
  height: 8px;
  background: var(--primitive-neutral-100);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primitive-purple-600), var(--primitive-purple-400));
  transition: width var(--duration-slow) var(--ease-smooth);
}

.progress-fill.gold {
  background: linear-gradient(90deg, #C8922A, #E8B043);
}


/* ══════════════════════════════════════════════════════════
   10. SLIDER
   ══════════════════════════════════════════════════════════ */
.slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: var(--radius-full);
  background: linear-gradient(
    90deg,
    var(--primitive-purple-500) var(--val, 60%),
    var(--primitive-neutral-200) var(--val, 60%)
  );
  outline: none;
  cursor: pointer;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  border: 2.5px solid var(--primitive-purple-500);
  box-shadow: var(--shadow-md);
  cursor: grab;
}


/* ══════════════════════════════════════════════════════════
   11. TABS
   ══════════════════════════════════════════════════════════ */
.tabs {
  border-bottom: 1px solid var(--color-border-subtle);
  display: flex;
}

.tab {
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-tertiary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--duration-base) var(--ease-smooth);
  margin-bottom: -1px;
}

.tab:hover  { color: var(--color-text-primary); }
.tab.active { color: var(--color-brand-primary); border-bottom-color: var(--color-brand-primary); }


/* ══════════════════════════════════════════════════════════
   12. ALERT
   ══════════════════════════════════════════════════════════ */
.alert {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-xl);
  border: 1px solid transparent;
}

.alert-icon  { font-size: var(--text-base); flex-shrink: 0; margin-top: 1px; }
.alert-title { font-size: var(--text-sm); font-weight: 600; margin-bottom: 2px; }
.alert-body  { font-size: var(--text-sm); }

.alert-info    { background: var(--color-info-bg);    border-color: rgba(42, 95, 191, 0.2);  color: var(--color-info); }
.alert-success { background: var(--color-success-bg); border-color: rgba(26, 138, 74, 0.2);  color: var(--color-success); }
.alert-warning { background: var(--color-warning-bg); border-color: rgba(184, 117, 8, 0.2);  color: var(--color-warning); }
.alert-error   { background: var(--color-error-bg);   border-color: rgba(196, 43, 43, 0.2);  color: var(--color-error); }


/* ══════════════════════════════════════════════════════════
   13. TOOLTIP
   ══════════════════════════════════════════════════════════ */
.tooltip-wrap {
  position: relative;
  display: inline-block;
}

.tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--primitive-neutral-900);
  color: white;
  font-size: var(--text-xs);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-smooth);
  z-index: var(--z-tooltip);
}

.tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--primitive-neutral-900);
}

.tooltip-wrap:hover .tooltip { opacity: 1; }


/* ══════════════════════════════════════════════════════════
   14. CHIP / PILL
   ══════════════════════════════════════════════════════════ */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  border: 1.5px solid var(--color-border-default);
  background: var(--color-bg-surface);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-smooth);
}

.chip:hover { border-color: var(--color-border-brand); color: var(--color-brand-primary); }
.chip.active {
  border-color: var(--color-brand-primary);
  background: var(--color-brand-muted);
  color: var(--color-brand-primary);
  font-weight: 500;
}


/* ══════════════════════════════════════════════════════════
   15. MODAL / DIALOG
   ══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-bg-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  padding: var(--space-6);
}

.modal {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-3xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-xl);
  max-width: 480px;
  width: 100%;
  position: relative;
}

.modal-close {
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--primitive-neutral-100);
  color: var(--color-text-tertiary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all var(--duration-fast) var(--ease-smooth);
}

.modal-close:hover {
  background: var(--primitive-neutral-200);
  color: var(--color-text-primary);
}

.modal-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.modal-body {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-6);
}

.modal-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
}


/* ══════════════════════════════════════════════════════════
   16. DIVIDER
   ══════════════════════════════════════════════════════════ */
.divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  color: var(--color-text-tertiary);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border-subtle);
}

.divider-gold::before,
.divider-gold::after {
  background: linear-gradient(90deg, transparent, var(--primitive-gold-300), transparent);
}


/* ══════════════════════════════════════════════════════════
   17. ACCORDION
   ══════════════════════════════════════════════════════════ */
.accordion-item {
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: var(--space-2);
}

.accordion-header {
  padding: var(--space-4) var(--space-5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 500;
  background: var(--color-bg-surface);
  transition: background var(--duration-fast);
}

.accordion-header:hover { background: var(--primitive-neutral-50); }

.accordion-arrow {
  transition: transform var(--duration-base) var(--ease-smooth);
  color: var(--color-text-tertiary);
}

.accordion-item.open .accordion-arrow { transform: rotate(180deg); }

.accordion-body {
  padding: 0 var(--space-5) var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  display: none;
}

.accordion-item.open .accordion-body { display: block; }


/* ══════════════════════════════════════════════════════════
   18. BREADCRUMB
   ══════════════════════════════════════════════════════════ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
}

.breadcrumb a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--duration-fast);
}

.breadcrumb a:hover { color: var(--color-brand-primary); }
.breadcrumb .current { color: var(--color-text-primary); font-weight: 500; }
.breadcrumb .sep     { color: var(--color-text-tertiary); }


/* ══════════════════════════════════════════════════════════
   19. PAGINATION
   ══════════════════════════════════════════════════════════ */
.pagination {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.page-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--color-border-subtle);
  background: var(--color-bg-surface);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast) var(--ease-smooth);
}

.page-btn:hover { border-color: var(--color-border-brand); color: var(--color-brand-primary); }
.page-btn.active {
  background: var(--color-brand-primary);
  border-color: var(--color-brand-primary);
  color: white;
}


/* ══════════════════════════════════════════════════════════
   20. STAT CARD
   ══════════════════════════════════════════════════════════ */
.stat-card {
  padding: var(--space-6);
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xs);
}

.stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.stat-value {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 900;
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-primary);
  line-height: 1;
}

.stat-delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 500;
}

.stat-delta.up   { color: var(--color-success); }
.stat-delta.down { color: var(--color-error); }


/* ══════════════════════════════════════════════════════════
   21. SKELETON
   ══════════════════════════════════════════════════════════ */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--primitive-neutral-100) 25%,
    var(--primitive-neutral-200) 50%,
    var(--primitive-neutral-100) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  0%   { background-position:  200% 0; }
  100% { background-position: -200% 0; }
}


/* ══════════════════════════════════════════════════════════
   22. TOAST / NOTIFICATION
   ══════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  z-index: var(--z-toast);
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--primitive-neutral-900);
  color: var(--primitive-neutral-50);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-sm);
  min-width: 280px;
  animation: slide-up var(--duration-base) var(--ease-spring) both;
}

@keyframes slide-up {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.toast-brand { background: var(--primitive-purple-800); }
.toast-gold  { background: var(--primitive-gold-800); }


/* ══════════════════════════════════════════════════════════
   23. DROPDOWN MENU
   ══════════════════════════════════════════════════════════ */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: var(--space-2);
  min-width: 180px;
  z-index: var(--z-dropdown);
  animation: scale-in var(--duration-base) var(--ease-spring) both;
}

@keyframes scale-in {
  from { transform: scale(0.95) translateY(-4px); opacity: 0; }
  to   { transform: scale(1)    translateY(0);    opacity: 1; }
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-smooth);
}

.dropdown-item:hover {
  background: var(--primitive-neutral-50);
  color: var(--color-text-primary);
}

.dropdown-item.danger { color: var(--color-error); }
.dropdown-item.danger:hover { background: var(--color-error-bg); }

.dropdown-separator {
  height: 1px;
  background: var(--color-border-subtle);
  margin: var(--space-2) 0;
}


/* ══════════════════════════════════════════════════════════
   24. TABLE
   ══════════════════════════════════════════════════════════ */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.table th {
  padding: var(--space-3) var(--space-4);
  text-align: right;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-tertiary);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  background: var(--primitive-neutral-50);
  border-bottom: 1px solid var(--color-border-subtle);
}

.table td {
  padding: var(--space-4);
  color: var(--color-text-primary);
  border-bottom: 1px solid var(--color-border-subtle);
  vertical-align: middle;
}

.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--primitive-neutral-50); }


/* ══════════════════════════════════════════════════════════
   25. AVATAR GROUP
   ══════════════════════════════════════════════════════════ */
.avatar-group {
  display: flex;
  align-items: center;
}

.avatar-group .avatar {
  border: 2px solid var(--color-bg-surface);
  margin-right: -8px;
}

.avatar-group .avatar:last-child { margin-right: 0; }

.avatar-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-full);
  border: 2px solid var(--color-bg-surface);
  background: var(--primitive-neutral-100);
  color: var(--color-text-secondary);
  font-size: var(--text-xs);
  font-weight: 600;
  margin-right: -8px;
}


/* ══════════════════════════════════════════════════════════
   26. FORM GROUP
   ══════════════════════════════════════════════════════════ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.form-row {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr 1fr;
}

.form-section-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border-subtle);
}


/* ══════════════════════════════════════════════════════════
   27. SIDEBAR NAV
   ══════════════════════════════════════════════════════════ */
.sidebar {
  width: 260px;
  background: var(--color-bg-surface);
  border-left: 1px solid var(--color-border-subtle);
  padding: var(--space-6) var(--space-4);
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-smooth);
  margin-bottom: var(--space-1);
}

.nav-item:hover { background: var(--primitive-neutral-100); color: var(--color-text-primary); }
.nav-item.active {
  background: var(--color-brand-muted);
  color: var(--color-brand-primary);
  font-weight: 500;
}

.nav-section-label {
  font-size: var(--text-2xs);
  font-family: var(--font-mono);
  color: var(--color-text-tertiary);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  padding: var(--space-6) var(--space-4) var(--space-2);
}


/* ══════════════════════════════════════════════════════════
   28. CODE BLOCK
   ══════════════════════════════════════════════════════════ */
.code-block {
  background: var(--primitive-neutral-950);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  overflow-x: auto;
  position: relative;
}

.code-block pre {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.8;
  color: var(--primitive-neutral-100);
  white-space: pre;
}

.code-block .token-key     { color: #9270F5; }
.code-block .token-string  { color: #E8B043; }
.code-block .token-number  { color: #4DBBBB; }
.code-block .token-comment { color: #5A5448; }


/* ══════════════════════════════════════════════════════════
   29. SEARCH INPUT
   ══════════════════════════════════════════════════════════ */
.search-wrap {
  position: relative;
}

.search-icon {
  position: absolute;
  top: 50%;
  right: var(--space-4);
  transform: translateY(-50%);
  color: var(--color-text-tertiary);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: var(--space-3) var(--space-10) var(--space-3) var(--space-4);
  border: 1.5px solid var(--color-border-default);
  border-radius: var(--radius-full);
  font-family: var(--font-arabic);
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  background: var(--color-bg-surface);
  outline: none;
  transition: all var(--duration-base) var(--ease-smooth);
}

.search-input:focus {
  border-color: var(--color-brand-primary);
  box-shadow: 0 0 0 3px rgba(90, 45, 140, 0.12);
}

.search-input::placeholder { color: var(--color-text-tertiary); }


/* ══════════════════════════════════════════════════════════
   30. EMPTY STATE
   ══════════════════════════════════════════════════════════ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-20) var(--space-8);
  text-align: center;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: var(--space-4);
  opacity: 0.5;
}

.empty-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.empty-body {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  max-width: 360px;
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-6);
}
