:root {
  --forest-green: #0b5d1e;
  --forest-green-dark: #084517;
  --white: #ffffff;
  --card-shadow: 0 16px 32px rgba(0, 0, 0, 0.22);
  --crm-bg: #050505;
  --crm-panel: #0c0c0c;
  --crm-border: rgba(255, 255, 255, 0.28);
  --crm-divider: rgba(255, 255, 255, 0.18);
  --lead-border: #2459ff;
  --task-border: #d1001f;
  --promotion-border: #17a34a;
  --sequence-border: #1f6f6f;
  --demo-green: #2ed97e;
  --demo-blue: #3f7cff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: #050505;
  color: var(--white);
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

.auth-page {
  min-height: 100vh;
  background: #050505;
}

.auth-top-brand,
.auth-hero,
.auth-section {
  max-width: 880px;
  margin: 0 auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.auth-top-brand {
  padding-top: 1.2rem;
  padding-bottom: 0.55rem;
  text-align: left;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  line-height: 1;
}

.auth-hero {
  padding-top: 0.5rem;
  display: grid;
  gap: 0.35rem;
}

.auth-card {
  width: min(100%, 520px);
  background: rgba(10, 10, 10, 0.88);
  border: 1px solid rgba(63, 124, 255, 0.35);
  box-shadow: 0 20px 34px rgba(0, 0, 0, 0.45);
  padding: 1rem;
  margin-top: 0.35rem;
}


h1 {
  margin: 1.5rem 0 0;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  line-height: 1.12;
  text-align: left;
  text-wrap: balance;
}

h2,
h3,
h4,
p {
  margin-top: 0;
}

.headline-break {
  display: block;
  margin-top: 0.55rem;
}

.auth-subline,
.auth-copy,
.auth-trialline {
  margin: 0;
  opacity: 0.94;
}

.auth-subline {
  margin-top: 0.35rem;
}

.auth-copy {
  margin-top: 0.85rem;
  opacity: 0.85;
  max-width: 70ch;
  text-wrap: pretty;
}

.hero-friction-list {
  list-style: none;
  padding: 0;
  margin: 0.85rem 0 0;
  display: grid;
  gap: 0.28rem;
}

.hero-friction-list li {
  border-left: 2px solid var(--crm-border);
  padding-left: 0.5rem;
  opacity: 0;
  transform: translateY(6px);
  animation: listFade 0.5s ease forwards;
}

.hero-friction-list li:nth-child(1) { animation-delay: 0.15s; }
.hero-friction-list li:nth-child(2) { animation-delay: 0.3s; }
.hero-friction-list li:nth-child(3) { animation-delay: 0.45s; }
.hero-friction-list li:nth-child(4) { animation-delay: 0.6s; }

.auth-trialline {
  font-weight: 700;
  margin-top: 0.45rem;
}

.subtext {
  text-align: left;
  margin: 0 0 0.6rem;
  opacity: 0.94;
  font-size: 1rem;
  font-weight: 700;
}

.auth-form,
.form-grid {
  display: grid;
  gap: 0.65rem;
}

label {
  font-weight: 600;
  display: grid;
  gap: 0.35rem;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--crm-border);
  border-radius: 0;
  padding: 0.72rem 0.85rem;
  font-size: 1rem;
  background-color: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

option {
  color: #1e1e1e;
}

input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.8rem;
}

.button-row > * {
  min-width: 0;
}

button {
  border: 1px solid rgba(255, 255, 255, 0.45);
  background-color: #141414;
  color: var(--white);
  border-radius: 0;
  padding: 0.75rem 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.12s ease;
}

.button-row button {
  flex: 1;
  min-height: 46px;
}

button:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

.status {
  margin-top: 0.75rem;
  min-height: 1.2rem;
  font-size: 0.9rem;
  opacity: 0.9;
}

.auth-footnote {
  margin: 0.55rem 0 0;
  text-align: left;
  font-size: 0.82rem;
  opacity: 0.78;
}

.auth-section {
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  padding-top: 4rem;
  padding-bottom: 3.75rem;
  position: relative;
}

.auth-section::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.26), transparent);
}

.auth-section:nth-of-type(odd) {
  background: rgba(255, 255, 255, 0.01);
}

.auth-section-inner {
  max-width: 760px;
}

