/* =====================================================================
   BO shell: sidebar, header navbar, page header
   Matches the Bet Data redesign (indigo accent, Inter, px sizing).
   Loaded after style.bundle.css, custom-style.css and Radzen's theme so
   these rules win without touching Metronic's files.
   ===================================================================== */

:root {
    --bo-accent: #5b57d6;
    --bo-accent-hi: #6f6be6;
    --bo-accent-soft: rgba(91, 87, 214, .08);
    --bo-accent-ring: rgba(91, 87, 214, .18);

    --bo-sh-line: var(--bs-border-color, #e7e9ef);
    --bo-sh-surface: var(--bs-body-bg, #fff);
    --bo-sh-surface-2: var(--bs-gray-100, #f7f8fa);
    --bo-sh-ink: var(--bs-gray-900, #12161f);
    --bo-sh-ink-2: var(--bs-gray-700, #5a6472);
    --bo-sh-ink-3: var(--bs-gray-600, #7e8795);

    /* sidebar: dark ink column, same family as the sign-in page */
    --bo-sb-bg: #121429;
    --bo-sb-border: #121429;
    --bo-sb-line: rgba(255, 255, 255, .07);
    --bo-sb-guide: rgba(255, 255, 255, .10);
    --bo-sb-brand: #f2f3f8;
    --bo-sb-muted: #7c83a6;
    --bo-sb-text: #b4b9d2;
    --bo-sb-text-hi: #ffffff;
    --bo-sb-icon: #737a9c;
    --bo-sb-icon-hi: #a5a1f5;
    --bo-sb-sub: #959bb8;
    --bo-sb-hover: rgba(255, 255, 255, .05);
    --bo-sb-open: rgba(255, 255, 255, .035);
    --bo-sb-active: rgba(124, 120, 240, .22);
    --bo-sb-active-text: #ffffff;
    --bo-sb-bar: #a5a1f5;
    --bo-sb-toggle-bg: #ffffff;
    --bo-sb-toggle-ink: #5a6472;
}

[data-bs-theme="dark"] {
    --bo-accent: #a5a1f5;
    --bo-accent-soft: rgba(139, 135, 240, .12);
    --bo-accent-ring: rgba(139, 135, 240, .24);
    --bo-sb-bg: #0f1122;
    --bo-sb-border: rgba(255, 255, 255, .06);
    --bo-sb-toggle-bg: #1b1e33;
    --bo-sb-toggle-ink: #c3c7dc;
}

@media (min-width: 992px) {
    :root { --bs-app-header-height: 64px; --bs-app-header-height-actual: 64px; }
}

/* ---------------------------------------------------------------------
   Sidebar
   --------------------------------------------------------------------- */
html [data-kt-app-layout] #kt_app_sidebar.app-sidebar {
    background: var(--bo-sb-bg) !important;
    border-right: 1px solid var(--bo-sb-border) !important;
    box-shadow: none !important;
}

/* brand block, same height as the header so the two lines meet */
html #kt_app_sidebar #kt_app_sidebar_logo.app-sidebar-logo {
    height: var(--bs-app-header-height, 64px);
    min-height: 64px;
    display: flex;
    align-items: center;
    padding: 0 20px !important;
    border-bottom: 1px solid var(--bo-sb-line) !important;
    position: relative;
}
.bo-brand__link {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    text-decoration: none;
}
.bo-brand__mark {
    width: 32px;
    height: 32px;
    flex: none;
    display: block;
    object-fit: contain;
}
.bo-brand__text {
    min-width: 0;
    line-height: 1.2;
    white-space: nowrap;
}
.bo-brand__text b {
    display: block;
    font-size: 14px;
    font-weight: 750;
    letter-spacing: .08em;
    color: var(--bo-sb-brand);
}
.bo-brand__text small {
    display: block;
    margin-top: 1px;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--bo-sb-muted);
}

/* collapse toggle: a small round button sitting on the column edge */
html #kt_app_sidebar #kt_app_sidebar_toggle.app-sidebar-toggle {
    width: 26px !important;
    height: 26px !important;
    border-radius: 50% !important;
    background: var(--bo-sb-toggle-bg) !important;
    border: 1px solid var(--bo-sh-line) !important;
    box-shadow: 0 2px 8px rgba(16, 24, 40, .10) !important;
    color: var(--bo-sb-toggle-ink) !important;
    z-index: 3;
}
html #kt_app_sidebar #kt_app_sidebar_toggle svg { width: 14px; height: 14px; transition: transform .2s ease; }
html #kt_app_sidebar #kt_app_sidebar_toggle.active svg { transform: rotate(180deg); }
html #kt_app_sidebar #kt_app_sidebar_toggle:hover { color: var(--bo-accent) !important; }

/* menu */
html [data-kt-app-layout] #kt_app_sidebar #kt_app_sidebar_menu_scroll {
    margin: 14px 12px !important;
}
html #kt_app_sidebar #kt_app_sidebar_menu_scroll .menu {
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}
html #kt_app_sidebar #kt_app_sidebar_menu_scroll .menu > .menu-item {
    padding: 0 !important;
    margin-bottom: 2px;
}

