/* ============================================
   PIPELINE + DAILY REPORT AUDIT FIXES
   Premium Apple-Grade UX Layer
   Author: UI/UX Audit
   Scope: Pipeline view + Daily Report cards
   ============================================ */

/* ============================================
   1. PIPELINE — Drag & Drop Feedback
   ============================================ */
.crm-lead-card,
.followup-lead-card {
  cursor: grab;
  transition:
    transform 220ms cubic-bezier(0.32, 0.72, 0, 1),
    box-shadow 220ms cubic-bezier(0.32, 0.72, 0, 1),
    border-color 220ms cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
}

.crm-lead-card:active,
.followup-lead-card:active,
.crm-lead-card.dragging,
.followup-lead-card.dragging {
  cursor: grabbing;
  transform: scale(1.03) rotate(1.5deg);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.18),
    0 0 0 2px var(--green);
  z-index: 100;
  opacity: 0.95;
}

.pipeline-column {
  border: 1.5px dashed transparent;
  transition:
    background 200ms cubic-bezier(0.32, 0.72, 0, 1),
    border-color 200ms cubic-bezier(0.32, 0.72, 0, 1);
}

.pipeline-column.drag-over {
  background: rgba(48, 209, 88, 0.06) !important;
  border-color: var(--green) !important;
  border-style: dashed !important;
}

/* ============================================
   2. PIPELINE — Color-Coded Stage Headers
   ============================================ */
.pipeline-column .column-head {
  padding-top: 12px;
  border-top: 3px solid transparent;
  transition: border-color 200ms;
}

.pipeline-column[data-stage="new"] .column-head {
  border-top-color: #64d2ff;
}
.pipeline-column[data-stage="contacted"] .column-head {
  border-top-color: #ff9f0a;
}
.pipeline-column[data-stage="qualified"] .column-head {
  border-top-color: #bf5af2;
}
.pipeline-column[data-stage="won"] .column-head {
  border-top-color: #30d158;
}
.pipeline-column[data-stage="lost"] .column-head {
  border-top-color: #ff453a;
}

.column-head h3 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.column-head .count {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  min-width: 24px;
  text-align: center;
  font-feature-settings: "tnum";
}

/* ============================================
   3. PIPELINE — Priority Stripe on Cards
   ============================================ */
.crm-lead-card,
.followup-lead-card {
  position: relative;
  padding-left: 18px !important;
}

.crm-lead-card::after,
.followup-lead-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
  border-radius: 3px 0 0 3px;
  transition: background 200ms;
}

.crm-lead-card[data-priority="high"]::after,
.followup-lead-card[data-priority="high"]::after {
  background: linear-gradient(180deg, #ff453a, #ff6961);
  box-shadow: 0 0 8px rgba(255, 69, 58, 0.4);
}

.crm-lead-card[data-priority="medium"]::after,
.followup-lead-card[data-priority="medium"]::after {
  background: #ff9f0a;
}

.crm-lead-card[data-priority="low"]::after,
.followup-lead-card[data-priority="low"]::after {
  background: #64d2ff;
}

.crm-lead-card.is-stale,
.followup-lead-card.is-stale {
  opacity: 0.7;
}

.stale-badge {
  display: none;
  font-size: 10px;
  color: var(--amber);
  background: rgba(255, 159, 10, 0.12);
  border: 0.5px solid rgba(255, 159, 10, 0.3);
  padding: 2px 6px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.02em;
  align-items: center;
  gap: 3px;
}

.crm-lead-card.is-stale .stale-badge,
.followup-lead-card.is-stale .stale-badge {
  display: inline-flex;
}

/* ============================================
   4. PIPELINE — Empty Column State
   ============================================ */
.pipeline-column-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  border: 1.5px dashed rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  min-height: 120px;
  background: rgba(255, 255, 255, 0.01);
}

.pipeline-column-empty::before {
  content: "↓";
  display: block;
  font-size: 24px;
  margin-bottom: 8px;
  opacity: 0.4;
  font-weight: 900;
}

.pipeline-column-empty strong {
  display: block;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 4px;
  font-weight: 700;
}

/* ============================================
   5. PIPELINE — Reveal Actions on Hover
   ============================================ */
.crm-card-actions,
.row-actions {
  opacity: 0;
  transform: translateY(2px);
  transition:
    opacity 180ms cubic-bezier(0.32, 0.72, 0, 1),
    transform 180ms cubic-bezier(0.32, 0.72, 0, 1);
}

.crm-lead-card:hover .crm-card-actions,
.followup-lead-card:hover .crm-card-actions,
.crm-lead-card:focus-within .crm-card-actions,
.followup-lead-card:focus-within .crm-card-actions,
.crm-lead-card.is-active .crm-card-actions,
.followup-lead-card.is-active .crm-card-actions {
  opacity: 1;
  transform: translateY(0);
}

.crm-card-actions .btn-primary,
.row-actions .btn-primary {
  opacity: 1 !important;
  transform: none !important;
}

/* ============================================
   6. PIPELINE — Column Footer (Count + ₹ Value)
   ============================================ */
.column-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  border-top: 0.5px solid rgba(255, 255, 255, 0.06);
}

.column-foot .total-value {
  color: var(--text);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  font-weight: 800;
}

/* ============================================
   7. DAILY REPORT — KPI Delta + Sparkline
   ============================================ */
.kpi-delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  margin-top: 4px;
  letter-spacing: 0;
  font-feature-settings: "tnum";
}

.kpi-delta.up {
  color: #0a6b2c;
  background: rgba(48, 209, 88, 0.12);
}

.kpi-delta.down {
  color: #c1351f;
  background: rgba(255, 69, 58, 0.12);
}

.kpi-delta.flat {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
}

.kpi-delta::before {
  font-size: 10px;
  font-weight: 900;
  margin-right: 2px;
}

.kpi-delta.up::before { content: "▲"; }
.kpi-delta.down::before { content: "▼"; }
.kpi-delta.flat::before { content: "—"; }

html[data-theme="normal"] .kpi-delta.up { color: #0a6b2c; }
html[data-theme="normal"] .kpi-delta.down { color: #c1351f; }

.kpi-spark {
  margin-top: 10px;
  height: 32px;
  width: 100%;
  display: block;
  overflow: visible;
}

.kpi-spark path {
  fill: none;
  stroke: var(--green);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kpi-spark .area {
  fill: url(#sparkGradient);
  stroke: none;
  opacity: 0.3;
}

/* ============================================
   8. DAILY REPORT — Bar Chart Animation
   ============================================ */
.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #30d158 0%, #64d2ff 100%);
  transition: width 800ms cubic-bezier(0.32, 0.72, 0, 1) !important;
}

.bar-row {
  transition: background 200ms;
  padding: 4px 6px;
  border-radius: 8px;
}

.bar-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.bar-row:hover .bar-fill {
  background: linear-gradient(90deg, #34d159 0%, #6dd5ff 100%);
  box-shadow: 0 0 12px rgba(48, 209, 88, 0.4);
}

/* ============================================
   9. DAILY REPORT — Date Range Picker
   ============================================ */
.date-range-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: all 180ms cubic-bezier(0.32, 0.72, 0, 1);
}

.date-range-picker:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.date-range-picker .calendar-icon {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
}

.date-range-picker .chevron {
  color: var(--muted);
  font-size: 10px;
}

.date-presets {
  display: inline-flex;
  gap: 4px;
  margin-left: 8px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 3px;
}

.date-presets button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 160ms;
}

.date-presets button.active {
  background: var(--green);
  color: #041108;
}

.date-presets button:hover:not(.active) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

/* ============================================
   10. DAILY REPORT — Refined Mini Grid
   ============================================ */
.mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.mini {
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  transition: background 180ms;
}

.mini:hover {
  background: rgba(255, 255, 255, 0.07);
}

.mini strong {
  display: block;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  margin-top: 6px;
}

.mini span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

/* ============================================
   11. DAILY REPORT — Export Action Buttons
   ============================================ */
.report-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.report-actions .btn {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  transition: all 180ms cubic-bezier(0.32, 0.72, 0, 1);
}

.report-actions .btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.report-actions .btn-primary {
  background: var(--green);
  color: #041108;
  border-color: transparent;
}

.report-actions .btn-primary:hover {
  background: #34d159;
}

.report-actions .icon {
  font-size: 13px;
  margin-right: 4px;
  display: inline-block;
}

/* ============================================
   12. DAILY REPORT — Insight-Rich Chart Title
   ============================================ */
.chart-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.chart-title h3 {
  margin: 0 0 4px 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.015em;
}

.chart-title .insight {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  max-width: 70%;
}

.chart-title .insight strong {
  color: var(--text);
  font-weight: 700;
}

.chart-title .more-btn {
  min-height: 28px;
  padding: 0 8px;
  background: transparent;
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 180ms;
}

.chart-title .more-btn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.16);
}

/* ============================================
   13. CROSS-CUTTING — No-Data Empty State
   ============================================ */
.no-data-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  text-align: center;
  background:
    radial-gradient(circle at top, rgba(48, 209, 88, 0.04), transparent 50%),
    transparent;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
}

.no-data-state .icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(48, 209, 88, 0.10);
  color: var(--green);
  margin-bottom: 16px;
}

.no-data-state .icon svg {
  width: 28px;
  height: 28px;
}

.no-data-state h4 {
  margin: 0 0 6px 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.015em;
}

.no-data-state p {
  margin: 0 0 20px 0;
  font-size: 13px;
  color: var(--muted);
  max-width: 360px;
  line-height: 1.5;
}

/* ============================================
   14. CROSS-CUTTING — Loading Skeleton States
   ============================================ */
.dashboard-loading,
.pipeline-loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.dashboard-loading::after,
.pipeline-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.04),
    transparent
  );
  background-size: 200% 100%;
  animation: auditShimmer 1.6s linear infinite;
  pointer-events: none;
  border-radius: inherit;
}

@keyframes auditShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ============================================
   15. CROSS-CUTTING — Accessibility
   ============================================ */
