:root {
    --bg-main: #eef2f4;
    --panel-bg: #ffffff;
    --sidebar-bg: #0f1822;
    --sidebar-hover: #1b2836;
    --text-main: #000000;
    /* Угольно-черный */
    --text-muted: #111111;
    /* Контрастный темный */
    --border: #c6cdd3;
    --primary: #2fc6f6;
    --primary-hover: #17b3e4;
    --success: #4fc3f7;
    --radius: 3px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased !important;
    /* Четкость букв */
    -moz-osx-font-smoothing: grayscale !important;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
}

.crm-body {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ЖЕСТКИЙ ЧЕРНЫЙ КОНТРАСТ ДЛЯ ГЛАВНОЙ ТАБЛИЦЫ */
.crm-table th {
    color: #000000 !important;
    font-weight: 800 !important;
    background-color: #edeef0 !important;
}

.crm-table td {
    color: #000000 !important;
    font-weight: 600 !important;
}

.request-link {
    color: #175290 !important;
    font-weight: 700 !important;
}

/* МЕГА-КОНТРАСТ ДЛЯ ВСЕЙ ВНУТРЯНКИ КАРТОЧКИ (DRAWER) И ПОДВАЛА */
.drawer-group label,
.drawer-group input,
.drawer-group select,
.drawer-group textarea,
.contact-info-item,
.b24-d-tab,
.b24-timeline-text,
.b24-timeline-time,
.b24-stage-text,
.b24-pagination-bar,
.b24-pagination-left span {
    color: #000000 !important;
    font-weight: 700 !important;
    /* Выкручиваем жирность для читаемости */
}

/* Заголовки блоков карточки ("О ЗАЯВКЕ", "КОНТАКТ") */
.crm-card-title {
    color: #000000 !important;
    font-weight: 800 !important;
}

/* Подсветка активной вкладки в карточке */
.b24-d-tab.active {
    color: #2067b0 !important;
}

/* Сайдбар ТК СЕРВИС */
.sidebar {
    width: 240px;
    background-color: var(--sidebar-bg);
    color: white;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar .logo {
    padding: 22px 20px;
    font-size: 16px;
    font-weight: bold;
    background-color: #0b1118;
    text-align: left;
    letter-spacing: 1px;
    color: #fff;
}

.menu {
    flex-grow: 1;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #b1cfde;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.15s;
}

.menu-item:hover,
.menu-item.active {
    background-color: var(--sidebar-hover);
    color: white;
}

.menu-item svg {
    width: 18px;
    height: 18px;
    color: #829aa6;
    transition: color 0.15s, stroke 0.15s;
}

.menu-item:hover svg,
.menu-item.active svg {
    color: var(--primary);
}

.sidebar-footer {
    padding: 15px;
}

.btn-logout {
    width: 100%;
    padding: 8px;
    background: transparent;
    border: 1px solid #465669;
    color: #8696a6;
    border-radius: var(--radius);
    cursor: pointer;
}

.btn-logout:hover {
    border-color: #ef4444;
    color: #ef4444;
}

/* Основная область */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* ИНЛАЙН ШАПКА БИТРИКС24 */
.b24-top-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    height: 54px;
    box-sizing: border-box;
    flex-shrink: 0;
    position: relative;
    z-index: 100;
    overflow: visible;
}

.b24-page-title {
    font-size: 18px;
    color: #333;
    font-weight: 400;
    white-space: nowrap;
}

.b24-btn-create {
    background: linear-gradient(to bottom, #bbf200 0%, #99cb00 100%);
    border: 1px solid #a3d300;
    color: #535c69;
    padding: 5px 14px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.b24-btn-create:hover {
    background: linear-gradient(to bottom, #c6f700 0%, #a6d700 100%);
}

.b24-filter-pills {
    display: flex;
    align-items: center;
    gap: 2px;
    background: #edeef0;
    padding: 2px;
    border-radius: var(--radius);
    white-space: nowrap;
}

.b24-pill {
    padding: 5px 12px;
    font-size: 12px;
    font-weight: bold;
    color: #535c69;
    cursor: pointer;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 4px;
}

.b24-pill.active {
    background: #fff;
    color: #000;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.b24-pill .count-badge {
    background: #ff5733;
    color: white;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 10px;
}

/* Единый контейнер: тег фильтра внутри инпута */
.b24-search-container-inline {
    display: flex;
    align-items: center;
    border: 1px solid #c6cdd3;
    background: #f4f6f7;
    border-radius: var(--radius);
    padding: 0 10px;
    flex: 1 1 200px;
    max-width: 480px;
    height: 32px;
    box-sizing: border-box;
    gap: 8px;
}

.b24-search-container-inline:focus-within {
    background: #fff;
    border-color: #2fc6f6;
    box-shadow: 0 0 4px rgba(47, 198, 246, 0.3);
}

.b24-pill-tag-inside {
    background: #bbedfc;
    color: #1d607a;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: bold;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.b24-tag-close {
    cursor: pointer;
    color: #1d607a;
    font-weight: normal;
}

.b24-tag-close:hover {
    color: #ff5733;
}

.b24-search-container-inline input {
    border: none !important;
    background: transparent !important;
    outline: none !important;
    font-size: 13px;
    color: #000;
    width: 100%;
    height: 100%;
    padding: 0;
}

.b24-search-icon-inline {
    color: #829aa6;
    flex-shrink: 0;
}

/* ВИДЖЕТ ТАЙМЕРА БИТРИКС24 */
.b24-timer-widget {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    background: #f4f6f7;
    padding: 2px 4px 2px 10px;
    border-radius: 20px;
    border: 1px solid #c6cdd3;
    height: 32px;
    box-sizing: border-box;
}

.b24-timer-widget.state-started {
    background: #fff;
    border-color: #99cb00;
}

.b24-timer-widget.state-paused {
    background: #fffde7;
    border-color: #ffb700;
}

.b24-timer-clock-block {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: monospace;
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.state-started .b24-timer-clock-block {
    color: #2e7d32;
}

.b24-timer-icon {
    display: flex;
    align-items: center;
    color: #a1a6ac;
}

.state-started .b24-timer-icon {
    color: #99cb00;
}

.b24-timer-status-text {
    font-size: 11px;
    text-transform: uppercase;
    color: #ffb700;
    font-weight: bold;
    display: none;
}

.b24-timer-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.b24-t-btn {
    border: none;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 12px;
    cursor: pointer;
    height: 24px;
    box-sizing: border-box;
    text-transform: uppercase;
}

.b24-btn-start {
    background: #7bd500;
    color: #fff;
}

.b24-btn-start:hover {
    background: #66b500;
}

.b24-btn-pause {
    background: #ffb700;
    color: #fff;
}

.b24-btn-pause:hover {
    background: #e0a100;
}

.b24-btn-stop {
    background: #ff5733;
    color: #fff;
}

.b24-btn-stop:hover {
    background: #e0441d;
}

/* Фильтры и поиск (устаревший блок) */
.toolbar {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
    border-bottom: 1px solid var(--border);
}

.pipeline-switcher {
    background: #edeef0;
    padding: 2px;
    border-radius: var(--radius);
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 13px;
    color: #535c69;
    border-radius: var(--radius);
}

.tab-btn.active {
    background: var(--panel-bg);
    color: #000;
    font-weight: bold;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tab-btn svg {
    width: 16px;
    height: 16px;
    color: #829aa6;
    transition: color 0.15s;
}

.tab-btn:hover svg,
.tab-btn.active svg {
    color: var(--primary);
}

.filter-bar {
    display: flex;
    align-items: center;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-wrapper input {
    padding: 6px 10px 6px 34px;
    border: 1px solid #c6cdd3;
    border-radius: var(--radius);
    outline: none;
    font-size: 13px;
    width: 280px;
}

.search-wrapper input:focus {
    border-color: var(--primary);
}

.search-icon {
    position: absolute;
    left: 10px;
    width: 16px;
    height: 16px;
    color: #829aa6;
    pointer-events: none;
}

/* Таблица */
.table-container {
    padding: 0 20px;
    overflow-y: auto;
    overflow-x: auto;
    flex: 1 1 auto;
    min-height: 0;
    background: var(--panel-bg);
}

.crm-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--panel-bg);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.crm-table th,
.crm-table td {
    padding: 8px 6px;
    text-align: left;
    font-size: 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.crm-table th {
    background-color: #f5f7f8;
    color: #535c69;
    font-weight: bold;
}

.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 18px !important;
}

.sortable:hover {
    background-color: #eaeced;
    color: #000;
}

.sort-icon {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #a1a6ac;
}

.request-link {
    font-weight: bold;
    color: #2067b0;
    cursor: pointer;
    text-decoration: none;
}

.request-link:hover {
    text-decoration: underline;
    color: #175290;
}

.bold {
    font-weight: bold;
}

.crm-table tr.selected-row {
    background-color: #fafdbe !important;
}

/* Статусы Б24 */
.b24-status-container {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
    min-width: 150px;
    max-width: 200px;
}

.b24-stage-bar {
    display: flex;
    gap: 2px;
    width: 100%;
}

.b24-segment {
    flex: 1;
    height: 7px;
    background: #fff;
    border: 1px solid #d5dbde;
    border-radius: 1px;
    cursor: pointer;
    position: relative;
}

.b24-stage-text {
    font-size: 11px;
    color: #a1a6ac;
    margin-top: 1px;
}

.b24-tooltip {
    visibility: hidden;
    position: absolute;
    bottom: 160%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: #333;
    padding: 6px 12px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
    z-index: 100;
    border: 1px solid #edeef0;
}

.b24-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #fff;
}

.b24-segment:hover .b24-tooltip {
    visibility: visible;
}

/* Слайдер карточки */
.drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: calc(100% - 100px);
    height: 100%;
    background: #eef2f4;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.2s ease-out;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.drawer.open {
    transform: translateX(0);
}

.drawer-header {
    background: var(--panel-bg);
    padding: 15px 20px 5px 20px;
    border-bottom: 1px solid var(--border);
}

.drawer-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-start;
    margin-bottom: 15px;
}

.btn-close-drawer {
    background: none;
    border: none;
    font-size: 28px;
    color: #a1a6ac;
    cursor: pointer;
    order: 1;
    transition: color 0.1s;
    line-height: 1;
}

.btn-close-drawer:hover {
    color: #535c69;
}

.drawer-title-row h3 {
    font-size: 18px;
    font-weight: normal;
    color: #333;
    order: 2;
}

.stage-tracker {
    display: flex;
    width: 100%;
    gap: 3px;
    padding-bottom: 10px;
}

.tracker-step {
    flex: 1;
    position: relative;
    padding: 8px 10px 8px 18px;
    background: #edeef0;
    color: #535c69;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    cursor: pointer;
    clip-path: polygon(0% 0%, calc(100% - 8px) 0%, 100% 50%, calc(100% - 8px) 100%, 0% 100%, 8px 50%);
    transition: filter 0.2s ease, opacity 0.2s ease;
}

.tracker-step:hover {
    filter: brightness(0.9);
}

.tracker-step.active {
    color: white !important;
}

.tracker-step:first-child {
    clip-path: polygon(0% 0%, calc(100% - 8px) 0%, 100% 50%, calc(100% - 8px) 100%, 0% 100%);
    padding-left: 10px;
}

.tracker-step.active {
    color: white !important;
}

.drawer-body {
    display: flex;
    flex-grow: 1;
    overflow: hidden;
    padding: 15px 20px;
    gap: 15px;
}

.drawer-col-left {
    width: 440px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
}

.drawer-col-right {
    flex-grow: 1;
    background: var(--panel-bg);
    border: 1px solid var(--border);
    padding: 20px;
    overflow-y: auto;
}

.crm-card {
    background: var(--panel-bg);
    border: 1px solid var(--border);
    padding: 15px;
    border-radius: var(--radius);
}

.crm-card-title {
    font-size: 11px;
    font-weight: bold;
    color: #a1a6ac;
    text-transform: uppercase;
    margin-bottom: 12px;
    border-bottom: 1px solid #f2f3f4;
    padding-bottom: 4px;
}

.drawer-group {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.drawer-group label {
    width: 150px;
    font-size: 13px;
    color: #707c8a;
    flex-shrink: 0;
}

/* Обычные текстовые инпуты */
.drawer-group input {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid #c6cdd3;
    border-radius: var(--radius);
    font-size: 13px;
    outline: none;
    background: #fff;
    height: 27px;
    box-sizing: border-box;
}

/* Выпадающие списки (Вылет/Прилет, Автомобиль) — центрируем текст по вертикали */
.drawer-group select {
    width: 100%;
    padding: 2px 8px 4px 8px;
    /* Уменьшили верхний отступ, чтобы приподнять текст по центру */
    border: 1px solid #c6cdd3;
    border-radius: var(--radius);
    font-size: 13px;
    outline: none;
    background: #fff;
    height: 27px;
    box-sizing: border-box;
    line-height: 21px;
    /* Фиксируем высоту строки внутри селекта */
}

.drawer-group textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #c6cdd3;
    border-radius: var(--radius);
    font-size: 13px;
    outline: none;
    background: #fff;
    height: auto;
    min-height: 56px;
    box-sizing: border-box;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

.contact-box {
    background: #fafdff;
    border: 1px dashed #b1cfde;
    padding: 12px;
    border-radius: var(--radius);
}

.contact-name {
    font-size: 14px;
    font-weight: bold;
    color: #2067b0;
    margin-bottom: 6px;
}

.contact-info-item {
    font-size: 13px;
    color: #535c69;
    margin-bottom: 4px;
}

/* Добавить к остальным раскраскам иконок карточки */
.drawer-group label svg.icon-children {
    color: #ffb700 !important;
    /* Насыщенный желтый цвет для детской иконки */
}

/* Красивый контрастный стиль для выпадающего списка выбора авто */
.drawer-group select#drawerCarType {
    font-weight: 700 !important;
    color: #2067b0 !important;
    /* Выделяем синим цветом, как и ссылки */
    border: 1px solid #b1cfde !important;
    background-color: #f7fafd !important;
}

.drawer-group select#drawerCarType:focus {
    border-color: var(--primary) !important;
    background-color: #fff !important;
}

/* СТРАНИЦА АВТОРИЗАЦИИ (БИТРИКС СТИЛЬ) */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: #1c2530 !important;
}

.auth-container {
    background: var(--panel-bg);
    padding: 35px;
    border-radius: var(--radius);
    width: 100%;
    max-width: 360px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.auth-container h2 {
    margin-bottom: 5px;
    font-size: 22px;
    font-weight: normal;
    color: #333;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 25px;
}

.form-group {
    text-align: left;
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: bold;
    text-transform: uppercase;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #c6cdd3;
    border-radius: var(--radius);
    font-size: 14px;
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary);
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background-color: var(--primary);
    border: none;
    border-radius: var(--radius);
    color: white;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.error-msg {
    color: #ff5733;
    font-size: 13px;
    margin-top: 10px;
    font-weight: bold;
}

/* СТИЛИ АДМИН-ПАНЕЛИ */
.admin-grid {
    display: flex;
    padding: 20px;
    gap: 20px;
    height: calc(100vh - 54px);
    box-sizing: border-box;
    overflow: hidden;
}

.admin-form-card {
    width: 360px;
    background: var(--panel-bg);
    border: 1px solid var(--border);
    padding: 20px;
    flex-shrink: 0;
    overflow-y: auto;
    height: 100%;
    box-sizing: border-box;
}

.admin-table-card {
    flex-grow: 1;
    background: var(--panel-bg);
    border: 1px solid var(--border);
    padding: 20px;
    overflow-y: auto;
    height: 100%;
    box-sizing: border-box;
}

.form-control {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-control label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: bold;
    text-transform: uppercase;
}

.form-control input,
.form-control select {
    padding: 8px;
    border: 1px solid #c6cdd3;
    border-radius: 3px;
    font-size: 13px;
    outline: none;
}

.form-control input:focus,
.form-control select:focus {
    border-color: var(--primary);
}

.btn-submit {
    width: 100%;
    padding: 10px;
    background: var(--primary);
    color: #fff;
    border: none;
    font-weight: bold;
    cursor: pointer;
    border-radius: 3px;
    margin-top: 10px;
    font-size: 14px;
}

.btn-submit:hover {
    background: var(--primary-hover);
}

.role-badge {
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-block;
}

.btn-delete {
    background: transparent;
    border: none;
    color: #ff5733;
    cursor: pointer;
    padding: 4px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.btn-delete:hover {
    background: #ffebee;
    color: #d32f2f;
}

/* ПАГИНАЦИЯ БИТРИКС24 */
.b24-pagination-container {
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.b24-show-more-btn {
    background: #fff;
    border: 1px solid #c6cdd3;
    color: #535c69;
    padding: 8px 32px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.b24-show-more-btn:hover {
    border-color: var(--primary);
    color: var(--primary-hover);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.b24-pagination-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #535c69;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-top: 1px solid #f2f3f4;
    padding-top: 14px;
}

.b24-pagination-left,
.b24-pagination-center,
.b24-pagination-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.b24-sep {
    color: var(--border);
    font-weight: normal;
    margin: 0 4px;
}

.b24-link {
    color: #2067b0;
    cursor: pointer;
    text-decoration: none;
    border-bottom: 1px dashed #2067b0;
}

.b24-link:hover {
    color: #175290;
    border-bottom-color: #175290;
}

.b24-link-nav {
    color: #a1a6ac;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
    padding: 0 4px;
}

.b24-link-nav:hover {
    color: #535c69;
}

.b24-page-num {
    padding: 3px 8px;
    cursor: pointer;
    color: #535c69;
    border-radius: var(--radius);
}

.b24-page-num:hover {
    background: #eaeced;
}

.b24-page-num.active {
    background: #edeef0;
    color: #000;
}

.b24-select {
    padding: 4px 20px 4px 8px;
    border: 1px solid #c6cdd3;
    border-radius: var(--radius);
    outline: none;
    font-size: 11px;
    font-weight: bold;
    color: #535c69;
    background: #fff;
    cursor: pointer;
}

/* ВСПЛЫВАЮЩАЯ ПАНЕЛЬ ДЕЙСТВИЙ */
.b24-action-panel-popup {
    position: fixed;
    bottom: -80px;
    left: 240px;
    right: 0;
    height: 60px;
    background: #fff;
    border-top: 2px solid #adb3b8;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: bottom 0.2s ease-out;
    z-index: 999;
}

.b24-action-panel-popup.show {
    bottom: 0;
}

.b24-action-inner {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 11px;
    font-weight: bold;
    color: #535c69;
    text-transform: uppercase;
}

.b24-panel-selected-text {
    font-size: 12px;
    margin-right: 10px;
    color: #000;
}

.b24-panel-btn {
    background: #fff;
    border: 1px solid #c6cdd3;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    color: #535c69;
    border-radius: var(--radius);
    cursor: pointer;
}

.b24-panel-btn:hover {
    background: #f4f6f7;
    border-color: #b1cfde;
}

.btn-panel-delete {
    color: #ff5733;
}

.btn-panel-delete:hover {
    background: #ffebee;
    border-color: #ffcdd2;
}

.b24-panel-select {
    padding: 5px 10px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    color: #535c69;
    border: 1px solid #c6cdd3;
    border-radius: var(--radius);
    outline: none;
    background: #fff;
}

.b24-panel-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 11px;
}

.b24-burger-btn {
    background: transparent;
    border: none;
    color: #a1a6ac;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    border-radius: 3px;
}

.b24-burger-btn:hover {
    background: #edeef0;
    color: #535c69;
}

/* ГОРОД ОПЕРАТОРА В ШАПКЕ */
.b24-operator-city {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: bold;
    color: #1d607a;
    /* Битриксовый глубокий бирюзовый */
    background: #e1f5fe;
    /* Мягкий лазурный фон */
    border: 1px solid #b3e5fc;
    /* Тонкая аккуратная рамка */
    padding: 4px 12px;
    border-radius: 14px;
    height: 26px;
    box-sizing: border-box;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: auto;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.b24-city-icon {
    display: flex;
    align-items: center;
    color: #0288d1;
    /* Яркий акцент на маркере */
}

.b24-city-icon svg {
    width: 14px;
    height: 14px;
}

/* Корректируем таймер, чтобы он не конфликтовал со сдвигом */
.b24-timer-widget {
    margin-left: 0 !important;
    flex-shrink: 0;
}

/* ГОРИЗОНТАЛЬНЫЕ ТАБЫ ВНУТРИ КАРТОЧКИ Б24 */
.b24-drawer-tabs {
    display: flex;
    align-items: center;
    gap: 20px;
    border-top: 1px solid #f2f3f4;
    padding-top: 10px;
    margin-top: 5px;
}

.b24-d-tab {
    font-size: 13px;
    color: #535c69;
    padding-bottom: 8px;
    cursor: pointer;
    font-weight: bold;
    position: relative;
    border-bottom: 2px solid transparent;
    transition: all 0.15s ease;
}

.b24-d-tab:hover,
.b24-d-tab.active {
    color: #2067b0;
}

.b24-d-tab.active {
    border-bottom-color: #2067b0;
}

/* Переключатели панелей */
.drawer-tab-pane {
    display: none;
    width: 100%;
    height: 100%;
    gap: 15px;
}

.drawer-tab-pane.active-pane {
    display: flex;
}

/* ТАЙМЛАЙН ЛЕНТА БИТРИКС24 (ОБНОВЛЕННАЯ) */
.b24-timeline-feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 10px 5px;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}

.b24-timeline-item {
    background: #ffffff;
    border: 1px solid #e1e5e8;
    border-radius: 6px;
    padding: 12px 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.2s ease-out;
    border-left: 4px solid #a1a6ac;
    /* Дефолтный серый борт */
}

/* Эффект объема при наведении */
.b24-timeline-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border-color: #cbd2d6;
}

/* Фирменные маркеры слева */
.b24-timeline-item.log-create {
    border-left-color: #2e7d32;
}

.b24-timeline-item.log-stage_change {
    border-left-color: #0288d1;
}

.b24-timeline-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #707c8a;
}

.b24-timeline-author {
    font-weight: 700;
    color: #2067b0;
    font-size: 12px;
}

.b24-timeline-time {
    color: #a1a6ac;
    font-weight: 500;
}

.b24-timeline-text {
    font-size: 13px;
    color: #333;
    line-height: 1.4;
    font-weight: 500;
}

/* Красивая неоновая стрелка перехода */
.b24-stage-arrow {
    color: #0288d1;
    margin: 0 6px;
    font-weight: bold;
}

/* Битриксовые капсулы */
.b24-badge-log {
    display: inline-block;
    padding: 2px 10px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 12px;
    letter-spacing: 0.5px;
    align-self: flex-start;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

.b24-badge-log.type-create {
    background: #e8f5e9;
    color: #2e7d32;
}

.b24-badge-log.type-stage_change {
    background: #e1f5fe;
    color: #0288d1;
}

/* ИКОНКИ ВЫЛЕТА И ПРИЛЕТА В ТАБЛИЦЕ */
.b24-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 700 !important;
}

/* Прилёт — спокойный синий */
.b24-type-badge.type-arrival {
    color: #0288d1 !important;
}

/* Вылет — насыщенный красный */
.b24-type-badge.type-departure {
    color: #d32f2f !important;
}

.b24-type-badge svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ИКОНКА САМОЛЕТА В КОЛОНКЕ РЕЙС */
.b24-flight-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #000000 !important;
    font-weight: 800 !important;
}

.b24-flight-badge svg {
    width: 14px;
    height: 14px;
    color: #829aa6;
    /* Спокойный стальной цвет иконки */
    flex-shrink: 0;
}

/* ВЫРАВНИВАНИЕ ВСЕХ ИКОНОК ВНУТРИ СТРОК ТАБЛИЦЫ */
.b24-table-inline-cell {
    display: flex;
    align-items: center;
    gap: 6px;
}

.b24-table-inline-cell span {
    white-space: nowrap !important;
    /* Телефон, дата и всё остальное — строго в одну строку без переносов */
}

/* Разрешаем перенос строк ТОЛЬКО для поля автомобиля */
.b24-table-inline-cell:has(.icon-tabler-car) span {
    white-space: normal !important;
    line-height: 1.2;
}

.b24-table-inline-cell svg {
    width: 14px;
    height: 14px;
    color: #829aa6;
    /* Мягкий стальной цвет для всех системных иконок */
    flex-shrink: 0;
}

/* Сумма: иконка рубля должна быть черной и жирной, как сам текст цены */
.b24-table-inline-cell.bold svg {
    color: #000000 !important;
    stroke-width: 2.5;
}

/* РАСКРАСКА ИКОНОК КАРТОЧКИ (УБИРАЕМ ОДНОТОННУЮ СЕРОСТЬ) */
.drawer-group label svg {
    width: 15px !important;
    height: 15px !important;
    stroke-width: 2.5 !important;
    /* Линии толще и четче */
    flex-shrink: 0;
}

.drawer-group label svg.icon-price {
    color: #2e7d32 !important;
}

/* Зеленый рубль */
.drawer-group label svg.icon-type {
    color: #0288d1 !important;
}

/* Синий прилет */
.drawer-group label svg.icon-flight {
    color: #00bcd4 !important;
}

/* Бирюзовый самолет */
.drawer-group label svg.icon-passengers {
    color: #3f51b5 !important;
}

/* Индиго юзер */
.drawer-group label svg.icon-baggage {
    color: #e67e22 !important;
}

/* Оранжевый портфель */
.drawer-group label svg.icon-date {
    color: #9c27b0 !important;
}

/* Пурпурный календарь */
.drawer-group label svg.icon-car {
    color: #607d8b !important;
}

/* Стальное авто */
.drawer-group label svg.icon-from {
    color: #d32f2f !important;
}

/* Красный выезд */
.drawer-group label svg.icon-to {
    color: #0288d1 !important;
}

/* Синий финиш */
.drawer-group label svg.icon-comment {
    color: #009688 !important;
}

/* Мятный коммент */

/* РАСПРАВЛЯЕМ ПРИЛИПШИЕ ЭЛЕМЕНТЫ В КАРТОЧКЕ */

.drawer-group {
    margin-bottom: 16px !important;
    /* Увеличиваем вертикальный отступ между полями */
    display: flex !important;
    align-items: center !important;
}

.drawer-group label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    /* Жесткий зазор между цветной иконкой и текстом поля */
    width: 175px !important;
    /* Фиксированная ширина, чтобы инпуты выстроились ровно в ряд */
    flex-shrink: 0 !important;
    margin: 0 !important;
}

