
 
    html,
    body,
    .itsm-body {
      font-family: "Tajawal", system-ui, -apple-system, BlinkMacSystemFont, sans-serif !important;
      margin: 0;
      background: radial-gradient(circle at top, #e0f2fe 0, #f9fafb 40%, #f9fafb 100%);
      color: #0f172a;
    }

    /* ===========================
        THEMES
    =========================== */
    body[data-theme="classic"] .itsm-header {
      background: linear-gradient(135deg, #0ea5e9, #22c55e);
    }

    body[data-theme="emerald"] .itsm-header {
      background: linear-gradient(135deg, #059669, #22c55e);
    }

    body[data-theme="indigo"] .itsm-header {
      background: linear-gradient(135deg, #4f46e5, #0ea5e9);
    }

    body[data-theme="light"] .itsm-header {
      background: linear-gradient(135deg, #e5e7eb, #d1fae5);
      color: #111827;
    }

    body[data-theme="light"] .itsm-header .itsm-app-badge {
      background: rgba(15, 23, 42, 0.7);
    }

    /* الشعار أبيض على الثيمات الملونة */
    body[data-theme="classic"] .itsm-header .itsm-logo,
    body[data-theme="emerald"] .itsm-header .itsm-logo,
    body[data-theme="indigo"]  .itsm-header .itsm-logo {
      filter: brightness(0) invert(1);
    }

    /* الشعار بألوانه الأصلية على الثيم الفاتح */
    body[data-theme="light"] .itsm-header .itsm-logo {
      filter: none;
    }

    body[data-theme="light"] .itsm-kpi-card {
      background: #ffffff;
      border: 1px solid #e5e7eb;
    }

    body[data-theme="light"] .itsm-kpi-label {
      color: #4b5563;
    }

    body[data-theme="light"] .itsm-kpi-value {
      color: #111827;
    }

    /* ===========================
        LAYOUT & HEADER
    =========================== */
    .itsm-shell {
      max-width: 94%;
      margin: 0 auto;
      padding: 1.25rem 0 2rem;
    }

    .itsm-header {
      color: #ecfeff;
      border-radius: 18px;
      padding: 1rem 1.2rem 1.3rem;
      box-shadow: 0 14px 45px rgba(15, 23, 42, 0.25);
      position: relative;
      overflow: visible;
    }

    .itsm-header::after {
      content: "";
      position: absolute;
      inset-inline-end: -40px;
      inset-block-start: -40px;
      width: 160px;
      height: 160px;
      border-radius: 999px;
      background: radial-gradient(circle, rgba(248, 250, 252, 0.25), transparent 70%);
      opacity: 0.6;
      pointer-events: none;
    }

    .itsm-app-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0.2rem 0.7rem;
      border-radius: 999px;
      font-size: 0.75rem;
      background: rgba(15, 23, 42, 0.35);
      backdrop-filter: blur(8px);
      margin-bottom: 0.3rem;
    }

    .itsm-title {
      margin: 0;
      font-size: 1.25rem; /* أصغر من قبل */
      font-weight: 700;
    }

    .itsm-subtitle {
      margin: 0.25rem 0 0;
      font-size: 0.85rem;
      opacity: 0.95;
    }

    .itsm-theme-select {
      min-width: 120px;
    }

    /* KPI Header Stats */
    .itsm-kpi-row {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
      gap: 0.75rem;
      margin-top: 0.9rem;
      position: relative;
      z-index: 1;
    }

    .itsm-kpi-card {
      padding: 0.55rem 0.7rem;
      border-radius: 14px;
      background: rgba(15, 23, 42, 0.25);
      display: flex;
      flex-direction: column;
      gap: 0.15rem;
      border: 1px solid rgba(15, 23, 42, 0.35);
      backdrop-filter: blur(6px);
    }

    .itsm-kpi-label {
      font-size: 0.75rem;
      opacity: 0.9;
    }

    .itsm-kpi-value {
      font-size: 1.15rem;
      font-weight: 700;
    }

    /* ===========================
        CARDS – GLOBAL STYLE
    =========================== */
    .itsm-main {
      row-gap: 1rem;
      margin-top: 0.2rem;
    }

    .card {
      border-radius: 16px;
      border: 1px solid rgba(148, 163, 184, 0.25);
      background: rgba(255, 255, 255, 0.96);
      box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
      overflow: hidden;
      position: relative;
    }

    .card::before {
      content: "";
      position: absolute;
      inset-inline-start: 0;
      inset-block-start: 0;
      width: 100%;
      height: 3px;
      background: linear-gradient(90deg, rgba(56, 189, 248, 0.8), rgba(34, 197, 94, 0.9));
      opacity: 0.9;
    }

    .card-tight {
      padding-bottom: 0.8rem;
    }

    .card-header {
      padding: 0.75rem 1rem 0.5rem;
      border-bottom: 1px solid rgba(226, 232, 240, 0.9);
      background-color: transparent;
      position: relative;
      z-index: 1;
    }

    .card-body {
      padding: 0.85rem 1rem 1rem;
      position: relative;
      z-index: 1;
    }

    .card-title {
      font-size: 0.95rem;
      font-weight: 700;
      color: #0f172a;
    }

    .card-caption,
    .card-caption[data-i18n] {
      font-size: 0.8rem;
      color: #6b7280;
      margin-bottom: 0;
    }

    /* ===========================
        CATALOG – SERVICE CARDS
    =========================== */
    #catalogContainer {
      padding: 0.65rem 0.9rem 0.9rem;
    }

    .catalog-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
      gap: 0.7rem;
      margin-top: 0.1rem;
    }

    .service-card {
      border-radius: 12px;
      padding: 0.65rem 0.7rem;
      background: #f9fafb;
      border: 1px solid #e5e7eb;
      transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
      cursor: pointer;
      position: relative;
      overflow: hidden;
    }

    .service-card::after {
      content: "";
      position: absolute;
      inset-inline-start: -40px;
      inset-block-end: -40px;
      width: 90px;
      height: 90px;
      border-radius: 999px;
      background: radial-gradient(circle at center, rgba(59, 130, 246, 0.1), transparent 70%);
      opacity: 0;
      transition: opacity 0.18s ease;
    }

    .service-card:hover {
      transform: translateY(-2px);
      box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
      border-color: #bfdbfe;
      background: #eff6ff;
    }

    .service-card:hover::after {
      opacity: 1;
    }

    .service-title {
      margin: 0 0 0.1rem;
      font-size: 0.9rem;
      font-weight: 600;
      color: #111827;
    }

    .service-code {
      margin: 0;
      font-size: 0.72rem;
      color: #6b7280;
    }

    .service-desc {
      margin: 0.25rem 0 0.4rem;
      font-size: 0.78rem;
      color: #4b5563;
    }

    .service-category {
      font-size: 0.7rem;
      color: #1d4ed8;
      font-weight: 500;
    }

    /* ===========================
        FORM – NEW TICKET
    =========================== */
    .itsm-card .card-header {
      padding-bottom: 0.4rem;
    }

    .itsm-card .card-body {
      padding-top: 0.6rem;
    }

    .badge.bg-soft-primary {
      background-color: rgba(59, 130, 246, 0.08);
      border: 1px solid rgba(59, 130, 246, 0.3);
      font-size: 0.7rem;
      border-radius: 999px;
      padding-inline: 0.6rem;
      padding-block: 0.2rem;
    }

    .itsm-section-title {
      font-size: 0.9rem;
      font-weight: 700;
      color: #0f172a;
    }

    .itsm-section-caption {
      font-size: 0.8rem;
      color: #6b7280;
    }

    .itsm-section-badge {
      font-size: 0.72rem;
      padding: 0.2rem 0.6rem;
      border-radius: 999px;
      background-color: rgba(59, 130, 246, 0.06);
      border: 1px solid rgba(59, 130, 246, 0.3);
      color: #1d4ed8;
      white-space: nowrap;
    }

    .itsm-label {
      font-size: 0.8rem;
      font-weight: 600;
      color: #111827;
    }

    .itsm-help-text {
      font-size: 0.75rem;
      color: #6b7280;
    }

    .itsm-form .form-label {
      margin-bottom: 0.2rem;
    }

    .itsm-form .form-control-sm,
    .itsm-form .form-select-sm {
      border-radius: 0.6rem;
      font-size: 0.8rem;
    }

    .itsm-form textarea.form-control-sm {
      resize: vertical;
    }

    .itsm-form .form-text {
      margin-top: 0.15rem;
    }

    .itsm-form-actions {
      margin-top: 0.7rem;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.35rem;
    }

    .itsm-primary-btn {
      border-radius: 999px;
      padding: 0.5rem 1.8rem;
      font-size: 0.85rem;
      font-weight: 700;
      border: none;
      background: linear-gradient(135deg, #22c55e, #16a34a);
      color: #ffffff;
      box-shadow: 0 10px 25px rgba(22, 163, 74, 0.35);
    }

    .itsm-primary-btn:hover {
      filter: brightness(1.05);
    }

    .itsm-form-note {
      font-size: 0.75rem;
      color: #6b7280;
      text-align: center;
    }

    /* Tabs فوق الفورم */
    .itsm-tabs {
      display: inline-flex;
      gap: 0.4rem;
      padding: 0.25rem;
      border-radius: 999px;
      background: rgba(15, 23, 42, 0.04);
      border: 1px solid rgba(148, 163, 184, 0.35);
    }

    .itsm-tab {
      border: none;
      background: transparent;
      padding: 0.25rem 0.85rem;
      border-radius: 999px;
      font-size: 0.78rem;
      font-weight: 500;
      color: #0f172a;
      cursor: pointer;
      transition: all 0.16s ease;
    }

    .itsm-tab:hover {
      background-color: rgba(255, 255, 255, 0.7);
    }

    .itsm-tab.active {
      background: #ffffff;
      box-shadow: 0 4px 10px rgba(15, 23, 42, 0.18);
      color: #16a34a;
    }

    /* ===========================
        MY TICKETS CARD + TABLE
    =========================== */
    .table-wrapper {
      max-height: 260px;
      overflow: auto;
      border-radius: 10px;
      border: 1px solid #e5e7eb;
      padding: 0.25rem;
      background: #f9fafb;
    }

    .itsm-table thead th {
      position: sticky;
      top: 0;
      background: #f3f4f6;
      font-size: 0.75rem;
    }

    .itsm-table td,
    .itsm-table th {
      white-space: nowrap;
      font-size: 0.78rem;
      vertical-align: middle;
    }

    #btnExportTickets {
      font-size: 0.75rem;
      border-radius: 999px;
      padding-inline: 0.8rem;
    }

    /* ===========================
        FOOTER & MISC
    =========================== */
    .itsm-footer {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      font-size: 0.73rem;
      color: #94a3b8;
      margin-top: 1.5rem;
      padding: 14px 0 8px;
      border-top: 1px solid rgba(0,0,0,.06);
      letter-spacing: .01em;
    }
    .itsm-footer img {
      opacity: .55;
      transition: opacity .2s;
    }
    .itsm-footer:hover img {
      opacity: .85;
    }
    .itsm-footer-sep {
      width: 3px;
      height: 3px;
      border-radius: 50%;
      background: #cbd5e1;
      display: inline-block;
    }

    .itsm-lang-btn.active {
      font-weight: 600;
    }

    .itsm-empty-state {
      padding: 1rem 0.5rem;
      text-align: center;
    }

    .itsm-empty-icon {
      font-size: 1.6rem;
      margin-bottom: 0.25rem;
    }

    .itsm-empty-title {
      font-size: 0.9rem;
      font-weight: 600;
      color: #111827;
    }

    .itsm-empty-text {
      font-size: 0.78rem;
      color: #6b7280;
    }

    /* ===========================
        RESPONSIVE
    =========================== */
    @media (max-width: 992px) {
      .itsm-shell {
        padding-inline: 0.75rem;
      }

      .card::before {
        height: 2px;
      }

    }

/* ═══ Service Catalog — Items Table ════════════════════════════════════ */
.catalog-item-row td {
  vertical-align: middle;
  padding-top: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}
.catalog-item-row:hover td { background: #f8fafc; }
.catalog-action-btn {
  padding: 2px 7px !important;
  font-size: 0.75rem;
  line-height: 1.4;
  opacity: 0.5;
  transition: opacity 0.15s;
}
.catalog-item-row:hover .catalog-action-btn { opacity: 1; }

/* ═══ Service Catalog Category Tree ════════════════════════════════════ */
/* JS يُنتج: itsm-tree-list / itsm-tree-item / itsm-tree-row /
             itsm-tree-node (category-node) / itsm-tree-actions            */

.itsm-tree-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
/* مستوى فرعي — إزاحة وخط متقطع */
.itsm-tree-list .itsm-tree-list {
  margin-right: 1rem;
  padding-right: 0.6rem;
  border-right: 1px dashed #c9d3e0;
}

/* سطر التصنيف — flex مع أيقونة + اسم + أزرار في نفس الصف */
.itsm-tree-row {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 1px 0;
  border-radius: 5px;
}

/* زر اسم التصنيف */
.itsm-tree-node {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 1;
  min-width: 0;
  padding: 4px 6px;
  background: none;
  border: none;
  text-align: start;
  font-size: 0.88rem;
  font-weight: 400;
  color: #0a4a7a;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.12s, color 0.12s;
  text-decoration: none;
}
.itsm-tree-node:hover {
  background: #f0f4ff;
  color: #0d6efd;
}
.itsm-tree-node.fw-bold {
  color: #0d6efd;
  font-weight: 600 !important;
}

/* أيقونة المجلد */
.itsm-tree-icon {
  font-size: 0.85rem;
  color: #6c8ebf;
  flex-shrink: 0;
}
.itsm-tree-node.fw-bold .itsm-tree-icon { color: #0d6efd; }

.itsm-tree-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* أزرار الإجراءات — في نفس الصف، تظهر عند hover */
.itsm-tree-actions {
  display: flex;
  align-items: center;
  gap: 0;
  opacity: 0;
  transition: opacity 0.12s;
  flex-shrink: 0;
}
.itsm-tree-row:hover .itsm-tree-actions { opacity: 1; }

/* إعادة تعريف أزرار bootstrap داخل الشجرة */
.itsm-tree-actions .btn {
  padding: 2px 5px !important;
  font-size: 0.72rem;
  line-height: 1;
  border: none;
  border-radius: 4px;
}
.itsm-tree-actions .btn:hover { background: #e9ecef; }
.itsm-tree-actions .btn.text-danger:hover { background: #fee2e2; }
.itsm-cat-action:hover { background: #e2e8f0; color: #1e293b; }
.itsm-cat-action--danger:hover { background: #fee2e2; color: #dc2626; }

/* إزالة القديمة */
.itsm-tree-node--inactive { opacity: 0.5; }
.itsm-tree-node--inactive .itsm-tree-icon { color: #94a3b8; }
.itsm-tree-inactive-badge { display: none; }

  
/* Change Request type badge */
.ticket-type-CHANGE_REQUEST {
  background: #f3e8ff;
  color: #6d28d9;
  border: 1px solid #c4b5fd;
}
.badge-change { background: #ede9fe; color: #5b21b6; }

/* Problem type badge */
.ticket-type-PROBLEM {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fda4af;
}
.badge-problem { background: #ffe4e6; color: #9f1239; }

/* ═══════════════════════════════════════════════════════════════════════════
   NAV PANEL — Slide-in Side Navigation
═══════════════════════════════════════════════════════════════════════════ */
.itsm-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 8, 23, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  z-index: 4000;
  transition: opacity 0.25s ease;
  opacity: 0;
}
.itsm-nav-backdrop.visible {
  display: block;
  opacity: 1;
}

.itsm-nav-panel {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 290px;
  background: #0f172a;
  box-shadow: -8px 0 40px rgba(0,0,0,0.4);
  transform: translateX(110%);
  transition: transform 0.3s cubic-bezier(0.32,0.72,0,1);
  z-index: 4500;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body[data-lang="ar"] .itsm-nav-panel { right: 0; }
body[data-lang="en"] .itsm-nav-panel { left: 0; transform: translateX(-110%); }
body[data-lang="en"] .itsm-nav-panel.active { transform: translateX(0); }
.itsm-nav-panel.active { transform: translateX(0); }

/* Panel Header */
.itsm-nav-panel-header {
  padding: 20px 20px 16px;
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.itsm-nav-panel-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.itsm-nav-panel-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 1.2px;
}
.itsm-nav-close-btn {
  background: rgba(255,255,255,0.08);
  border: none;
  color: rgba(255,255,255,0.7);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 1rem;
  line-height: 1;
}
.itsm-nav-close-btn:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* User card inside panel */
.itsm-nav-user-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.itsm-nav-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
  text-transform: uppercase;
}
.itsm-nav-user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #f1f5f9;
  line-height: 1.2;
}
.itsm-nav-user-role {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.45);
  margin-top: 1px;
}

/* Panel Body — scrollable */
.itsm-nav-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 12px 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.itsm-nav-panel-body::-webkit-scrollbar { width: 4px; }
.itsm-nav-panel-body::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1); border-radius: 4px;
}

/* Section headers */
.itsm-nav-section-title {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  padding: 14px 8px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.itsm-nav-section-title::before {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.08);
}
.itsm-nav-section-title::after {
  content: '';
  flex: 0;
}

/* Nav links */
.itsm-nav-list {
  list-style: none;
  padding: 0;
  margin: 0 0 4px;
}
.itsm-nav-list li { margin-bottom: 2px; }
.itsm-nav-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  text-decoration: none;
  color: rgba(255,255,255,0.65);
  font-size: 0.83rem;
  font-weight: 500;
  transition: all 0.15s;
  position: relative;
}
.itsm-nav-list a:hover {
  background: rgba(255,255,255,0.07);
  color: #fff;
}
.itsm-nav-list a.active {
  background: rgba(59,130,246,0.2);
  color: #93c5fd;
}
.itsm-nav-list a .nav-icon {
  width: 18px;
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.7;
  flex-shrink: 0;
}
.itsm-nav-list a:hover .nav-icon,
.itsm-nav-list a.active .nav-icon { opacity: 1; }

/* Panel Footer — logout */
.itsm-nav-panel-footer {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.itsm-nav-logout-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 10px;
  color: #fca5a5;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  text-align: start;
}
.itsm-nav-logout-btn:hover {
  background: rgba(239,68,68,0.2);
  color: #fecaca;
  border-color: rgba(239,68,68,0.35);
}

/* MENU BUTTON (header toolbar) */
.itsm-header {
  overflow: visible !important;
  position: relative;
  z-index: 1030;
}
.itsm-header::before, .itsm-header::after { pointer-events: none !important; }

.itsm-menu-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  color: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  backdrop-filter: blur(4px);
}
.itsm-menu-btn:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.3);
}
body[data-theme="light"] .itsm-menu-btn {
  background: rgba(0,0,0,0.06);
  border-color: rgba(0,0,0,0.12);
  color: #1f2937;
}
body[data-theme="light"] .itsm-menu-btn:hover {
  background: rgba(0,0,0,0.1);
}
.itsm-menu-btn .menu-hamburger {
  display: flex;
  flex-direction: column;
  gap: 3.5px;
  width: 16px;
}
.itsm-menu-btn .menu-hamburger span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: all 0.2s;
}
.itsm-menu-btn .menu-hamburger span:nth-child(2) { width: 70%; }

/* ═══════════════════════════════════════════════════════════════════════════
   NOTIFICATION PANEL
═══════════════════════════════════════════════════════════════════════════ */
.itsm-notif-wrapper {
  position: static;
  display: inline-block;
}

.itsm-notif-btn {
  position: relative;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: inherit;
  line-height: 1;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
}
.itsm-notif-btn:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.3);
}
body[data-theme="light"] .itsm-notif-btn {
  background: rgba(0,0,0,0.06);
  border-color: rgba(0,0,0,0.12);
  color: #1f2937;
}
body[data-theme="light"] .itsm-notif-btn:hover {
  background: rgba(0,0,0,0.1);
}

