/* ═══════════════════════════════════════════════════════════════════
   Hamik Phase 10A — Premium Bronze v2 (Reference-Accurate)
   Total rebuild matching reference image exactly
   ═══════════════════════════════════════════════════════════════════ */

/* ── BLOCK ALL OLD STYLES on client-dash to prevent conflicts ── */
#client-dash .dash-layout,
#client-dash .sidebar,
#client-dash .sidebar-nav,
#client-dash .nav-item,
#client-dash .dash-main,
#client-dash .dash-home,
#client-dash .home-hero,
#client-dash .home-problem-box,
#client-dash .home-quick-services,
#client-dash .quick-svc-card,
#client-dash .home-search-hero,
#client-dash .credits-pill { all: revert; }

/* ── SIDEBAR — Clean reference-matching layout ── */
.hm-sidebar {
  position: fixed !important;
  right: 0;
  top: 0;
  bottom: 0;
  width: 260px !important;
  min-width: 260px !important;
  background: #0E1115 !important;
  border-left: 1px solid rgba(196,132,83,0.15) !important;
  display: flex !important;
  flex-direction: column !important;
  z-index: 100;
  overflow: hidden;
  padding: 0 !important;
}

.hm-sidebar-logo {
  padding: 22px 22px 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  border-bottom: 1px solid rgba(255,255,255,0.04) !important;
}
.hm-sidebar-logo .hm-logo-text {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
}
.hm-sidebar-logo .hm-logo-name {
  color: #E0A878 !important;
  font-family: 'Noto Kufi Arabic', sans-serif !important;
  font-size: 24px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
}
.hm-sidebar-logo .hm-logo-sub {
  color: #6B6258 !important;
  font-size: 10.5px !important;
  font-weight: 500 !important;
  margin-top: 4px !important;
}
.hm-sidebar-logo img {
  width: 44px !important;
  height: 44px !important;
  object-fit: contain !important;
  display: block !important;
  flex-shrink: 0 !important;
}

.hm-sidebar-nav {
  flex: 1 !important;
  padding: 14px 14px !important;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}
.hm-sidebar-nav::-webkit-scrollbar { width: 0; }