/* Дополнительный зазор для самих инпутов, чтобы дышалось */
.b24-input-wrapper {
    flex-grow: 1 !important;
}

/* КРАСИВЫЙ СТИЛЬ ДЛЯ ИКОНОК В БЛОКЕ КОНТАКТОВ */
.contact-info-item {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    /* Зазор между текстом и новой иконкой */
    margin-top: 8px !important;
    margin-bottom: 0 !important;
}

.contact-info-item svg {
    width: 15px !important;
    height: 15px !important;
    stroke-width: 2.5 !important;
    /* Жирные линии под общий стиль */
    flex-shrink: 0;
}

/* Персональные цвета для блока контактов */
.contact-info-item svg.icon-contact-phone {
    color: #3f51b5 !important;
    /* Контрастный индиго */
}

.contact-info-item svg.icon-contact-email {
    color: #e67e22 !important;
    /* Контрастный оранжевый */
}

/* КРАСИВЫЙ ЦВЕТ ДЛЯ БЕЙДЖА И СТРОКИ ИЗМЕНЕНИЙ ПОЛЕЙ */

/* Левая полоса карточки лога при изменении поля */
.b24-timeline-item.log-edit {
    border-left-color: #e67e22 !important;
}

/* Сам бейдж ИЗМЕНЕНИЕ */
.b24-badge-log.type-edit {
    background: #fff3e0 !important;
    /* Мягкий пастельно-оранжевый фон */
    color: #e67e22 !important;
    /* Насыщенный контрастный текст */
    border: 1px solid #ffe0b2;
    /* Тонкая аккуратная рамка вокруг */
}

