.technical-chart {
    width: 100%;
    height: calc(100vh - 60px);
    position: absolute;
    top: 0px;
    left: 0px;
    z-index: 10;
}
body .technical-chart .tab-header {
    background-color: var(--bg-thead);
    border-bottom: 3px solid var(--border-soft);
}
body .tab-header button.btn {
    color: var(--text-blue-button);
    border-color: var(--text-blue-button);
}
main .main {
    padding: 0px;
}
.technical-chart .tab-header ul.nav-tabs {
    border-bottom: none;
    flex-wrap: nowrap;
}
.technical-chart .btn-close-tab {
    position: absolute;
    width: auto;
    height: auto;
    padding: 0px;
    right: 3px;
    top: 3px;
}
#symbolTabContent {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ebebeb;
}
#symbolTabContent .none-chart span {
    color: #0d6efd;
}
#symbolTabContent, #symbolTabContent > div, #symbolTabContent .tv-chart-container {
    width: 100%;
    height: 100%;
}
#symbolTabContent .tv-chart-container .chart-box {
    width: 100%;
}
#right-side-container {
    box-sizing: border-box;
}
.tab-header .form-switch input {
    width: 60px;
    height: 20px;
    cursor: pointer;
}
#toggleHiddenMenuSwitch {
    width: 99px;
}
.tab-header .form-switch label {
    position: absolute;
    top: 4px;
    left: 26px;
    font-size: 13px;
    cursor: pointer;

}
body[data-theme="dark"] .tab-header .form-switch label {
    top: 4px;
    left: 10px;
}
body[data-theme="dark"] .tab-header .form-switch #hiddenLabelText {
    left: 20px;
}
.tab-header .dropdown-menu {
    background-color: var(--bg-box-white);
    border: none;
    padding: 0px;
}
.tab-header .dropdown-menu .dropdown-item.active {
    color: #f23645;
}
.tab-header .dropdown-menu li a {
    font-size: 15px;
    font-weight: 500;
}
.cursor-move {
    cursor: move;
}

#symbolTabs .nav-item {
    user-select: none;
}

#symbolTabs .nav-item.sortable-ghost {
    opacity: 0.5;
}

#symbolTabs .nav-item.sortable-chosen {
    background-color: #f1f3f5;
    border-radius: 4px;
}
.close-all-tab,
.max-tab-open,
.close-all-tab {
    z-index: 2147483647;
}
.modal-backdrop {
    z-index: calc(2147483647 - 1);
}
.close-all-tab .modal-dialog {
    width: 100%;
    margin: auto;
}
.modal-header .btn-close {
    background: none;
}
.close-all-tab .modal-content {
    margin: auto 15px;
}
.nav-tabs-wrapper {
    display: flex;
    align-items: center;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}
#symbolTabs {
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
}
#symbolTabs .nav-link {
    white-space: nowrap;
}
#overflow-tabs-btn .dropdown-menu {
    min-width: 160px;
}
#overflow-tabs-btn .nav-link {
    color: var(--text-blue-button);
    border: 1px solid var(--text-blue-button);
    border-radius: 4px;
}
#overflow-tabs-count {
    font-size: 14px;
}
.nav-tabs button.nav-link {
    padding-top: 5px;
    padding-bottom: 5px;
}
.nav-tabs button.nav-link.active {
    background-color: var(--bg-box-white);
    color: var(--text-main);
}
.nav-tabs button.nav-link span {
    margin-left: 3px;
    font-size: 14px;
    font-weight: 400;
}
/* ── Order book panel ─────────────────────────────────────────────────────── */
/* Panel tabs nav */
.ob-panel-tabs {
    display: flex;
    border-bottom: 1px solid var(--ob-border);
    flex-shrink: 0;
}
.ob-panel-tab {
    flex: 1;
    padding: 6px 1px;
    border: none;
    border-bottom: 2px solid transparent;
    background: none;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted, #888);
    cursor: pointer;
    transition: color .15s;
    margin-bottom: -1px;
    white-space: nowrap;
}
.ob-panel-tab.active {
    color: #0d6efd;
    border-bottom-color: #0d6efd;
}
.ob-panel-tab:hover:not(.active) { color: var(--text-main); }

/* Panes */
.ob-pane {
    display: none;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}
.ob-pane.active { display: flex; }

