/* ==========================================================================
   CRM MASTER STYLESHEET (Consolidated & Resolved)
   Organized by component | Resolution, Scaling & Conflict Fixes Applied
   ========================================================================== */

/* ==========================================================================
   1. GLOBAL RESET & VARIABLES
   ========================================================================== */
:root {
  --primary: #0b675f;
  --primary-light: #11c57d;
  --primary-dark: #0d5f59;
  --primary-50: #ffffff;
  --primary-100: #6dadaa;
  --accent: #f59e0b;
  --danger: #ef4444;
  --danger-light: #fca5a5;
  --success: #22c55e;
  --info: #3b82f6;
  --bg: #f9fafa;
  --card: #fff;
  --text: #1d1f20;
  --text-s: #242a33;
  --border: #9f9fa2;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md:
    0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
  --shadow-lg:
    0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.06);
  --radius: 10px;
  --radius-sm: 6px;
  --tr: 0.2s ease;
  /* Global scrollbar colours */
  --scrm-scroll-track: transparent;
  --scrm-scroll-thumb: #94a3b8;
  --scrm-scroll-thumb-hover: #64748b;
  --scrm-scroll-size: 10px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* CRM wrapper – base font & spacing */
.scrm-wrap {
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 13px !important;
  line-height: 1.6;
  margin: 0 auto;
  max-width: 1920px;
  min-height: 90vh;
  padding: 16px;
  padding-top: 52px !important;
  margin-top: 0 !important;
}

html,
body {
  margin: 0 !important;
  padding: 0 !important;
}

/* ==========================================================================
   2. TYPOGRAPHY & HEADINGS
   ========================================================================== */
.scrm-wrap h1,
.scrm-wrap h2,
.scrm-wrap h3,
.scrm-wrap h4,
.scrm-wrap th,
.scrm-st {
  font-weight: 700;
  color: var(--text);
}

.scrm-login-form h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.scrm-tbar h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 0;
}

.scrm-mh h3 {
  font-size: 16px;
  font-weight: 700;
}

.scrm-sh h3 {
  font-size: 14px;
  font-weight: 700;
}

.scrm-cust-view-header h3 {
  font-size: 16px;
  margin: 0;
  font-weight: 700;
}

.scrm-opp-header-summary strong {
  color: #26364b;
  font-size: 16px;
  font-weight: 700;
}

/* ==========================================================================
   3. APP LAYOUT & TOP NAVIGATION
   ========================================================================== */
.scrm-top-bar {
  align-items: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 10px;
  margin-top: 0 !important;
  padding: 8px 14px;
  position: fixed;
  background: #fff !important;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  box-sizing: border-box;
  z-index: 99999 !important; /* Elevated to cover all WordPress toolbars */
  border-bottom: 2px solid #2a876e !important; /* Combined with original 1px + later 2px */
  flex-wrap: nowrap !important; /* Prevents wrapping on desktop */
  min-height: 52px !important;
  max-height: 52px !important;
  height: 52px !important;

  overflow: visible !important; /* Allows dropdowns to escape */
}

/* The subtle shimmer on the top bar – kept as is */
.scrm-top-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.04) 40%,
    rgba(255, 255, 255, 0.07) 50%,
    rgba(255, 255, 255, 0.04) 60%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 200% 100%;
  animation: scrmSubtleShimmer 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
.scrm-top-bar > * {
  position: relative;
  z-index: 1;
}

.scrm-tabs {
  display: flex;
  flex: 1;
  gap: 2px;
  margin-bottom: 0;
  overflow: hidden; /* Scrollbar hidden */
  min-width: 0;
  flex-wrap: nowrap !important; /* Keep tabs in one line */
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch;
}

.scrm-tab {
  background: 0 0;
  border: none;
  border-bottom: 2px solid transparent;
  color: #fff !important;
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 700;
  margin-bottom: 0;
  padding: 6px 12px;
  transition: var(--tr);
  white-space: nowrap;
  text-transform: uppercase;
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
}

.scrm-tab:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.05);
}

.scrm-tab.active {
  border-bottom: 3px solid var(--primary-light);
  background: rgba(255, 255, 255, 0.1);
}

/* Underline animation (kept from premium layer) */
.scrm-tab::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-light);
  border-radius: 1px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-50%);
}
.scrm-tab.active::after {
  width: 70%;
}
.scrm-tab:hover::after {
  width: 50%;
}

/* ==========================================================================
   4. USER MENU & DROPDOWN
   ========================================================================== */
.scrm-user-menu {
  align-items: center;
  cursor: pointer;
  display: flex;
  margin-left: auto;
  position: relative;
  gap: 12px;
}

.scrm-avatar {
  align-items: center;
  background: var(--primary);
  border: 2px solid #334155;
  border-radius: 50%;
  color: #fff;
  display: flex;
  font-size: 13px;
  font-weight: 700;
  height: 36px;
  width: 36px;
  justify-content: center;
  text-transform: uppercase;
  transition: var(--tr);
}

.scrm-user-menu:hover .scrm-avatar {
  border-color: var(--primary-light);
}

.scrm-dropdown {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
  display: none;
  min-width: 150px;
  padding: 6px 0;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 100000;
  transform-origin: top right;
  transform: scale(0.95) translateY(-4px);
  opacity: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.scrm-dropdown.open {
  display: block;
  transform: scale(1) translateY(0);
  opacity: 1;
}

.scrm-dropdown a {
  align-items: center;
  color: #cbd5e1;
  display: flex;
  font-size: 13px;
  gap: 8px;
  padding: 9px 16px;
  text-decoration: none;
  transition: var(--tr);
}

.scrm-dropdown a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* Avatar online status dot – kept from premium */
.scrm-avatar::after {
  content: "";
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid #1e3a8a;
  transition: var(--tr);
}
.scrm-user-menu:hover .scrm-avatar::after {
  transform: scale(1.2);
}

/* ==========================================================================
   5. REFRESH BUTTON (Purple Theme)
   ========================================================================== */
#scrm-refresh-btn {
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 8px 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 4px 6px -1px rgba(139, 92, 246, 0.3) !important;
}

#scrm-refresh-btn:hover {
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 12px -2px rgba(139, 92, 246, 0.4) !important;
}

#scrm-refresh-btn:active {
  transform: translateY(0) !important;
  box-shadow: 0 2px 4px -1px rgba(139, 92, 246, 0.3) !important;
}

#scrm-refresh-btn i {
  color: #ffffff !important;
  font-size: 14px;
}

#scrm-refresh-btn.spinning i {
  animation: scrmSp 0.8s linear infinite !important;
}

/* ==========================================================================
   6. METRIC CARDS & DASHBOARD BLOCKS
   ========================================================================== */
/* Sticky wrapper that holds the KPI cards and toolbar together */
.scrm-dashboard-sticky-wrapper {
  position: fixed !important;
  top: 52px !important;
  left: 0;
  right: 0;
  z-index: 9999 !important;
  background: var(--bg);
  margin-bottom: 0;
  padding: 0.5rem 16px 0.5rem 16px;
  box-shadow: 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  max-width: 1920px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 5px;
  box-sizing: border-box;
  width: 100%;
}

/* Push dashboard content below fixed header */
#scrm-panel-dashboard {
  padding-top: var(--sticky-height, 220px);
}

.scrm-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 0;
  margin-bottom: 1rem;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  background: transparent;
}

/* Collapsed state – merged the two identical rules */
.scrm-cards.collapsed {
  display: none;
  margin-bottom: 0;
}

.scrm-cards.hiding {
  opacity: 0;
  transform: translateY(-10px);
}

.scrm-dashboard-sticky-wrapper .scrm-tbar {
  margin-bottom: 0 !important;
}

/* Individual card styling */
.scrm-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  padding: 10px 10px;
  position: relative;
  transition: all 0.25s ease;
  border: 1px solid var(--primary, #000000);
  display: flex;
  flex-direction: column;
}
.scrm-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
  border-color: var(--primary-100);
}

/* Coloured top accent bars */
.scrm-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  border-radius: 12px 12px 0 0;
}
.scrm-card:nth-child(1)::after {
  background: var(--primary);
}
.scrm-card:nth-child(2)::after {
  background: var(--accent);
}
.scrm-card:nth-child(3)::after {
  background: var(--info);
}
.scrm-card:nth-child(4)::after {
  background: var(--success);
}

/* Fancy gradient border on hover (premium layer) */
.scrm-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 13px;
  background: linear-gradient(
    135deg,
    transparent 0%,
    transparent 60%,
    rgba(15, 118, 110, 0.08) 100%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: -1;
  pointer-events: none;
}
.scrm-card:hover::before {
  opacity: 1;
}

.scrm-card-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1px;
  font-weight: 700;
  color: var(--text-s);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.scrm-card-label span {
  font-weight: 700;
  font-size: 10px;
  color: var(--text-s);
  opacity: 0.8;
}

/* Combo grid (two columns inside a card) */
.scrm-combo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  height: 100%;
  margin-top: 4px;
  align-items: center;
}
.scrm-combo-item {
  text-align: center;
  padding: 12px;
  background: var(--primary-50);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}
.scrm-combo-item::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  background: radial-gradient(
    circle at top right,
    rgba(15, 118, 110, 0.06) 0%,
    transparent 70%
  );
  pointer-events: none;
}
.scrm-combo-label {
  font-size: 10px;
  color: var(--text-s);
  margin-bottom: 6px;
  font-weight: 600;
}
.scrm-combo-item .scrm-card-value {
  font-size: 20px;
  color: #081f7b;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.3px;
}

/* Roadmap mini-blocks */
.scrm-roadmap-grid {
  display: flex;
  gap: 6px;
  margin-top: auto;
}
.scrm-roadmap-item {
  flex: 1;
  background: var(--bg);
  padding: 10px;
  border-radius: 8px;
  text-align: center;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  transition: all 0.25s ease;
}
.scrm-roadmap-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.scrm-roadmap-label {
  font-size: 10px;
  color: var(--text-s);
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
}
.scrm-roadmap-val {
  font-size: 12px;
  font-weight: 700;
}
.scrm-roadmap-val.commit {
  color: var(--primary);
}
.scrm-roadmap-val.upside {
  color: var(--accent);
}
.scrm-roadmap-val.notin {
  color: var(--text-s);
}
.scrm-roadmap-val.commit::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  margin-right: 4px;
  vertical-align: middle;
  animation: scrmPulseRing 2s ease-in-out infinite;
}

/* Card content with left/right split */
.scrm-card-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.scrm-card-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.scrm-card-right {
  display: flex;
  align-items: center;
}

/* Metric rows (small key-value pairs) */
.scrm-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 4px;
  border-bottom: 1px dashed var(--border);
}
.scrm-metric-row:last-child {
  border-bottom: none;
}
.scrm-metric-row .lbl {
  font-size: 11px;
  color: var(--text-s);
  font-weight: 500;
}
.scrm-metric-row .val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

/* Text colour utilities */
.text-success {
  color: var(--success) !important;
}
.text-danger {
  color: var(--danger) !important;
}
.text-primary {
  color: var(--primary) !important;
}