@media (prefers-contrast: more) {
  :root {
    --line: rgba(255, 255, 255, 0.24) !important;
    --line-soft: rgba(255, 255, 255, 0.18) !important;
    --muted: #b0c4b8 !important;
  }
  .btn {
    border: 1px solid currentColor !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   16. DAILY REPORT — Print Stylesheet
   ============================================ */
@media print {
  :root {
    --bg: #ffffff !important;
    --surface: #ffffff !important;
    --text: #000000 !important;
    --muted: #555555 !important;
    --line: #d0d0d0 !important;
  }

  .topbar,
  .tabs,
  .reply,
  .chat-head,
  .quick-dock,
  .report-actions,
  .filter-bar,
  .sidebar {
    display: none !important;
  }

  .card,
  .saas-card,
  .chart-card {
    box-shadow: none !important;
    border: 1px solid #d0d0d0 !important;
    page-break-inside: avoid;
  }

  body {
    overflow: visible !important;
    background: white !important;
  }

  .content {
    overflow: visible !important;
    padding: 0 !important;
  }

  body::before {
    content: "Daily Report — " attr(data-report-date);
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #000;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #000;
  }
}

/* ============================================
   17. MOBILE — Pipeline Responsive
   ============================================ */
@media (max-width: 760px) {
  .pipeline-board {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 12px;
    padding: 4px 4px 16px 4px;
  }

  .pipeline-column {
    min-width: 86vw;
    max-width: 86vw;
    scroll-snap-align: start;
  }

  .column-foot {
    position: sticky;
    bottom: 0;
    background: var(--surface);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(12px);
  }
}

/* ============================================
   18. SPARKLINE GRADIENT DEFINITION
   Add this <svg> in your HTML once:
   <svg width="0" height="0" style="position:absolute">
     <defs>
       <linearGradient id="sparkGradient" x1="0" y1="0" x2="0" y2="1">
         <stop offset="0%" stop-color="#30d158" stop-opacity="0.4"/>
         <stop offset="100%" stop-color="#30d158" stop-opacity="0"/>
       </linearGradient>
     </defs>
   </svg>
   ============================================ */

/* ============================================
   19. V19 MOBILE STABILITY PATCH
   Inbox bulk actions were rendering between chat rows on phones.
   Keep the list native-feeling, compact, and bottom-safe.
   ============================================ */
@media (max-width: 760px) {
  html[data-layout="mobile"],
  html[data-layout="mobile"] body {
    max-width: 100%;
    overflow-x: hidden !important;
  }

  html[data-layout="mobile"] .main,
  html[data-layout="mobile"] .view,
  html[data-layout="mobile"] .content {
    max-width: 100vw;
    overflow-x: hidden !important;
  }

  html[data-layout="mobile"] #view-inbox .inbox-layout {
    height: calc(100dvh - 84px) !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  html[data-layout="mobile"] #view-inbox .conv-sidebar {
    display: flex !important;
    flex-direction: column !important;
    height: calc(100dvh - 154px) !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: hidden !important;
    border-radius: 0 !important;
  }

  html[data-layout="mobile"] #view-inbox .side-head {
    flex: 0 0 auto !important;
    min-height: 52px !important;
    padding: 9px 14px !important;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 76%, transparent) !important;
  }

  html[data-layout="mobile"] #view-inbox .inbox-head-actions {
    max-width: 68vw;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  html[data-layout="mobile"] #view-inbox .filters {
    flex: 0 0 auto !important;
    order: 2;
    padding: 10px 14px 12px !important;
    position: static !important;
    top: auto !important;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 76%, transparent) !important;
    background: color-mix(in srgb, var(--surface) 92%, transparent) !important;
    backdrop-filter: blur(16px);
  }

  html[data-layout="mobile"] #conversationSearch {
    min-height: 42px !important;
    height: 42px !important;
    padding: 0 16px !important;
    font-size: 15px !important;
    border-radius: 18px !important;
  }

  html[data-layout="mobile"] #view-inbox .inbox-tools {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    margin-top: 10px !important;
    padding: 0 12px 2px 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  html[data-layout="mobile"] #view-inbox .inbox-tools::-webkit-scrollbar {
    display: none;
  }

  html[data-layout="mobile"] #view-inbox .inbox-filter {
    flex: 0 0 auto !important;
    min-width: max-content !important;
    min-height: 36px !important;
    height: 36px !important;
    padding: 0 15px !important;
    border-radius: 999px !important;
    font-size: 13px !important;
    white-space: nowrap !important;
    scroll-snap-align: start;
  }

  html[data-layout="mobile"] #conversationList {
    flex: 1 1 auto !important;
    order: 3 !important;
    min-height: 0 !important;
    height: auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 0 0 calc(96px + env(safe-area-inset-bottom)) !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  html[data-layout="mobile"] #conversationList .empty,
  html[data-layout="mobile"] #conversationList .skeleton-stack {
    min-height: 118px !important;
    padding: 16px !important;
  }

  html[data-layout="mobile"] #view-inbox .conversation {
    grid-template-columns: 46px minmax(0, 1fr) auto !important;
    min-height: 74px !important;
    padding: 10px 14px !important;
    gap: 11px !important;
    border-radius: 0 !important;
    border-left: 0 !important;
  }

  html[data-layout="mobile"] #view-inbox .conversation .avatar {
    width: 44px !important;
    height: 44px !important;
    font-size: 16px !important;
  }

  html[data-layout="mobile"] #view-inbox .conv-name {
    font-size: 15px !important;
    line-height: 1.15 !important;
  }

  html[data-layout="mobile"] #view-inbox .conv-preview {
    margin-top: 4px !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
    -webkit-line-clamp: 1 !important;
    color: color-mix(in srgb, var(--text) 54%, var(--muted)) !important;
  }

  html[data-layout="mobile"] #view-inbox .conv-right {
    min-width: 44px !important;
    align-items: flex-end !important;
    font-size: 11px !important;
  }

  html[data-layout="mobile"] #inboxPager {
    display: none !important;
  }

  html[data-layout="mobile"] #view-inbox .inbox-bulk-bar:not(.show) {
    display: none !important;
  }

  html[data-layout="mobile"] #view-inbox .inbox-bulk-bar {
    order: 4 !important;
    position: fixed !important;
    left: 14px !important;
    right: 14px !important;
    bottom: calc(78px + env(safe-area-inset-bottom)) !important;
    top: auto !important;
    z-index: 80 !important;
    margin: 0 !important;
    padding: 9px !important;
    border-radius: 22px !important;
    background: color-mix(in srgb, var(--surface) 94%, transparent) !important;
    border: 1px solid color-mix(in srgb, var(--green) 26%, var(--line)) !important;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .18) !important;
    backdrop-filter: blur(18px);
    transform: translateZ(0);
  }

  html[data-layout="mobile"] #view-inbox .inbox-bulk-bar.show {
    display: grid !important;
    grid-template-columns: 28px minmax(82px, 1fr) 1fr 1fr !important;
    gap: 8px !important;
    align-items: center !important;
  }

  html[data-layout="mobile"] #view-inbox .inbox-bulk-count {
    min-width: 0 !important;
    font-size: 12px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  html[data-layout="mobile"] #view-inbox .inbox-bulk-bar .btn {
    min-width: 0 !important;
    min-height: 36px !important;
    height: 36px !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
  }

  html[data-layout="mobile"] #bulkBlockChatBtn {
    grid-column: 1 / -1 !important;
    width: 100% !important;
  }
}

/* ============================================
   20. V19 MOBILE PERFORMANCE PATCH
   Charts and KPI cards become readable swipe panels instead of
   squeezed desktop grids on phone screens.
   ============================================ */
@media (max-width: 760px) {
  html[data-layout="mobile"] #view-performance .dashboard-shell,
  html[data-layout="mobile"] #view-performance .content {
    padding-bottom: calc(92px + env(safe-area-inset-bottom)) !important;
    overflow-x: hidden !important;
  }

  html[data-layout="mobile"] #view-performance .page-head {
    padding: 16px !important;
    border-radius: 22px !important;
    gap: 12px !important;
  }

  html[data-layout="mobile"] #view-performance .page-head h2 {
    font-size: clamp(24px, 7vw, 32px) !important;
    line-height: 1.05 !important;
  }

  html[data-layout="mobile"] #view-performance .page-head p {
    font-size: 13px !important;
    line-height: 1.45 !important;
  }

  html[data-layout="mobile"] #view-performance .performance-kpi-row,
  html[data-layout="mobile"] #view-performance .performance-charts-row {
    display: grid !important;
    grid-auto-flow: column !important;
    grid-auto-columns: minmax(82vw, 88vw) !important;
    grid-template-columns: none !important;
    gap: 12px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 2px 12px 14px 2px !important;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  html[data-layout="mobile"] #view-performance .performance-kpi-row::-webkit-scrollbar,
  html[data-layout="mobile"] #view-performance .performance-charts-row::-webkit-scrollbar {
    display: none;
  }

  html[data-layout="mobile"] #view-performance .performance-kpi-row > *,
  html[data-layout="mobile"] #view-performance .performance-charts-row > * {
    scroll-snap-align: start;
    min-width: 0 !important;
  }

  html[data-layout="mobile"] #view-performance .followup-folder-card,
  html[data-layout="mobile"] #view-performance .premium-chart-card {
    min-height: 128px !important;
    border-radius: 20px !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .08) !important;
  }

  html[data-layout="mobile"] #view-performance .premium-chart-card {
    padding: 14px !important;
    min-height: 300px !important;
  }

  html[data-layout="mobile"] #view-performance .premium-chart-wide {
    grid-column: auto !important;
  }

  html[data-layout="mobile"] #view-performance .premium-chart-wrap,
  html[data-layout="mobile"] #view-performance .chart-area,
  html[data-layout="mobile"] #view-performance canvas {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 210px !important;
    max-height: 230px !important;
  }

  html[data-layout="mobile"] #view-performance .modern-table-wrap {
    border-radius: 18px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  html[data-layout="mobile"] #view-performance .modern-table {
    min-width: 760px !important;
  }
}

/* ============================================
   21. V19 MOBILE PERFORMANCE TABLE CARDS
   Turn counsellor performance rows into readable metric cards.
   ============================================ */
@media (max-width: 760px) {
  html[data-layout="mobile"] #view-performance .modern-table-wrap {
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html[data-layout="mobile"] #view-performance .modern-table,
  html[data-layout="mobile"] #view-performance .modern-table tbody,
  html[data-layout="mobile"] #view-performance .modern-table tr,
  html[data-layout="mobile"] #view-performance .modern-table td {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  html[data-layout="mobile"] #view-performance .modern-table thead {
    display: none !important;
  }

  html[data-layout="mobile"] #performanceBody {
    display: grid !important;
    gap: 14px !important;
  }

  html[data-layout="mobile"] #performanceBody tr {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px !important;
    position: relative !important;
    margin: 0 !important;
    padding: 16px !important;
    border: 1px solid color-mix(in srgb, var(--green) 18%, var(--line)) !important;
    border-radius: 24px !important;
    background:
      radial-gradient(circle at 92% 0%, color-mix(in srgb, var(--green) 14%, transparent), transparent 34%),
      linear-gradient(145deg, color-mix(in srgb, var(--surface) 96%, white), color-mix(in srgb, var(--surface) 88%, var(--green) 5%)) !important;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .10) !important;
  }

  html[data-layout="mobile"] #performanceBody td {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 4px !important;
    min-height: 66px !important;
    padding: 10px 12px !important;
    border: 1px solid color-mix(in srgb, var(--line) 70%, transparent) !important;
    border-radius: 16px !important;
    background: color-mix(in srgb, var(--surface) 82%, transparent) !important;
    color: var(--text) !important;
    font-size: clamp(22px, 7vw, 30px) !important;
    font-weight: 850 !important;
    line-height: 1.05 !important;
    letter-spacing: 0 !important;
    text-align: left !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  html[data-layout="mobile"] #performanceBody td::before {
    content: attr(data-label) !important;
    display: block !important;
    flex: none !important;
    margin: 0 !important;
    color: color-mix(in srgb, var(--muted) 82%, var(--text)) !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    line-height: 1.1 !important;
    letter-spacing: .11em !important;
    text-transform: uppercase !important;
  }

  html[data-layout="mobile"] #performanceBody td[data-label="Rank"] {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    width: auto !important;
    min-height: 30px !important;
    padding: 6px 10px !important;
    border-radius: 999px !important;
    background: color-mix(in srgb, var(--green) 12%, var(--surface)) !important;
    color: var(--green) !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    z-index: 1 !important;
  }

  html[data-layout="mobile"] #performanceBody td[data-label="Rank"]::before {
    content: "Rank " !important;
    display: inline !important;
    margin-right: 2px !important;
    color: currentColor !important;
    font-size: 10px !important;
    letter-spacing: .08em !important;
  }

  html[data-layout="mobile"] #performanceBody td[data-label="Counsellor"] {
    grid-column: 1 / -1 !important;
    min-height: 62px !important;
    padding-right: 78px !important;
    background: transparent !important;
    border-color: transparent !important;
    font-size: clamp(24px, 8vw, 34px) !important;
  }

  html[data-layout="mobile"] #performanceBody td[data-label="Counsellor"] strong {
    display: block !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  html[data-layout="mobile"] #performanceBody td[data-label="Answer%"],
  html[data-layout="mobile"] #performanceBody td[data-label="Converted"],
  html[data-layout="mobile"] #performanceBody td[data-label="Hot"] {
    background: color-mix(in srgb, var(--green) 9%, var(--surface)) !important;
  }

  html[data-layout="mobile"] #performanceBody td[data-label="Not Answered"] {
    background: color-mix(in srgb, #ef4444 8%, var(--surface)) !important;
  }
}

