/* ==== خطوط وأساسيات ==== */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Cairo', 'Tajawal', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  color: #0f172a;
}

/* ==== شريط التمرير ==== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #14b8a6, #0f766e);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #0d9488, #115e59);
}

/* ==== هيرو متدرج ==== */
.hero-gradient {
  background: linear-gradient(135deg, #0f766e 0%, #115e59 50%, #134e4a 100%);
  position: relative;
  overflow: hidden;
}
.hero-gradient::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(212, 175, 55, 0.18), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(45, 212, 191, 0.20), transparent 40%);
  pointer-events: none;
}

/* ==== بطاقات ==== */
.card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 4px 16px rgba(15, 118, 110, 0.08);
  transition: all 0.3s ease;
  border: 1px solid rgba(15, 118, 110, 0.06);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.05), 0 12px 32px rgba(15, 118, 110, 0.15);
}

.stat-card {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(15, 118, 110, 0.08);
  box-shadow: 0 2px 10px rgba(15, 118, 110, 0.08);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(180deg, #14b8a6, #0f766e);
}

/* ==== أزرار ==== */
.btn-primary {
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  color: white;
  padding: 0.6rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.25);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #0d9488, #0f766e);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(15, 118, 110, 0.35);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: white;
  color: #0f766e;
  padding: 0.6rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  border: 2px solid #0f766e;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}
.btn-secondary:hover {
  background: #0f766e;
  color: white;
}

.btn-gold {
  background: linear-gradient(135deg, #d4af37, #a37f1e);
  color: white;
  padding: 0.6rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.35);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.5);
}

/* ==== الشريط الجانبي ==== */
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.25rem;
  border-radius: 0.75rem;
  color: #e2e8f0;
  font-weight: 600;
  transition: all 0.25s ease;
  cursor: pointer;
  position: relative;
}
.sidebar-link:hover {
  background: rgba(255,255,255,0.08);
  color: white;
  transform: translateX(-4px);
}
.sidebar-link.active {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.3), rgba(15, 118, 110, 0.3));
  color: white;
  border-right: 3px solid #d4af37;
}
.sidebar-link i {
  width: 22px;
  font-size: 1.1rem;
  text-align: center;
}

/* ==== القائمة الفرعية (Submenu) للـ Sidebar ==== */
.sidebar-group {
  display: flex;
  flex-direction: column;
}
.sidebar-group-toggle .sidebar-chevron {
  margin-right: auto;
  font-size: 0.7rem !important;
  width: 14px !important;
  transition: transform 0.3s ease;
  opacity: 0.7;
}
.sidebar-group.expanded .sidebar-group-toggle .sidebar-chevron {
  transform: rotate(180deg);
}
.sidebar-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  margin-right: 1.2rem;
  border-right: 2px solid rgba(212, 175, 55, 0.25);
  padding-right: 0.5rem;
  margin-top: 0.15rem;
}
.sidebar-group.expanded .sidebar-submenu {
  max-height: 400px;
}
.sidebar-sublink {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.9rem;
  border-radius: 0.6rem;
  color: #cbd5e1;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
  margin-top: 0.2rem;
  position: relative;
}
.sidebar-sublink::before {
  content: '';
  position: absolute;
  right: -0.6rem;
  top: 50%;
  width: 0.5rem;
  height: 2px;
  background: rgba(212, 175, 55, 0.4);
  transform: translateY(-50%);
}
.sidebar-sublink:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  transform: translateX(-3px);
}
.sidebar-sublink.active {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.35), rgba(15, 118, 110, 0.35));
  color: white;
  box-shadow: 0 2px 8px rgba(20, 184, 166, 0.15);
}
.sidebar-sublink.active::before {
  background: #d4af37;
  width: 0.7rem;
}
.sidebar-sublink i {
  width: 18px;
  font-size: 0.85rem;
  text-align: center;
  color: #d4af37;
  opacity: 0.85;
}
.sidebar-sublink.active i {
  opacity: 1;
}

/* ==== المستوى الثالث (أقسام فرعية للمسار 4) ==== */
.sidebar-subgroup {
  display: flex;
  flex-direction: column;
}
.sidebar-subgroup-toggle .sidebar-chevron {
  margin-right: auto;
  font-size: 0.65rem !important;
  width: 12px !important;
  transition: transform 0.3s ease;
  opacity: 0.6;
  color: #cbd5e1 !important;
}
.sidebar-subgroup.expanded .sidebar-subgroup-toggle .sidebar-chevron {
  transform: rotate(180deg);
}
.sidebar-subsubmenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  margin-right: 1rem;
  border-right: 1.5px dashed rgba(212, 175, 55, 0.3);
  padding-right: 0.4rem;
}
.sidebar-subgroup.expanded .sidebar-subsubmenu {
  max-height: 250px;
}
.sidebar-subsublink {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.7rem;
  border-radius: 0.5rem;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  margin-top: 0.2rem;
  position: relative;
}
.sidebar-subsublink::before {
  content: '';
  position: absolute;
  right: -0.5rem;
  top: 50%;
  width: 0.4rem;
  height: 1.5px;
  background: rgba(212, 175, 55, 0.35);
  transform: translateY(-50%);
}
.sidebar-subsublink:hover {
  background: rgba(255, 255, 255, 0.06);
  color: white;
  transform: translateX(-2px);
}
.sidebar-subsublink.active {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.28), rgba(15, 118, 110, 0.28));
  color: white;
}
.sidebar-subsublink.active::before {
  background: #d4af37;
  width: 0.6rem;
  height: 2px;
}
.sidebar-subsublink i {
  width: 14px;
  font-size: 0.7rem;
  text-align: center;
  color: #d4af37;
  opacity: 0.7;
}
.sidebar-subsublink.active i {
  opacity: 1;
}

/* ==== شارة الحالة ==== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info    { background: #dbeafe; color: #1e40af; }
.badge-gray    { background: #f1f5f9; color: #475569; }

/* ==== Animations ==== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fadeInUp { animation: fadeInUp 0.5s ease-out; }

@keyframes pulse-soft {
  0%, 100% { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.4); }
  50% { box-shadow: 0 0 0 14px rgba(20, 184, 166, 0); }
}
.animate-pulse-soft { animation: pulse-soft 2.2s infinite; }

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

/* ==== أيقونة الصلاحيات ==== */
.kaaba-icon {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #d4af37;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.25);
}

