/* ============================================================
   SaaS WebBot AI Chatbot Dashboard — Özel CSS
   Bootstrap 5 üzerine premium koyu tema
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --cb-primary: #6366f1;
    --cb-primary-hover: #4f46e5;
    --cb-primary-light: rgba(99, 102, 241, 0.12);
    --cb-bg: #0f1117;
    --cb-bg-card: #1a1b23;
    --cb-bg-sidebar: #13141b;
    --cb-bg-input: #1e1f2a;
    --cb-border: #2a2b35;
    --cb-text: #e2e4e9;
    --cb-text-muted: #efefef;
    --cb-success: #22c55e;
    --cb-danger: #ef4444;
    --cb-warning: #f59e0b;
    --cb-info: #3b82f6;
    --cb-radius: 12px;
    --cb-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--cb-bg);
    color: var(--cb-text);
    min-height: 100vh;
}

.fs-6 {
    font-size: 0.875rem !important;
}

/* ---- Sidebar ---- */
.cb-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: var(--cb-bg-sidebar);
    border-right: 1px solid var(--cb-border);
    display: flex;
    flex-direction: column;
    z-index: 1040;
    transition: transform .3s ease;
}

.cb-sidebar-brand {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--cb-border);
}

.cb-sidebar-brand-img {
    height: 32px;
    width: auto;
    margin-right: 10px;
}

.cb-sidebar-brand-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--cb-primary), #a78bfa);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    font-weight: 700;
}

.cb-sidebar-brand-text {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.cb-sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.cb-sidebar-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--cb-text-muted);
    padding: 12px 12px 6px;
}

.cb-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--cb-text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all .2s;
    margin-bottom: 2px;
}

.cb-nav-link:hover {
    background: var(--cb-primary-light);
    color: var(--cb-primary);
}

.cb-nav-link.active {
    background: var(--cb-primary-light);
    color: var(--cb-primary);
    font-weight: 600;
}

.cb-nav-link svg,
.cb-nav-link i {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ---- Main Content ---- */
.cb-main {
    margin-left: 260px;
    min-height: 100vh;
    padding: 0;
}

.cb-topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(15, 17, 23, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--cb-border);
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cb-topbar-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.cb-topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cb-content {
    padding: 28px;
}

/* ---- Cards ---- */
.cb-card {
    background: var(--cb-bg-card);
    border: 1px solid var(--cb-border);
    border-radius: var(--cb-radius);
    padding: 24px;
    box-shadow: var(--cb-shadow);
}

.cb-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.cb-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

/* ---- Stat Cards ---- */
.cb-stat-card {
    background: var(--cb-bg-card);
    border: 1px solid var(--cb-border);
    border-radius: var(--cb-radius);
    padding: 22px 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: border-color .2s, transform .2s;
}

.cb-stat-card:hover {
    border-color: var(--cb-primary);
    transform: translateY(-2px);
}

.cb-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.cb-stat-icon.purple {
    background: rgba(99, 102, 241, 0.15);
    color: var(--cb-primary);
}

.cb-stat-icon.green {
    background: rgba(34, 197, 94, 0.15);
    color: var(--cb-success);
}

.cb-stat-icon.blue {
    background: rgba(59, 130, 246, 0.15);
    color: var(--cb-info);
}

.cb-stat-icon.orange {
    background: rgba(245, 158, 11, 0.15);
    color: var(--cb-warning);
}

.cb-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
}

.cb-stat-label {
    font-size: 13px;
    color: var(--cb-text-muted);
    margin-top: 2px;
}

/* ---- Credit Progress ---- */
.cb-credit-bar {
    background: var(--cb-bg-input);
    border-radius: 8px;
    height: 12px;
    overflow: hidden;
    margin-top: 8px;
}

.cb-credit-fill {
    height: 100%;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--cb-primary), #a78bfa);
    transition: width .6s ease;
}

