/* 15.10.2026 — карточки менеджеров в аналитике (владелец: «красивее и понятней, маленький график
   в карточке менеджера и цифры»). Отдельным слоем, как wa-view.css: локальная и серверная app.css разошлись. */

.mcards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px; margin-bottom: 14px;
}
.mcard {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 14px; min-width: 0;
}
.mcard--nobody { background: var(--panel-2); border-style: dashed; }

.mcard__head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mcard__ava {
  flex: 0 0 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-size: 14px; letter-spacing: .02em;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent);
}
.mcard--nobody .mcard__ava { background: var(--panel); color: var(--muted); }
.mcard__who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.mcard__who b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcard__who small { color: var(--muted); font-size: 12px; }
.mcard__conv { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.mcard__conv b { font-size: 20px; font-weight: 800; color: var(--ok); }
.mcard__conv small { color: var(--muted); font-size: 11px; }
.mcard__conv.is-zero b { color: var(--muted); }

.mcard__nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.55fr); gap: 6px; }
.mnum {
  background: var(--panel-2); border-radius: var(--radius-s); padding: 8px 9px;
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.mnum b { font-size: 18px; font-weight: 800; line-height: 1.15; white-space: nowrap; display: flex; align-items: baseline; gap: 4px; }
.mnum--money b { font-size: 15px; padding-top: 2px; overflow: hidden; text-overflow: ellipsis; }
.mnum span { color: var(--muted); font-size: 11px; }
.mnum__delta { font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); }
.mnum__delta.is-up { color: var(--ok); }
.mnum__delta.is-down { color: var(--alert, #d14b4b); }

.mcard__chart { display: flex; flex-direction: column; gap: 4px; }
.mspark { width: 100%; height: auto; display: block; overflow: visible; }
.mspark__grid { stroke: var(--line); stroke-width: 1; }
.mspark__line { fill: none; stroke: var(--chart-1); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.mspark__area { fill: var(--chart-1); opacity: .08; }
.mspark__won { fill: none; stroke: var(--chart-2); stroke-width: 1.8; stroke-linejoin: round; opacity: .9; }
.mspark__dot { fill: var(--chart-2); stroke: var(--bg); stroke-width: 1.5; }   /* продажа поверх линии лидов — не прячется */
.mspark__lab { font-size: 9px; fill: var(--muted); }
.mcard__legend { display: flex; gap: 14px; color: var(--muted); font-size: 11px; }
.mcard__legend span { display: inline-flex; align-items: center; gap: 5px; }
.lg { display: inline-block; }
.lg--bar { width: 14px; height: 3px; border-radius: 2px; background: var(--chart-1); }
.lg--dot { width: 14px; height: 3px; border-radius: 2px; background: var(--chart-2); }

.mcard__facts { list-style: none; margin: 0; padding: 10px 0 0; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.mcard__facts li { display: flex; gap: 10px; font-size: 13px; min-width: 0; }
.mcard__facts span { flex: 0 0 92px; color: var(--muted); }
.mcard__facts b { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.mcard__facts .is-alert { font-style: normal; color: var(--alert, #d14b4b); }

@media (max-width: 420px) {
  .mcard__nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mnum--money b { font-size: 15px; }
}
