:root {
    --bo-ui-bg: #ffffff;
    --bo-ui-bg-muted: #f5f6f8;
    --bo-ui-bg-hover: #f7f9fc;
    --bo-ui-bg-header: #eef1f5;
    --bo-ui-bg-subtle: #fafbfc;
    --bo-ui-border: #d9dee7;
    --bo-ui-border-strong: #c5ccd8;
    --bo-ui-border-cell: #e5e8ee;
    --bo-ui-text: #172033;
    --bo-ui-text-muted: #657086;
    --bo-ui-text-control: #4d586d;
    --bo-ui-text-header: #364154;
    --bo-ui-primary: #0b57d0;
    --bo-ui-primary-soft: #eef5ff;
    --bo-ui-danger: #b42318;
    --bo-ui-danger-soft: #fff7f6;
    --bo-ui-warning: #946200;
    --bo-ui-warning-soft: #fffaf0;
    --bo-ui-transfer-bg: #ffedd5;
    --bo-ui-transfer-accent: #9a3412;
    --bo-ui-success: #18794e;
    --bo-ui-success-soft: #f2fbf6;
    --bo-ui-radius: 3px;
    --bo-ui-control-height: 32px;
    --bo-note-default: #ffffff;
    --bo-note-yellow: #fff8d6;
    --bo-note-blue: #eaf3ff;
    --bo-note-green: #eaf7ef;
    --bo-note-rose: #fff0f1;
    --bo-note-purple: #f5efff;
}

/* Full-page connection state shared by backoffice and finance. */
body.bo-shell.bo-is-offline { overflow: hidden !important; }
body.bo-shell.bo-is-offline > :not(.bo-offline-screen),
body.bo-shell.bo-is-offline > :not(.bo-offline-screen) * { visibility: hidden !important; }
body.bo-shell .bo-offline-screen {
    position: fixed;
    inset: 0;
    z-index: 11000;
    display: grid;
    place-items: center;
    overflow: auto;
    padding: 24px;
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text);
    text-align: center;
    outline: none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body.bo-shell .bo-offline-screen[hidden] { display: none; }
body.bo-shell .bo-offline-content { max-width: 460px; }
body.bo-shell .bo-offline-icon { display: block; margin-bottom: 18px; font-size: 40px; color: var(--bo-ui-text-muted); }
body.bo-shell .bo-offline-content h1 { margin: 0 0 12px; font-size: 26px; font-weight: 650; line-height: 1.25; }
body.bo-shell .bo-offline-content p { margin: 0 0 8px; font-size: 14px; }
body.bo-shell .bo-offline-content .bo-offline-hint { color: var(--bo-ui-text-muted); font-size: 13px; }
body.bo-shell .bo-offline-retry {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 4px;
    margin-top: 18px;
    color: var(--bo-ui-primary);
    font-size: 13px;
    font-weight: 600;
}
body.bo-shell .bo-offline-dots { display: inline-flex; width: 18px; }
body.bo-shell .bo-offline-dots > span {
    width: 6px;
    animation: bo-offline-dot 1.2s ease-in-out infinite;
}
body.bo-shell .bo-offline-dots > span:nth-child(2) { animation-delay: .2s; }
body.bo-shell .bo-offline-dots > span:nth-child(3) { animation-delay: .4s; }
@keyframes bo-offline-dot {
    0%, 80%, 100% { opacity: .25; }
    40% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    body.bo-shell .bo-offline-dots > span { animation: none; opacity: 1; }
}

/* Shared title tooltips inherit the active panel appearance tokens. */
body.bo-shell .bo-tooltip {
    position: fixed;
    z-index: 10900;
    max-width: min(320px, calc(100vw - 16px));
    max-height: calc(100vh - 16px);
    overflow: hidden;
    padding: 6px 10px;
    border: 1px solid var(--bo-ui-border-strong);
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    white-space: pre-line;
    overflow-wrap: anywhere;
    box-shadow: none;
    pointer-events: none;
}

body.bo-shell .bo-tooltip[hidden] { display: none; }

/* Shared backoffice authentication shell */
body.bo-auth-shell {
    min-height: 100vh;
    margin: 0;
    background-color: var(--bo-ui-bg-muted);
    background-image: url('../images/backoffice-auth-geometry-36a2b246.png');
    background-position: center;
    background-repeat: repeat;
    background-size: 384px 410px;
    color: var(--bo-ui-text);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
}

body.bo-auth-shell.has-custom-auth-background {
    background-image: var(--bo-auth-background-image);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
}

.bo-auth-stage {
    display: grid;
    min-height: 100vh;
    padding: 18px;
    place-items: center;
}

.bo-auth-frame {
    display: grid;
    width: min(720px, 100%);
    min-height: 360px;
    overflow: hidden;
    border: 1px solid var(--bo-ui-border-strong);
    background: var(--bo-ui-bg);
    grid-template-columns: 230px minmax(0, 1fr);
}

.bo-auth-frame.is-wide { width: min(960px, 100%); }

.bo-auth-brand-panel {
    display: grid;
    padding: 24px;
    border-right: 1px solid #30435d;
    background: #101c2e;
    color: #fff;
    align-content: center;
    justify-items: start;
}

.bo-auth-brand-mark {
    display: inline-flex;
    width: 38px;
    height: 38px;
    margin-bottom: 14px;
    border: 1px solid #47617f;
    color: #9fc3f5;
    font-size: 20px;
    align-items: center;
    justify-content: center;
}