.cb-credit-fill.low {
    background: linear-gradient(90deg, var(--cb-danger), #f97316);
}

/* ---- Tables ---- */

.table,
.table> :not(caption)>*>* {
    --bs-table-bg: #13141b !important;
    --bs-table-color: var(--cb-text) !important;
    --bs-table-border-color: var(--cb-border) !important;
    background-color: #13141b !important;
    color: var(--cb-text) !important;
}

.cb-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.cb-table thead th {
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #444444;
    border-bottom: 1px solid var(--cb-border);
    text-align: left;
}

.cb-table tbody td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--cb-border);
    vertical-align: middle;
}

.cb-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.04);
}

.cb-table tbody tr:last-child td {
    border-bottom: none;
}

/* ---- Badges ---- */
.cb-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.cb-badge.active {
    background: rgba(34, 197, 94, 0.15);
    color: var(--cb-success);
}

.cb-badge.passive {
    background: rgba(239, 68, 68, 0.15);
    color: var(--cb-danger);
}

.cb-badge.admin {
    background: rgba(245, 158, 11, 0.15);
    color: var(--cb-warning);
}

.cb-badge.user {
    background: rgba(59, 130, 246, 0.15);
    color: var(--cb-info);
}

/* ---- Form Controls (Bootstrap Override) ---- */
.form-control,
.form-select {
    background: var(--cb-bg-input) !important;
    border: 1px solid var(--cb-border) !important;
    color: var(--cb-text) !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    transition: border-color .2s !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--cb-primary) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}

.form-control::placeholder {
    color: var(--cb-text-muted) !important;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--cb-text);
    margin-bottom: 6px;
}

.form-text {
    color: var(--cb-text-muted) !important;
    font-size: 12px;
}

/* ---- Buttons ---- */
.btn-cb-primary {
    background: var(--cb-primary);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    transition: all .2s;
}

.btn-cb-primary:hover {
    background: var(--cb-primary-hover);
    color: #fff;
    transform: translateY(-1px);
}

.btn-cb-outline {
    background: transparent;
    border: 1px solid var(--cb-border);
    color: var(--cb-text);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    transition: all .2s;
}

.btn-cb-outline:hover {
    background: var(--cb-primary-light);
    border-color: var(--cb-primary);
    color: var(--cb-primary);
}

.btn-cb-danger {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--cb-danger);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    transition: all .2s;
}

.btn-cb-danger:hover {
    background: var(--cb-danger);
    color: #fff;
}

/* ---- Code Block ---- */
.cb-code-block {
    background: var(--cb-bg);
    border: 1px solid var(--cb-border);
    border-radius: 8px;
    padding: 14px 18px;
    font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    font-size: 13px;
    color: #f59e0b;
    position: relative;
    overflow-x: auto;
    user-select: all;
    word-break: break-all;
}

.cb-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--cb-bg-card);
    border: 1px solid var(--cb-border);
    color: var(--cb-text-muted);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    transition: all .2s;
}

.cb-copy-btn:hover {
    color: var(--cb-primary);
    border-color: var(--cb-primary);
}

/* ---- Chat Conversation View ---- */
.cb-conv-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cb-conv-item {
    padding: 14px 18px;
    border-bottom: 1px solid var(--cb-border);
    cursor: pointer;
    transition: background .2s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cb-conv-item:hover {
    background: rgba(99, 102, 241, 0.04);
}

.cb-conv-item.active {
    background: var(--cb-primary-light);
    border-left: 3px solid var(--cb-primary);
}

.cb-conv-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cb-primary), #a78bfa);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.cb-conv-info {
    flex: 1;
    min-width: 0;
}

.cb-conv-name {
    font-weight: 600;
    font-size: 14px;
    color: #fff;
}

.cb-conv-name span {
    color: #fff;
}