/* top-level rows */
html #kt_app_sidebar #kt_app_sidebar_menu_scroll .menu > .menu-item > .menu-link {
    padding: 9px 12px !important;
    border-radius: 9px !important;
    background: transparent;
    transition: background-color .14s ease, color .14s ease;
}
html #kt_app_sidebar #kt_app_sidebar_menu_scroll .menu > .menu-item > .menu-link .menu-icon {
    width: 20px !important;
    height: 20px;
    margin-right: 12px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
}
html #kt_app_sidebar #kt_app_sidebar_menu_scroll .menu > .menu-item > .menu-link .menu-icon svg {
    width: 19px;
    height: 19px;
    color: var(--bo-sb-icon);
    transition: color .14s ease;
}
html #kt_app_sidebar #kt_app_sidebar_menu_scroll .menu > .menu-item > .menu-link .menu-title {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--bo-sb-text) !important;
    letter-spacing: -.003em;
}
html #kt_app_sidebar #kt_app_sidebar_menu_scroll .menu > .menu-item > .menu-link .menu-arrow { width: 10px !important; height: 10px !important; }
html #kt_app_sidebar #kt_app_sidebar_menu_scroll .menu > .menu-item > .menu-link .menu-arrow::after {
    background-color: var(--bo-sb-icon) !important;
}

/* hover / open / contains the current page */
html #kt_app_sidebar #kt_app_sidebar_menu_scroll .menu > .menu-item > .menu-link:hover {
    background: var(--bo-sb-hover) !important;
}
html #kt_app_sidebar #kt_app_sidebar_menu_scroll .menu > .menu-item > .menu-link:hover .menu-title,
html #kt_app_sidebar #kt_app_sidebar_menu_scroll .menu > .menu-item.show > .menu-link .menu-title,
html #kt_app_sidebar #kt_app_sidebar_menu_scroll .menu > .menu-item:has(.menu-link.active) > .menu-link .menu-title {
    color: var(--bo-sb-text-hi) !important;
}
html #kt_app_sidebar #kt_app_sidebar_menu_scroll .menu > .menu-item > .menu-link:hover .menu-icon svg {
    color: var(--bo-sb-text-hi);
}
html #kt_app_sidebar #kt_app_sidebar_menu_scroll .menu > .menu-item.show > .menu-link .menu-icon svg,
html #kt_app_sidebar #kt_app_sidebar_menu_scroll .menu > .menu-item:has(.menu-link.active) > .menu-link .menu-icon svg {
    color: var(--bo-sb-icon-hi);
}
html #kt_app_sidebar #kt_app_sidebar_menu_scroll .menu > .menu-item.show > .menu-link {
    background: var(--bo-sb-open);
}
html #kt_app_sidebar #kt_app_sidebar_menu_scroll .menu > .menu-item.show > .menu-link .menu-arrow::after,
html #kt_app_sidebar #kt_app_sidebar_menu_scroll .menu > .menu-item > .menu-link:hover .menu-arrow::after {
    background-color: var(--bo-sb-text-hi) !important;
}