/* РОДНОЙ ВИДЖЕТ КАЛЕНДАРЯ БИТРИКС24 (1 в 1) */
.b24-calendar-popup {
    position: fixed;
    z-index: 2000;
    background: #ffffff;
    border: 1px solid #c6cdd3;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    width: 265px;
    padding: 16px 14px 14px 14px;
    box-sizing: border-box;
}

.b24-cal-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    position: relative;
    padding: 0 4px;
}

.b24-cal-nav-btn {
    background: transparent;
    border: none;
    width: 16px;
    height: 16px;
    cursor: pointer;
    position: relative;
    padding: 0;
}

.b24-cal-nav-btn.btn-left::after {
    content: "";
    position: absolute;
    border: 5px solid transparent;
    border-right-color: #a1a6ac;
    left: 2px;
    top: 3px;
}

.b24-cal-nav-btn.btn-right::after {
    content: "";
    position: absolute;
    border: 5px solid transparent;
    border-left-color: #a1a6ac;
    right: 2px;
    top: 3px;
}

.b24-cal-nav-btn:hover::after {
    border-right-color: #535c69;
    border-left-color: #535c69;
}

.b24-cal-title {
    font-size: 16px;
    font-weight: 500;
    color: #000000;
    display: flex;
    align-items: center;
    gap: 15px;
}

.b24-cal-arr-drop {
    display: inline-block;
    width: 0;
    height: 0;
    border: 3px solid transparent;
    border-top-color: #a1a6ac;
    margin-left: 4px;
    vertical-align: middle;
    position: relative;
    top: 2px;
}

.b24-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 12px;
    color: #a1a6ac;
    margin-bottom: 8px;
}

.b24-cal-weekdays .weekend {
    color: #d32f2f;
}

.b24-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 14px;
}

.b24-cal-day {
    font-size: 13px;
    font-weight: bold;
    color: #000000;
    text-align: center;
    padding: 6px 0;
    cursor: pointer;
    border-radius: 4px;
}

.b24-cal-day:hover {
    background: #f4f6f7;
}

.b24-cal-day.other-month {
    color: #cbd2d6 !important;
    font-weight: normal;
}