/* Circle gauge */
.scrm-circle {
  width: 75px;
  height: 75px;
  border-radius: 50%;
  background: conic-gradient(#26dc3c var(--pct, 0%), #b80c0c 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: --pct 0.6s ease-out;
  position: relative;
}
.scrm-circle::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    rgba(15, 118, 110, 0.1) 0%,
    rgba(34, 197, 94, 0.15) 50%,
    rgba(15, 118, 110, 0.1) 100%
  );
  z-index: -1;
  animation: scrmSp 12s linear infinite;
}
.scrm-circle-inner {
  width: 50px;
  height: 50px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.pct-val {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.pct-sub {
  font-size: 8px;
  color: var(--text-s);
  margin-top: 2px;
}

.scrm-card-icon {
  position: absolute;
  right: 16px;
  bottom: 16px;
  font-size: 24px;
  opacity: 0.05;
  color: var(--text);
  pointer-events: none;
}

/* Shadow at the bottom of the sticky wrapper */
.scrm-dashboard-sticky-wrapper::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 5%;
  right: 5%;
  height: 12px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.04), transparent);
  pointer-events: none;
  border-radius: 0 0 50% 50%;
}

/* ==========================================================================
   7. FILTERS & FORM CONTROLS
   ========================================================================== */
.scrm-fg {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 110px;
}
.scrm-fg.scrm-fg-sm {
  flex: 1;
  min-width: 120px;
}
.scrm-fg.scrm-fg-md {
  min-width: 140px;
}
.scrm-fg label {
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  text-align: center;
}

.scrm-fg select,
.scrm-fg input[type="text"] {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: #000000;
  font-size: 13px !important;
  min-width: 110px;
  padding: 7px 28px 7px 10px;
  transition: var(--tr);
}

.scrm-fg select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-position: right 8px center;
  background-repeat: no-repeat;
  background-size: 12px;
  cursor: pointer;
}

.scrm-fg select:focus,
.scrm-fg input[type="text"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
  outline: 0;
}

.scrm-fg-btn {
  display: flex;
  flex-shrink: 0;
  flex-direction: column;
  justify-content: flex-end;
  min-width: auto;
  padding-top: 19px;
}

.scrm-btn-icon {
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-s);
  cursor: pointer;
  display: inline-flex;
  font-size: 12px;
  height: 32px;
  width: 32px;
  justify-content: center;
  padding: 0;
  transition: var(--tr);
}
.scrm-btn-icon:hover {
  border-color: var(--danger);
  background: var(--danger-light);
  color: var(--danger);
}
.scrm-btn-icon i {
  pointer-events: none;
}

/* ==========================================================================
   8. CUSTOM MULTISELECT
   ========================================================================== */
.scrm-ms {
  display: inline-block;
  min-width: 120px;
  position: relative;
  width: 100%;
  z-index: 10;
}

.scrm-ms-btn {
  background: var(--card);
  border-radius: var(--radius-sm);
  color: #000000;
  cursor: pointer;
  font-size: 14px;
  overflow: hidden;
  padding: 11px 28px 11px 10px;
  position: relative;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
  border: 1px solid var(--border); /* added from premium layer */
  transition: all 0.2s ease;
}
.scrm-ms-btn i {
  color: var(--text-s);
  font-size: 10px;
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
}

.scrm-ms-dd {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  display: none;
  max-height: 240px;
  min-width: 100%;
  overflow-y: auto;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: max-content;
  z-index: 10001;
  transform-origin: top center;
  transform: scaleY(0.92) translateY(-4px);
  opacity: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.scrm-ms.open .scrm-ms-dd {
  display: block;
  transform: scaleY(1) translateY(0);
  opacity: 1;
}

.scrm-ms.open .scrm-ms-btn {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.scrm-ms-actions {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 8px 10px;
  position: sticky;
  top: 0;
  z-index: 2;
}
.scrm-ms-search {
  flex: 1;
  min-width: 100px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 12px;
}
.scrm-ms-actions button {
  flex-shrink: 0;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}
.scrm-ms-actions button:hover {
  background: #f1f5f9 !important; /* Neutral grey instead of teal */
}

.scrm-ms-option {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 8px;
  padding: 6px 10px;
  font-size: 13px;
  transition: var(--tr);
}
.scrm-ms-option:hover {
  background: #f1f5f9 !important; /* Changed from primary-50 to neutral grey */
}
.scrm-ms-option input[type="checkbox"] {
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
  height: 14px;
  width: 14px;
  margin: 0;
}
.scrm-ms-option label {
  cursor: pointer;
  flex: 1;
  font-weight: 500;
  margin: 0;
  color: rgb(0, 0, 0);
}

/* Checkbox styling (premium) */
.scrm-ms-option input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-radius: 4px;
  background: #fff;
  transition: all 0.2s ease;
}
.scrm-ms-option input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}
.scrm-ms-option input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 0px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  animation: scrmFadeUp 0.2s ease forwards;
}
.scrm-ms-option:hover input[type="checkbox"] {
  border-color: var(--primary-light);
}

.scrm-ms-count {
  accent-color: var(--primary);
  background: var(--primary);
  border-radius: 10px;
  color: #fff;
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  margin-left: 4px;
  padding: 1px 6px;
  vertical-align: middle;
}

/* ==========================================================================
   9. CHARTS & DATA VISUALIZATION
   ========================================================================== */
.scrm-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 15px;
  margin-bottom: 5px;
}

.scrm-chart-box {
  background: #fff;
  border-radius: 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  padding: 10px 10px;
  border: 1px solid #f6f8fb;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.scrm-chart-box:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  border-color: #e2e8f0;
}
.scrm-chart-box h3 {
  font-size: 14px;
  font-weight: 700;
  color: #475569;
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}
.scrm-chart-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(15, 118, 110, 0.2) 30%,
    rgba(15, 118, 110, 0.3) 50%,
    rgba(15, 118, 110, 0.2) 70%,
    transparent 100%
  );
}

/* ==========================================================================
   10. TABLES – GLOBAL & SCROLLABLE AREAS
   ========================================================================== */
.scrm-twrap {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 0 auto 20px auto;
  overflow: hidden;
  overflow-x: hidden !important;
  max-width: 100%;
  width: 100%;
}

.scrm-twrap-full {
  width: 100%;
}

.scrm-tbar {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: 5px 5px;
  background: var(
    --wp--preset--color--tertiary
  ); /* WordPress variable – consider a fallback */
}

.scrm-twrap table,
.scrm-scrollable-area table {
  width: 100%;
  min-width: 100%;
  table-layout: auto;
  border-collapse: collapse;
}

.scrm-twrap th {
  color: #ffffff !important;
  background: #1e3a8a !important;
  border-bottom: 1px solid #3b82f6;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 8px 5px;
  position: relative;
  text-align: left;
  text-transform: uppercase;
  user-select: none;
  white-space: nowrap;
}
.scrm-twrap th:hover {
  background: #2563eb !important;
  color: #ffffff !important; /* kept the original two‑line hover */
}
.scrm-twrap th::after {
  content: "⇅";
  color: #cbd5e1 !important;
  font-size: 10px;
  opacity: 0.5;
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  transition: var(--tr);
}
.scrm-twrap th.sort-asc::after {
  content: "▲";
  color: #ffffff !important;
  opacity: 1;
}
.scrm-twrap th.sort-desc::after {
  content: "▼";
  color: #ffffff !important;
  opacity: 1;
}

.scrm-twrap td {
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.4;
  vertical-align: middle;
}

.scrm-twrap tbody tr:hover {
  background: var(--primary-50);
}

.scrm-twrap tbody tr:last-child td {
  border-bottom: 0;
}

.scrm-twrap tfoot td {
  background: var(--primary-50);
  border-top: 2px solid var(--border);
  font-weight: 700;
  padding: 12px 16px;
  position: relative;
  overflow: hidden;
}
.scrm-twrap tfoot td::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary);
  border-radius: 0 2px 2px 0;
}

/* Deal age highlighting */
.scrm-twrap tbody tr.scrm-row-stale {
  background-color: rgba(254, 243, 199, 0.4) !important;
  border-left: 3px solid #f59e0b !important;
}
.scrm-twrap tbody tr.scrm-row-stale:hover {
  background-color: rgba(253, 230, 138, 0.6) !important;
}
.scrm-twrap tbody tr.scrm-row-critical {
  background-color: rgba(254, 226, 226, 0.4) !important;
  border-left: 3px solid #ef4444 !important;
}
.scrm-twrap tbody tr.scrm-row-critical:hover {
  background-color: rgba(254, 202, 202, 0.6) !important;
}

/* Themed row borders (from global scroll section) */
.scrm-twrap tbody tr {
  border-bottom: 1px solid #787878 !important;
}
.scrm-twrap tbody tr:hover {
  border-bottom-color: #e2e8f0 !important;
}
.scrm-twrap tbody tr td:first-child {
  border-left: 2px solid transparent;
}
.scrm-twrap tbody tr:hover td:first-child {
  border-left-color: var(--primary-light);
}

/* Column width classes */
.scrm-col-actions {
  width: 100px;
  min-width: 100px;
  max-width: 100px;
}
.scrm-col-oppnum {
  width: 100px;
  min-width: 100px;
}
.scrm-col-amount {
  width: 90px;
  min-width: 100px;
  max-width: 100px;
}
.scrm-col-close {
  width: 100px;
  min-width: 90px;
  max-width: 110px;
}
.scrm-col-stage {
  width: 90px;
}
.scrm-col-roadmap {
  width: 100px;
}

/* Find these in your CSS and update the values */
.scrm-col-name {
  width: 165px;
  min-width: 150px;
  max-width: 170px;
}

.scrm-col-contact {
  width: 100px;
  min-width: 90px;
  max-width: 120px;
}

