:root {
    --bg: #0e1116;
    --panel: #161b22;
    --panel-2: #1d2430;
    --text: #eef3f8;
    --muted: #9fb0c2;
    --line: rgba(255, 255, 255, 0.08);
    --accent: #3ddc97;
    --accent-2: #78a8ff;
    --danger: #ff6b6b;
    --shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
    --left-sidebar-width: 248px;
    --left-sidebar-rail-width: 14px;
    --right-drawer-rail-width: 42px;
    --right-drawer-body-width: 210px;
    --right-drawer-open-width: calc(var(--right-drawer-body-width) + var(--right-drawer-rail-width));
    --chart-price-scale-width: 58px;
    --chart-indicator-scale-gap: 10px;
    --chart-timeframe-rail-width: 312px;
}

.htf-slots-settings-panel {
    position: fixed;
    z-index: 100000;
    width: 390px;
    max-width: calc(100vw - 18px);
    max-height: min(620px, calc(100vh - 24px));
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 10px;
    background: #181818;
    background-color: #181818;
    color: #d8d8d8;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.48);
    overflow: hidden;
    opacity: 1;
    isolation: isolate;
}
.htf-slots-settings-panel[hidden] { display: none; }
.htf-slots-settings-head { height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; border-bottom: 1px solid rgba(255,255,255,0.08); color: rgba(255,255,255,0.78); font-size: 13px; font-weight: 900; }
.htf-slots-settings-head button { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid rgba(148,163,184,0.22); border-radius: 7px; background: rgba(255,255,255,0.04); color: #d8d8d8; cursor: pointer; }
.htf-slots-settings-scroll { min-height: 0; overflow-y: auto; padding: 12px 16px 16px; background: #181818; scrollbar-width: thin; scrollbar-color: rgba(120,168,255,0.62) #202020; }
.htf-slots-settings-scroll::-webkit-scrollbar { width: 9px; }
.htf-slots-settings-scroll::-webkit-scrollbar-track { background: #202020; border-radius: 999px; }
.htf-slots-settings-scroll::-webkit-scrollbar-thumb { background: #5f86c7; border-radius: 999px; border: 2px solid #181818; }
.htf-slot-settings { display: grid; gap: 12px; padding: 0 0 18px; margin-bottom: 18px; border-bottom: 1px solid rgba(255,255,255,0.1); background: #181818; }
.htf-slot-settings:last-child { margin-bottom: 0; border-bottom: 0; }
.htf-slot-title { color: rgba(216,216,216,0.74); font-size: 12px; font-weight: 800; }
.htf-slot-row { display: grid; grid-template-columns: max-content minmax(0,1fr) max-content; align-items: center; gap: 8px; min-height: 34px; color: rgba(232,232,232,0.9); font-size: 13px; font-weight: 750; }
.htf-slot-row input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: #d8d8d8; }
.htf-slot-row select, .htf-slot-row input[type="number"] { height: 34px; min-width: 0; border: 1px solid rgba(148,163,184,0.32); border-radius: 6px; background: #1c1c1c; color: #e5e7eb; padding: 0 10px; font: inherit; }
.htf-slot-row input[type="color"] { width: 34px; height: 34px; padding: 3px; border: 1px solid rgba(148,163,184,0.32); border-radius: 6px; background: #1c1c1c; }
.htf-slot-row-tf { grid-template-columns: max-content max-content minmax(112px, 1fr); }
.htf-slot-row-border { grid-template-columns: max-content max-content max-content max-content; }
.htf-slot-row-box { grid-template-columns: max-content max-content max-content max-content; }
.htf-slot-row-open-toggle { grid-template-columns: max-content max-content; }
.htf-slot-row-open { grid-template-columns: max-content max-content max-content max-content minmax(100px, 1fr); }
.htf-slot-row-width { grid-template-columns: max-content 86px; }

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", "Inter", sans-serif;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
}

.terminal-window-body {
    min-width: 1100px;
    min-height: 620px;
    overflow: hidden;
    background: #0b0f14;
}

.terminal-window-shell {
    width: 100vw;
    height: 100vh;
    display: grid;
    grid-template-columns: 248px minmax(420px, 1fr) 250px;
    background: #0b0f14;
    color: var(--text);
}

.terminal-window-panel,
.terminal-window-center {
    min-width: 0;
    min-height: 0;
}

.terminal-window-panel {
    background: #070b10;
    border-color: rgba(148, 163, 184, 0.16);
    padding: 18px 16px;
}

.terminal-window-left {
    border-right: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.02);
}

.terminal-window-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    border-left: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.02);
}

.terminal-trade-panel {
    width: 190px;
    margin: 14px auto 0;
    display: grid;
    justify-items: center;
    gap: 18px;
    color: #f8fbff;
}

.terminal-risk-control {
    width: 154px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 72px 36px 42px;
    height: 36px;
    border: 1px solid rgba(238, 243, 248, 0.82);
    background: rgba(6, 10, 14, 0.82);
}

.terminal-risk-value,
.terminal-risk-percent {
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid rgba(238, 243, 248, 0.82);
    color: #ffffff;
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
}

.terminal-risk-percent {
    font-size: 20px;
    min-width: 0 !important;
    width: 100%;
    height: 100%;
    padding: 0 !important;
    border: 0;
    border-right: 1px solid rgba(238, 243, 248, 0.82);
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    box-shadow: none !important;
    transform: none !important;
}

.terminal-risk-percent:hover {
    background: rgba(120, 168, 255, 0.14);
}

.terminal-risk-stepper {
    display: grid;
    grid-template-rows: 16px 16px;
    min-height: 0;
}

.terminal-risk-stepper button {
    min-width: 0 !important;
    width: 100%;
    height: 16px;
    min-height: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    border: 0;
    border-radius: 0;
    color: #ffffff;
    background: transparent;
    font-size: 17px;
    font-weight: 500;
    line-height: 16px;
    cursor: pointer;
    box-shadow: none !important;
    transform: none !important;
}

.terminal-risk-stepper button:first-child {
    border-bottom: 1px solid rgba(238, 243, 248, 0.82);
}

.terminal-risk-stepper button:hover {
    background: rgba(120, 168, 255, 0.14);
}

.terminal-risk-stepper button.holding {
    background: rgba(120, 168, 255, 0.24);
}

.terminal-leverage-control {
    width: 154px;
    min-height: 32px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 1fr 52px 34px;
    align-items: center;
    border: 1px solid rgba(238, 243, 248, 0.58);
    background: rgba(6, 10, 14, 0.72);
}

.terminal-leverage-label,
.terminal-leverage-control strong,
.terminal-leverage-control button {
    min-width: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    line-height: 1;
}

.terminal-leverage-label {
    padding-left: 8px;
    justify-content: flex-start;
    color: #9fb2ca;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
}

.terminal-leverage-control strong {
    border-left: 1px solid rgba(238, 243, 248, 0.28);
    border-right: 1px solid rgba(238, 243, 248, 0.28);
    font-size: 17px;
    font-weight: 700;
}

.terminal-leverage-control strong.positive {
    color: #57f0a5;
}

.terminal-leverage-control strong.negative {
    color: #ff7373;
}

.terminal-leverage-control button {
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    font-size: 15px;
    box-shadow: none !important;
    transform: none !important;
}

.terminal-leverage-control button:hover,
.terminal-leverage-control button.loading {
    background: rgba(120, 168, 255, 0.14);
}

.terminal-leverage-control button:disabled {
    cursor: wait;
    opacity: 0.75;
}

.terminal-order-actions {
    width: 190px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 45px;
    border: 1px solid rgba(238, 243, 248, 0.82);
    background: rgba(6, 10, 14, 0.82);
}

.terminal-order-actions button {
    min-width: 0 !important;
    min-height: 0 !important;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    border: 0;
    border-radius: 0;
    color: #ffffff;
    background: transparent;
    font-size: 21px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    box-shadow: none !important;
    transform: none !important;
}

.terminal-order-actions button:first-child {
    border-right: 1px solid rgba(238, 243, 248, 0.82);
}

.terminal-order-actions button:hover {
    background: rgba(84, 230, 163, 0.12);
}

.terminal-order-actions button.active {
    color: #ffd83d;
    background: rgba(84, 230, 163, 0.16);
}

.terminal-close-position-button {
    width: 146px;
    min-width: 0 !important;
    height: 34px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    border: 1px solid rgba(255, 92, 92, 0.62);
    border-radius: 3px;
    color: #ffb4b4;
    background: rgba(80, 18, 24, 0.28);
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    box-shadow: none !important;
    transform: none !important;
}

.terminal-close-position-button:hover {
    border-color: rgba(255, 92, 92, 0.95);
    background: rgba(160, 35, 46, 0.32);
    color: #ffffff;
}

.terminal-trade-status {
    min-height: 18px;
    width: 190px;
    color: #9fb2c9;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    white-space: pre-line;
}

.terminal-trade-status.positive {
    color: #69f0ae;
}

.terminal-trade-status.negative {
    color: #ff9f9f;
}

.terminal-order-timing-panel {
    width: 188px;
    min-height: 72px;
    margin: auto auto 22px;
    padding: 10px 9px;
    box-sizing: border-box;
    border: 1px solid rgba(120, 168, 255, 0.32);
    background: rgba(8, 13, 19, 0.78);
    color: #9fb2c9;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    text-align: left;
    white-space: normal;
}

.terminal-order-timing-panel[hidden] {
    display: none !important;
}

.terminal-window-center {
    position: relative;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.018), transparent 18%, transparent 82%, rgba(255, 255, 255, 0.012)),
        #0d1116;
}

.terminal-window-panel-head {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #d8e6ff;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.terminal-window-panel-head strong {
    color: #ffd83d;
    font-size: 12px;
}

.terminal-demo-label {
    width: 192px;
    justify-self: center;
    margin: -7px auto 8px;
    color: #ffd83d;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
}

.terminal-balance-widget {
    width: 192px;
    justify-self: center;
    margin-left: auto;
    margin-right: auto;
    display: grid;
    grid-template-rows: 27px 1px 27px;
    gap: 0;
    padding: 8px 12px;
    border: 1px solid rgba(84, 230, 163, 0.82);
    border-radius: 14px;
    background: rgba(9, 18, 24, 0.88);
    box-shadow:
        0 0 0 1px rgba(84, 230, 163, 0.08),
        0 14px 34px rgba(0, 0, 0, 0.28);
}

.terminal-balance-row {
    min-height: 27px;
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) 28px;
    align-items: center;
    align-content: center;
    gap: 8px;
    color: #e9f1fb;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
}

.terminal-balance-row > span,
.terminal-balance-row > strong {
    height: 100%;
    display: flex;
    align-items: center;
}

.terminal-balance-widget > .terminal-balance-row:first-child {
    transform: translateY(-3px);
}

.terminal-balance-today-row {
    grid-template-columns: 70px minmax(0, 1fr) 28px;
    transform: translateY(3px);
}

.terminal-balance-row strong {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
}

.terminal-balance-currency {
    justify-content: center;
    width: 28px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
}

.terminal-balance-divider {
    height: 1px;
    margin: 1px 0;
    background: rgba(84, 230, 163, 0.56);
}

.terminal-balance-today-row strong {
    color: #d8e6ff;
}

.terminal-balance-today-row strong.positive {
    color: #54e6a3;
}

.terminal-balance-today-row strong.negative {
    color: #ff6f6f;
}

.terminal-left-separator {
    height: 1px;
    margin: 28px -16px 0;
    background: rgba(148, 163, 184, 0.18);
}

.terminal-favorites-list {
    margin: 0 -16px;
    display: grid;
    align-content: start;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    background: #070b10;
}

.terminal-favorite-row,
button.terminal-favorite-row:not(:disabled) {
    position: relative;
    width: 100%;
    min-height: 21px;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) 24px 62px;
    align-items: center;
    gap: 0;
    border: 0 !important;
    border-bottom: 1px solid rgba(255,255,255,0.09) !important;
    border-radius: 0 !important;
    outline: none;
    box-shadow: none !important;
    color: #d8dde6;
    background: transparent !important;
    padding: 0 6px 0 0;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transform: none !important;
}

.terminal-favorite-row:hover,
.terminal-favorite-row.active,
button.terminal-favorite-row:not(:disabled):hover,
button.terminal-favorite-row:not(:disabled).active {
    background: rgba(255,255,255,0.055) !important;
}

.terminal-favorite-row::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 68px;
    width: 1px;
    background: rgba(148, 163, 184, 0.16);
    pointer-events: none;
}

.terminal-favorite-star {
    color: #ffd83d;
    font-size: 13px;
    line-height: 1;
    text-align: center;
}

.terminal-favorite-symbol {
    min-width: 0;
    overflow: hidden;
    color: #d7dde8;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.terminal-favorite-alert {
    visibility: hidden;
    color: #ffd83d;
    font-size: 12px;
    line-height: 1;
    text-align: center;
    transform: translateX(-3px);
}

.terminal-favorite-alert.visible {
    visibility: visible;
}

.terminal-favorite-alert.triggered {
    animation: terminal-alert-pulse 0.8s ease-in-out infinite;
}

.terminal-favorite-position {
    color: #8b98a9;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}

.terminal-favorite-position.positive {
    color: #00ff35;
}

.terminal-favorite-position.negative {
    color: #ff2d2d;
}

@keyframes terminal-alert-pulse {
    0%, 100% {
        color: #ffd83d;
        opacity: 1;
        transform: scale(1);
    }
    50% {
        color: #ff4d8d;
        opacity: 0.42;
        transform: scale(1.16);
    }
}

.terminal-pnl-reset {
    width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    border: 0;
    color: #eef3f8;
    background: transparent;
    padding: 0;
    cursor: pointer;
    opacity: 0.92;
}

.terminal-pnl-reset:hover {
    color: #54e6a3;
    opacity: 1;
}

.terminal-pnl-reset svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.terminal-window-empty-chart {
    width: 100%;
    height: 100%;
    background:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 96px 76px;
    opacity: 0.42;
}

.terminal-mode-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    color: rgba(255, 255, 255, 0.36);
    font-size: 96px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0;
    text-transform: uppercase;
    filter: blur(3px);
    opacity: 0.62;
    transform: translate(-50%, -50%);
    pointer-events: none;
    user-select: none;
}

.terminal-mode-watermark.hidden,
.terminal-window-center.chart-open .terminal-mode-watermark {
    display: none !important;
}

.terminal-chart-frame.hidden {
    display: none !important;
}

.terminal-chart-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #0d1116;
}

.terminal-trade-tool-active {
    cursor: crosshair;
}

.terminal-trade-chart-layer {
    position: absolute;
    inset: 0 70px 0 0;
    z-index: 46;
    pointer-events: none;
}

.terminal-trade-chart-line {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background: #ff2d2d;
    box-shadow: 0 0 8px rgba(255, 45, 45, 0.38);
}

.terminal-trade-levels-editable .terminal-trade-limit-line,
.terminal-trade-levels-editable .terminal-trade-stop-line,
.terminal-trade-levels-editable .terminal-trade-target-line {
    pointer-events: auto;
    cursor: ns-resize;
}

.terminal-trade-levels-editable .terminal-trade-limit-line::before,
.terminal-trade-levels-editable .terminal-trade-stop-line::before,
.terminal-trade-levels-editable .terminal-trade-target-line::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -5px;
    height: 11px;
    background: transparent;
    cursor: ns-resize;
}

.terminal-trade-limit-line {
    background: transparent;
    border-top: 1px dashed rgba(210, 220, 232, 0.82);
    box-shadow: none;
}

.terminal-trade-target-line {
    background: #20e36f;
    border-top: 1px dashed rgba(32, 227, 111, 0.9);
    box-shadow: 0 0 8px rgba(32, 227, 111, 0.32);
}

.terminal-trade-chart-label {
    position: absolute;
    top: -9px;
    right: 12px;
    width: 150px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    color: #ff2d2d;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-align: right;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.9);
    white-space: nowrap;
}

.terminal-trade-chart-label.above {
    top: -9px;
}

.terminal-trade-chart-label.below {
    top: -9px;
}

.terminal-trade-target-label {
    color: #20e36f;
}

.terminal-trade-target-label .terminal-trade-amount-badge {
    width: 122px;
    min-width: 122px;
    justify-content: space-between;
    gap: 8px;
}

.terminal-trade-limit-label {
    color: rgba(230, 238, 248, 0.9);
}

.terminal-trade-amount-badge {
    width: 72px;
    min-width: 72px;
    height: 19px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1;
    text-shadow: none;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.22);
    box-sizing: border-box;
}

.terminal-trade-amount-badge.positive {
    background: #111923;
    border: 1px solid rgba(32, 227, 111, 0.92);
}

.terminal-trade-amount-badge.negative {
    background: #111923;
    border: 1px solid rgba(255, 45, 45, 0.92);
}

.terminal-trade-label-title {
    display: inline-flex;
    align-items: center;
    min-height: 19px;
}

.terminal-trade-target-label .terminal-trade-label-title {
    min-height: 0;
    font-size: 10.5px;
    font-weight: 700;
    color: #20e36f;
    text-shadow: none;
}

.terminal-trade-entry-marker {
    position: absolute;
    top: -9px;
    right: 90px;
    width: 72px;
    min-width: 72px;
    height: 19px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: #0ea5d8;
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: 1px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    box-shadow: 0 0 8px rgba(14, 165, 216, 0.28);
    box-sizing: border-box;
}

.terminal-trade-entry-marker.positive {
    background: #098f54;
    box-shadow: 0 0 8px rgba(32, 227, 111, 0.28);
}

.terminal-trade-entry-marker.negative {
    background: #c43434;
    box-shadow: 0 0 8px rgba(255, 77, 77, 0.28);
}

.terminal-trade-entry-marker::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -90px;
    width: 90px;
    height: 1px;
    background: rgba(255, 255, 255, 0.82);
}

.terminal-trade-entry-price-label,
.terminal-trade-scale-price-label {
    position: absolute;
    top: -11px;
    right: calc(-1 * var(--terminal-price-scale-width, 70px));
    width: var(--terminal-price-scale-width, 70px);
    min-width: 0;
    height: 23px;
    display: grid;
    place-items: center;
    padding: 0;
    text-align: center;
    text-indent: 0;
    color: #050a10;
    background: rgba(203, 213, 225, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: 2px;
    font-size: var(--terminal-entry-price-font-size, 12px);
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 0 8px rgba(14, 165, 216, 0.18);
    box-sizing: border-box;
    overflow: hidden;
}

.terminal-trade-entry-price-label span,
.terminal-trade-scale-price-label span {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    padding: 0;
    margin: 0;
    text-align: center;
}

.terminal-trade-stop-price-label {
    background: rgba(255, 204, 204, 0.96);
    border-color: rgba(255, 45, 45, 0.92);
}

.terminal-trade-target-price-label {
    background: rgba(198, 255, 222, 0.96);
    border-color: rgba(32, 227, 111, 0.92);
}

.terminal-trade-entry-marker.hidden,
.terminal-trade-entry-price-label.hidden,
.terminal-trade-scale-price-label.hidden {
    display: none !important;
}

.chart-live-status {
    position: absolute;
    left: 12px;
    top: 42px;
    z-index: 48;
    min-width: 54px;
    max-width: 320px;
    padding: 4px 7px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 5px;
    background: rgba(7, 10, 15, 0.76);
    color: #9fb2c9;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
    text-align: center;
    pointer-events: none;
}

.chart-live-status.live {
    border-color: rgba(105, 240, 174, 0.42);
    color: #69f0ae;
}

.chart-live-status.connecting {
    border-color: rgba(245, 197, 66, 0.42);
    color: #f5c542;
}

.chart-live-status.offline {
    border-color: rgba(255, 107, 107, 0.42);
    color: #ff9f9f;
}

.terminal-trade-chart-label.hidden,
.terminal-trade-chart-line.hidden {
    display: none !important;
}

.terminal-account-card {
    margin-top: 46px;
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(120, 168, 255, 0.16);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.34);
}

.terminal-account-status {
    min-height: 26px;
    display: flex;
    align-items: center;
    color: #ffd83d;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.25;
}

.terminal-account-status.ok {
    color: #54e6a3;
}

.terminal-account-status.failed {
    color: #ff8a8a;
}

.terminal-account-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #9fb0c2;
    font-size: 12px;
    font-weight: 700;
}

.terminal-account-row strong {
    color: #eef3f8;
    font-size: 13px;
}

.shell {
    min-height: 100vh;
    display: block;
    margin-left: var(--left-sidebar-width);
    margin-right: var(--right-drawer-rail-width);
    transition: margin-left 0.24s ease;
}

body.sidebar-floating .shell,
html.sidebar-floating-preload .shell {
    margin-left: var(--left-sidebar-rail-width);
}

body.terminal-embedded {
    overflow: hidden;
}

body.signal-detail-page {
    overflow: hidden;
}

body.signal-detail-page .shell {
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
}

body.signal-detail-page .content.signal-detail-content {
    height: 100vh;
    min-height: 100vh;
    margin-top: 0 !important;
    overflow: hidden;
}

body.terminal-embedded .sidebar,
body.terminal-embedded .sidebar-hover-zone,
body.terminal-embedded .right-drawer {
    display: none !important;
}

body.terminal-embedded .shell {
    min-height: 100vh;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.terminal-embedded .content {
    min-height: 100vh;
}

body.telegram-screenshot-mode {
    overflow: hidden;
    background: #0f1218;
}

body.telegram-screenshot-mode .sidebar,
body.telegram-screenshot-mode .sidebar-hover-zone,
body.telegram-screenshot-mode .right-drawer {
    display: none !important;
}

body.telegram-screenshot-mode .shell {
    min-height: 100vh;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.telegram-screenshot-mode .content {
    min-height: 100vh;
    margin-top: 0 !important;
    padding: 0 !important;
}

body.telegram-screenshot-mode .content.signal-detail-content {
    height: 100vh;
    min-height: 100vh;
    margin-top: 0 !important;
}

body.telegram-screenshot-mode .signal-chart-panel {
    height: 100vh;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body.telegram-screenshot-mode .signal-chart-head {
    flex: 0 0 44px;
    min-height: 44px;
    margin: 0;
    padding: 0 14px;
    justify-content: flex-start;
    gap: 0;
}

body.telegram-screenshot-mode .signal-chart-mainline {
    height: 44px;
    flex-wrap: nowrap;
    gap: 18px;
}

body.telegram-screenshot-mode .signal-chart-mainline > :not(.signal-head-actions),
body.telegram-screenshot-mode .signal-chart-mainline > .signal-volume-badge {
    transform: none;
}

body.telegram-screenshot-mode .signal-chart-actions {
    gap: 8px;
}

body.telegram-screenshot-mode .signal-head-actions {
    margin-left: 8px;
}

body.telegram-screenshot-mode .chart-workspace {
    flex: 1 1 auto;
    min-height: 0;
    gap: 0;
}

body.telegram-screenshot-mode .chart-tools-row {
    display: none;
}

body.telegram-screenshot-mode .scroll-top-button {
    display: none !important;
}

body.telegram-screenshot-mode .chart-box-hero {
    height: auto;
    min-height: 0;
    grid-area: chart;
}

body.right-drawer-open .shell,
html.right-drawer-open-preload .shell {
    margin-right: var(--right-drawer-open-width);
}

body.signal-detail-page .shell {
    position: fixed !important;
    inset: 0 var(--right-drawer-rail-width) 0 0 !important;
    width: auto !important;
    margin-left: var(--left-sidebar-width) !important;
    margin-right: 0 !important;
}

body.signal-detail-page.sidebar-floating .shell,
html.sidebar-floating-preload body.signal-detail-page .shell {
    margin-left: var(--left-sidebar-rail-width) !important;
}

body.signal-detail-page.right-drawer-open .shell,
html.right-drawer-open-preload body.signal-detail-page .shell {
    right: var(--right-drawer-open-width) !important;
    margin-right: 0 !important;
}

html.terminal-embedded-preload body.signal-detail-page .shell,
body.signal-detail-page.terminal-embedded .shell {
    position: fixed !important;
    inset: 0 !important;
    width: auto !important;
    height: 100vh !important;
    min-height: 100vh !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow: hidden;
}

html.terminal-embedded-preload body.signal-detail-page .content.signal-detail-content,
body.signal-detail-page.terminal-embedded .content.signal-detail-content {
    height: 100vh;
    min-height: 100vh;
    margin-top: 0 !important;
    padding: 0 !important;
    overflow: hidden;
}

body.signal-detail-page.terminal-embedded .content.signal-detail-content > .signal-chart-panel {
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

html.right-drawer-open-preload .shell,
html.right-drawer-open-preload .right-drawer,
html.right-drawer-open-preload .right-drawer-body {
    transition: none !important;
}

.right-drawer {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 88;
    width: var(--right-drawer-rail-width);
    border-left: 1px solid rgba(255, 255, 255, 0.10);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01)),
        rgba(7, 9, 12, 0.94);
    box-shadow: -10px 0 28px rgba(0, 0, 0, 0.24);
    transition: border-color 0.24s ease, box-shadow 0.24s ease;
}

body.right-drawer-open .right-drawer,
html.right-drawer-open-preload .right-drawer {
    width: var(--right-drawer-open-width);
    border-left-color: rgba(255, 255, 255, 0.18);
    box-shadow: -18px 0 42px rgba(0, 0, 0, 0.34);
}

.right-drawer-toggle {
    position: absolute;
    top: 7px;
    right: 6px;
    z-index: 2;
    width: 38px;
    min-width: 38px !important;
    height: 38px;
    padding: 0 !important;
    display: grid;
    place-items: center;
    border-radius: 11px;
    border: 0;
    background: transparent;
    color: #f2f2f2;
    box-shadow: none;
    transition: background 0.16s ease, color 0.16s ease;
}

.right-drawer-toggle:hover {
    background: rgba(77, 77, 77, 0.88);
    color: #f7f7f7;
    box-shadow: none;
}

.right-drawer-icon {
    position: relative;
    width: 18px;
    height: 24px;
    border: 1.25px solid currentColor;
    border-bottom: 0;
    border-radius: 1px 1px 0 0;
}

.right-drawer-icon::before,
.right-drawer-icon::after {
    content: "";
    position: absolute;
    bottom: -6px;
    width: 10px;
    height: 9px;
    border-bottom: 1.25px solid currentColor;
}

.right-drawer-icon::before {
    left: -1.25px;
    border-left: 1.25px solid currentColor;
    transform: skewY(-24deg);
    transform-origin: left bottom;
}

.right-drawer-icon::after {
    right: -1.25px;
    border-right: 1.25px solid currentColor;
    transform: skewY(24deg);
    transform-origin: right bottom;
}

.right-drawer-icon span {
    position: absolute;
    left: 4px;
    right: 4px;
    height: 1px;
    background: currentColor;
    opacity: 0.92;
}

.right-drawer-icon span:nth-child(1) {
    top: 6px;
}

.right-drawer-icon span:nth-child(2) {
    top: 10px;
}

.right-drawer-icon span:nth-child(3) {
    top: 14px;
}

.right-drawer-settings-button {
    position: absolute;
    right: 7px;
    bottom: 14px;
    z-index: 4;
    width: 28px;
    min-width: 28px !important;
    height: 28px;
    padding: 0 !important;
    display: grid;
    place-items: center;
    border-radius: 6px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.36);
    color: rgba(226, 232, 240, 0.9);
    box-shadow: none;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.right-drawer-settings-button:hover,
.right-drawer-settings-button:focus {
    outline: none;
    border-color: rgba(120, 168, 255, 0.42);
    background: rgba(120, 168, 255, 0.12);
    color: #ffffff;
}

.right-drawer-settings-icon {
    width: 18px;
    height: 18px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.45;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.right-drawer-body {
    height: 100%;
    width: var(--right-drawer-body-width);
    margin-right: var(--right-drawer-rail-width);
    border-right: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(7, 9, 12, 0.88);
    opacity: 0;
    pointer-events: none;
    padding: 22px 10px 18px;
    overflow: hidden;
}

body.right-drawer-open .right-drawer-body,
html.right-drawer-open-preload .right-drawer-body {
    opacity: 1;
    pointer-events: auto;
}

.right-drawer-list-top {
    position: absolute;
    top: 54%;
    right: 8px;
    z-index: 3;
    width: 26px;
    min-width: 26px !important;
    height: 26px;
    padding: 0 !important;
    display: grid;
    place-items: center;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(14, 17, 22, 0.88);
    color: rgba(238, 243, 248, 0.88);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) scale(0.92);
    transition: opacity 0.16s ease, transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.right-drawer-list-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) scale(1);
}

body:not(.right-drawer-open) .right-drawer-list-top.visible {
    opacity: 0;
    pointer-events: none;
}

.right-drawer-list-top:hover,
.right-drawer-list-top:focus {
    outline: none;
    border-color: rgba(120, 168, 255, 0.46);
    background: rgba(27, 36, 50, 0.94);
}

.right-drawer-list-top span {
    width: 9px;
    height: 9px;
    border-left: 2px solid currentColor;
    border-top: 2px solid currentColor;
    transform: translateY(3px) rotate(45deg);
    border-radius: 1px;
}

.right-drawer-volume {
    margin-bottom: 34px;
}

.right-drawer .drawer-volume-control {
    width: 190px;
    max-width: 190px;
    flex: 0 0 190px;
    min-height: 30px;
    height: 30px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.045);
    box-shadow: none;
    padding: 0 8px;
    gap: 8px;
    font-size: 11px;
    overflow: hidden;
    cursor: ew-resize;
}