.bo-auth-brand-panel strong { max-width: 100%; overflow: hidden; font-size: 18px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.bo-auth-brand-panel > span:last-child { margin-top: 2px; color: #aebdd0; font-size: 12px; font-weight: 600; }
.bo-auth-content { min-width: 0; padding: 24px; align-self: center; }
.bo-auth-content-header { margin-bottom: 18px; padding-bottom: 10px; border-bottom: 1px solid var(--bo-ui-border); }
.bo-auth-content-header h1 { margin: 0; color: var(--bo-ui-text); font-size: 24px; font-weight: 650; line-height: 1.25; }
.bo-auth-form { display: grid; gap: 12px; }
.bo-auth-shell .form-label { margin-bottom: 3px; color: var(--bo-ui-text-control); font-size: 12px; font-weight: 600; line-height: 1.2; }
.bo-auth-shell .form-control {
    width: 100%;
    height: var(--bo-ui-control-height);
    min-height: var(--bo-ui-control-height);
    padding: 4px 8px;
    border: 1px solid var(--bo-ui-border-strong);
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text);
    font-size: 14px;
    box-shadow: none;
}
.bo-auth-shell .form-control:focus { border-color: var(--bo-ui-primary); box-shadow: 0 0 0 1px var(--bo-ui-primary); }
.bo-auth-shell .form-control.is-invalid { border-color: var(--bo-ui-danger); background-image: none; }
.bo-auth-shell .form-control::placeholder { color: #8a94a5; }
.bo-auth-check { display: inline-flex; width: fit-content; min-height: 24px; margin: 0; align-items: center; gap: 7px; color: var(--bo-ui-text-control); font-size: 13px; cursor: pointer; }
.bo-auth-check .form-check-input { width: 16px; height: 16px; margin: 0; border-color: var(--bo-ui-border-strong); border-radius: 2px; box-shadow: none; }
.bo-auth-check .form-check-input:checked { border-color: var(--bo-ui-primary); background-color: var(--bo-ui-primary); }
.bo-auth-submit { width: 100%; }
.bo-auth-alert { display: flex; min-height: 34px; margin-bottom: 12px; padding: 7px 9px; border: 1px solid var(--bo-ui-danger); border-radius: var(--bo-ui-radius); background: var(--bo-ui-danger-soft); color: var(--bo-ui-danger); font-size: 12px; align-items: flex-start; gap: 7px; }
.bo-auth-alert i { margin-top: 1px; flex: 0 0 auto; }
.bo-auth-enroll-grid { display: grid; grid-template-columns: 224px minmax(0, 1fr); gap: 14px; }
.bo-auth-enroll-qr { min-width: 0; }
.bo-auth-section-heading { margin-bottom: 6px; color: var(--bo-ui-text-control); font-size: 12px; font-weight: 600; }
.bo-auth-qr-surface { display: flex; width: 222px; height: 222px; padding: 10px; border: 1px solid var(--bo-ui-border-strong); background: #fff; align-items: center; justify-content: center; }
.bo-auth-qr-surface img { display: block; width: 200px; height: 200px; }
.bo-auth-enroll-details { display: grid; min-width: 0; align-content: start; gap: 12px; }
.bo-auth-technical-list { min-width: 0; margin: 0; border: 1px solid var(--bo-ui-border); }
.bo-auth-technical-list > div { display: grid; min-width: 0; padding: 7px 9px; border-bottom: 1px solid var(--bo-ui-border); gap: 3px; }
.bo-auth-technical-list > div:last-child { border-bottom: 0; }
.bo-auth-technical-list dt { color: var(--bo-ui-text-muted); font-size: 11px; font-weight: 600; }
.bo-auth-technical-list dd { max-height: 58px; margin: 0; overflow: auto; color: var(--bo-ui-text); font-family: Consolas, 'Courier New', monospace; font-size: 11px; font-weight: 500; overflow-wrap: anywhere; }

@media (max-width: 767.98px) {
    .bo-auth-stage { padding: 10px; }
    .bo-auth-frame,
    .bo-auth-frame.is-wide { width: min(540px, 100%); min-height: 0; grid-template-columns: 1fr; }
    .bo-auth-brand-panel { min-height: 88px; padding: 12px 14px; border-right: 0; border-bottom: 1px solid #30435d; align-content: center; grid-template-columns: 38px minmax(0, 1fr); column-gap: 10px; }
    .bo-auth-brand-mark { margin: 0; grid-row: 1 / span 2; }
    .bo-auth-brand-panel strong { align-self: end; font-size: 16px; }
    .bo-auth-brand-panel > span:last-child { align-self: start; }
    .bo-auth-content { width: 100%; padding: 18px; }
    .bo-auth-enroll-grid { grid-template-columns: 1fr; }
    .bo-auth-enroll-qr { display: grid; justify-content: center; }
    .bo-auth-section-heading { width: 222px; }
}

@media (max-width: 575.98px) {
    .bo-auth-content { padding: 14px; }
    .bo-auth-content-header { margin-bottom: 14px; }
    .bo-auth-content-header h1 { font-size: 22px; }
}

/* Settings workspace */
.bo-settings-workspace .bo-tabs { margin-bottom: 10px; }
.bo-settings-subtabs { gap: 18px; margin-top: 2px; }
.bo-settings-save-state { display:inline-flex; align-items:center; gap:6px; color:var(--bo-ui-warning); font-size:12px; font-weight:600; }
.bo-status-dot { display:inline-block; width:6px; height:6px; background:#8b95a5; }
.bo-status-dot.is-success { background:var(--bo-ui-success); }
.bo-status-dot.is-warning { background:var(--bo-ui-warning); }
.bo-status-dot.is-danger { background:var(--bo-ui-danger); }
.bo-settings-panel { position:relative; margin-bottom:10px; border:1px solid var(--bo-ui-border); background:var(--bo-ui-bg); }
.bo-settings-panel-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:40px; padding:6px 10px; border-bottom:1px solid var(--bo-ui-border); }
.bo-settings-panel-heading h2 { margin:0; font-size:14px; font-weight:700; }
.bo-settings-panel-body { padding:10px; }
.bo-settings-panel-actions { display:flex; justify-content:flex-end; gap:6px; padding:8px 10px; border-top:1px solid var(--bo-ui-border); }
.bo-settings-section { margin:10px; border:1px solid var(--bo-ui-border); background:var(--bo-ui-bg); }
.bo-settings-section-heading { display:flex; min-height:38px; padding:6px 10px; align-items:center; justify-content:space-between; gap:10px; border-bottom:1px solid var(--bo-ui-border); background:var(--bo-ui-bg-muted); }
.bo-settings-section-heading h3 { margin:0; font-size:13px; font-weight:700; }
.bo-settings-section-body { padding:10px; }
.bo-web-panel-tabs { margin-bottom: 10px; }
.bo-web-settings-form { position: relative; }
.bo-web-audio-grid,
.bo-web-background-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.bo-web-upload-field { display:grid; min-width:0; align-content:start; gap:6px; }
.bo-web-upload-field > small,
.bo-web-timeout-field > small { color:var(--bo-ui-text-muted); font-size:12px; line-height:1.35; }
.bo-web-upload-field audio { width:100%; height:36px; }
.bo-web-image-preview { display:flex; min-height:150px; max-height:240px; overflow:hidden; border:1px solid var(--bo-ui-border); background:#fff; align-items:center; justify-content:center; }
.bo-web-image-preview img { display:block; width:100%; height:100%; max-height:238px; object-fit:cover; }
.bo-web-timeout-field { display:flex; align-items:flex-end; gap:12px; }
.bo-web-timeout-field > div { width:220px; max-width:100%; flex:0 0 auto; }
.bo-web-timeout-field > small { padding-bottom:7px; }
.bo-settings-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; padding:10px; }
.bo-settings-form-grid > div { min-width:0; }
.bo-settings-toggle-list { display:grid; }
.bo-settings-toggle-row { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:48px; margin:0; padding:7px 10px; border-bottom:1px solid var(--bo-ui-border); cursor:pointer; }
.bo-settings-toggle-row:last-child { border-bottom:0; }
.bo-settings-toggle-row > span:first-child { display:grid; gap:1px; min-width:0; }
.bo-settings-toggle-row strong { font-size:14px; font-weight:600; }
.bo-settings-toggle-row small,.bo-settings-site-row small,.bo-table td small { display:block; color:var(--bo-ui-text-muted); font-size:12px; font-weight:400; }
.bo-settings-toggle-action,.bo-settings-compact-toggle { display:flex; align-items:center; justify-content:flex-end; gap:8px; color:var(--bo-ui-text-muted); font-size:12px; white-space:nowrap; }
.bo-settings-actionbar { position:sticky; bottom:0; z-index:3; display:flex; justify-content:flex-end; padding:8px 10px; border:1px solid var(--bo-ui-border); background:rgba(255,255,255,.96); }
.bo-settings-inline-search { max-width:240px; }
.bo-settings-site-table { overflow:hidden; border:1px solid var(--bo-ui-border); border-width:0 0 0; }
.bo-settings-site-head,.bo-settings-site-row { display:grid; grid-template-columns:minmax(210px,1.4fr) repeat(3,minmax(130px,1fr)); align-items:center; gap:10px; padding:7px 10px; border-bottom:1px solid var(--bo-ui-border); }
.bo-settings-site-head { min-height:36px; background:var(--bo-ui-bg-muted); font-weight:700; }
.bo-settings-site-head > span:not(:first-child) { text-align:center; }
.bo-settings-site-row:last-child { border-bottom:0; }
.bo-settings-site-row > span:first-child { min-width:0; }
.bo-settings-site-row .bo-settings-compact-toggle { display:grid; grid-template-columns:34px 34px; justify-content:center; gap:8px; }
.bo-settings-checkbox-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; max-height:168px; padding:6px; overflow:auto; border:1px solid var(--bo-ui-border); background:var(--bo-ui-bg); }
.bo-settings-checkbox-list .bo-check-control { min-width:0; }
.bo-settings-checkbox-list .bo-check-control span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bo-settings-textarea { height:150px !important; resize:vertical; }
.bo-inline-validation { margin:0 10px 10px; color:var(--bo-ui-danger); font-size:12px; }
.bo-settings-callout { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:70px; padding:10px; }
.bo-settings-callout > div { display:grid; gap:3px; }
.bo-settings-callout span { color:var(--bo-ui-text-muted); font-size:13px; }
.bo-session-summary { display:flex; flex-wrap:wrap; gap:18px; padding:8px 10px; border-bottom:1px solid var(--bo-ui-border); color:var(--bo-ui-text-muted); font-size:12px; }
.bo-session-summary strong { color:var(--bo-ui-text); font-size:14px; font-variant-numeric:tabular-nums; }
.bo-session-summary strong.is-success { color:var(--bo-ui-success); }
.bo-session-tabs { margin:0 10px 8px; }
.bo-session-status { display:inline-flex; align-items:center; gap:6px; font-weight:600; }
.bo-session-status.is-online { color:var(--bo-ui-success); }
.bo-session-status.is-offline { color:var(--bo-ui-text-muted); }
.bo-table-footer { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:42px; padding:5px 8px; border-top:1px solid var(--bo-ui-border); color:var(--bo-ui-text-muted); font-size:12px; }
.bo-pagination { display:flex; gap:4px; }
.bo-pagination button { min-width:34px; min-height:34px; border:1px solid var(--bo-ui-border); background:var(--bo-ui-bg); color:var(--bo-ui-text); font-size:13px; }
.bo-pagination button.is-active { border-color:var(--bo-ui-primary); background:var(--bo-ui-primary); color:#fff; }
.bo-pagination button:disabled { background:var(--bo-ui-bg-muted); color:#9aa3b2; }
.bo-settings-session-bulk { display:flex; justify-content:flex-end; padding:8px 10px; border-top:1px solid var(--bo-ui-border); }
.bo-settings-two-column { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(320px,1fr); gap:10px; }
.bo-coin-identity { display:flex; align-items:center; gap:8px; }
.bo-coin-identity img { width:32px; height:32px; object-fit:contain; border:1px solid var(--bo-ui-border); }
.bo-coin-preview { display:flex; align-items:center; gap:10px; min-height:58px; padding:8px; border:1px solid var(--bo-ui-border); }
.bo-coin-preview img { width:40px; height:40px; object-fit:contain; }
.bo-settings-commission-defaults { display:grid; grid-template-columns:repeat(4,minmax(150px,1fr)); gap:8px; padding:10px; }
.bo-commission-table { max-height:58vh; overflow:auto; }
.bo-commission-table thead { position:sticky; top:0; z-index:1; }
.bo-commission-group-row th { padding:7px 10px; border-top:1px solid var(--bo-ui-border-strong); border-bottom:1px solid var(--bo-ui-border); background:var(--bo-ui-bg-muted); color:var(--bo-ui-text); font-size:13px; font-weight:700; }
.bo-commission-group-row:first-child th { border-top:0; }
.bo-commission-table tr.is-dirty { background:var(--bo-ui-warning-soft); }
.bo-settings-version { color:var(--bo-ui-text-muted); font-size:12px; }
.bo-settings-heading-copy { display:grid; min-width:0; gap:1px; }
.bo-settings-heading-copy > span { color:var(--bo-ui-text-muted); font-size:12px; line-height:1.3; }
.bo-release-matrix { overflow:hidden; }
.bo-release-header,.bo-release-row { display:grid; grid-template-columns:minmax(150px,.75fr) 74px minmax(280px,1.6fr) minmax(150px,.78fr) minmax(120px,.62fr) auto; align-items:center; }
.bo-release-header { min-height:34px; border-bottom:1px solid var(--bo-ui-border-strong); background:var(--bo-ui-bg-muted); color:var(--bo-ui-text-muted); font-size:11px; font-weight:700; text-transform:uppercase; }
.bo-release-header > span { padding:6px 9px; }
.bo-release-row { min-height:72px; border-bottom:1px solid var(--bo-ui-border); }
.bo-release-row:last-child { border-bottom:0; }
.bo-release-row > .co-table-loading-overlay { min-height:0; }
.bo-release-cell { min-width:0; padding:8px 9px; }
.bo-release-target,.bo-release-version,.bo-release-meta { display:grid; gap:1px; }
.bo-release-target small,.bo-release-version small,.bo-release-meta small { color:var(--bo-ui-text-muted); font-size:11px; line-height:1.3; }
.bo-release-target .bo-health-status { color:var(--bo-ui-text); }
.bo-release-version strong { font-size:18px; font-weight:650; font-variant-numeric:tabular-nums; line-height:1.1; }
.bo-release-meta strong { overflow:hidden; font-size:12px; font-weight:600; line-height:1.3; text-overflow:ellipsis; white-space:nowrap; }
.bo-release-message .form-control { width:100%; }
.bo-release-action { display:flex; justify-content:flex-end; }
.bo-release-action .bo-button { white-space:nowrap; }
.bo-release-readonly { color:var(--bo-ui-text-muted); font-size:11px; font-weight:600; white-space:nowrap; }
.bo-system-operation-row { display:grid; min-height:68px; padding:9px 10px; align-items:center; grid-template-columns:32px minmax(0,1fr) auto auto; gap:10px; }
.bo-system-operation-icon { display:inline-flex; width:32px; height:32px; border:1px solid var(--bo-ui-border); background:var(--bo-ui-bg-muted); color:var(--bo-ui-text-muted); align-items:center; justify-content:center; }
.bo-system-operation-row > div { display:grid; min-width:0; gap:1px; }
.bo-system-operation-row > div > strong { font-size:13px; font-weight:700; }
.bo-system-operation-row > div > span { color:var(--bo-ui-text-muted); font-size:12px; line-height:1.35; }
.bo-system-operation-state { display:inline-flex; align-items:center; gap:6px; color:var(--bo-ui-text-muted); font-size:12px; font-weight:600; white-space:nowrap; }
.bo-inline-control { display:flex; gap:6px; }
.bo-inline-control .form-control { flex:1; }
.bo-check-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
.bo-check-grid label { display:flex; gap:7px; align-items:center; min-height:32px; padding:4px 7px; border:1px solid var(--bo-ui-border); }
.bo-advanced-permission-matrix { width: max-content; min-width: 100%; table-layout: auto; }
.bo-advanced-permission-matrix th:first-child,
.bo-advanced-permission-matrix td:first-child { width: 230px; }
.bo-advanced-permission-matrix th:not(:first-child) { min-width: 150px; }
.bo-advanced-permission-matrix td { vertical-align: top; }
.bo-advanced-permission-matrix td > strong { display: block; font-size: 13px; font-weight: 700; line-height: 1.25; }
.bo-advanced-permission-matrix td > small { display: block; margin-top: 2px; color: var(--bo-ui-text-muted); font-size: 11px; line-height: 1.3; }
.bo-advanced-permission-actions { display: grid; gap: 5px; }
.bo-advanced-permission-option { display: inline-flex; min-height: 24px; margin: 0; align-items: center; gap: 6px; color: var(--bo-ui-text); font-size: 12px; font-weight: 600; cursor: pointer; }
.bo-advanced-permission-option .form-check-input { flex: 0 0 auto; margin: 0; }
.bo-maintenance-list { display:grid; gap:6px; }
.bo-maintenance-item { display:grid; grid-template-columns:8px minmax(0,1fr) 32px; align-items:center; gap:8px; min-height:58px; padding:7px 8px; border:1px solid var(--bo-ui-border); }
.bo-maintenance-item > div { display:grid; min-width:0; }
.bo-maintenance-item code,.bo-maintenance-item small { color:var(--bo-ui-text-muted); font-size:11px; }
.bo-maintenance-item pre { max-height:100px; margin:6px 0 0; padding:6px; overflow:auto; background:#172033; color:#e8edf5; font-size:11px; white-space:pre-wrap; }
.bo-maintenance-item.is-success { border-color:#8cc9ae; }
.bo-maintenance-item.is-error { border-color:#e2a29d; }
.bo-system-health-notice { margin:8px 10px 0; }
.bo-system-health-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); border-bottom:1px solid var(--bo-ui-border); background:var(--bo-ui-bg); }
.bo-system-health-summary > div { display:flex; min-width:0; min-height:68px; padding:9px 10px; border-right:1px solid var(--bo-ui-border); flex-direction:column; justify-content:center; }
.bo-system-health-summary > div:last-child { border-right:0; }
.bo-system-health-summary span { color:var(--bo-ui-text-muted); font-size:12px; }
.bo-system-health-summary strong { display:inline-flex; align-items:center; gap:6px; margin-top:3px; font-size:18px; line-height:1.15; font-variant-numeric:tabular-nums; }
.bo-system-health-summary small { margin-top:2px; overflow:hidden; color:var(--bo-ui-text-muted); font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.bo-system-health-meta { display:grid; margin:0; border-bottom:1px solid var(--bo-ui-border); grid-template-columns:repeat(4,minmax(0,1fr)); }
.bo-system-health-meta > div { display:grid; min-width:0; min-height:42px; padding:6px 10px; border-right:1px solid var(--bo-ui-border); align-content:center; gap:1px; }
.bo-system-health-meta > div:last-child { border-right:0; }
.bo-system-health-meta dt { color:var(--bo-ui-text-muted); font-size:11px; font-weight:600; }
.bo-system-health-meta dd { margin:0; overflow:hidden; font-size:13px; font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
.bo-system-health-grid { display:grid; padding:10px; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.bo-system-health-grid .bo-table-shell,.bo-system-health-disks { position:relative; }
.bo-system-health-grid .bo-settings-panel-heading,.bo-system-health-disks .bo-settings-panel-heading { background:var(--bo-ui-bg-muted); }
.bo-system-health-grid .bo-table td,.bo-system-health-disks .bo-table td { padding-top:7px; padding-bottom:7px; }
.bo-system-health-disks { margin:0 10px 10px; }
.bo-health-status { display:inline-flex; align-items:center; gap:6px; font-weight:600; }
.bo-health-status.is-success { color:var(--bo-ui-success); }
.bo-health-status.is-warning { color:var(--bo-ui-warning); }
.bo-health-status.is-danger { color:var(--bo-ui-danger); }
.bo-health-detail { display:block; margin-top:1px; color:var(--bo-ui-text-muted); font-size:11px; font-weight:400; }
.bo-alert.is-warning { border-color:#e2ca8f; background:var(--bo-ui-warning-soft); color:var(--bo-ui-warning); }
.bo-api-test-layout { display:grid; grid-template-columns:minmax(280px,340px) minmax(0,1fr); gap:10px; padding:10px; }
.bo-api-test-form { display:grid; align-content:start; gap:10px; }
.bo-api-test-form .bo-alert { margin:0; }
.bo-api-test-form > .bo-button { justify-self:start; }
.bo-api-test-constants { display:grid; margin:0; border:1px solid var(--bo-ui-border); grid-template-columns:100px minmax(0,1fr); }
.bo-api-test-constants > div { display:grid; min-height:38px; padding:6px 9px; align-content:center; border-right:1px solid var(--bo-ui-border); }
.bo-api-test-constants > div:last-child { border-right:0; }
.bo-api-test-constants dt { color:var(--bo-ui-text-muted); font-size:11px; font-weight:600; }
.bo-api-test-constants dd { margin:0; overflow-wrap:anywhere; font-size:13px; font-weight:600; }
.bo-api-test-permission-note { color:var(--bo-ui-text-muted); font-size:12px; }
.bo-api-test-result { min-width:0; min-height:280px; border:1px solid var(--bo-ui-border); background:var(--bo-ui-bg); }
.bo-api-test-result-empty { display:grid; min-height:278px; padding:18px; place-items:center; color:var(--bo-ui-text-muted); font-size:13px; text-align:center; }
.bo-api-test-result-heading { display:flex; min-height:42px; padding:7px 10px; align-items:center; justify-content:space-between; gap:10px; border-bottom:1px solid var(--bo-ui-border); }
.bo-api-test-result-heading > span:last-child { color:var(--bo-ui-text-muted); font-size:12px; text-align:right; }
.bo-api-test-meta { display:grid; margin:0; border-bottom:1px solid var(--bo-ui-border); grid-template-columns:repeat(4,minmax(0,1fr)); }
.bo-api-test-meta > div { min-width:0; padding:6px 9px; border-right:1px solid var(--bo-ui-border); }
.bo-api-test-meta > div:last-child { border-right:0; }
.bo-api-test-meta dt { color:var(--bo-ui-text-muted); font-size:11px; font-weight:600; }
.bo-api-test-meta dd { margin:1px 0 0; overflow:hidden; font-size:12px; font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
.bo-api-test-stage { border-bottom:1px solid var(--bo-ui-border); }
.bo-api-test-stage:last-child { border-bottom:0; }
.bo-api-test-stage > header { display:flex; min-height:36px; padding:6px 9px; align-items:center; justify-content:space-between; gap:8px; background:var(--bo-ui-bg-muted); }
.bo-api-test-stage > header strong { font-size:13px; }
.bo-api-test-stage > header span { color:var(--bo-ui-text-muted); font-size:11px; font-variant-numeric:tabular-nums; }
.bo-api-test-stage-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
.bo-api-test-stage-grid > div { min-width:0; padding:8px; }
.bo-api-test-stage-grid > div + div { border-left:1px solid var(--bo-ui-border); }
.bo-api-test-stage-grid h3 { margin:0 0 5px; font-size:11px; font-weight:700; text-transform:uppercase; }
.bo-api-test-stage-grid pre { min-height:116px; max-height:250px; margin:0; padding:8px; overflow:auto; border:1px solid var(--bo-ui-border); background:var(--bo-ui-bg-muted); color:var(--bo-ui-text); font-family:Consolas,'Courier New',monospace; font-size:11px; line-height:1.45; white-space:pre-wrap; overflow-wrap:anywhere; }

.bo-twofa-management-panel .bo-settings-panel-heading > div { display: grid; min-width: 0; gap: 1px; }
.bo-twofa-management-panel .bo-settings-panel-heading > div > span { color: var(--bo-ui-text-muted); font-size: 12px; line-height: 1.3; }
.bo-twofa-management-table th:last-child { min-width: 330px; }
.bo-twofa-management-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; }
.bo-twofa-management-actions .bo-button { white-space: nowrap; }
.bo-table-group-row th { padding: 7px 10px; border-top: 1px solid var(--bo-ui-border-strong); border-bottom: 1px solid var(--bo-ui-border); background: var(--bo-ui-bg-muted); color: var(--bo-ui-text); }
.bo-table-group-row:first-child th { border-top: 0; }
.bo-table-group-row th > span { font-size: 13px; font-weight: 700; }
.bo-table-group-row th > small { margin-left: 8px; color: var(--bo-ui-text-muted); font-size: 11px; font-weight: 600; }

@media (max-width: 767.98px) {
    .bo-twofa-management-panel .bo-settings-panel-heading { align-items: stretch; flex-direction: column; }
    .bo-twofa-management-panel .bo-settings-inline-search { width: 100%; max-width: none; }
}

@media (max-width: 767.98px) {
    .bo-web-audio-grid,
    .bo-web-background-grid { grid-template-columns:1fr; }
    .bo-web-timeout-field { align-items:stretch; flex-direction:column; gap:6px; }
    .bo-web-timeout-field > div { width:100%; }
    .bo-web-timeout-field > small { padding-bottom:0; }
}

/* Account security */
.bo-twofa-workspace { max-width: 1120px; margin: 0; }
.bo-twofa-panel { margin-bottom: 0; }
.bo-twofa-panel .bo-settings-panel-heading > div { display: grid; min-width: 0; gap: 1px; }
.bo-twofa-panel .bo-settings-panel-heading span:not(.bo-status) { color: var(--bo-ui-text-muted); font-size: 12px; }
.bo-twofa-setup-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); }
.bo-twofa-qr-column,
.bo-twofa-details-column { min-width: 0; padding: 14px; }
.bo-twofa-qr-column { border-right: 1px solid var(--bo-ui-border); background: var(--bo-ui-bg-subtle); }
.bo-twofa-details-column { display: grid; align-content: start; gap: 14px; }
.bo-twofa-step-heading { display: flex; align-items: flex-start; gap: 8px; }
.bo-twofa-step-number { display: inline-flex; width: 22px; height: 22px; flex: 0 0 22px; align-items: center; justify-content: center; border: 1px solid var(--bo-ui-primary); border-radius: var(--bo-ui-radius); color: var(--bo-ui-primary); font-size: 12px; font-weight: 700; line-height: 1; }
.bo-twofa-step-heading h3,
.bo-twofa-disable-form h3 { margin: 0; color: var(--bo-ui-text); font-size: 14px; font-weight: 700; line-height: 1.3; }
.bo-twofa-step-heading p,
.bo-twofa-disable-form p { margin: 2px 0 0; color: var(--bo-ui-text-muted); font-size: 12px; line-height: 1.35; }
.bo-twofa-qr-surface { display: flex; width: 222px; height: 222px; margin: 14px auto 0; padding: 10px; align-items: center; justify-content: center; border: 1px solid var(--bo-ui-border-strong); background: #fff; }
.bo-twofa-qr-surface img { display: block; width: 200px; height: 200px; }
.bo-twofa-technical-list { margin: 0; border: 1px solid var(--bo-ui-border); }
.bo-twofa-technical-list > div { display: grid; min-height: 38px; padding: 6px 9px; border-bottom: 1px solid var(--bo-ui-border); grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: 10px; }
.bo-twofa-technical-list > div:last-child { border-bottom: 0; }
.bo-twofa-technical-list dt { color: var(--bo-ui-text-muted); font-size: 12px; font-weight: 600; }
.bo-twofa-technical-list dd { margin: 0; min-width: 0; color: var(--bo-ui-text); font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.bo-twofa-technical-list .bo-twofa-technical-value { font-family: Consolas, 'Courier New', monospace; font-size: 11px; font-weight: 500; }
.bo-twofa-verification-form { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--bo-ui-border); }
.bo-twofa-action-row { display: flex; align-items: flex-end; gap: 6px; }
.bo-twofa-code-field { width: 190px; }
.bo-twofa-action-row .bo-button { white-space: nowrap; }
.bo-twofa-enabled-body { display: grid; gap: 10px; padding: 10px; }
.bo-twofa-security-summary { display: flex; min-height: 58px; padding: 9px 10px; align-items: center; gap: 10px; border: 1px solid var(--bo-ui-border); background: var(--bo-ui-success-soft); }
.bo-twofa-security-summary > i { color: var(--bo-ui-success); font-size: 22px; }
.bo-twofa-security-summary > div { display: grid; gap: 2px; }
.bo-twofa-security-summary strong { font-size: 14px; font-weight: 700; }
.bo-twofa-security-summary span { color: var(--bo-ui-text-muted); font-size: 12px; }
.bo-twofa-disable-form { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--bo-ui-border); }
.bo-twofa-policy-note { display: flex; min-height: 42px; padding: 8px 10px; align-items: center; gap: 8px; border: 1px solid var(--bo-ui-border); background: var(--bo-ui-bg-subtle); color: var(--bo-ui-text-muted); font-size: 13px; }
.bo-twofa-policy-note i { color: var(--bo-ui-primary); font-size: 16px; }

@media (max-width: 767.98px) {
    .bo-twofa-setup-grid { grid-template-columns: 1fr; }
    .bo-twofa-qr-column { border-right: 0; border-bottom: 1px solid var(--bo-ui-border); }
}

@media (max-width: 575.98px) {
    .bo-twofa-workspace .bo-page-header { align-items: flex-start; gap: 8px; }
    .bo-twofa-qr-column,
    .bo-twofa-details-column { padding: 10px; }
    .bo-twofa-technical-list > div { grid-template-columns: 1fr; gap: 2px; }
    .bo-twofa-action-row { align-items: stretch; flex-direction: column; }
    .bo-twofa-code-field,
    .bo-twofa-action-row .bo-button { width: 100%; }
}

@media (max-width: 991.98px) {
    .bo-settings-two-column { grid-template-columns:1fr; }
    .bo-release-header { display:none; }
    .bo-release-row { padding:8px; grid-template-columns:minmax(150px,.75fr) minmax(0,1.25fr); gap:8px 12px; }
    .bo-release-cell { padding:0; }
    .bo-release-cell::before { display:block; margin-bottom:2px; color:var(--bo-ui-text-muted); content:attr(data-label); font-size:10px; font-weight:700; text-transform:uppercase; }
    .bo-release-message { grid-column:1 / -1; }
    .bo-release-action { grid-column:1 / -1; justify-content:flex-end; }
    .bo-api-test-layout { grid-template-columns:1fr; }
    .bo-system-health-summary,.bo-system-health-meta { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .bo-system-health-summary > div:nth-child(2),.bo-system-health-meta > div:nth-child(2) { border-right:0; }
    .bo-system-health-summary > div:nth-child(-n+2),.bo-system-health-meta > div:nth-child(-n+2) { border-bottom:1px solid var(--bo-ui-border); }
    .bo-settings-commission-defaults { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .bo-settings-site-head { display:none; }
    .bo-settings-site-row { grid-template-columns:1fr 1fr; }
}

@media (max-width: 575.98px) {
    .bo-settings-heading-copy > span { display:none; }
    .bo-release-row { grid-template-columns:1fr; }
    .bo-release-message,.bo-release-action { grid-column:auto; }
    .bo-release-action .bo-button { width:100%; }
    .bo-system-operation-row { align-items:start; grid-template-columns:32px minmax(0,1fr); }
    .bo-system-operation-state { grid-column:2; }
    .bo-system-operation-row > .bo-button { width:100%; grid-column:1 / -1; }
    .bo-api-test-meta,.bo-api-test-stage-grid { grid-template-columns:1fr; }
    .bo-api-test-meta > div { border-right:0; border-bottom:1px solid var(--bo-ui-border); }
    .bo-api-test-meta > div:last-child { border-bottom:0; }
    .bo-api-test-stage-grid > div + div { border-top:1px solid var(--bo-ui-border); border-left:0; }
}

body.bo-shell.finance-shell .bo-page-header,
body.bo-shell.finance-shell .main-content > .container-fluid > .row:first-child {
    margin-bottom: 10px !important;
}

body.bo-shell.finance-shell .bo-page-meta {
    display: flex;
    margin-top: 4px;
    align-items: center;
    gap: 8px;
    color: var(--bo-ui-text-muted);
    font-size: 12px;
}

body.bo-shell.finance-shell .finance-status-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-right: 0;
    margin-left: 0;
    gap: 0 !important;
}
body.bo-shell.finance-shell .finance-status-metrics > [class*="col-"] { width: auto; padding: 0; }
body.bo-shell.finance-shell .finance-status-metrics .status-card {
    min-height: 76px;
    cursor: pointer;
    border-right: 0 !important;
}
body.bo-shell.finance-shell .finance-status-metrics > [class*="col-"]:last-child .status-card { border-right: 1px solid var(--bo-ui-border) !important; }
body.bo-shell.finance-shell .finance-status-metrics .status-card.active { border-bottom: 3px solid var(--bo-ui-primary) !important; outline: 0 !important; }
body.bo-shell.finance-shell .finance-status-metrics .card-body { display: flex; padding: 9px 12px; align-items: flex-start; flex-direction: column-reverse; text-align: left !important; }
body.bo-shell.finance-shell .finance-status-metrics h3 { margin: 0 !important; font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }
body.bo-shell.finance-shell .finance-status-metrics small { font-size: 12px; }

body.bo-shell.finance-shell .bo-filter-panel > .card-body { padding: 9px 10px; }
body.bo-shell.finance-shell .bo-filter-panel .row { align-items: flex-end; row-gap: 8px !important; }
body.bo-shell.finance-shell .dash-quick-range { display: flex; align-items: center; gap: 4px; }
body.bo-shell.finance-shell .dash-quick-range button {
    min-height: 30px;
    padding: 4px 9px;
    border: 1px solid var(--bo-ui-border-strong);
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text);
    font-size: 12px;
}
body.bo-shell.finance-shell .dash-quick-range .text-muted { display: none; }

body.bo-shell.finance-shell .bo-table-panel > .card-header,
body.bo-shell.finance-shell .bo-panel-header {
    display: flex;
    min-height: 46px;
    padding: 7px 10px;
    border: 1px solid var(--bo-ui-border);
    border-bottom: 0;
    background: var(--bo-ui-bg);
    align-items: center;
    justify-content: space-between;
}
body.bo-shell.finance-shell .bo-panel-header h2,
body.bo-shell.finance-shell .bo-table-panel > .card-header h5 { margin: 0; color: var(--bo-ui-text); font-size: 14px; font-weight: 700; }
body.bo-shell.finance-shell .bo-panel-header span { display: block; margin-top: 1px; color: var(--bo-ui-text-muted); font-size: 11px; }
body.bo-shell.finance-shell .bo-table-search { width: min(300px, 42vw); }

body.bo-shell.finance-shell .bo-metric-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid var(--bo-ui-border);
    background: var(--bo-ui-bg);
}
body.bo-shell.finance-shell .bo-metric-item { display: grid; min-height: 76px; padding: 9px 12px; border-right: 1px solid var(--bo-ui-border); align-content: center; gap: 1px; }
body.bo-shell.finance-shell .bo-metric-item:last-child { border-right: 0; }
body.bo-shell.finance-shell .bo-metric-label { color: var(--bo-ui-text-muted); font-size: 12px; }
body.bo-shell.finance-shell .bo-metric-value { color: var(--bo-ui-text); font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }
body.bo-shell.finance-shell .bo-metric-value.is-success { color: var(--bo-ui-success); }
body.bo-shell.finance-shell .bo-metric-value.is-danger { color: var(--bo-ui-danger); }
body.bo-shell.finance-shell .bo-metric-meta { color: var(--bo-ui-text-muted); font-size: 11px; }
body.bo-shell.finance-shell .bo-primary-value { display: block; color: inherit; font-weight: 600; font-variant-numeric: tabular-nums; }
body.bo-shell.finance-shell .bo-secondary-value { display: block; margin-top: 1px; color: var(--bo-ui-text-muted); font-size: 12px; }
body.bo-shell.finance-shell .bo-empty-state { padding: 24px !important; color: var(--bo-ui-text-muted) !important; text-align: center; }
body.bo-shell.finance-shell .bo-technical-value { padding: 7px 9px; border: 1px solid var(--bo-ui-border); background: var(--bo-ui-bg-muted); color: var(--bo-ui-text); font-family: Consolas, 'Courier New', monospace; font-size: 11px; overflow-wrap: anywhere; }

body.bo-shell.finance-shell .offcanvas.bo-operation-drawer {
    width: min(720px, 100vw) !important;
    border-left: 1px solid var(--bo-ui-border-strong) !important;
    background: var(--bo-ui-bg) !important;
    color: var(--bo-ui-text) !important;
    box-shadow: none !important;
}
body.bo-shell.finance-shell .offcanvas.bo-operation-drawer .bo-drawer-header,
body.bo-shell.finance-shell .offcanvas.bo-operation-drawer .bo-drawer-footer {
    flex: 0 0 auto;
    min-height: 54px;
    padding: 10px 14px;
    border-color: var(--bo-ui-border) !important;
    background: var(--bo-ui-bg) !important;
    color: var(--bo-ui-text) !important;
}
body.bo-shell.finance-shell .offcanvas.bo-operation-drawer .bo-drawer-body { flex: 1 1 auto; padding: 14px; overflow-y: auto; background: var(--bo-ui-bg) !important; color: var(--bo-ui-text) !important; }
body.bo-shell.finance-shell .offcanvas.bo-operation-drawer .bo-drawer-footer { display: flex; border-top: 1px solid var(--bo-ui-border); align-items: center; justify-content: flex-end; gap: 8px; }
body.bo-shell.finance-shell .offcanvas.bo-operation-drawer .btn-close { position: absolute; top: 12px; right: 12px; margin: 0; }

@media (max-width: 767.98px) {
    body.bo-shell.finance-shell .finance-status-metrics,
    body.bo-shell.finance-shell .bo-metric-strip { grid-template-columns: 1fr 1fr; }
    body.bo-shell.finance-shell .finance-status-metrics .status-card,
    body.bo-shell.finance-shell .bo-metric-item { border: 1px solid var(--bo-ui-border) !important; }
}

@media (max-width: 479.98px) {
    body.bo-shell.finance-shell .finance-status-metrics,
    body.bo-shell.finance-shell .bo-metric-strip { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
    .bo-system-health-summary,.bo-system-health-meta,.bo-system-health-grid { grid-template-columns:1fr; }
    .bo-system-health-summary > div,.bo-system-health-meta > div { border-right:0; border-bottom:1px solid var(--bo-ui-border); }
    .bo-system-health-summary > div:last-child,.bo-system-health-meta > div:last-child { border-bottom:0; }
    .bo-settings-form-grid,.bo-settings-commission-defaults,.bo-check-grid { grid-template-columns:1fr; }
    .bo-settings-checkbox-list { grid-template-columns:1fr; }
    .bo-settings-site-row { grid-template-columns:1fr; }
    .bo-settings-toggle-row,.bo-settings-callout { align-items:flex-start; flex-direction:column; }
    .bo-settings-toggle-action { width:100%; justify-content:space-between; }
}

.bo-workspace {
    color: var(--bo-ui-text);
    font-size: 14px;
}

.bo-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 34px;
    margin: 0 0 10px;
}

.bo-page-title {
    margin: 0;
    color: var(--bo-ui-text);
    font-size: 26px;
    font-weight: 650;
    line-height: 1.25;
}

.bo-page-title-context {
    color: var(--bo-ui-text-muted);
    font-size: 17px;
    font-weight: 550;
}

.bo-tabs {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    min-height: 36px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--bo-ui-border);
}

.bo-tabs.nav-tabs {
    flex-wrap: nowrap;
}

.bo-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    margin-bottom: -1px;
    padding: 0 1px;
    border-bottom: 2px solid transparent;
    color: var(--bo-ui-text-muted);
    border-top: 0 !important;
    border-right: 0 !important;
    border-left: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.bo-tab:hover {
    color: var(--bo-ui-text);
}

.bo-tab.is-active,
.bo-tabs.nav-tabs .bo-tab.active {
    border-bottom-color: var(--bo-ui-primary);
    color: var(--bo-ui-primary);
}

.bo-tab-count {
    color: inherit;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.bo-filterbar {
    margin-bottom: 10px;
    padding: 9px 10px;
    border: 1px solid var(--bo-ui-border);
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-bg);
}

.bo-filter-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: end;
}

.bo-filter-field {
    flex: 0 1 250px;
    min-width: 180px;
}

.bo-filter-field.is-wide {
    flex-basis: 300px;
}

.bo-filter-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 5px;
    justify-content: flex-start;
}

.bo-workspace .form-label {
    margin-bottom: 3px;
    color: var(--bo-ui-text-control);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

.bo-workspace .form-control,
.bo-workspace .form-select {
    min-height: var(--bo-ui-control-height);
    height: var(--bo-ui-control-height);
    padding: 4px 8px;
    border-color: var(--bo-ui-border-strong);
    border-radius: var(--bo-ui-radius);
    background-color: var(--bo-ui-bg);
    color: var(--bo-ui-text);
    font-size: 14px;
    box-shadow: none;
}

.bo-workspace .form-control:focus,
.bo-workspace .form-select:focus {
    border-color: var(--bo-ui-primary);
    box-shadow: 0 0 0 1px var(--bo-ui-primary);
}

.bo-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: var(--bo-ui-control-height);
    padding: 4px 10px;
    border: 1px solid var(--bo-ui-border-strong);
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    box-shadow: none;
}

.bo-button:hover {
    border-color: #aeb7c5;
    background: var(--bo-ui-bg-muted);
    color: var(--bo-ui-text);
}

.bo-button:disabled {
    border-color: var(--bo-ui-border);
    background: var(--bo-ui-bg-muted);
    color: #9aa3b2;
    cursor: default;
}

.bo-button.is-primary {
    border-color: var(--bo-ui-primary);
    background: var(--bo-ui-primary);
    color: #fff;
}

.bo-button.is-primary:hover {
    border-color: #0847ab;
    background: #0847ab;
    color: #fff;
}

.bo-button.is-disclosure {
    border-color: #aac5ee;
    background: var(--bo-ui-primary-soft);
    color: var(--bo-ui-primary);
}

.bo-button.is-disclosure:hover {
    border-color: #8fb2e7;
    background: #edf4fd;
    color: var(--bo-ui-primary);
}

.bo-disclosure-chevron {
    margin-left: 2px;
    transition: transform .12s ease;
}

.bo-button.is-disclosure[aria-expanded="true"] .bo-disclosure-chevron {
    transform: rotate(180deg);
}

.bo-button.is-danger {
    border-color: var(--bo-ui-danger);
    background: var(--bo-ui-bg);
    color: var(--bo-ui-danger);
}

.bo-button.is-danger:hover {
    border-color: var(--bo-ui-danger);
    background: var(--bo-ui-danger-soft);
    color: #8f1c13;
}

.bo-alert {
    margin-bottom: 10px;
    padding: 7px 10px;
    border: 1px solid #add8c3;
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-success-soft);
    color: #155d3c;
    font-size: 12px;
}

.bo-table-shell {
    overflow: hidden;
    border: 1px solid var(--bo-ui-border);
    border-radius: 0;
    background: var(--bo-ui-bg);
}

.bo-table-shell .table-responsive {
    margin: 0;
}

.bo-table {
    width: 100%;
    margin: 0;
    color: var(--bo-ui-text);
    font-size: 14px;
}

.bo-table > thead > tr > th {
    height: 38px;
    padding: 7px 10px;
    border-top: 0;
    border-right: 1px solid var(--bo-ui-border-cell);
    border-bottom: 1px solid var(--bo-ui-border-strong);
    background: var(--bo-ui-bg-header);
    color: var(--bo-ui-text-header);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.15;
    vertical-align: middle;
    white-space: nowrap;
}

.bo-table > thead > tr > th:last-child {
    border-right: 0;
}

.bo-table > tbody > tr > td {
    padding: 8px 10px;
    border-color: var(--bo-ui-border-cell);
    background: var(--bo-ui-bg);
    line-height: 1.25;
    vertical-align: middle;
}

.bo-table > tbody > tr:hover > td {
    background: var(--bo-ui-bg-hover);
}

.bo-table-primary {
    font-weight: 600;
}

.bo-table-secondary {
    margin-top: 2px;
    color: var(--bo-ui-text-muted);
    font-size: 13px;
    line-height: 1.2;
}

.bo-number {
    font-variant-numeric: tabular-nums;
}

.bo-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--bo-ui-text-muted);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.bo-status::before {
    width: 6px;
    height: 6px;
    border-radius: 1px;
    background: #7b8494;
    content: "";
}

.bo-status.is-danger {
    color: var(--bo-ui-danger);
}

.bo-status.is-danger::before {
    background: var(--bo-ui-danger);
}

.bo-status.is-warning {
    color: var(--bo-ui-warning);
}

.bo-status.is-warning::before {
    background: #b77900;
}

.bo-status.is-success {
    color: var(--bo-ui-success);
}

.bo-status.is-success::before {
    background: var(--bo-ui-success);
}

.bo-status.is-primary {
    color: var(--bo-ui-primary);
}

.bo-status.is-primary::before {
    background: var(--bo-ui-primary);
}

.bo-active-site-entry {
    display: flex;
    min-width: 0;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 3px 5px;
}

.bo-active-site-entry + .bo-active-site-entry {
    margin-top: 3px;
}

.bo-active-site-limits {
    color: var(--bo-ui-text-muted);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.bo-link-action {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--bo-ui-primary);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.bo-link-action:hover {
    color: #0847ab;
    text-decoration: underline;
}

.bo-action-group {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* Joined icon actions; shared by operational tables. */
body.bo-shell .bo-button-group {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    vertical-align: middle;
}

body.bo-shell .bo-button-group > .bo-button {
    position: relative;
    flex: 0 0 var(--bo-ui-control-height);
    width: var(--bo-ui-control-height);
    height: var(--bo-ui-control-height);
    padding: 0;
    border-radius: 0;
    border-color: var(--bo-ui-border-strong);
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text-muted);
    box-shadow: none;
}

body.bo-shell .bo-button-group.has-labels { max-width: 100%; align-items: stretch; }
body.bo-shell .bo-button-group.has-labels > .bo-button {
    flex: 0 1 auto;
    width: auto;
    min-width: 0;
    height: auto;
    padding: 4px 10px;
    white-space: normal;
}
body.bo-shell .bo-button-group.has-labels > .bo-button > i { flex-shrink: 0; }
body.bo-shell .bo-button-group.has-labels > .bo-button > span { min-width: 0; overflow-wrap: anywhere; }

body.bo-shell .bo-button-group > .bo-button + .bo-button { margin-left: -1px; }
body.bo-shell .bo-button-group > .bo-button:first-child { border-radius: var(--bo-ui-radius) 0 0 var(--bo-ui-radius); }
body.bo-shell .bo-button-group > .bo-button:last-child { border-radius: 0 var(--bo-ui-radius) var(--bo-ui-radius) 0; }
body.bo-shell .bo-button-group > .bo-button:only-child { border-radius: var(--bo-ui-radius); }
body.bo-shell .bo-button-group > .bo-button.is-info { color: var(--bo-ui-primary); }
body.bo-shell .bo-button-group > .bo-button.is-success { color: var(--bo-ui-success); }
body.bo-shell .bo-button-group > .bo-button.is-danger { color: var(--bo-ui-danger); }

body.bo-shell .bo-button-group > .bo-button:hover:not(:disabled),
body.bo-shell .bo-button-group > .bo-button:active:not(:disabled) {
    z-index: 1;
    border-color: currentColor;
    background: var(--bo-ui-bg-hover);
}

body.bo-shell .bo-button-group > .bo-button:focus-visible {
    z-index: 2;
    outline: 2px solid var(--bo-ui-primary);
    outline-offset: 1px;
}

body.bo-shell .bo-button-group > .bo-button:disabled {
    border-color: var(--bo-ui-border-strong);
    background: var(--bo-ui-bg-muted);
    color: var(--bo-ui-text-muted);
    opacity: .55;
    cursor: not-allowed;
}

.bo-record-cell {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
}

.bo-record-logo {
    display: inline-flex;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    padding: 3px;
    border: 1px solid var(--bo-ui-border);
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-bg);
    object-fit: contain;
    align-items: center;
    justify-content: center;
}

.bo-record-logo.is-placeholder {
    color: var(--bo-ui-text-muted);
    font-size: 14px;
}

.bo-record-logo.is-preview {
    width: 96px;
    height: 96px;
    padding: 6px;
}

.bo-table-url {
    display: inline-block;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.bo-media-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bo-media-panel {
    min-width: 0;
    padding: 12px;
    border-right: 1px solid var(--bo-ui-border);
}

.bo-media-panel:last-child {
    border-right: 0;
}

.bo-media-panel-heading,
.bo-media-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.bo-media-panel-heading {
    min-height: 28px;
    margin-bottom: 8px;
}

.bo-media-preview {
    position: relative;
    display: flex;
    height: 260px;
    overflow: hidden;
    border: 1px solid var(--bo-ui-border);
    background: var(--bo-ui-bg-muted);
    align-items: center;
    justify-content: center;
}

.bo-media-preview img {
    width: 100%;
    height: 100%;
    background: var(--bo-ui-bg);
    object-fit: contain;
    cursor: zoom-in;
}

.bo-media-preview img:focus-visible {
    outline: 2px solid var(--bo-ui-primary);
    outline-offset: -2px;
}

.bo-media-image-loader {
    position: absolute;
    inset: 0;
    display: flex;
    background: rgba(245, 246, 248, .88);
    color: var(--bo-ui-primary);
    align-items: center;
    justify-content: center;
}

.bo-media-image-loader .spinner-border {
    width: 1.25rem;
    height: 1.25rem;
    border-width: 2px;
}

.bo-media-placeholder {
    display: flex;
    color: var(--bo-ui-text-muted);
    font-size: 12px;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.bo-media-placeholder i {
    font-size: 24px;
}

.bo-media-actions {
    min-height: 42px;
    justify-content: flex-start;
}

.bo-media-actions .visibility-label {
    margin-right: auto;
    color: var(--bo-ui-text-muted);
    font-size: 12px;
    font-weight: 600;
}

.bo-media-upload {
    padding-top: 8px;
    border-top: 1px solid var(--bo-ui-border);
}

.bo-media-viewer {
    position: fixed;
    z-index: 2000;
    inset: 0;
    display: flex;
    padding: 44px;
    background: rgba(45, 52, 64, .96);
    align-items: center;
    justify-content: center;
}

.bo-media-viewer > img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    background: transparent;
    object-fit: contain;
}

.bo-media-viewer-close {
    position: absolute;
    top: 12px;
    right: 14px;
    display: inline-flex;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: var(--bo-ui-radius);
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font-size: 18px;
    align-items: center;
    justify-content: center;
}

.bo-media-viewer-close:hover,
.bo-media-viewer-close:focus-visible {
    border-color: #fff;
    background: rgba(255, 255, 255, .18);
    outline: none;
}

@media (max-width: 575.98px) {
    .bo-media-grid {
        grid-template-columns: 1fr;
    }

    .bo-media-panel {
        border-right: 0;
        border-bottom: 1px solid var(--bo-ui-border);
    }

    .bo-media-panel:last-child {
        border-bottom: 0;
    }

    .bo-media-viewer {
        padding: 44px 12px 12px;
    }
}

/* Compact Operations dashboard */
.bo-dashboard-workspace {
    min-width: 0;
}

.bo-dashboard-page-header {
    align-items: flex-end;
}

.bo-dashboard-welcome {
    margin-top: 3px;
    color: var(--bo-ui-text-muted);
    font-size: 14px;
}

.bo-dashboard-welcome strong {
    color: var(--bo-ui-text);
    font-weight: 600;
}

.bo-dashboard-period {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    color: var(--bo-ui-text-muted);
    font-size: 12px;
}

.bo-dashboard-period strong {
    margin-top: 2px;
    color: var(--bo-ui-text);
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.bo-dashboard-filter {
    display: flex;
    min-height: 60px;
    margin-bottom: 10px;
    padding: 8px 10px;
    border: 1px solid var(--bo-ui-border);
    background: var(--bo-ui-bg);
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.bo-dashboard-filter-field {
    width: 176px;
}

.bo-dashboard-filter-field label {
    display: block;
    margin-bottom: 4px;
    color: var(--bo-ui-text-muted);
    font-size: 12px;
    font-weight: 600;
}

.bo-dashboard-filter .form-control {
    height: var(--bo-ui-control-height);
    min-height: var(--bo-ui-control-height);
    padding: 4px 8px;
    border-color: var(--bo-ui-border-strong);
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text);
    font-size: 14px;
    box-shadow: none;
}

.bo-dashboard-range-actions {
    display: flex;
    gap: 4px;
}

.bo-dashboard-refresh {
    display: inline-flex;
    min-height: var(--bo-ui-control-height);
    margin-left: auto;
    padding: 4px 8px;
    border-left: 1px solid var(--bo-ui-border);
    color: var(--bo-ui-text-muted);
    font-size: 13px;
    cursor: pointer;
    align-items: center;
    gap: 7px;
}

.bo-dashboard-refresh strong {
    min-width: 38px;
    color: var(--bo-ui-primary);
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.bo-dashboard-refresh .form-check-input {
    float: none;
    margin: 0;
}

.bo-dashboard-refresh .form-check {
    display: inline-flex;
    height: 20px;
    min-height: 20px;
    padding-left: 0;
    align-items: center;
}

.bo-dashboard-refresh > span:not(.form-check),
.bo-dashboard-refresh > strong {
    line-height: 20px;
}

.bo-dashboard-summary {
    display: grid;
    margin-bottom: 10px;
    border: 1px solid var(--bo-ui-border);
    background: var(--bo-ui-bg);
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bo-dashboard-summary-item {
    display: flex;
    min-width: 0;
    min-height: 88px;
    padding: 12px 14px;
    border-right: 1px solid var(--bo-ui-border);
    align-items: center;
    gap: 12px;
}

.bo-dashboard-summary-item:last-child {
    border-right: 0;
}

.bo-dashboard-summary-icon {
    display: inline-flex;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border: 1px solid var(--bo-ui-border-strong);
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-bg-muted);
    color: var(--bo-ui-text-muted);
    font-size: 16px;
    align-items: center;
    justify-content: center;
}

.bo-dashboard-summary-icon.is-success,
.bo-dashboard-summary-value.is-success,
.bo-dashboard-table .is-success,
.bo-dashboard-site-metrics .is-success {
    color: var(--bo-ui-success);
}

.bo-dashboard-summary-icon.is-danger,
.bo-dashboard-summary-value.is-danger,
.bo-dashboard-table .is-danger,
.bo-dashboard-site-metrics .is-danger {
    color: var(--bo-ui-danger);
}

.bo-dashboard-summary-item > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.bo-dashboard-summary-label {
    color: var(--bo-ui-text-muted);
    font-size: 13px;
    font-weight: 600;
}

.bo-metric-assumption {
    display: block;
    min-height: 48px;
    margin-top: 4px;
    color: var(--bo-ui-warning);
    font-size: 16px;
    line-height: 24px;
    font-style: italic;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
}

.bo-metric-assumption[aria-hidden="true"] {
    visibility: hidden;
}

.bo-metric-assumption { transition: none; animation: none; }

.bo-capability-toolbar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; margin:12px 0 8px; font-size:12px; color:var(--bo-ui-text-muted); }
.bo-capability-toolbar > span { display:flex; align-items:center; gap:6px; }
.bo-capability-table { width:100%; min-width:510px; table-layout:fixed; margin:0; }
.bo-capability-table.bo-table th,.bo-capability-table.bo-table td { padding:5px 4px; text-align:center; vertical-align:middle; white-space:normal; }
.bo-capability-table.bo-table thead th { font-size:12px; }
.bo-capability-table.bo-table th:first-child { width:34%; text-align:left; padding-left:10px; }
.bo-capability-table.bo-table tbody th { font-size:13px; font-weight:500; line-height:1.3; }
.bo-capability-extra { min-width:0; }
.bo-capability-extra.bo-table th:first-child { width:auto; }
.bo-capability-extra.bo-table th:last-child,.bo-capability-extra.bo-table td:last-child { width:64px; }
.bo-capability-status { display:inline-flex; align-items:center; justify-content:center; width:26px; height:26px; font-size:16px; border-radius:var(--bo-ui-radius); }
.bo-capability-status:focus-visible { outline:2px solid var(--bo-ui-primary); outline-offset:1px; }
.bo-capability-status.is-success,.bo-capability-toolbar .is-success { color:var(--bo-ui-success); }
.bo-capability-status.is-danger,.bo-capability-toolbar .is-danger { color:var(--bo-ui-danger); }

.bo-dashboard-summary-value {
    margin-top: 2px;
    overflow: hidden;
    color: var(--bo-ui-text);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bo-dashboard-summary-item small,
.bo-dashboard-site-metrics small,
.bo-dashboard-table td small {
    display: block;
    margin-top: 2px;
    color: var(--bo-ui-text-muted);
    font-size: 12px;
    font-weight: 400;
}

.bo-dashboard-section {
    margin-top: 10px;
}

.bo-dashboard-section-heading {
    display: flex;
    min-height: 48px;
    padding: 8px 10px;
    border: 1px solid var(--bo-ui-border);
    border-bottom: 0;
    background: var(--bo-ui-bg-muted);
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.bo-dashboard-section-heading h2 {
    margin: 0;
    color: var(--bo-ui-text);
    font-size: 16px;
    font-weight: 700;
}

.bo-dashboard-section-heading span {
    display: block;
    margin-top: 2px;
    color: var(--bo-ui-text-muted);
    font-size: 12px;
}

.bo-dashboard-section-heading > strong {
    color: var(--bo-ui-text-muted);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.bo-dashboard-site-grid,
.bo-dashboard-group-grid {
    display: grid;
    padding: 10px;
    border: 1px solid var(--bo-ui-border);
    background: var(--bo-ui-bg);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.bo-dashboard-site-panel,
.bo-dashboard-group-panel {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--bo-ui-border-strong);
    background: var(--bo-ui-bg);
}

.bo-dashboard-site-panel > header,
.bo-dashboard-group-panel > header {
    display: flex;
    min-height: 40px;
    padding: 7px 10px;
    border-bottom: 1px solid var(--bo-ui-border);
    background: var(--bo-ui-bg-muted);
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.bo-dashboard-site-panel > header h3,
.bo-dashboard-group-panel > header h3 {
    display: flex;
    min-width: 0;
    margin: 0;
    color: var(--bo-ui-text);
    font-size: 14px;
    font-weight: 700;
    align-items: center;
    gap: 7px;
}

.bo-dashboard-site-panel > header h3 span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bo-dashboard-site-panel > header h3 i {
    color: var(--bo-ui-primary);
}

.bo-dashboard-site-panel > header > span,
.bo-dashboard-group-panel > header > span {
    color: var(--bo-ui-text-muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.bo-dashboard-site-metrics {
    display: grid;
    margin: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bo-dashboard-site-metrics > div {
    min-width: 0;
    min-height: 78px;
    padding: 10px;
    border-right: 1px solid var(--bo-ui-border);
}

.bo-dashboard-site-metrics > div:last-child {
    border-right: 0;
}

.bo-dashboard-site-metrics dt {
    color: var(--bo-ui-text-muted);
    font-size: 12px;
    font-weight: 600;
}

.bo-dashboard-site-metrics dd {
    margin: 4px 0 0;
    overflow: hidden;
    color: var(--bo-ui-text);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bo-dashboard-source-split {
    display: flex;
    width: 100%;
    height: 4px;
    overflow: hidden;
    background: var(--bo-ui-bg-muted);
}

.bo-dashboard-split-auto { background: var(--bo-ui-primary); }
.bo-dashboard-split-manual { background: var(--bo-ui-warning); }

.bo-dashboard-source-legend {
    display: flex;
    min-height: 34px;
    padding: 6px 10px;
    color: var(--bo-ui-text-muted);
    font-size: 12px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.bo-dashboard-source-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.bo-dashboard-source-legend i {
    width: 6px;
    height: 6px;
    background: var(--bo-ui-text-muted);
}

.bo-dashboard-source-legend i.is-auto { background: var(--bo-ui-primary); }
.bo-dashboard-source-legend i.is-manual { background: var(--bo-ui-warning); }

.bo-dashboard-group-panel .table-responsive {
    display: flex;
    margin: 0;
    flex: 1 1 auto;
}

.bo-dashboard-group-panel {
    display: flex;
    flex-direction: column;
}

.bo-dashboard-table {
    min-width: 560px;
}

.bo-dashboard-table.bo-table > thead > tr > th {
    height: 48px;
    padding-top: 10px;
    padding-bottom: 10px;
    border-right-color: var(--bo-user-sidebar-border);
    border-bottom-color: var(--bo-user-sidebar-border-strong);
    background: var(--bo-user-sidebar-bg);
    color: #f4f7fb;
}

.bo-dashboard-table.bo-table > thead > tr > th:last-child {
    border-right-color: transparent;
}

.bo-dashboard-table > tbody > tr > td {
    height: 50px;
    font-size: 14px;
}

.bo-dashboard-table > tbody > tr.bo-dashboard-spacer-row > td {
    color: transparent !important;
    pointer-events: none;
    user-select: none;
}

.bo-dashboard-table > tfoot > tr > td {
    padding: 9px 10px;
    border-top: 2px solid var(--bo-ui-primary);
    background: var(--bo-ui-bg-muted);
    color: var(--bo-ui-text);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.bo-dashboard-table > tfoot > tr > td.is-success { color: var(--bo-ui-success); }
.bo-dashboard-table > tfoot > tr > td.is-danger { color: var(--bo-ui-danger); }

.bo-dashboard-empty {
    min-height: 54px;
    padding: 16px 10px;
    color: var(--bo-ui-text-muted);
    font-size: 14px;
    text-align: center;
}

@media (max-width: 1199.98px) {
    .bo-dashboard-refresh {
        width: 100%;
        margin-left: 0;
        padding-left: 0;
        border-left: 0;
    }
}

@media (max-width: 991.98px) {
    .bo-dashboard-page-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .bo-dashboard-period {
        align-items: flex-start;
    }

    .bo-dashboard-summary {
        grid-template-columns: 1fr;
    }

    .bo-dashboard-summary-item {
        border-right: 0;
        border-bottom: 1px solid var(--bo-ui-border);
    }

    .bo-dashboard-summary-item:last-child {
        border-bottom: 0;
    }

    .bo-dashboard-site-grid,
    .bo-dashboard-group-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .bo-dashboard-filter-field,
    .bo-dashboard-filter > .bo-button,
    .bo-dashboard-range-actions {
        width: 100%;
    }

    .bo-dashboard-range-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bo-dashboard-site-grid,
    .bo-dashboard-group-grid {
        padding: 8px;
    }

    .bo-dashboard-site-metrics {
        grid-template-columns: 1fr;
    }

    .bo-dashboard-site-metrics > div {
        min-height: 66px;
        border-right: 0;
        border-bottom: 1px solid var(--bo-ui-border);
    }

    .bo-dashboard-site-metrics > div:last-child {
        border-bottom: 0;
    }

    .bo-dashboard-summary-value {
        font-size: 20px;
    }
}

.bo-coin-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.bo-coin-icon {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border: 1px solid var(--bo-ui-border);
    border-radius: 50%;
    background: #fff;
    object-fit: cover;
}

.bo-icon-select {
    position: relative;
    width: 100%;
}

.bo-icon-select-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.bo-icon-select-trigger {
    width: 100%;
    min-height: var(--bo-ui-control-height);
    height: var(--bo-ui-control-height);
    padding: 3px 8px;
    display: flex;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--bo-ui-border-strong);
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text);
    font-size: 14px;
    line-height: 1;
    text-align: left;
}

.bo-icon-select-trigger:hover {
    border-color: #aeb7c5;
}

.bo-icon-select-trigger:focus-visible,
.bo-icon-select.is-open .bo-icon-select-trigger {
    border-color: var(--bo-ui-primary);
    outline: 0;
    box-shadow: 0 0 0 1px var(--bo-ui-primary);
}

.bo-icon-select-trigger:disabled {
    border-color: var(--bo-ui-border);
    background: var(--bo-ui-bg-muted);
    color: #9aa3b2;
}

.bo-icon-select-native.is-invalid ~ .bo-icon-select-trigger {
    border-color: var(--bs-danger, #dc3545);
}

.bo-icon-select-label {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bo-icon-select-chevron {
    flex: 0 0 auto;
    color: var(--bo-ui-text-muted);
    font-size: 11px;
}

.bo-icon-select-menu {
    position: absolute;
    z-index: 1090;
    top: calc(100% + 2px);
    right: 0;
    left: 0;
    max-height: 240px;
    padding: 3px;
    overflow-y: auto;
    display: none;
    border: 1px solid var(--bo-ui-border-strong);
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-bg);
}

.bo-icon-select.is-open .bo-icon-select-menu {
    display: block;
}

.bo-icon-select-option {
    width: 100%;
    min-height: 32px;
    padding: 4px 6px;
    display: flex;
    align-items: center;
    gap: 7px;
    border: 0;
    border-radius: 2px;
    background: transparent;
    color: var(--bo-ui-text);
    font-size: 14px;
    text-align: left;
}

.bo-icon-select-option:hover,
.bo-icon-select-option:focus-visible {
    background: var(--bo-ui-bg-hover);
    color: var(--bo-ui-text);
    outline: 0;
}

.bo-icon-select-option[aria-selected="true"] {
    background: var(--bo-ui-primary);
    color: #fff;
    font-weight: 600;
}

.bo-icon-select-option[aria-selected="true"] .bo-icon-select-fallback {
    color: #fff;
}

.bo-icon-select-image {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    border: 1px solid var(--bo-ui-border);
    border-radius: 50%;
    background: #fff;
    object-fit: cover;
}

.bo-icon-select-fallback {
    width: 20px;
    flex: 0 0 20px;
    color: var(--bo-ui-text-muted);
    font-size: 16px;
    text-align: center;
}

.bo-icon-select-placeholder-spacer {
    width: 20px;
    flex: 0 0 20px;
}

.bo-qr-preview {
    min-height: 300px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--bo-ui-border-strong);
    background: var(--bo-ui-bg-muted);
}

.bo-qr-preview canvas {
    display: none;
    width: min(100%, 280px);
    height: auto;
    border: 1px solid var(--bo-ui-border);
    background: #fff;
}

.bo-qr-placeholder {
    max-width: 280px;
    color: var(--bo-ui-text-muted);
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

.bo-section-note {
    min-height: 30px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-top: 1px solid var(--bo-ui-border);
    background: var(--bo-ui-bg-muted);
    color: var(--bo-ui-text-muted);
    font-size: 12px;
    line-height: 1.35;
}

.bo-section-note i {
    flex: 0 0 auto;
    color: var(--bo-ui-primary);
}

.bo-permission-editor {
    border-top: 1px solid var(--bo-ui-border);
    color: var(--bo-ui-text);
    font-size: 14px;
}

.bo-permission-editor-toolbar {
    min-height: 42px;
    padding: 5px 7px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--bo-ui-border);
    background: var(--bo-ui-bg);
}

.bo-permission-editor-search {
    min-width: 190px;
    height: 32px;
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 7px;
    padding: 0 8px;
    border: 1px solid var(--bo-ui-border-strong);
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-bg);
}

.bo-permission-editor-search:focus-within {
    border-color: var(--bo-ui-primary);
    box-shadow: 0 0 0 1px var(--bo-ui-primary);
}

.bo-permission-editor-search i {
    color: var(--bo-ui-text-muted);
    font-size: 13px;
}

.bo-permission-editor-search input {
    width: 100%;
    height: 30px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--bo-ui-text);
    font: inherit;
}

.bo-permission-editor-filter,
.bo-permission-module-toggle,
.bo-permission-action {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
}

.bo-permission-editor-filter {
    flex: 0 0 auto;
    color: var(--bo-ui-text-muted);
    font-size: 13px;
    white-space: nowrap;
}

.bo-permission-editor-toolbar .bo-link-action {
    flex: 0 0 auto;
    font-size: 13px;
    white-space: nowrap;
}

.bo-permission-editor-summary {
    min-height: 30px;
    padding: 5px 9px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--bo-ui-border);
    background: var(--bo-ui-bg-muted);
    color: var(--bo-ui-text-muted);
    font-size: 13px;
}

.bo-permission-editor-layout {
    display: grid;
    grid-template-columns: 182px minmax(0, 1fr);
    align-items: start;
    overflow: visible;
    background: var(--bo-ui-bg);
}

.bo-permission-categories {
    border-right: 1px solid var(--bo-ui-border);
    background: var(--bo-ui-bg-muted);
}

.bo-permission-category {
    width: 100%;
    min-height: 48px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 0;
    border-bottom: 1px solid var(--bo-ui-border);
    background: transparent;
    color: var(--bo-ui-text);
    font: inherit;
    font-weight: 600;
    text-align: left;
}

.bo-permission-category:hover,
.bo-permission-category:focus-visible {
    background: var(--bo-ui-bg-hover);
}

.bo-permission-category:focus-visible {
    outline: 2px solid var(--bo-ui-primary);
    outline-offset: -2px;
}

.bo-permission-category.is-active {
    box-shadow: inset 3px 0 0 var(--bo-ui-primary);
    background: var(--bo-ui-bg);
    color: var(--bo-ui-primary);
}

.bo-permission-category strong {
    flex: 0 0 auto;
    color: var(--bo-ui-text-muted);
    font-size: 12px;
    font-weight: 600;
}

.bo-permission-panels {
    min-width: 0;
    overflow: visible;
}

.bo-permission-panel[hidden],
.bo-permission-category.is-filtered-out,
.bo-permission-module.is-filtered-out,
.bo-permission-action.is-filtered-out {
    display: none !important;
}

.bo-permission-panel-heading {
    min-height: 48px;
    padding: 7px 10px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--bo-ui-border);
    background: var(--bo-ui-bg-header);
}

.bo-permission-panel-heading h4,
.bo-permission-module-heading h5 {
    margin: 0;
    color: var(--bo-ui-text);
    font-size: 14px;
    font-weight: 700;
}

.bo-permission-panel-heading span,
.bo-permission-module-heading > div > span {
    color: var(--bo-ui-text-muted);
    font-size: 12px;
}

.bo-permission-module {
    border-bottom: 1px solid var(--bo-ui-border);
    background: var(--bo-ui-bg);
}

.bo-permission-module-heading {
    min-height: 38px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: var(--bo-ui-bg-subtle);
}

.bo-permission-module-toggle {
    color: var(--bo-ui-text-muted);
    font-size: 13px;
}

.bo-permission-actions {
    padding: 8px 10px 10px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    gap: 6px 8px;
}

.bo-permission-action {
    min-height: 32px;
    padding: 5px 7px;
    border: 1px solid var(--bo-ui-border);
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text);
    font-size: 14px;
}

.bo-permission-action:hover {
    border-color: var(--bo-ui-border-strong);
    background: var(--bo-ui-bg-hover);
}

.bo-permission-action:has(.bo-permission-leaf:checked) {
    border-color: var(--bo-ui-primary);
    background: var(--bo-ui-primary-soft);
}

.bo-permission-check.form-check-input {
    width: 14px;
    height: 14px;
    min-width: 14px;
    margin: 0;
    border-color: var(--bo-ui-border-strong);
    border-radius: 2px;
    box-shadow: none;
}

.bo-permission-check.form-check-input:checked,
.bo-permission-check.form-check-input:indeterminate {
    border-color: var(--bo-ui-primary);
    background-color: var(--bo-ui-primary);
}

.bo-permission-check.form-check-input:focus {
    border-color: var(--bo-ui-primary);
    box-shadow: 0 0 0 1px var(--bo-ui-primary);
}

.bo-permission-check.form-check-input:disabled {
    opacity: .8;
}

@media (max-width: 575.98px) {
    .bo-permission-editor-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .bo-permission-editor-filter,
    .bo-permission-editor-toolbar .bo-link-action {
        min-height: 28px;
    }

    .bo-permission-editor-layout {
        display: block;
        overflow: visible;
    }

    .bo-permission-categories {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        border-right: 0;
        border-bottom: 1px solid var(--bo-ui-border);
    }

    .bo-permission-category {
        width: auto;
        min-width: 160px;
        flex: 0 0 auto;
        border-right: 1px solid var(--bo-ui-border);
        border-bottom: 0;
    }

    .bo-permission-category.is-active {
        box-shadow: inset 0 -3px 0 var(--bo-ui-primary);
    }

    .bo-permission-panels {
        overflow: visible;
    }
}

.bo-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 2px;
    background: transparent;
    color: #526078;
}

.bo-icon-button:hover,
.bo-icon-button:focus-visible {
    border-color: var(--bo-ui-border);
    background: var(--bo-ui-bg-muted);
    color: var(--bo-ui-primary);
    outline: none;
}

.bo-icon-button[aria-expanded="true"] i {
    transform: rotate(90deg);
}

.bo-icon-button i {
    transition: transform .12s ease;
}

.bo-expanded-panel {
    padding: 8px 34px;
    border-bottom: 1px solid var(--bo-ui-border);
    background: var(--bo-ui-bg-subtle);
}

.bo-detail-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--bo-ui-text);
    font-size: 12px;
}

.bo-detail-table th,
.bo-detail-table td {
    padding: 5px 8px;
    border-bottom: 1px solid var(--bo-ui-border-cell);
    text-align: left;
}

.bo-detail-table th {
    color: var(--bo-ui-text-muted);
    font-size: 11px;
    font-weight: 600;
}

.bo-detail-table tr:last-child td {
    border-bottom: 0;
}

.bo-empty-cell {
    height: 54px;
    color: var(--bo-ui-text-muted) !important;
    text-align: center;
}

.bo-workspace .dataTables_wrapper .bo-table-toolbar,
.bo-workspace .dataTables_wrapper .bo-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 38px;
    padding: 5px 8px;
    gap: 8px;
}

.bo-workspace .dataTables_wrapper .bo-table-toolbar {
    border-bottom: 1px solid var(--bo-ui-border);
}

.bo-workspace .dataTables_wrapper .bo-table-footer {
    border-top: 1px solid var(--bo-ui-border);
}

.bo-workspace .dataTables_wrapper .dataTables_length,
.bo-workspace .dataTables_wrapper .dataTables_info {
    color: var(--bo-ui-text-muted);
    font-size: 11px;
}

.bo-workspace .dataTables_wrapper .dataTables_length select {
    min-width: 58px;
    height: 28px;
    margin: 0 4px;
    padding: 2px 22px 2px 6px;
    border-color: var(--bo-ui-border-strong);
    border-radius: 2px;
    font-size: 11px;
}

.bo-workspace .dt-buttons .btn {
    min-height: 28px;
    padding: 3px 8px;
    border: 1px solid var(--bo-ui-border-strong);
    border-radius: 2px;
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text);
    font-size: 11px;
    font-weight: 600;
    box-shadow: none;
}

.bo-workspace .dt-buttons .btn:hover {
    background: var(--bo-ui-bg-muted);
}

.dataTables_wrapper .dataTables_paginate .pagination,
.bo-workspace .pagination {
    gap: 0;
    margin: 0;
}

.dataTables_wrapper .dataTables_paginate .page-link,
.bo-workspace .page-link {
    display: inline-flex;
    min-width: 34px;
    min-height: 34px;
    padding: 6px 10px;
    border-color: var(--bo-ui-border);
    border-radius: 0 !important;
    background: var(--bo-ui-bg);
    color: #455269;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    box-shadow: none;
    align-items: center;
    justify-content: center;
}

.dataTables_wrapper .dataTables_paginate .page-item:first-child .page-link,
.bo-workspace .page-item:first-child .page-link {
    border-top-left-radius: var(--bo-ui-radius) !important;
    border-bottom-left-radius: var(--bo-ui-radius) !important;
}

.dataTables_wrapper .dataTables_paginate .page-item:last-child .page-link,
.bo-workspace .page-item:last-child .page-link {
    border-top-right-radius: var(--bo-ui-radius) !important;
    border-bottom-right-radius: var(--bo-ui-radius) !important;
}

.dataTables_wrapper .dataTables_paginate .page-item:not(.active):not(.disabled) .page-link:hover,
.dataTables_wrapper .dataTables_paginate .page-item:not(.active):not(.disabled) .page-link:focus,
.bo-workspace .page-item:not(.active):not(.disabled) .page-link:hover,
.bo-workspace .page-item:not(.active):not(.disabled) .page-link:focus {
    border-color: #aeb7c5;
    background: var(--bo-ui-bg-muted);
    color: var(--bo-ui-primary);
    box-shadow: none;
}

.dataTables_wrapper .dataTables_paginate .page-item.active .page-link,
.bo-workspace .page-item.active .page-link {
    border-color: var(--bo-ui-primary);
    background: var(--bo-ui-primary);
    color: #fff;
}

.dataTables_wrapper .dataTables_paginate .page-item.disabled .page-link,
.bo-workspace .page-item.disabled .page-link {
    border-color: var(--bo-ui-border);
    background: #f2f4f7;
    color: #98a2b3;
    opacity: 1;
}

.flatpickr-calendar {
    border: 1px solid var(--bo-ui-border-strong);
    border-radius: 2px;
    box-shadow: 0 4px 12px rgba(27, 39, 59, .12);
}

.bo-server-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 6px 10px;
    border-top: 1px solid var(--bo-ui-border);
    color: var(--bo-ui-text-muted);
    font-size: 12px;
}

.bo-server-footer nav,
.bo-server-footer .pagination {
    margin: 0;
}

.bo-shared-ip-table {
    min-width: 760px;
}

.bo-shared-ip-table > thead > tr > th:nth-child(1) {
    width: 170px;
}

.bo-shared-ip-table > thead > tr > th:nth-child(2) {
    width: 120px;
}

.bo-shared-ip-table > thead > tr > th:nth-child(4) {
    width: 120px;
}

.bo-shared-ip-table > thead > tr > th:nth-child(5) {
    width: 175px;
}

.bo-shared-ip-row {
    cursor: pointer;
}

.bo-shared-ip-row > td {
    height: 54px;
}

.bo-shared-ip-row:focus {
    outline: 2px solid var(--bo-ui-primary);
    outline-offset: -2px;
}

.bo-match-count {
    color: #354258;
    font-weight: 600;
    white-space: nowrap;
}

.bo-row-last-seen {
    display: inline-block;
    min-width: 126px;
    white-space: nowrap;
}

.bo-row-chevron {
    margin-left: 8px;
    color: #8791a3;
    font-size: 12px;
}

.bo-clickable-row {
    cursor: pointer;
}

.bo-clickable-row:focus {
    outline: 2px solid var(--bo-ui-primary);
    outline-offset: -2px;
}

.bo-clickable-row.is-active > td {
    background: var(--bo-ui-primary-soft);
}

.bo-table .bo-row-chevron {
    width: 34px;
    padding-right: 10px;
    padding-left: 6px;
    text-align: center;
}

.bo-text-success {
    color: var(--bo-ui-success) !important;
}

.bo-text-danger {
    color: var(--bo-ui-danger) !important;
}

.bo-text-warning {
    color: var(--bo-ui-warning) !important;
}

/* Global operational drawer: the default detail/edit surface for panel modules. */
.bo-operation-drawer {
    --bs-offcanvas-width: min(720px, 100vw);
    border-left: 1px solid var(--bo-ui-border-strong);
    background: var(--bo-ui-bg-muted);
    color: var(--bo-ui-text);
    box-shadow: none;
}

/* Compact preference surfaces reuse the operational drawer and theme tokens. */
.bo-operation-drawer.bo-operation-drawer-compact {
    --bs-offcanvas-width: min(420px, 100vw);
    width: min(420px, 100vw);
}

.bo-preference-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 76px;
    padding: 14px;
}