.b24-cal-day.weekend-day {
    color: #d32f2f;
}

.b24-cal-day.active-day {
    background: #e2ecef !important;
    color: #000000 !important;
    box-shadow: inset 0 0 0 1px #cbd2d6;
}

.b24-cal-time-row {
    display: flex;
    align-items: center;
    border-top: 1px solid #edeef0;
    padding-top: 12px;
    margin-bottom: 14px;
}

.b24-cal-time-lbl {
    font-size: 13px;
    color: #a1a6ac;
    flex-grow: 1;
}

.b24-cal-time-inputs {
    display: flex;
    align-items: center;
    gap: 4px;
}

.b24-cal-colon {
    font-weight: bold;
    color: #000;
}

.b24-cal-spin-container {
    position: relative;
    display: flex;
    align-items: center;
}

.b24-cal-spin-container input {
    width: 44px;
    height: 25px;
    text-align: left;
    padding-left: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #000000;
    border: 1px solid #c6cdd3;
    border-radius: 4px;
    outline: none;
    box-sizing: border-box;
}

.b24-cal-spin-arrows {
    position: absolute;
    right: 4px;
    display: flex;
    flex-direction: column;
    height: 18px;
    justify-content: space-between;
}

.b24-cal-spin-arrows span {
    width: 0;
    height: 0;
    border: 3px solid transparent;
    cursor: pointer;
}

.b24-cal-spin-arrows .spin-up {
    border-bottom-color: #a1a6ac;
}

.b24-cal-spin-arrows .spin-up:hover {
    border-bottom-color: #535c69;
}

.b24-cal-spin-arrows .spin-down {
    border-top-color: #a1a6ac;
}

.b24-cal-spin-arrows .spin-down:hover {
    border-top-color: #535c69;
}

.b24-cal-time-clear {
    background: transparent;
    border: none;
    font-size: 16px;
    color: #cbd2d6;
    cursor: pointer;
    padding: 0 4px 0 8px;
    font-weight: bold;
}

.b24-cal-time-clear:hover {
    color: #ff5733;
}

.b24-cal-footer {
    display: flex;
    gap: 8px;
}

.b24-cal-btn-select,
.b24-cal-btn-close {
    flex: 1;
    height: 30px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    box-sizing: border-box;
    border: 1px solid #c6cdd3;
    background: linear-gradient(to bottom, #ffffff 0%, #f3f5f6 100%);
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05), inset 0 1px 0 #fff;
    color: #535c69;
    transition: all 0.1s;
}

.b24-cal-btn-select:hover,
.b24-cal-btn-close:hover {
    background: linear-gradient(to bottom, #ffffff 0%, #e8ebec 100%);
    border-color: #b1cfde;
    color: #000000;
}

/* СТИЛИ ВЫПАДАЮЩИХ СПИСКОВ МЕСЯЦА И ГОДА */
.b24-cal-dropdown-list {
    position: absolute;
    top: 24px;
    background: #ffffff;
    border: 1px solid #c6cdd3;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 2500;
    max-height: 180px;
    overflow-y: auto;
    width: 115px;
    padding: 6px 0;
    box-sizing: border-box;
}

#b24CalMonthPopup {
    left: -15px;
}

#b24CalYearPopup {
    left: 75px;
}

.b24-cal-dropdown-item {
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #000000;
    text-align: left;
    cursor: pointer;
}

.b24-cal-dropdown-item:hover,
.b24-cal-dropdown-item.active {
    background: #f4f6f7;
    color: #d32f2f !important;
}

.b24-cal-dropdown-list::-webkit-scrollbar {
    width: 4px;
}

.b24-cal-dropdown-list::-webkit-scrollbar-thumb {
    background: #c6cdd3;
    border-radius: 2px;
}

/* ЖЕСТКОЕ ДОБИВАНИЕ СТАНДАРТНЫХ СТРЕЛОК БРАУЗЕРА */

#b24CalHours::-webkit-outer-spin-button,
#b24CalHours::-webkit-inner-spin-button,
#b24CalMinutes::-webkit-outer-spin-button,
#b24CalMinutes::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    /* Убираем стрелки в Chrome, Safari, Edge */
    margin: 0 !important;
}

#b24CalHours,
#b24CalMinutes {
    -moz-appearance: textfield !important;
    /* Убираем стрелки в Firefox */
    appearance: textfield !important;
}

/* ИСПРАВЛЕНИЕ ДВОЙНЫХ СТРЕЛОК ПРИ НАВЕДЕНИИ В ШАПКЕ */

/* Сбрасываем старый кривой глобальный ховер */
.b24-cal-nav-btn:hover::after {
    border-right-color: transparent !important;
    border-left-color: transparent !important;
}

/* Включаем правильную подсветку только для левой стрелки */
.b24-cal-nav-btn.btn-left:hover::after {
    border-right-color: #535c69 !important;
    border-left-color: transparent !important;
}

/* Включаем правильную подсветку только для правой стрелки */
.b24-cal-nav-btn.btn-right:hover::after {
    border-left-color: #535c69 !important;
    border-right-color: transparent !important;
}

/* СТИЛИ АВТОКОМПЛИТА АДРЕСОВ (БИТРИКС24 СТИЛЬ) */
.b24-autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #c6cdd3;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 3000;
    max-height: 200px;
    overflow-y: auto;
    box-sizing: border-box;
    margin-top: 1px;
}

.b24-autocomplete-item {
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 600 !important;
    color: #000000 !important;
    cursor: pointer;
    white-space: normal !important;
    line-height: 1.3;
    border-bottom: 1px solid #f2f3f4;
    text-align: left;
}

.b24-autocomplete-item:last-child {
    border-bottom: none;
}

.b24-autocomplete-item:hover {
    background: #eef2f4;
    color: #2067b0 !important;
}

/* Скроллбар для списка подсказок */
.b24-autocomplete-dropdown::-webkit-scrollbar {
    width: 5px;
}

.b24-autocomplete-dropdown::-webkit-scrollbar-thumb {
    background: #cbd2d6;
    border-radius: 3px;
}

/* ИДЕАЛЬНАЯ НЕЗАВИСИМАЯ СЕТКА КАРТОЧКИ (БИТРИКС СТИЛЬ) */

/* 1. Левая колонка: намертво фиксируем ширину, запрещаем сжатие и включаем независимый скролл */
.drawer-col-left {
    width: 560px !important;
    flex-shrink: 0 !important;
    /* Железно запрещаем правой стороне сжимать эту панель */
    overflow-y: auto !important;
    /* Если опер растянет коммент, скроллиться будет вся панель, а не инпуты внутри */
    height: 100% !important;
    padding-right: 5px !important;
    /* Зазор под аккуратный скроллбар */
}

/* 2. Правая колонка: заставляем ее занимать все оставшееся место, но не даем ей распирать drawer */
.drawer-col-right {
    flex-grow: 1 !important;
    flex-shrink: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    /* Сама колонка монолитна, скроллится только лента внутри */
    height: 100% !important;
}

/* 3. Лента истории: забирает все свободное пространство снизу и скроллится до бесконечности */
.b24-timeline-feed {
    flex-grow: 1 !important;
    overflow-y: auto !important;
    /* Скроллбар живет строго внутри этого блока */
    max-height: none !important;
    /* Убираем кривые фиксированные расчеты высоты */
    gap: 6px !important;
    padding-right: 5px !important;
}

/* 4. Адреса: фиксированные аккуратные двухстрочные плашки (теперь исключаем коммент) */
.drawer-group textarea:not(#drawerComment) {
    height: 58px !important;
    min-height: 58px !important;
    padding: 6px 10px !important;
    resize: none !important;
    overflow: hidden !important;
    line-height: 1.4 !important;
}

/* 5. Комментарий: УБРАЛИ !important с height, чтобы JS мог управлять высотой */
#drawerComment {
    resize: none !important;
    overflow-y: hidden !important;
    height: 58px;
    /* УБРАЛИ !important ОТСЮДА */
    min-height: 58px !important;
    padding: 6px 10px !important;
    line-height: 1.4 !important;
    box-sizing: border-box !important;
}

/* 6. Плашка контактов вверху правой колонки */
.drawer-col-right .contact-box {
    display: flex !important;
    align-items: center !important;
    flex-direction: row !important;
    gap: 25px !important;
    padding: 0 0 10px 0 !important;
    background: transparent !important;
    border: none !important;
    margin: 0 0 10px 0 !important;
    border-bottom: 1px dashed var(--border) !important;
}

.drawer-col-right .contact-box .contact-name {
    margin-bottom: 0 !important;
    white-space: nowrap !important;
}

/* Компактные элементы таймлайна */
.b24-timeline-item {
    padding: 8px 14px !important;
    gap: 4px !important;
}

.b24-timeline-text {
    font-size: 12px !important;
    line-height: 1.4 !important;
}

.b24-timeline-meta {
    font-size: 10px !important;
}

/* ИДЕАЛЬНАЯ ИНЛАЙН-ВЕРСТКА КОНТАКТА С КАРАНДАШОМ */

.b24-contact-editable-container {
    display: flex !important;
    align-items: flex-start !important;
    flex-direction: row !important;
    gap: 20px !important;
    width: 100% !important;
    flex-wrap: wrap !important;
    position: relative !important;
}

/* Кнопка карандаша */
.b24-contact-edit-btn {
    position: absolute !important;
    top: -30px !important;
    /* Улетает наверх к заголовку КОНТАКТ */
    right: 0 !important;
    background: transparent !important;
    border: none !important;
    color: #a1a6ac !important;
    cursor: pointer !important;
    padding: 2px !important;
    border-radius: 3px !important;
    transition: all 0.2s !important;
    z-index: 10 !important;
}

.b24-contact-edit-btn:hover {
    color: #2067b0 !important;
    background: #eef2f4 !important;
}

/* =======================================================
   РЕЖИМ ПРОСМОТРА (Карандаш не нажат)
   Блокируем поля, прячем крестики и плюсики
   ======================================================= */
.b24-contact-editable-container.view-mode .b24-contact-input {
    pointer-events: none !important;
    background: transparent !important;
    border-color: transparent !important;
    padding-left: 0 !important;
    /* Убираем левый отступ для текста */
}