.itsm-notif-badge {
  position: absolute;
  top: -5px;
  inset-inline-end: -5px;
  min-width: 18px;
  height: 18px;
  border-radius: 10px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  padding: 0 4px;
  pointer-events: none;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.9);
  animation: notif-pop 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.itsm-notif-badge.d-none { display: none !important; }

@keyframes notif-pop {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

/* Dropdown */
.itsm-notif-dropdown {
  position: fixed;
  width: 360px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.1);
  z-index: 9999;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform-origin: top right;
  animation: notif-open 0.2s cubic-bezier(0.32,0.72,0,1);
}


@keyframes notif-open {
  from { opacity: 0; transform: scale(0.94) translateY(-6px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}
.itsm-notif-dropdown.d-none { display: none !important; }

/* Header */
.itsm-notif-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px 10px;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}
.itsm-notif-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.itsm-notif-header-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.85rem;
}
#itsmNotifTitle {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
}
#itsmNotifMarkAllBtn {
  font-size: 0.72rem !important;
  color: #3b82f6 !important;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  background: #eff6ff;
  border: none !important;
  transition: all 0.15s;
  text-decoration: none !important;
}
#itsmNotifMarkAllBtn:hover {
  background: #dbeafe;
  color: #1d4ed8 !important;
}

/* List */
.itsm-notif-list {
  overflow-y: auto;
  flex: 1;
  max-height: 360px;
  scrollbar-width: thin;
  scrollbar-color: #e2e8f0 transparent;
}
.itsm-notif-list::-webkit-scrollbar { width: 4px; }
.itsm-notif-list::-webkit-scrollbar-thumb {
  background: #e2e8f0; border-radius: 4px;
}