.auth-section h2 {
  margin: 0 0 1.1rem;
  font-size: clamp(1.55rem, 3.2vw, 2.25rem);
  font-weight: 800;
  text-transform: none;
  text-wrap: balance;
}

.auth-section p,
.auth-section li {
  font-size: 1.02rem;
  line-height: 1.5;
  opacity: 0.9;
  max-width: 62ch;
  text-wrap: pretty;
}

.auth-section p + p {
  margin-top: 0.55rem;
}

.auth-section ul {
  margin: 0.65rem 0;
  padding-left: 1.1rem;
}

.auth-section-inner--narrow p {
  max-width: 48ch;
}

.auth-section--subtraction {
  position: relative;
  overflow: hidden;
}

.subtraction-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.sub-wireframe {
  position: absolute;
  inset: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.sub-wireframe--complex {
  background-image: linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.35;
}

.sub-wireframe--minimal {
  inset: 3.5rem;
  border-color: rgba(46, 217, 126, 0.28);
  background-image: linear-gradient(rgba(63,124,255,0.13) 1px, transparent 1px), linear-gradient(90deg, rgba(63,124,255,0.13) 1px, transparent 1px);
  background-size: 86px 60px;
  opacity: 0;
  transform: scale(1.03);
}

.auth-section--subtraction.is-active .sub-wireframe--complex {
  opacity: 0.06;
  transform: scale(0.98);
}

.auth-section--subtraction.is-active .sub-wireframe--minimal {
  opacity: 0.32;
  transform: scale(1);
}

.section-emphasis {
  font-weight: 700;
}

.demo-box {
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(12, 12, 12, 0.92);
  padding: 0.95rem 1rem;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.demo-heading { margin: 0 0 0.7rem; font-weight: 700; }

.demo-field-grid { display: grid; gap: 0.4rem; }

.demo-field-grid p {
  margin: 0;
  display: grid;
  grid-template-columns: 66px 1fr;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.26rem;
  min-height: 1.7rem;
}

.demo-field-grid span { opacity: 0.74; }
.demo-field-grid strong { font-weight: 500; color: #f7f7f7; }

.demo-save-btn {
  margin-top: 0.75rem;
  width: fit-content;
  padding: 0.45rem 0.55rem;
  min-height: 0;
  pointer-events: none;
}

.demo-save-btn.is-saving { border-color: var(--demo-green); color: var(--demo-green); }

.demo-result { margin: 0.75rem 0 0; min-height: 1.2rem; opacity: 0; transition: opacity 0.2s ease; }
.demo-result.is-visible { opacity: 1; }
.demo-result.is-lead { border-left: 2px solid var(--demo-blue); padding-left: 0.45rem; }
.demo-result.is-clear { color: var(--demo-green); }

.demo-phrase { margin: 0.7rem 0 0; min-height: 1.3rem; font-size: 0.92rem; opacity: 0.82; }

.auth-section--ritual {
  text-align: center;
}

.auth-section--ritual h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: 0.03em;
}

.auth-section--ritual p {
  font-size: 1.18rem;
  font-weight: 600;
}

.ritual-line {
  margin-top: 0.35rem;
}

.auth-section--pricing {
  padding-bottom: 5rem;
}

.section-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.section-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes listFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 820px) {
  .auth-top-brand,
  .auth-hero,
  .auth-section {
    padding-inline: 1rem;
  }

  .auth-top-brand {
    font-size: clamp(2rem, 12vw, 2.7rem);
    padding-bottom: 0.4rem;
  }

  .auth-card {
    width: 100%;
  }

  h1 {
    margin-top: 1.25rem;
    font-size: clamp(1.6rem, 8vw, 2.2rem);
  }
}

.app-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem;
}

#app-page {
  background: var(--crm-bg);
  min-height: 100vh;
}

.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 0;
  gap: 0.75rem;
}

.top-nav-left {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  flex-wrap: wrap;
}

.brand-banner {
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: none;
  border: 1px solid var(--crm-border);
  padding: 0.45rem 0.65rem;
  background: #0f0f0f;
}


.nav-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
}

.view-container {
  margin-top: 1rem;
}

.crm-view {
  background: var(--crm-bg);
}

.crm-view .view-header {
  border-bottom: 1px solid var(--crm-divider);
  padding-bottom: 0.8rem;
}

.crm-view .view-header-actions {
  border-left: 1px solid var(--crm-divider);
  padding-left: 0.75rem;
}