.scrm-col-customer {
  width: 120px;
  min-width: 110px;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.scrm-col-manager {
  width: 130px;
  min-width: 120px;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scrm-col-industry {
  width: 120px;
  min-width: 110px;
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.scrm-col-country {
  width: 90px;
  min-width: 90px;
}
.scrm-col-role {
  width: 110px;
  min-width: 90px;
}
.scrm-col-phone {
  width: 100px;
  min-width: 90px;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.scrm-col-email {
  width: 100px;
  min-width: 90px;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.scrm-col-website {
  width: 120px;
  min-width: 110px;
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.scrm-col-source {
  width: 90px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scrm-col-product {
  width: 160px;
  min-width: 150px;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.scrm-col-address {
  width: 130px;
  min-width: 120px;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scrm-table {
  table-layout: auto !important;
  width: 100%;
}

/* Sticky headers for scrollable areas */
.scrm-scrollable-area {
  max-height: 76vh;
  overflow-y: auto;
  margin: auto;
  max-width: 100%;
  width: 100%;
  contain: layout style !important;
  overflow-anchor: auto !important;
}
.scrm-scrollable-area thead tr th {
  position: sticky;
  top: 0;
  background: #161414 !important;
  color: #ffffff !important;
  z-index: 5;
}

/* ==========================================================================
   11. ACTION BUTTONS (Tables)
   ========================================================================== */
.scrm-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  width: 100%;
  min-width: 80px;
  padding: 5px 0;
}
.scrm-actions-grid .scrm-ba {
  width: 100%;
  height: 27px;
  justify-self: center;
}

.scrm-ba {
  align-items: center;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  height: 27px;
  width: 27px;
  justify-content: center;
  padding: 0;
  transition: var(--tr);
  flex-shrink: 0;
  line-height: 1;
}
.scrm-ba i {
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.scrm-ba:hover i {
  transform: scale(1.2);
}
.scrm-ba:active i {
  transform: scale(0.9);
}

.scrm-bav {
  background: #dbeafe;
  color: #2563eb;
}
.scrm-bav:hover {
  background: #bfdbfe;
}
.scrm-bae {
  background: #d1fae5;
  color: #059669;
}
.scrm-bae:hover {
  background: #a7f3d0;
}
.scrm-bad {
  background: #fee2e2;
  color: #dc2626;
}
.scrm-bad:hover {
  background: #fecaca;
}
.scrm-bai {
  background: #f3e8ff;
  color: #7e22ce;
}
.scrm-bai:hover {
  background: #e9d5ff;
}

/* ==========================================================================
   12. CUSTOM CELL CONTENT
   ========================================================================== */
.scrm-opp-desc {
  line-height: 1.4;
}
.scrm-opp-desc .opp-prod-type {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 2px;
  color: var(--text);
}
.scrm-opp-desc .opp-desc-text {
  display: block;
  font-size: 11px;
  color: var(--text-s);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.scrm-opp-desc .opp-line-items {
  display: block;
  font-size: 10px;
  color: var(--text-s);
  opacity: 0.8;
  margin-top: 2px;
  padding-top: 4px;
  position: relative;
}
.scrm-opp-desc .opp-line-items::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 16px;
  height: 1px;
  background: var(--border);
}

.scrm-cust-address {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  max-height: 2.8em;
  word-break: break-word;
  white-space: normal !important;
  font-size: 12px;
}

.scrm-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5;
  max-height: 3em;
  word-break: break-word;
  white-space: normal !important;
}
.scrm-truncate-2 small {
  display: inline;
  font-size: 11px;
  color: var(--text-s);
  line-height: 1.3;
}

/* ==========================================================================
   13. BADGES & STATUS LABELS
   ========================================================================== */
.scrm-badge {
  border-radius: 5px;
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  white-space: nowrap;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.06);
  letter-spacing: 0.2px;
}
.scrm-twrap td[data-col="stage"] .scrm-badge {
  font-size: 11.5px !important;
}

.scrm-b-prospecting {
  background: #dbeafe;
  color: #1d4ed8;
}
.scrm-b-qualification {
  background: #e0e7ff;
  color: #4338ca;
}
.scrm-b-proposal {
  background: #fef3c7;
  color: #92400e;
}
.scrm-b-negotiation {
  background: #ffedd5;
  color: #c2410c;
}
.scrm-b-invoicing {
  background: #f3e8ff;
  color: #7e22ce;
}
.scrm-b-closed-won {
  background: #dcfce7;
  color: #166534;
}
.scrm-b-closed-lost {
  background: #fee2e2;
  color: #991b1b;
}
.scrm-b-commit {
  background: #d1fae5;
  color: #065f46;
}
.scrm-b-upside {
  background: #fef9c3;
  color: #854d0e;
}
.scrm-b-not-in-roadmap {
  background: #f3f4f6;
  color: #374151;
}

/* Hover effects for roadmap badges */
.scrm-b-commit:hover,
.scrm-b-upside:hover,
.scrm-b-not-in-roadmap:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

/* ==========================================================================
   14. BUTTONS & LOADING STATES
   ========================================================================== */
.scrm-btn {
  align-items: center;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  font-size: 12px;
  font-weight: 600;
  gap: 8px;
  padding: 9px 20px;
  transition: var(--tr);
  white-space: nowrap;
}

.scrm-btn-p {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  color: #fff;
  position: relative;
  overflow: hidden;
}
.scrm-btn-p:hover {
  background: var(--primary-dark);
  box-shadow: var(--shadow-md);
}
.scrm-btn-p::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.12),
    transparent
  );
  transition: left 0.5s ease;
  pointer-events: none;
}
.scrm-btn-p:hover::before {
  left: 120%;
}

.scrm-btn-a {
  background: linear-gradient(135deg, var(--accent) 0%, #d97706 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
  transition: all 0.25s ease;
}
.scrm-btn-a:hover {
  background: #d97706;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
  transform: translateY(-1px);
}

.scrm-btn-d {
  background: var(--danger);
  color: #fff;
}
.scrm-btn-d:hover {
  background: #dc2626;
}

.scrm-btn-g {
  background: #2c3e50;
  border: 1px solid var(--border);
  color: #fff;
  position: relative;
  overflow: hidden;
  z-index: 1;
}
.scrm-btn-g::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #f1f5f9 !important; /* Neutral grey */
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}
.scrm-btn-g:hover {
  background: var(--bg);
  border-color: var(--text-s);
  color: #334155 !important; /* Darker slate on hover */
}
.scrm-btn-g:hover::before {
  transform: scaleX(1);
}
.scrm-btn-g:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

.scrm-btn-s {
  font-size: 13px;
  padding: 6px 14px;
}

.scrm-btn.loading {
  opacity: 0.8;
  pointer-events: none;
  position: relative;
}
.scrm-btn.loading::after {
  content: "";
  animation: scrmSp 0.6s linear infinite;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  height: 16px;
  width: 16px;
  margin: -8px 0 0 -8px;
  position: absolute;
  top: 50%;
  left: 50%;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.2));
}

.scrm-btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: auto;
}

/* Focus visible for accessibility */
.scrm-tab:focus-visible,
.scrm-btn:focus-visible,
.scrm-subtab:focus-visible,
.scrm-cust-subtab:focus-visible,
.scrm-ba:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   15. MODALS, DIALOGS & OVERLAYS
   ========================================================================== */
.scrm-mo {
  align-items: center;
  backdrop-filter: blur(8px) saturate(1.2);
  -webkit-backdrop-filter: blur(8px) saturate(1.2);
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  inset: 0;
  justify-content: center;
  opacity: 0;
  padding: 12px;
  position: fixed;
  transition:
    opacity 0.25s,
    visibility 0.25s;
  visibility: hidden;
  z-index: 100000;
}
.scrm-mo.open {
  opacity: 1;
  visibility: visible;
}

.scrm-md {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  max-width: 560px;
  overflow: hidden;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.scrm-mo.open .scrm-md {
  transform: scale(1) translateY(0);
}

.scrm-mdl {
  max-width: 680px;
}
.scrm-mdxl {
  max-width: 950px;
}

/* Modal header */
.scrm-mh {
  align-items: center;
  background: linear-gradient(135deg, #121213 0%, #4866c7 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  display: flex;
  flex-shrink: 0;
  justify-content: space-between;
  padding: 10px 20px;
  position: relative; /* for the ::after line */
}
.scrm-mh h3 {
  color: #ffffff;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
.scrm-mh .scrm-mx {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.scrm-mh .scrm-mx:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}
.scrm-mh .scrm-mx i {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.scrm-mh .scrm-mx:hover i {
  transform: rotate(90deg);
}
.scrm-mh::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.15) 20%,
    rgba(255, 255, 255, 0.25) 50%,
    rgba(255, 255, 255, 0.15) 80%,
    transparent
  );
}

/* Modal body */
.scrm-mb {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 0;
}
.scrm-mf {
  background: var(--card);
  border-top: 1px solid var(--border);
  display: flex;
  flex-shrink: 0;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px;
}

/* Sleek scrollbars for modal bodies */
.scrm-mb::-webkit-scrollbar,
.scrm-cust-view-details::-webkit-scrollbar,
.scrm-cust-opps-list::-webkit-scrollbar,
.scrm-opp-modal-body::-webkit-scrollbar {
  width: 6px;
}
.scrm-mb::-webkit-scrollbar-track,
.scrm-cust-view-details::-webkit-scrollbar-track,
.scrm-cust-opps-list::-webkit-scrollbar-track,
.scrm-opp-modal-body::-webkit-scrollbar-track {
  background: transparent;
}
.scrm-mb::-webkit-scrollbar-thumb,
.scrm-cust-view-details::-webkit-scrollbar-thumb,
.scrm-cust-opps-list::-webkit-scrollbar-thumb,
.scrm-opp-modal-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}
.scrm-mb::-webkit-scrollbar-thumb:hover,
.scrm-cust-view-details::-webkit-scrollbar-thumb:hover,
.scrm-cust-opps-list::-webkit-scrollbar-thumb:hover,
.scrm-opp-modal-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Fade mask at bottom of scrollable modal content */
.scrm-mb,
.scrm-cust-view-details,
.scrm-cust-opps-list,
.scrm-opp-modal-body {
  mask-image: linear-gradient(to bottom, #000 95%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 95%, transparent 100%);
}

/* ==========================================================================
   16. FORM FIELDS & INPUTS (Modern SaaS Upgrade)
   ========================================================================== */
.scrm-fld {
  margin-bottom: 16px;
  position: relative;
}
.scrm-fld label {
  color: #64748b;
  display: flex;
  align-items: center;
  font-size: 11px !important;
  font-weight: 700 !important;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  position: relative;
  padding-left: 14px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.scrm-fld label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 14px;
  background: linear-gradient(
    180deg,
    var(--primary) 0%,
    var(--primary-light) 100%
  );
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(15, 118, 110, 0.15);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.scrm-fld:focus-within label {
  color: var(--primary);
  transform: translateX(2px);
}
.scrm-fld:focus-within label::before {
  height: 18px;
  background: linear-gradient(
    180deg,
    var(--primary-light) 0%,
    var(--accent) 100%
  );
  box-shadow: 0 4px 8px rgba(15, 118, 110, 0.25);
}
.scrm-fld label .rq {
  color: var(--danger);
  font-size: 14px;
  font-weight: 800;
  margin-left: 4px;
  line-height: 1;
  vertical-align: middle;
}

.scrm-fld input,
.scrm-fld select,
.scrm-fld textarea {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px !important;
  padding: 10px 12px;
  transition: var(--tr);
  width: 100%;
}
.scrm-fld input:focus,
.scrm-fld select:focus,
.scrm-fld textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.08);
  outline: 0;
  background: #fff;
}
.scrm-fld input::placeholder,
.scrm-fld textarea::placeholder {
  color: #b0bec5;
  font-style: italic;
}

/* Checkbox specific */
.scrm-fld input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin: 0;
  transition: none !important;
}
.scrm-fld input[type="checkbox"]:checked {
  transition: none !important;
}

/* Form row grids */
.scrm-fr {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.scrm-fr-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.scrm-st {
  border-bottom: 2px solid var(--primary-100);
  font-size: 13px;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  text-transform: uppercase;
  position: relative;
  padding-left: 14px;
}
.scrm-st::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 6px;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(
    180deg,
    var(--primary) 0%,
    var(--primary-light) 100%
  );
}

/* Premium table (used in modals) */
.scrm-pt {
  border-collapse: collapse;
  width: 100%;
}
.scrm-pt th {
  background: var(--primary-50);
  border-bottom: 2px solid var(--border);
  color: var(--text-s);
  font-size: 11px;
  font-weight: 700;
  padding: 10px 16px !important;
  text-align: left;
  text-transform: capitalize;
}
.scrm-pt td {
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  padding: 5px 2px;
  vertical-align: middle;
}
.scrm-pt tr:last-child td {
  border-bottom: 0;
}

.scrm-cb {
  accent-color: var(--primary);
  cursor: pointer;
  height: 18px;
  width: 18px;
}

/* ==========================================================================
   17. SPECIALIZED BUSINESS VIEWS (Opportunities, Invoicing, Customer)
   ========================================================================== */
/* Opportunity modal body */
.scrm-opp-modal-body {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 14px;
  max-height: 70vh;
  overflow-y: auto;
  padding: 12px 20px 16px;
  scrollbar-width: thin;
}
.scrm-opp-modal-body .scrm-fld {
  margin-bottom: 0;
}
.scrm-opp-modal-body .scrm-st {
  grid-column: 1 / -1;
  margin: 10px 0 6px;
  padding-bottom: 4px;
}