/* ============================================
   22. V19 LEADS TEXT VISIBILITY PATCH
   Final-load guard for the card board so lead name, course,
   counsellor and action text never disappear behind nowrap/clip rules.
   ============================================ */
#view-leads .modern-table tbody tr {
  min-height: 0 !important;
  height: auto !important;
  overflow: visible !important;
}

#view-leads .modern-table td,
#view-leads .modern-table td *,
#view-leads .modern-table .row-actions,
#view-leads .modern-table .row-actions * {
  visibility: visible !important;
}

#view-leads .modern-table td:nth-child(4),
#view-leads .modern-table td:nth-child(4) strong,
#view-leads .modern-table td:nth-child(4) .tiny,
#view-leads .modern-table td:nth-child(5),
#view-leads .modern-table td:nth-child(7),
#view-leads .modern-table td:nth-child(8),
#view-leads .modern-table td:nth-child(9),
#view-leads .modern-table td:nth-child(12),
#view-leads .modern-table td:nth-child(13),
#view-leads .modern-table td:nth-child(14),
#view-leads .modern-table td:nth-child(16),
#view-leads .modern-table .table-remark {
  max-width: 100% !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

#view-leads .modern-table td:nth-child(7) {
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 10px !important;
}

#view-leads .modern-table td:nth-child(7)::after {
  flex: 0 0 auto !important;
  align-self: flex-start !important;
  white-space: nowrap !important;
}

#view-leads .modern-table td:nth-child(8),
#view-leads .modern-table td:nth-child(9),
#view-leads .modern-table td:nth-child(12),
#view-leads .modern-table td:nth-child(13),
#view-leads .modern-table td:nth-child(14) {
  align-items: flex-start !important;
  gap: 6px !important;
  line-height: 1.25 !important;
}

#view-leads .modern-table td:nth-child(8)::before,
#view-leads .modern-table td:nth-child(9)::before,
#view-leads .modern-table td:nth-child(12)::before,
#view-leads .modern-table td:nth-child(13)::before,
#view-leads .modern-table td:nth-child(14)::before {
  max-width: none !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}

#view-leads .modern-table .table-remark {
  display: block !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: initial !important;
  min-height: 18px !important;
}

#view-leads .modern-table .row-actions {
  min-width: 0 !important;
  max-width: 100% !important;
}

#view-leads .modern-table .row-actions .btn,
#view-leads .modern-table .lead-more-select {
  min-width: 86px !important;
  white-space: nowrap !important;
}

@media (max-width: 760px) {
  html[data-layout="mobile"] #view-leads .modern-table-wrap {
    overflow: visible !important;
    padding-bottom: calc(98px + env(safe-area-inset-bottom)) !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table tbody {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table tbody tr {
    display: grid !important;
    grid-template-columns: 30px minmax(0, 1fr) auto !important;
    grid-template-areas:
      "select name status"
      "select phone final"
      "course course course"
      "college college college"
      "counsellor counsellor counsellor"
      "call call call"
      "follow follow follow"
      "docs docs docs"
      "score score score"
      "tracking tracking tracking"
      "actions actions actions" !important;
    gap: 9px 10px !important;
    padding: 15px !important;
    overflow: visible !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(4) strong {
    font-size: 16px !important;
    line-height: 1.25 !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(7) {
    min-height: auto !important;
    padding: 10px 12px !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(8),
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(9),
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(12),
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(13),
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(14) {
    display: flex !important;
    width: 100% !important;
    min-height: 34px !important;
    align-items: center !important;
    justify-content: space-between !important;
    border-radius: 14px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(12)::before,
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(13)::before,
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(14)::before {
    flex: 0 0 auto !important;
    margin-right: 10px !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(12) {
    background: color-mix(in srgb, #38bdf8 8%, var(--surface)) !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(13) {
    background: color-mix(in srgb, var(--green) 7%, var(--surface)) !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(14) {
    background: color-mix(in srgb, var(--premium-gold) 10%, var(--surface)) !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(16) {
    min-height: 34px !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table .lead-counts {
    width: 100% !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table .row-actions {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding-bottom: 3px !important;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  html[data-layout="mobile"] #view-leads .modern-table .row-actions::-webkit-scrollbar {
    display: none;
  }

  html[data-layout="mobile"] #view-leads .modern-table .row-actions .btn,
  html[data-layout="mobile"] #view-leads .modern-table .lead-more-select {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 92px !important;
    max-width: none !important;
    padding-inline: 14px !important;
  }
}

@media (max-width: 430px) {
  html[data-layout="mobile"] #view-leads .modern-table tbody tr {
    grid-template-columns: 28px minmax(0, 1fr) !important;
    grid-template-areas:
      "select name"
      "select phone"
      "status status"
      "final final"
      "course course"
      "college college"
      "counsellor counsellor"
      "call call"
      "follow follow"
      "docs docs"
      "score score"
      "tracking tracking"
      "actions actions" !important;
  }
}

/* ============================================
   23. V19.1.4 LEADS + PIPELINE NO-MOTION VISIBILITY GUARD
   More/Edit must stay visible and deterministic on desktop and touch devices.
   ============================================ */
#view-leads *,
#view-pipeline * {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

#view-leads .modern-table tbody tr,
#view-leads .modern-table tbody tr:hover,
#view-leads .modern-table tbody tr:active,
#view-pipeline .crm-lead-card,
#view-pipeline .crm-lead-card:hover,
#view-pipeline .crm-lead-card:active,
#view-pipeline .crm-lead-card.dragging,
#view-pipeline .followup-lead-card,
#view-pipeline .followup-lead-card:hover,
#view-pipeline .followup-lead-card:active,
#view-pipeline .followup-lead-card.dragging {
  transform: none !important;
}

#view-leads .row-actions,
#view-leads .row-actions *,
#view-leads .lead-more-select,
#view-pipeline .crm-card-actions,
#view-pipeline .crm-card-actions *,
#view-pipeline .lead-more-select,
#view-pipeline .mobile-action-trigger {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  pointer-events: auto !important;
}

#view-leads .modern-table td,
#view-leads .modern-table td strong,
#view-leads .modern-table td span:not(.status-badge),
#view-leads .modern-table td small,
#view-leads .modern-table .table-remark,
#view-leads .modern-table .lead-count-chip,
#view-pipeline .crm-card-title strong,
#view-pipeline .crm-card-title span,
#view-pipeline .crm-card-course,
#view-pipeline .crm-card-course span,
#view-pipeline .crm-card-meta-grid,
#view-pipeline .crm-card-meta-grid span,
#view-pipeline .crm-card-meta-grid b,
#view-pipeline .crm-card-remark,
#view-pipeline .crm-card-counts,
#view-pipeline .crm-card-counts span,
#view-pipeline .pipeline-filter-summary {
  color: var(--text) !important;
  opacity: 1 !important;
}

#view-leads .modern-table td .tiny,
#view-leads .modern-table td::before,
#view-leads .modern-table td::after,
#view-pipeline .crm-card-course small,
#view-pipeline .crm-column-head span,
#view-pipeline .pipeline-pager,
#view-pipeline .pipeline-pager span {
  color: color-mix(in srgb, var(--text) 72%, var(--muted)) !important;
  opacity: 1 !important;
}

#view-leads .row-actions .btn,
#view-leads .lead-more-select,
#view-pipeline .crm-card-actions .btn,
#view-pipeline .lead-more-select,
#view-pipeline .pipeline-command-bar input,
#view-pipeline .pipeline-command-bar select {
  color: var(--text) !important;
  text-shadow: none !important;
}

#view-leads .row-actions .btn-primary,
#view-pipeline .crm-card-actions .btn-primary,
#view-leads .row-actions .btn-wa,
#view-pipeline .crm-card-actions .btn-wa,
#view-leads .row-actions .btn-call,
#view-pipeline .crm-card-actions .btn-call {
  color: #041108 !important;
}

#view-pipeline .crm-lead-card.is-stale,
#view-pipeline .followup-lead-card.is-stale {
  opacity: 1 !important;
}

/* 24. V19 MOBILE INBOX COMPACT HEADER */
@media (max-width: 760px) {
  html[data-layout="mobile"] #view-inbox .conv-sidebar {
    min-height: 0 !important;
  }

  html[data-layout="mobile"] #view-inbox .side-head {
    min-height: 0 !important;
    padding: 9px 18px 7px !important;
    gap: 8px !important;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent) !important;
  }

  html[data-layout="mobile"] #view-inbox .section-title {
    margin: 0 !important;
    font-size: 13px !important;
    line-height: 1.05 !important;
    letter-spacing: 0.13em !important;
  }

  html[data-layout="mobile"] #view-inbox .inbox-head-actions {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 7px !important;
    margin: 0 !important;
    padding: 0 0 1px !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
  }

  html[data-layout="mobile"] #view-inbox .inbox-head-actions::-webkit-scrollbar {
    display: none !important;
  }

  html[data-layout="mobile"] #view-inbox .inbox-head-actions .btn,
  html[data-layout="mobile"] #view-inbox .inbox-head-actions .icon-btn,
  html[data-layout="mobile"] #view-inbox .global-bot-toggle {
    min-height: 34px !important;
    height: 34px !important;
    padding: 0 12px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  html[data-layout="mobile"] #view-inbox .filters {
    padding: 8px 18px 7px !important;
    gap: 8px !important;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent) !important;
  }

  html[data-layout="mobile"] #conversationSearch {
    min-height: 40px !important;
    height: 40px !important;
    padding: 0 15px !important;
    border-radius: 16px !important;
    font-size: 15px !important;
    line-height: 40px !important;
  }

  html[data-layout="mobile"] #view-inbox .inbox-tools {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 0 2px !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
  }

  html[data-layout="mobile"] #view-inbox .inbox-tools::-webkit-scrollbar {
    display: none !important;
  }

  html[data-layout="mobile"] #view-inbox .inbox-filter {
    flex: 0 0 auto !important;
    min-height: 34px !important;
    height: 34px !important;
    padding: 0 15px !important;
    border-radius: 999px !important;
    font-size: 13px !important;
    line-height: 1 !important;
  }

  html[data-layout="mobile"] #conversationList {
    padding-top: 0 !important;
  }
}

@media (max-width: 430px) {
  html[data-layout="mobile"] #view-inbox .side-head {
    padding: 8px 16px 6px !important;
  }

  html[data-layout="mobile"] #view-inbox .filters {
    padding: 7px 16px 6px !important;
  }

  html[data-layout="mobile"] #conversationSearch {
    min-height: 38px !important;
    height: 38px !important;
    line-height: 38px !important;
  }

  html[data-layout="mobile"] #view-inbox .inbox-filter,
  html[data-layout="mobile"] #view-inbox .inbox-head-actions .btn,
  html[data-layout="mobile"] #view-inbox .inbox-head-actions .icon-btn,
  html[data-layout="mobile"] #view-inbox .global-bot-toggle {
    min-height: 32px !important;
    height: 32px !important;
  }
}