.crm-view .view-header h2 {
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.view-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.view-header h2 {
  margin: 0;
  line-height: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.view-header--lead-detail h2 {
  white-space: nowrap;
  overflow-wrap: normal;
}

.view-header--lead-detail .view-header-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.view-header-actions {
  display: flex;
  gap: 0.75rem;
}


.subevent-progress {
  --subevent-progress-color: var(--crm-border);
  width: 100%;
  margin: 0.2rem 0 1rem;
  padding: 0 0.45rem;
}

.subevent-progress__rail {
  width: min(100%, calc(var(--subevent-step-count, 1) * 7.5rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.subevent-progress__node {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid var(--subevent-progress-color);
  background: transparent;
  flex: 0 0 auto;
}

.subevent-progress__node--completed {
  background: var(--subevent-progress-color);
}

.subevent-progress__node--active {
  background: var(--subevent-progress-color);
  transform: scale(1.14);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--subevent-progress-color) 25%, transparent);
}

.subevent-progress__node--future {
  background: transparent;
  opacity: 0.64;
}

.subevent-progress__node--viewing {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

.subevent-progress__node--interactive {
  cursor: pointer;
}

.subevent-progress__node--interactive:hover {
  opacity: 0.92;
}

.subevent-progress__segment {
  position: relative;
  flex: 1 1 auto;
  min-width: 8px;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
}

.subevent-progress__segment::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--subevent-progress-color);
  transform: scaleX(0);
  transform-origin: left;
}

.subevent-progress__segment.is-filled::after {
  animation: subevent-progress-fill 220ms ease-out forwards;
  animation-delay: calc(var(--progress-order, 0) * 55ms);
}

.subevent-progress__node--completed,
.subevent-progress__node--active {
  animation: subevent-progress-node 220ms ease-out both;
  animation-delay: calc(var(--progress-order, 0) * 55ms);
}

@keyframes subevent-progress-fill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes subevent-progress-node {
  from { transform: scale(0.86); opacity: 0.3; }
  to { transform: scale(1); opacity: 1; }
}

.lead-state-switcher {
  display: inline-flex;
  border: 1px solid var(--crm-border);
}

.lead-state-switcher button {
  border: 0;
  border-right: 1px solid var(--crm-border);
  padding: 0.55rem 0.65rem;
  font-size: 0.85rem;
}

.lead-state-switcher button:last-child {
  border-right: 0;
}

.lead-state-switcher .is-active {
  background: #2a2a2a;
}

.view-message {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  padding: 1rem;
}

.feed-list {
  display: grid;
  gap: 0.85rem;
}

.tasks-divider {
  margin: 1rem 0 0.35rem;
  padding-top: 1rem;
  border-top: 1px solid var(--crm-divider);
}

.tasks-divider h3 {
  margin: 0;
  font-size: 1rem;
  opacity: 0.9;
}

.feed-item,
.panel {
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  padding: 1rem;
}

.crm-view .feed-item {
  box-shadow: none;
  background: var(--crm-panel);
  border: 1px solid var(--crm-border);
  border-radius: 0;
}

.crm-view .panel {
  background: var(--crm-panel);
  border: 1px solid var(--crm-border);
  border-radius: 0;
}

.crm-view .feed-item h3 {
  margin-bottom: 0.7rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--crm-divider);
}

.crm-view .button-row {
  border-top: 1px solid var(--crm-divider);
  padding-top: 0.7rem;
}

.crm-view .feed-item--lead {
  border-color: var(--lead-border);
  border-width: 1px;
}

.crm-view .feed-item--task {
  border-color: var(--task-border);
  border-width: 1px;
}

.crm-view .feed-item--promotion,
.crm-view .panel--promo {
  border-color: var(--promotion-border);
  border-width: 1px;
}

.crm-view .feed-item--sequence,
.crm-view .panel--sequence {
  border-color: var(--sequence-border);
  border-width: 1px;
}

.crm-view button,
.crm-view input,
.crm-view textarea,
.crm-view select,
.crm-view .push-dropdown,
.crm-view .timeline-link-pill,
.crm-view .timeline-item {
  border-radius: 0;
}

.crm-view button {
  background-color: #141414;
  border-color: var(--crm-border);
}

.crm-view button:hover {
  background-color: #1d1d1d;
}

.crm-view .push-dropdown {
  background: #101010;
  border-color: var(--crm-border);
}


.auth-card,
.view-message,
.feed-item,
.panel,
.timeline-item,
.timeline-link-pill,
.push-dropdown,
button,
input,
textarea,
select {
  border-radius: 0;
}

.feed-item,
.panel,
.view-message {
  background: var(--crm-panel);
  border: 1px solid var(--crm-border);
}

.feed-item--lead,
.panel--lead {
  border-color: var(--lead-border);
  border-width: 1px;
}

.feed-item--task,
.panel--task {
  border-color: var(--task-border);
  border-width: 1px;
}

.feed-item--promotion,
.panel--promo {
  border-color: var(--promotion-border);
  border-width: 1px;
}

.feed-item--sequence,
.panel--sequence {
  border-color: var(--sequence-border);
  border-width: 1px;
}

.feed-item-clickable {
  cursor: pointer;
}

.feed-type {
  opacity: 0.82;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.inline-link {
  color: var(--white);
}

.full-width {
  grid-column: 1 / -1;
}

.promo-presets {
  display: grid;
  gap: 0.5rem;
}

.promo-presets .secondary-btn {
  width: 100%;
  justify-content: space-between;
}

.crm-view--promotions .panel {
  padding: 1rem;
}

.crm-view--promotions .panel h3 {
  margin-bottom: 0.8rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--crm-divider);
}

.promo-touchpoint-leads-wrap {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.promo-touchpoint-lead-section {
  display: grid;
  gap: 0.7rem;
}

.promo-touchpoint-lead-section h3 {
  margin: 0;
  font-size: 1rem;
}

.promo-touchpoint-lead-section--completed {
  border-top: 1px solid var(--crm-divider);
  padding-top: 0.9rem;
}

.promo-touchpoint-lead-list {
  display: grid;
  gap: 0.75rem;
}

.promo-touchpoint-lead-card {
  padding: 0.72rem 0.82rem;
  border-color: var(--crm-border);
  border-left: 3px solid var(--promotion-border);
  cursor: pointer;
  background: var(--crm-panel);
  transition: background-color 0.16s ease, border-color 0.16s ease;
}

.promo-touchpoint-lead-card:hover {
  background: #141414;
  border-color: rgba(104, 224, 104, 0.55);
}

.promo-touchpoint-lead-card:focus-visible {
  outline: 2px solid rgba(76, 175, 80, 0.8);
  outline-offset: 2px;
}

.promo-touchpoint-lead-card--completed {
  border-color: rgba(255, 255, 255, 0.3);
  border-left-color: rgba(104, 224, 104, 0.45);
}

.promo-touchpoint-lead-meta {
  margin-bottom: 0.55rem;
}

.promo-touchpoint-lead-name {
  margin: 0;
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.32;
}

.promo-touchpoint-lead-detail,
.promo-touchpoint-lead-status {
  margin: 0.16rem 0 0;
  opacity: 0.78;
  font-size: 0.92rem;
}

.promo-touchpoint-lead-actions {
  border-top: 1px solid var(--crm-divider);
  padding-top: 0.56rem;
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
  gap: 0.48rem;
}

.promo-touchpoint-action-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  flex: 1;
}

.promo-touchpoint-action-group .secondary-btn {
  width: 100%;
}

.promo-touchpoint-action-divider {
  width: 1px;
  background: var(--crm-divider);
}

.panel--promo-actions {
  padding: 0.75rem;
}

.panel--promo-section {
  display: grid;
  gap: 0.75rem;
}

.promotion-list-grid,
.promotion-touchpoints-stack,
.promotion-lead-list {
  display: grid;
  gap: 0.75rem;
}

.promotion-list-card {
  display: grid;
  gap: 0.35rem;
}

.promotion-list-card h3 {
  margin: 0;
}

.panel--promo-summary {
  gap: 0.65rem;
}

.stage-status-card {
  padding: 0.7rem 0.85rem;
  display: grid;
  gap: 0.38rem;
}

.stage-status-card h3 {
  margin: 0;
  font-size: 1rem;
}


.contact-sub-card {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0.62rem 0.72rem;
  border: 1px solid var(--crm-border);
  background: #141414;
  text-decoration: none;
  color: inherit;
}

.contact-sub-card:hover {
  background: #191919;
}

.contact-sub-card:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 2px;
}