.right-drawer .drawer-volume-control .volume-drag-left {
    gap: 7px;
    font-size: 11px;
}

.right-drawer .drawer-volume-control .volume-drag-value {
    min-width: 50px;
    font-size: 11px;
}

.right-drawer .drawer-volume-control .volume-drag-arrows {
    width: 28px;
    font-size: 12px;
    text-align: center;
    left: var(--volume-progress, 0%);
    transform: translate(-50%, -50%);
}

.right-drawer .drawer-volume-control[aria-valuenow="0"] .volume-drag-arrows,
.right-drawer .drawer-volume-control[aria-valuenow="300000000"] .volume-drag-arrows {
    opacity: 0;
}

.right-drawer-tools {
    display: grid;
    grid-template-columns: 134px 49px;
    gap: 5px;
    width: 188px;
    margin-bottom: 8px;
}

.right-drawer-search {
    min-width: 0;
    width: 134px;
    height: 31px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 7px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.045);
    color: var(--muted);
    font-size: 13px;
}

.right-drawer-search input {
    width: 100%;
    min-height: 0;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 13px !important;
    line-height: 1.15 !important;
}

.right-drawer-search span {
    font-size: 14px !important;
    line-height: 1 !important;
}

.right-drawer-search input::placeholder {
    font-size: 13px !important;
    line-height: 1.15 !important;
}

.right-drawer-search input:focus {
    outline: none;
}

.right-drawer-search:hover,
.right-drawer-search:focus-within,
.right-drawer-tool-button:hover,
.right-drawer-tool-button:focus {
    background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.026));
    border-color: rgba(61, 220, 151, 0.28);
    box-shadow:
        0 10px 22px rgba(0,0,0,0.18),
        inset 0 0 0 1px rgba(61, 220, 151, 0.1);
}

.right-drawer-tool-button:focus {
    outline: none;
}

.right-drawer-tool-button {
    min-width: 0 !important;
    width: 49px;
    height: 31px;
    padding: 0 !important;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.055);
    color: #bfc9d7;
    font-size: 10px;
    font-weight: 700;
}

.right-drawer-tool-button.paused {
    border-color: rgba(255, 77, 79, 0.72);
    color: #ff5c66;
    box-shadow: 0 0 0 1px rgba(255, 77, 79, 0.18);
}

.right-drawer-package {
    display: block;
    position: relative;
    width: 190px;
    margin: 0 0 12px;
}

.right-drawer-package select {
    position: absolute;
    inset: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.right-drawer-package-trigger {
    width: 100%;
    height: 31px;
    padding: 0 9px 0 10px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    align-items: center;
    column-gap: 8px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.045);
    color: #eef3f8;
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    outline: none;
    cursor: pointer;
    box-shadow: none;
}

.right-drawer-package-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.right-drawer-package-count {
    min-width: 0;
    justify-self: end;
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.right-drawer-package-trigger:hover,
.right-drawer-package-trigger:focus,
.right-drawer-package-trigger[aria-expanded="true"] {
    background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.026));
    border-color: rgba(61, 220, 151, 0.28);
    box-shadow:
        0 10px 22px rgba(0,0,0,0.18),
        inset 0 0 0 1px rgba(61, 220, 151, 0.1);
}

.right-drawer-package-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 80;
    max-height: 168px;
    padding: 4px;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 5px;
    border: 1px solid rgba(61, 220, 151, 0.26);
    background: #10161f;
    box-shadow: 0 16px 32px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.04);
}

.right-drawer-package-menu[hidden] {
    display: none;
}

.right-drawer-package-menu::-webkit-scrollbar {
    width: 5px;
}

.right-drawer-package-menu::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.18);
    border-radius: 999px;
}

.right-drawer-package-option {
    width: 100%;
    min-width: 0 !important;
    height: 28px;
    padding: 0 8px 0 9px !important;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    align-items: center;
    column-gap: 8px;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: #dce6f1;
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: none;
}

.right-drawer-package-option:hover,
.right-drawer-package-option:focus,
.right-drawer-package-option[aria-selected="true"] {
    background: rgba(61, 220, 151, 0.14);
    color: #ffffff;
    box-shadow: none !important;
}

.right-drawer-mini-icons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px 17px;
    color: rgba(238, 243, 248, 0.9);
    font-size: 22px;
    line-height: 1;
}

.right-drawer-favorites-filter {
    width: 22px;
    min-width: 22px !important;
    height: 22px;
    padding: 0 !important;
    display: grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: rgba(238, 243, 248, 0.9);
    font-size: 19px;
    line-height: 1;
    box-shadow: none;
}

.right-drawer-favorites-filter:hover,
.right-drawer-favorites-filter:focus {
    background: rgba(255, 216, 74, 0.08);
    border-color: rgba(255, 216, 74, 0.24);
    box-shadow: none !important;
}

.right-drawer-favorites-filter.active {
    color: #ffd84a;
    text-shadow: 0 0 8px rgba(255, 216, 74, 0.34);
}

.right-drawer-table-head,
.right-drawer-symbol-row {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) 68px;
    column-gap: 8px;
    align-items: center;
}

.right-drawer-symbol-row.filtered-out {
    display: none;
}

.right-drawer-table-head {
    padding: 14px 0 5px;
    color: #9fb0c2;
    font-size: 11px;
    border-top: 1px solid rgba(255,255,255,0.10);
    border-bottom: 1px solid rgba(255,255,255,0.10);
}

.right-drawer-table-head span:first-child {
    grid-column: 1 / 3;
}

.right-drawer-table-head span:last-child {
    text-align: right;
}

.right-drawer-symbol-list {
    height: calc(100vh - 252px);
    padding-bottom: 42px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    overflow-anchor: none;
}

.right-drawer-symbol-list::-webkit-scrollbar {
    width: 5px;
}

.right-drawer-symbol-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.16);
    border-radius: 999px;
}

.right-drawer-symbol-row {
    min-height: 21px;
    padding: 0;
    border-bottom: 1px solid rgba(255,255,255,0.09);
    color: #d8dde6;
    font-size: 14px;
    font-weight: 400;
}

.right-drawer-symbol-row:hover {
    background: rgba(255,255,255,0.055);
}

.right-drawer-symbol-row.active {
    background: rgba(59, 130, 246, 0.20);
    color: #ffffff;
}

.right-drawer-symbol-row.active .right-drawer-symbol,
.right-drawer-symbol-row.active .right-drawer-volume-text {
    color: #ffffff;
}

.right-drawer-favorite {
    width: 15px;
    min-width: 15px !important;
    height: 18px;
    padding: 0 !important;
    border: 0;
    background: transparent;
    color: rgba(126, 137, 150, 0.72);
    font-size: 15px;
    line-height: 1;
    box-shadow: none;
}

.right-drawer-favorite.active {
    color: #ffd84a;
    text-shadow: 0 0 8px rgba(255, 216, 74, 0.34);
}

.right-drawer-favorite.failed {
    color: #ff6b6b;
}

.right-drawer-symbol {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.right-drawer-symbol-link {
    width: 100%;
    min-width: 0 !important;
    height: auto;
    padding: 0 !important;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    text-decoration: none;
    text-align: left;
    font: inherit;
    font-weight: 400;
    line-height: inherit;
    box-shadow: none;
    cursor: pointer;
}

.right-drawer-symbol-link:hover {
    background: transparent;
    box-shadow: none;
    transform: none;
    filter: none;
    color: #eef3f8;
}

.right-drawer-volume-text {
    color: #c8d7ea;
    text-align: right;
    font-size: 13px;
    font-weight: 400;
    white-space: nowrap;
}

.right-drawer-empty {
    padding: 14px 8px;
    color: var(--muted);
    font-size: 12px;
}

.sidebar {
    min-height: 100vh;
    padding: 28px 20px 24px;
    border-right: 1px solid var(--line);
    background: #0a0e14;
    position: fixed;
    left: 0;
    top: 0;
    width: var(--left-sidebar-width);
    align-self: start;
    display: flex;
    flex-direction: column;
    z-index: 260;
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease, background 0.24s ease;
    will-change: transform;
}

.sidebar-pin-button {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    min-width: 20px;
    height: 20px;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    font-size: 10px;
    line-height: 1;
    box-shadow: none;
}

.sidebar-pin-button:hover {
    background: rgba(61, 220, 151, 0.13);
    border-color: rgba(61, 220, 151, 0.3);
    box-shadow: none !important;
}

.sidebar-hover-zone {
    position: fixed;
    top: 50%;
    left: 0;
    width: 12px;
    height: 92px;
    transform: translateY(-50%);
    z-index: 80;
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 0;
    border-radius: 0 999px 999px 0;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01)),
        rgba(7, 9, 12, 0.84);
    box-shadow: 8px 0 22px rgba(0, 0, 0, 0.18);
    transition: background 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease, width 0.18s ease;
}

.sidebar-hover-zone::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 4px;
    width: 5px;
    height: 52px;
    border-radius: 999px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.22);
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.12);
}

.sidebar-hover-zone:hover {
    width: 15px;
    border-color: rgba(61, 220, 151, 0.32);
    background:
        linear-gradient(90deg, rgba(61, 220, 151, 0.12), rgba(255, 255, 255, 0.02)),
        rgba(7, 9, 12, 0.92);
}

body.sidebar-floating .sidebar,
html.sidebar-floating-preload .sidebar {
    transform: translateX(calc(-1 * var(--left-sidebar-width)));
    box-shadow: none;
    pointer-events: none;
}

body.sidebar-floating.sidebar-peek .sidebar {
    transform: translateX(0);
    border-color: rgba(61, 220, 151, 0.28);
    box-shadow: 18px 0 42px rgba(0, 0, 0, 0.42);
    pointer-events: auto;
}

body.sidebar-floating .sidebar-hover-zone,
html.sidebar-floating-preload .sidebar-hover-zone {
    display: block;
}

body.sidebar-floating.sidebar-peek .sidebar-hover-zone {
    opacity: 0;
    pointer-events: none;
}

body.sidebar-floating .content,
html.sidebar-floating-preload .content {
    width: 100%;
    padding-left: 18px;
    transition: padding-left 0.24s ease;
}

.brand {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 36px;
    padding-right: 24px;
    text-decoration: none;
    color: var(--text);
    border-radius: 14px;
    padding-top: 2px;
    padding-bottom: 2px;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.brand:hover {
    opacity: 0.92;
}

.brand:active {
    transform: translateY(2px);
}

.brand-separator {
    height: 1px;
    margin: -10px 0 28px;
    background: rgba(255, 255, 255, 0.8);
}

.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: #04120b;
    background: linear-gradient(135deg, var(--accent), #9bffce);
}

.brand-title {
    font-size: 18px;
    font-weight: 700;
}

.brand-subtitle {
    font-size: 12px;
    color: var(--muted);
}

.nav {
    display: grid;
    gap: 2px;
}

.signal-sidepanel {
    display: grid;
    gap: 18px;
    padding-top: 4px;
    height: calc(100vh - 104px);
    min-height: 0;
    overflow: hidden;
}

.signal-sidepanel-scroll {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 4px 44px 0;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
    scrollbar-gutter: stable;
}

.signal-sidepanel-scroll::-webkit-scrollbar {
    width: 6px;
}

.signal-sidepanel-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

.signal-sidepanel-scroll::after {
    content: "";
    display: block;
    flex: 0 0 34px;
}

.signal-sidepanel-title {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #eef3f8;
}

.signal-sidepanel-section {
    display: grid;
    gap: 10px;
}

.signal-sidepanel-label {
    width: fit-content;
    padding: 10px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    color: #d8e6ff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.signal-sidepanel-list {
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line);
    margin-bottom: 22px;
}

.signal-sidepanel-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 34px;
    padding: 7px 10px;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.signal-sidepanel-row:last-child {
    border-bottom: 0;
}

.signal-sidepanel-row span {
    color: var(--accent-2);
    font-weight: 400;
}

.signal-sidepanel-symbol {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
}

.signal-sidepanel-symbol span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.signal-sidepanel-row strong {
    color: var(--text);
    font-size: 13px;
    font-weight: 400;
}

.signal-sidepanel-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.signal-sidepanel-row.active {
    background: rgba(120, 168, 255, 0.09);
    border-color: rgba(120, 168, 255, 0.2);
}

.signal-sidepanel-empty {
    padding: 14px 12px;
    color: var(--muted);
    font-size: 14px;
}

.nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
    min-height: 30px;
    padding: 4px 14px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid transparent;
}

.nav a span:first-child {
    min-width: 0;
    white-space: nowrap;
}

.nav-count {
    flex: 0 0 auto;
    color: #ffffff;
    background: transparent;
    border: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
}

.nav-count.hidden {
    display: none;
}

.nav a:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--line);
}

.nav a.active {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(61, 220, 151, 0.22);
    box-shadow: inset 0 0 0 1px rgba(61, 220, 151, 0.12);
}

.sidebar-binance-status-slot {
    flex-shrink: 0;
    min-height: 64px;
    margin-top: auto;
    margin-bottom: 22px;
    display: grid;
    align-content: start;
    justify-items: center;
    gap: 8px;
}

.sidebar-binance-error {
    display: block;
    flex-shrink: 0;
    width: fit-content;
    margin: 0 auto;
    padding: 7px 10px;
    border: 1px solid rgba(255, 69, 69, 0.95);
    background: rgba(255, 69, 69, 0.035);
    color: #ff5555;
    text-decoration: none;
    font-size: 13px;
    line-height: 1;
}

.sidebar-binance-block {
    display: block;
    flex-shrink: 0;
    width: fit-content;
    margin: 8px auto 0;
    padding: 7px 10px;
    border: 1px solid rgba(255, 190, 90, 0.95);
    background: rgba(255, 190, 90, 0.055);
    color: #ffc96b;
    font-size: 13px;
    line-height: 1;
    text-align: center;
}

.sidebar-binance-error.hidden,
.sidebar-binance-block.hidden {
    display: none;
}

.sidebar-terminal-control {
    flex-shrink: 0;
    margin-top: 0;
    margin-bottom: 52px;
    padding-top: 0;
    display: grid;
    justify-items: center;
}

.sidebar-terminal-button {
    width: 82%;
    min-width: 0 !important;
    height: 36px;
    border-radius: 4px;
    border: 1px solid rgba(76, 219, 181, 0.26);
    background:
        linear-gradient(90deg, rgba(61, 220, 151, 0.12), rgba(255, 107, 107, 0.10)),
        rgba(255, 255, 255, 0.04);
    color: #ffffff;
    font-size: 14px;
    white-space: nowrap;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 0 18px rgba(76, 219, 181, 0.06);
}

.sidebar-terminal-button:hover {
    transform: none !important;
    filter: none !important;
    border-color: rgba(255, 107, 107, 0.34) !important;
    background:
        linear-gradient(90deg, rgba(61, 220, 151, 0.16), rgba(255, 107, 107, 0.14)),
        rgba(255, 255, 255, 0.06) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 0 20px rgba(255, 107, 107, 0.08) !important;
}

.telegram-toggle {
    width: 76px;
    min-width: 76px;
    height: 34px;
    padding: 0 7px;
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(255, 107, 107, 0.5);
    background: linear-gradient(180deg, rgba(255, 107, 107, 0.38), rgba(120, 34, 42, 0.72));
    color: #fff;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 8px 18px rgba(0,0,0,0.22);
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.telegram-toggle.on {
    border-color: rgba(61, 220, 151, 0.58);
    background: linear-gradient(180deg, rgba(61, 220, 151, 0.46), rgba(20, 115, 78, 0.78));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 8px 18px rgba(0,0,0,0.22), 0 0 18px rgba(61, 220, 151, 0.12);
}

.telegram-toggle:disabled {
    opacity: 0.68;
    cursor: default;
}

.telegram-toggle.failed {
    border-color: rgba(255, 210, 90, 0.65);
}

.telegram-toggle-thumb {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: linear-gradient(180deg, #eef3f8, #aab7c6);
    border: 1px solid rgba(255,255,255,0.7);
    box-shadow: 0 2px 8px rgba(0,0,0,0.34);
    transition: transform 0.18s ease;
}

.telegram-toggle.on .telegram-toggle-thumb {
    transform: translateX(-42px);
}

.telegram-toggle-text {
    position: relative;
    z-index: 1;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0,0,0,0.28);
}

.telegram-toggle-on {
    opacity: 0;
}

.telegram-toggle.on .telegram-toggle-on {
    opacity: 1;
}

.telegram-toggle.on .telegram-toggle-off {
    opacity: 0;
}

.telegram-toggle-label {
    color: var(--text);
    font-size: 15px;
    line-height: 1.25;
    text-align: center;
}

.settings-telegram-toggle-row {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
}

.settings-auto-scan-interval {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 118px;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
}

.settings-auto-scan-interval select {
    width: 118px;
    height: 34px;
    padding: 0 28px 0 12px;
    border: 1px solid rgba(76, 219, 181, 0.36);
    border-radius: 9px;
    background: rgba(15, 23, 42, 0.72);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    outline: none;
}

.content {
    min-width: 0;
    max-width: 100%;
    padding: 28px 28px 120px;
    overflow-x: clip;
}

.content.signal-detail-content {
    margin-top: 0;
    min-height: 100vh;
    padding: 0 !important;
    overflow: hidden;
}

.drawer-chart-frame-shell {
    min-height: calc(100vh - 1px);
    margin: -28px -28px -120px;
    background: #0f1218;
}

.content.signal-detail-content .drawer-chart-frame-shell {
    margin: 0;
}

.drawer-chart-frame {
    display: block;
    width: 100%;
    height: 100vh;
    min-height: 720px;
    border: 0;
    background: #0f1218;
}

.hero {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    gap: 20px;
    align-items: stretch;
    margin-bottom: 22px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h1, h2 {
    margin: 0;
}

h1 {
    font-size: 34px;
    line-height: 1.08;
    margin-bottom: 12px;
}

.lead {
    margin: 0;
    color: var(--muted);
    max-width: 720px;
    line-height: 1.6;
}

.status-card,
.panel,
.stat {
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.status-card {
    padding: 22px;
}

.status-label {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.status-value {
    margin-top: 12px;
    font-size: 28px;
    font-weight: 700;
}

.status-note {
    margin-top: 10px;
    color: var(--muted);
    line-height: 1.5;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.stat {
    padding: 18px;
}

.stat span {
    display: block;
    color: var(--muted);
    margin-bottom: 10px;
}

.stat strong {
    font-size: 28px;
}

.stat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.copy-status {
    margin-top: 8px;
    min-height: 18px;
    color: var(--muted);
    font-size: 13px;
}

.panel {
    padding: 20px;
    margin-bottom: 20px;
}

.signal-chart-panel {
    margin-top: 0;
    padding: 0 0 20px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.content.signal-detail-content > .signal-chart-panel {
    margin-top: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    min-height: 100vh;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body:has(.content.signal-detail-content) .scroll-top-button {
    display: none !important;
}

.strategy-panel {
    padding: 18px;
}

.strategy-tabs-shell {
    position: relative;
}

.strategy-switcher {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
    position: relative;
    z-index: 2;
}

.strategy-shared-controls {
    display: flex;
    align-items: center;
    margin: 0 0 16px 18px;
}

.strategy-card-shell {
    position: relative;
    isolation: isolate;
}

.strategy-card-shell.active {
    z-index: 3;
}

.strategy-card {
    position: relative;
    z-index: 1;
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 56px 18px 18px !important;
    border-radius: 18px 18px 16px 16px !important;
    border: 1px solid var(--line) !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015)),
        rgba(12, 16, 22, 0.92) !important;
    color: var(--text) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.03),
        0 14px 30px rgba(0,0,0,0.24);
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.strategy-card:hover {
    border-color: rgba(255,255,255,0.14) !important;
    transform: translateY(-1px);
}

.strategy-card.active {
    border-color: rgba(61, 220, 151, 0.34) !important;
    box-shadow:
        inset 0 0 34px rgba(61, 220, 151, 0.10),
        inset 0 0 0 1px rgba(61, 220, 151, 0.12),
        0 18px 34px rgba(0,0,0,0.28);
    background:
        linear-gradient(180deg, rgba(61, 220, 151, 0.10), rgba(61, 220, 151, 0.035)),
        rgba(12, 20, 20, 0.94) !important;
    z-index: 3;
}

.strategy-card-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.strategy-card-title-split {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    width: max-content;
}

.strategy-card-title-number {
    white-space: nowrap;
}

.strategy-card-count {
    position: absolute;
    right: 22px;
    bottom: 14px;
    min-width: 24px;
    text-align: right;
    color: #f3f7ff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    text-shadow: 0 1px 8px rgba(0,0,0,0.38);
}

.strategy-card-count.hidden {
    display: none;
}

.strategy-card-info {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 5;
    width: 19px;
    min-width: 19px !important;
    height: 19px;
    padding: 0 !important;
    display: grid;
    place-items: center;
    pointer-events: auto;
    border-radius: 7px;
    background: linear-gradient(135deg, rgba(255, 73, 122, 0.92), rgba(255, 35, 86, 0.92));
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 5px 10px rgba(255, 53, 100, 0.24);
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease, opacity 0.16s ease;
}

.strategy-card-shell.active .strategy-card-info {
    opacity: 1;
    filter: none;
}

.strategy-card-info:hover {
    transform: translateY(-1px) scale(1.06);
    box-shadow: 0 10px 20px rgba(255, 53, 100, 0.38);
    filter: brightness(1.08);
}

.strategy-card-info:active {
    transform: translateY(0) scale(0.96);
    box-shadow: 0 6px 12px rgba(255, 53, 100, 0.24);
    filter: brightness(0.96);
}

.strategy-3-filter-panel {
    display: grid;
    grid-template-columns: max-content 268px 290px;
    gap: 8px;
    align-items: flex-start;
    justify-content: flex-start;
    width: max-content;
    max-width: 100%;
    min-width: 0;
}

.strategy-filter-box {
    width: auto;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid rgba(120, 168, 255, 0.14);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.36);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
    min-width: 0;
}

.strategy-timeframe-picker {
    display: grid;
    grid-template-columns: repeat(4, 62px);
    justify-content: start;
    justify-items: start;
    gap: 8px 4px;
}

.strategy-touch-field,
.strategy-level-mode-field,
.strategy-timeframe-field,
.strategy-level-distance-field,
.strategy-manipulation-field {
    color: var(--text);
    display: block;
    font-size: 14px;
    min-width: 0;
}

.strategy-touch-field {
    min-width: 0;
}

.strategy-level-mode-field {
    width: max-content;
    min-width: 146px;
    padding: 12px 14px;
}

.strategy-timeframe-field {
    min-width: 0;
}

.strategy-level-distance-field,
.strategy-manipulation-field {
    grid-row: 2;
    min-width: 98px;
    padding: 7px 8px;
    border-radius: 8px;
}

.strategy-manipulation-field {
    grid-column: 3;
    justify-self: start;
    margin-left: 25px;
}

.strategy-level-distance-field {
    grid-column: 3;
    justify-self: start;
    margin-left: 150px;
}

.strategy-level-distance-control,
.strategy-manipulation-control {
    align-items: center;
    display: grid;
    grid-template-columns: 14px minmax(74px, 1fr);
    gap: 6px;
    margin: 0;
}

.strategy-level-distance-control input,
.strategy-manipulation-control input {
    width: 13px;
    min-width: 13px;
    height: 13px;
    margin: 0;
    padding: 0;
}

.strategy-level-distance-field .strategy-filter-title,
.strategy-manipulation-field .strategy-filter-title {
    font-size: 11px;
    margin-bottom: 5px;
}

.strategy-level-distance-field .pretty-select-trigger,
.strategy-manipulation-field .pretty-select-trigger {
    min-height: 32px;
    border-radius: 10px;
    padding: 6px 8px;
    font-size: 12px;
}

.strategy-level-distance-field .pretty-select-menu,
.strategy-manipulation-field .pretty-select-menu {
    border-radius: 12px;
    padding: 5px;
    min-width: 74px;
}

.strategy-level-distance-field .pretty-select-option,
.strategy-manipulation-field .pretty-select-option {
    grid-template-columns: minmax(28px, 1fr) 16px;
    gap: 8px;
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 12px;
}

.strategy-filter-title {
    color: var(--muted);
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
}

.strategy-touch-picker {
    display: grid;
    grid-template-columns: repeat(3, max-content);
    justify-content: start;
    justify-items: start;
    gap: 8px 9px;
}

.strategy-level-mode-picker {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: start;
    justify-items: start;
    gap: 8px;
}

.strategy-touch-option,
.strategy-level-mode-option,
.strategy-timeframe-option {
    align-items: center;
    display: inline-flex;
    justify-content: flex-start;
    gap: 6px;
    margin: 0;
    min-height: 30px;
    justify-self: start;
    width: max-content;
}

.strategy-touch-option input,
.strategy-level-mode-option input,
.strategy-timeframe-option input {
    flex: 0 0 auto;
    width: 14px;
    min-width: 14px;
    height: 14px;
    padding: 0;
    margin: 0;
    border-radius: 3px;
}

.strategy-touch-option span,
.strategy-level-mode-option span,
.strategy-timeframe-option span {
    line-height: 1.35;
    white-space: nowrap;
    font-size: 12px;
}

.strategy-scan-toggle {
    position: absolute;
    top: 15px;
    left: 17px;
    z-index: 6;
    width: 20px;
    min-width: 20px !important;
    height: 20px;
    padding: 0 !important;
    display: grid;
    place-items: center;
    border-radius: 6px;
    border: 1px solid rgba(120, 168, 255, 0.28);
    background: rgba(120, 168, 255, 0.10);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.strategy-scan-toggle::after {
    content: "";
    width: 10px;
    height: 6px;
    border-left: 2px solid transparent;
    border-bottom: 2px solid transparent;
    transform: rotate(-45deg) translate(1px, -1px);
}

.strategy-scan-toggle.on {
    border-color: rgba(76, 231, 166, 0.8);
    background: linear-gradient(135deg, #58e5a5, #31c98c);
    box-shadow:
        0 0 0 2px rgba(61, 220, 151, 0.12),
        0 8px 18px rgba(61, 220, 151, 0.18);
}

.strategy-scan-toggle.on::after {
    border-left-color: #07331f;
    border-bottom-color: #07331f;
}

.strategy-scan-toggle:hover {
    transform: translateY(-1px) scale(1.05);
}

.strategy-scan-toggle.locked {
    animation: strategyToggleLocked 0.28s ease;
}

@keyframes strategyToggleLocked {
    0%, 100% { transform: translateX(0); }
    35% { transform: translateX(-2px); }
    70% { transform: translateX(2px); }
}

.strategy-info-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
}

.strategy-info-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 10, 14, 0.66);
    backdrop-filter: blur(4px);
}

.strategy-info-dialog {
    position: relative;
    width: min(760px, calc(100vw - 32px));
    max-height: min(760px, calc(100vh - 48px));
    overflow-y: auto;
    margin: 5vh auto 0;
    padding: 22px 22px 20px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02)),
        rgba(14, 18, 24, 0.98);
    box-shadow: var(--shadow);
}

.strategy-info-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px !important;
    min-width: 34px !important;
    height: 34px;
    padding: 0 !important;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    color: var(--text);
}