/* ==== جدول ==== */
.table-modern {
  width: 100%;
  border-collapse: collapse;
}
.table-modern thead th {
  background: linear-gradient(135deg, #0f766e, #115e59);
  color: white;
  font-weight: 700;
  padding: 1rem 0.85rem;
  text-align: right;
  font-size: 0.9rem;
}
.table-modern thead th:first-child { border-top-right-radius: 0.75rem; }
.table-modern thead th:last-child  { border-top-left-radius: 0.75rem; }
.table-modern tbody td {
  padding: 0.9rem 0.85rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
  vertical-align: top;
}
.table-modern tbody tr:hover { background: #f0fdfa; }
.table-modern tbody tr:last-child td { border-bottom: none; }

/* ==== Modal ==== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-content {
  background: white;
  border-radius: 1.25rem;
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: fadeInUp 0.3s ease;
}

/* ==== مناطق الإسقاط للملفات ==== */
.dropzone {
  border: 2px dashed #0d9488;
  background: rgba(20, 184, 166, 0.04);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}
.dropzone:hover, .dropzone.dragover {
  background: rgba(20, 184, 166, 0.1);
  border-color: #0f766e;
  transform: scale(1.01);
}

/* ==== شجرة الهيكل التنظيمي ==== */
.org-tree {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
}
.org-node {
  background: white;
  border: 2px solid #0d9488;
  border-radius: 0.85rem;
  padding: 0.85rem 1.25rem;
  min-width: 200px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.15);
  transition: all 0.25s ease;
  position: relative;
}
.org-node:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.25);
}
.org-node.director {
  background: linear-gradient(135deg, #0f766e, #115e59);
  color: white;
  border-color: #d4af37;
  min-width: 260px;
  padding: 1rem 1.5rem;
}
.org-node.deputy {
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  color: white;
  min-width: 220px;
}
.org-node.section {
  background: linear-gradient(135deg, #f0fdfa, white);
}
.org-connector {
  width: 2px;
  height: 28px;
  background: #0d9488;
}
.org-horizontal {
  height: 2px;
  background: #0d9488;
}

/* ==== تبويبات الأقسام الفرعية ==== */
.subsection-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem;
  background: #f1f5f9;
  border-radius: 0.85rem;
  margin-bottom: 1.25rem;
}
.subsection-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.1rem;
  border-radius: 0.65rem;
  background: white;
  color: #475569;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.subsection-tab:hover {
  background: #f0fdfa;
  border-color: #14b8a6;
  color: #0f766e;
  transform: translateY(-1px);
}
.subsection-tab.active {
  background: linear-gradient(135deg, #0f766e, #115e59);
  color: white;
  border-color: #0f766e;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.3);
}
.subsection-tab i {
  font-size: 0.95rem;
}
.subsection-tab .count-badge {
  background: rgba(255, 255, 255, 0.25);
  padding: 0.1rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
}
.subsection-tab:not(.active) .count-badge {
  background: #e2e8f0;
  color: #475569;
}

/* ==== محرر الهيكل التنظيمي التفاعلي ==== */
.org-node-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  margin: 0 0.5rem;
}
.org-children-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 1.5rem;
  position: relative;
  flex-wrap: nowrap;
}
.org-child-wrapper {
  position: relative;
  padding-top: 1rem;
}
.org-child-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  right: 50%;
  width: 2px;
  height: 1rem;
  background: #0d9488;
  transform: translateX(50%);
}
.org-horizontal-line {
  position: absolute;
  top: -1.5rem;
  right: 0;
  left: 0;
  height: 2px;
  background: #0d9488;
}
.org-node {
  cursor: pointer;
}
.org-node-controls {
  display: none;
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
  padding: 0.25rem 0.4rem;
  gap: 0.25rem;
  z-index: 5;
  white-space: nowrap;
}
.org-node.show-controls .org-node-controls,
.org-node-wrapper:hover > .org-node .org-node-controls {
  display: inline-flex;
}
.org-ctrl-btn {
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: white;
  background: #64748b;
  transition: all 0.18s ease;
}
.org-ctrl-btn:hover { transform: scale(1.12); }
.org-ctrl-btn.add  { background: #16a34a; }
.org-ctrl-btn.edit { background: #2563eb; }
.org-ctrl-btn.del  { background: #dc2626; }
.org-ctrl-btn.up,
.org-ctrl-btn.down { background: #0d9488; }

/* ==== Logo / branding ==== */
.brand-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, #d4af37, #a37f1e);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.4);
}

/* ==== Toast ==== */
#toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast {
  background: white;
  border-radius: 0.85rem;
  padding: 0.9rem 1.25rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
  border-right: 4px solid #0d9488;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  animation: fadeInUp 0.3s ease;
  min-width: 280px;
}
.toast.toast-success { border-right-color: #16a34a; }
.toast.toast-error   { border-right-color: #dc2626; }
.toast.toast-warning { border-right-color: #d97706; }

/* ==== Print ==== */
@media print {
  body { background: white !important; }
  #sidebar, #menu-toggle, header, footer, #btn-add-task, .no-print {
    display: none !important;
  }
  #main-content { margin-right: 0 !important; }
  .card { box-shadow: none !important; border: 1px solid #cbd5e1; page-break-inside: avoid; }
  .org-node { box-shadow: none !important; }
  @page { margin: 1cm; }
}

/* ==== شريط التقدم ==== */
.progress-bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #14b8a6, #0d9488);
  border-radius: 9999px;
  transition: width 0.6s ease;
}

/* ==== ملاحظات صغيرة ==== */
.text-muted { color: #64748b; }
.divider-or {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #94a3b8;
  font-size: 0.85rem;
  margin: 1rem 0;
}
.divider-or::before,
.divider-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

/* ==== استجابة الموبايل ==== */
@media (max-width: 768px) {
  #sidebar {
    position: fixed;
    right: -280px;
    top: 0;
    height: 100vh;
    z-index: 50;
    transition: right 0.3s ease;
  }
  #sidebar.open { right: 0; }
  #main-content { margin-right: 0 !important; }
}

/* ==== Accordion للتقارير ==== */
.report-accordion-item {
  transition: background 0.2s ease;
}
.report-accordion-item + .report-accordion-item {
  border-top: 1px solid #f1f5f9;
}

/* ==== قائمة اختيار البنود (Item Picker) ==== */
.item-pick-list {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  background: #f8fafc;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.item-pick-card {
  display: block;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}
.item-pick-card:hover {
  border-color: #14b8a6;
  background: #f0fdfa;
  transform: translateX(-2px);
}
.item-pick-card.selected {
  border-color: #0d9488;
  background: linear-gradient(135deg, #f0fdfa, #ccfbf1);
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.15);
}
.item-pick-card .item-pick-check {
  opacity: 0;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}
.item-pick-card.selected .item-pick-check {
  opacity: 1;
}
.item-pick-card.selected p {
  color: #134e4a;
}
/* scrollbar مخصص للقائمة */
.item-pick-list::-webkit-scrollbar { width: 6px; }
.item-pick-list::-webkit-scrollbar-thumb { background: #14b8a6; border-radius: 3px; }

/* تحسين الـ stat-card الصغير */
.stat-card.\!p-3 {
  padding: 0.75rem !important;
}

/* ==== File card ==== */
.file-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}
.file-card:hover {
  background: #f0fdfa;
  border-color: #14b8a6;
}
.file-icon {
  width: 42px;
  height: 42px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: white;
  flex-shrink: 0;
}
.file-icon-pdf  { background: #dc2626; }
.file-icon-doc  { background: #2563eb; }
.file-icon-xls  { background: #16a34a; }
.file-icon-img  { background: #db2777; }
.file-icon-default { background: #64748b; }

/* ---------- Staff Tabs (Human Resources) ---------- */
.staff-tab {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.875rem;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.25s ease;
  flex-shrink: 0;
  min-width: max-content;
}
.staff-tab:hover {
  border-color: #14b8a6;
  background: #f0fdfa;
  transform: translateY(-1px);
}
.staff-tab.active {
  border-color: #0d9488;
  background: linear-gradient(135deg, #ccfbf1 0%, #99f6e4 100%);
  box-shadow: 0 4px 12px -2px rgba(13, 148, 136, 0.25);
}
.staff-tab.active .text-slate-800 { color: #0f766e; }

/* ==== Brand logo (الشعار الرسمي) ==== */
.brand-sidebar-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: white;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}
.brand-sidebar-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.brand-logo-img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: white;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}
.brand-logo-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.brand-logo-img-light {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f0fdfa, #ccfbf1);
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.15);
  border: 2px solid #5eead4;
  flex-shrink: 0;
}
.brand-logo-img-light img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

/* ==== Delay Alerts Banner (نظام تنبيهات التأخر) ==== */
.delay-alerts-banner {
  margin-bottom: 1.5rem;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 10px 30px -10px rgba(220, 38, 38, 0.25);
  animation: slideInDown 0.5s ease-out;
}
@keyframes slideInDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.delay-alerts-banner .alert-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  user-select: none;
  transition: filter 0.2s;
}
.delay-alerts-banner .alert-header:hover { filter: brightness(1.05); }
.delay-alerts-banner.severity-critical .alert-header {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  color: white;
}
.delay-alerts-banner.severity-warning .alert-header {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}
.delay-alerts-banner.severity-info .alert-header {
  background: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%);
  color: white;
}
.delay-alerts-banner .alert-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.delay-alerts-banner .alert-pulse {
  animation: alertPulse 1.5s ease-in-out infinite;
}
@keyframes alertPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.1); opacity: 0.85; }
}
.delay-alerts-banner .alert-count-badge {
  background: rgba(255, 255, 255, 0.25);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 800;
  backdrop-filter: blur(8px);
}
.delay-alerts-banner .alert-body {
  background: white;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.delay-alerts-banner.open .alert-body {
  max-height: 600px;
  overflow-y: auto;
}
.delay-alerts-banner .alert-toggle-chevron {
  transition: transform 0.3s;
}
.delay-alerts-banner.open .alert-toggle-chevron {
  transform: rotate(180deg);
}
.delay-alert-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s;
}
.delay-alert-item:last-child { border-bottom: none; }
.delay-alert-item:hover { background: #fef2f2; }
.delay-alert-item .alert-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.delay-alert-item .alert-dot.critical { background: #dc2626; box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.15); }
.delay-alert-item .alert-dot.warning  { background: #f59e0b; box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15); }
.delay-alert-item .alert-dot.info     { background: #0ea5e9; box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15); }
.delay-alert-item .days-badge {
  padding: 0.25rem 0.625rem;
  border-radius: 0.5rem;
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}
.delay-alert-item .days-badge.critical { background: #fee2e2; color: #b91c1c; }
.delay-alert-item .days-badge.warning  { background: #fef3c7; color: #92400e; }
.delay-alert-item .days-badge.info     { background: #e0f2fe; color: #075985; }

/* ===== Cloud Sync Badge ===== */
.sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: all .25s ease;
  white-space: nowrap;
}
.sync-badge i { font-size: 12px; }
.sync-badge.sync-ok      { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.sync-badge.sync-pending { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; animation: pulse-soft 1.2s ease-in-out infinite; }
.sync-badge.sync-error   { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.6; }
}

/* ============================================================
   ███████ STaRs MODULE — Premium UI ███████
   نظام تقييم 13 إدارة مكافحة عدوى بمناطق المملكة
   ============================================================ */

/* ---- Sidebar additions ---- */
.sidebar-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 12px 8px;
  font-size: 10.5px;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 10px;
}
.sidebar-section-label i { font-size: 11px; color: #2dd4bf; }
.sidebar-section-label:first-of-type { border-top: none; margin-top: 0; padding-top: 6px; }

.sidebar-stars {
  position: relative;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.10), rgba(13, 148, 136, 0.05));
  border: 1px solid rgba(45, 212, 191, 0.18);
}
.sidebar-stars:hover {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.20), rgba(13, 148, 136, 0.12));
  border-color: rgba(45, 212, 191, 0.4);
}
.sidebar-stars.active {
  background: linear-gradient(135deg, #0f766e, #14b8a6) !important;
  box-shadow: 0 6px 20px rgba(20, 184, 166, 0.35);
}
.sidebar-badge-new {
  margin-inline-start: auto;
  font-size: 9px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #fff;
  box-shadow: 0 2px 6px rgba(249, 115, 22, 0.5);
  animation: pulse-soft 1.8s ease-in-out infinite;
}

/* ---- STaRs Promo Banner on Dashboard ---- */
.stars-promo-banner {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 40px rgba(15, 118, 110, 0.25);
}
.stars-promo-banner:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 50px rgba(15, 118, 110, 0.4);
}
.stars-promo-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.15), transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(45, 212, 191, 0.3), transparent 50%),
    linear-gradient(135deg, #0f766e 0%, #0891b2 50%, #1e40af 100%);
}
.stars-promo-bg::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.15) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
  opacity: 0.4;
}
.stars-promo-content {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 22px 26px;
  color: #fff;
  flex-wrap: wrap;
}
.stars-promo-icon {
  width: 80px; height: 80px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border-radius: 22px;
  font-size: 38px;
  color: #fff;
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.5);
  flex-shrink: 0;
}
.stars-promo-text { flex: 1; min-width: 260px; }
.stars-promo-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
}
.stars-promo-new-pill {
  background: linear-gradient(135deg, #fde047, #f59e0b);
  color: #7c2d12;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
}
.stars-promo-title {
  font-size: 22px;
  font-weight: 900;
  margin: 4px 0 4px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.stars-promo-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.92);
  line-height: 1.6;
}
.stars-promo-stats {
  display: flex;
  gap: 14px;
}
.stars-promo-stat {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(6px);
  border-radius: 16px;
  padding: 10px 18px;
  text-align: center;
  min-width: 75px;
}
.stars-promo-stat-num {
  font-size: 26px;
  font-weight: 900;
  color: #fef3c7;
}
.stars-promo-stat-lbl {
  font-size: 10px;
  margin-top: 2px;
  color: rgba(255,255,255,0.85);
}
.stars-promo-arrow {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  transition: transform 0.3s;
}
.stars-promo-banner:hover .stars-promo-arrow {
  transform: translateX(-6px);
  background: rgba(255,255,255,0.25);
}