.contact-sub-card__name {
  margin: 0;
  font-size: 1.01rem;
  font-weight: 700;
  line-height: 1.3;
}

.contact-sub-card__details {
  margin: 0.18rem 0 0;
  font-size: 0.88rem;
  opacity: 0.78;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
}
.stage-status-card__subline {
  margin: 0;
  opacity: 0.8;
  font-size: 0.9rem;
}

.stage-status-card__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.3rem 0.75rem;
  border-top: 1px solid var(--crm-divider);
  padding-top: 0.46rem;
}

.stage-status-card__meta p {
  margin: 0;
  font-size: 0.88rem;
}


.contact-sub-card--task {
  margin-bottom: 0.4rem;
}

.contact-sub-card--placeholder {
  background: #101010;
  border-style: dashed;
}

.contact-sub-card--placeholder .contact-sub-card__name {
  font-size: 0.95rem;
  font-weight: 600;
}

.contact-sub-card--placeholder .contact-sub-card__details {
  opacity: 0.68;
}

.stage-status-card__meta--task {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 680px) {
  .stage-status-card__meta--task {
    grid-template-columns: minmax(0, 1fr);
  }
}

.stage-state-pill {
  margin-left: 0.35rem;
  padding: 0.1rem 0.38rem;
  border: 1px solid var(--crm-border);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.stage-state-pill--active {
  border-color: rgba(85, 234, 115, 0.65);
}

.stage-state-pill--completed {
  border-color: rgba(255, 255, 255, 0.45);
}

.stage-state-pill--future {
  opacity: 0.82;
}

.promotion-config-panel {
  gap: 0.85rem;
}

.promotion-config-panel > h3 {
  margin: 0.35rem 0 0;
}

.promotion-group-actions {
  flex-wrap: wrap;
}

.promotion-group-actions .secondary-btn {
  min-height: 42px;
}

.promotion-submit-row {
  margin-top: 1.1rem;
}

.promotion-wizard-block {
  display: grid;
  gap: 0.7rem;
}

.promotion-wizard-section-label,
.promotion-wizard-main-prompt,
.promotion-wizard-card-title {
  margin: 0;
}

.promotion-wizard-block .promotion-touchpoints-stack {
  gap: 1rem;
}

.promotion-wizard-timing-sentence {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  width: fit-content;
  font-weight: 600;
}

.promotion-wizard-offset-input {
  width: 72px;
  min-width: 72px;
  padding: 0.4rem 0.55rem;
}

.promotion-wizard-message-card {
  gap: 0.5rem;
  padding: 1rem;
  width: 100%;
  min-width: 0;
}

.sequence-step-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sequence-step-card-header .promotion-wizard-card-title {
  margin: 0;
}


.sequence-section-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: fit-content;
  font-size: 0.85rem;
  opacity: 0.92;
}