.b24-contact-editable-container.view-mode .b24-contact-phone-del,
.b24-contact-editable-container.view-mode .b24-contact-phone-add,
.b24-contact-editable-container.view-mode .b24-save-indicator {
    display: none !important;
}


/* Базовые элементы */
.b24-contact-element-group {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    position: relative !important;
    min-height: 25px !important;
}

.b24-contact-element-group.phone-group {
    align-items: flex-start !important;
    height: auto !important;
}

.b24-contact-phone-row {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    height: 25px !important;
    position: relative !important;
}

.b24-contact-phone-row svg {
    width: 15px !important;
    height: 15px !important;
    stroke-width: 2.5 !important;
    flex-shrink: 0 !important;
    color: #3f51b5 !important;
}

.b24-contact-element-group>svg {
    width: 15px !important;
    height: 15px !important;
    stroke-width: 2.5 !important;
    flex-shrink: 0 !important;
}

.b24-contact-element-group>svg.icon-contact-email {
    color: #e67e22 !important;
}

.b24-contact-phones-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}

.b24-contact-input {
    border: 1px solid transparent !important;
    background: transparent !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #000000 !important;
    outline: none !important;
    padding: 2px 6px !important;
    border-radius: 3px !important;
    transition: all 0.1s ease-out !important;
    box-sizing: border-box !important;
    height: 25px !important;
}

.b24-contact-input:hover,
.b24-contact-input:focus {
    border-color: #c6cdd3 !important;
    background: #ffffff !important;
}

.b24-contact-name-field {
    width: 320px !important;
    font-size: 14px !important;
    color: #2067b0 !important;
    font-weight: bold !important;
}

.b24-contact-phone-field {
    width: 155px !important;
}

.b24-contact-email-field {
    width: 210px !important;
}

.b24-contact-phone-del {
    cursor: pointer !important;
    color: #a1a6ac !important;
    font-size: 11px !important;
    font-weight: bold !important;
    padding: 0 4px !important;
    user-select: none !important;
}

.b24-contact-phone-del:hover {
    color: #ff5733 !important;
}

.b24-contact-phone-add {
    background: transparent !important;
    border: 1px dashed #b1cfde !important;
    color: #2067b0 !important;
    border-radius: 50% !important;
    width: 18px !important;
    height: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 11px !important;
    cursor: pointer !important;
    margin-top: 4px !important;
    flex-shrink: 0 !important;
}

.b24-contact-phone-add:hover {
    background: #e1f5fe !important;
    border-color: #2067b0 !important;
}

.b24-contact-element-group .b24-save-indicator {
    position: absolute !important;
    right: -14px !important;
    top: 6px !important;
}

.b24-contact-element-group.phone-group .b24-save-indicator {
    top: 6px !important;
}

/* НАЙДИ И ИЗМЕНИ ШИРИНУ В ЭТОМ КЛАССЕ: */
.drawer-col-left {
    width: 560px !important;
    /* Было 485px, забираем место у таймлайна */
    flex-shrink: 0 !important;
    overflow-y: auto !important;
    height: 100% !important;
    padding-right: 5px !important;
}

/* ДОБАВЬ В САМЫЙ КОНЕЦ ФАЙЛА style.css: */
.drawer-group label svg.icon-payment {
    color: #8bc34a !important;
}

/* Зеленые деньги */
.drawer-group label svg.icon-city {
    color: #9c27b0 !important;
}

/* Фиолетовый город */
.drawer-group label svg.icon-route {
    color: #00bcd4 !important;
}

/* Бирюзовый маршрут */
#drawerExtraBaggage {
    resize: none !important;
    overflow: hidden !important;
    min-height: 27px;
    padding: 6px 10px !important;
    line-height: 1.4 !important;
}

/* ================= КОМПАКТНАЯ СЕТКА КАРТОЧКИ ================= */
.drawer-col-left {
    width: 620px !important;
    flex-shrink: 0 !important;
    overflow-y: auto !important;
    /* Вернули скролл для мелких экранов */
    height: 100% !important;
    scrollbar-width: none;
    /* Убиваем ползунок в Firefox */
}

.drawer-col-left::-webkit-scrollbar {
    display: none;
    /* Убиваем ползунок в Chrome и Safari */
}

.crm-card-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 15px;
}

.full-width-field {
    grid-column: span 2;
}

.drawer-group {
    margin-bottom: 4px !important;
    display: flex !important;
    flex-direction: column !important;
    /* Лейбл над инпутом для компактности */
    align-items: flex-start !important;
}

.drawer-group label {
    width: auto !important;
    font-size: 11px !important;
    margin-bottom: 4px !important;
}

.drawer-group input,
.drawer-group select {
    height: 28px !important;
}

/* ================= ДИЗАЙН ЭЛЕМЕНТОВ ================= */
/* Выделенная сумма */
.price-highlight {
    font-size: 16px !important;
    color: #2e7d32 !important;
    font-weight: 800 !important;
    background: #e8f5e9 !important;
    border: 1px solid #c8e6c9 !important;
}

/* Визуальный выбор авто */
.car-visual-selector {
    display: flex;
    align-items: center;
    background: #f4f6f7;
    border: 1px solid #c6cdd3;
    border-radius: 4px;
    padding: 4px 10px;
    height: 40px;
    gap: 12px;
}

.car-visual-selector img {
    height: 30px;
    object-fit: contain;
}

.car-visual-selector select {
    border: none !important;
    background: transparent !important;
    font-weight: 700 !important;
    color: #2067b0 !important;
    padding: 0 !important;
    height: auto !important;
    outline: none;
    flex-grow: 1;
    cursor: pointer;
}

/* Красивые бейджи доп. багажа */
.baggage-badges-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    background: #f4f6f7;
    border: 1px solid #e1e5e8;
    border-radius: 4px;
    padding: 6px;
    min-height: 28px;
}

.b24-baggage-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fff3e0;
    color: #e67e22;
    border: 1px solid #ffe0b2;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

/* ================= ДИЗАЙН ЭЛЕМЕНТОВ ================= */
/* Сумма: выглядит как текст, но можно редактировать */
.price-display-mode {
    font-size: 28px !important;
    font-weight: 900 !important;
    color: #2e7d32 !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    height: auto !important;
    width: auto !important;
    max-width: 120px;
    box-shadow: none !important;
    outline: none !important;
    text-align: left;
    font-family: inherit;
    cursor: text;
}

.price-display-mode:focus {
    border-bottom: 2px dashed #4caf50 !important;
    border-radius: 0 !important;
}

ч

/* ================= ИНТЕРАКТИВНЫЙ ДОП. БАГАЖ ================= */
.crm-eb-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff3e0;
    border: 1px solid #ffe0b2;
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 4px;
}

.crm-eb-label {
    font-size: 11px;
    color: #e67e22;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.crm-eb-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.crm-eb-btn {
    background: #ffb74d;
    color: #fff;
    border: none;
    border-radius: 4px;
    width: 20px;
    height: 20px;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crm-eb-btn:hover {
    background: #f57c00;
}

.crm-eb-val {
    width: 20px;
    text-align: center;
    font-weight: 900;
    font-size: 13px;
    color: #d35400;
    background: transparent;
    border: none;
    pointer-events: none;
}

/* ================= КОМПАКТНЫЙ ДОП. БАГАЖ (8 ПУНКТОВ) ================= */
.crm-eb-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
    background: #f8f9fa;
    border: 1px solid #e1e5e8;
    padding: 8px;
    border-radius: 6px;
    width: 100%;
}

.crm-eb-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 1px solid #c6cdd3;
    padding: 4px 8px;
    border-radius: 4px;
}

.crm-eb-label {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    flex-grow: 1;
    /* Отдаем всё свободное место тексту */
    overflow: hidden;
}

.crm-eb-name {
    font-size: 11px;
    font-weight: 700;
    color: #535c69;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crm-eb-price {
    font-size: 10px;
    color: #8bc34a;
    font-weight: bold;
}

/* Компактный склеенный блок управления */
.crm-eb-controls {
    display: flex;
    align-items: center;
    background: #f4f6f7;
    border: 1px solid #c6cdd3;
    border-radius: 4px;
    flex-shrink: 0;
    /* Запрещаем сжиматься блоку кнопок */
    margin-left: 8px;
    overflow: hidden;
}

.crm-eb-btn {
    background: transparent;
    color: #535c69;
    border: none;
    width: 24px;
    height: 24px;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.crm-eb-btn:hover {
    background: #e1e5e8;
}

.crm-eb-val {
    width: 28px !important;
    /* Жестко фиксируем узкую ширину */
    height: 24px !important;
    min-height: 24px !important;
    text-align: center !important;
    font-weight: 900 !important;
    font-size: 13px !important;
    color: #2067b0 !important;
    background: #fff !important;
    border: none !important;
    border-left: 1px solid #c6cdd3 !important;
    border-right: 1px solid #c6cdd3 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    pointer-events: none !important;
    box-shadow: none !important;
}

@keyframes pulseWarning {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }

    100% {
        opacity: 1;
    }
}

/* ================= МОДАЛКА ОТМЕНЫ ================= */
.cancel-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 24, 34, 0.85);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.cancel-modal-card {
    background: #ffffff;
    width: 380px;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border-top: 4px solid #ef4444;
    animation: scaleInBounce 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cancel-modal-icon {
    width: 64px;
    height: 64px;
    color: #ef4444;
    margin-bottom: 15px;
    background: #fee2e2;
    border-radius: 50%;
    padding: 12px;
    display: inline-block;
}

.cancel-modal-title {
    font-size: 20px;
    font-weight: 800;
    color: #111111;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.cancel-modal-text {
    font-size: 13px;
    color: #535c69;
    line-height: 1.5;
    margin-bottom: 25px;
    font-weight: 600;
}

.cancel-modal-actions {
    display: flex;
    gap: 10px;
}

.btn-cancel-no {
    flex: 1;
    background: #f4f6f7;
    border: 1px solid #c6cdd3;
    color: #535c69;
    padding: 10px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

.btn-cancel-no:hover {
    background: #eef2f4;
    border-color: #a1a6ac;
}

.btn-cancel-yes {
    flex: 1;
    background: #ef4444;
    border: none;
    color: #ffffff;
    padding: 10px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
}

.btn-cancel-yes:hover {
    background: #dc2626;
}

/* ================= КРАСИВЫЕ КАРТОЧКИ ЧЕКОВ В CRM ================= */
.b24-receipts-corner {
    margin-left: auto !important;
    display: flex !important;
    gap: 10px !important;
    align-items: flex-start !important;
    flex-shrink: 0 !important;
}

.b24-receipt-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 80px !important;
    height: 80px !important;
    min-width: 80px !important;
    max-width: 80px !important;
    flex: 0 0 80px !important;
    border-radius: 8px !important;
    padding: 8px !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

.b24-receipt-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1) !important;
}

