/* ============================================================
   Телефония FOCUS — оформление кабинета.
   Стиль Radix Themes (утверждён 07.11.2026): индиго, серые шкалы,
   тонкие рамки вместо теней, скругления 4–8.
   Эталон: telephony/docs/design-system/radix/ekrany-radix.html
   Названия классов прежние — их ставит app.js, менять нельзя.
   ============================================================ */

:root {
    /* шкалы Radix */
    --gray1: #fcfcfd; --gray2: #f9f9fb; --gray3: #f0f0f3; --gray4: #e8e8ec; --gray5: #e0e1e6;
    --gray6: #d9d9e0; --gray7: #cdced6; --gray8: #b9bbc6; --gray9: #8b8d98; --gray11: #60646c; --gray12: #1c2024;
    --indigo2: #f7f9ff; --indigo3: #edf2fe; --indigo4: #e1e9ff; --indigo5: #d2deff; --indigo6: #c1d0ff;
    --indigo8: #8da4ef; --indigo9: #3e63dd; --indigo10: #3358d4; --indigo11: #3a5bc7;
    --green3: #e6f6eb; --green6: #adddc0; --green9: #30a46c; --green11: #218358;
    --red3: #feebec; --red4: #ffdbdc; --red9: #e5484d; --red11: #ce2c31;
    --amber3: #fff7c2; --amber6: #f3d673; --amber11: #ab6400;
    --orange3: #ffefd6; --orange9: #f76b15; --orange11: #cc4e00;
    --purple11: #8145b5; --teal11: #008573;

    /* старые имена — на них ссылаются app.js и разметка */
    --primary: var(--indigo9);
    --primary-dark: var(--indigo10);
    --title: var(--gray12);
    --text: var(--gray12);
    --muted: var(--gray11);
    --bg: var(--gray1);
    --soft: var(--gray2);
    --line: var(--gray4);
    --green: var(--green11);
    --orange: var(--orange11);
    --red: var(--red11);
    --purple: var(--purple11);

    --ring: 0 0 0 1px var(--gray5);
    --focus: 0 0 0 1px var(--indigo8), 0 0 0 3px var(--indigo4);
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: var(--font); background: var(--gray1); color: var(--gray12);
    font-size: 14px; line-height: 20px; -webkit-font-smoothing: antialiased;
}
a { color: var(--indigo11); text-decoration: none; }
:where(button, a, [tabindex]):focus-visible { outline: 2px solid var(--indigo8); outline-offset: 2px; }