/* 25. V19 MOBILE TOPBAR ACTION DOCK */
@media (max-width: 760px) {
  html[data-layout="mobile"] .topbar {
    display: grid !important;
    grid-template-columns: 38px minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 8px !important;
    min-height: 78px !important;
    height: 78px !important;
    padding: 8px 12px !important;
    overflow: visible !important;
  }

  html[data-layout="mobile"] .mobile-menu-btn {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    grid-column: 1 !important;
  }

  html[data-layout="mobile"] .brand {
    grid-column: 2 !important;
    min-width: 0 !important;
    gap: 8px !important;
  }

  html[data-layout="mobile"] .brand-mark {
    width: 39px !important;
    height: 39px !important;
    min-width: 39px !important;
    border-radius: 13px !important;
    font-size: 15px !important;
  }

  html[data-layout="mobile"] .brand h1 {
    max-width: 128px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    font-size: 18px !important;
    line-height: 1.1 !important;
  }

  html[data-layout="mobile"] .brand p,
  html[data-layout="mobile"] .stats,
  html[data-layout="mobile"] .top-search,
  html[data-layout="mobile"] .user-profile,
  html[data-layout="mobile"] #logoutBtn,
  html[data-layout="mobile"] .health {
    display: none !important;
  }

  html[data-layout="mobile"] .top-actions {
    grid-column: 3 !important;
    display: grid !important;
    grid-template-columns: 76px 36px !important;
    grid-template-rows: 34px 34px !important;
    gap: 5px !important;
    width: 117px !important;
    max-width: 117px !important;
    min-width: 117px !important;
    height: 73px !important;
    min-height: 73px !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: center !important;
    justify-items: end !important;
    overflow: visible !important;
  }

  html[data-layout="mobile"] .layout-switch {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 76px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 2px !important;
    border-radius: 13px !important;
  }

  html[data-layout="mobile"] #notificationBtn {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: inline-flex !important;
    width: 36px !important;
    height: 34px !important;
    min-width: 36px !important;
    min-height: 34px !important;
    border-radius: 13px !important;
  }

  html[data-layout="mobile"] .theme-switch {
    grid-column: 1 / 3 !important;
    grid-row: 2 !important;
    justify-self: end !important;
    width: 76px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 2px !important;
    border-radius: 13px !important;
  }

  html[data-layout="mobile"] .layout-option,
  html[data-layout="mobile"] .theme-option {
    width: 34px !important;
    height: 30px !important;
    min-width: 34px !important;
    min-height: 30px !important;
    border-radius: 11px !important;
    padding: 0 !important;
  }

  html[data-layout="mobile"] .layout-option svg,
  html[data-layout="mobile"] .theme-option svg,
  html[data-layout="mobile"] #notificationBtn svg {
    width: 16px !important;
    height: 16px !important;
  }
}

@media (max-width: 380px) {
  html[data-layout="mobile"] .topbar {
    grid-template-columns: 34px minmax(0, 1fr) auto !important;
    gap: 6px !important;
    padding-inline: 10px !important;
  }

  html[data-layout="mobile"] .mobile-menu-btn {
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
  }

  html[data-layout="mobile"] .brand h1 {
    max-width: 108px !important;
    font-size: 17px !important;
  }

  html[data-layout="mobile"] .top-actions {
    grid-template-columns: 70px 34px !important;
    grid-template-rows: 32px 32px !important;
    width: 109px !important;
    max-width: 109px !important;
    min-width: 109px !important;
    height: 69px !important;
    min-height: 69px !important;
  }

  html[data-layout="mobile"] .layout-switch,
  html[data-layout="mobile"] .theme-switch {
    width: 70px !important;
    height: 32px !important;
    min-height: 32px !important;
  }

  html[data-layout="mobile"] #notificationBtn {
    width: 34px !important;
    height: 32px !important;
    min-width: 34px !important;
    min-height: 32px !important;
  }

  html[data-layout="mobile"] .layout-option,
  html[data-layout="mobile"] .theme-option {
    width: 31px !important;
    min-width: 31px !important;
    height: 28px !important;
    min-height: 28px !important;
  }
}