.b24-receipt-card.success {
    background: #e8f5e9 !important;
    border: 1px solid #81c784 !important;
}

.b24-receipt-card.refund {
    background: #ffebee !important;
    border: 1px solid #e57373 !important;
}

.b24-receipt-icon {
    width: 26px !important;
    height: 26px !important;
    margin-bottom: 6px !important;
    stroke-width: 1.5 !important;
}

.b24-receipt-card.success .b24-receipt-icon {
    color: #2e7d32 !important;
}

.b24-receipt-card.refund .b24-receipt-icon {
    color: #c62828 !important;
}

.b24-receipt-title {
    font-size: 9px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    line-height: 1.2 !important;
}

.b24-receipt-card.success .b24-receipt-title {
    color: #1b5e20 !important;
}

.b24-receipt-card.refund .b24-receipt-title {
    color: #b71c1c !important;
}

/* ================= ИКОНКИ СТАТУСА ОБЗВОНА В УГЛУ ================= */
.call-status-badge {
    position: absolute !important;
    top: -8px !important;
    right: -14px !important;
    /* Отодвигаем значок от цифр */
    width: 16px !important;
    height: 16px !important;
    background: #ffffff !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25) !important;
    z-index: 10 !important;
    pointer-events: none !important;
    margin: 0 !important;
}

/* Жестко перебиваем синий цвет от родительских контейнеров */
.b24-contact-phone-row .call-status-badge svg,
.contact-info-item .call-status-badge svg,
.call-status-badge svg {
    width: 10px !important;
    height: 10px !important;
    stroke-width: 3 !important;
    color: inherit !important;
}

.call-status-badge.status-green {
    color: #4caf50 !important;
    border: 1px solid #c8e6c9 !important;
}

.call-status-badge.status-green svg {
    color: #4caf50 !important;
    /* Принудительно зеленый */
}

.call-status-badge.status-red {
    color: #ef5350 !important;
    border: 1px solid #ef5350 !important;
    animation: pulseRedAlert 1.5s infinite !important;
}

.call-status-badge.status-red svg {
    color: #ef5350 !important;
    /* Принудительно красный */
}

/* Раздвигаем контейнеры с номерами, чтобы значкам было место и они не лезли на крестики/плюсики */
.b24-contact-phone-row>div[style*="position: relative"],
.contact-info-item>div[style*="position: relative"] {
    margin-right: 16px !important;
}

@keyframes pulseRedAlert {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 83, 80, 0.8);
        background-color: #ffffff;
    }

    50% {
        transform: scale(1.25);
        /* Сильнее раздуваем */
        box-shadow: 0 0 0 10px rgba(239, 83, 80, 0);
        /* Широкое кольцо тени */
        background-color: #ffebee;
        /* Фон заливается легким красным */
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 83, 80, 0);
        background-color: #ffffff;
    }
}

/* Карточки верификаций */
.verif-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.verif-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #eaeaea;
}

.verif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.verif-name {
    font-size: 18px;
    font-weight: bold;
}

.verif-date {
    font-size: 12px;
    color: gray;
}

.verif-info {
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.6;
}

.verif-docs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.doc-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
}

.doc-link:hover {
    background: #e9ecef;
}

.btn-approve {
    width: 100%;
    background: #28a745;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
}

.btn-approve:hover {
    background: #218838;
}

.main-content {
    padding: 30px 40px !important;
    /* Отступы от краев экрана и меню */
}

.main-header h2 {
    margin: 0 0 25px 0 !important;
    /* Убираем стандартные кривые отступы браузера и делаем отступ вниз */
}

/* Лайтбокс для просмотра документов */
.lightbox-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(15, 23, 42, 0.85);
    /* Темно-синее затемнение */
    backdrop-filter: blur(5px);
    /* Размытие заднего фона */
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #f1f1f1;
    font-size: 45px;
    font-weight: bold;
    transition: 0.2s;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #ff4757;
    text-decoration: none;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.btn-approve,
.btn-reject {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Центруем иконку с текстом */
    width: 100%;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
}

.btn-approve {
    background: #28a745;
}

.btn-approve:hover {
    background: #218838;
}

.btn-reject {
    background: #ff4757;
}

.btn-reject:hover {
    background: #ff3344;
}

.verif-docs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 20px;
}

.doc-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Выравнивание по левому краю */
    gap: 8px;
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
    background: #f8f9fa;
    padding: 10px 12px;
    border-radius: 6px;
    text-align: left;
}

.doc-link:hover {
    background: #e9ecef;
}

/* ========================================================
   УМНЫЙ ФИЛЬТР БИТРИКС24 (ПОИСК И ВЫПАДАШКА)
   ======================================================== */
.b24-requests-toolbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.b24-smart-search-wrapper {
    position: relative;
    flex-grow: 1;
    max-width: 600px;
}

.b24-search-input-box {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    /* СТРОГО В ОДНУ СТРОКУ */
    gap: 4px;
    border: 1px solid #c6cdd3;
    background: #ffffff;
    border-radius: var(--radius);
    padding: 0 10px;
    height: 38px;
    /* ЖЕСТКАЯ ВЫСОТА, чтобы не раздувало шапку */
    cursor: text;
    transition: all 0.2s;
    overflow: hidden;
}

.b24-search-input-box:focus-within,
.b24-search-input-box.active {
    border-color: #2fc6f6;
    box-shadow: 0 0 0 2px rgba(47, 198, 246, 0.2);
}

.b24-search-tags {
    display: flex;
    flex-wrap: nowrap;
    /* Теги идут строго в линию */
    gap: 4px;
    overflow-x: auto;
    /* Включаем горизонтальную прокрутку, если тегов много */
    scrollbar-width: none;
    /* Прячем уродливый ползунок в Firefox */
    align-items: center;
    height: 100%;
}

.b24-search-tags::-webkit-scrollbar {
    display: none;
    /* Прячем ползунок в Chrome/Safari */
}

.b24-pill-tag-inside {
    background: #bbedfc;
    color: #1d607a;
    padding: 3px 8px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    max-width: 180px;
    /* Ограничиваем длину одного тега */
}

/* Обрезка слишком длинного текста внутри тега (например, длинный адрес) */
.b24-tag-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.b24-tag-close {
    cursor: pointer;
    color: #1d607a;
    font-weight: normal;
    opacity: 0.6;
    flex-shrink: 0;
    /* Крестик никогда не сжимается */
}

.b24-tag-close:hover {
    opacity: 1;
    color: #ff5733;
}

.b24-tag-close {
    cursor: pointer;
    color: #1d607a;
    font-weight: normal;
    opacity: 0.6;
}

.b24-tag-close:hover {
    opacity: 1;
    color: #ff5733;
}

#filterSearch {
    border: none !important;
    background: transparent !important;
    outline: none !important;
    font-size: 14px;
    color: #333;
    flex-grow: 1;
    min-width: 150px;
    padding: 6px 8px;
}

.b24-search-icon-inline {
    color: #a1a6ac;
    flex-shrink: 0;
}

/* Выпадающее меню фильтра (СДЕЛАЛИ ШИРЕ ПОД 2 КОЛОНКИ) */
.b24-smart-filter-popup {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 800px;
    /* Раздули до размеров Битрикса */
    background: #ffffff;
    border: 1px solid #c6cdd3;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 9000;
    overflow: hidden;
}

.b24-smart-filter-popup.show {
    display: flex;
}

.filter-sidebar {
    width: 220px;
    background: #f8f9fa;
    border-right: 1px solid #e1e5e8;
    padding: 10px 0;
    flex-shrink: 0;
}

.filter-preset {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #535c69;
    cursor: pointer;
    transition: background 0.1s;
    border-left: 3px solid transparent;
}

.filter-preset:hover {
    background: #eef2f4;
}

.filter-preset.active {
    background: #ffffff;
    color: #2067b0;
    border-left-color: #2067b0;
    font-weight: 700;
}

/* СЕТКА ПОЛЕЙ В 2 КОЛОНКИ */
.filter-body.b24-advanced-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px 20px;
    align-content: start;
    padding: 20px;
    flex-grow: 1;
}

.filter-field label {
    display: block;
    font-size: 11px;
    color: #a1a6ac;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.filter-field input,
.filter-field select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #c6cdd3;
    border-radius: 3px;
    font-size: 13px;
    outline: none;
    height: 35px;
    box-sizing: border-box;
    font-family: inherit;
    color: #333;
}

.filter-field select {
    cursor: pointer;
    background: #fff;
}

.filter-field input:focus,
.filter-field select:focus {
    border-color: #2fc6f6;
}

.filter-field.full-width {
    grid-column: 1 / -1;
}

.filter-actions.full-width {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 15px;
    margin-top: 5px;
    padding-top: 15px;
    border-top: 1px solid #f2f3f4;
}

.btn-filter-search {
    background: #bbedfc;
    color: #1d607a;
    border: 1px solid #94dcf2;
    padding: 8px 25px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 3px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s;
}

.btn-filter-search:hover {
    background: #94dcf2;
}

.btn-filter-reset {
    background: transparent;
    border: none;
    color: #a1a6ac;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
}

.btn-filter-reset:hover {
    color: #ef4444;
}

/* КРАСНЫЕ КРАСИВЫЕ СЧЕТЧИКИ НЕПРОЧИТАННЫХ СООБЩЕНИЙ */
.b24-unread-badge {
    background: #ef4444 !important;
    color: #ffffff !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    padding: 2px 6px !important;
    border-radius: 10px !important;
    margin-left: 6px !important;
    display: inline-block !important;
    box-shadow: 0 2px 5px rgba(239, 68, 68, 0.4) !important;
    animation: pulseBadge 2s infinite ease-in-out;
}