/* ---------- вход и регистрация ---------- */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--gray2); }
.auth__box { background: #fff; border-radius: 12px; padding: 32px; width: 100%; max-width: 400px; box-shadow: var(--ring), 0 12px 32px rgba(0, 0, 40, .06); }
.auth__logo { font-size: 20px; line-height: 28px; font-weight: 700; color: var(--gray12); margin-bottom: 4px; letter-spacing: -.01em; }
.auth__sub { color: var(--gray11); font-size: 14px; margin-bottom: 20px; }
/* Пришли со страницы после установки amoCRM: напоминание, что после входа аккаунт подключится сам */
.auth__note { background: var(--indigo3); color: var(--indigo11); border-radius: 8px; padding: 10px 12px; font-size: 13px; line-height: 18px; margin-bottom: 16px; }
/* Кнопка «Подключить amoCRM», когда в кабинет пришли кнопкой «Подключить» из виджета */
.btn.attn { box-shadow: 0 0 0 4px var(--indigo4); animation: attn 1.4s ease-in-out 3; }
@keyframes attn { 50% { box-shadow: 0 0 0 8px var(--indigo3); } }
.auth__switch { margin-top: 16px; font-size: 13px; color: var(--gray11); text-align: center; }

/* ---------- каркас ---------- */
.app { display: none; min-height: 100vh; }
.app.on { display: flex; }

.side {
    width: 240px; background: var(--gray2); color: var(--gray12); padding: 14px 0 0;
    border-right: 1px solid var(--gray4);
    display: flex; flex-direction: column; position: fixed; left: 0; top: 0; height: 100vh; z-index: 100;
    transition: transform .3s cubic-bezier(.4, 0, .2, 1);
    overflow-y: auto;               /* катается вся колонка целиком, а не только список пунктов */
}
.side.collapsed { transform: translateX(-240px); }
.side__logo { padding: 4px 18px 14px; font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.side__mark { width: 28px; height: 28px; border-radius: 6px; background: var(--indigo9); color: #fff; display: grid; place-items: center; font-size: 14px; flex-shrink: 0; }
.side__name { flex: 1; min-width: 0; }
.side__name small { display: block; font-size: 12px; line-height: 16px; font-weight: 400; color: var(--gray11); }
.side__close { background: none; border: none; color: var(--gray9); font-size: 16px; cursor: pointer; padding: 4px 8px; border-radius: 6px; transition: background .15s; line-height: 1; flex-shrink: 0; }
.side__close:hover { color: var(--gray12); background: var(--gray4); }
.side__menu { padding: 0 10px 10px; }
.side__group { padding: 12px 8px 4px; font-size: 12px; color: var(--gray9); font-weight: 500; white-space: nowrap; overflow: hidden; }
.side__item { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 6px; font-size: 14px; color: var(--gray11); cursor: pointer; transition: background .15s; white-space: nowrap; }
.side__item:hover { background: var(--gray4); color: var(--gray12); }
.side__item.active { background: var(--indigo4); color: var(--indigo11); font-weight: 500; }
.side__item .ic { width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.side__item .ic svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side__item .pill { margin-left: auto; background: var(--orange3); color: var(--orange11); border-radius: 4px; padding: 0 6px; font-size: 12px; line-height: 18px; font-weight: 500; }
.side__bottom { margin-top: auto; padding: 8px 10px; border-top: 1px solid var(--gray4); }
.side__item--soft { color: var(--gray11); text-decoration: none; }
.side__foot { padding: 10px 18px 14px; font-size: 12px; color: var(--gray9); white-space: nowrap; overflow: hidden; }
.side__overlay { position: fixed; inset: 0; background: rgba(0, 0, 20, .25); z-index: 99; opacity: 0; pointer-events: none; transition: opacity .3s; }
.side__overlay.show { opacity: 1; pointer-events: all; }

.main { margin-left: 240px; flex: 1; min-width: 0; transition: margin-left .3s cubic-bezier(.4, 0, .2, 1); }
.main.wide { margin-left: 0; }
.topbar { background: var(--gray1); border-bottom: 1px solid var(--gray4); padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 10; }
.topbar h1 { font-size: 20px; line-height: 28px; color: var(--gray12); font-weight: 700; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

/* значок лицензии в шапке */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 4px; font-size: 13px; font-weight: 500; white-space: nowrap; background: var(--gray3); color: var(--gray11); }
.badge.trial { background: var(--amber3); color: var(--amber11); }
.badge__sm { display: none; }                     /* короткая надпись — только на телефоне */
.badge.active { background: var(--green3); color: var(--green11); }
.badge.stopped { background: var(--red3); color: var(--red11); }
.badge .pulse { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.content { padding: 20px 24px 60px; max-width: 1180px; }
.view { display: none; }
.view.on { display: block; }

/* ---------- карточки и сетки ---------- */
.card { background: #fff; border-radius: 8px; padding: 16px; box-shadow: var(--ring); margin-bottom: 16px; }
.card h3 { font-size: 16px; line-height: 24px; color: var(--gray12); margin-bottom: 12px; font-weight: 700; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card__head h3 { margin: 0; }
.card__head { justify-content: flex-start; }
.card__head > :first-child { margin-right: auto; }
/* ячейка с кнопками: app.js ставит ей display:flex — возвращаем ячейку таблицы, иначе рвётся линия строки */
td[style*="display:flex"] { display: table-cell !important; white-space: nowrap; }
td[style*="display:flex"] > * + * { margin-left: 6px; }
/* таблица внутри карточки — во всю ширину, как Table в Card у Radix */
.card > .tablewrap { margin: 0 -16px -16px; border-top: 1px solid var(--gray5); border-radius: 0 0 8px 8px; }
.card > .tablewrap th:first-child, .card > .tablewrap td:first-child { padding-left: 16px; }
.card > .tablewrap th:last-child, .card > .tablewrap td:last-child { padding-right: 16px; }

.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
/* ячейки сетки не шире экрана: широкий график прокручивается внутри своей карточки */
.grid4 > *, .grid3 > *, .grid2 > * { min-width: 0; }
.card { min-width: 0; }

.stat { background: #fff; border-radius: 8px; padding: 12px 14px; box-shadow: var(--ring); }
.stat .n { font-size: 24px; line-height: 32px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 13px; color: var(--gray11); margin-top: 2px; }
/* цифры в плитках — чёрные, как на утверждённых экранах; цвет только у смысловых пометок */
.stat .n { color: var(--gray12); }
.c-blue { color: var(--indigo11); } .c-green { color: var(--green11); }
.c-orange { color: var(--orange11); } .c-purple { color: var(--purple11); } .c-red { color: var(--red11); }

/* ---------- кнопки ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 32px; padding: 0 12px; border: none; border-radius: 6px;
    background: var(--indigo9); color: #fff; font: 500 14px/20px var(--font);
    cursor: pointer; transition: background .15s; white-space: nowrap;
}
.btn:hover { background: var(--indigo10); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: var(--indigo3); color: var(--indigo11); }
.btn.ghost:hover { background: var(--indigo4); }
.btn.sm { min-height: 24px; padding: 0 8px; font-size: 12px; line-height: 16px; border-radius: 4px; }
.btn.danger { background: var(--red3); color: var(--red11); }
.btn.danger:hover { background: var(--red4); }
.btn.wide { width: 100%; }

/* ---------- поля ---------- */
label { font-size: 13px; color: var(--gray12); display: block; margin-bottom: 4px; font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], select, textarea {
    min-height: 32px; padding: 5px 10px; border: 1px solid var(--gray7); border-radius: 6px; font-size: 14px; line-height: 20px;
    background: #fff; color: var(--gray12); width: 100%; font-family: inherit;
}
textarea { padding: 6px 10px; resize: vertical; }
::placeholder { color: var(--gray9); }
select {
    appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 30px;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath fill='none' stroke='%2360646c' stroke-width='1.5' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--indigo8); box-shadow: var(--focus); }
input[type=checkbox], input[type=radio] { accent-color: var(--indigo9); }
.field { margin-bottom: 14px; }
.field .hint { font-size: 12px; line-height: 16px; color: var(--gray11); margin-top: 4px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* переключатель как Switch у Radix */
.switch { position: relative; display: inline-block; width: 36px; height: 20px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--gray5); box-shadow: inset 0 0 0 1px var(--gray6); border-radius: 999px; cursor: pointer; transition: background .15s; }
.switch span:before { content: ''; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.switch input:checked + span { background: var(--indigo9); box-shadow: none; }
.switch input:checked + span:before { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--indigo8); outline-offset: 2px; }
.switch input:disabled + span { opacity: .45; cursor: not-allowed; }

/* ---------- таблицы ---------- */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 13px; font-weight: 500; color: var(--gray12); background: var(--gray2); padding: 9px 12px; border-bottom: 1px solid var(--gray5); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--gray4); vertical-align: middle; max-width: 420px; overflow-wrap: anywhere; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--gray2); }

/* плашки статуса — Badge soft у Radix */
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 4px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.tag.on { background: var(--green3); color: var(--green11); }
.tag.off { background: var(--red3); color: var(--red11); }
.tag.wait { background: var(--orange3); color: var(--orange11); }
.tag.grey { background: var(--gray3); color: var(--gray11); }

.av { width: 32px; height: 32px; border-radius: 50%; background: var(--indigo3); color: var(--indigo11); display: inline-flex; align-items: center; justify-content: center; font-weight: 500; font-size: 12px; margin-right: 10px; vertical-align: middle; }
.dir-in { color: var(--green11); font-weight: 500; }
.dir-out { color: var(--indigo11); font-weight: 500; }
.dir-miss { color: var(--red11); font-weight: 500; }

/* ---------- мастер настройки ---------- */
.steps { display: grid; gap: 8px; }
.step { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 8px; background: #fff; box-shadow: var(--ring); }
.step.done { background: var(--green3); box-shadow: 0 0 0 1px var(--green6); }
.step__num { width: 28px; height: 28px; border-radius: 50%; background: var(--indigo3); color: var(--indigo11); display: flex; align-items: center; justify-content: center; font-weight: 500; flex-shrink: 0; }
.step.done .step__num { background: var(--green9); color: #fff; }
.step__body { flex: 1; min-width: 0; }
.step__title { font-weight: 500; color: var(--gray12); margin-bottom: 2px; }
.step__text { font-size: 13px; line-height: 18px; color: var(--gray11); }

/* ---------- всплывающее окно — Dialog у Radix ---------- */
.modal { position: fixed; inset: 0; background: rgba(0, 0, 20, .32); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 100; }
.modal.on { display: flex; }
.modal__box { background: #fff; border-radius: 12px; padding: 24px; width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; box-shadow: var(--ring), 0 16px 48px rgba(0, 0, 40, .18); }
.modal__title { font-size: 18px; line-height: 26px; font-weight: 700; color: var(--gray12); margin-bottom: 16px; letter-spacing: -.01em; }
.modal__foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }
.modal__foot #modalDel { margin-right: auto; }   /* удаление — слева, подальше от «Сохранить» */
.modal__foot .btn.ghost { background: var(--gray3); color: var(--gray12); }
.modal__foot .btn.ghost:hover { background: var(--gray4); }
.confirm { z-index: 120; }                        /* поверх обычного окна */
.confirm .modal__box { max-width: 400px; }
.confirm__text { color: var(--gray11); font-size: 14px; line-height: 20px; margin-top: 4px; }

/* ---------- сообщение ---------- */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px); background: var(--gray12); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 14px; opacity: 0; transition: .25s; z-index: 200; max-width: 90vw; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.toast.on { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.err { background: var(--red9); }

.field__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.field__link { color: var(--indigo11); font-size: 13px; font-weight: 500; text-decoration: none; flex-shrink: 0; }
.field__link:hover { text-decoration: underline; }

/* ---------- строки с копированием (данные для звонилки) ---------- */
.crows { border-radius: 8px; overflow: hidden; background: #fff; box-shadow: var(--ring); }
.crow { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--gray4); }
.crow:last-child { border-bottom: none; }
.crow__l { width: 74px; flex-shrink: 0; color: var(--gray11); font-size: 13px; }
.crow__v { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; color: var(--gray12); font-size: 13px; }
.crow__b { flex-shrink: 0; background: var(--gray3); border: none; color: var(--gray12); border-radius: 4px;
    min-height: 24px; padding: 0 8px; font-size: 12px; font-weight: 500; cursor: pointer; font-family: inherit; transition: background .15s; }
.crow__b:hover { background: var(--gray5); }
.crows__foot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* пустой экран: значок в сером квадрате, без эмодзи */
.empty { text-align: center; padding: 40px 20px; color: var(--gray11); }
.empty__ic { width: 40px; height: 40px; border-radius: 8px; background: var(--gray3); color: var(--gray11); display: grid; place-items: center; margin: 0 auto 10px; font-size: 18px; }
.empty__ic svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.err { color: var(--red11); font-size: 13px; margin-top: 10px; }
.muted { color: var(--gray11); font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }

/* ---------- конструктор схем ---------- */
.palette { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.pchip { background: #fff; color: var(--gray12); box-shadow: var(--ring); border-radius: 6px; padding: 5px 10px; font-size: 13px; font-weight: 500; cursor: pointer; user-select: none; }
.pchip:hover { background: var(--gray2); box-shadow: 0 0 0 1px var(--gray7); }

.canvas { position: relative; background-color: var(--gray2); border-radius: 8px; box-shadow: var(--ring); overflow: auto; min-height: 420px; background-image: radial-gradient(var(--gray6) 1px, transparent 1px); background-size: 16px 16px; }
.canvas.linking { cursor: crosshair; }
.canvas.linking .fblock { box-shadow: 0 0 0 2px var(--indigo6); }

.fblock { position: absolute; width: 178px; min-height: 72px; background: #fff; border: none; border-radius: 8px; padding: 10px 12px; cursor: move; user-select: none; box-shadow: var(--ring), 0 2px 6px rgba(0, 0, 40, .06); }
.fblock:hover { box-shadow: 0 0 0 1px var(--indigo6), 0 4px 12px rgba(62, 99, 221, .14); }
.fblock__t { font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.fblock__d { font-size: 12px; color: var(--gray11); line-height: 16px; }

.fport { position: absolute; right: -6px; top: 50%; transform: translateY(-50%); width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px var(--indigo9); cursor: pointer; }
.fport:hover { background: var(--indigo9); transform: translateY(-50%) scale(1.2); }
.fport--no { top: auto; bottom: -6px; right: 50%; transform: translateX(50%); box-shadow: inset 0 0 0 2px var(--orange9); }
.fport--no:hover { background: var(--orange9); transform: translateX(50%) scale(1.2); }

.fdel { position: absolute; right: 4px; top: 4px; width: 18px; height: 18px; line-height: 16px; text-align: center; color: var(--gray8); cursor: pointer; font-size: 15px; border-radius: 4px; }
.fdel:hover { color: var(--red11); background: var(--red3); }

/* ---------- телефон ---------- */
@media (max-width: 700px) {
    .topbar { padding: 12px 14px; gap: 8px; }
    .topbar h1 { font-size: 17px; }
    .badge { font-size: 12px; }
    .badge__lg { display: none; }
    .badge__sm { display: inline; }
}

@media (max-width: 860px) {
    .side { transform: translateX(-100%); transition: .2s; }
    .side.open { transform: none; }
    .main { margin-left: 0; }
    .content { padding: 16px 16px 50px; }
    .grid4, .grid3, .grid2, .row2 { grid-template-columns: 1fr; }
    .burger { display: block !important; }
}
.burger { display: none; background: none; border: none; font-size: 20px; cursor: pointer; color: var(--gray11); border-radius: 6px; padding: 2px 6px; }
.burger:hover { background: var(--gray3); }
.app.side-hidden .burger { display: block; }

/* ---------- выбор менеджера amoCRM ---------- */
/* Своё окно вместо системного списка: в компании под две сотни человек
   нужен поиск, а занятых надо показывать сразу видно и не давать выбрать. */
.picker { position: relative; }
.picker__btn {
    width: 100%; display: flex; align-items: center; gap: 8px; text-align: left; min-height: 32px;
    padding: 3px 34px 3px 8px; border: 1px solid var(--gray7); border-radius: 6px;
    background: #fff; color: var(--gray12); font: inherit; font-size: 14px; cursor: pointer;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath fill='none' stroke='%2360646c' stroke-width='1.5' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
}
.picker__btn:hover { border-color: var(--gray8); }
.picker.open .picker__btn { border-color: var(--indigo8); box-shadow: var(--focus); }
.picker__btn .av { width: 24px; height: 24px; font-size: 10px; margin: 0; }
.picker__none { color: var(--gray9); }

.picker__pop {
    position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 6px);
    background: #fff; border-radius: 8px;
    box-shadow: var(--ring), 0 12px 32px rgba(0, 0, 40, .14); overflow: hidden; display: none;
}
.picker.open .picker__pop { display: block; }
.picker__search { border: none; border-bottom: 1px solid var(--gray4); border-radius: 0; background: #fff; padding: 10px 12px; }
.picker__search:focus { box-shadow: none; border-color: var(--gray4); border-bottom-color: var(--indigo8); }
.picker__list { max-height: 260px; overflow-y: auto; padding: 4px; }

.picker__item {
    display: flex; align-items: center; gap: 8px; width: 100%;
    padding: 6px 8px; border: none; border-radius: 4px; background: none;
    font: inherit; font-size: 14px; color: var(--gray12); text-align: left; cursor: pointer;
}
.picker__item:hover { background: var(--indigo9); color: #fff; }
.picker__item:hover .av { background: rgba(255, 255, 255, .2); color: #fff; }
.picker__item.sel { background: var(--indigo3); color: var(--indigo11); font-weight: 500; }
.picker__item .av { width: 24px; height: 24px; font-size: 10px; margin: 0; flex-shrink: 0; }
.picker__nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* занят другим внутренним номером — виден, но выбрать нельзя */
.picker__item.busy { cursor: not-allowed; color: var(--gray8); }
.picker__item.busy:hover { background: none; color: var(--gray8); }
.picker__item.busy .av, .picker__item.busy:hover .av { background: var(--gray3); color: var(--gray8); }
.picker__busy { font-size: 12px; color: var(--gray8); flex-shrink: 0; }
.picker__empty { padding: 14px; text-align: center; color: var(--gray11); font-size: 13px; }

/* предупреждение внутри окна — Callout у Radix */
.warn {
    background: var(--amber3); border: none; border-radius: 8px;
    padding: 10px 12px; font-size: 13px; color: var(--amber11); line-height: 18px;
}

/* поиск в шапке карточки */
.search {
    width: 230px; padding: 5px 10px 5px 32px; font-size: 14px;
    background-color: #fff; background-repeat: no-repeat; background-position: 10px center;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238b8d98' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
}
@media (max-width: 700px) { .search { width: 100%; } }

/* поиск и кнопки — одной строкой, кнопки не переносятся и не сжимаются */
.headrow { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.headrow .btn { white-space: nowrap; flex-shrink: 0; }
.headrow .search { flex: 0 1 220px; min-width: 130px; }
@media (max-width: 700px) {
    .headrow { flex-wrap: wrap; }
    .headrow .search { flex: 1 1 100%; width: 100%; }
}

/* ---------- окно «Взять из amoCRM» ---------- */
.modal.wide .modal__box { max-width: 680px; }

.imp__sec { border-radius: 8px; margin-bottom: 12px; overflow: hidden; box-shadow: var(--ring); }
.imp__head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 12px; background: var(--gray2); border-bottom: 1px solid var(--gray5);
}
.imp__ttl { font-size: 13px; font-weight: 500; color: var(--gray12); }
.imp__sub { font-size: 12px; color: var(--gray11); margin-top: 2px; }
.imp__all { font-size: 12px; color: var(--indigo11); background: none; border: none; cursor: pointer; padding: 0; font-family: inherit; font-weight: 500; }
.imp__all:hover { text-decoration: underline; }
.imp__list { max-height: 210px; overflow-y: auto; padding: 4px; }

.imp__row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 4px; font-size: 13px; }
.imp__row:hover { background: var(--gray2); }
.imp__row input[type=checkbox] { width: 15px; height: 15px; cursor: pointer; flex-shrink: 0; }
.imp__row .av { width: 24px; height: 24px; font-size: 9px; margin: 0; flex-shrink: 0; }
.imp__nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp__note { font-size: 12px; color: var(--gray11); flex-shrink: 0; }

.imp__opt { display: flex; align-items: center; gap: 10px; padding: 8px 2px; font-size: 13px; }
.imp__opt label { margin: 0; font-weight: 400; font-size: 13px; color: var(--gray12); }
.imp__hint { font-size: 12px; color: var(--gray11); margin: 2px 0 12px; line-height: 16px; }

.imp__done { background: var(--green3); box-shadow: 0 0 0 1px var(--green6); border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; }
.imp__table { width: 100%; font-size: 13px; border-collapse: collapse; }
.imp__table th { text-align: left; color: var(--gray11); font-weight: 500; padding: 4px 6px; background: none; border: none; }
.imp__table td { padding: 4px 6px; border-top: 1px solid var(--gray4); border-bottom: none; }

/* Разделы, убранные из меню до следующего спринта (пометка hidden в разметке) */
.side__item[hidden], .side__group[hidden] { display: none !important; }
