.crm-page-body {
  min-height: 100vh;
}

.crm-page-copy {
  background:
    linear-gradient(180deg, rgba(20, 52, 99, 0.95), rgba(11, 30, 57, 0.93)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent);
}

.crm-page-copy::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(14, 38, 73, 0.46), rgba(14, 38, 73, 0.28)),
    url("./Porcshe.webp") center right / cover no-repeat;
  opacity: 0.2;
  z-index: 0;
}

.crm-page-section {
  display: grid;
  gap: 18px;
}

.crm-page-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.crm-lead-grid,
.crm-rule-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.crm-lead-card,
.crm-rule-card,
.crm-stage-tab,
.crm-stage-spotlight {
  border: 1px solid rgba(17, 54, 105, 0.08);
  background:
    linear-gradient(180deg, rgba(250, 252, 255, 0.98), rgba(239, 245, 252, 0.96));
  box-shadow: var(--shadow);
}

.crm-lead-card,
.crm-rule-card {
  padding: 18px;
  border-radius: 22px;
}

.crm-lead-card.is-hot {
  background:
    linear-gradient(180deg, rgba(255, 249, 233, 0.98), rgba(246, 235, 198, 0.96));
  border-color: rgba(204, 166, 73, 0.2);
}

.crm-lead-top,
.crm-lead-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.crm-lead-top {
  margin-bottom: 10px;
}

.crm-lead-card p,
.crm-rule-card p,
.crm-stage-copy,
.crm-stage-points li {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.crm-lead-meta {
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--muted);
}

.crm-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(230, 181, 61, 0.14);
  color: #815f00;
  font-size: 0.74rem;
  font-weight: 800;
}

.crm-status-pill.is-blue {
  background: rgba(54, 121, 214, 0.14);
  color: #285a98;
}

.crm-status-pill.is-muted {
  background: rgba(80, 94, 117, 0.12);
  color: #45546c;
}

.crm-status-pill.is-success {
  background: rgba(55, 148, 98, 0.14);
  color: #2d7a53;
}

.crm-stage-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.crm-stage-tab {
  min-height: 72px;
  padding: 14px 12px;
  border-radius: 18px;
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.crm-stage-tab:hover,
.crm-stage-tab.is-active {
  transform: translateY(-1px);
  border-color: rgba(32, 86, 156, 0.2);
  background:
    linear-gradient(180deg, rgba(244, 248, 255, 0.98), rgba(231, 239, 252, 0.96));
}

.crm-stage-spotlight {
  padding: 22px;
  border-radius: 24px;
}

.crm-stage-points {
  margin: 16px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.crm-product-guide-shell {
  display: grid;
  gap: 16px;
}

.crm-product-guide-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.crm-product-guide-tab,
.crm-product-guide-spotlight,
.crm-product-guide-card,
.crm-product-guide-intro-card,
.crm-product-guide-objection {
  border: 1px solid rgba(17, 54, 105, 0.08);
  background:
    linear-gradient(180deg, rgba(250, 252, 255, 0.98), rgba(239, 245, 252, 0.96));
  box-shadow: var(--shadow);
}

.crm-product-guide-tab {
  min-height: 58px;
  padding: 12px 14px;
  border-radius: 18px;
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.crm-product-guide-tab:hover,
.crm-product-guide-tab.is-active {
  transform: translateY(-1px);
  border-color: rgba(28, 92, 168, 0.22);
  background:
    linear-gradient(180deg, rgba(244, 248, 255, 0.99), rgba(230, 239, 252, 0.97));
}

.crm-product-guide-spotlight {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: 26px;
  display: grid;
  gap: 18px;
}

.crm-product-guide-spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(39, 103, 190, 0.16), transparent 40%),
    linear-gradient(135deg, rgba(14, 52, 103, 0.06), transparent 55%);
  pointer-events: none;
}

.crm-product-guide-spotlight-top,
.crm-product-guide-intro-grid,
.crm-product-guide-grid,
.crm-product-guide-split-lists {
  position: relative;
  z-index: 1;
}

.crm-product-guide-spotlight-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.crm-product-guide-hero-copy {
  display: grid;
  gap: 8px;
}

.crm-product-guide-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  max-width: 70ch;
}

.crm-product-guide-price-card {
  min-width: 220px;
  padding: 16px 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(18, 51, 98, 0.94), rgba(10, 31, 60, 0.95));
  color: #f7fbff;
  box-shadow: 0 18px 44px rgba(9, 25, 52, 0.24);
  display: grid;
  gap: 6px;
}

.crm-product-guide-price-card span,
.crm-product-guide-price-card small {
  color: rgba(247, 251, 255, 0.82);
}

.crm-product-guide-price-card strong {
  font-size: 1.2rem;
}

