/* NEXORA CRM — Overview command center.
   All new visual rules are owned by this stylesheet and scoped to .sales-overview.
   No existing design-system tokens, navigation or other route styles are overridden. */

.sales-overview {
  --crm-edge: #e2e9e3;
  --crm-quiet: #829188;
  --crm-strong: #1f3329;
  --crm-green: #235c46;
  --crm-soft: #f4f8f4;
  display: grid;
  gap: 16px;
}
.sales-overview button {
  font-family: inherit;
  letter-spacing: inherit;
}
.sales-overview button:focus-visible {
  outline: 3px solid #93bea1;
  outline-offset: 3px;
}
.sales-overview .crm-performance {
  display: grid;
  grid-template-columns: minmax(325px, 0.88fr) minmax(0, 1.12fr);
  gap: 14px;
  min-width: 0;
}
.sales-overview .crm-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  min-height: 190px;
  width: 100%;
  border: 1px solid #214536;
  border-radius: 13px;
  overflow: hidden;
  padding: 22px 25px 21px;
  background: #1d4133;
  color: #fff;
  text-align: left;
  box-shadow: none;
  isolation: isolate;
}
.sales-overview .crm-hero:before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      112deg,
      transparent 52%,
      rgba(255, 255, 255, 0.024) 52%,
      rgba(255, 255, 255, 0.024) 52.2%,
      transparent 52.2%
    ),
    linear-gradient(
      112deg,
      transparent 78%,
      rgba(255, 255, 255, 0.02) 78%,
      rgba(255, 255, 255, 0.02) 78.2%,
      transparent 78.2%
    );
  pointer-events: none;
  z-index: -1;
}
.sales-overview .crm-hero:hover {
  background: #234d3d;
}
.sales-overview .crm-hero-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.sales-overview .crm-hero .metric-head {
  font-size: 12px;
  font-weight: 630;
  color: #cce2d5;
  display: block;
}
.sales-overview .crm-hero-icon {
  height: 30px;
  width: 30px;
  border-radius: 50%;
  border: 1px solid rgba(231, 252, 233, 0.28);
  display: grid;
  place-items: center;
  color: #e0f5e5;
  transition: transform 0.18s ease;
}
.sales-overview .crm-hero:hover .crm-hero-icon {
  transform: translateX(2px);
}
.sales-overview .crm-hero-icon svg {
  width: 15px;
  height: 15px;
}
.sales-overview .crm-hero .metric-value {
  display: block;
  margin: 17px 0 20px;
  font-size: clamp(34px, 3vw, 46px);
  line-height: 1.04;
  letter-spacing: -2px;
  font-weight: 690;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.sales-overview .crm-hero-foot {
  display: flex;
  gap: 22px;
  align-items: center;
  font-size: 11px;
  color: #b8d4c3;
}
.sales-overview .crm-hero-segments {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  width: min(170px, 45%);
  height: 5px;
  margin-left: auto;
}
.sales-overview .crm-hero-segment {
  min-width: 3px;
  height: 100%;
  border-radius: 3px;
  background: #77af91;
}
.sales-overview .crm-hero-segment.segment-1 {
  background: #badfbe;
}
.sales-overview .crm-hero-segment.segment-2 {
  background: #e3eec9;
}
.sales-overview .crm-hero-segment.segment-3 {
  background: #499374;
}
.sales-overview .crm-metric-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: #fff;
  border: 1px solid var(--crm-edge);
  border-radius: 13px;
  min-width: 0;
  overflow: hidden;
}
.sales-overview .crm-metric {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  min-width: 0;
  min-height: 190px;
  padding: 25px 19px 22px;
  background: #fff;
  border: 0;
  color: var(--crm-strong);
  border-right: 1px solid #eaf0ea;
  text-align: left;
  transition: background 0.15s ease;
}
.sales-overview .crm-metric:last-child {
  border-right: 0;
}
.sales-overview .crm-metric:hover {
  background: #f8fbf8;
}
.sales-overview .crm-metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sales-overview .crm-metric-head .metric-head {
  font-size: 11px;
  color: #76867b;
  font-weight: 620;
  display: block;
}
.sales-overview .crm-metric-head svg {
  width: 14px;
  height: 14px;
  color: #adbbb0;
  transition:
    color 0.15s,
    transform 0.15s;
}
.sales-overview .crm-metric:hover .crm-metric-head svg {
  color: var(--crm-green);
  transform: translateX(2px);
}
.sales-overview .crm-metric .metric-value {
  font-size: clamp(23px, 2.15vw, 32px);
  font-weight: 700;
  letter-spacing: -1.05px;
  line-height: 1.1;
  margin: 14px 0 12px;
  color: #1e342a;
  font-variant-numeric: tabular-nums;
  overflow-wrap: normal;
}
.sales-overview .crm-metric-foot {
  font-size: 10px;
  font-weight: 520;
  color: #8c9b90;
}
.sales-overview .crm-operational-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
  gap: 16px;
  align-items: stretch;
}
.sales-overview .crm-panel {
  min-width: 0;
  padding: 22px 24px;
  border: 1px solid var(--crm-edge);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(25, 50, 36, 0.018);
}
.sales-overview .crm-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  min-height: 24px;
}
.sales-overview .crm-panel-heading h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: -0.28px;
  line-height: 1.3;
  color: #25372e;
}
.sales-overview .crm-section-link {
  border: 0;
  background: transparent;
  color: #376e54;
  font-size: 11px;
  font-weight: 670;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  padding: 4px 0;
}
.sales-overview .crm-section-link:hover {
  color: #133d29;
}
.sales-overview .crm-section-link svg {
  width: 13px;
  height: 13px;
  transition: transform 0.16s;
}
.sales-overview .crm-section-link:hover svg {
  transform: translateX(3px);
}
.sales-overview .crm-stage-list {
  display: grid;
  gap: 0;
}
.sales-overview .crm-stage-row {
  display: grid;
  grid-template-columns: 24px 93px minmax(20px, 1fr) 90px 14px;
  align-items: center;
  gap: 13px;
  min-height: 62px;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid #eff2ee;
  background: transparent;
  color: #29392e;
  text-align: left;
}
.sales-overview .crm-stage-row:last-child {
  border-bottom: 0;
}
.sales-overview .crm-stage-row:hover {
  background: transparent;
}
.sales-overview .crm-stage-index {
  font:
    560 10px/1.2 ui-monospace,
    Menlo,
    monospace;
  color: #a6b4aa;
}
.sales-overview .crm-stage-name {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.sales-overview .crm-stage-name strong {
  font-size: 12px;
  font-weight: 680;
  white-space: nowrap;
}
.sales-overview .crm-stage-name small {
  font-size: 10px;
  color: #98a59a;
  font-weight: 500;
}
.sales-overview .crm-stage-track {
  height: 7px;
  background: #eef2ed;
  border-radius: 2px;
  overflow: hidden;
}
.sales-overview .crm-stage-track i {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: #91b9a2;
}
.sales-overview .crm-stage-row:nth-child(2) .crm-stage-track i {
  background: #68977b;
}
.sales-overview .crm-stage-row:nth-child(3) .crm-stage-track i {
  background: #548569;
}
.sales-overview .crm-stage-row:nth-child(4) .crm-stage-track i {
  background: #336f56;
}
.sales-overview .crm-stage-row.is-won .crm-stage-track i {
  background: #1d5943;
}
.sales-overview .crm-stage-value {
  text-align: right;
  font-weight: 720;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.sales-overview .crm-stage-row > svg {
  width: 13px;
  height: 13px;
  color: #abb9ad;
}
.sales-overview .crm-title-with-count {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sales-overview .crm-count-pill {
  background: #eaf3eb;
  color: #487259;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 670;
  white-space: nowrap;
}
.sales-overview .crm-action-list {
  display: grid;
  gap: 0;
}
.sales-overview .crm-action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 63px;
  border-bottom: 1px solid #eff2ee;
  padding: 8px 1px;
}
.sales-overview .crm-action-row:last-child {
  border-bottom: 0;
}
.sales-overview .crm-action-checkbox {
  border: 1.5px solid #b4c7b7;
  width: 19px;
  height: 19px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  flex: 0 0 19px;
  background: #fff;
  color: transparent;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.sales-overview .crm-action-checkbox svg {
  height: 13px;
  width: 13px;
}
.sales-overview .crm-action-checkbox:hover {
  background: #e8f3e9;
  border-color: #407f61;
  color: #3d805c;
}
.sales-overview .crm-action-content {
  display: grid;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.sales-overview .crm-action-title {
  border: 0;
  background: transparent;
  color: #27372c;
  text-align: left;
  font-size: 11.5px;
  font-weight: 675;
  line-height: 1.35;
  padding: 1px 0;
  white-space: normal;
}
.sales-overview .crm-action-title:hover {
  color: #26714d;
}
.sales-overview .crm-action-account {
  border: 0;
  padding: 0;
  background: transparent;
  color: #87978a;
  font-size: 10px;
  line-height: 1.45;
  text-align: left;
  justify-self: start;
}
.sales-overview .crm-action-account:hover {
  color: #2b7252;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.sales-overview .crm-action-meta {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  max-width: 120px;
  flex: 0 0 120px;
}
.sales-overview .crm-task-priority {
  border-radius: 4px;
  font-size: 9px;
  color: #74867a;
  font-weight: 670;
  white-space: nowrap;
  background: #f1f5f0;
  padding: 4px 6px;
}
.sales-overview .crm-task-priority.priority-high {
  color: #a76c3b;
  background: #fcf3e7;
}
.sales-overview .crm-task-priority.priority-low {
  color: #9baba0;
  background: #f3f5f2;
}
.sales-overview .crm-task-due {
  font-size: 10px;
  color: #8b9b90;
  white-space: nowrap;
}
.sales-overview .crm-task-due.is-today {
  color: #3e7556;
  font-weight: 670;
}
.sales-overview .crm-opportunities {
  padding-bottom: 23px;
}
.sales-overview .crm-opportunity-layout {
  display: grid;
  grid-template-columns: minmax(255px, 0.8fr) minmax(0, 1.65fr);
  border: 1px solid #e5ebe5;
  border-radius: 10px;
  overflow: hidden;
}
.sales-overview .crm-focus-deal {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 22px 24px;
  min-width: 0;
  background: #f0f6f0;
  border-right: 1px solid #e1eae0;
}
.sales-overview .crm-focus-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  color: #67826d;
  font-size: 10px;
  font-weight: 650;
}
.sales-overview .crm-focus-top .status {
  font-size: 9px;
  white-space: nowrap;
}
.sales-overview .crm-focus-company {
  font-size: 11px;
  color: #658073;
  font-weight: 620;
  margin: 21px 0 5px;
}
.sales-overview .crm-focus-deal h3 {
  font-size: 17px;
  font-weight: 730;
  line-height: 1.28;
  letter-spacing: -0.5px;
  margin: 0 0 13px;
  color: #24382d;
}
.sales-overview .crm-focus-value {
  font-size: 28px;
  letter-spacing: -1px;
  font-weight: 760;
  line-height: 1.15;
  color: #244933;
  font-variant-numeric: tabular-nums;
}
.sales-overview .crm-focus-facts {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 19px;
  color: #718a77;
  font-size: 10px;
}
.sales-overview .crm-focus-facts span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.sales-overview .crm-focus-facts svg {
  width: 13px;
  height: 13px;
}
.sales-overview .crm-focus-open {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 9px;
  background: none;
  border: 0;
  border-top: 1px solid #d9e7da;
  padding: 12px 0 0;
  margin-top: auto;
  color: #276149;
  font-size: 11px;
  font-weight: 700;
  width: 100%;
  text-align: left;
}
.sales-overview .crm-focus-open svg {
  width: 14px;
  height: 14px;
  margin-left: auto;
}
.sales-overview .crm-focus-open:hover {
  color: #112f20;
}
.sales-overview .crm-opportunity-list {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 9px 18px;
}
.sales-overview .crm-opportunity-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1.35fr) minmax(93px, 0.72fr) 87px 13px;
  gap: 10px;
  align-items: center;
  min-height: 73px;
  width: 100%;
  background: none;
  border: 0;
  border-bottom: 1px solid #edf1ec;
  padding: 9px 12px;
  text-align: left;
  color: #25372c;
}
.sales-overview .crm-opportunity-row:last-child {
  border-bottom: 0;
}
.sales-overview .crm-opportunity-row:hover {
  background: transparent;
}
.sales-overview .crm-opportunity-rank {
  font:
    550 10px ui-monospace,
    Menlo,
    monospace;
  color: #afbcb1;
}
.sales-overview .crm-opportunity-name {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.sales-overview .crm-opportunity-name strong {
  font-size: 11px;
  font-weight: 680;
  line-height: 1.3;
}
.sales-overview .crm-opportunity-name small {
  font-size: 10px;
  color: #8d9e90;
  line-height: 1.3;
}
.sales-overview .crm-opportunity-detail {
  display: grid;
  justify-items: start;
  gap: 4px;
  min-width: 0;
}
.sales-overview .crm-opportunity-detail .status {
  font-size: 9px;
}
.sales-overview .crm-opportunity-detail > small {
  font-size: 9px;
  color: #9ba89e;
  white-space: nowrap;
}
.sales-overview .crm-opportunity-value {
  font-size: 12px;
  text-align: right;
  font-weight: 720;
  font-variant-numeric: tabular-nums;
}
.sales-overview .crm-opportunity-row > svg {
  width: 13px;
  height: 13px;
  color: #a7b8aa;
}
/* Inset row affordances: hover never touches text or the panel's edges.
   Keep dividers and full-width hit targets; paint the background behind content. */
.sales-overview :is(.crm-stage-row, .crm-opportunity-row) {
  position: relative;
  isolation: isolate;
}
.sales-overview :is(.crm-stage-row, .crm-opportunity-row)::before {
  content: '';
  position: absolute;
  z-index: 0;
  inset: 3px 4px;
  border-radius: 7px;
  background: #f2f7f2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.sales-overview :is(.crm-stage-row, .crm-opportunity-row):is(:hover, :focus-visible)::before {
  opacity: 1;
}
.sales-overview :is(.crm-stage-row, .crm-opportunity-row) > * {
  position: relative;
  z-index: 1;
}
.sales-overview .crm-action-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 9px;
  padding: 35px 14px;
  color: #758c7c;
}
.sales-overview .crm-action-empty strong {
  font-size: 12px;
  color: #304535;
}
.sales-overview .crm-action-empty svg {
  width: 20px;
  height: 20px;
}
.sales-overview .crm-empty-copy {
  padding: 24px 16px;
  font-size: 11px;
  color: #849388;
}
@media (max-width: 1380px) {
  .sales-overview .crm-performance {
    grid-template-columns: minmax(310px, 0.95fr) minmax(0, 1.05fr);
  }
  .sales-overview .crm-metric {
    padding: 22px 14px 19px;
  }
  .sales-overview .crm-opportunity-row {
    grid-template-columns: 17px minmax(0, 1.1fr) minmax(87px, 0.72fr) 80px 13px;
    gap: 8px;
  }
}
@media (max-width: 1190px) {
  .sales-overview .crm-performance {
    grid-template-columns: minmax(0, 1fr);
  }
  .sales-overview .crm-hero {
    min-height: 160px;
  }
  .sales-overview .crm-metric {
    min-height: 125px;
  }
  .sales-overview .crm-metric .metric-value {
    font-size: 28px;
  }
  .sales-overview .crm-operational-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 850px) {
  .sales-overview .crm-opportunity-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .sales-overview .crm-focus-deal {
    border-right: 0;
    border-bottom: 1px solid #e1eae0;
  }
  .sales-overview .crm-focus-open {
    margin-top: 20px;
  }
}
@media (max-width: 760px) {
  .sales-overview {
    gap: 12px;
  }
  .sales-overview .crm-performance {
    gap: 10px;
  }
  .sales-overview .crm-hero {
    padding: 20px 21px;
    min-height: 158px;
  }
  .sales-overview .crm-hero .metric-value {
    font-size: 39px;
    margin: 17px 0;
  }
  .sales-overview .crm-metric-group {
    border-radius: 10px;
  }
  .sales-overview .crm-metric {
    padding: 15px 13px;
    min-height: 112px;
  }
  .sales-overview .crm-metric .metric-value {
    font-size: 24px;
  }
  .sales-overview .crm-metric-head svg {
    display: none;
  }
  .sales-overview .crm-panel {
    padding: 17px 16px;
    border-radius: 11px;
  }
  .sales-overview .crm-stage-row {
    grid-template-columns: 17px 80px minmax(20px, 1fr) 79px 12px;
    gap: 9px;
    min-height: 57px;
  }
  .sales-overview .crm-opportunity-row {
    grid-template-columns: 16px minmax(0, 1fr) 77px 12px;
    grid-template-rows: auto auto;
    grid-template-areas: 'rank name value arrow' '. detail detail .';
    row-gap: 8px;
  }
  .sales-overview .crm-opportunity-rank {
    grid-area: rank;
  }
  .sales-overview .crm-opportunity-name {
    grid-area: name;
  }
  .sales-overview .crm-opportunity-value {
    grid-area: value;
  }
  .sales-overview .crm-opportunity-row > svg {
    grid-area: arrow;
  }
  .sales-overview .crm-opportunity-detail {
    display: flex;
    grid-area: detail;
    align-items: center;
    gap: 9px;
  }
  .sales-overview .crm-opportunity-detail > small {
    font-size: 10px;
  }
  .sales-overview .crm-opportunity-list {
    padding: 7px 12px;
  }
  .sales-overview .crm-focus-deal {
    padding: 19px;
  }
}
@media (max-width: 420px) {
  .sales-overview .crm-hero {
    min-height: 152px;
  }
  .sales-overview .crm-hero .metric-value {
    font-size: 36px;
  }
  .sales-overview .crm-metric {
    padding: 14px 11px;
    min-height: 104px;
  }
  .sales-overview .crm-metric .metric-head {
    font-size: 10px;
  }
  .sales-overview .crm-metric .metric-value {
    font-size: 21px;
    letter-spacing: -0.8px;
  }
  .sales-overview .crm-metric-foot {
    font-size: 9px;
  }
  .sales-overview .crm-stage-row {
    grid-template-columns: 72px minmax(0, 1fr) 75px 12px;
    gap: 9px;
  }
  .sales-overview .crm-stage-index {
    display: none;
  }
  .sales-overview .crm-stage-value {
    font-size: 11px;
  }
  .sales-overview .crm-action-row {
    gap: 9px;
  }
  .sales-overview .crm-action-meta {
    flex: 0 0 76px;
    max-width: 76px;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
  }
  .sales-overview .crm-action-title {
    font-size: 11px;
  }
  .sales-overview .crm-opportunity-row {
    grid-template-columns: 16px minmax(0, 1fr) 73px 12px;
    gap: 7px;
  }
  .sales-overview .crm-opportunity-value {
    font-size: 11px;
  }
  .sales-overview .crm-opportunity-name strong {
    font-size: 10.5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sales-overview *,
  .sales-overview *::before,
  .sales-overview *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}