.cb-conv-preview {
    font-size: 12px;
    color: var(--cb-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cb-conv-time {
    font-size: 11px;
    color: var(--cb-text-muted);
    flex-shrink: 0;
}

/* ---- Chat Message Bubbles (Dashboard) ---- */
.cb-chat-bubble {
    max-width: 75%;
    margin-bottom: 12px;
    display: flex;
}

.cb-chat-bubble.user {
    margin-left: auto;
    justify-content: flex-end;
}

.cb-chat-bubble-content {
    padding: 10px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.cb-chat-bubble.bot .cb-chat-bubble-content {
    background: var(--cb-bg-input);
    color: var(--cb-text);
    border-top-left-radius: 4px;
}

.cb-chat-bubble.user .cb-chat-bubble-content {
    background: var(--cb-primary);
    color: #fff;
    border-top-right-radius: 4px;
}

.cb-chat-time {
    font-size: 11px;
    color: var(--cb-text-muted);
    margin-top: 4px;
}

/* ---- Toast / Alert ---- */
.cb-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    animation: cbToastIn .3s ease;
    max-width: 380px;
}

.cb-toast.success {
    background: var(--cb-success);
}

.cb-toast.error {
    background: var(--cb-danger);
}

.cb-toast.info {
    background: var(--cb-info);
}

@keyframes cbToastIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

/* ---- Login Page ---- */
.cb-login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cb-bg);
    padding: 20px;
}

.cb-login-card {
    width: 100%;
    max-width: 420px;
    background: var(--cb-bg-card);
    border: 1px solid var(--cb-border);
    border-radius: 16px;
    padding: 40px 36px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.cb-login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.cb-login-logo-img {
    height: 64px;
    width: auto;
}

.cb-login-title {
    text-align: center;
    margin-bottom: 8px;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
}

.cb-login-subtitle {
    text-align: center;
    margin-bottom: 28px;
    font-size: 14px;
    color: var(--cb-text-muted);
}

/* ---- Mobile Sidebar Toggle ---- */
.cb-sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--cb-text);
    font-size: 22px;
    cursor: pointer;
    padding: 4px;
}

.cb-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1035;
}

@media (max-width: 768px) {
    .cb-sidebar {
        transform: translateX(-100%);
    }

    .cb-sidebar.show {
        transform: translateX(0);
    }

    .cb-sidebar-overlay.show {
        display: block;
    }

    .cb-main {
        margin-left: 0;
    }

    .cb-sidebar-toggle {
        display: block;
    }

    .cb-content {
        padding: 16px;
    }
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--cb-border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--cb-text-muted);
}

/* ============================================================
   Refactored Utility & Component Classes
   ============================================================ */
.cb-alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

.cb-alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.cb-alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.cb-empty-state {
    text-align: center;
    padding: 40px;
    color: var(--cb-text-muted);
}

.cb-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.cb-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--cb-border);
}

.cb-bot-item {
    border: 1px solid var(--cb-border);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
}

.cb-lead-fields-container {
    margin-left: 24px;
    border-left: 2px solid var(--cb-border);
    padding-left: 15px;
}

.cb-select-custom {
    background-color: var(--cb-bg-input);
    border-color: var(--cb-border);
    color: var(--cb-text);
    height: 42px;
}

.cb-text-muted-xs {
    font-size: 11px;
    color: var(--cb-text-muted);
}

.cb-table-responsive {
    overflow-x: auto;
    margin-top: 10px;
}

.cb-ai-badge {
    font-size: 12px;
    background-color: rgba(167, 139, 250, 0.1) !important;
    color: #c084fc !important;
    border: 1px solid rgba(167, 139, 250, 0.2);
    white-space: normal;
    display: inline-block;
    text-align: left;
    line-height: 1.4;
}

.cb-lead-address {
    max-width: 200px;
}

.cb-lead-summary {
    max-width: 250px;
}

/* Pagination Overrides */
.pagination {
    --bs-pagination-bg: transparent;
    --bs-pagination-border-color: var(--cb-border);
    --bs-pagination-color: var(--cb-text-muted);
    --bs-pagination-hover-color: #fff;
    --bs-pagination-hover-bg: var(--cb-primary);
    --bs-pagination-hover-border-color: var(--cb-primary);
    --bs-pagination-active-bg: var(--cb-primary);
    --bs-pagination-active-border-color: var(--cb-primary);
    --bs-pagination-active-color: #fff;
}