/* ---- STaRs Hero Banner ---- */
.stars-hero {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  padding: 32px 28px;
  color: #fff;
}
.stars-hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at top left, rgba(45, 212, 191, 0.35), transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(251, 191, 36, 0.25), transparent 50%),
    linear-gradient(135deg, #042f2e 0%, #0f766e 40%, #134e4a 100%);
}
.stars-hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
}
.stars-hero-content { position: relative; z-index: 2; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #d1fae5;
}
.hero-badge i { color: #5eead4; }
.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1e293b;
  font-weight: 800;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
  transition: all 0.25s;
  cursor: pointer;
  white-space: nowrap;
}
.btn-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.55);
}

/* ---- Big KPI cards (used on stars dashboard) ---- */
.kpi-big {
  --accent: #0d9488;
  background: #fff;
  border-radius: 18px;
  padding: 18px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid #e2e8f0;
  position: relative;
  overflow: hidden;
  transition: all 0.25s;
}
.kpi-big::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--accent);
}
.kpi-big:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  border-color: var(--accent);
}
.kpi-big-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--accent) 12%, white);
  color: var(--accent);
  font-size: 22px;
  flex-shrink: 0;
}
.kpi-big-body { flex: 1; min-width: 0; }
.kpi-big-label {
  font-size: 11.5px;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.kpi-big-value {
  font-size: 26px;
  font-weight: 900;
  color: #0f172a;
  margin-top: 2px;
  line-height: 1.1;
}
.kpi-big-sub {
  font-size: 10.5px;
  color: #94a3b8;
  margin-top: 4px;
  font-weight: 500;
}

/* ---- Best / Worst Cards ---- */
.best-card, .worst-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
}
.best-card {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border: 1.5px solid #6ee7b7;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.15);
}
.worst-card {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border: 1.5px solid #fca5a5;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.15);
}
.best-card-icon, .worst-card-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}
.best-card-icon {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
}
.worst-card-icon {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.4);
}