.sequence-section-toggle:hover {
  opacity: 1;
}

[data-sequence-drag-handle] {
  width: auto;
  min-height: 32px;
  padding: 0.25rem 0.6rem;
  cursor: grab;
  touch-action: none;
}

.promotion-wizard-message-card[draggable="true"] {
  touch-action: pan-y;
}

.promotion-wizard-message-card[data-touch-dragging="true"] {
  opacity: 0.85;
}

.promotion-wizard-message-list {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.promotion-wizard-message-card label,
.promotion-wizard-message-card input,
.promotion-wizard-message-card select,
.promotion-wizard-message-card textarea,
.promotion-wizard-message-card > div {
  min-width: 0;
  max-width: 100%;
}

.promotion-lead-list-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.promotion-inline-remove-btn {
  min-height: 32px;
  padding: 0.3rem 0.6rem;
  width: auto;
  flex-shrink: 0;
}

.link-btn {
  background: none;
  border: none;
  color: var(--crm-accent);
  cursor: pointer;
  padding: 0;
  font-size: 0.9rem;
  text-align: left;
}

.link-btn:hover {
  text-decoration: underline;
}

.danger-btn {
  border-color: #ff7676;
  color: #ffd5d5;
}

.danger-btn:hover {
  background-color: rgba(255, 118, 118, 0.2);
}

.filters-grid {
  margin-bottom: 1rem;
}

.detail-grid {
  display: grid;
  gap: 0.4rem;
}


.contact-detail-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.clipboard-copy-btn {
  width: 1.6rem;
  height: 1.6rem;
  min-height: 1.6rem;
  min-width: 1.6rem;
  padding: 0;
  font-size: 0.9rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
}

.clipboard-copy-btn svg {
  width: 0.9rem;
  height: 0.9rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.dashboard-stage-product {
  margin-left: 0.55rem;
}
.notes-panel {
  margin-top: 1rem;
}

.note-list {
  padding-left: 1.1rem;
}

.note-list li {
  margin-bottom: 0.75rem;
}


.button-row .dashboard-action-btn {
  border: 1px solid rgba(255, 255, 255, 0.45);
  background-color: #141414;
  color: var(--white);
  border-radius: 0;
  padding: 0.75rem 1rem;
  font-weight: 700;
  font-size: 1rem;
  min-height: 46px;
  cursor: pointer;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
}

.button-row .dashboard-action-btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
}
.push-menu {
  position: relative;
  flex: 1;
}

.push-menu summary {
  list-style: none;
}

.push-menu summary.secondary-btn {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--crm-border);
  background-color: #141414;
  padding: 0.75rem 1rem;
  font-weight: 700;
}

