/* ==========================================================================
   Praxys CRM — hero: tek sahne (hedef → dağılım → ziyaret → teklif → sipariş → güncelleme)
   Yalnız praxys-crm.html yükler. İşaretleme: praxys-crm.html içinde.
   Kart sitenin .mock / .mock-bar / .mock-foot dilini kullanır; renkler style.css token'larına bağlı.
   Küçük yazılar --crm-fs (12 px; fareyle eğim açık cihazlarda 12,5 px). Sahne üstündeki etiketler 13 px.
   ==========================================================================*/

/* ---- hero yerleşimi (WMS / EMPİ / B2B / BI ile aynı): metin keskinliği için flat, dar ekranda scale yerine kartın düzeni ---- */
.lp-hero .crm-vis .hs-3d { transform-style: flat; }
.lp-hero .crm-vis .fl.chip small { font-size: 13px; }
.lp-hero .crm-vis .fl.chip > div { transition: transform .18s ease; }
.lp-hero .crm-vis .fl.chip.crm-swap > div { transform: translateY(-2px); }   /* metin hiçbir anda boş/gizli olmaz */
@media (max-width: 960px) {
  .lp-hero .crm-vis { height: auto; }
  .lp-hero .crm-vis .hs-3d { scale: none; width: min(540px, 100%); margin-left: auto; margin-right: auto; }
}

/* ---- kart ---- */
.crm-card { --crm-fs: 12px; font-size: 12.5px; line-height: 1.4; }
@media (hover: hover) and (pointer: fine) { .crm-card { --crm-fs: 12.5px; } }
.crm-in { container-type: inline-size; }
.crm-bar { padding: 11px 14px 11px 16px; }
.crm-bar b { white-space: nowrap; }
.crm-ex { color: var(--muted); font-size: var(--crm-fs); white-space: nowrap; }