/* Chart containers */
#ob-depth-chart {
    width: 100%;
    height: 220px;
    flex-shrink: 0;
    padding: 0 10px;
    box-sizing: border-box;
}
#ob-price-chart {
    width: 100%;
    flex: 1;
    min-height: 0;
    padding: 0 10px;
    box-sizing: border-box;
}
#ob-liq-chart {
    width: 100%;
    flex: 1;
    min-height: 0;
    box-sizing: border-box;
}
#ob-bs-chart {
    width: 100%;
    flex: 1;
    min-height: 0;
    box-sizing: border-box;
    border-top: 1px solid var(--ob-border);
}

.ob-resize-handle {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    cursor: ew-resize;
    z-index: 10;
}
.ob-resize-handle:hover,
.ob-resize-handle.dragging {
    background-color: rgba(13, 110, 253, 0.35);
}

#order-book-panel {
    --ob-border: #ebebeb;
    display: none;
    position: absolute;
    right: 0;
    width: 300px;
    background-color: var(--bg-box-white);
    border-left: 1px solid var(--ob-border);
    z-index: 50;
    flex-direction: column;
    font-size: 13px;
    overflow: hidden;
}
body.dark-mode #order-book-panel {
    --ob-border: #303030;
}
#order-book-panel.ob-visible { display: flex; }
.technical-chart.ob-open #symbolTabContent { width: calc(100% - 300px); }

