/* ==========================================================================
   Cameroon Broker design system — shared components
   Used by the public site (app/views/head.view.phtml) and the investor
   dashboard (app/views/account/head.view.phtml). Tailwind utilities come
   from the CDN with the config in assets/js/cb-tailwind.js; this file holds
   the reusable component classes (all prefixed `cb-`).
   ========================================================================== */

/* --------------------------------------------------------------------------
   Self-hosted fonts (assets/fonts). Google Fonts stalls for 10s+ on some
   African mobile networks, which blocked rendering — never link it again.
   Icon font is a subset: rebuild with tools/fonts/build_icons.py after
   adding a new Material Symbol name to a template.
   -------------------------------------------------------------------------- */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/inter-700.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/plus-jakarta-sans-500.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/plus-jakarta-sans-600.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/plus-jakarta-sans-700.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 800; font-display: swap; src: url('../fonts/plus-jakarta-sans-800.woff2') format('woff2'); }
@font-face { font-family: 'Material Symbols Outlined'; font-style: normal; font-weight: 400; font-display: block; src: url('../fonts/material-symbols-outlined.woff2') format('woff2'); }

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

:root {
    --cb-primary: #004c27;
    --cb-primary-hover: #003d1f;
    --cb-primary-soft: #a2f5b9;
    --cb-primary-tint: #e6f7ec;
    --cb-gold: #ffba2b;
    --cb-gold-hover: #f5ab0b;
    --cb-gold-soft: #ffdeaa;
    --cb-gold-tint: #fff6e5;
    --cb-gold-ink: #5c3d00;
    --cb-ink: #141b2b;
    --cb-ink-2: #3f4941;
    --cb-ink-3: #6f7a70;
    --cb-canvas: #f9f9ff;
    --cb-surface: #f1f3ff;
    --cb-surface-2: #e9edff;
    --cb-surface-soft: #e1e8fd;
    --cb-white: #ffffff;
    --cb-line: #dce2f7;
    --cb-line-strong: #c5ccdf;
    --cb-danger: #ba1a1a;
    --cb-danger-soft: #ffdad6;
    --cb-radius-sm: 0.5rem;
    --cb-radius: 0.75rem;
    --cb-radius-lg: 1rem;
    --cb-shadow-card: 0 1px 3px 0 rgba(20, 27, 43, 0.04), 0 1px 2px -1px rgba(20, 27, 43, 0.04);
    --cb-shadow-float: 0 12px 24px -4px rgba(20, 27, 43, 0.10), 0 4px 8px -2px rgba(20, 27, 43, 0.04);
    --cb-font-display: 'Plus Jakarta Sans', 'Inter', sans-serif;
    --cb-font-body: 'Inter', system-ui, sans-serif;
    --cb-sidebar-w: 264px;
    --cb-ease: cubic-bezier(0.2, 0, 0, 1);
}

html { scroll-behavior: smooth; }

body.cb-body {
    background: var(--cb-canvas);
    color: var(--cb-ink);
    font-family: var(--cb-font-body);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection { background: var(--cb-primary-soft); color: var(--cb-primary); }

.cb-display { font-family: var(--cb-font-display); letter-spacing: -0.02em; }
.cb-num { font-variant-numeric: tabular-nums lining-nums; }
.cb-balance { text-wrap: balance; }

/* Material Symbols helper */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    line-height: 1;
    vertical-align: middle;
    user-select: none;
}
.material-symbols-outlined.cb-fill { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }

/* Eyebrow label ("EXECUTION ADVANTAGES") */
.cb-eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--cb-primary);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.cb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.625rem 1.25rem;
    border-radius: var(--cb-radius-sm);
    border: 1px solid transparent;
    font-family: var(--cb-font-display);
    font-weight: 600;
    font-size: 15px;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 200ms var(--cb-ease), color 200ms var(--cb-ease), border-color 200ms var(--cb-ease), box-shadow 200ms var(--cb-ease), transform 120ms var(--cb-ease);
}
.cb-btn:active { transform: translateY(1px) scale(0.99); }
.cb-btn:focus-visible { outline: 2px solid var(--cb-primary); outline-offset: 2px; }
.cb-btn[disabled], .cb-btn.is-disabled { opacity: 0.5; pointer-events: none; }
.cb-btn .material-symbols-outlined { font-size: 20px; }

