/* ── ChatBot Admin — Custom Styles ───────────────────────── */

/* Layout */
body {
    background-color: #f5f6fa;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.2) transparent;
    z-index: 100;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 2px; }

.main-content {
    margin-left: 240px;
    min-height: calc(100vh - 56px);
}

@media (max-width: 991.98px) {
    .main-content { margin-left: 0; }
}

/* Sidebar nav links */
.sidebar .nav-link {
    border-radius: 6px;
    padding: .35rem .7rem;
    transition: background .15s;
    font-size: .875rem;
    line-height: 1.4;
}

.sidebar .nav-link:hover {
    background: rgba(255,255,255,.12);
}

.sidebar .nav-link.active {
    background: rgba(255,255,255,.2);
    font-weight: 600;
}

/* Section labels compacts */
.sidebar .nav-section-label {
    font-size: .68rem;
    letter-spacing: .06rem;
    margin-top: .6rem;
    margin-bottom: .1rem;
    padding: 0 .75rem;
    color: rgba(255,255,255,.4);
    text-transform: uppercase;
}

/* Navbar : highlight état actif */
.navbar .btn-light {
    color: #212529;
    background: rgba(255,255,255,.9);
    border-color: transparent;
}

/* Cards */
.card {
    border-radius: 10px;
}

/* Chat bubbles */
.chat-bubble { margin-bottom: .25rem; }
.bubble-inbound .bubble-content { border-radius: 0 12px 12px 12px; }
.bubble-outbound .bubble-content { border-radius: 12px 0 12px 12px; }

/* Tables */
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04rem; color: #6c757d; }

/* Badges */
.badge { font-weight: 500; }

/* Monospace font for logs */
.font-monospace { font-family: 'Consolas', 'Fira Code', monospace !important; }

/* Form sliders */
input[type="range"] { cursor: pointer; }

/* Alert margin tweak */
.alert { border-radius: 8px; }

/* Responsive table */
.table-responsive { overflow-x: auto; }

/* Page header */
h4.fw-bold { font-size: 1.15rem; }

/* RTL text areas */
textarea[dir="rtl"], input[dir="rtl"] {
    text-align: right;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Spinner overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Btn xs */
.btn-xs {
    padding: .1rem .3rem;
    font-size: .75rem;
    line-height: 1.2;
}

/* Popover content pre-wrap */
.popover-body { white-space: pre-wrap; word-break: break-all; max-width: 350px; font-size:.78rem; }