.scrm-opp-modal-body .line-items-wrapper {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  grid-column: 1 / -1;
  max-height: 180px;
  overflow-y: auto;
  padding: 10px;
}
.scrm-opp-modal-body .scrm-line-items {
  background: transparent;
  border: none;
  margin: 0;
  max-height: none;
  overflow: visible;
  padding: 0;
}
.scrm-opp-modal-body .scrm-line-item-row {
  grid-template-columns: 2fr 65px 128px 113px auto;
  gap: 8px;
  margin-bottom: 6px;
  padding: 6px;
}

.scrm-opp-modal-footer {
  border-top: 1px solid var(--border);
  display: flex;
  grid-column: 1 / -1;
  gap: 10px;
  justify-content: flex-end;
  margin-bottom: 10px;
  margin-top: 6px;
  padding: 12px;
}

.scrm-opp-full {
  grid-column: 1 / -1;
}

/* Line items inside opp modal */
.scrm-line-items {
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-height: 300px;
  overflow-y: auto;
  padding: 12px;
  margin-bottom: 12px;
}
.scrm-line-item-row {
  align-items: end;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  display: grid;
  grid-template-columns: 2fr 80px 165px 150px auto;
  gap: 8px;
  margin-bottom: 8px;
  padding: 8px;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}
.scrm-line-item-row:hover {
  border-left-color: var(--primary-light);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.scrm-line-item-row .scrm-fld {
  margin-bottom: 0;
}

.scrm-line-item-total {
  background: #f8fafc;
  font-weight: 600;
  text-align: right;
}

.scrm-line-items-summary {
  background: var(--primary-50);
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-top: 12px;
  padding: 10px 14px;
}
.scrm-line-items-summary .summary-row {
  display: flex;
  justify-content: space-between;
  margin: 4px 0;
}
.scrm-line-items-summary .summary-total {
  border-top: 1px solid var(--border);
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
  margin-top: 8px;
  padding-top: 8px;
}

/* Section wrappers */
.scrm-ss {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
}
#scrm-panel-settings .scrm-ss {
  overflow: visible !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  margin-bottom: 0 !important;
  border: none !important;
}

.scrm-sh {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  padding: 16px 20px;
}
.scrm-sb {
  padding: 5px 5px;
}

/* Lists */
.scrm-li {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
}
.scrm-li:last-child {
  border-bottom: 0;
}
.scrm-li-n {
  font-size: 13px;
  font-weight: 500;
}
.scrm-li-a {
  display: flex;
  gap: 6px;
}

/* Customer view */
.scrm-cust-view-header {
  align-items: center;
  background: linear-gradient(to right, var(--primary-50), #ffffff);
  border-bottom: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  display: flex;
  justify-content: space-between;
  padding: 16px 20px;
  position: relative;
  overflow: hidden;
}
.scrm-cust-view-header::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(15, 118, 110, 0.05) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.scrm-cust-edit-fields {
  padding: 14px 16px;
}
.scrm-cust-edit-fields .scrm-fld {
  margin-bottom: 10px;
}

.scrm-cust-view-details {
  max-height: 60vh;
  overflow-y: auto;
  padding: 2px 15px;
}
.scrm-cust-opps-list {
  max-height: 50vh;
  overflow-y: auto;
  position: relative;
  padding: 2px 15px;
}
.scrm-cust-opps-list table {
  width: 100%;
  border-collapse: collapse;
}
.scrm-cust-opps-list thead th {
  position: sticky;
  top: 0;
  background: #1e3a8a;
  color: #ffffff;
  z-index: 10;
  padding: 10px 12px;
  white-space: nowrap;
}
.scrm-cust-opps-list thead th::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
}

/* Premium nested opportunities table */
.scrm-cust-opp-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 13px;
  background: var(--card);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.scrm-cust-opp-table thead th {
  background: #f8fafc;
  color: var(--text-s);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  border-bottom: 2px solid var(--border);
  text-align: left;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 5;
}
.scrm-cust-opp-table tbody td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.scrm-cust-opp-table tbody tr {
  transition: background 0.2s ease;
}
.scrm-cust-opp-table tbody tr:hover {
  background: var(--primary-50);
}
.scrm-cust-opp-table tbody tr:last-child td {
  border-bottom: none;
}
.scrm-cust-opp-table td.scrm-amt {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--primary-dark);
}
.scrm-cust-opp-table th:last-child,
.scrm-cust-opp-table td:last-child {
  text-align: center;
}

/* Key-value pairs */
.scrm-vr {
  border-bottom: 1px dashed var(--border);
  display: flex;
  padding: 12px 0;
  align-items: center;
  transition:
    background 0.2s ease,
    padding-left 0.2s ease;
  border-radius: 4px;
  padding-left: 8px;
  padding-right: 8px;
}
.scrm-vr:last-child {
  border-bottom: 0;
}
.scrm-vl {
  color: var(--text-s);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  width: 140px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.scrm-vv {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  flex: 1;
}
.scrm-vv a,
.scrm-vv .clickable-cust {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}
.scrm-vv a:hover,
.scrm-vv .clickable-cust:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}
.scrm-vr:hover {
  background: var(--primary-50);
  padding-left: 12px;
}

/* Customer modal tabs */
.scrm-cust-tabs {
  display: flex;
  gap: 8px;
  background: var(--card);
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  margin: 0;
}
.scrm-cust-subtab {
  background: transparent;
  border: none;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-s);
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  position: relative;
  border-radius: 6px 6px 0 0;
}
.scrm-cust-subtab:hover {
  color: var(--primary);
  background: rgba(15, 118, 110, 0.05);
}
.scrm-cust-subtab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
  background: transparent;
}
.scrm-cust-subtab.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}

/* ==========================================================================
   18. INVOICE PREVIEW & PRINT STYLES
   ========================================================================== */
.scrm-invoice-preview {
  background: #fff;
  color: #000;
  font-family: Georgia, serif;
  font-size: 13px;
  max-height: 65vh;
  overflow-y: auto;
  padding: 16px;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(0, 0, 0, 0.03),
    inset 0 0 80px rgba(0, 0, 0, 0.01);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.scrm-invoice-header {
  border-bottom: 3px double #0f766e;
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 16px;
}
.scrm-invoice-company h1 {
  color: #0f766e;
  font-size: 20px;
  margin: 0 0 6px 0;
}
.scrm-invoice-company p {
  color: #333;
  font-size: 12px;
  margin: 2px 0;
}
.scrm-invoice-meta {
  text-align: right;
}
.scrm-invoice-meta h2 {
  color: #0f766e;
  font-size: 18px;
  margin: 0 0 8px 0;
}
.scrm-invoice-meta p {
  font-size: 12px;
  margin: 2px 0;
}
.scrm-invoice-billto {
  margin-bottom: 20px;
}
.scrm-invoice-billto h3 {
  color: #0f766e;
  border-bottom: 1px solid #e2e8f0;
  font-size: 14px;
  margin: 0 0 8px 0;
  padding-bottom: 4px;
}
.scrm-invoice-billto p {
  font-size: 13px;
  margin: 2px 0;
}

.scrm-invoice-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 13px;
  border-top: 2px solid var(--primary);
}
.scrm-invoice-table th,
.scrm-invoice-table td {
  border: none;
  border-bottom: 1px solid #e2e8f0;
  padding: 14px 16px;
  vertical-align: top;
}
.scrm-invoice-table th {
  background: transparent;
  font-weight: 700;
  text-align: left;
  color: var(--text);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--primary);
}
.scrm-invoice-table tfoot td {
  background: #f8fafc;
  border-top: 2px solid var(--text);
  border-bottom: none;
  font-weight: 700;
  padding: 16px;
}
.scrm-invoice-table th:nth-child(2),
.scrm-invoice-table td:nth-child(2) {
  text-align: center;
  width: 70px;
}
.scrm-invoice-table th:nth-child(3),
.scrm-invoice-table td:nth-child(3),
.scrm-invoice-table th:nth-child(4),
.scrm-invoice-table td:nth-child(4) {
  text-align: right;
  width: 100px;
}
.scrm-invoice-table tfoot td {
  background: #f8fafc;
  font-weight: 600;
  border-top: 2px solid #0f766e;
}
.scrm-invoice-table tbody tr:nth-child(even) {
  background: rgba(248, 250, 252, 0.5);
}

.scrm-invoice-notes {
  background: #f8fafc;
  border-radius: 6px;
  color: #475569;
  font-size: 12px;
  padding: 12px;
}
.scrm-invoice-actions {
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
  padding: 12px;
}
.scrm-invoice-actions .scrm-btn {
  font-size: 12px;
  padding: 7px 14px;
}

/* ==========================================================================
   19. LOGIN SCREEN
   ========================================================================== */
.scrm-login-wrap {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 20px auto;
  min-height: 520px;
  max-width: 1000px;
  overflow: hidden;
}

.scrm-login-visual {
  align-items: center;
  background: linear-gradient(135deg, #0f766e 0%, #042f2e 100%);
  display: flex;
  justify-content: center;
  padding: 40px;
  position: relative;
  overflow: hidden;
}
.scrm-login-visual::before {
  content: "";
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  height: 300px;
  width: 300px;
  position: absolute;
  top: -50px;
  left: -50px;
}
.scrm-login-visual::after {
  content: "";
  background: rgba(255, 255, 255, 0.04);
  border-radius: 50%;
  height: 400px;
  width: 400px;
  position: absolute;
  bottom: -100px;
  right: -100px;
}
.scrm-login-visual img {
  border-radius: 8px;
  filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.25));
  opacity: 0.85;
  max-width: 400px;
  width: 100%;
}

.scrm-login-form {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 40px;
}
.scrm-login-form p {
  color: var(--text-s);
  font-size: 14px;
  margin-bottom: 28px;
}
.scrm-login-form form {
  max-width: 300px;
  width: 100%;
  position: relative;
}
.scrm-login-form input {
  background: #f8fafc;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 14px;
  padding: 12px 14px;
  transition: var(--tr);
  width: 100%;
}
.scrm-login-form input:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}
.scrm-login-form input::placeholder {
  color: #94a3b8;
  transition: var(--tr);
}
.scrm-login-form input:focus::placeholder {
  transform: translateX(4px);
  color: #cbd5e1;
}
.scrm-login-form .scrm-btn-p {
  font-size: 13px;
  margin-top: 4px;
  padding: 12px;
  width: 100%;
  justify-content: center;
}
.scrm-login-footer {
  color: var(--text-s);
  font-size: 13px;
  margin-top: 18px;
  text-align: center;
}
.scrm-login-footer a {
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
}

/* ==========================================================================
   20. ALERTS, TOASTS & NOTIFICATIONS (Consolidated Premium Version)
   ========================================================================== */
/* Container – fixed top‑center */
#scrm-toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

/* Base toast item */
.scrm-toast-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 14px;
  box-shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  min-width: 320px;
  max-width: 420px;
  pointer-events: auto;
  animation: scrmToastSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.scrm-toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 16px;
  color: #ffffff;
}

.scrm-toast-msg {
  flex: 1;
  font-size: 13px;
  line-height: 1.5; /* Ensures multi-line text is readable */
  word-break: break-word; /* Prevents long words from overflowing */
  max-width: 350px; /* Gives it enough room to breathe */
}

.scrm-toast-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.scrm-toast-close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #334155;
  transform: scale(1.1);
}

/* Variant colours */
.scrm-toast-success {
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
  border: 1px solid #bbf7d0;
}
.scrm-toast-success .scrm-toast-icon {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35);
}
.scrm-toast-success .scrm-toast-msg {
  color: #166534;
}