/* 26. V19 MOBILE LEADS CARD FORM GRID */
@media (max-width: 760px) {
  html[data-layout="mobile"] #view-leads .modern-table tbody {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table tbody tr {
    position: relative !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    grid-template-areas:
      "name name"
      "phone phone"
      "status final"
      "course course"
      "college counsellor"
      "call follow"
      "docs score"
      "tracking tracking"
      "actions actions" !important;
    gap: 10px !important;
    padding: 16px 14px 15px !important;
    border-radius: 22px !important;
    overflow: hidden !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table tbody tr::before {
    width: 5px !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(1) {
    position: absolute !important;
    z-index: 2 !important;
    top: 19px !important;
    left: 14px !important;
    width: 22px !important;
    height: 22px !important;
    padding: 0 !important;
    grid-area: auto !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(1) input {
    width: 21px !important;
    height: 21px !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(4) {
    grid-area: name !important;
    padding-left: 44px !important;
    padding-right: 70px !important;
    min-height: 26px !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(4) strong {
    font-size: 17px !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(4) .tiny {
    display: none !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(5) {
    grid-area: phone !important;
    padding-left: 44px !important;
    color: color-mix(in srgb, var(--text) 68%, var(--muted)) !important;
    font-size: 13px !important;
    font-weight: 750 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(10) {
    grid-area: status !important;
    justify-self: stretch !important;
    display: flex !important;
    align-items: center !important;
    min-width: 0 !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(11) {
    grid-area: final !important;
    justify-self: stretch !important;
    display: flex !important;
    align-items: center !important;
    min-width: 0 !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(10) .status-badge,
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(11) .status-badge {
    max-width: 100% !important;
    min-height: 27px !important;
    justify-content: center !important;
    white-space: nowrap !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table .lead-badge-stack {
    display: flex !important;
    width: 100% !important;
    gap: 6px !important;
    min-width: 0 !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(7) {
    grid-area: course !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    min-height: 48px !important;
    padding: 10px 12px !important;
    border-radius: 17px !important;
    white-space: normal !important;
    overflow: hidden !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(7)::after {
    content: "Course" !important;
    display: inline-flex !important;
    margin-left: 10px !important;
    align-self: center !important;
    white-space: nowrap !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(8),
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(9),
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(12),
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(13),
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(14) {
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-content: center !important;
    gap: 4px !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 50px !important;
    padding: 9px 11px !important;
    border-radius: 16px !important;
    white-space: normal !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(8)::before,
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(9)::before,
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(12)::before,
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(13)::before,
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(14)::before {
    display: block !important;
    margin: 0 !important;
    color: color-mix(in srgb, var(--text) 58%, var(--muted)) !important;
    font-size: 10px !important;
    line-height: 1 !important;
    letter-spacing: 0.08em !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(8) { grid-area: college !important; }
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(9) { grid-area: counsellor !important; }
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(12) { grid-area: call !important; }
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(13) { grid-area: follow !important; }
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(14) { grid-area: docs !important; }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(15) {
    grid-area: score !important;
    justify-self: stretch !important;
    align-self: stretch !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 0 !important;
    min-height: 50px !important;
    padding: 9px 11px !important;
    border: 1px solid color-mix(in srgb, var(--green) 16%, var(--line)) !important;
    border-radius: 16px !important;
    background: color-mix(in srgb, var(--green) 7%, var(--surface)) !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(16) {
    grid-area: tracking !important;
    display: grid !important;
    gap: 9px !important;
    padding: 11px 0 0 !important;
    border-top: 1px solid color-mix(in srgb, var(--line) 76%, transparent) !important;
    min-height: 0 !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table .lead-counts {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 6px !important;
    width: 100% !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table .lead-count-chip {
    min-width: 0 !important;
    min-height: 28px !important;
    padding: 0 6px !important;
    justify-content: center !important;
    text-align: center !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table .table-remark {
    display: block !important;
    max-height: none !important;
    -webkit-line-clamp: unset !important;
    color: color-mix(in srgb, var(--text) 82%, var(--muted)) !important;
    font-size: 13px !important;
    line-height: 1.38 !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(17) {
    grid-area: actions !important;
    padding-top: 3px !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table .row-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    overflow: visible !important;
    padding: 0 !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table .row-actions .btn,
  html[data-layout="mobile"] #view-leads .modern-table .lead-more-select {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 39px !important;
    padding: 0 9px !important;
    border-radius: 15px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 380px) {
  html[data-layout="mobile"] #view-leads .modern-table tbody tr {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    padding: 14px 12px !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(4),
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(5) {
    padding-left: 40px !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table .lead-counts {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* 27. V19 MOBILE LEADS SMOKE-FIX: compact cards after live test */
@media (max-width: 760px) {
  html[data-layout="mobile"] #view-leads .page-hero {
    margin: 0 10px 10px !important;
    padding: 12px !important;
    min-height: 0 !important;
  }

  html[data-layout="mobile"] #view-leads .page-hero h2 {
    font-size: 22px !important;
    line-height: 1.05 !important;
  }

  html[data-layout="mobile"] #view-leads .page-hero p {
    display: none !important;
  }

  html[data-layout="mobile"] #view-leads .filter-panel,
  html[data-layout="mobile"] #view-leads .filters-panel,
  html[data-layout="mobile"] #view-leads .lead-filters {
    margin: 0 10px 10px !important;
    padding: 10px !important;
    gap: 8px !important;
  }

  html[data-layout="mobile"] #view-leads .crm-controls,
  html[data-layout="mobile"] #view-leads .super-crm-controls,
  html[data-layout="mobile"] #view-leads .premium-card:has(#newLeadBtn) {
    margin: 0 10px 12px !important;
    padding: 12px !important;
    border-radius: 18px !important;
  }

  html[data-layout="mobile"] #view-leads .premium-card:has(#newLeadBtn) .btn,
  html[data-layout="mobile"] #view-leads #newLeadBtn,
  html[data-layout="mobile"] #view-leads #distributeLeadsBtn,
  html[data-layout="mobile"] #view-leads #fillMissingDatesBtn {
    min-height: 38px !important;
    height: 38px !important;
    padding: 0 12px !important;
    border-radius: 14px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table-wrap {
    padding: 0 10px calc(94px + env(safe-area-inset-bottom)) !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table tbody {
    gap: 12px !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table tbody tr {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    grid-template-areas:
      "name name"
      "phone status"
      "course course"
      "college counsellor"
      "call follow"
      "docs score"
      "tracking tracking"
      "actions actions" !important;
    gap: 7px !important;
    padding: 13px 12px 12px !important;
    border-radius: 19px !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(1) {
    top: 15px !important;
    left: 12px !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(4) {
    padding-left: 38px !important;
    padding-right: 8px !important;
    min-height: 23px !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(4) strong {
    font-size: 16px !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(5) {
    padding-left: 38px !important;
    align-self: center !important;
    font-size: 12px !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(10) {
    justify-content: flex-end !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(11) {
    display: none !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(7) {
    min-height: 40px !important;
    padding: 8px 10px !important;
    border-radius: 14px !important;
    font-size: 12px !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(7)::after {
    font-size: 9px !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(8),
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(9),
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(12),
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(13),
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(14),
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(15) {
    min-height: 38px !important;
    padding: 7px 9px !important;
    border-radius: 13px !important;
    font-size: 11px !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(8)::before,
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(9)::before,
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(12)::before,
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(13)::before,
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(14)::before {
    font-size: 9px !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(16) {
    gap: 6px !important;
    padding-top: 8px !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table .lead-counts {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table .lead-count-chip {
    min-height: 24px !important;
    padding: 0 4px !important;
    font-size: 9px !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table .table-remark {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    font-size: 12px !important;
    line-height: 1.32 !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table .row-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table .row-actions .btn,
  html[data-layout="mobile"] #view-leads .modern-table .lead-more-select {
    min-height: 34px !important;
    height: 34px !important;
    padding: 0 7px !important;
    border-radius: 13px !important;
    font-size: 11px !important;
  }
}

@media (max-width: 380px) {
  html[data-layout="mobile"] #view-leads .modern-table tbody tr {
    gap: 6px !important;
    padding: 12px 11px !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table .lead-counts {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table .row-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* 28. V19 MOBILE LEAD COUNTS READABILITY */
@media (max-width: 760px) {
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(16) {
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table .lead-counts {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table .lead-count-chip {
    flex: 1 1 calc(33.333% - 6px) !important;
    min-width: 58px !important;
    max-width: none !important;
    min-height: 28px !important;
    height: 28px !important;
    padding: 0 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
    line-height: 1 !important;
    font-size: 10px !important;
    letter-spacing: 0.03em !important;
    text-align: center !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table .table-remark {
    margin-top: 1px !important;
  }
}

@media (max-width: 380px) {
  html[data-layout="mobile"] #view-leads .modern-table .lead-count-chip {
    flex-basis: calc(50% - 6px) !important;
    min-width: 72px !important;
  }
}

/* 29. V19 MOBILE CALLING TOOLBAR COMPACT */
@media (max-width: 760px) {
  html[data-layout="mobile"] #view-calling .calling-toolbar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 9px !important;
    margin: 10px 10px 12px !important;
    padding: 10px !important;
    min-height: 0 !important;
    align-items: stretch !important;
    border-radius: 18px !important;
  }

  html[data-layout="mobile"] #view-calling .calling-filter {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    flex: 0 0 auto !important;
    flex-basis: auto !important;
    min-height: 0 !important;
    width: 100% !important;
  }

  html[data-layout="mobile"] #view-calling .calling-filter input,
  html[data-layout="mobile"] #view-calling .calling-filter select {
    width: 100% !important;
    min-width: 0 !important;
    flex: 0 0 auto !important;
    flex-basis: auto !important;
    min-height: 40px !important;
    height: 40px !important;
    padding: 0 14px !important;
    border-radius: 14px !important;
    font-size: 14px !important;
  }

  html[data-layout="mobile"] #view-calling .calling-ops {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    width: 100% !important;
    min-height: 0 !important;
  }

  html[data-layout="mobile"] #view-calling .calling-ops .btn,
  html[data-layout="mobile"] #view-calling .calling-ops summary {
    width: 100% !important;
    min-height: 40px !important;
    height: 40px !important;
    padding: 0 14px !important;
    border-radius: 14px !important;
    font-size: 13px !important;
    justify-content: center !important;
  }

  html[data-layout="mobile"] #view-calling .shuffle-folder,
  html[data-layout="mobile"] #view-calling .shuffle-folder.compact {
    width: 100% !important;
    min-height: 0 !important;
    position: relative !important;
  }

  html[data-layout="mobile"] #view-calling .shuffle-folder-body {
    position: static !important;
    width: 100% !important;
    min-width: 0 !important;
    margin-top: 8px !important;
    padding: 10px !important;
    border-radius: 15px !important;
    box-shadow: none !important;
  }
}

@media (min-width: 431px) and (max-width: 760px) {
  html[data-layout="mobile"] #view-calling .calling-filter {
    grid-template-columns: 1fr 1fr !important;
  }

  html[data-layout="mobile"] #view-calling .calling-filter input {
    grid-column: 1 / -1 !important;
  }

  html[data-layout="mobile"] #view-calling .calling-ops {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* 30. V19 MOBILE CALLING COUNSELLOR BOARD */
@media (max-width: 760px) {
  html[data-layout="mobile"] #callingCounsellorBoard {
    display: grid !important;
    gap: 9px !important;
    padding: 10px !important;
  }

  html[data-layout="mobile"] #callingCounsellorBoard .calling-board-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: 72px !important;
    padding: 11px 11px 11px 13px !important;
    border-radius: 16px !important;
    overflow: hidden !important;
  }

  html[data-layout="mobile"] #callingCounsellorBoard .calling-board-row > div:first-child {
    min-width: 0 !important;
  }

  html[data-layout="mobile"] #callingCounsellorBoard .calling-board-row strong {
    display: block !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 15px !important;
    line-height: 1.15 !important;
  }

  html[data-layout="mobile"] #callingCounsellorBoard .calling-board-row > div:first-child > span {
    display: block !important;
    max-width: 100% !important;
    margin-top: 4px !important;
    color: color-mix(in srgb, var(--text) 70%, var(--muted)) !important;
    font-size: 12px !important;
    line-height: 1.32 !important;
    white-space: normal !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }

  html[data-layout="mobile"] #callingCounsellorBoard .calling-board-stats {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 6px !important;
    justify-items: stretch !important;
    align-items: center !important;
    min-width: 70px !important;
    max-width: 82px !important;
  }

  html[data-layout="mobile"] #callingCounsellorBoard .calling-board-stats .calling-pill {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 28px !important;
    height: 28px !important;
    padding: 0 8px !important;
    border-radius: 999px !important;
    background: color-mix(in srgb, var(--green) 13%, var(--surface)) !important;
    border: 1px solid color-mix(in srgb, var(--green) 22%, var(--line)) !important;
    color: color-mix(in srgb, var(--text) 82%, var(--muted)) !important;
    font-size: 11px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    text-align: center !important;
  }
}

@media (max-width: 380px) {
  html[data-layout="mobile"] #callingCounsellorBoard {
    padding: 8px !important;
  }

  html[data-layout="mobile"] #callingCounsellorBoard .calling-board-row {
    grid-template-columns: minmax(0, 1fr) 64px !important;
    gap: 8px !important;
    padding: 10px !important;
  }

  html[data-layout="mobile"] #callingCounsellorBoard .calling-board-stats {
    min-width: 64px !important;
    max-width: 64px !important;
  }

  html[data-layout="mobile"] #callingCounsellorBoard .calling-board-stats .calling-pill {
    font-size: 10px !important;
    padding: 0 6px !important;
  }
}

/* 31. V19 GLOBAL MOBILE TOPBAR CONSISTENCY */
@media (max-width: 760px) {
  html[data-layout="mobile"] body .topbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 120 !important;
    display: grid !important;
    grid-template-columns: 38px minmax(0, 1fr) 106px !important;
    grid-template-rows: 1fr !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    min-height: 78px !important;
    height: 78px !important;
    max-height: 78px !important;
    padding: 8px 12px !important;
    overflow: visible !important;
    background: color-mix(in srgb, var(--surface) 94%, transparent) !important;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent) !important;
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08) !important;
    backdrop-filter: blur(18px) !important;
  }

  html[data-layout="mobile"] body .topbar .mobile-menu-btn {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    margin: 0 !important;
  }

  html[data-layout="mobile"] body .topbar .brand {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  html[data-layout="mobile"] body .topbar .brand-mark {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    border-radius: 13px !important;
    font-size: 14px !important;
  }

  html[data-layout="mobile"] body .topbar .brand h1 {
    display: block !important;
    max-width: 92px !important;
    margin: 0 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    font-size: 16px !important;
    line-height: 1.1 !important;
    letter-spacing: 0 !important;
  }

  html[data-layout="mobile"] body .topbar .brand p,
  html[data-layout="mobile"] body .topbar .stats,
  html[data-layout="mobile"] body .topbar .top-search,
  html[data-layout="mobile"] body .topbar .user-profile,
  html[data-layout="mobile"] body .topbar #logoutBtn,
  html[data-layout="mobile"] body .topbar .health,
  html[data-layout="mobile"] body .topbar #health,
  html[data-layout="mobile"] body .topbar #healthText {
    display: none !important;
  }

  html[data-layout="mobile"] body .topbar .top-actions {
    grid-column: 3 !important;
    grid-row: 1 !important;
    display: grid !important;
    grid-template-columns: 68px 32px !important;
    grid-template-rows: 32px 32px !important;
    gap: 4px !important;
    width: 104px !important;
    min-width: 104px !important;
    max-width: 104px !important;
    height: 68px !important;
    min-height: 68px !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: center !important;
    justify-items: end !important;
    overflow: visible !important;
  }

  html[data-layout="mobile"] body .topbar .layout-switch {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 68px !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 2px !important;
    border-radius: 13px !important;
  }

  html[data-layout="mobile"] body .topbar #notificationBtn {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: inline-flex !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    padding: 0 !important;
    border-radius: 13px !important;
  }

  html[data-layout="mobile"] body .topbar .theme-switch {
    grid-column: 1 / 3 !important;
    grid-row: 2 !important;
    justify-self: end !important;
    width: 68px !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 2px !important;
    border-radius: 13px !important;
  }

  html[data-layout="mobile"] body .topbar .layout-option,
  html[data-layout="mobile"] body .topbar .theme-option {
    width: 31px !important;
    min-width: 31px !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 !important;
    border-radius: 11px !important;
  }

  html[data-layout="mobile"] body .topbar .layout-option svg,
  html[data-layout="mobile"] body .topbar .theme-option svg,
  html[data-layout="mobile"] body .topbar #notificationBtn svg {
    width: 15px !important;
    height: 15px !important;
  }
}

@media (max-width: 360px) {
  html[data-layout="mobile"] body .topbar {
    grid-template-columns: 36px minmax(0, 1fr) 100px !important;
    gap: 6px !important;
    padding-inline: 10px !important;
  }

  html[data-layout="mobile"] body .topbar .brand h1 {
    max-width: 74px !important;
    font-size: 15px !important;
  }

  html[data-layout="mobile"] body .topbar .brand-mark,
  html[data-layout="mobile"] body .topbar .mobile-menu-btn {
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
  }

  html[data-layout="mobile"] body .topbar .top-actions {
    grid-template-columns: 64px 30px !important;
    width: 98px !important;
    min-width: 98px !important;
    max-width: 98px !important;
  }

  html[data-layout="mobile"] body .topbar .layout-switch,
  html[data-layout="mobile"] body .topbar .theme-switch {
    width: 64px !important;
  }

  html[data-layout="mobile"] body .topbar #notificationBtn {
    width: 30px !important;
    min-width: 30px !important;
  }
}

/* 33. V19 MOBILE DASHBOARD HERO CLEANUP */
@media (max-width: 768px) {
  html[data-layout="mobile"] body #view-dashboard .page-head {
    min-height: 0 !important;
    padding: 14px 16px !important;
    align-items: center !important;
    gap: 8px !important;
  }

  html[data-layout="mobile"] body #view-dashboard .page-head > div {
    min-width: 0 !important;
  }

  html[data-layout="mobile"] body #view-dashboard .page-kicker,
  html[data-layout="mobile"] body #view-dashboard .page-subtitle,
  html[data-layout="mobile"] body #view-dashboard .page-head > .btn {
    display: none !important;
  }

  html[data-layout="mobile"] body #view-dashboard .page-title {
    margin: 0 !important;
    font-size: 24px !important;
    line-height: 1.08 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}

/* 34. V19 MOBILE INBOX HEADER COMPACT BAR */
@media (max-width: 768px) {
  html[data-layout="mobile"] body #view-inbox .conv-sidebar {
    padding-top: 0 !important;
  }

  html[data-layout="mobile"] body #view-inbox .side-head {
    display: block !important;
    padding: 8px 14px 6px !important;
    min-height: 0 !important;
    border-bottom: 0 !important;
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,255,255,0.88)) !important;
  }

  html[data-theme="dark"][data-layout="mobile"] body #view-inbox .side-head {
    background: linear-gradient(180deg, rgba(7,17,13,0.96), rgba(7,17,13,0.88)) !important;
  }

  html[data-layout="mobile"] body #view-inbox .side-head .section-title {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
  }

  html[data-layout="mobile"] body #view-inbox .inbox-head-actions {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 6px !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  html[data-layout="mobile"] body #view-inbox .inbox-head-actions button {
    min-width: 0 !important;
    width: 100% !important;
    min-height: 34px !important;
    height: 34px !important;
    padding: 0 7px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    line-height: 1 !important;
    font-weight: 850 !important;
    white-space: nowrap !important;
    box-shadow: none !important;
  }

  html[data-layout="mobile"] body #view-inbox #globalBotToggleBtn,
  html[data-layout="mobile"] body #view-inbox #inboxHumanModeBtn {
    display: inline-flex !important;
    justify-content: center !important;
    gap: 4px !important;
  }

  html[data-layout="mobile"] body #view-inbox #globalBotToggleBtn .toggle-label {
    max-width: 30px !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }

  html[data-layout="mobile"] body #view-inbox .filters {
    padding: 10px 14px 8px !important;
    gap: 8px !important;
    border-top: 1px solid rgba(11, 94, 63, 0.08) !important;
  }

  html[data-layout="mobile"] body #conversationSearch {
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 16px !important;
    border-radius: 18px !important;
    font-size: 15px !important;
  }

  html[data-layout="mobile"] body #view-inbox .inbox-tools {
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto !important;
    padding: 2px 2px 5px !important;
    scrollbar-width: none !important;
  }

  html[data-layout="mobile"] body #view-inbox .inbox-tools::-webkit-scrollbar {
    display: none !important;
  }

  html[data-layout="mobile"] body #view-inbox .inbox-filter {
    flex: 0 0 auto !important;
    min-width: auto !important;
    min-height: 36px !important;
    height: 36px !important;
    padding: 0 15px !important;
    border-radius: 999px !important;
    font-size: 13px !important;
    font-weight: 850 !important;
  }
}