.push-menu summary.secondary-btn:hover {
  background-color: #1d1d1d;
}

.push-menu--close-actions {
  flex: 0 0 auto;
}

.push-menu--close-actions summary {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background-color: #f0f0f0;
  color: #121212;
  padding: 0.75rem 1rem;
  font-weight: 700;
  cursor: pointer;
}

.push-menu--close-actions summary:hover {
  background-color: #ffffff;
}

@media (max-width: 680px) {
  .view-header--lead-detail {
    align-items: center;
  }

  .view-header--lead-detail .view-header-actions {
    gap: 0.55rem;
  }

  .view-header--lead-detail button,
  .view-header--lead-detail .push-menu--close-actions summary {
    min-height: 42px;
    padding: 0.6rem 0.85rem;
    white-space: nowrap;
  }
}

.push-menu summary::-webkit-details-marker {
  display: none;
}

.push-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  min-width: 220px;
  display: grid;
  gap: 0.35rem;
  background: #101010;
  border: 1px solid var(--crm-border);
  border-radius: 0;
  padding: 0.45rem;
  z-index: 2;
}

.push-option {
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.7rem;
}

.lead-contact-suggestions {
  display: grid;
  gap: 0.35rem;
}

.lead-contact-option {
  width: 100%;
  text-align: left;
}

.lead-contact-empty {
  margin: 0;
  opacity: 0.85;
  font-size: 0.92rem;
}

.timeline-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
}

.timeline-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0;
  border: 1px solid var(--crm-border);
  background: #0f0f0f;
}


.timeline-item--lead {
  border-color: var(--lead-border);
  border-width: 1px;
}

.timeline-item--task {
  border-color: var(--task-border);
  border-width: 1px;
}

.timeline-item-link {
  color: inherit;
  text-decoration: none;
  transition: background-color 0.12s ease, transform 0.12s ease;
}

.timeline-item-link:hover {
  background: #181818;
  transform: translateY(-1px);
}

.timeline-link-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background-color: #141414;
  color: var(--white);
  padding: 0.28rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.button-row .timeline-link-pill {
  min-height: 46px;
  flex: 1;
  white-space: normal;
  text-align: center;
}

.lead-note-actions {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.8rem;
}

.lead-note-actions .button-row {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.lead-note-actions__save-row {
  justify-content: flex-end;
}

.lead-note-actions__save-row > .dashboard-action-btn {
  flex: 0 1 11rem;
}

.lead-note-actions__primary-row > * {
  flex: 1;
}

@media (max-width: 520px) {
  .lead-note-actions__save-row {
    justify-content: stretch;
  }

  .lead-note-actions__save-row > .dashboard-action-btn {
    flex-basis: 100%;
  }
}

.crm-view--calendar .calendar-header {
  align-items: flex-start;
  flex-wrap: wrap;
}

.crm-view--calendar,
.crm-view--calendar > * {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.calendar-header-title {
  min-width: 0;
}

.calendar-header-title .calendar-period-title {
  margin-top: 0.3rem;
}

.calendar-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.calendar-month-title {
  margin: 0;
  min-width: 170px;
  text-align: center;
  font-weight: 700;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.4rem;
  margin-bottom: 0.4rem;
  opacity: 0.9;
  font-size: 0.85rem;
}

.calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-rows: minmax(112px, 1fr);
  gap: 0.4rem;
}

.calendar-day-cell {
  min-height: 112px;
  border: 1px solid var(--crm-border);
  background: #0b0b0b;
  text-align: left;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  cursor: pointer;
  overflow: hidden;
}

.calendar-day-cell:hover {
  background: #141414;
}

.calendar-day-cell--outside {
  opacity: 0.45;
}

.calendar-day-cell--today {
  border-color: rgba(255, 255, 255, 0.8);
}

.calendar-day-number {
  font-weight: 700;
  font-size: 0.9rem;
}


.sequence-offset-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  min-width: 0;
}