.crm-product-guide-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.crm-product-guide-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(30, 90, 163, 0.1);
  color: #285a98;
  font-size: 0.78rem;
  font-weight: 800;
}

.crm-product-guide-intro-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.crm-product-guide-intro-card,
.crm-product-guide-card {
  padding: 18px;
  border-radius: 22px;
}

.crm-product-guide-intro-card p,
.crm-product-guide-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.crm-product-guide-card-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  color: #4c6286;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.crm-product-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.crm-product-guide-card .report-section-heading {
  gap: 4px;
  margin-bottom: 14px;
}

.crm-product-guide-step-list,
.crm-product-guide-action-list,
.crm-product-guide-warning-list,
.crm-product-guide-cross-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.crm-product-guide-step {
  position: relative;
  padding: 14px 14px 14px 54px;
  border-radius: 18px;
  background: rgba(30, 90, 163, 0.05);
}

.crm-product-guide-step::before {
  counter-increment: guide-step;
  content: counter(guide-step);
  position: absolute;
  top: 14px;
  left: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(28, 92, 168, 0.96), rgba(17, 63, 121, 0.96));
  color: #f7fbff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
}

.crm-product-guide-step strong,
.crm-product-guide-objection strong {
  display: block;
  margin-bottom: 6px;
}

.crm-product-guide-step-list {
  counter-reset: guide-step;
}

.crm-product-guide-objection-list {
  display: grid;
  gap: 10px;
}

.crm-product-guide-objection {
  padding: 14px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 249, 238, 0.96), rgba(249, 240, 219, 0.94));
}

.crm-product-guide-action-list li,
.crm-product-guide-warning-list li,
.crm-product-guide-cross-list li {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(30, 90, 163, 0.05);
  color: var(--muted);
}

.crm-product-guide-warning-list li {
  background: rgba(194, 75, 38, 0.08);
  color: #7f452d;
}

.crm-product-guide-cross-list li {
  background: rgba(55, 148, 98, 0.1);
  color: #2d7a53;
}

.crm-product-guide-split-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.crm-page-copy > .report-page-text,
.crm-page-copy > .report-page-actions,
.crm-page-copy .report-page-quick-card.is-list,
.crm-page-copy .report-page-quick-card.is-kanban {
  display: none !important;
}

.crm-entry-backdrop {
  position: fixed;
  inset: 0;
  border: none;
  background: rgba(7, 19, 40, 0.52);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 46;
}

.crm-entry-modal {
  position: fixed;
  top: 84px;
  left: 50%;
  width: min(1360px, calc(100vw - 22px));
  max-height: calc(100vh - 96px);
  padding: 16px;
  border-radius: 28px;
  border: 1px solid rgba(17, 54, 105, 0.08);
  background:
    linear-gradient(180deg, rgba(252, 253, 255, 0.98), rgba(240, 246, 252, 0.97));
  box-shadow: 0 32px 100px rgba(8, 24, 50, 0.28);
  transform: translate(-50%, 18px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 47;
  display: grid;
  gap: 14px;
  overflow: auto;
}

.page-shell.crm-entry-open .crm-entry-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.page-shell.crm-entry-open .crm-entry-modal {
  transform: translate(-50%, 0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.page-shell.crm-entry-open {
  height: 100vh;
  overflow: hidden;
}

.crm-sidebar-top-compact {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.crm-sidebar-search-shell {
  margin-bottom: 12px;
}

.crm-sidebar-search-input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #edf4ff;
  font: inherit;
  outline: none;
}

.crm-sidebar-search-input::placeholder {
  color: rgba(237, 244, 255, 0.68);
}

.crm-sidebar-accordion {
  gap: 10px;
}

.crm-sidebar-direct-link,
.crm-sidebar-accordion-toggle,
.crm-sidebar-subnav-link {
  width: 100%;
  border-radius: 16px;
  text-decoration: none;
  font: inherit;
}

.crm-sidebar-link-content {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.crm-sidebar-link-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #8ca2ff;
  flex: 0 0 18px;
}

.crm-sidebar-link-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.crm-sidebar-direct-link,
.crm-sidebar-accordion-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px 10px 14px;
  color: #edf4ff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.crm-sidebar-accordion-toggle {
  cursor: pointer;
}

.crm-sidebar-accordion-toggle.is-active,
.crm-sidebar-direct-link:hover,
.crm-sidebar-accordion-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.24);
}

.crm-sidebar-accordion-item {
  display: grid;
  gap: 8px;
}

.crm-sidebar-accordion-panel {
  display: grid;
  gap: 8px;
  padding: 4px 0 0 14px;
}

.crm-sidebar-subnav-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 40px;
  padding: 8px 12px;
  color: #edf4ff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-align: left;
  cursor: pointer;
}

.crm-sidebar-subnav-link.is-active,
.crm-sidebar-subnav-link:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