.strategy-info-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.strategy-info-title {
    margin: 0 40px 12px 0;
    font-size: 28px;
}

.strategy-info-body {
    color: var(--muted);
    line-height: 1.65;
    font-size: 15px;
}

.strategy-info-body p {
    margin: 0 0 12px;
}

.strategy-info-body h3 {
    margin: 18px 0 8px;
    color: var(--text);
    font-size: 15px;
}

.strategy-info-body ol,
.strategy-info-body ul {
    margin: 0 0 14px;
    padding-left: 24px;
}

.strategy-info-body li {
    margin: 6px 0;
}

.strategy-info-body code,
.strategy-info-chip {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 7px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.08);
    color: #d8e6ff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.strategy-info-chip {
    margin: 4px 4px 0 0;
}

.strategy-workspace {
    border-radius: 20px;
    border: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.012)),
        rgba(14, 18, 24, 0.95);
    overflow: visible;
    position: relative;
    z-index: 1;
    margin-top: 0;
}

.strategy-workspace-body {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0.005)),
        rgba(18, 22, 28, 0.94);
}

.strategy-pane {
    display: none;
    padding: 18px;
    overflow: visible;
}

.strategy-pane.active {
    display: block;
}

.strategy-settings-form {
    margin: 0;
}

.strategy-settings-grid {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(240px, 300px) minmax(720px, 860px);
    gap: 20px 18px;
    align-items: start;
    max-width: 100%;
}

.strategy-4-settings-grid {
    grid-template-columns: minmax(220px, 300px) minmax(240px, 300px) minmax(160px, 220px) minmax(180px, 240px) minmax(360px, 460px);
}

.strategy-4-fvg-box {
    display: grid;
    grid-template-columns: max-content max-content max-content max-content;
    align-items: center;
    justify-content: start;
    gap: 14px 24px;
}

.strategy-4-fvg-box .strategy-timeframe-picker {
    display: contents;
}

.strategy-4-fvg-box .strategy-4-fvg-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: max-content;
    margin: 0;
    grid-column: 1;
    grid-row: 1;
}

.strategy-4-fvg-box .strategy-4-fvg-toggle input {
    flex: 0 0 auto;
    width: 14px;
    min-width: 14px;
    height: 14px;
    margin: 0;
}

.strategy-4-fvg-box .strategy-4-fvg-toggle span {
    line-height: 1.35;
}

.strategy-4-fvg-box .strategy-4-fvg-filter-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: max-content;
    margin: 0;
    grid-column: 1;
    grid-row: 2;
}

.strategy-4-fvg-box .strategy-4-fvg-filter-toggle input {
    flex: 0 0 auto;
    width: 14px;
    min-width: 14px;
    height: 14px;
    margin: 0;
}

.strategy-4-fvg-box .strategy-4-fvg-filter-toggle span {
    line-height: 1.35;
}

.strategy-4-fvg-box .strategy-timeframe-option {
    min-height: auto;
}

.strategy-4-fvg-box .strategy-timeframe-option:nth-child(1) {
    grid-column: 2;
    grid-row: 1;
}

.strategy-4-fvg-box .strategy-timeframe-option:nth-child(2) {
    grid-column: 3;
    grid-row: 1;
}

.strategy-4-fvg-box .strategy-timeframe-option:nth-child(3) {
    grid-column: 4;
    grid-row: 1;
}

.strategy-4-fvg-box .strategy-timeframe-option:nth-child(4) {
    grid-column: 2;
    grid-row: 2;
}

.strategy-4-fvg-box .strategy-timeframe-option:nth-child(5) {
    grid-column: 3;
    grid-row: 2;
}

.strategy-4-fvg-box .strategy-timeframe-option:nth-child(6) {
    grid-column: 4;
    grid-row: 2;
}

.strategy-settings-actions {
    margin-top: 34px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 18px;
}

.strategy-settings-actions .compact-button {
    grid-column: 2;
    justify-self: center;
}

.strategy-settings-actions .scan-inline-status {
    grid-column: 1;
    justify-self: center;
    max-width: 100%;
}

.volume-drag-control {
    position: relative;
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.02));
    color: #eaf5ff;
    padding: 0 26px 0 18px;
    font: inherit;
    cursor: ew-resize;
    user-select: none;
    touch-action: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.volume-drag-control:hover,
.volume-drag-control.dragging {
    background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.026));
    border-color: rgba(61, 220, 151, 0.28);
    box-shadow:
        0 10px 22px rgba(0,0,0,0.18),
        inset 0 0 0 1px rgba(61, 220, 151, 0.1);
}

.volume-drag-control:focus {
    outline: none;
}

.volume-drag-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--volume-progress, 0%);
    border-radius: inherit;
    background: rgba(255, 255, 255, 0.18);
    pointer-events: none;
    transition: width 0.08s linear;
}

.volume-drag-control.dragging .volume-drag-fill {
    transition: none;
}

.volume-drag-left,
.volume-drag-value,
.volume-drag-arrows {
    position: relative;
    z-index: 1;
}

.volume-drag-left {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: var(--text);
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0;
}

.volume-drag-icon {
    width: 16px;
    height: 13px;
    display: inline-flex;
    align-items: flex-end;
    gap: 4px;
    flex: 0 0 auto;
}

.volume-drag-icon i {
    display: block;
    width: 2px;
    border-radius: 999px;
    background: rgba(238, 238, 238, 0.92);
}

.volume-drag-icon i:nth-child(1) {
    height: 5px;
}

.volume-drag-icon i:nth-child(2) {
    height: 9px;
}

.volume-drag-icon i:nth-child(3) {
    height: 13px;
}

.volume-drag-value {
    margin-left: auto;
    color: var(--text);
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    text-align: right;
    min-width: 82px;
    letter-spacing: 0;
}

.volume-drag-arrows {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    transform: translate(-50%, -50%);
    opacity: 0;
    color: #f8fbff;
    font-size: 18px;
    line-height: 1;
    pointer-events: none;
    transition: opacity 0.12s ease;
}

.volume-drag-control:hover .volume-drag-arrows,
.volume-drag-control.dragging .volume-drag-arrows {
    opacity: 1;
}

.strategy-auto-scan-toggle {
    width: auto;
    grid-column: 1;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: #cfe0ff;
    font-size: 14px;
    white-space: nowrap;
}

.strategy-auto-scan-toggle input {
    width: 18px;
    height: 18px;
    min-height: 18px;
    margin: 0;
    accent-color: var(--accent);
}

.strategy-results-panel {
    padding: 8px 0 0;
}

.strategy-results-head {
    display: block;
    position: relative;
    margin-bottom: 16px;
}

.strategy-results-head-top {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(220px, auto) minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    min-height: 50px;
    padding: 10px 18px 0;
}

.strategy-results-head-top > .results-open-list-button {
    justify-self: start;
}

.strategy-results-head-top > .strategy-results-title {
    grid-column: 2;
    justify-self: center;
}

.strategy-results-head-top > .strategy-results-copy {
    grid-column: 3;
    justify-self: end;
}

.strategy-results-head-top > .strategy-results-actions {
    grid-column: 3;
    justify-self: end;
}

.strategy-results-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    min-width: 0;
    max-width: 100%;
}

.strategy-results-clear-scope {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    color: #e8f2ff;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}

.strategy-results-clear-scope input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.strategy-results-clear-scope span:last-child {
    display: inline-block;
    transform: translateY(1px);
}

.results-open-list-button {
    position: relative;
    width: auto;
    min-width: 158px;
    height: 38px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #d8e6ff;
    font-weight: 600;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.results-open-list-button:hover:not(:disabled) {
    background: rgba(108, 232, 176, 0.12);
    border-color: rgba(108, 232, 176, 0.28);
    transform: translateY(-1px);
}

.results-open-list-button:active:not(:disabled) {
    transform: translateY(0);
}

.results-open-list-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.strategy-results-title {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
}

.strategy-results-copy {
    position: relative;
    width: 38px !important;
    min-width: 38px !important;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
    color: #d8e6ff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.strategy-results-copy:hover:not(:disabled) {
    background: rgba(108, 232, 176, 0.14);
    border-color: rgba(108, 232, 176, 0.32);
    transform: translateY(-1px);
}

.strategy-results-copy:active:not(:disabled) {
    transform: translateY(0);
}

.strategy-results-copy:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.strategy-results-copy-icon {
    display: block;
    font-size: 17px;
    line-height: 1;
}

.strategy-results-clear {
    width: auto;
    min-width: 128px;
    height: 32px;
    padding: 0 14px;
    border-radius: 9px;
    border: 1px solid rgba(255, 95, 103, 0.42);
    background: rgba(115, 42, 48, 0.42);
    color: #f4d8db;
    font-size: 12px;
    font-weight: 700;
    box-shadow: none;
}

.strategy-results-clear:hover:not(:disabled) {
    border-color: rgba(255, 120, 128, 0.62);
    background: rgba(130, 47, 54, 0.58);
    transform: translateY(-1px);
}

.strategy-results-clear:active:not(:disabled) {
    transform: translateY(0);
}

.strategy-results-status {
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    line-height: 1;
    white-space: nowrap;
}

.strategy-results-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.strategy-result-column-title {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #d8e6ff;
}

.strategy-result-divider {
    align-self: stretch;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
}

.pending-page-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.pending-page-head h1 {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    font-size: 30px;
    margin-bottom: 0;
}

.pending-page-head .lead {
    font-size: 15px;
    line-height: 1.45;
    max-width: none;
}

.pending-auto-check-row {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.pending-auto-check-toggle {
    width: 38px;
    min-width: 38px;
    height: 22px;
    padding: 0 4px;
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(255, 107, 107, 0.52);
    background: linear-gradient(180deg, rgba(255, 107, 107, 0.36), rgba(120, 34, 42, 0.74));
    color: #fff;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 5px 11px rgba(0,0,0,0.22);
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.pending-auto-check-toggle.on {
    border-color: rgba(61, 220, 151, 0.58);
    background: linear-gradient(180deg, rgba(61, 220, 151, 0.46), rgba(20, 115, 78, 0.78));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 5px 11px rgba(0,0,0,0.22), 0 0 14px rgba(61, 220, 151, 0.12);
}

.pending-auto-check-toggle:disabled {
    opacity: 0.68;
    cursor: default;
}

.pending-auto-check-toggle.failed {
    border-color: rgba(255, 210, 90, 0.7);
}

.pending-auto-check-toggle.scanning {
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.14),
        0 5px 11px rgba(0,0,0,0.22),
        0 0 0 3px rgba(61, 220, 151, 0.08);
}

.pending-auto-check-thumb {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: linear-gradient(180deg, #eef3f8, #aab7c6);
    border: 1px solid rgba(255,255,255,0.7);
    box-shadow: 0 2px 6px rgba(0,0,0,0.32);
    transition: transform 0.18s ease;
}

.pending-auto-check-toggle.on .pending-auto-check-thumb {
    transform: translateX(-16px);
}

.pending-auto-check-text {
    position: relative;
    z-index: 1;
    font-size: 7px;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0,0,0,0.30);
}

.pending-auto-check-on {
    opacity: 0;
}

.pending-auto-check-toggle.on .pending-auto-check-on {
    opacity: 1;
}

.pending-auto-check-toggle.on .pending-auto-check-off {
    opacity: 0;
}

.pending-scan-spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(120, 168, 255, 0.24);
    border-top-color: #3ddc97;
    border-right-color: rgba(61, 220, 151, 0.72);
    box-shadow: 0 0 12px rgba(61, 220, 151, 0.15);
    animation: pending-scan-spin 0.75s linear infinite;
}

.pending-scan-spinner[hidden] {
    display: none;
}

@keyframes pending-scan-spin {
    to {
        transform: rotate(360deg);
    }
}

.favorites-page-head {
    margin-bottom: 14px;
}

.favorites-page-head h1 {
    font-size: 30px;
    margin-bottom: 8px;
}

.favorites-page-head .lead {
    font-size: 15px;
    line-height: 1.45;
}

.favorites-panel {
    padding: 14px 16px 16px;
    border-radius: 16px;
}

.favorites-panel-head {
    margin-bottom: 12px;
}

.favorites-panel-head h2 {
    font-size: 21px;
    line-height: 1.15;
}

.favorites-table-wrap th:last-child,
.favorites-table-wrap td:last-child {
    width: 1%;
    text-align: right;
}

.favorites-table-wrap {
    max-width: 100%;
    overflow-x: hidden;
}

.favorites-table-wrap table {
    width: min(940px, 100%);
    min-width: 0;
    max-width: 100%;
    table-layout: fixed;
    font-size: 14px;
}

.favorites-table-wrap th,
.favorites-table-wrap td {
    min-width: 0;
    padding: 7px 10px;
}

.favorites-table-wrap th {
    font-size: 12px;
}

.favorites-table-wrap tbody tr {
    height: 34px;
}

.favorites-table-wrap tbody tr,
.pending-table-wrap tbody tr {
    transition: background 0.16s ease, box-shadow 0.16s ease;
}

.favorites-table-wrap tbody tr:hover td:not(:last-child),
.pending-table-wrap tbody tr:hover td:not(:last-child) {
    background: rgba(120, 168, 255, 0.065);
}

.favorites-table-wrap tbody tr.active td:not(:last-child),
.pending-table-wrap tbody tr.active td:not(:last-child) {
    background: rgba(120, 168, 255, 0.12);
}

.favorites-table-wrap tbody tr.active:hover td:not(:last-child),
.pending-table-wrap tbody tr.active:hover td:not(:last-child) {
    background: rgba(120, 168, 255, 0.16);
}

.favorites-table-wrap tbody tr.active .symbol-link,
.pending-table-wrap tbody tr.active .symbol-link {
    color: #9fc3ff;
}

.favorites-table-wrap tbody tr.active td:first-child,
.pending-table-wrap tbody tr.active td:first-child {
    box-shadow: inset 1px 0 0 rgba(120, 168, 255, 0.34);
}

.pending-table-wrap tbody tr.canceled td:not(:last-child) {
    background: rgba(255, 107, 107, 0.10);
}

.pending-table-wrap tbody tr.canceled:hover td:not(:last-child) {
    background: rgba(255, 107, 107, 0.15);
}

.pending-table-wrap tbody tr.canceled .symbol-link,
.pending-table-wrap tbody tr.canceled td:nth-child(5) {
    color: #ffb4b4;
}

.pending-table-wrap tbody tr.canceled.active td:not(:last-child) {
    background: linear-gradient(90deg, rgba(255, 107, 107, 0.16), rgba(120, 168, 255, 0.10));
}

.favorites-table-wrap td:last-child,
.pending-table-wrap td:last-child {
    background: transparent !important;
}

.view-state-col,
.view-state-head,
.view-state-cell {
    width: 30px;
}

.favorite-state-col,
.favorite-state-head,
.favorite-state-cell,
.favorite-alert-col,
.favorite-alert-head,
.favorite-alert-cell {
    width: 28px;
}

.view-state-head,
.view-state-cell,
.favorite-state-head,
.favorite-state-cell,
.favorite-alert-head,
.favorite-alert-cell {
    text-align: center;
}

.row-favorite-button {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: rgba(143, 161, 186, 0.46);
    font-size: 16px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    transition: color 0.16s ease, transform 0.16s ease, text-shadow 0.16s ease, opacity 0.16s ease;
}

.row-favorite-button:hover {
    color: rgba(255, 216, 94, 0.82);
    transform: translateY(-1px);
}

.row-favorite-button.active {
    color: #ffd84f;
    text-shadow: 0 0 8px rgba(255, 216, 79, 0.28);
}

.row-favorite-button.failed {
    color: #ff7b7b;
}

.row-favorite-button:disabled {
    cursor: default;
    opacity: 0.65;
}

.view-eye {
    position: relative;
    display: inline-block;
    width: 19px;
    height: 15px;
    vertical-align: middle;
    opacity: 0.9;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 19px 15px;
}

.view-eye.open {
    background-image: url("data:image/svg+xml,%3Csvg width='56' height='44' viewBox='0 0 56 44' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%239fc3ff' stroke-width='3.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 24C12 14 20 9 28 9s16 5 22 15c-6 10-14 15-22 15S12 34 6 24Z'/%3E%3Cpath d='M10 15 6 8'/%3E%3Cpath d='M18 10 16 3'/%3E%3Cpath d='M28 8V1'/%3E%3Cpath d='M38 10 40 3'/%3E%3Cpath d='M46 15 50 8'/%3E%3C/g%3E%3Ccircle cx='28' cy='24' r='8.5' fill='none' stroke='%233ddc97' stroke-width='3'/%3E%3Ccircle cx='28' cy='24' r='3.2' fill='%233ddc97'/%3E%3C/svg%3E");
}

.view-eye.closed {
    opacity: 0.82;
    background-image: url("data:image/svg+xml,%3Csvg width='56' height='44' viewBox='0 0 56 44' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%239fc3ff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 18C14 28 21 33 28 33s14-5 20-15'/%3E%3Cpath d='M12 24 7 30'/%3E%3Cpath d='M20 30 17 38'/%3E%3Cpath d='M28 33v8'/%3E%3Cpath d='M36 30 39 38'/%3E%3Cpath d='M44 24 49 30'/%3E%3C/g%3E%3C/svg%3E");
}

.view-eye::before,
.view-eye::after {
    content: "";
    display: none;
}

.favorite-alert-bell {
    display: inline-grid;
    place-items: center;
    width: 17px;
    height: 17px;
    color: #ffd83d;
    font-size: 14px;
    line-height: 1;
    text-shadow: 0 0 8px rgba(255, 216, 61, 0.28), 0 1px 3px rgba(0, 0, 0, 0.6);
}

.signal-sidepanel-row .view-eye {
    flex: 0 0 19px;
}

.favorites-table-wrap .symbol-link {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
    white-space: nowrap;
    font-size: 14px;
}

.favorites-col-symbol {
    width: 118px;
}

.favorites-col-package {
    width: 150px;
}

.favorites-col-volume {
    width: 92px;
}

.favorites-col-updated {
    width: 170px;
}

.favorites-col-action {
    width: 104px;
}

.favorites-table-wrap .pending-delete-button {
    min-width: 62px;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 8px;
    font-size: 12px;
}

.favorites-table-wrap td:nth-child(2),
.favorites-table-wrap td:nth-child(4),
.favorites-table-wrap td:nth-child(6) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pending-panel {
    padding: 14px 16px 16px;
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.012)),
        #141920;
}

.pending-panel-head {
    margin-bottom: 12px;
}

.pending-panel-head h2 {
    font-size: 21px;
    line-height: 1.15;
}

.pending-strategy-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 260px));
    gap: 10px;
    align-items: end;
    margin: 2px 0 14px;
}

.pending-strategy-tab {
    width: auto;
    min-width: 0;
    min-height: 40px;
    padding: 9px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 10px 10px 0 0;
    border: 1px solid var(--line);
    border-bottom-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.035);
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.pending-strategy-tab strong {
    min-width: 22px;
    color: var(--text);
    font-size: 13px;
    text-align: center;
}

.pending-strategy-tab.active {
    color: var(--text);
    border-color: rgba(120, 168, 255, 0.28);
    background: rgba(120, 168, 255, 0.10);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.pending-head-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin-left: 10px;
}

.pending-clear-button,
.pending-delete-button {
    min-width: auto;
    width: auto;
    white-space: nowrap;
    border-radius: 10px;
}

.pending-clear-button {
    min-height: 34px;
    padding: 7px 12px;
    font-size: 13px;
}

.pending-delete-button {
    min-width: 62px;
    min-height: 28px;
    padding: 5px 9px;
    font-size: 12px;
}

.pending-table-wrap th:last-child,
.pending-table-wrap td:last-child {
    width: 1%;
    text-align: right;
}

.pending-table-wrap {
    max-width: 100%;
    overflow-x: hidden;
}

.pending-table-wrap table {
    width: min(1120px, 100%);
    min-width: 0;
    max-width: 100%;
    table-layout: fixed;
    font-size: 14px;
}

.pending-table-wrap th,
.pending-table-wrap td {
    min-width: 0;
    padding: 8px 8px;
}

.pending-table-wrap th {
    font-size: 12px;
}

.pending-table-wrap tbody tr {
    height: 40px;
}

.pending-table-wrap .symbol-link {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
    white-space: nowrap;
    font-size: 14px;
}

.pending-col-symbol {
    width: 118px;
}

.pending-col-direction {
    width: 96px;
}

.pending-col-package {
    width: 130px;
}

.pending-col-volume {
    width: 92px;
}

.pending-col-status {
    width: 238px;
}

.pending-col-updated {
    width: 150px;
}

.pending-col-action {
    width: 150px;
}

.pending-table-wrap td:nth-child(2),
.pending-table-wrap td:nth-child(4),
.pending-table-wrap td:nth-child(5),
.pending-table-wrap td:nth-child(7),
.pending-table-wrap td:nth-child(8) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pending-table-wrap th:nth-child(4),
.pending-table-wrap td:nth-child(4) {
    padding-left: 18px;
}

.strategy-result-row {
    transition: background 0.16s ease, box-shadow 0.16s ease;
}

.strategy-results-panel .strategy-result-row td {
    height: 34px;
    padding: 7px 10px;
}

.strategy-results-panel .strategy-result-row .symbol-link,
.strategy-result-package,
.strategy-results-panel .strategy-result-row td:last-child {
    font-weight: 400;
}

.strategy-result-row.active {
    background: rgba(120, 168, 255, 0.12);
    box-shadow: inset 1px 0 0 rgba(120, 168, 255, 0.34);
}

.strategy-result-row:hover {
    background: rgba(120, 168, 255, 0.065);
}

.strategy-result-row.active:hover {
    background: rgba(120, 168, 255, 0.16);
}

.strategy-result-row.active .symbol-link {
    color: #9fc3ff;
}

.strategy-results-panel th:nth-child(2),
.strategy-result-package {
    text-align: center;
}

.strategy-results-panel th:last-child,
.strategy-results-panel td:last-child {
    text-align: right;
    white-space: nowrap;
}

.strategy-result-package {
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.native-select-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    border: 0 !important;
}

.pretty-select {
    position: relative;
    width: 100%;
}

.pretty-select-trigger {
    width: 100%;
    min-height: 48px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px 16px;
    align-items: center;
    gap: 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.02));
    color: var(--text);
    padding: 12px 16px;
    font: inherit;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.pretty-select.no-meta .pretty-select-trigger {
    grid-template-columns: minmax(0, 1fr) 16px;
}

.pretty-select.no-meta .pretty-select-trigger-meta {
    display: none;
}

.pretty-select-trigger:hover {
    border-color: rgba(255,255,255,0.16);
    box-shadow: 0 10px 22px rgba(0,0,0,0.18);
}

.pretty-select.open .pretty-select-trigger {
    border-color: rgba(61, 220, 151, 0.28);
    box-shadow: 0 14px 26px rgba(0,0,0,0.2), inset 0 0 0 1px rgba(61, 220, 151, 0.1);
}

.pretty-select-value {
    text-align: left;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pretty-select-trigger-meta {
    color: var(--text);
    font-weight: 600;
    text-align: center;
}

.pretty-select-arrow {
    color: var(--muted);
    font-size: 12px;
    text-align: right;
    transition: transform 0.18s ease, color 0.18s ease;
}

.pretty-select.open .pretty-select-arrow {
    transform: rotate(180deg);
    color: var(--text);
}

.pretty-select-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 30;
    padding: 8px;
    border-radius: 18px;
    border: 1px solid rgba(61, 220, 151, 0.16);
    background: linear-gradient(180deg, rgba(18, 24, 33, 0.98), rgba(12, 16, 22, 0.98));
    box-shadow: 0 18px 40px rgba(0,0,0,0.34);
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.pretty-select.open-up .pretty-select-menu {
    top: auto;
    bottom: calc(100% + 8px);
}

.pretty-select.open .pretty-select-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.pretty-select-option {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px 16px;
    align-items: center;
    gap: 12px;
    border: 0;
    background: transparent;
    color: var(--text);
    border-radius: 12px;
    padding: 11px 12px;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.pretty-select.no-meta .pretty-select-option {
    grid-template-columns: minmax(0, 1fr) 16px;
}

.pretty-select.no-meta .pretty-select-option-meta {
    display: none;
}

.pretty-select-option-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pretty-select-option-meta {
    color: var(--text);
    font-weight: 600;
    text-align: center;
}

.pretty-select-option:hover {
    background: rgba(255,255,255,0.06);
    transform: translateX(1px);
}

.pretty-select-option.active {
    background: rgba(61, 220, 151, 0.12);
    color: #bff7df;
}

.pretty-select-option-check {
    color: #69f0ae;
    font-size: 12px;
    text-align: right;
    opacity: 0;
    transition: opacity 0.16s ease;
}

.pretty-select-option.active .pretty-select-option-check {
    opacity: 1;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.packages {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
}

.package-chip {
    padding: 14px;
    border-radius: 16px;
    background: var(--panel-2);
    border: 1px solid var(--line);
}

.package-chip span {
    display: block;
    color: var(--muted);
    margin-bottom: 8px;
}

.package-chip strong {
    font-size: 24px;
}

.package-link {
    display: block;
    padding: 14px;
    border-radius: 16px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    text-decoration: none;
    color: var(--text);
}

.package-link span {
    display: block;
    color: var(--muted);
    margin-bottom: 8px;
}

.package-link strong {
    font-size: 24px;
}

.package-link-active {
    border-color: rgba(61, 220, 151, 0.45);
    box-shadow: inset 0 0 0 1px rgba(61, 220, 151, 0.18);
}

.binance-status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.binance-status-panel,
.binance-sync-panel {
    margin-bottom: 0;
}

.binance-sync-panel form {
    margin-bottom: 14px;
}

.binance-errors-panel {
    margin-top: 18px;
}

.binance-errors-panel .panel-head {
    align-items: center;
}

.binance-errors-list {
    display: grid;
    gap: 5px;
}

.binance-errors-list.hidden,
#binance-errors-empty.hidden {
    display: none;
}

.binance-error-item {
    display: grid;
    grid-template-columns: 150px minmax(180px, 1fr) minmax(220px, 2fr) 118px;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border: 1px solid rgba(255, 107, 107, 0.22);
    border-radius: 7px;
    background: rgba(255, 107, 107, 0.055);
}

.binance-error-top {
    display: contents;
}

.binance-error-source {
    color: #ffb4b4;
    font-weight: 800;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.binance-error-time,
.binance-error-endpoint {
    color: var(--muted);
    font-size: 11px;
}

.binance-error-time {
    justify-self: end;
    white-space: nowrap;
}

.binance-error-endpoint {
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.25;
}

.binance-error-message {
    color: var(--text);
    font-size: 13px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.symbols-page-head {
    margin-bottom: 14px;
}

.symbols-page-head h1 {
    margin-bottom: 8px;
}

.symbols-page-head .lead {
    font-size: 15px;
}

.symbols-package-panel,
.symbols-tool-panel,
.symbols-list-panel {
    padding: 16px 18px;
    margin-bottom: 16px;
    border-radius: 16px;
}

.symbols-panel-head {
    margin-bottom: 12px;
}

.symbols-panel-head h2 {
    font-size: 20px;
}

.symbols-packages {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.symbols-package-link {
    min-width: 132px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    text-decoration: none;
    color: var(--text);
}

.symbols-package-link span {
    color: #cfe0ff;
    font-size: 14px;
}

.symbols-package-link strong {
    font-size: 20px;
}

.symbols-package-create-button {
    width: 52px;
    min-width: 52px;
    height: 52px;
    padding: 0;
    position: relative;
    border-radius: 14px;
    border: 1px solid rgba(61, 220, 151, 0.36);
    background: rgba(61, 220, 151, 0.1);
    box-shadow: inset 0 0 0 1px rgba(61, 220, 151, 0.08);
}

.symbols-package-create-button::before,
.symbols-package-create-button::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 24px;
    height: 3px;
    border-radius: 999px;
    background: var(--accent);
    transform: translate(-50%, -50%);
}

.symbols-package-create-button::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.symbols-package-create-button:hover {
    transform: translateY(-1px);
    border-color: rgba(105, 240, 174, 0.76);
    box-shadow:
        inset 0 0 0 1px rgba(105, 240, 174, 0.16),
        0 10px 26px rgba(61, 220, 151, 0.16);
}

.symbols-package-delete-button {
    width: auto;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
}

.symbols-package-modal[hidden] {
    display: none;
}

.symbols-package-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 24px;
}

.symbols-package-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 8, 13, 0.72);
    backdrop-filter: blur(8px);
}

.symbols-package-dialog {
    position: relative;
    width: min(440px, 100%);
    padding: 18px;
    border-radius: 16px;
    border: 1px solid rgba(120, 168, 255, 0.18);
    background: linear-gradient(180deg, rgba(29, 36, 48, 0.98), rgba(16, 21, 29, 0.98));
    box-shadow: var(--shadow);
}

.symbols-package-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.symbols-package-dialog-head h2 {
    margin: 0;
    font-size: 20px;
}

.symbols-package-dialog-close {
    width: 34px;
    min-width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    color: #cfe0ff;
}

.symbols-package-dialog label {
    margin-bottom: 14px;
    font-size: 13px;
}

.symbols-tools-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.symbols-tool-panel {
    padding: 14px 16px;
    border-radius: 14px;
}

.symbols-tool-panel label {
    margin-bottom: 8px;
    font-size: 13px;
}

.symbols-tool-panel input,
.symbols-tool-panel textarea {
    min-height: 36px;
    padding: 8px 11px;
    border-radius: 10px;
}

.symbols-tool-panel textarea {
    min-height: 78px;
}

.symbols-tool-panel button[type="submit"] {
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 10px;
}

.symbols-list-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
}

