/* CRM page only (service-crm.html) */

/* ---------- Hero ---------- */
.crm-hero__modules { width: 256px; }
.crm-hero__follow { width: 226px; }
.crm-hero__follow .ui-ico { background: rgba(200, 241, 105, 0.14); color: var(--c-lime); }
.crm-hero__note { display: flex; align-items: center; gap: 12px; max-width: 520px; font-size: 14px; line-height: 1.5; color: var(--c-muted-d); }
.crm-hero__note-ico { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--c-line-d2); color: var(--c-lime); }
.crm-hero__note-ico svg { width: 18px; height: 18px; }

/* ---------- Pipeline (typical situations) ---------- */
.crm-pipe {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 10px;
  border-radius: 22px; background: #fff; border: 1px solid var(--c-line); box-shadow: var(--shadow-soft);
}
.crm-pipe__stage { display: grid; gap: 16px; align-content: start; min-width: 0; }
.crm-pipe__head {
  position: relative; display: flex; align-items: center; gap: 10px; height: 64px; padding: 0 30px 0 32px;
  background: #eef2ee; color: var(--c-text);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%, 18px 50%);
}
.crm-pipe__stage:not(:last-child) .crm-pipe__head { width: calc(100% + 18px); }
.crm-pipe__stage:first-child .crm-pipe__head { padding-left: 16px; border-radius: 14px 0 0 14px; clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%); }
.crm-pipe__stage:last-child .crm-pipe__head { padding-right: 16px; border-radius: 0 14px 14px 0; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 18px 50%); }
.crm-pipe__stage:nth-child(2) .crm-pipe__head { background: #e2efd6; }
.crm-pipe__stage:nth-child(3) .crm-pipe__head { background: #d6efab; }
.crm-pipe__stage:nth-child(4) .crm-pipe__head { background: var(--c-lime); color: var(--c-lime-ink); }
.crm-pipe__ico { width: 32px; height: 32px; border-radius: 50%; background: #fff; color: var(--c-forest); flex: none; }
.crm-pipe__ico svg { width: 16px; height: 16px; }
.crm-pipe__num { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em; opacity: 0.85; }
.crm-pipe__head h3 { min-width: 0; font-size: 15.5px; font-weight: 600; line-height: 1.2; }
.crm-pipe__body { display: grid; gap: 10px; padding: 0 16px 18px; }
.crm-pipe__label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-muted); }
.crm-pipe__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.crm-pipe__chips .chip { height: 30px; padding: 0 12px; font-size: 13px; font-weight: 500; background: var(--c-mist); }

.crm-sit { margin-top: 20px; }
.crm-sit__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }

/* ---------- Module mock interfaces (inside stabs media) ---------- */
.crm-app {
  position: absolute; left: 6%; top: 10%; width: 62%; border-radius: 14px; overflow: hidden;
  background: #fff; color: var(--c-text); box-shadow: var(--shadow-card); font-size: 13px;
}
.crm-app--right { left: auto; right: 6%; }
.crm-app__bar { display: flex; align-items: center; gap: 6px; padding: 11px 14px; border-bottom: 1px solid var(--c-line); }
.crm-app__bar > span { width: 9px; height: 9px; border-radius: 50%; background: var(--c-mist-2); }
.crm-app__bar i { margin-left: 10px; height: 9px; width: 34%; border-radius: 99px; background: var(--c-mist-2); }
.crm-app__body { position: relative; display: grid; padding: 14px 16px 16px; }
.crm-app__head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; }
.crm-app__logo { width: 40px; height: 40px; border-radius: 11px; background: var(--c-black); color: var(--c-lime); flex: none; }
.crm-app__logo svg { width: 20px; height: 20px; }
.crm-app__logo--mint { background: var(--c-mint); color: var(--c-forest); }
.crm-app__lines { flex: 1; min-width: 0; display: grid; gap: 7px; }
.crm-app__row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--c-line); }
.crm-app__file { width: 30px; height: 30px; border-radius: 8px; background: var(--c-mist); color: var(--c-muted); flex: none; }
.crm-app__file svg { width: 15px; height: 15px; }
.crm-avatar { width: 32px; height: 32px; border-radius: 50%; flex: none; background: linear-gradient(140deg, #eaf5d2, #b9dc8e); }
.crm-avatar--b { background: linear-gradient(140deg, #e5ece6, #b8cbbf); }
.crm-avatar--c { background: linear-gradient(140deg, #f1f2e6, #d6dfae); }
.crm-ver {
  display: inline-grid; place-items: center; width: 36px; height: 26px; border-radius: 8px; flex: none;
  background: var(--c-mist); font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; color: var(--c-muted);
}
.crm-ver--on { background: var(--c-lime); color: var(--c-lime-ink); }

.crm-tl { padding-top: 10px; }
.crm-tl::before { content: ""; position: absolute; left: 31px; top: 34px; bottom: 34px; width: 2px; background: var(--c-line); }
.crm-tl__item { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.crm-tl__dot {
  position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: #fff; border: 2px solid var(--c-line); color: var(--c-muted);
}
.crm-tl__dot svg { width: 14px; height: 14px; }
.crm-tl__dot--done { background: var(--c-lime); border-color: var(--c-lime); color: var(--c-lime-ink); }

.crm-matrix { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); font-size: 13px; }
.crm-matrix > span { display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 8px; border-top: 1px solid var(--c-line); }
.crm-matrix > .crm-matrix__h { min-height: 34px; border-top: 0; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.04em; color: var(--c-muted); }
.crm-matrix > .crm-matrix__role { justify-content: flex-start; gap: 4px; font-weight: 600; }
.crm-matrix__no { display: block; width: 14px; height: 2px; border-radius: 2px; background: #c3cdc6; }

.crm-aside { gap: 14px; padding: 22px 24px; }
.crm-aside .check-list li { font-size: 15px; }

/* ---------- Information flow (hub diagram) ---------- */
.crm-flow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.crm-flow__copy { display: grid; gap: 18px; align-content: start; }
.crm-flow__lead { font-size: 16px; font-weight: 500; margin-top: 6px; }
.crm-io { border-top: 1px solid var(--c-line); }
.crm-io li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 16px; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--c-line); font-size: 15px; }
.crm-io__k {
  justify-self: start; display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 999px;
  background: #fff; border: 1px solid var(--c-line); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
}
.crm-io__k--lime { background: var(--c-lime); border-color: transparent; color: var(--c-lime-ink); }

.crm-hub { position: relative; width: 100%; max-width: 540px; aspect-ratio: 1; margin-inline: auto; }
.crm-hub__lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.crm-hub__ring { fill: none; stroke: #c3cdc6; stroke-width: 0.3; stroke-dasharray: 0.6 1.6; }
.crm-hub__line { stroke: var(--c-teal); stroke-width: 0.35; stroke-dasharray: 1.2 1.4; animation: crm-flow 3.2s linear infinite; }
@keyframes crm-flow { to { stroke-dashoffset: -26; } }
.crm-hub__core {
  position: absolute; left: 50%; top: 50%; width: 36%; aspect-ratio: 1; transform: translate(-50%, -50%);
  display: grid; place-items: center; align-content: center; gap: 8px; padding: 14px; border-radius: 50%; text-align: center;
  background: var(--c-black); color: #fff; font-size: clamp(14px, 1.3vw, 16px); font-weight: 600; line-height: 1.3;
  box-shadow: 0 0 0 10px rgba(200, 241, 105, 0.28), 0 0 0 22px rgba(200, 241, 105, 0.12), var(--shadow-card);
}
.crm-hub__core-ico { color: var(--c-lime); }
.crm-hub__core-ico svg { width: 28px; height: 28px; }
.crm-hub__node {
  position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; white-space: nowrap;
  background: #fff; border: 1px solid var(--c-line); box-shadow: var(--shadow-soft); font-size: 14px; font-weight: 600;
}
.crm-hub__node .ui-ico { width: 28px; height: 28px; border-radius: 50%; }
.crm-hub__node .ui-ico svg { width: 14px; height: 14px; }

/* ---------- What to prepare ---------- */
.crm-prep__actions { margin-top: 8px; }
.crm-brief {
  position: relative; overflow: hidden; display: grid; gap: 22px; padding: clamp(24px, 3vw, 38px); border-radius: 24px;
  background: var(--c-black); color: var(--c-text-d); box-shadow: var(--shadow-card);
}
.crm-brief::before {
  content: ""; position: absolute; right: -140px; top: -160px; width: 380px; height: 380px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(200, 241, 105, 0.22), transparent);
}
.crm-brief > * { position: relative; }
.crm-brief__head { display: flex; align-items: center; gap: 14px; }
.crm-brief__ico { width: 46px; height: 46px; border-radius: 12px; background: var(--c-lime); color: var(--c-lime-ink); flex: none; }
.crm-brief__ico svg { width: 22px; height: 22px; }
.crm-brief__sub { display: block; margin-top: 2px; font-size: 14px; color: var(--c-muted-d); }
.crm-brief__list { border-top: 1px solid var(--c-line-d); }
.crm-brief__list li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--c-line-d); font-size: 16.5px; font-weight: 500; }
.crm-brief__n { font-family: var(--font-mono); font-size: 13px; color: var(--c-lime); }
.crm-brief__foot { display: grid; gap: 12px; }
.crm-brief__label { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-muted-d); }
.crm-brief__chips { gap: 8px; }
.crm-brief .chip { background: rgba(255, 255, 255, 0.08); color: var(--c-text-d); border-color: var(--c-line-d); font-weight: 500; }

/* ---------- Process (dark step cards + roles) ---------- */
.crm-step { background: var(--c-panel); border-color: var(--c-line-d); color: var(--c-text-d); min-height: 340px; transition: border-color 0.25s; }
.crm-step:hover { border-color: rgba(200, 241, 105, 0.45); }
.crm-step .step-card__num { color: #fff; }
.crm-step .step-card__foot { border-top-color: var(--c-line-d); color: var(--c-text-d); }
.crm-step .chip { background: rgba(255, 255, 255, 0.08); color: var(--c-text-d); border-color: var(--c-line-d); }
.crm-step .chip--lime { background: rgba(200, 241, 105, 0.14); color: var(--c-lime); border-color: transparent; }
.crm-step .ui-ico { background: rgba(200, 241, 105, 0.12); color: var(--c-lime); }

.crm-roles { margin-top: clamp(40px, 5vw, 64px); border-radius: 22px; border: 1px solid var(--c-line-d); overflow: hidden; background: var(--c-ink); }
.crm-roles__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 22px 28px; border-bottom: 1px solid var(--c-line-d); }
.crm-roles__head .link-arrow { color: var(--c-lime); font-size: 14.5px; }
.crm-roles__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.crm-roles__col { display: grid; gap: 18px; align-content: start; padding: 26px 28px 30px; }
.crm-roles__col + .crm-roles__col { border-left: 1px solid var(--c-line-d); }
.crm-roles__col--ac { background: rgba(200, 241, 105, 0.05); }
.crm-roles__label { display: flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 600; }
.crm-roles__label .ui-ico { background: rgba(255, 255, 255, 0.08); color: #fff; }
.crm-roles__col--ac .crm-roles__label .ui-ico { background: var(--c-lime); color: var(--c-lime-ink); }
.crm-roles__foot { display: flex; align-items: center; gap: 12px; padding: 18px 28px; border-top: 1px solid var(--c-line-d); font-size: 14.5px; color: var(--c-muted-d); }
.crm-roles__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-lime); flex: none; }

/* ---------- Related systems + specialists ---------- */
.crm-xp {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 28px; padding: 20px 24px;
  border-radius: 16px; border: 1px dashed #c9d3cc;
}
.crm-xp__title { font-size: 16px; font-weight: 600; }
.crm-xp__chips { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 420px; }
.crm-xp__chips .chip { background: #fff; font-weight: 500; transition: background-color 0.2s, border-color 0.2s; }
.crm-xp__chips .chip:hover { background: var(--c-lime); border-color: transparent; color: var(--c-lime-ink); }
.crm-xp__more { margin-left: auto; color: var(--c-teal); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .crm-hero__follow { display: none; }
}
@media (max-width: 1023px) {
  .crm-pipe { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
  .crm-pipe__head,
  .crm-pipe__stage:first-child .crm-pipe__head,
  .crm-pipe__stage:last-child .crm-pipe__head { width: 100% !important; clip-path: none; border-radius: 14px; padding: 0 16px; }
  .crm-flow { grid-template-columns: minmax(0, 1fr); }
  .crm-roles__grid { grid-template-columns: minmax(0, 1fr); }
  .crm-roles__col + .crm-roles__col { border-left: 0; border-top: 1px solid var(--c-line-d); }
  .crm-hero__follow { display: block; }
}
@media (max-width: 640px) {
  .crm-hero__follow { display: none; }
  .crm-hero__modules { width: 236px; }
  .crm-pipe { grid-template-columns: minmax(0, 1fr); }
  .crm-pipe__head { height: 56px; }
  .crm-app { width: 82%; left: 5%; top: 7%; font-size: 12px; }
  .crm-app--right { left: auto; right: 5%; }
  .crm-app__body { padding: 10px 12px 12px; }
  .crm-app__head { padding-bottom: 8px; }
  .crm-app__logo { width: 32px; height: 32px; }
  .crm-app__row { padding: 7px 0; }
  .crm-app__row:nth-child(n+4), .crm-tl__item:nth-child(n+3) { display: none; }
  .crm-tl::before { display: none; }
  .crm-matrix > span { min-height: 34px; }
  .crm-matrix > :nth-child(n+13) { display: none; }
  .crm-io li { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .crm-hub { aspect-ratio: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .crm-hub__lines { display: none; }
  .crm-hub__core { position: static; grid-column: 1 / -1; width: auto; aspect-ratio: auto; transform: none; border-radius: 18px; padding: 18px; margin-bottom: 14px; box-shadow: 0 0 0 6px rgba(200, 241, 105, 0.25); }
  .crm-hub__node { position: static; transform: none; white-space: normal; font-size: 13px; box-shadow: none; }
  .crm-brief__list li { font-size: 15.5px; }
  .crm-xp__more { margin-left: 0; }
}