button.crm-sidebar-subnav-link {
  appearance: none;
}

.crm-sidebar-subnav-link.is-placeholder {
  justify-content: flex-start;
  opacity: 0.6;
  cursor: default;
}

.crm-sidebar-accordion-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  color: rgba(237, 244, 255, 0.96);
}

.crm-sidebar-direct-link .crm-sidebar-link-content,
.crm-sidebar-accordion-toggle .crm-sidebar-link-content {
  flex: 1 1 auto;
}

.crm-sidebar-accordion-icon::before {
  content: none;
}

.crm-sidebar-accordion-icon svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transform: rotate(0deg);
  transform-origin: 50% 50%;
  transition: transform 180ms ease;
}

.crm-sidebar-accordion-toggle[aria-expanded="true"] .crm-sidebar-accordion-icon svg {
  transform: rotate(90deg);
}

@media (min-width: 1100px) {
  .crm-page-body #crmPageShell {
    padding-left: calc(var(--sidebar-shell-base-width) + (var(--sidebar-shell-inset) * 2) + var(--sidebar-shell-gap));
  }

  .crm-page-body #crmSidebarShell {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .crm-page-body #crmSidebarBackdrop,
  .crm-page-body #crmSidebarToggle,
  .crm-page-body #crmSidebarCloseButton {
    display: none !important;
  }

  .crm-page-body #crmPageShell.sidebar-open {
    height: auto;
    overflow: visible;
  }
}

.crm-entry-head,
.crm-entry-footer,
.crm-entry-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.crm-entry-copy {
  display: grid;
  gap: 6px;
}

.crm-entry-copy p {
  margin: 0;
  color: var(--muted);
}

.crm-entry-copy h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2.6vw, 2rem);
}

.crm-entry-shell,
.crm-entry-form,
.crm-entry-section {
  display: grid;
  gap: 14px;
}

.crm-entry-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.crm-entry-tab {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(38, 82, 147, 0.14);
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.crm-entry-tab.is-active {
  background: linear-gradient(180deg, #234c88, #1a3a68);
  border-color: transparent;
  color: #f8fbff;
}

.crm-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.crm-entry-grid-meta {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.crm-entry-field {
  display: grid;
  gap: 8px;
}

.crm-entry-field span {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--muted);
}

.crm-entry-field input,
.crm-entry-field select,
.crm-entry-field textarea {
  width: 100%;
  min-height: 52px;
  border-radius: 18px;
  border: 1px solid rgba(39, 86, 154, 0.16);
  background: rgba(255, 255, 255, 0.94);
  padding: 0 16px;
  color: var(--text);
  font: inherit;
  font-size: 0.98rem;
}

.crm-entry-field textarea {
  min-height: 118px;
  resize: vertical;
  padding: 14px 16px;
}

.crm-entry-field input[readonly] {
  background: rgba(237, 243, 250, 0.96);
  color: #4a5b75;
}

.crm-entry-field-textarea {
  grid-column: 1 / -1;
}

.crm-entry-inline-note {
  border-radius: 20px;
  border: 1px solid rgba(227, 184, 77, 0.2);
  background: linear-gradient(180deg, rgba(255, 249, 235, 0.98), rgba(249, 239, 209, 0.95));
  padding: 14px 16px;
  color: #785200;
  font-size: 0.92rem;
  line-height: 1.6;
}

.crm-entry-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 48;
  min-width: 240px;
  max-width: min(92vw, 360px);
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(21, 43, 77, 0.96);
  color: #f8fbff;
  box-shadow: 0 18px 44px rgba(5, 17, 36, 0.28);
}

@media (max-width: 1180px) {
  .crm-lead-grid,
  .crm-rule-grid,
  .crm-stage-tabs,
  .crm-page-stats,
  .crm-product-guide-tabs,
  .crm-product-guide-intro-grid,
  .crm-product-guide-grid,
  .crm-product-guide-split-lists {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-entry-grid-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .crm-product-guide-spotlight-top {
    flex-direction: column;
  }

  .crm-product-guide-price-card {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 760px) {
  .crm-lead-grid,
  .crm-rule-grid,
  .crm-stage-tabs,
  .crm-page-stats,
  .crm-product-guide-tabs,
  .crm-product-guide-intro-grid,
  .crm-product-guide-grid,
  .crm-product-guide-split-lists {
    grid-template-columns: 1fr;
  }

  .crm-entry-modal {
    top: 74px;
    width: calc(100vw - 14px);
    max-height: calc(100vh - 84px);
    padding: 14px;
    border-radius: 24px;
  }

  .crm-entry-head,
  .crm-entry-footer,
  .crm-entry-footer-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .crm-entry-grid,
  .crm-entry-grid-meta {
    grid-template-columns: 1fr;
  }
}