.bo-preference-row + .bo-preference-row {
    border-top: 1px solid var(--bo-ui-border);
}

.bo-preference-copy { min-width: 0; }
.bo-preference-copy > label {
    display: block;
    margin: 0 0 4px;
    color: var(--bo-ui-text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.bo-preference-meta {
    color: var(--bo-ui-text-muted);
    font-size: 12px;
    line-height: 1.5;
}
.bo-preference-meta strong {
    display: inline-block;
    margin-left: 4px;
    color: var(--bo-ui-primary);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.bo-preference-row > .bo-switch-control { flex: 0 0 auto; }
.bo-preference-detail {
    margin: 0 14px 14px;
    padding: 10px 12px;
    border: 1px solid var(--bo-ui-border);
    background: var(--bo-ui-bg-muted);
    color: var(--bo-ui-text-muted);
    font-size: 12px;
    overflow-wrap: anywhere;
}
.bo-preference-facts { margin: 0; }
.bo-preference-facts > div {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 10px;
    padding: 3px 0;
}
.bo-preference-facts dt { font-weight: 400; }
.bo-preference-facts dd {
    margin: 0;
    color: var(--bo-ui-text);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.bo-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 70px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--bo-ui-border);
    background: var(--bo-ui-bg);
}

.bo-drawer-header .btn-close {
    flex: 0 0 auto;
    margin: 0;
}

.bo-drawer-identity {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.bo-drawer-logo-frame {
    position: relative;
    display: flex;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    overflow: hidden;
    border: 1px solid var(--bo-ui-border);
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-bg-muted);
    align-items: center;
    justify-content: center;
}

.bo-drawer-logo-frame > img {
    width: 100%;
    height: 100%;
    padding: 3px;
    background: var(--bo-ui-bg);
    object-fit: contain;
}

.bo-drawer-logo-placeholder {
    display: inline-flex;
    color: var(--bo-ui-text-muted);
    font-size: 18px;
}

.bo-drawer-logo-frame .bo-media-image-loader .spinner-border {
    width: 1rem;
    height: 1rem;
}

.bo-drawer-header .offcanvas-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.bo-drawer-title-line {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bo-drawer-subtitle {
    margin-top: 3px;
    color: var(--bo-ui-text-muted);
    font-size: 13px;
}

.bo-drawer-body {
    padding: 14px 18px 18px;
    background: var(--bo-ui-bg-muted);
}

.bo-operation-drawer > .bo-drawer-body {
    flex: 1 1 auto;
    overflow-y: auto;
}

.bo-drawer-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid var(--bo-ui-border-strong);
    background: var(--bo-ui-bg);
}

.bo-drawer-summary-item {
    display: flex;
    min-width: 0;
    min-height: 64px;
    padding: 10px 12px;
    border-right: 1px solid var(--bo-ui-border);
    flex-direction: column;
    justify-content: center;
}

.bo-drawer-summary-item:last-child {
    border-right: 0;
}

.bo-drawer-summary-item span {
    color: var(--bo-ui-text-muted);
    font-size: 12px;
}

.bo-drawer-summary-item strong {
    margin-top: 3px;
    font-size: 17px;
    line-height: 1.1;
}

.bo-drawer-section {
    margin-top: 14px;
    border: 1px solid var(--bo-ui-border-strong);
    background: var(--bo-ui-bg);
}

.bo-drawer-section-first {
    margin-top: 0;
}

.bo-drawer-section-heading {
    display: flex;
    min-height: 42px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--bo-ui-border);
    align-items: center;
    justify-content: space-between;
}

.bo-drawer-section-heading h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.bo-drawer-section-body {
    padding: 12px;
}

.bo-drawer-section-body > :last-child {
    margin-bottom: 0;
}

.bo-drawer-footer {
    display: flex;
    min-height: 54px;
    padding: 10px 18px;
    border-top: 1px solid var(--bo-ui-border);
    background: var(--bo-ui-bg);
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
}

.bo-drawer-form {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
}

.bo-drawer-form .bo-drawer-body {
    flex: 1 1 auto;
}

.bo-drawer-form-grid {
    display: grid;
    padding: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.bo-drawer-form-grid .is-full {
    grid-column: 1 / -1;
}

.bo-operation-drawer .form-label {
    display: block;
    margin: 0 0 6px;
    color: var(--bo-ui-text-control);
    font-size: 12px;
    font-weight: 600;
}

.bo-operation-drawer .bo-inline-control {
    align-items: stretch;
    gap: 8px;
}

.bo-operation-drawer .invalid-feedback.d-block {
    margin-top: 5px;
}

.bo-operation-drawer .form-control,
.bo-operation-drawer .form-select {
    min-height: var(--bo-ui-control-height);
    height: var(--bo-ui-control-height);
    padding: 4px 8px;
    border-color: var(--bo-ui-border-strong);
    border-radius: var(--bo-ui-radius);
    color: var(--bo-ui-text);
    font-size: 14px;
    box-shadow: none;
}

.bo-operation-drawer .form-control:focus,
.bo-operation-drawer .form-select:focus {
    border-color: var(--bo-ui-primary);
    box-shadow: 0 0 0 1px var(--bo-ui-primary);
}

.bo-operation-drawer textarea.form-control {
    height: auto;
    min-height: 88px;
    resize: vertical;
}

.bo-switch-control.form-switch {
    display: inline-flex;
    min-height: 20px;
    padding-left: 0;
    align-items: center;
}

.bo-switch-control.form-switch .form-check-input {
    float: none;
    width: 2.25rem;
    height: 1.2rem;
    margin: 0;
    border-color: var(--bo-ui-border-strong);
    cursor: pointer;
    box-shadow: none;
}

.bo-switch-control.form-switch .form-check-input:focus {
    border-color: var(--bo-ui-primary);
    box-shadow: 0 0 0 1px var(--bo-ui-primary);
}

.bo-switch-control.form-switch .form-check-input:checked {
    border-color: var(--bo-ui-primary);
    background-color: var(--bo-ui-primary);
}

.bo-drawer-footer.bo-drawer-footer-split {
    justify-content: space-between;
}

.bo-drawer-footer-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bo-key-value-list {
    margin: 0;
}

.bo-key-value-list > div {
    display: grid;
    min-height: 38px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--bo-ui-border-cell);
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.bo-key-value-list > div:last-child {
    border-bottom: 0;
}

.bo-key-value-list dt {
    color: var(--bo-ui-text-muted);
    font-size: 12px;
    font-weight: 600;
}

.bo-key-value-list dd {
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 13px;
}

.bo-technical-value,
.bo-technical-input {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.bo-technical-value {
    display: flex;
    min-width: 0;
    margin-top: 3px;
    color: var(--bo-ui-text-muted);
    font-size: 11px;
    align-items: center;
    gap: 4px;
}

.bo-technical-value > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bo-transfer-flow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 74px minmax(0, 1fr);
    align-items: stretch;
}

.bo-transfer-leg {
    min-width: 0;
    padding: 12px;
}

.bo-transfer-leg > span {
    display: block;
    margin-bottom: 4px;
    color: var(--bo-ui-text-muted);
    font-size: 11px;
    font-weight: 600;
}

.bo-transfer-leg > strong,
.bo-transfer-leg > div:not(.bo-technical-value) {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bo-transfer-leg > strong {
    font-size: 14px;
}

.bo-transfer-leg > div:not(.bo-technical-value) {
    margin-top: 4px;
    font-size: 13px;
}

.bo-transfer-flow-arrow {
    display: flex;
    border-right: 1px solid var(--bo-ui-border);
    border-left: 1px solid var(--bo-ui-border);
    background: var(--bo-ui-bg-muted);
    color: var(--bo-ui-primary);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.bo-transfer-flow-arrow strong {
    font-size: 12px;
    white-space: nowrap;
}

.bo-transfer-stats {
    display: flex;
    margin-bottom: 10px;
    border: 1px solid var(--bo-ui-border);
    background: var(--bo-ui-bg);
}

.bo-transfer-stat {
    display: flex;
    min-width: 150px;
    min-height: 48px;
    padding: 7px 12px;
    border: 0;
    border-right: 1px solid var(--bo-ui-border);
    border-radius: 0;
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text);
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.bo-transfer-stat:last-child {
    border-right: 0;
}

.bo-transfer-stat:hover,
.bo-transfer-stat.is-active {
    background: var(--bo-ui-bg-hover);
}

.bo-transfer-stat.is-active {
    box-shadow: inset 0 -2px 0 var(--bo-ui-primary);
}

.bo-transfer-stat span {
    display: inline-flex;
    color: var(--bo-ui-text-muted);
    font-size: 13px;
    font-weight: 600;
    align-items: center;
    gap: 6px;
}

.bo-transfer-stat span::before {
    width: 6px;
    height: 6px;
    border-radius: 1px;
    background: #7b8494;
    content: "";
}

.bo-transfer-stat.is-warning span::before {
    background: #b77900;
}

.bo-transfer-stat.is-success span::before {
    background: var(--bo-ui-success);
}

.bo-transfer-stat.is-danger span::before {
    background: var(--bo-ui-danger);
}

.bo-transfer-stat strong {
    font-size: 18px;
    font-variant-numeric: tabular-nums;
}

.bo-transfer-table-toolbar {
    display: flex;
    min-height: 38px;
    padding: 5px 8px;
    border-bottom: 1px solid var(--bo-ui-border);
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.bo-transfer-table-meta {
    display: flex;
    color: var(--bo-ui-text-muted);
    font-size: 12px;
    gap: 18px;
}

.bo-transfer-table-meta strong {
    color: var(--bo-ui-text);
    font-variant-numeric: tabular-nums;
}

.bo-transfer-table {
    min-width: 940px;
}

.bo-transfer-table > thead > tr > th:nth-child(1) { width: 21%; }
.bo-transfer-table > thead > tr > th:nth-child(2),
.bo-transfer-table > thead > tr > th:nth-child(3) { width: 21%; }
.bo-transfer-table > thead > tr > th:nth-child(4) { width: 12%; }
.bo-transfer-table > thead > tr > th:nth-child(5) { width: 13%; }
.bo-transfer-table > thead > tr > th:nth-child(6) { width: 13%; }

.bo-transfer-row {
    cursor: pointer;
}

.bo-transfer-row:focus {
    outline: 2px solid var(--bo-ui-primary);
    outline-offset: -2px;
}

.bo-transfer-reference {
    overflow: hidden;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bo-risk-drawer {
    --bs-offcanvas-width: min(720px, 100vw);
    border-left: 1px solid var(--bo-ui-border-strong);
    color: var(--bo-ui-text);
    box-shadow: none;
}

.bo-risk-drawer-header {
    min-height: 70px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--bo-ui-border);
    background: var(--bo-ui-bg);
}

.bo-risk-drawer-header .offcanvas-title {
    font-size: 20px;
    font-weight: 700;
}

.bo-risk-drawer-subtitle {
    margin-top: 3px;
    color: var(--bo-ui-text-muted);
    font-size: 13px;
}

.bo-risk-drawer-body {
    padding: 14px 18px 18px;
    background: var(--bo-ui-bg-muted);
}

.bo-risk-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid var(--bo-ui-border-strong);
    background: var(--bo-ui-bg);
}

.bo-risk-summary-item {
    display: flex;
    min-width: 0;
    min-height: 64px;
    padding: 10px 12px;
    border: 0;
    border-right: 1px solid var(--bo-ui-border);
    border-radius: 0;
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
}

.bo-risk-summary-item:last-child {
    border-right: 0;
}

.bo-risk-summary-item span {
    color: var(--bo-ui-text-muted);
    font-size: 12px;
}

.bo-risk-summary-item strong {
    margin-top: 3px;
    font-size: 18px;
    line-height: 1;
}

.bo-risk-detail-section {
    margin-top: 14px;
    border: 1px solid var(--bo-ui-border-strong);
    background: var(--bo-ui-bg);
}

.bo-risk-section-heading {
    display: flex;
    min-height: 42px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--bo-ui-border);
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.bo-risk-section-heading h6 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.bo-risk-section-heading span {
    color: var(--bo-ui-text-muted);
    font-size: 12px;
}

.bo-risk-player-table {
    min-width: 610px;
    font-size: 13px;
}

.bo-risk-player-table th {
    padding: 7px 10px;
    border-bottom: 1px solid var(--bo-ui-border-strong);
    background: var(--bo-ui-bg-header);
    color: var(--bo-ui-text-header);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.bo-risk-player-table td {
    padding: 8px 10px;
    border-color: var(--bo-ui-border);
    vertical-align: middle;
}

.bo-risk-player-table td:first-child {
    min-width: 230px;
}

.bo-risk-player-table td strong,
.bo-risk-player-table td small {
    display: block;
}

.bo-risk-player-table td strong {
    font-size: 13px;
}

.bo-risk-player-table td small {
    margin-top: 2px;
    color: var(--bo-ui-text-muted);
    font-size: 11px;
    overflow-wrap: anywhere;
}

.bo-player-device-toggle {
    display: inline-flex;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--bo-ui-primary);
    font: inherit;
    font-weight: 600;
    line-height: inherit;
    align-items: center;
    gap: 3px;
}

.bo-player-device-toggle:hover,
.bo-player-device-toggle:focus-visible {
    color: #0847ab;
    text-decoration: underline;
    outline: none;
}

.bo-player-device-toggle i {
    display: inline-block;
    font-size: 9px;
    transition: transform .12s ease;
}

.bo-player-device-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.bo-player-device-empty {
    color: var(--bo-ui-text-muted);
}

.bo-risk-player-table .bo-player-device-detail > td {
    padding: 0;
    background: var(--bo-ui-bg-muted);
}

.bo-player-device-panel {
    padding: 8px 10px 10px;
}

.bo-block-count.is-danger {
    color: var(--bo-ui-danger);
    font-weight: 700;
}

.bo-risk-device-table {
    min-width: 650px;
    border: 1px solid var(--bo-ui-border-strong);
    font-size: 13px;
}

.bo-risk-device-table th {
    padding: 7px 10px;
    border-bottom: 1px solid var(--bo-ui-border-strong);
    background: var(--bo-ui-bg-header);
    color: var(--bo-ui-text-header);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.bo-risk-device-table td {
    padding: 8px 10px;
    border-color: var(--bo-ui-border);
    vertical-align: middle;
}

.bo-risk-device-table td:first-child {
    max-width: 280px;
    min-width: 240px;
}

.bo-risk-device-table td strong,
.bo-risk-device-table td small {
    display: block;
}

.bo-risk-device-table td strong {
    font-size: 13px;
}

.bo-risk-device-table td small {
    margin-top: 3px;
    overflow: hidden;
    color: var(--bo-ui-text-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bo-check-control {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    min-height: var(--bo-ui-control-height);
    margin: 0;
    padding: 4px 8px;
    border: 1px solid var(--bo-ui-border-strong);
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text);
    font-size: 14px;
    cursor: pointer;
}

.bo-check-control .form-check-input {
    width: 15px;
    height: 15px;
    margin: 0;
    border-color: var(--bo-ui-border-strong);
    border-radius: 2px;
    box-shadow: none;
}

.bo-check-control .form-check-input:focus {
    border-color: var(--bo-ui-primary);
    box-shadow: 0 0 0 1px var(--bo-ui-primary);
}

.bo-check-control .form-check-input:checked {
    border-color: var(--bo-ui-primary);
    background-color: var(--bo-ui-primary);
}

/* Mini CRM: compact player search and master-detail inspection */
.bo-crm-search-field {
    flex-basis: 440px;
}

.bo-crm-scope-field {
    flex-basis: 420px;
}

/* Backoffice transaction notifications: compact operational toast */
.bo-shell .swal2-popup.swal2-toast.transaction-toast {
    --transaction-toast-accent: var(--bo-ui-success);
    grid-template-columns: 20px minmax(0, 1fr) !important;
    column-gap: 8px;
    width: min(340px, calc(100vw - 20px));
    min-height: 50px;
    padding: 8px 10px 8px 8px;
    border: 1px solid var(--bo-ui-border);
    border-left: 3px solid var(--transaction-toast-accent);
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-bg);
    box-shadow: none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.bo-shell .swal2-popup.swal2-toast.transaction-toast--withdrawal {
    --transaction-toast-accent: var(--bo-ui-danger);
}

.bo-shell .swal2-popup.swal2-toast.transaction-toast--bank-account {
    --transaction-toast-accent: var(--bo-ui-warning);
    border-color: var(--bo-ui-warning);
}

body.bo-shell:not(.finance-shell) .swal2-popup.swal2-toast.transaction-toast--transfer {
    --transaction-toast-accent: var(--bo-ui-transfer-accent);
    background: var(--bo-ui-transfer-bg);
    border-color: var(--bo-ui-transfer-accent);
}

.bo-shell .swal2-popup.swal2-toast.transaction-toast .swal2-icon {
    width: 20px;
    min-width: 20px;
    height: 20px;
    border-radius: 0;
    background: transparent;
    color: var(--transaction-toast-accent);
    font-size: 16px;
}

.bo-shell .swal2-popup.swal2-toast.transaction-toast .swal2-title {
    color: var(--bo-ui-text);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.2;
}

.bo-shell .swal2-popup.swal2-toast.transaction-toast .swal2-html-container {
    margin-top: 2px;
    color: var(--bo-ui-text-muted);
    font-size: 12px;
    line-height: 1.25;
}

.bo-shell .transaction-toast .transaction-toast__player {
    color: var(--bo-ui-text);
    font-weight: 600;
}

.bo-shell .transaction-toast .transaction-toast__amount {
    font-weight: 650;
}

.bo-shell .swal2-popup.swal2-toast.transaction-toast .swal2-timer-progress-bar {
    height: 2px;
}

/* Shared compact feedback toast for copy and lightweight UI actions */
.bo-shell .swal2-popup.swal2-toast.bo-operation-toast {
    --bo-toast-accent: var(--bo-ui-primary);
    display: grid !important;
    width: min(320px, calc(100vw - 20px));
    min-height: 48px;
    padding: 9px 12px 10px 10px;
    border: 1px solid var(--bo-ui-border-strong);
    border-left: 3px solid var(--bo-toast-accent);
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-bg);
    box-shadow: none;
    color: var(--bo-ui-text);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    grid-template-columns: 7px minmax(0, 1fr) !important;
    column-gap: 9px;
    align-items: center;
}

.bo-shell .swal2-popup.swal2-toast.bo-operation-toast::before {
    width: 7px;
    height: 7px;
    background: var(--bo-toast-accent);
    content: "";
}

.bo-shell .swal2-popup.swal2-toast.bo-operation-toast.is-success {
    --bo-toast-accent: var(--bo-ui-success);
}

.bo-shell .swal2-popup.swal2-toast.bo-operation-toast.is-danger {
    --bo-toast-accent: var(--bo-ui-danger);
}

.bo-shell .swal2-popup.swal2-toast.bo-operation-toast.is-warning {
    --bo-toast-accent: var(--bo-ui-warning);
}

.bo-shell .swal2-popup.swal2-toast.bo-operation-toast .swal2-title {
    margin: 0;
    padding: 0;
    color: var(--bo-ui-text);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.3;
    text-align: left;
    grid-column: 2;
}

.bo-shell .swal2-popup.swal2-toast.bo-operation-toast .swal2-timer-progress-bar {
    height: 2px;
    background: var(--bo-toast-accent);
}

/* Backoffice withdrawals: Compact Operations UI */
.bo-withdrawals-workspace {
    min-width: 0;
}

.bo-withdrawal-stats {
    display: grid;
    margin-bottom: 10px;
    border: 1px solid var(--bo-ui-border-strong);
    background: var(--bo-ui-bg);
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bo-withdrawal-stat {
    display: flex;
    min-width: 0;
    min-height: 72px;
    padding: 8px 12px;
    border: 0;
    border-right: 1px solid var(--bo-ui-border);
    border-radius: 0;
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text);
    flex-direction: column;
    justify-content: center;
    text-align: left;
    box-shadow: none;
}

.bo-withdrawal-stat:last-child {
    border-right: 0;
}

.bo-withdrawal-stat:hover,
.bo-withdrawal-stat:focus-visible {
    background: var(--bo-ui-bg-hover);
    outline: none;
}

.bo-withdrawal-stat:focus-visible {
    box-shadow: inset 0 0 0 2px var(--bo-ui-primary);
}

.bo-withdrawal-stat.active {
    background: var(--bo-ui-primary-soft);
    box-shadow: inset 0 -3px 0 var(--bo-ui-primary);
}

.bo-withdrawal-stat > span {
    color: var(--bo-ui-text-muted);
    font-size: 12px;
    font-weight: 600;
}

.bo-withdrawal-stat > strong {
    margin-top: 2px;
    color: var(--bo-ui-text);
    font-size: 20px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.bo-withdrawal-stat > strong.is-warning { color: var(--bo-ui-warning); }
.bo-withdrawal-stat > strong.is-success { color: var(--bo-ui-success); }
.bo-withdrawal-stat > strong.is-danger { color: var(--bo-ui-danger); }

.bo-withdrawal-stat > small {
    margin-top: 3px;
    color: var(--bo-ui-text-muted);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.2;
}

.bo-withdrawal-filterbar .bo-filter-field {
    flex-basis: 172px;
    min-width: 150px;
}

.bo-withdrawal-filterbar .bo-filter-field.is-compact {
    flex-basis: 140px;
}

.bo-withdrawal-filterbar .bo-filter-field.is-date {
    flex-basis: 176px;
}

.bo-withdrawal-filterbar .bo-filter-actions {
    flex-wrap: wrap;
}

.bo-withdrawal-table-heading {
    display: flex;
    min-height: 46px;
    padding: 6px 8px 6px 10px;
    border-bottom: 1px solid var(--bo-ui-border);
    background: var(--bo-ui-bg);
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.bo-withdrawal-table-heading h2 {
    margin: 0;
    color: var(--bo-ui-text);
    font-size: 14px;
    font-weight: 700;
}

.bo-withdrawal-table-heading > div:first-child > span {
    display: block;
    margin-top: 1px;
    color: var(--bo-ui-text-muted);
    font-size: 11px;
}

.bo-withdrawal-table-actions {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.bo-withdrawal-table-actions .dt-buttons,
.bo-withdrawal-table-actions .dt-button {
    margin: 0;
}

.bo-withdrawal-search {
    display: flex;
    width: 270px;
    height: var(--bo-ui-control-height);
    padding: 0 8px;
    border: 1px solid var(--bo-ui-border-strong);
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text-muted);
    align-items: center;
    gap: 6px;
}

.bo-withdrawal-search:focus-within {
    border-color: var(--bo-ui-primary);
    box-shadow: 0 0 0 1px var(--bo-ui-primary);
}

.bo-withdrawal-search input {
    width: 100%;
    min-width: 0;
    height: 30px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--bo-ui-text);
    font: inherit;
    font-size: 13px;
}

.bo-withdrawal-search input::placeholder {
    color: var(--bo-ui-text-muted);
}

.bo-withdrawal-table {
    min-width: 1180px;
    table-layout: fixed;
}

.bo-withdrawal-table > thead > tr > th:nth-child(1) { width: 10%; }
.bo-withdrawal-table > thead > tr > th:nth-child(2) { width: 11%; }
.bo-withdrawal-table > thead > tr > th:nth-child(3) { width: 14%; }
.bo-withdrawal-table > thead > tr > th:nth-child(4) { width: 11%; }
.bo-withdrawal-table > thead > tr > th:nth-last-child(5) { width: 12%; }
.bo-withdrawal-table > thead > tr > th:nth-last-child(4) { width: 20%; }
.bo-withdrawal-table > thead > tr > th:nth-last-child(3) { width: 10%; }
.bo-withdrawal-table > thead > tr > th:nth-last-child(2) { width: 112px; }
.bo-withdrawal-table > thead > tr > th:last-child { width: 34px; }

.bo-withdrawal-table > tbody > tr {
    cursor: pointer;
}

.bo-withdrawal-table > tbody > tr:focus > td {
    background: var(--bo-ui-primary-soft);
    outline: none;
}

.bo-withdrawal-table > tfoot > tr > td {
    padding: 7px 10px;
    border-top: 1px solid var(--bo-ui-border-strong);
    border-bottom: 0;
    background: var(--bo-ui-bg-subtle);
    color: var(--bo-ui-text);
    font-size: 13px;
    font-weight: 700;
}

.bo-withdrawal-account {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bo-withdrawal-source {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.bo-withdrawal-source-stack {
    display: inline-flex;
    max-width: 100%;
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
}

.bo-withdrawal-source-creator {
    overflow: hidden;
    color: var(--bo-ui-text-muted);
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
}

.bo-withdrawal-source-creator::before {
    margin-right: 5px;
    color: var(--bo-ui-border-strong);
    content: "·";
}

.bo-withdrawal-bank-cell {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 7px;
}

.bo-withdrawal-bank-cell-logo,
.bo-withdrawal-bank-logo {
    display: flex;
    overflow: hidden;
    border: 1px solid var(--bo-ui-border);
    border-radius: 2px;
    background: #fff;
    align-items: center;
    justify-content: center;
}

.bo-withdrawal-bank-cell-logo {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    color: #657086;
}

.bo-withdrawal-bank-cell-logo img,
.bo-withdrawal-bank-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.bo-withdrawal-bank-cell-copy {
    display: block;
    min-width: 0;
}

.bo-withdrawal-bank-cell-copy > strong,
.bo-withdrawal-bank-cell-copy > small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bo-withdrawal-bank-cell-copy > strong {
    font-size: 13px;
    font-weight: 600;
}

.bo-withdrawal-bank-cell-copy > small.bo-technical-value {
    margin-top: 2px;
    font-size: 10px;
}

.bo-withdrawal-detail-player {
    display: flex;
    min-width: 0;
    margin-top: 3px;
    color: var(--bo-ui-text-muted);
    font-size: 13px;
    font-weight: 600;
    align-items: center;
    gap: 5px;
}

.bo-withdrawal-detail-player span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bo-withdrawal-drawer-state {
    display: flex;
    min-height: 110px;
    color: var(--bo-ui-text-muted);
    font-size: 13px;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.bo-withdrawal-detail-grid {
    display: grid;
    margin-top: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: start;
}

.bo-withdrawal-detail-grid .bo-drawer-section {
    margin-top: 0;
}

.bo-withdrawal-detail-section-wide {
    grid-column: 1 / -1;
}

.bo-withdrawal-detail-grid .bo-drawer-section-heading h3 {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bo-withdrawal-detail-grid .bo-drawer-section-heading h3 i {
    color: var(--bo-ui-text-muted);
}

.bo-withdrawal-detail-note {
    color: var(--bo-ui-text);
    font-size: 13px;
    line-height: 1.4;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

#withdrawalDetailActions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bo-withdrawal-single-column {
    grid-template-columns: 1fr;
}

.bo-required {
    color: var(--bo-ui-danger);
}

.bo-withdrawal-bank-check {
    display: flex;
    min-height: 54px;
    margin-top: 8px;
    padding: 7px 8px;
    border: 1px solid color-mix(in srgb, var(--bo-ui-success) 45%, var(--bo-ui-border));
    background: var(--bo-ui-success-soft);
    align-items: center;
    gap: 8px;
}

.bo-withdrawal-bank-check.is-invalid,
.bo-withdrawal-bank-check.is-unknown {
    border-color: color-mix(in srgb, var(--bo-ui-warning) 45%, var(--bo-ui-border));
    background: var(--bo-ui-warning-soft);
}

.bo-withdrawal-bank-logo {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    color: #657086;
}

.bo-withdrawal-bank-copy {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
}

.bo-withdrawal-bank-copy > span,
.bo-withdrawal-bank-copy > small {
    color: var(--bo-ui-text-muted);
    font-size: 11px;
}

.bo-withdrawal-bank-copy > strong {
    overflow: hidden;
    color: var(--bo-ui-text);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bo-withdrawal-bank-status {
    color: var(--bo-ui-success);
}

.bo-withdrawal-bank-check.is-invalid .bo-withdrawal-bank-status,
.bo-withdrawal-bank-check.is-unknown .bo-withdrawal-bank-status {
    color: var(--bo-ui-warning);
}

@media (max-width: 991.98px) {
    .bo-withdrawal-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bo-withdrawal-stat:nth-child(2) {
        border-right: 0;
    }

    .bo-withdrawal-stat:nth-child(-n + 2) {
        border-bottom: 1px solid var(--bo-ui-border);
    }
}

@media (max-width: 575.98px) {
    .bo-withdrawal-stats,
    .bo-withdrawal-detail-grid {
        grid-template-columns: 1fr;
    }

    .bo-withdrawal-stat,
    .bo-withdrawal-stat:nth-child(2) {
        border-right: 0;
        border-bottom: 1px solid var(--bo-ui-border);
    }

    .bo-withdrawal-stat:last-child {
        border-bottom: 0;
    }

    .bo-withdrawal-detail-section-wide {
        grid-column: auto;
    }

    .bo-withdrawal-table-heading,
    .bo-withdrawal-table-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .bo-withdrawal-table-actions,
    .bo-withdrawal-search {
        width: 100%;
    }

    .bo-withdrawal-table-actions {
        justify-content: flex-start;
    }

    .bo-drawer-footer.bo-drawer-footer-split {
        align-items: stretch;
        flex-direction: column;
    }

    #withdrawalDetailActions,
    .bo-drawer-footer-actions {
        width: 100%;
        flex-wrap: wrap;
    }
}

/* Backoffice deposits: Compact Operations UI */
.bo-deposits-workspace { min-width: 0; }

.bo-deposit-stats {
    display: grid;
    margin-bottom: 10px;
    border: 1px solid var(--bo-ui-border-strong);
    background: var(--bo-ui-bg);
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bo-deposit-stat {
    display: flex;
    min-width: 0;
    min-height: 72px;
    padding: 8px 12px;
    border: 0;
    border-right: 1px solid var(--bo-ui-border);
    border-radius: 0;
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text);
    flex-direction: column;
    justify-content: center;
    text-align: left;
    box-shadow: none;
}

.bo-deposit-stat:last-child { border-right: 0; }
.bo-deposit-stat:hover,
.bo-deposit-stat:focus-visible { background: var(--bo-ui-bg-hover); outline: 0; }
.bo-deposit-stat:focus-visible { box-shadow: inset 0 0 0 2px var(--bo-ui-primary); }
.bo-deposit-stat.active { background: var(--bo-ui-primary-soft); box-shadow: inset 0 -3px 0 var(--bo-ui-primary); }
.bo-deposit-stat > span { color: var(--bo-ui-text-muted); font-size: 12px; font-weight: 600; }
.bo-deposit-stat > strong { margin-top: 2px; color: var(--bo-ui-text); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.bo-deposit-stat > strong.is-warning { color: var(--bo-ui-warning); }
.bo-deposit-stat > strong.is-success { color: var(--bo-ui-success); }
.bo-deposit-stat > strong.is-danger { color: var(--bo-ui-danger); }
.bo-deposit-stat > small { margin-top: 3px; color: var(--bo-ui-text-muted); font-size: 11px; line-height: 1.2; }

.bo-deposit-filterbar .bo-filter-field { min-width: 150px; flex-basis: 172px; }
.bo-deposit-filterbar .bo-filter-field.is-compact { flex-basis: 140px; }
.bo-deposit-filterbar .bo-filter-field.is-date { flex-basis: 176px; }
.bo-deposit-filterbar .bo-filter-actions { flex-wrap: wrap; }

.bo-deposit-table-heading {
    display: flex;
    min-height: 46px;
    padding: 6px 8px 6px 10px;
    border-bottom: 1px solid var(--bo-ui-border);
    background: var(--bo-ui-bg);
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.bo-deposit-table-heading h2 { margin: 0; color: var(--bo-ui-text); font-size: 14px; font-weight: 700; }
.bo-deposit-table-heading > div:first-child > span { display: block; margin-top: 1px; color: var(--bo-ui-text-muted); font-size: 11px; }
.bo-deposit-table-actions { display: flex; min-width: 0; align-items: center; justify-content: flex-end; gap: 6px; }
.bo-deposit-table-actions .dt-buttons,
.bo-deposit-table-actions .dt-button { margin: 0; }

.bo-deposit-search {
    display: flex;
    width: 270px;
    height: var(--bo-ui-control-height);
    padding: 0 8px;
    border: 1px solid var(--bo-ui-border-strong);
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text-muted);
    align-items: center;
    gap: 6px;
}

.bo-deposit-search:focus-within { border-color: var(--bo-ui-primary); box-shadow: 0 0 0 1px var(--bo-ui-primary); }
.bo-deposit-search input { width: 100%; min-width: 0; height: 30px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--bo-ui-text); font: inherit; font-size: 13px; }
.bo-deposit-search input::placeholder { color: var(--bo-ui-text-muted); }

.bo-deposit-table { min-width: 1120px; table-layout: fixed; }
.bo-deposit-table > thead > tr > th:nth-child(1) { width: 12%; }
.bo-deposit-table > thead > tr > th:nth-child(2) { width: 11%; }
.bo-deposit-table > thead > tr > th:nth-child(3) { width: 18%; }
.bo-deposit-table > thead > tr > th:nth-child(4) { width: 13%; }
.bo-deposit-table > thead > tr > th:nth-child(5) { width: 10%; }
.bo-deposit-table > thead > tr > th:nth-child(6) { width: 13%; }
.bo-deposit-table > thead > tr > th:nth-child(7) { width: 10%; }
.bo-deposit-table > thead > tr > th:nth-child(8) { width: 112px; }
.bo-deposit-table > thead > tr > th:last-child { width: 34px; }
.bo-deposit-table > tbody > tr { cursor: pointer; }
.bo-deposit-table > tbody > tr:focus > td { background: var(--bo-ui-primary-soft); outline: 0; }
.bo-deposit-table > tfoot > tr > td { padding: 7px 10px; border-top: 1px solid var(--bo-ui-border-strong); border-bottom: 0; background: var(--bo-ui-bg-subtle); color: var(--bo-ui-text); font-size: 13px; font-weight: 700; }

.bo-deposit-source { display: inline-flex; max-width: 100%; align-items: center; gap: 5px; white-space: nowrap; }
.bo-deposit-source-creator { display: inline-flex; overflow: hidden; color: var(--bo-ui-text-muted); font-size: 12px; font-weight: 600; text-overflow: ellipsis; align-items: center; }
.bo-deposit-source-creator::before { width: 3px; height: 3px; margin-right: 5px; background: var(--bo-ui-border-strong); content: ""; flex: 0 0 3px; }
.bo-deposit-customer { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.bo-deposit-player-id {
    display: flex;
    min-width: 0;
    margin-top: 3px;
    color: var(--bo-ui-text-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    align-items: center;
    gap: 4px;
}

.bo-deposit-player-id > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bo-deposit-player-id button { display: inline-flex; width: 22px; height: 22px; padding: 0; border: 0; background: transparent; color: var(--bo-ui-text-muted); align-items: center; justify-content: center; }
.bo-deposit-player-id button:hover,
.bo-deposit-player-id button:focus-visible { color: var(--bo-ui-primary); outline: 0; }

.bo-deposit-amount-change { display: flex; align-items: flex-end; flex-direction: column; }
.bo-deposit-amount-change s,
.bo-deposit-amount-change small { color: var(--bo-ui-text-muted); font-size: 11px; }

.bo-deposit-payment { display: inline-flex; color: var(--bo-ui-text); font-size: 13px; font-weight: 600; align-items: center; gap: 5px; }
.bo-deposit-payment > i { color: var(--bo-ui-text-muted); }
.bo-deposit-payment.is-crypto > i { color: var(--bo-ui-warning); }

.bo-deposit-detail-player { display: flex; min-width: 0; margin-top: 3px; color: var(--bo-ui-text-muted); font-size: 13px; font-weight: 600; align-items: center; gap: 5px; }
.bo-deposit-detail-player span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bo-deposit-drawer-state { display: flex; min-height: 110px; color: var(--bo-ui-text-muted); font-size: 13px; align-items: center; justify-content: center; gap: 7px; }
.bo-deposit-detail-summary > div > small { color: var(--bo-ui-text-muted); }
.bo-deposit-detail-grid { display: grid; margin-top: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
.bo-deposit-detail-grid .bo-drawer-section { margin-top: 0; }
.bo-deposit-detail-section-wide { grid-column: 1 / -1; }
.bo-deposit-detail-grid .bo-drawer-section-heading h3 { display: inline-flex; align-items: center; gap: 6px; }
.bo-deposit-detail-grid .bo-drawer-section-heading h3 i { color: var(--bo-ui-text-muted); }
.bo-deposit-detail-note { color: var(--bo-ui-text); font-weight: 600; white-space: pre-wrap; overflow-wrap: anywhere; }
.bo-deposit-single-column { grid-template-columns: 1fr; }

@media (max-width: 767.98px) {
    .bo-deposit-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bo-deposit-stat:nth-child(2) { border-right: 0; }
    .bo-deposit-stat:nth-child(-n + 2) { border-bottom: 1px solid var(--bo-ui-border); }
}

@media (max-width: 575.98px) {
    .bo-deposit-stats,
    .bo-deposit-detail-grid { grid-template-columns: 1fr; }
    .bo-deposit-stat,
    .bo-deposit-stat:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--bo-ui-border); }
    .bo-deposit-stat:last-child { border-bottom: 0; }
    .bo-deposit-detail-section-wide { grid-column: auto; }
    .bo-deposit-table-heading,
    .bo-deposit-table-actions { align-items: stretch; flex-direction: column; }
    .bo-deposit-table-actions,
    .bo-deposit-search { width: 100%; }
    .bo-deposit-table-actions { justify-content: flex-start; }
}

/* Transaction logs: Compact Operations UI */
.bo-transaction-filterbar {
    padding: 8px 10px;
    box-shadow: none;
}

.bo-transaction-logs-workspace .filter-section-heading {
    display: flex;
    min-height: 22px;
    margin: 0 0 6px;
    color: var(--bo-ui-text);
    align-items: center;
    gap: 6px;
}

.bo-transaction-logs-workspace .filter-section-heading > span {
    font-size: 12px;
    font-weight: 700;
}

.bo-transaction-logs-workspace .filter-section-heading > small {
    display: none;
}

.bo-transaction-logs-workspace .filter-chip-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.bo-transaction-logs-workspace .filter-chip-bar-basic {
    align-items: flex-start;
}

.bo-transaction-logs-workspace .transaction-date-filter-control {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.bo-transaction-logs-workspace .transaction-date-filter-toggle.bo-check-control {
    width: auto;
    min-height: 16px;
    padding: 0 2px;
    border: 0;
    background: transparent;
    color: var(--bo-ui-text-muted);
    font-size: 11px;
    gap: 5px;
}

.bo-transaction-logs-workspace .transaction-date-filter-toggle .form-check-input {
    width: 13px;
    height: 13px;
}

.bo-transaction-logs-workspace .filter-chip-date.is-disabled {
    background: var(--bo-ui-bg-muted);
    opacity: .65;
}

.bo-transaction-logs-workspace .filter-chip {
    display: inline-flex;
    min-width: 138px;
    height: var(--bo-ui-control-height);
    padding: 0 8px;
    border: 1px solid var(--bo-ui-border-strong);
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text);
    font-size: 14px;
    box-shadow: none;
    align-items: center;
    gap: 6px;
}

.bo-transaction-logs-workspace .filter-chip:focus-within {
    border-color: var(--bo-ui-primary);
    background: var(--bo-ui-bg);
    box-shadow: 0 0 0 1px var(--bo-ui-primary);
}

.bo-transaction-logs-workspace .filter-chip > i {
    color: var(--bo-ui-text-muted);
    font-size: 13px;
}

.bo-transaction-logs-workspace .filter-chip-label {
    color: var(--bo-ui-text-muted);
    font-size: 12px;
    font-weight: 600;
}

.bo-transaction-logs-workspace .filter-chip select,
.bo-transaction-logs-workspace .filter-chip input {
    min-width: 86px;
    max-width: 160px;
    height: 30px;
    padding: 2px 20px 2px 0;
    border: 0;
    border-radius: 0;
    outline: 0;
    background-color: transparent;
    color: var(--bo-ui-text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    box-shadow: none;
}

.bo-transaction-logs-workspace .filter-chip-date input {
    width: 126px;
    min-width: 126px;
    padding-right: 0;
}

.bo-transaction-logs-workspace .filter-chip-wide select {
    min-width: 140px;
    max-width: 190px;
}

.bo-transaction-logs-workspace .filter-action {
    display: inline-flex;
    min-height: var(--bo-ui-control-height);
    height: var(--bo-ui-control-height);
    padding: 4px 10px;
    border: 1px solid var(--bo-ui-border-strong);
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    box-shadow: none;
    align-items: center;
    gap: 5px;
}

.bo-transaction-logs-workspace .filter-action:hover {
    border-color: #aeb7c5;
    background: var(--bo-ui-bg-muted);
    color: var(--bo-ui-text);
}

.bo-transaction-logs-workspace .filter-action-primary,
.bo-transaction-logs-workspace .filter-action-primary:hover {
    border-color: var(--bo-ui-primary);
    background: var(--bo-ui-primary);
    color: #fff;
}

.bo-transaction-logs-workspace .filter-action-advanced {
    border-color: #aac5ee;
    background: var(--bo-ui-primary-soft);
    color: var(--bo-ui-primary);
}

.bo-transaction-logs-workspace .advanced-filter-chevron {
    margin-left: 2px;
    transition: transform .12s ease;
}

.bo-transaction-logs-workspace .filter-action-advanced[aria-expanded="true"] .advanced-filter-chevron {
    transform: rotate(180deg);
}

.bo-transaction-logs-workspace .filter-advanced-collapse {
    margin-top: 8px;
}

.bo-transaction-logs-workspace .advanced-filter-panel {
    padding: 8px;
    border: 1px solid var(--bo-ui-border);
    border-radius: 0;
    background: var(--bo-ui-bg-subtle);
}

.bo-transaction-logs-workspace .text-filter-section {
    margin-top: 8px;
    padding-top: 8px;
    border-top-color: var(--bo-ui-border);
}

.bo-transaction-logs-workspace .text-filter-header {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
}

.bo-transaction-logs-workspace .text-filter-title {
    color: var(--bo-ui-text);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

.bo-transaction-logs-workspace .text-filter-add-control {
    display: inline-flex;
    width: 210px;
    height: var(--bo-ui-control-height);
    padding: 0 7px;
    border: 1px solid var(--bo-ui-border-strong);
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text-muted);
    align-items: center;
    gap: 5px;
}

.bo-transaction-logs-workspace .text-filter-add-control:focus-within {
    border-color: var(--bo-ui-primary);
    box-shadow: 0 0 0 1px var(--bo-ui-primary);
}

.bo-transaction-logs-workspace .text-filter-add-control > i {
    font-size: 12px;
}

.bo-transaction-logs-workspace .text-filter-add-control select {
    width: 100%;
    height: 30px;
    padding: 2px 20px 2px 0;
    border: 0;
    outline: 0;
    background-color: transparent;
    color: var(--bo-ui-text);
    font-family: inherit;
    font-size: 13px;
    box-shadow: none;
}

.bo-transaction-logs-workspace .active-filter-count {
    display: inline-flex;
    min-height: 28px;
    padding: 3px 8px;
    border-color: var(--bo-ui-border-strong);
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text-control);
    font-size: 12px;
    font-weight: 600;
    box-shadow: none;
    align-items: center;
    gap: 5px;
}

.bo-transaction-logs-workspace .active-filter-count {
    margin-left: auto;
    border-color: var(--bo-ui-border);
    background: var(--bo-ui-bg-muted);
    color: var(--bo-ui-text-muted);
}

.bo-transaction-logs-workspace .dynamic-filters-grid {
    display: flex;
    flex-wrap: wrap;
    margin-top: 7px;
    gap: 6px;
}

.bo-transaction-logs-workspace .dynamic-filter-card {
    display: inline-flex;
    min-height: 36px;
    padding: 3px 5px 3px 8px;
    border-color: var(--bo-ui-border);
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-bg);
    align-items: center;
    gap: 6px;
}

.bo-transaction-logs-workspace .dynamic-filter-card .filter-meta {
    display: flex;
    margin: 0;
    align-items: center;
    gap: 4px;
}

.bo-transaction-logs-workspace .dynamic-filter-card .filter-label {
    color: var(--bo-ui-text-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.bo-transaction-logs-workspace .dynamic-filter-card .dynamic-filter-input {
    width: 155px;
    height: 28px;
    min-height: 28px;
    border-radius: 2px;
    font-size: 13px;
}

.bo-transaction-logs-workspace .dynamic-filter-card .filter-remove {
    order: 2;
    padding: 0;
    border: 0;
    background: transparent;
    color: #8791a3;
    font-size: 11px;
    line-height: 1;
}

.bo-transaction-logs-workspace .dynamic-filter-card .filter-remove:hover {
    color: var(--bo-ui-danger);
}

.bo-transaction-logs-workspace .empty-filter-state {
    margin-top: 6px;
    color: var(--bo-ui-text-muted);
    font-size: 12px;
}

.bo-transaction-table-heading {
    display: flex;
    min-height: 42px;
    padding: 6px 10px;
    border-bottom: 1px solid var(--bo-ui-border);
    background: var(--bo-ui-bg);
    align-items: center;
    justify-content: space-between;
}

.bo-transaction-table-shell {
    box-shadow: none;
}

.bo-transaction-table-heading > strong {
    font-size: 14px;
    font-weight: 700;
}

.bo-transaction-table-shell .excel-table-wrap {
    overflow-x: auto;
    border: 0;
    border-radius: 0;
}

.bo-transaction-table-shell .excel-table {
    min-width: 980px;
    table-layout: fixed;
}

.bo-transaction-table-shell .excel-table th:nth-child(1) { width: 17%; }
.bo-transaction-table-shell .excel-table th:nth-child(2) { width: 12%; }
.bo-transaction-table-shell .excel-table th:nth-child(3) { width: 25%; }
.bo-transaction-table-shell .excel-table th:nth-child(4) { width: 10%; }
.bo-transaction-table-shell .excel-table th:nth-child(5) { width: 13%; }
.bo-transaction-table-shell .excel-table th:nth-child(6) { width: 12%; }
.bo-transaction-table-shell .excel-table th:nth-child(7) { width: 11%; }

/* Transaction Logs ends at Tarih. This also suppresses a stale compiled
   eight-column view until Laravel's production view cache is cleared. */
.bo-transaction-table-shell #transactionLogsTable tr > :nth-child(n + 8) {
    display: none !important;
}

.bo-transaction-table-shell .excel-table.dataTable thead th,
.bo-transaction-table-shell .excel-table thead th {
    position: relative;
    height: 38px;
    padding: 7px 10px;
    background: var(--bo-ui-bg-header);
    color: var(--bo-ui-text-header);
    font-size: 14px !important;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0;
    text-transform: none;
}

.bo-transaction-table-shell .excel-table th,
.bo-transaction-table-shell .excel-table td {
    padding: 8px 10px;
    border-color: var(--bo-ui-border-cell);
    font-size: 14px;
    line-height: 1.25;
}

.bo-transaction-table-shell .excel-table tbody tr > td {
    height: 54px;
    background: var(--bo-ui-bg);
}

.bo-transaction-table-shell .excel-table tbody tr:hover > td {
    background: var(--bo-ui-bg-hover);
}

.bo-transaction-table-shell .excel-table tbody tr:focus > td {
    background: var(--bo-ui-primary-soft) !important;
    outline: 0;
}

.bo-transaction-table-shell .excel-table tfoot th {
    position: static;
    padding: 7px 10px;
    border-top: 1px solid var(--bo-ui-border-strong);
    background: var(--bo-ui-bg-subtle);
    color: var(--bo-ui-text-muted);
    font-size: 12px;
    letter-spacing: 0;
    text-transform: none;
}

.bo-transaction-table-shell .bo-technical-value {
    display: block;
    margin-top: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bo-transaction-table-shell .bo-table-secondary.bo-technical-value {
    margin-top: 2px;
}

.bo-transaction-table-shell .dataTables_wrapper .bo-table-toolbar,
.bo-transaction-table-shell .dataTables_wrapper .bo-table-footer {
    padding-right: 10px;
    padding-left: 10px;
}

.bo-transaction-table-shell .dataTables_filter {
    display: flex;
    align-items: center;
}

.bo-transaction-table-shell .dataTables_filter label {
    display: flex;
    color: var(--bo-ui-text-muted);
    font-size: 12px;
    align-items: center;
    gap: 5px;
}

.bo-transaction-table-shell .dataTables_filter input {
    width: 210px;
    height: var(--bo-ui-control-height);
    margin-left: 0;
    padding: 4px 8px;
    border: 1px solid var(--bo-ui-border-strong);
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text);
    font-size: 13px;
    box-shadow: none;
}

.bo-transaction-type {
    display: inline-flex;
    color: var(--bo-ui-text-muted);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    align-items: center;
    gap: 5px;
}

.bo-transaction-logs-workspace .transaction-type-badges {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
}

.bo-special-withdrawal-category {
    display: inline-flex;
    color: var(--bo-ui-warning);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    align-items: center;
    gap: 5px;
}

.bo-special-withdrawal-category > i {
    width: 14px;
    font-size: 11px;
    text-align: center;
}

.bo-transaction-type.is-deposit {
    color: var(--bo-ui-success);
}

.bo-transaction-type.is-withdrawal {
    color: var(--bo-ui-danger);
}

.bo-transaction-amount {
    font-weight: 600;
    white-space: nowrap;
}

.bo-operation-drawer.transaction-detail-drawer {
    --bs-offcanvas-width: min(720px, 100vw);
    border-left-color: var(--bo-ui-border-strong);
    background: var(--bo-ui-bg-muted);
    box-shadow: none;
}

.bo-operation-drawer .transaction-detail-header {
    position: relative;
    min-height: 76px;
    padding: 12px 18px;
    align-items: center;
}

.bo-operation-drawer .transaction-detail-header > .min-w-0 {
    width: 100%;
    flex: 1 1 auto;
}

.bo-operation-drawer .transaction-detail-header > .min-w-0 > .d-flex,
.bo-operation-drawer .transaction-detail-header .transaction-detail-date,
.bo-operation-drawer .transaction-detail-header .transaction-detail-reference {
    padding-right: 34px;
}

.bo-operation-drawer .transaction-detail-header > .btn-close {
    position: absolute;
    top: 14px;
    right: 18px;
}

.bo-operation-drawer .transaction-detail-header .offcanvas-title {
    overflow: hidden;
    color: var(--bo-ui-text);
    font-size: 18px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bo-operation-drawer .transaction-detail-date {
    margin-top: 3px;
    color: var(--bo-ui-text-muted);
    font-size: 12px;
}

.bo-operation-drawer .transaction-detail-reference {
    display: flex;
    margin-top: 3px;
    color: var(--bo-ui-text-muted);
    font-size: 13px;
    font-weight: 600;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
}

.bo-operation-drawer .transaction-detail-reference i {
    color: var(--bo-ui-text-muted);
}

.bo-operation-drawer .transaction-detail-reference span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bo-operation-drawer .transaction-detail-body {
    padding: 0 18px 18px;
    background: var(--bo-ui-bg-muted);
}

.bo-operation-drawer .transaction-drawer-tabs {
    display: flex;
    min-height: 37px;
    margin: 0 0 10px;
    padding: 0;
    border: 0;
    border-bottom: 1px solid var(--bo-ui-border);
    border-radius: 0;
    background: transparent;
    gap: 24px;
}

.bo-operation-drawer .transaction-drawer-tabs .nav-link {
    width: auto;
    min-height: 36px;
    padding: 0 1px;
    border-radius: 0;
    color: var(--bo-ui-text-muted);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.bo-operation-drawer .transaction-drawer-tabs .nav-link.active {
    border-bottom-color: var(--bo-ui-primary) !important;
    background: transparent !important;
    color: var(--bo-ui-primary);
    box-shadow: none;
}

.bo-operation-drawer .bo-drawer-summary.transaction-amount-card {
    display: grid;
    margin: 0;
    padding: 0;
    border: 1px solid var(--bo-ui-border-strong);
    border-radius: 0;
    background: var(--bo-ui-bg);
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
}

.bo-operation-drawer .transaction-amount-card .bo-drawer-summary-item strong {
    overflow: hidden;
    color: var(--bo-ui-text);
    font-family: inherit;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bo-operation-drawer .detail-sections-grid {
    display: grid;
    margin-top: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
}

.bo-operation-drawer .detail-section {
    height: 100%;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--bo-ui-border-strong);
    border-radius: 0;
    background: var(--bo-ui-bg);
}

.bo-operation-drawer .detail-section h6 {
    min-height: 40px;
    margin: 0;
    padding: 9px 10px;
    border-bottom: 1px solid var(--bo-ui-border);
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

.bo-operation-drawer .detail-section h6 i {
    margin-right: 5px;
    color: var(--bo-ui-text-muted);
}

.bo-operation-drawer .detail-row {
    display: grid;
    min-height: 36px;
    padding: 7px 9px;
    border-bottom: 1px solid var(--bo-ui-border-cell);
    font-size: 13px;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 10px;
}

.bo-operation-drawer .detail-row:last-child {
    border-bottom: 0;
}

.bo-operation-drawer .detail-label {
    color: var(--bo-ui-text-muted);
    font-size: 12px;
    font-weight: 600;
}

.bo-operation-drawer .detail-value {
    color: var(--bo-ui-text);
    font-size: 13px;
    font-weight: 500;
    text-align: left;
}

.bo-operation-drawer .detail-note {
    padding: 8px 10px;
    color: var(--bo-ui-text);
    font-size: 13px;
    line-height: 1.4;
    white-space: pre-wrap;
}

.bo-operation-drawer .detail-notes-section {
    grid-column: 1 / -1;
}

.bo-operation-drawer .transaction-history-state {
    display: flex;
    min-height: 100px;
    padding: 12px;
    border: 1px solid var(--bo-ui-border);
    border-radius: 0;
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text-muted);
    font-size: 13px;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.bo-operation-drawer .transaction-history-state.is-error {
    border-color: #e5b4ae;
    background: var(--bo-ui-danger-soft);
    color: var(--bo-ui-danger);
}

.bo-operation-drawer .transaction-history-table-card {
    margin: 0;
    border-radius: 0;
}

.bo-operation-drawer .transaction-history-table-title {
    display: flex;
    min-height: 40px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--bo-ui-border);
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.bo-operation-drawer .transaction-history-table-title small {
    color: var(--bo-ui-text-muted);
    font-size: 12px;
    font-weight: 500;
}

.bo-operation-drawer .transaction-history-table {
    min-width: 620px;
}

.bo-operation-drawer .transaction-history-table th,
.bo-operation-drawer .transaction-history-table td {
    padding: 6px 8px;
    font-size: 12px;
}

.bo-operation-drawer .transaction-history-table thead th {
    background: var(--bo-ui-bg-header);
    color: var(--bo-ui-text-control);
    font-size: 11px;
    letter-spacing: 0;
    text-transform: none;
}

.bo-operation-drawer .transaction-history-table tr.is-current > * {
    background: var(--bo-ui-primary-soft);
}

.bo-operation-drawer .transaction-history-id {
    color: var(--bo-ui-text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11px;
}

.bo-operation-drawer .transaction-detail-footer {
    position: static;
    display: flex;
    padding: 10px 18px;
    border-top: 1px solid var(--bo-ui-border);
    background: var(--bo-ui-bg);
    backdrop-filter: none;
    grid-template-columns: none;
    justify-content: flex-end;
    gap: 6px;
}

@media (max-width: 767.98px) {
    .bo-transaction-logs-workspace .filter-chip,
    .bo-transaction-logs-workspace .filter-action,
    .bo-transaction-logs-workspace .text-filter-add-control,
    .bo-transaction-logs-workspace .dynamic-filter-card {
        width: 100%;
        flex: 1 1 100%;
    }

    .bo-transaction-logs-workspace .filter-chip select,
    .bo-transaction-logs-workspace .filter-chip input,
    .bo-transaction-logs-workspace .filter-chip-wide select,
    .bo-transaction-logs-workspace .dynamic-filter-card .dynamic-filter-input {
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    .bo-transaction-table-shell .dataTables_wrapper .bo-table-toolbar,
    .bo-transaction-table-shell .dataTables_wrapper .bo-table-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .bo-transaction-table-shell .dataTables_filter input {
        width: min(230px, calc(100vw - 100px));
    }

    .bo-operation-drawer .detail-sections-grid {
        grid-template-columns: 1fr;
    }

    .bo-operation-drawer .detail-notes-section {
        grid-column: auto;
    }

    .bo-operation-drawer .bo-drawer-summary.transaction-amount-card {
        grid-template-columns: 1fr;
    }

    .bo-operation-drawer .bo-drawer-summary-item {
        border-right: 0;
        border-bottom: 1px solid var(--bo-ui-border);
    }

    .bo-operation-drawer .bo-drawer-summary-item:last-child {
        border-bottom: 0;
    }
}

.bo-crm-table-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 6px 10px;
    border-bottom: 1px solid var(--bo-ui-border-strong);
    background: var(--bo-ui-bg);
}

.bo-crm-table-heading h2 {
    margin: 0;
    color: var(--bo-ui-text);
    font-size: 16px;
    font-weight: 650;
}

.bo-crm-result-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--bo-ui-text-muted);
    font-size: 12px;
}

.bo-crm-table {
    min-width: 980px;
}

.bo-crm-table > tbody > tr > td {
    height: 54px;
}

.bo-crm-table > thead > tr > th:nth-child(1) {
    min-width: 260px;
}

.bo-crm-table > thead > tr > th:nth-child(2) {
    width: 150px;
}

.bo-crm-table > thead > tr > th:nth-child(3),
.bo-crm-table > thead > tr > th:nth-child(4) {
    width: 160px;
}

.bo-crm-table > thead > tr > th:nth-child(5) {
    width: 145px;
}

.bo-crm-table > thead > tr > th:nth-child(6) {
    width: 150px;
}

.bo-crm-start-state {
    min-height: 120px;
    padding: 46px 12px;
    border: 1px solid var(--bo-ui-border);
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text-muted);
    text-align: center;
}

.bo-crm-drawer-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bo-crm-drawer-summary .bo-drawer-summary-item strong {
    overflow: hidden;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bo-crm-summary-table {
    min-width: 760px;
}

.bo-crm-history-table {
    min-width: 570px;
}

.bo-crm-ip-table {
    min-width: 520px;
}

.bo-crm-country-flag {
    width: 20px;
    height: 15px;
    margin-right: 5px;
    border: 1px solid var(--bo-ui-border);
    object-fit: cover;
    vertical-align: -2px;
}

/* Mutabakat: compact operational spreadsheet */
.bo-mutabakat-check-field {
    flex-basis: 190px;
}

.bo-mutabakat-shell {
    overflow: visible;
}

.bo-mutabakat-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 6px 10px;
    border-bottom: 1px solid var(--bo-ui-border-strong);
    background: var(--bo-ui-bg);
}

.bo-mutabakat-sheet-header h2 {
    margin: 0;
    color: var(--bo-ui-text);
    font-size: 16px;
    font-weight: 650;
}

.bo-mutabakat-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    color: var(--bo-ui-text-muted);
    font-size: 12px;
}

.bo-mutabakat-meta span {
    white-space: nowrap;
}

.bo-mutabakat-meta #mutabakatScopeBadge {
    color: var(--bo-ui-text);
    font-weight: 600;
}

.mutabakat-sticky-head {
    position: sticky;
    top: calc(var(--topbar-height) - 10px);
    z-index: 8;
    overflow: hidden;
    border-bottom: 1px solid var(--bo-ui-border-strong);
    background: var(--bo-ui-bg);
}

.mutabakat-sticky-head-inner {
    will-change: transform;
}

.mutabakat-sheet-wrap {
    position: relative;
    min-height: 260px;
    overflow-x: auto;
    overflow-y: visible;
    background: var(--bo-ui-bg-muted);
}

.mutabakat-loading.bo-panel-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    border: 0;
}

.mutabakat-save-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 246, 248, .78);
    cursor: wait;
}

.mutabakat-save-indicator {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    padding: 5px 10px;
    border: 1px solid var(--bo-ui-border-strong);
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text);
    font-size: 13px;
    font-weight: 600;
}

.mutabakat-sheet {
    width: max-content;
    min-width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
    background: var(--bo-ui-bg);
}

.mutabakat-sheet th,
.mutabakat-sheet td {
    height: 36px;
    padding: 6px 8px;
    border-right: 1px solid var(--bo-ui-border-cell);
    border-bottom: 1px solid var(--bo-ui-border);
    color: var(--bo-ui-text);
    font-size: 14px;
    line-height: 1.15;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.mutabakat-sheet thead th {
    border-bottom-color: var(--bo-ui-border-strong);
    background: var(--bo-ui-bg-header);
    color: var(--bo-ui-text-header);
    font-weight: 700;
}

.mutabakat-sheet tfoot th,
.mutabakat-sheet tfoot td {
    position: sticky;
    bottom: 0;
    z-index: 2;
    border-top: 1px solid var(--bo-ui-border-strong);
    border-bottom: 0;
    background: var(--bo-ui-bg-subtle);
    font-weight: 700;
}

.mutabakat-sheet tr > *:first-child {
    border-left: 0;
}

.mutabakat-sheet .date-col {
    position: sticky;
    left: 0;
    z-index: 2;
    width: 96px;
    min-width: 96px;
    background: var(--bo-ui-bg);
    text-align: left;
    font-variant-numeric: tabular-nums;
}

.mutabakat-sheet thead .date-col {
    z-index: 4;
    background: var(--bo-ui-bg-header);
}

.mutabakat-sheet tfoot .date-col {
    z-index: 4;
    background: var(--bo-ui-bg-subtle);
}

.mutabakat-sheet .amount-col {
    min-width: 104px;
    font-variant-numeric: tabular-nums;
}

.mutabakat-sheet tbody tr:nth-child(even) td,
.mutabakat-sheet tbody tr:nth-child(even) .date-col {
    background: var(--bo-ui-bg-hover);
}

.mutabakat-sheet .editable-cell {
    cursor: text;
}

.mutabakat-sheet .editable-cell.read-only {
    cursor: default;
}

.mutabakat-sheet .editable-cell:hover,
.mutabakat-sheet .trace-row,
.mutabakat-sheet .trace-row.date-col,
.mutabakat-sheet .trace-col,
.mutabakat-sheet .trace-col.date-col,
.mutabakat-sheet .trace-target {
    background: var(--bo-ui-primary-soft) !important;
}

.mutabakat-sheet .editable-cell.read-only:hover {
    background: inherit;
}

.mutabakat-sheet .special-withdrawal-cell {
    cursor: context-menu;
}

.mutabakat-sheet .editable-cell.is-editing {
    padding: 3px;
    background: var(--bo-ui-warning-soft) !important;
    box-shadow: inset 0 0 0 2px var(--bo-ui-warning);
}

.mutabakat-sheet .editable-cell.is-saving {
    background: var(--bo-ui-warning-soft) !important;
    color: var(--bo-ui-warning);
}

.mutabakat-sheet .editable-cell.has-error {
    box-shadow: inset 0 0 0 2px var(--bo-ui-danger);
}

.mutabakat-sheet .trace-target {
    box-shadow: inset 0 0 0 1px var(--bo-ui-primary);
}

.mutabakat-sheet tbody td.cell-kpi-highlight:not(.trace-row):not(.trace-col):not(.trace-target):not(.is-editing):not(.is-saving) {
    background: var(--bo-ui-primary-soft);
}

.mutabakat-sheet .kar-positive,
.mutabakat-balance-panel .value-positive {
    color: var(--bo-ui-success);
}

.mutabakat-sheet .kar-negative,
.mutabakat-balance-panel .value-negative {
    color: var(--bo-ui-danger);
}

.mutabakat-cell-input {
    width: 100%;
    min-width: 72px;
    padding: 3px 5px;
    border: 0;
    outline: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 600;
    text-align: center;
}

.mutabakat-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    color: var(--bo-ui-text-muted);
    font-size: 14px;
}

.mutabakat-balance-panel {
    padding: 8px 10px;
    border-top: 1px solid var(--bo-ui-border-strong);
    background: var(--bo-ui-bg);
}

.mutabakat-balance-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(300px, 324px));
    gap: 8px;
}

.mutabakat-balance-row {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: center;
    min-height: 38px;
    border: 1px solid var(--bo-ui-border);
}

.mutabakat-balance-label {
    display: flex;
    align-items: center;
    height: 100%;
    margin: 0;
    padding: 7px 8px;
    border-right: 1px solid var(--bo-ui-border);
    background: var(--bo-ui-bg-muted);
    color: var(--bo-ui-text-muted);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.bo-workspace .mutabakat-balance-row .form-control {
    height: 30px;
    min-height: 30px;
    border: 0;
    background: var(--bo-ui-bg);
    font-weight: 700;
    text-align: right;
    font-variant-numeric: tabular-nums;
    box-shadow: none;
}

.mutabakat-balance-panel.is-saving {
    pointer-events: none;
    opacity: .7;
}

.bo-mutabakat-workspace .flatpickr-input[readonly] {
    background: var(--bo-ui-bg);
}

.flatpickr-calendar .flatpickr-monthSelect-month {
    border-radius: var(--bo-ui-radius);
    font-weight: 600;
}

.flatpickr-calendar .flatpickr-monthSelect-month.selected,
.flatpickr-calendar .flatpickr-monthSelect-month.startRange,
.flatpickr-calendar .flatpickr-monthSelect-month.endRange {
    border-color: var(--bo-ui-primary);
    background: var(--bo-ui-primary);
}

.bo-panel-loading,
.bo-panel-error {
    min-height: 84px;
    padding: 30px 12px;
    border: 1px solid var(--bo-ui-border);
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text-muted);
    text-align: center;
}

.bo-panel-error,
.bo-alert.is-error {
    border-color: #e5b4ae;
    background: var(--bo-ui-danger-soft);
    color: var(--bo-ui-danger);
}

/* Activity logs: compact, read-only audit workspace. */
.bo-audit-filterbar {
    padding-top: 7px;
}

.bo-audit-presets {
    display: flex;
    margin-bottom: 8px;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.bo-audit-presets > span {
    margin-right: 3px;
    color: var(--bo-ui-text-muted);
    font-size: 12px;
    font-weight: 600;
}

.bo-audit-presets .bo-button {
    min-height: 28px;
    padding: 3px 8px;
    font-size: 12px;
}

.bo-audit-advanced {
    margin: 9px -10px -9px;
    padding: 9px 10px;
    border-top: 1px solid var(--bo-ui-border);
    background: var(--bo-ui-bg-muted);
}

.bo-audit-facet-panel {
    margin-bottom: 10px;
    border: 1px solid var(--bo-ui-border);
    background: var(--bo-ui-bg);
}

.bo-audit-facet-group {
    padding: 8px 10px 9px;
}

.bo-audit-facet-group + .bo-audit-facet-group {
    border-top: 1px solid var(--bo-ui-border);
}

.bo-audit-facet-heading {
    display: flex;
    min-height: 30px;
    margin-bottom: 6px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.bo-audit-facet-heading > div:first-child {
    display: flex;
    min-width: 0;
    align-items: baseline;
    gap: 8px;
}

.bo-audit-facet-heading strong {
    font-size: 13px;
    font-weight: 700;
}

.bo-audit-facet-heading > div:first-child > span {
    overflow: hidden;
    color: var(--bo-ui-text-muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bo-audit-module-rail {
    display: flex;
    padding-bottom: 2px;
    overflow-x: auto;
    gap: 6px;
    scrollbar-width: thin;
}

.bo-audit-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
    gap: 6px;
}

.bo-audit-facet-card {
    display: flex;
    min-width: 158px;
    min-height: 48px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--bo-ui-border-strong);
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text);
    text-align: left;
    box-shadow: none;
    align-items: stretch;
}

.bo-audit-facet-card:hover {
    border-color: #9aa9bd;
    background: var(--bo-ui-bg-hover);
}

.bo-audit-facet-card:focus-visible {
    outline: 2px solid var(--bo-ui-primary);
    outline-offset: 1px;
}

.bo-audit-facet-card.is-active {
    border-color: var(--bo-ui-primary);
    background: var(--bo-ui-primary-soft);
}

.bo-audit-facet-icon {
    display: inline-flex;
    width: 38px;
    flex: 0 0 38px;
    border-right: 1px solid var(--bo-ui-border);
    background: var(--bo-ui-bg-muted);
    color: var(--bo-ui-text-muted);
    font-size: 15px;
    align-items: center;
    justify-content: center;
}

.bo-audit-facet-card.is-active .bo-audit-facet-icon {
    border-right-color: var(--bo-ui-primary);
    background: var(--bo-ui-primary);
    color: #fff;
}

.bo-audit-facet-content {
    display: flex;
    min-width: 0;
    padding: 6px 8px;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
}

.bo-audit-facet-content strong {
    overflow: hidden;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bo-audit-facet-content small {
    margin-top: 2px;
    color: var(--bo-ui-text-muted);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.bo-audit-facet-tools {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bo-audit-facet-search {
    display: flex;
    width: 210px;
    height: 28px;
    padding: 0 7px;
    border: 1px solid var(--bo-ui-border-strong);
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-bg);
    align-items: center;
    gap: 6px;
}

.bo-audit-facet-search:focus-within {
    border-color: var(--bo-ui-primary);
    box-shadow: 0 0 0 1px var(--bo-ui-primary);
}

.bo-audit-facet-search > i {
    color: var(--bo-ui-text-muted);
    font-size: 12px;
}

.bo-audit-facet-search input {
    width: 100%;
    min-width: 0;
    height: 26px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--bo-ui-text);
    font-size: 12px;
}

.bo-audit-facet-empty {
    min-height: 48px;
    padding: 15px 10px;
    color: var(--bo-ui-text-muted);
    font-size: 12px;
    text-align: center;
    grid-column: 1 / -1;
}

.bo-audit-facet-skeleton {
    min-width: 158px;
    min-height: 48px;
    border: 1px solid var(--bo-ui-border);
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-bg-muted);
}

.bo-audit-actor {
    color: var(--bo-ui-text);
    font-size: 13px;
    font-weight: 600;
}

.bo-audit-code {
    display: block;
    margin-top: 2px;
    color: var(--bo-ui-text-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.bo-audit-description {
    min-width: 240px;
    max-width: 460px;
}

.bo-audit-description > :first-child {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.bo-audit-description > .bo-table-secondary {
    display: flex;
    margin-top: 3px;
    align-items: center;
    gap: 6px;
}

.bo-audit-description .bo-status {
    font-size: 12px;
}

.bo-audit-detail-drawer .bo-drawer-summary-item strong {
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bo-audit-description-value {
    padding: 10px 12px;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.bo-audit-detail-tabs {
    margin: 0;
    padding: 0 12px;
}

.bo-audit-tab-content {
    min-height: 120px;
    padding: 12px;
}

.bo-audit-empty {
    min-height: 92px;
    padding: 34px 12px;
    color: var(--bo-ui-text-muted);
    font-size: 13px;
    text-align: center;
}

.bo-audit-diff-toolbar {
    display: flex;
    min-height: 32px;
    margin-bottom: 7px;
    color: var(--bo-ui-text-muted);
    font-size: 12px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.bo-audit-diff-toolbar label {
    display: inline-flex;
    color: var(--bo-ui-text);
    align-items: center;
    gap: 5px;
}

.bo-audit-diff-table {
    table-layout: fixed;
}

.bo-audit-diff-table th:first-child,
.bo-audit-diff-table td:first-child {
    width: 26%;
}

.bo-audit-diff-table td {
    vertical-align: top !important;
    overflow-wrap: anywhere;
}

.bo-audit-diff-table pre {
    margin: 0;
    color: inherit;
    font-size: 11px;
    white-space: pre-wrap;
}

.bo-audit-diff-table td.is-before {
    background: var(--bo-ui-warning-soft);
    color: var(--bo-ui-warning);
}

.bo-audit-diff-table td.is-after {
    background: var(--bo-ui-success-soft);
    color: var(--bo-ui-success);
}

.bo-audit-raw-block + .bo-audit-raw-block {
    margin-top: 10px;
}

.bo-audit-raw-block h4 {
    margin: 0 0 4px;
    color: var(--bo-ui-text);
    font-size: 12px;
    font-weight: 700;
}

.bo-audit-raw-block pre {
    max-height: 320px;
    margin: 0;
    padding: 9px 10px;
    overflow: auto;
    border: 1px solid var(--bo-ui-border);
    background: var(--bo-ui-bg-muted);
    color: var(--bo-ui-text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

@media (max-width: 767.98px) {
    .bo-audit-presets > span {
        width: 100%;
    }

    .bo-audit-diff-table {
        min-width: 620px;
    }

    .bo-audit-facet-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .bo-audit-facet-tools,
    .bo-audit-facet-search {
        width: 100%;
    }

    .bo-audit-action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bo-audit-facet-card {
        min-width: 0;
    }
}

@media (max-width: 420px) {
    .bo-audit-action-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Reports: compact analytical workspace. */
.bo-reports-workspace .bo-filterbar {
    padding-top: 7px;
}

.bo-report-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin: 0 0 8px;
}

.bo-report-preset {
    min-height: 28px;
    padding: 3px 9px;
    border: 1px solid var(--bo-ui-border-strong);
    border-right-width: 0;
    border-radius: 0;
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text-muted);
    font-size: 12px;
    font-weight: 600;
}

.bo-report-preset:first-child {
    border-radius: var(--bo-ui-radius) 0 0 var(--bo-ui-radius);
}

.bo-report-preset:last-child {
    border-right-width: 1px;
    border-radius: 0 var(--bo-ui-radius) var(--bo-ui-radius) 0;
}

.bo-report-preset:hover,
.bo-report-preset.is-active {
    background: var(--bo-ui-bg-muted);
    color: var(--bo-ui-primary);
}

.bo-report-preset.is-active {
    box-shadow: inset 0 -2px 0 var(--bo-ui-primary);
}

.bo-report-export {
    color: var(--bo-ui-success);
}

.bo-report-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
    padding-top: 7px;
    border-top: 1px solid var(--bo-ui-border);
}

.bo-report-filter-chip {
    display: inline-flex;
    min-height: 24px;
    padding: 2px 3px 2px 7px;
    border: 1px solid var(--bo-ui-border-strong);
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-bg-muted);
    color: var(--bo-ui-text);
    font-size: 12px;
    align-items: center;
    gap: 4px;
}

.bo-report-filter-chip button {
    display: inline-flex;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--bo-ui-text-muted);
    align-items: center;
    justify-content: center;
}

.bo-report-panel {
    position: relative;
    min-height: 360px;
}

.bo-report-metrics {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-bottom: 10px;
    border: 1px solid var(--bo-ui-border-strong);
    background: var(--bo-ui-bg);
}

.bo-report-metrics.is-compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bo-report-metric {
    min-width: 0;
    min-height: 76px;
    padding: 9px 10px;
    border-right: 1px solid var(--bo-ui-border);
}

.bo-report-metric:last-child {
    border-right: 0;
}

.bo-report-metric > span,
.bo-report-metric > small {
    display: block;
    color: var(--bo-ui-text-muted);
    font-size: 11px;
    line-height: 1.25;
}

.bo-report-metric > strong {
    display: block;
    margin: 4px 0 2px;
    overflow: hidden;
    color: var(--bo-ui-text);
    font-size: 18px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bo-report-metric.is-success > strong,
.bo-report-metric small.is-up {
    color: var(--bo-ui-success);
}

.bo-report-metric.is-danger > strong,
.bo-report-metric small.is-down {
    color: var(--bo-ui-danger);
}

.bo-report-grid {
    display: grid;
    gap: 10px;
    margin-bottom: 10px;
}

.bo-report-grid.is-two-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bo-report-section {
    min-width: 0;
    margin-bottom: 10px;
    border: 1px solid var(--bo-ui-border-strong);
    border-radius: 0;
    background: var(--bo-ui-bg);
}

.bo-report-grid .bo-report-section {
    margin-bottom: 0;
}

.bo-report-section-header {
    display: flex;
    min-height: 38px;
    padding: 7px 10px;
    border-bottom: 1px solid var(--bo-ui-border);
    background: var(--bo-ui-bg);
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.bo-report-section-header h2 {
    margin: 0;
    color: var(--bo-ui-text);
    font-size: 14px;
    font-weight: 700;
}

.bo-report-section-header span {
    color: var(--bo-ui-text-muted);
    font-size: 12px;
}

.bo-report-chart {
    position: relative;
    height: 260px;
    padding: 10px;
}

.bo-report-chart.is-short {
    height: 220px;
}

.bo-report-section .bo-table > tbody > tr > td {
    height: 42px;
    padding-top: 6px;
    padding-bottom: 6px;
}

.bo-report-row-action {
    max-width: 100%;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: transparent;
    color: var(--bo-ui-primary);
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bo-report-row-action:hover {
    text-decoration: underline;
}

.bo-report-row-action .bo-status,
.bo-report-row-action .bo-finance-group-badge {
    font-size: 13px;
}

@media (max-width: 1199.98px) {
    .bo-report-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .bo-report-metric:nth-child(3) {
        border-right: 0;
    }

    .bo-report-metric:nth-child(-n+3) {
        border-bottom: 1px solid var(--bo-ui-border);
    }
}

@media (max-width: 991.98px) {
    .bo-report-grid.is-two-column {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .bo-report-metrics,
    .bo-report-metrics.is-compact {
        grid-template-columns: 1fr;
    }

    .bo-report-metric,
    .bo-report-metric:nth-child(3) {
        min-height: 64px;
        border-right: 0;
        border-bottom: 1px solid var(--bo-ui-border);
    }

    .bo-report-metric:last-child {
        border-bottom: 0;
    }

    .bo-report-presets {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .bo-report-preset,
    .bo-report-preset:first-child,
    .bo-report-preset:last-child {
        border: 1px solid var(--bo-ui-border-strong);
        border-radius: 0;
    }
}

@media (max-width: 1199.98px) {
    .bo-filter-field,
    .bo-filter-field.is-wide {
        flex: 1 1 calc(33.333% - 8px);
    }

    .bo-filter-actions {
        flex-basis: 100%;
    }
}

@media (max-width: 767.98px) {
    .bo-tabs {
        gap: 16px;
        overflow-x: auto;
    }

    .bo-filter-field,
    .bo-filter-field.is-wide {
        flex-basis: 100%;
    }

    .bo-page-title {
        font-size: 20px;
    }

    .bo-page-title-context {
        font-size: 15px;
    }

    .bo-mutabakat-sheet-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
        padding: 8px 10px;
    }

    .bo-mutabakat-meta {
        gap: 5px 10px;
    }

    .mutabakat-balance-form,
    .mutabakat-balance-row {
        width: 100%;
    }

    .mutabakat-balance-form {
        grid-template-columns: 1fr;
    }

    .mutabakat-balance-row {
        grid-template-columns: 112px minmax(0, 1fr);
    }

    .bo-transfer-stats {
        overflow-x: auto;
    }

    .bo-transfer-stat {
        min-width: 132px;
    }

    .bo-drawer-summary {
        grid-template-columns: 1fr;
    }

    .bo-drawer-summary-item {
        min-height: 52px;
        border-right: 0;
        border-bottom: 1px solid var(--bo-ui-border);
    }

    .bo-drawer-summary-item:last-child {
        border-bottom: 0;
    }

    .bo-transfer-flow {
        grid-template-columns: 1fr;
    }

    .bo-transfer-flow-arrow {
        min-height: 52px;
        border-top: 1px solid var(--bo-ui-border);
        border-right: 0;
        border-bottom: 1px solid var(--bo-ui-border);
        border-left: 0;
    }

    .bo-transfer-flow-arrow i {
        transform: rotate(90deg);
    }

    .bo-drawer-form-grid {
        grid-template-columns: 1fr;
    }

    .bo-drawer-form-grid .is-full {
        grid-column: auto;
    }

    .bo-key-value-list > div {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .bo-transfer-table-toolbar,
    .bo-transfer-table-meta {
        align-items: flex-start;
        flex-direction: column;
    }

}

/* Compact Operations global backoffice shell */
:root {
    --sidebar-width: 248px;
    --sidebar-collapsed-width: 58px;
    --topbar-height: 56px;
}

body.bo-shell {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background: var(--bo-ui-bg-muted);
    color: var(--bo-ui-text);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
}

/*
 * Shared shell structure.
 *
 * These declarations intentionally contain only layout/interaction foundations.
 * The compact shell rules below own the visual treatment. Keeping the foundation
 * here prevents panel layouts from depending on legacy inline CSS.
 */
body.bo-shell .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
}

body.bo-shell.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
}

body.bo-shell .sidebar-header-top,
body.bo-shell .sidebar-header-brand,
body.bo-shell .menu-section-toggle,
body.bo-shell .menu-section-toggle-main,
body.bo-shell .topbar,
body.bo-shell .topbar-left,
body.bo-shell .topbar-right,
body.bo-shell .sidebar-toggle,
body.bo-shell .notification-menu-button,
body.bo-shell .user-menu,
body.bo-shell .user-menu-button,
body.bo-shell .user-avatar,
body.bo-shell .header-nav-search-shell,
body.bo-shell .header-nav-search-result,
body.bo-shell .header-nav-search-result-icon,
body.bo-shell .header-nav-search-empty,
body.bo-shell .header-nav-search-footer,
body.bo-shell .notification-preference-row,
body.bo-shell .notification-preference-label {
    display: flex;
    align-items: center;
}

body.bo-shell .sidebar-header-top,
body.bo-shell .menu-section-toggle,
body.bo-shell .topbar,
body.bo-shell .header-nav-search-footer,
body.bo-shell .notification-preference-row {
    justify-content: space-between;
}

body.bo-shell .sidebar-header-brand,
body.bo-shell .menu-section-toggle-main,
body.bo-shell .topbar-left,
body.bo-shell .header-nav-search-input,
body.bo-shell .header-nav-search-result-body {
    min-width: 0;
}

body.bo-shell .sidebar-header-brand,
body.bo-shell .topbar-left,
body.bo-shell .header-nav-search-input,
body.bo-shell .header-nav-search-result-body {
    flex: 1 1 auto;
}

body.bo-shell .sidebar-groups-toggle,
body.bo-shell .sidebar-toggle,
body.bo-shell .notification-menu-button,
body.bo-shell .user-menu-button,
body.bo-shell .header-nav-search-result {
    cursor: pointer;
}

body.bo-shell .sidebar-menu {
    width: 100%;
}

body.bo-shell .menu-section-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

body.bo-shell .menu-group-items {
    display: none;
}

body.bo-shell .menu-group.is-open > .menu-group-items {
    display: block;
}

body.bo-shell .menu-group:not(.is-open) .menu-section-chevron {
    transform: rotate(-90deg);
}

body.bo-shell .menu-item {
    position: relative;
    text-decoration: none;
}

body.bo-shell .site-menu-items {
    display: grid;
}

body.bo-shell .topbar {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 999;
}

body.bo-shell .topbar-left {
    overflow: visible;
}

body.bo-shell .topbar-right {
    flex: 0 0 auto;
}

body.bo-shell .sidebar-toggle,
body.bo-shell .notification-menu-button,
body.bo-shell .user-avatar {
    justify-content: center;
}

body.bo-shell .notification-menu-button {
    position: relative;
    padding: 0;
}

body.bo-shell .notification-sound-state {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body.bo-shell .user-menu-button {
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
}

body.bo-shell .header-nav-search {
    position: relative;
}

body.bo-shell .header-nav-search-input {
    width: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
}

body.bo-shell .header-nav-search-hint {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    line-height: 1;
    white-space: nowrap;
}

body.bo-shell .topbar-right > * {
    flex: 0 0 auto;
}

body.bo-shell .header-nav-search-dropdown {
    position: absolute;
    right: 0;
    left: 0;
    z-index: 1200;
    display: none;
}

body.bo-shell .header-nav-search.is-open .header-nav-search-dropdown {
    display: block;
}

body.bo-shell .header-nav-search-results {
    overflow-y: auto;
}

body.bo-shell .header-nav-search-result {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
}

body.bo-shell .header-nav-search-result-icon,
body.bo-shell .header-nav-search-result-arrow {
    flex: 0 0 auto;
}

body.bo-shell .header-nav-search-result-title,
body.bo-shell .header-nav-search-result-meta {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.bo-shell .header-nav-search-empty {
    gap: 8px;
}

body.bo-shell .notification-preference-label {
    min-width: 0;
}

body.bo-shell .sidebar,
body.bo-shell .topbar,
body.bo-shell .main-content {
    transition: width .16s ease, left .16s ease, margin-left .16s ease, transform .16s ease;
}

body.bo-shell .sidebar {
    width: var(--sidebar-width);
    border-right: 1px solid #26364e;
    background: #101c2e;
    color: #e8edf5;
    box-shadow: none;
    overscroll-behavior: contain;
}

body.bo-shell .sidebar-header {
    position: sticky;
    top: 0;
    z-index: 2;
    min-height: var(--topbar-height);
    padding: 9px 10px;
    border-bottom: 1px solid #26364e;
    background: #101c2e;
}

body.bo-shell .sidebar-header-top {
    align-items: center;
    gap: 8px;
}

body.bo-shell .sidebar-header-brand {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
}

body.bo-shell .sidebar-brand-mark {
    display: inline-flex;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border: 1px solid #40516c;
    border-radius: var(--bo-ui-radius);
    color: #dce7f8;
    font-size: 16px;
    align-items: center;
    justify-content: center;
}

body.bo-shell .sidebar-brand-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

body.bo-shell .sidebar-brand-copy strong,
body.bo-shell .sidebar-brand-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.bo-shell .sidebar-brand-copy strong {
    color: #fff;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.2;
}

body.bo-shell .sidebar-brand-copy small {
    margin-top: 2px;
    color: #93a3ba;
    font-size: 11px;
}

body.bo-shell .sidebar-groups-toggle {
    width: 30px;
    height: 30px;
    border: 1px solid #40516c;
    border-radius: var(--bo-ui-radius);
    background: transparent;
    color: #b6c2d4;
    font-size: 13px;
    box-shadow: none;
}

body.bo-shell .sidebar-groups-toggle:hover,
body.bo-shell .sidebar-groups-toggle:focus-visible {
    border-color: #60728d;
    background: #1a2940;
    color: #fff;
    outline: none;
}

body.bo-shell .sidebar-menu {
    padding: 7px 0 14px;
}

body.bo-shell .menu-group {
    padding-bottom: 2px;
}

body.bo-shell .menu-section,
body.bo-shell .menu-section-toggle {
    min-height: 32px;
    padding: 6px 12px;
    color: #8494aa;
    font-size: 12px;
    font-weight: 650;
    letter-spacing: .04em;
}

body.bo-shell .menu-section-toggle:hover,
body.bo-shell .menu-section-toggle:focus-visible {
    color: #dce5f2;
    outline: none;
}

body.bo-shell .menu-section i,
body.bo-shell .menu-section-toggle i {
    width: 17px;
    margin-right: 7px;
    font-size: 13px;
    text-align: center;
}

body.bo-shell .menu-section-chevron {
    width: auto !important;
    margin-right: 0 !important;
    color: #728299;
    font-size: 10px !important;
}

body.bo-shell .menu-group-items {
    padding-bottom: 4px;
}

body.bo-shell .menu-item {
    display: flex;
    min-height: 36px;
    margin: 1px 8px;
    padding: 7px 10px;
    border: 1px solid transparent;
    border-radius: var(--bo-ui-radius);
    background: transparent;
    color: #c7d1df;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    align-items: center;
    box-shadow: none;
    transition: none;
}

body.bo-shell .menu-item i {
    width: 18px;
    margin-right: 8px;
    color: #91a2b9;
    font-size: 14px;
    text-align: center;
}

body.bo-shell .menu-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.bo-shell .menu-item:hover,
body.bo-shell .menu-item:focus-visible {
    border-color: #344760;
    background: #192941;
    color: #fff;
    box-shadow: none;
    outline: none;
}

body.bo-shell .menu-item:hover i,
body.bo-shell .menu-item:focus-visible i {
    color: #cbd8e9;
}

body.bo-shell .menu-item.active,
body.bo-shell .site-menu-block.site-theme-red .menu-item.active,
body.bo-shell .site-menu-block.site-theme-gold .menu-item.active {
    border-color: var(--bo-ui-primary);
    background: var(--bo-ui-primary);
    color: #fff;
    box-shadow: none;
}

body.bo-shell .menu-item.active i {
    color: #fff;
}

body.bo-shell .site-menu-block,
body.bo-shell .site-menu-block.site-theme-red,
body.bo-shell .site-menu-block.site-theme-gold {
    margin: 4px 8px 8px;
    padding: 0;
    overflow: hidden;
    border: 1px solid #30435d;
    border-radius: var(--bo-ui-radius);
    background: #111f32;
    box-shadow: none;
}

body.bo-shell .site-menu-block.is-active {
    border-color: #54739c;
}

body.bo-shell .site-menu-block .menu-site-heading,
body.bo-shell .site-menu-block.site-theme-red .menu-site-heading,
body.bo-shell .site-menu-block.site-theme-gold .menu-site-heading {
    display: flex;
    min-height: 32px;
    margin: 0;
    padding: 7px 9px;
    border: 0;
    border-bottom: 1px solid #30435d;
    border-radius: 0;
    background: #17273c;
    color: #dce5f1;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
    align-items: center;
    box-shadow: none;
}

body.bo-shell .site-menu-block.is-active .menu-site-heading {
    background: #1a2d46;
    color: #fff;
}

body.bo-shell .site-menu-block .menu-site-heading i,
body.bo-shell .site-menu-block.site-theme-red .menu-site-heading i,
body.bo-shell .site-menu-block.site-theme-gold .menu-site-heading i {
    color: #8fb4e8;
}

body.bo-shell .site-menu-block .menu-site-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.bo-shell .site-menu-block .site-menu-items {
    padding: 3px;
}

body.bo-shell .site-menu-block .menu-item {
    min-height: 34px;
    margin: 0;
    padding: 6px 8px;
    border-radius: 2px;
}

body.bo-shell .site-menu-block .menu-item + .menu-item {
    margin-top: 2px;
}

body.bo-shell .sidebar::-webkit-scrollbar {
    width: 5px;
}

body.bo-shell .sidebar::-webkit-scrollbar-track {
    background: #101c2e;
}

body.bo-shell .sidebar::-webkit-scrollbar-thumb,
body.bo-shell .sidebar::-webkit-scrollbar-thumb:hover {
    border-radius: 2px;
    background: #40516c;
}

body.bo-shell.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
}

body.bo-shell.sidebar-collapsed .sidebar-header {
    padding: 9px 12px;
}

body.bo-shell.sidebar-collapsed .sidebar-header-top,
body.bo-shell.sidebar-collapsed .sidebar-header-brand {
    justify-content: center;
}

body.bo-shell.sidebar-collapsed .sidebar-brand-copy,
body.bo-shell.sidebar-collapsed .sidebar-groups-toggle,
body.bo-shell.sidebar-collapsed .menu-label,
body.bo-shell.sidebar-collapsed .menu-section-label,
body.bo-shell.sidebar-collapsed .menu-section-chevron,
body.bo-shell.sidebar-collapsed .menu-group-items {
    display: none !important;
}

body.bo-shell.sidebar-collapsed .menu-section-toggle,
body.bo-shell.sidebar-collapsed .menu-item {
    width: 42px;
    margin: 2px 8px;
    padding: 8px;
    justify-content: center;
}

body.bo-shell.sidebar-collapsed .menu-section-toggle i,
body.bo-shell.sidebar-collapsed .menu-item i {
    margin: 0;
}

/* Notification glow follows the existing title/toast lifecycle on the closed rail. */
body.bo-shell.sidebar-collapsed .bo-nav-notification-active {
    position: relative;
}

body.bo-shell.sidebar-collapsed .bo-nav-notification-active::after {
    content: "";
    position: absolute;
    top: 5px;
    right: 6px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--bo-ui-danger);
    box-shadow: 0 0 5px 1px var(--bo-ui-danger);
    pointer-events: none;
}

body.bo-shell .topbar {
    left: var(--sidebar-width);
    height: var(--topbar-height);
    padding: 0 14px;
    border-bottom: 1px solid var(--bo-ui-border);
    background: var(--bo-ui-bg);
    box-shadow: none;
}

body.bo-shell.sidebar-collapsed .topbar {
    left: var(--sidebar-collapsed-width);
}

body.bo-shell .topbar-left {
    gap: 8px;
}

body.bo-shell .topbar-right {
    gap: 6px;
}

body.bo-shell .sidebar-toggle {
    width: 34px;
    height: 34px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--bo-ui-border-strong);
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-bg);
    color: #526078;
    font-size: 17px;
    box-shadow: none;
}

body.bo-shell .sidebar-toggle:hover,
body.bo-shell .sidebar-toggle:focus-visible {
    border-color: #aeb7c5;
    background: var(--bo-ui-bg-muted);
    color: var(--bo-ui-primary);
    outline: none;
}

body.bo-shell .header-nav-search {
    width: min(480px, 100%);
    min-width: 190px;
}

body.bo-shell .header-nav-search-shell {
    height: 34px;
    padding: 0 8px 0 10px;
    border: 1px solid var(--bo-ui-border-strong);
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-bg);
    box-shadow: none;
    gap: 8px;
    transition: none;
}

body.bo-shell .header-nav-search.is-open .header-nav-search-shell,
body.bo-shell .header-nav-search.is-focused .header-nav-search-shell {
    border-color: var(--bo-ui-primary);
    box-shadow: 0 0 0 1px var(--bo-ui-primary);
    transform: none;
}

body.bo-shell .header-nav-search-icon {
    color: #657086;
    font-size: 14px;
}

body.bo-shell .header-nav-search-input {
    color: var(--bo-ui-text);
    font-size: 13px;
    font-weight: 400;
}

body.bo-shell .header-nav-search-input::placeholder {
    color: #8791a3;
}

body.bo-shell .header-nav-search-hint {
    min-width: 30px;
    height: 22px;
    padding: 0 6px;
    border: 1px solid var(--bo-ui-border);
    border-radius: 2px;
    background: var(--bo-ui-bg-muted);
    color: #657086;
    font-size: 10px;
    letter-spacing: 0;
    text-transform: none;
}

body.bo-shell .header-nav-search-dropdown {
    top: calc(100% + 5px);
    padding: 4px;
    border: 1px solid var(--bo-ui-border-strong);
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-bg);
    box-shadow: none;
    backdrop-filter: none;
}

body.bo-shell .header-nav-search-results {
    max-height: min(68vh, 420px);
}

body.bo-shell .header-nav-search-result {
    min-height: 42px;
    padding: 6px 8px;
    border-radius: 2px;
    color: var(--bo-ui-text);
    gap: 8px;
    transition: none;
}

body.bo-shell .header-nav-search-result:hover,
body.bo-shell .header-nav-search-result.is-active {
    background: var(--bo-ui-bg-muted);
    box-shadow: none;
    transform: none;
}

body.bo-shell .header-nav-search-result-icon {
    width: 28px;
    height: 28px;
    border-radius: 2px;
    background: #eef3fb;
    color: var(--bo-ui-primary);
    font-size: 13px;
}

body.bo-shell .header-nav-search-result-title {
    color: var(--bo-ui-text);
    font-size: 13px;
    font-weight: 650;
}

body.bo-shell .header-nav-search-result-meta {
    margin-top: 1px;
    color: var(--bo-ui-text-muted);
    font-size: 11px;
}

body.bo-shell .header-nav-search-empty {
    padding: 10px;
    border-radius: 2px;
    background: var(--bo-ui-bg-muted);
    color: var(--bo-ui-text-muted);
}

body.bo-shell .header-nav-search-footer {
    padding: 7px 5px 3px;
    color: var(--bo-ui-text-muted);
    font-size: 10px;
}

body.bo-shell .notification-menu-button {
    width: 34px;
    height: 34px;
    border: 1px solid var(--bo-ui-border-strong);
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-bg);
    color: #526078;
    font-size: 15px;
    box-shadow: none;
}

body.bo-shell .notification-menu-button:hover,
body.bo-shell .notification-menu-button[aria-expanded="true"],
body.bo-shell .notification-menu-button:focus-visible {
    border-color: #aeb7c5;
    background: var(--bo-ui-bg-muted);
    color: var(--bo-ui-primary);
    outline: none;
}

body.bo-shell .notification-sound-state {
    right: -3px;
    bottom: -3px;
    width: 15px;
    height: 15px;
    border: 1px solid #fff;
    border-radius: 2px;
    background: var(--bo-ui-primary);
    font-size: 8px;
}

body.bo-shell .notification-preferences-menu,
body.bo-shell .user-account-menu {
    margin-top: 5px !important;
    padding: 4px;
    border: 1px solid var(--bo-ui-border-strong);
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-bg);
    box-shadow: none;
}

body.bo-shell .notification-preferences-menu {
    width: 290px;
    padding: 0;
}

body.bo-shell .notification-preferences-head {
    padding: 9px 10px;
    border-bottom: 1px solid var(--bo-ui-border);
}

body.bo-shell .notification-preferences-title {
    color: var(--bo-ui-text);
    font-size: 13px;
    font-weight: 650;
}

body.bo-shell .notification-preferences-summary {
    color: var(--bo-ui-text-muted);
    font-size: 11px;
}

body.bo-shell .notification-preference-row {
    min-height: 44px;
    padding: 7px 10px;
}

body.bo-shell .notification-preference-label {
    color: var(--bo-ui-text-header);
    font-size: 12px;
    gap: 7px;
}

body.bo-shell .notification-preference-label > i {
    width: 16px;
    color: #657086;
    font-size: 13px;
}

body.bo-shell .user-menu-button {
    min-height: 38px;
    padding: 3px 5px;
    border: 1px solid transparent;
    border-radius: var(--bo-ui-radius);
    gap: 7px;
    box-shadow: none;
}

body.bo-shell .user-menu-button:hover,
body.bo-shell .user-menu-button[aria-expanded="true"],
body.bo-shell .user-menu-button:focus-visible {
    border-color: var(--bo-ui-border-strong);
    background: var(--bo-ui-bg-muted);
    outline: none;
}

body.bo-shell .user-avatar {
    width: 30px;
    height: 30px;
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-primary);
    font-size: 14px;
}

body.bo-shell .user-avatar i {
    font-size: 14px;
}

body.bo-shell .user-menu-copy {
    display: flex;
    max-width: 190px;
    min-width: 0;
    flex-direction: column;
}

body.bo-shell .user-menu-copy strong,
body.bo-shell .user-menu-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.bo-shell .user-menu-copy strong {
    color: var(--bo-ui-text);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.15;
}

body.bo-shell .user-menu-copy small {
    margin-top: 2px;
    color: var(--bo-ui-text-muted);
    font-size: 11px;
}

body.bo-shell .dropdown-icon {
    color: #7b8494;
    font-size: 10px;
}

body.bo-shell .user-account-menu {
    width: 220px;
}

body.bo-shell .appearance-preferences-menu {
    width: 310px;
    margin-top: 5px !important;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--bo-ui-border-strong);
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text);
    box-shadow: none;
}

body.bo-shell .appearance-preferences-head {
    padding: 9px 10px;
    border-bottom: 1px solid var(--bo-ui-border);
}

body.bo-shell .appearance-preferences-title {
    font-size: 13px;
    font-weight: 650;
}

body.bo-shell .appearance-preferences-summary {
    margin-top: 2px;
    color: var(--bo-ui-text-muted);
    font-size: 11px;
}

body.bo-shell .appearance-preferences-summary.is-error {
    color: var(--bo-ui-danger);
}

body.bo-shell .appearance-preference-group {
    display: grid;
    margin: 0;
    padding: 0 10px 10px;
    border: 0;
    border-bottom: 1px solid var(--bo-ui-border);
    gap: 6px;
}

body.bo-shell .appearance-preference-group:last-child {
    border-bottom: 0;
}

body.bo-shell .appearance-preference-group legend {
    display: block;
    float: none;
    width: auto;
    margin: 0;
    padding-top: 8px;
    color: var(--bo-ui-text-muted);
    font-size: 11px;
    font-weight: 650;
    line-height: 1.8;
}

body.bo-shell .appearance-segmented-control,
body.bo-shell .appearance-size-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

body.bo-shell .appearance-size-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.bo-shell .appearance-segmented-control button,
body.bo-shell .appearance-size-options button,
body.bo-shell .appearance-color-options button {
    display: inline-flex;
    min-height: var(--bo-ui-control-height);
    padding: 5px 8px;
    border: 1px solid var(--bo-ui-border-strong);
    border-radius: var(--bo-ui-radius);
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text);
    font-size: 12px;
    font-weight: 600;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

body.bo-shell .appearance-segmented-control button:hover,
body.bo-shell .appearance-size-options button:hover,
body.bo-shell .appearance-color-options button:hover {
    background: var(--bo-ui-bg-muted);
}

body.bo-shell .appearance-segmented-control button[aria-pressed="true"],
body.bo-shell .appearance-size-options button[aria-pressed="true"],
body.bo-shell .appearance-color-options button[aria-pressed="true"] {
    border-color: var(--bo-ui-primary);
    background: var(--bo-ui-primary-soft);
    color: var(--bo-ui-primary);
}

body.bo-shell .appearance-color-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}

body.bo-shell .appearance-color-options button {
    min-width: 0;
    min-height: 50px;
    padding: 5px 3px;
    flex-direction: column;
    font-size: 10px;
}

body.bo-shell .appearance-color-options button > span:last-child {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.3;
    text-align: center;
}

body.bo-shell .appearance-color-swatch {
    display: block;
    width: 28px;
    height: 16px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 2px;
}

body.bo-shell .appearance-color-swatch.is-navy { background: #101c2e; }
body.bo-shell .appearance-color-swatch.is-slate { background: linear-gradient(135deg, #101c2e 15%, #9c7a32); }
body.bo-shell .appearance-color-swatch.is-blue { background: #15355f; }
body.bo-shell .appearance-color-swatch.is-charcoal { background: linear-gradient(135deg, #101c2e 15%, #72bde8); }

body.bo-shell .appearance-preferences-menu button:focus-visible {
    outline: 1px solid var(--bo-ui-primary);
    outline-offset: 1px;
}

body.bo-shell .appearance-preferences-menu button:disabled {
    cursor: wait;
    opacity: .65;
}

body.bo-shell .user-account-menu .dropdown-item {
    min-height: 34px;
    padding: 6px 8px;
    border-radius: 2px;
    color: var(--bo-ui-text-header);
    font-size: 12px;
    gap: 7px;
}

body.bo-shell .user-account-menu .dropdown-item:hover,
body.bo-shell .user-account-menu .dropdown-item:focus {
    background: var(--bo-ui-bg-muted);
    color: var(--bo-ui-primary);
}

body.bo-shell .main-content {
    min-height: calc(100vh - var(--topbar-height));
    margin-top: var(--topbar-height);
    margin-left: var(--sidebar-width);
    padding: 18px;
}

/* User-specific shell appearance */
body.bo-shell {
    --bo-user-sidebar-bg: #101c2e;
    --bo-user-sidebar-header: #101c2e;
    --bo-user-sidebar-soft: #111f32;
    --bo-user-sidebar-heading: #17273c;
    --bo-user-sidebar-heading-active: #1a2d46;
    --bo-user-sidebar-hover: #192941;
    --bo-user-sidebar-border: #30435d;
    --bo-user-sidebar-border-strong: #40516c;
}

/* Existing stored keys are retained: slate = navy/gold, charcoal = navy/light blue.
   Both palettes intentionally retain dark surfaces in light and dark appearance modes. */
body.bo-shell[data-sidebar-color="slate"] {
    --bo-user-sidebar-bg: #030e19;
    --bo-user-sidebar-header: #030e19;
    --bo-user-sidebar-soft: #030e19;
    --bo-user-sidebar-heading: #081b2b;
    --bo-user-sidebar-heading-active: #0c2235;
    --bo-user-sidebar-hover: #102638;
    --bo-user-sidebar-border: #1b3042;
    --bo-user-sidebar-border-strong: #365069;
    --bo-user-sidebar-accent: #e8ca80;
    --bo-user-sidebar-active: linear-gradient(110deg, #f6d989 0%, #e7b85f 60%, #f5d58b 100%);
    --bo-user-sidebar-active-border: #d9b466;
    --bo-user-sidebar-active-text: #101c2e;
}

body.bo-shell[data-sidebar-color="blue"] {
    --bo-user-sidebar-bg: #15355f;
    --bo-user-sidebar-header: #15355f;
    --bo-user-sidebar-soft: #173a68;
    --bo-user-sidebar-heading: #1d477b;
    --bo-user-sidebar-heading-active: #24558e;
    --bo-user-sidebar-hover: #1c4679;
    --bo-user-sidebar-border: #315b89;
    --bo-user-sidebar-border-strong: #4c739f;
}

body.bo-shell[data-sidebar-color="charcoal"] {
    --bo-user-sidebar-bg: #030e19;
    --bo-user-sidebar-header: #030e19;
    --bo-user-sidebar-soft: #030e19;
    --bo-user-sidebar-heading: #081b2b;
    --bo-user-sidebar-heading-active: #0c2235;
    --bo-user-sidebar-hover: #102638;
    --bo-user-sidebar-border: #1b3042;
    --bo-user-sidebar-border-strong: #365069;
    --bo-user-sidebar-accent: #b5e3ff;
    --bo-user-sidebar-active: linear-gradient(110deg, #c1e9fc 0%, #7ec3ed 60%, #b4e2fa 100%);
    --bo-user-sidebar-active-border: #7bbbdc;
    --bo-user-sidebar-active-text: #101c2e;
}

body.bo-shell .sidebar { border-right-color: var(--bo-user-sidebar-border); background: var(--bo-user-sidebar-bg); }
body.bo-shell .sidebar-header { border-bottom-color: var(--bo-user-sidebar-border); background: var(--bo-user-sidebar-header); }
body.bo-shell .sidebar-brand-mark,
body.bo-shell .sidebar-groups-toggle { border-color: var(--bo-user-sidebar-border-strong); }
body.bo-shell .sidebar-groups-toggle:hover,
body.bo-shell .sidebar-groups-toggle:focus-visible { background: var(--bo-user-sidebar-hover); }
body.bo-shell .menu-item:hover,
body.bo-shell .menu-item:focus-visible { border-color: var(--bo-user-sidebar-border); background: var(--bo-user-sidebar-hover); }
body.bo-shell .site-menu-block,
body.bo-shell .site-menu-block.site-theme-red,
body.bo-shell .site-menu-block.site-theme-gold { border-color: var(--bo-user-sidebar-border); background: var(--bo-user-sidebar-soft); }
body.bo-shell .site-menu-block .menu-site-heading,
body.bo-shell .site-menu-block.site-theme-red .menu-site-heading,
body.bo-shell .site-menu-block.site-theme-gold .menu-site-heading { border-bottom-color: var(--bo-user-sidebar-border); background: var(--bo-user-sidebar-heading); }
body.bo-shell .site-menu-block.is-active .menu-site-heading { background: var(--bo-user-sidebar-heading-active); }
body.bo-shell .sidebar::-webkit-scrollbar-track { background: var(--bo-user-sidebar-bg); }
body.bo-shell .sidebar::-webkit-scrollbar-thumb,
body.bo-shell .sidebar::-webkit-scrollbar-thumb:hover { background: var(--bo-user-sidebar-border-strong); }
body.bo-shell .sidebar-hover-label { border-color: var(--bo-user-sidebar-border-strong); background: var(--bo-user-sidebar-bg); }

/* User-approved gradient selection treatment, shared by both panels. */
body.bo-shell:is([data-sidebar-color="slate"], [data-sidebar-color="charcoal"]) .site-menu-block.is-active {
    border-color: var(--bo-user-sidebar-border-strong);
}
body.bo-shell:is([data-sidebar-color="slate"], [data-sidebar-color="charcoal"]) .menu-section,
body.bo-shell:is([data-sidebar-color="slate"], [data-sidebar-color="charcoal"]) .menu-section-toggle {
    color: #c7d1df;
}

body.bo-shell[data-sidebar-font-size="standard"] .menu-item { font-size: 15.12px; }
body.bo-shell[data-sidebar-font-size="standard"] .menu-section,
body.bo-shell[data-sidebar-font-size="standard"] .menu-section-toggle,
body.bo-shell[data-sidebar-font-size="standard"] .site-menu-block .menu-site-heading { font-size: 12.96px; }
body.bo-shell[data-sidebar-font-size="compact"] .menu-item { font-size: 14.04px; }
body.bo-shell[data-sidebar-font-size="compact"] .menu-section,
body.bo-shell[data-sidebar-font-size="compact"] .menu-section-toggle,
body.bo-shell[data-sidebar-font-size="compact"] .site-menu-block .menu-site-heading { font-size: 11.88px; }
body.bo-shell[data-sidebar-font-size="large"] .menu-item { font-size: 16.2px; }
body.bo-shell[data-sidebar-font-size="large"] .menu-section,
body.bo-shell[data-sidebar-font-size="large"] .menu-section-toggle,
body.bo-shell[data-sidebar-font-size="large"] .site-menu-block .menu-site-heading { font-size: 14.04px; }

body.bo-shell[data-color-mode="dark"],
body.bo-auth-shell[data-color-mode="dark"] {
    --bo-ui-bg: #1b2028;
    --bo-ui-bg-muted: #141920;
    --bo-ui-bg-hover: #232a34;
    --bo-ui-bg-header: #252c36;
    --bo-ui-bg-subtle: #20262f;
    --bo-ui-border: #343c48;
    --bo-ui-border-strong: #47515f;
    --bo-ui-border-cell: #343c48;
    --bo-ui-text: #e5e9f0;
    --bo-ui-text-muted: #a4adba;
    --bo-ui-text-control: #b9c1cd;
    --bo-ui-text-header: #eef2f7;
    --bo-ui-primary: #5b9cf5;
    --bo-ui-primary-soft: #203651;
    --bo-ui-danger: #f07a72;
    --bo-ui-danger-soft: #3a2427;
    --bo-ui-warning: #ddb45a;
    --bo-ui-transfer-bg: #542b12;
    --bo-ui-transfer-accent: #fdba74;
    --bo-ui-warning-soft: #3a3120;
    --bo-ui-success: #61c896;
    --bo-ui-success-soft: #20372d;
    --bo-note-default: #232a34;
    --bo-note-yellow: #3b3520;
    --bo-note-blue: #20344b;
    --bo-note-green: #20382d;
    --bo-note-rose: #3d292d;
    --bo-note-purple: #342b45;
    --bs-body-color: var(--bo-ui-text);
    --bs-body-bg: var(--bo-ui-bg-muted);
    --bs-border-color: var(--bo-ui-border);
    --bs-secondary-color: var(--bo-ui-text-muted);
    --bs-secondary-bg: var(--bo-ui-bg-hover);
    --bs-tertiary-bg: var(--bo-ui-bg-header);
    --bs-emphasis-color: #f4f7fb;
    --bs-heading-color: var(--bo-ui-text);
    --bs-link-color: #86b7fa;
    --bs-link-hover-color: #abcdfb;
    color-scheme: dark;
}

body.bo-auth-shell[data-color-mode="dark"] { background-blend-mode: multiply; }
body.bo-auth-shell[data-color-mode="dark"] .bo-button.is-primary { color: #0f1722; }
body.bo-auth-shell[data-color-mode="dark"] .bo-auth-check .form-check-input { background-color: var(--bo-ui-bg-subtle); }
body.bo-auth-shell[data-color-mode="dark"] .bo-auth-check .form-check-input:checked { background-color: var(--bo-ui-primary); }

body.bo-shell[data-color-mode="dark"] .main-content,
body.bo-shell[data-color-mode="dark"] .bo-drawer-body,
body.bo-shell[data-color-mode="dark"] .bo-operation-drawer { background: var(--bo-ui-bg-muted); color: var(--bo-ui-text); }
body.bo-shell[data-color-mode="dark"] .table {
    --bs-table-bg: var(--bo-ui-bg);
    --bs-table-color: var(--bo-ui-text);
    --bs-table-border-color: var(--bo-ui-border);
    --bs-table-striped-bg: var(--bo-ui-bg-subtle);
    --bs-table-striped-color: var(--bo-ui-text);
    --bs-table-active-bg: var(--bo-ui-primary-soft);
    --bs-table-active-color: var(--bo-ui-text);
    --bs-table-hover-bg: var(--bo-ui-bg-hover);
    --bs-table-hover-color: var(--bo-ui-text);
}
body.bo-shell[data-color-mode="dark"] .form-control,
body.bo-shell[data-color-mode="dark"] .form-select,
body.bo-shell[data-color-mode="dark"] .input-group-text {
    border-color: var(--bo-ui-border-strong);
    background-color: var(--bo-ui-bg);
    color: var(--bo-ui-text);
}
body.bo-shell[data-color-mode="dark"] .form-control::placeholder { color: #7f8997; }
body.bo-shell[data-color-mode="dark"] .dropdown-menu,
body.bo-shell[data-color-mode="dark"] .card,
body.bo-shell[data-color-mode="dark"] .modal-content,
body.bo-shell[data-color-mode="dark"] .offcanvas { background-color: var(--bo-ui-bg); color: var(--bo-ui-text); }
body.bo-shell[data-color-mode="dark"] .bo-settings-actionbar { background: rgba(27, 32, 40, .96); }
body.bo-shell[data-color-mode="dark"] .bo-button,
body.bo-shell[data-color-mode="dark"] .bo-icon-button,
body.bo-shell[data-color-mode="dark"] .bo-pagination button { background: var(--bo-ui-bg); color: var(--bo-ui-text); }
body.bo-shell[data-color-mode="dark"] .bo-button.is-primary,
body.bo-shell[data-color-mode="dark"] .bo-pagination button.is-active { background: var(--bo-ui-primary); color: #0f1722; }
body.bo-shell[data-color-mode="dark"] .bo-button.is-primary:hover,
body.bo-shell[data-color-mode="dark"] .bo-pagination button.is-active:hover { border-color: #78adf7; background: #78adf7; color: #0f1722; }
body.bo-shell[data-color-mode="dark"] .bo-button.is-disclosure { border-color: #426b9f; background: var(--bo-ui-primary-soft); color: #9ec5ff; }
body.bo-shell[data-color-mode="dark"] .bo-button.is-disclosure:hover { border-color: #5b86bc; background: #294563; color: #c4dcff; }
body.bo-shell[data-color-mode="dark"] .bo-button.is-danger { border-color: var(--bo-ui-danger); background: var(--bo-ui-bg); color: var(--bo-ui-danger); }
body.bo-shell[data-color-mode="dark"] .bo-button.is-danger:hover { background: var(--bo-ui-danger-soft); color: #ffaaa4; }
body.bo-shell[data-color-mode="dark"] .bo-button:disabled,
body.bo-shell[data-color-mode="dark"] .bo-icon-button:disabled { border-color: var(--bo-ui-border); background: var(--bo-ui-bg-subtle); color: #737d8b; }
body.bo-shell[data-color-mode="dark"] .appearance-segmented-control button[aria-pressed="true"],
body.bo-shell[data-color-mode="dark"] .appearance-size-options button[aria-pressed="true"],
body.bo-shell[data-color-mode="dark"] .appearance-color-options button[aria-pressed="true"] { background: #203651; color: #9ec5ff; }
body.bo-shell[data-color-mode="dark"] a:not(.menu-item):not(.bo-button):not(.dropdown-item) { color: #86b7fa; }
body.bo-shell[data-color-mode="dark"] .text-muted { color: var(--bo-ui-text-muted) !important; }

/* Dark theme compatibility for shared Bootstrap and legacy operational surfaces. */
body.bo-shell[data-color-mode="dark"] .table-light,
body.bo-shell[data-color-mode="dark"] thead.table-light {
    --bs-table-bg: var(--bo-ui-bg-header);
    --bs-table-color: var(--bo-ui-text-header);
    --bs-table-border-color: var(--bo-ui-border-strong);
}

body.bo-shell[data-color-mode="dark"] .table > thead > tr > th,
body.bo-shell[data-color-mode="dark"] .bo-table > thead > tr > th,
body.bo-shell[data-color-mode="dark"] table.dataTable > thead > tr > th,
body.bo-shell[data-color-mode="dark"] table.dataTable > thead > tr > td,
body.bo-shell[data-color-mode="dark"] .excel-table > thead > tr > th {
    border-color: var(--bo-ui-border-strong);
    background-color: var(--bo-ui-bg-header);
    color: var(--bo-ui-text-header);
}

body.bo-shell[data-color-mode="dark"] .bo-dashboard-table.bo-table > thead > tr > th {
    border-color: var(--bo-user-sidebar-border-strong);
    background: var(--bo-user-sidebar-bg);
    color: #f4f7fb;
}

body.bo-shell[data-color-mode="dark"] .bo-table > tbody > tr > td,
body.bo-shell[data-color-mode="dark"] .bo-table > tfoot > tr > td,
body.bo-shell[data-color-mode="dark"] table.dataTable > tbody > tr > td,
body.bo-shell[data-color-mode="dark"] table.dataTable > tfoot > tr > th,
body.bo-shell[data-color-mode="dark"] table.dataTable > tfoot > tr > td {
    border-color: var(--bo-ui-border-cell);
    color: var(--bo-ui-text);
}

body.bo-shell[data-color-mode="dark"] .card-header,
body.bo-shell[data-color-mode="dark"] .card-footer,
body.bo-shell[data-color-mode="dark"] .modal-header,
body.bo-shell[data-color-mode="dark"] .modal-footer,
body.bo-shell[data-color-mode="dark"] .offcanvas-header,
body.bo-shell[data-color-mode="dark"] .list-group-item,
body.bo-shell[data-color-mode="dark"] .accordion-item,
body.bo-shell[data-color-mode="dark"] .accordion-button {
    border-color: var(--bo-ui-border);
    background-color: var(--bo-ui-bg);
    color: var(--bo-ui-text);
}

body.bo-shell[data-color-mode="dark"] .bg-white {
    background-color: var(--bo-ui-bg) !important;
}

body.bo-shell[data-color-mode="dark"] .bg-light {
    background-color: var(--bo-ui-bg-muted) !important;
}

body.bo-shell[data-color-mode="dark"] .text-dark {
    color: var(--bo-ui-text) !important;
}

body.bo-shell[data-color-mode="dark"] .accordion-button:not(.collapsed) {
    background-color: var(--bo-ui-primary-soft);
    color: #9ec5ff;
    box-shadow: inset 0 calc(-1 * var(--bs-accordion-border-width)) 0 var(--bo-ui-border);
}

body.bo-shell[data-color-mode="dark"] .dropdown-divider,
body.bo-shell[data-color-mode="dark"] .modal-header,
body.bo-shell[data-color-mode="dark"] .modal-footer,
body.bo-shell[data-color-mode="dark"] .offcanvas-header,
body.bo-shell[data-color-mode="dark"] hr {
    border-color: var(--bo-ui-border);
}

body.bo-shell[data-color-mode="dark"] .dropdown-item {
    color: var(--bo-ui-text);
}

body.bo-shell[data-color-mode="dark"] .dropdown-item:hover,
body.bo-shell[data-color-mode="dark"] .dropdown-item:focus,
body.bo-shell[data-color-mode="dark"] .dropdown-item.active,
body.bo-shell[data-color-mode="dark"] .dropdown-item:active {
    background-color: var(--bo-ui-bg-hover);
    color: var(--bo-ui-text);
}

body.bo-shell[data-color-mode="dark"] .bo-alert {
    border-color: #3c755c;
    background: var(--bo-ui-success-soft);
    color: var(--bo-ui-success);
}

body.bo-shell[data-color-mode="dark"] .bo-alert.is-warning {
    border-color: #78683c;
    background: var(--bo-ui-warning-soft);
    color: var(--bo-ui-warning);
}

body.bo-shell[data-color-mode="dark"] .bo-alert.is-error,
body.bo-shell[data-color-mode="dark"] .bo-panel-error {
    border-color: #7d4548;
    background: var(--bo-ui-danger-soft);
    color: var(--bo-ui-danger);
}

body.bo-shell[data-color-mode="dark"] .alert-success,
body.bo-shell[data-color-mode="dark"] .alert-warning,
body.bo-shell[data-color-mode="dark"] .alert-danger,
body.bo-shell[data-color-mode="dark"] .alert-info {
    border-color: var(--bo-ui-border-strong);
    background-color: var(--bo-ui-bg-header);
    color: var(--bo-ui-text);
}

body.bo-shell[data-color-mode="dark"] .btn-light,
body.bo-shell[data-color-mode="dark"] .btn-outline-secondary,
body.bo-shell[data-color-mode="dark"] .btn-secondary,
body.bo-shell[data-color-mode="dark"] .dataTables_wrapper .dt-button,
body.bo-shell[data-color-mode="dark"] .dataTables_wrapper .btn-secondary {
    border-color: var(--bo-ui-border-strong);
    background-color: var(--bo-ui-bg);
    color: var(--bo-ui-text);
    box-shadow: none;
}

body.bo-shell[data-color-mode="dark"] .btn-light:hover,
body.bo-shell[data-color-mode="dark"] .btn-outline-secondary:hover,
body.bo-shell[data-color-mode="dark"] .btn-secondary:hover,
body.bo-shell[data-color-mode="dark"] .dataTables_wrapper .dt-button:hover,
body.bo-shell[data-color-mode="dark"] .dataTables_wrapper .btn-secondary:hover {
    border-color: #5b6675;
    background-color: var(--bo-ui-bg-hover);
    color: var(--bo-ui-text);
}

body.bo-shell[data-color-mode="dark"] .btn-primary,
body.bo-shell[data-color-mode="dark"] .btn-outline-primary:hover {
    border-color: var(--bo-ui-primary);
    background-color: var(--bo-ui-primary);
    color: #0f1722;
}

body.bo-shell[data-color-mode="dark"] .btn-outline-primary {
    border-color: var(--bo-ui-primary);
    background-color: transparent;
    color: #9ec5ff;
}

body.bo-shell[data-color-mode="dark"] .btn:disabled,
body.bo-shell[data-color-mode="dark"] .btn.disabled,
body.bo-shell[data-color-mode="dark"] .page-item.disabled .page-link {
    border-color: var(--bo-ui-border);
    background-color: var(--bo-ui-bg-subtle);
    color: #737d8b;
    opacity: 1;
}

body.bo-shell[data-color-mode="dark"] .page-link {
    border-color: var(--bo-ui-border);
    background-color: var(--bo-ui-bg);
    color: var(--bo-ui-text);
}

body.bo-shell[data-color-mode="dark"] .page-item:not(.active):not(.disabled) .page-link:hover,
body.bo-shell[data-color-mode="dark"] .page-item:not(.active):not(.disabled) .page-link:focus {
    border-color: var(--bo-ui-border-strong);
    background-color: var(--bo-ui-bg-hover);
    color: #9ec5ff;
}

body.bo-shell[data-color-mode="dark"] .page-item.active .page-link {
    border-color: var(--bo-ui-primary);
    background-color: var(--bo-ui-primary);
    color: #0f1722;
}

body.bo-shell[data-color-mode="dark"] .form-check-input,
body.bo-shell[data-color-mode="dark"] .form-range::-webkit-slider-runnable-track {
    border-color: var(--bo-ui-border-strong);
    background-color: var(--bo-ui-bg);
}

body.bo-shell[data-color-mode="dark"] .form-check-input:checked,
body.bo-shell[data-color-mode="dark"] .form-check-input:indeterminate {
    border-color: var(--bo-ui-primary);
    background-color: var(--bo-ui-primary);
}

body.bo-shell[data-color-mode="dark"] .form-control:disabled,
body.bo-shell[data-color-mode="dark"] .form-select:disabled,
body.bo-shell[data-color-mode="dark"] .form-control[readonly] {
    border-color: var(--bo-ui-border);
    background-color: var(--bo-ui-bg-subtle);
    color: var(--bo-ui-text-muted);
    opacity: 1;
}

body.bo-shell[data-color-mode="dark"] .bo-operation-drawer,
body.bo-shell[data-color-mode="dark"] .bo-risk-drawer,
body.bo-shell[data-color-mode="dark"] .transaction-detail-drawer {
    border-color: var(--bo-ui-border-strong);
    background: var(--bo-ui-bg-muted);
    color: var(--bo-ui-text);
}

body.bo-shell[data-color-mode="dark"] .bo-drawer-header,
body.bo-shell[data-color-mode="dark"] .bo-drawer-footer,
body.bo-shell[data-color-mode="dark"] .bo-drawer-summary,
body.bo-shell[data-color-mode="dark"] .bo-drawer-section,
body.bo-shell[data-color-mode="dark"] .bo-risk-drawer-header,
body.bo-shell[data-color-mode="dark"] .bo-risk-summary,
body.bo-shell[data-color-mode="dark"] .bo-risk-summary-item,
body.bo-shell[data-color-mode="dark"] .bo-risk-detail-section,
body.bo-shell[data-color-mode="dark"] .bo-operation-drawer .detail-section,
body.bo-shell[data-color-mode="dark"] .bo-operation-drawer .transaction-history-table-card,
body.bo-shell[data-color-mode="dark"] .bo-operation-drawer .transaction-detail-footer {
    border-color: var(--bo-ui-border);
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text);
}

body.bo-shell[data-color-mode="dark"] .bo-drawer-body,
body.bo-shell[data-color-mode="dark"] .bo-risk-drawer-body,
body.bo-shell[data-color-mode="dark"] .bo-operation-drawer .transaction-detail-body,
body.bo-shell[data-color-mode="dark"] .bo-operation-drawer .bo-player-device-detail > td {
    background: var(--bo-ui-bg-muted);
    color: var(--bo-ui-text);
}

body.bo-shell[data-color-mode="dark"] .bo-drawer-section-heading,
body.bo-shell[data-color-mode="dark"] .bo-operation-drawer .detail-section h6,
body.bo-shell[data-color-mode="dark"] .bo-operation-drawer .transaction-history-table-title {
    border-color: var(--bo-ui-border);
    background: var(--bo-ui-bg-header);
    color: var(--bo-ui-text-header);
}

body.bo-shell[data-color-mode="dark"] .bo-operation-drawer .form-label,
body.bo-shell[data-color-mode="dark"] .bo-operation-drawer label,
body.bo-shell[data-color-mode="dark"] .bo-drawer-subtitle,
body.bo-shell[data-color-mode="dark"] .bo-risk-drawer-subtitle {
    color: var(--bo-ui-text-muted);
}

body.bo-shell[data-color-mode="dark"] .offcanvas .btn-close,
body.bo-shell[data-color-mode="dark"] .modal .btn-close,
body.bo-shell[data-color-mode="dark"] .bo-operation-drawer .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: .72;
}

body.bo-shell[data-color-mode="dark"] .offcanvas .btn-close:hover,
body.bo-shell[data-color-mode="dark"] .modal .btn-close:hover,
body.bo-shell[data-color-mode="dark"] .bo-operation-drawer .btn-close:hover {
    opacity: 1;
}

body.bo-shell[data-color-mode="dark"] .nav-tabs {
    border-color: var(--bo-ui-border);
}

body.bo-shell[data-color-mode="dark"] .nav-tabs .nav-link {
    color: var(--bo-ui-text-muted);
}

body.bo-shell[data-color-mode="dark"] .nav-tabs .nav-link:hover,
body.bo-shell[data-color-mode="dark"] .nav-tabs .nav-link:focus {
    border-color: var(--bo-ui-border) var(--bo-ui-border) transparent;
    color: var(--bo-ui-text);
}

body.bo-shell[data-color-mode="dark"] .nav-tabs .nav-link.active {
    border-color: var(--bo-ui-border) var(--bo-ui-border) var(--bo-ui-bg);
    background-color: var(--bo-ui-bg);
    color: var(--bo-ui-primary);
}

body.bo-shell[data-color-mode="dark"] .sidebar-toggle,
body.bo-shell[data-color-mode="dark"] .header-nav-search-icon,
body.bo-shell[data-color-mode="dark"] .header-nav-search-hint,
body.bo-shell[data-color-mode="dark"] .notification-menu-button,
body.bo-shell[data-color-mode="dark"] .user-menu-button,
body.bo-shell[data-color-mode="dark"] .dropdown-icon {
    color: var(--bo-ui-text-muted);
}

body.bo-shell[data-color-mode="dark"] .header-nav-search-result-icon {
    background: var(--bo-ui-primary-soft);
    color: #9ec5ff;
}

body.bo-shell[data-color-mode="dark"] .flatpickr-calendar {
    border: 1px solid var(--bo-ui-border-strong);
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text);
    box-shadow: none;
}

body.bo-shell[data-color-mode="dark"] .flatpickr-months .flatpickr-month,
body.bo-shell[data-color-mode="dark"] .flatpickr-current-month .flatpickr-monthDropdown-months,
body.bo-shell[data-color-mode="dark"] .flatpickr-weekdays,
body.bo-shell[data-color-mode="dark"] span.flatpickr-weekday,
body.bo-shell[data-color-mode="dark"] .flatpickr-time,
body.bo-shell[data-color-mode="dark"] .flatpickr-time input,
body.bo-shell[data-color-mode="dark"] .flatpickr-time .flatpickr-am-pm {
    border-color: var(--bo-ui-border);
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text);
}

body.bo-shell[data-color-mode="dark"] .flatpickr-day {
    color: var(--bo-ui-text);
}

body.bo-shell[data-color-mode="dark"] .flatpickr-day:hover,
body.bo-shell[data-color-mode="dark"] .flatpickr-day:focus {
    border-color: var(--bo-ui-border-strong);
    background: var(--bo-ui-bg-hover);
}

body.bo-shell[data-color-mode="dark"] .flatpickr-day.prevMonthDay,
body.bo-shell[data-color-mode="dark"] .flatpickr-day.nextMonthDay,
body.bo-shell[data-color-mode="dark"] .flatpickr-day.flatpickr-disabled {
    color: #737d8b;
}

body.bo-shell[data-color-mode="dark"] .flatpickr-day.selected,
body.bo-shell[data-color-mode="dark"] .flatpickr-day.startRange,
body.bo-shell[data-color-mode="dark"] .flatpickr-day.endRange {
    border-color: var(--bo-ui-primary);
    background: var(--bo-ui-primary);
    color: #0f1722;
}

body.bo-shell.sidebar-collapsed .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

.bo-sidebar-backdrop {
    display: none;
}

body.bo-shell .sidebar-hover-label {
    padding: 6px 9px;
    border: 1px solid #40516c;
    border-radius: var(--bo-ui-radius);
    background: #101c2e;
    color: #fff;
    font-size: 12px;
    box-shadow: none;
}

@media (max-width: 991.98px) {
    body.bo-shell .sidebar,
    body.bo-shell.sidebar-collapsed .sidebar {
        z-index: 1050;
        width: min(280px, 88vw);
        transform: translateX(-100%);
    }

    body.bo-shell.sidebar-mobile-open .sidebar {
        transform: translateX(0);
    }

    body.bo-shell .topbar,
    body.bo-shell.sidebar-collapsed .topbar {
        left: 0;
        padding: 0 10px;
    }

    body.bo-shell .main-content,
    body.bo-shell.sidebar-collapsed .main-content {
        margin-left: 0;
        padding: 14px;
    }

    body.bo-shell .bo-sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1040;
        display: block;
        border: 0;
        background: rgba(15, 23, 42, .48);
        opacity: 0;
        visibility: hidden;
        transition: opacity .16s ease, visibility .16s ease;
    }

    body.bo-shell.sidebar-mobile-open {
        overflow: hidden;
    }

    body.bo-shell.sidebar-mobile-open .bo-sidebar-backdrop {
        opacity: 1;
        visibility: visible;
    }

    body.bo-shell .header-nav-search {
        width: min(420px, 100%);
    }
}

@media (max-width: 767.98px) {
    body.bo-shell .user-menu-copy,
    body.bo-shell .user-menu-button .dropdown-icon {
        display: none;
    }

    body.bo-shell .user-menu-button {
        padding: 2px;
    }
}

@media (max-width: 575.98px) {
    :root {
        --topbar-height: 96px;
    }

    body.bo-shell .topbar {
        height: var(--topbar-height);
        padding: 8px 10px 50px;
        align-items: center;
    }

    body.bo-shell .sidebar-header {
        min-height: 56px;
    }

    body.bo-shell .topbar-left {
        min-width: 34px;
        flex: 0 0 34px;
    }

    body.bo-shell .header-nav-search {
        position: absolute;
        right: 10px;
        bottom: 8px;
        left: 10px;
        width: auto;
    }

    body.bo-shell .header-nav-search-shell {
        height: 34px;
        padding: 0 8px 0 10px;
        border-radius: var(--bo-ui-radius);
    }

    body.bo-shell .header-nav-search-hint {
        display: none;
    }

    body.bo-shell .header-nav-search-dropdown {
        max-height: calc(100vh - 112px);
    }

    body.bo-shell .header-nav-search-results {
        max-height: calc(100vh - 160px);
    }

    body.bo-shell .main-content,
    body.bo-shell.sidebar-collapsed .main-content {
        margin-top: var(--topbar-height);
        padding: 10px;
    }
}
/* Finance Panel — Compact Operations UI */
@media (max-width: 575.98px) {
    body.bo-shell.finance-shell { --topbar-height: 56px; }
    body.bo-shell.finance-shell .topbar { height: var(--topbar-height); padding: 0 10px; }
    body.bo-shell.finance-shell .main-content,
    body.bo-shell.finance-shell.sidebar-collapsed .main-content { margin-top: var(--topbar-height); }
}

body.bo-shell.finance-shell .main-content {
    min-height: 100vh;
    color: var(--bo-ui-text);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
}

body.bo-shell.finance-shell .main-content > .container-fluid,
body.bo-shell.finance-shell .main-content > .container {
    max-width: none;
    padding: 18px;
}

body.bo-shell.finance-shell h1,
body.bo-shell.finance-shell h2 {
    color: var(--bo-ui-text);
    font-family: inherit;
}

body.bo-shell.finance-shell .main-content h2:first-child,
body.bo-shell.finance-shell .bo-page-title {
    margin: 0;
    font-size: 26px;
    font-weight: 650;
    line-height: 1.25;
}

body.bo-shell.finance-shell .card,
body.bo-shell.finance-shell .finance-filter-card,
body.bo-shell.finance-shell .finance-site-widget-group,
body.bo-shell.finance-shell .stat-card,
body.bo-shell.finance-shell .finance-mini-kpi {
    border: 1px solid var(--bo-ui-border) !important;
    border-radius: 0 !important;
    background: var(--bo-ui-bg) !important;
    box-shadow: none !important;
    color: var(--bo-ui-text);
    transform: none !important;
}

body.bo-shell.finance-shell .card-header,
body.bo-shell.finance-shell .card-footer {
    border-color: var(--bo-ui-border) !important;
    border-radius: 0 !important;
    background: var(--bo-ui-bg) !important;
    color: var(--bo-ui-text);
}

body.bo-shell.finance-shell .card-body { padding: 10px 12px; }

body.bo-shell.finance-shell .form-label {
    margin-bottom: 3px;
    color: var(--bo-ui-text-muted);
    font-size: 12px;
    font-weight: 600;
}

body.bo-shell.finance-shell .form-control,
body.bo-shell.finance-shell .form-select,
body.bo-shell.finance-shell .btn {
    min-height: var(--bo-ui-control-height);
    border-radius: var(--bo-ui-radius) !important;
    box-shadow: none !important;
    font-family: inherit;
    font-size: 13px;
}

body.bo-shell.finance-shell .form-control,
body.bo-shell.finance-shell .form-select {
    border-color: var(--bo-ui-border-strong);
    background-color: var(--bo-ui-bg);
    color: var(--bo-ui-text);
}

body.bo-shell.finance-shell .form-control:focus,
body.bo-shell.finance-shell .form-select:focus {
    border-color: var(--bo-ui-primary);
    box-shadow: 0 0 0 1px var(--bo-ui-primary) !important;
}

body.bo-shell.finance-shell .btn-primary,
body.bo-shell.finance-shell .bg-primary {
    border-color: var(--bo-ui-primary) !important;
    background: var(--bo-ui-primary) !important;
    color: #fff !important;
}

body.bo-shell.finance-shell .table-responsive { border: 1px solid var(--bo-ui-border); }
body.bo-shell.finance-shell table.table { margin: 0; border-color: var(--bo-ui-border); color: var(--bo-ui-text); font-size: 14px; }
body.bo-shell.finance-shell table.table > thead > tr > th {
    height: 38px;
    padding: 7px 10px;
    border-color: var(--bo-ui-border-strong);
    background: var(--bo-ui-bg-muted);
    color: var(--bo-ui-text);
    font-size: 14px;
    font-weight: 700;
    vertical-align: middle;
}
body.bo-shell.finance-shell table.table > tbody > tr > td {
    min-height: 54px;
    padding: 8px 10px;
    border-color: var(--bo-ui-border);
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text);
    vertical-align: middle;
}
body.bo-shell.finance-shell table.table-hover > tbody > tr:hover > * { background: var(--bo-ui-bg-hover); color: var(--bo-ui-text); }
body.bo-shell.finance-shell .text-muted { color: var(--bo-ui-text-muted) !important; }

body.bo-shell.finance-shell .dataTables_wrapper,
body.bo-shell.finance-shell .dataTables_info,
body.bo-shell.finance-shell .dataTables_length,
body.bo-shell.finance-shell .dataTables_filter { color: var(--bo-ui-text) !important; font-size: 13px; }
body.bo-shell.finance-shell .badge { border-radius: 2px !important; font-size: 11px; font-weight: 600; }

body.bo-shell.finance-shell .deposit-detail-section,
body.bo-shell.finance-shell .withdrawal-detail-section,
body.bo-shell.finance-shell .player-history-summary-item,
body.bo-shell.finance-shell .player-history-panel,
body.bo-shell.finance-shell .crypto-qr-preview,
body.bo-shell.finance-shell .select2-container--default .select2-selection--single,
body.bo-shell.finance-shell .select2-dropdown {
    border-color: var(--bo-ui-border) !important;
    border-radius: 0 !important;
    background: var(--bo-ui-bg) !important;
    color: var(--bo-ui-text) !important;
    box-shadow: none !important;
}
body.bo-shell.finance-shell .deposit-detail-section-title,
body.bo-shell.finance-shell .withdrawal-detail-section-title,
body.bo-shell.finance-shell .player-history-panel-title {
    border-color: var(--bo-ui-border) !important;
    background: var(--bo-ui-bg-muted) !important;
    color: var(--bo-ui-text) !important;
}
body.bo-shell.finance-shell .deposit-detail-row,
body.bo-shell.finance-shell .withdrawal-detail-row,
body.bo-shell.finance-shell .player-history-summary-item,
body.bo-shell.finance-shell .select2-results__option { border-color: var(--bo-ui-border) !important; color: var(--bo-ui-text) !important; }
body.bo-shell.finance-shell .select2-results__option--highlighted { background: var(--bo-ui-primary) !important; color: #fff !important; }

body.bo-shell .sidebar-badge {
    min-width: 18px;
    margin-left: auto;
    padding: 1px 4px;
    border: 1px solid rgba(255,255,255,.38);
    border-radius: 2px;
    background: transparent;
    color: #fff;
    font-size: 10px;
    line-height: 15px;
    text-align: center;
}

body.bo-shell.finance-shell .user-menu-copy { min-width: 0; line-height: 1.15; }
body.bo-shell.finance-shell .user-menu-copy strong { max-width: 180px; overflow: hidden; color: var(--bo-ui-text); font-size: 13px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
body.bo-shell.finance-shell .user-menu-copy small { max-width: 180px; overflow: hidden; color: var(--bo-ui-text-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

body.bo-shell.finance-shell .notification-menu-button {
    border-color: var(--bo-ui-primary);
    background: var(--bo-ui-primary);
    color: #fff;
}

body.bo-shell.finance-shell .notification-menu-button:hover,
body.bo-shell.finance-shell .notification-menu-button[aria-expanded="true"],
body.bo-shell.finance-shell .notification-menu-button:focus-visible {
    border-color: var(--bo-ui-primary);
    background: var(--bo-ui-primary);
    color: #fff;
}

body.bo-shell.finance-shell .notification-menu-button > i,
body.bo-shell.finance-shell .user-avatar > i {
    color: #fff;
}

body.bo-shell.finance-shell .notification-sound-state {
    border-color: var(--bo-ui-primary);
    background: var(--bo-ui-bg);
    color: var(--bo-ui-primary);
}

body.bo-shell.finance-shell .user-avatar {
    color: #fff;
}

body.bo-shell.finance-shell .bo-finance-dashboard .bo-filter-field.is-date {
    flex: 0 1 210px;
    min-width: 190px;
}

body.bo-shell.finance-shell .bo-finance-dashboard .bo-dashboard-filter-actions {
    flex-wrap: wrap;
}

body.bo-shell.finance-shell .bo-finance-bank-accounts .bo-row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
}

body.bo-shell.finance-shell .bo-finance-bank-accounts .bo-icon-button.is-danger {
    color: var(--bo-ui-danger);
}

body.bo-shell.finance-shell .bo-finance-bank-accounts .bo-icon-button.is-danger:hover,
body.bo-shell.finance-shell .bo-finance-bank-accounts .bo-icon-button.is-danger:focus-visible {
    border-color: var(--bo-ui-danger);
    background: var(--bo-ui-danger-soft);
    color: var(--bo-ui-danger);
}

/* Finance deposits use the shared COUI deposit/table primitives. */
body.bo-shell.finance-shell .finance-deposits-page .bo-deposit-table-shell .table-responsive { overflow-x: hidden; }
body.bo-shell.finance-shell .finance-deposits-page .bo-deposit-table {
    width: 100% !important;
    min-width: 0;
    table-layout: fixed;
    font-size: 13px;
}
body.bo-shell.finance-shell .finance-deposits-page .bo-deposit-table-heading h2 { font-size: 14px; line-height: 1.25; }
body.bo-shell.finance-shell .finance-deposits-page .bo-deposit-table > thead > tr > th { padding: 7px 8px; font-size: 13px; }
body.bo-shell.finance-shell .finance-deposits-page .bo-deposit-table > thead > tr > th:nth-child(1) { width: 10%; }
body.bo-shell.finance-shell .finance-deposits-page .bo-deposit-table > thead > tr > th:nth-child(2) { width: 6%; }
body.bo-shell.finance-shell .finance-deposits-page .bo-deposit-table > thead > tr > th:nth-child(3) { width: 13%; }
body.bo-shell.finance-shell .finance-deposits-page .bo-deposit-table > thead > tr > th:nth-child(4) { width: 12%; }
body.bo-shell.finance-shell .finance-deposits-page .bo-deposit-table > thead > tr > th:nth-child(5) { width: 15%; }
body.bo-shell.finance-shell .finance-deposits-page .bo-deposit-table > thead > tr > th:nth-child(6) { width: 16%; }
body.bo-shell.finance-shell .finance-deposits-page .bo-deposit-table > thead > tr > th:nth-child(7) { width: 8%; }
body.bo-shell.finance-shell .finance-deposits-page .bo-deposit-table > thead > tr > th:nth-child(8) { width: 9%; }
body.bo-shell.finance-shell .finance-deposits-page .bo-deposit-table > thead > tr > th:last-child { width: 132px; }
body.bo-shell.finance-shell .finance-deposits-page .bo-deposit-table > tbody > tr > td {
    height: 60px;
    padding: 8px;
    font-size: 13px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}
body.bo-shell.finance-shell .finance-deposits-page .bo-deposit-table > thead > tr > th:nth-child(4) {
    position: relative;
    padding-right: 30px !important;
    white-space: nowrap;
}
body.bo-shell.finance-shell .finance-deposits-page .bo-deposit-table > thead > tr > th:nth-child(4).sorting::before,
body.bo-shell.finance-shell .finance-deposits-page .bo-deposit-table > thead > tr > th:nth-child(4).sorting::after,
body.bo-shell.finance-shell .finance-deposits-page .bo-deposit-table > thead > tr > th:nth-child(4).sorting_asc::before,
body.bo-shell.finance-shell .finance-deposits-page .bo-deposit-table > thead > tr > th:nth-child(4).sorting_asc::after,
body.bo-shell.finance-shell .finance-deposits-page .bo-deposit-table > thead > tr > th:nth-child(4).sorting_desc::before,
body.bo-shell.finance-shell .finance-deposits-page .bo-deposit-table > thead > tr > th:nth-child(4).sorting_desc::after {
    right: 8px;
}
body.bo-shell.finance-shell .finance-deposits-page .bo-deposit-source.is-manual {
    width: 100%;
    min-width: 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
    white-space: normal;
}
body.bo-shell.finance-shell .finance-deposits-page .bo-deposit-source.is-manual .bo-deposit-source-creator {
    display: flex;
    width: 100%;
    max-width: 100%;
    padding-left: 0;
    overflow: hidden;
    color: var(--bo-ui-text-muted);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
    align-items: baseline;
    gap: 4px;
}
body.bo-shell.finance-shell .finance-deposits-page .bo-deposit-source.is-manual .bo-deposit-source-creator > span { flex: 0 0 auto; }
body.bo-shell.finance-shell .finance-deposits-page .bo-deposit-source.is-manual .bo-deposit-source-creator > strong {
    min-width: 0;
    overflow: hidden;
    color: var(--bo-ui-text);
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
}
body.bo-shell.finance-shell .finance-deposits-page .bo-deposit-source.is-manual .bo-deposit-source-creator::before {
    display: none;
}
body.bo-shell.finance-shell .finance-deposits-page .bo-deposit-description {
    display: -webkit-box;
    overflow: hidden;
    color: var(--bo-ui-text);
    font-size: 13px;
    line-height: 1.3;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
/* Customer names must remain complete and contained in their own column. */
body.bo-shell.finance-shell .finance-deposits-page .bo-deposit-table > tbody > tr > td:nth-child(3),
body.bo-shell.finance-shell .finance-deposits-page .bo-deposit-customer {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}
body.bo-shell.finance-shell .finance-deposits-page .bo-deposit-customer {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
    text-overflow: clip;
}
body.bo-shell.finance-shell .finance-deposits-page .bo-deposit-table > tbody > tr > td:nth-child(4),
body.bo-shell.finance-shell .finance-deposits-page .bo-deposit-table > tbody > tr > td:nth-child(7) { white-space: nowrap; }
body.bo-shell.finance-shell .finance-deposits-page .bo-deposit-table > tbody > tr > td:nth-child(6) {
    color: var(--bo-ui-text);
    font-size: 12px;
    line-height: 1.25;
}
body.bo-shell.finance-shell .finance-deposits-page .bo-deposit-table > tbody > tr > td:nth-child(6) small {
    display: -webkit-box;
    margin-top: 2px;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.2;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
body.bo-shell.finance-shell .finance-deposits-page .bo-deposit-table > tbody > tr > td:nth-child(8) {
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    white-space: normal;
}
body.bo-shell.finance-shell .finance-deposits-page .bo-row-actions {
    display: inline-flex;
    width: 100%;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
}
body.bo-shell.finance-shell .finance-deposits-page .bo-row-actions .btn {
    display: inline-flex;
    width: 26px;
    min-width: 26px;
    min-height: 26px;
    height: 26px;
    padding: 0;
    border-radius: 2px !important;
    align-items: center;
    justify-content: center;
}
body.bo-shell.finance-shell .finance-deposits-page .player-name-history {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--bo-ui-text);
    font: inherit;
    font-weight: 600;
    text-align: left;
    text-decoration-line: underline;
    text-decoration-style: dotted;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
body.bo-shell.finance-shell .finance-deposits-page .player-name-history:hover,
body.bo-shell.finance-shell .finance-deposits-page .player-name-history:focus-visible {
    color: var(--bo-ui-primary);
    outline: 0;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
}

body.bo-shell.finance-shell .bo-operation-drawer .bo-deposit-info-card { overflow: hidden; }
body.bo-shell.finance-shell .bo-operation-drawer .bo-deposit-info-grid {
    background: var(--bo-ui-bg);
}
body.bo-shell.finance-shell .bo-operation-drawer .bo-deposit-info-row {
    display: grid;
    border-bottom: 1px solid var(--bo-ui-border-cell);
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
body.bo-shell.finance-shell .bo-operation-drawer .bo-deposit-info-row:last-child { border-bottom: 0; }
body.bo-shell.finance-shell .bo-operation-drawer .bo-deposit-info-row.is-single { grid-template-columns: 1fr; }
body.bo-shell.finance-shell .bo-operation-drawer .bo-deposit-info-row.is-single .bo-deposit-info-item { border-right: 0; }
body.bo-shell.finance-shell .bo-operation-drawer .bo-deposit-info-row .bo-deposit-info-item:last-child { border-right: 0; }
body.bo-shell.finance-shell .bo-operation-drawer .bo-deposit-info-item {
    position: relative;
    display: block;
    min-width: 0;
    min-height: 64px;
    padding: 10px 52px 10px 12px;
    overflow: hidden;
    border-right: 1px solid var(--bo-ui-border-cell);
    color: var(--bo-ui-text);
}
body.bo-shell.finance-shell .bo-operation-drawer .bo-deposit-info-item.is-iconless { padding-right: 12px; }
body.bo-shell.finance-shell .bo-operation-drawer .bo-deposit-info-item > i {
    position: absolute;
    top: 50%;
    right: 10px;
    color: var(--bo-ui-primary);
    font-size: 38px;
    line-height: 1;
    opacity: .09;
    pointer-events: none;
    transform: translateY(-50%);
}
body.bo-shell.finance-shell .bo-operation-drawer .bo-deposit-info-item.is-success > i { color: var(--bo-ui-success); }
body.bo-shell.finance-shell .bo-operation-drawer .bo-deposit-info-item.is-danger > i { color: var(--bo-ui-danger); }
body.bo-shell.finance-shell .bo-operation-drawer .bo-deposit-info-item.is-warning > i { color: var(--bo-ui-warning); }
body.bo-shell.finance-shell .bo-operation-drawer .bo-deposit-info-item > div {
    position: relative;
    z-index: 1;
    display: grid;
    min-width: 0;
    gap: 3px;
}
body.bo-shell.finance-shell .bo-operation-drawer .bo-deposit-info-item span {
    color: var(--bo-ui-text-muted);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
}
body.bo-shell.finance-shell .bo-operation-drawer .bo-deposit-info-item strong {
    color: var(--bo-ui-text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
body.bo-shell.finance-shell .bo-operation-drawer .bo-deposit-info-item strong.bo-text-success { color: var(--bo-ui-success); }
body.bo-shell.finance-shell .bo-operation-drawer .bo-deposit-info-item strong.bo-technical-value {
    white-space: normal;
    word-break: break-word;
}
@media (max-width: 575.98px) {
    body.bo-shell.finance-shell .bo-operation-drawer .bo-deposit-info-row { grid-template-columns: 1fr; }
    body.bo-shell.finance-shell .bo-operation-drawer .bo-deposit-info-row .bo-deposit-info-item { border-right: 0; }
    body.bo-shell.finance-shell .bo-operation-drawer .bo-deposit-info-row:not(.is-single) .bo-deposit-info-item:first-child { border-bottom: 1px solid var(--bo-ui-border-cell); }
}

/* Finance withdrawals use the shared COUI withdrawal and operation-drawer primitives. */
body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-table-shell .table-responsive { overflow-x: hidden; }
body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-table {
    width: 100% !important;
    min-width: 0;
    table-layout: fixed;
    font-size: 13px;
}
body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-table-heading h2 { font-size: 14px; line-height: 1.25; }
body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-table > thead > tr > th { padding: 7px 8px; font-size: 13px; }
body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-table > thead > tr > th:nth-child(1) { width: 9%; }
body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-table > thead > tr > th:nth-child(2) { width: 6%; }
body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-table > thead > tr > th:nth-child(3) { width: 13%; }
body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-table > thead > tr > th:nth-child(4) { width: 11%; }
body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-table > thead > tr > th:nth-child(5) { width: 11%; }
body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-table > thead > tr > th:nth-child(6) { width: 20%; }
body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-table > thead > tr > th:nth-child(7) { width: 8%; }
body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-table > thead > tr > th:nth-child(8) { width: 9%; }
body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-table > thead > tr > th:last-child { width: 114px; }
body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-table > tbody > tr > td {
    height: 60px;
    padding: 8px;
    font-size: 13px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}
body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-table > thead > tr > th:nth-child(4) {
    position: relative;
    padding-right: 30px !important;
    white-space: nowrap;
}
body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-table > thead > tr > th:nth-child(4).sorting::before,
body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-table > thead > tr > th:nth-child(4).sorting::after,
body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-table > thead > tr > th:nth-child(4).sorting_asc::before,
body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-table > thead > tr > th:nth-child(4).sorting_asc::after,
body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-table > thead > tr > th:nth-child(4).sorting_desc::before,
body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-table > thead > tr > th:nth-child(4).sorting_desc::after { right: 8px; }
body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-source-stack.is-manual {
    width: 100%;
    min-width: 0;
    align-items: flex-start;
    gap: 5px;
}
body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-source-stack.is-manual .bo-withdrawal-source-creator {
    display: flex;
    width: 100%;
    max-width: 100%;
    padding-left: 0;
    overflow: hidden;
    color: var(--bo-ui-text-muted);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
    align-items: baseline;
    gap: 4px;
}
body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-source-stack.is-manual .bo-withdrawal-source-creator::before { display: none; }
body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-source-stack.is-manual .bo-withdrawal-source-creator > span { flex: 0 0 auto; }
body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-source-stack.is-manual .bo-withdrawal-source-creator > strong {
    min-width: 0;
    overflow: hidden;
    color: var(--bo-ui-text);
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
}
body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-customer {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    color: var(--bo-ui-text);
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}
body.bo-shell.finance-shell .finance-withdrawals-page .bo-special-withdrawal-category {
    max-width: 100%;
    white-space: normal;
}
body.bo-shell.finance-shell .finance-withdrawals-page .bo-special-withdrawal-category > span {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-bank-cell { gap: 6px; }
body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-bank-cell-copy { overflow: hidden; }
body.bo-shell.finance-shell .finance-withdrawals-page .finance-withdrawal-bank-iban-row {
    display: flex;
    min-width: 0;
    margin-top: 2px;
    align-items: center;
    gap: 4px;
}
body.bo-shell.finance-shell .finance-withdrawals-page .finance-withdrawal-bank-iban-text {
    display: block;
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: transparent;
    color: var(--bo-ui-text-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}
body.bo-shell.finance-shell .finance-withdrawals-page .finance-withdrawal-bank-copy {
    width: 22px;
    min-width: 22px;
    height: 22px;
    min-height: 22px;
    padding: 0;
    flex: 0 0 22px;
}
body.bo-shell.finance-shell .finance-withdrawals-page .finance-withdrawal-bank-copy.is-copied {
    border-color: var(--bo-ui-success);
    background: var(--bo-ui-success-soft);
    color: var(--bo-ui-success);
}
body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-table > tbody > tr > td:nth-child(3),
body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-table > tbody > tr > td:nth-child(4),
body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-table > tbody > tr > td:nth-child(7) { white-space: nowrap; }
body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-table > tbody > tr > td:nth-child(3) { overflow: hidden; }
body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-table > tbody > tr > td:nth-child(8) {
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    white-space: normal;
}
body.bo-shell.finance-shell .finance-withdrawals-page .bo-row-actions {
    display: inline-flex;
    width: 100%;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
}
body.bo-shell.finance-shell .finance-withdrawals-page .bo-row-actions .btn {
    display: inline-flex;
    width: 26px;
    min-width: 26px;
    min-height: 26px;
    height: 26px;
    padding: 0;
    border-radius: 2px !important;
    align-items: center;
    justify-content: center;
}
body.bo-shell.finance-shell .withdrawal-detail-drawer .withdrawal-detail-body { padding: 10px !important; }
body.bo-shell.finance-shell .withdrawal-detail-drawer .bo-withdrawal-info-card .bo-deposit-info-item {
    min-height: 50px;
    padding: 7px 44px 7px 10px;
}
body.bo-shell.finance-shell .withdrawal-detail-drawer .bo-withdrawal-info-card .bo-deposit-info-item.is-iconless { padding-right: 10px; }
body.bo-shell.finance-shell .withdrawal-detail-drawer .bo-withdrawal-info-card .bo-deposit-info-item > i {
    right: 8px;
    font-size: 32px;
}
body.bo-shell.finance-shell .withdrawal-detail-drawer .bo-withdrawal-info-card .bo-drawer-section-heading { min-height: 34px; padding: 6px 10px; }
body.bo-shell.finance-shell .withdrawal-detail-drawer .bo-withdrawal-plain-technical {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--bo-ui-text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11px;
    overflow-wrap: anywhere;
}
body.bo-shell.finance-shell .bo-operation-drawer .bo-withdrawal-finance-note { margin-top: 8px; }
body.bo-shell.finance-shell .bo-operation-drawer .bo-withdrawal-finance-note .bo-drawer-section-heading h3 {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
body.bo-shell.finance-shell .bo-operation-drawer .bo-withdrawal-finance-note .bo-drawer-section-heading { min-height: 34px; padding: 6px 10px; }
body.bo-shell.finance-shell .bo-operation-drawer .withdrawal-finance-note-wrap { padding: 8px; }
body.bo-shell.finance-shell .bo-operation-drawer .withdrawal-finance-note-wrap textarea {
    min-height: 58px;
    resize: vertical;
}
body.bo-shell.finance-shell .bo-operation-drawer .withdrawal-finance-note-actions {
    display: flex;
    min-height: 32px;
    margin-top: 6px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
body.bo-shell.finance-shell .bo-operation-drawer .withdrawal-finance-note-actions .finance-note-meta { min-width: 0; }

@media (max-width: 767.98px) {
    body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-table-heading,
    body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-table-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }
    body.bo-shell.finance-shell .finance-withdrawals-page .bo-withdrawal-search { width: 100%; }
}

body.bo-shell.finance-shell .bo-finance-bank-accounts .site-status-list {
    display: grid;
    min-width: 190px;
    gap: 3px;
}

body.bo-shell.finance-shell .bo-finance-bank-accounts .site-status-item {
    display: flex;
    min-height: 28px;
    padding: 3px 6px;
    border: 1px solid var(--bo-ui-border);
    background: var(--bo-ui-bg);
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

body.bo-shell.finance-shell .bo-finance-bank-accounts .site-status-name {
    max-width: 130px;
    overflow: hidden;
    color: var(--bo-ui-text);
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.bo-shell.finance-shell .bo-finance-bank-accounts .site-toggle-wrap {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

body.bo-shell.finance-shell .bo-finance-bank-accounts .site-toggle-wrap .form-check-input {
    cursor: pointer;
}

body.bo-shell.finance-shell .modal.bo-operation-drawer .modal-dialog,
body.bo-shell.finance-shell .modal .modal-dialog {
    width: min(720px, 100vw);
    max-width: 720px;
    height: 100%;
    margin: 0 0 0 auto;
    transform: translateX(100%);
}
body.bo-shell.finance-shell .modal.show .modal-dialog { transform: none; }
body.bo-shell.finance-shell .modal .modal-content {
    height: 100%;
    border: 0;
    border-left: 1px solid var(--bo-ui-border-strong);
    border-radius: 0;
    background: var(--bo-ui-bg);
    color: var(--bo-ui-text);
    box-shadow: none;
}
body.bo-shell.finance-shell .modal .modal-header,
body.bo-shell.finance-shell .modal .modal-footer {
    flex: 0 0 auto;
    min-height: 54px;
    padding: 10px 14px;
    border-color: var(--bo-ui-border);
    border-radius: 0;
    background: var(--bo-ui-bg);
}
body.bo-shell.finance-shell .modal .modal-body { flex: 1 1 auto; padding: 14px; overflow-y: auto; }
body.bo-shell.finance-shell .modal .modal-title { color: var(--bo-ui-text); font-size: 16px; font-weight: 650; }
body.bo-shell.finance-shell .modal .btn-close { position: absolute; top: 12px; right: 12px; margin: 0; }

body.bo-shell.finance-shell[data-color-mode="dark"] .flatpickr-calendar,
body.bo-shell.finance-shell[data-color-mode="dark"] .dropdown-menu { color-scheme: dark; }

@media (max-width: 991.98px) {
    body.bo-shell.finance-shell .main-content > .container-fluid,
    body.bo-shell.finance-shell .main-content > .container { padding: 12px; }
}

/* Shared transaction audit timeline: deposits, withdrawals and transaction logs. */
.bo-transaction-timeline { margin-top: 10px; }
.bo-timeline-events { list-style: none; margin: 0; padding: 0; }
.bo-timeline-event { position: relative; padding: 0 0 20px 26px; margin: 0; }
.bo-timeline-event::before { content: ''; position: absolute; top: 8px; bottom: -8px; left: 5px; width: 2px; background: var(--bo-ui-border-strong); }
.bo-timeline-event:last-child { padding-bottom: 0; }
.bo-timeline-event:last-child::before { display: none; }
.bo-timeline-marker { position: absolute; left: 0; top: 5px; width: 12px; height: 12px; border: 2px solid var(--bo-ui-primary); border-radius: 50%; background: var(--bo-ui-bg); z-index: 1; }
.bo-timeline-event.is-failure .bo-timeline-marker { border-color: var(--bo-ui-danger); }
.bo-timeline-event-body { min-width: 0; color: var(--bo-ui-text); overflow-wrap: anywhere; }
.bo-timeline-event-title { margin: 3px 0 4px; font-size: 14px; font-weight: 600; line-height: 1.4; }
.bo-timeline-time, .bo-timeline-actor { color: var(--bo-ui-text-muted); font-size: 13px; }
.bo-timeline-description, .bo-timeline-change { font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 6px; }
.bo-timeline-change { color: var(--bo-ui-text); border-left: 2px solid var(--bo-ui-border); padding-left: 8px; }
.bo-timeline-message:not(:empty) { padding: 10px 0; color: var(--bo-ui-text-muted); }
.bo-timeline-pagination { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--bo-ui-border); }
.bo-timeline-pagination .bo-button { min-height: 34px; font-size: 13px; }
.bo-timeline-page { color: var(--bo-ui-text-muted); font-size: 13px; }
#transactionDetailTabs, #transactionDrawerTabs { flex-wrap: wrap; }


/* Shared duration heat scale: stronger red means a longer wait above the selected threshold. */
.bo-shell { --bo-ui-backoffice-avatar: #7136a8; --bo-ui-finance-avatar: #18794e; --bo-ui-avatar-text: #ffffff; }
.bo-shell[data-color-mode="dark"] { --bo-ui-backoffice-avatar: #8250ae; --bo-ui-finance-avatar: #237f5a; --bo-ui-avatar-text: #ffffff; }
.bo-chat { display: grid; grid-template-columns: 248px minmax(0, 1fr); height: calc(100dvh - 158px); min-height: 380px; border: 1px solid var(--bo-ui-border); background: var(--bo-ui-bg); color: var(--bo-ui-text); }
/* Keep the shell's top margin inside the viewport; only chat panes scroll. */
body.bo-shell:has(.main-content > .bo-chat-page) { display: flow-root; height: 100dvh; min-height: 0; overflow: hidden; }
body.bo-shell .main-content:has(> .bo-chat-page) { padding: 0; height: calc(100dvh - var(--topbar-height)); min-height: 0; overflow: hidden; }
.bo-chat-page, .bo-chat-page > #chatPageMount { height: 100%; min-height: 0; min-width: 0; }
.bo-chat-page #chatPageMount > .bo-chat { height: 100%; min-height: 0; border: 0; }
.bo-chat-rooms { overflow: auto; border-right: 1px solid var(--bo-ui-border); padding: 8px; }
.bo-chat-room-list h3 { font-size: 13px; font-weight: 650; margin: 14px 4px 8px; }
.bo-chat-room { display: flex; gap: 8px; align-items: center; justify-content: space-between; width: 100%; text-align: left; padding: 8px; font: inherit; font-size: 13px; border: 1px solid transparent; border-radius: var(--bo-ui-radius); color: var(--bo-ui-text); background: var(--bo-ui-bg); }
.bo-chat-room:hover { background: var(--bo-ui-bg-hover); }
.bo-chat-room.is-active { border-color: var(--bo-ui-primary); color: var(--bo-ui-primary); background: var(--bo-ui-bg-muted); }
.bo-chat-room:focus-visible, .bo-chat-message a:focus-visible { outline: 2px solid var(--bo-ui-primary); outline-offset: 1px; }
.bo-chat-count { display: inline-block; min-width: 18px; text-align: center; font-size: 11px; padding: 1px 4px; background: var(--bo-ui-primary); color: var(--bo-ui-avatar-text); border-radius: 3px; }
body.bo-shell .notification-menu-button.bo-chat-launcher,
body.bo-shell.finance-shell .notification-menu-button.bo-chat-launcher { position: relative; overflow: visible; background: var(--bo-ui-bg); border-color: var(--bo-ui-border-strong); }
body.bo-shell .notification-menu-button.bo-chat-launcher:hover,
body.bo-shell .notification-menu-button.bo-chat-launcher:focus-visible,
body.bo-shell.finance-shell .notification-menu-button.bo-chat-launcher:hover,
body.bo-shell.finance-shell .notification-menu-button.bo-chat-launcher:focus-visible { background: var(--bo-ui-bg-muted); border-color: var(--bo-ui-primary); }
body.bo-shell .bo-chat-launcher > .bi,
body.bo-shell.finance-shell .notification-menu-button.bo-chat-launcher > .bi { font-size: 22px; line-height: 1; color: var(--bo-ui-primary); }
body.bo-shell .bo-chat-launcher .bo-chat-unread-badge { position: absolute; top: -6px; right: -6px; display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 4px; border: 2px solid var(--bo-ui-bg); border-radius: 50px; background: var(--bo-ui-danger); color: var(--bo-ui-avatar-text); font-size: 11px; font-weight: 700; line-height: 1; pointer-events: none; }
body.bo-shell .bo-chat-launcher .bo-chat-unread-badge[hidden] { display: none; }
.bo-chat-conversation { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.bo-chat-toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; padding: 10px; border-bottom: 1px solid var(--bo-ui-border); background: var(--bo-ui-bg); color: var(--bo-ui-text); }
.bo-chat-toolbar > label { font-size: 13px; max-width: 260px; }
.bo-chat-toolbar > strong { flex: 1 1 220px; font-size: 13px; }
#chatConnection { font-size: 12px; color: var(--bo-ui-text-muted); }
.bo-chat-log { flex: 1; min-height: 0; overflow: auto; padding: 12px; overscroll-behavior: contain; overflow-anchor: none; }
body.bo-shell .bo-chat :is(.bo-chat-log, .bo-chat-rooms, .bo-chat-pins) { scrollbar-width: thin; scrollbar-color: var(--bo-ui-border-strong) var(--bo-ui-bg-muted); }
body.bo-shell .bo-chat :is(.bo-chat-log, .bo-chat-rooms, .bo-chat-pins)::-webkit-scrollbar { width: 5px; height: 5px; }
body.bo-shell .bo-chat :is(.bo-chat-log, .bo-chat-rooms, .bo-chat-pins)::-webkit-scrollbar-track { background: var(--bo-ui-bg-muted); }
body.bo-shell .bo-chat :is(.bo-chat-log, .bo-chat-rooms, .bo-chat-pins)::-webkit-scrollbar-thumb { border-radius: 2px; background: var(--bo-ui-border-strong); }
.bo-chat-message { display: flex; gap: 8px; margin: 10px 0; }
.bo-chat-message.is-own { flex-direction: row-reverse; }
.bo-chat-message-content { min-width: 0; max-width: 90%; padding: 8px 10px; border: 1px solid var(--bo-ui-border); border-radius: 12px; border-top-left-radius: 3px; background: var(--bo-ui-bg-muted); }
.bo-chat-message.is-own .bo-chat-message-content { border-color: var(--bo-ui-border-strong); border-radius: 12px; border-top-right-radius: 3px; background: var(--bo-ui-primary-soft, var(--bo-ui-bg-muted)); }
.bo-chat-avatar { display: inline-flex; flex: 0 0 28px; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 50%; font-weight: 650; font-size: 13px; color: var(--bo-ui-avatar-text); }
.bo-chat-avatar.is-backoffice { background: var(--bo-ui-backoffice-avatar); }
.bo-chat-avatar.is-finance { background: var(--bo-ui-finance-avatar); }
.bo-chat-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.bo-chat-meta time { color: var(--bo-ui-text-muted); font-size: 12px; }
.bo-chat-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.bo-chat-date, .bo-chat-unread-divider { text-align: center; font-size: 12px; padding: 8px; color: var(--bo-ui-text-muted); }
.bo-chat-unread-divider { color: var(--bo-ui-primary); border-top: 1px solid var(--bo-ui-primary); }
.bo-chat-attachment { display: block; overflow-wrap: anywhere; color: var(--bo-ui-primary); margin-top: 8px; }
.bo-chat-attachment img { display: block; max-width: min(280px, 100%); max-height: 180px; object-fit: contain; background: var(--bo-ui-avatar-text); }
/* Shared image/PDF preview for both chat panels. */
body.bo-shell .bo-media-viewer { width: min(1400px, 96vw); max-width: 96vw; height: 92dvh; max-height: 92dvh; padding: 0; margin: auto; border: 1px solid var(--bo-ui-border-strong); border-radius: var(--bo-ui-radius); background: var(--bo-ui-bg); color: var(--bo-ui-text); overflow: hidden; }
body.bo-shell .bo-media-viewer:not([open]) { display: none; }
body.bo-shell .bo-media-viewer[open] { display: flex; flex-direction: column; align-items: stretch; text-align: left; }
.bo-media-viewer::backdrop { background: rgb(0 0 0 / 65%); }
.bo-media-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--bo-ui-border); }
.bo-media-header strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bo-media-header > button { flex: 0 0 auto; }
.bo-media-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--bo-ui-border); font-size: 13px; }
.bo-media-pages { display: inline-flex; align-items: center; gap: 6px; }
.bo-media-pages input { width: 64px; height: 32px; border: 1px solid var(--bo-ui-border-strong); border-radius: var(--bo-ui-radius); background: var(--bo-ui-bg); color: var(--bo-ui-text); padding: 2px 4px; }
.bo-media-viewer [hidden] { display: none !important; }
.bo-media-status { flex: 0 0 auto; padding: 8px 12px; font-size: 13px; color: var(--bo-ui-text-muted); }
.bo-media-status:empty { display: none; }
.bo-media-stage { flex: 1; min-height: 0; overflow: auto; padding: 16px; background: var(--bo-ui-bg-muted); overscroll-behavior: contain; }
.bo-media-stage > img, .bo-media-stage > canvas { display: block; max-width: none; max-height: none; margin: 0 auto; background: #fff; }
.bo-media-stage.is-pannable { cursor: grab; user-select: none; }
.bo-media-stage.is-panning { cursor: grabbing; scroll-behavior: auto; }
@media (max-width: 575.98px) { body.bo-shell .bo-media-viewer { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; } .bo-media-toolbar { padding: 6px; gap: 4px; } }
.bo-chat-message.is-deleted .bo-chat-text { color: var(--bo-ui-text-muted); font-style: italic; }
.bo-chat-composer { border-top: 1px solid var(--bo-ui-border); padding: 10px; }
.bo-chat-composer fieldset { min-width: 0; }
.bo-chat-composer textarea { resize: none; min-height: 32px; max-height: 120px; }
.bo-chat-compose-line { display: flex; align-items: flex-end; gap: 8px; }
.bo-chat-input-shell { display: flex; align-items: flex-end; gap: 4px; flex: 1; min-width: 0; border: 1px solid var(--bo-ui-border-strong); border-radius: 22px; padding: 5px 8px; background: var(--bo-ui-bg); }
.bo-chat-input-shell:focus-within { border-color: var(--bo-ui-primary); }
body.bo-shell .bo-chat-input-shell textarea.form-control { flex: 1; min-width: 0; min-height: 32px; max-height: 120px; resize: none; padding: 6px 4px; border: 0; border-radius: 0; box-shadow: none; background: transparent; color: var(--bo-ui-text); line-height: 20px; }
body.bo-shell .bo-chat-input-shell .bo-chat-attach-control { border: 0; background: transparent; color: var(--bo-ui-text-muted); padding: 4px 7px; font-size: 19px; }
.bo-chat-send-control { width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; justify-content: center; font-size: 18px; padding: 0; }
.bo-chat-emoji-picker { position: relative; flex-shrink: 0; }
.bo-chat-emoji-picker summary { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; list-style: none; cursor: pointer; font-size: 18px; color: var(--bo-ui-text-muted); }
.bo-chat-emoji-picker summary::-webkit-details-marker { display: none; }
.bo-chat-emoji-options { position: absolute; bottom: calc(100% + 12px); left: 0; display: flex; gap: 4px; padding: 6px; border: 1px solid var(--bo-ui-border); background: var(--bo-ui-bg); z-index: 6; }
.bo-chat-emoji-button { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 32px; padding: 4px; border: 0; border-radius: var(--bo-ui-radius); background: transparent; font-size: 20px; line-height: 1; }
.bo-chat-emoji-button:hover, .bo-chat-emoji-button[aria-pressed="true"] { background: var(--bo-ui-bg-hover); }
.bo-chat-emoji-button:focus-visible, .bo-chat-emoji-picker summary:focus-visible, .bo-chat-reaction-chip:focus-visible { outline: 2px solid var(--bo-ui-primary); outline-offset: 1px; }
.bo-chat-reaction-picker { display: flex; gap: 2px; padding-bottom: 4px; border-bottom: 1px solid var(--bo-ui-border); margin-bottom: 4px; }
.bo-chat-reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.bo-chat-reaction-chip { border: 1px solid var(--bo-ui-border); border-radius: 12px; background: var(--bo-ui-bg); color: var(--bo-ui-text); padding: 3px 8px; font-size: 13px; }
.bo-chat-reaction-chip[aria-pressed="true"] { border-color: var(--bo-ui-primary); }
.bo-chat-file-count:empty { display: none; }
.bo-chat-file-count { display: block; margin-top: 6px; color: var(--bo-ui-text-muted); font-size: 12px; }
.bo-chat-compose-actions { display: flex; align-items: center; gap: 8px; padding-top: 8px; }
#chatFileNames { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 12px; }
.bo-chat-notice { min-height: 22px; padding: 4px 10px; font-size: 13px; color: var(--bo-ui-text-muted); }
.bo-chat-composer[aria-busy="true"] { opacity: .7; cursor: progress; }
.bo-chat-composer progress { width: 100%; height: 6px; accent-color: var(--bo-ui-primary); }
.bo-chat-drawer-body { padding: 0 !important; overflow: hidden !important; }
body.bo-shell .offcanvas.bo-operation-drawer .bo-chat-header { position: relative; padding-right: 100px; }
body.bo-shell .bo-chat-header .bo-chat-expand { position: absolute; top: 12px; right: 48px; width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
body.bo-shell .offcanvas.bo-operation-drawer .bo-chat-header .btn-close { position: absolute; top: 12px; right: 12px; margin: 0; }
.bo-chat-drawer-body .bo-chat { height: 100%; min-height: 0; grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); border: 0; }
.bo-chat-drawer-body .bo-chat-rooms { max-height: 160px; border-right: 0; border-bottom: 1px solid var(--bo-ui-border); }
.bo-chat-drawer-body .bo-chat-room-list { display: flex; flex-wrap: wrap; gap: 4px; }
.bo-chat-drawer-body .bo-chat-room-list h3 { flex-basis: 100%; margin: 4px; }
.bo-chat-drawer-body .bo-chat-room { width: auto; flex: 1; font-size: 12px; }
.bo-chat-selectors { display: none; }
.bo-chat-drawer-body .bo-chat-room-list { display: none; }
.bo-chat-drawer-body .bo-chat-selectors { display: grid; grid-template-columns: 1fr 2fr; gap: 6px; align-items: center; font-size: 13px; }
.bo-chat-hash { font-size: 11px; overflow-wrap: anywhere; color: var(--bo-ui-text-muted); }
.bo-chat-deleted-status { color: var(--bo-ui-danger); font-weight: 600; }
.bo-chat-deleted-status::before { content: '■ '; font-size: 9px; }
#chatArchiveRows tr { cursor: pointer; }
#chatArchiveRows tr:hover, #chatArchiveRows tr:focus { background: var(--bo-ui-bg-hover); outline-color: var(--bo-ui-primary); }
#chatArchiveRows td { max-width: 320px; overflow-wrap: anywhere; }
.bo-chat-toolbar .bo-button:disabled { color: var(--bo-ui-text-muted); background: var(--bo-ui-bg-muted); border-color: var(--bo-ui-border); }
@media (max-width: 767.98px) {
    .bo-chat { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); height: calc(100dvh - 140px); min-height: 480px; }
    .bo-chat-rooms { max-height: 100px; border-right: 0; border-bottom: 1px solid var(--bo-ui-border); }
    .bo-chat-room-list { display: none; }
    .bo-chat-selectors { display: grid; grid-template-columns: 90px minmax(0, 1fr); align-items: center; gap: 4px; font-size: 12px; }
    .bo-chat-toolbar > strong { flex-basis: 100%; }
    #chatConnection { flex-basis: 100%; }
    .bo-chat-message-content { max-width: calc(100% - 36px); }
    .bo-chat-toolbar > label { max-width: 100%; }
}

.bo-table > tbody > tr > td.bo-wait-heat {
    background-color: color-mix(in srgb, var(--bo-ui-danger) var(--bo-heat-weight, 0%), var(--bo-ui-bg)) !important;
    color: var(--bo-ui-text);
    box-shadow: none;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
/* Message actions shared by both panels and chat surfaces. */
.bo-chat-actions { position: relative; margin-left: auto; }
.bo-chat-actions summary { list-style: none; cursor: pointer; padding: 4px 6px; opacity: 0; color: var(--bo-ui-text-muted); border-radius: var(--bo-ui-radius); }
.bo-chat-actions summary::-webkit-details-marker { display: none; }
.bo-chat-message:hover .bo-chat-actions summary, .bo-chat-actions:focus-within summary, .bo-chat-actions[open] summary { opacity: 1; }
.bo-chat-actions summary:focus-visible { outline: 2px solid var(--bo-ui-primary); }
.bo-chat-action-options { position: absolute; right: 0; top: 100%; z-index: 5; width: 220px; max-width: calc(100vw - 32px); padding: 6px; background: var(--bo-ui-bg); border: 1px solid var(--bo-ui-border-strong); border-radius: var(--bo-ui-radius); }
.bo-chat-action-options .bo-button { display: flex; width: 100%; min-height: 38px; height: auto; align-items: center; justify-content: flex-start; padding: 8px 10px; border: 0; font-size: 15px; line-height: 20px; text-align: left; white-space: nowrap; }
.bo-chat-action-options .bo-button > .bi { flex: 0 0 20px; width: 20px; font-size: 17px; text-align: center; }
.bo-chat-action-options .bo-button:hover { background: var(--bo-ui-bg-hover); }
.bo-chat-action-options .bo-button:focus-visible { outline: 2px solid var(--bo-ui-primary); outline-offset: -2px; }
.bo-chat-action-options .bo-button.is-delete { color: var(--bo-ui-danger); }
.bo-chat-action-options .bo-button { gap: 8px; }
.bo-chat-reply-quote, .bo-chat-reply-compose { background: var(--bo-ui-bg-muted); border: 1px solid var(--bo-ui-border); border-left: 3px solid var(--bo-ui-primary); color: var(--bo-ui-text); padding: 6px 10px; text-align: left; }
.bo-chat-reply-quote { display: flex; flex-direction: column; gap: 3px; width: 100%; margin: 6px 0; cursor: pointer; font: inherit; }
.bo-chat-reply-quote span, .bo-chat-reply-compose > div { overflow-wrap: anywhere; white-space: pre-wrap; }
.bo-chat-reply-quote span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bo-chat-reply-quote:hover { background: var(--bo-ui-bg-hover); }
.bo-chat-reply-quote:focus-visible { outline: 2px solid var(--bo-ui-primary); outline-offset: 2px; }
.bo-chat-reply-compose { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.bo-chat-reply-compose[hidden] { display: none; }
.bo-chat-message.is-reply-highlight .bo-chat-message-content { background: var(--bo-ui-border); transition: background-color 180ms ease; }
@media (prefers-reduced-motion: reduce) { .bo-chat-message.is-reply-highlight .bo-chat-message-content { transition: none; } }
.bo-chat-actions.is-upward .bo-chat-action-options { top: auto; bottom: 100%; }
@media (hover: none) { .bo-chat-actions summary { opacity: 1; } }
.bo-chat-receipt { display: inline-flex; align-items: center; font-size: 17px; color: var(--bo-ui-text-muted); }
.bo-chat-receipt.is-read { color: var(--bo-ui-primary); }
.bo-chat-attachment-previews { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; max-height: 180px; overflow-y: auto; }
.bo-chat-attachment-previews[hidden] { display: none; }
.bo-chat-attachment-preview { display: flex; align-items: center; gap: 8px; padding: 6px; border: 1px solid var(--bo-ui-border); background: var(--bo-ui-bg-muted); color: var(--bo-ui-text); max-width: 100%; }
.bo-chat-attachment-preview img { width: 64px; height: 64px; object-fit: contain; background: var(--bo-ui-bg); }
.bo-chat-attachment-preview > i { font-size: 28px; }
.bo-chat-attachment-preview-info { display: flex; flex-direction: column; min-width: 0; max-width: 180px; font-size: 12px; }
.bo-chat-attachment-preview-info span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bo-chat-attachment-preview-info small { color: var(--bo-ui-text-muted); }

/* Backoffice chat: settings-selected group badges and room shortcuts. */
.bo-chat-rooms.is-backoffice-chat .bo-chat-selectors,
.bo-chat-rooms.is-backoffice-chat .bo-chat-room-list { display: none; }
.bo-chat-quick-select { display: grid; gap: 8px; }
.bo-chat-group-buttons { display: flex; flex-wrap: nowrap; gap: 6px; }
body.bo-shell .bo-chat-group-button { flex: 1 1 0; min-width: 0; padding: 3px; height: auto; min-height: 32px; gap: 4px; flex-wrap: wrap; justify-content: center; }
body.bo-shell .bo-chat-group-button .bo-finance-group-badge { max-width: 100%; white-space: normal; overflow-wrap: anywhere; text-align: center; }
body.bo-shell .bo-chat-group-button[aria-pressed="true"] { flex-grow: var(--bo-chat-other-groups, 1); border-color: var(--bo-finance-group-color); box-shadow: inset 0 -3px var(--bo-finance-group-color); }
.bo-chat-category-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
body.bo-shell .bo-chat-category { height: auto; min-height: 34px; padding: 6px 4px; gap: 4px; flex-wrap: wrap; justify-content: center; font-size: 13px; }
body.bo-shell .bo-chat-category.is-success { color: var(--bo-ui-success); background: var(--bo-ui-success-soft); }
body.bo-shell .bo-chat-category.is-danger { color: var(--bo-ui-danger); background: var(--bo-ui-danger-soft); }
body.bo-shell .bo-chat-category.is-warning { color: var(--bo-ui-warning); background: var(--bo-ui-warning-soft); }

/* Çarkı: shared COUI operational editor and preview */
.bo-wheel-settings-drawer { --bs-offcanvas-width:min(920px, 96vw); }
.bo-wheel-detail-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0; border-top:1px solid var(--bo-ui-border); border-left:1px solid var(--bo-ui-border); }
.bo-wheel-detail-grid > div { min-width:0; padding:8px 10px; border-right:1px solid var(--bo-ui-border); border-bottom:1px solid var(--bo-ui-border); }
.bo-wheel-detail-grid span { display:block; color:var(--bo-ui-text-muted); font-size:11px; }
.bo-wheel-detail-grid strong { display:block; overflow-wrap:anywhere; color:var(--bo-ui-text); font-size:13px; font-weight:600; }
.bo-wheel-preview { position:relative; width:min(390px, 82vw); aspect-ratio:1; margin:0 auto; padding:12px; background:radial-gradient(circle at 50% 45%,#392300 0,#090705 55%,#020202 100%); border:1px solid var(--bo-ui-border-strong); }
.bo-wheel-preview svg { width:100%; height:100%; overflow:visible; }
.bo-wheel-preview .wheel-rotor { transform-origin:50px 50px; }
.bo-wheel-preview .wheel-hub { stroke:#7d2b00; stroke-width:.7; }
.bo-wheel-preview .wheel-hub-bolt { fill:#fff2a5; stroke:#a94c00; stroke-width:.12; filter:drop-shadow(0 0 .45px rgba(255,219,70,.95)); }
.bo-wheel-preview .wheel-hub-label { fill:#ffd64f; font-size:5.2px; font-weight:900; paint-order:stroke; stroke:#6c2100; stroke-width:.45px; }
.bo-wheel-preview .wheel-bulb { fill:#fff8c7; stroke:#ffb000; stroke-width:.28; }
.bo-wheel-preview .wheel-gem { fill:#f5fbff; stroke:#ffcf39; stroke-width:.25; }
.bo-wheel-preview .wheel-segment-copy { filter:drop-shadow(0 .7px .45px rgba(0,0,0,.9)); }
.bo-wheel-preview-pointer { position:absolute; z-index:2; top:8px; left:50%; width:9.6%; height:13.9%; transform:translateX(-50%); background:linear-gradient(90deg,#7a2800 0%,#f0a900 13%,#fff09a 34%,#fffbd0 50%,#ffd13b 72%,#7a2800 100%); clip-path:polygon(0 0,100% 0,58% 100%,42% 100%); filter:drop-shadow(0 3px 2px rgba(0,0,0,.7)) drop-shadow(0 0 5px rgba(255,193,36,.8)); }
.bo-wheel-preview-pointer::before { content:""; position:absolute; inset:5% 10% 9%; background:linear-gradient(100deg,#ffd332,#fffbd7 48%,#e38d00); clip-path:inherit; }
.bo-wheel-segment { margin-top:8px; border:1px solid var(--bo-ui-border); background:var(--bo-ui-bg); }
.bo-wheel-segment-head { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:38px; padding:5px 8px; border-bottom:1px solid var(--bo-ui-border); background:var(--bo-ui-bg-muted); }
.bo-wheel-segment-head strong { color:var(--bo-ui-text); font-size:13px; }
.bo-wheel-segment-head > div { display:flex; gap:4px; }
.bo-wheel-segment > .bo-drawer-form-grid { padding:8px; }
.bo-wheel-probability-total { margin-top:10px; padding:8px 10px; border:1px solid var(--bo-ui-border); background:var(--bo-ui-bg-muted); color:var(--bo-ui-text); font-weight:700; font-variant-numeric:tabular-nums; }
.bo-wheel-probability-total.is-valid { border-color:var(--bo-ui-success); color:var(--bo-ui-success); }
.bo-wheel-probability-total.is-invalid { border-color:var(--bo-ui-danger); color:var(--bo-ui-danger); }
.bo-inline-actions { display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
body.bo-shell[data-color-mode="dark"] .bo-wheel-preview { background:#071426; }
@media (max-width:767.98px) { .bo-wheel-detail-grid { grid-template-columns:1fr; } .bo-wheel-settings-drawer { --bs-offcanvas-width:100vw; } }
body.bo-shell .bo-chat-category[aria-pressed="true"] { border-color: currentColor; box-shadow: inset 0 -2px currentColor; font-weight: 650; }
body.bo-shell .bo-chat-category:disabled { opacity: .5; cursor: not-allowed; }
.bo-chat-group-button:focus-visible, .bo-chat-category:focus-visible { outline: 2px solid var(--bo-ui-primary); outline-offset: 2px; }
.bo-chat:has(.is-backoffice-chat) { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
.bo-chat-rooms.is-backoffice-chat { max-height: 180px; border-right: 0; border-bottom: 1px solid var(--bo-ui-border); }
.bo-chat:has(.is-backoffice-chat) .bo-chat-conversation > .bo-chat-toolbar { display: none; }

/* Full-page backoffice conversation workspace; drawer and finance retain their layout. */
.bo-chat.bo-chat-workspace { grid-template-columns: 248px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.bo-chat-workspace .bo-chat-rooms.is-backoffice-chat { max-height: none; padding: 12px; border-right: 1px solid var(--bo-ui-border); border-bottom: 0; background: var(--bo-ui-bg-muted); }
.bo-chat-workspace .bo-chat-group-buttons { padding-bottom: 12px; border-bottom: 1px solid var(--bo-ui-border); }
.bo-chat-workspace .bo-chat-quick-select { gap: 16px; }
.bo-chat-workspace .bo-chat-category-buttons { grid-template-columns: minmax(0, 1fr); gap: 8px; }
body.bo-shell .bo-chat-workspace .bo-chat-category { min-height: 48px; padding: 10px; flex-wrap: nowrap; justify-content: flex-start; gap: 10px; text-align: left; font-size: 12px; }
.bo-chat-workspace .bo-chat-category > .bi:first-child { font-size: 20px; }
.bo-chat-workspace .bo-chat-category > span:not(.bo-chat-count) { flex: 1; }
.bo-chat-workspace .bo-chat-room-arrow { font-size: 12px; }
.bo-chat.bo-chat-workspace .bo-chat-conversation > .bo-chat-toolbar { display: flex; min-height: 64px; padding: 10px 16px; }
.bo-chat-workspace #chatRoomTitle { display: flex; align-items: center; gap: 12px; min-width: 0; }
.bo-chat-room-emblem { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; background: var(--bo-ui-primary-soft); color: var(--bo-ui-primary); font-size: 22px; }
.bo-chat-room-identity { display: flex; align-items: flex-start; flex-direction: column; gap: 4px; }
.bo-chat-room-heading { font-size: 14px; font-weight: 650; }
.bo-chat-workspace .bo-chat-log { padding: 16px 20px; background: var(--bo-ui-bg-muted); }
.bo-chat-workspace .bo-chat-message { margin-bottom: 14px; }
.bo-chat-workspace .bo-chat-message:not(.is-own) .bo-chat-message-content { background: var(--bo-ui-bg); }
.bo-chat-workspace .bo-chat-composer { padding: 12px 16px; }
@media (max-width: 767.98px) {
    .bo-chat.bo-chat-workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
    .bo-chat-workspace .bo-chat-rooms.is-backoffice-chat { max-height: 180px; padding: 8px; border-right: 0; border-bottom: 1px solid var(--bo-ui-border); }
    .bo-chat-workspace .bo-chat-quick-select { gap: 8px; }
    .bo-chat-workspace .bo-chat-group-buttons { padding-bottom: 0; border-bottom: 0; }
    .bo-chat-workspace .bo-chat-category-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
    body.bo-shell .bo-chat-workspace .bo-chat-category { padding: 6px 4px; gap: 4px; min-height: 44px; font-size: 10px; }
    .bo-chat-workspace .bo-chat-category > .bi:first-child { font-size: 16px; }
    .bo-chat-workspace .bo-chat-room-arrow { display: none; }
    .bo-chat.bo-chat-workspace .bo-chat-conversation > .bo-chat-toolbar { min-height: 56px; padding: 8px; }
    .bo-chat-workspace .bo-chat-log { padding: 12px 8px; }
    .bo-chat-workspace .bo-chat-composer { padding: 8px; }
}

/* Finance-group selectors use the group color across the complete card. */
body.bo-shell .bo-chat-group-button,
body.bo-shell .bo-chat-group-button:hover,
body.bo-shell .bo-chat-group-button:focus {
    background: var(--bo-finance-group-color, #e2e8f0);
    color: #172033;
    border-color: color-mix(in srgb, var(--bo-finance-group-color, #e2e8f0) 75%, #172033);
}
body.bo-shell .bo-chat-group-button .bo-finance-group-badge {
    background: transparent;
    border: 0;
    border-radius: 0;
    color: inherit;
    padding: 3px 7px;
}
body.bo-shell .bo-chat-group-button[aria-pressed="true"] {
    box-shadow: inset 0 -3px color-mix(in srgb, var(--bo-finance-group-color, #e2e8f0) 55%, #172033);
}

body.bo-shell .bo-chat-category .bo-chat-count {
    background: transparent;
    color: inherit;
    padding: 0;
    min-width: 0;
    border-radius: 0;
    font-size: inherit;
}

/* Full-page sidebar groups stay readable; drawer keeps its selected 50% layout. */
.bo-chat-workspace .bo-chat-group-buttons { flex-direction: column; }
body.bo-shell .bo-chat-workspace .bo-chat-group-button,
body.bo-shell .bo-chat-workspace .bo-chat-group-button[aria-pressed="true"] {
    flex: 0 0 auto;
    width: 100%;
    min-height: 36px;
}

/* No separator below the chat drawer header in either panel. */
body.bo-shell #chatDrawer .bo-chat-header { border-bottom: 0; }
body.bo-shell #chatDrawer .bo-chat { border-top: 0; }

/* Sidebar-first chat navigation and larger page typography. */
body.bo-shell .sidebar .bo-chat-nav-group { min-height: 40px; }
.bo-chat-nav-group .menu-label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.bo-chat-nav-count { margin-left: auto; font-size: inherit; font-weight: 650; white-space: nowrap; }
body.bo-shell .sidebar .bo-chat-nav-group.active,
body.bo-shell .sidebar .bo-chat-nav-group.active:hover {
    background: linear-gradient(110deg, var(--bo-finance-group-color, #e2e8f0), color-mix(in srgb, var(--bo-finance-group-color, #e2e8f0) 75%, #ffffff));
    color: #172033;
    border-bottom: 3px solid color-mix(in srgb, var(--bo-finance-group-color, #e2e8f0) 55%, #172033);
}
body.bo-shell .sidebar .bo-chat-nav-group.active > i { color: inherit; }
.bo-chat-group-identity {
    display: flex; flex-direction: column; gap: 4px; padding: 14px 12px;
    border-bottom: 1px solid var(--bo-ui-border);
    background: linear-gradient(110deg, color-mix(in srgb, var(--bo-finance-group-color, #e2e8f0) 22%, var(--bo-ui-bg)), var(--bo-ui-bg));
}
.bo-chat-group-identity strong { font-size: 18px; font-weight: 650; }
.bo-chat-group-identity > span { font-size: 13px; color: var(--bo-ui-text-muted); }
.bo-chat-workspace .bo-chat-rooms.is-backoffice-chat { padding: 0; }
.bo-chat-workspace .bo-chat-category-buttons { padding: 0 10px 12px; }
body.bo-shell .bo-chat-workspace .bo-chat-category { font-size: 14px; min-height: 54px; }
body.bo-shell .bo-chat-workspace .bo-chat-category[aria-pressed="true"] { border-width: 2px; box-shadow: inset 4px 0 currentColor; font-weight: 700; }
.bo-chat-workspace .bo-chat-room-heading { font-size: 18px; }
.bo-chat-workspace .bo-chat-text, body.bo-shell .bo-chat-workspace .bo-chat-input-shell textarea.form-control { font-size: 16px; line-height: 1.5; }
.bo-chat-workspace .bo-chat-meta { font-size: 14px; }
.bo-chat-workspace .bo-chat-meta time, .bo-chat-workspace .bo-chat-date { font-size: 13px; }
@media (max-width: 767.98px) {
    .bo-chat-workspace .bo-chat-category-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 6px 6px; }
    body.bo-shell .bo-chat-workspace .bo-chat-category { font-size: 12px; min-height: 48px; }
    .bo-chat-group-identity { padding: 8px 10px; }
    .bo-chat-group-identity > span { display: none; }
    .bo-chat-workspace .bo-chat-room-heading { font-size: 16px; }
}

/* Reference-style selected rows: gradient themes only, including chat and site links.
   Kept after chat group styles so hover retains the chosen appearance palette.
   The dark text/light fill pair is shared by light and dark page modes. */
body.bo-shell:is([data-sidebar-color="slate"], [data-sidebar-color="charcoal"]) .sidebar .menu-item.active,
body.bo-shell:is([data-sidebar-color="slate"], [data-sidebar-color="charcoal"]) .sidebar .menu-item.active:hover,
body.bo-shell:is([data-sidebar-color="slate"], [data-sidebar-color="charcoal"]) .sidebar .menu-item.active:focus-visible {
    border: 1px solid var(--bo-user-sidebar-active-border);
    border-radius: 10px;
    background: var(--bo-user-sidebar-active);
    color: var(--bo-user-sidebar-active-text);
    font-weight: 700;
    box-shadow: none;
}
body.bo-shell:is([data-sidebar-color="slate"], [data-sidebar-color="charcoal"]) .sidebar .menu-item.active i {
    color: inherit;
}
body.bo-shell:is([data-sidebar-color="slate"], [data-sidebar-color="charcoal"]) .sidebar .menu-item.active:focus-visible {
    outline: 2px solid var(--bo-user-sidebar-accent);
    outline-offset: 2px;
}
/* Matching counters on selected and unselected rows in both accent themes. */
body.bo-shell:is([data-sidebar-color="slate"], [data-sidebar-color="charcoal"]) .sidebar .menu-item :is(.bo-chat-nav-count, .sidebar-badge) {
    min-width: 24px;
    min-height: 24px;
    padding: 2px 7px;
    border: 1px solid #30435d;
    border-radius: 999px;
    background: #101c2e;
    color: var(--bo-user-sidebar-accent);
    font-size: 12px;
    line-height: 18px;
    text-align: center;
    flex-shrink: 0;
}

/* Reference-inspired chat appearance: shared by both panels, scoped to chat only. */
body.bo-shell .bo-chat-workspace#chatSurface {
    --bo-chat-canvas: #f3f5f7;
    --bo-chat-surface: #ffffff;
    --bo-chat-panel: #edf1f5;
    --bo-chat-edge: #d3dce4;
    --bo-chat-ink: #172b3c;
    --bo-chat-muted: #526579;
    --bo-chat-incoming: #e4edf3;
    --bo-chat-gold: #e5b758;
    --bo-chat-gold-light: #ffe1a0;
    --bo-chat-selected: #fff1ce;
    --bo-chat-selected-ink: #624509;
    --bo-chat-link: #07558c;
    background: var(--bo-chat-canvas); color: var(--bo-chat-ink);
}
body.bo-shell[data-color-mode="dark"] .bo-chat-workspace#chatSurface {
    --bo-chat-canvas: #041421;
    --bo-chat-surface: #081b2a;
    --bo-chat-panel: #061622;
    --bo-chat-edge: #20394b;
    --bo-chat-ink: #e5edf4;
    --bo-chat-muted: #a1b3c3;
    --bo-chat-incoming: #1a3041;
    --bo-chat-selected: #302b1b;
    --bo-chat-selected-ink: #f5d789;
    --bo-chat-link: #b8ddff;
}
body.bo-shell .bo-chat-workspace#chatSurface .bo-chat-rooms.is-backoffice-chat,
body.bo-shell .bo-chat-workspace#chatSurface .bo-chat-conversation > .bo-chat-toolbar,
body.bo-shell .bo-chat-workspace#chatSurface .bo-chat-composer,
body.bo-shell .bo-chat-workspace#chatSurface .bo-chat-notice {
    background: var(--bo-chat-panel); color: var(--bo-chat-ink); border-color: var(--bo-chat-edge);
}
body.bo-shell .bo-chat-workspace#chatSurface .bo-chat-group-identity {
    background: linear-gradient(115deg, var(--bo-chat-surface), var(--bo-chat-panel));
    border-color: var(--bo-chat-edge);
}
body.bo-shell .bo-chat-workspace#chatSurface .bo-chat-group-identity > span { color: var(--bo-chat-muted); }
body.bo-shell .bo-chat-workspace#chatSurface .bo-chat-log {
    background-color: var(--bo-chat-canvas);
    background-image: radial-gradient(ellipse at top right, color-mix(in srgb, var(--bo-chat-edge) 22%, transparent), transparent 65%);
}
body.bo-shell .bo-chat-workspace#chatSurface .bo-chat-category {
    background: linear-gradient(115deg, var(--bo-chat-surface), var(--bo-chat-panel));
    color: var(--bo-chat-ink); border: 1px solid var(--bo-chat-edge); border-radius: 6px;
    box-shadow: none; min-height: 54px;
}
body.bo-shell .bo-chat-workspace#chatSurface .bo-chat-category:hover:not(:disabled) { border-color: var(--bo-chat-gold); }
body.bo-shell .bo-chat-workspace#chatSurface .bo-chat-category[aria-pressed="true"] {
    background: linear-gradient(165deg, color-mix(in srgb, var(--bo-chat-gold) 32%, var(--bo-chat-selected)), var(--bo-chat-selected) 65%);
    color: var(--bo-chat-selected-ink); border: 1px solid var(--bo-chat-gold);
    box-shadow: inset 0 1px 7px color-mix(in srgb, var(--bo-chat-gold) 36%, transparent), 0 0 7px color-mix(in srgb, var(--bo-chat-gold) 20%, transparent);
}
body.bo-shell .bo-chat-workspace#chatSurface .bo-chat-room-emblem { background: color-mix(in srgb, var(--bo-chat-gold) 15%, var(--bo-chat-panel)); color: var(--bo-chat-selected-ink); }
body.bo-shell .bo-chat-workspace#chatSurface .bo-chat-message:not(.is-own) .bo-chat-message-content {
    background: var(--bo-chat-incoming); color: var(--bo-chat-ink); border-color: var(--bo-chat-edge);
    border-radius: 10px; border-top-left-radius: 3px;
}
body.bo-shell .bo-chat-workspace#chatSurface .bo-chat-message.is-own .bo-chat-message-content {
    background: linear-gradient(110deg, var(--bo-chat-gold-light), var(--bo-chat-gold));
    color: #26313a; border-color: #d5aa52; border-radius: 10px; border-top-right-radius: 3px;
}
body.bo-shell .bo-chat-workspace#chatSurface .bo-chat-meta time,
body.bo-shell .bo-chat-workspace#chatSurface .bo-chat-date,
body.bo-shell .bo-chat-workspace#chatSurface .bo-chat-actions summary { color: var(--bo-chat-muted); }
body.bo-shell .bo-chat-workspace#chatSurface .is-own .bo-chat-meta time,
body.bo-shell .bo-chat-workspace#chatSurface .is-own .bo-chat-actions summary,
body.bo-shell .bo-chat-workspace#chatSurface .is-own .bo-chat-receipt { color: #46515a; }
body.bo-shell .bo-chat-workspace#chatSurface .is-own .bo-chat-receipt.is-read { color: #005477; }
body.bo-shell .bo-chat-workspace#chatSurface .bo-chat-message-content > a { color: var(--bo-chat-link); }
body.bo-shell .bo-chat-workspace#chatSurface .is-own .bo-chat-message-content > a { color: #164d70; }
body.bo-shell .bo-chat-workspace#chatSurface .is-own .bo-chat-reply-quote { background: #f6dda5; color: #26313a; border-color: #b38d43; }
body.bo-shell .bo-chat-workspace#chatSurface .bo-chat-input-shell { background: var(--bo-chat-surface); border-color: var(--bo-chat-edge); }
body.bo-shell .bo-chat-workspace#chatSurface .bo-chat-input-shell textarea.form-control { color: var(--bo-chat-ink); }
body.bo-shell .bo-chat-workspace#chatSurface .bo-chat-input-shell textarea::placeholder { color: var(--bo-chat-muted); }
body.bo-shell .bo-chat-workspace#chatSurface .bo-chat-send-control { background: linear-gradient(135deg, var(--bo-chat-gold-light), var(--bo-chat-gold)); color: #26313a; border-color: var(--bo-chat-gold); }
body.bo-shell .bo-chat-workspace#chatSurface .bo-chat-message.is-reply-highlight .bo-chat-message-content { background: var(--bo-ui-border); color: var(--bo-ui-text); }

body.bo-shell .bo-chat-workspace#chatSurface .bo-chat-category:disabled,
body.bo-shell .bo-chat-workspace#chatSurface .bo-chat-send-control:disabled { opacity: .5; cursor: not-allowed; }
body.bo-shell .bo-chat-workspace#chatSurface .is-own .bo-chat-message-content a { color: #164d70; }
body.bo-shell .bo-chat-workspace#chatSurface .bo-chat-send-control:hover:not(:disabled) { filter: brightness(1.06); }

.bo-chat-message-footer { display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin-top: 4px; white-space: nowrap; }
body.bo-shell .bo-chat-workspace#chatSurface .bo-chat-message-footer time { font-size: 12px; color: var(--bo-chat-muted); }
body.bo-shell .bo-chat-workspace#chatSurface .is-own .bo-chat-message-footer time { color: #46515a; }

.bo-chat-pins { flex-shrink: 0; max-height: 150px; overflow: auto; border-bottom: 1px solid var(--bo-chat-edge, var(--bo-ui-border)); }
.bo-chat-pins[hidden] { display: none; }
.bo-chat-pin { display: grid; grid-template-columns: 24px minmax(0,1fr) auto; gap: 10px; width: 100%; padding: 8px 14px; border: 0; border-left: 3px solid var(--bo-chat-gold, var(--bo-ui-primary)); background: var(--bo-chat-surface, var(--bo-ui-bg)); color: var(--bo-chat-ink, var(--bo-ui-text)); text-align: left; }
.bo-chat-pin + .bo-chat-pin { border-top: 1px solid var(--bo-chat-edge, var(--bo-ui-border)); }
.bo-chat-pin > i { align-self: center; color: var(--bo-chat-selected-ink, var(--bo-ui-primary)); }
.bo-chat-pin-content { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 13px; }
.bo-chat-pin-content > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bo-chat-pin time { align-self: end; font-size: 12px; color: var(--bo-chat-muted, var(--bo-ui-text-muted)); }
.bo-chat-pin:focus-visible { outline: 2px solid var(--bo-ui-primary); outline-offset: -2px; }
.bo-chat-pin:hover { background: var(--bo-chat-incoming, var(--bo-ui-bg-hover)); }

/* Chat loading surfaces share the panel's light/dark tokens. */
.bo-chat-canvas-loader { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--bo-ui-text-muted); }
.bo-chat-canvas-loader[hidden], .bo-chat-log[hidden], .bo-media-loader[hidden] { display: none; }
.bo-chat-canvas-loader::before, .bo-media-loader::before { content: ''; width: 22px; height: 22px; border: 2px solid var(--bo-ui-border); border-top-color: var(--bo-ui-primary); border-radius: 50%; animation: bo-chat-spin .8s linear infinite; }
@keyframes bo-chat-spin { to { transform: rotate(360deg); } }
.bo-media-viewer { position: fixed; }
.bo-media-loader { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); padding: 16px; max-width: 90%; display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--bo-ui-bg); color: var(--bo-ui-text-muted); pointer-events: none; }
.bo-chat-image { position: relative; width: 280px; max-width: 100%; height: 180px; background: var(--bo-ui-bg-muted); }
.bo-chat-image img { width: 100%; height: 180px; }
.bo-chat-image-status { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--bo-ui-text-muted); }
@media (prefers-reduced-motion: reduce) { .bo-chat-canvas-loader::before, .bo-media-loader::before { animation: none; } }

/* Center history navigation and empty-day feedback within the message canvas. */
.bo-chat-log #chatOlder:not([hidden]) { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 auto 12px; max-width: 100%; }
.bo-chat-log:not([hidden]):has(.bo-chat-empty) { display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); }
.bo-chat-log:has(.bo-chat-empty) #chatOlder { grid-area: 1 / 1; align-self: start; justify-self: center; z-index: 1; }
.bo-chat-log:has(.bo-chat-empty) #chatMessages { grid-area: 1 / 1; align-self: center; text-align: center; padding: 48px 12px; }
.bo-chat-empty { margin: 0; color: var(--bo-ui-text-muted); }

/* Measured rows keep off-screen chat history out of the live DOM. */
.bo-chat-virtual-row { display: flow-root; }
.bo-chat-virtual-spacer { pointer-events: none; overflow-anchor: none; }

/* Room search uses the same rounded, theme-aware input treatment as chat composition. */
.bo-chat-search { display: flex; align-items: center; gap: 6px; margin-left: auto; max-width: 100%; }
.bo-chat-search-input { display: flex; align-items: center; gap: 8px; min-width: 0; width: 240px; max-width: 100%; min-height: 38px; padding: 6px 12px; border: 1px solid var(--bo-ui-border-strong); border-radius: 24px; background: var(--bo-ui-bg); color: var(--bo-ui-text-muted); }
.bo-chat-search-input:focus-within { border-color: var(--bo-ui-primary); }
.bo-chat-search-input input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--bo-ui-text); font: inherit; }
.bo-chat-search-input input::placeholder { color: var(--bo-ui-text-muted); }
.bo-chat-search #chatSearchCount { white-space: nowrap; font-size: 12px; color: var(--bo-ui-text-muted); }
.bo-chat-search #chatSearchLoader[hidden] { display: none; }
.bo-chat-search .bo-button { flex: 0 0 32px; padding: 0; width: 32px; height: 32px; }
body.bo-shell .bo-chat-search-match { background: #ffe38a; color: #172b3c; padding: 0 1px; border-radius: 2px; }
@media(max-width:767.98px) { .bo-chat-search { width: 100%; } .bo-chat-search-input { flex: 1; width: auto; } }

.bo-chat-conversation > .bo-chat-toolbar { flex-shrink: 0; }

/* Automated chat reminders share the panel's light/dark semantic tokens. */
body.bo-shell .bo-chat-workspace#chatSurface .bo-chat-message.is-system:not(.is-reply-highlight) .bo-chat-message-content {
    background: var(--bo-ui-primary-soft);
    border-color: var(--bo-ui-primary);
    color: var(--bo-ui-text);
}
.bo-chat-message.is-system .bo-chat-text { font-weight: 700; font-style: italic; }
.bo-chat-avatar.is-system { background: var(--bo-ui-primary); color: #fff; }

/* Chat archive: compact master/detail layout using shared panel tokens. */
.bo-archive-filters { padding: 12px; border: 1px solid var(--bo-ui-border); background: var(--bo-ui-bg); align-items: end; }
.bo-archive-filters > label { flex: 1 1 160px; min-width: 0; font-size: 13px; font-weight: 600; }
.bo-archive-filters .form-control, .bo-archive-filters .form-select { margin-top: 4px; }
#chatArchiveStatus { margin: 10px 0; color: var(--bo-ui-text-muted); font-size: 13px; }
#chatArchiveRows tr[role="button"] { cursor: pointer; }
#chatArchiveRows tr[role="button"]:hover, #chatArchiveRows tr[role="button"]:focus { background: var(--bo-ui-bg-hover); outline: 2px solid var(--bo-ui-primary); outline-offset: -2px; }
#chatArchiveRows td { padding: 8px 10px; font-size: 14px; overflow-wrap: anywhere; }
#chatArchiveRows td:nth-child(4) { max-width: 360px; }
#chatArchiveDrawer { width: min(720px, 100vw); }
#chatArchiveDetail { font-size: 14px; }
#chatArchiveDetail .bo-drawer-section:first-child { margin-top: 0; }
.bo-archive-metadata { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 12px; margin: 0 0 12px; }
.bo-archive-metadata dt { color: var(--bo-ui-text-muted); font-weight: 400; }
.bo-archive-metadata dd { margin: 0; overflow-wrap: anywhere; }
.bo-archive-message { padding: 12px; margin: 0; background: var(--bo-ui-bg-muted); border: 1px solid var(--bo-ui-border); overflow-wrap: anywhere; }
.bo-archive-message.is-system { font-weight: 700; font-style: italic; background: var(--bo-ui-primary-soft); }
.bo-archive-attachment + .bo-archive-attachment { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--bo-ui-border); }
.bo-archive-attachment > strong { display: block; overflow-wrap: anywhere; font-size: 13px; }
.bo-archive-preview { min-height: 80px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; margin-top: 8px; padding: 8px; background: var(--bo-ui-bg-muted); border: 1px solid var(--bo-ui-border); }
.bo-archive-preview img, .bo-archive-preview canvas { display: block; max-width: 100%; max-height: 420px; object-fit: contain; height: auto; }
.bo-archive-preview-status { color: var(--bo-ui-text-muted); font-size: 13px; }
#chatArchiveDetail .bo-detail-table { width: 100%; font-size: 13px; }
#chatArchiveDetail .bo-detail-table th, #chatArchiveDetail .bo-detail-table td { padding: 7px 10px; vertical-align: top; }
#chatArchiveDetail pre { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 260px; font-size: 12px; }
#chatArchiveDetail summary { cursor: pointer; color: var(--bo-ui-primary); font-size: 13px; }
@media (max-width: 575.98px) { .bo-archive-metadata { grid-template-columns: 1fr; gap: 4px; } .bo-archive-metadata dd { margin-bottom: 8px; } }

/* Slash transaction picker and explicitly requested centered transaction preview. */
.bo-chat-composer { position: relative; }
.bo-chat-transaction-picker { position: absolute; z-index: 20; bottom: 100%; left: 0; right: 0; border: 1px solid var(--bo-ui-border-strong); background: var(--bo-ui-bg); color: var(--bo-ui-text); text-align: left; }
.bo-chat-transaction-picker[hidden] { display: none; }
.bo-chat-transaction-heading { padding: 5px 10px; border-bottom: 1px solid var(--bo-ui-border); font-size: 16px; font-weight: 600; }
.bo-chat-transaction-status { padding: 3px 10px; font-size: 14px; color: var(--bo-ui-text-muted); }
.bo-chat-transaction-results { max-height: min(280px, 35vh); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--bo-ui-border-strong) var(--bo-ui-bg-muted); }
.bo-chat-transaction-option { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; border: 0; border-bottom: 1px solid var(--bo-ui-border); padding: 4px 10px; background: var(--bo-ui-bg); color: var(--bo-ui-text); text-align: left; font-size: 16px; line-height: 20px; }
.bo-chat-transaction-option:hover, .bo-chat-transaction-option[aria-selected="true"] { background: var(--bo-ui-primary-soft); box-shadow: inset 3px 0 var(--bo-ui-primary); }
.bo-chat-transaction-option > span { min-width: 0; overflow-wrap: anywhere; }
.bo-chat-transaction-option strong { font-weight: 600; }
.bo-chat-transaction-option > strong { white-space: nowrap; font-variant-numeric: tabular-nums; }
.bo-chat-transaction-option small { display: block; margin-top: 1px; font-size: 14px; color: var(--bo-ui-text-muted); }
.bo-chat-transaction-controls { display: flex; justify-content: flex-end; gap: 8px; padding: 4px 10px; border-top: 1px solid var(--bo-ui-border); }
.bo-chat-transaction-reference { display: inline; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; cursor: pointer; }
.bo-chat-transaction-reference:focus-visible { outline: 2px solid var(--bo-ui-primary); outline-offset: 2px; }
.bo-chat-transaction-dialog { position: fixed; inset: 0; margin: auto; width: min(480px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 0; border: 1px solid var(--bo-ui-border-strong); border-radius: var(--bo-ui-radius); background: var(--bo-ui-bg); color: var(--bo-ui-text); font: 14px 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
.bo-chat-transaction-dialog::backdrop { background: rgba(0,0,0,.45); }
.bo-chat-transaction-dialog .bo-drawer-section-heading { gap: 12px; }
.bo-chat-transaction-dialog .bo-archive-metadata { margin: 0; }

.bo-chat-transaction-option > .is-deposit { color: var(--bo-ui-success); }
.bo-chat-transaction-option > .is-withdrawal { color: var(--bo-ui-danger); }

/* Shared transaction summary amount; token colors follow each status and appearance. */
.bo-deposit-stat > .bo-status-amount,
.bo-withdrawal-stat > .bo-status-amount {
    font-size: 26px;
    line-height: 1.25;
    overflow-wrap: anywhere;
    max-width: 100%;
}

/* Backoffice transaction summaries: counts replace amounts as the primary value. */
.bo-deposit-stat > .bo-status-label.is-warning,
.bo-withdrawal-stat > .bo-status-label.is-warning,
.bo-deposit-stat > .bo-status-count-primary.is-warning,
.bo-withdrawal-stat > .bo-status-count-primary.is-warning { color: var(--bo-ui-warning); }

.bo-deposit-stat > .bo-status-label.is-success,
.bo-withdrawal-stat > .bo-status-label.is-success,
.bo-deposit-stat > .bo-status-count-primary.is-success,
.bo-withdrawal-stat > .bo-status-count-primary.is-success { color: var(--bo-ui-success); }

.bo-deposit-stat > .bo-status-label.is-danger,
.bo-withdrawal-stat > .bo-status-label.is-danger,
.bo-deposit-stat > .bo-status-count-primary.is-danger,
.bo-withdrawal-stat > .bo-status-count-primary.is-danger { color: var(--bo-ui-danger); }

.bo-deposit-stat > .bo-status-count-primary,
.bo-withdrawal-stat > .bo-status-count-primary {
    max-width: 100%;
    margin-top: 2px;
    color: var(--bo-ui-text);
    font-size: 26px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

/* Opt-in organized operational forms: shared anatomy, spacing and disclosures. */
.bo-operation-drawer.bo-operation-drawer-organized {
    width: min(720px, 100vw);
    --bs-offcanvas-width: min(720px, 100vw);
}
.bo-operation-drawer-organized .bo-drawer-header,
.bo-operation-drawer-organized .bo-drawer-footer { flex-shrink: 0; }
.bo-operation-drawer-organized .bo-drawer-body { min-height: 0; overflow-y: auto; }
.bo-operation-drawer-organized .bo-drawer-section-body { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.bo-operation-drawer-organized .bo-drawer-section-body > .form-label { margin-bottom: -6px; }
.bo-operation-drawer-organized .bo-drawer-section-body > .invalid-feedback:empty { display: none !important; }
.bo-operation-drawer-organized .bo-drawer-form-grid { align-items: start; gap: 12px; }
.bo-operation-drawer-organized .bo-drawer-summary-item strong { font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.bo-operation-drawer-organized .bo-drawer-section-heading { gap: 12px; }
.bo-operation-drawer-organized .bo-drawer-section-heading h3 { font-weight: 600; }
.bo-operation-drawer-organized .bo-tabs { margin: 0 0 12px; flex-wrap: wrap; overflow-y: hidden; flex-shrink: 0; }
.bo-operation-drawer-organized .tab-content > .tab-pane { padding-top: 0; }
.bo-operation-drawer-organized .bo-drawer-section-body > .form-check,
.bo-selection-list .form-check { display: flex; align-items: flex-start; gap: 8px; padding-left: 0; margin: 0; min-height: 32px; }
.bo-operation-drawer-organized .bo-drawer-section-body > .form-check .form-check-input,
.bo-selection-list .form-check-input { float: none; flex: 0 0 16px; margin: 3px 0 0; }
.bo-operation-drawer-organized .form-check-label { font-size: 14px; line-height: 22px; overflow-wrap: anywhere; }
.bo-selection-list { margin-top: 8px; padding: 10px 12px; max-height: 220px; overflow-y: auto; border: 1px solid var(--bo-ui-border); background: var(--bo-ui-bg-muted); }
.bo-selection-list .invalid-feedback:empty { display: none !important; }
.bo-drawer-disclosure { border: 1px solid var(--bo-ui-border); background: var(--bo-ui-bg); color: var(--bo-ui-text); }
.bo-drawer-disclosure > summary { padding: 10px 12px; cursor: pointer; font-size: 13px; font-weight: 600; text-align: left; }
.bo-drawer-disclosure > summary:hover { background: var(--bo-ui-bg-hover); }
.bo-drawer-disclosure > summary:focus-visible { outline: 2px solid var(--bo-ui-primary); outline-offset: -2px; }
.bo-drawer-disclosure[open] > summary { border-bottom: 1px solid var(--bo-ui-border); }
.bo-drawer-disclosure > :not(summary) { margin: 0; padding: 10px 12px; overflow-wrap: anywhere; }
.bo-operation-drawer-organized .bo-drawer-footer-actions { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 575px) {
    .bo-operation-drawer-organized .bo-drawer-body { padding: 12px; }
    .bo-operation-drawer-organized .bo-drawer-form-grid { grid-template-columns: minmax(0, 1fr); }
    .bo-operation-drawer-organized .bo-drawer-header,
    .bo-operation-drawer-organized .bo-drawer-footer { padding-left: 12px; padding-right: 12px; }
    .bo-operation-drawer-organized .bo-drawer-summary { grid-template-columns: minmax(0, 1fr); }
    .bo-operation-drawer-organized .bo-drawer-summary-item { min-height: 48px; border-right: 0; border-bottom: 1px solid var(--bo-ui-border); }
    .bo-operation-drawer-organized .bo-drawer-summary-item:last-child { border-bottom: 0; }
}

/* Shared room-selection prompt for both chat panels and appearance modes. */
.bo-chat-room-prompt { display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--bo-ui-text-muted); }
.bo-chat-room-prompt > .bi { font-size: 40px; line-height: 1; }
.bo-chat-room-prompt > p { margin: 0; font-size: 20px; line-height: 1.4; font-weight: 500; }

/* Message information popover uses shared operations tokens in both themes. */
.bo-chat-message-info { position: fixed; z-index: 1080; width: min(440px, calc(100vw - 16px)); max-height: min(420px, calc(100dvh - 16px)); overflow: auto; border: 1px solid var(--bo-ui-border-strong); background: var(--bo-ui-bg); color: var(--bo-ui-text); font-size: 14px; padding: 10px; scrollbar-width: thin; }
.bo-chat-info-header, .bo-chat-info-tabs, .bo-chat-info-person { display: flex; align-items: center; gap: 8px; }
.bo-chat-info-header { justify-content: space-between; margin-bottom: 8px; }
.bo-chat-info-tabs { margin: 8px 0; }
.bo-chat-info-tabs [aria-pressed="true"] { color: var(--bo-ui-primary); border-color: var(--bo-ui-primary); background: var(--bo-ui-primary-soft); }
.bo-chat-info-content { overflow-wrap: anywhere; }
.bo-chat-info-person { min-width: 0; max-width: 100%; }
.bo-chat-info-name { overflow-wrap: anywhere; }
.bo-chat-info-person small, .bo-chat-info-note { color: var(--bo-ui-text-muted); font-size: 13px; }

.bo-chat-info-group { margin-top: 12px; }
.bo-chat-info-group > h4 { margin: 0; padding: 6px 8px; background: var(--bo-ui-bg-muted); border: 1px solid var(--bo-ui-border); color: var(--bo-ui-text); font-size: 13px; font-weight: 600; }
.bo-chat-info-people { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 0; }
.bo-chat-info-group .bo-chat-info-person { padding: 3px 0; gap: 6px; flex-wrap: wrap; }
.bo-chat-info-avatar { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 26px; width: 26px; height: 26px; border-radius: var(--bo-ui-radius); background: var(--bo-ui-primary); color: #fff; font-size: 16px; }
.bo-chat-info-person time { flex: 0 0 auto; color: var(--bo-ui-text-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.bo-chat-info-emoji { font-size: 17px; }

/* Personal notes workspace shared by backoffice and finance. */
.bo-notes-page { color: var(--bo-ui-text); }
.bo-notes-page [hidden] { display: none !important; }
.bo-notes-heading { display: flex; min-width: max-content; align-items: baseline; gap: 10px; }
.bo-notes-heading .bo-page-title { margin: 0; }
.bo-notes-save-state { min-width: 110px; min-height: 20px; color: var(--bo-ui-text-muted); font-size: 13px; }
.bo-notes-save-state.is-error { color: var(--bo-ui-danger); }
.bo-notes-toolbar { display: grid; align-items: center; grid-template-columns: 280px minmax(220px, 1fr) 330px; gap: 14px; margin-bottom: 14px; padding: 10px 12px; border: 1px solid var(--bo-ui-border); background: var(--bo-ui-bg); }
.bo-notes-search { position: relative; width: 100%; }
.bo-notes-search > .bi { position: absolute; top: 50%; left: 10px; z-index: 1; color: var(--bo-ui-text-muted); transform: translateY(-50%); }
.bo-notes-search > .form-control { padding-left: 32px; }
.bo-notes-scopes { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.bo-note-composer { width: min(680px, 100%); margin: 0 auto 14px; border: 1px solid var(--bo-ui-border-strong); border-radius: var(--bo-ui-radius); background: var(--bo-note-default); color: var(--bo-ui-text); }
.bo-note-composer-slot { display: grid; grid-template-columns: 280px minmax(220px, 1fr) 330px; gap: 14px; padding: 0 12px; }
.bo-note-composer-slot .bo-note-composer { width: 100%; grid-column: 2; }
.bo-note-composer:focus-within { border-color: var(--bo-ui-primary); outline: 1px solid var(--bo-ui-primary); outline-offset: -1px; }
.bo-note-title-input { display: none; width: 100%; height: 38px; padding: 8px 12px 0; border: 0; outline: 0; background: transparent; color: inherit; font-size: 15px; font-weight: 650; }
.bo-note-composer.is-expanded .bo-note-title-input { display: block; }
.bo-note-composer-actions { display: none; align-items: center; justify-content: space-between; gap: 10px; padding: 8px; border-top: 1px solid var(--bo-ui-border); }
.bo-note-composer.is-expanded .bo-note-composer-actions { display: flex; }
.bo-note-composer-end { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.bo-rich-editor { min-height: 260px; padding: 12px; outline: 0; overflow-wrap: anywhere; color: var(--bo-ui-text); font-size: 14px; line-height: 1.55; }
.bo-rich-editor.is-compact { min-height: 42px; max-height: 180px; overflow-y: auto; }
.bo-rich-editor:empty::before { color: var(--bo-ui-text-muted); content: attr(data-placeholder); pointer-events: none; }
.bo-rich-editor p, .bo-rich-editor ul, .bo-rich-editor ol, .bo-rich-editor blockquote { margin-top: 0; margin-bottom: 8px; }
.bo-rich-editor blockquote { padding-left: 10px; border-left: 3px solid var(--bo-ui-border-strong); color: var(--bo-ui-text-muted); }
.bo-rich-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 3px; }
.bo-rich-toolbar > button, .bo-icon-button { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 1px solid transparent; border-radius: var(--bo-ui-radius); background: transparent; color: var(--bo-ui-text-control); }
.bo-rich-toolbar > button:hover, .bo-icon-button:hover { border-color: var(--bo-ui-border); background: var(--bo-ui-bg-hover); color: var(--bo-ui-text); }
.bo-rich-toolbar > button:focus-visible, .bo-icon-button:focus-visible { outline: 2px solid var(--bo-ui-primary); outline-offset: 1px; }
.bo-icon-button.is-danger { color: var(--bo-ui-danger); }
.bo-rich-toolbar-separator { width: 1px; height: 20px; margin: 0 3px; background: var(--bo-ui-border); }
.bo-note-color-picker { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.bo-note-color-swatch { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 0; border: 1px solid var(--bo-ui-border-strong); border-radius: 50%; color: var(--bo-ui-text); }
.bo-note-color-swatch > .bi { visibility: hidden; font-size: 12px; }
.bo-note-color-swatch[aria-pressed="true"] { border-color: var(--bo-ui-primary); outline: 1px solid var(--bo-ui-primary); }
.bo-note-color-swatch[aria-pressed="true"] > .bi { visibility: visible; }
[data-note-color="default"] { background-color: var(--bo-note-default); }
[data-note-color="yellow"] { background-color: var(--bo-note-yellow); }
[data-note-color="blue"] { background-color: var(--bo-note-blue); }
[data-note-color="green"] { background-color: var(--bo-note-green); }
[data-note-color="rose"] { background-color: var(--bo-note-rose); }
[data-note-color="purple"] { background-color: var(--bo-note-purple); }
.bo-notes-loading { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 72px; color: var(--bo-ui-text-muted); font-size: 13px; }
.bo-notes-section + .bo-notes-section { margin-top: 18px; }
.bo-notes-section > h2 { margin: 0 0 8px; color: var(--bo-ui-text-muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.bo-notes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; align-items: start; }
.bo-note-card { min-height: 128px; overflow: hidden; border: 1px solid var(--bo-ui-border-strong); border-radius: var(--bo-ui-radius); color: var(--bo-ui-text); cursor: pointer; }
.bo-note-card:hover { border-color: var(--bo-ui-primary); }
.bo-note-card:focus-visible { outline: 2px solid var(--bo-ui-primary); outline-offset: 2px; }
.bo-note-card-main { min-height: 84px; padding: 12px; }
.bo-note-card h3 { margin: 0 0 8px; font-size: 15px; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.bo-note-card-content { max-height: 190px; overflow: hidden; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.bo-note-card-content > :last-child { margin-bottom: 0; }
.bo-note-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 38px; padding: 3px 6px 3px 12px; border-top: 1px solid var(--bo-ui-border); }
.bo-note-card-footer time { color: var(--bo-ui-text-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.bo-note-card-actions { display: flex; align-items: center; gap: 1px; }
.bo-note-card-actions .bo-icon-button { width: 30px; height: 30px; }
.bo-notes-empty { display: flex; min-height: 240px; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--bo-ui-border); background: var(--bo-ui-bg); color: var(--bo-ui-text-muted); text-align: center; }
.bo-notes-empty > .bi { font-size: 34px; }
.bo-notes-empty > strong { color: var(--bo-ui-text); font-size: 15px; }
.bo-notes-empty.is-error > .bi { color: var(--bo-ui-danger); }
.bo-note-editor-section { padding: 0; overflow: hidden; }
.bo-note-editor-heading { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--bo-ui-border); }
.bo-note-editor-title.form-control { height: 36px; padding: 4px 0; border: 0; background: transparent; color: var(--bo-ui-text); font-size: 17px; font-weight: 650; }
.bo-note-editor-title.form-control:focus { border: 0; box-shadow: none; }
.bo-note-editor-section > .bo-rich-toolbar { padding: 6px 10px; border-bottom: 1px solid var(--bo-ui-border); }
.bo-note-editor-options { padding: 8px 10px; border-top: 1px solid var(--bo-ui-border); }
.bo-note-editor-section.is-readonly .bo-rich-editor { background: transparent; }

@media (max-width: 991px) {
    .bo-notes-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
    .bo-notes-heading { grid-column: 1 / -1; }
    .bo-note-composer-slot { display: block; }
    .bo-note-composer-slot .bo-note-composer { width: min(680px, 100%); margin-right: auto; margin-left: auto; }
}

@media (max-width: 767px) {
    .bo-notes-toolbar { align-items: stretch; grid-template-columns: minmax(0, 1fr); }
    .bo-notes-heading { min-width: 0; grid-column: auto; flex-wrap: wrap; }
    .bo-notes-save-state { min-width: 0; }
    .bo-notes-search { width: 100%; }
    .bo-notes-scopes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .bo-notes-scopes .bo-button { min-width: 0; padding-inline: 6px; }
    .bo-note-composer-actions { align-items: stretch; flex-direction: column; }
    .bo-note-composer-end { justify-content: flex-start; }
    .bo-notes-grid { grid-template-columns: minmax(0, 1fr); }
}