.symbols-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 44px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

.symbols-list-main {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.symbols-list-main strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
}

.symbols-list-id {
    color: var(--muted);
    font-size: 12px;
}

.symbols-list-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.symbols-list-actions form {
    margin: 0;
}

.mini-symbol-button {
    width: auto;
    min-width: 58px;
    padding: 7px 9px;
    border-radius: 10px;
    font-size: 12px;
}

.symbols-empty {
    grid-column: 1 / -1;
    color: var(--muted);
    padding: 8px 0;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.scan-target {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border-radius: 18px;
    background: var(--panel-2);
    border: 1px solid var(--line);
}

.scan-target-label {
    color: var(--muted);
    margin-bottom: 8px;
}

.scan-target-name {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.scan-target-meta {
    color: var(--muted);
}

.scan-target-submeta {
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
}

.scan-target-action {
    width: 280px;
    flex-shrink: 0;
}

.stacked {
    max-width: 760px;
}

.settings-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
    margin-top: 2px;
}

.settings-actions button {
    min-height: 48px;
}

.settings-trading-panel .settings-actions {
    grid-template-columns: minmax(0, 1fr);
}

.settings-live-orders-row {
    padding: 12px 14px;
    border: 1px solid rgba(248, 113, 113, 0.34);
    border-radius: 12px;
    background: rgba(127, 29, 29, 0.12);
}

.settings-field {
    margin-bottom: 14px;
}

.settings-field-label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 14px;
}

.settings-mode-segment {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 5px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    background: rgba(8, 12, 18, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.settings-mode-option {
    position: relative;
    margin: 0;
}

.settings-mode-option input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.settings-mode-option span {
    display: flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #9fb2c9;
    font-size: 13px;
    font-weight: 800;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.settings-mode-option input:checked + span {
    border-color: rgba(105, 240, 174, 0.46);
    background: linear-gradient(135deg, rgba(38, 166, 110, 0.32), rgba(20, 94, 67, 0.42));
    color: #effff7;
    box-shadow: 0 10px 26px rgba(61, 220, 151, 0.12);
}

.settings-mode-option:hover span {
    border-color: rgba(148, 163, 184, 0.32);
    color: #f4f8ff;
}

label {
    display: block;
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 14px;
}

input,
textarea,
select,
button {
    width: 100%;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.04);
    color: var(--text);
    padding: 12px 14px;
    font: inherit;
}

textarea {
    resize: vertical;
}

button {
    cursor: pointer;
    background: linear-gradient(135deg, #69f0ae, #3ddc97);
    color: #04120b;
    font-weight: 700;
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease, border-color 0.16s ease;
}

button:disabled {
    opacity: 0.48;
    cursor: default;
    pointer-events: auto;
}

button:not(:disabled):not(.tf-button):not(.indicator-main-button):not(.indicator-settings-button):not(.chart-mode-button):not(.scroll-top-button):not(.favorite-star-button):not(.row-favorite-button):not(.right-drawer-favorite):not(.right-drawer-symbol-link):not(.right-drawer-tool-button):not(.right-drawer-list-top):not(.signal-close-button):not(.sidebar-pin-button):not(.right-drawer-toggle):not(.volume-drag-control):not(.strategy-card):not(.strategy-card-info):not(.strategy-scan-toggle):not(.find-pattern-button):not(.find-pattern-visibility-button):not(.chart-tool-button):not(.chart-alert-tool-button):not(.chart-drawing-tool-button):not(.chart-drawing-settings-tab):not(.terminal-favorite-row):not([data-scan-trigger]):hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
    box-shadow: 0 10px 22px rgba(61, 220, 151, 0.14);
    border-color: rgba(158, 255, 207, 0.42);
}

button:not(:disabled):not(.tf-button):not(.indicator-main-button):not(.indicator-settings-button):not(.chart-mode-button):not(.scroll-top-button):not(.favorite-star-button):not(.row-favorite-button):not(.right-drawer-favorite):not(.right-drawer-symbol-link):not(.right-drawer-tool-button):not(.right-drawer-list-top):not(.signal-close-button):not(.sidebar-pin-button):not(.right-drawer-toggle):not(.volume-drag-control):not(.strategy-card):not(.strategy-card-info):not(.strategy-scan-toggle):not(.find-pattern-button):not(.find-pattern-visibility-button):not(.chart-tool-button):not(.chart-alert-tool-button):not(.chart-drawing-tool-button):not(.chart-drawing-settings-tab):not(.terminal-favorite-row):not([data-scan-trigger]):active {
    transform: translateY(0);
    filter: brightness(0.98);
    box-shadow: 0 6px 14px rgba(61, 220, 151, 0.10);
}

[data-scan-trigger]:hover:not(:disabled) {
    transform: translateY(-1px) scale(1.04);
    filter: brightness(1.06);
    border-color: rgba(158, 255, 207, 0.8);
    box-shadow:
        0 0 0 3px rgba(61, 220, 151, 0.16),
        0 14px 28px rgba(61, 220, 151, 0.22);
}

[data-scan-trigger]:active:not(:disabled) {
    transform: translateY(0) scale(1.01);
    box-shadow:
        0 0 0 2px rgba(61, 220, 151, 0.12),
        0 8px 18px rgba(61, 220, 151, 0.16);
}

[data-scan-trigger].is-scanning:hover,
[data-scan-trigger].is-scanning:active {
    transform: none;
}

[data-scan-trigger] {
    min-width: 88px;
    padding: 8px 13px;
    font-size: 13px;
}

.compact-button.scan-control-button {
    min-width: 162px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
}

.scan-control-button .scan-stop-control {
    width: 20px;
    height: 20px;
    border-radius: 7px;
    background: rgba(239, 68, 68, 0.95);
    border: 1px solid rgba(255, 168, 168, 0.85);
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.14);
    display: none;
    flex: 0 0 20px;
}

.compact-button.scan-control-button.is-scanning {
    min-width: 194px;
    padding-right: 42px;
    pointer-events: auto;
}

.scan-control-button.is-scanning .scan-stop-control {
    display: block;
    cursor: pointer;
    pointer-events: auto;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.scan-control-button.is-scanning .scan-stop-control:hover {
    filter: brightness(1.15);
    box-shadow:
        0 0 0 3px rgba(239, 68, 68, 0.2),
        0 8px 18px rgba(239, 68, 68, 0.2);
    transform: translateY(-50%) scale(1.12);
}

.icon-button {
    width: 32px !important;
    min-width: 32px !important;
    height: 32px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.08);
    color: var(--text);
    font-size: 15px;
    line-height: 1;
}

.icon-button:disabled {
    opacity: 0.45;
    cursor: default;
}

button.ghost {
    background: rgba(255,255,255,0.04);
    color: var(--text);
}

button.danger {
    background: rgba(255,107,107,0.16);
    color: #ffd4d4;
    border-color: rgba(255,107,107,0.28);
}

.compact-button {
    width: auto;
    min-width: 132px;
    padding: 12px 20px;
}

.settings-users-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 144px;
    min-height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.055);
    color: #ffffff;
    font-weight: 800;
    text-decoration: none;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08) inset,
        0 8px 22px rgba(0, 0, 0, 0.22);
}

.settings-users-link:hover,
.settings-users-link:focus {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.11);
    color: #ffffff;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.18) inset,
        0 0 0 3px rgba(255, 255, 255, 0.08),
        0 10px 24px rgba(0, 0, 0, 0.28);
}

.backup-create-form {
    display: grid;
    grid-template-columns: minmax(280px, 460px) auto;
    gap: 14px;
    align-items: end;
}

.backup-create-input-wrap {
    display: grid;
    gap: 10px;
}

.backup-create-form > .primary {
    align-self: end;
    min-height: 52px;
}

.backup-field-label {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 13px;
    letter-spacing: 0.02em;
}

.text-input {
    width: 100%;
    min-height: 52px;
    padding: 0 18px;
    border-radius: 16px;
    border: 1px solid var(--line);
    outline: none;
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
    font: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.text-input:focus {
    border-color: rgba(120, 168, 255, 0.42);
    box-shadow: 0 0 0 3px rgba(120, 168, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
}

.backup-list {
    display: grid;
    gap: 14px;
}

.backup-note {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    color: var(--muted);
    background: rgba(120, 168, 255, 0.05);
    line-height: 1.5;
}

.backup-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.025);
}

.backup-item-main {
    min-width: 0;
}

.backup-item-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.backup-item-meta {
    margin-top: 6px;
    color: var(--muted);
    font-size: 14px;
}

.backup-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.backup-download-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.backup-empty {
    padding: 20px 4px 6px;
    color: var(--muted);
    font-size: 15px;
}

.mini-button {
    width: 34px;
    min-width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 15px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
}

.checkbox input {
    width: auto;
}

.table-wrap {
    overflow-y: auto;
    overflow-x: hidden;
}

.table-action-cell {
    width: 56px;
    text-align: right;
}

.table-action-cell form {
    margin: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

th {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.symbol-link {
    color: var(--accent-2);
    text-decoration: none;
    font-weight: 600;
}

.symbol-link:hover {
    text-decoration: underline;
}

.actions {
    display: flex;
    gap: 8px;
}

.actions form {
    margin: 0;
}

.pill {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.pill.on {
    background: rgba(61, 220, 151, 0.14);
    color: #98ffd1;
}

.pill.off {
    background: rgba(255, 107, 107, 0.12);
    color: #ffc2c2;
}

.trades-page-head {
    justify-content: center;
    margin-top: -14px;
    margin-bottom: 22px;
    text-align: center;
}

.trades-page-head > div {
    width: 100%;
}

.trades-page-head h1 {
    margin: 0;
}

.trades-day-summaries {
    display: grid;
    gap: 0;
    margin: 0 -24px 26px;
}

.trades-day-summaries[hidden] {
    display: none;
}

.trades-groups {
    display: grid;
    gap: 28px;
}

.trades-day-block {
    display: grid;
    gap: 20px;
}

.trades-day-block .trades-day-summary {
    margin: 0 -24px;
}

.trades-day-summary {
    position: relative;
    min-height: 42px;
    display: flex;
    align-items: center;
    padding-left: 24px;
}

.trades-day-summary::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: rgba(70, 92, 120, 0.62);
    transform: translateY(-50%);
}

.trades-day-summary-date,
.trades-day-summary-pnl {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(70, 92, 120, 0.72);
    background: #09101a;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
}

.trades-day-summary-pnl {
    margin-left: -1px;
    min-width: 86px;
    justify-content: center;
    background: #0b1320;
}

.trades-day-summary-pnl.negative {
    color: #ff1d26;
}

.trades-day-summary-pnl.positive {
    color: #00e51b;
}

.trades-panel {
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(70, 92, 120, 0.56);
    border-radius: 8px;
    background: #09101a;
    box-shadow: none;
}

.trades-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.trades-table {
    min-width: 1040px;
    border-collapse: collapse;
    table-layout: fixed;
    background: transparent;
    color: #ffffff;
}

.trades-table th,
.trades-table td {
    height: 38px;
    padding: 0 12px;
    border-bottom: 1px solid rgba(63, 82, 107, 0.34);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    vertical-align: middle;
}

.trades-table th {
    height: 36px;
    background: #131e2f;
    color: #bcd0ec;
    text-align: left;
    font-size: 11px;
    font-weight: 800;
}

.trades-table tbody tr {
    background: #09101a;
}

.trades-table tbody tr.trades-day-row,
.trades-table tbody tr.trades-day-row:hover {
    background: #0b1019;
}

.trades-table tbody tr.trades-day-row td {
    height: 50px;
    padding: 0;
    border-bottom: 1px solid rgba(63, 82, 107, 0.34);
}

.trades-table tbody tr.trades-day-row .trades-day-summary {
    min-height: 50px;
    padding-left: 0;
}

.trades-table tbody tr.trades-day-row .trades-day-summary-date,
.trades-table tbody tr.trades-day-row .trades-day-summary-pnl {
    font-size: 13px;
}

.trades-table tbody td,
.trades-table tbody td a,
.trades-table tbody .trades-side,
.trades-table tbody .trades-income,
.trades-table tbody .trades-volume,
.trades-table tbody .trades-commission,
.trades-table tbody .trades-leverage {
    color: #ffffff;
}

.trades-table tbody tr:hover {
    background: #101a29;
}

.trades-table tbody tr.trades-row-closed {
    background: #09101a;
}

.trades-table tbody tr.trades-row-closed td {
    color: rgba(207, 228, 255, 0.72);
}

.trades-table tbody tr:last-child td {
    border-bottom: 0;
}

.trades-check-cell {
    width: 42px;
    text-align: center;
}

.trades-check {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 1px solid rgba(100, 128, 158, 0.72);
    border-radius: 3px;
    background: #142236;
    vertical-align: middle;
}

.trades-check.positive {
    border-color: #00c817;
    background: #008c0f;
}

.trades-check.negative {
    border-color: #ff2f36;
    background: #c80f18;
}

.trades-check.neutral {
    border-color: rgba(188, 208, 236, 0.5);
    background: rgba(188, 208, 236, 0.16);
}

.trades-symbol {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
}

.trades-symbol:hover {
    color: #ffb000;
}

.trades-side {
    color: #ffffff;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0;
}

.trades-side.long {
    color: #ffffff;
}

.trades-side.short {
    color: #ffffff;
}

.trades-percent {
    display: inline-flex;
    min-width: 54px;
    height: 24px;
    align-items: center;
    justify-content: center;
    padding: 0 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    color: #dbe7f5;
    font-size: 11px;
    font-weight: 500;
}

.trades-percent.negative {
    border: 1px solid #ff222b;
    background: #c80f18;
    color: #ffffff;
}

.trades-percent.positive {
    border: 1px solid #00c817;
    background: #008c0f;
    color: #ffffff;
}

.trades-row-open .trades-percent {
    min-width: 56px;
    height: 26px;
    padding: 0 8px;
    border-radius: 5px;
    background: transparent;
}

.trades-row-open .trades-percent.negative {
    border-color: #ff111b;
    background: transparent;
}

.trades-row-open .trades-percent.positive {
    border-color: #00e51b;
    background: transparent;
}

.trades-income {
    color: #ffffff;
    font-weight: 500;
}

.trades-volume,
.trades-commission,
.trades-leverage {
    color: #ffffff;
    font-weight: 500;
}

.trades-income.negative {
    color: #ffffff;
}

.trades-income.positive {
    color: #ffffff;
}

.trades-sort {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 3px;
    position: relative;
    top: 2px;
    opacity: 0.52;
}

.trades-sort::before,
.trades-sort::after {
    content: "";
    position: absolute;
    right: 0;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
}

.trades-sort::before {
    top: 1px;
    border-bottom: 4px solid currentColor;
}

.trades-sort::after {
    bottom: 1px;
    border-top: 4px solid currentColor;
}

.trades-empty-row td {
    height: 68px;
    color: var(--muted);
    text-align: center;
    font-weight: 700;
}

.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.page-head.pending-page-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
}

.page-head.pending-page-head h1 {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
}

.page-head.pending-page-head .pending-auto-check-row {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
}

.history-clear-actions {
    display: flex;
    justify-content: flex-end;
}

.history-clear-button {
    min-width: 184px;
}

.history-clear-confirm {
    position: fixed;
    inset: 0;
    z-index: 2100;
    display: grid;
    align-items: center;
    justify-items: center;
    padding: 24px;
    background: rgba(7, 10, 14, 0.42);
    backdrop-filter: blur(6px);
}

.history-clear-confirm[hidden] {
    display: none;
}

.history-clear-confirm-actions {
    width: min(310px, calc(100vw - 32px));
    min-height: 74px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid rgba(255, 107, 107, 0.36);
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(255, 107, 107, 0.08), rgba(255, 107, 107, 0.045)),
        rgba(22, 14, 19, 0.82);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
}

body.history-clear-modal-open {
    overflow: hidden;
}

.settings-unsaved-confirm {
    position: fixed;
    inset: 0;
    z-index: 2100;
    display: grid;
    align-items: center;
    justify-items: center;
    padding: 24px;
    background: rgba(7, 10, 14, 0.42);
    backdrop-filter: blur(6px);
}

.settings-unsaved-confirm[hidden] {
    display: none;
}

.settings-unsaved-confirm-box {
    width: min(360px, calc(100vw - 32px));
    min-height: 108px;
    padding: 16px;
    display: grid;
    gap: 14px;
    align-items: center;
    justify-items: center;
    border: 1px solid rgba(255, 107, 107, 0.36);
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(255, 107, 107, 0.08), rgba(255, 107, 107, 0.045)),
        rgba(22, 14, 19, 0.82);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
    color: #fff;
}

.settings-unsaved-confirm-box strong {
    font-size: 16px;
    font-weight: 900;
}

.settings-unsaved-confirm-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

body.settings-unsaved-modal-open {
    overflow: hidden;
}

.history-layout {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.history-days-panel,
.history-signals-panel {
    margin-bottom: 0;
}

.history-days-list {
    display: grid;
    gap: 10px;
}

.history-day-link {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.025);
    color: var(--text);
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.history-day-link:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
}

.history-day-link.active {
    background: rgba(61, 220, 151, 0.1);
    border-color: rgba(61, 220, 151, 0.34);
    box-shadow: inset 0 0 0 1px rgba(61, 220, 151, 0.1);
}

.history-signals-panel tbody tr {
    transition: background 0.16s ease, box-shadow 0.16s ease;
}

.history-signals-panel tbody tr:hover {
    background: rgba(120, 168, 255, 0.065);
    box-shadow: inset 1px 0 0 rgba(120, 168, 255, 0.22);
}

.history-day-date {
    font-weight: 800;
}

.history-day-meta {
    color: var(--muted);
    font-size: 13px;
}

.history-empty {
    padding: 20px 4px 6px;
    color: var(--muted);
    font-size: 15px;
}

.history-context-menu {
    position: fixed;
    z-index: 80;
    width: 150px;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid rgba(255, 107, 107, 0.24);
    background: rgba(22, 27, 34, 0.98);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.42);
}

.history-context-menu-item {
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #ffd4d4;
    text-align: left;
    font-size: 14px;
    font-weight: 700;
}

.history-context-menu-item:hover {
    background: rgba(255, 107, 107, 0.14);
}

.status-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.status-inline-text,
.status-inline-note {
    color: var(--muted);
}

.status-inline-note {
    margin-top: 12px;
}

.panel-link {
    color: var(--accent-2);
    text-decoration: none;
    font-weight: 600;
}

.panel-link:hover {
    text-decoration: underline;
}

.signal-chart-head {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 18px;
    padding-top: 10px;
    padding-left: 12px;
    padding-right: 12px;
    padding-bottom: 8px;
}

.signal-chart-mainline,
.signal-title-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    flex-wrap: wrap;
}

.signal-chart-mainline {
    min-height: 44px;
    flex-wrap: nowrap;
}

.signal-chart-mainline > :not(.signal-head-actions) {
    transform: translateY(6px);
}

.signal-chart-actions {
    position: relative;
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex-wrap: nowrap;
}

.favorite-star-button {
    width: 28px;
    min-width: 28px;
    height: 28px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(216, 230, 255, 0.58);
    line-height: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.favorite-star-button span {
    font-size: 17px;
    transform: translateY(-1px);
}

.favorite-star-button:hover {
    color: #ffe88a;
    border-color: rgba(255, 220, 71, 0.38);
    background: rgba(255, 220, 71, 0.08);
}

.favorite-star-button.active {
    color: #ffd83d;
    border-color: rgba(255, 216, 61, 0.55);
    background: rgba(255, 216, 61, 0.14);
    box-shadow: 0 0 18px rgba(255, 216, 61, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.favorite-star-button.favorite-failed {
    color: var(--danger);
    border-color: rgba(255, 107, 107, 0.5);
}

.signal-symbol-copy {
    width: 126px;
    min-width: 126px;
    max-width: 126px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text);
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.signal-symbol-copy:hover {
    color: var(--accent-2);
}

.signal-symbol-copy.copied {
    color: var(--accent);
}

.signal-symbol-copy.copy-failed {
    color: var(--danger);
}

.signal-symbol-copy + .signal-volume-badge {
    margin-left: 0;
}

.signal-volume-badge {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: 92px;
    min-width: 92px;
    max-width: 92px;
    min-height: 36px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #f5c542;
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.signal-chart-mainline > .signal-volume-badge {
    transform: translateY(8px);
}

.signal-direction-dot {
    width: 16px;
    min-width: 16px;
    height: 16px;
    display: inline-flex;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.34);
    border: 1px solid rgba(216, 230, 255, 0.28);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 0 0 4px rgba(120, 168, 255, 0.06);
}

.signal-direction-dot.long {
    background: linear-gradient(180deg, #69f0ae, #17b978);
    border-color: rgba(105, 240, 174, 0.78);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.36),
        0 0 0 4px rgba(61, 220, 151, 0.08),
        0 0 16px rgba(61, 220, 151, 0.28);
}

.signal-direction-dot.short {
    background: linear-gradient(180deg, #ff8a8a, #e04747);
    border-color: rgba(255, 107, 107, 0.78);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.32),
        0 0 0 4px rgba(255, 107, 107, 0.08),
        0 0 16px rgba(255, 107, 107, 0.24);
}

.signal-source-badge {
    width: 176px;
    min-width: 176px;
    max-width: 176px;
    color: var(--text);
    font-size: 16px;
    font-weight: 500;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.signal-head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex-wrap: wrap;
}

.signal-close-button {
    width: 27px;
    min-width: 27px;
    height: 27px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    padding: 0;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.signal-close-button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 15px;
    line-height: 1;
    transform: translateY(-1px);
}

.signal-close-button:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    color: var(--text);
    transform: translateY(-1px);
}

.signal-close-button:active {
    transform: translateY(0);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.notice-box {
    display: grid;
    gap: 6px;
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(120, 168, 255, 0.08);
    border: 1px solid rgba(120, 168, 255, 0.18);
    color: var(--text);
}

.notice-box strong {
    font-size: 14px;
}

.notice-box span {
    color: var(--muted);
    font-size: 14px;
}

.detail-item {
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--panel-2);
    border: 1px solid var(--line);
}

.detail-item span {
    display: block;
    color: var(--muted);
    margin-bottom: 8px;
}

.detail-item strong {
    font-size: 16px;
    word-break: break-word;
}

.chart-box {
    width: 100%;
    min-height: 380px;
    border-radius: 0;
    overflow: hidden;
    background: var(--panel-2);
    border: 1px solid var(--line);
}

.chart-box-hero {
    height: 100%;
    min-height: 0;
    position: relative;
}

.chart-box-hero.chart-price-scale-hover,
.chart-box-hero.chart-price-scale-active {
    cursor: ns-resize;
}

.chart-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    background: rgba(10, 14, 20, 0.26);
    backdrop-filter: blur(1px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

.chart-loading-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.chart-loading-spinner {
    position: relative;
    width: 108px;
    height: 108px;
    border-radius: 999px;
    filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.38));
}

.chart-loading-spinner span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border-radius: 999px;
    background: #d8e6ff;
    transform: rotate(calc(var(--i) * 30deg)) translateY(-44px);
    opacity: calc(0.18 + var(--i) * 0.06);
    animation: chart-spinner-fade 0.9s linear infinite;
    animation-delay: calc(var(--i) * -0.075s);
}

@keyframes chart-spinner-fade {
    0%,
    100% {
        opacity: 1;
        background: #3ddc97;
    }
    45% {
        opacity: 0.22;
        background: #8fb8ff;
    }
}

.chart-shell {
    height: 100%;
    display: grid;
    grid-template-rows: minmax(0, 1fr) 150px;
    gap: 0;
    background: #161b22;
}

.chart-pane {
    position: relative;
    min-height: 0;
}

.chart-pane-price {
    min-height: 0;
}

.chart-pane-volume {
    min-height: 120px;
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: 0;
}

.fractal-overlay,
.smart-marker-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
}

.structure-label-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 6;
}

.chart-line-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
}

.chart-alert-trace-overlay {
    position: absolute;
    inset: 0;
    z-index: 28;
    pointer-events: none;
}

.chart-alert-trace {
    position: absolute;
    height: 20px;
    transform: translateY(-10px);
    pointer-events: auto;
    cursor: ns-resize;
}

.chart-alert-trace-line {
    position: absolute;
    left: 0;
    right: 0;
    top: 10px;
    height: 0;
    border-top: 2px dashed #ffd83d;
    box-shadow: 0 0 10px rgba(255, 216, 61, 0.18);
}

.chart-alert-trace-bell {
    position: absolute;
    left: 50%;
    top: 0;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    color: #ffd83d;
    font-size: 13px;
    line-height: 1;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.52);
    transform: translate(-50%, -54%);
    filter: drop-shadow(0 0 4px rgba(255, 216, 61, 0.18));
}

.fvg-overlay,
.smart-me-overlay,
.htf-slots-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 4;
    overflow: hidden;
}

.strategy4-manipulation-slot-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.strategy3-manipulation-wick-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.strategy3-manipulation-wick-box {
    position: absolute;
    box-sizing: border-box;
    border-radius: 2px;
    overflow: visible;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

.strategy3-manipulation-wick-box-long {
    background: rgba(61, 220, 151, 0.2) !important;
}

.strategy3-manipulation-wick-box-short {
    background: rgba(255, 79, 79, 0.2) !important;
}

.strategy3-manipulation-wick-label {
    position: absolute;
    right: 3px;
    z-index: 1;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
    pointer-events: none;
}

.strategy3-manipulation-wick-label-long {
    bottom: 2px;
    color: #7dffc8;
}

.strategy3-manipulation-wick-label-short {
    top: 2px;
    color: #ff9a9a;
}

.htf-slot-box {
    position: absolute;
    box-sizing: border-box;
    border: 1px solid transparent;
    border-radius: 2px;
}

.strategy4-manipulation-slot-box {
    position: absolute;
    box-sizing: border-box;
    border: 1px solid #f5a524;
    border-radius: 2px;
    background: transparent;
}

.strategy4-manipulation-slot-label {
    position: absolute;
    left: 50%;
    top: -14px;
    transform: translateX(-50%);
    color: #ffffff;
    font-size: 9px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    pointer-events: none;
}

.htf-slot-open-line {
    position: absolute;
    height: 0;
    box-sizing: border-box;
}

.fvg-zone {
    position: absolute;
    border: 1px solid;
    border-radius: 3px;
}

.fvg-zone-bullish {
    background: rgba(61, 220, 151, 0.12);
    border-color: rgba(61, 220, 151, 0.46);
}

.fvg-zone-bearish {
    background: rgba(255, 107, 107, 0.11);
    border-color: rgba(255, 107, 107, 0.44);
}

.fvg-zone-strategy4-fvg-bullish {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.86);
    border-width: 1.5px;
}