.scrm-toast-error {
  background: linear-gradient(135deg, #fff1f2 0%, #ffffff 100%);
  border: 1px solid #fecdd3;
}
.scrm-toast-error .scrm-toast-icon {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}
.scrm-toast-error .scrm-toast-msg {
  color: #991b1b;
}

.scrm-toast-info {
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
  border: 1px solid #bfdbfe;
}
.scrm-toast-info .scrm-toast-icon {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}
.scrm-toast-info .scrm-toast-msg {
  color: #1e40af;
}

.scrm-toast-warning {
  background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
  border: 1px solid #fde68a;
}
.scrm-toast-warning .scrm-toast-icon {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}
.scrm-toast-warning .scrm-toast-msg {
  color: #92400e;
}

/* Exit animation */
.scrm-toast-exit {
  animation: scrmToastSlideOut 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Keyframes */
@keyframes scrmToastSlideIn {
  from {
    transform: translateX(100%) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}
@keyframes scrmToastSlideOut {
  from {
    transform: translateX(0) scale(1);
    opacity: 1;
    max-height: 100px;
    margin-bottom: 12px;
  }
  to {
    transform: translateX(100%) scale(0.9);
    opacity: 0;
    max-height: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
}

/* Confirmation overlay */
.scrm-co {
  align-items: center;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  inset: 0;
  justify-content: center;
  opacity: 0;
  padding: 16px;
  position: fixed;
  transition:
    opacity 0.2s,
    visibility 0.2s;
  visibility: hidden;
  z-index: 150000;
}
.scrm-co.open {
  opacity: 1;
  visibility: visible;
}
.scrm-cb2 {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-width: 400px;
  padding: 28px;
  text-align: center;
  width: 100%;
  animation: scrmFadeUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.scrm-cb2 p {
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 24px;
}
.scrm-cb2 .scrm-cbf {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* Empty & loading states */
.scrm-empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-s);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  margin: 20px 0;
}
.scrm-empty i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: linear-gradient(
    135deg,
    var(--primary-100) 0%,
    var(--primary-50) 100%
  );
  color: var(--primary);
  font-size: 36px;
  margin-bottom: 20px;
  border-radius: 50%;
  opacity: 1;
  box-shadow: 0 8px 16px rgba(15, 118, 110, 0.1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.scrm-empty h3 {
  color: var(--text);
  font-size: 18px;
  margin-bottom: 8px;
}
.scrm-empty p {
  font-size: 14px;
  max-width: 320px;
  margin: 0 auto 20px;
  line-height: 1.5;
}

.scrm-loading {
  padding: 40px;
  text-align: center;
  color: var(--text-s);
}
.scrm-spin {
  animation: scrmSp 0.7s linear infinite;
  border: 3px solid var(--primary-100);
  border-top-color: var(--primary);
  border-radius: 50%;
  display: inline-block;
  height: 32px;
  width: 32px;
  filter: drop-shadow(0 0 3px rgba(15, 118, 110, 0.15));
}

/* ==========================================================================
   21. SETTINGS PANEL – VERTICAL SIDEBAR NAVIGATION
   ========================================================================== */
/* Layout */
#scrm-panel-settings .scrm-settings-layout {
  display: flex;
  gap: 0;
  min-height: 75vh;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

/* The subtabs container – fixed as a sidebar, sticky on scroll */
#scrm-panel-settings .scrm-subtabs {
  width: 220px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  overflow-y: auto;
  max-height: 90vh;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-light) transparent;
  /* Sticky behavior to follow the viewport */
  position: sticky !important;
  top: 64px !important;
  z-index: 15 !important;
  margin-bottom: 0;
  padding-bottom: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  background: black;
}
#scrm-panel-settings .scrm-subtabs::-webkit-scrollbar {
  width: 6px;
}
#scrm-panel-settings .scrm-subtabs::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 3px;
}

/* Individual subtab button */
#scrm-panel-settings .scrm-subtab {
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  color: var(--primary-light) !important;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  padding: 11px 10px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  position: relative;
  outline: none;
  margin-left: 10px;
}
#scrm-panel-settings .scrm-subtab:hover {
  background: linear-gradient(
    135deg,
    rgba(15, 118, 110, 0.06) 0%,
    rgba(15, 118, 110, 0.02) 100%
  );
  color: var(--primary);
  transform: translateX(2px);
  border-left-color: rgba(15, 118, 110, 0.3);
}
#scrm-panel-settings .scrm-subtab.active {
  background: var(--card);
  color: var(--primary);
  font-weight: 700;
  border-left-color: var(--primary);
  box-shadow:
    0 2px 6px rgba(15, 118, 110, 0.12),
    inset 2px 0 0 var(--primary);
  transform: translateX(0);
}
#scrm-panel-settings .scrm-subtab i {
  font-size: 14px;
  width: 18px;
  text-align: center;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
  opacity: 0.85;
}
#scrm-panel-settings .scrm-subtab:hover i,
#scrm-panel-settings .scrm-subtab.active i {
  transform: scale(1.05);
  opacity: 1;
}
#scrm-panel-settings .scrm-subtab::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 4px;
  bottom: 4px;
  width: 4px;
  border-radius: 0 3px 3px 0;
  background: var(--primary);
  transform: scaleY(0);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
#scrm-panel-settings .scrm-subtab.active::before {
  transform: scaleY(1);
}

/* Data management tab (danger) */
#scrm-panel-settings .scrm-subtab[data-subtab="data-management"] {
  background: #f5bcbc !important;
  color: #991b1b !important;
  border-radius: 6px 6px 0 0;
}
#scrm-panel-settings .scrm-subtab[data-subtab="data-management"]:hover {
  background: #f4aeae !important;
  color: #7f1d1d !important;
}
#scrm-panel-settings .scrm-subtab[data-subtab="data-management"].active {
  background: #dc2626 !important;
  color: #ffffff !important;
  border-bottom-color: #ffffff !important;
}

/* Settings content pane */
#scrm-panel-settings .scrm-settings-content {
  flex: 1;
  padding: 4px 10px 10px 4px;
  overflow-y: auto;
  background: var(--card);
  max-height: 90vh;
}
#scrm-panel-settings .scrm-subpanel {
  display: none;
}
#scrm-panel-settings .scrm-subpanel.active {
  display: block;
  animation: fadeSlideIn 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Sticky section header inside settings */
#scrm-panel-settings .scrm-sh {
  position: sticky !important;
  top: 0 !important;
  z-index: 20 !important;
  background: var(--card) !important;
  margin: 0 -24px 20px -24px !important;
  padding: 16px 24px !important;
  box-shadow: 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid var(--border);
}
#scrm-panel-settings .scrm-settings-content::after {
  content: "";
  display: block;
  height: 40px;
}

/* ==========================================================================
   22. MANAGER PERFORMANCE TABLE & PROGRESS BARS
   ========================================================================== */
.scrm-manager-table {
  border-collapse: collapse;
  width: 100%;
  table-layout: auto;
}