.b24-table-unread-badge {
    background: #ef4444;
    color: #ffffff;
    font-size: 9px;
    font-weight: 900;
    padding: 1px 5px;
    border-radius: 8px;
    margin-left: 4px;
    vertical-align: middle;
    display: inline-block;
}

@keyframes pulseBadge {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
    }
}

/* КОНТЕЙНЕР ЧАТА CRM */
.b24-chat-messages-container {
    flex-grow: 1;
    overflow-y: auto;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: calc(100vh - 280px);
    margin-bottom: 8px;
}

.b24-msg-bubble {
    max-width: 82%;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.4;
    word-break: break-word;
    position: relative;
}

.b24-msg-bubble.operator {
    align-self: flex-end;
    background: #2067b0;
    color: #ffffff;
    border-bottom-right-radius: 2px;
}

.b24-msg-bubble.driver {
    align-self: flex-start;
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #cbd5e1;
    border-bottom-left-radius: 2px;
}

.b24-msg-time {
    font-size: 9px;
    opacity: 0.7;
    margin-top: 3px;
    text-align: right;
    display: block;
}

.b24-chat-emoji-bar {
    display: flex;
    gap: 8px;
    padding: 4px 0;
    font-size: 16px;
    cursor: pointer;
    user-select: none;
}

.b24-chat-emoji-bar span:hover {
    transform: scale(1.2);
}

.b24-chat-input-row {
    display: flex;
    gap: 6px;
}

.b24-chat-input-row input {
    flex-grow: 1;
    height: 36px !important;
    padding: 6px 12px !important;
    border: 1px solid #c6cdd3 !important;
    border-radius: 6px !important;
    font-size: 12px !important;
}

.b24-chat-send-btn {
    background: #2067b0;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
}

.b24-chat-send-btn:hover {
    background: #175290;
}

/* ИСПРАВЛЕНИЕ БЕЙДЖА: СТРОГО СКРЫТЬ, ЕСЛИ ПУСТО */
.b24-unread-badge:empty {
    display: none !important;
}

/* ТЕЛЕГРАМ СТИЛЬ ЧАТА */
.b24-chat-messages-container {
    flex-grow: 1;
    overflow-y: auto;
    background: #e7edf3 !important;
    /* Фоновый паттерн мессенджера */
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: calc(100vh - 280px);
    margin-bottom: 8px;
}

/* Баблы сообщений */
.b24-msg-bubble {
    max-width: 78%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.4;
    word-break: break-word;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* Сообщения оператора (исходящие — справа, светло-зеленые / синие в стиле Telegram) */
.b24-msg-bubble.operator {
    align-self: flex-end;
    background: #eeffde !important;
    /* Классический Telegram outgoing */
    color: #111111 !important;
    border-top-right-radius: 2px;
}

/* Сообщения водителя (входящие — слева, белые) */
.b24-msg-bubble.driver {
    align-self: flex-start;
    background: #ffffff !important;
    color: #111111 !important;
    border-top-left-radius: 2px;
}

.b24-msg-time {
    font-size: 10px;
    color: #888888;
    margin-top: 4px;
    text-align: right;
    display: inline-block;
    float: right;
    margin-left: 8px;
}

/* Кнопка открытия смайлов */
.b24-emoji-toggle-btn {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s;
}

.b24-emoji-toggle-btn:hover {
    transform: scale(1.15);
}

/* Всплывающее окно со смайлами */
.b24-emoji-popup {
    position: absolute;
    bottom: 60px;
    left: 15px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 10px;
    z-index: 100;
    width: 260px;
}

.b24-emoji-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    text-align: center;
    font-size: 20px;
    cursor: pointer;
}

.b24-emoji-grid span {
    padding: 4px;
    border-radius: 6px;
    transition: background 0.1s;
}

.b24-emoji-grid span:hover {
    background: #f1f5f9;
    transform: scale(1.2);
}

/* =========================================================
   СЧЁТЧИКИ НОВЫХ СООБЩЕНИЙ
   ========================================================= */

.b24-unread-badge,
.b24-table-unread-badge {
    position: relative;

    display: none;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    margin-left: 7px;

    box-sizing: border-box;

    border: 2px solid #ffffff;
    border-radius: 999px;

    background:
        linear-gradient(145deg,
            #ff4d4f 0%,
            #f01414 52%,
            #c40000 100%);

    color: #ffffff !important;

    font-size: 12px;
    font-weight: 900;
    line-height: 1;

    text-align: center;
    vertical-align: middle;

    box-shadow:
        0 3px 9px rgba(215, 0, 0, 0.34),
        inset 0 1px 1px rgba(255, 255, 255, 0.4);

    /*
     * Сам элемент постоянно не масштабируем.
     * Поэтому имя клиента и вся строка таблицы
     * больше не будут дёргаться.
     */
    transform: translateZ(0);
    transform-origin: center;

    will-change: transform;
    contain: layout paint;

    z-index: 2;
}

.b24-table-unread-badge {
    min-width: 25px;
    height: 25px;

    margin-left: 7px;

    /*
     * Не используем translateY:
     * он конфликтовал с animation transform.
     */
    vertical-align: middle;
}


/*
 * Мягкий постоянный ореол.
 * Масштабируется только псевдоэлемент,
 * поэтому соседний текст не двигается.
 */
.b24-unread-badge::before,
.b24-table-unread-badge::before {
    content: '';

    position: absolute;
    inset: -3px;

    border: 2px solid rgba(244, 30, 30, 0.48);

    border-radius: inherit;

    pointer-events: none;

    animation:
        unreadBadgeHalo 2.1s ease-out infinite;
}


/*
 * Однократная мягкая анимация
 * только при новом сообщении.
 */
.b24-unread-badge.badge-new-message,
.b24-table-unread-badge.badge-new-message {
    animation:
        unreadBadgeArrive 0.58s cubic-bezier(0.22,
            1.2,
            0.36,
            1);
}


@keyframes unreadBadgeArrive {
    0% {
        transform:
            translateZ(0) scale(0.82);
    }

    45% {
        transform:
            translateZ(0) scale(1.12);
    }

    72% {
        transform:
            translateZ(0) scale(0.97);
    }

    100% {
        transform:
            translateZ(0) scale(1);
    }
}


@keyframes unreadBadgeHalo {
    0% {
        transform: scale(0.9);
        opacity: 0.55;
    }

    65% {
        transform: scale(1.38);
        opacity: 0;
    }

    100% {
        transform: scale(1.38);
        opacity: 0;
    }
}

/* Главная таблица заявок: рейс в одну строку, маршрут чуть уже */
.crm-table th:nth-child(4),
.crm-table td:nth-child(4) {
    width: 78px;
    min-width: 78px;
    white-space: nowrap;
}

.crm-table td:nth-child(4) .b24-flight-badge {
    white-space: nowrap;
    flex-wrap: nowrap;
}

.crm-table th:nth-child(10),
.crm-table td:nth-child(10) {
    width: 25%;
    max-width: 360px;
}

.crm-table td:nth-child(10) {
    line-height: 1.35;
}

/* =========================================================
   REALTIME УВЕДОМЛЕНИЯ CRM
   ========================================================= */

.crm-realtime-toast-container {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 200000;
    width: 390px;
    max-width: calc(100vw - 36px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.crm-realtime-toast {
    position: relative;
    width: 100%;
    background: #fff;
    border: 1px solid #cfd7df;
    border-left: 5px solid #2067b0;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .16);
    padding: 13px 44px 13px 14px;
    pointer-events: auto;
    animation: crmRealtimeToastIn .25s ease-out;
}

.crm-realtime-toast.actor-client {
    border-left-color: #2067b0;
}

.crm-realtime-toast.actor-driver {
    border-left-color: #8e44ad;
}

.crm-realtime-toast.actor-operator {
    border-left-color: #16a085;
}

.crm-realtime-toast.actor-system {
    border-left-color: #e67e22;
}

.crm-realtime-toast-title {
    color: #111;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 3px;
}

.crm-realtime-toast-request {
    color: #2067b0;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 7px;
}

.crm-realtime-toast-description {
    color: #222;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
}

.crm-realtime-toast-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
}

.crm-realtime-toast-time {
    color: #7b8794;
    font-size: 10px;
    font-weight: 700;
}

.crm-realtime-toast-open {
    border: 0;
    background: transparent;
    color: #2067b0;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    padding: 4px 0;
}

.crm-realtime-toast-open:hover {
    text-decoration: underline;
}

.crm-realtime-toast-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #7b8794;
    font-size: 22px;
    line-height: 24px;
    font-weight: 400;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease, color .15s ease;
}

.crm-realtime-toast-close:hover {
    background: #eef2f5;
    color: #111;
}

.crm-realtime-toast.removing {
    animation: crmRealtimeToastOut .2s ease-in forwards;
}

@keyframes crmRealtimeToastIn {
    from {
        opacity: 0;
        transform: translateX(25px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes crmRealtimeToastOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(25px);
    }
}

@media (max-width: 600px) {
    .crm-realtime-toast-container {
        top: 10px;
        right: 10px;
        width: calc(100vw - 20px);
        max-width: none;
    }
}

.crm-realtime-toast {
    cursor: pointer;
}

.crm-realtime-toast-description {
    cursor: pointer;
}

.crm-realtime-toast-close,
.crm-realtime-toast-open {
    cursor: pointer;
}

/* ==========================================================
   CLIENT CHAT — TELEGRAM DESKTOP STYLE
   ========================================================== */

#drawerTabContentChat.client-chat-pane {
    width: 100%;
    height: 100%;

    display: none;

    gap: 16px;

    min-width: 0;
    min-height: 0;
}

#drawerTabContentChat.client-chat-pane.active-pane {
    display: flex;
}


/* ==========================================================
   ЛЕВАЯ ОСНОВНАЯ ЧАСТЬ
   ========================================================== */

.client-chat-main {
    position: relative;

    display: flex;
    flex: 1 1 auto;
    flex-direction: column;

    min-width: 0;
    min-height: 0;

    height: 100%;

    background: #ffffff;

    border: 1px solid #d8e0e8;
    border-radius: 12px;

    overflow: hidden;

    box-shadow:
        0 4px 18px rgba(15, 23, 42, 0.05);
}