/* second level: a guide line under the parent icon, no bullets */
html #kt_app_sidebar #kt_app_sidebar_menu_scroll .menu > .menu-item .menu-sub {
    position: relative;
    margin: 2px 0 6px 22px !important;
    padding: 0;
}
html #kt_app_sidebar #kt_app_sidebar_menu_scroll .menu > .menu-item .menu-sub::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 2px;
    width: 1px;
    background: var(--bo-sb-guide);
}
html #kt_app_sidebar #kt_app_sidebar_menu_scroll .menu > .menu-item .menu-sub .menu-item { padding: 0 !important; }
html #kt_app_sidebar #kt_app_sidebar_menu_scroll .menu > .menu-item .menu-sub .menu-link {
    position: relative;
    margin: 1px 0 1px 10px !important;
    padding: 7px 12px !important;
    border-radius: 8px !important;
    background: transparent;
}
html #kt_app_sidebar #kt_app_sidebar_menu_scroll .menu > .menu-item .menu-sub .menu-link .menu-bullet { display: none !important; }
html #kt_app_sidebar #kt_app_sidebar_menu_scroll .menu > .menu-item .menu-sub .menu-link .menu-title {
    font-size: 13.5px !important;
    font-weight: 500 !important;
    color: var(--bo-sb-sub) !important;
}
html #kt_app_sidebar #kt_app_sidebar_menu_scroll .menu > .menu-item .menu-sub .menu-link:hover {
    background: var(--bo-sb-hover) !important;
}
html #kt_app_sidebar #kt_app_sidebar_menu_scroll .menu > .menu-item .menu-sub .menu-link:hover .menu-title {
    color: var(--bo-sb-text-hi) !important;
}
html #kt_app_sidebar #kt_app_sidebar_menu_scroll .menu > .menu-item .menu-sub .menu-link.active {
    background: var(--bo-sb-active) !important;
}
html #kt_app_sidebar #kt_app_sidebar_menu_scroll .menu > .menu-item .menu-sub .menu-link.active .menu-title {
    color: var(--bo-sb-active-text) !important;
    font-weight: 600 !important;
}
/* the active page lights up its piece of the guide line */
html #kt_app_sidebar #kt_app_sidebar_menu_scroll .menu > .menu-item .menu-sub .menu-link.active::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    margin-left: -.5px;
    border-radius: 2px;
    background: var(--bo-sb-bar);
}

/* minimised column (75px): centre the mark and the icons */
[data-kt-app-sidebar-minimize="on"]:not([data-kt-app-sidebar-hoverable="true"]) #kt_app_sidebar #kt_app_sidebar_logo,
[data-kt-app-sidebar-minimize="on"][data-kt-app-sidebar-hoverable="true"] #kt_app_sidebar:not(:hover) #kt_app_sidebar_logo {
    padding: 0 21px !important;
}

/* ---------------------------------------------------------------------
   Header bar
   --------------------------------------------------------------------- */
html [data-kt-app-layout] #kt_app_header.app-header {
    background: var(--bo-sh-surface) !important;
    border-bottom: 1px solid var(--bo-sh-line) !important;
    box-shadow: none !important;
}
#kt_app_header_container { gap: 10px; }

/* mobile: burger + brand */
.bo-mtoggle {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: var(--bo-sh-ink-2);
    cursor: pointer;
}
.bo-mtoggle:hover { background: var(--bo-sh-surface-2); color: var(--bo-sh-ink); }
.bo-mtoggle svg { width: 22px; height: 22px; }
.bo-mbrand { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.bo-mbrand img { width: 28px; height: 28px; display: block; }
.bo-mbrand b { font-size: 13.5px; font-weight: 750; letter-spacing: .08em; color: var(--bo-sh-ink); }

/* navbar */
.bo-nav.app-navbar { display: flex; align-items: center; gap: 10px; }
.bo-nav .app-navbar-item { margin: 0 !important; display: flex; align-items: center; }
.bo-nav__sep { width: 1px; height: 26px; background: var(--bo-sh-line); margin: 0 2px; }

.bo-balance {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 13px 0 11px;
    border: 1px solid var(--bo-sh-line);
    border-radius: 10px;
    background: var(--bo-sh-surface-2);
    white-space: nowrap;
}
.bo-balance svg { width: 16px; height: 16px; color: var(--bo-accent); flex: none; }
.bo-balance__ccy { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--bo-sh-ink-3); }
.bo-balance__amt { font-size: 14px; font-weight: 650; color: var(--bo-sh-ink); font-variant-numeric: tabular-nums; }

