/* ============================================================
   360 CRM Real Estate Investor — CRM-specific overrides
   Base layout & theme: deal-analyzer.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

/* ---- Dashboard preview card (hero) ---- */
.crm-page .crm-dashboard-card {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(248, 176, 94, 0.22);
  border-radius: 18px;
  backdrop-filter: blur(16px);
  overflow: hidden;
  box-shadow: 0 18px 50px -22px rgba(0, 0, 0, 0.45);
}

.crm-page .crm-dashboard-card__layout {
  display: grid;
  grid-template-columns: 155px 1fr;
  min-height: 300px;
}

.crm-page .crm-dashboard-card__sidebar {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px 16px;
  background: linear-gradient(180deg, var(--da-brand) 0%, var(--da-brand-dark) 100%);
  color: #fff;
}

.crm-page .crm-dashboard-card__sidebar-foot {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.crm-page .crm-dashboard-card__date {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  opacity: 0.85;
}

.crm-page .crm-dashboard-card__title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
}

.crm-page .crm-dashboard-card__content {
  padding: 20px 22px 18px;
  background: rgba(26, 29, 43, 0.6);
}

.crm-page .crm-dashboard-card__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.crm-page .crm-dashboard-card__cell {
  background: rgba(215, 146, 60, 0.1);
  border: 1px solid rgba(248, 176, 94, 0.15);
  border-radius: 10px;
  padding: 14px 12px;
}

.crm-page .crm-dashboard-card__label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 6px;
}

.crm-page .crm-dashboard-card__value {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}

.crm-page .crm-dashboard-card__value--accent {
  color: var(--da-brand-light);
}

.crm-page .crm-dashboard-card__sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 5px;
}

.crm-page .crm-dashboard-card__tasks {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.crm-page .crm-dashboard-card__task {
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.78);
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.crm-page .crm-dashboard-card__tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
  margin-right: 8px;
  background: rgba(248, 176, 94, 0.15);
  color: var(--da-brand-light);
}

.crm-page .crm-dashboard-card__tag--due {
  background: var(--tag-bg-muted);
  color: var(--tag-color-accent);
}

/* ---- Audience grid (4 cards) ---- */
.crm-page .crm-audience-grid {
  grid-template-columns: repeat(4, 1fr);
}

/* ---- Modules grid ---- */
.crm-page .crm-mod-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 52px;
}

.crm-page .crm-mod-card {
  padding: 28px 24px;
  border-radius: 16px;
  border: 1px solid var(--da-border);
  background: #fff;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.crm-page .crm-mod-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(215, 146, 60, 0.12);
  border-color: var(--da-accent);
}

.crm-page .crm-mod-num {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--da-brand);
  margin-bottom: 9px;
}

.crm-page .crm-mod-card h3 {
  margin-bottom: 8px;
}

.crm-page .crm-mod-card p {
  line-height: 1.65;
  margin: 0;
}

/* ---- 5-step workflow ---- */
.crm-page #workflow {
  position: relative;
  overflow: hidden;
}

.crm-page .crm-steps-five {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 24px);
  margin-top: 56px;
  position: relative;
  isolation: isolate;
}

/* Connector line — spans first to last step center (10% → 90% for 5 columns) */
.crm-page .crm-steps-five::before {
  content: "";
  position: absolute;
  top: 40px;
  left: 10%;
  right: 10%;
  height: 3px;
  transform: translateY(-50%);
  background: linear-gradient(
    90deg,
    rgba(248, 176, 94, 0.45) 0%,
    #D7923C 18%,
    #F8B05E 50%,
    #D7923C 82%,
    rgba(248, 176, 94, 0.45) 100%
  );
  border-radius: 999px;
  z-index: 0;
  box-shadow: 0 1px 6px rgba(215, 146, 60, 0.3);
}

.crm-page .crm-steps-five .da-step {
  text-align: center;
  position: relative;
  z-index: 1;
  padding: 0 clamp(4px, 1vw, 10px);
}