.scrm-manager-table thead th {
  font-size: 10px !important;
  letter-spacing: 0.5px;
  padding: 12px 10px !important;
  position: sticky;
  top: 0;
  z-index: 2;
  background: #1e3a8a !important;
  box-shadow: none !important;
  color: rgb(239, 235, 235);
  border: 1px solid #1e3a8a !important;
  border-bottom: 2px solid #2563eb !important;
}
.scrm-manager-table thead th:not(:last-child) {
  border-right: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.scrm-manager-table tbody td {
  padding: 6px 10px !important;
  vertical-align: middle;
  border: 1px solid var(--border) !important;
  border-left: none !important;
}
.scrm-manager-table tbody td:first-child {
  border-left: 1px solid var(--border) !important;
}
.scrm-manager-table tbody tr:not(:last-child) td {
  border-bottom: 1px solid var(--border) !important;
}
.scrm-manager-table tbody tr:last-child td {
  border-bottom: 2px solid var(--primary) !important;
}

.scrm-manager-table tfoot td {
  background: var(--primary-50) !important;
  border: 1px solid var(--primary) !important;
  border-top: 3px solid var(--primary) !important;
  font-weight: 700;
  font-size: 12px;
  padding: 12px 10px !important;
}
.scrm-manager-table tfoot td:not(:last-child) {
  border-right: 1px solid rgba(15, 118, 110, 0.2) !important;
}

/* Rank badges */
.scrm-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  margin-right: 8px;
  vertical-align: middle;
  flex-shrink: 0;
}
.scrm-rank-gold {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #78350f;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
}
.scrm-rank-silver {
  background: linear-gradient(135deg, #d1d5db, #9ca3af);
  color: #374151;
  box-shadow: 0 2px 6px rgba(156, 163, 175, 0.4);
}
.scrm-rank-bronze {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #78350f;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.4);
}
.scrm-rank-num {
  background: var(--bg);
  color: var(--text-s);
  border: 1px solid var(--border);
}

/* Progress bars */
.scrm-bar-cell {
  position: relative;
  min-width: 70px;
}
.scrm-bar-value {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
  white-space: nowrap;
  line-height: 1.2;
}
.scrm-won-amt {
  color: #166534 !important;
  font-weight: 700 !important;
}
.scrm-bar-track {
  width: 100%;
  height: 6px;
  background: #f1f5f9;
  border-radius: 3px;
  overflow: hidden;
}
.scrm-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.scrm-bar-won {
  background: linear-gradient(90deg, #22c55e, #16a34a);
}
.scrm-bar-commit {
  background: linear-gradient(90deg, #3b82f6, #2563eb);
}
.scrm-bar-pct {
  background: linear-gradient(90deg, var(--primary-light), var(--primary));
}
.scrm-bar-upside {
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
}
.scrm-bar-nir {
  background: linear-gradient(90deg, #cbd5e1, #94a3b8);
}

.scrm-manager-table tbody tr:hover {
  background: var(--primary-50) !important;
}
.scrm-manager-table tbody tr:hover .scrm-bar-fill {
  filter: brightness(1.1);
}

/* Animated rows */
.scrm-mgr-row {
  animation: scrmMgrRowIn 0.4s ease forwards;
  opacity: 0;
}
.scrm-mgr-row:nth-child(1) {
  animation-delay: 0.05s;
}
.scrm-mgr-row:nth-child(2) {
  animation-delay: 0.1s;
}
.scrm-mgr-row:nth-child(3) {
  animation-delay: 0.15s;
}
.scrm-mgr-row:nth-child(4) {
  animation-delay: 0.2s;
}
.scrm-mgr-row:nth-child(5) {
  animation-delay: 0.25s;
}
.scrm-mgr-row:nth-child(6) {
  animation-delay: 0.3s;
}
.scrm-mgr-row:nth-child(7) {
  animation-delay: 0.35s;
}
.scrm-mgr-row:nth-child(8) {
  animation-delay: 0.4s;
}
.scrm-mgr-row:nth-child(9) {
  animation-delay: 0.45s;
}
.scrm-mgr-row:nth-child(10) {
  animation-delay: 0.5s;
}

/* Scroll container for manager table */
.scrm-mgr-scroll {
  max-height: 450px;
  overflow-y: auto;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-light) transparent;
  contain: layout style !important;
  overflow-anchor: auto !important;
}
.scrm-mgr-scroll::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
.scrm-mgr-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.scrm-mgr-scroll::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 3px;
}

/* ==========================================================================
   23. SCROLLABLE AREAS & STICKY HEADERS (additional global styles)
   ========================================================================== */
/* Already defined under tables, but these global classes ensure containment */
.scrm-twrap,
.scrm-filters,
.scrm-filters-inline,
.scrm-kanban-board {
  contain: layout style !important;
  overflow-anchor: auto !important;
}

/* ==========================================================================
   24. ANIMATIONS & KEYFRAMES
   ========================================================================== */
@keyframes scrmSI {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes scrmSp {
  to {
    transform: rotate(360deg);
  }
}
@keyframes scrmRowIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes scrmRowPulse {
  0% {
    background: var(--primary-100);
  }
  100% {
    background: transparent;
  }
}
@keyframes scrmMgrRowIn {
  from {
    opacity: 0;
    transform: translateX(-15px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes scrmFlashUpdate {
  0% {
    background-color: rgba(16, 185, 129, 0.25);
  }
  100% {
    background-color: transparent;
  }
}
@keyframes scrmSubtleShimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}
@keyframes scrmFadeUp {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes scrmPulseRing {
  0% {
    transform: scale(0.9);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.3;
  }
  100% {
    transform: scale(0.9);
    opacity: 0.6;
  }
}

/* Row animation classes */
.scrm-row-new {
  animation: scrmRowIn 0.4s ease;
}
.scrm-row-updated {
  animation: scrmFlashUpdate 1.5s ease-out forwards;
  transition: background-color 0.3s ease;
}

/* ==========================================================================
   25. UTILITIES & MISCELLANEOUS
   ========================================================================== */
.scrm-hide-col {
  display: none !important;
}

.scrm-wrap .svg-inline--fa {
  display: inline-block;
  font-size: inherit;
  height: 1em;
  overflow: visible;
  vertical-align: -0.125em;
}

.scrm-ba svg,
.scrm-btn svg,
.scrm-mx svg,
.scrm-card-icon svg {
  pointer-events: none;
}

.scrm-amt {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.scrm-lost-amt {
  color: #dc2626 !important;
  font-weight: 700;
}

#scrm-subpanel-email-templates textarea {
  min-height: 250px !important;
}

/* License badge */
.scrm-license-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  margin-right: 12px;
  background: #f8fafc;
  border: 1px solid #808080;
  letter-spacing: 0.3px;
  gap: 6px;
}
.scrm-license-solo {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #cbd5e1;
}
.scrm-license-solo i {
  color: #64748b;
}
.scrm-license-team {
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  color: #0c4a6e;
  border-color: #7dd3fc;
}
.scrm-license-team i {
  color: #0284c7;
}
.scrm-license-business {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  color: #14532d;
  border-color: #86efac;
}
.scrm-license-business i {
  color: #16a34a;
}
.scrm-license-ultimate {
  background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
  color: #4c1d95;
  border-color: #d8b4fe;
}
.scrm-license-enterprise i {
  color: #9333ea;
}
#scrm-license-badge {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}
#scrm-license-badge:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}
#scrm-license-badge::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 40%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 60%
  );
  animation: scrmSubtleShimmer 4s ease-in-out infinite;
  pointer-events: none;
}

/* Collab list */
.scrm-collab-list {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.scrm-collab-item {
  transition: background 0.2s ease;
}
.scrm-collab-item:hover {
  background: #f8fafc;
}
.scrm-collab-item:last-child {
  border-bottom: none !important;
}
.scrm-collab-item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Premium edit button in modal headers */
.scrm-mh-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: #ffffff;
  background: linear-gradient(135deg, #2e3602 0%, #23087e 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(15, 118, 110, 0.2);
  white-space: nowrap;
  line-height: 1.2;
  letter-spacing: 0.2px;
}
.scrm-mh-edit-btn:hover {
  background: linear-gradient(135deg, #115e59 0%, #0f766e 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15, 118, 110, 0.35);
}
.scrm-mh-edit-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(15, 118, 110, 0.2);
}
.scrm-mh-edit-btn i {
  font-size: 12px;
  opacity: 0.9;
}

/* ==========================================================================
   26. FILTER DRAWER (Right Side Slide-out)
   ========================================================================== */
.scrm-filter-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  z-index: 100000;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}
.scrm-filter-drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.scrm-filter-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 340px;
  max-width: 90vw;
  height: 100vh;
  background: var(--card);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  z-index: 100001;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}
.scrm-filter-drawer.open {
  transform: translateX(0);
}

.scrm-filter-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  color: #fff;
  flex-shrink: 0;
}
.scrm-filter-drawer-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.scrm-filter-drawer-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.scrm-filter-drawer-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.scrm-filter-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.scrm-filter-drawer-body .scrm-fg {
  width: 100%;
  min-width: 100%;
  gap: 6px;
  position: relative;
}
.scrm-filter-drawer-body .scrm-fg label {
  color: var(--text);
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.scrm-filter-drawer-body .scrm-fg select,
.scrm-filter-drawer-body .scrm-fg input[type="text"] {
  width: 100%;
  min-width: 100%;
  background: var(--bg);
  color: var(--text);
}

.scrm-filter-drawer-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  background: var(--card);
  flex-shrink: 0;
}
.scrm-filter-drawer-footer .scrm-btn {
  flex: 1;
  justify-content: center;
}

/* Fix multiselect overlap & badge visibility inside drawer */
.scrm-filter-drawer-body .scrm-ms.open {
  z-index: 9999 !important;
}
.scrm-filter-drawer-body .scrm-ms-dd {
  min-width: 100%;
  max-width: 100%;
  width: 100%;
}
.scrm-filter-drawer-body .scrm-ms-btn {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  overflow: visible !important;
  padding-right: 28px !important;
  border: 1px solid #ecc6c6;
}
.scrm-filter-drawer-body .scrm-ms-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  font-size: 11.5px;
  color: var(--text);
}
.scrm-filter-drawer-body .scrm-ms-count {
  background: var(--primary) !important;
  color: #ffffff !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  padding: 2px 8px !important;
  border-radius: 5px !important;
  flex-shrink: 0;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  line-height: 1.4;
  box-shadow: 0 1px 3px rgba(15, 118, 110, 0.3);
  min-width: 18px;
  text-align: center;
}

/* Premium filter button */
.scrm-btn-filter {
  position: relative;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 4px 6px rgba(30, 58, 138, 0.25);
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.scrm-btn-filter:hover {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 12px rgba(30, 58, 138, 0.35);
}
.scrm-btn-filter:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(30, 58, 138, 0.2);
}
.scrm-btn-filter .scrm-filter-badge {
  position: absolute;
  top: 0px;
  right: 0px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  line-height: 1;
  z-index: 10;
  animation: scrmBadgePop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 2px solid #ffffff;
}
@keyframes scrmBadgePop {
  0% {
    transform: scale(0);
  }
  100% {
    transform: scale(1);
  }
}

/* ==========================================================================
   27. CLEAR ALL BUTTONS – Red Danger Styling
   ========================================================================== */
#btn-clear-opp-filters,
#btn-clear-cust-filters,
#btn-clear-opp-search,
#btn-clear-cust-search,
#btn-clear-dash-search,
#btn-clear-contact-search,
#btn-clear-dash-filters {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #dc2626;
}
#btn-clear-opp-filters:hover,
#btn-clear-cust-filters:hover,
#btn-clear-opp-search:hover,
#btn-clear-cust-search:hover,
#btn-clear-dash-search:hover,
#btn-clear-contact-search:hover,
#btn-clear-dash-filters:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.35);
  transform: scale(1.05);
}
#btn-clear-opp-filters:active,
#btn-clear-cust-filters:active,
#btn-clear-opp-search:active,
#btn-clear-cust-search:active,
#btn-clear-dash-search:active,
#btn-clear-contact-search:active,
#btn-clear-dash-filters:active {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #ffffff;
  transform: scale(0.97);
}

.scrm-btn-icon[id^="btn-clear"] {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #dc2626;
}
.scrm-btn-icon[id^="btn-clear"]:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.35);
  transform: scale(1.08);
}
.scrm-btn-icon[id^="btn-clear"]:active {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #ffffff;
  transform: scale(0.95);
}

/* ==========================================================================
   28. SUBSCRIBER / NON‑ADMIN SECURITY PAGE
   ========================================================================== */
#scrm-subpanel-change-password .scrm-subscriber-security-wrap {
  min-height: 60vh;
  background: transparent;
  margin-top: 0;
  padding: 20px;
}
#scrm-subpanel-change-password .scrm-subscriber-security-card {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.scrm-subscriber-security-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
  padding: 40px 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: var(--radius);
  margin-top: 20px;
}
.scrm-subscriber-security-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.08),
    0 2px 10px rgba(0, 0, 0, 0.04);
  max-width: 480px;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.6);
}
.scrm-subscriber-security-header {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  padding: 32px 24px;
  text-align: center;
  color: #ffffff;
}
.scrm-subscriber-security-header i {
  font-size: 42px;
  margin-bottom: 16px;
  display: block;
  opacity: 0.9;
}
.scrm-subscriber-security-header h2 {
  margin: 0 0 8px 0;
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
}
.scrm-subscriber-security-header p {
  margin: 0;
  font-size: 14px;
  opacity: 0.85;
}
.scrm-subscriber-security-body {
  padding: 32px;
}
.scrm-subscriber-security-body .scrm-fld {
  margin-bottom: 20px;
}
.scrm-subscriber-security-body .scrm-fld label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.scrm-subscriber-security-body input {
  padding: 12px 16px;
  font-size: 14px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  transition: all 0.2s ease;
}
.scrm-subscriber-security-body input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.1);
  outline: none;
}
.scrm-subscriber-security-body .scrm-btn-p {
  width: 100%;
  justify-content: center;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  margin-top: 10px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.25);
}
.scrm-subscriber-security-body .scrm-btn-p:hover {
  box-shadow: 0 6px 16px rgba(15, 118, 110, 0.35);
  transform: translateY(-1px);
}

/* ==========================================================================
   29. KANBAN BOARD & VIEW TOGGLE
   ========================================================================== */
.scrm-view-toggle {
  display: inline-flex;
  background: transparent;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  overflow: hidden;
  margin-right: 10px;
}
.scrm-view-btn {
  background: transparent;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  margin: 0 2px !important;
  color: var(--text-s);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  transition: var(--tr);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.scrm-view-btn:hover {
  background: var(--primary-50);
  color: var(--primary);
}
.scrm-view-btn.active {
  background: var(--primary);
  color: #fff;
}

/* Board container */
.scrm-kanban-board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  min-height: 60vh;
  align-items: flex-start;
  padding-bottom: 16px;
  padding-left: 16px;
  padding-right: 24px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  contain: layout style !important;
  overflow-anchor: auto !important;
}
.scrm-kanban-board::-webkit-scrollbar {
  height: 8px;
}
.scrm-kanban-board::-webkit-scrollbar-track {
  background: transparent;
  border-radius: var(--radius);
}
.scrm-kanban-board::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius);
  transition: background 0.2s ease;
}
.scrm-kanban-board::-webkit-scrollbar-thumb:hover {
  background: var(--text-s);
}

.scrm-kanban-column {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 280px;
  max-width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  max-height: 75vh;
  scroll-snap-align: start;
  scroll-margin-left: 16px;
}
.scrm-kanban-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.scrm-kanban-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
}
.scrm-kanban-count {
  color: var(--primary);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  border-bottom: 2px solid var(--border);
}
.scrm-kanban-total {
  font-size: 14px;
  font-weight: 900;
  color: var(--primary);
}
.scrm-kanban-cards {
  padding: 12px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100px;
  transition: background 0.2s ease;
}
.scrm-kanban-cards.drag-over {
  background: linear-gradient(180deg, var(--primary-50) 0%, #ffffff 100%);
  border: 2px dashed var(--primary);
  border-radius: 8px;
  transform: scale(1.01);
  transition: all 0.2s ease;
}

.scrm-kanban-card {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  cursor: grab;
  transition: all 0.2s ease;
  position: relative;
}
.scrm-kanban-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-light);
  transform: translateY(-2px);
}
.scrm-kanban-card.dragging {
  opacity: 0.85;
  cursor: grabbing;
  transform: rotate(3deg) scale(1.03);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
  z-index: 100;
  border-left-color: var(--primary-dark) !important;
}
.scrm-kanban-card.priority-high {
  border-left-color: #ff4a4a;
}
.scrm-kanban-card.priority-med {
  border-left-color: #ffb822;
}
.scrm-kanban-card.priority-low {
  border-left-color: #34bfa3;
}

