.cf-chat,
.cf-chat-dock,
.cf-desk {
    --cf-chat-brand: #2d6a6a;
    --cf-chat-brand-dark: #1f4f4f;
    --cf-chat-ink: #1a2b2b;
    --cf-chat-muted: #5c7171;
    --cf-chat-line: #e2eaea;
    --cf-chat-paper: #ffffff;
    --cf-chat-soft: #f3f8f7;
}

.cf-chat .visually-hidden,
.cf-desk .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.cf-chat {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 10040;
    font-family: "DM Sans", system-ui, sans-serif;
}

.cf-chat[hidden] {
    display: none !important;
}

.cf-chat-launcher {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--color-primary, var(--cf-chat-brand));
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    transition: background 0.2s ease;
}

.cf-chat-launcher:hover {
    background: var(--color-primary-dark, var(--cf-chat-brand-dark));
}

.cf-chat-launcher:focus-visible {
    outline: 2px solid var(--color-primary, var(--cf-chat-brand));
    outline-offset: 3px;
}

.cf-chat-launcher svg {
    display: block;
}

.cf-chat-launcher-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #3d8b6e;
    border: 2px solid #fff;
}

.cf-chat-badge {
    position: absolute;
    top: -4px;
    left: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #c45c5c;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 20px;
}

.cf-chat-panel {
    position: absolute;
    right: 0;
    bottom: 60px;
    display: flex;
    flex-direction: column;
    width: min(380px, calc(100vw - 32px));
    height: min(560px, calc(100vh - 120px));
    overflow: hidden;
    border-radius: 18px;
    background: var(--cf-chat-paper);
    color: var(--cf-chat-ink);
    box-shadow: 0 18px 50px rgba(26, 43, 43, 0.2);
}

.cf-chat-panel[hidden],
.cf-chat-welcome[hidden],
.cf-chat-start[hidden],
.cf-chat-thread[hidden],
.cf-chat-compose[hidden],
.cf-chat-ended[hidden],
.cf-chat-typing[hidden],
.cf-chat-error[hidden],
.cf-chat-badge[hidden] {
    display: none !important;
}

.cf-chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 16px 14px;
    background: linear-gradient(160deg, #1a2b2b, #2d6a6a);
    color: #f4f9f8;
}

.cf-chat-kicker {
    margin: 0;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.75;
}

.cf-chat-welcome-title { display: block; font-size: 15px; font-weight: 700; }
.cf-chat-status {
    display: block;
    font-size: 13px;
    opacity: 0.85;
}
.cf-chat-head .cf-chat-head-photo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.cf-ops-icon { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }

.cf-chat-icon-btn {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
}

.cf-chat-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    flex: 1;
    padding: 16px;
}

.cf-chat-welcome h2 {
    margin: 0 0 6px;
    font-size: 22px;
}

.cf-chat-welcome p,
.cf-chat-ended p {
    margin: 0;
    color: var(--cf-chat-muted);
    font-size: 14px;
    line-height: 1.5;
}

.cf-chat-start,
.cf-chat-compose,
.cf-chat-ended {
    display: grid;
    gap: 10px;
}

.cf-chat-start label {
    display: grid;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
}

.cf-chat-start input,
.cf-chat-compose textarea,
.cf-desk-compose textarea,
.cf-desk-search input {
    width: 100%;
    border: 1px solid var(--cf-chat-line);
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
    color: inherit;
    background: #fff;
}