.cb-token-block {
    font-size: 10px;
    padding: 4px 8px;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cb-copy-btn-sm {
    top: 2px !important;
    right: 2px !important;
    padding: 2px 6px !important;
    font-size: 10px !important;
}

.cb-user-select-box {
    max-height: 160px;
    overflow-y: auto;
    border: 1px solid var(--cb-border);
    border-radius: 8px;
    padding: 10px;
    background: var(--cb-bg-input);
}

.cb-sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--cb-border);
}

.cb-avatar-abbr {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cb-primary), #a78bfa);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
}

.cb-sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cb-sidebar-user-role {
    font-size: 11px;
    color: var(--cb-text-muted);
}

.cb-logout-btn {
    color: var(--cb-text-muted);
    font-size: 18px;
    transition: color 0.2s;
}

.cb-logout-btn:hover {
    color: var(--cb-danger);
}

.cb-lang-btn {
    border: 1px solid var(--cb-border);
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    color: var(--cb-text-muted);
    transition: all 0.2s;
}

.cb-lang-btn:hover,
.cb-lang-btn.active {
    border-color: var(--cb-primary);
    color: var(--cb-primary);
    background: var(--cb-primary-light);
}

.cb-credits-display {
    font-size: 13px;
    color: var(--cb-text-muted);
}

.cb-credits-display strong {
    color: #fff;
}

.cb-credits-display i {
    color: var(--cb-warning);
}

.cb-min-w-150 {
    min-width: 150px;
}

.cb-min-w-140 {
    min-width: 140px;
}

.cb-w-160 {
    width: 160px;
}

.cb-conversations-sidebar {
    padding: 0;
    max-height: calc(100vh - 260px);
    overflow-y: auto;
}

.cb-bot-badge {
    font-size: 10px;
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    display: inline-block;
}

.cb-conversations-detail-card {
    min-height: 400px;
    max-height: calc(100vh - 260px);
    display: flex;
    flex-direction: column;
}

.cb-chat-header {
    border-bottom: 1px solid var(--cb-border);
    padding-bottom: 16px;
    margin-bottom: 16px;
}

.cb-chat-avatar {
    width: 48px;
    height: 48px;
    font-size: 18px;
}

.cb-chat-messages-container {
    flex: 1;
    overflow-y: auto;
    padding-right: 8px;
}

.cb-chat-lead-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #22c55e;
    font-size: 12px;
    font-weight: normal;
}

.cb-chat-lead-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    font-size: 12px;
    font-weight: normal;
}

.cb-chat-empty-detail {
    text-align: center;
    padding: 60px 20px;
    color: var(--cb-text-muted);
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cb-credit-bar-lg {
    height: 16px;
}

.cb-alert-inline-danger {
    margin-top: 20px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
}

.cb-chart-container {
    height: 280px;
}

.cb-w-40 {
    width: 40%;
}

.cb-usage-progress-bg {
    background: var(--cb-bg-input);
    border-radius: 4px;
    height: 8px;
    width: 100%;
}

.cb-usage-progress-fill {
    background: linear-gradient(90deg, var(--cb-primary), #a78bfa);
    border-radius: 4px;
    height: 100%;
}

.cb-nav-tabs {
    border-bottom: 1px solid var(--cb-border);
}

.cb-nav-tabs .nav-link {
    color: var(--cb-text-muted);
    background: transparent;
    border: none;
    padding: 8px 16px;
    font-size: 13px;
    transition: all 0.2s;
}

.cb-nav-tabs .nav-link:hover {
    color: var(--cb-text);
}

.cb-nav-tabs .nav-link.active {
    color: var(--cb-text) !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid var(--cb-primary) !important;
    font-weight: 600;
}

.cb-w-200 {
    width: 200px;
}

.cb-visual-editor-container {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--cb-border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    max-height: 550px;
    overflow-y: auto;
}

.cb-btn-xs {
    padding: 2px 8px !important;
    font-size: 11px !important;
}

.cb-badge-xs {
    font-size: 11px !important;
    padding: 4px 8px !important;
}

.cb-json-textarea {
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #f59e0b;
    background-color: #13141b !important;
    border-color: var(--cb-border) !important;
}

.cb-bot-item.active {
    border-color: var(--cb-primary) !important;
}

.cb-code-url {
    word-break: break-all;
    color: #a78bfa;
}

.cb-ds-footer {
    font-size: 11px;
    color: var(--cb-text-muted);
    display: flex;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 8px;
}

.cb-tree-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.cb-btn-link-xs {
    font-size: 11px !important;
    text-decoration: none !important;
}

.cb-btn-sm-text {
    font-size: 12px !important;
}

.cb-tree-item-wrapper {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--cb-border);
    border-radius: 8px;
}

.cb-tree-del-btn {
    top: 8px;
    right: 8px;
    text-decoration: none !important;
}

.cb-alert-dashed {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--cb-border);
    font-size: 13px;
    color: var(--cb-text-muted);
}