.crm-page .crm-steps-five .da-step-num {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  position: relative;
  z-index: 2;
  background: linear-gradient(160deg, #F8B05E 0%, #D7923C 48%, #8D4B00 100%);
  border: 4px solid #fff;
  box-shadow:
    0 0 0 1px rgba(215, 146, 60, 0.22),
    0 10px 24px rgba(141, 75, 0, 0.26);
}

.crm-page .crm-steps-five .da-step h3 {
  margin-bottom: 8px;
  color: var(--text-primary);
  font-size: var(--type-h3-size);
  font-weight: var(--type-h3-weight);
}

.crm-page .crm-steps-five .da-step p {
  font-family: var(--font-family);
  font-size: clamp(14px, 1.1vw, 16px);
  color: var(--text-soft);
  line-height: 1.65;
  max-width: 210px;
  margin-inline: auto;
}

.crm-page .crm-flow-note {
  text-align: center;
  margin-top: 40px;
  padding: 16px 20px;
  font-family: var(--font-family);
  font-size: var(--type-body-size);
  color: var(--text-muted);
  line-height: var(--type-body-lh);
  max-width: 820px;
  margin-inline: auto;
  background: var(--da-cream);
  border: 1px solid var(--da-border);
  border-radius: 12px;
}

/* ---- Dark section feature items ---- */
.crm-page .crm-feat-dark {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(248, 176, 94, 0.18);
}

.crm-page .crm-feat-dark h4 {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  font-weight: 500;
  margin: 0;
}

.crm-page .crm-feat-dark .da-feat-icon {
  background: linear-gradient(135deg, rgba(215, 146, 60, 0.2), rgba(248, 176, 94, 0.08));
  border-color: rgba(248, 176, 94, 0.25);
  color: var(--da-brand-light);
  font-size: 14px;
}

.crm-page .crm-feat-dark:hover {
  border-color: var(--da-accent);
  box-shadow: 0 6px 24px rgba(215, 146, 60, 0.12);
}

/* ---- Light stats row (white section) ---- */
.crm-page .crm-stats-light .crm-stat-light {
  background: var(--da-cream);
  border-color: var(--da-border);
}

.crm-page .crm-stats-light .crm-stat-light .big {
  color: var(--da-ink);
}

.crm-page .crm-stats-light .crm-stat-light .big span {
  color: var(--da-brand);
}

.crm-page .crm-stats-light .crm-stat-light .lbl {
  color: var(--da-muted);
}

/* ---- Responsive ---- */
@media (max-width: 1200px) {
  .crm-page .crm-steps-five .da-step-num {
    width: 68px;
    height: 68px;
    font-size: 24px;
    border-width: 3px;
  }

  .crm-page .crm-steps-five::before {
    top: 34px;
  }
}

@media (max-width: 1024px) {
  .crm-page .crm-audience-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .crm-page .crm-steps-five {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 20px;
  }

  .crm-page .crm-steps-five::before {
    display: none;
  }

  .crm-page .crm-steps-five .da-step-num {
    width: 72px;
    height: 72px;
    font-size: 26px;
  }

  .crm-page .crm-steps-five .da-step p {
    max-width: 280px;
  }

  .crm-page .crm-dashboard-card__layout {
    grid-template-columns: 1fr;
  }

  .crm-page .crm-dashboard-card__sidebar {
    min-height: 72px;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .crm-page .crm-audience-grid,
  .crm-page .crm-mod-grid {
    grid-template-columns: 1fr;
  }

  .crm-page .crm-steps-five {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .crm-page .crm-steps-five .da-step {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 0 16px;
    text-align: left;
    align-items: start;
    padding: 16px;
    border: 1px solid var(--da-border);
    border-radius: 14px;
    background: #fff;
  }

  .crm-page .crm-steps-five .da-step-num {
    width: 56px;
    height: 56px;
    font-size: 22px;
    margin: 0;
    grid-row: span 2;
    align-self: center;
  }

  .crm-page .crm-steps-five .da-step h3 {
    margin-bottom: 4px;
    align-self: end;
  }

  .crm-page .crm-steps-five .da-step p {
    max-width: none;
    margin: 0;
    align-self: start;
  }

  .crm-page .crm-dashboard-card__grid {
    grid-template-columns: 1fr;
  }
}