/* Notif item */
.itsm-notif-item {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 12px 16px;
  border-bottom: 1px solid #f8fafc;
  cursor: pointer;
  transition: background 0.12s;
  color: inherit;
  text-decoration: none;
}
.itsm-notif-item:last-child { border-bottom: none; }
.itsm-notif-item:hover { background: #f8fafc; }
.itsm-notif-item.unread { background: #f0f9ff; }
.itsm-notif-item.unread:hover { background: #e0f2fe; }

.itsm-notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3b82f6;
  margin-top: 6px;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}
.itsm-notif-item:not(.unread) .itsm-notif-dot {
  background: #e2e8f0;
  box-shadow: none;
}

.itsm-notif-content { min-width: 0; }
.itsm-notif-subject {
  font-size: 0.81rem;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.itsm-notif-item:not(.unread) .itsm-notif-subject {
  font-weight: 500;
  color: #475569;
}
.itsm-notif-body {
  font-size: 0.74rem;
  color: #64748b;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
}
.itsm-notif-time {
  font-size: 0.67rem;
  color: #94a3b8;
  white-space: nowrap;
  padding-top: 4px;
}

/* Empty state */
.itsm-notif-empty {
  padding: 2.5rem 1rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.82rem;
}
.itsm-notif-empty-icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
  display: block;
  opacity: 0.4;
}

/* Footer */
.itsm-notif-dropdown-footer {
  padding: 10px 14px;
  border-top: 1px solid #f1f5f9;
  background: #fafafa;
  flex-shrink: 0;
  display: flex;
  gap: 6px;
}
.itsm-notif-dropdown-footer .btn {
  font-size: 0.76rem;
  border-radius: 8px;
}

/* ── Dropdown nav (fallback if panel not used) ─────────────────────────── */
.itsm-nav-dropdown {
  min-width: 230px;
  max-height: 280px;
  overflow-y: auto;
  font-size: 0.85rem;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  border: 1px solid #e2e8f0;
}
.itsm-nav-dropdown .dropdown-header {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #94a3b8;
  padding: 10px 14px 4px;
}
.itsm-nav-dropdown .dropdown-item {
  padding: 7px 14px;
  font-size: 0.83rem;
  border-radius: 0;
  transition: background 0.1s;
}
.itsm-nav-dropdown .dropdown-item:hover {
  background: #f0f9ff;
  color: #0369a1;
}

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

/* ═══════════════════════════════════════════════════════════════════════════
   SKELETON LOADING
═══════════════════════════════════════════════════════════════════════════ */
.itsm-skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: 6px;
  display: block;
}
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .itsm-skeleton { animation: none; background: #e2e8f0; }
}
.itsm-skeleton-row td { padding: 10px 12px; }

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTON LOADING SPINNER
═══════════════════════════════════════════════════════════════════════════ */
.itsm-btn-spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.65s linear infinite;
  vertical-align: middle;
  margin-inline-end: 6px;
  opacity: 0.8;
}
@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOCUS RINGS — WCAG 2.1 AA
═══════════════════════════════════════════════════════════════════════════ */
:focus-visible {
  outline: 2.5px solid #3b82f6;
  outline-offset: 2px;
  border-radius: 4px;
}
button:focus-visible,
.btn:focus-visible {
  outline: 2.5px solid #3b82f6;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(59,130,246,0.15);
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15) !important;
}
/* Remove default ugly outline for mouse users */
:focus:not(:focus-visible) { outline: none; }