.fvg-zone-strategy4-fvg-bearish {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.9);
    border-width: 1.5px;
}

.fvg-zone-ob-bullish {
    background: rgba(61, 220, 151, 0.08);
    border-color: rgba(61, 220, 151, 0.34);
    border-style: dotted;
}

.fvg-zone-ob-bearish {
    background: rgba(255, 107, 107, 0.08);
    border-color: rgba(255, 107, 107, 0.34);
    border-style: dotted;
}

.fvg-zone-ob-mitigated-bullish {
    background: rgba(61, 220, 151, 0.035);
    border-color: rgba(61, 220, 151, 0.22);
    border-style: dashed;
    opacity: 0.72;
}

.fvg-zone-ob-mitigated-bearish {
    background: rgba(255, 107, 107, 0.035);
    border-color: rgba(255, 107, 107, 0.22);
    border-style: dashed;
    opacity: 0.72;
}

.fvg-zone-ifvg-bullish {
    background: transparent;
    border-color: rgba(120, 168, 255, 0.72);
    border-style: dashed;
}

.fvg-zone-ifvg-bearish {
    background: transparent;
    border-color: rgba(255, 157, 74, 0.72);
    border-style: dashed;
}

.fvg-zone-fib-ote {
    background: rgba(255, 214, 0, 0.08);
    border-color: rgba(255, 214, 0, 0.28);
}

.fvg-label {
    position: absolute;
    font-size: 10px;
    line-height: 1;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.fvg-label-bullish {
    color: #49e6a2;
}

.fvg-label-bearish {
    color: #ff7c7c;
}

.fvg-label-strategy4-fvg {
    color: #ffffff;
}

.round-level-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 8;
}

.round-level-strip {
    position: absolute;
    right: 62px;
    width: 37px;
    height: 2px;
    transform: translateY(-50%);
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(120, 168, 255, 0), rgba(120, 168, 255, 0.9), rgba(81, 255, 68, 0.72));
    box-shadow: 0 0 8px rgba(120, 168, 255, 0.34);
    opacity: 0.9;
}

.structure-line-label {
    position: absolute;
    transform: translate(-50%, -100%);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.75);
}

.structure-line-label-small {
    font-size: 7px;
    font-weight: 600;
    opacity: 0.88;
}

.structure-line-label-strategy3 {
    padding: 1px 4px;
    border-radius: 999px;
    background: transparent;
    color: #ffffff !important;
    font-size: 9px;
    font-weight: 500;
    line-height: 1.1;
    opacity: 0.9;
    text-shadow: none;
}

.structure-line-label-strategy3-grouped {
    padding: 1px 4px;
    border-radius: 999px;
    background: transparent;
    color: #ffffff !important;
    font-size: 9px;
    font-weight: 500;
    text-shadow: none;
}

.structure-line-label-strategy3-compact {
    font-size: 9px;
    opacity: 0.82;
}

.structure-line-end-marker {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 999px;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 8px rgba(245, 197, 66, 0.55);
}

.fractal-triangle {
    position: absolute;
    width: 0;
    height: 0;
    transform: translateX(-50%);
}

.fractal-triangle-top {
    border-left: 2px solid transparent;
    border-right: 2px solid transparent;
    border-top: 4px solid #c8b632;
    transform: translate(-50%, -8px);
}

.fractal-triangle-bottom {
    border-left: 2px solid transparent;
    border-right: 2px solid transparent;
    border-bottom: 4px solid #c8b632;
    transform: translate(-50%, 4px);
}

.smart-marker-label {
    position: absolute;
    transform: translate(-50%, -100%);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.82);
}

.smart-marker-label.above {
    transform: translate(-50%, -10px);
}

.smart-marker-label.below {
    transform: translate(-50%, 5px);
}

.smart-marker-label.small {
    font-size: 8px;
    font-weight: 700;
    opacity: 0.88;
}

.smart-marker-label.small.above {
    transform: translate(-50%, -8px);
}

.smart-marker-label.small.below {
    transform: translate(-50%, 4px);
}

.empty-chart {
    min-height: 380px;
    display: grid;
    place-items: center;
    color: var(--muted);
}

.chart-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.chart-workspace {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    grid-template-areas:
        "chart"
        "tools";
    gap: 8px;
    align-items: stretch;
}

.chart-tool-rail {
    position: absolute;
    left: 50%;
    top: 7px;
    z-index: 2;
    width: min(612px, calc(100% - 120px));
    height: 38px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0 8px;
    overflow: hidden;
    border-radius: 3px;
    background: #1f1f1f;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.36);
    transform: translateX(-50%);
}

.chart-tools-row {
    position: relative;
    grid-area: tools;
    flex: 0 0 auto;
    min-height: 48px;
    display: flex;
    align-items: flex-start;
    padding: 0 12px;
}

.chart-drawing-tool-rail {
    position: absolute;
    left: 50%;
    top: -6px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transform: translateX(-50%);
}

.chart-drawing-tool-button {
    width: 35px;
    min-width: 35px !important;
    height: 35px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.38);
    color: #d8e3f5;
    box-shadow: none;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.chart-drawing-tool-button:hover {
    border-color: rgba(120, 168, 255, 0.38);
    background: rgba(120, 168, 255, 0.12);
    color: #ffffff;
}

.chart-drawing-tool-button.active,
.chart-drawing-tool-button[aria-pressed="true"] {
    border-color: rgba(120, 168, 255, 0.54);
    background: rgba(120, 168, 255, 0.18);
    box-shadow: 0 0 16px rgba(120, 168, 255, 0.14);
}

.chart-drawing-line-options {
    position: fixed;
    z-index: 10020;
    min-width: 112px;
    padding: 9px 10px;
    border: 1px solid rgba(120, 168, 255, 0.28);
    border-radius: 8px;
    background: rgba(13, 18, 27, 0.98);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.42);
}

.chart-drawing-line-options[hidden] {
    display: none !important;
}

.chart-drawing-line-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #d8e6ff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.chart-drawing-line-options input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: #22c55e;
}

.chart-drawing-tool-svg {
    width: 22px;
    height: 18px;
    display: block;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.35;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 3px rgba(216, 227, 245, 0.14));
}

.chart-drawing-tool-svg circle {
    fill: rgba(15, 23, 42, 0.95);
    stroke: currentColor;
}

.chart-drawing-tool-long-fill,
.chart-drawing-tool-short-fill {
    stroke: none;
}

.chart-drawing-tool-long-fill {
    fill: rgba(52, 145, 101, 0.42);
}

.chart-drawing-tool-short-fill {
    fill: rgba(168, 67, 72, 0.42);
}

.chart-drawing-tool-svg-text text {
    fill: currentColor;
    stroke: none;
    font-size: 9px;
    font-weight: 700;
    text-anchor: middle;
    dominant-baseline: middle;
}

.chart-drawing-tool-svg-info text {
    fill: currentColor;
    stroke: none;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    font-weight: 700;
    text-anchor: middle;
    dominant-baseline: central;
}

.chart-info-corner-button {
    position: absolute;
    right: 53px;
    top: -6px;
    z-index: 3;
}

.chart-drawing-settings-corner-button {
    position: absolute;
    right: 12px;
    top: -6px;
    z-index: 3;
}

.chart-drawing-settings-panel {
    position: fixed;
    right: auto;
    bottom: auto;
    z-index: 10000;
    width: min(548px, calc(100vw - 24px));
    height: min(690px, calc(100vh - 12px));
    padding: 0;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 0;
    overflow-y: hidden;
    overflow-x: hidden;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 8px;
    background: rgba(15, 20, 28, 0.98);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.42);
    color-scheme: dark;
    scrollbar-width: thin;
    scrollbar-color: rgba(120, 168, 255, 0.48) rgba(8, 12, 18, 0.52);
}

.chart-drawing-settings-panel[hidden] {
    display: none;
}

.chart-drawing-settings-tabs {
    z-index: 8;
    height: 38px;
    display: flex;
    align-items: end;
    gap: 2px;
    padding: 4px 10px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    background: linear-gradient(180deg, rgba(10, 14, 20, 0.98), rgba(10, 14, 20, 0.92));
}

.chart-drawing-settings-tab {
    position: relative;
    min-width: 0;
    height: 34px;
    padding: 0 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-bottom: 0;
    border-radius: 12px 12px 0 0;
    background: rgba(20, 26, 36, 0.94);
    color: rgba(216, 227, 245, 0.72);
    font-size: 12px;
    font-weight: 800;
    line-height: 34px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.chart-drawing-settings-tab:hover {
    color: rgba(238, 246, 255, 0.94);
    border-color: rgba(148, 163, 184, 0.28);
    transform: translateY(-1px);
}

.chart-drawing-settings-tab.active {
    z-index: 2;
    color: #edf6ff;
    transform: translateY(1px);
    box-shadow: 0 -8px 18px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.chart-drawing-settings-tab.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: var(--settings-page-bg);
}

.chart-drawing-settings-page {
    --settings-page-bg: rgba(13, 20, 29, 0.98);
    --settings-page-line: rgba(148, 163, 184, 0.18);
    height: 100%;
    min-height: 0;
    padding: 6px 14px;
    overflow: hidden;
    background: var(--settings-page-bg);
}

.chart-drawing-settings-page[hidden] {
    display: none;
}

.chart-drawing-settings-panel.settings-page-tools,
.chart-drawing-settings-page[data-settings-page="tools"],
.chart-drawing-settings-tab[data-settings-tab="tools"].active {
    --settings-page-bg: linear-gradient(180deg, rgba(13, 24, 30, 0.99), rgba(11, 18, 26, 0.99));
    --settings-page-line: rgba(76, 219, 181, 0.18);
}

.chart-drawing-settings-panel.settings-page-chart,
.chart-drawing-settings-page[data-settings-page="chart"],
.chart-drawing-settings-tab[data-settings-tab="chart"].active {
    --settings-page-bg: linear-gradient(180deg, rgba(13, 21, 36, 0.99), rgba(10, 16, 28, 0.99));
    --settings-page-line: rgba(120, 168, 255, 0.2);
}

.chart-drawing-settings-panel.settings-page-indicators,
.chart-drawing-settings-page[data-settings-page="indicators"],
.chart-drawing-settings-tab[data-settings-tab="indicators"].active {
    --settings-page-bg: linear-gradient(180deg, rgba(28, 24, 14, 0.99), rgba(20, 17, 12, 0.99));
    --settings-page-line: rgba(245, 197, 66, 0.2);
}

.chart-indicator-settings-page {
    overflow-y: auto;
}

.chart-indicator-settings-list {
    display: grid;
    gap: 8px;
    padding: 8px 0;
}

.chart-appearance-settings-page {
    overflow-y: auto;
}

.chart-appearance-settings-list {
    display: grid;
    gap: 0;
    padding: 4px 0 0;
}

.chart-series-settings-list {
    padding-top: 10px;
}

.chart-grid-settings-list {
    padding-top: 14px;
}

.chart-appearance-settings-row {
    height: 36px;
    min-height: 36px;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) 58px 18px;
    align-items: center;
    gap: 8px;
    padding: 0 40px 0 30px;
    border-bottom: 1px solid rgba(120, 168, 255, 0.2);
    color: #d8e3f5;
    font-size: 12px;
    font-weight: 800;
    line-height: 24px;
}

.chart-grid-settings-list .chart-appearance-settings-row {
    grid-template-columns: 18px minmax(0, 1fr) max-content 58px 18px;
}

.chart-series-color-row {
    grid-template-columns: minmax(0, 1fr) max-content 58px 18px;
    padding-left: 56px;
}

.chart-appearance-settings-row input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin: 0 auto;
    accent-color: #78a8ff;
}

.chart-appearance-settings-row input[type="color"] {
    width: 58px;
    height: 24px;
    padding: 2px;
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 7px;
    background: rgba(8, 13, 22, 0.92);
    cursor: pointer;
}

.chart-appearance-settings-row .chart-drawing-color-copy {
    width: 18px;
    height: 24px;
}

.chart-appearance-settings-name {
    white-space: nowrap;
}

.chart-appearance-settings-actions {
    display: flex;
    justify-content: flex-end;
    padding: 12px 40px 6px;
}

.chart-appearance-reset-button {
    min-width: 96px;
    height: 32px;
    border: 1px solid rgba(120, 168, 255, 0.34);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.72);
    color: #dce8fa;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.chart-appearance-reset-button:hover {
    border-color: rgba(120, 168, 255, 0.62);
    background: rgba(30, 58, 138, 0.32);
}

.chart-indicator-settings-toggle {
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid rgba(245, 197, 66, 0.16);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.035);
    color: rgba(238, 246, 255, 0.92);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease;
}

.chart-indicator-settings-toggle:hover {
    border-color: rgba(245, 197, 66, 0.34);
    background: rgba(245, 197, 66, 0.08);
}

.chart-indicator-settings-toggle input {
    width: 15px;
    height: 15px;
    min-width: 15px;
    margin: 0;
    accent-color: #f5c542;
}

.chart-drawing-settings-tab[data-settings-tab="tools"] {
    background: rgba(17, 34, 39, 0.94);
}

.chart-drawing-settings-tab[data-settings-tab="chart"] {
    background: rgba(17, 28, 48, 0.94);
}

.chart-drawing-settings-tab[data-settings-tab="indicators"] {
    background: rgba(39, 33, 18, 0.94);
}

.chart-drawing-settings-tab.active {
    background: var(--settings-page-bg);
    border-color: var(--settings-page-line);
}

.chart-note-popover {
    position: fixed;
    z-index: 10001;
    width: 260px;
    padding: 10px;
    display: grid;
    gap: 8px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 8px;
    background: rgba(15, 20, 28, 0.98);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.42);
    color-scheme: dark;
}

.chart-note-popover::after {
    content: "";
    position: absolute;
    left: var(--chart-note-tail-left, 220px);
    bottom: -7px;
    width: 12px;
    height: 12px;
    border-right: 1px solid rgba(148, 163, 184, 0.24);
    border-bottom: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(15, 20, 28, 0.98);
    transform: translateX(-50%) rotate(45deg);
}

.chart-note-hint {
    color: rgba(203, 213, 225, 0.58);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.chart-note-textarea {
    width: 100%;
    min-height: 86px;
    padding: 9px 10px;
    resize: none;
    border: 1px dashed rgba(120, 168, 255, 0.48);
    border-radius: 7px;
    outline: none;
    overflow: hidden;
    background: rgba(9, 13, 19, 0.76);
    color: rgba(226, 232, 240, 0.92);
    font: inherit;
    font-size: 13px;
    line-height: 1.35;
    caret-color: #78a8ff;
    animation: chart-note-dash-pulse 1s linear infinite;
    color-scheme: dark;
    scrollbar-width: thin;
    scrollbar-color: rgba(120, 168, 255, 0.58) rgba(15, 23, 42, 0.58);
}

.chart-note-textarea::-webkit-scrollbar {
    width: 8px;
}

.chart-note-textarea::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.58);
}

.chart-note-textarea::-webkit-scrollbar-thumb {
    border: 2px solid rgba(15, 23, 42, 0.58);
    border-radius: 999px;
    background: rgba(120, 168, 255, 0.62);
}

.chart-note-textarea::-webkit-scrollbar-thumb:hover {
    background: rgba(120, 168, 255, 0.82);
}

.chart-note-resize {
    justify-self: end;
    width: 22px;
    min-width: 22px;
    height: 16px;
    padding: 0;
    margin: -2px 2px -4px 0;
    border: 0;
    background:
        linear-gradient(135deg, transparent 0 45%, rgba(120, 168, 255, 0.72) 46% 54%, transparent 55%),
        linear-gradient(135deg, transparent 0 62%, rgba(120, 168, 255, 0.46) 63% 71%, transparent 72%);
    cursor: ns-resize;
}

.chart-note-textarea::placeholder {
    color: rgba(148, 163, 184, 0.45);
}

.chart-note-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.chart-note-mic,
.chart-note-remove,
.chart-note-delete {
    width: 26px;
    min-width: 26px;
    height: 26px;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 7px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.48);
    color: rgba(226, 232, 240, 0.86);
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
}

.chart-note-mic.listening {
    border-color: rgba(61, 220, 151, 0.52);
    color: #7cffc2;
}

.chart-note-mic.unavailable {
    opacity: 0.55;
}

.chart-note-remove,
.chart-note-delete {
    border-color: rgba(255, 107, 107, 0.34);
    background: rgba(255, 107, 107, 0.12);
    color: rgba(255, 190, 190, 0.96);
    font-size: 18px;
    line-height: 1;
}

.chart-note-collapsed {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 96;
    width: min(230px, calc(100% - 68px));
    min-height: 88px;
    max-height: 42%;
    padding: 10px 12px;
    display: block;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 8px;
    background: #0f141c;
    color: rgba(226, 232, 240, 0.84);
    text-align: left;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
    cursor: pointer;
}

.chart-note-collapsed-text {
    display: block;
    overflow: auto;
    max-height: calc(42vh - 70px);
    font-size: 12px;
    line-height: 1.35;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.chart-screenshot-gallery {
    position: absolute;
    right: var(--screenshot-gallery-right, 10px);
    bottom: 0;
    z-index: 97;
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-end;
    gap: 8px;
    max-width: calc(100% - var(--screenshot-gallery-right, 10px) - 14px);
    pointer-events: auto;
}

.chart-screenshot-gallery[hidden] {
    display: none !important;
}

.chart-screenshot-thumb {
    position: relative;
    width: 112px;
    height: 88px;
    min-width: 112px;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(120, 168, 255, 0.62);
    border-radius: 6px;
    background: rgba(15, 20, 28, 0.94);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
    cursor: pointer;
}

.chart-screenshot-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chart-screenshot-thumb-close {
    position: absolute;
    right: 2px;
    top: 2px;
    display: grid;
    place-items: center;
    width: 15px;
    height: 15px;
    border-radius: 999px;
    background: rgba(6, 10, 16, 0.86);
    color: #ffffff;
    font-size: 13px;
    line-height: 1;
    font-weight: 800;
    transition: transform 0.14s ease, background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
    transform-origin: center;
}

.chart-screenshot-thumb-close:hover {
    transform: scale(1.18);
    background: rgba(239, 68, 68, 0.95);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.48);
}

.chart-screenshot-expanded {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: block;
    padding: 0;
    background: #05080d;
    cursor: zoom-out;
}

.chart-screenshot-expanded img {
    display: block;
    width: 100vw;
    height: 100vh;
    object-fit: contain;
    image-rendering: auto;
    border-radius: 0;
    box-shadow: none;
}

.chart-note-delete {
    position: absolute;
    right: 5px;
    top: 5px;
}

@keyframes chart-note-dash-pulse {
    0%, 100% {
        border-color: rgba(120, 168, 255, 0.34);
    }
    50% {
        border-color: rgba(120, 168, 255, 0.72);
    }
}

.chart-drawing-settings-row {
    height: 36px;
    min-height: 36px;
    position: relative;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 0;
    border-bottom: 1px solid var(--settings-page-line, rgba(148, 163, 184, 0.18));
}

.chart-drawing-settings-row-rectangle {
    height: 72px;
    min-height: 72px;
    z-index: 2;
    overflow: visible;
}

.chart-drawing-settings-row-fib {
    height: 64px;
    min-height: 64px;
}

.chart-drawing-settings-row:last-child {
    border-bottom: 0;
}

.chart-drawing-settings-tool {
    position: absolute;
    left: 0;
    top: 50%;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.38);
    color: #d8e3f5;
}

.chart-drawing-settings-tool .chart-drawing-tool-svg,
.chart-drawing-settings-tool .chart-alert-magnet-svg {
    width: 18px;
    height: 15px;
    margin: auto;
}

.chart-drawing-settings-name {
    display: none;
}

.chart-drawing-settings-controls {
    position: absolute;
    left: 58px;
    top: calc(50% + 6px);
    min-height: 28px;
    display: grid;
    grid-template-columns: repeat(3, max-content);
    align-items: center;
    gap: 8px;
    transform: translateY(-50%);
}

.chart-drawing-settings-controls-rectangle {
    left: 58px;
    right: 8px;
    top: calc(50% - 2px);
    grid-template-columns: repeat(3, max-content);
    grid-template-rows: 24px 24px;
    row-gap: 10px;
    column-gap: 8px;
    align-items: center;
    min-height: 58px;
}

.chart-drawing-settings-controls-rectangle .chart-drawing-settings-item {
    justify-self: start;
    align-self: center;
    white-space: nowrap;
}

.chart-drawing-settings-controls-rectangle .chart-drawing-settings-item select {
    width: 132px;
}

.chart-drawing-settings-controls-rectangle .chart-drawing-settings-item input[type="number"] {
    width: 58px;
}

.chart-drawing-settings-item {
    display: grid;
    grid-template-columns: auto max-content max-content;
    gap: 6px;
    align-items: center;
    align-self: center;
    color: #d8e3f5;
    font-size: 11px;
    font-weight: 700;
    line-height: 24px;
}

.chart-drawing-settings-fill-toggle {
    position: absolute;
    left: 0;
    top: 34px;
    height: 24px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding-left: 0;
}

.chart-drawing-settings-fill-toggle input[type="checkbox"] {
    width: 13px;
    height: 13px;
    accent-color: #2b8cff;
}

.chart-drawing-settings-fill-color {
    position: absolute;
    left: 88px;
    top: 34px;
    height: 24px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.chart-drawing-settings-fill-color input[type="color"] {
    width: 42px;
}

.chart-drawing-settings-fill-opacity {
    position: absolute;
    left: 246px;
    top: 34px;
    height: 24px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 3;
}

.chart-drawing-settings-fill-opacity.open {
    z-index: 10002;
}

.chart-drawing-settings-fill-opacity > span {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chart-drawing-opacity-button {
    width: 30px;
    min-width: 30px !important;
    height: 24px;
    display: block;
    padding: 2px !important;
    border-radius: 6px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background:
        linear-gradient(45deg, rgba(255,255,255,0.18) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255,255,255,0.18) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.18) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.18) 75%),
        rgba(9, 13, 19, 0.92);
    background-position: 0 0, 0 5px, 5px -5px, -5px 0;
    background-size: 10px 10px;
    box-shadow: none;
}

.chart-drawing-opacity-button span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 3px;
    background: var(--chart-drawing-opacity-preview-color, #7ecbff);
    opacity: var(--chart-drawing-opacity-preview-opacity, 0.12);
}

.chart-drawing-opacity-popover {
    position: absolute;
    left: auto;
    right: 0;
    top: calc(100% + 6px);
    z-index: 10003;
    width: 220px;
    min-height: 42px;
    display: grid;
    grid-template-columns: 130px 44px;
    gap: 8px;
    align-items: center;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 6px;
    background: rgba(24, 28, 35, 0.98);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.38);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-3px);
    transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
}

.chart-drawing-settings-fill-opacity.open .chart-drawing-opacity-popover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto !important;
    transform: translateY(0);
}

.chart-drawing-opacity-slider {
    position: relative;
    width: 130px;
    height: 24px;
    cursor: pointer;
    touch-action: none;
    user-select: none;
}

.chart-drawing-opacity-slider::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 4px;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.34);
    transform: translateY(-50%);
}

.chart-drawing-opacity-slider::after {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: var(--chart-drawing-opacity-slider-value, 12%);
    height: 4px;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.86);
    transform: translateY(-50%);
}

.chart-drawing-opacity-slider span {
    position: absolute;
    left: var(--chart-drawing-opacity-slider-value, 12%);
    top: 50%;
    z-index: 1;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #d8e3f5;
    transform: translate(-50%, -50%);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.38);
}

.chart-drawing-opacity-popover input[type="number"] {
    width: 46px;
    min-width: 44px;
    padding: 0 5px;
    text-align: right;
}

.chart-drawing-settings-fib-controls {
    top: 50%;
    grid-template-columns: max-content;
    grid-template-rows: 24px 24px;
    row-gap: 10px;
    align-items: center;
    min-height: 58px;
}

.chart-drawing-settings-fib-controls > .chart-drawing-settings-item {
    justify-self: start;
    width: max-content;
    grid-template-columns: max-content max-content max-content;
}

.chart-drawing-settings-fib-levels {
    display: grid;
    grid-template-columns: repeat(5, max-content);
    gap: 22px;
}

.chart-drawing-settings-fib-level {
    display: grid;
    grid-template-columns: 13px auto;
    gap: 6px;
    align-items: center;
    color: #d8e3f5;
    font-size: 11px;
    font-weight: 800;
    line-height: 24px;
}

.chart-drawing-settings-fib-level input {
    width: 13px;
    height: 13px;
    accent-color: #2b8cff;
}

.chart-drawing-settings-item select,
.chart-drawing-settings-item input {
    min-width: 0;
    height: 24px;
    box-sizing: border-box;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 6px;
    background: rgba(9, 13, 19, 0.92);
    color: #e5edf8;
    font-size: 11px;
    line-height: 22px;
    display: block;
}

.chart-drawing-settings-item select {
    width: 132px;
    padding: 0 28px 0 10px;
    color: #e5edf8;
    background-color: rgba(9, 13, 19, 0.96);
    text-indent: 0;
}

.chart-drawing-settings-item select option {
    background: #09131d;
    color: #e5edf8;
}

.chart-drawing-settings-item input[type="number"] {
    width: 58px;
    padding: 0 10px;
}

.chart-drawing-settings-item input[type="color"] {
    width: 58px;
}

.chart-drawing-settings-item input[type="color"] {
    padding: 2px;
}

.chart-drawing-color-copy {
    width: 18px;
    height: 24px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 6px;
    background: rgba(9, 13, 19, 0.92);
    color: #9fb2ce;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
}

.chart-drawing-color-copy:hover,
.chart-drawing-color-copy.copied {
    color: #e5edf8;
    border-color: rgba(120, 168, 255, 0.52);
    background: rgba(31, 41, 55, 0.88);
}

.chart-drawing-color-popover {
    position: fixed;
    z-index: 10020;
    display: grid;
    grid-template-columns: 82px 46px 46px;
    gap: 8px;
    align-items: center;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.34);
}

.chart-drawing-color-popover-input {
    width: 82px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 4px;
    background: rgba(9, 13, 19, 0.96);
    color: #f4f7fb;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
}

.chart-drawing-color-popover-action {
    width: 46px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 7px;
    background: rgba(31, 41, 55, 0.82);
    color: #d8e3f5;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.chart-drawing-color-popover-action:hover,
.chart-drawing-color-popover-action.copied {
    border-color: rgba(120, 168, 255, 0.58);
    background: rgba(37, 99, 235, 0.22);
}

.chart-drawing-settings-fill-toggle input[type="checkbox"] {
    width: 13px;
    height: 13px;
    border-radius: 4px;
    accent-color: #2b8cff;
}

.chart-alert-tool-rail {
    position: relative;
    left: auto;
    top: -6px;
    z-index: 3;
    min-height: 35px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    padding: 0;
    overflow-x: auto;
    transform: none;
}

.chart-workspace .chart-box {
    grid-area: chart;
    min-height: 0;
}

.chart-tool-button {
    position: relative;
    width: 54px;
    min-width: 54px !important;
    height: 34px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: #d6d6d6;
    font-size: 0;
    line-height: 1;
    cursor: pointer;
    box-shadow: none;
    transition: background 0.12s ease, color 0.12s ease, filter 0.12s ease;
}

.chart-tool-button:hover {
    background: rgba(255, 255, 255, 0.035);
    color: #ffffff;
}

.chart-tool-button.active,
.chart-tool-button[aria-pressed="true"] {
    background: #2c2c2c;
    color: #f0f0f0;
    filter: brightness(0.9);
}

.chart-tool-shape {
    position: relative;
    display: block;
    width: 72px;
    height: 48px;
    transform: scale(0.5);
    transform-origin: center;
}

.chart-alert-tool-button {
    position: relative;
    width: 35px;
    min-width: 35px !important;
    height: 35px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.38);
    color: #d8e3f5;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.chart-alert-tool-button:hover {
    border-color: rgba(120, 168, 255, 0.38);
    background: rgba(120, 168, 255, 0.12);
    color: #ffffff;
}