.cf-chat-primary,
.cf-desk-send {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    background: var(--cf-chat-brand);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.cf-chat-primary:disabled,
.cf-desk-send:disabled {
    opacity: 0.6;
    cursor: default;
}

.cf-chat-thread {
    flex: 1;
    min-height: 160px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 2px;
}

.cf-chat-bubble {
    max-width: 85%;
    padding: 8px 12px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.cf-chat-bubble small {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    opacity: 0.7;
}

.cf-chat-bubble.is-visitor {
    align-self: flex-end;
    background: var(--cf-chat-brand);
    color: #fff;
}

.cf-chat-bubble.is-agent,
.cf-chat-bubble.is-system {
    align-self: flex-start;
    background: var(--cf-chat-soft);
}

.cf-chat-bubble.is-system {
    align-self: center;
    max-width: 100%;
    background: transparent;
    color: var(--cf-chat-muted);
    font-size: 12px;
    text-align: center;
}

.cf-chat-bubble.is-note {
    align-self: stretch;
    max-width: 100%;
    background: #fff8ef;
    border: 1px dashed #e8a87c;
}

.cf-chat-typing,
.cf-chat-error {
    margin: 0;
    font-size: 12px;
    color: var(--cf-chat-muted);
}

.cf-chat-error {
    color: #c45c5c;
}

.cf-chat-compose-row,
.cf-chat-stars div,
.cf-desk-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.cf-chat-text-btn,
.cf-desk-ghost {
    border: 0;
    background: none;
    padding: 0;
    color: var(--cf-chat-muted);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.cf-chat-stars button,
.cf-desk-chip {
    border: 1px solid var(--cf-chat-line);
    background: #fff;
    border-radius: 999px;
    padding: 4px 10px;
    font: inherit;
    cursor: pointer;
}

.cf-chat-stars button.is-selected {
    background: var(--cf-chat-brand);
    color: #fff;
    border-color: var(--cf-chat-brand);
}

.cf-chat-dock {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 10040;
    display: grid;
    justify-items: end;
    gap: 10px;
    font-family: "DM Sans", system-ui, sans-serif;
}

.cf-chat-dock-card,
.cf-chat-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 16px;
    background: #1a2b2b;
    color: #f4f9f8;
    box-shadow: 0 12px 32px rgba(26, 43, 43, 0.25);
}

.cf-chat-avail {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.08);
    color: inherit;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.cf-chat-avail .cf-chat-launcher-dot {
    position: static;
    border-color: #1a2b2b;
    background: #8a9e9e;
}

.cf-chat-avail.is-on .cf-chat-launcher-dot {
    background: #7dcea0;
}

.cf-chat-dock-link,
.cf-chat-toast a {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.cf-chat-toasts {
    display: grid;
    gap: 8px;
}

.cf-chat-toast {
    width: min(320px, calc(100vw - 32px));
    align-items: flex-start;
}

.cf-chat-toast strong,
.cf-chat-toast p {
    margin: 0;
}

.cf-chat-toast p {
    color: rgba(244, 249, 248, 0.75);
    font-size: 13px;
}

.sa-console-page .bo-main {
    height: 100dvh;
    overflow: hidden;
}

.sa-console {
    padding: 0;
    height: 100%;
    overflow: hidden;
}

.cf-workspace {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    background: var(--color-surface, #fff);
}

.cf-workspace [hidden] {
    display: none !important;
}

.cf-ops {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 64px;
    padding: 0 16px;
    border-bottom: 1px solid var(--color-border, var(--cf-chat-line));
    background: var(--color-surface, #fff);
}

.cf-ops h1 {
    margin: 0;
    font-size: 16px;
    line-height: 1;
}

.cf-ops-brand,
.cf-ops-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.cf-site-picker,
.cf-ops-settings,
.cf-ops-search input {
    border: 1px solid var(--color-border, var(--cf-chat-line));
    border-radius: 10px;
    background: var(--color-surface, #fff);
    color: inherit;
    font: inherit;
}

.cf-site-picker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
    padding: 6px 10px;
    cursor: pointer;
    text-align: left;
}

.cf-site-picker strong,
.cf-site-panel strong {
    display: block;
    font-size: 13px;
}

.cf-site-picker small,
.cf-site-panel span {
    display: block;
    color: var(--color-text-muted, var(--cf-chat-muted));
    font-size: 12px;
}

.cf-site-panel {
    min-width: 240px;
    padding: 8px;
}

.cf-site-panel input,
.cf-ops-search input {
    width: 180px;
    padding: 8px 10px;
}

.cf-site-panel [data-site-choice] {
    width: 100%;
}

.cf-ops-settings {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 12px;
    text-decoration: none;
    font-weight: 650;
}

.cf-ops-settings:hover,
.cf-site-picker:hover,
.cf-desk-ghost:hover,
.cf-desk-send:hover {
    border-color: var(--color-primary, #1f8a62);
}

.cf-ops-settings:focus-visible,
.cf-site-picker:focus-visible,
.cf-desk-send:focus-visible,
.cf-desk-ghost:focus-visible {
    outline: 2px solid var(--color-primary, #1f8a62);
    outline-offset: 2px;
}

.cf-workspace-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.cf-workspace-site {
    margin: 0;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--color-bg-alt, #f3f8f7);
    font-size: 13px;
    font-weight: 700;
}

.cf-workspace .cf-chat-avail {
    background: #fff;
    color: var(--color-text, var(--cf-chat-ink));
    border: 1px solid var(--color-border, var(--cf-chat-line));
}

.cf-workspace .cf-chat-avail .cf-chat-launcher-dot {
    border-color: #fff;
    background: #8a9e9e;
}

.cf-workspace .cf-chat-avail.is-on .cf-chat-launcher-dot {
    background: #1f8a4c;
}

.cf-workspace .cf-chat-avail.is-busy .cf-chat-launcher-dot {
    background: #d0892f;
}

.cf-workspace .cf-chat-avail.is-away .cf-chat-launcher-dot {
    background: #3d7ea6;
}

.cf-menu {
    position: relative;
}

.cf-menu-panel {
    position: absolute;
    z-index: 20;
    top: calc(100% + 6px);
    left: 0;
    display: grid;
    gap: 4px;
    min-width: 220px;
    padding: 8px;
    border: 1px solid var(--color-border, var(--cf-chat-line));
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(26, 43, 43, 0.12);
}

.cf-menu-panel button {
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    padding: 8px 10px;
    cursor: pointer;
}

.cf-menu-panel button:hover,
.cf-menu-panel button.is-active {
    background: var(--color-bg-alt, #f3f8f7);
}

.cf-menu-panel p {
    margin: 4px 8px 2px;
    color: var(--color-text-muted, var(--cf-chat-muted));
    font-size: 12px;
}

.cf-desk-search input {
    border: 1px solid var(--color-border, var(--cf-chat-line));
    border-radius: 10px;
    background: #fff;
    color: inherit;
    font: inherit;
    padding: 8px 10px;
}

.cf-workspace-agent {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    font-weight: 700;
}

.cf-workspace-agent .cf-avatar {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #8a9e9e;
}

.cf-workspace-agent.is-on .cf-avatar {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1f8a4c;
}

.cf-workspace-agent.is-busy .cf-avatar {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #d0892f;
}

.cf-workspace-agent.is-away .cf-avatar {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #3d7ea6;
}

.cf-avatar {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1a2b2b;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.cf-desk {
    display: grid;
    grid-template-columns: 300px minmax(520px, 1fr) 320px;
    flex: 1;
    min-height: 0;
    min-width: 0;
    border: 0;
    border-radius: 0;
    overflow: hidden;
    background: var(--color-surface, #fff);
    color: var(--color-text, var(--cf-chat-ink));
}

.cf-desk > * {
    min-width: 0;
}

.cf-desk-side,
.cf-desk-main {
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.cf-desk-side {
    border-right: 1px solid var(--color-border, var(--cf-chat-line));
    background: var(--color-bg-alt, #f3f8f7);
}

.cf-desk-toolbar,
.cf-desk-head,
.cf-desk-compose {
    padding: 14px;
    border-bottom: 1px solid var(--color-border, var(--cf-chat-line));
}

.cf-desk-compose {
    border-bottom: 0;
    border-top: 1px solid var(--color-border, var(--cf-chat-line));
}

.cf-desk-nav {
    display: grid;
    gap: 4px;
    padding: 12px;
    border-bottom: 1px solid var(--color-border, var(--cf-chat-line));
}

.cf-desk-nav button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    padding: 8px 10px;
    cursor: pointer;
}

.cf-desk-nav button.is-active {
    background: #fff;
    font-weight: 700;
}

.cf-desk-nav span,
.cf-desk-badge {
    min-width: 1.4em;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(26, 43, 43, 0.08);
    font-size: 12px;
    text-align: center;
}

.cf-desk-search {
    padding: 0 12px 12px;
}

.cf-desk-search input {
    width: 100%;
}

.cf-desk-person {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.cf-desk-person .cf-desk-live {
    margin-top: 0;
}

.cf-desk-empty {
    margin: auto;
    max-width: 360px;
    padding: 32px 20px;
    text-align: center;
}

.cf-desk-empty p {
    margin: 6px 0 0;
    color: var(--color-text-muted, var(--cf-chat-muted));
}

.cf-chat-setup {
    display: grid;
    grid-template-columns: minmax(220px, 280px) 1fr;
    gap: 16px;
    margin: 0 0 16px;
    padding: 14px;
    border: 1px solid var(--color-border, #d7e3e0);
    border-radius: 14px;
    background: var(--color-surface, #fff);
}

.cf-chat-setup-icon,
.cf-chat-setup-team {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.cf-chat-setup p,
.cf-chat-setup li span + span {
    margin: 2px 0 8px;
    color: var(--color-text-muted, #5d6b68);
    font-size: 13px;
}

.cf-chat-setup ul {
    list-style: none;
    margin: 8px 0;
    padding: 0;
    display: grid;
    gap: 6px;
}

.cf-chat-setup li,
.cf-chat-setup form {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.cf-chat-setup input {
    border: 1px solid var(--color-border, #d7e3e0);
    border-radius: 8px;
    padding: 6px 8px;
}

.cf-avatar-lg {
    width: 48px;
    height: 48px;
    overflow: hidden;
}

.cf-avatar-lg img,
.cf-chat-launcher-photo,
.cf-chat-head-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 999px;
}

.cf-chat-launcher-photo,
.cf-chat-head-photo {
    width: 28px;
    height: 28px;
}

.cf-session-head {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 40px;
}

.cf-session-head .cf-avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
}

.cf-session-id {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.cf-session-practice,
.cf-online {
    color: var(--color-text-muted, var(--cf-chat-muted));
    font-size: 13px;
}

.cf-online::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 50%;
    background: #1f8a4c;
}

.cf-session-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex: 0 0 auto;
}

.cf-session-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.cf-metric {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    min-height: 72px;
    padding: 12px;
    border: 1px solid var(--color-border, var(--cf-chat-line));
    border-radius: 12px;
    background: transparent;
}

.cf-metric strong {
    font-variant-numeric: tabular-nums;
    font-size: 22px;
    line-height: 1.1;
}

.cf-metric span {
    color: var(--color-text-muted, var(--cf-chat-muted));
    font-size: 12px;
    line-height: 1.3;
}

.cf-session-current {
    display: grid;
    gap: 4px;
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid var(--color-border, var(--cf-chat-line));
    border-left: 3px solid var(--color-primary, #1f8a62);
    border-radius: 12px;
    background: transparent;
}

.cf-session-current strong {
    font-size: 20px;
}

.cf-current-kicker {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--color-text-muted, var(--cf-chat-muted));
    font-size: 12px;
    letter-spacing: 0.02em;
}

.cf-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1f8a4c;
    box-shadow: 0 0 0 0 rgba(31, 138, 76, 0.45);
    animation: cf-pulse 1.6s ease-out infinite;
}

.cf-session-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: #e5f4f1;
    color: #1a2b2b;
    font-size: 12px;
    font-weight: 650;
}

.cf-journey {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: grid;
}

.cf-journey li {
    display: grid;
    grid-template-columns: 92px 16px minmax(0, 1fr);
    gap: 8px;
    position: relative;
    padding-bottom: 14px;
}

.cf-journey time {
    font-variant-numeric: tabular-nums;
    font-size: 12px;
    color: var(--color-text-muted, var(--cf-chat-muted));
    text-align: right;
}

.cf-journey-mark {
    width: 10px;
    height: 10px;
    margin-top: 4px;
    border: 2px solid var(--color-primary, #1f8a62);
    border-radius: 50%;
    background: var(--color-surface, #fff);
    position: relative;
    z-index: 1;
}

.cf-journey-mark.is-current {
    background: var(--color-primary, #1f8a62);
}

.cf-journey li::before {
    content: "";
    position: absolute;
    left: 107px;
    top: 14px;
    bottom: 0;
    width: 1px;
    background: var(--color-border, var(--cf-chat-line));
}

.cf-journey li:last-child::before {
    display: none;
}

.cf-journey-state,
.cf-journey-path {
    display: block;
    color: var(--color-text-muted, var(--cf-chat-muted));
    font-size: 13px;
}

.cf-journey-path,
.cf-truncate,
.cf-desk-context dd {
    overflow-wrap: anywhere;
    min-width: 0;
}

.cf-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.cf-session-raw {
    margin-top: 8px;
}

.cf-session-raw summary {
    cursor: pointer;
    font-weight: 650;
}

.cf-when-open {
    display: none;
}

.cf-session-raw[open] .cf-when-closed {
    display: none;
}

.cf-session-raw[open] .cf-when-open {
    display: inline;
}

.cf-more {
    position: relative;
}

.cf-more summary {
    list-style: none;
    cursor: pointer;
    padding: 8px 10px;
    border: 1px solid var(--color-border, var(--cf-chat-line));
    border-radius: 10px;
}

.cf-more summary::-webkit-details-marker {
    display: none;
}

.cf-more button {
    position: absolute;
    right: 0;
    z-index: 5;
    margin-top: 4px;
    border: 1px solid var(--color-border, var(--cf-chat-line));
    border-radius: 10px;
    background: var(--color-surface, #fff);
    padding: 8px 10px;
    font: inherit;
    cursor: pointer;
}

.cf-copy {
    border: 0;
    background: none;
    color: var(--color-primary, #1f8a62);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.cf-desk-timeline,
.cf-desk-context dl {
    display: grid;
    gap: 12px;
    margin: 0;
}

.cf-desk-context {
    border-left: 1px solid var(--color-border, var(--cf-chat-line));
    background: var(--color-surface, #fff);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 8px 16px 16px;
    max-width: 100%;
}

.cf-desk-context h2 {
    margin: 16px 0 8px;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.cf-desk-context h2:first-child {
    margin-top: 0;
}

.cf-desk-context div {
    display: grid;
    gap: 2px;
}

.cf-desk-context dt {
    color: var(--color-text-muted, var(--cf-chat-muted));
    font-size: 12px;
}

.cf-desk-context dd {
    margin: 0;
}

.cf-desk-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.cf-desk-filters button.is-active {
    background: var(--cf-chat-brand);
    color: #fff;
    border-color: var(--cf-chat-brand);
}

.cf-desk-list {
    overflow: auto;
    flex: 1;
}

.cf-desk-item {
    display: grid;
    gap: 2px;
    width: 100%;
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid var(--color-border, var(--cf-chat-line));
    background: transparent;
    color: inherit;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.cf-desk-item.is-active {
    background: #eef6f4;
    box-shadow: inset 3px 0 0 var(--color-primary, #1f8a62);
}

.cf-desk-item strong {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.cf-desk-live {
    display: block;
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    margin-top: 4px;
    border-radius: 50%;
    background: #1f8a4c;
    box-shadow: 0 0 0 3px rgba(31, 138, 76, 0.16);
}

.cf-desk-pages {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cf-desk-pages a {
    color: inherit;
}

.cf-desk-item span,
.cf-desk-meta {
    color: var(--color-text-muted, var(--cf-chat-muted));
    font-size: 13px;
}

.cf-desk-waiting {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c45c5c;
    display: inline-block;
}

.cf-desk-main {
    background: var(--color-surface, #fff);
}

.cf-desk-main-tools {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cf-desk-details {
    display: none;
}

.cf-desk-back {
    display: none;
    margin: 12px 12px 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
}

@media (max-width: 1400px) {
    .cf-desk {
        grid-template-columns: 280px minmax(0, 1fr);
    }

    .cf-desk-details {
        display: inline-flex;
        margin: 8px 12px 0 auto;
    }

    .cf-desk-context {
        display: none;
        position: fixed;
        top: 64px;
        right: 0;
        z-index: 30;
        width: min(320px, 100vw);
        height: calc(100dvh - 64px);
        box-shadow: -12px 0 32px rgba(26, 43, 43, 0.12);
    }

    .cf-workspace.is-context .cf-desk-context {
        display: block;
    }
}

@media (max-width: 900px) {
    .cf-session-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .sa-console-page .bo-main {
        height: auto;
        overflow: auto;
    }

    .cf-ops {
        height: auto;
        min-height: 64px;
        flex-wrap: wrap;
        padding: 8px 12px;
    }

    .cf-workspace {
        height: auto;
        min-height: 100dvh;
        overflow: visible;
    }

    .cf-workspace-bar {
        flex-wrap: wrap;
    }

    .cf-workspace-agent {
        margin-left: 0;
    }

    .cf-desk {
        grid-template-columns: 1fr;
        min-height: 70vh;
    }

    .cf-desk-back {
        display: inline-flex;
    }

    .cf-workspace:not(.is-detail) .cf-desk-main,
    .cf-workspace:not(.is-detail) .cf-desk-context {
        display: none;
    }

    .cf-workspace.is-detail .cf-desk-side {
        display: none;
    }

    .cf-workspace.is-detail .cf-desk-main {
        display: flex;
    }

    .cf-workspace.is-detail .cf-desk-context:not([hidden]) {
        display: block !important;
    }
}

.cf-desk-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 10px 14px;
}

.cf-desk-thread {
    flex: 1;
    overflow: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cf-desk-empty {
    margin: auto;
    color: var(--color-text-muted, var(--cf-chat-muted));
    text-align: center;
}

.cf-desk-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.cf-nav-count {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    margin-left: 6px;
    padding: 0 5px;
    border-radius: 999px;
    background: #c45c5c;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

@media (max-width: 600px) {
    .cf-chat-launcher {
        width: 44px;
        height: 44px;
    }

    .cf-chat-panel {
        bottom: 56px;
    }
}

@media (max-width: 800px) {
    .cf-chat {
        right: 16px;
        bottom: 16px;
    }

    .cf-desk {
        grid-template-columns: 1fr;
    }

    .cf-desk-side {
        max-height: 280px;
        border-right: 0;
        border-bottom: 1px solid var(--color-border, var(--cf-chat-line));
    }
}

.cf-context-section {
    border-bottom: 1px solid var(--color-border, var(--cf-chat-line));
    padding: 8px 0 12px;
}

.cf-context-section summary {
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.cf-settings {
    display: grid;
    gap: 14px;
    max-width: 760px;
}

.cf-settings .bo-card {
    display: grid;
    gap: 10px;
    padding: 18px;
}

.cf-settings h2 {
    margin: 0;
    font-size: 16px;
}

.cf-settings ul {
    margin: 0;
    padding-left: 18px;
}

.cf-settings li,
.cf-settings form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.cf-settings textarea,
.cf-settings input[type="text"],
.cf-settings input[type="email"] {
    width: min(100%, 420px);
    border: 1px solid var(--color-border, #d7e3e0);
    border-radius: 10px;
    padding: 8px 10px;
    font: inherit;
}

.cf-settings textarea {
    display: block;
    margin-top: 8px;
}

@keyframes cf-pulse {
    70% { box-shadow: 0 0 0 6px rgba(31, 138, 76, 0); }
    100% { box-shadow: 0 0 0 0 rgba(31, 138, 76, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .cf-live-dot {
        animation: none;
    }
}

.bo-theme-dark .cf-ops,
.bo-theme-dark .cf-menu-panel,
.bo-theme-dark .cf-site-picker,
.bo-theme-dark .cf-ops-settings,
.bo-theme-dark .cf-workspace .cf-chat-avail,
.bo-theme-dark .cf-more button {
    background: var(--color-surface);
    color: var(--color-text);
}

.bo-theme-dark .cf-session-badge,
.bo-theme-dark .cf-desk-item.is-active {
    background: var(--color-bg-alt);
    color: var(--color-text);
}

@media print {
    .cf-chat,
    .cf-chat-dock {
        display: none !important;
    }
}