@media (max-width: 380px) {
  html[data-layout="mobile"] body #view-inbox .inbox-head-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  html[data-layout="mobile"] body #view-inbox .inbox-head-actions button {
    min-height: 32px !important;
    height: 32px !important;
    font-size: 10.5px !important;
  }
}

/* 32. V19 MOBILE APP BAR: RK CRM title + one-line professional actions */
@media (max-width: 760px) {
  html[data-layout="mobile"] body .topbar {
    display: grid !important;
    grid-template-columns: 38px minmax(58px, 1fr) 164px !important;
    grid-template-rows: 48px !important;
    align-items: center !important;
    gap: 8px !important;
    min-height: 62px !important;
    height: 62px !important;
    padding: 7px 10px !important;
    overflow: hidden !important;
    border-bottom: 1px solid rgba(15, 118, 110, 0.12) !important;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08) !important;
  }

  html[data-layout="mobile"] body .topbar .mobile-menu-btn {
    grid-column: 1 !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    border-radius: 13px !important;
  }

  html[data-layout="mobile"] body .topbar .brand {
    grid-column: 2 !important;
    display: flex !important;
    align-items: center !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: none !important;
    flex: 1 1 auto !important;
    overflow: hidden !important;
  }

  html[data-layout="mobile"] body .topbar .brand-mark {
    display: none !important;
  }

  html[data-layout="mobile"] body .topbar .brand h1 {
    display: block !important;
    max-width: 100% !important;
    font-size: 18px !important;
    line-height: 1 !important;
    font-weight: 850 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  html[data-layout="mobile"] body .topbar .brand h1::after {
    content: "" !important;
  }

  html[data-layout="mobile"] body .topbar .brand p,
  html[data-layout="mobile"] body .topbar .stats,
  html[data-layout="mobile"] body .topbar .top-search,
  html[data-layout="mobile"] body .topbar .user-profile,
  html[data-layout="mobile"] body .topbar #logoutBtn,
  html[data-layout="mobile"] body .topbar .health,
  html[data-layout="mobile"] body .topbar #health,
  html[data-layout="mobile"] body .topbar #healthText {
    display: none !important;
  }

  html[data-layout="mobile"] body .topbar .top-actions {
    grid-column: 3 !important;
    grid-row: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 5px !important;
    width: 164px !important;
    min-width: 164px !important;
    max-width: 164px !important;
    height: 38px !important;
    min-height: 38px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  html[data-layout="mobile"] body .topbar .layout-switch,
  html[data-layout="mobile"] body .topbar .theme-switch {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    width: 62px !important;
    min-width: 62px !important;
    max-width: 62px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 2px !important;
    border-radius: 14px !important;
    grid-column: auto !important;
    grid-row: auto !important;
  }

  html[data-layout="mobile"] body .topbar #notificationBtn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    border-radius: 14px !important;
    grid-column: auto !important;
    grid-row: auto !important;
  }

  html[data-layout="mobile"] body .topbar .layout-option,
  html[data-layout="mobile"] body .topbar .theme-option {
    width: 28px !important;
    min-width: 28px !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 !important;
    border-radius: 12px !important;
  }

  html[data-layout="mobile"] body .topbar .layout-option svg,
  html[data-layout="mobile"] body .topbar .theme-option svg,
  html[data-layout="mobile"] body .topbar #notificationBtn svg {
    width: 15px !important;
    height: 15px !important;
  }

  html.drawer-open[data-layout="mobile"] body .topbar {
    grid-template-columns: 38px minmax(58px, 1fr) 164px !important;
  }
}

@media (max-width: 360px) {
  html[data-layout="mobile"] body .topbar {
    grid-template-columns: 36px minmax(48px, 1fr) 156px !important;
    gap: 6px !important;
    padding-inline: 8px !important;
  }

  html[data-layout="mobile"] body .topbar .brand h1 {
    font-size: 16px !important;
  }

  html[data-layout="mobile"] body .topbar .top-actions {
    width: 156px !important;
    min-width: 156px !important;
    max-width: 156px !important;
    gap: 4px !important;
  }

  html[data-layout="mobile"] body .topbar .layout-switch,
  html[data-layout="mobile"] body .topbar .theme-switch {
    width: 60px !important;
    min-width: 60px !important;
    max-width: 60px !important;
  }

  html[data-layout="mobile"] body .topbar #notificationBtn {
    width: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
  }
}

/* 41. V19.2 FINAL AUTHORITATIVE MOBILE + CARD POLISH LAYER */
@media (max-width: 768px) {
  html[data-layout="mobile"] .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: 74px !important;
    padding: 10px 14px !important;
  }

  html[data-layout="mobile"] .brand {
    min-width: 0 !important;
    gap: 10px !important;
  }

  html[data-layout="mobile"] .brand > div:last-child {
    min-width: 0 !important;
  }

  html[data-layout="mobile"] .brand h1 {
    font-size: 16px !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  html[data-layout="mobile"] .brand p,
  html[data-layout="mobile"] .stats,
  html[data-layout="mobile"] .top-search,
  html[data-layout="mobile"] .user-profile,
  html[data-layout="mobile"] .health {
    display: none !important;
  }

  html[data-layout="mobile"] .top-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    min-width: 0 !important;
    padding: 0 !important;
  }

  html[data-layout="mobile"] .top-icon,
  html[data-layout="mobile"] .layout-option,
  html[data-layout="mobile"] .theme-option {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    border-radius: 14px !important;
  }

  html[data-layout="mobile"] .layout-switch,
  html[data-layout="mobile"] .theme-switch {
    gap: 4px !important;
    padding: 4px !important;
    border-radius: 16px !important;
  }

  html[data-layout="mobile"] .mobile-bottom-nav {
    min-height: 60px !important;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom)) !important;
  }

  html[data-layout="mobile"] .mobile-bottom-nav button {
    min-height: 42px !important;
    font-size: 12px !important;
  }

  html[data-layout="mobile"] #view-dashboard .page-kicker,
  html[data-layout="mobile"] #view-dashboard .page-subtitle,
  html[data-layout="mobile"] #view-calling .page-kicker,
  html[data-layout="mobile"] #view-calling .page-subtitle {
    display: none !important;
  }

  html[data-layout="mobile"] #view-dashboard .page-title,
  html[data-layout="mobile"] #view-calling .page-title {
    font-size: 26px !important;
    line-height: 1.08 !important;
    margin-bottom: 0 !important;
  }

  html[data-layout="mobile"] #view-dashboard .calling-hero-actions,
  html[data-layout="mobile"] #view-calling .calling-hero-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
  }

  html[data-layout="mobile"] #view-dashboard .calling-hero-actions .btn,
  html[data-layout="mobile"] #view-calling .calling-hero-actions .btn {
    width: 100% !important;
  }

  html[data-layout="mobile"] #view-inbox .inbox-layout {
    display: block !important;
    min-height: 0 !important;
    height: auto !important;
  }

  html[data-layout="mobile"]:not(.chat-open) #view-inbox .chat {
    display: none !important;
  }

  html[data-layout="mobile"] #view-inbox .conv-sidebar {
    display: block !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding-bottom: calc(70px + env(safe-area-inset-bottom)) !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
  }

  html[data-layout="mobile"] #view-inbox .side-head {
    padding: 8px 16px 4px !important;
    min-height: 0 !important;
    gap: 6px !important;
  }

  html[data-layout="mobile"] #view-inbox .side-head .section-title {
    display: none !important;
  }

  html[data-layout="mobile"] #view-inbox .inbox-head-actions {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    scrollbar-width: none !important;
  }

  html[data-layout="mobile"] #view-inbox .inbox-head-actions::-webkit-scrollbar {
    display: none !important;
  }

  html[data-layout="mobile"] #view-inbox .inbox-head-actions button {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: fit-content !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 11px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    font-weight: 750 !important;
    line-height: 1 !important;
  }

  html[data-layout="mobile"] #view-inbox .filters {
    padding: 8px 16px 8px !important;
    gap: 8px !important;
  }

  html[data-layout="mobile"] #view-inbox #conversationSearch {
    height: 42px !important;
    min-height: 42px !important;
    border-radius: 18px !important;
    padding: 0 14px !important;
    font-size: 14px !important;
  }

  html[data-layout="mobile"] #view-inbox .inbox-tools {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 0 !important;
    scrollbar-width: none !important;
  }

  html[data-layout="mobile"] #view-inbox .inbox-tools::-webkit-scrollbar {
    display: none !important;
  }

  html[data-layout="mobile"] #view-inbox .inbox-filter {
    flex: 0 0 auto !important;
    min-width: fit-content !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 15px !important;
    font-size: 12px !important;
  }

  html[data-layout="mobile"] #view-inbox .inbox-bulk-bar {
    padding: 8px 16px !important;
    gap: 8px !important;
  }

  html[data-layout="mobile"] #view-inbox .list,
  html[data-layout="mobile"] #conversationList {
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 0 6px !important;
    margin-bottom: 0 !important;
  }

  html[data-layout="mobile"] #conversationList .conversation {
    min-height: 84px !important;
  }

  html[data-layout="mobile"] #view-calling .calling-toolbar {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 12px !important;
  }

  html[data-layout="mobile"] #view-calling .calling-filter {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    width: 100% !important;
  }

  html[data-layout="mobile"] #view-calling .calling-ops {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
  }

  html[data-layout="mobile"] #view-calling .calling-ops .btn,
  html[data-layout="mobile"] #view-calling .calling-ops details,
  html[data-layout="mobile"] #view-calling .calling-ops summary {
    width: 100% !important;
  }

  html[data-layout="mobile"] #callingCounsellorBoard {
    display: grid !important;
    gap: 10px !important;
  }

  html[data-layout="mobile"] .calling-board-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 14px !important;
    border-radius: 18px !important;
  }

  html[data-layout="mobile"] .calling-board-row > div:first-child span {
    display: block !important;
    margin-top: 4px !important;
    line-height: 1.45 !important;
  }

  html[data-layout="mobile"] .calling-board-stats {
    display: flex !important;
    gap: 8px !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
  }

  html[data-layout="mobile"] #view-performance .performance-table,
  html[data-layout="mobile"] #view-performance .leaderboard-grid,
  html[data-layout="mobile"] #view-performance .performance-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  html[data-layout="mobile"] #view-performance .performance-card,
  html[data-layout="mobile"] #view-performance .leader-card {
    padding: 16px !important;
  }

  html[data-layout="mobile"] #view-performance .performance-card strong,
  html[data-layout="mobile"] #view-performance .leader-card strong {
    font-size: 15px !important;
  }

  html[data-layout="mobile"] #view-leads .super-crm-panel {
    padding: 14px !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table tbody {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table tbody tr {
    min-height: 0 !important;
    padding: 14px !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(12),
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(13),
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(14) {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    min-height: 44px !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow: hidden !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(12)::before,
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(13)::before,
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(14)::before {
    margin-right: 10px !important;
    white-space: nowrap !important;
  }

  html[data-layout="mobile"] #view-leads .lead-counts {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
    width: 100% !important;
  }

  html[data-layout="mobile"] #view-leads .lead-count-chip {
    min-width: 0 !important;
    min-height: 28px !important;
    padding: 0 6px !important;
    justify-content: center !important;
    text-align: center !important;
    font-size: 10px !important;
  }

  html[data-layout="mobile"] #view-leads .table-remark {
    display: block !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    -webkit-line-clamp: 2 !important;
  }

  html[data-layout="mobile"] #view-leads .row-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  html[data-layout="mobile"] #view-leads .row-actions .btn,
  html[data-layout="mobile"] #view-leads .lead-more-select {
    min-height: 40px !important;
    font-size: 12px !important;
  }
}