.chart-alert-tool-button.active,
.chart-alert-tool-button[aria-pressed="true"] {
    border-color: rgba(120, 168, 255, 0.54);
    background: rgba(120, 168, 255, 0.18);
    box-shadow: 0 0 16px rgba(120, 168, 255, 0.14);
}

#chart-drawing-magnet-tool[aria-pressed="true"] {
    border-color: rgba(120, 168, 255, 0.32);
    background: rgba(120, 168, 255, 0.07);
    box-shadow: 0 0 9px rgba(120, 168, 255, 0.06);
}

.chart-alert-icon-button {
    color: #d8e3f5;
}

.chart-alert-eye-svg {
    width: 22px;
    height: 15px;
}

.chart-alert-trash-svg {
    width: 19px;
    height: 22px;
}

.chart-alert-magnet-svg {
    width: 20px;
    height: 22px;
}

.chart-visibility-menu {
    --chart-visibility-tail-left: 50%;
    position: fixed;
    z-index: 10030;
    min-width: 202px;
    padding: 8px 10px;
    border: 1px solid rgba(120, 168, 255, 0.20);
    border-radius: 12px;
    background: #121923;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.chart-visibility-menu::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background:
        linear-gradient(140deg, rgba(64, 126, 190, 0.13), transparent 42%),
        radial-gradient(circle at 100% 0%, rgba(120, 168, 255, 0.08), transparent 34%);
}

.chart-visibility-menu::after {
    content: "";
    position: absolute;
    left: var(--chart-visibility-tail-left);
    bottom: -6px;
    width: 10px;
    height: 10px;
    border-right: 1px solid rgba(120, 168, 255, 0.20);
    border-bottom: 1px solid rgba(120, 168, 255, 0.20);
    background: #121923;
    transform: translateX(-50%) rotate(45deg);
}

.chart-visibility-menu-item {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 32px;
    padding: 5px 6px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #e7edf7 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.2;
    text-align: left;
    white-space: nowrap;
    transform: none !important;
    filter: none !important;
}

.chart-visibility-menu-item:hover {
    background: rgba(255, 255, 255, 0.09) !important;
    transform: none !important;
    filter: none !important;
}

.chart-visibility-menu-check {
    display: grid;
    place-items: center;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid rgba(120, 168, 255, 0.24);
    background: rgba(15, 23, 42, 0.34);
    color: #78a8ff;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
}

.chart-visibility-menu-item.checked .chart-visibility-menu-check {
    border-color: rgba(120, 168, 255, 0.46);
    background: rgba(120, 168, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(120, 168, 255, 0.24);
}

.chart-alert-eye-svg,
.chart-alert-trash-svg,
.chart-alert-magnet-svg {
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.1;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 3px rgba(216, 227, 245, 0.18));
}

.chart-alert-eye-svg circle {
    fill: none;
    stroke: currentColor;
}

.chart-tool-shape::before,
.chart-tool-shape::after,
.chart-tool-shape i {
    content: "";
    position: absolute;
    display: block;
    box-sizing: border-box;
}

.chart-tool-shape-line::before {
    left: 16px;
    top: 24px;
    width: 50px;
    height: 3px;
    background: currentColor;
    transform: rotate(-45deg);
    transform-origin: left center;
}

.chart-tool-shape-line::after {
    left: 8px;
    bottom: 7px;
    width: 18px;
    height: 18px;
    border: 4px solid currentColor;
    border-radius: 50%;
    box-shadow: 42px -42px 0 -4px #1f1f1f, 42px -42px 0 0 currentColor;
}

.chart-tool-shape-ray::before {
    left: 10px;
    top: 23px;
    width: 56px;
    height: 3px;
    background: currentColor;
}

.chart-tool-shape-ray::after,
.chart-tool-shape-horizontal::after,
.chart-tool-shape-vertical::after {
    width: 18px;
    height: 18px;
    border: 4px solid currentColor;
    border-radius: 50%;
}

.chart-tool-shape-ray::after {
    left: 5px;
    top: 15px;
}

.chart-tool-shape-horizontal::before {
    left: 10px;
    top: 23px;
    width: 56px;
    height: 3px;
    background: currentColor;
}

.chart-tool-shape-horizontal::after {
    left: 30px;
    top: 15px;
}

.chart-tool-shape-vertical::before {
    left: 35px;
    top: 4px;
    width: 3px;
    height: 40px;
    background: currentColor;
}

.chart-tool-shape-vertical::after {
    left: 27px;
    top: 15px;
}

.chart-tool-shape-channel::before,
.chart-tool-shape-channel::after {
    width: 44px;
    height: 3px;
    background: currentColor;
    transform: rotate(-45deg);
    transform-origin: left center;
}

.chart-tool-shape-channel::before {
    left: 9px;
    top: 35px;
    box-shadow: -1px -1px 0 7px transparent, -7px 7px 0 -2px currentColor, 35px -35px 0 -2px currentColor;
}

.chart-tool-shape-channel::after {
    left: 31px;
    top: 35px;
    box-shadow: -7px 7px 0 -2px currentColor, 35px -35px 0 -2px currentColor;
}

.chart-tool-shape-box::before,
.chart-tool-shape-box-mid::before,
.chart-tool-shape-box-split::before {
    left: 12px;
    top: 6px;
    width: 48px;
    height: 36px;
    border: 3px solid currentColor;
}

.chart-tool-shape-box::after,
.chart-tool-shape-box-mid::after,
.chart-tool-shape-box-split::after {
    left: 4px;
    top: -2px;
    width: 16px;
    height: 16px;
    border: 4px solid currentColor;
    border-radius: 50%;
    box-shadow:
        48px 0 0 -4px #1f1f1f, 48px 0 0 0 currentColor,
        0 36px 0 -4px #1f1f1f, 0 36px 0 0 currentColor,
        48px 36px 0 -4px #1f1f1f, 48px 36px 0 0 currentColor;
}

.chart-tool-shape-box-mid::before {
    border-left: 0;
    border-right: 0;
}

.chart-tool-shape-box-split::before {
    height: 30px;
    top: 9px;
    border-top-width: 3px;
    border-bottom-width: 3px;
}

.chart-tool-shape-levels::before,
.chart-tool-shape-short::before,
.chart-tool-shape-long::before {
    left: 13px;
    top: 8px;
    width: 54px;
    height: 3px;
    background: currentColor;
    box-shadow: 0 15px 0 currentColor, 0 30px 0 currentColor;
}

.chart-tool-shape-levels::after,
.chart-tool-shape-short::after,
.chart-tool-shape-long::after {
    left: 4px;
    top: 0;
    width: 18px;
    height: 18px;
    border: 4px solid currentColor;
    border-radius: 50%;
    box-shadow:
        54px 0 0 -4px #1f1f1f, 54px 0 0 0 currentColor,
        0 30px 0 -4px #1f1f1f, 0 30px 0 0 currentColor;
}

.chart-tool-shape-short,
.chart-tool-shape-long {
    --tool-letter: "";
}

.chart-tool-shape-short {
    --tool-letter: "S";
}

.chart-tool-shape-long {
    --tool-letter: "L";
}

.chart-tool-shape-short .chart-tool-letter,
.chart-tool-shape-long .chart-tool-letter {
    display: none;
}

.chart-tool-shape-short::marker,
.chart-tool-shape-long::marker {
    content: "";
}

.chart-tool-shape-short {
    text-align: center;
}

.chart-tool-shape-short::selection,
.chart-tool-shape-long::selection {
    background: transparent;
}

.chart-tool-shape-short::before,
.chart-tool-shape-long::before {
    content: "";
}

.chart-tool-shape-short::after,
.chart-tool-shape-long::after {
    content: "";
}

.chart-tool-shape-short {
    font-size: 0;
}

.chart-tool-shape-short::selection {
    color: inherit;
}

.chart-tool-shape-short::before,
.chart-tool-shape-long::before,
.chart-tool-shape-short::after,
.chart-tool-shape-long::after {
    pointer-events: none;
}

.chart-tool-shape-short::after,
.chart-tool-shape-long::after {
    z-index: 1;
}

.chart-tool-shape-short::before,
.chart-tool-shape-long::before {
    z-index: 0;
}

.chart-tool-shape-short {
    overflow: visible;
}

.chart-tool-shape-short::selection,
.chart-tool-shape-long::selection {
    text-shadow: none;
}

.chart-tool-shape-short::before,
.chart-tool-shape-long::before {
    color: currentColor;
}

.chart-tool-shape-short::after,
.chart-tool-shape-long::after {
    color: currentColor;
}

.chart-tool-shape-short::selection,
.chart-tool-shape-long::selection {
    color: currentColor;
}

.chart-tool-shape-short::before,
.chart-tool-shape-long::before {
    transform: none;
}

.chart-tool-shape-short::after,
.chart-tool-shape-long::after {
    transform: none;
}

.chart-tool-shape-short::selection,
.chart-tool-shape-long::selection {
    outline: 0;
}

.chart-tool-shape-short::before,
.chart-tool-shape-long::before,
.chart-tool-shape-short::after,
.chart-tool-shape-long::after {
    position: absolute;
}

.chart-tool-shape-short::selection,
.chart-tool-shape-long::selection {
    filter: none;
}

.chart-tool-shape-short::before,
.chart-tool-shape-long::before {
    width: 54px;
    height: 3px;
}

.chart-tool-shape-short::after,
.chart-tool-shape-long::after {
    width: 18px;
    height: 18px;
}

.chart-tool-shape-short {
    isolation: isolate;
}

.chart-tool-shape-short::after,
.chart-tool-shape-long::after {
    border-color: currentColor;
}

.chart-tool-shape-short::selection,
.chart-tool-shape-long::selection {
    visibility: visible;
}

.chart-tool-shape-short::before,
.chart-tool-shape-long::before {
    background: currentColor;
}

.chart-tool-shape-short::after,
.chart-tool-shape-long::after {
    border-width: 4px;
}

.chart-tool-shape-short::selection,
.chart-tool-shape-long::selection {
    text-decoration: none;
}

.chart-tool-shape-short::before,
.chart-tool-shape-long::before {
    box-shadow: 0 15px 0 currentColor, 0 30px 0 currentColor;
}

.chart-tool-shape-short::after,
.chart-tool-shape-long::after {
    box-shadow:
        54px 0 0 -4px #1f1f1f, 54px 0 0 0 currentColor,
        0 30px 0 -4px #1f1f1f, 0 30px 0 0 currentColor;
}

.chart-tool-shape-short::selection,
.chart-tool-shape-long::selection {
    border: 0;
}

.chart-tool-shape-short {
    contain: none;
}

.chart-tool-shape-short::after,
.chart-tool-shape-long::after {
    pointer-events: none;
}

.chart-tool-shape-short::before,
.chart-tool-shape-long::before {
    pointer-events: none;
}

.chart-tool-shape-short::selection,
.chart-tool-shape-long::selection {
    opacity: 1;
}

.chart-tool-shape-short::before,
.chart-tool-shape-long::before {
    top: 8px;
}

.chart-tool-shape-short::after,
.chart-tool-shape-long::after {
    top: 0;
}

.chart-tool-shape-short::selection,
.chart-tool-shape-long::selection {
    background: transparent;
}

.chart-tool-shape-short::selection,
.chart-tool-shape-long::selection {
    filter: none;
}

.chart-tool-shape-short::before,
.chart-tool-shape-long::before {
    left: 13px;
}

.chart-tool-shape-short::after,
.chart-tool-shape-long::after {
    left: 4px;
}

.chart-tool-shape-short::before,
.chart-tool-shape-long::before,
.chart-tool-shape-short::after,
.chart-tool-shape-long::after {
    box-sizing: border-box;
}

.chart-tool-shape-short::selection,
.chart-tool-shape-long::selection {
    outline: none;
}

.chart-tool-shape-short b,
.chart-tool-shape-long b {
    position: absolute;
    left: 36px;
    top: 16px;
    z-index: 2;
    display: block;
    width: 18px;
    color: currentColor;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
}

.chart-tool-trash-icon {
    width: 13px;
    height: 14px;
    border: 1.5px solid currentColor;
    border-top: 0;
    border-radius: 0 0 2px 2px;
}

.chart-tool-trash-icon::before {
    content: "";
    position: absolute;
    left: -2px;
    right: -2px;
    top: -4px;
    height: 1.5px;
    background: currentColor;
}

.chart-tool-trash-icon::after {
    content: "";
    position: absolute;
    left: 5px;
    top: -7px;
    width: 6px;
    height: 3px;
    border: 1.5px solid currentColor;
    border-bottom: 0;
    border-radius: 2px 2px 0 0;
}

.chart-tool-bell {
    position: relative;
    z-index: 2;
    display: block;
    transform: translateY(-2px);
    color: #ffd83d;
    font-size: 14px;
    line-height: 1;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.72), 0 0 8px rgba(255, 216, 61, 0.16);
}

.chart-tool-line {
    position: absolute;
    left: 7px;
    right: 7px;
    bottom: 7px;
    height: 9px;
    opacity: 0.82;
    z-index: 1;
}

.chart-tool-line-body {
    position: absolute;
    left: 2px;
    right: 2px;
    top: 4px;
    height: 1px;
    border-radius: 99px;
    background: #f3ea00;
    box-shadow: 0 0 8px rgba(243, 234, 0, 0.22);
}

.chart-tool-line-diagonal {
    left: 7px;
    right: 7px;
    bottom: 6px;
    height: 9px;
    transform: none;
    transform-origin: center;
}

.chart-tool-line-diagonal .chart-tool-line-body {
    left: 0;
    right: 0;
    top: 4px;
    height: 1px;
    background: #f3ea00;
    transform: rotate(-8deg);
    transform-origin: center;
    border-radius: 999px;
}

.chart-drawing-overlay {
    position: absolute;
    inset: 0 0 var(--chart-drawing-bottom-guard, 30px) 0;
    z-index: 90;
    pointer-events: none;
    overflow: hidden;
}