.hm-nav-item {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex-direction: row !important;
  gap: 14px !important;
  padding: 11px 14px !important;
  border-radius: 11px !important;
  cursor: pointer !important;
  transition: background-color .15s ease, color .15s ease !important;
  text-decoration: none !important;
  direction: rtl !important;
  border: 1px solid transparent !important;
  background: transparent !important;
}
.hm-nav-item:hover { background: rgba(196,132,83,0.06) !important; }
.hm-nav-item.active {
  background: rgba(196,132,83,0.11) !important;
  border-color: rgba(196,132,83,0.22) !important;
}
.hm-nav-item.active .hm-nav-svg { color: #E0A878 !important; }
.hm-nav-item.active .hm-nav-label { color: #E0A878 !important; }

.hm-nav-label {
  color: #C2BAB0 !important;
  font-size: 14.5px !important;
  font-weight: 600 !important;
  flex: 1 !important;
  font-family: 'Noto Kufi Arabic', sans-serif !important;
  text-align: right !important;
}
.hm-nav-svg {
  width: 22px !important;
  height: 22px !important;
  flex-shrink: 0 !important;
  color: #8A7F73 !important;
  stroke-width: 1.7 !important;
  display: block !important;
  transition: color .15s ease !important;
}
.hm-nav-item:hover .hm-nav-svg { color: #C98255 !important; }

.hm-sidebar-footer {
  padding: 20px 16px 22px !important;
  border-top: 1px solid rgba(255,255,255,0.04) !important;
  text-align: center !important;
}
.hm-trust-badge {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  text-align: center !important;
}
.hm-trust-badge img {
  width: 130px !important;
  max-width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto 14px !important;
  opacity: 0.85 !important;
}
.hm-trust-text {
  color: #8A7F73 !important;
  font-size: 11.5px !important;
  font-family: 'Noto Kufi Arabic', sans-serif !important;
  line-height: 1.6 !important;
}

/* ── MAIN AREA ── */
.hm-main-area {
  margin-right: 260px !important;
  min-height: 100vh !important;
  background: #07090B !important;
  display: flex !important;
  flex-direction: column !important;
}

/* ── HEADER — Clean reference-matching ── */
.hm-header {
  height: 64px !important;
  background: #0E1115 !important;
  border-bottom: 1px solid rgba(255,255,255,0.04) !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 22px !important;
  gap: 14px !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 50 !important;
}
.hm-header-user {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-direction: row-reverse !important;
  cursor: pointer !important;
}
.hm-user-avatar {
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #C98255, #A66A42) !important;
  color: #0B0D0F !important;
  font-weight: 800 !important;
  font-size: 15px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}
.hm-user-text { display: flex; flex-direction: column; align-items: flex-start; }
.hm-user-name { color: #E5DDD2 !important; font-size: 13.5px; font-weight: 700; }
.hm-user-role { color: #7A7165 !important; font-size: 11.5px; margin-top: 1px; }
.hm-user-caret { color: #6B6258; font-size: 10px; margin-right: 4px; }

.hm-header-icons {
  display: flex !important;
  gap: 6px !important;
  align-items: center !important;
}
.hm-header-icon-btn {
  width: 38px !important;
  height: 38px !important;
  border-radius: 10px !important;
  background: rgba(255,255,255,0.025) !important;
  border: 1px solid rgba(255,255,255,0.04) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all .15s !important;
  position: relative !important;
}
.hm-header-icon-btn:hover { background: rgba(196,132,83,0.08); }
.hm-header-icon-btn svg { width: 18px; height: 18px; color: #8A7F73; stroke-width: 1.7; }
.hm-header-icon-btn:hover svg { color: #C98255; }
.hm-icon-dot {
  position: absolute;
  top: 8px;
  left: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #C98255;
  border: 2px solid #0E1115;
}

.hm-header-spacer { flex: 1; }
.hm-header-search {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  border-radius: 11px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 0 16px !important;
  height: 40px !important;
  width: 420px !important;
  max-width: 420px !important;
  flex-direction: row-reverse !important;
}
.hm-header-search svg { width: 16px; height: 16px; color: #6B6258; stroke-width: 1.7; flex-shrink: 0; }
.hm-header-search input {
  background: transparent !important;
  border: none !important;
  color: #C2BAB0 !important;
  font-family: inherit !important;
  font-size: 13.5px !important;
  outline: none !important;
  width: 100% !important;
  text-align: right !important;
}
.hm-header-search input::placeholder { color: #6B6258 !important; }

/* ── CONTENT ── */
.hm-content {
  flex: 1 !important;
  padding: 24px !important;
  overflow-y: auto !important;
  background: #07090B !important;
}

/* ── HERO — courthouse + search ── */
.hm-hero {
  border-radius: 20px !important;
  overflow: hidden !important;
  min-height: 270px !important;
  position: relative !important;
  margin-bottom: 22px !important;
  background: linear-gradient(135deg, #14181C 0%, #0F1216 100%) !important;
  border: 1px solid rgba(196,132,83,0.15) !important;
  display: flex !important;
  align-items: stretch !important;
  flex-direction: row !important;
}
.hm-hero-image-side {
  width: 45%;
  position: relative;
  overflow: hidden;
}
.hm-hero-image-side::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to left, rgba(20,24,28,0) 0%, rgba(20,24,28,0.4) 60%, rgba(20,24,28,1) 100%);
  pointer-events: none;
}
.hm-hero-image-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.85) sepia(0.15);
}
.hm-hero-content {
  flex: 1 !important;
  padding: 36px 40px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  text-align: right !important;
}
.hm-hero-title {
  color: #F5EFE8 !important;
  font-size: 34px !important;
  font-weight: 900 !important;
  font-family: 'Noto Kufi Arabic', sans-serif !important;
  margin: 0 0 8px !important;
  line-height: 1.15 !important;
}
.hm-hero-sub {
  color: #A89E92 !important;
  font-size: 14.5px !important;
  margin: 0 0 22px !important;
  font-weight: 500 !important;
}
.hm-search-tabs {
  display: flex !important;
  gap: 4px !important;
  margin-bottom: 0 !important;
  flex-direction: row-reverse !important;
}
.hm-search-tab {
  padding: 9px 18px !important;
  font-size: 13px !important;
  color: #7A7165 !important;
  cursor: pointer !important;
  font-weight: 600 !important;
  font-family: 'Noto Kufi Arabic', sans-serif !important;
  border-bottom: 2px solid transparent !important;
  transition: all .15s !important;
}
.hm-search-tab:hover { color: #C2BAB0 !important; }
.hm-search-tab.active {
  color: #E0A878 !important;
  border-bottom-color: #C98255 !important;
}
.hm-search-box {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 18px !important;
  height: 50px !important;
  gap: 12px !important;
  margin-top: 8px !important;
  flex-direction: row-reverse !important;
}
.hm-search-box svg { width: 18px; height: 18px; color: #6B6258; stroke-width: 1.7; flex-shrink: 0; }
.hm-search-box input {
  background: transparent !important;
  border: none !important;
  color: #C2BAB0 !important;
  font-family: inherit !important;
  font-size: 14px !important;
  outline: none !important;
  flex: 1 !important;
  text-align: right !important;
}
.hm-search-box input::placeholder { color: #6B6258 !important; }
.hm-advanced-link {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-top: 12px !important;
  color: #8A7F73 !important;
  font-size: 12.5px !important;
  cursor: pointer !important;
  width: fit-content !important;
}
.hm-advanced-link:hover { color: #C98255 !important; }
.hm-advanced-link svg { width: 13px; height: 13px; stroke-width: 1.8; }

/* ── SECTION HEADER ── */
.hm-section-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 14px !important;
  margin-top: 8px !important;
  flex-direction: row-reverse !important;
}
.hm-section-title {
  color: #E5DDD2 !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  font-family: 'Noto Kufi Arabic', sans-serif !important;
}
.hm-see-all {
  color: #C98255 !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
}
.hm-see-all:hover { color: #E0A878 !important; }

/* ── QUICK ACTION CARDS — 4 in a row matching reference ── */
.hm-quick-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 14px !important;
  margin-bottom: 22px !important;
}
.hm-quick-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015)) !important;
  border: 1px solid rgba(196,132,83,0.18) !important;
  border-radius: 18px !important;
  padding: 22px 20px !important;
  cursor: pointer !important;
  transition: all .2s !important;
  display: flex !important;
  align-items: center !important;
  gap: 18px !important;
  direction: rtl !important;
  flex-direction: row-reverse !important;
}
.hm-quick-card:hover {
  transform: translateY(-2px);
  border-color: rgba(196,132,83,0.35) !important;
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}
.hm-quick-icon {
  width: 56px !important;
  height: 56px !important;
  border-radius: 16px !important;
  background: rgba(196,132,83,0.10) !important;
  border: 1px solid rgba(196,132,83,0.28) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  color: #E0A878 !important;
}
.hm-quick-icon svg {
  width: 28px;
  height: 28px;
  stroke-width: 1.6;
  color: currentColor;
}
.hm-quick-text { flex: 1; text-align: right; }
.hm-quick-title {
  color: #F5EFE8 !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  margin-bottom: 4px !important;
  font-family: 'Noto Kufi Arabic', sans-serif !important;
}
.hm-quick-desc {
  color: #8A7F73 !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
}

/* ── MAIN 3-COL GRID ── */
.hm-main-grid {
  display: grid !important;
  grid-template-columns: 280px 1fr 320px !important;
  gap: 16px !important;
  align-items: start !important;
  direction: rtl !important;
}

/* ── PREMIUM CARD ── */
.hm-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015)) !important;
  border: 1px solid rgba(196,132,83,0.18) !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  margin-bottom: 14px !important;
}
.hm-card-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 16px 20px 12px !important;
  flex-direction: row-reverse !important;
}
.hm-card-title {
  color: #E5DDD2 !important;
  font-size: 14.5px !important;
  font-weight: 700 !important;
  font-family: 'Noto Kufi Arabic', sans-serif !important;
}
.hm-card-body { padding: 0 20px 18px; direction: rtl; }

/* ── SUBSCRIPTION CARD — matching reference ── */
.hm-sub-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015)) !important;
  border: 1px solid rgba(196,132,83,0.18) !important;
  border-radius: 18px !important;
  padding: 22px !important;
  margin-bottom: 14px !important;
  direction: rtl !important;
}
.hm-sub-top {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  margin-bottom: 14px !important;
  flex-direction: row-reverse !important;
}
.hm-sub-crown {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #C98255;
}
.hm-sub-crown svg { width: 26px; height: 26px; stroke-width: 1.6; }
.hm-sub-label-block { text-align: right; }
.hm-sub-label { color: #8A7F73; font-size: 11.5px; font-weight: 600; margin-bottom: 4px; }
.hm-sub-name { color: #F5EFE8; font-size: 15px; font-weight: 800; font-family: 'Noto Kufi Arabic', sans-serif; }
.hm-sub-date { color: #8A7F73; font-size: 11.5px; margin-bottom: 14px; text-align: right; }
.hm-sub-status {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-bottom: 12px !important;
  flex-direction: row-reverse !important;
  justify-content: flex-end !important;
}
.hm-status-dot { width: 8px; height: 8px; border-radius: 50%; background: #4FB477; }
.hm-status-label { color: #4FB477 !important; font-size: 12px; font-weight: 700; }
.hm-usage-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 6px !important;
  flex-direction: row-reverse !important;
}
.hm-usage-pct { color: #A89E92; font-size: 11.5px; font-weight: 600; }
.hm-usage-bar { background: rgba(255,255,255,0.06); border-radius: 4px; height: 6px; overflow: hidden; margin-bottom: 6px; }
.hm-usage-fill { height: 100%; background: linear-gradient(90deg, #A66A42, #C98255); border-radius: 4px; }
.hm-usage-text { color: #8A7F73; font-size: 11px; text-align: right; margin-bottom: 14px; }
.hm-sub-btn {
  background: linear-gradient(135deg, #C98255, #A66A42) !important;
  color: #0B0D0F !important;
  border: none !important;
  padding: 12px 0 !important;
  border-radius: 11px !important;
  cursor: pointer !important;
  font-family: inherit !important;
  font-size: 13.5px !important;
  font-weight: 800 !important;
  width: 100% !important;
  display: block !important;
}
.hm-sub-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(196,132,83,0.35); }

/* ── SUPPORT CARD — matching reference (scales image) ── */
.hm-support-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015)) !important;
  border: 1px solid rgba(196,132,83,0.18) !important;
  border-radius: 18px !important;
  padding: 20px !important;
  direction: rtl !important;
  position: relative !important;
  overflow: hidden !important;
}
.hm-support-row {
  display: flex !important;
  gap: 14px !important;
  align-items: center !important;
  flex-direction: row-reverse !important;
}
.hm-support-img-wrap {
  flex-shrink: 0;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hm-support-img-wrap img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  opacity: 0.92;
}
.hm-support-text { flex: 1; text-align: right; }
.hm-support-title {
  color: #F5EFE8 !important;
  font-size: 14.5px !important;
  font-weight: 700 !important;
  margin-bottom: 5px !important;
  font-family: 'Noto Kufi Arabic', sans-serif !important;
}
.hm-support-desc {
  color: #8A7F73 !important;
  font-size: 12.5px !important;
  line-height: 1.6 !important;
  margin-bottom: 14px !important;
}
.hm-support-btn {
  background: rgba(196,132,83,0.10) !important;
  border: 1px solid rgba(196,132,83,0.28) !important;
  color: #C98255 !important;
  padding: 8px 16px !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  font-family: inherit !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  flex-direction: row-reverse !important;
}
.hm-support-btn:hover { background: rgba(196,132,83,0.18) !important; }
.hm-support-btn svg { width: 14px; height: 14px; stroke-width: 1.8; }

/* ── ANALYSIS CARD — with donut chart matching reference ── */
.hm-analysis-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015)) !important;
  border: 1px solid rgba(196,132,83,0.18) !important;
  border-radius: 18px !important;
  margin-bottom: 14px !important;
}
.hm-analysis-body { padding: 0 22px 22px; direction: rtl; }
.hm-analysis-row {
  display: flex !important;
  gap: 22px !important;
  align-items: center !important;
  margin-top: 8px !important;
  flex-direction: row-reverse !important;
}
.hm-donut {
  flex-shrink: 0;
  width: 140px;
  height: 140px;
  position: relative;
}
.hm-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.hm-donut-pct {
  color: #E0A878 !important;
  font-size: 26px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  font-family: 'Noto Kufi Arabic', sans-serif !important;
}
.hm-donut-label {
  color: #8A7F73 !important;
  font-size: 9.5px !important;
  margin-top: 4px !important;
  line-height: 1.3 !important;
}
.hm-analysis-details { flex: 1; text-align: right; }
.hm-analysis-case-title {
  color: #F5EFE8 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  margin-bottom: 4px !important;
  font-family: 'Noto Kufi Arabic', sans-serif !important;
}
.hm-analysis-case-id {
  color: #8A7F73 !important;
  font-size: 11.5px !important;
  margin-bottom: 14px !important;
}
.hm-analysis-points {
  display: flex !important;
  flex-direction: column !important;
  gap: 9px !important;
}
.hm-analysis-pt {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 12.5px !important;
  color: #C2BAB0 !important;
  flex-direction: row-reverse !important;
  justify-content: flex-end !important;
}
.hm-analysis-pt-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4FB477;
  flex-shrink: 0;
}
.hm-analysis-pt-dot.warn { background: #D4A94F; }
.hm-analysis-pt-dot.danger { background: #B85C5C; }
.hm-analysis-full-btn {
  background: rgba(196,132,83,0.10) !important;
  border: 1px solid rgba(196,132,83,0.28) !important;
  color: #C98255 !important;
  padding: 10px 18px !important;
  border-radius: 11px !important;
  cursor: pointer !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  margin-top: 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-direction: row-reverse !important;
}
.hm-analysis-full-btn:hover { background: rgba(196,132,83,0.18) !important; }
.hm-analysis-full-btn svg { width: 14px; height: 14px; stroke-width: 1.7; }

/* ── ACTIVITY CARD ── */
.hm-activity-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015)) !important;
  border: 1px solid rgba(196,132,83,0.18) !important;
  border-radius: 18px !important;
}
.hm-activity-body { padding: 0 22px 18px; direction: rtl; }
.hm-activity-item {
  display: flex !important;
  align-items: flex-start !important;
  gap: 14px !important;
  padding: 12px 0 !important;
  flex-direction: row-reverse !important;
}
.hm-activity-item + .hm-activity-item {
  border-top: 1px solid rgba(255,255,255,0.04) !important;
}
.hm-activity-icon {
  width: 38px !important;
  height: 38px !important;
  border-radius: 11px !important;
  background: rgba(196,132,83,0.08) !important;
  border: 1px solid rgba(196,132,83,0.18) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  color: #C98255 !important;
}
.hm-activity-icon svg { width: 18px; height: 18px; stroke-width: 1.7; }
.hm-activity-text { flex: 1; text-align: right; }
.hm-activity-title {
  color: #F5EFE8 !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  margin-bottom: 3px !important;
  font-family: 'Noto Kufi Arabic', sans-serif !important;
}
.hm-activity-meta { color: #8A7F73 !important; font-size: 11.5px; }
.hm-activity-time { color: #8A7F73 !important; font-size: 11.5px; white-space: nowrap; flex-shrink: 0; }

/* ── LEGAL DOC TOOLS ── */
.hm-tools-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015)) !important;
  border: 1px solid rgba(196,132,83,0.18) !important;
  border-radius: 18px !important;
  margin-bottom: 14px !important;
}
.hm-tools-body { padding: 0 18px 16px; direction: rtl; }
.hm-tool-item {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 12px 0 !important;
  cursor: pointer !important;
  flex-direction: row-reverse !important;
}
.hm-tool-item + .hm-tool-item {
  border-top: 1px solid rgba(255,255,255,0.04) !important;
}
.hm-tool-item:hover .hm-tool-name { color: #E0A878 !important; }
.hm-tool-icon {
  width: 42px !important;
  height: 42px !important;
  border-radius: 11px !important;
  background: rgba(196,132,83,0.08) !important;
  border: 1px solid rgba(196,132,83,0.20) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  color: #C98255 !important;
}
.hm-tool-icon svg { width: 20px; height: 20px; stroke-width: 1.7; }
.hm-tool-text { flex: 1; text-align: right; }
.hm-tool-name {
  color: #F5EFE8 !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  margin-bottom: 3px !important;
  font-family: 'Noto Kufi Arabic', sans-serif !important;
  transition: color .15s ease;
}
.hm-tool-desc { color: #8A7F73 !important; font-size: 11.5px; line-height: 1.6; }

/* ── SYSTEMS LIBRARY (2x2 grid) ── */
.hm-library-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015)) !important;
  border: 1px solid rgba(196,132,83,0.18) !important;
  border-radius: 18px !important;
}
.hm-library-body { padding: 0 18px 18px; direction: rtl; }
.hm-library-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
}
.hm-library-item {
  background: rgba(255,255,255,0.03) !important;
  border: 1px solid rgba(255,255,255,0.05) !important;
  border-radius: 12px !important;
  padding: 14px 14px !important;
  cursor: pointer !important;
  transition: all .15s !important;
  display: flex !important;
  flex-direction: column !important;
  text-align: right !important;
  direction: rtl !important;
}
.hm-library-item:hover {
  border-color: rgba(196,132,83,0.30) !important;
  background: rgba(196,132,83,0.04) !important;
}
.hm-library-icon-row {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  margin-bottom: 8px !important;
  flex-direction: row-reverse !important;
}
.hm-library-icon {
  width: 32px !important;
  height: 32px !important;
  border-radius: 9px !important;
  background: rgba(196,132,83,0.08) !important;
  border: 1px solid rgba(196,132,83,0.18) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #C98255 !important;
}
.hm-library-icon svg { width: 16px; height: 16px; stroke-width: 1.7; }
.hm-library-name { color: #F5EFE8 !important; font-size: 12.5px; font-weight: 700; margin-bottom: 3px; }
.hm-library-count { color: #8A7F73 !important; font-size: 11px; }

/* ── HIDE OLD LAYOUTS ── */
.dash-nav { display: none !important; }
#client-dash .tab-content { display: none !important; }
#client-dash .tab-content.active { display: block !important; }
.modal-overlay { background: rgba(0,0,0,0.7) !important; }

/* Disable old emoji-based icons completely */
.spec-card-icon { display: none !important; }

/* Reset emoji from common icon classes */
.empty-state-icon, .empty-icon { font-size: 0 !important; }

/* ── Hide beta logout button on dashboard pages ── */
body:has(#client-dash[style*="block"]) #beta-logout-btn,
body:has(#client-dash[style*="flex"]) #beta-logout-btn,
#beta-logout-btn { display: none !important; }

/* ── Move beta-exit-btn into sidebar (non-floating) ── */
#hamik-beta-exit-btn {
  position: static !important;
  bottom: auto !important;
  left: auto !important;
  z-index: auto !important;
  width: 100% !important;
  background: rgba(184,92,92,.06) !important;
  border: 1px solid rgba(184,92,92,.18) !important;
  color: rgba(184,92,92,.85) !important;
  padding: 9px 14px !important;
  border-radius: 10px !important;
  margin-top: 12px !important;
  justify-content: center !important;
  display: none !important;
  font-size: 12px !important;
}
#hamik-beta-exit-btn.visible {
  display: flex !important;
}
/* When inserted into .hm-sidebar-footer, show it */
.hm-sidebar-footer #hamik-beta-exit-btn { display: flex !important; }

/* ───────────────────────────────────────────────────────
   STATS ROW
─────────────────────────────────────────────────────── */
.hm-stats-row {
  display: grid !important;
  grid-template-columns: repeat(6, 1fr) !important;
  gap: 12px !important;
  margin-bottom: 22px !important;
  direction: rtl !important;
}
.hm-stat-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015)) !important;
  border: 1px solid rgba(196,132,83,0.18) !important;
  border-radius: 14px !important;
  padding: 14px 16px !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-direction: row-reverse !important;
  transition: all .15s !important;
  cursor: pointer !important;
}
.hm-stat-card:hover { border-color: rgba(196,132,83,0.32) !important; }
.hm-stat-icon {
  width: 42px !important;
  height: 42px !important;
  border-radius: 11px !important;
  background: rgba(196,132,83,0.10) !important;
  border: 1px solid rgba(196,132,83,0.20) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #C98255 !important;
  flex-shrink: 0 !important;
}
.hm-stat-icon svg { width: 20px; height: 20px; stroke-width: 1.7; }
.hm-stat-text { flex: 1; text-align: right; min-width: 0; }
.hm-stat-num { color: #F5EFE8 !important; font-size: 18px !important; font-weight: 800 !important; font-family: 'Noto Kufi Arabic', sans-serif !important; line-height: 1.1 !important; margin-bottom: 2px !important; }
.hm-stat-label { color: #8A7F73 !important; font-size: 11.5px !important; font-weight: 500 !important; }

/* ───────────────────────────────────────────────────────
   8 QUICK CARDS — 2 rows of 4
─────────────────────────────────────────────────────── */
.hm-quick-grid {
  grid-template-columns: repeat(4, 1fr) !important;
}
.hm-quick-card { padding: 16px !important; gap: 14px !important; }
.hm-quick-icon { width: 50px !important; height: 50px !important; border-radius: 13px !important; }
.hm-quick-icon svg { width: 26px !important; height: 26px !important; }
.hm-quick-title { font-size: 14px !important; }
.hm-quick-desc { font-size: 12px !important; }

/* ───────────────────────────────────────────────────────
   ANALYSIS CENTER — Tools Grid
─────────────────────────────────────────────────────── */
.hm-analysis-tools-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 10px !important;
  margin-top: 16px !important;
}
.hm-mini-tool {
  background: rgba(255,255,255,0.03) !important;
  border: 1px solid rgba(196,132,83,0.16) !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-direction: row-reverse !important;
  transition: .15s !important;
}
.hm-mini-tool:hover { background: rgba(196,132,83,0.06) !important; border-color: rgba(196,132,83,0.3) !important; }
.hm-mini-tool-icon {
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
  background: rgba(196,132,83,0.10) !important;
  border: 1px solid rgba(196,132,83,0.20) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #C98255 !important;
  flex-shrink: 0 !important;
}
.hm-mini-tool-icon svg { width: 18px; height: 18px; stroke-width: 1.7; }
.hm-mini-tool-text { flex: 1; text-align: right; min-width: 0; }
.hm-mini-tool-name { color: #E5DDD2 !important; font-size: 12.5px !important; font-weight: 700 !important; margin-bottom: 2px !important; font-family: 'Noto Kufi Arabic', sans-serif !important; }
.hm-mini-tool-desc { color: #8A7F73 !important; font-size: 11px !important; line-height: 1.5 !important; }

/* ───────────────────────────────────────────────────────
   TOOL ITEM with action button
─────────────────────────────────────────────────────── */
.hm-tool-item { padding: 14px 0 !important; }
.hm-tool-action-btn {
  background: rgba(196,132,83,0.10) !important;
  border: 1px solid rgba(196,132,83,0.25) !important;
  color: #C98255 !important;
  padding: 6px 12px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  font-family: inherit !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
}
.hm-tool-action-btn:hover { background: rgba(196,132,83,0.18) !important; }
.hm-tool-action-btn svg { width: 11px; height: 11px; stroke-width: 2; }

/* Activity item clickable */
.hm-activity-item { cursor: pointer !important; padding: 12px 0 !important; }
.hm-activity-item:hover .hm-activity-title { color: #E0A878 !important; }

/* ───────────────────────────────────────────────────────
   SYSTEMS LIBRARY — 4x2 grid for 8 items
─────────────────────────────────────────────────────── */
.hm-library-grid {
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
}
.hm-library-item { padding: 11px 12px !important; }
.hm-library-name { font-size: 12px !important; }
.hm-library-count { font-size: 10.5px !important; }
.hm-library-icon { width: 28px !important; height: 28px !important; border-radius: 8px !important; }
.hm-library-icon svg { width: 14px !important; height: 14px !important; }

/* ───────────────────────────────────────────────────────
   Hero fix - prevent cropping
─────────────────────────────────────────────────────── */
.hm-content { padding-top: 24px !important; }
.hm-hero { margin-top: 0 !important; }

/* ───────────────────────────────────────────────────────
   Quick Actions section spacing
─────────────────────────────────────────────────────── */
.hm-section-spacing { margin-top: 24px; }

/* ── Demo Modal styling ── */
.hm-demo-modal {
  background: linear-gradient(145deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02)) !important;
  border: 1px solid rgba(196,132,83,0.3) !important;
  border-radius: 18px !important;
  padding: 28px !important;
  max-width: 480px !important;
  margin: auto !important;
  color: #E5DDD2 !important;
  direction: rtl;
}
.hm-demo-modal h3 { color: #F5EFE8 !important; font-family: 'Noto Kufi Arabic',sans-serif !important; margin: 0 0 12px !important; font-size: 18px !important; }
.hm-demo-modal p { color: #BDB4AA !important; font-size: 13.5px !important; line-height: 1.7 !important; margin: 0 0 16px !important; }
.hm-demo-modal .hm-demo-info {
  background: rgba(196,132,83,0.08) !important;
  border: 1px solid rgba(196,132,83,0.2) !important;
  border-radius: 11px !important;
  padding: 12px 14px !important;
  color: #C98255 !important;
  font-size: 12.5px !important;
  line-height: 1.6 !important;
  margin-bottom: 16px !important;
}

/* ═══════════════════════════════════════════════════════
   Phase 10A v4.2 — Upload Card + Hide Raw Inputs
   ═══════════════════════════════════════════════════════ */

/* GLOBAL: Hide ALL raw file inputs from user */
input[type="file"] {
  display: none !important;
  position: absolute !important;
  pointer-events: none !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
}

/* Upload Card */
.hm-upload-card {
  border: 2px dashed rgba(196,132,83,0.35);
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  background: rgba(196,132,83,0.04);
  transition: all .2s;
  direction: rtl;
}
.hm-upload-card:hover {
  border-color: rgba(196,132,83,0.65);
  background: rgba(196,132,83,0.08);
  transform: translateY(-1px);
}
.hm-upload-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(196,132,83,0.10);
  border: 1px solid rgba(196,132,83,0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  color: #C98255;
}
.hm-upload-icon svg { width: 28px; height: 28px; stroke-width: 1.6; }
.hm-upload-title { color: #F5EFE8; font-size: 15px; font-weight: 700; margin-bottom: 6px; font-family: 'Noto Kufi Arabic', sans-serif; }
.hm-upload-desc { color: #8A7F73; font-size: 13px; margin-bottom: 10px; }
.hm-upload-types { color: rgba(196,132,83,0.75); font-size: 12px; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.hm-upload-type-tag { background: rgba(196,132,83,0.08); border: 1px solid rgba(196,132,83,0.18); border-radius: 6px; padding: 2px 8px; font-size: 11px; }
.hm-upload-limit { color: #8A7F73; font-size: 11.5px; margin-top: 8px; }

/* Upload Card with selected file */
.hm-upload-card.has-file {
  border-style: solid;
  border-color: rgba(196,132,83,0.55);
  background: rgba(196,132,83,0.10);
}
.hm-upload-file-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 12px;
  direction: rtl;
}
.hm-upload-file-name { color: #E0A878; font-size: 13px; font-weight: 600; }
.hm-upload-file-size { color: #8A7F73; font-size: 11.5px; }
.hm-upload-remove {
  background: transparent;
  border: none;
  color: #B85C5C;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}
.hm-upload-remove:hover { background: rgba(184,92,92,0.15); }

/* Avatar Upload Card */
.hm-avatar-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.hm-avatar-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #C98255, #A66A42);
  color: #0B0D0F;
  font-size: 28px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid rgba(196,132,83,0.35);
  position: relative;
}
.hm-avatar-edit {
  position: absolute;
  bottom: -2px;
  left: -2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #C98255;
  color: #0B0D0F;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0E1115;
}
.hm-avatar-edit svg { width: 12px; height: 12px; stroke-width: 2; }
.hm-avatar-upload-label { color: #C98255; font-size: 13px; font-weight: 600; cursor: pointer; }

/* Bronze Select (replacement) */
.hm-select-dropdown {
  position: relative;
  direction: rtl;
}
.hm-select-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 11px;
  padding: 11px 16px;
  color: #C2BAB0;
  font-family: inherit;
  font-size: 14px;
  width: 100%;
  text-align: right;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color .15s;
}
.hm-select-btn:hover, .hm-select-btn:focus { border-color: rgba(196,132,83,0.45); outline: none; }
.hm-select-btn.active { border-color: rgba(196,132,83,0.65); }
.hm-select-options {
  position: absolute;
  top: calc(100% + 4px);
  right: 0; left: 0;
  background: #1D2228;
  border: 1px solid rgba(196,132,83,0.28);
  border-radius: 12px;
  overflow: hidden;
  z-index: 200;
  max-height: 240px;
  overflow-y: auto;
  display: none;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
}
.hm-select-options.open { display: block; }
.hm-select-option {
  padding: 11px 16px;
  color: #C2BAB0;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: all .12s;
  text-align: right;
}
.hm-select-option:hover { background: rgba(196,132,83,0.10); color: #E0A878; }
.hm-select-option.selected { color: #E0A878; background: rgba(196,132,83,0.08); }

/* Bronze Textarea */
.hm-textarea {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  border-radius: 12px !important;
  padding: 14px 16px !important;
  color: #C2BAB0 !important;
  font-family: 'Noto Kufi Arabic', sans-serif !important;
  font-size: 14px !important;
  line-height: 1.7 !important;
  resize: vertical !important;
  min-height: 120px !important;
  width: 100% !important;
  direction: rtl !important;
  transition: border-color .15s !important;
  outline: none !important;
}
.hm-textarea::placeholder { color: #6B6258 !important; }
.hm-textarea:focus { border-color: rgba(196,132,83,0.55) !important; box-shadow: 0 0 0 3px rgba(196,132,83,0.12) !important; }

/* Bronze Input */
.hm-input {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  border-radius: 11px !important;
  padding: 11px 16px !important;
  color: #C2BAB0 !important;
  font-family: 'Noto Kufi Arabic', sans-serif !important;
  font-size: 14px !important;
  width: 100% !important;
  direction: rtl !important;
  outline: none !important;
  transition: border-color .15s !important;
}
.hm-input:focus { border-color: rgba(196,132,83,0.55) !important; }
.hm-input::placeholder { color: #6B6258 !important; }

/* Step indicator for Wizards */
.hm-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 24px;
  direction: rtl;
}
.hm-step {
  display: flex;
  align-items: center;
  flex: 1;
}
.hm-step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 2px solid rgba(255,255,255,0.12);
  color: #8A7F73;
  font-size: 13px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all .2s;
}
.hm-step.active .hm-step-num { background: rgba(196,132,83,0.15); border-color: #C98255; color: #E0A878; }
.hm-step.done .hm-step-num { background: rgba(196,132,83,0.20); border-color: #C98255; color: #C98255; }
.hm-step-label { color: #8A7F73; font-size: 12px; margin: 0 8px; white-space: nowrap; }
.hm-step.active .hm-step-label { color: #E0A878; }
.hm-step.done .hm-step-label { color: #C98255; }
.hm-step-line { flex: 1; height: 1px; background: rgba(255,255,255,0.08); margin: 0 8px; }
.hm-step.done .hm-step-line { background: rgba(196,132,83,0.35); }

/* Back button */
.hm-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  padding: 8px 14px;
  color: #BDB4AA;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  direction: rtl;
}
.hm-back-btn:hover { background: rgba(196,132,83,0.08); border-color: rgba(196,132,83,0.28); color: #E0A878; }
.hm-back-btn svg { width: 14px; height: 14px; stroke-width: 2; }

/* Legal disclaimer box */
.hm-disclaimer {
  background: rgba(212,169,79,0.07);
  border: 1px solid rgba(212,169,79,0.22);
  border-radius: 12px;
  padding: 12px 16px;
  color: #D4B483;
  font-size: 13px;
  line-height: 1.6;
  direction: rtl;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.hm-disclaimer svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; stroke-width: 1.8; }

/* Coming Soon card */
.hm-coming-soon {
  background: rgba(255,255,255,0.02);
  border: 1px dashed rgba(255,255,255,0.10);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  direction: rtl;
}
.hm-coming-soon-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(196,132,83,0.10);
  border: 1px solid rgba(196,132,83,0.22);
  border-radius: 999px;
  padding: 5px 14px;
  color: #C98255;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}
.hm-coming-soon-title { color: #BDB4AA; font-size: 15px; font-weight: 700; margin-bottom: 6px; font-family: 'Noto Kufi Arabic', sans-serif; }
.hm-coming-soon-desc { color: #8A7F73; font-size: 13px; line-height: 1.6; }