.scrm-kanban-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.scrm-kanban-opp-num {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  background: #003366;
  padding: 2px 6px;
  border-radius: 4px;
}
.scrm-kanban-amount {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.scrm-kanban-card-body {
  margin-bottom: 10px;
}
.scrm-kanban-customer {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.scrm-kanban-product {
  font-size: 11px;
  color: var(--text-s);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.scrm-kanban-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-s);
  border-top: 1px dashed var(--border);
  padding-top: 8px;
  margin-bottom: 0;
}
.scrm-kanban-card-footer i {
  margin-right: 4px;
  opacity: 0.7;
}
.scrm-kanban-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--primary-light);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  border: 1px solid #fff;
  box-shadow: 0 0 0 1px var(--border);
}
.scrm-kanban-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.scrm-kanban-card:hover .scrm-kanban-card-actions {
  opacity: 1;
}

/* ==========================================================================
   30. GLOBAL SEARCH BAR & DROPDOWN
   ========================================================================== */
.scrm-global-search-container {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  padding: 0 8px;
  margin: 0 5px;
  flex-shrink: 0;
  transition: all 0.2s ease;
  width: 190px;
  max-width: 190px;
  border-color: #b91c1c;
}
.scrm-global-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-s);
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 10;
}
.scrm-global-search-clear:hover {
  color: var(--danger);
  transform: translateY(-50%) scale(1.1);
}
.scrm-global-search-container input {
  padding-right: 32px;
  background: transparent;
  color: #ffffff;
  font-size: 12px;
  outline: none;
  width: 100%;
  padding: 8px 10px;
}
.scrm-global-search-container input::placeholder {
  color: #cbd5e1;
  opacity: 0.8;
}
.scrm-global-search-container:focus-within {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--primary-light);
  width: 260px;
}
.scrm-global-search-icon {
  color: #6e7174;
  font-size: 12px;
  margin-right: 8px;
}

.scrm-global-search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  max-height: 400px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  z-index: 100000;
  text-align: left;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-light) transparent;
}
.scrm-global-search-dropdown::-webkit-scrollbar {
  width: 6px;
}
.scrm-global-search-dropdown::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 3px;
}

.scrm-gs-section {
  border-bottom: 1px solid var(--border);
}
.scrm-gs-section:last-child {
  border-bottom: none;
}
.scrm-gs-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-s);
  padding: 8px 12px 4px;
  background: #f8fafc;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
}
.scrm-gs-title i {
  margin-right: 6px;
  color: var(--primary);
}
.scrm-gs-item {
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.1s;
  border-bottom: 1px solid #f1f5f9;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
}
.scrm-gs-item:last-child {
  border-bottom: none;
}
.scrm-gs-item:hover {
  background: var(--primary-50);
  border-left-color: var(--primary);
  padding-left: 16px;
}
.scrm-gs-item-main {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.scrm-gs-item-sub {
  font-size: 11px;
  color: var(--text-s);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.scrm-gs-empty {
  padding: 20px;
  text-align: center;
  color: var(--text-s);
  font-size: 13px;
}

/* ==========================================================================
   31. SKELETON LOADERS
   ========================================================================== */
.scrm-skeleton {
  background: #e2e8f0;
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
}
.scrm-skeleton::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.6),
    transparent
  );
  animation: scrmSkeletonShimmer 1.5s infinite;
}
@keyframes scrmSkeletonShimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}
.scrm-skeleton-card {
  height: 120px;
  width: 100%;
}
.scrm-skeleton-row {
  height: 48px;
  width: 100%;
  margin-bottom: 10px;
}

/* ==========================================================================
   32. STANDALONE MODE LAYOUT OVERRIDES
   ========================================================================== */
body.scrm-standalone-mode {
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden;
  background: #f8fafc !important;
}
body.scrm-standalone-mode #wpadminbar {
  display: none !important;
}
body.scrm-standalone-mode html {
  margin-top: 0 !important;
}

body.scrm-standalone-mode .scrm-wrap {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0 !important;
  padding: 0 5px !important;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif !important;
  color: #000000 !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
}
body.scrm-standalone-mode .scrm-panel {
  margin-top: 52px !important;
}
body.scrm-standalone-mode .scrm-top-bar {
  position: fixed !important;
  top: 0;
  z-index: 99999;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  width: 100% !important;
  max-width: 100% !important;
  background: #161414 !important;
}

/* Strip common theme containers */
body.scrm-standalone-mode .site-content,
body.scrm-standalone-mode #content,
body.scrm-standalone-mode main,
body.scrm-standalone-mode .entry-content,
body.scrm-standalone-mode .container,
body.scrm-standalone-mode .content-area,
body.scrm-standalone-mode .site-main,
body.scrm-standalone-mode .inner-wrap,
body.scrm-standalone-mode .main-wrap,
body.scrm-standalone-mode .wp-site-blocks,
body.scrm-standalone-mode .elementor-container,
body.scrm-standalone-mode .elementor-column,
body.scrm-standalone-mode .et_pb_section,
body.scrm-standalone-mode .et_pb_row,
body.scrm-standalone-mode .vc_row {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  flex: 1 !important;
}

/* ==========================================================================
   33. THEME ISOLATION (Fixes Cross‑Domain Visual Discrepancies)
   ========================================================================== */
.scrm-wrap table,
.scrm-mo table,
.scrm-twrap table {
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  width: 100%;
}
.scrm-wrap th,
.scrm-wrap td,
.scrm-mo th,
.scrm-mo td {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}

.scrm-wrap
  input:not([class*="scrm-"]):not([type="checkbox"]):not([type="radio"]),
.scrm-wrap select:not([class*="scrm-"]),
.scrm-wrap textarea:not([class*="scrm-"]),
.scrm-wrap button:not([class*="scrm-"]),
.scrm-mo input:not([class*="scrm-"]):not([type="checkbox"]):not([type="radio"]),
.scrm-mo select:not([class*="scrm-"]),
.scrm-mo textarea:not([class*="scrm-"]),
.scrm-mo button:not([class*="scrm-"]) {
  font-family: inherit !important;
  font-size: 12px !important;
  color: var(--text) !important;
  background: var(--card) !important;
  border: 1px solid #7e8183 !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: none !important;
  outline: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  margin: 0 !important;
}

.scrm-wrap a {
  text-decoration: none !important;
  color: var(--primary) !important;
}
.scrm-wrap ul,
.scrm-wrap ol {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* ==========================================================================
   35. GLOBAL SCROLLBAR RECOLOR
   ========================================================================== */
/* Firefox */
.scrm-wrap,
.scrm-wrap .scrm-mb,
.scrm-wrap .scrm-cust-view-details,
.scrm-wrap .scrm-cust-opps-list,
.scrm-wrap .scrm-opp-modal-body,
.scrm-wrap .scrm-mgr-scroll,
.scrm-wrap .scrm-kanban-board,
.scrm-wrap .scrm-global-search-dropdown,
.scrm-wrap .scrm-filter-drawer-body {
  scrollbar-width: thin;
  scrollbar-color: var(--scrm-scroll-thumb) var(--scrm-scroll-track);
}

/* Webkit */
.scrm-wrap::-webkit-scrollbar,
.scrm-wrap .scrm-mb::-webkit-scrollbar,
.scrm-wrap .scrm-cust-view-details::-webkit-scrollbar,
.scrm-wrap .scrm-cust-opps-list::-webkit-scrollbar,
.scrm-wrap .scrm-opp-modal-body::-webkit-scrollbar,
.scrm-wrap .scrm-mgr-scroll::-webkit-scrollbar,
.scrm-wrap .scrm-kanban-board::-webkit-scrollbar,
.scrm-wrap .scrm-global-search-dropdown::-webkit-scrollbar,
.scrm-wrap .scrm-filter-drawer-body::-webkit-scrollbar {
  width: var(--scrm-scroll-size);
  height: var(--scrm-scroll-size);
}
.scrm-wrap::-webkit-scrollbar-track,
.scrm-wrap .scrm-mb::-webkit-scrollbar-track,
.scrm-wrap .scrm-cust-view-details::-webkit-scrollbar-track,
.scrm-wrap .scrm-cust-opps-list::-webkit-scrollbar-track,
.scrm-wrap .scrm-opp-modal-body::-webkit-scrollbar-track,
.scrm-wrap .scrm-mgr-scroll::-webkit-scrollbar-track,
.scrm-wrap .scrm-kanban-board::-webkit-scrollbar-track,
.scrm-wrap .scrm-global-search-dropdown::-webkit-scrollbar-track,
.scrm-wrap .scrm-filter-drawer-body::-webkit-scrollbar-track {
  background: var(--scrm-scroll-track);
  border-radius: 10px;
}
.scrm-wrap::-webkit-scrollbar-thumb,
.scrm-wrap .scrm-mb::-webkit-scrollbar-thumb,
.scrm-wrap .scrm-cust-view-details::-webkit-scrollbar-thumb,
.scrm-wrap .scrm-cust-opps-list::-webkit-scrollbar-thumb,
.scrm-wrap .scrm-opp-modal-body::-webkit-scrollbar-thumb,
.scrm-wrap .scrm-mgr-scroll::-webkit-scrollbar-thumb,
.scrm-wrap .scrm-kanban-board::-webkit-scrollbar-thumb,
.scrm-wrap .scrm-global-search-dropdown::-webkit-scrollbar-thumb,
.scrm-wrap .scrm-filter-drawer-body::-webkit-scrollbar-thumb {
  background: var(--scrm-scroll-thumb);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: content-box;
  transition: background 0.2s ease;
}
.scrm-wrap::-webkit-scrollbar-thumb:hover,
.scrm-wrap .scrm-mb::-webkit-scrollbar-thumb:hover,
.scrm-wrap .scrm-cust-view-details::-webkit-scrollbar-thumb:hover,
.scrm-wrap .scrm-cust-opps-list::-webkit-scrollbar-thumb:hover,
.scrm-wrap .scrm-opp-modal-body::-webkit-scrollbar-thumb:hover,
.scrm-wrap .scrm-mgr-scroll::-webkit-scrollbar-thumb:hover,
.scrm-wrap .scrm-kanban-board::-webkit-scrollbar-thumb:hover,
.scrm-wrap .scrm-global-search-dropdown::-webkit-scrollbar-thumb:hover,
.scrm-wrap .scrm-filter-drawer-body::-webkit-scrollbar-thumb:hover {
  background: var(--scrm-scroll-thumb-hover);
}

/* ==========================================================================
   36. RESPONSIVE MEDIA QUERIES (Merged & Deduplicated)
   ========================================================================== */
@media (max-width: 768px) {
  .scrm-wrap {
    padding: 10px;
  }
  .scrm-top-bar {
    flex-wrap: wrap !important;
    min-height: auto !important;
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    align-items: flex-start;
    flex-direction: column;
    padding: 10px;
  }
  .scrm-tabs {
    gap: 0;
    width: 100%;
  }
  .scrm-tab {
    font-size: 13px;
    padding: 10px 16px;
  }
  .scrm-subtabs {
    margin: 0 10px 12px;
  }
  .scrm-user-menu {
    align-self: flex-end;
    margin: 8px 0 0 0;
  }
  .scrm-card {
    padding: 8px 12px;
  }
  .scrm-filters,
  .scrm-filters-inline {
    flex-direction: column;
    gap: 8px;
  }
  .scrm-fg {
    width: 100%;
  }
  .scrm-fg select,
  .scrm-fg input[type="text"] {
    min-width: 0;
    width: 100%;
  }
  .scrm-charts {
    gap: 14px;
    grid-template-columns: 1fr;
  }
  .scrm-tbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .scrm-twrap {
    overflow-x: hidden !important;
  }
  .scrm-twrap table {
    min-width: 0 !important;
  }
  .scrm-fr,
  .scrm-fr-3 {
    gap: 0;
    grid-template-columns: 1fr;
  }
  .scrm-md {
    max-height: 95vh;
  }
  .scrm-mh,
  .scrm-mb,
  .scrm-mf {
    padding: 12px 16px;
  }
  .scrm-vr {
    flex-direction: column;
    gap: 2px;
  }
  .scrm-vl {
    width: auto;
  }
  .scrm-sh {
    align-items: flex-start;
    flex-direction: column;
  }
  .scrm-pt th,
  .scrm-pt td {
    padding: 8px 6px;
  }
  .scrm-login-wrap {
    grid-template-columns: 1fr;
    max-width: 420px;
  }
  .scrm-login-visual {
    display: none;
  }
  .scrm-login-form {
    padding: 32px 24px;
  }
  .scrm-invoice-header {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  .scrm-invoice-meta {
    text-align: center;
  }
  .scrm-line-item-row {
    grid-template-columns: 1fr 70px 90px 85px auto;
    font-size: 12px;
  }
  .scrm-manager-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .scrm-manager-table thead th,
  .scrm-manager-table tbody td,
  .scrm-manager-table tfoot td {
    padding: 8px 6px !important;
    font-size: 11px;
  }
  .scrm-bar-value {
    font-size: 11px;
  }
  .scrm-bar-track {
    height: 5px;
  }
  .scrm-rank-badge {
    width: 18px;
    height: 18px;
    font-size: 8px;
    margin-right: 5px;
  }
  .scrm-mgr-scroll {
    max-height: 400px;
  }
  #scrm-panel-settings .scrm-settings-layout {
    flex-direction: column;
    min-height: auto;
    border-radius: var(--radius-sm);
    overflow: visible;
    border: none;
    box-shadow: none;
  }
  #scrm-panel-settings .scrm-subtabs {
    width: 100%;
    flex-direction: row;
    flex-wrap: nowrap;
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: none;
    padding: 8px;
    gap: 6px;
    overflow-x: auto;
    background: #f8fafc;
    position: sticky;
    top: 64px;
    z-index: 20;
  }
  #scrm-panel-settings .scrm-subtab {
    border-left: none;
    border-bottom: 2px solid transparent;
    border-radius: 6px 6px 0 0;
    padding: 8px 12px;
    font-weight: 600;
    transform: none !important;
    flex-shrink: 0;
  }
  #scrm-panel-settings .scrm-subtab:hover,
  #scrm-panel-settings .scrm-subtab.active {
    transform: none !important;
  }
  #scrm-panel-settings .scrm-subtab.active {
    border-left-color: transparent;
    border-bottom-color: var(--primary);
    background: var(--primary-50);
    box-shadow: none;
  }
  .scrm-scrollable-area {
    max-height: 50vh;
  }
}