/* ---- Chart card ---- */
.chart-card {
  background: #fff;
  border-radius: 18px;
  padding: 18px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}
.chart-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.chart-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: #1e293b;
  font-size: 15px;
}

/* ---- Heatmap Table ---- */
.heatmap-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 4px;
  min-width: 720px;
}
.heatmap-table th {
  background: #f8fafc;
  padding: 10px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
  color: #475569;
  text-align: center;
}
.hm-region-col { text-align: start !important; min-width: 160px; }
.hm-track-col i { font-size: 18px; display: block; margin-bottom: 4px; }
.hm-track-name { font-size: 10px; line-height: 1.2; }
.hm-total-col { background: #fef3c7 !important; color: #92400e !important; }
.hm-region-cell {
  background: #f8fafc;
  padding: 12px 10px;
  border-radius: 10px;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.2s;
}
.hm-region-cell:hover {
  background: #e0f2fe;
  transform: translateX(-2px);
}
.hm-cell {
  text-align: center;
  border-radius: 10px;
  padding: 12px 6px;
  font-weight: 700;
  cursor: default;
  transition: transform 0.2s;
}
.hm-cell:hover { transform: scale(1.05); z-index: 1; position: relative; }
.hm-cell-val { font-size: 16px; }
.hm-cell-sub { font-size: 9px; opacity: 0.8; margin-top: 2px; }

/* ---- Top Issues List ---- */
.top-issue-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: 12px;
  margin-bottom: 8px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s;
}
.top-issue-row:hover {
  background: #fff;
  border-color: #cbd5e1;
  transform: translateX(-3px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}
.top-issue-rank {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900;
  font-size: 14px;
  flex-shrink: 0;
}
.top-issue-rank.rank-1 { background: linear-gradient(135deg, #dc2626, #b91c1c); box-shadow: 0 4px 12px rgba(220,38,38,0.4); }
.top-issue-rank.rank-2 { background: linear-gradient(135deg, #ea580c, #c2410c); }
.top-issue-rank.rank-3 { background: linear-gradient(135deg, #f59e0b, #d97706); }
.top-issue-text { flex: 1; }
.top-issue-code {
  font-size: 10.5px;
  color: #64748b;
  font-weight: 700;
}
.top-issue-title {
  font-size: 13px;
  color: #0f172a;
  font-weight: 700;
  margin-top: 2px;
}
.top-issue-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 11px;
}
.top-issue-bar {
  width: 110px;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}
.top-issue-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #f97316, #dc2626);
  border-radius: 4px;
}
.top-issue-pct {
  font-weight: 900;
  font-size: 13px;
  min-width: 50px;
  text-align: end;
}

/* ---- Priority Pills ---- */
.priority-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
}
.priority-pill.priority-critical { background: #fee2e2; color: #b91c1c; }
.priority-pill.priority-high     { background: #ffedd5; color: #c2410c; }
.priority-pill.priority-low      { background: #cffafe; color: #155e75; }

/* ---- Zone Pills ---- */
.zone-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}
.zone-pill.zone-arrival   { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.zone-pill.zone-beginning { background: #fef3c7; color: #92400e; border: 1px solid #fde047; }
.zone-pill.zone-comfort   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ---- Region Chips ---- */
.region-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  background: #fff;
  border: 1.5px solid #fbbf24;
  color: #78350f;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.region-chip:hover {
  background: #fef3c7;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(251, 191, 36, 0.3);
}

/* ---- Unassessed banner ---- */
.unassessed-banner {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 1.5px dashed #f59e0b;
  border-radius: 16px;
  padding: 16px 20px;
}

/* ---- Region Cards Grid ---- */
.region-card {
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  border: 1.5px solid #e2e8f0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.region-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
  border-color: var(--region-color, #14b8a6);
}
.region-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: var(--region-color, #14b8a6);
}
.region-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.region-card-icon {
  width: 50px; height: 50px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 22px;
  flex-shrink: 0;
  background: var(--region-color, #14b8a6);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--region-color, #14b8a6) 40%, transparent);
}
.region-card-title {
  font-size: 17px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.2;
}
.region-card-subtitle {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}
.region-main-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #fff;
  font-size: 9.5px;
  font-weight: 900;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 4px;
}
.region-score-circle {
  width: 90px; height: 90px;
  margin: 0 auto;
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.region-score-circle svg {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}
.region-score-text {
  position: relative;
  font-size: 22px;
  font-weight: 900;
  color: #0f172a;
}
.region-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.region-stats-row {
  display: flex;
  justify-content: space-around;
  text-align: center;
  padding: 10px 6px;
  background: #f8fafc;
  border-radius: 12px;
  margin-top: 4px;
}
.region-stat-num {
  font-size: 17px;
  font-weight: 900;
  color: #0f172a;
}
.region-stat-num.critical { color: #dc2626; }
.region-stat-num.high     { color: #ea580c; }
.region-stat-num.low      { color: #0891b2; }
.region-stat-lbl {
  font-size: 9.5px;
  color: #64748b;
  margin-top: 2px;
}
.region-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}
.btn-card-action {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}
.btn-primary-soft {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}
.btn-primary-soft:hover { background: #a7f3d0; transform: translateY(-1px); }
.btn-secondary-soft {
  background: #e0f2fe;
  color: #075985;
  border: 1px solid #7dd3fc;
}
.btn-secondary-soft:hover { background: #bae6fd; transform: translateY(-1px); }
.btn-warning-soft {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde047;
}
.btn-warning-soft:hover { background: #fde68a; transform: translateY(-1px); }

.region-not-assessed {
  text-align: center;
  padding: 12px;
  color: #94a3b8;
  font-size: 12px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
}

/* ---- Assessment Modal ---- */
.assessment-modal {
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.assess-modal-head {
  background: linear-gradient(135deg, #0f766e, #134e4a);
  color: #fff;
  padding: 18px 22px;
  border-radius: 18px 18px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.assess-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px;
  background: #f8fafc;
}
.assess-tabs {
  display: flex;
  gap: 4px;
  background: #fff;
  padding: 6px;
  border-radius: 14px;
  margin-bottom: 16px;
  overflow-x: auto;
  border: 1px solid #e2e8f0;
}
.assess-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  border: none;
  background: transparent;
}
.assess-tab:hover { background: #f1f5f9; }
.assess-tab.active {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  color: #fff;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.3);
}
.assess-tab .tab-count {
  background: rgba(255,255,255,0.25);
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}
.assess-tab:not(.active) .tab-count {
  background: #f1f5f9;
  color: #475569;
}
.assess-tab .tab-issues-dot {
  width: 7px; height: 7px;
  background: #dc2626;
  border-radius: 50%;
  display: inline-block;
}

.live-score-card {
  background: #fff;
  border-radius: 16px;
  padding: 14px 18px;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}
.live-score-num {
  font-size: 32px;
  font-weight: 900;
  background: linear-gradient(135deg, #0f766e, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.live-score-bar {
  flex: 1;
  height: 14px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
  min-width: 200px;
  position: relative;
}
.live-score-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #dc2626 0%, #f59e0b 40%, #10b981 90%);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.scope-block {
  background: #fff;
  border-radius: 14px;
  margin-bottom: 14px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}
.scope-block-head {
  padding: 12px 16px;
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  font-weight: 800;
  color: #1e293b;
  font-size: 13.5px;
  border-bottom: 1px solid #e2e8f0;
}

.assess-item {
  padding: 16px;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.2s;
}
.assess-item:hover { background: #fafbfc; }
.assess-item:last-child { border-bottom: none; }
.assess-item.has-issue { background: #fef2f2; border-right: 4px solid #dc2626; }
.assess-item.action-required { background: #fffbeb; border-right: 4px solid #f59e0b; }

.assess-item-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
.assess-item-code {
  background: #e0f2fe;
  color: #075985;
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.assess-item-title {
  flex: 1;
  font-size: 13px;
  color: #0f172a;
  font-weight: 600;
  line-height: 1.5;
}
.assess-item-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.assess-item-field {
  background: #f8fafc;
  border-radius: 10px;
  padding: 10px;
  border: 1px solid #e2e8f0;
}
.assess-item-field-label {
  font-size: 10.5px;
  font-weight: 800;
  color: #475569;
  margin-bottom: 6px;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.assess-radio-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.assess-radio {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 9px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
  transition: all 0.15s;
}
.assess-radio:hover { border-color: #94a3b8; }
.assess-radio.active {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  color: #fff;
  border-color: #0f766e;
}
.assess-radio.active.yes {
  background: linear-gradient(135deg, #16a34a, #15803d);
  border-color: #15803d;
}
.assess-radio.active.no {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  border-color: #b91c1c;
}
.assess-radio.active.require {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: #d97706;
}
.assess-textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  background: #fff;
  resize: vertical;
  min-height: 60px;
}
.assess-textarea:focus { border-color: #14b8a6; outline: none; }

.resp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 6px;
}
.resp-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 8px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  cursor: pointer;
  font-size: 10.5px;
  font-weight: 700;
  color: #475569;
  transition: all 0.15s;
  user-select: none;
}
.resp-chip:hover { border-color: #94a3b8; }
.resp-chip.active {
  background: linear-gradient(135deg, #0891b2, #06b6d4);
  color: #fff;
  border-color: #0891b2;
}

.assess-modal-foot {
  background: #fff;
  padding: 14px 22px;
  border-top: 1px solid #e2e8f0;
  border-radius: 0 0 18px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---- Region Report ---- */
.region-report-hero {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  padding: 30px;
  color: #fff;
}
.region-report-hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--region-color, #14b8a6) 0%, rgba(15, 23, 42, 0.9) 100%);
}
.score-summary-card {
  background: #fff;
  border-radius: 18px;
  padding: 18px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.track-report {
  background: #fff;
  border-radius: 18px;
  padding: 18px 20px;
  border: 1px solid #e2e8f0;
  margin-bottom: 14px;
}
.track-report-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f1f5f9;
}
.track-report-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: #fff;
  flex-shrink: 0;
}
.track-report-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.track-report-stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  background: #f1f5f9;
  color: #475569;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
}
.track-report-stat.warn { background: #fee2e2; color: #b91c1c; }
.track-report-stat.ok { background: #dcfce7; color: #166534; }

.challenge-item-rpt {
  background: #f8fafc;
  border-radius: 11px;
  padding: 12px 14px;
  margin-bottom: 8px;
  border: 1px solid #e2e8f0;
  border-right: 4px solid #94a3b8;
}
.challenge-item-rpt.exists {
  background: #fef2f2;
  border-color: #fecaca;
  border-right-color: #dc2626;
}
.challenge-item-rpt.exists.completed {
  background: #f0fdf4;
  border-color: #bbf7d0;
  border-right-color: #16a34a;
}
.challenge-item-rpt-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}
.challenge-item-rpt-title {
  flex: 1;
  font-size: 12.5px;
  color: #0f172a;
  font-weight: 600;
  line-height: 1.5;
}
.challenge-item-rpt-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: 11px;
}
.challenge-item-action {
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 8px;
  font-size: 11.5px;
  color: #475569;
  line-height: 1.6;
}
.challenge-item-action b { color: #0f172a; }

/* ---- Compare Page ---- */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}
.compare-table thead {
  background: linear-gradient(135deg, #0f766e, #134e4a);
  color: #fff;
}
.compare-table th {
  padding: 13px 10px;
  font-weight: 800;
  font-size: 12px;
  text-align: center;
}
.compare-table td {
  padding: 11px 10px;
  border-bottom: 1px solid #f1f5f9;
  text-align: center;
}
.compare-table tr:hover { background: #f8fafc; }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table .rank-1 td:first-child { background: linear-gradient(90deg, #fef3c7, transparent); font-weight: 900; }
.compare-table .rank-last td:first-child { background: linear-gradient(90deg, #fee2e2, transparent); }
.compare-pct-cell {
  font-weight: 900;
  font-size: 14px;
}

/* ---- Generic helper classes ---- */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #fff;
  color: #475569;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover { background: #f1f5f9; border-color: #cbd5e1; }

.btn-success {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fff;
  border: none;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
  transition: all 0.2s;
}
.btn-success:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(22, 163, 74, 0.4); }

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #fff;
  color: #dc2626;
  border: 1.5px solid #fca5a5;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.btn-danger:hover { background: #fee2e2; }

/* ---- Animation for cards on enter ---- */
@keyframes starsCardEnter {
  0% { opacity: 0; transform: translateY(15px); }
  100% { opacity: 1; transform: translateY(0); }
}
.region-card, .chart-card, .kpi-big, .best-card, .worst-card {
  animation: starsCardEnter 0.4s ease-out backwards;
}
.region-card:nth-child(1) { animation-delay: 0.05s; }
.region-card:nth-child(2) { animation-delay: 0.10s; }
.region-card:nth-child(3) { animation-delay: 0.15s; }
.region-card:nth-child(4) { animation-delay: 0.20s; }
.region-card:nth-child(5) { animation-delay: 0.25s; }
.region-card:nth-child(6) { animation-delay: 0.30s; }

/* Print-friendly styles for region reports */
@media print {
  .sidebar, #sidebar, header, .btn-primary, .btn-secondary, .btn-success, .btn-danger,
  .sync-badge, #menu-toggle, footer { display: none !important; }
  main, #main-content { margin: 0 !important; }
  .stars-hero, .region-report-hero { color: #000 !important; }
  .stars-hero-bg, .region-report-hero-bg { display: none !important; }
  body { background: #fff !important; }
}

/* ==== Additional assessment modal styles (stars.js exact class names) ==== */
.region-icon-lg {
  width: 54px; height: 54px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.assessment-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 6px 14px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 14px;
}

.form-input {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  color: #0f172a;
  transition: border-color 0.15s;
}
.form-input:focus {
  outline: none;
  border-color: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

/* Live score card (small inline) */
.live-score-card {
  --zc: #0d9488;
  --zbg: #f0fdfa;
  background: linear-gradient(135deg, var(--zbg), #fff);
  border: 2px solid var(--zc);
  border-radius: 16px;
  padding: 12px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.lsc-label {
  font-size: 10px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.lsc-score {
  font-size: 30px;
  font-weight: 900;
  color: var(--zc);
  line-height: 1;
}
.lsc-pct {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  margin-top: 4px;
}
.lsc-zone {
  font-size: 11px;
  color: var(--zc);
  font-weight: 700;
  margin-top: 2px;
}

/* Assessment tabs (track switcher) */
.assessment-tabs {
  display: flex;
  gap: 4px;
  padding: 6px;
  margin: 16px 0 12px;
  background: #f1f5f9;
  border-radius: 14px;
  overflow-x: auto;
}
.assess-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  font-family: inherit;
}
.assess-tab:hover { background: rgba(255,255,255,0.6); }
.assess-tab.active {
  background: #fff;
  color: #0f766e;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}
.assess-tab-count {
  background: #fee2e2;
  color: #b91c1c;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  min-width: 18px;
  text-align: center;
}
.assess-tab.active .assess-tab-count { background: #fee2e2; }
.assess-tab .assess-tab-count[data-count="0"] { display: none; }

/* Track pane visibility */
.assess-track-pane { display: none; }
.assess-track-pane.active { display: block; animation: starsCardEnter 0.25s ease; }

/* Scope block within tab */
.assess-scope {
  background: #fff;
  border-radius: 14px;
  margin-bottom: 14px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}
.assess-scope-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  font-weight: 800;
  color: #1e293b;
  font-size: 13.5px;
  border-bottom: 1px solid #e2e8f0;
}
.scope-code {
  background: #0f766e;
  color: #fff;
  padding: 3px 9px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
}

/* Individual assess item — refined for the actual stars.js markup */
.assess-item {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.2s;
}
.assess-item:last-child { border-bottom: none; }
.assess-item:hover { background: #fafbfc; }
.assess-item.exists {
  background: linear-gradient(90deg, #fef2f2 0%, #fff 60%);
  border-right: 3px solid #dc2626;
}

.assess-item-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.ai-code {
  background: #e0f2fe;
  color: #075985;
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}
.ai-text {
  flex: 1;
  font-size: 13px;
  color: #0f172a;
  font-weight: 600;
  line-height: 1.55;
  min-width: 220px;
}
.ai-score-badge {
  background: #f1f5f9;
  color: #475569;
  padding: 3px 9px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
  min-width: 32px;
  text-align: center;
}
.assess-item.exists .ai-score-badge { background: #fee2e2; color: #b91c1c; }

.ai-label {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  color: #475569;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.ai-toggle {
  display: flex;
  gap: 6px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 4px;
}
.ai-toggle-opt {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
  transition: all 0.15s;
  background: transparent;
}
.ai-toggle-opt:hover { background: rgba(255,255,255,0.7); }
.ai-toggle-opt.active {
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
  color: #0f172a;
}
.ai-toggle-opt input[type="radio"] { display: none; }

.ai-resp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 6px;
}
.ai-resp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
  transition: all 0.15s;
  user-select: none;
}
.ai-resp:hover { border-color: #94a3b8; }
.ai-resp.active {
  background: linear-gradient(135deg, #0891b2, #06b6d4);
  border-color: #0891b2;
  color: #fff;
  box-shadow: 0 4px 10px rgba(8, 145, 178, 0.3);
}
.ai-resp input[type="checkbox"] { display: none; }

.ai-deliverable {
  background: #fffbeb;
  border: 1px dashed #fbbf24;
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 11.5px;
  color: #78350f;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  line-height: 1.5;
}

.assessment-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 6px 6px;
  border-top: 1px solid #e2e8f0;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* ============================================================
   STARS v2 - REFACTORED PLATFORM STYLES
   ============================================================ */

/* ---------- Modal overlay (new lightweight modal in app.js) ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn .15s ease-out;
}
.modal-card {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.4);
  animation: slideUp .2s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Toast (4-state) ---------- */
.toast-container { position: fixed; bottom: 20px; left: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  font-weight: 600;
  font-size: 14px;
  min-width: 260px;
  border-right: 4px solid #6366f1;
  animation: slideInLeft .25s ease-out;
}
.toast-item.success { border-color: #10b981; color: #065f46; }
.toast-item.error   { border-color: #ef4444; color: #991b1b; }
.toast-item.warning { border-color: #f59e0b; color: #92400e; }
.toast-item.info    { border-color: #3b82f6; color: #1e40af; }
.toast-item i { font-size: 18px; }
.toast-out { animation: slideOutLeft .25s ease-in forwards; }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideOutLeft { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(-30px); } }

/* ---------- Error state ---------- */
.error-state {
  padding: 40px 20px;
  text-align: center;
  background: #fff;
  border-radius: 12px;
  border: 1px dashed #e2e8f0;
}
.error-state i { color: #ef4444; }

/* ============================================================
   ABOUT PAGE (built into app.js)
   ============================================================ */
.about-hero {
  position: relative;
  padding: 40px 32px;
  border-radius: 20px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
  color: #fff;
  overflow: hidden;
  margin-bottom: 24px;
}
.about-hero-bg {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.15), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255,255,255,.1), transparent 50%);
  pointer-events: none;
}
.about-logo {
  width: 96px; height: 96px;
  border-radius: 24px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  margin-bottom: 16px;
  position: relative;
}
.about-title {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -1px;
  position: relative;
}
.about-subtitle {
  font-size: 18px;
  opacity: 0.9;
  margin-top: 8px;
  position: relative;
}
.about-desc {
  font-size: 14px;
  opacity: 0.85;
  margin-top: 12px;
  max-width: 700px;
  position: relative;
}

.info-card {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  border: 1px solid #e2e8f0;
  text-align: center;
  transition: all .2s;
}
.info-card:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.08); }
.info-card-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 12px;
}
.info-card-num { font-size: 32px; font-weight: 900; color: #1e293b; }
.info-card-lbl { font-size: 14px; font-weight: 700; color: #475569; margin-top: 4px; }
.info-card-desc { font-size: 12px; color: #94a3b8; margin-top: 4px; }

.card-pro {
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  border: 1px solid #e2e8f0;
}
.card-pro-title {
  font-size: 18px;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.check-list { display: flex; flex-direction: column; gap: 10px; }
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #334155;
}
.check-list li i {
  color: #10b981;
  margin-top: 2px;
}

.zone-pill-info {
  padding: 14px 16px;
  border-radius: 12px;
  border: 2px solid;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.zone-pill-info i {
  font-size: 22px;
}
.zone-pill-info .zpi-name { font-weight: 800; font-size: 15px; }
.zone-pill-info .zpi-range { font-size: 12px; opacity: 0.8; margin-top: 2px; }

.track-mini-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  text-align: center;
  border-top: 4px solid;
  transition: all .2s;
}
.track-mini-card:hover { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(0,0,0,0.08); }
.track-mini-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 10px;
}
.track-mini-name { font-weight: 700; font-size: 13px; color: #1e293b; }
.track-mini-count { font-size: 11px; color: #64748b; margin-top: 4px; }

/* ============================================================
   IMPROVED ASSESSMENT MODAL (PRO)
   ============================================================ */
.assessment-modal-pro {
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.assess-hero {
  padding: 24px 28px;
  border-radius: 16px 16px 0 0;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.assess-close-btn {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.2);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
  font-size: 16px;
}
.assess-close-btn:hover { background: rgba(255,255,255,0.35); transform: scale(1.05); }
.assess-hero-content { position: relative; z-index: 1; }
.assess-hero-icon {
  width: 64px; height: 64px;
  border-radius: 14px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  color: #fff;
  flex-shrink: 0;
}
.assess-hero-score {
  background: rgba(255,255,255,0.95);
  border-radius: 14px;
  padding: 16px 24px;
  text-align: center;
  min-width: 160px;
}
.assess-hero-score .lsc-pct {
  font-size: 32px;
  font-weight: 900;
  color: var(--zc);
  line-height: 1;
}
.assess-hero-score .lsc-label {
  font-size: 11px;
  color: #64748b;
  font-weight: 700;
  margin-top: 4px;
}
.assess-hero-score .lsc-zone {
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-block;
  margin-top: 8px;
}
.assess-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 20px;
}
.stat-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border-radius: 10px;
  padding: 10px 14px;
}
.stat-mini i { font-size: 22px; color: #fff; }
.sm-num { font-size: 20px; font-weight: 900; color: #fff; line-height: 1; }
.sm-lbl { font-size: 11px; color: rgba(255,255,255,0.85); margin-top: 3px; }

.assess-meta-bar {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 16px 24px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.meta-field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 4px;
}
.meta-field label i { color: #6366f1; margin-left: 4px; }
.meta-field .form-input { width: 100%; font-size: 13px; }

/* === New: Assessor section cards (Director / Team Leader / 2nd Assessor) === */
.assess-section-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding: 14px 24px 16px;
}
.assess-section-card + .assess-section-card { border-top: none; }
.assess-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f1f5f9;
}
.assess-section-title i { color: #6366f1; font-size: 14px; }
.assess-section-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 768px) {
  .assess-section-grid { grid-template-columns: 1fr; }
}

/* iOS-style toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  border-radius: 26px;
  transition: 0.25s;
}
.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  right: 3px;
  bottom: 3px;
  background-color: #fff;
  border-radius: 50%;
  transition: 0.25s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider { background-color: #10b981; }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(-20px); }

.assessment-tabs-pro {
  display: flex;
  gap: 4px;
  padding: 12px 24px;
  background: #fff;
  border-bottom: 2px solid #f1f5f9;
  overflow-x: auto;
  flex-wrap: nowrap;
}
.assess-tab-pro {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  background: #f8fafc;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.assess-tab-pro:hover {
  background: #f1f5f9;
  color: #1e293b;
}
.assess-tab-pro.active {
  background: var(--tc);
  background: color-mix(in srgb, var(--tc) 12%, white);
  border-color: var(--tc);
  color: var(--tc);
}
.assess-tab-pro i { font-size: 14px; }
.assess-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  background: rgba(255,255,255,0.5);
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  padding: 0 6px;
}

.assess-content-area {
  padding: 20px 24px;
  background: #f8fafc;
  min-height: 400px;
}

/* Track pane header */
.track-pane-header {
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 16px;
}
.tph-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.tph-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

/* Scope pro block */
.assess-scope-pro {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.assess-scope-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px dashed #e2e8f0;
  flex-wrap: wrap;
}
.scope-head-left { display: flex; align-items: center; gap: 10px; }
.scope-code-pro {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.5px;
}
.scope-title-pro {
  font-size: 15px;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
}
.scope-subtitle-pro {
  font-size: 11px;
  color: #94a3b8;
  margin: 2px 0 0;
}
.scope-head-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.scope-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  background: #f1f5f9;
  color: #475569;
}

.scope-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Assess item pro */
.assess-item-pro {
  background: #f8fafc;
  border-radius: 10px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-right: 4px solid #cbd5e1;
  transition: all .15s;
}
.assess-item-pro.state-ok      { border-right-color: #10b981; }
.assess-item-pro.state-resolved{ border-right-color: #0ea5e9; background: #f0f9ff; }
.assess-item-pro.state-require { border-right-color: #ef4444; background: #fef2f2; }

.ai-pro-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ai-pro-code {
  font-family: 'Courier New', monospace;
  background: #fff;
  color: #475569;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 12px;
  border: 1px solid #e2e8f0;
}
.ai-pro-text {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  min-width: 200px;
}
.priority-pill-pro {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}
.ai-score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 24px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 12px;
}

.ai-pro-body { margin-top: 12px; }
.ai-pro-en {
  font-size: 12px;
  color: #64748b;
  background: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 10px;
  font-style: italic;
}
.ai-pro-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 10px;
}
.ai-control-block { display: flex; flex-direction: column; gap: 4px; }
.ai-pro-label {
  font-size: 11px;
  font-weight: 800;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 5px;
}
.ai-segmented {
  display: flex;
  gap: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 3px;
}
.ai-seg-btn {
  flex: 1;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: all .15s;
  border: none;
}
.ai-seg-btn:hover { background: #f1f5f9; }
.ai-seg-btn.active.emerald { background: #10b981; color: #fff; box-shadow: 0 2px 4px rgba(16,185,129,0.3); }
.ai-seg-btn.active.rose    { background: #ef4444; color: #fff; box-shadow: 0 2px 4px rgba(239,68,68,0.3); }
.ai-seg-btn.active.amber   { background: #f59e0b; color: #fff; box-shadow: 0 2px 4px rgba(245,158,11,0.3); }
.ai-seg-btn.active.sky     { background: #0ea5e9; color: #fff; box-shadow: 0 2px 4px rgba(14,165,233,0.3); }

.ai-pro-row {
  margin-top: 10px;
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  border: 1px solid #e2e8f0;
}
.ai-pro-textarea {
  width: 100%;
  font-size: 13px;
  margin-top: 6px;
  resize: vertical;
}

.ai-resp-grid-pro {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 6px;
  margin-top: 6px;
}
.ai-resp-pro {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1.5px solid #e2e8f0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  background: #f8fafc;
  transition: all .15s;
}
.ai-resp-pro:hover { background: #f1f5f9; }
.ai-resp-pro.active {
  background: #ede9fe;
  border-color: #8b5cf6;
  color: #6d28d9;
}
.ai-resp-pro input { display: none; }
.ai-resp-pro .resp-check {
  width: 18px; height: 18px;
  border-radius: 4px;
  border: 1.5px solid #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: transparent;
  transition: all .15s;
}
.ai-resp-pro.active .resp-check {
  background: #8b5cf6;
  border-color: #8b5cf6;
  color: #fff;
}

.ai-deliverable-pro {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 14px;
  background: #fffbeb;
  border-radius: 8px;
  border: 1px solid #fde68a;
}
.ai-deliverable-pro i { color: #f59e0b; font-size: 16px; margin-top: 2px; }

/* Scope-level notes box */
.scope-notes-box {
  margin-top: 14px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  border-radius: 10px;
  border: 1px dashed #c7d2fe;
}
.scope-notes-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #4338ca;
  margin-bottom: 6px;
}
.scope-notes-textarea {
  background: #fff !important;
  border-color: #c7d2fe !important;
  resize: vertical;
}

.assessment-footer-pro {
  background: #fff;
  border-top: 1px solid #e2e8f0;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  bottom: 0;
  border-radius: 0 0 16px 16px;
}
.footer-info { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #64748b; font-weight: 600; }

/* ============================================================
   KPI PAGE
   ============================================================ */
.kpi-page-hero {
  background: linear-gradient(135deg, #4f46e5, #7c3aed, #db2777);
  border-radius: 16px;
  padding: 28px 32px;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
}
.kpi-page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255,255,255,.15), transparent 60%);
}
.kpi-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.kpi-hero-icon {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}
.kpi-hero-stats {
  display: flex;
  gap: 12px;
}
.kpi-hero-stat {
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 12px 18px;
  text-align: center;
  min-width: 110px;
}
.khs-num { font-size: 24px; font-weight: 900; line-height: 1; }
.khs-lbl { font-size: 11px; opacity: 0.85; margin-top: 4px; font-weight: 600; }

.kpi-exec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.kpi-exec-card {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  border: 1px solid #e2e8f0;
  border-top: 4px solid var(--ec);
  position: relative;
  overflow: hidden;
  transition: all .2s;
}
.kpi-exec-card:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.kec-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--ec) 12%, white);
  color: var(--ec);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 12px;
}
.kec-value {
  font-size: 36px;
  font-weight: 900;
  color: var(--ec);
  line-height: 1;
}
.kec-label {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  margin-top: 6px;
}
.kec-sub {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 6px;
}

.kpi-card-pro {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  border: 1px solid #e2e8f0;
}
.kpi-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f5f9;
}
.kpi-card-head.red   { color: #dc2626; }
.kpi-card-head.amber { color: #d97706; }
.kpi-card-head.sky   { color: #0284c7; }

.kpi-card-num {
  font-size: 48px;
  font-weight: 900;
  line-height: 1;
}
.kpi-card-num.red   { color: #ef4444; }
.kpi-card-num.amber { color: #f59e0b; }
.kpi-card-num.sky   { color: #0ea5e9; }

.kpi-card-desc {
  font-size: 12px;
  color: #64748b;
  margin-top: 8px;
  line-height: 1.6;
}

.kpi-section-title {
  font-size: 15px;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.kpi-podium {
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
}
.kpi-podium-best  { background: linear-gradient(135deg, #ecfdf5, #d1fae5); border: 1px solid #6ee7b7; }
.kpi-podium-worst { background: linear-gradient(135deg, #fef2f2, #fee2e2); border: 1px solid #fca5a5; }
.kpi-podium-rank {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.kpi-podium-best  .kpi-podium-rank { color: #047857; }
.kpi-podium-worst .kpi-podium-rank { color: #b91c1c; }
.kpi-podium-region {
  display: flex;
  align-items: center;
  gap: 12px;
}
.region-mini-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.responsibility-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.resp-row {
  display: grid;
  grid-template-columns: 200px 1fr 40px;
  align-items: center;
  gap: 10px;
}
.resp-row-label { font-size: 12px; font-weight: 600; color: #475569; }
.resp-row-bar { height: 8px; background: #f1f5f9; border-radius: 4px; overflow: hidden; }
.resp-row-fill { height: 100%; background: linear-gradient(90deg, #8b5cf6, #ec4899); border-radius: 4px; }
.resp-row-num { font-size: 13px; font-weight: 800; color: #1e293b; text-align: center; }

.kpi-ranking-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}
.kpi-rank-card {
  background: #f8fafc;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.krc-rank {
  font-size: 18px;
  font-weight: 900;
  color: #1e293b;
  min-width: 40px;
}
.krc-region {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.krc-pct {
  font-size: 16px;
  font-weight: 900;
  min-width: 60px;
  text-align: left;
}

/* ============================================================
   REPORTS PAGE
   ============================================================ */
.reports-page-hero {
  background: linear-gradient(135deg, #059669, #0891b2);
  border-radius: 16px;
  padding: 28px 32px;
  color: #fff;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.rph-content {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}
.rph-icon {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}
.reports-actions-bar {
  background: #fff;
  border-radius: 12px;
  padding: 14px 18px;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.rab-info { display: flex; align-items: center; gap: 8px; }

.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 12px;
}
.report-card-mini {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all .2s;
}
.report-card-mini:hover { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(0,0,0,0.08); }
.report-card-mini.empty { opacity: 0.75; }
.rcm-icon-wrap {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.rcm-actions {
  display: flex;
  gap: 4px;
}
.rcm-btn {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all .15s;
}
.rcm-btn:hover { background: #6366f1; color: #fff; transform: scale(1.05); }
.rcm-btn.green:hover { background: #10b981; }
.rcm-btn.indigo:hover { background: #4f46e5; }

/* ============================================================
   STANDARDS PAGE
   ============================================================ */
.standards-page-hero {
  background: linear-gradient(135deg, #ea580c, #dc2626);
  border-radius: 16px;
  padding: 28px 32px;
  color: #fff;
  margin-bottom: 20px;
}
.sph-content {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.sph-icon {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}
.sph-stats {
  display: flex;
  gap: 12px;
}
.sph-stat {
  background: rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 12px 18px;
  text-align: center;
  min-width: 100px;
}
.sphs-num { font-size: 24px; font-weight: 900; line-height: 1; }
.sphs-lbl { font-size: 11px; opacity: 0.85; margin-top: 4px; font-weight: 600; }

.empty-state-pro {
  background: #fff;
  border-radius: 14px;
  padding: 60px 20px;
  text-align: center;
  border: 1px dashed #cbd5e1;
}

.track-summary-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #e2e8f0;
}
.track-summary-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.standards-list { display: flex; flex-direction: column; gap: 8px; }
.standard-row {
  background: #f8fafc;
  border-radius: 10px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 50px 60px 1fr 120px;
  gap: 12px;
  align-items: center;
}
.std-rank {
  font-size: 18px;
  font-weight: 900;
  color: #94a3b8;
  text-align: center;
}
.std-code-pill {
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 11px;
  text-align: center;
  font-family: 'Courier New', monospace;
}
.std-content { min-width: 0; }
.std-title {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
}
.std-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #64748b;
  flex-wrap: wrap;
}
.std-stats {
  text-align: center;
}
.std-stat-num {
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}
.std-progress {
  height: 4px;
  background: #fee2e2;
  border-radius: 2px;
  overflow: hidden;
  margin-top: 6px;
}
.std-progress-fill {
  height: 100%;
  background: #ef4444;
  border-radius: 2px;
}

.track-accordion {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 8px;
  overflow: hidden;
}
.track-accordion-head {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  background: #fff;
  font-size: 14px;
  color: #1e293b;
}
.track-accordion-head:hover { background: #f8fafc; }
.track-accordion-head i { font-size: 16px; }
.accordion-arrow { transition: transform .2s; }
.track-accordion[open] .accordion-arrow { transform: rotate(180deg); }
.track-accordion-body {
  padding: 12px 18px 18px;
  border-top: 1px solid #f1f5f9;
}
.scope-mini-block { margin-bottom: 14px; }
.scope-mini-title {
  font-size: 13px;
  font-weight: 800;
  color: #475569;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.scope-code-mini {
  background: #ede9fe;
  color: #6d28d9;
  padding: 3px 8px;
  border-radius: 6px;
  font-family: 'Courier New', monospace;
  font-size: 10px;
  font-weight: 800;
}
.scope-mini-items { display: flex; flex-direction: column; gap: 6px; }
.scope-mini-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: 8px;
  font-size: 12px;
  flex-wrap: wrap;
}
.item-code-mini {
  font-family: 'Courier New', monospace;
  font-weight: 800;
  font-size: 10px;
  color: #64748b;
  background: #fff;
  padding: 3px 7px;
  border-radius: 5px;
  border: 1px solid #e2e8f0;
}
.item-text-mini {
  color: #1e293b;
  min-width: 200px;
}
.item-stat-pill {
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
}

/* Report scope blocks (in renderTrackReport) */
.track-scopes-report {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.scope-report-block {
  background: #f8fafc;
  border-radius: 10px;
  padding: 12px;
  border: 1px solid #e2e8f0;
}
.scope-report-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #e2e8f0;
  flex-wrap: wrap;
}
.scope-report-title {
  font-size: 13px;
  font-weight: 800;
  color: #1e293b;
  flex: 1;
  margin: 0;
}
.scope-report-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  background: #fee2e2;
  color: #b91c1c;
}
.scope-report-badge.ok { background: #ecfdf5; color: #047857; }
.scope-note-display {
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  border-right: 3px solid #6366f1;
  padding: 10px 12px;
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
.scope-note-display i { font-size: 16px; margin-top: 2px; }
.tc-note {
  font-size: 12px;
  background: #f0f9ff;
  padding: 6px 10px;
  border-radius: 6px;
}

/* Responsive */
@media (max-width: 768px) {
  .assess-stats-row { grid-template-columns: repeat(2, 1fr); }
  .assess-meta-bar { grid-template-columns: 1fr; }
  .ai-pro-controls { grid-template-columns: 1fr; }
  .standard-row { grid-template-columns: 1fr; gap: 6px; }
  .resp-row { grid-template-columns: 1fr 60px; }
  .resp-row-bar { grid-column: 1 / -1; }
}
