/* Korsa CRM v2 — тёплый светлый фон, полупрозрачные карточки, цветные карточки сделок */

@font-face { font-family: "Onest"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/onest-cyrillic-ext.woff2) format("woff2-variations");
  unicode-range: u+0460-052f, u+1c80-1c8a, u+20b4, u+2de0-2dff, u+a640-a69f, u+fe2e-fe2f; }
@font-face { font-family: "Onest"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/onest-cyrillic.woff2) format("woff2-variations");
  unicode-range: u+0301, u+0400-045f, u+0490-0491, u+04b0-04b1, u+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/onest-latin-ext.woff2) format("woff2-variations");
  unicode-range: u+0100-02ba, u+02bd-02c5, u+02c7-02cc, u+02ce-02d7, u+02dd-02ff, u+0304, u+0308, u+0329, u+1d00-1dbf, u+1e00-1e9f, u+1ef2-1eff, u+2020, u+20a0-20ab, u+20ad-20c0, u+2113, u+2c60-2c7f, u+a720-a7ff; }
@font-face { font-family: "Onest"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/onest-latin.woff2) format("woff2-variations");
  unicode-range: u+0000-00ff, u+0131, u+0152-0153, u+02bb-02bc, u+02c6, u+02da, u+02dc, u+0304, u+0308, u+0329, u+2000-206f, u+20ac, u+2122, u+2191, u+2193, u+2212, u+2215, u+feff, u+fffd; }