.sequence-offset-row span {
  white-space: normal;
  overflow-wrap: anywhere;
}

.sequence-offset-row .promotion-wizard-offset-input {
  flex: 0 1 72px;
}

.sequence-readonly-input {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
}

.calendar-chip-list {
  display: flex;
  flex-direction: column;
  gap: 0.24rem;
  min-height: 0;
}

.calendar-chip {
  display: block;
  border-radius: 999px;
  padding: 0.16rem 0.45rem;
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid transparent;
  color: #f5f5f5;
}

.calendar-chip.calendar-item--task,
.calendar-day-list-item.calendar-item--task,
.calendar-allday-item.calendar-item--task,
.calendar-week-event.calendar-item--task,
.calendar-day-block.calendar-item--task {
  background: rgba(209, 0, 31, 0.24);
  border-color: #d1001f;
}

.calendar-chip.calendar-item--lead,
.calendar-day-list-item.calendar-item--lead,
.calendar-allday-item.calendar-item--lead,
.calendar-week-event.calendar-item--lead,
.calendar-day-block.calendar-item--lead {
  background: rgba(57, 101, 255, 0.24);
  border-color: #3965ff;
}

.calendar-chip.calendar-item--promotion,
.calendar-day-list-item.calendar-item--promotion,
.calendar-allday-item.calendar-item--promotion,
.calendar-week-event.calendar-item--promotion,
.calendar-day-block.calendar-item--promotion {
  background: rgba(35, 181, 127, 0.24);
  border-color: #23b57f;
}

.calendar-chip.calendar-item--sequence,
.calendar-day-list-item.calendar-item--sequence,
.calendar-allday-item.calendar-item--sequence,
.calendar-week-event.calendar-item--sequence,
.calendar-day-block.calendar-item--sequence {
  background: rgba(31, 111, 111, 0.24);
  border-color: #1f6f6f;
}

.calendar-item--task {
  background: rgba(209, 0, 31, 0.2);
  border-color: #d1001f;
}

.calendar-item--lead {
  background: rgba(57, 101, 255, 0.2);
  border-color: #3965ff;
}

.calendar-item--promotion {
  background: rgba(35, 181, 127, 0.2);
  border-color: #23b57f;
}

.calendar-item--sequence {
  background: rgba(31, 111, 111, 0.2);
  border-color: #1f6f6f;
}

.calendar-item--projected {
  opacity: 0.55;
}

.calendar-item--projected::after {
  content: " · planned";
  font-size: 0.68rem;
  opacity: 0.75;
}

.calendar-more {
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 0;
  width: fit-content;
  cursor: pointer;
  font-size: 0.72rem;
  opacity: 0.75;
}

.calendar-back-btn {
  margin-bottom: 0.6rem;
}

.calendar-allday-panel h3 {
  margin-bottom: 0.6rem;
}

.calendar-allday-list {
  display: grid;
  gap: 0.45rem;
}

.calendar-allday-item {
  border: 1px solid var(--crm-border);
  padding: 0.55rem;
}

.calendar-day-grid {
  margin-top: 0.8rem;
  position: relative;
}

.calendar-day-grid-inner {
  position: relative;
  --day-minute-height: 0.8;
  min-height: calc((24 * 60) * var(--day-minute-height) * 1px);
  padding: 0.25rem 0.25rem 0.75rem;
}

.calendar-time-rows {
  display: grid;
  height: calc((24 * 60) * var(--day-minute-height) * 1px);
  margin-left: 0.2rem;
}

.calendar-time-row {
  border-top: 1px solid var(--crm-divider);
  position: relative;
  min-height: calc(60 * var(--day-minute-height) * 1px);
}