/* region + language pickers (RadzenDropDown with a leading icon) */
.bo-nav__select { position: relative; }
.bo-nav__select > svg {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--bo-sh-ink-3);
    pointer-events: none;
    z-index: 2;
}
html .bo-nav__select .rz-dropdown {
    height: 36px !important;
    min-height: 36px;
    display: flex;
    align-items: center;
    padding: 0 0 0 33px !important;
    font-size: 13.5px !important;
    border: 1px solid var(--bo-sh-line) !important;
    border-radius: 10px !important;
    background: var(--bo-sh-surface) !important;
    box-shadow: none !important;
    transition: border-color .14s, box-shadow .14s;
}
html .bo-nav__select .rz-dropdown:hover { border-color: var(--bs-gray-400, #c3c8d1) !important; }
html .bo-nav__select .rz-dropdown.rz-state-focused,
html .bo-nav__select .rz-dropdown:focus-within {
    border-color: var(--bo-accent) !important;
    box-shadow: 0 0 0 3px var(--bo-accent-ring) !important;
}
html .bo-nav__select .rz-dropdown .rz-dropdown-label {
    flex: 1;
    min-width: 0;
    padding: 0 30px 0 0 !important;
    font-size: 13.5px !important;
    font-weight: 500;
    line-height: 34px;
    color: var(--bo-sh-ink) !important;
    background: transparent !important;
    border: 0 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
html .bo-nav__select .rz-dropdown .rz-dropdown-trigger {
    position: absolute;
    right: 8px;
    top: 0;
    bottom: 0;
    width: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bo-sh-ink-3);
    background: transparent !important;
}
.bo-nav__select--tz .rz-dropdown { width: 232px; }
.bo-nav__select--lang .rz-dropdown { width: 128px; }

/* the open list */
html .bo-nav-popup.rz-dropdown-panel,
html .rz-dropdown-panel.bo-nav-popup {
    border-radius: 10px !important;
    border: 1px solid var(--bo-sh-line) !important;
    box-shadow: 0 14px 34px -10px rgba(16, 24, 40, .22) !important;
    overflow: hidden;
}

/* user button */
.bo-user {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 4px 10px 4px 4px;
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color .14s, border-color .14s;
}
.bo-user:hover,
.bo-user.show,
.bo-user.menu-dropdown { background: var(--bo-sh-surface-2); border-color: var(--bo-sh-line); }
.bo-avatar {
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: linear-gradient(140deg, #726ee8, #4a46c4);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .03em;
}
.bo-user__meta { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.bo-user__meta b { font-size: 13.5px; font-weight: 600; color: var(--bo-sh-ink); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bo-user__meta small { font-size: 11.5px; color: var(--bo-sh-ink-3); }
.bo-user > svg { width: 16px; height: 16px; color: var(--bo-sh-ink-3); }

/* user dropdown */
.bo-umenu.menu-sub-dropdown {
    width: 288px !important;
    padding: 6px !important;
    border-radius: 12px !important;
    border: 1px solid var(--bo-sh-line);
    box-shadow: 0 18px 40px -12px rgba(16, 24, 40, .25) !important;
}
.bo-umenu__head { display: flex; gap: 12px; align-items: center; padding: 12px 12px 14px; }
.bo-umenu__head .bo-avatar { width: 44px; height: 44px; border-radius: 12px; font-size: 15px; }
.bo-umenu__who { min-width: 0; }
.bo-umenu__who b { display: block; font-size: 15px; font-weight: 650; color: var(--bo-sh-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bo-umenu__role {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--bo-accent-soft);
    color: var(--bo-accent);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: .02em;
}
.bo-umenu__facts {
    margin: 0 6px 6px;
    padding: 10px 10px;
    border-radius: 10px;
    background: var(--bo-sh-surface-2);
    display: grid;
    gap: 7px;
}
.bo-umenu__facts div { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--bo-sh-ink-2); min-width: 0; }
.bo-umenu__facts svg { width: 15px; height: 15px; color: var(--bo-sh-ink-3); flex: none; }
.bo-umenu__facts span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bo-umenu__sep { height: 1px; margin: 6px 4px; background: var(--bo-sh-line); }
.bo-umenu .menu-item { padding: 0 !important; }
.bo-umenu .menu-item .menu-link.bo-umenu__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px !important;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--bo-sh-ink) !important;
    background: transparent !important;
}
.bo-umenu .menu-item .menu-link.bo-umenu__link svg { width: 17px; height: 17px; color: var(--bo-sh-ink-3); flex: none; }
.bo-umenu .menu-item .menu-link.bo-umenu__link:hover { background: var(--bo-sh-surface-2) !important; }
.bo-umenu .menu-item .menu-link.bo-umenu__link--out:hover { color: #c0392b !important; background: rgba(192, 57, 43, .07) !important; }
.bo-umenu .menu-item .menu-link.bo-umenu__link--out:hover svg { color: #c0392b; }

/* ---------------------------------------------------------------------
   Page header (title + breadcrumb above each page)
   --------------------------------------------------------------------- */
html [data-kt-app-layout] #kt_app_toolbar.app-toolbar.bo-phead {
    border-top: 0 !important;
    padding: 22px 0 16px !important;
    min-height: 0;
    background: transparent;
}
.bo-phead h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.018em;
    line-height: 1.25;
    color: var(--bo-sh-ink);
}
.bo-crumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 5px;
    padding: 0;
    list-style: none;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--bo-sh-ink-3);
}
.bo-crumbs a { color: var(--bo-sh-ink-3); text-decoration: none; }
.bo-crumbs a:hover { color: var(--bo-accent); }
.bo-crumbs svg { width: 13px; height: 13px; opacity: .7; }
.bo-crumbs li[aria-current] { color: var(--bo-sh-ink-2); }
.bo-phead .btn.btn-primary {
    background: var(--bo-accent) !important;
    border-color: var(--bo-accent) !important;
    border-radius: 9px;
    font-weight: 600;
}
.bo-phead .btn.btn-primary:hover { background: var(--bo-accent-hi) !important; }

/* ---------------------------------------------------------------------
   Small screens
   --------------------------------------------------------------------- */
/* narrower laptops: keep the bar on one line by dropping the name/role text */
@media (max-width: 1279.98px) {
    .bo-user__meta, .bo-user > svg { display: none !important; }
    .bo-user { padding: 4px; }
    .bo-nav__select--tz .rz-dropdown { width: 200px; }
}

@media (max-width: 991.98px) {
    html [data-kt-app-layout] #kt_app_header.app-header { height: 60px; }
    #kt_app_header_container { gap: 6px; }
    .bo-nav.app-navbar { gap: 8px; }
    html .bo-phead h1 { font-size: 19px; }
    html [data-kt-app-layout] #kt_app_toolbar.app-toolbar.bo-phead { padding: 16px 0 12px !important; }
    /* drawer version of the sidebar keeps the brand block */
    html #kt_app_sidebar #kt_app_sidebar_logo.app-sidebar-logo { height: 60px; min-height: 60px; }
    html #kt_app_sidebar #kt_app_sidebar_toggle { display: none !important; }
}

/* phones: pickers collapse to their icon; the list still opens full width */
@media (max-width: 767.98px) {
    .bo-nav__sep, .bo-user__meta, .bo-user > svg { display: none !important; }
    .bo-user { padding: 3px; height: 40px; }
    .bo-nav__select--tz .rz-dropdown,
    .bo-nav__select--lang .rz-dropdown { width: 38px; padding-left: 0 !important; }
    .bo-nav__select > svg { left: 50%; transform: translate(-50%, -50%); width: 18px; height: 18px; color: var(--bo-sh-ink-2); }
    html .bo-nav__select .rz-dropdown .rz-dropdown-label { opacity: 0; padding: 0 !important; }
    html .bo-nav__select .rz-dropdown .rz-dropdown-trigger { display: none; }
    .bo-balance { height: 34px; padding: 0 10px; gap: 6px; }
    .bo-balance svg { display: none; }
    .bo-balance__amt { font-size: 13px; }
    .bo-mbrand b { display: none; }
}
@media (max-width: 379.98px) {
    .bo-balance__ccy { display: none; }
    .bo-nav.app-navbar { gap: 6px; }
}

/* the page header sits inside the content container, so drop its own gutter
   and line the title up with the cards below */
html #kt_app_content_container .bo-phead > .app-container { padding-left: 0 !important; padding-right: 0 !important; max-width: none; }