/* ==========================================================
   ШАПКА
   ========================================================== */

.client-chat-header {
    flex: 0 0 auto;

    min-height: 68px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 12px 18px;

    background: #ffffff;

    border-bottom: 1px solid #e4e9ef;
}

.client-chat-header-left {
    display: flex;
    align-items: center;

    gap: 12px;

    min-width: 0;
}

.client-chat-avatar {
    width: 42px;
    height: 42px;

    flex: 0 0 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    color: #ffffff;

    background:
        linear-gradient(135deg,
            #2589e8 0%,
            #1767bd 100%);

    box-shadow:
        0 4px 12px rgba(32, 103, 176, 0.20);
}

.client-chat-header-text {
    min-width: 0;
}

.client-chat-title {
    overflow: hidden;

    color: #17212b;

    font-size: 15px;
    font-weight: 800;

    white-space: nowrap;
    text-overflow: ellipsis;
}

.client-chat-subtitle {
    margin-top: 3px;

    color: #7d8a97;

    font-size: 11px;
    font-weight: 600;
}

.client-chat-online-status {
    flex: 0 0 auto;

    padding: 6px 10px;

    border-radius: 999px;

    background: #ecfdf3;

    color: #10b981;

    font-size: 10px;
    font-weight: 800;

    text-transform: uppercase;
}


/* ==========================================================
   ОБЛАСТЬ СООБЩЕНИЙ
   ========================================================== */

.client-chat-messages {
    position: relative;

    display: flex;
    flex: 1 1 auto;
    flex-direction: column;

    gap: 7px;

    min-height: 0;

    padding:
        20px clamp(20px, 7vw, 110px);

    overflow-x: hidden;
    overflow-y: auto;

    background:
        linear-gradient(rgba(238, 244, 249, 0.92),
            rgba(238, 244, 249, 0.92)),
        radial-gradient(circle at 20px 20px,
            rgba(120, 145, 165, 0.07) 1px,
            transparent 1.5px);

    background-size:
        auto,
        34px 34px;

    scrollbar-width: thin;
    scrollbar-color: #bdc8d3 transparent;
}

.client-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.client-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.client-chat-messages::-webkit-scrollbar-thumb {
    background: #bdc8d3;
    border-radius: 20px;
}


/* ==========================================================
   BUBBLES
   ========================================================== */

#clientChatMessages .b24-msg-bubble {
    width: fit-content;
    max-width: min(68%, 720px);

    padding: 9px 12px 7px;

    border-radius: 13px;

    font-size: 13px;
    line-height: 1.45;

    word-wrap: break-word;
    overflow-wrap: anywhere;

    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.08);

    animation:
        clientChatMessageAppear .15s ease-out;
}

#clientChatMessages .b24-msg-bubble.operator {
    align-self: flex-end;

    background: #d9fdd3 !important;
    color: #17212b !important;

    border: 1px solid #c9eec4;

    border-bottom-right-radius: 4px;
}

#clientChatMessages .b24-msg-bubble.client {
    align-self: flex-start;

    background: #ffffff !important;
    color: #17212b !important;

    border: 1px solid #dce3e9;

    border-bottom-left-radius: 4px;
}

#clientChatMessages .b24-msg-time {
    display: block;

    margin-top: 3px;

    color: #84919d;

    font-size: 9px;
    font-weight: 600;

    text-align: right;
}


/* ==========================================================
   ПОЛЕ ВВОДА
   ========================================================== */

.client-chat-composer {
    position: relative;

    flex: 0 0 auto;

    display: flex;
    align-items: center;

    gap: 9px;

    min-height: 66px;

    padding: 10px 14px;

    background: #ffffff;

    border-top: 1px solid #e1e7ed;
}

.client-chat-composer input {
    flex: 1 1 auto;

    height: 42px;

    padding: 0 15px;

    border: 1px solid #d7dfe7;
    border-radius: 21px;

    outline: none;

    background: #f7f9fb;

    color: #17212b;

    font-size: 13px;
    font-weight: 500;

    transition:
        border-color .15s ease,
        background .15s ease,
        box-shadow .15s ease;
}

.client-chat-composer input:focus {
    border-color: #61a7e8;

    background: #ffffff;

    box-shadow:
        0 0 0 3px rgba(37, 137, 232, 0.10);
}

.client-chat-composer input:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.client-chat-emoji-button,
.client-chat-send-button {
    width: 42px;
    height: 42px;

    flex: 0 0 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: none;
    border-radius: 50%;

    cursor: pointer;

    transition:
        transform .12s ease,
        background .12s ease;
}

.client-chat-emoji-button {
    background: transparent;

    font-size: 22px;
}

.client-chat-emoji-button:hover {
    background: #eef3f7;
}

.client-chat-send-button {
    background:
        linear-gradient(135deg,
            #2589e8,
            #1767bd);

    color: #ffffff;

    box-shadow:
        0 4px 11px rgba(32, 103, 176, 0.23);
}

.client-chat-send-button:hover {
    transform: translateY(-1px);

    background:
        linear-gradient(135deg,
            #3298f5,
            #1767bd);
}

.client-chat-send-button:active {
    transform: translateY(0);
}


/* ==========================================================
   EMOJI
   ========================================================== */

.client-chat-emoji-popup {
    left: 14px !important;
    bottom: 70px !important;

    z-index: 20;
}


/* ==========================================================
   ПРАВАЯ ПАНЕЛЬ
   ========================================================== */

.client-chat-sidebar {
    width: 285px;
    flex: 0 0 285px;

    display: flex;
    flex-direction: column;

    gap: 12px;

    min-height: 0;

    padding: 14px;

    background: #ffffff;

    border: 1px solid #d8e0e8;
    border-radius: 12px;

    box-shadow:
        0 4px 18px rgba(15, 23, 42, 0.04);
}

.client-chat-sidebar-card {
    padding: 13px;

    background: #f7f9fb;

    border: 1px solid #e1e7ed;
    border-radius: 9px;
}

.client-chat-sidebar-label {
    margin-bottom: 7px;

    color: #8a98a6;

    font-size: 9px;
    font-weight: 800;

    letter-spacing: .7px;
}

.client-chat-sidebar-value {
    color: #17212b;

    font-size: 12px;
    font-weight: 700;

    line-height: 1.35;
}

.client-chat-sidebar-big {
    font-size: 13px;
}

.client-chat-order-number {
    color: #1767bd;

    font-size: 20px;
    font-weight: 800;
}

.client-chat-channel-row {
    display: flex;
    align-items: center;

    gap: 10px;

    color: #334155;

    font-size: 11px;
    line-height: 1.4;
}

.client-chat-channel-row strong {
    display: block;

    color: #17212b;

    font-size: 11px;
}

.client-chat-channel-icon {
    width: 34px;
    height: 34px;

    flex: 0 0 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;

    background: #e6f1fb;

    color: #1767bd;
}

.client-chat-sidebar-hint {
    margin-top: auto;

    padding: 12px;

    border-radius: 8px;

    background: #eef6ff;

    color: #617284;

    font-size: 10px;
    font-weight: 600;

    line-height: 1.45;
}


/* ==========================================================
   ANIMATION
   ========================================================== */

@keyframes clientChatMessageAppear {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ==========================================================
   ADAPTIVE
   ========================================================== */

@media (max-width: 1050px) {
    .client-chat-sidebar {
        display: none;
    }

    .client-chat-messages {
        padding:
            18px 35px;
    }

    #clientChatMessages .b24-msg-bubble {
        max-width: 78%;
    }
}

.client-table-chat-badge {
    width: 20px !important;
    height: 20px !important;

    min-width: 20px !important;
    min-height: 20px !important;

    max-width: 20px !important;
    max-height: 20px !important;

    padding: 0 0 1px 0 !important;
    margin-left: 7px;

    display: inline-flex !important;

    align-items: center !important;
    justify-content: center !important;

    box-sizing: border-box;

    border: 2px solid #ffffff;
    border-radius: 50% !important;

    background: #ef4444;

    color: #ffffff !important;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 10px;
    font-weight: 800;

    line-height: 1 !important;

    letter-spacing: 0;

    text-align: center;

    vertical-align: middle;

    box-shadow:
        0 2px 6px rgba(239, 68, 68, .35);

    cursor: pointer;
}

.client-table-chat-badge.new-message {
    animation:
        clientTableBadgeArrive .55s cubic-bezier(.22,
            1.3,
            .36,
            1);
}

@keyframes clientTableBadgeArrive {
    0% {
        transform: scale(.55);
    }

    55% {
        transform: scale(1.25);
    }

    100% {
        transform: scale(1);
    }
}

#clientChatUnreadBadge {
    width: 28px !important;
    height: 28px !important;

    min-width: 28px !important;
    min-height: 28px !important;

    max-width: 28px !important;
    max-height: 28px !important;

    flex: 0 0 28px !important;

    margin: 0 0 0 8px !important;
    padding: 0 !important;

    box-sizing: border-box !important;

    display: inline-grid !important;
    place-items: center !important;

    position: relative !important;

    border: 2px solid #ffffff !important;
    border-radius: 50% !important;

    background: #ef4444 !important;
    color: #ffffff !important;

    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 13px !important;
    font-weight: 900 !important;

    line-height: 1 !important;

    text-align: center !important;
    text-indent: 0 !important;
    letter-spacing: 0 !important;

    vertical-align: middle !important;

    animation: none !important;
    transform: none !important;

    overflow: visible !important;

    box-shadow:
        0 0 0 3px rgba(239, 68, 68, 0.14),
        0 4px 10px rgba(239, 68, 68, 0.30) !important;
}


/*
 * Когда счётчик пустой — скрываем ВЕСЬ круг.
 *
 * Это правило специально имеет ту же ID-специфичность,
 * поэтому гарантированно перебивает display:inline-grid.
 */
#clientChatUnreadBadge:empty {
    display: none !important;
}


/*
 * Для этого badge не используем старый общий halo.
 */
#clientChatUnreadBadge::before {
    content: none !important;
    display: none !important;
    animation: none !important;
}