.calendar-time-label {
  position: absolute;
  left: 0.15rem;
  top: -0.55rem;
  font-size: 0.72rem;
  opacity: 0.75;
}

.calendar-events-layer {
  position: absolute;
  left: 72px;
  right: 0.25rem;
  top: 0.25rem;
  bottom: 0.75rem;
}

.calendar-day-block {
  position: absolute;
  left: calc(var(--day-block-left, 0%) + 1px);
  width: calc(var(--day-block-width, 100%) - 2px);
  right: auto;
  min-height: calc(48 * var(--day-minute-height) * 1px);
  border: 1px solid var(--crm-border);
  padding: 0.35rem 0.45rem;
  background: #121212;
  cursor: grab;
  overflow: hidden;
}

.calendar-chip--dragging,
.calendar-day-block:active {
  opacity: 0.65;
  cursor: grabbing;
}

.calendar-day-block p,
.calendar-allday-item p {
  margin: 0 0 0.2rem;
}

.calendar-day-block small,
.calendar-allday-item small {
  opacity: 0.8;
}

.calendar-empty {
  opacity: 0.7;
}

@media (max-width: 860px) {
  .calendar-month-grid,
  .calendar-weekdays {
    gap: 0.25rem;
  }

  .calendar-day-cell {
    min-height: 92px;
    padding: 0.35rem;
  }

  .calendar-day-grid {
    min-height: 680px;
  }
}

.calendar-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  width: 100%;
  flex-wrap: wrap;
  min-width: 0;
}

.calendar-nav-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: 0;
}

.calendar-period-title {
  margin: 0;
  font-weight: 700;
  min-width: 0;
  overflow-wrap: anywhere;
}

.calendar-view-switcher {
  display: inline-flex;
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  overflow: hidden;
}

.calendar-view-switcher button {
  border: 0;
  border-right: 1px solid var(--crm-border);
  border-radius: 0;
  background: #0f0f0f;
}

.calendar-view-switcher button:last-child {
  border-right: 0;
}

.calendar-view-switcher .is-active {
  background: #2a2a2a;
}

.calendar-chip {
  width: 100%;
  text-align: left;
  cursor: pointer;
  background-clip: padding-box;
}

.calendar-week-grid {
  display: grid;
  grid-template-columns: 74px repeat(7, minmax(0, 1fr));
  border: 1px solid var(--crm-border);
}

.calendar-week-top-left,
.calendar-week-day-header,
.calendar-week-all-day-cell,
.calendar-week-time-label,
.calendar-week-cell {
  border-right: 1px solid var(--crm-border);
  border-bottom: 1px solid var(--crm-border);
  min-height: 50px;
  padding: 0.25rem;
}

.calendar-week-day-header {
  background: #131313;
  color: inherit;
  text-align: center;
}

.calendar-week-day-header--today {
  background: #1c1c1c;
}

.calendar-week-all-day-cell,
.calendar-week-cell {
  position: relative;
  display: grid;
  gap: 0.2rem;
  align-content: start;
}

.calendar-week-event {
  position: relative;
  text-align: left;
  padding: 0.16rem 0.3rem;
  font-size: 0.72rem;
  min-height: auto;
  cursor: grab;
}

.calendar-day-list {
  margin-top: 0.8rem;
}

.calendar-day-list-inner {
  display: grid;
  gap: 0.4rem;
}

.calendar-day-list-item {
  border: 1px solid var(--crm-border);
  background: #111;
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  width: 100%;
  text-align: left;
}

.calendar-allday-item {
  width: 100%;
  text-align: left;
  background: #101010;
  cursor: grab;
}

.calendar-drop-target--active {
  outline: 1px dashed rgba(255, 255, 255, 0.85);
  outline-offset: -2px;
}

.template-settings-card {
  border-top: 1px solid var(--crm-divider);
  padding-top: 0.75rem;
  margin-top: 0.4rem;
}

.template-checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.template-checkbox-row input[type="checkbox"] {
  width: auto;
}


.template-settings-block {
  border: 1px solid var(--crm-divider);
  padding: 0.8rem;
  border-radius: 8px;
  display: grid;
  gap: 0.5rem;
}

.stage-templates-list {
  display: grid;
  gap: 0.75rem;
}

#lead-template-select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.lead-template-output--placeholder::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.secondary-btn.is-active,
button.is-active {
  border-color: var(--promotion-border);
}