@media (min-width: 761px) {
  #view-leads .modern-table tbody {
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)) !important;
    gap: 18px !important;
  }

  #view-leads .modern-table tbody tr {
    min-height: 0 !important;
    align-content: start !important;
  }

  #view-leads .modern-table td:nth-child(12),
  #view-leads .modern-table td:nth-child(13),
  #view-leads .modern-table td:nth-child(14) {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    min-height: 40px !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow: hidden !important;
  }

  #view-leads .modern-table td:nth-child(12)::before,
  #view-leads .modern-table td:nth-child(13)::before,
  #view-leads .modern-table td:nth-child(14)::before {
    white-space: nowrap !important;
    margin-right: 10px !important;
  }

  #view-leads .modern-table td:nth-child(16) {
    gap: 10px !important;
    min-height: 0 !important;
  }

  #view-leads .lead-counts {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 6px !important;
    width: 100% !important;
  }

  #view-leads .lead-count-chip {
    min-height: 26px !important;
    justify-content: center !important;
    text-align: center !important;
  }
}

/* 42. FINAL CSS STABILITY LAYER
   Keep lead cards deterministic across desktop/mobile after older hotfixes.
   This layer intentionally avoids business-logic changes. */
#view-leads .modern-table-wrap {
  overflow-x: hidden !important;
}

#view-leads .modern-table {
  width: 100% !important;
  table-layout: fixed !important;
}

#view-leads .modern-table tbody {
  display: grid !important;
  width: 100% !important;
  max-width: 100% !important;
  align-items: stretch !important;
}

#view-leads .modern-table tbody tr {
  box-sizing: border-box !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

#view-leads .modern-table td,
#view-leads .modern-table td * {
  min-width: 0 !important;
}

#view-leads .modern-table td:nth-child(7),
#view-leads .modern-table td:nth-child(8),
#view-leads .modern-table td:nth-child(9),
#view-leads .modern-table td:nth-child(12),
#view-leads .modern-table td:nth-child(13),
#view-leads .modern-table td:nth-child(14) {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
}

#view-leads .modern-table td:nth-child(8),
#view-leads .modern-table td:nth-child(9),
#view-leads .modern-table td:nth-child(12),
#view-leads .modern-table td:nth-child(13),
#view-leads .modern-table td:nth-child(14) {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center !important;
  justify-content: stretch !important;
  gap: 8px !important;
  white-space: nowrap !important;
  word-break: normal !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#view-leads .modern-table td:nth-child(8)::before,
#view-leads .modern-table td:nth-child(9)::before,
#view-leads .modern-table td:nth-child(12)::before,
#view-leads .modern-table td:nth-child(13)::before,
#view-leads .modern-table td:nth-child(14)::before {
  flex: none !important;
  min-width: max-content !important;
  margin: 0 !important;
  line-height: 1 !important;
}

#view-leads .modern-table td:nth-child(16) {
  overflow: hidden !important;
}

#view-leads .lead-counts {
  max-width: 100% !important;
  overflow: hidden !important;
}

#view-leads .lead-count-chip {
  box-sizing: border-box !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#view-leads .row-actions {
  width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
}

#view-leads .row-actions .btn,
#view-leads .lead-more-select {
  box-sizing: border-box !important;
  min-width: 0 !important;
  max-width: 100% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

@media (min-width: 761px) {
  #view-leads .modern-table tbody {
    grid-template-columns: repeat(auto-fit, minmax(315px, 1fr)) !important;
    gap: 16px !important;
  }

  #view-leads .modern-table tbody tr {
    display: grid !important;
    grid-template-columns: 28px minmax(0, 1fr) minmax(78px, auto) !important;
    grid-template-areas:
      "select name status"
      "select phone final"
      "course course course"
      "college counsellor score"
      "call follow docs"
      "tracking tracking tracking"
      "actions actions actions" !important;
    gap: 8px 10px !important;
    padding: 16px !important;
  }

  #view-leads .modern-table td:nth-child(7) {
    min-height: 42px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
  }

  #view-leads .modern-table td:nth-child(8),
  #view-leads .modern-table td:nth-child(9),
  #view-leads .modern-table td:nth-child(12),
  #view-leads .modern-table td:nth-child(13),
  #view-leads .modern-table td:nth-child(14) {
    min-height: 36px !important;
    padding: 7px 10px !important;
  }

  #view-leads .modern-table td:nth-child(15) {
    min-width: 92px !important;
    max-width: 140px !important;
  }

  #view-leads .lead-counts {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(42px, 1fr)) !important;
    gap: 6px !important;
  }

  #view-leads .row-actions {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
}

@media (min-width: 1360px) {
  #view-leads .modern-table tbody {
    grid-template-columns: repeat(3, minmax(315px, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  html[data-layout="mobile"] #view-leads .modern-table tbody {
    grid-template-columns: 1fr !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table tbody tr {
    display: grid !important;
    grid-template-columns: 28px minmax(0, 1fr) auto !important;
    grid-template-areas:
      "select name status"
      "select phone final"
      "course course course"
      "college counsellor counsellor"
      "call follow docs"
      "score score score"
      "tracking tracking tracking"
      "actions actions actions" !important;
    gap: 8px !important;
    padding: 14px !important;
  }

  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(8),
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(9),
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(12),
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(13),
  html[data-layout="mobile"] #view-leads .modern-table td:nth-child(14) {
    min-height: 42px !important;
    padding: 8px 10px !important;
  }

  html[data-layout="mobile"] #view-leads .lead-counts {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }

  html[data-layout="mobile"] #view-leads .lead-count-chip {
    min-height: 30px !important;
    padding: 0 4px !important;
    font-size: 10px !important;
  }

  html[data-layout="mobile"] #view-leads .row-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 380px) {
  html[data-layout="mobile"] #view-leads .modern-table tbody tr {
    grid-template-columns: 24px minmax(0, 1fr) !important;
    grid-template-areas:
      "select name"
      "select phone"
      "status final"
      "course course"
      "college college"
      "counsellor counsellor"
      "call call"
      "follow follow"
      "docs docs"
      "score score"
      "tracking tracking"
      "actions actions" !important;
  }
}

/* 43. TODAY ASSIGNED PARITY: align with premium Leads card language.
   UI-only layer: keeps existing JS, APIs and attendance logic unchanged. */
#view-today .dashboard-shell {
  gap: 18px;
}

#view-today .page-head {
  border: 1px solid color-mix(in srgb, var(--green) 16%, var(--line));
  border-radius: 24px;
  padding: 20px;
  background:
    radial-gradient(circle at 92% 0%, color-mix(in srgb, var(--green) 14%, transparent) 0 84px, transparent 85px),
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 96%, #fff 4%), color-mix(in srgb, var(--green-soft) 42%, var(--surface) 58%));
  box-shadow: 0 22px 62px rgba(15, 23, 42, 0.08);
}

#view-today .page-title {
  letter-spacing: -0.02em;
}

#view-today .followup-folder-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(128px, 1fr));
  gap: 12px;
}

#view-today .followup-folder-card {
  position: relative;
  min-height: 116px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 72%, var(--green) 14%);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--green) 16%, transparent) 0 52px, transparent 53px),
    linear-gradient(150deg, color-mix(in srgb, var(--surface) 96%, #fff 4%), color-mix(in srgb, var(--surface-2) 76%, var(--green-soft) 24%));
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

#view-today .followup-folder-card:nth-child(2),
#view-today .followup-folder-card:nth-child(5) {
  border-left: 4px solid #ef4444;
}

#view-today .followup-folder-card:nth-child(3),
#view-today .followup-folder-card:nth-child(6) {
  border-left: 4px solid #22c55e;
}

#view-today .followup-folder-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#view-today .followup-folder-card strong {
  margin-top: 12px;
  color: var(--text);
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 0.95;
}

#view-today .super-crm-command {
  border-radius: 22px;
  border-color: color-mix(in srgb, var(--line) 78%, var(--green) 12%);
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 96%, #fff 4%), color-mix(in srgb, var(--green-soft) 20%, var(--surface) 80%));
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

#view-today .rk-bucket-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 0;
}

#view-today .rk-bucket {
  display: block;
  min-height: 0;
  overflow: visible;
  border: 1px solid color-mix(in srgb, var(--line) 74%, var(--green) 14%);
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--green) 12%, transparent) 0 72px, transparent 73px),
    linear-gradient(160deg, color-mix(in srgb, var(--surface) 96%, #fff 4%), color-mix(in srgb, var(--surface-2) 74%, var(--green-soft) 26%));
  box-shadow: 0 22px 58px rgba(15, 23, 42, 0.08);
}

#view-today .rk-bucket-head {
  min-height: 58px;
  padding: 14px 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
  letter-spacing: 0.02em;
}

#view-today .rk-bucket-head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: color-mix(in srgb, var(--green) 68%, #064e3b);
  background: color-mix(in srgb, var(--green) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--green) 25%, var(--line));
}