:root {
  --ink: #171614;
  --ink-2: #3b3934;
  --muted: #8a867e;
  --faint: #b9b4ab;
  --line: rgba(23, 22, 20, .09);
  --line-2: rgba(23, 22, 20, .06);
  --page: #efebe4;
  --card: rgba(251, 250, 247, .66);
  --card-solid: #f8f6f2;
  --card-edge: rgba(255, 255, 255, .75);
  --chip: rgba(255, 255, 255, .72);
  --soft: rgba(23, 22, 20, .055);
  --soft-2: rgba(23, 22, 20, .035);
  --field: rgba(255, 255, 255, .7);
  --shadow: 0 1px 2px rgba(48, 40, 28, .04), 0 10px 30px -12px rgba(48, 40, 28, .12);
  --shadow-lg: 0 30px 80px -20px rgba(30, 24, 16, .35);

  --yellow: #f2c744;
  --green: #2c5a4d;
  --orange: #d34a1e;
  --rust: #93391a;
  --black: #1b1a18;
  --good: #2c7a55;
  --bad: #d34a1e;

  --r-xl: 26px;
  --r-lg: 20px;
  --r-md: 14px;

  color-scheme: light;
}
:root[data-theme="dark"] {
  --ink: #f3f0ea;
  --ink-2: #d4d0c8;
  --muted: #9a958c;
  --faint: #67635c;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .06);
  --page: #12110f;
  --card: rgba(34, 32, 29, .72);
  --card-solid: #1f1d1a;
  --card-edge: rgba(255, 255, 255, .06);
  --chip: rgba(255, 255, 255, .07);
  --soft: rgba(255, 255, 255, .07);
  --soft-2: rgba(255, 255, 255, .04);
  --field: rgba(255, 255, 255, .06);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 30px -12px rgba(0, 0, 0, .5);
  --black: #2b2925;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
/* тёплая подсветка как в макете: персик сверху слева, зелень снизу справа */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 45% at 8% 0%, rgba(244, 206, 160, .55), transparent 70%),
    radial-gradient(50% 40% at 70% 4%, rgba(246, 232, 205, .7), transparent 70%),
    radial-gradient(60% 50% at 100% 100%, rgba(214, 226, 214, .6), transparent 70%),
    radial-gradient(40% 40% at 0% 100%, rgba(232, 226, 214, .5), transparent 70%);
}
:root[data-theme="dark"] body::before {
  background:
    radial-gradient(60% 45% at 8% 0%, rgba(120, 78, 40, .22), transparent 70%),
    radial-gradient(60% 50% at 100% 100%, rgba(44, 90, 77, .2), transparent 70%);
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
.muted { color: var(--muted); }
.spacer { flex: 1; }
.nowrap { white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }

/* ============================== каркас ============================== */
.shell { max-width: 1240px; margin: 0 auto; padding: 22px 28px 120px 104px; }
.top { display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 500; letter-spacing: -.01em; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; background: #171614; color: #fff; display: grid; place-items: center; font-size: 19px; font-weight: 500; }
:root[data-theme="dark"] .brand-mark { background: #f3f0ea; color: #171614; }
.brand small { font-size: 11px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; margin-left: 2px; letter-spacing: .02em; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.circle-btn {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--chip); border: 1px solid var(--card-edge); box-shadow: var(--shadow); position: relative;
  transition: transform .12s, background .12s;
}
.circle-btn:hover { transform: translateY(-1px); background: var(--card-solid); }
.circle-btn svg { width: 17px; height: 17px; }
.circle-btn.sm { width: 32px; height: 32px; box-shadow: none; background: transparent; border-color: var(--line); }
.circle-btn.sm svg { width: 15px; height: 15px; }
.circle-btn .dot { position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 2px var(--card-solid); }
.me-btn { width: 42px; height: 42px; border-radius: 50%; padding: 2px; background: var(--chip); border: 1px solid var(--card-edge); box-shadow: var(--shadow); }
.me-btn .ava { width: 100%; height: 100%; font-size: 15px; }

.nav { position: relative; display: flex; gap: 2px; margin: 22px 0 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { position: relative; z-index: 1; padding: 9px 17px; border-radius: 999px; font-size: 15px; font-weight: 500; white-space: nowrap; transition: color .25s; }
.nav a:hover { color: var(--ink); }
.nav a.on { color: #fff; }
:root[data-theme="dark"] .nav a.on { color: #171614; }
.nav-pill { position: absolute; z-index: 0; top: 0; height: 100%; border-radius: 999px; background: #171614; transition: left .35s cubic-bezier(.4, .1, .2, 1), width .35s cubic-bezier(.4, .1, .2, 1); }
:root[data-theme="dark"] .nav-pill { background: #f3f0ea; }

/* плавающая чёрная панель слева */
.rail {
  position: fixed; left: max(14px, calc((100vw - 1240px) / 2 + 16px)); top: 50%; transform: translateY(-50%); z-index: 30;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 7px; border-radius: 999px; background: #171614; color: #e9e6e0;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .6);
}
:root[data-theme="dark"] .rail { background: #26241f; }
.rail button { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #d9d5cd; transition: background .15s, color .15s; position: relative; }
.rail button:hover, .rail button.on { background: rgba(255, 255, 255, .12); color: #fff; }
.rail button svg { width: 17px; height: 17px; }
.rail hr { width: 20px; border: 0; border-top: 1px solid rgba(255, 255, 255, .14); margin: 4px 0; }
.rail button[data-tip]:hover::after {
  content: attr(data-tip); position: absolute; left: 50px; top: 50%; transform: translateY(-50%);
  background: #171614; color: #fff; font-size: 12.5px; font-weight: 500; padding: 5px 10px; border-radius: 8px; white-space: nowrap; pointer-events: none;
}

/* ============================== заголовок страницы ============================== */
.page { animation: pageIn .35s ease both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: flex-end; gap: 28px; margin: 34px 0 22px; flex-wrap: wrap; }
.page-title { display: flex; align-items: center; gap: 16px; }
.page-title h1 { margin: 0; font-size: 30px; font-weight: 500; line-height: 1.04; letter-spacing: -.015em; }
.back-btn { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--chip); border: 1px solid var(--card-edge); box-shadow: var(--shadow); }
.back-btn svg { width: 18px; height: 18px; }
.kpis { display: flex; flex-wrap: wrap; gap: 14px 34px; align-items: center; }
.page-head.stacked { flex-direction: column; align-items: flex-start; gap: 18px; }
.kpi { display: flex; align-items: center; gap: 12px; min-width: 0; }
.kpi-ico { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--chip); border: 1px solid var(--card-edge); }
.kpi-ico svg { width: 17px; height: 17px; }
.kpi-val { display: flex; align-items: center; gap: 8px; font-size: 21px; font-weight: 600; letter-spacing: -.01em; line-height: 1.15; white-space: nowrap; }
.kpi-lbl { font-size: 13px; color: var(--muted); line-height: 1.3; max-width: 190px; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: 0; white-space: nowrap; line-height: 1.5; }
.badge.green { background: var(--green); color: #fff; }
.badge.yellow { background: var(--yellow); color: #171614; }
.badge.red { background: var(--orange); color: #fff; }
.badge.ghost { background: var(--chip); color: var(--ink-2); border: 1px solid var(--line); }

/* ============================== карточки ============================== */
.card {
  background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--r-xl);
  box-shadow: var(--shadow); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  padding: 20px 20px 22px; min-width: 0;
}
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; min-height: 36px; }
.card-head h3 { margin: 0; font-size: 16px; font-weight: 500; }
.card-head .hint { font-size: 13.5px; color: var(--muted); }
.card-head .acts { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.grid { display: grid; gap: 16px; }
.grid > * { min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.big-num { font-size: 32px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.big-num-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.big-num-row .sub { font-size: 13.5px; color: var(--muted); }
.big-num-row .sub b { color: var(--ink); font-weight: 600; }

/* переключатель 6M / 12M */
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--soft); gap: 2px; flex: none; }
.seg button { padding: 6px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--muted); white-space: nowrap; transition: background .2s, color .2s; }
.seg button.on { background: var(--card-solid); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.seg button:hover { color: var(--ink); }

.legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; color: var(--muted); margin: 4px 0 6px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.legend i.dash { width: 14px; height: 0; border-radius: 0; border-top: 2px dashed var(--ink); }
.legend b { color: var(--ink); font-weight: 500; }

/* кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px;
  border-radius: 999px; font-size: 14.5px; font-weight: 500; white-space: nowrap;
  background: var(--chip); border: 1px solid var(--line); transition: background .15s, transform .12s;
}
.btn:hover { background: var(--card-solid); }
.btn:active { transform: scale(.98); }
.btn svg { width: 16px; height: 16px; }
.btn.dark { background: #171614; color: #fff; border-color: #171614; }
.btn.dark:hover { background: #2c2a26; }
:root[data-theme="dark"] .btn.dark { background: #f3f0ea; color: #171614; border-color: #f3f0ea; }
.btn.sm { height: 34px; padding: 0 14px; font-size: 13.5px; }
.btn.ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn.white { background: #fff; color: #171614; border-color: #fff; }
.btn.danger { color: var(--orange); }
.btn:disabled { opacity: .55; cursor: default; }

.search {
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; border-radius: 999px;
  background: var(--field); border: 1px solid var(--card-edge); min-width: 0;
}
.search svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.search input { border: 0; outline: 0; background: transparent; width: 100%; font-size: 14.5px; }
.search input::placeholder { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { height: 34px; padding: 0 14px; border-radius: 999px; font-size: 13.5px; font-weight: 500; background: var(--chip); border: 1px solid var(--card-edge); }
.chip-btn.on { background: #171614; color: #fff; border-color: #171614; }
:root[data-theme="dark"] .chip-btn.on { background: #f3f0ea; color: #171614; }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 500; background: var(--chip); border: 1px solid var(--line-2); white-space: nowrap; }
.tag svg { width: 13px; height: 13px; }

/* аватары */
.ava { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; color: #2b2925; background: #e9e1d3; border: 2px solid var(--card-solid); overflow: hidden; }
.ava.c0 { background: #dfe9e2; color: #2c5a4d; }
.ava.c1 { background: #f6dccb; color: #9a3a16; }
.ava.c2 { background: #e2e0f2; color: #4e4a8f; }
.ava.c3 { background: #f7ebc4; color: #7d5c08; }
.ava.c4 { background: #e3ecf3; color: #2f5876; }
.ava.c5 { background: #efe0e8; color: #7d3a5c; }
.ava.lg { width: 46px; height: 46px; font-size: 15px; border-width: 0; }
.avas { display: flex; }
.avas .ava { width: 26px; height: 26px; font-size: 10.5px; margin-left: -8px; border-width: 2px; }
.avas .ava:first-child { margin-left: 0; }

/* ============================== графики ============================== */
.chart { position: relative; width: 100%; }
.chart svg { width: 100%; overflow: visible; }
.chart .axis text { font-size: 11.5px; fill: var(--muted); font-family: inherit; }
.chart .grid-line { stroke: var(--line); stroke-dasharray: 2 4; }
.chart-tip {
  position: absolute; pointer-events: none; z-index: 5; min-width: 120px;
  background: var(--card-solid); border: 1px solid var(--line); border-radius: 12px; padding: 8px 11px; font-size: 12.5px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .25); transform: translate(-50%, -100%); white-space: nowrap;
}
.chart-tip b { display: block; font-weight: 600; margin-bottom: 3px; }
.chart-tip div { display: flex; align-items: center; gap: 7px; justify-content: space-between; }
.chart-tip i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 5px; }
.chart-tip span { color: var(--muted); }

/* ============================== цветные карточки сделок ============================== */
.dcard {
  position: relative; border-radius: 18px; padding: 14px 14px 13px; min-height: 150px; display: flex; flex-direction: column;
  color: #fff; cursor: pointer; transition: transform .15s, box-shadow .15s; user-select: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 10px 22px -14px rgba(0, 0, 0, .35);
}
.dcard:hover { transform: translateY(-2px); }
.dcard .d-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; opacity: .82; min-height: 28px; }
.dcard .d-more { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .35); opacity: 1; flex: none; }
.dcard .d-more svg { width: 14px; height: 14px; }
.dcard .d-title { font-size: 17px; font-weight: 500; line-height: 1.2; margin-top: 6px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; letter-spacing: -.005em; }
.dcard .d-sub { font-size: 12.5px; opacity: .72; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dcard .d-foot { margin-top: auto; padding-top: 12px; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.dcard .d-sum { font-size: 19px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.dcard .d-meta { font-size: 12px; opacity: .72; margin-top: 1px; }
.dcard .avas .ava { border-color: rgba(255, 255, 255, .25); }
.dcard.t-yellow { background: var(--yellow); color: #171614; }
.dcard.t-yellow .d-more { border-color: rgba(23, 22, 20, .25); }
.dcard.t-green { background: var(--green); }
.dcard.t-orange { background: var(--orange); }
.dcard.t-rust { background: var(--rust); }
.dcard.t-ink { background: #1b1a18; }
.dcard.t-light { background: var(--card-solid); color: var(--ink); border: 1px solid var(--line-2); box-shadow: none; }
.dcard.t-light .d-more { border-color: var(--line); }
.dcard.t-light .d-sum { color: var(--muted); }
.dcard .won-mark { display: inline-flex; align-items: center; gap: 3px; color: var(--good); font-weight: 600; opacity: 1; }
.dcard .lost-mark { color: var(--orange); font-weight: 600; }
.dcard.compact { min-height: 0; }
.dcard.dragging { opacity: .35; transform: scale(.98); }
.dcard.ghost { position: fixed; z-index: 100; pointer-events: none; transform: rotate(-2deg) scale(1.03); box-shadow: 0 30px 50px -20px rgba(0, 0, 0, .45); opacity: .96; }

.hot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

/* кольцо квоты */
.quota { background: var(--green); color: #fff; border-color: transparent; display: flex; flex-direction: column; }
.quota .circle-btn.sm { border-color: rgba(255, 255, 255, .3); color: #fff; }
.ring { position: relative; width: 170px; height: 170px; margin: 6px auto 4px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .ring-txt { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .ring-txt b { display: block; font-size: 34px; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.ring .ring-txt span { font-size: 12.5px; opacity: .75; }
.quota-foot { font-size: 13px; opacity: .8; text-align: center; margin-top: 6px; }

.mix-bar { display: flex; gap: 6px; height: 40px; margin: 14px 0 16px; }
.mix-bar i { border-radius: 12px; min-width: 6px; transition: flex .4s; }
.mix-rows .row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line-2); font-size: 14px; }
.mix-rows .row:first-child { border-top: 0; }
.mix-rows .row i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.mix-rows .row b { font-weight: 600; margin-left: auto; white-space: nowrap; }
.mix-rows .row span.pct { width: 44px; text-align: right; color: var(--muted); font-size: 13px; }

/* ============================== воронка ============================== */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .search { width: 260px; }
.who-filter { display: flex; gap: 6px; }
.who-filter button { border-radius: 50%; padding: 0; transition: transform .12s, opacity .15s; }
.who-filter button .ava { width: 38px; height: 38px; font-size: 13.5px; border-width: 2px; }
.who-filter.has-on button:not(.on) { opacity: .4; }
.who-filter button.on .ava { box-shadow: 0 0 0 2px #171614; }

.board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: flex-start; scroll-snap-type: x proximity; }
.col {
  flex: 0 0 300px; min-width: 0; display: flex; flex-direction: column; max-height: calc(100vh - 310px); min-height: 220px;
  background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--r-xl); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: background .2s, box-shadow .2s; scroll-snap-align: start;
}
.col.over { background: rgba(44, 90, 77, .12); box-shadow: 0 0 0 2px var(--green) inset; }
.col-head { padding: 14px 16px 10px; }
.col-head .t { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; }
.col-head .t i { width: 10px; height: 10px; border-radius: 50%; }
.col-head .t .cnt { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--soft); border-radius: 999px; padding: 0 7px; }
.col-head .t .circle-btn.sm { margin-left: auto; }
.col-head .s { font-size: 13px; color: var(--muted); margin-top: 2px; padding-left: 18px; }
.col-body { padding: 4px 10px 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; flex: 1; scrollbar-width: thin; }
/* карточки в длинной колонке не сжимаются по высоте — колонка прокручивается */
.col-body > * { flex-shrink: 0; }
.col-body .dcard { min-height: 138px; }
.col-empty { font-size: 13px; color: var(--muted); text-align: center; padding: 26px 8px; border: 1.5px dashed var(--line); border-radius: 16px; }

.dock {
  position: sticky; bottom: 14px; z-index: 20; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px;
}
.drop {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 22px;
  background: var(--card-solid); border: 1.5px dashed var(--line); box-shadow: var(--shadow); transition: background .2s, border-color .2s, transform .2s;
  position: relative;
}
.drop .ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.drop.won .ico { background: var(--green); color: #fff; }
.drop.lost .ico { background: var(--soft); color: var(--muted); }
.drop .ico svg { width: 17px; height: 17px; }
.drop b { display: block; font-size: 15px; font-weight: 500; }
.drop span { font-size: 12.5px; color: var(--muted); }
.drop .hint { margin-left: auto; font-size: 13px; color: var(--muted); }
.drop.over.won { background: rgba(44, 90, 77, .12); border-color: var(--green); transform: translateY(-2px); }
.drop.over.lost { background: rgba(211, 74, 30, .1); border-color: var(--orange); transform: translateY(-2px); }
.drop .plus { position: absolute; left: 140px; top: -22px; font-size: 13px; font-weight: 600; color: var(--good); animation: floatUp 1.4s ease forwards; }
@keyframes floatUp { from { opacity: 0; transform: translateY(8px); } 20% { opacity: 1; } to { opacity: 0; transform: translateY(-14px); } }

/* таблицы */
.table-wrap { overflow-x: auto; margin: 0 -6px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12.5px; font-weight: 500; color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th.sortable { cursor: pointer; }
.tbl th.sortable:hover { color: var(--ink); }
.tbl td { padding: 12px 8px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { cursor: pointer; transition: background .12s; }
.tbl tbody tr:hover { background: var(--soft-2); }
.tbl .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl .strong { font-weight: 600; }
.tbl .sub { font-size: 12.5px; color: var(--muted); }
.who-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who-cell .ava { width: 30px; height: 30px; border-width: 0; }
.who-cell b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 500; background: var(--soft); white-space: nowrap; }
.status i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.status.paid i { background: var(--good); }
.status.due i { background: var(--yellow); }
.status.overdue { background: rgba(211, 74, 30, .12); color: var(--orange); }
.status.overdue i { background: var(--orange); }
.status.draft i { background: var(--faint); }
.dot-btn { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.dot-btn:hover { background: var(--soft); color: var(--ink); }
.dot-btn svg { width: 16px; height: 16px; }
.show-all { display: flex; justify-content: center; margin-top: 10px; }

/* ============================== клиенты ============================== */
.cust-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.ccard { padding: 18px; cursor: pointer; transition: transform .15s; display: flex; flex-direction: column; gap: 12px; }
.ccard:hover { transform: translateY(-2px); }
.ccard .c-top { display: flex; align-items: flex-start; justify-content: space-between; }
.star-btn { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); color: var(--ink-2); transition: transform .15s, background .15s; flex: none; }
.star-btn svg { width: 15px; height: 15px; }
.star-btn.on { background: var(--yellow); border-color: var(--yellow); color: #171614; }
.star-btn.on svg { fill: currentColor; }
.star-btn:active { transform: scale(.88); }
.ccard .c-name { font-size: 17px; font-weight: 500; line-height: 1.2; }
.ccard .c-role { font-size: 13px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-box { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: var(--soft); border-radius: 14px; padding: 10px 12px; }
.c-box span { display: block; font-size: 12px; color: var(--muted); }
.c-box b { font-size: 14.5px; font-weight: 600; white-space: nowrap; }
.health { display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 600; }
.health .track { flex: 1; height: 4px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.health .fill { height: 100%; border-radius: 4px; background: var(--good); transition: width .4s; }
.health .fill.low { background: var(--orange); }
.ccard .c-foot { display: flex; align-items: center; gap: 8px; }
.ccard .c-foot .circle-btn.sm { box-shadow: none; }

/* карточка клиента */
.cust-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.profile { display: flex; flex-direction: column; align-items: center; text-align: center; }
.profile .p-acts { align-self: stretch; display: flex; align-items: center; gap: 8px; }
.profile .p-acts .r { margin-left: auto; display: flex; gap: 8px; }
.ava-ring { position: relative; width: 134px; height: 134px; margin: 6px 0 14px; }
.ava-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ava-ring .ava { position: absolute; inset: 12px; width: auto; height: auto; font-size: 34px; border: 0; }
.ava-ring .score { position: absolute; right: 2px; bottom: 6px; background: #171614; color: #fff; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 8px; border: 2px solid var(--card-solid); }
.profile h2 { margin: 0; font-size: 23px; font-weight: 500; letter-spacing: -.01em; }
.profile .role { font-size: 13.5px; color: var(--muted); margin-top: 4px; max-width: 260px; }
.profile .tags { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 14px 0 16px; }
.profile .p-buttons { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.profile .p-buttons .circle-btn { width: 42px; height: 42px; box-shadow: none; }
.fields .f { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-top: 1px solid var(--line-2); }
.fields .f:first-child { border-top: 0; }
.fields .f > svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.fields .f .v { flex: 1; min-width: 0; }
.fields .f .v span { display: block; font-size: 12px; color: var(--muted); }
.fields .f .v b { display: block; font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fields .f .v b.empty { color: var(--faint); font-weight: 400; }
.fields .f .v input { width: 100%; border: 0; border-bottom: 1.5px solid var(--ink); background: transparent; outline: 0; font-size: 15px; font-weight: 500; padding: 1px 0; }
.src-icons { display: flex; gap: 8px; margin-top: 4px; }
.src-icons a { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); font-size: 10.5px; font-weight: 700; }
.src-icons a.tg { color: #2a8bc9; }
.src-icons a.wa { color: #23a35a; }
.src-icons a.ig { color: #c13584; }
.src-icons a.vk { color: #2f6db5; }
.src-icons a.ml { color: var(--ink-2); }
.hist-scroll { display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-auto-columns: minmax(170px, 186px); gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.hist-scroll .dcard { min-height: 118px; padding: 12px; }
.hist-scroll .dcard .d-title { font-size: 14.5px; }
.hist-scroll .dcard .d-sum { font-size: 18px; }

/* календарь */
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.cal-head .m { font-size: 18px; font-weight: 500; margin: 0 auto; text-transform: capitalize; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal .wd { font-size: 11.5px; color: var(--muted); padding: 4px 0; }
.cal button { aspect-ratio: 1; border-radius: 50%; font-size: 13.5px; position: relative; display: grid; place-items: center; max-width: 42px; justify-self: center; width: 100%; }
.cal button:hover { background: var(--soft); }
.cal button.out { color: var(--faint); }
.cal button.today { box-shadow: 0 0 0 1.5px var(--ink) inset; }
.cal button.sel { background: #171614; color: #fff; }
:root[data-theme="dark"] .cal button.sel { background: #f3f0ea; color: #171614; }
.cal button i { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; border-radius: 50%; background: var(--orange); }
.cal button.sel i { background: var(--yellow); }
.task-list { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.task { display: flex; align-items: flex-start; gap: 10px; padding: 9px 6px; border-radius: 12px; font-size: 14px; }
.task:hover { background: var(--soft-2); }
.task .chk { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--faint); flex: none; margin-top: 1px; display: grid; place-items: center; }
.task .chk.on { background: var(--green); border-color: var(--green); color: #fff; }
.task .chk svg { width: 12px; height: 12px; }
.task .tt { flex: 1; min-width: 0; cursor: pointer; }
.task .tt b { display: block; font-weight: 500; overflow-wrap: anywhere; }
.task .tt span { font-size: 12.5px; color: var(--muted); }
.task.done .tt b { color: var(--muted); text-decoration: line-through; }
.task .when { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.task .when.late { color: var(--orange); font-weight: 600; }
.p-empty { padding: 18px 6px; text-align: center; color: var(--muted); font-size: 14px; }

/* расписание */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.day { min-height: 260px; padding: 12px 10px; display: flex; flex-direction: column; gap: 8px; }
.day .dh { display: flex; align-items: baseline; justify-content: space-between; padding: 0 4px 6px; }
.day .dh b { font-size: 22px; font-weight: 600; }
.day .dh span { font-size: 12.5px; color: var(--muted); text-transform: capitalize; }
.day.today { box-shadow: 0 0 0 2px #171614 inset, var(--shadow); }
:root[data-theme="dark"] .day.today { box-shadow: 0 0 0 2px #f3f0ea inset, var(--shadow); }
.day.off { opacity: .7; }
.tcard { border-radius: 14px; padding: 9px 10px; font-size: 13px; cursor: pointer; background: var(--card-solid); border: 1px solid var(--line-2); transition: transform .12s; }
.tcard:hover { transform: translateY(-1px); }
.tcard b { display: block; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.tcard span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.tcard.t-yellow { background: var(--yellow); color: #171614; border-color: transparent; }
.tcard.t-green { background: var(--green); color: #fff; border-color: transparent; }
.tcard.t-orange { background: var(--orange); color: #fff; border-color: transparent; }
.tcard.t-rust { background: var(--rust); color: #fff; border-color: transparent; }
.tcard.t-ink { background: #1b1a18; color: #fff; border-color: transparent; }
.tcard[class*="t-"] span { color: inherit; opacity: .75; }
.tcard.done { opacity: .45; text-decoration: line-through; }
.day .add { margin-top: auto; height: 32px; border-radius: 12px; border: 1.5px dashed var(--line); color: var(--muted); font-size: 13px; }
.day .add:hover { color: var(--ink); border-color: var(--faint); }

/* ============================== финансы ============================== */
.aging-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.aging-bars .b { height: 112px; border-radius: 14px; background: var(--soft); position: relative; overflow: hidden; }
.aging-bars .b i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 14px; background: #3b3a36; transition: height .5s cubic-bezier(.3, .7, .2, 1); min-height: 4px; }
:root[data-theme="dark"] .aging-bars .b i { background: #cfcac0; }
.aging-bars .b.late i { background: var(--orange); }
.aging-bars .lbl { text-align: center; font-size: 12px; color: var(--muted); margin-top: 6px; }
.aging-rows .row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line-2); font-size: 14px; }
.aging-rows .row:first-child { border-top: 0; margin-top: 8px; }
.aging-rows .row i { width: 8px; height: 8px; border-radius: 2px; background: #3b3a36; }
:root[data-theme="dark"] .aging-rows .row i { background: #cfcac0; }
.aging-rows .row.late i { background: var(--orange); }
.aging-rows .row span { margin-left: auto; font-size: 13px; color: var(--muted); }
.aging-rows .row b { width: 110px; text-align: right; font-weight: 600; }

/* документ счёта */
.invoice-doc { background: var(--card-solid); border: 1px solid var(--line); border-radius: 22px; padding: 26px 24px 22px; box-shadow: 0 20px 40px -24px rgba(0, 0, 0, .3); position: relative; overflow: hidden; }
.invoice-doc .ih { display: flex; justify-content: space-between; align-items: flex-start; }
.invoice-doc .ih .brand { font-size: 22px; }
.invoice-doc .ih .num { text-align: right; }
.invoice-doc .ih .num span { display: block; font-size: 11.5px; letter-spacing: .12em; color: var(--muted); font-weight: 600; }
.invoice-doc .ih .num b { font-size: 19px; font-weight: 600; }
.invoice-doc .parties { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 26px 0 18px; font-size: 14px; line-height: 1.6; }
.invoice-doc .cap { font-size: 11.5px; letter-spacing: .12em; color: var(--muted); font-weight: 600; margin-bottom: 4px; text-transform: uppercase; }
.invoice-doc .parties b { display: block; font-weight: 600; }
.invoice-doc .parties div div { color: var(--ink-2); }
.invoice-doc .dates { display: flex; gap: 34px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; }
.invoice-doc .dates span { display: block; font-size: 12.5px; color: var(--muted); }
.invoice-doc .dates b { font-weight: 600; }
.invoice-doc table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
.invoice-doc th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.invoice-doc td { padding: 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.invoice-doc td small { display: block; color: var(--muted); font-size: 12.5px; }
.invoice-doc .r { text-align: right; }
.invoice-doc .totals { margin: 14px 0 0 auto; width: 62%; font-size: 14px; }
.invoice-doc .totals div { display: flex; justify-content: space-between; padding: 5px 0; color: var(--ink-2); }
.invoice-doc .totals .total { border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 10px; font-size: 16.5px; font-weight: 600; color: var(--ink); }
.invoice-doc .foot { font-size: 12.5px; color: var(--muted); margin-top: 18px; }
.stamp { position: absolute; left: 22px; bottom: 54px; transform: rotate(-14deg); border: 3px solid rgba(44, 122, 85, .55); color: rgba(44, 122, 85, .6); border-radius: 12px; padding: 4px 18px; font-size: 30px; font-weight: 700; letter-spacing: .12em; animation: stampIn .45s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes stampIn { from { opacity: 0; transform: rotate(-14deg) scale(1.6); } to { opacity: 1; transform: rotate(-14deg) scale(1); } }

/* ============================== отчёты ============================== */
.seg-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 8px; }
.seg-chip { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 999px; background: #1b1a18; color: #fff; font-size: 13px; font-weight: 500; transition: opacity .2s; }
.seg-chip i { width: 8px; height: 8px; border-radius: 50%; }
.seg-chip span { opacity: .7; }
.seg-chip.off { opacity: .35; }
:root[data-theme="dark"] .seg-chip { background: #2f2c27; }
.donut-wrap { position: relative; width: 190px; height: 190px; margin: 10px auto 14px; }
.donut-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut-wrap .c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.donut-wrap .c b { display: block; font-size: 26px; font-weight: 600; line-height: 1; }
.donut-wrap .c span { font-size: 12.5px; color: var(--muted); }
.src-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; font-size: 13.5px; }
.src-legend div { display: flex; align-items: center; gap: 7px; min-width: 0; }
.src-legend i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.src-legend span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.src-legend b { font-weight: 600; }
.src-legend em { font-style: normal; color: var(--muted); width: 38px; text-align: right; }

/* проекты */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.pcard { display: flex; flex-direction: column; gap: 14px; }
.pcard .ph { display: flex; align-items: center; gap: 10px; }
.pcard .ph i { width: 14px; height: 14px; border-radius: 5px; }
.pcard .ph h3 { margin: 0; font-size: 20px; font-weight: 500; }
.pcard .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pcard .stats div { background: var(--soft); border-radius: 14px; padding: 10px 12px; }
.pcard .stats span { display: block; font-size: 12px; color: var(--muted); }
.pcard .stats b { font-size: 16px; font-weight: 600; white-space: nowrap; }
.pcard .mini-deals { display: flex; flex-direction: column; gap: 2px; }
.pcard .mini-deals a { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 10px; font-size: 14px; }
.pcard .mini-deals a:hover { background: var(--soft-2); }
.pcard .mini-deals a i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.pcard .mini-deals a span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard .mini-deals a b { font-weight: 600; white-space: nowrap; }

/* ============================== окна, панели, меню ============================== */
.backdrop {
  position: fixed; inset: 0; z-index: 60; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 20px; overflow-y: auto;
  background: rgba(230, 224, 214, .32); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  animation: fadeIn .2s ease both;
}
:root[data-theme="dark"] .backdrop { background: rgba(0, 0, 0, .4); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.deal-modal {
  width: 640px; max-width: 100%; max-height: calc(100vh - 40px); overflow-y: auto; border-radius: 34px; padding: 30px 32px 30px;
  color: #fff; box-shadow: var(--shadow-lg); animation: popIn .32s cubic-bezier(.2, 1.1, .3, 1) both; transition: background .45s ease, color .45s ease;
}
@keyframes popIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
.deal-modal.t-yellow { background: var(--yellow); color: #171614; }
.deal-modal.t-green { background: var(--green); }
.deal-modal.t-orange { background: var(--orange); }
.deal-modal.t-rust { background: var(--rust); }
.deal-modal.t-ink { background: #1b1a18; }
.deal-modal.t-won { background: #e9efe9; color: #171614; }
.deal-modal.t-lost { background: #efe7e3; color: #171614; }
.deal-modal .mh { display: flex; justify-content: space-between; align-items: center; font-size: 14.5px; opacity: .85; }
.deal-modal .x { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid currentColor; opacity: .7; }
.deal-modal .x:hover { opacity: 1; }
.deal-modal .x svg { width: 18px; height: 18px; }
.deal-modal h2 { margin: 10px 0 4px; font-size: 31px; font-weight: 500; line-height: 1.12; letter-spacing: -.015em; }
.deal-modal .co { font-size: 16px; opacity: .72; }
.deal-modal .amt { font-size: 50px; font-weight: 600; letter-spacing: -.025em; margin: 18px 0 14px; line-height: 1; cursor: pointer; }
.stages-line { display: grid; gap: 8px; margin-bottom: 18px; }
.stages-line button { text-align: left; font-size: 13px; opacity: .75; line-height: 1.25; min-width: 0; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
.stages-line button i { display: block; height: 7px; border-radius: 999px; background: currentColor; opacity: .25; margin-bottom: 8px; transition: opacity .3s; }
.stages-line button.done i { opacity: .95; }
.stages-line button.cur { opacity: 1; font-weight: 600; }
.stages-line button:hover { opacity: 1; }
.deal-modal .facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px 18px; border-radius: 20px; background: rgba(255, 255, 255, .12); margin-bottom: 18px; }
.deal-modal.t-yellow .facts, .deal-modal.t-won .facts, .deal-modal.t-lost .facts { background: rgba(23, 22, 20, .07); }
.deal-modal .facts span { display: block; font-size: 13px; opacity: .72; }
.deal-modal .facts b { font-size: 17px; font-weight: 600; }
.deal-modal .people { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 14px; font-size: 16px; }
.deal-modal .people div { display: flex; align-items: center; gap: 8px; }
.deal-modal .people .ava { width: 40px; height: 40px; font-size: 14px; border: 0; }
.deal-modal .note { display: flex; gap: 12px; font-size: 16px; line-height: 1.45; opacity: .92; }
.deal-modal .note svg { width: 20px; height: 20px; flex: none; margin-top: 2px; opacity: .8; }
.deal-modal .mf { display: flex; align-items: center; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.deal-modal .mf .btn { height: 50px; padding: 0 22px; font-size: 16px; }
.deal-modal .mf .btn svg { width: 18px; height: 18px; }
.deal-modal.t-yellow .btn.ghost-light, .deal-modal.t-won .btn.ghost-light, .deal-modal.t-lost .btn.ghost-light { color: #171614; border-color: rgba(23, 22, 20, .4); }
.deal-modal.t-yellow .btn.white, .deal-modal.t-won .btn.white, .deal-modal.t-lost .btn.white { background: #171614; color: #fff; border-color: #171614; }
.deal-modal .mf .r { margin-left: auto; display: flex; gap: 10px; }
.deal-modal .mf .btn.white { max-width: 340px; }
.deal-modal .mf .btn.white span, .deal-modal .mf .btn { overflow: hidden; text-overflow: ellipsis; }
.deal-modal .reason { font-size: 15px; margin-bottom: 14px; padding: 10px 14px; border-radius: 14px; background: rgba(23, 22, 20, .06); }

.drawer-back { place-items: stretch end; padding: 12px; overflow: hidden; }
.drawer {
  width: min(560px, calc(100vw - 24px)); height: 100%; overflow-y: auto; overflow-x: hidden; border-radius: 28px; padding: 26px 24px;
  background: var(--card-solid); box-shadow: var(--shadow-lg); animation: slideIn .35s cubic-bezier(.2, .9, .3, 1) both;
}
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer .dh { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.drawer .dh h2 { margin: 0; font-size: 26px; font-weight: 500; letter-spacing: -.01em; }
.drawer .dh .sub { display: flex; align-items: center; gap: 12px; margin-top: 8px; font-size: 14.5px; }
.drawer .dh .sub span { color: var(--muted); }
.drawer .dh .circle-btn { margin-left: auto; }
.drawer .da { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* формы */
.form-modal { width: 520px; max-width: 100%; max-height: calc(100vh - 40px); overflow-y: auto; border-radius: 28px; padding: 24px; background: var(--card-solid); box-shadow: var(--shadow-lg); animation: popIn .28s cubic-bezier(.2, 1.1, .3, 1) both; }
.form-modal h3 { margin: 0 0 18px; font-size: 21px; font-weight: 500; display: flex; align-items: center; }
.form-modal h3 .circle-btn { margin-left: auto; }
.fld { display: block; margin-bottom: 12px; }
.fld > span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.fld input, .fld select, .fld textarea {
  width: 100%; height: 44px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--field); outline: 0; font-size: 15px;
}
.fld textarea { height: auto; min-height: 84px; padding: 11px 14px; resize: vertical; line-height: 1.45; }
.fld input:focus, .fld select:focus, .fld textarea:focus { border-color: var(--ink); }
.fld-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-foot { display: flex; gap: 10px; margin-top: 18px; }
.form-foot .r { margin-left: auto; display: flex; gap: 10px; }
.form-err { color: var(--orange); font-size: 13.5px; min-height: 18px; }

.menu {
  position: fixed; z-index: 90; min-width: 200px; padding: 6px; border-radius: 16px; background: var(--card-solid);
  border: 1px solid var(--line); box-shadow: 0 20px 40px -14px rgba(0, 0, 0, .3); animation: popIn .16s ease both;
}
.menu button, .menu a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 10px; font-size: 14.5px; text-align: left; }
.menu button:hover, .menu a:hover { background: var(--soft); }
.menu button svg, .menu a svg { width: 16px; height: 16px; color: var(--muted); }
.menu .sep { height: 1px; background: var(--line); margin: 4px 6px; }
.menu .danger { color: var(--orange); }
.menu .lbl { padding: 6px 12px 4px; font-size: 12px; color: var(--muted); }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 120; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 18px; border-radius: 999px;
  background: #171614; color: #fff; font-size: 14.5px; box-shadow: 0 16px 36px -12px rgba(0, 0, 0, .5);
  animation: toastIn .3s cubic-bezier(.2, 1.2, .3, 1) both; max-width: calc(100vw - 32px);
}
.toast svg { width: 16px; height: 16px; flex: none; }
.toast .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast button { height: 34px; padding: 0 16px; border-radius: 999px; background: var(--yellow); color: #171614; font-weight: 600; font-size: 14px; flex: none; }
.toast button.alt { background: rgba(255, 255, 255, .12); color: #fff; }
.toast:not(:has(button)) { padding-right: 18px; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }

.palette { width: 600px; max-width: 100%; align-self: start; margin-top: 10vh; border-radius: 24px; background: var(--card-solid); box-shadow: var(--shadow-lg); overflow: hidden; animation: popIn .2s ease both; }
.palette .search { border-radius: 0; height: 58px; background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 0 20px; }
.palette .search input { font-size: 17px; }
.palette .res { max-height: 56vh; overflow-y: auto; padding: 6px; }
.palette .it { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; cursor: pointer; }
.palette .it.sel { background: var(--soft); }
.palette .it .k { font-size: 11.5px; font-weight: 600; color: var(--muted); width: 66px; flex: none; text-transform: uppercase; letter-spacing: .04em; }
.palette .it b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette .it span { color: var(--muted); font-size: 13px; margin-left: auto; white-space: nowrap; }

/* вход */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login form { width: 380px; max-width: 100%; }
.login .brand { margin-bottom: 26px; justify-content: center; }
.login .card { padding: 26px; }
.login h1 { margin: 0 0 4px; font-size: 26px; font-weight: 500; }
.login p { margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.login .btn { width: 100%; height: 48px; margin-top: 6px; }

div.empty, section.empty { text-align: center; padding: 40px 10px; color: var(--muted); }
div.empty b, section.empty b { display: block; font-size: 17px; color: var(--ink); font-weight: 500; margin-bottom: 4px; }

/* ============================== раскладки страниц ============================== */
.ov-bottom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px; }
.cust-bottom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.growth-mid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }

@media (max-width: 1100px) {
  .week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .shell { padding: 16px 16px 120px 74px; }
  .rail { left: 10px; padding: 10px 5px; gap: 3px; }
  .rail button { width: 34px; height: 34px; }
  .hot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov-bottom, .cust-top, .cust-bottom, .growth-mid { grid-template-columns: 1fr; }
  .page-title h1 { font-size: 26px; }
  .week { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar .search { width: 100%; }
}
@media (max-width: 600px) {
  .shell { padding: 12px 12px 110px; }
  .rail { top: auto; bottom: 12px; left: 50%; transform: translateX(-50%); flex-direction: row; padding: 6px 8px; }
  .rail hr { width: 0; height: 20px; border-top: 0; border-left: 1px solid rgba(255, 255, 255, .14); margin: 0 2px; }
  .rail .hide-m { display: none; }
  .rail button[data-tip]:hover::after { display: none; }
  .hot-grid { grid-template-columns: 1fr; }
  .dock { grid-template-columns: 1fr; bottom: 72px; }
  .kpis { gap: 12px 20px; }
  .deal-modal { padding: 22px; border-radius: 26px; }
  .deal-modal h2 { font-size: 25px; }
  .deal-modal .amt { font-size: 38px; }
  .deal-modal .facts { grid-template-columns: 1fr 1fr; }
  .stages-line button { font-size: 11px; }
  .week { grid-template-columns: 1fr; }
  .fld-row { grid-template-columns: 1fr; }
  .toast { bottom: 76px; }
  .invoice-doc .parties { grid-template-columns: 1fr; }
  .invoice-doc .totals { width: 100%; }
  .drawer-back { padding: 0; }
  .drawer { border-radius: 0; width: 100vw; padding: 20px 16px; }
  .invoice-doc { padding: 20px 16px; }
  .invoice-doc .dates { gap: 18px; flex-wrap: wrap; }
  .col { flex-basis: 84vw; }
  .src-legend { grid-template-columns: 1fr; }
}

@media print {
  body::before, .rail, .top, .nav, #toast-root, .drawer .dh, .drawer .da { display: none !important; }
  .backdrop { position: static; background: none; backdrop-filter: none; padding: 0; }
  .drawer { box-shadow: none; width: 100%; height: auto; padding: 0; animation: none; }
  #app { display: none; }
  .invoice-doc { box-shadow: none; border: 0; }
}

/* ============================== лиды и продажи ============================== */
.split { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 16px; align-items: start; }
.qcard { padding: 10px; position: sticky; top: 14px; }
.qtabs { display: flex; flex-wrap: wrap; width: 100%; margin: 2px 0 8px; }
.qtabs button { flex: 1 1 auto; padding-left: 10px; padding-right: 10px; }
.qtabs i { font-style: normal; color: var(--faint); font-weight: 600; margin-left: 2px; }
.qtabs button.on i { color: var(--muted); }
.qlist { max-height: calc(100vh - 210px); overflow-y: auto; display: flex; flex-direction: column; gap: 2px; scrollbar-width: thin; }
.qrow { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 10px; border-radius: 14px; transition: background .12s; }
.qrow:hover { background: var(--soft-2); }
.qrow.on { background: #171614; color: #fff; }
:root[data-theme="dark"] .qrow.on { background: #f3f0ea; color: #171614; }
.qrow .ava { width: 34px; height: 34px; border-width: 0; font-size: 12px; }
.qmain { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.qmain b { font-weight: 500; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qmain span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qrow.on .qmain span, .qrow.on .when { color: inherit; opacity: .65; }
.qrow .when { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.qrow .when.late { color: var(--orange); font-weight: 600; }
.marks { display: inline-flex; gap: 3px; flex: none; }
.marks i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.qrow.on .marks i:not(.ok):not(.bad) { background: rgba(255, 255, 255, .25); }
.marks i.ok { background: var(--good); }
.marks i.bad { background: var(--orange); }
.score-pill { display: inline-flex; align-items: baseline; gap: 1px; padding: 2px 8px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--soft); color: var(--muted); flex: none; }
.score-pill small { font-size: 10px; opacity: .7; }
.score-pill.on { background: var(--yellow); color: #171614; }

.work { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.wh { display: flex; align-items: flex-start; gap: 12px; }
.wh > div:first-child { flex: 1; min-width: 0; }
.wh .acts { display: flex; align-items: center; gap: 8px; }
.eyebrow { font-size: 13px; color: var(--muted); }
.wh h2 { margin: 4px 0 2px; font-size: 27px; font-weight: 500; letter-spacing: -.015em; line-height: 1.1; overflow-wrap: anywhere; }
.wh .sub { font-size: 14.5px; color: var(--ink-2); }
.sec-h { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.sec-h .btn, .sec-h .circle-btn { text-transform: none; letter-spacing: 0; margin-left: auto; }
.facts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.facts-grid div { background: var(--soft); border-radius: 14px; padding: 9px 12px; min-width: 0; }
.facts-grid span { display: block; font-size: 12px; color: var(--muted); }
.facts-grid b { display: block; font-size: 14.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.facts-grid b.none { color: var(--faint); font-weight: 400; }
.facts-grid a { text-decoration: underline; text-underline-offset: 2px; }
.verify { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.verify .tag:hover { background: var(--card-solid); }
.person { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding: 9px 0; border-top: 1px solid var(--line-2); }
.person:first-of-type { border-top: 0; }
.person .pm { flex: 1; min-width: 140px; }
.pm b { display: block; font-weight: 500; cursor: pointer; }
.pm b:hover { text-decoration: underline; }
.pm span { font-size: 12.5px; color: var(--muted); }
.star-btn.sm { width: 28px; height: 28px; }
.star-btn.sm svg { width: 13px; height: 13px; }
.ph { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; background: #171614; color: #fff; font-size: 13.5px; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ph svg { width: 13px; height: 13px; }
:root[data-theme="dark"] .ph { background: #f3f0ea; color: #171614; }
.mtag { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border-radius: 999px; font-size: 13px; background: var(--chip); border: 1px solid var(--line-2); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.mtag i { font-style: normal; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; color: var(--muted); }
.mtag i svg { width: 12px; height: 12px; }
.mtag.wa i { color: #23a35a; }
.mtag.tg i { color: #2a8bc9; }
.mtag.ig i { color: #c13584; }
.mtag.vk i { color: #2f6db5; }
.mtag:hover { background: var(--card-solid); }
.nbox { background: var(--soft); border-radius: 16px; padding: 11px 14px; font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.nbox > span { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.nbox > div { max-height: 160px; overflow-y: auto; }
.nbox.plan { background: rgba(242, 199, 68, .22); }
.nbox.bad { background: rgba(211, 74, 30, .1); }
.nbox .hl { font-size: 13.5px; padding: 3px 0; }
.nbox .hl em { font-style: normal; color: var(--muted); margin-right: 6px; }
.checks { display: flex; flex-direction: column; gap: 8px; }
.chk-row { display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--card-solid); transition: background .2s, border-color .2s; }
.chk-row.ok { background: rgba(44, 122, 85, .12); border-color: transparent; }
.chk-row.bad { background: rgba(211, 74, 30, .1); border-color: transparent; }
.chk-row .ct { flex: 1; min-width: 0; }
.chk-row .ct b { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 15px; }
.chk-row .ct span { font-size: 12.5px; color: var(--muted); }
.chk-row.ok .ct b { color: var(--good); }
.chk-row.bad .ct b { color: var(--orange); }
kbd { font: inherit; font-size: 10.5px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; line-height: 16px; }
.yn { display: flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--soft); flex: none; }
.yn button { min-width: 56px; height: 34px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--muted); }
.yn button:hover { color: var(--ink); }
.yn button.on[data-val="ok"] { background: var(--green); color: #fff; }
.yn button.on[data-val="bad"] { background: var(--orange); color: #fff; }
textarea.comment { width: 100%; min-height: 74px; padding: 12px 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--field); outline: 0; resize: vertical; font-size: 15px; line-height: 1.45; }
textarea.comment:focus { border-color: var(--ink); }
.form-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.pill-select { height: 40px; padding: 0 34px 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--chip); font-size: 14px; max-width: 230px; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a867e' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 14px; }
.date-pill { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 6px 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--chip); font-size: 14px; color: var(--muted); }
.date-pill svg { width: 15px; height: 15px; }
.date-pill input { border: 0; background: transparent; outline: 0; font-size: 14px; color: var(--ink); height: 34px; }
.verdicts { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }
.outcomes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.oc { display: flex; align-items: center; justify-content: center; gap: 8px; height: 56px; padding: 0 12px; border-radius: 20px; font-size: 15.5px; font-weight: 500; transition: transform .12s, filter .12s; white-space: nowrap; }
.oc:hover { filter: brightness(.96); transform: translateY(-1px); }
.oc:active { transform: scale(.98); }
.oc:disabled { opacity: .5; cursor: wait; }
.oc svg { width: 17px; height: 17px; }
.oc kbd { color: inherit; border-color: currentColor; opacity: .55; }
.oc.big { height: 60px; font-size: 16.5px; }
.oc.t-green { background: var(--green); color: #fff; }
.oc.t-yellow { background: var(--yellow); color: #171614; }
.oc.t-orange { background: var(--orange); color: #fff; }
.oc.t-rust { background: var(--rust); color: #fff; }
.oc.t-light { background: var(--card-solid); color: var(--ink); border: 1px solid var(--line); }
.phone-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.phone-big { display: inline-flex; align-items: center; gap: 10px; height: 58px; padding: 0 22px; border-radius: 999px; background: #171614; color: #fff; font-size: 24px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.phone-big svg { width: 20px; height: 20px; }
.phone-big:hover { background: #2c2a26; }
:root[data-theme="dark"] .phone-big { background: #f3f0ea; color: #171614; }
.nophone { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 500; color: var(--muted); }
.nophone svg { width: 18px; height: 18px; }
.alts { display: flex; flex-wrap: wrap; gap: 6px; }
.tries { font-size: 13.5px; color: var(--muted); }
.tries.warn { color: var(--orange); font-weight: 500; }
.nbox.scripts .seg { margin: 4px 0 8px; flex-wrap: wrap; }
.seg.sm button { padding: 4px 11px; font-size: 12.5px; }
.cs-titles { display: flex; flex-wrap: wrap; gap: 6px; }
.cs-titles .tag { cursor: pointer; }
.tag.on { background: #171614; color: #fff; border-color: #171614; }
:root[data-theme="dark"] .tag.on { background: #f3f0ea; color: #171614; }
.cs-text { margin-top: 10px; padding: 12px 14px; border-radius: 14px; background: var(--card-solid); white-space: pre-wrap; font-size: 14.5px; line-height: 1.55; max-height: 280px; overflow-y: auto; }
.nbox.scripts .form-row { margin-top: 8px; }

/* обзор продаж */
.sales-top { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.myday { background: var(--green); color: #fff; border-color: transparent; }
.myday .circle-btn.sm { border-color: rgba(255, 255, 255, .3); color: #fff; }
.md-ring { display: flex; align-items: center; gap: 18px; }
.ring.sm { width: 132px; height: 132px; margin: 0; flex: none; }
.ring.sm .ring-txt b { font-size: 30px; }
.ring.sm .ring-txt span { font-size: 11.5px; }
.md-goals { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.goal .gt { display: flex; justify-content: space-between; align-items: baseline; font-size: 13.5px; margin-bottom: 5px; }
.goal .gt b { font-size: 16px; font-weight: 600; }
.goal .gt small { font-size: 12px; opacity: .65; font-weight: 500; }
.gbar { height: 7px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.gbar i { display: block; height: 100%; border-radius: 999px; background: #171614; transition: width .4s; }
:root[data-theme="dark"] .gbar i { background: #f3f0ea; }
.gbar.full i { background: var(--good); }
.gbar.light { background: rgba(255, 255, 255, .18); }
.gbar.light i { background: var(--yellow); }
.qstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.qstats div { background: var(--soft); border-radius: 14px; padding: 10px 12px; }
.qstats b { display: block; font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
.qstats span { font-size: 12px; color: var(--muted); }
.btn.wide { width: 100%; height: 48px; font-size: 15.5px; }
.hint-txt { font-size: 13px; color: var(--muted); margin-top: 10px; line-height: 1.45; }
.hint-txt a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.lvl { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.lvl b { font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.lvl span { font-size: 13.5px; color: var(--muted); }
.achs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.ach { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--muted); border: 1px dashed var(--line); cursor: default; }
.ach i { font-style: normal; color: var(--faint); font-size: 12px; }
.ach svg { width: 12px; height: 12px; }
.ach.ok { background: var(--yellow); color: #171614; border: 1px solid var(--yellow); }
.team-tbl tbody tr.me td { background: var(--soft-2); }
.cellbar { display: grid; grid-template-columns: auto 1fr; column-gap: 5px; align-items: baseline; min-width: 92px; }
.cellbar b { font-weight: 600; }
.cellbar small { color: var(--muted); font-size: 12px; }
.cellbar .gbar { grid-column: 1 / -1; height: 4px; margin-top: 4px; }
.hrows { display: flex; flex-direction: column; gap: 9px; }
.hrow { display: grid; grid-template-columns: 140px 1fr 40px; align-items: center; gap: 10px; font-size: 14px; }
.hrow > span { display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hrow b { text-align: right; font-weight: 600; }
.hb { height: 22px; border-radius: 8px; background: var(--soft); overflow: hidden; }
.hb i { display: block; height: 100%; border-radius: 8px; transition: width .4s; }
.hb i.t-green { background: var(--green); }
.hb i.t-yellow { background: var(--yellow); }
.hb i.t-orange { background: var(--orange); }
.hb i.t-rust { background: var(--rust); }
.hb i.t-light { background: #b9b4ab; }
.hb i.t-ink { background: #3b3a36; }
:root[data-theme="dark"] .hb i.t-ink { background: #cfcac0; }
.medal { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-style: normal; font-size: 11.5px; font-weight: 600; background: var(--soft); flex: none; }
.medal.m0 { background: var(--yellow); color: #171614; }

/* история */
.hist-day { padding: 14px 14px 8px; margin-bottom: 14px; }
.hist-day .card-head { padding: 0 6px; margin-bottom: 4px; }
.hist-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 8px; border-radius: 12px; font-size: 14px; }
.hist-row[data-hd]:hover { background: var(--soft-2); }
.hist-row .when { width: 42px; flex: none; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.hist-row .ava { width: 26px; height: 26px; border-width: 0; font-size: 10.5px; }
.hist-row .hwho { width: 64px; flex: none; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-row .status { flex: none; }
.hist-row .hco { flex: 0 1 auto; max-width: 34%; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-row .htext { flex: 1; min-width: 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status.t-green i { background: var(--good); }
.status.t-green { background: rgba(44, 122, 85, .12); color: var(--good); }
.status.t-yellow i { background: var(--yellow); }
.status.t-yellow { background: rgba(242, 199, 68, .25); }
.status.t-orange i { background: var(--orange); }
.status.t-orange { background: rgba(211, 74, 30, .1); color: var(--orange); }

@media (max-width: 1100px) {
  .sales-top { grid-template-columns: 1fr 1fr; }
  .sales-top .myday { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split .work { order: -1; }
  .qcard { position: static; }
  .qlist { max-height: 340px; }
  .sales-top { grid-template-columns: 1fr; }
  .outcomes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .work { padding: 16px; }
  .phone-big { font-size: 20px; height: 52px; width: 100%; justify-content: center; }
  .chk-row { flex-wrap: wrap; }
  .chk-row .ct span { display: none; }
  .chk-row kbd, .oc kbd { display: none; }
  .verdicts { grid-template-columns: 1fr; }
  .md-ring { flex-direction: column; align-items: stretch; }
  .md-ring .ring { align-self: center; }
  .hrow { grid-template-columns: 110px 1fr 34px; }
  .hist-row { flex-wrap: wrap; }
  .hist-row .hco { max-width: none; flex: 1 1 60%; }
  .hist-row .htext { flex: 1 1 100%; padding-left: 52px; white-space: normal; }
  .pill-select { max-width: 100%; flex: 1 1 100%; }
}
