/* ========================================================================= */
/* 🌟 ЧИСТЫЕ WHITE LABEL СТИЛИ МЕССЕНДЖЕРА И СКВОЗНОЙ «КАПЛИ» КОНТРОЛЯ       */
/* ========================================================================= */

/* 📱 СТИЛИ ДЛЯ ОКНА КУРЬЕРА (В APK / TELEGRAM APP) */
.ccb-support-msg-history-box {
    height: 150px;
    overflow-y: auto;
    padding: 5px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-sizing: border-box;
}

/* 💻 СТИЛИ ДЛЯ ПУЛЬТА ДИСПЕТЧЕРА В АДМИНКЕ (ДВУХКОЛОНОЧНЫЙ ХАБ) */
.ccb-admin-messenger-wrapper {
    display: flex;
    background: #ffffff;
    border: 1px solid #ccd0d4;
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    height: 500px;
    margin-bottom: 25px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    box-sizing: border-box;
}

/* Левая колонка - Сайдбар списка курьеров */
.ccb-admin-messenger-sidebar {
    width: 300px;
    border-right: 1px solid #e9edef;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    box-sizing: border-box;
}

.ccb-admin-messenger-sidebar-title {
    padding: 15px;
    font-weight: 800;
    font-size: 15px;
    background: #f0f2f5;
    border-bottom: 1px solid #e9edef;
    color: #111b21;
}

.ccb-admin-messenger-users-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* Строка курьера в списке */
.ccb-admin-chat-user-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f2f5;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
    box-sizing: border-box;
}

.ccb-admin-chat-user-row:hover {
    background: #f5f6f6 !important;
}

.ccb-admin-chat-avatar {
    width: 38px;
    height: 38px;
    background: #111b21;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.ccb-admin-chat-meta-block {
    flex: 1;
    min-width: 0;
}

.ccb-admin-chat-username {
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #111b21;
}

.ccb-admin-chat-userphone {
    font-size: 11px;
    color: #667781;
    margin-top: 2px;
    font-family: monospace;
}

.ccb-admin-chat-unread-badge {
    background: #fc3d39;
    color: #ffffff;
    font-size: 10px;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 10px;
    position: absolute;
    right: 15px;
    top: 20px;
}

/* Правая колонка - Окно чата WhatsApp Web */
.ccb-admin-messenger-body-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #efeae2;
    box-sizing: border-box;
}

.ccb-admin-messenger-chat-header {
    padding: 13px 20px;
    background: #f0f2f5;
    font-weight: 800;
    font-size: 14px;
    border-bottom: 1px solid #e9edef;
    color: #111b21;
    box-sizing: border-box;
}

.ccb-admin-messenger-chat-history {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-sizing: border-box;
}

.ccb-admin-messenger-chat-footer {
    padding: 10px 15px;
    background: #f0f2f5;
    border-top: 1px solid #e9edef;
    box-sizing: border-box;
}

/* 🎈 СТИЛИЗАЦИЯ ДИАЛОГОВЫХ ПЛАШЕК (WHATSAPP-КЛАССИКА) */
.ccb-whatsapp-bubble {
    padding: 10px 14px;
    max-width: 70%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    color: #111b21;
    font-size: 13px;
    font-weight: 500;
    word-break: break-word;
    line-height: 1.4;
    box-sizing: border-box;
}

.ccb-whatsapp-bubble.msg-incoming {
    background: #ffffff;
    align-self: flex-start;
    border-radius: 0 10px 10px 10px;
}

.ccb-whatsapp-bubble.msg-outgoing {
    background: #d9fdd3;
    align-self: flex-end;
    border-radius: 10px 0 10px 10px;
}

.ccb-whatsapp-bubble-timestamp {
    text-align: right;
    font-size: 9px;
    color: #667781;
    margin-top: 3px;
}

/* 💧 СКВОЗНАЯ «КАПЛЯ» ТОТАЛЬНОГО КОНТРОЛЯ */
.ccb-system-drop-stream-title {
    font-weight: 800;
    margin-bottom: 10px;
    color: #54656f;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.ccb-system-drop-stream-container {
    background: #ffffff;
    border: 1px solid #ccd0d4;
    border-radius: 12px;
    padding: 15px;
    box-sizing: border-box;
    max-height: 260px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.ccb-system-drop-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    border-bottom: 1px dashed #f0f2f5;
    padding-bottom: 6px;
    gap: 15px;
    box-sizing: border-box;
}

.ccb-system-drop-meta-badge {
    background: #f0f2f5;
    color: #111b21;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    font-family: monospace;
    margin-right: 6px;
}

.ccb-system-drop-message-text {
    color: #111b21;
    font-weight: 500;
    word-break: break-word;
}

.ccb-system-drop-timestamp {
    color: #8696a0;
    font-size: 11px;
    white-space: nowrap;
}