@media (max-width: 640px) {
  .scrm-opp-modal-body {
    grid-template-columns: 1fr;
    max-height: 70vh;
  }
  .scrm-opp-modal-body .scrm-line-item-row {
    grid-template-columns: 1fr 1fr;
  }
  .scrm-target-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 4px;
  }
}

@media (max-width: 480px) {
  .scrm-card {
    padding: 6px 10px;
  }
  .scrm-card-value {
    font-size: 13px;
  }
  .scrm-btn {
    font-size: 13px;
    padding: 8px 14px;
  }
  .scrm-filters-inline {
    padding: 8px 12px;
  }
  .scrm-line-item-row {
    gap: 6px;
    grid-template-columns: 1fr 1fr;
  }
  .scrm-line-item-row .li-qty,
  .scrm-line-item-row .li-price,
  .scrm-line-item-row .li-total {
    grid-column: span 2;
  }
  .scrm-collab-item span {
    white-space: normal;
    word-break: break-word;
  }
}

/* Large screens */
@media (min-width: 1920px) {
  .scrm-wrap {
    max-width: 2560px;
  }
  .scrm-mdxl {
    max-width: 1400px;
  }
  .scrm-mdl {
    max-width: 1100px;
  }
  .scrm-md {
    max-width: 800px;
  }
  .scrm-twrap th,
  .scrm-twrap td {
    padding: 2px 2px;
  }
  .scrm-card {
    padding: 16px 24px;
  }
  .scrm-charts {
    gap: 30px;
  }
}

/* ==========================================================================
   37. PRINT STYLES
   ========================================================================== */
@media print {
  body * {
    visibility: hidden;
  }
  .scrm-invoice-preview,
  .scrm-invoice-preview * {
    visibility: visible;
  }
  .scrm-invoice-preview {
    inset: 0;
    margin: 0;
    padding: 0;
    position: absolute;
    width: 100%;
  }
  .scrm-invoice-actions {
    display: none;
  }
  .scrm-mo {
    background: none;
    overflow: visible;
    position: static;
  }
  .scrm-md {
    box-shadow: none;
    max-width: 100%;
  }
}

/* ==========================================================================
   38. REDUCED MOTION (Accessibility)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .scrm-top-bar::before,
  .scrm-circle::before,
  #scrm-license-badge::before,
  .scrm-toast-item::after,
  .scrm-roadmap-val.commit::before {
    animation: none !important;
  }
  .scrm-card,
  .scrm-chart-box,
  .scrm-ba i,
  .scrm-badge,
  .scrm-btn,
  .scrm-vr,
  .scrm-line-item-row,
  .scrm-roadmap-item,
  .scrm-twrap tbody tr,
  .scrm-ms-dd,
  .scrm-dropdown,
  .scrm-md,
  .scrm-cb2 {
    transition: none !important;
  }
  .scrm-tab::after,
  .scrm-cust-subtab.active::after,
  #scrm-panel-settings .scrm-subtab::before {
    transition: none !important;
  }
}

/* ==========================================================================
   UPDATED TABLE ROW HOVER COLORS (Customers, Contacts, Deals)
   ========================================================================== */

/* 1. Main Tables: Deals, Customers, and Contacts */
.scrm-twrap tbody tr:hover {
  background-color: #c7efb6 !important; /* Soft, visible light blue highlight */
  transition: background-color 0.2s ease;
}

/* 2. Customer View Modal: Nested Opportunities Table */
.scrm-cust-opp-table tbody tr:hover {
  background-color: #c7efb6 !important;
  transition: background-color 0.2s ease;
}

/* 3. Settings / Privileges Tables (Bonus consistency) */
.scrm-pt tbody tr:hover {
  background-color: #c7efb6 !important;
  transition: background-color 0.2s ease;
}

/* 4. Preserve special "Stale" and "Critical" deal row hover overrides */
.scrm-twrap tbody tr.scrm-row-stale:hover {
  background-color: rgba(253, 230, 138, 0.6) !important;
}
.scrm-twrap tbody tr.scrm-row-critical:hover {
  background-color: rgba(254, 202, 202, 0.6) !important;
}

/* --- Widen Customer & Contact Modals --- */
#scrm-cust-modal .scrm-md,
#scrm-contact-modal .scrm-md {
  max-width: 850px !important; /* Adjust this value (e.g., 800px, 900px) */
  width: 90% !important;
}

/* --- Widen Opportunity Modal (Needs more space for 2-column grids) --- */
#scrm-opp-modal .scrm-md {
  max-width: 900px !important; /* Wider to accommodate the dual-column layout */
  width: 92% !important;
}

/* Optional: Ensure the inner body scrolls properly if the screen is too small */
#scrm-cust-modal .scrm-mb,
#scrm-opp-modal .scrm-mb,
#scrm-contact-modal .scrm-mb {
  max-height: 75vh;
  overflow-y: auto;
}

/* ==========================================================================
   ENHANCED ONBOARDING FORM TOGGLE 
   (Replaces the old .onboard-header-card styles)
   ========================================================================== */

.onboard-header-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  padding: 16px 20px; /* Slightly more padding for a chunkier, clickable feel */
  background: linear-gradient(135deg, #f0fdfa 0%, #ffffff 100%);
  border-radius: 12px;
  border: 2px solid var(--border); /* Thicker border for better definition */
  margin-bottom: 16px;
  margin-top: 16px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

/* Subtle shine effect on hover to draw attention */
.onboard-header-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.6),
    transparent
  );
  transition: left 0.6s ease;
  pointer-events: none;
}

.onboard-header-card:hover {
  border-color: var(--primary);
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdfa 100%);
  box-shadow: 0 8px 16px rgba(15, 118, 110, 0.12);
  transform: translateY(-2px); /* Lift effect to signal interactivity */
}

.onboard-header-card:hover::before {
  left: 100%;
}

.onboard-header-card:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(15, 118, 110, 0.1);
}

/* Make the toggle text and arrow look like a distinct button/badge */
.onboard-header-card > div:last-child {
  background: var(--primary-50);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--primary-100);
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.onboard-header-card:hover > div:last-child {
  background: var(--primary);
  border-color: var(--primary);
}

.onboard-header-card:hover > div:last-child span,
.onboard-header-card:hover > div:last-child i {
  color: #ffffff !important;
}

/* Ensure the icon rotates smoothly (keeping your existing logic) */
#icon-toggle-onboard {
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
#icon-toggle-onboard.rotated {
  transform: rotate(180deg);
}

/* ==========================================================================
   OPPORTUNITY NUMBER BADGE (Table View)
   ========================================================================== */
.scrm-opp-num-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #344767; /* Dark slate background */
  color: #ffffff !important;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  text-decoration: none !important;
  letter-spacing: 0.5px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
}

.scrm-opp-num-badge:hover {
  background: #69932a; /* Darker on hover */
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  color: #ffffff !important;
}

/* Ensure any warning icons inside the badge keep their original colors */
.scrm-opp-num-badge i {
  margin-left: 4px;
  vertical-align: middle;
}

/* ==========================================================================
FILTER MODAL MODE (Alternative to Side Drawer)
========================================================================== */
.scrm-filter-drawer.scrm-filter-modal {
  top: 50%;
  left: 50%;
  right: auto;
  width: 480px;
  max-width: 92vw;
  height: auto;
  max-height: 85vh;
  border-radius: 16px;
  transform: translate(-50%, -50%) scale(0.95);
  opacity: 0;
  visibility: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.scrm-filter-drawer.scrm-filter-modal.open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  visibility: visible;
}

.scrm-filter-drawer.scrm-filter-modal .scrm-filter-drawer-header {
  border-radius: 16px 16px 0 0;
}

.scrm-filter-drawer.scrm-filter-modal .scrm-filter-drawer-footer {
  border-radius: 0 0 16px 16px;
}

/* Toggle button styling inside the header */
.scrm-filter-view-toggle {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  gap: 6px;
  transition: background 0.2s;
}
.scrm-filter-view-toggle:hover {
  background: rgba(255, 255, 255, 0.3);
}