.cb-btn-lg { min-height: 52px; padding: 0.75rem 1.5rem; font-size: 17px; }
.cb-btn-sm { min-height: 36px; padding: 0.375rem 0.875rem; font-size: 13px; }
.cb-btn-block { width: 100%; }

.cb-btn-primary { background: var(--cb-primary); color: #fff; box-shadow: 0 6px 16px -8px rgba(0, 76, 39, 0.6); }
.cb-btn-primary:hover { background: var(--cb-primary-hover); color: #fff; }

.cb-btn-gold { background: var(--cb-gold); color: var(--cb-gold-ink); box-shadow: 0 10px 24px -10px rgba(255, 186, 43, 0.8); }
.cb-btn-gold:hover { background: var(--cb-gold-hover); color: var(--cb-gold-ink); }

.cb-btn-soft { background: var(--cb-surface-soft); color: var(--cb-ink); }
.cb-btn-soft:hover { background: #d3dcfa; }

.cb-btn-outline { background: var(--cb-white); color: var(--cb-primary); border-color: var(--cb-line-strong); }
.cb-btn-outline:hover { border-color: var(--cb-primary); background: var(--cb-primary-tint); }

.cb-btn-ghost { background: transparent; color: var(--cb-ink-2); }
.cb-btn-ghost:hover { background: var(--cb-surface); color: var(--cb-ink); }

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

.cb-link {
    display: inline-flex; align-items: center; gap: 0.25rem;
    font-weight: 600; font-size: 13px; color: var(--cb-primary); text-decoration: none;
}
.cb-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.cb-link .material-symbols-outlined { font-size: 16px; transition: transform 200ms var(--cb-ease); }
.cb-link:hover .material-symbols-outlined { transform: translateX(2px); }

/* --------------------------------------------------------------------------
   Cards & surfaces
   -------------------------------------------------------------------------- */
.cb-card {
    background: var(--cb-white);
    border: 1px solid var(--cb-line);
    border-radius: var(--cb-radius-lg);
    box-shadow: var(--cb-shadow-card);
}
.cb-card-pad { padding: 1.5rem; }
.cb-card-soft { background: var(--cb-surface); border-radius: var(--cb-radius-lg); }
.cb-card-head {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1.125rem 1.5rem; border-bottom: 1px solid var(--cb-line);
}
.cb-card-title { font-family: var(--cb-font-display); font-weight: 700; font-size: 17px; color: var(--cb-ink); letter-spacing: -0.01em; }
.cb-card-sub { font-size: 13px; color: var(--cb-ink-3); }

.cb-icon-tile {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 0.75rem; flex-shrink: 0;
    background: var(--cb-primary-tint); color: var(--cb-primary);
}
.cb-icon-tile.is-primary { background: var(--cb-primary); color: #fff; }
.cb-icon-tile.is-gold { background: var(--cb-gold); color: var(--cb-gold-ink); }
.cb-icon-tile.is-soft { background: var(--cb-surface-soft); color: var(--cb-ink); }
.cb-icon-tile.is-danger { background: var(--cb-danger-soft); color: var(--cb-danger); }

/* Stat card */
.cb-stat-label { font-size: 13px; font-weight: 600; color: var(--cb-ink-3); }
.cb-stat-value {
    font-family: var(--cb-font-display); font-weight: 800; font-size: 28px; line-height: 1.15;
    letter-spacing: -0.03em; color: var(--cb-ink); font-variant-numeric: tabular-nums lining-nums;
}
.cb-stat-meta { font-size: 12px; color: var(--cb-ink-3); }

/* --------------------------------------------------------------------------
   Badges / chips
   -------------------------------------------------------------------------- */
.cb-badge {
    display: inline-flex; align-items: center; gap: 0.375rem;
    padding: 0.25rem 0.5rem; border-radius: 0.375rem;
    font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.3;
    background: var(--cb-surface); color: var(--cb-ink-2);
}
.cb-badge-dot::before { content: ''; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.cb-badge-success { background: var(--cb-primary-soft); color: var(--cb-primary); }
.cb-badge-gold { background: var(--cb-gold-soft); color: var(--cb-gold-ink); }
.cb-badge-info { background: var(--cb-surface-soft); color: #28467b; }
.cb-badge-danger { background: var(--cb-danger-soft); color: var(--cb-danger); }
.cb-badge-neutral { background: var(--cb-surface); color: var(--cb-ink-2); }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.cb-field { display: flex; flex-direction: column; gap: 0.375rem; }
.cb-label { font-size: 13px; font-weight: 600; color: var(--cb-ink); letter-spacing: 0.01em; }
.cb-hint { font-size: 12px; color: var(--cb-ink-3); }
.cb-error { font-size: 12px; color: var(--cb-danger); font-weight: 500; }

.cb-input, .cb-select, .cb-textarea {
    width: 100%;
    min-height: 46px;
    padding: 0.625rem 0.875rem;
    background: var(--cb-white);
    border: 1px solid var(--cb-line-strong);
    border-radius: var(--cb-radius-sm);
    color: var(--cb-ink);
    font-family: var(--cb-font-body);
    font-size: 15px;
    transition: border-color 160ms var(--cb-ease), box-shadow 160ms var(--cb-ease);
}
.cb-textarea { min-height: 110px; resize: vertical; }
.cb-input::placeholder, .cb-textarea::placeholder { color: #9aa39b; }
.cb-input:focus, .cb-select:focus, .cb-textarea:focus {
    outline: none; border-color: var(--cb-primary); box-shadow: 0 0 0 3px rgba(0, 76, 39, 0.12);
}
.cb-input.is-invalid, .cb-select.is-invalid, .cb-textarea.is-invalid { border-color: var(--cb-danger); }
.cb-input[readonly], .cb-input[disabled] { background: var(--cb-surface); color: var(--cb-ink-2); }
.cb-select {
    appearance: none; -webkit-appearance: none; padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%233f4941' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 0.75rem center;
}

/* Input with a pinned prefix/suffix (currency) */
.cb-input-group { position: relative; display: flex; align-items: center; }
.cb-input-group .cb-input { padding-right: 4rem; }
.cb-input-group .cb-input-affix {
    position: absolute; right: 0.875rem; font-weight: 700; font-size: 14px; color: var(--cb-ink-2); pointer-events: none;
}

.cb-check { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 14px; color: var(--cb-ink-2); cursor: pointer; }
.cb-check input { width: 18px; height: 18px; accent-color: var(--cb-primary); }

/* Toggle switch: <label class="cb-switch"><input type="checkbox"><span></span></label> */
.cb-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.cb-switch input { opacity: 0; width: 0; height: 0; }
.cb-switch span {
    position: absolute; inset: 0; border-radius: 999px; background: var(--cb-line-strong); cursor: pointer;
    transition: background-color 200ms var(--cb-ease);
}
.cb-switch span::after {
    content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 999px; background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform 200ms var(--cb-ease);
}
.cb-switch input:checked + span { background: var(--cb-primary); }
.cb-switch input:checked + span::after { transform: translateX(18px); }
.cb-switch input:focus-visible + span { outline: 2px solid var(--cb-primary); outline-offset: 2px; }

/* Selectable option card (payment method, plan, withdrawal type) */
.cb-option {
    position: relative; display: flex; align-items: center; gap: 0.875rem; padding: 1rem;
    border: 1.5px solid var(--cb-line); border-radius: var(--cb-radius); background: var(--cb-white); cursor: pointer;
    transition: border-color 160ms var(--cb-ease), background-color 160ms var(--cb-ease);
}
.cb-option:hover { border-color: var(--cb-line-strong); }
.cb-option input[type="radio"], .cb-option input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }
.cb-option:has(input:checked) { border-color: var(--cb-primary); background: var(--cb-primary-tint); }
.cb-option:has(input:focus-visible) { outline: 2px solid var(--cb-primary); outline-offset: 2px; }

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */
.cb-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cb-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cb-table thead th {
    text-align: left; padding: 0.75rem 1.25rem; white-space: nowrap;
    font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--cb-ink-3);
    background: var(--cb-surface); border-bottom: 1px solid var(--cb-line);
}
.cb-table tbody td { padding: 0.875rem 1.25rem; border-bottom: 1px solid var(--cb-line); color: var(--cb-ink-2); vertical-align: middle; }
.cb-table tbody tr:last-child td { border-bottom: 0; }
.cb-table tbody tr { transition: background-color 120ms var(--cb-ease); }
.cb-table tbody tr:hover { background: #fbfcff; }
.cb-table .cb-td-strong { color: var(--cb-ink); font-weight: 600; }
.cb-table .cb-td-num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Pagination (used by assets/js/admin/main.min.js style helpers) */
.cb-pagination { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-top: 1px solid var(--cb-line); font-size: 13px; color: var(--cb-ink-3); }
.cb-page-btn {
    display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 0.625rem;
    border-radius: 0.5rem; border: 1px solid var(--cb-line); background: #fff; color: var(--cb-ink-2); font-weight: 600; cursor: pointer;
}
.cb-page-btn:hover { border-color: var(--cb-primary); color: var(--cb-primary); }
.cb-page-btn.is-active { background: var(--cb-primary); border-color: var(--cb-primary); color: #fff; }

/* Empty state */
.cb-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.5rem; padding: 3rem 1.5rem; }
.cb-empty .cb-icon-tile { width: 56px; height: 56px; border-radius: 1rem; margin-bottom: 0.5rem; }
.cb-empty-title { font-family: var(--cb-font-display); font-weight: 700; font-size: 17px; color: var(--cb-ink); }
.cb-empty-text { font-size: 14px; color: var(--cb-ink-3); max-width: 36ch; }

/* --------------------------------------------------------------------------
   Alerts (flash messages) — class names kept compatible with old templates
   -------------------------------------------------------------------------- */
.alert {
    display: flex; align-items: flex-start; gap: 0.75rem; position: relative;
    padding: 0.875rem 2.75rem 0.875rem 1rem; margin-bottom: 1.25rem;
    border-radius: var(--cb-radius); border: 1px solid transparent; font-size: 14px; line-height: 1.5;
}
.alert svg, .alert .material-symbols-outlined { flex-shrink: 0; margin-top: 2px; }
.alert-success { background: var(--cb-primary-tint); border-color: #b9e8c8; color: #00391d; }
.alert-error { background: #fff1ef; border-color: var(--cb-danger-soft); color: #93000a; }
.alert-info { background: var(--cb-surface); border-color: var(--cb-line); color: var(--cb-ink-2); }
.alert-warning { background: var(--cb-gold-tint); border-color: var(--cb-gold-soft); color: var(--cb-gold-ink); }
.alert a { font-weight: 700; text-decoration: underline; text-underline-offset: 2px; color: inherit; }
.alert-close {
    position: absolute; top: 0.625rem; right: 0.625rem; width: 28px; height: 28px; border: 0; border-radius: 0.375rem;
    background: transparent; color: inherit; opacity: 0.6; font-size: 18px; line-height: 1; cursor: pointer;
}
.alert-close:hover { opacity: 1; background: rgba(0,0,0,.05); }

/* Modal (simple, used by dashboard pages) */
.cb-modal { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; padding: 1rem; }
.cb-modal.is-open { display: flex; }
.cb-modal-backdrop { position: absolute; inset: 0; background: rgba(20, 27, 43, 0.45); backdrop-filter: blur(2px); }
.cb-modal-panel {
    position: relative; width: 100%; max-width: 520px; max-height: calc(100dvh - 2rem); overflow-y: auto;
    background: #fff; border-radius: var(--cb-radius-lg); box-shadow: var(--cb-shadow-float);
    animation: cb-pop 200ms var(--cb-ease);
}
@keyframes cb-pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }

/* Tabs (segmented) */
.cb-tabs { display: inline-flex; gap: 0.25rem; padding: 0.25rem; background: var(--cb-surface); border-radius: 0.625rem; overflow-x: auto; max-width: 100%; }
.cb-tab {
    display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.5rem 0.875rem; border-radius: 0.5rem;
    font-size: 13px; font-weight: 600; color: var(--cb-ink-2); text-decoration: none; white-space: nowrap;
    transition: background-color 160ms var(--cb-ease), color 160ms var(--cb-ease);
}
.cb-tab:hover { color: var(--cb-ink); }
.cb-tab.is-active { background: #fff; color: var(--cb-primary); box-shadow: var(--cb-shadow-card); }

/* Progress bar */
.cb-progress { height: 8px; border-radius: 999px; background: var(--cb-surface-2); overflow: hidden; }
.cb-progress > span { display: block; height: 100%; border-radius: inherit; background: var(--cb-primary); transition: width 400ms var(--cb-ease); }
.cb-progress.is-gold > span { background: var(--cb-gold); }

/* Scroll reveal (public pages) */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 600ms var(--cb-ease), transform 600ms var(--cb-ease); }
[data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
    [data-reveal] { opacity: 1; transform: none; }
}

/* ==========================================================================
   Dashboard shell
   ========================================================================== */
.cb-shell { display: flex; min-height: 100vh; min-height: 100dvh; }

.cb-sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 60; width: var(--cb-sidebar-w);
    display: flex; flex-direction: column;
    background: #fff; border-right: 1px solid var(--cb-line);
    transition: transform 260ms var(--cb-ease);
}
.cb-sidebar-brand { display: flex; align-items: center; gap: 0.75rem; padding: 1.25rem 1.25rem 1rem; text-decoration: none; }
.cb-brand-mark {
    display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 0.625rem;
    background: var(--cb-primary); color: #fff; flex-shrink: 0;
}
.cb-brand-mark .material-symbols-outlined { font-size: 24px; }
.cb-brand-name { font-family: var(--cb-font-display); font-weight: 700; font-size: 16px; color: var(--cb-ink); letter-spacing: -0.02em; line-height: 1.2; }
.cb-brand-sub { font-size: 11px; color: var(--cb-ink-3); font-weight: 500; }

.cb-nav { flex: 1; overflow-y: auto; padding: 0.5rem 0.75rem 1rem; scrollbar-width: thin; }
.cb-nav-label { padding: 1rem 0.75rem 0.375rem; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #9aa39b; }
.cb-nav-item {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0.75rem; margin: 1px 0; border-radius: 0.625rem;
    font-size: 14px; font-weight: 500; color: var(--cb-ink-2); text-decoration: none;
    transition: background-color 160ms var(--cb-ease), color 160ms var(--cb-ease);
}
.cb-nav-item .material-symbols-outlined { font-size: 21px; color: #7d887e; transition: color 160ms var(--cb-ease); }
.cb-nav-item:hover { background: var(--cb-surface); color: var(--cb-ink); }
.cb-nav-item:hover .material-symbols-outlined { color: var(--cb-ink); }
.cb-nav-item.is-active { background: var(--cb-primary); color: #fff; font-weight: 600; }
.cb-nav-item.is-active .material-symbols-outlined { color: #fff; font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
.cb-nav-count {
    margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; background: var(--cb-gold); color: var(--cb-gold-ink);
}

.cb-sidebar-foot { padding: 0.75rem; border-top: 1px solid var(--cb-line); }
.cb-user-chip { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem; border-radius: 0.75rem; }
.cb-avatar {
    display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 0.625rem;
    background: var(--cb-primary-soft); color: var(--cb-primary); font-weight: 700; font-size: 13px; overflow: hidden; flex-shrink: 0;
}
.cb-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cb-user-name { font-size: 14px; font-weight: 600; color: var(--cb-ink); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-user-role { font-size: 12px; color: var(--cb-ink-3); }

.cb-main { flex: 1; min-width: 0; margin-left: var(--cb-sidebar-w); display: flex; flex-direction: column; }

.cb-topbar {
    position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 1rem;
    height: 68px; padding: 0 2rem;
    background: rgba(249, 249, 255, 0.86); backdrop-filter: saturate(140%) blur(10px); -webkit-backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid var(--cb-line);
}
.cb-topbar-title { font-family: var(--cb-font-display); font-weight: 700; font-size: 18px; letter-spacing: -0.015em; color: var(--cb-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-topbar-spacer { flex: 1; }
.cb-icon-btn {
    display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 0.625rem;
    border: 1px solid var(--cb-line); background: #fff; color: var(--cb-ink-2); cursor: pointer;
    transition: background-color 160ms var(--cb-ease), color 160ms var(--cb-ease);
}
.cb-icon-btn:hover { background: var(--cb-surface); color: var(--cb-ink); }
.cb-market-pill {
    display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.375rem 0.75rem; border-radius: 999px;
    font-size: 12px; font-weight: 600; background: var(--cb-primary-tint); color: var(--cb-primary);
}
.cb-market-pill::before { content: ''; width: 7px; height: 7px; border-radius: 999px; background: currentColor; animation: cb-pulse 2s infinite; }
.cb-market-pill.is-closed { background: var(--cb-surface); color: var(--cb-ink-3); }
.cb-market-pill.is-closed::before { animation: none; }
@keyframes cb-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.cb-dropdown { position: relative; }
.cb-dropdown-menu {
    position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; padding: 0.375rem;
    background: #fff; border: 1px solid var(--cb-line); border-radius: var(--cb-radius); box-shadow: var(--cb-shadow-float);
    opacity: 0; visibility: hidden; transform: translateY(-4px); transform-origin: top right;
    transition: opacity 160ms var(--cb-ease), transform 160ms var(--cb-ease), visibility 160ms;
}
.cb-dropdown.is-open .cb-dropdown-menu { opacity: 1; visibility: visible; transform: none; }
.cb-dropdown-head { padding: 0.625rem 0.75rem; border-bottom: 1px solid var(--cb-line); margin-bottom: 0.25rem; }
.cb-dropdown-item {
    display: flex; align-items: center; gap: 0.625rem; padding: 0.5rem 0.75rem; border-radius: 0.5rem;
    font-size: 14px; color: var(--cb-ink-2); text-decoration: none;
}
.cb-dropdown-item:hover { background: var(--cb-surface); color: var(--cb-ink); }
.cb-dropdown-item .material-symbols-outlined { font-size: 19px; }

.cb-content { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 2rem; }
.cb-page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; }
.cb-page-title { font-family: var(--cb-font-display); font-weight: 800; font-size: 28px; letter-spacing: -0.025em; color: var(--cb-ink); line-height: 1.2; }
.cb-page-sub { margin-top: 0.25rem; font-size: 15px; color: var(--cb-ink-3); }

.cb-banner-impersonate {
    display: flex; align-items: center; gap: 0.625rem; padding: 0.625rem 2rem; font-size: 13px;
    background: var(--cb-gold-tint); color: var(--cb-gold-ink); border-bottom: 1px solid var(--cb-gold-soft);
}
.cb-banner-impersonate a { margin-left: auto; font-weight: 700; color: var(--cb-gold-ink); }

.cb-dash-footer { padding: 1.25rem 2rem; border-top: 1px solid var(--cb-line); font-size: 12px; color: var(--cb-ink-3); display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; }

.cb-overlay { position: fixed; inset: 0; z-index: 55; background: rgba(20, 27, 43, 0.4); opacity: 0; visibility: hidden; transition: opacity 200ms var(--cb-ease), visibility 200ms; }
.cb-menu-btn { display: none; }

/* Legacy in-dashboard ads strip */
#container { position: relative; padding-top: 50px; overflow: hidden; background: var(--cb-primary); }
#inner_container { position: absolute; inset: 0; }
#imgs_container { width: 100%; height: 100%; }
#imgs_container span { color: #fff; }
.img_container { position: absolute; width: 100%; height: 100%; top: 0; transition: left 0.3s; display: flex; align-items: center; padding-left: 30px; gap: 10px; z-index: 2; }
.img_container > img { height: 100%; object-fit: scale-down; }
#overlay { position: absolute; inset: 0; }
.overlay_button { position: absolute; top: 25%; right: 2.5%; z-index: 3; display: flex; align-items: center; justify-content: center; padding: 0 10px; height: 26px; border-radius: 999px; border: 0; background: rgba(255,255,255,.9); color: var(--cb-ink); font-size: 12px; font-weight: 600; cursor: pointer; }
.overlay_button svg { display: none; }

@media (max-width: 1024px) {
    .cb-sidebar { transform: translateX(-100%); box-shadow: var(--cb-shadow-float); }
    body.cb-nav-open .cb-sidebar { transform: none; }
    body.cb-nav-open .cb-overlay { opacity: 1; visibility: visible; }
    body.cb-nav-open { overflow: hidden; }
    .cb-main { margin-left: 0; }
    .cb-menu-btn { display: inline-flex; }
    .cb-topbar { padding: 0 1rem; height: 60px; }
    .cb-content { padding: 1.25rem 1rem 2rem; }
    .cb-banner-impersonate { padding: 0.625rem 1rem; }
    .cb-dash-footer { padding: 1rem; }
    .cb-page-title { font-size: 24px; }
}
@media (max-width: 640px) {
    .cb-market-pill { display: none; }
    .cb-card-pad { padding: 1.125rem; }
    .cb-card-head { padding: 1rem 1.125rem; }
    .cb-table thead th, .cb-table tbody td { padding-left: 1rem; padding-right: 1rem; }
    .cb-stat-value { font-size: 24px; }
}

/* Buttons generated by updateTable() in assets/js/admin/main.min.js */
#paginationButtons { display: flex; flex-wrap: wrap; gap: 0.375rem; }
#paginationButtons button {
    display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 0.625rem; margin: 0;
    border-radius: 0.5rem; border: 1px solid var(--cb-line); background: #fff; color: var(--cb-ink-2); font-weight: 600; font-size: 13px; cursor: pointer;
}
#paginationButtons button:hover { border-color: var(--cb-primary); color: var(--cb-primary); }
#paginationButtons button.text-indigo-500 { background: var(--cb-primary); border-color: var(--cb-primary); color: #fff; }
.hidden { display: none; }

/* Google Translate: keep the engine (EN/FR toggles drive it via the googtrans cookie), hide its UI */
#google_translate_element { position: absolute !important; left: -9999px !important; top: 0; width: 1px; height: 1px; overflow: hidden; }
.goog-te-banner-frame, .skiptranslate > iframe, iframe.skiptranslate, #goog-gt-tt, .goog-te-balloon-frame { display: none !important; visibility: hidden !important; }
body.cb-body { top: 0 !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }

/* Brand logo (assets/images/brand/cameroon-broker-mark.webp — bull emblem, transparent) */
.cb-logo-mark { display: block; height: 40px; width: auto; flex-shrink: 0; }
.cb-logo-mark.is-sm { height: 34px; }
/* White tile so the green emblem stays legible on green panels */
.cb-logo-tile { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 6px 8px; border-radius: 0.75rem; background: #fff; }