/* ========================================================================= */
/* 🚕 ФИРМЕННЫЙ СТИЛЬ И ГЕОМЕТРИЯ ДЛЯ ФРОНТЕНДА ЯНДЕКС GOбес                    */
/* ========================================================================= */

/* Контейнер всего WebView-приложения */
.ccb-app-portal-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 750px;
    margin: 0 auto;
    color: #111b21;
    box-sizing: border-box;
    padding: 10px;
}

/* Островок профиля Яндекс Про (Верхняя плашка) */
.ccb-profile-island {
    background: #ffffff;
    padding: 16px 20px;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    border: 1px solid #e9edef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    box-sizing: border-box;
}

.ccb-profile-name-row {
    font-weight: 800;
    font-size: 17px;
    color: #111b21;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ccb-profile-badge-role {
    font-size: 11px;
    background: #fbc02d;
    color: #111b21;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 800;
    letter-spacing: 0.3px;
}

.ccb-profile-stats-row {
    font-size: 12px;
    color: #667781;
    margin-top: 6px;
    display: flex;
    gap: 15px;
    font-weight: 600;
}

.ccb-profile-money-badge {
    color: #ffffff;
    background: #4caf50;
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 800;
    box-shadow: 0 2px 6px rgba(76,175,80,0.2);
}

/* Кнопка Единой Сети (Хамелеон) */
.ccb-btn-network-status {
    border: none;
    padding: 11px 16px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.ccb-btn-network-status.state-offline {
    background: #8696a0;
    color: #ffffff;
}

.ccb-btn-network-status.state-online {
    background: #e8f5e9;
    color: #4caf50;
    border: 1px solid #4caf50;
}

/* Форма оформления Экспресс-заказа */
.ccb-express-form-card {
    background: #ffffff;
    padding: 25px;
    border-radius: 14px;
    border: 1px solid #e9edef;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    box-sizing: border-box;
}

.ccb-express-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    width: 100%;
    box-sizing: border-box;
}

.ccb-express-field-33 {
    flex: 1 1 200px;
    box-sizing: border-box;
}

.ccb-express-field-50 {
    flex: 1 1 250px;
    box-sizing: border-box;
}

.ccb-express-field-25 {
    flex: 1 1 120px;
    box-sizing: border-box;
}

.ccb-express-label {
    font-weight: 600;
    font-size: 13px;
    color: #3b4a54;
    display: block;
    margin-bottom: 4px;
}

.ccb-express-input {
    width: 100%;
    padding: 11px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 14px;
}

.ccb-express-input-bold {
    font-weight: bold;
    color: #111b21;
}

/* Адаптивные карточки живой ленты заказов Яндекса */
.ccb-order-delivery-card {
    padding: 18px;
    margin-bottom: 12px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    border: 1px solid #e9edef;
    transition: all 0.2s;
    box-sizing: border-box;
}

.ccb-card-header {
    display: flex;
    justify-content: space-between;
    font-weight: 800;
    margin-bottom: 10px;
    font-size: 14px;
    flex-wrap: wrap;
    gap: 5px;
}

.ccb-card-badge-hash {
    background: #111b21;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 6px;
    font-family: monospace;
}

.ccb-card-badge-company {
    background: #fc3d39;
    color: #fff;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
}

.ccb-card-price-tag {
    color: #111b21;
    font-size: 16px;
    font-weight: 900;
}

.ccb-card-body-text {
    font-size: 13px;
    color: #3b4a54;
    line-height: 1.5;
}

.ccb-card-comment-block {
    background: #f5f5f5;
    padding: 8px 12px;
    margin-top: 8px;
    font-style: italic;
    border-radius: 6px;
    color: #2c3e50;
    font-weight: 500;
}

.ccb-card-footer {
    margin-top: 12px;
    border-top: 1px solid #f0f2f5;
    padding-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* 🔥 КРАСНАЯ СИРЕНА ЯНДЕКСА: Анимация пульсации для горящих заказов (<5 минут) */
@keyframes ccb_yandex_pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(252, 61, 57, 0.4); }
    70% { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(252, 61, 57, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(252, 61, 57, 0); }
}
.ccb-timer-hot {
    background: #ff3b30 !important;
    color: #ffffff !important;
    animation: ccb_yandex_pulse 1.5s infinite ease-in-out;
}
.ccb-timer-expired {
    background: #8696a0 !important;
    color: #ffffff !important;
}
/* 📦 ШТОРКА ЯНДЕКС GO ДЛЯ ОТПРАВИТЕЛЯ */
.ccb-express-form-card {
    display: none; /* Изначально скрыта для всех, кроме ручного вызова */
    background: #ffffff;
    padding: 25px;
    border-radius: 14px;
    border: 1px solid #e9edef;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    box-sizing: border-box;
}