/* ═══════════════════════════════════════════════════════════════════════════
   MODAL IMPROVEMENTS — animation + backdrop
═══════════════════════════════════════════════════════════════════════════ */
.modal.fade .modal-dialog {
  transition: transform 0.22s cubic-bezier(0.34,1.56,0.64,1), opacity 0.18s ease;
  transform: scale(0.95) translateY(-8px);
  opacity: 0;
}
.modal.show .modal-dialog {
  transform: scale(1) translateY(0);
  opacity: 1;
}
.modal-backdrop.show { opacity: 0.45; backdrop-filter: blur(4px); }
.modal-content {
  border: none;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.18);
}
.modal-header {
  border-bottom: 1px solid #f1f5f9;
  padding: 1rem 1.25rem 0.75rem;
}
.modal-footer {
  border-top: 1px solid #f1f5f9;
  padding: 0.75rem 1.25rem 1rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   UNIFIED PRIORITY BADGES
═══════════════════════════════════════════════════════════════════════════ */
.itsm-priority {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 20px;
  font-size: 0.72rem; font-weight: 600; white-space: nowrap;
  letter-spacing: 0.3px;
}
.itsm-priority::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0;
}
.itsm-priority-CRITICAL {
  background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5;
}
.itsm-priority-CRITICAL::before { background: #dc2626; box-shadow: 0 0 0 2px rgba(220,38,38,0.25); }
.itsm-priority-HIGH {
  background: #fff7ed; color: #9a3412; border: 1px solid #fdba74;
}
.itsm-priority-HIGH::before { background: #ea580c; }
.itsm-priority-MEDIUM {
  background: #fefce8; color: #854d0e; border: 1px solid #fde68a;
}
.itsm-priority-MEDIUM::before { background: #ca8a04; }
.itsm-priority-LOW {
  background: #f0fdf4; color: #166534; border: 1px solid #86efac;
}
.itsm-priority-LOW::before { background: #16a34a; }

/* ═══════════════════════════════════════════════════════════════════════════
   UNIFIED STATUS BADGES
═══════════════════════════════════════════════════════════════════════════ */
.itsm-status {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 20px;
  font-size: 0.72rem; font-weight: 600; white-space: nowrap;
}
.itsm-status-NEW        { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.itsm-status-OPEN       { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.itsm-status-IN_PROGRESS{ background: #f0f9ff; color: #0369a1; border: 1px solid #bae6fd; }
.itsm-status-PENDING    { background: #fefce8; color: #854d0e; border: 1px solid #fde68a; }
.itsm-status-RESOLVED   { background: #f0fdf4; color: #166534; border: 1px solid #86efac; }
.itsm-status-CLOSED     { background: #f8fafc; color: #475569; border: 1px solid #e2e8f0; }
.itsm-status-CANCELLED  { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* ═══════════════════════════════════════════════════════════════════════════
   UNIFIED TICKET TYPE BADGES
═══════════════════════════════════════════════════════════════════════════ */
.itsm-type {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 6px;
  font-size: 0.70rem; font-weight: 600; white-space: nowrap;
}
.itsm-type-INCIDENT       { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }
.itsm-type-SERVICE_REQUEST{ background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.itsm-type-CHANGE_REQUEST { background: #f5f3ff; color: #5b21b6; border: 1px solid #ddd6fe; }
.itsm-type-PROBLEM        { background: #fef2f2; color: #9f1239; border: 1px solid #fecdd3; }

/* ═══════════════════════════════════════════════════════════════════════════
   UNIFIED CHARACTER COUNTER
═══════════════════════════════════════════════════════════════════════════ */
.itsm-char-counter {
  font-size: 0.72rem; color: #94a3b8; text-align: end; margin-top: 3px;
  transition: color 0.2s;
}
.itsm-char-counter.warn  { color: #f59e0b; }
.itsm-char-counter.over  { color: #ef4444; font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════════════════
   TABLE HOVER + SELECTION
═══════════════════════════════════════════════════════════════════════════ */
.table-hoverable tbody tr {
  cursor: pointer;
  transition: background 0.1s;
}
.table-hoverable tbody tr:hover { background: #f8fafc !important; }
.table-hoverable tbody tr.selected { background: #eff6ff !important; }

/* Smooth row appear for dynamic tables */
@keyframes row-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.itsm-row-new { animation: row-in 0.2s ease both; }

/* ═══════════════════════════════════════════════════════════════════════════
   SMOOTH TAB TRANSITIONS
═══════════════════════════════════════════════════════════════════════════ */
.itsm-tab {
  position: relative;
  transition: color 0.15s, background 0.15s;
}
.itsm-tab::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%; right: 50%;
  height: 2px;
  background: currentColor;
  border-radius: 2px 2px 0 0;
  transition: left 0.2s ease, right 0.2s ease;
}
.itsm-tab.active::after { left: 0; right: 0; }

/* ═══════════════════════════════════════════════════════════════════════════
   TABLE LOADING TRANSITION (prevents flash)
═══════════════════════════════════════════════════════════════════════════ */
.itsm-table-loading { opacity: 0.5; pointer-events: none; transition: opacity 0.2s; }
.itsm-table-loaded  { opacity: 1; transition: opacity 0.25s; }

/* ═══════════════════════════════════════════════════════════════════════════
   CARD HOVER EFFECTS
═══════════════════════════════════════════════════════════════════════════ */
.itsm-card {
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.itsm-card:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,0.09);
  transform: translateY(-1px);
}
.itsm-card:active { transform: translateY(0); }

/* ═══════════════════════════════════════════════════════════════════════════
   PAGE LOAD FADE-IN
═══════════════════════════════════════════════════════════════════════════ */
.itsm-main {
  animation: page-in 0.3s ease both;
}
@keyframes page-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .itsm-main, .itsm-card, .itsm-tab::after, .itsm-row-new {
    animation: none !important;
    transition: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DROPDOWN ANIMATION
═══════════════════════════════════════════════════════════════════════════ */
.dropdown-menu.show {
  animation: dropdown-in 0.15s cubic-bezier(0.32,0.72,0,1);
}
@keyframes dropdown-in {
  from { opacity: 0; transform: scale(0.96) translateY(-4px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   FORM INLINE VALIDATION STYLES
═══════════════════════════════════════════════════════════════════════════ */
.itsm-field-error {
  font-size: 0.76rem;
  color: #ef4444;
  margin-top: 4px;
  display: none;
  align-items: center;
  gap: 4px;
}
.itsm-field-error.visible { display: flex; }
.form-control.is-valid   { border-color: #10b981 !important; }
.form-control.is-invalid { border-color: #ef4444 !important; }
.form-select.is-valid    { border-color: #10b981 !important; }
.form-select.is-invalid  { border-color: #ef4444 !important; }

/* Nav panel unread badge */
.itsm-nav-badge {
  background: #ef4444;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
  line-height: 14px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   QUICK CREATE BUTTON
═══════════════════════════════════════════════════════════════════════════ */
.itsm-quick-create-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 8px;
  color: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.itsm-quick-create-btn:hover {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.45);
  color: inherit;
  transform: translateY(-1px);
}
.itsm-quick-create-btn:active { transform: translateY(0); }
body[data-theme="light"] .itsm-quick-create-btn {
  background: rgba(255,255,255,0.7);
  border-color: rgba(0,0,0,0.15);
  color: #1f2937;
}
body[data-theme="light"] .itsm-quick-create-btn:hover {
  background: #fff;
}
@media (max-width: 600px) {
  .itsm-quick-label { display: none; }
  .itsm-quick-create-btn { padding: 6px 10px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DASHBOARD KPI STRIP
═══════════════════════════════════════════════════════════════════════════ */
.itsm-kpi-strip {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
@media (max-width: 640px) {
  .itsm-kpi-strip { grid-template-columns: repeat(2, 1fr); }
}

.itsm-kpi-tile {
  background: #fff;
  border: 0.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.15s;
}
.itsm-kpi-tile:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.itsm-kpi-tile::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: #3b82f6;
  border-radius: 12px 12px 0 0;
}
.itsm-kpi-tile--success::before { background: #10b981; }
.itsm-kpi-tile--critical::before { background: #ef4444; }

.itsm-kpi-tile-value {
  font-size: 1.7rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1;
  margin-bottom: 4px;
}
.itsm-kpi-tile-label {
  font-size: 0.74rem;
  color: #64748b;
  font-weight: 500;
}
.itsm-kpi-tile-delta {
  font-size: 0.7rem;
  margin-top: 4px;
  font-weight: 600;
}
.itsm-kpi-tile-delta.up   { color: #ef4444; }
.itsm-kpi-tile-delta.down { color: #10b981; }
.itsm-kpi-tile-delta.same { color: #94a3b8; }

/* ═══════════════════════════════════════════════════════════════════════════
   UNIFIED EMPTY STATE
═══════════════════════════════════════════════════════════════════════════ */
.itsm-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  color: #94a3b8;
}
.itsm-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.45;
  display: block;
}
.itsm-empty-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
}
.itsm-empty-desc {
  font-size: 0.82rem;
  color: #94a3b8;
  max-width: 280px;
  line-height: 1.5;
}
.itsm-empty-action {
  margin-top: 16px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAGE TITLE STYLE
═══════════════════════════════════════════════════════════════════════════ */
.itsm-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.itsm-page-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}
.itsm-page-subtitle {
  font-size: 0.8rem;
  color: #64748b;
  margin: 2px 0 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   IMPROVED PAGINATION
═══════════════════════════════════════════════════════════════════════════ */
.pagination .page-link {
  border-radius: 8px !important;
  margin: 0 2px;
  font-size: 0.82rem;
  border: 0.5px solid #e2e8f0;
  color: #374151;
  transition: all 0.12s;
  min-width: 34px;
  text-align: center;
}
.pagination .page-link:hover {
  background: #f0f9ff;
  border-color: #3b82f6;
  color: #1d4ed8;
}
.pagination .page-item.active .page-link {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}
.pagination .page-item.disabled .page-link {
  opacity: 0.45;
}

/* ═══════════════════════════════════════════════════════════════════════════
   IMPROVED SELECT + INPUT
═══════════════════════════════════════════════════════════════════════════ */
.form-control, .form-select {
  border-color: #e2e8f0;
  border-radius: 8px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus, .form-select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.input-group > .form-control:focus,
.input-group > .form-select:focus {
  z-index: 3;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HEADER TOOLBAR — SINGLE ROW COMPACT
═══════════════════════════════════════════════════════════════════════════ */
/* إخفاء الـ row الثاني في الشاشات الكبيرة ونقله بجانب الأول */
@media (min-width: 768px) {
  .itsm-header .d-flex.flex-column.align-items-end.gap-2 {
    gap: 6px !important;
  }
  /* الـ mt-2 على الـ row الثاني تختفي في الشاشات الكبيرة */
  .itsm-header .d-flex.mt-2 {
    margin-top: 4px !important;
  }
}

/* itsm-menu-btn يحتاج visual connection مع الـ panel */
/* في RTL: الزر أقصى اليمين → panel تفتح من اليمين ✓ */
/* في LTR: الزر أقصى اليسار → panel تفتح من اليسار ✓ */
.itsm-menu-btn {
  position: relative;
}
/* مؤشر صغير يدل أن الـ panel ستفتح من هذا الجانب */
[dir="rtl"] .itsm-menu-btn::after {
  content: '';
  position: absolute;
  inset-inline-end: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 16px;
  background: rgba(255,255,255,0.4);
  border-radius: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HEADER V2 — SINGLE ROW PROFESSIONAL DESIGN
═══════════════════════════════════════════════════════════════════════════ */

/* Override old overflow rule from media query */
.itsm-header {
  overflow: visible !important;
  position: relative;
  z-index: 1030;
  padding: 0 !important;
}

/* Main row */
/* ═══════════════════════════════════════
   HEADER ROW
═══════════════════════════════════════ */
/* ═══ HEADER ROW — ثابت بغض النظر عن اللغة ═══════════════════════════════
   الشعار دائماً على اليمين، الـ controls دائماً على اليسار
   لا يتأثر بـ RTL/LTR — نستخدم fixed direction
═══════════════════════════════════════════════════════════════════════════ */
.itsm-hdr-row {
  display: flex;
  flex-direction: row;           /* ثابت دائماً */
  direction: ltr;                /* نتجاهل dir الصفحة */
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  min-height: 64px;
  gap: 12px;
}

/* Brand — logo + subtitle */
.itsm-hdr-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.itsm-hdr-subtitle {
  font-size: 0.72rem;
  font-weight: 400;
  color: rgba(255,255,255,0.6);
  max-width: 220px;
  line-height: 1.35;
  letter-spacing: 0.01em;
  border-left: 1.5px solid rgba(255,255,255,0.2);
  padding-left: 12px;
}
body[data-theme="light"] .itsm-hdr-subtitle {
  color: rgba(15,23,42,0.5);
  border-color: rgba(15,23,42,0.15);
}
@media (max-width: 700px) { .itsm-hdr-subtitle { display: none; } }

/* Controls strip */
.itsm-hdr-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Thin vertical divider */
.itsm-hdr-divider {
  width: 1px;
  height: 22px;
  background: rgba(255,255,255,0.2);
  flex-shrink: 0;
}
body[data-theme="light"] .itsm-hdr-divider { background: rgba(0,0,0,0.12); }

/* ── Header avatar-only button ───────────────────────────────────────── */
.itsm-hdr-avatar-only {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.2);
  border: 1.5px solid rgba(255,255,255,0.35);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.88rem; font-weight: 700;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  user-select: none;
  position: relative; /* anchor for popover */
}
.itsm-hdr-avatar-only:hover {
  background: rgba(255,255,255,0.28);
  transform: scale(1.05);
}
body[data-theme="light"] .itsm-hdr-avatar-only {
  background: rgba(59,130,246,0.15);
  border-color: rgba(59,130,246,0.3);
  color: #1d4ed8;
}

/* ── User info popover on avatar hover ─────────────────────────────────── */
.itsm-hdr-popover {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-end: 0;       /* يمين في LTR، يسار في RTL تلقائياً */
  min-width: 210px;
  background: #1e293b;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
}

/* سهم صغير في الأعلى */
.itsm-hdr-popover::before {
  content: '';
  position: absolute;
  top: -6px;
  inset-inline-end: 10px;
  width: 12px; height: 12px;
  background: #1e293b;
  border-top: 1px solid rgba(255,255,255,0.1);
  border-inline-start: 1px solid rgba(255,255,255,0.1);
  transform: rotate(45deg);
  border-radius: 2px 0 0 0;
}

.itsm-hdr-avatar-only:hover .itsm-hdr-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

body[data-theme="light"] .itsm-hdr-popover {
  background: #fff;
  border-color: rgba(0,0,0,0.1);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
body[data-theme="light"] .itsm-hdr-popover::before {
  background: #fff;
  border-color: rgba(0,0,0,0.1);
}

/* Avatar large inside popover */
.itsm-hdr-pop-avatar {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.1rem; font-weight: 700;
  flex-shrink: 0;
}

/* Text info */
.itsm-hdr-pop-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  direction: ltr;
  align-items: flex-start;
}
.itsm-hdr-pop-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.2;
}
body[data-theme="light"] .itsm-hdr-pop-name { color: #1e293b; }

.itsm-hdr-pop-role {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 5px;
  background: rgba(99,102,241,0.2);
  border: 1px solid rgba(99,102,241,0.3);
  font-size: 0.6rem;
  font-weight: 700;
  color: #a5b4fc;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
body[data-theme="light"] .itsm-hdr-pop-role {
  background: rgba(59,130,246,0.1);
  border-color: rgba(59,130,246,0.25);
  color: #1d4ed8;
}

.itsm-hdr-pop-tenant {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.45);
  margin-top: 1px;
}
.itsm-hdr-pop-tenant i { font-size: 0.6rem; opacity: 0.7; }
body[data-theme="light"] .itsm-hdr-pop-tenant { color: #64748b; }

/* Theme dots picker */
.itsm-theme-picker {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
}
body[data-theme="light"] .itsm-theme-picker {
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.1);
}
.itsm-theme-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  flex-shrink: 0;
  position: relative;
}
.itsm-theme-dot:hover { transform: scale(1.2); }
.itsm-theme-dot.active {
  transform: scale(1.15);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.9);
}
.itsm-theme-dot--classic { background: linear-gradient(135deg, #0ea5e9, #22c55e); }
.itsm-theme-dot--emerald { background: linear-gradient(135deg, #059669, #22c55e); }
.itsm-theme-dot--indigo  { background: linear-gradient(135deg, #4f46e5, #0ea5e9); }
.itsm-theme-dot--light   { background: linear-gradient(135deg, #e5e7eb, #d1fae5); border: 1px solid rgba(0,0,0,0.15); }

/* Lang buttons */
.itsm-hdr-lang-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.7);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1;
}
.itsm-hdr-lang-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }
.itsm-hdr-lang-btn.active {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.4);
  color: #fff;
}
body[data-theme="light"] .itsm-hdr-lang-btn { color: #374151; border-color: rgba(0,0,0,0.15); }
body[data-theme="light"] .itsm-hdr-lang-btn.active { background: rgba(0,0,0,0.1); }

/* Generic icon button */
.itsm-hdr-icon-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.75);
  width: 34px; height: 34px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.9rem;
  position: relative;
  flex-shrink: 0;
}
.itsm-hdr-icon-btn:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.3);
  color: #fff;
}
body[data-theme="light"] .itsm-hdr-icon-btn { color: #374151; border-color: rgba(0,0,0,0.12); }
body[data-theme="light"] .itsm-hdr-icon-btn:hover { background: rgba(0,0,0,0.06); }

/* Logout button subtle red tint on hover */
.itsm-hdr-logout:hover {
  background: rgba(239,68,68,0.2) !important;
  border-color: rgba(239,68,68,0.4) !important;
  color: #fca5a5 !important;
}

/* Menu button — visually distinct */
.itsm-hdr-menu-btn {
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.9);
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
  position: relative;
  z-index: 10;  /* above everything in header */
}
.itsm-hdr-menu-btn:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.45);
  transform: scale(1.05);
}
.itsm-hdr-menu-btn:active { transform: scale(0.97); }
body[data-theme="light"] .itsm-hdr-menu-btn {
  background: rgba(0,0,0,0.07);
  border-color: rgba(0,0,0,0.18);
  color: #1f2937;
}
body[data-theme="light"] .itsm-hdr-menu-btn:hover { background: rgba(0,0,0,0.12); }

.itsm-hdr-hamburger {
  display: flex; flex-direction: column; gap: 4px;
  width: 16px;
}
.itsm-hdr-hamburger span {
  display: block; height: 1.5px; border-radius: 2px;
  background: currentColor;
  transition: all 0.2s;
}
.itsm-hdr-hamburger span:nth-child(2) { width: 70%; }

/* Responsive: hide subtitle on small screens */
@media (max-width: 640px) {
  .itsm-hdr-subtitle { display: none; }
  .itsm-hdr-userinfo { display: none; }
  .itsm-hdr-row { padding: 10px 14px; }
  .itsm-hdr-user { padding: 5px 6px; }
}

/* Ensure notif wrapper doesn't block menu button */
.itsm-hdr-controls > * { flex-shrink: 0; }

/* ── Service Catalog: Category Tree enhancements ────────────────────────── */
.itsm-tree-node--inactive {
  opacity: 0.55;
}
.itsm-tree-node--inactive .itsm-tree-icon {
  color: #94a3b8;
}
.itsm-tree-inactive-badge {
  display: inline-flex;
  align-items: center;
  padding: 0 5px;
  border-radius: 4px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 0.58rem;
  color: #94a3b8;
  font-weight: 500;
  margin-inline-start: 4px;
  white-space: nowrap;
}
.itsm-notif-wrapper { position: relative; }

/* ═══════════════════════════════════════════════════════════════════════════
   NAV PANEL V2 — COMMAND PALETTE STYLE
═══════════════════════════════════════════════════════════════════════════ */

/* Panel container */
.itsm-nav-panel {
  width: 320px !important;
  background: var(--nav-panel-bg, #0f172a) !important;
}

/* Panel colors per theme */
body[data-theme="classic"]  { --nav-panel-bg: #0c1e35; --nav-panel-accent: #0ea5e9; --nav-panel-accent2: #22c55e; }
body[data-theme="emerald"]  { --nav-panel-bg: #061a13; --nav-panel-accent: #059669; --nav-panel-accent2: #22c55e; }
body[data-theme="indigo"]   { --nav-panel-bg: #0d0d2b; --nav-panel-accent: #4f46e5; --nav-panel-accent2: #0ea5e9; }
body[data-theme="light"]    {
  --nav-panel-bg: #1e293b;
  --nav-panel-accent: #3b82f6;
  --nav-panel-accent2: #10b981;
}

/* Header bar */
.itsm-nav2-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--nav-panel-accent, #0ea5e9) 20%, transparent),
    color-mix(in srgb, var(--nav-panel-accent2, #22c55e) 10%, transparent));
  position: relative;
}
.itsm-nav2-close {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5);
  width: 28px; height: 28px;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 0.8rem;
  transition: all 0.15s;
}
.itsm-nav2-close:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* User card */
.itsm-nav2-user {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: relative;
}
.itsm-nav2-avatar {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--nav-panel-accent, #3b82f6), var(--nav-panel-accent2, #06b6d4));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 1rem; flex-shrink: 0;
}
.itsm-nav2-user-info { flex: 1; min-width: 0; }
.itsm-nav2-user-name {
  display: block; font-size: 0.87rem; font-weight: 600;
  color: #f1f5f9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.itsm-nav2-user-role {
  display: block; font-size: 0.68rem;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-top: 1px;
}
.itsm-nav2-online-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34,197,94,0.25);
  flex-shrink: 0;
}

/* Body / Sections */
.itsm-nav2-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}
.itsm-nav2-body::-webkit-scrollbar { width: 3px; }
.itsm-nav2-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

.itsm-nav2-section { margin-bottom: 18px; }
.itsm-nav2-section-label {
  font-size: 0.62rem; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  padding: 0 4px; margin-bottom: 6px;
}

/* Grid of nav items */
.itsm-nav2-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

/* Nav item card */
.itsm-nav2-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.05);
  text-decoration: none;
  color: rgba(255,255,255,0.6);
  font-size: 0.78rem;
  font-weight: 500;
  transition: all 0.15s;
  position: relative;
  overflow: hidden;
}
.itsm-nav2-item:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.12);
  color: #fff;
  transform: translateY(-1px);
}
.itsm-nav2-item.active {
  background: color-mix(in srgb, var(--nav-panel-accent, #3b82f6) 18%, transparent);
  border-color: color-mix(in srgb, var(--nav-panel-accent, #3b82f6) 30%, transparent);
  color: #93c5fd;
}
.itsm-nav2-item.active::before {
  content: '';
  position: absolute; inset-inline-start: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--nav-panel-accent, #3b82f6);
  border-radius: 0 2px 2px 0;
}

.itsm-nav2-item-icon {
  font-size: 1rem;
  opacity: 0.7;
  line-height: 1;
}
.itsm-nav2-item:hover .itsm-nav2-item-icon,
.itsm-nav2-item.active .itsm-nav2-item-icon { opacity: 1; }

.itsm-nav2-item-label {
  line-height: 1.2;
  word-break: break-word;
}

/* Wide items (sections with only 1 column needed) */
.itsm-nav2-grid:has(.itsm-nav2-item:only-child) .itsm-nav2-item {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.itsm-nav2-grid:has(:nth-child(3)) {
  grid-template-columns: 1fr 1fr;
}
.itsm-nav2-grid:not(:has(:nth-child(3))) {
  grid-template-columns: 1fr;
}
.itsm-nav2-grid:not(:has(:nth-child(3))) .itsm-nav2-item {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
}

/* Badge */
.itsm-nav2-badge {
  position: absolute; top: 7px; inset-inline-end: 7px;
  background: #ef4444; color: #fff;
  font-size: 0.58rem; font-weight: 700;
  padding: 1px 5px; border-radius: 8px; min-width: 16px; text-align: center;
}

/* Footer */
.itsm-nav2-footer {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

/* Settings row: theme + language */
.itsm-nav2-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.itsm-nav2-setting-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.itsm-nav2-setting-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 500;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Theme dots in menu */
.itsm-nav2-theme-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.itsm-nav2-theme-dot {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.itsm-nav2-theme-dot:hover { transform: scale(1.15); }
.itsm-nav2-theme-dot.active { border-color: #fff; transform: scale(1.1); }
.itsm-nav2-td--classic { background: linear-gradient(135deg, #0ea5e9, #22c55e); }
.itsm-nav2-td--emerald { background: linear-gradient(135deg, #10b981, #065f46); }
.itsm-nav2-td--indigo  { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.itsm-nav2-td--light   { background: linear-gradient(135deg, #f8fafc, #e2e8f0); border: 2px solid rgba(255,255,255,0.3); }
.itsm-nav2-td--light.active { border-color: #94a3b8; }

/* Language toggle in menu */
.itsm-nav2-lang-row {
  display: flex;
  gap: 4px;
}
.itsm-nav2-lang-btn {
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.5);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.itsm-nav2-lang-btn:hover { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.85); }
.itsm-nav2-lang-btn.active {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.35);
  color: #fff;
}

/* Footer bottom: logout + version */
.itsm-nav2-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
}

.itsm-nav2-logout {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 10px;
  color: #fca5a5; font-size: 0.8rem; font-weight: 500;
  cursor: pointer; transition: all 0.15s;
}
.itsm-nav2-logout:hover { background: rgba(239,68,68,0.2); border-color: rgba(239,68,68,0.4); color: #fecaca; }
.itsm-nav2-ver { font-size: 0.65rem; color: rgba(255,255,255,0.2); }

/* Tenant line in menu user block */
.itsm-nav2-tenant {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  font-size: 0.71rem;
  color: rgba(255,255,255,0.5);
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}
.itsm-nav2-tenant i { font-size: 0.62rem; opacity: 0.6; flex-shrink: 0; }

/* ═══ SearchSelect — Searchable Dropdown Component ══════════════════════ */
.ss-wrap {
  position: relative;
  width: 100%;
  font-size: 0.875rem;
}

/* زر التفعيل */
.ss-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  padding: 6px 10px;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  cursor: pointer;
  text-align: start;
  transition: border-color 0.15s, box-shadow 0.15s;
  color: #212529;
  line-height: 1.5;
  min-height: 36px;
}
.ss-trigger:hover { border-color: #86b7fe; }
.ss-trigger--open {
  border-color: #86b7fe;
  box-shadow: 0 0 0 3px rgba(13,110,253,0.15);
  border-radius: 6px 6px 0 0;
}
.ss-selected { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-selected--placeholder { color: #6c757d; }
.ss-arrow {
  font-size: 0.65rem;
  color: #6c757d;
  flex-shrink: 0;
  transition: transform 0.15s;
}
.ss-trigger--open .ss-arrow { transform: rotate(180deg); }

/* القائمة المنسدلة */
.ss-dropdown {
  position: absolute;
  top: calc(100% - 1px);
  inset-inline-start: 0;
  inset-inline-end: 0;
  background: #fff;
  border: 1px solid #86b7fe;
  border-top: none;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  z-index: 1060;
  max-height: 280px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ss-dropdown[hidden] { display: none; }

/* حقل البحث */
.ss-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid #f1f3f5;
  flex-shrink: 0;
}
.ss-search-icon { color: #adb5bd; font-size: 0.78rem; flex-shrink: 0; }
.ss-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.82rem;
  background: transparent;
  color: #212529;
  min-width: 0;
}
.ss-search-input::placeholder { color: #adb5bd; }

/* قائمة الخيارات */
.ss-list {
  list-style: none;
  margin: 0;
  padding: 4px;
  overflow-y: auto;
  flex: 1;
}
.ss-list::-webkit-scrollbar { width: 4px; }
.ss-list::-webkit-scrollbar-thumb { background: #dee2e6; border-radius: 4px; }

/* خيار واحد */
.ss-option {
  padding: 7px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.82rem;
  color: #212529;
  transition: background 0.1s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ss-option:hover { background: #f0f4ff; color: #0d6efd; }
.ss-option--selected {
  background: #eff6ff;
  color: #0d6efd;
  font-weight: 500;
}
.ss-option--none { color: #6c757d; font-style: italic; }
.ss-option--none:hover { background: #f8f9fa; color: #495057; }
.ss-option--empty {
  color: #adb5bd;
  text-align: center;
  cursor: default;
  font-style: italic;
}
.ss-option--empty:hover { background: transparent; }

/* highlight نص البحث */
.ss-option mark {
  background: #fef08a;
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}

/* light theme */
body[data-theme="light"] .ss-trigger { background: #fff; }

/* ═══ Service Catalog Items — Card List Layout ═══════════════════════════ */
.sc-items-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* بطاقة خدمة واحدة */
.sc-item-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  transition: box-shadow 0.15s, border-color 0.15s;
  position: relative;
}
.sc-item-card:hover {
  border-color: #c7d2fe;
  box-shadow: 0 2px 8px rgba(99,102,241,0.08);
}
.sc-item-card--inactive {
  opacity: 0.6;
  background: #f8fafc;
}

/* أيقونة يسار البطاقة */
.sc-item-left { flex-shrink: 0; }
.sc-item-icon-wrap {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
  display: flex; align-items: center; justify-content: center;
  color: #4f46e5;
  font-size: 1rem;
}

/* محتوى البطاقة */
.sc-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* صف الاسم والبادجات */
.sc-item-header {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.sc-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}
.sc-item-code {
  font-size: 0.68rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 1px 6px;
  color: #64748b;
  font-family: monospace;
  white-space: nowrap;
}

/* chips الروابط (SLA / Workflow / Form) */
.sc-item-chips {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.sc-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 5px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.67rem;
  color: #475569;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sc-chip i { font-size: 0.65rem; color: #94a3b8; flex-shrink: 0; }

/* أزرار الإجراءات */
.sc-item-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s;
}
.sc-item-card:hover .sc-item-actions { opacity: 1; }

.sc-act-btn {
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 1px solid transparent;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  background: none;
  color: #94a3b8;
}
.sc-act-btn--edit:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}
.sc-act-btn--delete:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

/* light theme overrides */
body[data-theme="light"] .sc-item-card { border-color: #e2e8f0; }
body[data-theme="light"] .sc-item-card:hover { border-color: #a5b4fc; }

/* ── notification click row highlight ────────────────────────────── */
@keyframes itsm-notif-row-flash {
  0%   { background-color: #fef9c3; }
  60%  { background-color: #fef08a; }
  100% { background-color: transparent; }
}
.itsm-notif-highlight {
  animation: itsm-notif-row-flash 2.5s ease-out forwards;
}