.chart-drawing-line {
    position: absolute;
    height: 0;
    border-top: var(--chart-drawing-visual-line-width, var(--chart-drawing-line-width, 1px)) var(--chart-drawing-line-style, solid) var(--chart-drawing-line-color, #7ecbff);
    transform-origin: 0 0;
    opacity: var(--chart-drawing-stroke-opacity, 1);
    filter: var(--chart-drawing-line-filter, drop-shadow(0 1px 3px rgba(0, 0, 0, 0.55)));
}

.chart-drawing-line.preview {
    opacity: 0.72;
}

.chart-drawing-segment-overlay {
    position: absolute;
    height: 22px;
    transform: translateY(-11px);
    pointer-events: none;
}

.chart-drawing-segment-line {
    position: absolute;
    left: 0;
    right: 0;
    top: 11px;
    height: 0;
    border-top: var(--chart-drawing-visual-line-width, var(--chart-drawing-line-width, 1px)) var(--chart-drawing-line-style, solid) var(--chart-drawing-line-color, #7ecbff);
    opacity: var(--chart-drawing-stroke-opacity, 1);
    filter: var(--chart-drawing-line-filter, drop-shadow(0 1px 3px rgba(0, 0, 0, 0.55)));
}

.chart-drawing-segment-hit {
    position: absolute;
    left: 0;
    right: 0;
    top: 3px;
    height: 16px;
    pointer-events: auto;
    cursor: default;
    z-index: 1;
}

.chart-drawing-segment-handle {
    position: absolute;
    top: 11px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    cursor: pointer;
    background: #0f172a;
    border: 1.3px solid #2b8cff;
    z-index: 2;
    opacity: 0;
}

.chart-drawing-segment-overlay .chart-drawing-line-label {
    position: absolute;
    z-index: 4;
    transform: translate(-50%, -100%);
    margin-top: 0;
    color: var(--chart-drawing-line-color, #22c55e);
    font-size: 10px !important;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.86);
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
}

.chart-drawing-timeframe-label {
    position: absolute;
    right: 4px;
    top: -9px;
    z-index: 3;
    min-width: 22px;
    height: 16px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(18, 22, 28, 0.92);
    color: rgba(226, 232, 240, 0.9);
    font-size: 10px;
    font-weight: 500;
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

.chart-drawing-price-label {
    position: absolute;
    z-index: 94;
    min-width: 52px;
    height: 20px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px 0 0 2px;
    background: var(--chart-drawing-line-color, #7ecbff);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    line-height: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    user-select: none;
    transform: translateY(-50%);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.28);
}

.chart-drawing-segment-overlay.hovered .chart-drawing-segment-handle,
.chart-drawing-segment-overlay:has(.chart-drawing-segment-hit:hover) .chart-drawing-segment-handle,
.chart-drawing-segment-overlay:has(.chart-drawing-segment-handle:hover) .chart-drawing-segment-handle {
    opacity: 1;
}

.chart-drawing-segment-overlay:has(.chart-drawing-segment-hit:hover) .chart-drawing-segment-line,
.chart-drawing-segment-overlay:has(.chart-drawing-segment-handle:hover) .chart-drawing-segment-line,
.chart-drawing-segment-overlay.hovered .chart-drawing-segment-line {
    border-top-color: color-mix(in srgb, var(--chart-drawing-line-color, #7ecbff) 84%, #ffffff);
    box-shadow: none;
    filter: drop-shadow(0 0 6px color-mix(in srgb, var(--chart-drawing-line-color, #7ecbff) 34%, transparent));
}

.chart-drawing-trend-overlay {
    position: absolute;
    z-index: 2;
    height: 0;
    transform-origin: 0 0;
    pointer-events: none;
}

.chart-drawing-trend-line {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 0;
    border-top: var(--chart-drawing-visual-line-width, var(--chart-drawing-line-width, 1px)) var(--chart-drawing-line-style, solid) var(--chart-drawing-line-color, #7ecbff);
    opacity: var(--chart-drawing-stroke-opacity, 1);
    filter: var(--chart-drawing-line-filter, drop-shadow(0 1px 3px rgba(0, 0, 0, 0.55)));
}

.chart-drawing-trend-hit {
    position: absolute;
    z-index: 1;
    left: 0;
    top: -8px;
    width: 100%;
    height: 16px;
    cursor: default;
    pointer-events: auto;
}

.chart-drawing-trend-handle {
    position: absolute;
    z-index: 2;
    top: -4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1.3px solid #2b8cff;
    background: #0f172a;
    cursor: pointer;
    pointer-events: auto;
    transform: rotate(var(--chart-drawing-trend-angle, 0rad));
    opacity: 0;
}

.chart-drawing-trend-overlay.hovered .chart-drawing-trend-handle,
.chart-drawing-trend-overlay:has(.chart-drawing-trend-hit:hover) .chart-drawing-trend-handle,
.chart-drawing-trend-overlay:has(.chart-drawing-trend-handle:hover) .chart-drawing-trend-handle {
    opacity: 1;
}

.chart-drawing-trend-handle.start {
    left: -4px;
}

.chart-drawing-trend-handle.end {
    right: -4px;
}

.chart-drawing-trend-overlay:has(.chart-drawing-trend-hit:hover) .chart-drawing-trend-line,
.chart-drawing-trend-overlay:has(.chart-drawing-trend-handle:hover) .chart-drawing-trend-line,
.chart-drawing-trend-overlay.hovered .chart-drawing-trend-line {
    border-top-color: color-mix(in srgb, var(--chart-drawing-line-color, #7ecbff) 84%, #ffffff);
    filter: drop-shadow(0 0 6px color-mix(in srgb, var(--chart-drawing-line-color, #7ecbff) 34%, transparent));
}

.chart-drawing-full-horizontal-overlay {
    position: absolute;
    left: 0;
    height: 0;
    z-index: 2;
    pointer-events: none;
}

.chart-drawing-full-horizontal-line {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 0;
    border-top: var(--chart-drawing-visual-line-width, var(--chart-drawing-line-width, 1px)) var(--chart-drawing-line-style, solid) var(--chart-drawing-line-color, #7ecbff);
    opacity: var(--chart-drawing-stroke-opacity, 1);
    filter: var(--chart-drawing-line-filter, drop-shadow(0 1px 3px rgba(0, 0, 0, 0.55)));
}

.chart-drawing-full-horizontal-hit {
    position: absolute;
    left: 0;
    right: 0;
    top: -8px;
    height: 16px;
    cursor: default;
    pointer-events: auto;
}

.chart-drawing-full-vertical-overlay {
    position: absolute;
    top: 0;
    width: 0;
    z-index: 2;
    pointer-events: none;
}

.chart-drawing-full-vertical-line {
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    border-left: var(--chart-drawing-visual-line-width, var(--chart-drawing-line-width, 1px)) var(--chart-drawing-line-style, solid) var(--chart-drawing-line-color, #7ecbff);
    opacity: var(--chart-drawing-stroke-opacity, 1);
    filter: var(--chart-drawing-line-filter, drop-shadow(0 1px 3px rgba(0, 0, 0, 0.55)));
}

.chart-drawing-full-vertical-hit {
    position: absolute;
    left: -8px;
    top: 0;
    width: 16px;
    height: 100%;
    cursor: default;
    pointer-events: auto;
}

.chart-drawing-full-horizontal-overlay:has(.chart-drawing-full-horizontal-hit:hover) .chart-drawing-full-horizontal-line,
.chart-drawing-full-horizontal-overlay.hovered .chart-drawing-full-horizontal-line {
    border-top-color: color-mix(in srgb, var(--chart-drawing-line-color, #7ecbff) 84%, #ffffff);
    filter: drop-shadow(0 0 6px color-mix(in srgb, var(--chart-drawing-line-color, #7ecbff) 34%, transparent));
}

.chart-drawing-full-vertical-overlay:has(.chart-drawing-full-vertical-hit:hover) .chart-drawing-full-vertical-line,
.chart-drawing-full-vertical-overlay.hovered .chart-drawing-full-vertical-line {
    border-left-color: color-mix(in srgb, var(--chart-drawing-line-color, #7ecbff) 84%, #ffffff);
    filter: drop-shadow(0 0 6px color-mix(in srgb, var(--chart-drawing-line-color, #7ecbff) 34%, transparent));
}

.chart-drawing-channel-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.chart-drawing-channel-overlay.preview {
    opacity: 0.72;
}

.chart-drawing-channel-overlay.preview .chart-drawing-channel-hit,
.chart-drawing-channel-overlay.preview .chart-drawing-channel-handle {
    pointer-events: none;
}

.chart-drawing-channel-line {
    stroke: var(--chart-drawing-line-color, #7ecbff);
    stroke-opacity: var(--chart-drawing-stroke-opacity, 1);
    stroke-width: var(--chart-drawing-visual-line-width, var(--chart-drawing-line-width, 1px));
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
    filter: var(--chart-drawing-line-filter, drop-shadow(0 1px 3px rgba(0, 0, 0, 0.55)));
}

.chart-drawing-channel-middle {
    stroke: #ffffff;
    stroke-opacity: 0.5;
    stroke-width: var(--chart-drawing-visual-line-width, var(--chart-drawing-line-width, 1px));
    stroke-dasharray: 4 4;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
    pointer-events: none;
}

.chart-drawing-channel-hit {
    pointer-events: auto;
    cursor: default;
}

line.chart-drawing-channel-hit {
    stroke: transparent;
    stroke-width: 16px;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

.chart-drawing-channel-fill {
    fill: color-mix(in srgb, var(--chart-drawing-line-color, #7ecbff) 8%, transparent);
    stroke: transparent;
}

.chart-drawing-channel-handle {
    fill: #0f172a;
    stroke: #2b8cff;
    stroke-width: 1.3px;
    pointer-events: auto;
    cursor: pointer;
    opacity: 0;
}

.chart-drawing-channel-overlay.hovered .chart-drawing-channel-handle,
.chart-drawing-channel-overlay:has(.chart-drawing-channel-hit:hover) .chart-drawing-channel-handle,
.chart-drawing-channel-overlay:has(.chart-drawing-channel-handle:hover) .chart-drawing-channel-handle {
    opacity: 1;
}

.chart-drawing-channel-overlay:has(.chart-drawing-channel-hit:hover) .chart-drawing-channel-line,
.chart-drawing-channel-overlay:has(.chart-drawing-channel-handle:hover) .chart-drawing-channel-line,
.chart-drawing-channel-overlay.hovered .chart-drawing-channel-line {
    stroke: color-mix(in srgb, var(--chart-drawing-line-color, #7ecbff) 84%, #ffffff);
    filter: drop-shadow(0 0 6px color-mix(in srgb, var(--chart-drawing-line-color, #7ecbff) 34%, transparent));
}

.chart-drawing-rectangle-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.chart-drawing-rectangle-overlay.preview {
    opacity: 0.72;
}

.chart-drawing-rectangle-box {
    fill: var(--chart-drawing-fill-color, var(--chart-drawing-line-color, #7ecbff));
    fill-opacity: var(--chart-drawing-fill-opacity, 0.12);
    stroke: var(--chart-drawing-line-color, #7ecbff);
    stroke-opacity: var(--chart-drawing-stroke-opacity, 1);
    stroke-width: var(--chart-drawing-visual-line-width, var(--chart-drawing-line-width, 1px));
    stroke-dasharray: var(--chart-drawing-svg-dasharray, none);
    vector-effect: non-scaling-stroke;
    filter: var(--chart-drawing-line-filter, drop-shadow(0 1px 3px rgba(0, 0, 0, 0.55)));
}

.chart-drawing-rectangle-middle {
    stroke: var(--chart-drawing-line-color, #7ecbff);
    stroke-opacity: var(--chart-drawing-stroke-opacity, 1);
    stroke-width: var(--chart-drawing-visual-line-width, var(--chart-drawing-line-width, 1px));
    stroke-dasharray: var(--chart-drawing-svg-dasharray, none);
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
    pointer-events: none;
    opacity: 1;
}

.chart-drawing-rectangle-hit,
.chart-drawing-rectangle-handle {
    pointer-events: auto;
    cursor: default;
}

.chart-drawing-rectangle-border-hit {
    fill: none;
    stroke: transparent;
    stroke-width: 14px;
    vector-effect: non-scaling-stroke;
    pointer-events: stroke;
}

.chart-drawing-rectangle-middle-hit {
    stroke: transparent;
    stroke-width: 14px;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
    pointer-events: stroke;
}

.chart-drawing-rectangle-handle {
    fill: #0f172a;
    stroke: #2b8cff;
    stroke-width: 1.3px;
    cursor: pointer;
    opacity: 0;
}

.chart-drawing-rectangle-handle[data-drag-mode="middle-left"],
.chart-drawing-rectangle-handle[data-drag-mode="middle-right"] {
    cursor: ew-resize;
}

.chart-drawing-area-fill {
    fill: var(--chart-drawing-fill-color, var(--chart-drawing-line-color, #7ecbff));
    fill-opacity: var(--chart-drawing-fill-opacity, 0.12);
    stroke: none;
    pointer-events: none;
}

.chart-drawing-area-middle {
    stroke: #ffffff;
    stroke-opacity: 0.5;
    stroke-width: var(--chart-drawing-visual-line-width, var(--chart-drawing-line-width, 1px));
    stroke-dasharray: 4 4;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
    pointer-events: none;
}

.chart-drawing-area-hit {
    fill: transparent;
    stroke: none;
    pointer-events: none;
    cursor: default;
}

.chart-drawing-rectangle-overlay.hovered .chart-drawing-rectangle-handle,
.chart-drawing-rectangle-overlay:has(.chart-drawing-rectangle-hit:hover) .chart-drawing-rectangle-handle,
.chart-drawing-rectangle-overlay:has(.chart-drawing-rectangle-handle:hover) .chart-drawing-rectangle-handle {
    opacity: 1;
}

.chart-drawing-rectangle-overlay:has(.chart-drawing-rectangle-hit:hover) .chart-drawing-rectangle-box,
.chart-drawing-rectangle-overlay:has(.chart-drawing-rectangle-handle:hover) .chart-drawing-rectangle-box,
.chart-drawing-rectangle-overlay:has(.chart-drawing-rectangle-hit:hover) .chart-drawing-rectangle-middle,
.chart-drawing-rectangle-overlay:has(.chart-drawing-rectangle-handle:hover) .chart-drawing-rectangle-middle,
.chart-drawing-rectangle-overlay.hovered .chart-drawing-rectangle-middle,
.chart-drawing-rectangle-overlay.hovered .chart-drawing-rectangle-box {
    stroke: color-mix(in srgb, var(--chart-drawing-line-color, #7ecbff) 84%, #ffffff);
    filter: drop-shadow(0 0 6px color-mix(in srgb, var(--chart-drawing-line-color, #7ecbff) 34%, transparent));
}

.chart-drawing-area-overlay:has(.chart-drawing-rectangle-hit:hover) .chart-drawing-area-middle,
.chart-drawing-area-overlay:has(.chart-drawing-area-hit:hover) .chart-drawing-area-middle,
.chart-drawing-area-overlay:has(.chart-drawing-rectangle-handle:hover) .chart-drawing-area-middle,
.chart-drawing-area-overlay.hovered .chart-drawing-area-middle {
    stroke: #ffffff;
    stroke-opacity: 0.5;
}

.chart-drawing-position-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.chart-drawing-position-overlay.preview {
    opacity: 0.72;
}

.chart-drawing-position-overlay.preview .chart-drawing-position-hit,
.chart-drawing-position-overlay.preview .chart-drawing-position-handle {
    pointer-events: none;
}

.chart-drawing-position-profit {
    fill: rgba(31, 166, 109, 0.2);
    stroke: rgba(52, 211, 153, 0.46);
    stroke-width: 1px;
    vector-effect: non-scaling-stroke;
}

.chart-drawing-position-loss {
    fill: rgba(220, 66, 72, 0.2);
    stroke: rgba(248, 113, 113, 0.46);
    stroke-width: 1px;
    vector-effect: non-scaling-stroke;
}

.chart-drawing-position-entry,
.chart-drawing-position-level,
.chart-drawing-position-right {
    stroke: rgba(226, 232, 240, 0.86);
    stroke-width: 1px;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

.chart-drawing-position-level {
    stroke-dasharray: 5 4;
}

.chart-drawing-position-right {
    stroke: rgba(148, 163, 184, 0.54);
}

.chart-drawing-position-hit,
.chart-drawing-position-handle {
    pointer-events: auto;
    cursor: default;
}

.chart-drawing-position-handle {
    cursor: pointer;
    opacity: 0;
}

.chart-drawing-position-point {
    fill: #0f172a;
    stroke: #2b8cff;
    stroke-width: 1.3px;
    vector-effect: non-scaling-stroke;
    cursor: pointer;
}

.chart-drawing-position-overlay.hovered .chart-drawing-position-handle,
.chart-drawing-position-overlay:has(.chart-drawing-position-hit:hover) .chart-drawing-position-handle,
.chart-drawing-position-overlay:has(.chart-drawing-position-handle:hover) .chart-drawing-position-handle {
    opacity: 1;
}

.chart-drawing-position-overlay.preview .chart-drawing-position-point {
    display: none;
}

.chart-drawing-position-overlay.hovered .chart-drawing-position-point,
.chart-drawing-position-point:hover {
    fill: #1d4ed8;
    stroke: #7bb6ff;
}

.chart-drawing-position-label {
    fill: rgba(226, 232, 240, 0.9);
    stroke: none;
    font-size: 11px;
    font-weight: 800;
    text-anchor: middle;
    paint-order: stroke;
}

.chart-drawing-position-overlay.hovered .chart-drawing-position-entry,
.chart-drawing-position-overlay.hovered .chart-drawing-position-level,
.chart-drawing-position-overlay:has(.chart-drawing-position-hit:hover) .chart-drawing-position-entry,
.chart-drawing-position-overlay:has(.chart-drawing-position-hit:hover) .chart-drawing-position-level,
.chart-drawing-position-overlay:has(.chart-drawing-position-handle:hover) .chart-drawing-position-entry,
.chart-drawing-position-overlay:has(.chart-drawing-position-handle:hover) .chart-drawing-position-level {
    stroke: #ffffff;
}

.chart-drawing-cursor-crosshair {
    position: absolute;
    z-index: 12;
    pointer-events: none;
}

.chart-drawing-cursor-crosshair.horizontal {
    left: 0;
    right: 0;
    height: 0;
    border-top: 0;
    height: 1px;
    background: repeating-linear-gradient(
        90deg,
        rgba(120, 168, 255, 0.35) 0,
        rgba(120, 168, 255, 0.35) 4px,
        transparent 4px,
        transparent 8px
    );
}

.chart-drawing-cursor-crosshair.vertical {
    top: 0;
    bottom: 0;
    width: 0;
    border-left: 0;
    width: 1px;
    background: repeating-linear-gradient(
        180deg,
        rgba(120, 168, 255, 0.35) 0,
        rgba(120, 168, 255, 0.35) 4px,
        transparent 4px,
        transparent 8px
    );
}

.chart-drawing-fib-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.chart-drawing-fib-overlay.preview {
    opacity: 0.72;
}

.chart-drawing-fib-overlay.preview .chart-drawing-fib-hit,
.chart-drawing-fib-overlay.preview .chart-drawing-fib-handle {
    pointer-events: none;
}

.chart-drawing-fib-level {
    stroke: var(--chart-drawing-line-color, rgba(120, 168, 255, 0.72));
    stroke-width: 1px;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

.chart-drawing-fib-base {
    stroke: rgba(226, 232, 240, 0.7);
    stroke-width: 1px;
    stroke-dasharray: 4 4;
    vector-effect: non-scaling-stroke;
}

.chart-drawing-fib-hit {
    stroke: transparent;
    stroke-width: 14px;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
    pointer-events: auto;
    cursor: default;
}

.chart-drawing-fib-level,
.chart-drawing-fib-base {
    paint-order: stroke;
}

.chart-drawing-fib-handle {
    fill: #0f172a;
    stroke: #2b8cff;
    stroke-width: 1.3px;
    vector-effect: non-scaling-stroke;
    pointer-events: auto;
    cursor: pointer;
    opacity: 0;
}

.chart-drawing-fib-overlay.hovered .chart-drawing-fib-handle,
.chart-drawing-fib-overlay:has(.chart-drawing-fib-hit:hover) .chart-drawing-fib-handle,
.chart-drawing-fib-overlay:has(.chart-drawing-fib-handle:hover) .chart-drawing-fib-handle {
    opacity: 1;
}

.chart-drawing-fib-label {
    fill: color-mix(in srgb, var(--chart-drawing-line-color, #7ecbff) 54%, #e2e8f0);
    stroke: none;
    font-size: 10px;
    font-weight: 800;
}

.chart-drawing-fib-overlay.hovered .chart-drawing-fib-level,
.chart-drawing-fib-overlay.hovered .chart-drawing-fib-base,
.chart-drawing-fib-overlay:has(.chart-drawing-fib-hit:hover) .chart-drawing-fib-level,
.chart-drawing-fib-overlay:has(.chart-drawing-fib-handle:hover) .chart-drawing-fib-level {
    stroke: color-mix(in srgb, var(--chart-drawing-line-color, #7ecbff) 84%, #ffffff);
}

.chart-drawing-dragging,
.chart-drawing-dragging * {
    cursor: default !important;
}

.chart-drawing-point {
    position: absolute;
    width: 7px;
    height: 7px;
    border: 1.5px solid var(--chart-drawing-line-color, #7ecbff);
    border-radius: 50%;
    background: #0f172a;
    transform: translate(-50%, -50%);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

.chart-drawing-active,
.chart-drawing-active * {
    cursor: crosshair !important;
}

.chart-alert-placement-active,
.chart-alert-placement-active * {
    cursor: crosshair !important;
}

.chart-drawing-active :is(
    .chart-drawing-segment-hit,
    .chart-drawing-segment-handle,
    .chart-drawing-trend-hit,
    .chart-drawing-trend-handle,
    .chart-drawing-full-horizontal-hit,
    .chart-drawing-full-vertical-hit,
    .chart-drawing-channel-hit,
    .chart-drawing-channel-handle,
    .chart-drawing-area-hit,
    .chart-drawing-rectangle-hit,
    .chart-drawing-rectangle-handle,
    .chart-drawing-fib-hit,
    .chart-drawing-fib-handle,
    .chart-drawing-position-hit,
    .chart-drawing-position-handle,
    .chart-drawing-position-point,
    .price-line-alert-hit,
    .price-line-alert-start-handle,
    .price-line-alert-bell,
    .trend-line-alert-hit-area,
    .trend-line-alert-handle
),
.chart-alert-placement-active :is(
    .chart-drawing-segment-hit,
    .chart-drawing-segment-handle,
    .chart-drawing-trend-hit,
    .chart-drawing-trend-handle,
    .chart-drawing-full-horizontal-hit,
    .chart-drawing-full-vertical-hit,
    .chart-drawing-channel-hit,
    .chart-drawing-channel-handle,
    .chart-drawing-area-hit,
    .chart-drawing-rectangle-hit,
    .chart-drawing-rectangle-handle,
    .chart-drawing-fib-hit,
    .chart-drawing-fib-handle,
    .chart-drawing-position-hit,
    .chart-drawing-position-handle,
    .chart-drawing-position-point,
    .price-line-alert-hit,
    .price-line-alert-start-handle,
    .price-line-alert-bell,
    .trend-line-alert-hit-area,
    .trend-line-alert-handle
) {
    pointer-events: none !important;
}

.price-line-alert-overlay {
    position: absolute;
    left: 0;
    right: 0;
    height: 0;
    z-index: 42;
    pointer-events: none;
}

.price-line-alert-hit {
    position: absolute;
    z-index: 1;
    left: calc(var(--line-left, 0px) - 8px);
    width: calc(var(--line-width, 0px) + 16px);
    top: 0;
}

.price-line-alert-hit {
    height: 18px;
    transform: translateY(-9px);
    cursor: default;
    pointer-events: auto;
}

.price-line-alert-short-line {
    position: absolute;
    left: var(--line-left, 0px);
    top: 0;
    display: block;
    width: var(--line-width, 0px);
    border-top: 1px solid #d8d300;
    filter: drop-shadow(0 0 8px rgba(255, 216, 61, 0.14));
}

.price-line-alert-overlay:has(.price-line-alert-hit:hover) .price-line-alert-short-line,
.price-line-alert-overlay:has(.price-line-alert-start-handle:hover) .price-line-alert-short-line {
    border-top-color: #fff15a;
    filter: drop-shadow(0 0 6px rgba(255, 236, 74, 0.34));
}

.price-line-alert-start-handle {
    position: absolute;
    z-index: 3;
    left: calc(var(--line-left, 0px) - 7px);
    top: -7px;
    width: 14px;
    height: 14px;
    cursor: pointer;
    pointer-events: auto;
}

.price-line-alert-overlay.triggered {
    right: auto;
    width: 0;
}

.price-line-alert-overlay.triggered .price-line-alert-short-line {
    border-top-style: dashed;
}

.price-line-alert-bell {
    position: absolute;
    right: calc(var(--price-scale-width, 70px) + 7px);
    top: -23px;
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    color: #ffd83d;
    font-size: 14px;
    line-height: 1;
    cursor: ns-resize;
    pointer-events: auto;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75), 0 0 8px rgba(255, 216, 61, 0.18);
}

.price-line-alert-overlay.triggered .price-line-alert-bell {
    display: none;
}

.price-line-dragging,
.price-line-dragging * {
    cursor: pointer !important;
}

.trend-line-alert-overlay {
    position: absolute;
    z-index: 34;
    height: 0;
    border-top: 1px solid #f3d12f;
    transform-origin: 0 0;
    filter: drop-shadow(0 0 4px rgba(243, 209, 47, 0.32));
    cursor: default;
}

.trend-line-alert-overlay:has(.trend-line-alert-hit-area:hover),
.trend-line-alert-overlay:has(.trend-line-alert-handle:hover),
.trend-line-alert-overlay.hovered {
    border-top-color: #fff15a;
    filter: drop-shadow(0 0 6px rgba(255, 236, 74, 0.34));
}

.trend-line-alert-hit-area {
    position: absolute;
    z-index: 1;
    left: 0;
    top: -8px;
    width: 100%;
    height: 16px;
    cursor: default;
    pointer-events: auto;
}

.trend-line-alert-overlay.preview {
    z-index: 35;
    pointer-events: none;
    opacity: 0.92;
}

.trend-line-alert-overlay.triggered {
    border-top-style: dashed;
    opacity: 0.7;
}

.trend-line-alert-bell {
    position: absolute;
    right: -8px;
    top: -19px;
    width: 16px;
    height: 16px;
    display: grid;
    place-items: center;
    color: #ffd83d;
    font-size: 14px;
    line-height: 1;
    transform: rotate(var(--trend-line-alert-angle, 0rad));
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.72), 0 0 8px rgba(255, 216, 61, 0.18);
    pointer-events: none;
}

.trend-line-alert-handle {
    position: absolute;
    z-index: 2;
    top: -6px;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    background: transparent;
    cursor: pointer;
    transform: rotate(var(--trend-line-alert-angle, 0rad));
}

.trend-line-alert-handle.start {
    left: -6px;
}

.trend-line-alert-handle.end {
    right: -6px;
}

.trend-line-alert-handle:active,
.trend-line-alert-dragging,
.trend-line-alert-dragging * {
    cursor: pointer !important;
}

.tf-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 9px;
    padding-left: 14px;
}

.chart-timeframe-rail {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0;
    overflow: hidden;
    border-bottom-right-radius: 4px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: #18202c;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
    pointer-events: auto;
}

.chart-timeframe-rail .tf-button {
    height: 24px;
    min-width: 27px !important;
    padding: 0 6px !important;
    border: 0;
    border-right: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 0;
    background: #18202c;
    font-size: 11.5px;
}

.chart-timeframe-rail .tf-button:last-child {
    border-right: 0;
}

.chart-timeframe-rail .tf-button:hover {
    background: #203047;
}

.chart-timeframe-rail .tf-button.active {
    background: #243957;
    color: #ffffff;
}

.chart-indicator-rail {
    --chart-indicator-button-width: 92px;
    --chart-indicator-button-min-width: 42px;
    position: absolute;
    left: var(--chart-timeframe-rail-width, 312px);
    right: calc(var(--chart-price-scale-width, 58px) + var(--chart-indicator-scale-gap, 10px));
    top: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 0;
    max-width: none;
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
    pointer-events: auto;
}

.chart-indicator-rail .indicator-button-group.menu-open {
    z-index: 201;
}

.chart-indicator-rail.indicator-rail-pending {
    visibility: hidden;
}

.chart-indicator-rail [hidden] {
    display: none !important;
}

.chart-indicator-rail .indicator-button-group {
    flex: 0 1 var(--chart-indicator-button-width);
    width: var(--chart-indicator-button-width);
    min-width: var(--chart-indicator-button-min-width);
}

.chart-indicator-rail .tf-button {
    height: 24px;
    padding: 0 5px !important;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-right: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 0;
    background: #18202c;
    font-size: 11.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    min-width: 0 !important;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chart-indicator-rail .indicator-settings-button {
    display: none;
}

.chart-indicator-rail .indicator-main-button {
    width: 100% !important;
    border-radius: 0 !important;
    padding: 0 6px !important;
}

.chart-indicator-rail > .tf-button {
    flex: 0 1 var(--chart-indicator-button-width);
    width: var(--chart-indicator-button-width) !important;
    min-width: var(--chart-indicator-button-min-width) !important;
}

.chart-indicator-rail > .tf-button:last-child,
.chart-indicator-rail .indicator-button-group:last-child .indicator-main-button {
    border-right: 0;
}

.chart-indicator-rail .indicator-button-group:not(:first-child) .indicator-main-button,
.chart-indicator-rail > .tf-button:not(:first-child) {
    border-left: 0;
}

.chart-indicator-rail .indicator-button-group:first-child .indicator-main-button,
.chart-indicator-rail > .tf-button:first-child {
    border-bottom-left-radius: 4px !important;
}

.chart-indicator-rail .indicator-button-group:last-child .indicator-main-button,
.chart-indicator-rail > .tf-button:last-child {
    border-right: 1px solid rgba(148, 163, 184, 0.18);
}

.chart-indicator-rail .tf-button:hover {
    background: #203047;
}

.chart-indicator-rail .indicator-button-group.active .indicator-main-button,
.chart-indicator-rail .indicator-button-group.active .indicator-settings-button,
.chart-indicator-rail .indicator-button-group.menu-open .indicator-main-button,
.chart-indicator-rail .indicator-button-group.menu-open .indicator-settings-button,
.chart-indicator-rail .indicator-toggle-button.active {
    background: #243957;
    border-color: rgba(120, 168, 255, 0.32);
    color: #ffffff;
    box-shadow: none;
}

@media (max-width: 1500px) {
    .chart-indicator-rail {
        right: calc(var(--chart-price-scale-width, 58px) + var(--chart-indicator-scale-gap, 10px));
        max-width: none;
    }

    .chart-indicator-rail .indicator-button-group,
    .chart-indicator-rail > .tf-button {
        flex: 0 1 var(--chart-indicator-button-width);
        width: var(--chart-indicator-button-width) !important;
    }

    .chart-indicator-rail .indicator-main-button {
        width: 100% !important;
        padding: 0 4px !important;
    }

    .chart-indicator-rail .tf-button {
        padding: 0 4px !important;
        font-size: 10.8px;
    }
}

@media (max-width: 1280px) {
    .chart-indicator-rail {
        right: calc(var(--chart-price-scale-width, 58px) + var(--chart-indicator-scale-gap, 10px));
        max-width: none;
    }

    .chart-indicator-rail .tf-button {
        padding: 0 3px !important;
        font-size: 10.2px;
    }

    .chart-indicator-rail .indicator-main-button {
        padding: 0 3px !important;
    }
}

@media (max-width: 1180px) {
    .chart-indicator-rail {
        --chart-indicator-button-width: 84px;
        --chart-indicator-button-min-width: 34px;
        left: var(--chart-timeframe-rail-width, 312px);
        top: 0;
        right: calc(var(--chart-price-scale-width, 58px) + var(--chart-indicator-scale-gap, 10px));
        max-width: none;
        flex-wrap: nowrap;
        border-radius: 0 0 0 4px;
    }

    .chart-indicator-rail .indicator-button-group,
    .chart-indicator-rail > .tf-button {
        flex: 0 1 var(--chart-indicator-button-width);
        width: var(--chart-indicator-button-width) !important;
        min-width: var(--chart-indicator-button-min-width) !important;
    }

    .chart-indicator-rail .indicator-main-button {
        padding: 0 2px !important;
    }
}

@media (max-width: 980px) {
    .chart-indicator-rail {
        --chart-indicator-button-width: 76px;
        --chart-indicator-button-min-width: 30px;
        left: 0;
        top: 25px;
        right: calc(var(--chart-price-scale-width, 58px) + var(--chart-indicator-scale-gap, 10px));
        flex-wrap: nowrap;
        border-radius: 0 0 4px 0;
    }
}

.indicator-button-group {
    position: relative;
    display: inline-flex;
    align-items: stretch;
    gap: 0;
}

.indicator-main-button {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    padding-right: 6px !important;
}

.indicator-settings-button {
    width: 22px !important;
    min-width: 22px !important;
    padding: 5px 0 !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    margin-left: -1px;
    text-align: center;
}

.indicator-button-group.active .indicator-main-button,
.indicator-button-group.active .indicator-settings-button,
.indicator-button-group.menu-open .indicator-main-button,
.indicator-button-group.menu-open .indicator-settings-button {
    background: #243957;
    border-color: rgba(255,255,255,0.14);
}

.indicator-settings-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 100000;
    min-width: 280px;
    padding: 8px;
    border-radius: 12px;
    background: #181c23;
    background-color: #181c23;
    opacity: 1;
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.38);
    isolation: isolate;
}

.indicator-settings-menu[hidden] {
    display: none !important;
}

.indicator-settings-menu-wide {
    min-width: 340px;
}

.indicator-settings-menu-fvg {
    width: 380px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 8px;
    padding: 8px;
}

.indicator-settings-menu-strategy3 {
    width: 360px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 8px;
    padding: 8px;
}

.indicator-settings-heading {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    padding: 6px 7px 3px;
}

.indicator-settings-separator {
    grid-column: 1 / -1;
    height: 1px;
    margin: 7px 0;
    background: rgba(255,255,255,0.22);
}

.indicator-settings-item {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 24px;
    padding: 4px 7px;
    border-radius: 8px;
    color: var(--text);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.12;
    cursor: pointer;
}

.indicator-settings-menu-fvg .indicator-settings-item {
    min-height: 24px;
    padding: 4px 7px;
    gap: 7px;
    font-size: 12px;
    line-height: 1.12;
}

.indicator-settings-menu-fvg .indicator-settings-item input[type="checkbox"] {
    width: 13px;
    height: 13px;
    min-width: 13px;
}

.indicator-settings-menu-fvg .fvg-limit-setting {
    grid-column: 1 / -1;
}

.indicator-settings-menu-strategy3 .strategy3-levels-mitigated-setting {
    grid-column: 1 / -1;
}

.indicator-settings-menu-ema {
    min-width: 360px;
    display: grid;
    gap: 8px;
}

.indicator-settings-ema-row {
    display: grid;
    grid-template-columns: minmax(92px, 1fr) 44px 106px 58px;
    align-items: center;
    gap: 8px;
}

.indicator-settings-ema-row .indicator-settings-item {
    padding-left: 0;
    padding-right: 0;
}

.indicator-settings-ema-row input[type="color"] {
    width: 38px;
    height: 30px;
    padding: 2px;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 6px;
    background: #11161f;
}

.indicator-settings-ema-row select,
.indicator-settings-ema-row input[type="number"] {
    height: 30px;
    min-width: 0;
    padding: 4px 8px;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 6px;
    background: #11161f;
    color: var(--text);
    font: inherit;
}

.indicator-settings-item:hover {
    background: #222936;
}

.indicator-settings-item input {
    margin: 0;
}

.indicator-settings-item input[type="checkbox"] {
    width: 13px;
    height: 13px;
    min-width: 13px;
}

.fvg-limit-setting {
    justify-content: space-between;
}

.fvg-limit-setting input {
    width: 78px;
    padding: 5px 8px;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 6px;
    background: #11161f;
    color: var(--text);
    font: inherit;
}

.fvg-limit-setting select {
    width: 104px;
    padding: 5px 8px;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 6px;
    background: #11161f;
    color: var(--text);
    font: inherit;
}

.fvg-info-dot {
    display: inline-grid;
    place-items: center;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: rgba(255,255,255,0.20);
    color: rgba(255,255,255,0.68);
    font-size: 10px;
    font-weight: 700;
}

.tf-button {
    width: auto !important;
    min-width: 0 !important;
    padding: 5px 7px !important;
    border-radius: 8px;
    border: 1px solid transparent;
    background: rgba(255,255,255,0.04);
    color: var(--text);
    font-weight: 600;
    font-size: 12px;
}

.tf-button:hover,
.chart-mode-button:hover {
    border-color: rgba(255, 255, 255, 0.24);
}

.tf-button.active {
    background: rgba(255,255,255,0.10);
    border-color: rgba(255,255,255,0.14);
}

.chart-context-menu {
    position: absolute;
    z-index: 10001;
    min-width: 156px;
    width: max-content;
    background-color: #2d2d2d !important;
    background-image: none !important;
    opacity: 1 !important;
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    border-radius: 6px;
    overflow: hidden;
}

.chart-context-menu-item {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #2d2d2d !important;
    color: #f2f2f2 !important;
    text-align: left;
    padding: 9px 12px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}

.chart-context-menu-item:hover {
    background: #3a3a3a !important;
}

.chart-inverted-badge {
    position: absolute;
    top: 34px;
    left: 50%;
    z-index: 10;
    transform: translateX(-50%);
    padding: 0;
    border: 0;
    background: transparent;
    color: #ff4d4f;
    font-size: 12px;
    line-height: 1;
    pointer-events: none;
}

.chart-ruler-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 12;
}

.chart-ruler-fill {
    position: absolute;
    border-radius: 2px;
    background: rgba(27, 89, 165, 0.36);
    box-shadow: inset 0 0 0 1px rgba(74, 150, 255, 0.14);
}

.chart-box-hero.chart-ruler-active {
    cursor: crosshair;
}

.chart-ruler-line {
    position: absolute;
    height: 0;
    border-top: 1px dashed rgba(182, 214, 255, 0.92);
    background: transparent;
    transform-origin: left center;
}

.chart-ruler-label {
    position: absolute;
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(10, 13, 18, 0.88);
    border: 1px solid rgba(255,255,255,0.10);
    color: #eef3f8;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    text-shadow: none;
}

.chart-ruler-label.positive {
    color: #5ee0a0;
}

.chart-ruler-label.negative {
    color: #ff8d8d;
}

.chart-mode-button {
    width: auto;
    min-width: 64px;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    color: var(--text);
    border: 1px solid var(--line);
    font-weight: 600;
    font-size: 12px;
    line-height: 1.2;
}

.chart-mode-button.active {
    background: rgba(120, 168, 255, 0.07);
    border-color: rgba(120, 168, 255, 0.32);
    color: #d8e6ff;
    box-shadow: 0 0 9px rgba(120, 168, 255, 0.06);
}

.chart-screenshot-button {
    width: auto;
    min-width: 74px;
    min-height: 32px;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid rgba(120, 168, 255, 0.28);
    background: rgba(120, 168, 255, 0.08);
    color: #d8e6ff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.chart-screenshot-button:hover {
    border-color: rgba(120, 168, 255, 0.45);
    background: rgba(120, 168, 255, 0.13);
}

.chart-screenshot-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(30, 38, 52, 0.42);
    color: rgba(216, 230, 255, 0.58);
    box-shadow: none;
}

.chart-screenshot-button:disabled:hover {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(30, 38, 52, 0.42);
}

.chart-screenshot-button.copied {
    border-color: rgba(61, 220, 151, 0.55);
    background: rgba(61, 220, 151, 0.12);
    color: #d8ffe9;
}

.chart-screenshot-button.failed {
    border-color: rgba(255, 107, 107, 0.55);
    background: rgba(255, 107, 107, 0.12);
    color: #ffd7d7;
}

.find-pattern-control {
    position: relative;
    z-index: 1000;
    display: inline-flex;
    align-items: stretch;
    width: 158px;
    min-width: 158px;
    min-height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(61, 220, 151, 0.24);
    background: rgba(61, 220, 151, 0.06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    overflow: visible;
}

.find-pattern-control:hover {
    border-color: rgba(61, 220, 151, 0.38);
    background: rgba(61, 220, 151, 0.09);
}

.find-pattern-control.pattern-hidden {
    border-color: rgba(255, 93, 93, 0.82);
    background: rgba(255, 93, 93, 0.08);
    box-shadow:
        0 0 12px rgba(255, 93, 93, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.find-pattern-button {
    flex: 1 1 auto;
    width: 158px;
    min-width: 0;
    min-height: 0;
    padding: 7px 8px 7px 11px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #d8ffe9;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.find-pattern-button:hover {
    background: transparent;
}

.find-pattern-button.not-found,
.find-pattern-control:has(.find-pattern-button.not-found) {
    border-color: rgba(255, 107, 107, 0.52);
    background: rgba(255, 107, 107, 0.12);
    color: #ffd7d7;
}

.find-pattern-visibility-button {
    position: relative;
    flex: 0 0 28px;
    width: 28px;
    min-width: 28px;
    min-height: 0;
    padding: 0;
    border: 0;
    border-left: 1px solid rgba(61, 220, 151, 0.16);
    border-radius: 0;
    background: transparent;
    display: grid;
    place-items: center;
}

.find-pattern-visibility-button::before {
    content: "";
    width: 13px;
    height: 13px;
    border-radius: 999px;
    background: linear-gradient(180deg, #e6eef8, #b9c7d8);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        0 0 0 2px rgba(216, 230, 255, 0.06),
        0 0 7px rgba(216, 230, 255, 0.08);
}

.find-pattern-visibility-button.hidden-pattern::after {
    content: "";
    position: absolute;
    width: 7px;
    height: 7px;
    background:
        linear-gradient(45deg, transparent 43%, #ff5d5d 45% 55%, transparent 57%),
        linear-gradient(-45deg, transparent 43%, #ff5d5d 45% 55%, transparent 57%);
}

.find-pattern-profile-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    width: 294px;
    display: grid;
    gap: 10px;
    padding: 13px;
    border-radius: 10px;
    border: 1px solid rgba(71, 85, 105, 0.74);
    background: #111827;
    box-shadow:
        0 18px 42px rgba(0, 0, 0, 0.44),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    color: #e5edf7;
}

.find-pattern-profile-menu[hidden] {
    display: none;
}

.find-pattern-profile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #cfe6ff;
    font-size: 12px;
    font-weight: 800;
}

.find-pattern-profile-head strong {
    min-width: 38px;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid rgba(61, 220, 151, 0.42);
    background: rgba(61, 220, 151, 0.1);
    color: #d8ffe9;
    text-align: center;
    font-size: 11px;
    font-weight: 800;
}

.find-pattern-profile-status {
    min-height: 30px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(96, 165, 250, 0.16);
    background: #0f172a;
    color: #9fb3ca;
    font-size: 11px;
    line-height: 1.25;
}

.find-pattern-profile-action {
    width: 100%;
    min-height: 34px;
    padding: 8px 11px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(255, 255, 255, 0.055);
    color: #e8eef8;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
}

.find-pattern-profile-action:hover {
    border-color: rgba(120, 168, 255, 0.42);
    background: rgba(255, 255, 255, 0.085);
}

.find-pattern-profile-action.primary {
    border-color: rgba(61, 220, 151, 0.4);
    background: rgba(61, 220, 151, 0.14);
    color: #d8ffe9;
}

.find-pattern-profile-action.primary:hover {
    border-color: rgba(61, 220, 151, 0.62);
    background: rgba(61, 220, 151, 0.2);
}

.find-pattern-profile-action:disabled {
    cursor: default;
    opacity: 0.45;
}

.chart-alert-control {
    position: relative;
    z-index: 1000;
    display: inline-flex;
    margin-left: 0;
}

.chart-alert-button {
    width: auto;
    min-width: 100px;
    min-height: 32px;
    padding: 6px 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.chart-alert-button:hover {
    border-color: rgba(120, 168, 255, 0.45);
    background: rgba(255, 255, 255, 0.09);
}

.chart-alert-button.active {
    border-color: rgba(255, 216, 61, 0.58);
    background: rgba(255, 216, 61, 0.12);
    color: #fff1a8;
    box-shadow: 0 0 18px rgba(255, 216, 61, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.chart-alert-bell {
    display: inline-grid;
    place-items: center;
    width: 14px;
    height: 14px;
    color: rgba(216, 230, 255, 0.72);
    filter: grayscale(1);
}

.chart-alert-button.active .chart-alert-bell {
    filter: none;
}

.tradingview-button {
    width: 50px;
    min-width: 50px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.06);
    color: #d8e6ff;
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.tradingview-button:hover {
    border-color: rgba(120, 168, 255, 0.45);
    background: rgba(120, 168, 255, 0.12);
}

.tradingview-button:active {
    transform: translateY(1px);
}

.tradingview-logo {
    position: relative;
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    width: 30px;
    height: 18px;
    color: #d8e6ff;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1;
}

.tradingview-logo::before {
    content: "";
    position: absolute;
    left: -2px;
    top: 3px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: currentColor;
}

.tradingview-logo-t {
    transform: translateX(1px);
}

.tradingview-logo-v {
    transform: translateX(-1px);
}

.chart-alert-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 18px);
    z-index: 1001;
    width: 340px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(120, 168, 255, 0.20);
    background: #12171f;
    background-color: #12171f;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: none;
    opacity: 1;
    isolation: isolate;
}

.chart-alert-menu::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background:
        linear-gradient(140deg, rgba(64, 126, 190, 0.13), transparent 42%),
        radial-gradient(circle at 100% 0%, rgba(255, 216, 61, 0.08), transparent 34%);
    opacity: 0;
    transition: opacity 0.16s ease;
}

.chart-alert-menu.chart-alert-menu-hinting::before {
    opacity: 1;
}

.chart-alert-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 0 26px 10px;
}

.chart-alert-tab {
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 0;
    border: 1px solid rgba(216, 230, 255, 0.62);
    background: rgba(13, 16, 22, 0.42);
    color: #e7edf7;
    font-size: 12px;
    font-weight: 800;
}

.chart-alert-tab.active {
    border-color: rgba(255, 216, 61, 0.62);
    background: rgba(255, 216, 61, 0.10);
    color: #fff3ac;
}

.chart-alert-pane {
    display: none;
}

.chart-alert-pane.active {
    display: block;
}

.chart-alert-level-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 12px;
    row-gap: 2px;
}

.chart-alert-menu-item {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 32px;
    padding: 5px 6px;
    border-radius: 8px;
    color: #e7edf7;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
}

.chart-alert-menu-item > span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.chart-alert-menu-item > span > span {
    display: block;
}

.chart-alert-menu-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.chart-alert-menu-hinting .chart-alert-menu-item:hover {
    background: rgba(255, 255, 255, 0.09);
}

.chart-alert-menu-item input {
    width: 14px;
    height: 14px;
    accent-color: #ffd83d;
}

.chart-alert-menu-divider {
    height: 1px;
    margin: 6px 4px;
    background: rgba(120, 168, 255, 0.16);
}

.chart-alert-menu-subdivider {
    height: 1px;
    margin: 6px 4px;
    background: rgba(120, 168, 255, 0.16);
}

.chart-alert-menu-section-title {
    display: grid;
    place-items: center;
    min-height: 20px;
    margin: 1px 0 2px;
    color: #9fc4ff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.chart-alert-menu-item-draft {
    min-height: 40px;
    font-size: 12px;
    font-weight: 700;
}

.chart-alert-badges {
    position: absolute;
    top: 44px;
    right: 64px;
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    pointer-events: none;
}

.chart-alert-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: min(300px, calc(100vw - 120px));
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid rgba(255, 216, 61, 0.58);
    background: rgba(13, 16, 22, 0.62);
    color: #fff3ac;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(4px);
}

.chart-alert-badge span:last-child {
    min-width: 0;
}

.chart-alert-badge-icon {
    flex: 0 0 18px;
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: rgba(255, 216, 61, 0.14);
}

.chart-hint-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 2200;
    max-width: min(520px, calc(100vw - 32px));
    padding: 10px 14px;
    border: 1px solid rgba(255, 216, 61, 0.5);
    border-radius: 6px;
    background: rgba(15, 19, 27, 0.96);
    color: #fff3ac;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.36);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 12px);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.chart-hint-toast.visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.chart-alert-menu-hint {
    position: fixed;
    z-index: 2300;
    width: min(285px, calc(100vw - 28px));
    padding: 9px 12px;
    border: 1px solid rgba(154, 194, 255, 0.48);
    border-radius: 6px;
    background:
        linear-gradient(145deg, rgba(37, 47, 64, 0.98), rgba(22, 29, 40, 0.98)),
        rgba(23, 30, 42, 0.98);
    color: #eaf3ff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.18;
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    opacity: 0;
    pointer-events: none;
    cursor: default;
    user-select: none;
    transform: translateY(4px);
    transition: opacity 0.14s ease, transform 0.14s ease;
}

.chart-alert-menu-hint.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.chart-alert-menu-hint::before {
    content: "";
    position: absolute;
    top: 50%;
    width: 10px;
    height: 10px;
    background: rgba(34, 43, 58, 0.98);
    border: inherit;
    transform: translateY(-50%) rotate(45deg);
}

.chart-alert-menu-hint.right::before {
    left: -6px;
    border-top: 0;
    border-right: 0;
}

.chart-alert-menu-hint.left::before {
    right: -6px;
    border-bottom: 0;
    border-left: 0;
}

.chart-alert-menu-hint-text {
    position: relative;
    z-index: 1;
    cursor: default;
}

.chart-alert-pointer-hint {
    width: min(220px, calc(100vw - 28px));
    pointer-events: none;
}

.chart-alert-pointer-hint.visible {
    pointer-events: auto;
}

.global-alert-toast-stack {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 220;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    pointer-events: none;
}

.global-alert-toast {
    position: relative;
    width: min(340px, calc(100vw - 36px));
    padding: 14px 44px 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 216, 61, 0.42);
    background:
        linear-gradient(135deg, rgba(255, 216, 61, 0.12), rgba(18, 23, 31, 0.94) 44%),
        rgba(18, 23, 31, 0.96);
    color: #eef3f8;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(14px);
    pointer-events: auto;
}

.global-alert-toast-count {
    position: absolute;
    left: 13px;
    top: 15px;
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 216, 61, 0.16);
    color: #ffd83d;
    font-size: 0;
    font-weight: 900;
    line-height: 1;
    color: #ffd83d;
    filter: drop-shadow(0 0 10px rgba(255, 216, 61, 0.18));
}

.global-alert-toast-count::before {
    content: "🔔";
    font-size: 14px;
}

.global-alert-toast.stacked .global-alert-toast-count {
    font-size: 12px;
    background: #ffd83d;
    color: #111827;
    filter: none;
    text-align: center;
}

.global-alert-toast.stacked .global-alert-toast-count::before {
    content: "";
    display: none;
}

.global-alert-toast-symbol {
    display: block;
    margin-left: 28px;
    color: #75a7ff;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.1;
    text-decoration: none;
}

.global-alert-toast-symbol:hover {
    color: #a8c7ff;
    text-decoration: underline;
}

.global-alert-toast-condition {
    margin-top: 7px;
    margin-left: 28px;
    color: #fff1a8;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.3;
}

.global-alert-toast-close {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 26px;
    height: 26px;
    min-width: 26px;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(238, 243, 248, 0.78);
    font-size: 18px;
    line-height: 1;
}

.global-alert-toast-close:hover {
    border-color: rgba(255, 107, 107, 0.42);
    color: #ffd7d7;
    background: rgba(255, 107, 107, 0.12);
}

.settings-page-form {
    width: 100%;
}

.auth-page {
    min-height: 100vh;
    margin: 0;
    background: radial-gradient(circle at 50% 0%, rgba(61, 220, 151, 0.16), transparent 34%), #090d13;
    color: var(--text);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-card {
    width: min(420px, 100%);
    display: grid;
    gap: 18px;
    padding: 28px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(22, 27, 34, 0.96), rgba(12, 17, 24, 0.96));
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.auth-brand h1 {
    margin: 0;
    font-size: 24px;
}

.auth-brand p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.auth-card label,
.settings-users-form label {
    display: grid;
    gap: 8px;
    color: #bfe0ff;
    font-size: 13px;
}

.auth-card input,
.settings-users-form input,
.settings-users-form select,
.settings-users-row-form input,
.settings-users-row-form select {
    min-height: 38px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 10px;
    padding: 0 12px;
    color: var(--text);
    background: rgba(7, 12, 20, 0.62);
}

.password-field {
    position: relative;
    display: block;
    width: 100%;
}

.password-field input {
    width: 100%;
    padding-right: 46px;
    box-sizing: border-box;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    width: 26px !important;
    min-width: 26px !important;
    max-width: 26px !important;
    height: 26px !important;
    min-height: 26px !important;
    padding: 0;
    box-sizing: border-box;
    transform: translateY(-50%) !important;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: #a8b3c5;
    cursor: pointer;
    box-shadow: none !important;
    filter: none !important;
}

.password-toggle::before,
.password-toggle::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.password-toggle::before {
    width: 16px;
    height: 10px;
    border: 1.7px solid currentColor;
    border-radius: 50% / 62%;
}

.password-toggle::after {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.password-toggle:hover,
.password-toggle.active {
    color: #55f0b3;
    border-color: rgba(61, 220, 151, 0.38);
    background: rgba(61, 220, 151, 0.1);
    transform: translateY(-50%) !important;
    box-shadow: none !important;
}

.auth-captcha-row {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.auth-captcha-row strong {
    min-height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(84, 230, 163, 0.26);
    border-radius: 10px;
    background: rgba(84, 230, 163, 0.08);
    color: #c9ffe8;
    font-size: 14px;
    font-weight: 900;
}

.settings-users-form input[type="checkbox"],
.settings-users-row-form input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.custom-checkbox {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border: 1px solid rgba(96, 165, 250, 0.48);
    border-radius: 5px;
    background: rgba(21, 33, 50, 0.9);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.custom-checkbox::after {
    content: "";
    width: 8px;
    height: 5px;
    border-left: 2px solid #04130d;
    border-bottom: 2px solid #04130d;
    transform: translateY(-1px) rotate(-45deg) scale(0);
    transition: transform 120ms ease;
}

input[type="checkbox"]:checked + .custom-checkbox {
    border-color: rgba(61, 220, 151, 0.84);
    background: #55f0a6;
    box-shadow: 0 0 18px rgba(61, 220, 151, 0.18);
}

input[type="checkbox"]:checked + .custom-checkbox::after {
    transform: translateY(-1px) rotate(-45deg) scale(1);
}

input[type="checkbox"]:disabled + .custom-checkbox {
    opacity: 0.55;
}

.auth-card button,
.settings-users-create-form button[type="submit"] {
    min-height: 42px;
}

.auth-error,
.settings-users-status {
    padding: 10px 12px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
}

.auth-error,
.settings-users-status.danger {
    color: #ffd7d7;
    background: rgba(255, 107, 107, 0.12);
    border: 1px solid rgba(255, 107, 107, 0.28);
}

.settings-users-status.success {
    color: #c9ffe8;
    background: rgba(61, 220, 151, 0.12);
    border: 1px solid rgba(61, 220, 151, 0.28);
}

.sidebar-account-stack {
    flex-shrink: 0;
    margin-top: 0;
    display: grid;
    gap: 8px;
}

.sidebar-user {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 0;
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 12px;
    color: var(--muted);
    font-size: 13px;
    background: rgba(255, 255, 255, 0.03);
}

.sidebar-user span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user a {
    color: #93c5fd;
    font-weight: 700;
}

.sidebar-login-ips {
    flex-shrink: 0;
    display: grid;
    gap: 4px;
    margin-top: 0;
    margin-bottom: 0;
    padding: 8px 12px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
}

.sidebar-login-ip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px;
    align-items: center;
    gap: 10px;
    color: #8fa1b4;
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
}

.sidebar-login-ip span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-login-ip strong {
    color: #cbd7e4;
    font-size: 11px;
    text-align: right;
}

.sidebar-login-ip.foreign,
.sidebar-login-ip.foreign strong {
    color: #ff6b6b;
}

.settings-users-create-form {
    display: grid;
    grid-template-columns: repeat(5, minmax(130px, 1fr)) auto;
    gap: 14px;
    align-items: end;
}

.settings-users-active {
    padding-bottom: 10px;
    display: inline-flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 9px !important;
    color: var(--text) !important;
    font-weight: 700;
}

.settings-users-table-wrap table {
    min-width: 980px;
}

.settings-users-row-form {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) 120px 72px minmax(130px, 1fr) minmax(170px, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.settings-users-inline-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.settings-users-last-login {
    color: var(--muted);
    font-size: 12px;
}

.settings-users-delete-cell {
    width: 96px;
}

.settings-layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
    align-items: stretch;
}

.settings-layout-grid > .panel {
    max-width: none;
}

.settings-extra-panel {
    min-height: 100%;
    justify-content: flex-start;
}

.settings-checkbox-row {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
}

.settings-checkbox-row input {
    width: 14px;
    height: 14px;
    accent-color: #3ddc97;
}

.alert-sound-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 148px;
    gap: 12px;
    align-items: end;
}

.alert-sound-upload,
.alert-sound-volume {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.alert-sound-upload span,
.alert-sound-volume span {
    color: #bfe0ff;
    font-size: 13px;
}

.alert-sound-upload input[type="file"] {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 12px;
}

.alert-sound-upload input[type="file"]::file-selector-button {
    margin-right: 9px;
    padding: 6px 9px;
    border: 0;
    border-radius: 7px;
    background: rgba(84, 230, 163, 0.18);
    color: #c9ffe8;
    font-weight: 800;
    cursor: pointer;
}

.alert-sound-upload em {
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    font-style: normal;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.alert-sound-volume input[type="range"] {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    margin: 0;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        #54e6a3 0%,
        #54e6a3 var(--alert-volume-fill, 70%),
        rgba(148, 163, 184, 0.34) var(--alert-volume-fill, 70%),
        rgba(148, 163, 184, 0.34) 100%
    );
    accent-color: #54e6a3;
    cursor: pointer;
}

.alert-sound-volume input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 999px;
    background: transparent;
}

.alert-sound-volume input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    margin-top: -4px;
    border: 0;
    border-radius: 50%;
    background: #54e6a3;
    box-shadow: 0 0 0 3px rgba(84, 230, 163, 0.12);
}

.alert-sound-volume input[type="range"]::-moz-range-track {
    height: 6px;
    border-radius: 999px;
    background: transparent;
}

.alert-sound-volume input[type="range"]::-moz-range-progress {
    height: 6px;
    border-radius: 999px;
    background: #54e6a3;
}

.alert-sound-volume input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border: 0;
    border-radius: 50%;
    background: #54e6a3;
    box-shadow: 0 0 0 3px rgba(84, 230, 163, 0.12);
}

.alert-sound-volume strong {
    justify-self: end;
    margin-top: -2px;
    color: #c9ffe8;
    font-size: 12px;
}

.alert-sound-preview {
    grid-column: 2;
    justify-self: stretch;
    min-height: 34px;
    margin-top: -4px;
    padding: 0 12px;
    border: 1px solid rgba(84, 230, 163, 0.34);
    border-radius: 9px;
    background:
        linear-gradient(135deg, rgba(84, 230, 163, 0.22), rgba(120, 168, 255, 0.10)),
        rgba(255, 255, 255, 0.04);
    color: #dfffee;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.alert-sound-preview:hover {
    border-color: rgba(84, 230, 163, 0.58);
    background:
        linear-gradient(135deg, rgba(84, 230, 163, 0.30), rgba(120, 168, 255, 0.14)),
        rgba(255, 255, 255, 0.06);
}

.alert-sound-preview:disabled {
    opacity: 0.52;
    cursor: default;
}

.settings-alert-count-row {
    margin-top: 14px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.settings-alert-count-row > div {
    display: flex;
    align-items: baseline;
    gap: 10px;
    color: var(--muted);
    font-size: 15px;
    font-weight: 600;
}

.settings-alert-count-row strong {
    color: #fff1a8;
    font-size: 18px;
    font-weight: 900;
}

.settings-clear-alerts-button {
    width: auto;
    min-width: 112px;
    padding: 9px 14px;
    border-radius: 9px;
    border: 1px solid rgba(255, 107, 107, 0.38);
    background: rgba(255, 107, 107, 0.12);
    color: #ffd7d7;
    font-size: 13px;
    font-weight: 800;
}

.settings-clear-alerts-button:hover:not(:disabled) {
    border-color: rgba(255, 107, 107, 0.62);
    background: rgba(255, 107, 107, 0.18);
}

.settings-clear-alerts-button:disabled {
    opacity: 0.45;
    cursor: default;
}

.scroll-top-button {
    position: fixed;
    left: var(--scroll-top-left, 50%);
    bottom: 28px;
    z-index: 80;
    width: 48px;
    height: 48px;
    margin: 0;
    display: grid;
    place-items: center;
    border-radius: 12px;
    border: 1px solid rgba(120, 168, 255, 0.32);
    background: rgba(16, 22, 31, 0.86);
    color: #d8e6ff;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(10px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.scroll-top-button.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.scroll-top-button.sidepanel-mode {
    position: fixed;
    left: 20px;
    bottom: 12px;
    margin: 0;
    transform: translateY(10px);
}

.scroll-top-button.sidepanel-mode.visible {
    transform: translateY(0);
}

.scroll-top-button:hover {
    border-color: rgba(120, 168, 255, 0.62);
    background: rgba(27, 42, 64, 0.92);
}

.scroll-top-button-icon {
    width: 16px;
    height: 16px;
    border-left: 3px solid currentColor;
    border-top: 3px solid currentColor;
    transform: translateY(4px) rotate(45deg);
    border-radius: 2px;
}

@media (max-width: 1100px) {
    .shell {
        display: grid;
        grid-template-columns: 1fr;
        margin-left: 0;
    }

    body.sidebar-floating .shell,
    html.sidebar-floating-preload .shell {
        display: grid;
        grid-template-columns: 1fr;
        margin-left: 0;
    }

    .sidebar {
        position: relative;
        left: auto;
        top: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        transform: none;
        width: auto;
    }

    body.sidebar-floating .sidebar,
    html.sidebar-floating-preload .sidebar {
        position: relative;
        width: auto;
        transform: none;
        box-shadow: none;
    }

    .sidebar-hover-zone {
        display: none !important;
    }

    .sidebar-pin-button {
        display: none;
    }

    .chart-workspace {
        grid-template-columns: 1fr;
    }

    .chart-tool-rail {
        width: min(665px, calc(100% - 28px));
        min-height: 0;
    }

    .hero,
    .stats-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .strategy-switcher {
        grid-template-columns: 1fr 1fr;
    }

    .strategy-settings-grid {
        grid-template-columns: 1fr;
    }

    .strategy-3-filter-panel {
        flex-direction: column;
        width: 100%;
    }

    .strategy-touch-field,
    .strategy-timeframe-field,
    .strategy-level-distance-field {
        min-width: 0;
        width: 100%;
    }

    .strategy-timeframe-picker {
        grid-template-columns: repeat(2, minmax(92px, 1fr));
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .signal-chart-mainline {
        align-items: flex-start;
    }

    .signal-source-badge {
        min-width: 0;
        text-align: left;
    }

    .signal-head-actions {
        width: 100%;
        margin-left: 0;
        justify-content: flex-start;
    }

    .history-layout {
        grid-template-columns: 1fr;
    }

    .page-head {
        align-items: stretch;
        flex-direction: column;
    }

    .page-head.pending-page-head {
        grid-template-columns: 1fr;
    }

    .page-head.pending-page-head h1,
    .page-head.pending-page-head .pending-auto-check-row {
        grid-column: 1;
        grid-row: auto;
    }

    .page-head.pending-page-head .pending-auto-check-row {
        justify-self: start;
    }

    .history-clear-actions {
        justify-content: flex-start;
    }

    .history-clear-button {
        width: 100%;
    }

    .symbols-tools-grid,
    .symbols-list-grid {
        grid-template-columns: 1fr;
    }

    .strategy-results-head-top {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
    }

    .strategy-results-head-top > .strategy-results-title {
        grid-column: 1 / -1;
        grid-row: 1;
        justify-self: center;
    }

    .strategy-results-head-top > .results-open-list-button {
        grid-column: 1;
        grid-row: 2;
    }

    .strategy-results-head-top > .strategy-results-actions {
        grid-column: 2;
        grid-row: 2;
    }

    .scan-target {
        flex-direction: column;
        align-items: stretch;
    }

    .scan-target-action {
        width: 100%;
    }

    .binance-status-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    :root {
        --right-drawer-open-width: min(252px, 72vw);
    }

    .settings-actions {
        grid-template-columns: 1fr;
    }

    .settings-layout-grid {
        grid-template-columns: 1fr;
    }

    .find-pattern-button {
        width: 100%;
        min-width: 0;
        margin-left: 0;
        margin-right: 0;
        order: 2;
    }

    .scroll-top-button {
        left: 50%;
        bottom: 18px;
        width: 44px;
        height: 44px;
        margin: 0;
        border-radius: 11px;
    }

    .scroll-top-button.sidepanel-mode {
        position: fixed;
        left: 18px;
        bottom: 18px;
        margin: 0;
    }

    .strategy-switcher {
        grid-template-columns: 1fr;
    }
}

.trade-execution-overlay {
    position: absolute;
    inset: 0;
    z-index: 44;
    pointer-events: none;
}

.trade-execution-line {
    position: absolute;
    height: 0;
    border-top: 1px dashed currentColor;
    opacity: 0.92;
    transform: translateY(-0.5px);
}

.trade-execution-line.entry {
    color: #ff232d;
}

.trade-execution-line.result.positive {
    color: #00e51b;
}

.trade-execution-line.result.negative {
    color: #ff232d;
}

.trade-execution-line.result.neutral {
    color: #f8fafc;
}

.trade-execution-marker {
    position: absolute;
    width: 18px;
    height: 18px;
    transform: translate(-50%, -50%);
}

.trade-execution-marker::before,
.trade-execution-marker::after {
    content: "";
    position: absolute;
    left: 8px;
    top: 2px;
    width: 2px;
    height: 15px;
    border-radius: 2px;
    background: currentColor;
}

.trade-execution-marker::before {
    transform: rotate(45deg);
}

.trade-execution-marker::after {
    transform: rotate(-45deg);
}

.trade-execution-marker.entry {
    color: #ff232d;
    filter: drop-shadow(0 0 5px rgba(255, 35, 45, 0.38));
}

.trade-execution-marker.exit.positive {
    color: #00e51b;
    filter: drop-shadow(0 0 5px rgba(0, 229, 27, 0.38));
}

.trade-execution-marker.exit.negative {
    color: #ff232d;
    filter: drop-shadow(0 0 5px rgba(255, 35, 45, 0.38));
}

.trade-execution-label {
    position: absolute;
    min-width: 54px;
    padding: 2px 6px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    text-align: right;
    transform: translateY(-50%);
    text-shadow: 0 0 7px rgba(0, 0, 0, 0.9);
}

.trade-execution-label.positive {
    color: #00e51b;
}

.trade-execution-label.negative {
    color: #ff232d;
}

.trade-execution-percent-overlay {
    position: absolute;
    inset: 0;
    z-index: 45;
    pointer-events: none;
}

.trade-execution-percent-label {
    position: absolute;
    min-width: 52px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    text-align: right;
    transform: translateY(-50%);
    text-shadow: 0 0 7px rgba(0, 0, 0, 0.95);
}

.trade-execution-percent-label.positive {
    color: #00e51b;
}

.trade-execution-percent-label.negative {
    color: #ff232d;
}

.trade-execution-price-label {
    position: absolute;
    right: 0;
    width: var(--trade-execution-price-scale-width, 46px);
    min-width: 0;
    height: 23px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.72);
    border-radius: 2px;
    background: rgba(226, 232, 240, 0.94);
    color: #111827;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    transform: translateY(-50%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
    box-sizing: border-box;
    overflow: hidden;
    white-space: nowrap;
}

.trade-execution-price-label.entry {
    border-color: rgba(128, 208, 0, 0.72);
}

.trade-execution-price-label.exit.positive {
    border-color: rgba(0, 229, 27, 0.72);
}

.trade-execution-price-label.exit.negative {
    border-color: rgba(255, 35, 45, 0.72);
}

.trade-execution-check {
    position: absolute;
    width: 22px;
    height: 18px;
    transform: translate(-50%, -50%);
}

.trade-execution-check::before,
.trade-execution-check::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transform-origin: left center;
}

.trade-execution-check::before {
    left: 10px;
    top: 9px;
    transform: rotate(42deg);
}

.trade-execution-check::after {
    left: 10px;
    top: 9px;
    transform: rotate(138deg);
}

.trade-execution-check.up {
    color: #80d000;
    filter: drop-shadow(0 0 4px rgba(128, 208, 0, 0.46));
}

.trade-execution-check.down {
    color: #ff232d;
    filter: drop-shadow(0 0 4px rgba(255, 35, 45, 0.44));
}

.trade-execution-check.down {
    transform: translate(-50%, -50%) rotate(180deg);
}