.ob-no-data-msg {
    display: none;
    flex: 1;
    align-items: center;
    justify-content: center;
    color: var(--text-muted, #888);
    font-size: 14px;
}

/* Header */
.ob-header {
    padding: 8px 10px 6px;
    border-bottom: 1px solid var(--ob-border);
    flex-shrink: 0;
}
.ob-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3px;
}
.ob-symbol-name {
    font-weight: 700;
    font-size: 18px;
    line-height: 1.2;
    color: var(--text-main);
}
.ob-price-right {
    display: flex;
    align-items: center;
    gap: 6px;
}
.ob-price-display {
    font-weight: 700;
    font-size: 18px;
    line-height: 1.2;
    border-radius: 4px;
    padding: 5px 10px;
}
@keyframes ob-flash-up {
    0%   { background-color: rgba(37, 165, 73, 0.35); }
    100% { background-color: transparent; }
}
@keyframes ob-flash-down {
    0%   { background-color: rgba(225, 64, 64, 0.35); }
    100% { background-color: transparent; }
}
.ob-flash-up      { animation: ob-flash-up      1s ease-out forwards; }
.ob-flash-down    { animation: ob-flash-down    1s ease-out forwards; }
@keyframes ob-flash-neutral {
    0%   { background-color: rgba(128, 128, 128, 0.25); }
    100% { background-color: transparent; }
}
.ob-flash-neutral { animation: ob-flash-neutral 1s ease-out forwards; border-radius: 3px; }
.ob-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    color: var(--text-muted, #888);
    line-height: 1;
    margin-top: 2px;
}
.ob-close-btn:hover { color: var(--text-main); }
.ob-header-bot {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ob-ref-prices {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
}
.ob-sep { color: var(--text-muted, #bbb); font-weight: 400; }
.ob-floor { color: #2196f3; }
.ob-ref   { color: #f5a623; }
.ob-ceil  { color: #c77dff; }
.ob-change {
    font-size: 12px;
    font-weight: 500;
    text-align: right;
}

/* Order book table */
.ob-book {
    border-bottom: 1px solid var(--ob-border);
    flex-shrink: 0;
    padding: 2px 0;
}
.ob-book-hdr,
.ob-book-row {
    display: grid;
    grid-template-columns: 2fr 3fr 3fr 2fr;
    align-items: center;
}
.ob-book-hdr {
    padding: 4px 10px;
    font-size: 11px;
    color: var(--text-muted, #888);
    font-weight: 600;
}
.ob-book-hdr span:last-child { text-align: right; }
.ob-book-row { padding: 3px 0; }
.ob-qvol {
    padding: 3px 8px;
    font-size: 12px;
    color: var(--text-muted, #888);
}
.ob-qvol-r { text-align: right; }
.ob-bid,
.ob-ask {
    padding: 4px 6px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}
.ob-bid { background-color: rgba(37, 165, 73, 0.08); }
.ob-ask { background-color: rgba(225, 64, 64, 0.08); }
.ob-best-row .ob-bid { background-color: rgba(37, 165, 73, 0.16); }
.ob-best-row .ob-ask { background-color: rgba(225, 64, 64, 0.16); }
body.dark-mode .ob-bid { background-color: rgba(37, 165, 73, 0.12); }
body.dark-mode .ob-ask { background-color: rgba(225, 64, 64, 0.12); }
body.dark-mode .ob-best-row .ob-bid { background-color: rgba(37, 165, 73, 0.22); }
body.dark-mode .ob-best-row .ob-ask { background-color: rgba(225, 64, 64, 0.22); }

/* Ticks */
.ob-ticks {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}
.ob-ticks-hdr {
    display: grid;
    grid-template-columns: 68px 1fr 1fr 1fr 28px;
    padding: 10px 10px 5px 10px;
    font-size: 11px;
    color: var(--text-muted, #888);
    font-weight: 600;
    flex-shrink: 0;
}
.ob-ticks-hdr span:not(:first-child) { text-align: right; }
.ob-ticks-list { overflow-y: auto; flex: 1; }
.ob-tick-row {
    display: grid;
    grid-template-columns: 68px 1fr 1fr 1fr 28px;
    padding: 6px 10px;
    font-size: 13px;
    align-items: center;
}
.ob-t-time { color: var(--text-main); }
.ob-t-price,
.ob-t-pn,
.ob-t-vol { text-align: right; }
.ob-t-badge-wrap { display: flex; justify-content: flex-end; }
.ob-badge {
    display: inline-block;
    width: 20px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 0;
    border-radius: 2px;
}
.ob-badge-buy  { background: rgba(37, 165, 73, 0.15);  color: #25a549; }
.ob-badge-sell { background: rgba(225, 64, 64, 0.15); color: #e14040; }
.ob-badge-neu  { background: rgba(245,166,35,0.15);   color: #f5a623; }
body.dark-mode .ob-badge-buy  { background: rgba(37, 165, 73, 0.25); }
body.dark-mode .ob-badge-sell { background: rgba(225, 64, 64, 0.25); }

/* Footer */
.ob-footer {
    border-top: 1px solid var(--ob-border);
    padding: 6px 10px 8px;
    flex-shrink: 0;
}
.ob-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--ob-border);
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--text-main);
}
.ob-total-val {
    font-weight: 700;
    font-size: 15px;
    padding: 5px 10px;
    color: var(--text-main);
}
.ob-dominant-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}
.ob-dom-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-bottom: 2px;
}
.ob-dom-val {
    font-size: 15px;
    font-weight: 700;
    border-radius: 4px;
}
.ob-ratio-wrap { display: flex; flex-direction: column; gap: 3px; }
.ob-ratio-bar {
    display: flex;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    background: var(--ob-border);
}
.ob-ratio-buy  { background: #25a549; transition: width .4s; }
.ob-ratio-sell { background: #e14040; transition: width .4s; }
.ob-ratio-pct {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 600;
}

/* Shared color classes */
.positive { color: #25a549; }
.negative { color: #e14040; }
.zero-color { color: #f5a623; }
.buy  { color: #25a549; }
.sell { color: #e14040; }

@media (max-width: 576px) {
    button.btn span {
        display: none;
    }
    .nav-tabs button.nav-link {
        font-size: 15px;
    }
    .dropdown-menu li a {
        font-size: 14px;
        padding: 0px 5px;
    }
    .tab-header {
        flex-direction: column;
        align-items: stretch !important;
    }
    .nav-tabs-wrapper {
        width: 100%;
        order: 1;
        overflow-x: auto;
        overflow-y: hidden;
    }
    #symbolTabs {
        overflow: visible;
        flex-shrink: 0;
    }
    .tab-header > div:last-child {
        order: 2;
        width: 100%;
        justify-content: flex-end !important;
        margin: 0 !important;
        padding: 2px 4px;
    }
    #order-book-panel.ob-visible {
        position: fixed !important;
        top: 50px !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: calc(100vh - 50px) !important;
        z-index: 200;
    }
    .technical-chart.ob-open #symbolTabContent {
        width: 100% !important;
    }
    .ob-resize-handle {
        display: none;
    }
}