.cb-code-block-sm {
    font-size: 11px !important;
    padding: 8px 12px !important;
}

.cb-code-badge {
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 12px;
    color: #f59e0b;
    font-family: var(--bs-font-monospace);
}

.cb-badge-meta {
    margin-left: auto;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid transparent;
}

.cb-user-avatar-lg {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cb-primary), #a78bfa);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 0;
}

.cb-badge-meta-lg {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid transparent;
}

.cb-credit-bar-sm {
    height: 4px;
    margin-top: 4px;
    width: 120px;
}

.cb-login-lang-container {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 6px;
    z-index: 100;
}

.cb-login-logo-icon {
    width: 48px;
    height: 48px;
    font-size: 24px;
}

.cb-provider-footer {
    border-top: 1px solid var(--cb-border);
    padding-top: 16px;
    font-size: 13px;
}

.cb-chart-container-sm {
    height: 260px;
}

.cb-clickable-row {
    cursor: pointer;
}

.cb-alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.cb-empty-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 10px;
    opacity: 0.3;
}

.cb-w-100 {
    width: 100px;
}

/* ============================================================
   Carousel, Media Single & Lightbox Styles (for Dashboard Chats)
   ============================================================ */
.cb-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: auto;
}

.cb-lightbox.open {
    display: flex;
    opacity: 1;
}

.cb-lightbox-content {
    max-width: 92%;
    max-height: 85%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cb-lightbox img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 0.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.cb-lightbox video {
    max-width: 100%;
    max-height: 100%;
    border-radius: 0.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.cb-lightbox-close {
    position: absolute;
    top: -2.5rem;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cb-carousel-container {
    position: relative;
    width: 100%;
    margin: 0.5rem 0;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    background: #000;
}

.cb-carousel-track {
    display: flex;
    transition: transform 0.3s ease;
    width: 100%;
    height: 12.5rem;
}

.cb-carousel-item {
    min-width: 100%;
    width: 100%;
    height: 12.5rem;
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
}

.cb-carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.cb-carousel-item img:hover {
    transform: scale(1.03);
}

.cb-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 1.875rem;
    height: 1.875rem;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background 0.2s;
}

.cb-carousel-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.cb-carousel-prev {
    left: 0.625rem;
}

.cb-carousel-next {
    right: 0.625rem;
}

.cb-carousel-nav svg {
    width: 1rem;
    height: 1rem;
    fill: #fff;
}

.cb-media-single {
    width: 100%;
    margin: 0.5rem 0;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    background: #1e1f2a;
    position: relative;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cb-media-single img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.cb-media-single img:hover {
    transform: scale(1.02);
}

.cb-media-single-video {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 0.5rem;
    overflow: hidden;
    margin: 0.5rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.cb-media-single-video iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.cb-media-single-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
    display: block;
}

.cb-video-play-btn {
    position: absolute;
    width: 3.125rem;
    height: 3.125rem;
    background: rgba(0, 0, 0, 0.70);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
    border: 2px solid #fff;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

.cb-video-play-btn svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: #fff;
    margin-left: 0.1875rem;
}