#view-today .rk-bucket-body {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 12px;
  max-height: none;
  padding: 14px;
  overflow: visible;
}

#view-today .rk-bucket-body .empty {
  display: grid;
  min-height: 170px;
  place-items: center;
  border: 1px dashed color-mix(in srgb, var(--line) 80%, var(--green) 12%);
  border-radius: 18px;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  font-weight: 800;
}

#view-today .crm-lead-card {
  display: grid;
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
  border-radius: 20px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

#view-today .crm-card-top,
#view-today .crm-card-course,
#view-today .crm-card-meta-grid,
#view-today .crm-card-score-row,
#view-today .crm-card-remark,
#view-today .crm-card-actions {
  min-height: 0;
  max-height: none;
  overflow: visible;
}

#view-today .crm-card-meta-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#view-today .crm-card-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  opacity: 1;
  transform: none;
}

#view-today .crm-card-actions .btn,
#view-today .crm-card-actions .lead-more-select {
  min-width: 0;
  min-height: 36px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

html[data-theme="dark"] #view-today .page-head,
html[data-theme="dark"] #view-today .followup-folder-card,
html[data-theme="dark"] #view-today .super-crm-command,
html[data-theme="dark"] #view-today .rk-bucket {
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.28);
}

@media (max-width: 1280px) {
  #view-today .followup-folder-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #view-today .rk-bucket-list {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
  }
}

@media (max-width: 760px) {
  html[data-layout="mobile"] #view-today .dashboard-shell {
    padding: 12px;
    gap: 12px;
  }

  html[data-layout="mobile"] #view-today .page-head {
    padding: 14px;
    border-radius: 20px;
  }

  html[data-layout="mobile"] #view-today .page-subtitle {
    display: none;
  }

  html[data-layout="mobile"] #view-today .followup-folder-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  html[data-layout="mobile"] #view-today .followup-folder-card {
    min-height: 92px;
    padding: 12px;
    border-radius: 18px;
  }

  html[data-layout="mobile"] #view-today .followup-folder-card span {
    font-size: 10px;
    letter-spacing: 0.06em;
  }

  html[data-layout="mobile"] #view-today .followup-folder-card strong {
    font-size: 30px;
  }

  html[data-layout="mobile"] #view-today .super-crm-command {
    border-radius: 18px;
  }

  html[data-layout="mobile"] #view-today .rk-bucket-list {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  html[data-layout="mobile"] #view-today .rk-bucket {
    min-height: 0;
    border-radius: 20px;
  }

  html[data-layout="mobile"] #view-today .rk-bucket-body {
    max-height: none;
    padding: 12px;
    overflow: visible;
  }

  html[data-layout="mobile"] #view-today .crm-card-meta-grid {
    grid-template-columns: 1fr;
  }

  html[data-layout="mobile"] #view-today .crm-card-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 44. MOBILE INBOX FINAL SCROLL + COMPACT ACTION BAR
   Scope: Inbox mobile only. Keeps other CRM pages and backend untouched. */
@media (max-width: 760px) {
  html[data-layout="mobile"] #view-inbox {
    height: calc(100dvh - 76px) !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  html[data-layout="mobile"] #view-inbox .inbox-layout {
    display: block !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  html[data-layout="mobile"]:not(.chat-open) #view-inbox .chat {
    display: none !important;
  }

  html[data-layout="mobile"] #view-inbox .conv-sidebar {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
    padding-bottom: 0 !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
  }

  html[data-layout="mobile"] #view-inbox .side-head {
    flex: 0 0 auto !important;
    min-height: 38px !important;
    padding: 5px 14px 4px !important;
    gap: 0 !important;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent) !important;
  }

  html[data-layout="mobile"] #view-inbox .side-head .section-title {
    display: none !important;
  }

  html[data-layout="mobile"] #view-inbox .inbox-head-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    padding: 0 2px 3px !important;
    margin: 0 !important;
    scrollbar-width: none !important;
  }

  html[data-layout="mobile"] #view-inbox .inbox-head-actions::-webkit-scrollbar {
    display: none !important;
  }

  html[data-layout="mobile"] #view-inbox .inbox-head-actions button,
  html[data-layout="mobile"] #view-inbox .inbox-head-actions .btn,
  html[data-layout="mobile"] #view-inbox .inbox-head-actions .icon-btn,
  html[data-layout="mobile"] #view-inbox .inbox-head-actions .global-bot-toggle {
    position: static !important;
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: max-content !important;
    height: 31px !important;
    min-height: 31px !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    font-weight: 850 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    overflow: visible !important;
    transform: none !important;
  }

  html[data-layout="mobile"] #view-inbox #globalBotToggleBtn {
    min-width: 62px !important;
  }

  html[data-layout="mobile"] #view-inbox #inboxHumanModeBtn {
    min-width: 46px !important;
  }

  html[data-layout="mobile"] #view-inbox #resumeAllBotsBtn {
    min-width: 54px !important;
  }

  html[data-layout="mobile"] #view-inbox #inboxSelectModeBtn {
    min-width: 58px !important;
  }

  html[data-layout="mobile"] #view-inbox #refreshInbox {
    min-width: 66px !important;
  }

  html[data-layout="mobile"] #view-inbox .filters {
    flex: 0 0 auto !important;
    padding: 10px 14px 8px !important;
    gap: 8px !important;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent) !important;
  }

  html[data-layout="mobile"] #view-inbox #conversationSearch {
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    border-radius: 18px !important;
    padding: 0 14px !important;
    font-size: 14px !important;
  }

  html[data-layout="mobile"] #view-inbox .inbox-tools {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 2px 0 4px !important;
    scrollbar-width: none !important;
  }

  html[data-layout="mobile"] #view-inbox .inbox-tools::-webkit-scrollbar {
    display: none !important;
  }

  html[data-layout="mobile"] #view-inbox .inbox-filter {
    flex: 0 0 auto !important;
    min-width: max-content !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 15px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
  }

  html[data-layout="mobile"] #view-inbox .list,
  html[data-layout="mobile"] #view-inbox #conversationList,
  html[data-layout="mobile"] #conversationList {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    padding: 0 0 calc(92px + env(safe-area-inset-bottom)) !important;
    margin: 0 !important;
  }

  html[data-layout="mobile"] #view-inbox .conversation,
  html[data-layout="mobile"] #conversationList .conversation {
    flex: 0 0 auto !important;
    min-height: 86px !important;
  }
}

/* Final lead editor stability guards */
#view-leads .super-crm-form datalist {
  display: none !important;
}

#view-leads .super-crm-panel.lead-editor-closed .super-crm-form,
#view-leads .super-crm-panel.lead-editor-closed .super-crm-bulk {
  display: none !important;
}

#view-leads .super-crm-panel.lead-editor-open .super-crm-form {
  display: grid !important;
}

#view-leads .super-crm-panel.lead-editor-open .super-crm-bulk {
  display: grid !important;
}

/* Lead save/update visibility guard
   Android Chrome was keeping the Save/Update action off-canvas in the
   horizontal action rail. When the editor is open, the primary form actions
   must be visible on every device. */
#view-leads .super-crm-panel.lead-editor-open #saveLeadBtn,
#view-leads .super-crm-panel.lead-editor-open #resetLeadFormBtn {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

@media (max-width: 760px) {
  #view-leads .super-crm-panel.lead-editor-open .super-crm-actions,
  html[data-layout="mobile"] #view-leads .super-crm-panel.lead-editor-open .super-crm-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    overflow: visible !important;
    padding: 0 0 10px !important;
  }

  #view-leads .super-crm-panel.lead-editor-open .super-crm-actions .btn,
  #view-leads .super-crm-panel.lead-editor-open .shuffle-folder,
  html[data-layout="mobile"] #view-leads .super-crm-panel.lead-editor-open .super-crm-actions .btn,
  html[data-layout="mobile"] #view-leads .super-crm-panel.lead-editor-open .shuffle-folder {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  #view-leads .super-crm-panel.lead-editor-open #newLeadBtn,
  html[data-layout="mobile"] #view-leads .super-crm-panel.lead-editor-open #newLeadBtn {
    order: 1;
  }

  #view-leads .super-crm-panel.lead-editor-open #saveLeadBtn,
  html[data-layout="mobile"] #view-leads .super-crm-panel.lead-editor-open #saveLeadBtn {
    order: 2;
    min-height: 44px !important;
  }

  #view-leads .super-crm-panel.lead-editor-open #resetLeadFormBtn,
  html[data-layout="mobile"] #view-leads .super-crm-panel.lead-editor-open #resetLeadFormBtn {
    order: 3;
  }

  #view-leads .super-crm-panel.lead-editor-open .super-crm-form,
  html[data-layout="mobile"] #view-leads .super-crm-panel.lead-editor-open .super-crm-form {
    grid-template-columns: 1fr !important;
  }
}

/* Team and reassignment controls */
.reassign-folder-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.reassign-folder-actions .btn {
  min-width: 0;
  white-space: normal;
  line-height: 1.2;
}

.portal-user-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.portal-remove-user-btn {
  color: #dc2626 !important;
  border-color: color-mix(in srgb, #dc2626 34%, var(--line)) !important;
  background: color-mix(in srgb, #dc2626 5%, var(--surface)) !important;
}

.portal-remove-user-btn:disabled {
  opacity: .45 !important;
  color: var(--muted) !important;
}

html[data-user-role="counsellor"] #distributeLeadsBtn,
html[data-user-role="counsellor"] #repairLeadDatesBtn,
html[data-user-role="counsellor"] #shuffleNotAnsweredBtn,
html[data-user-role="counsellor"] #shuffleStaleFollowupsBtn,
html[data-user-role="counsellor"] #dashDistributeBtn,
html[data-user-role="counsellor"] #dashShuffleNotAnsweredBtn,
html[data-user-role="counsellor"] #dashShuffleFollowupsBtn,
html[data-user-role="counsellor"] #callingDistributeBtn,
html[data-user-role="counsellor"] #callingShuffleBtn,
html[data-user-role="counsellor"] #callingShuffleFollowupsBtn,
html[data-user-role="counsellor"] .reassign-folder,
html[data-user-role="counsellor"] .reassign-selected-btn,
html[data-user-role="counsellor"] .reassign-source-one-btn,
html[data-user-role="counsellor"] .reassign-source-random-btn,
html[data-user-role="counsellor"] .shuffle-tool-btn,
html[data-user-role="manager"] #distributeLeadsBtn,
html[data-user-role="manager"] #repairLeadDatesBtn,
html[data-user-role="manager"] #shuffleNotAnsweredBtn,
html[data-user-role="manager"] #shuffleStaleFollowupsBtn,
html[data-user-role="manager"] #dashDistributeBtn,
html[data-user-role="manager"] #dashShuffleNotAnsweredBtn,
html[data-user-role="manager"] #dashShuffleFollowupsBtn,
html[data-user-role="manager"] #callingDistributeBtn,
html[data-user-role="manager"] #callingShuffleBtn,
html[data-user-role="manager"] #callingShuffleFollowupsBtn,
html[data-user-role="manager"] .reassign-folder,
html[data-user-role="manager"] .reassign-selected-btn,
html[data-user-role="manager"] .reassign-source-one-btn,
html[data-user-role="manager"] .reassign-source-random-btn,
html[data-user-role="manager"] .shuffle-tool-btn {
  display: none !important;
}

@media (max-width: 640px) {
  .reassign-folder-actions {
    grid-template-columns: 1fr;
  }

  .portal-user-actions {
    justify-content: flex-start;
  }
}