/* sayaçlar */
.crm-kpis { display: flex; justify-content: flex-end; gap: 6px; margin: 0; padding: 8px 12px 0; background: var(--blue-50); }
.crm-kpis div { position: relative; display: flex; align-items: baseline; gap: 5px; padding: 3px 9px; border-radius: 999px; background: #fff; border: 1px solid var(--line); white-space: nowrap; }
.crm-kpis div::after { content: ""; position: absolute; inset: -3px; border-radius: 999px; border: 2px solid var(--blue-500); opacity: var(--on, 0); }
.crm-kpis dt { font-size: var(--crm-fs); line-height: 16px; font-weight: 500; color: var(--muted); }
.crm-kpis dd { margin: 0; font-size: 13px; line-height: 16px; font-weight: 600; color: var(--navy-700); font-variant-numeric: tabular-nums; }
.crm-kpis .crm-d { display: inline-block; width: .62em; text-align: center; }

/* sahne */
.crm-scene { position: relative; background: linear-gradient(180deg, var(--blue-50), #fff 78%); }
.crm-stage { position: relative; }
.crm-scene-svg { display: block; width: 100%; height: auto; }

/* müşteri etiketi (onayda işaret açılır) */
.crm-tag { position: absolute; transform: translate(0, -100%); display: flex; align-items: center; gap: 4px; height: 21px; padding: 0 7px; border-radius: 7px; background: rgba(255, 255, 255, .95); border: 1px solid var(--blue-200); box-shadow: 0 6px 12px -8px rgba(var(--navy-950-rgb), .45); font-size: 13px; line-height: 1; font-weight: 600; color: var(--navy-800); white-space: nowrap; }
.crm-tag .crm-ok { display: block; width: 0; height: 14px; border-radius: 50%; text-decoration: none; overflow: hidden; margin-right: -4px;
  background: var(--navy-700) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M4 7.2l2 2 4-4.4' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.crm-tag::after { content: ""; position: absolute; inset: -3px; border-radius: 9px; border: 2px solid var(--blue-500); opacity: var(--on, 0); }

/* temsilci etiketi: konum = başın sağı (sol alt köşe) */
.crm-rtag { position: absolute; left: 0; top: 0; transform: translate(0, -100%); display: grid; gap: 1px; padding: 3px 8px; border-radius: 8px; background: #fff; border: 1px solid var(--blue-200); box-shadow: 0 8px 16px -10px rgba(var(--navy-950-rgb), .5); font-size: 13px; line-height: 15px; color: var(--ink-2); white-space: nowrap; opacity: 0; }
.crm-rtag b { color: var(--navy-800); font-weight: 600; }
.crm-rtag span { font-variant-numeric: tabular-nums; }
.crm-rtag b span { margin-left: 3px; }
.crm-rtag.crm-l { transform: translate(-100%, -100%); }   /* ofiste: başın solunda (hedef panosuna binmesin) */
.crm-rtag #crm-rt-pct { color: var(--blue-600); font-weight: 700; }

/* temsilcinin telefonu (ekran görünümü) */
.crm-ph { position: absolute; left: 28.64%; top: 46.73%; transform: translate(0, -100%) translateY(var(--dy, 0px)); width: 150px; padding: 6px 7px 7px; border-radius: 14px; background: #fff; border: 1.5px solid var(--navy-800); box-shadow: 0 14px 26px -14px rgba(var(--navy-950-rgb), .55); font-size: var(--crm-fs); line-height: 16px; opacity: 0; }
.crm-ph-h { display: flex; align-items: center; gap: 4px; margin: 0 0 4px; padding-bottom: 4px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.crm-ph-h b { font-weight: 700; color: var(--navy-800); }
.crm-ph-h span { margin-left: auto; color: var(--muted); }
.crm-pico { width: 13px; height: 13px; flex: none; fill: none; stroke: var(--blue-500); stroke-width: 1.5; stroke-linecap: round; }
.crm-ph-b { display: grid; }
.crm-pg { grid-area: 1 / 1; display: grid; gap: 2px; opacity: 0; }
.crm-pg p { display: flex; align-items: center; gap: 5px; margin: 0; color: var(--ink-2); white-space: nowrap; }
.crm-pg p.crm-t { color: var(--ink); font-weight: 600; }
.crm-pg p.crm-row { justify-content: space-between; }
.crm-pg p.crm-row b { color: var(--navy-800); font-weight: 600; font-variant-numeric: tabular-nums; }
.crm-pg p.crm-note { color: var(--muted); }
.crm-pg p.crm-btn { justify-content: flex-end; }
.crm-pg p.crm-btn span { padding: 1px 10px; border-radius: 7px; background: var(--blue-500); color: #fff; font-weight: 600; }
.crm-pg p.crm-big { justify-content: space-between; padding: 1px 6px; border-radius: 6px; background: var(--tq-ll); color: var(--blue-600); font-weight: 600; }
.crm-pg p.crm-big b { color: var(--navy-800); }
.crm-pg s { display: block; flex: none; width: 13px; height: 13px; border-radius: 50%; text-decoration: none; opacity: var(--k, 0); transform: scale(calc(.6 + .4 * var(--k, 0)));
  background: var(--navy-700) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M4 7.2l2 2 4-4.4' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px no-repeat; }

/* hedef panosu: ofisin arka duvarı üstünde (sağ üst); dağılım akışı panonun sol kenarından çıkar, sipariş akışı oraya döner */
.crm-board { position: absolute; left: 60.68%; right: 1%; top: 2%; padding: 6px 7px 6px; border-radius: 12px; background: rgba(255, 255, 255, .97); border: 1px solid var(--blue-200); box-shadow: 0 14px 28px -16px rgba(var(--navy-950-rgb), .45); font-size: var(--crm-fs); line-height: 16px; }
.crm-bh { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; margin: 0 1px 4px; white-space: nowrap; }
.crm-bh b { font-weight: 600; color: var(--ink); }
.crm-bh span { color: var(--muted); }
.crm-ms, .crm-gb { list-style: none; margin: 0; padding: 0; }
.crm-ms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; margin-bottom: 4px; }
.crm-ms li { display: grid; padding: 1px 5px; border-radius: 6px; background: var(--blue-50); white-space: nowrap; opacity: 0; }
.crm-ms span { color: var(--muted); }
.crm-ms b { font-size: 13px; color: var(--navy-800); font-weight: 600; font-variant-numeric: tabular-nums; }
.crm-gb { display: grid; gap: 1px; }
.crm-gb li { position: relative; display: grid; grid-template-columns: 78px minmax(0, 1fr) 32px; gap: 5px; align-items: center; padding: 0 3px; border-radius: 5px; white-space: nowrap; opacity: 0; }
.crm-gb li::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1.5px var(--blue-500); opacity: var(--on, 0); }
.crm-gb span { color: var(--ink-2); }
.crm-gb li > i { display: block; height: 6px; border-radius: 999px; background: var(--blue-100); overflow: hidden; }
.crm-gb li > i > i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--grad-brand); transform-origin: 0 50%; transform: scaleX(0); }
.crm-gb li > i > i.crm-lo { background: var(--blue-300); }
.crm-gb b { text-align: right; font-weight: 600; color: var(--navy-800); font-variant-numeric: tabular-nums; }

/* adımlar + durum */
.crm-foot { display: block; }   /* site: .mock-foot flex; burada adımlar üstte, durum altta */
.crm-steps { list-style: none; margin: 0; padding: 0 4px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.crm-steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.crm-steps li + li::before, .crm-steps li + li::after { content: ""; position: absolute; top: 9px; left: calc(-50% + 14px); right: calc(50% + 14px); height: 2px; border-radius: 2px; background: var(--line); }
.crm-steps li + li::after { background: var(--grad-brand); transform-origin: 0 50%; transform: scaleX(var(--c, 0)); }
.crm-nd, .crm-nd svg { display: block; width: 20px; height: 20px; overflow: visible; }
.crm-nd .crm-tr { fill: #fff; stroke: var(--line); stroke-width: 2; }
.crm-nd .crm-pr { fill: none; stroke: url(#crm-gStep); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 47.12; stroke-dashoffset: 47.12; transform: rotate(-90deg); transform-origin: 10px 10px; }
.crm-nd .crm-fi { fill: var(--navy-700); opacity: 0; transform-origin: 10px 10px; }
.crm-nd .crm-ck { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 12; stroke-dashoffset: 12; }
.crm-lb { font-size: var(--crm-fs); line-height: 15px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.crm-status { display: flex; align-items: center; gap: 9px; margin: 9px 4px 0; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink-2); }
.crm-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--blue-500); box-shadow: 0 0 0 3px rgba(var(--blue-500-rgb), .16); }
.crm-st { position: relative; flex: 1; min-width: 0; height: 18px; }
.crm-st > span { position: absolute; inset: 0 0 auto 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* orta genişlik: durum satırı iki satıra kadar */
@container (max-width: 499px) {
  .crm-ph { left: 25%; }
  .crm-status { align-items: flex-start; min-height: 36px; }
  .crm-dot { margin-top: 5px; }
  .crm-st { height: 36px; }
  .crm-st > span { white-space: normal; }
}
/* dar kart: hedef panosu sahnenin altında; etiketler gizli (bilgi durum satırında ve telefonda) */
@container (max-width: 440px) {
  .crm-bar { padding: 10px 12px; }
  .crm-kpis { justify-content: flex-start; gap: 4px; padding: 7px 10px 0; }
  .crm-kpis div { flex: 1 1 auto; min-width: 0; flex-direction: column; align-items: flex-start; gap: 0; padding: 3px 8px; border-radius: 10px; }
  .crm-kpis div::after { border-radius: 12px; }
  .crm-scene { display: grid; }
  .crm-stage { grid-area: 1 / 1; }
  .crm-board { position: relative; grid-area: 2 / 1; left: auto; right: auto; top: auto; margin: 0 10px 10px; }
  .crm-tag, .crm-rtag { display: none; }
  .crm-ph { top: 4px; transform: translateY(var(--dy, 0px)); }
  /* dar kartta adım etiketleri iki sıra (komşu etiketler çakışmasın); son etiket sağa yaslı */
  .crm-steps li:nth-child(even) .crm-lb { margin-top: 17px; }
  .crm-steps li:last-child .crm-lb { align-self: flex-end; }
  .crm-foot { padding: 9px 6px 10px; }
  .crm-status { font-size: 12.5px; line-height: 17px; }
  .crm-st { height: 34px; }
}
@container (max-width: 300px) {
  .crm-kpis div { padding: 3px 5px; }
  .crm-ph { left: 22%; }
}
