/* Revizorika CRM. Чёрный, белый, оранжевый градиент. Заголовки Cormorant Garamond, интерфейс Manrope. */
:root {
  --ink: #0d0d0e;
  --ink-2: #2b2a28;
  --muted: #6c6a66;
  --faint: #a3a19c;
  --bg: #f3f3f1;
  --card: #ffffff;
  --line: #e4e3df;
  --line-2: #d3d1cc;
  --hover: #f7f7f5;
  --accent: #f26a0f;
  --accent-ink: #b44a05;
  --accent-soft: #fff1e4;
  --grad: linear-gradient(135deg, #ff5413 0%, #ff8a1f 48%, #ffc24d 100%);
  --grad-text: linear-gradient(100deg, #ff5413 0%, #ff9a2e 55%, #ffbf47 100%);
  --ok: #2f7a4d;
  --ok-soft: #e9f4ed;
  --warn: #b7791f;
  --danger: #b4321c;
  --danger-soft: #fbece8;
  --r: 4px;
  --r-sm: 3px;
  --shadow: 0 1px 1px rgba(20, 20, 20, .03);
  --shadow-lg: 0 24px 60px -28px rgba(0, 0, 0, .4);
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --side: 256px;
  /* цвета каналов в графиках */
  --ch-call: #e8630a;
  --ch-telegram: #1c1c1e;
  --ch-whatsapp: #a8a29a;
  --ch-other: #e7c08a;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 500 14.5px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
::selection { background: #ffd9b5; }
.serif { font-family: var(--serif); }
.num { font-variant-numeric: lining-nums tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.grad-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- каркас ---------- */
.app { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: #0b0b0c;
  color: #e9e6e1; display: flex; flex-direction: column; padding: 26px 16px 18px;
  border-right: 1px solid #1d1c1a;
}
.brand { padding: 2px 12px 26px; }
.brand-name { font: 600 30px/1 var(--serif); letter-spacing: .005em; color: #fff; }
.brand-sub { margin-top: 6px; font-size: 12px; letter-spacing: .02em; color: #9c978f; display: flex; align-items: center; gap: 8px; }
.brand-sub i { width: 22px; height: 2px; border-radius: 2px; background: var(--grad); display: inline-block; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-sep { height: 1px; background: #1f1e1c; margin: 12px 10px; }
.nav-label { font-size: 11.5px; color: #6f6b65; padding: 4px 12px 6px; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: 4px; color: #a9a49c; text-decoration: none; font-weight: 600; font-size: 14px;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.nav a svg { width: 19px; height: 19px; flex: none; opacity: .85; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .045); }
.nav a.on { color: #fff; background: rgba(255, 255, 255, .07); }
.nav a.on::before { content: ''; position: absolute; left: -16px; top: 0; bottom: 0; width: 2px; border-radius: 0 3px 3px 0; background: var(--grad); }
.nav a.on svg { color: #ff9a3c; opacity: 1; }
.nav a .badge { margin-left: auto; }
.side-foot { margin-top: auto; padding-top: 18px; }
.me-card { display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: 4px; background: rgba(255, 255, 255, .04); border: 1px solid #1f1e1c; cursor: pointer; transition: background .25s var(--ease); }
.me-card:hover { background: rgba(255, 255, 255, .07); }
.avatar { width: 36px; height: 36px; border-radius: 3px; display: grid; place-items: center; font: 600 15px var(--sans); color: #1a0d03; background: var(--grad); flex: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5); }
.me-name { font-weight: 700; font-size: 13.5px; color: #fff; line-height: 1.25; }
.me-role { font-size: 12px; color: #8d887f; }

.main { min-width: 0; }
.topbar { display: none; }
.page { max-width: 1320px; margin: 0 auto; padding: 34px 40px 80px; }
.view-enter { animation: viewIn .38s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.head h1 { margin: 0; font: 600 40px/1.02 var(--serif); letter-spacing: -.005em; }
.head .sub { margin-top: 8px; color: var(--muted); font-size: 14px; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
h2.sec { font: 600 27px/1.1 var(--serif); margin: 0 0 4px; }
.sec-sub { color: var(--muted); font-size: 13.5px; margin: 0 0 16px; }

/* ---------- зеркальные кнопки: строгие ---------- */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 42px; padding: 0 18px; border-radius: 4px; border: 0; cursor: pointer;
  font-weight: 700; font-size: 13.5px; letter-spacing: .01em; white-space: nowrap; text-decoration: none;
  transition: transform .15s var(--ease), box-shadow .25s var(--ease), filter .25s var(--ease), opacity .2s, background .25s;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn::before { /* верхняя половина зеркала */
  content: ''; position: absolute; inset: 0 0 50% 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .42), rgba(255, 255, 255, .06));
}
.btn::after { /* узкий блик при наведении */
  content: ''; position: absolute; top: -20%; bottom: -20%; left: -60%; width: 28%; z-index: 1; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-22deg); transition: left .7s var(--ease);
}
.btn:hover::after { left: 135%; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; pointer-events: none; }
.btn.gold {
  color: #1d0e02;
  background: linear-gradient(180deg, #ffa940 0%, #ff8a22 50%, #f0670d 50%, #fa8a2c 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 0 0 1px rgba(160, 60, 0, .35);
}
.btn.gold:hover { filter: brightness(1.04); }
.btn.onyx {
  color: #fff;
  background: linear-gradient(180deg, #353437 0%, #1d1d1f 50%, #0b0b0c 50%, #161618 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 0 0 1px #000;
}
.btn.onyx::before { background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .02)); }
.btn.onyx:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 0 0 1px #000, inset 0 -2px 0 #ff8a22; }
.btn.pearl {
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff 0%, #f7f7f5 50%, #ededea 50%, #f8f8f6 100%);
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px var(--line-2);
}
.btn.pearl::before { background: linear-gradient(180deg, rgba(255, 255, 255, .8), rgba(255, 255, 255, .1)); }
.btn.pearl:hover { box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px #0d0d0e; }
.btn.ghost { background: transparent; color: var(--ink-2); padding: 0 12px; }
.btn.ghost::before, .btn.ghost::after { display: none; }
.btn.ghost:hover { background: rgba(0, 0, 0, .05); }
.btn.danger { color: var(--danger); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 12.5px; }
.btn.lg { height: 50px; padding: 0 24px; font-size: 14.5px; }
.btn.block { width: 100%; }
.btn.icon { width: 42px; padding: 0; }
.btn.sm.icon { width: 34px; }
.btn .spin { width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- карточки, плитки ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card.pad { padding: 24px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 20px 24px 0; }
.card-head h3 { margin: 0; font: 600 23px/1.15 var(--serif); }
.card-head .hint { color: var(--muted); font-size: 13px; }
.card-body { padding: 18px 24px 22px; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.mt { margin-top: 18px; }
.mt2 { margin-top: 28px; }

.kpi { padding: 20px 22px 18px; position: relative; overflow: hidden; }
.kpi-label { color: var(--muted); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.kpi-value { font: 600 42px/1 var(--serif); margin-top: 12px; font-variant-numeric: lining-nums; letter-spacing: -.01em; }
.kpi-value small { font: 600 22px var(--serif); color: var(--muted); margin-left: 2px; }
.kpi-note { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.kpi.hero { background: #0d0d0e; border-color: #0d0d0e; color: #fff; }
.kpi.hero .kpi-label, .kpi.hero .kpi-note { color: #a8a39b; }
.kpi.alert .kpi-value { color: var(--accent-ink); }
.kpi .bar { height: 4px; border-radius: 2px; background: #efebe5; margin-top: 14px; overflow: hidden; }
.kpi .bar i { display: block; height: 100%; border-radius: 2px; background: var(--grad); transition: width .8s var(--ease); }
.kpi.hero .bar { background: rgba(255, 255, 255, .12); }

/* ---------- значки статусов ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 3px; font-size: 12px; font-weight: 700; white-space: nowrap; border: 1px solid transparent; }
.badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-new { background: #fff; border-color: var(--line-2); color: var(--ink); }
.st-no_answer { background: #f1efeb; color: #615c55; }
.st-thinking { background: #fff4e3; color: #9a5a00; }
.st-callback { background: #fff; border-color: #f4b07a; color: var(--accent-ink); }
.st-interested { background: #ffe7d2; color: #a3430a; }
.st-trial { background: var(--grad); color: #2a1200; }
.st-paid { background: #0d0d0e; color: #ffc24d; }
.st-refused { background: #f3f1ee; color: #8a857e; text-decoration: line-through; text-decoration-color: rgba(0, 0, 0, .25); }
.st-invalid { background: #f3f1ee; color: #a29d95; }
.st-unreachable { background: #fff; border: 1px dashed #c9c3b9; color: #807a72; }
.badge.count { background: var(--grad); color: #2a1200; height: 20px; min-width: 20px; padding: 0 7px; justify-content: center; font-size: 11.5px; }
.nav .badge.count { box-shadow: 0 0 0 2px #0b0b0c; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }

/* ---------- фишки-фильтры и сегменты ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 3px; cursor: pointer; border: 0;
  font-weight: 650; font-size: 13px; color: var(--ink-2);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line-2);
  transition: box-shadow .2s var(--ease), transform .15s var(--ease), background .2s var(--ease), color .2s;
}
.chip:hover { box-shadow: inset 0 0 0 1px #0d0d0e; }
.chip:active { transform: scale(.97); }
.chip .n { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.chip.on { color: #fff; background: #0d0d0e; box-shadow: inset 0 0 0 1px #0d0d0e; }
.chip.on .n { color: #ffb45a; }
.seg { display: inline-flex; padding: 3px; gap: 3px; border-radius: 4px; background: #ebebe8; }
.seg button { border: 0; background: transparent; height: 38px; padding: 0 16px; border-radius: 4px; font-weight: 700; font-size: 13.5px; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: all .25s var(--ease); }
.seg button svg { width: 16px; height: 16px; }
.seg button.on { color: var(--ink); background: #fff; box-shadow: 0 0 0 1px var(--line-2); }
.seg.dark { background: #1a1a1b; }
.seg.dark button { color: #9d988f; }
.seg.dark button.on { color: #fff; background: #2a2a2c; }

/* ---------- формы ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.field > small { color: var(--muted); font-size: 12px; }
.input, select.input, textarea.input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 4px; border: 1px solid var(--line-2); background: #fff;
  outline: none; transition: border-color .2s, box-shadow .25s var(--ease); font-weight: 500;
}
textarea.input { height: auto; min-height: 84px; padding: 12px 14px; resize: vertical; line-height: 1.45; }
select.input { appearance: none; padding-right: 38px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23736e66' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; }
.input:focus { border-color: #0d0d0e; box-shadow: 0 0 0 1px #0d0d0e; }
.input.sm { height: 38px; border-radius: 4px; font-size: 13.5px; }
.search { position: relative; }
.search svg { position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search .input { padding-left: 40px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.toggle { position: relative; width: 44px; height: 26px; border-radius: 3px; background: #dcd6cd; border: 0; cursor: pointer; transition: background .25s var(--ease); flex: none; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 2px; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .3s var(--ease); }
.toggle.on { background: #0d0d0e; }
.toggle.on::after { transform: translateX(18px); }

/* ---------- таблицы ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; }
.t th { text-align: left; font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fcfbf9; position: sticky; top: 0; }
.t td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr { transition: background .2s; }
.t tbody tr.click { cursor: pointer; }
.t tbody tr.click:hover { background: var(--hover); }
.t tbody tr.sel { background: #fff7ef; }
.t .r { text-align: right; }
.t .name { font-weight: 700; }
.t .sub { font-size: 12.5px; color: var(--muted); }
.t th:first-child, .t td:first-child { padding-left: 22px; }
.t th:last-child, .t td:last-child { padding-right: 22px; }
.t input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 14px 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; gap: 12px; flex-wrap: wrap; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.toolbar .grow { flex: 1 1 220px; }
.bulk { display: flex; align-items: center; gap: 10px; padding: 12px 22px; background: #0d0d0e; color: #fff; border-radius: 0; flex-wrap: wrap; animation: viewIn .3s var(--ease); }
.bulk b { font-weight: 700; }
.bulk .input { background: #1c1c1e; border-color: #333; color: #fff; }

/* ---------- экран «Работа» ---------- */
.work { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; }
.queue { position: sticky; top: 20px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; }
.queue-list { overflow-y: auto; padding: 8px; }
.q-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 12px; border-radius: 4px; cursor: pointer; transition: background .2s var(--ease), transform .2s var(--ease); position: relative; }
.q-item:hover { background: var(--hover); }
.q-item.on { background: #0d0d0e; color: #fff; }
.q-item.on .q-sub { color: #a8a39b; }
.q-item.on .q-when { color: #ffb45a; }
.q-mark { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--line-2); }
.q-mark.over { background: var(--accent); }
.q-mark.new { background: #fff; box-shadow: inset 0 0 0 2px #0d0d0e; }
.q-item.on .q-mark.new { box-shadow: inset 0 0 0 2px #fff; background: transparent; }
.q-name { font-weight: 700; font-size: 14px; line-height: 1.3; }
.q-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.q-when { font-size: 12px; font-weight: 700; color: var(--accent-ink); margin-top: 4px; }
.q-group { font-size: 12px; font-weight: 700; color: var(--faint); padding: 12px 12px 4px; }

.lead-panel { padding: 28px 30px; }
.lp-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.lp-name { font: 600 38px/1.05 var(--serif); margin: 0; letter-spacing: -.005em; }
.lp-meta { margin-top: 8px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 13.5px; }
.lp-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }
.lp-state { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.lp-contacts { margin-top: 22px; padding: 18px; border-radius: 4px; background: #faf8f5; border: 1px solid var(--line); display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.lp-phone { font: 600 30px/1 var(--serif); letter-spacing: .01em; font-variant-numeric: lining-nums; }
.lp-tg { font-size: 13px; color: var(--muted); margin-top: 6px; }
.lp-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.step { margin-top: 26px; }
.step-title { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 13.5px; margin-bottom: 12px; }
.step-title b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: #0d0d0e; color: #fff; }
.results { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.res {
  position: relative; overflow: hidden; text-align: left; border: 0; cursor: pointer; padding: 14px 14px 13px; border-radius: 4px; min-height: 76px;
  background: linear-gradient(180deg, #fff 0%, #fbfbf9 50%, #f3f3f0 50%, #fbfbfa 100%);
  box-shadow: inset 0 0 0 1px var(--line-2);
  transition: transform .15s var(--ease), box-shadow .2s var(--ease);
}
.res::after { content: ''; position: absolute; top: -20%; bottom: -20%; left: -70%; width: 45%; pointer-events: none; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .8), transparent); transform: skewX(-22deg); transition: left .75s var(--ease); }
.res:hover::after { left: 135%; }
.res:hover { box-shadow: inset 0 0 0 1px #0d0d0e; }
.res:active { transform: scale(.98); }
.res .rt { font-weight: 800; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.res .rh { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.35; }
.res.on { background: #0d0d0e; color: #fff; box-shadow: inset 0 0 0 1px #0d0d0e, inset 0 -2px 0 #ff8a22; }
.res.on .rh { color: #b5afa6; }
.res.pos .rt .dot { background: var(--accent); }
.res.win { background: linear-gradient(180deg, #ffa940 0%, #ff8a22 50%, #f0670d 50%, #fa8a2c 100%); box-shadow: inset 0 0 0 1px rgba(160, 60, 0, .35); color: #1d0e02; }
.res.win .rh { color: #5a2c06; }
.res.win.on { box-shadow: inset 0 0 0 2px #0d0d0e; }
.extra { margin-top: 14px; padding: 18px; border-radius: 4px; border: 1px solid #f3cfae; background: #fffaf5; animation: viewIn .3s var(--ease); }
.when-chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.save-row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }

.timeline { margin-top: 30px; }
.tl-item { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.tl-ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #f3f1ed; color: var(--ink-2); }
.tl-ico svg { width: 16px; height: 16px; }
.tl-ico.call { background: #fff0e3; color: var(--accent-ink); }
.tl-ico.telegram { background: #0d0d0e; color: #fff; }
.tl-ico.whatsapp { background: #eeece8; color: #4b4741; }
.tl-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13.5px; }
.tl-head .who { font-weight: 700; }
.tl-head .time { color: var(--faint); font-size: 12.5px; margin-left: auto; }
.tl-text { margin-top: 4px; white-space: pre-wrap; color: var(--ink-2); font-size: 13.5px; }

.ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#ff7a1a calc(var(--p) * 1%), #ece8e2 0); position: relative; }
.ring::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: #fff; }
.ring span { position: relative; font: 600 20px var(--serif); font-variant-numeric: lining-nums; }
.today-bar { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.mini { display: flex; flex-direction: column; padding: 0 18px; border-left: 1px solid var(--line); }
.mini b { font: 600 28px/1 var(--serif); font-variant-numeric: lining-nums; }
.mini span { font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 600; }
.mini.alert b { color: var(--accent-ink); }

/* ---------- графики ---------- */
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 150px) 1fr auto; gap: 14px; align-items: center; padding: 9px 0; }
.hbar .lbl { font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.hbar .track { height: 12px; border-radius: 2px; background: #f1eee9; overflow: hidden; }
.hbar .fill { height: 100%; border-radius: 2px; transition: width .9s var(--ease); }
.hbar .val { text-align: right; font-size: 13px; color: var(--muted); }
.hbar .val b { color: var(--ink); font-size: 14px; }
.ch-card { padding: 20px 22px; border-radius: 4px; border: 1px solid var(--line); background: #fff; }
.ch-card .big { font: 600 50px/1 var(--serif); font-variant-numeric: lining-nums; margin-top: 10px; }
.ch-card .big small { font-size: 24px; color: var(--muted); }
.ch-card .row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 8px; }
.ch-card .row b { color: var(--ink); }
.ch-card.best { border-color: #0d0d0e; box-shadow: inset 0 2px 0 #ff8a22; }
.ch-card .crown { font-size: 11.5px; font-weight: 800; color: var(--accent-ink); }
.matrix { width: 100%; border-collapse: separate; border-spacing: 4px; }
.matrix th { font-size: 12.5px; font-weight: 700; color: var(--muted); text-align: center; padding: 6px; }
.matrix th:first-child { text-align: left; }
.matrix td { height: 54px; border-radius: 4px; text-align: center; font-weight: 800; font-size: 15px; position: relative; transition: transform .2s var(--ease); }
.matrix td:first-child { text-align: left; font-weight: 700; font-size: 13.5px; padding: 0 8px; background: transparent !important; }
.matrix td small { display: block; font-size: 11px; font-weight: 600; opacity: .7; }
.matrix td.cell:hover { transform: scale(1.04); }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 190px; padding-top: 10px; }
.bars .col { flex: 1; display: flex; flex-direction: column-reverse; gap: 2px; min-width: 6px; height: 100%; position: relative; cursor: default; }
.bars .col > i { display: block; width: 100%; border-radius: 2px 2px 0 0; transition: height .8s var(--ease); }
.bars .col > i + i { border-radius: 0; }
.bars .col > i:last-child { border-radius: 2px 2px 0 0; }
.bars .col:hover > i { filter: brightness(1.1); }
.bars-x { display: flex; gap: 4px; font-size: 11px; color: var(--faint); margin-top: 6px; }
.bars-x span { flex: 1; text-align: center; min-width: 6px; overflow: hidden; }
.hours { display: grid; grid-template-columns: 90px repeat(15, minmax(0, 1fr)); gap: 3px; align-items: center; }
.hours .h { height: 34px; border-radius: 2px; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.hours .hl { font-size: 12.5px; font-weight: 700; }
.hours .hx { font-size: 11px; color: var(--faint); text-align: center; }
.funnel { display: flex; flex-direction: column; gap: 8px; }
.funnel .fs { display: grid; grid-template-columns: minmax(96px, 150px) 1fr 56px; gap: 12px; align-items: center; font-size: 13.5px; }
.funnel .fs .track { height: 16px; border-radius: 4px; background: #f4f1ec; overflow: hidden; }
.funnel .fs .fill { height: 100%; border-radius: 4px; background: var(--grad); transition: width .9s var(--ease); }
.funnel .fs .fill.dark { background: #0d0d0e; }
.funnel .fs .fill.grey { background: #d5cfc6; }

.tip { position: fixed; z-index: 90; pointer-events: none; background: #0d0d0e; color: #fff; border-radius: 4px; padding: 9px 12px; font-size: 12.5px; line-height: 1.45; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; max-width: 260px; }
.tip.show { opacity: 1; transform: none; }
.tip b { color: #ffb45a; }

/* ---------- импорт ---------- */
.drop { border: 1.5px dashed #d4cdc2; border-radius: 4px; padding: 44px 24px; text-align: center; background: #fcfbf9; transition: all .3s var(--ease); cursor: pointer; }
.drop:hover, .drop.over { border-color: #ff8a22; background: #fff8f1; }
.drop .ico { width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 4px; display: grid; place-items: center; background: #0d0d0e; color: #ffae52; }
.drop .ico svg { width: 26px; height: 26px; }
.drop h3 { font: 600 26px var(--serif); margin: 0 0 6px; }
.map-table td, .map-table th { padding: 10px 12px; }
.progress { height: 10px; border-radius: 4px; background: #efebe5; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--grad); border-radius: 4px; transition: width .4s var(--ease); }

/* ---------- окна, панели, уведомления ---------- */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(10, 10, 10, .5); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); opacity: 0; transition: opacity .3s var(--ease); }
.overlay.show { opacity: 1; }
.modal { position: fixed; z-index: 61; left: 50%; top: 50%; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow-y: auto; background: #fff; border-radius: 4px; box-shadow: var(--shadow-lg); padding: 28px; transform: translate(-50%, -46%) scale(.97); opacity: 0; transition: transform .35s var(--ease), opacity .3s var(--ease); }
.modal.show { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.modal.wide { width: min(760px, calc(100vw - 32px)); }
.modal h2 { margin: 0 0 6px; font: 600 32px/1.1 var(--serif); }
.modal .lead-txt { color: var(--muted); margin: 0 0 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.drawer { position: fixed; z-index: 61; top: 0; right: 0; bottom: 0; width: min(640px, 100vw); background: var(--bg); box-shadow: var(--shadow-lg); overflow-y: auto; transform: translateX(100%); transition: transform .45s var(--ease); }
.drawer.show { transform: none; }
.drawer-close { position: sticky; top: 0; z-index: 2; display: flex; justify-content: flex-end; padding: 14px 16px 0; }
.drawer .lead-panel { margin: 0 16px 24px; }
.toasts { position: fixed; right: 22px; bottom: 22px; z-index: 80; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.toast { display: flex; gap: 12px; align-items: center; min-width: 260px; max-width: 420px; padding: 14px 18px; border-radius: 4px; background: #0d0d0e; color: #fff; box-shadow: var(--shadow-lg); font-weight: 600; font-size: 13.5px; animation: toastIn .45s var(--ease) both; position: relative; overflow: hidden; }
.toast::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--grad); }
.toast.err::before { background: #e0482b; }
.toast.out { animation: toastOut .35s var(--ease) both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }
.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty .ico { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 4px; display: grid; place-items: center; background: #0d0d0e; color: #ffae52; }
.empty .ico svg { width: 28px; height: 28px; }
.empty h3 { font: 600 28px var(--serif); color: var(--ink); margin: 0 0 6px; }
.empty p { margin: 0 auto 20px; max-width: 420px; }
.skel { background: linear-gradient(90deg, #f1eee9 0%, #f8f6f2 50%, #f1eee9 100%); background-size: 200% 100%; animation: skel 1.4s infinite; border-radius: 4px; }
@keyframes skel { to { background-position: -200% 0; } }

/* ---------- вход: как в Monarelle ---------- */
.a-wrap { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(300px, 40%) minmax(0, 1fr); background: #fff; }
.a-side { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 48px 40px; background: #0b0b0c; color: #c9c7c3; position: relative; }
.a-brand { font: 800 20px/24px var(--sans); letter-spacing: .24em; text-transform: uppercase; color: #fff; }
.a-sub { margin-top: 8px; font-size: 12px; line-height: 16px; font-weight: 500; color: #8f8c87; }
.a-side p { margin: 0; max-width: 34ch; font-size: 14px; line-height: 22px; color: #c9c7c3; }
.a-main { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.a-form { width: 100%; max-width: 400px; display: grid; gap: 16px; animation: viewIn .3s var(--ease) both; }
.a-form h1 { margin: 0; font: 700 26px/32px var(--sans); letter-spacing: -.02em; }
.a-lead { margin: 0 0 8px; color: #6f6f6d; font-size: 14px; line-height: 22px; }
.a-field { display: grid; gap: 6px; }
.a-field label { font-size: 13px; line-height: 18px; font-weight: 600; color: #4b4b49; }
.a-box { display: flex; min-height: 42px; border: 1px solid #a3a3a1; background: #fff; transition: border-color .18s var(--ease), box-shadow .18s var(--ease); }
.a-box:hover { border-color: #6f6f6d; }
.a-box:focus-within { border-color: #0e0e0e; box-shadow: 0 0 0 3px #0e0e0e14; }
.a-box input { flex: 1; min-width: 0; margin: 0; padding: 0 12px; border: 0; outline: 0; background: transparent; font: 500 14px/20px var(--sans); color: #0e0e0e; }
.a-hint { margin: 0; font-size: 12px; line-height: 16px; color: #6f6f6d; }
.a-err { margin: 0; padding: 12px 16px; background: #0e0e0e; color: #fff; font-weight: 600; font-size: 14px; animation: viewIn .2s var(--ease) both; }
.a-btn {
  position: relative; overflow: hidden; isolation: isolate; width: 100%; height: 46px; border: 1px solid #000; cursor: pointer;
  font: 600 14px/20px var(--sans); color: #fff;
  background: linear-gradient(180deg, #3a3a39 0%, #161616 48%, #050505 52%, #0e0e0e 100%);
  box-shadow: inset 0 1px 0 #ffffff33, inset 0 -1px 0 #00000080, 0 1px 2px #0e0e0e33, 0 8px 20px -12px #0e0e0ecc;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), filter .22s var(--ease);
}
.a-btn::before { content: ''; position: absolute; inset: 0 0 50% 0; z-index: -1; background: linear-gradient(180deg, #ffffff2e, #ffffff00); pointer-events: none; }
.a-btn::after { content: ''; position: absolute; top: -10%; bottom: -10%; left: -75%; width: 45%; z-index: 1; background: linear-gradient(100deg, #ffffff00 0%, #ffffff59 50%, #ffffff00 100%); transform: skewX(-20deg); opacity: 0; transition: left .7s var(--ease), opacity .2s var(--ease); pointer-events: none; }
.a-btn:hover { transform: translateY(-1px); filter: brightness(1.12); box-shadow: inset 0 1px 0 #ffffff40, inset 0 -1px 0 #00000080, 0 10px 24px -12px #0e0e0eb3; }
.a-btn:hover::after { left: 135%; opacity: 1; }
.a-btn:active { transform: none; filter: brightness(.95); box-shadow: inset 0 2px 4px #000000a6; }
.a-btn:disabled { cursor: not-allowed; filter: none; opacity: .6; }
.a-quiet { height: 42px; border: 0; background: transparent; color: #4b4b49; font: 600 14px var(--sans); cursor: pointer; }
.a-quiet:hover { background: #f2f2f1; color: #0e0e0e; }
@media (max-width: 760px) {
  .a-wrap { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .a-side { padding: calc(24px + env(safe-area-inset-top, 0px)) 16px 24px; }
  .a-side p { display: none; }
  .a-main { align-items: flex-start; padding: 32px 16px; }
}

/* ---------- адаптив ---------- */
@media (max-width: 1180px) {
  .g6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g2 { grid-template-columns: 1fr; }
  .work { grid-template-columns: 290px minmax(0, 1fr); }
  .results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 70; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .4s var(--ease); }
  .side.open { transform: none; box-shadow: var(--shadow-lg); }
  .topbar { display: flex; position: sticky; top: 0; z-index: 50; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: #0b0b0c; color: #fff; }
  .topbar .brand-name { font-size: 24px; }
  .page { padding: 22px 16px 70px; }
  .work { grid-template-columns: 1fr; }
  .queue { position: static; max-height: none; }
  .queue-list { max-height: 260px; }
  .g3, .g2 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
}
@media (max-width: 640px) {
  .head h1 { font-size: 36px; }
  .g4, .g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-value { font-size: 36px; }
  .lead-panel { padding: 20px 18px; }
  .lp-name { font-size: 30px; }
  .lp-phone { font-size: 25px; }
  .results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: 1fr; }
  .hbar { grid-template-columns: 90px 1fr auto; gap: 8px; }
  .funnel .fs { grid-template-columns: 110px 1fr 50px; }
  .hours { grid-template-columns: 70px repeat(15, minmax(0, 1fr)); }
  .hours .h { font-size: 0; }
  .mini { padding: 0 12px; }
  .toasts { left: 16px; right: 16px; }
  .toast { max-width: none; min-width: 0; width: 100%; }
  .seg button { padding: 0 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- кнопки «Профессия» и «Контакт» ---------- */
.picker { display: flex; flex-direction: column; gap: 10px; }
.pk-row { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: start; }
.pk-l { font-size: 12.5px; font-weight: 800; color: var(--muted); padding-top: 9px; }
.pk-note { font-size: 12.5px; color: var(--muted); padding-left: 108px; }
.chip svg { opacity: .8; }
@media (max-width: 640px) {
  .pk-row { grid-template-columns: 1fr; gap: 6px; }
  .pk-l { padding-top: 0; }
  .pk-note { padding-left: 0; }
}

/* ---------- взять контакты кнопкой фильтра ---------- */
.take-wrap { overflow-x: auto; }
table.take { width: 100%; border-collapse: collapse; min-width: 560px; }
.take th { text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); padding: 0 6px 10px; white-space: nowrap; }
.take th svg { width: 13px; height: 13px; vertical-align: -2px; margin-right: 5px; }
.take td { padding: 4px 6px; border-top: 1px solid var(--line); }
.take td.tk-seg { font-weight: 700; white-space: nowrap; padding-right: 18px; }
.take td.tk-seg small { display: block; font-weight: 600; color: var(--faint); font-size: 11.5px; }
.tk {
  position: relative; overflow: hidden; width: 100%; min-width: 150px; height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 0 14px; border: 0; border-radius: 4px; cursor: pointer; font: inherit; color: var(--ink);
  background: linear-gradient(180deg, #fff 0%, #fafaf8 50%, #f1f1ee 50%, #fafaf9 100%);
  box-shadow: inset 0 0 0 1px var(--line-2); transition: box-shadow .2s var(--ease), transform .15s var(--ease);
}
.tk::after { content: ''; position: absolute; top: -20%; bottom: -20%; left: -60%; width: 28%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .9), transparent); transform: skewX(-22deg); transition: left .7s var(--ease); pointer-events: none; }
.tk:hover::after { left: 135%; }
.tk b { font: 600 24px/1 var(--serif); font-variant-numeric: lining-nums; }
.tk span { font-size: 12px; font-weight: 800; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.tk span svg { width: 14px; height: 14px; }
.tk:hover { box-shadow: inset 0 0 0 1px #0d0d0e, inset 0 -2px 0 #ff8a22; }
.tk:hover span { color: var(--accent-ink); }
.tk:active { transform: translateY(1px); }
.tk:disabled { cursor: default; opacity: .4; background: #f6f6f4; }
.tk:disabled::after { display: none; }
.tk.busy { pointer-events: none; opacity: .6; }
.take-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 16px; border-left: 2px solid #ff8a22; background: #fbfaf8; font-size: 13px; color: var(--ink-2); }
.q-ct { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: -2px; opacity: .7; }
.q-ct svg { width: 12px; height: 12px; }

/* ---------- минимализм: последний слой, перекрывает всё выше ---------- */
:root { --bg: #fafaf9; --line: #e9e9e7; --line-2: #d6d6d4; }
.card, .btn, .chip, .seg, .seg button, .input, .res, .tk, .q-item, .lp-contacts, .extra, .modal, .toast, .ch-card, .drop,
.take-note, .toggle, .toggle::after, .bulk, .matrix td, .hours .h, .hbar .track, .hbar .fill, .funnel .fs .track, .funnel .fs .fill,
.progress, .progress i, .avatar, .empty .ico, .drop .ico, .tip, .err-box, .bars .col > i, .nav a, .me-card, .kpi .bar, .kpi .bar i { border-radius: 0 !important; }
.card { box-shadow: none; }
/* боковая панель как в Monarelle: название заглавными, активный пункт белый */
.side { padding: 28px 12px 18px; }
.brand { padding: 4px 12px 28px; }
.brand-name { font: 800 16px/20px var(--sans); letter-spacing: .24em; text-transform: uppercase; }
.brand-sub { margin-top: 6px; color: #8f8c87; }
.brand-sub i { display: none; }
.nav a { font-weight: 600; padding: 11px 12px; }
.nav a.on { background: #fff; color: #0b0b0c; }
.nav a.on svg { color: #0b0b0c; }
.nav a.on::before { display: none; }
.nav a .badge.count { background: #2a2a2c; color: #fff; box-shadow: none; }
.nav a.on .badge.count { background: #0b0b0c; color: #fff; }
.nav-sep { background: #1c1c1d; }
.me-card { background: transparent; border: 0; padding: 8px 10px; }
.avatar { background: #2a2a2c; color: #fff; box-shadow: none; }
.topbar .avatar { background: #2a2a2c; }
/* кнопки: зеркало только у главных, остальные плоские */
.btn.pearl { background: #fff; box-shadow: inset 0 0 0 1px var(--line-2); }
.btn.pearl::before, .btn.pearl::after { display: none; }
.btn.pearl:hover { box-shadow: inset 0 0 0 1px #0e0e0e; }
.chip { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); height: 34px; }
.chip.on { background: #0e0e0e; }
.seg { background: transparent; padding: 0; gap: 0; box-shadow: inset 0 0 0 1px var(--line-2); }
.seg button { height: 38px; border-radius: 0; }
.seg button.on { background: #0e0e0e; color: #fff; box-shadow: none; }
.input { border-color: #a3a3a1; }
.input:hover { border-color: #6f6f6d; }
/* цифры без плашек */
.kpi.hero { background: #fff; color: var(--ink); border-color: var(--line); }
.kpi.hero .kpi-label, .kpi.hero .kpi-note { color: var(--muted); }
.kpi .bar { display: none; }
.kpi-label svg { display: none; }
/* статусы: точка и подпись */
.badge { background: transparent !important; border: 0 !important; padding: 0; height: auto; color: var(--ink-2) !important; text-decoration: none !important; font-weight: 600; gap: 7px; }
.badge i { width: 7px; height: 7px; border-radius: 0; }
.st-new i { background: transparent; box-shadow: inset 0 0 0 1.5px #0e0e0e; }
.st-no_answer i { background: #b5b3ae; }
.st-thinking i { background: #e8b04f; }
.st-callback i { background: transparent; box-shadow: inset 0 0 0 1.5px #f26a0f; }
.st-interested i, .st-trial i { background: #f26a0f; }
.st-paid i { background: #0e0e0e; }
.st-paid { color: #0e0e0e !important; font-weight: 800; }
.st-refused i, .st-unreachable i, .st-invalid i { background: #d6d6d4; }
.st-refused, .st-unreachable, .st-invalid { color: var(--muted) !important; }
.badge.count { background: #0e0e0e !important; color: #fff !important; padding: 0 6px; height: 20px; }
/* карточка лида и итоги */
.lp-contacts { background: transparent; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; }
.res { background: #fff; box-shadow: inset 0 0 0 1px var(--line-2); min-height: 70px; }
.res::after, .tk::after { display: none; }
.res:hover { box-shadow: inset 0 0 0 1px #0e0e0e; }
.res.win { background: #ff8a22; box-shadow: none; }
.res.on { box-shadow: inset 0 0 0 1px #0e0e0e; }
.extra { background: #fff; border-color: var(--line-2); }
.step-title b { border-radius: 0; }
.tl-ico, .tl-ico.call, .tl-ico.telegram, .tl-ico.whatsapp { background: transparent; border: 1px solid var(--line-2); color: var(--ink-2); border-radius: 0; }
.tk { background: #fff; }
.take-note { background: transparent; border-left-color: #0e0e0e; padding-left: 12px; }
.q-item.on { background: #0e0e0e; }
.ch-card.best { box-shadow: inset 0 2px 0 #f26a0f; border-color: var(--line); }
.empty .ico { background: transparent; border: 1px solid var(--line-2); color: var(--ink); }
.toast::before { width: 3px; }
/* KPI */
.kpi-done { font-size: 15px; }
.kbar { height: 4px; background: #efefed; }
.kbar i { display: block; height: 100%; background: #0e0e0e; }
.t tr.tot td { background: #fafaf9; font-weight: 700; }
.kday th.kd, .kday td.kd { text-align: center; padding-left: 6px; padding-right: 6px; min-width: 64px; white-space: nowrap; }
.kday td.kd span { font-weight: 800; font-variant-numeric: tabular-nums; }
.kday td.kd .sep { color: var(--faint); font-weight: 500; margin: 0 3px; }
.kday td.kd small { display: block; font-size: 11px; color: #b44a05; font-weight: 700; }
.kday td.kd.empty { color: var(--faint); }

/* ---------- зеркальные кнопки как в Monarelle ---------- */
.btn, .btn.pearl {
  border: 1px solid #d6d6d4; color: var(--ink); font-size: 14px; line-height: 20px; font-weight: 600; letter-spacing: 0;
  background: linear-gradient(180deg, #ffffff 0%, #f6f6f5 55%, #efefed 100%);
  box-shadow: inset 0 1px 0 #ffffff, 0 1px 2px #0e0e0e0f;
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), border-color 220ms var(--ease), color 220ms var(--ease), filter 220ms var(--ease);
}
.btn::before, .btn.pearl::before { display: block; content: ""; position: absolute; inset: 0 0 50% 0; z-index: -1; background: linear-gradient(180deg, #ffffffb3, #ffffff00); pointer-events: none; }
.btn::after, .btn.pearl::after { display: block; content: ""; position: absolute; top: -10%; bottom: -10%; left: -75%; width: 45%; z-index: 1; background: linear-gradient(100deg, #ffffff00 0%, #ffffffcc 50%, #ffffff00 100%); transform: skewX(-20deg); opacity: 0; transition: left 700ms var(--ease), opacity 200ms var(--ease); pointer-events: none; }
.btn:hover, .btn.pearl:hover { transform: translateY(-1px); border-color: #c4c4c2; box-shadow: inset 0 1px 0 #ffffff, 0 6px 16px -8px #0e0e0e40; }
.btn:hover::after { left: 135%; opacity: 1; }
.btn:active, .btn.pearl:active { transform: translateY(0); box-shadow: inset 0 1px 2px #0e0e0e1f; transition-duration: 90ms; }
.btn.onyx {
  border-color: #000; color: #fff;
  background: linear-gradient(180deg, #3a3a39 0%, #161616 48%, #050505 52%, #0e0e0e 100%);
  box-shadow: inset 0 1px 0 #ffffff33, inset 0 -1px 0 #00000080, 0 1px 2px #0e0e0e33, 0 8px 20px -12px #0e0e0e99;
}
.btn.onyx::before { background: linear-gradient(180deg, #ffffff2e, #ffffff00); }
.btn.onyx::after { background: linear-gradient(100deg, #ffffff00 0%, #ffffff59 50%, #ffffff00 100%); }
.btn.onyx:hover { border-color: #000; filter: brightness(1.12); box-shadow: inset 0 1px 0 #ffffff40, inset 0 -1px 0 #00000080, 0 10px 24px -12px #0e0e0eb3; }
.btn.onyx:active { filter: brightness(.95); box-shadow: inset 0 2px 4px #000000a6; }
.btn.gold {
  border-color: #c9560b; color: #1d0e02;
  background: linear-gradient(180deg, #ffb055 0%, #ff8a22 48%, #ef690c 52%, #fb8b2c 100%);
  box-shadow: inset 0 1px 0 #ffffff59, inset 0 -1px 0 #8a3a0040, 0 1px 2px #0e0e0e26, 0 8px 20px -12px #f26a0fa6;
}
.btn.gold::before { background: linear-gradient(180deg, #ffffff4d, #ffffff00); }
.btn.gold::after { background: linear-gradient(100deg, #ffffff00 0%, #ffffff8c 50%, #ffffff00 100%); }
.btn.gold:hover { border-color: #b84d08; filter: brightness(1.05); box-shadow: inset 0 1px 0 #ffffff66, inset 0 -1px 0 #8a3a0040, 0 10px 24px -12px #f26a0fcc; }
.btn.gold:active { filter: brightness(.96); box-shadow: inset 0 2px 4px #8a3a0073; }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--ink-2); }
.btn.ghost::before, .btn.ghost::after { display: none; }
.btn.ghost:hover { transform: none; color: var(--ink); background: #f2f2f1; box-shadow: none; border-color: transparent; }
.side .btn.ghost:hover { background: #1c1c1d; color: #fff; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.btn:disabled, .btn:disabled:hover { cursor: not-allowed; transform: none; filter: none; background: #fafaf9; color: #6f6f6d; border-color: #e9e9e7; box-shadow: none; }
.btn:disabled::before, .btn:disabled::after { display: none; }
/* плитки итога и кнопки выдачи: то же зеркало */
.res, .tk {
  border: 1px solid #d6d6d4; background: linear-gradient(180deg, #ffffff 0%, #f6f6f5 55%, #efefed 100%);
  box-shadow: inset 0 1px 0 #ffffff, 0 1px 2px #0e0e0e0f; transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), border-color 220ms var(--ease);
}
.res::before, .tk::before { content: ""; position: absolute; inset: 0 0 50% 0; background: linear-gradient(180deg, #ffffffb3, #ffffff00); pointer-events: none; }
.res::after, .tk::after { display: block; content: ""; position: absolute; top: -10%; bottom: -10%; left: -75%; width: 45%; background: linear-gradient(100deg, #ffffff00 0%, #ffffffcc 50%, #ffffff00 100%); transform: skewX(-20deg); opacity: 0; transition: left 700ms var(--ease), opacity 200ms var(--ease); pointer-events: none; }
.res:hover, .tk:hover { transform: translateY(-1px); border-color: #c4c4c2; box-shadow: inset 0 1px 0 #ffffff, 0 6px 16px -8px #0e0e0e40; }
.res:hover::after, .tk:hover::after { left: 135%; opacity: 1; }
.res > *, .tk > * { position: relative; z-index: 1; }
.res.on { border-color: #000; color: #fff; background: linear-gradient(180deg, #3a3a39 0%, #161616 48%, #050505 52%, #0e0e0e 100%); box-shadow: inset 0 1px 0 #ffffff33, inset 0 -1px 0 #00000080; }
.res.on::before { background: linear-gradient(180deg, #ffffff2e, #ffffff00); }
.res.win { border-color: #c9560b; color: #1d0e02; background: linear-gradient(180deg, #ffb055 0%, #ff8a22 48%, #ef690c 52%, #fb8b2c 100%); box-shadow: inset 0 1px 0 #ffffff59, 0 1px 2px #0e0e0e26; }
.res.win::before { background: linear-gradient(180deg, #ffffff4d, #ffffff00); }
.res.win.on { box-shadow: inset 0 0 0 2px #0e0e0e; }
.tk:hover { box-shadow: inset 0 1px 0 #ffffff, 0 6px 16px -8px #0e0e0e40; }
.tk:disabled, .tk:disabled:hover { transform: none; background: #fafaf9; box-shadow: none; border-color: #e9e9e7; }
.tk:disabled::before, .tk:disabled::after { display: none; }

/* ---------- телефон: ничего не шире экрана ---------- */
@media (max-width: 1023px) {
  .work { grid-template-columns: minmax(0, 1fr); }
  .topbar .brand-name { font-size: 14px; letter-spacing: .2em; }
  .main { min-width: 0; overflow-x: hidden; }
}
@media (max-width: 640px) {
  .seg { display: flex; flex-wrap: wrap; }
  .seg button { flex: 1 1 auto; }
  .head { margin-bottom: 18px; }
  .head-actions { width: 100%; }
  .head-actions .btn, .head-actions select { flex: 1 1 auto; }
  .lp-actions { width: 100%; }
  .lp-actions .btn { flex: 1 1 auto; }
  .lp-top .head-actions .btn { flex: 0 1 auto; }
  .lead-panel { padding: 18px 14px; }
  .today-bar { gap: 12px; }
  .mini { flex: 1 1 40%; padding: 0 10px; }
  .card-head { padding: 16px 16px 0; flex-wrap: wrap; }
  .card-body { padding: 14px 16px 18px; }
  .t th:first-child, .t td:first-child { padding-left: 14px; }
  .t th:last-child, .t td:last-child { padding-right: 14px; }
  .toolbar { padding: 14px 16px; }
  .modal { padding: 22px 16px; }
  .drawer .lead-panel { margin: 0 8px 16px; }
  .chips { gap: 6px; }
  .q-item { padding: 10px; }
}
.take-foot { display: flex; gap: 16px; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.take-foot .take-note { flex: 1 1 260px; }
@media (max-width: 640px) { .take-foot .btn { width: 100%; } }
.upd-bar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 85; display: flex; gap: 16px; align-items: center; padding: 10px 12px 10px 18px; background: #0e0e0e; color: #fff; font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg); animation: viewIn .3s var(--ease) both; white-space: nowrap; }

/* ---------- плитки этапов ---------- */
.stages { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.stage {
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 14px; min-height: 84px; cursor: pointer; text-align: left; font: inherit; color: var(--ink);
  border: 1px solid #d6d6d4; background: linear-gradient(180deg, #ffffff 0%, #f6f6f5 55%, #efefed 100%); box-shadow: inset 0 1px 0 #ffffff, 0 1px 2px #0e0e0e0f;
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), border-color 220ms var(--ease);
}
.stage::after { content: ""; position: absolute; top: -10%; bottom: -10%; left: -75%; width: 45%; background: linear-gradient(100deg, #ffffff00 0%, #ffffffcc 50%, #ffffff00 100%); transform: skewX(-20deg); opacity: 0; transition: left 700ms var(--ease), opacity 200ms var(--ease); pointer-events: none; }
.stage:hover { transform: translateY(-1px); border-color: #c4c4c2; box-shadow: inset 0 1px 0 #ffffff, 0 6px 16px -8px #0e0e0e40; }
.stage:hover::after { left: 135%; opacity: 1; }
.stage .sg-t { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.stage b { font: 600 30px/1 var(--serif); font-variant-numeric: lining-nums; }
.stage small { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.stage.on { border-color: #000; color: #fff; background: linear-gradient(180deg, #3a3a39 0%, #161616 48%, #050505 52%, #0e0e0e 100%); box-shadow: inset 0 1px 0 #ffffff33, inset 0 -1px 0 #00000080; }
.stage.on .sg-t, .stage.on small { color: #c9c7c3; }
.stage.alert b { color: #b44a05; }
.stage.on.alert b { color: #ffae52; }
.stage.zero { opacity: .55; }
.pk-more > summary { cursor: pointer; padding: 14px 22px; font-weight: 700; font-size: 13.5px; color: var(--ink-2); list-style: none; border-bottom: 1px solid transparent; }
.pk-more > summary::-webkit-details-marker { display: none; }
.pk-more > summary::before { content: '+'; display: inline-block; width: 18px; font-weight: 800; }
.pk-more[open] > summary::before { content: '−'; }
.pk-more[open] > summary { border-bottom-color: var(--line); }
.pk-more #pk { padding: 14px 22px; }
.toolbar + .pk-more { border-bottom: 1px solid var(--line); }
a.fs { text-decoration: none; color: inherit; padding: 2px 4px; margin: 0 -4px; transition: background .2s; }
a.fs:hover { background: #f4f4f2; }
@media (max-width: 640px) {
  .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage { min-height: 74px; padding: 10px 12px; }
  .stage b { font-size: 26px; }
  .pk-more > summary { padding: 12px 16px; }
  .pk-more #pk { padding: 12px 16px; }
}
