:root {
    --cbs-ink: #1a2e2a;
    --cbs-ink-dark: #0f201d;
    --cbs-muted: #68736f;
    --cbs-line: #dce2df;
    --cbs-surface: #fff;
    --cbs-soft: #f3f6f4;
    --cbs-danger: #991b1b;
    --cbs-danger-button: #b91c1c;
    --cbs-danger-button-hover: #991b1b;
    --cbs-success: #16845f;
    --cbs-telegram: #1677a8;
    --cbs-whatsapp: #147a43;
    --cbs-max: #5b4bc4;
}

.cbs-chat-widget,
.cbs-pos-chat,
.cbs-b2b-card,
.cbs-b2b-widget,
.cbs-b2b-requests {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--cbs-ink);
    box-sizing: border-box;
}

.cbs-chat-widget * ,
.cbs-pos-chat *,
.cbs-b2b-card *,
.cbs-b2b-widget *,
.cbs-b2b-requests * { box-sizing: border-box; }

.cbs-chat-widget {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 99999;
}

.cbs-chat-launcher {
    min-height: 56px;
    padding: 0 22px;
    border: 0;
    border-radius: 0;
    background: var(--cbs-ink);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 16px 36px rgba(15, 32, 29, .25);
}

.cbs-chat-launcher:hover { background: var(--cbs-ink-dark); }
.cbs-chat-launcher svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.cbs-chat-badge { min-width: 20px; height: 20px; padding: 0 5px; border-radius: 20px; background: #fff; color: var(--cbs-ink); font-size: 11px; line-height: 20px; }
.cbs-chat-widget.is-open .cbs-chat-launcher,
.cbs-chat-widget.is-menu-open .cbs-chat-launcher { display: none; }

.cbs-chat-channels {
    width: min(360px, calc(100vw - 32px));
    overflow: hidden;
    border: 1px solid var(--cbs-line);
    border-radius: 16px;
    background: var(--cbs-surface);
    box-shadow: 0 24px 60px rgba(15, 32, 29, .24);
}
.cbs-chat-channels[hidden] { display: none; }
.cbs-chat-channels > header {
    min-height: 72px;
    padding: 14px 12px 14px 18px;
    background: var(--cbs-ink);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cbs-chat-channels > header > span { display: flex; flex-direction: column; gap: 2px; }
.cbs-chat-channels > header strong { font-size: 15px; }
.cbs-chat-channels > header small { color: rgba(255, 255, 255, .72); font-size: 12px; }
.cbs-chat-channels > header button {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}
.cbs-chat-channels > header button:hover { background: rgba(255, 255, 255, .1); }
.cbs-chat-channels nav { padding: 8px; display: grid; gap: 4px; }
.cbs-chat-channels nav > a.cbs-chat-channel,
.cbs-chat-channels nav > button.cbs-chat-channel {
    appearance: none !important;
    width: 100% !important;
    min-height: 64px !important;
    margin: 0 !important;
    padding: 9px 12px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    color: var(--cbs-ink) !important;
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) 24px !important;
    align-items: center !important;
    justify-items: start !important;
    gap: 12px !important;
    font: inherit !important;
    line-height: normal !important;
    text-align: left !important;
    text-transform: none !important;
    text-decoration: none !important;
    box-shadow: none !important;
    cursor: pointer;
    touch-action: manipulation;
    transition: background-color .18s ease, transform .12s ease;
}
.cbs-chat-channels nav > a.cbs-chat-channel:hover,
.cbs-chat-channels nav > button.cbs-chat-channel:hover { background: var(--cbs-soft) !important; }
.cbs-chat-channel:active { transform: scale(.985); }
.cbs-chat-channel:focus-visible { outline: 3px solid rgba(26, 46, 42, .2); outline-offset: -2px; }
.cbs-chat-channel > svg {
    width: 42px;
    height: 42px;
    padding: 10px;
    border-radius: 12px;
    background: currentColor;
    color: var(--cbs-ink);
    fill: #fff;
}
.cbs-chat-channel > img {
    display: block;
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 12px;
    object-fit: contain;
}
.cbs-chat-channel > span { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; color: var(--cbs-ink); text-align: left; }
.cbs-chat-channel > span strong { font-size: 14px; line-height: 1.2; }
.cbs-chat-channel > span small { color: var(--cbs-muted); font-size: 11px; line-height: 1.2; }
.cbs-chat-channel > i { justify-self: end; color: var(--cbs-muted); font-size: 18px; font-style: normal; }
.cbs-chat-channel--telegram > svg { color: var(--cbs-telegram); }
.cbs-chat-channel--whatsapp > svg { color: var(--cbs-whatsapp); }
.cbs-chat-channel--max > svg { color: var(--cbs-max); fill: none; stroke: #fff; stroke-width: 2; }
.cbs-chat-channel--site > svg { color: var(--cbs-ink); fill: none; stroke: #fff; stroke-width: 1.8; }

.cbs-chat-window {
    width: min(380px, calc(100vw - 32px));
    height: min(640px, calc(100vh - 48px));
    background: var(--cbs-surface);
    border: 1px solid var(--cbs-line);
    box-shadow: 0 24px 60px rgba(15, 32, 29, .24);
    display: grid;
    grid-template-rows: auto auto 1fr auto auto auto;
}

.cbs-chat-window[hidden] { display: none; }
.cbs-chat-window > header,
.cbs-pos-chat__header {
    min-height: 64px;
    padding: 0 20px;
    background: var(--cbs-ink);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cbs-chat-window > header .cbs-chat-heading,
.cbs-pos-chat__header div { display: flex; align-items: center; gap: 9px; }
.cbs-chat-heading > span { display: flex; flex-direction: column; gap: 1px; }
.cbs-chat-heading strong { color: #fff; font-size: 14px; font-weight: 600; line-height: 1.2; }
.cbs-chat-heading small { color: rgba(255, 255, 255, .72); font-size: 11px; line-height: 1.2; }
.cbs-chat-window > header i,
.cbs-pos-chat__header i { width: 8px; height: 8px; border-radius: 50%; background: #77d59a; box-shadow: 0 0 0 4px rgba(119, 213, 154, .13); }
.cbs-chat-window > header i.is-offline,
.cbs-pos-chat__header i.is-offline { background: #aab2af; box-shadow: 0 0 0 4px rgba(170, 178, 175, .13); }
.cbs-chat-window > header button { border: 0; background: transparent; color: #fff; font-size: 29px; font-weight: 200; cursor: pointer; }

.cbs-chat-offline-note { padding: 10px 14px; border-bottom: 1px solid #eadfc7; background: #fff8e8; color: #6f5622; font-size: 12px; line-height: 1.4; }
.cbs-chat-offline-note[hidden] { display: none; }

.cbs-chat-messages,
.cbs-pos-chat__messages {
    padding: 18px;
    overflow-y: auto;
    background: var(--cbs-soft);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cbs-chat-welcome,
.cbs-chat-empty,
.cbs-pos-chat__placeholder,
.cbs-b2b-empty { color: var(--cbs-muted); font-size: 14px; line-height: 1.5; text-align: center; padding: 24px; }
.cbs-chat-message { display: flex; flex-direction: column; align-items: flex-start; max-width: 86%; }
.cbs-chat-message > div { padding: 10px 13px; background: #fff; border: 1px solid var(--cbs-line); font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.cbs-chat-message time { margin-top: 3px; color: #89928f; font-size: 10px; }
.cbs-chat-message--client { align-self: flex-end; align-items: flex-end; }
.cbs-chat-message--client > div { background: var(--cbs-ink); border-color: var(--cbs-ink); color: #fff; }
.cbs-pos-chat .cbs-chat-message--staff { align-self: flex-end; align-items: flex-end; }
.cbs-pos-chat .cbs-chat-message--staff > div { background: var(--cbs-ink); border-color: var(--cbs-ink); color: #fff; }
.cbs-pos-chat .cbs-chat-message--client { align-self: flex-start; align-items: flex-start; }
.cbs-pos-chat .cbs-chat-message--client > div { background: #fff; border-color: var(--cbs-line); color: var(--cbs-ink); }

.cbs-chat-profile { padding: 12px 14px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cbs-chat-profile[hidden] { display: none; }
.cbs-chat-profile p { grid-column: 1 / -1; margin: 0 0 2px; color: var(--cbs-muted); font-size: 12px; line-height: 1.35; }
.cbs-chat-profile__name { grid-column: 1 / -1; }
.cbs-chat-profile label { display: flex; flex-direction: column; gap: 5px; color: var(--cbs-muted); font-size: 11px; }
.cbs-chat-profile label > span b { color: var(--cbs-danger); }
.cbs-chat-profile input,
.cbs-chat-compose textarea,
.cbs-pos-chat__compose textarea,
.cbs-b2b-form input,
.cbs-b2b-form textarea {
    width: 100%;
    border: 1px solid var(--cbs-line);
    border-radius: 0;
    background: #fff;
    color: var(--cbs-ink);
    font: inherit;
    outline: none;
}
.cbs-chat-profile input { padding: 10px; font-size: 13px; }
.cbs-chat-profile input:focus,
.cbs-chat-compose textarea:focus,
.cbs-pos-chat__compose textarea:focus,
.cbs-b2b-form input:focus,
.cbs-b2b-form textarea:focus { border-color: var(--cbs-ink); box-shadow: 0 0 0 3px rgba(26, 46, 42, .08); }

.cbs-chat-compose { padding: 12px 14px; display: grid; grid-template-columns: 1fr 44px; gap: 8px; border-top: 1px solid var(--cbs-line); }
.cbs-chat-compose textarea { min-height: 44px; max-height: 110px; resize: vertical; padding: 10px; }
.cbs-chat-compose button { border: 0; background: var(--cbs-ink); color: #fff; cursor: pointer; }
.cbs-chat-compose button:hover { background: var(--cbs-ink-dark); }
.cbs-chat-compose button svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.cbs-chat-compose.is-loading { opacity: .6; pointer-events: none; }
.cbs-chat-status { min-height: 18px; padding: 0 14px 7px; color: var(--cbs-danger); font-size: 12px; }

.cbs-pos-chat {
    position: fixed;
    top: 20px;
    right: 20px;
    bottom: 20px;
    width: 480px;
    z-index: 99990;
    background: #fff;
    border: 1px solid var(--cbs-line);
    box-shadow: 0 20px 50px rgba(15, 32, 29, .2);
    display: grid;
    grid-template-rows: auto 1fr;
}
.cbs-pos-chat__header span[data-cbs-pos-chat-count] { min-width: 23px; height: 23px; padding: 0 6px; background: #fff; color: var(--cbs-ink); border-radius: 20px; text-align: center; line-height: 23px; font-size: 11px; }
.cbs-pos-chat__header span[data-cbs-pos-chat-count][hidden] { visibility: hidden; }
.cbs-pos-chat__header .cbs-pos-chat__controls { justify-content: flex-end; gap: 7px; }
.cbs-pos-chat__controls small { max-width: 145px; color: rgba(255, 255, 255, .72); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.cbs-manager-toggle {
    appearance: none !important;
    width: 104px !important;
    min-width: 104px !important;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 8px !important;
    border: 1px solid rgba(255, 255, 255, .22) !important;
    border-radius: 22px !important;
    background: rgba(255, 255, 255, .07) !important;
    box-shadow: none !important;
    color: #fff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 7px !important;
    font: inherit !important;
    line-height: 1 !important;
    text-transform: none !important;
    cursor: pointer !important;
    touch-action: manipulation;
}
.cbs-manager-toggle__track {
    width: 40px;
    min-width: 40px;
    height: 22px;
    padding: 0;
    border-radius: 12px;
    background: var(--cbs-success);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
    display: block;
    position: relative;
    transition: background-color .2s ease;
}
.cbs-manager-toggle__track i {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .3);
    transform: translateX(18px);
    transition: transform .2s ease;
}
.cbs-manager-toggle > b { color: #fff; font-size: 11px; font-weight: 700; }
.cbs-manager-toggle.is-offline .cbs-manager-toggle__track { background: #737d79; }
.cbs-manager-toggle.is-offline .cbs-manager-toggle__track i { transform: translateX(0); }
.cbs-manager-toggle:hover { border-color: rgba(255, 255, 255, .48) !important; }
.cbs-manager-toggle:focus-visible { outline: 3px solid #fff !important; outline-offset: 2px !important; }
.cbs-pos-chat__body { min-height: 0; display: grid; grid-template-columns: 164px 1fr; }
.cbs-pos-chat__threads { overflow-y: auto; border-right: 1px solid var(--cbs-line); background: #f8faf9; }
.cbs-pos-thread { position: relative; width: 100%; padding: 14px 12px; border: 0; border-bottom: 1px solid var(--cbs-line); background: transparent; color: var(--cbs-ink); text-align: left; cursor: pointer; }
.cbs-pos-thread:hover, .cbs-pos-thread.is-active { background: #fff; box-shadow: inset 3px 0 var(--cbs-ink); }
.cbs-pos-thread > span { display: flex; flex-direction: column; gap: 3px; }
.cbs-pos-thread strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cbs-pos-thread time { color: #89928f; font-size: 9px; }
.cbs-pos-thread small { display: block; margin-top: 5px; color: var(--cbs-muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cbs-pos-thread b { position: absolute; top: 12px; right: 8px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 20px; background: var(--cbs-ink); color: #fff; font-size: 10px; line-height: 18px; text-align: center; }
.cbs-pos-chat__dialog { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto 1fr auto; }
.cbs-pos-chat__dialog > header { padding: 10px 10px 10px 16px; border-bottom: 1px solid var(--cbs-line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cbs-pos-chat__dialog-info { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cbs-pos-chat__dialog > header strong { font-size: 14px; }
.cbs-pos-chat__dialog > header small { color: var(--cbs-muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.cbs-pos-chat__dialog > header small a { color: var(--cbs-ink); text-decoration: underline; }
.cbs-pos-chat__dialog > header button.cbs-pos-chat__delete {
    appearance: none !important;
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid var(--cbs-danger-button-hover) !important;
    border-radius: 10px !important;
    background: var(--cbs-danger-button) !important;
    color: #fff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: none !important;
    font-size: 0 !important;
    line-height: 1 !important;
    text-indent: 0 !important;
    text-transform: none !important;
    overflow: visible !important;
    cursor: pointer;
    touch-action: manipulation;
}
.cbs-pos-chat__dialog > header button.cbs-pos-chat__delete:hover { background: var(--cbs-danger-button-hover) !important; border-color: var(--cbs-danger-button-hover) !important; }
.cbs-pos-chat__delete:focus-visible { outline: 3px solid rgba(153, 27, 27, .22); outline-offset: 2px; }
.cbs-pos-chat__delete:disabled { opacity: .5; cursor: wait; }
.cbs-pos-chat__dialog > header button.cbs-pos-chat__delete svg {
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
    padding: 0 !important;
    fill: none !important;
    stroke: #fff !important;
    stroke-width: 2 !important;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.cbs-pos-chat__delete.is-loading svg { animation: cbs-delete-pulse .8s ease-in-out infinite alternate; }
.cbs-pos-chat__delete-status { min-height: 0; color: var(--cbs-danger); font-size: 10px; line-height: 1.2; }
@keyframes cbs-delete-pulse { to { opacity: .35; transform: scale(.88); } }
.cbs-pos-chat__placeholder { align-self: center; grid-row: 1 / -1; }
.cbs-pos-chat__compose { padding: 10px; border-top: 1px solid var(--cbs-line); display: grid; grid-template-columns: 1fr auto; gap: 7px; }
.cbs-pos-chat__compose textarea { min-height: 52px; resize: none; padding: 9px; font-size: 13px; }
.cbs-pos-chat__compose button { border: 0; padding: 0 12px; background: var(--cbs-ink); color: #fff; cursor: pointer; }
.cbs-pos-chat__compose button:disabled { opacity: .55; }
.cbs-pos-chat__status { grid-column: 1 / -1; color: var(--cbs-danger); font-size: 11px; }

@media (min-width: 1100px) {
    body .cbs-pos-app { max-width: none; margin-left: 30px; margin-right: 520px; }
}

.cbs-b2b-card { max-width: 900px; margin: 40px auto; padding: clamp(24px, 5vw, 54px); background: #fff; border: 1px solid var(--cbs-line); box-shadow: 0 20px 50px rgba(15, 32, 29, .09); }
.cbs-b2b-heading { max-width: 620px; margin-bottom: 32px; }
.cbs-b2b-heading > span,
.cbs-b2b-requests__header > span { color: var(--cbs-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .14em; }
.cbs-b2b-heading h2,
.cbs-b2b-requests__header h2 { margin: 7px 0 8px; color: var(--cbs-ink); font-size: clamp(27px, 4vw, 40px); font-weight: 350; line-height: 1.15; }
.cbs-b2b-heading p { margin: 0; color: var(--cbs-muted); }
.cbs-b2b-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cbs-b2b-form label { display: flex; flex-direction: column; gap: 7px; color: var(--cbs-ink); font-size: 13px; }
.cbs-b2b-form input, .cbs-b2b-form textarea { padding: 13px 14px; }
.cbs-b2b-form textarea { resize: vertical; }
.cbs-b2b-wide { grid-column: 1 / -1; }
.cbs-b2b-hp { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
.cbs-b2b-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cbs-b2b-actions button { min-height: 48px; padding: 0 26px; border: 0; border-radius: 0; background: var(--cbs-ink); color: #fff; font-size: 15px; cursor: pointer; }
.cbs-b2b-actions button:hover { background: var(--cbs-ink-dark); }
.cbs-b2b-actions button:disabled { opacity: .55; }
.cbs-b2b-actions span { color: var(--cbs-muted); font-size: 13px; }
.cbs-b2b-actions span.is-success { color: #166534; }
.cbs-b2b-actions span.is-error, .cbs-access-denied { color: var(--cbs-danger); }

.cbs-b2b-widget { max-width: 1100px; margin: 24px auto; }
.cbs-b2b-widget__form { display: block; }
.cbs-b2b-widget__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 14px; align-items: end; }
.cbs-b2b-widget__form label { display: flex; flex-direction: column; gap: 7px; color: var(--cbs-ink); font-size: 13px; }
.cbs-b2b-widget__form input { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--cbs-line); border-radius: 0; background: #fff; color: var(--cbs-ink); font: inherit; }
.cbs-b2b-widget__form input:focus { border-color: var(--cbs-ink); box-shadow: 0 0 0 3px rgba(26, 46, 42, .08); outline: 0; }
.cbs-b2b-widget__form .cbs-b2b-actions { min-height: 48px; }
.cbs-b2b-widget__form .cbs-b2b-actions button { white-space: nowrap; }
.cbs-b2b-widget__form > [data-cbs-b2b-status] {
    display: block;
    min-width: 0;
    min-height: 19px;
    margin-top: 14px;
    color: var(--cbs-muted);
    font-size: 13px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}
.cbs-b2b-widget__form > [data-cbs-b2b-status].is-success { color: #166534; }
.cbs-b2b-widget__form > [data-cbs-b2b-status].is-error { color: var(--cbs-danger); }

.cbs-b2b-requests { max-width: 1100px; margin: 40px auto; padding: clamp(20px, 4vw, 40px); background: #fff; border: 1px solid var(--cbs-line); }
.cbs-b2b-requests__header { position: relative; margin-bottom: 25px; }
.cbs-b2b-requests__header b { position: absolute; top: 8px; right: 0; min-width: 36px; padding: 7px; background: var(--cbs-ink); color: #fff; text-align: center; font-weight: 500; }
.cbs-b2b-request-list { display: grid; gap: 14px; }
.cbs-b2b-request { padding: 20px; border: 1px solid var(--cbs-line); background: #fff; }
.cbs-b2b-request > header { display: flex; justify-content: space-between; gap: 15px; padding-bottom: 13px; border-bottom: 1px solid var(--cbs-line); }
.cbs-b2b-request > header time { color: var(--cbs-muted); font-size: 12px; white-space: nowrap; }
.cbs-b2b-request dl { display: flex; flex-wrap: wrap; gap: 14px 30px; margin: 16px 0 0; }
.cbs-b2b-request dl div { min-width: 160px; }
.cbs-b2b-request dt { color: var(--cbs-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.cbs-b2b-request dd { margin: 3px 0 0; }
.cbs-b2b-request a { color: var(--cbs-ink); text-decoration: underline; text-underline-offset: 3px; }
.cbs-b2b-request p { margin: 17px 0 0; padding: 14px; background: var(--cbs-soft); line-height: 1.55; }
.cbs-b2b-pagination { display: flex; gap: 6px; margin-top: 22px; }
.cbs-b2b-pagination .page-numbers { min-width: 36px; height: 36px; padding: 0 9px; border: 1px solid var(--cbs-line); color: var(--cbs-ink); line-height: 34px; text-align: center; text-decoration: none; }
.cbs-b2b-pagination .page-numbers.current,
.cbs-b2b-pagination a.page-numbers:hover { background: var(--cbs-ink); border-color: var(--cbs-ink); color: #fff; }
.cbs-b2b-filters { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; margin: 0 0 24px; padding: 16px; background: var(--cbs-soft); }
.cbs-b2b-filters label { display: flex; flex-direction: column; gap: 6px; color: var(--cbs-muted); font-size: 12px; }
.cbs-b2b-filters select { min-width: 160px; min-height: 40px; padding: 6px 32px 6px 10px; border: 1px solid var(--cbs-line); background-color: #fff; color: var(--cbs-ink); }
.cbs-b2b-filters button, .cbs-b2b-filters a { min-height: 40px; padding: 0 18px; border: 1px solid var(--cbs-ink); border-radius: 0; font: inherit; line-height: 38px; text-decoration: none; cursor: pointer; }
.cbs-b2b-filters button { background: var(--cbs-ink); color: #fff; }
.cbs-b2b-filters a { background: #fff; color: var(--cbs-ink); }

.cbs-b2b-exit-popup {
    position: fixed;
    z-index: 100000;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
}

.cbs-b2b-exit-popup.is-open {
    opacity: 1;
    pointer-events: auto;
}

.cbs-b2b-exit-popup[hidden] {
    display: none;
}

.cbs-b2b-exit-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 32, 29, 0.62);
    cursor: pointer;
}

.cbs-b2b-exit-popup__window {
    position: relative;
    width: min(420px, calc(100vw - 32px));
    max-width: 420px;
    background: #fff;
    border: 1px solid var(--cbs-line);
    box-shadow: 0 28px 60px rgba(15, 32, 29, .28);
    padding: 24px 22px 22px;
    box-sizing: border-box;
    z-index: 2;
}

.cbs-b2b-exit-popup__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: 1px solid var(--cbs-line);
    background: #fff;
    color: var(--cbs-ink);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.cbs-b2b-exit-popup__title {
    margin: 0 32px 8px 0;
    color: var(--cbs-ink);
    font-size: 24px;
    line-height: 1.25;
    font-weight: 400;
}

.cbs-b2b-exit-popup__message {
    margin: 0 0 16px;
    color: var(--cbs-muted);
    line-height: 1.45;
}

.cbs-b2b-exit-popup__form {
    display: grid;
    gap: 12px;
}

.cbs-b2b-exit-popup__form input {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--cbs-line);
    border-radius: 0;
    color: var(--cbs-ink);
    font: inherit;
}

.cbs-b2b-exit-popup__form button {
    width: 100%;
    min-height: 48px;
    border: 0;
    background: var(--cbs-ink);
    color: #fff;
    font: inherit;
    cursor: pointer;
}

.cbs-b2b-exit-popup__form button:hover {
    background: var(--cbs-ink-dark);
}

.cbs-b2b-exit-popup__status {
    margin: 10px 0 0;
    min-height: 18px;
    color: var(--cbs-muted);
    font-size: 13px;
}
.cbs-b2b-exit-popup__status.is-success { color: #166534; }
.cbs-b2b-exit-popup__status.is-error { color: var(--cbs-danger); }


@media (max-width: 1099px) {
    .cbs-pos-chat { top: 8px; right: 8px; bottom: 8px; width: min(480px, calc(100vw - 16px)); }
}

@media (max-width: 600px) {
    .cbs-chat-widget { right: 12px; bottom: 12px; }
    .cbs-chat-window { width: calc(100vw - 24px); height: min(620px, calc(100vh - 24px)); }
    .cbs-chat-channels { width: calc(100vw - 24px); }
    .cbs-chat-profile, .cbs-b2b-form { grid-template-columns: 1fr; }
    .cbs-b2b-wide { grid-column: auto; }
    .cbs-pos-chat__body { grid-template-columns: 116px 1fr; }
    .cbs-pos-thread { padding: 12px 8px; }
    .cbs-b2b-card { margin: 20px 12px; }
    .cbs-b2b-request > header { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    .cbs-chat-channel,
    .cbs-manager-toggle__track,
    .cbs-manager-toggle__track i { transition: none; }
    .cbs-pos-chat__delete.is-loading svg { animation: none; }
}
