﻿
:root {
color-scheme: dark;
--bg: #03060b;
--bg-deep: #0b1018;
--panel: rgba(16, 20, 30, 0.88);
--panel-soft: rgba(23, 28, 39, 0.96);
--panel-border: rgba(255, 255, 255, 0.08);
--text: #f5f3ee;
--muted: #b9c0cb;
--long: #22c55e;
--short: #ef4444;
--accent: #ecd06f;
--accent-strong: #f5dc8b;
--accent-ink: #03060b;
--trades-panel-collapsed-height: 24px;
}

* {
box-sizing: border-box;
}

body {
margin: 0;
min-height: 100vh;
 font-family: "Montserrat", "Segoe UI", "Trebuchet MS", Arial, sans-serif;
font-weight: 500;
overflow-x: hidden;
background:
radial-gradient(circle at top left, rgba(236, 208, 111, 0.12), transparent 26%),
radial-gradient(circle at top right, rgba(236, 208, 111, 0.06), transparent 18%),
linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 24%),
var(--bg);
color: var(--text);
}

p,
li,
span,
a,
small,
label,
input,
button {
font-weight: 600;
}

h1,
h2,
h3,
h4,
h5,
h6,
strong,
b {
font-weight: 800;
}

h1 span,
h2 span,
h3 span,
h4 span,
h5 span,
h6 span {
font-weight: inherit;
}

.app-shell {
min-height: 100vh;
padding: 22px;
overflow-x: clip;
}

.auth-strip {
position: sticky;
top: 0;
z-index: 45;
margin: -22px -22px 18px;
padding: 0;
background: transparent;
backdrop-filter: blur(14px);
}

.auth-strip__inner {
display: flex;
justify-content: space-between;
align-items: center;
gap: 18px;
padding: 14px 0;
padding-left: 22px;
padding-right: 22px;
background: var(--panel);
border: 1px solid var(--panel-border);
border-radius: 0;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
backdrop-filter: blur(12px);
}

.auth-toolbar {
display: flex;
align-items: center;
gap: 12px;
flex: 1;
min-width: 0;
}

.auth-toolbar--content {
gap: 10px;
flex-wrap: wrap;
}

.auth-home-link {
font-size: 14px;
font-weight: 700;
letter-spacing: 0.06em;
text-transform: uppercase;
color: #ffffff;
text-decoration: none;
}

.auth-home-link:hover {
color: var(--accent);
}

.auth-breadcrumb {
color: rgba(255, 255, 255, 0.4);
}

.auth-section-pill {
display: inline-flex;
align-items: center;
padding: 8px 12px;
border-radius: 999px;
border: 1px solid rgba(236, 208, 111, 0.22);
background: rgba(236, 208, 111, 0.08);
font-size: 12px;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--accent);
}

.auth-select-field {
display: grid;
gap: 6px;
width: min(100%, 320px);
}

.auth-select-field span {
font-size: 11px;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--accent);
}

.auth-select-field select {
width: 100%;
padding: 12px 14px;
border-radius: 16px;
border: 1px solid rgba(255, 255, 255, 0.32);
background: rgba(11, 16, 24, 0.94);
color: var(--text);
font: inherit;
cursor: pointer;
}

.auth-select-field select:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 2px rgba(236, 208, 111, 0.12);
}

.topbar {
display: grid;
grid-template-columns: minmax(260px, 1.35fr) minmax(260px, 1fr) minmax(220px, 0.78fr);
gap: 18px;
align-items: end;
margin-bottom: 18px;
position: relative;
z-index: 40;
}

.brand-block,
.toolbar-group,
.panel-card,
.chart-stage {
background: var(--panel);
border: 1px solid var(--panel-border);
border-radius: 24px;
backdrop-filter: blur(12px);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.brand-block,
.toolbar-group {
padding: 18px 20px;
}

.eyebrow,
.toolbar-label,
.panel-kicker {
margin: 0 0 8px;
font-size: 12px;
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--accent);
}

.brand-block h1,
.panel-head h2 {
margin: 0;
font-size: 28px;
font-weight: 700;
color: var(--accent);
}

.brand-copy {
margin: 8px 0 0;
max-width: 560px;
line-height: 1.5;
color: #ddd6d6;
}

.button-row {
display: flex;
flex-wrap: wrap;
gap: 10px;
}

.timeframe-toolbar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
}

.timeframe-more {
position: relative;
flex-shrink: 0;
}

.timeframe-more__trigger {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
min-width: 48px;
padding-inline: 14px;
}

.timeframe-more__label:empty {
display: none;
}

.toolbar-chevron {
width: 14px;
height: 14px;
stroke: currentColor;
stroke-width: 1.7;
fill: none;
stroke-linecap: round;
stroke-linejoin: round;
flex-shrink: 0;
}

.timeframe-more__menu {
position: absolute;
top: calc(100% + 10px);
right: 0;
z-index: 120;
display: grid;
gap: 6px;
min-width: 180px;
max-height: 360px;
padding: 10px;
overflow-y: auto;
background: rgba(20, 20, 20, 0.98);
border: 1px solid rgba(255, 255, 255, 0.32);
border-radius: 18px;
box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
}

.timeframe-more__item {
display: block;
width: 100%;
padding: 10px 12px;
border-radius: 12px;
border: 1px solid transparent;
background: rgba(255, 255, 255, 0.03);
color: var(--text);
font: inherit;
text-align: left;
cursor: pointer;
transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.timeframe-more__item:hover {
border-color: var(--accent);
color: var(--accent);
}

.timeframe-more__item.is-active {
background: var(--accent);
border-color: var(--accent);
color: var(--accent-ink);
font-weight: 700;
}

.control-button {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 10px 14px;
border-radius: 999px;
border: 1px solid rgba(255, 255, 255, 0.42);
background: rgba(11, 16, 24, 0.95);
color: var(--text);
text-decoration: none;
font-weight: 600;
cursor: pointer;
transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

a.control-button,
a.control-button:hover,
a.control-button:focus,
a.control-button:active,
a.control-button:visited {
text-decoration: none;
}

.control-button:hover {
border-color: var(--accent);
color: var(--accent);
background: rgba(0, 0, 0, 0.92);
transform: translateY(-1px);
}

.control-button.is-active {
background: var(--accent);
border-color: var(--accent);
color: var(--accent-ink);
font-weight: 700;
}

.control-button--primary {
background: var(--accent);
border-color: var(--accent);
color: var(--accent-ink);
font-weight: 700;
}

.control-button--toolbar {
display: inline-flex;
align-items: center;
justify-content: space-between;
gap: 12px;
width: 100%;
padding-inline: 16px;
}

.control-button__lead {
display: inline-flex;
align-items: center;
gap: 10px;
min-width: 0;
}

.control-button__icon {
width: 18px;
height: 18px;
stroke: currentColor;
stroke-width: 1.6;
fill: none;
stroke-linecap: round;
stroke-linejoin: round;
flex-shrink: 0;
}

.control-button--indicator {
justify-content: flex-start;
gap: 12px;
min-width: 0;
}

.control-button--indicator .control-button__badge {
margin-left: auto;
}

.control-button__badge {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 22px;
height: 22px;
padding: 0 7px;
border-radius: 999px;
background: rgba(236, 208, 111, 0.16);
border: 1px solid rgba(236, 208, 111, 0.28);
font-size: 11px;
font-weight: 800;
letter-spacing: 0.04em;
color: var(--accent);
}

.control-button.is-locked,
.timeframe-more__item.is-locked,
.auth-select-field select.is-locked {
opacity: 1;
cursor: not-allowed;
}

.control-button.is-locked:hover,
.timeframe-more__item.is-locked:hover {
transform: none;
border-color: rgba(236, 208, 111, 0.24);
color: rgba(255, 255, 255, 0.72);
background: linear-gradient(180deg, rgba(236, 208, 111, 0.08), rgba(255, 255, 255, 0.03));
}

.control-button.is-locked,
.timeframe-more__item.is-locked {
position: relative;
border-style: dashed;
border-color: rgba(236, 208, 111, 0.24);
color: rgba(255, 255, 255, 0.72);
background: linear-gradient(180deg, rgba(236, 208, 111, 0.08), rgba(255, 255, 255, 0.03));
overflow: visible;
}

.control-button.is-locked::after,
.timeframe-more__item.is-locked::after {
content: none;
display: none;
}

.lock-hint-tooltip {
position: fixed;
left: 0;
top: 0;
z-index: 2400;
display: block;
max-width: min(340px, calc(100vw - 20px));
padding: 8px 10px;
border-radius: 12px;
border: 1px solid rgba(236, 208, 111, 0.34);
background: linear-gradient(180deg, rgba(16, 22, 34, 0.98), rgba(10, 14, 24, 0.98));
box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42);
color: #f1e3aa;
font-size: 12px;
font-weight: 600;
letter-spacing: 0.01em;
line-height: 1.35;
text-transform: none;
white-space: normal;
overflow-wrap: anywhere;
text-align: left;
pointer-events: none;
opacity: 1;
visibility: visible;
transform-origin: center top;
transition: opacity 120ms ease, visibility 120ms ease;
}

.lock-hint-tooltip.is-hidden {
opacity: 0;
visibility: hidden;
}

.auth-block {
position: relative;
width: min(100%, 340px);
padding: 0;
background: transparent;
border: 0;
border-radius: 0;
backdrop-filter: none;
box-shadow: none;
}

.auth-guest,
.auth-user {
display: flex;
justify-content: flex-end;
align-items: center;
gap: 10px;
min-height: 44px;
}

.is-hidden {
display: none !important;
}

.profile-trigger {
display: inline-flex;
align-items: center;
gap: 12px;
width: 100%;
padding: 8px 10px;
border: 1px solid rgba(255, 255, 255, 0.32);
border-radius: 16px;
background: rgba(11, 16, 24, 0.94);
color: var(--text);
font: inherit;
cursor: pointer;
transition: border-color 0.16s ease, transform 0.16s ease;
}

.profile-trigger:hover {
border-color: var(--accent);
transform: translateY(-1px);
}

.app-shell.is-free .profile-trigger {
border-color: rgba(236, 208, 111, 0.26);
background: linear-gradient(180deg, rgba(236, 208, 111, 0.08), rgba(11, 16, 24, 0.94));
}

.app-shell.is-pro .profile-trigger {
border-color: rgba(34, 197, 94, 0.24);
background: linear-gradient(180deg, rgba(34, 197, 94, 0.08), rgba(11, 16, 24, 0.94));
}

.app-shell.is-admin .profile-trigger {
border-color: rgba(96, 165, 250, 0.24);
background: linear-gradient(180deg, rgba(96, 165, 250, 0.08), rgba(11, 16, 24, 0.94));
}

.profile-avatar {
display: inline-flex;
align-items: center;
justify-content: center;
width: 38px;
height: 38px;
border-radius: 50%;
background: linear-gradient(135deg, var(--accent), var(--accent-strong));
color: var(--accent-ink);
font-weight: 800;
font-size: 14px;
text-transform: uppercase;
flex-shrink: 0;
}

.profile-meta {
display: grid;
text-align: left;
gap: 2px;
min-width: 0;
}

.profile-name {
font-weight: 700;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.profile-plan {
display: inline-flex;
align-items: center;
justify-content: center;
width: fit-content;
padding: 4px 8px;
border-radius: 999px;
border: 1px solid rgba(255, 255, 255, 0.24);
font-size: 12px;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--muted);
background: rgba(255, 255, 255, 0.03);
}

.profile-plan--guest,
.profile-plan--free {
border-color: rgba(236, 208, 111, 0.22);
background: rgba(236, 208, 111, 0.08);
color: var(--accent);
}

.profile-plan--pro {
border-color: rgba(34, 197, 94, 0.28);
background: rgba(34, 197, 94, 0.12);
color: #7ef0aa;
}

.profile-plan--admin {
border-color: rgba(96, 165, 250, 0.28);
background: rgba(96, 165, 250, 0.12);
color: #93c5fd;
}

.profile-menu {
position: absolute;
right: 20px;
top: calc(100% - 8px);
z-index: 30;
display: grid;
gap: 6px;
min-width: 180px;
padding: 10px;
background: rgba(20, 20, 20, 0.98);
border: 1px solid rgba(255, 255, 255, 0.32);
border-radius: 18px;
box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
}

.profile-menu__meta {
padding: 10px 12px 6px;
font-size: 12px;
line-height: 1.4;
color: var(--muted);
border-bottom: 1px solid rgba(255, 255, 255, 0.18);
margin-bottom: 4px;
}

.profile-menu__meta--guest,
.profile-menu__meta--free {
color: #f0df9a;
background: linear-gradient(180deg, rgba(236, 208, 111, 0.09), rgba(236, 208, 111, 0.03));
border-radius: 12px;
border-bottom-color: rgba(236, 208, 111, 0.12);
}

.profile-menu__meta--pro {
color: #9ff2bb;
background: linear-gradient(180deg, rgba(34, 197, 94, 0.12), rgba(34, 197, 94, 0.03));
border-radius: 12px;
border-bottom-color: rgba(34, 197, 94, 0.14);
}

.profile-menu__meta--admin {
color: #bfdbfe;
background: linear-gradient(180deg, rgba(96, 165, 250, 0.12), rgba(96, 165, 250, 0.03));
border-radius: 12px;
border-bottom-color: rgba(96, 165, 250, 0.14);
}

.profile-menu__item {
display: block;
width: 100%;
padding: 10px 12px;
border-radius: 12px;
border: 0;
background: rgba(255, 255, 255, 0.03);
color: var(--text);
font: inherit;
text-align: left;
text-decoration: none;
cursor: pointer;
transition: background-color 0.16s ease, color 0.16s ease;
}

.profile-menu__item:hover {
background: rgba(236, 208, 111, 0.14);
color: var(--accent);
}

.auth-modal {
position: fixed;
inset: 0;
z-index: 50;
display: flex;
align-items: center;
justify-content: center;
padding: 24px;
}

.auth-modal__backdrop {
position: absolute;
inset: 0;
background: rgba(2, 6, 23, 0.72);
backdrop-filter: blur(8px);
}

.auth-modal__dialog {
position: relative;
z-index: 1;
width: min(100%, 460px);
padding: 22px;
background: rgba(11, 16, 24, 0.98);
border: 1px solid var(--panel-border);
border-radius: 28px;
box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
}

.auth-modal__head {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 16px;
margin-bottom: 18px;
}

.auth-modal__head h2 {
margin: 0;
color: var(--accent);
font-size: 28px;
}

.auth-modal__close {
width: 40px;
height: 40px;
border-radius: 50%;
border: 1px solid rgba(255, 255, 255, 0.32);
background: rgba(255, 255, 255, 0.03);
color: var(--text);
font-size: 24px;
line-height: 1;
cursor: pointer;
}

.indicator-modal {
position: fixed;
inset: 0;
z-index: 55;
display: flex;
align-items: center;
justify-content: center;
padding: 24px;
}

.indicator-modal__backdrop {
position: absolute;
inset: 0;
background: rgba(2, 6, 23, 0.76);
backdrop-filter: blur(10px);
}

.indicator-modal__dialog {
position: relative;
z-index: 1;
width: min(100%, 860px);
max-height: min(82vh, 920px);
display: grid;
grid-template-rows: auto auto auto minmax(0, 1fr) auto;
gap: 18px;
padding: 24px;
background: rgba(11, 16, 24, 0.98);
border: 1px solid var(--panel-border);
border-radius: 30px;
box-shadow: 0 28px 90px rgba(0, 0, 0, 0.54);
overflow: hidden;
}

.indicator-modal__head {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 18px;
}

.indicator-modal__head h2 {
margin: 0;
font-size: 34px;
line-height: 1.08;
color: #ffffff;
}

.indicator-modal__lead {
margin: 10px 0 0;
max-width: 620px;
line-height: 1.65;
color: #d7d0d0;
}

.indicator-modal__close {
width: 42px;
height: 42px;
border-radius: 50%;
border: 1px solid rgba(255, 255, 255, 0.32);
background: rgba(255, 255, 255, 0.03);
color: var(--text);
font-size: 24px;
line-height: 1;
cursor: pointer;
}

.indicator-modal__toolbar {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
gap: 14px;
align-items: end;
}

.indicator-search {
display: grid;
gap: 8px;
}

.indicator-search span {
font-size: 11px;
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--accent);
}

.indicator-search input {
width: 100%;
padding: 13px 16px;
border-radius: 16px;
border: 1px solid rgba(255, 255, 255, 0.3);
background: rgba(11, 16, 24, 0.94);
color: var(--text);
font: inherit;
}

.indicator-search input:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 2px rgba(236, 208, 111, 0.12);
}

.indicator-popular {
display: grid;
gap: 12px;
}

.indicator-popular__label {
font-size: 11px;
letter-spacing: 0.12em;
text-transform: uppercase;
color: rgba(255, 255, 255, 0.62);
}

.indicator-popular__chips {
display: flex;
flex-wrap: wrap;
gap: 10px;
}

.indicator-popular__chip {
padding: 10px 14px;
border-radius: 999px;
border: 1px solid rgba(255, 255, 255, 0.28);
background: rgba(255, 255, 255, 0.03);
color: var(--text);
font: inherit;
font-weight: 600;
cursor: pointer;
transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.indicator-popular__chip.is-active {
border-color: rgba(236, 208, 111, 0.4);
background: rgba(236, 208, 111, 0.14);
color: var(--accent);
}

.indicator-list {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 14px;
overflow-y: auto;
padding-right: 4px;
}

.indicator-list::-webkit-scrollbar {
width: 8px;
}

.indicator-list::-webkit-scrollbar-thumb {
background: rgba(236, 208, 111, 0.18);
border-radius: 999px;
}

.indicator-item {
display: grid;
grid-template-columns: minmax(0, 1fr);
gap: 16px;
padding: 18px;
border-radius: 22px;
border: 1px solid rgba(255, 255, 255, 0.18);
background: rgba(255, 255, 255, 0.03);
}

.indicator-item__meta {
display: grid;
gap: 8px;
}

.indicator-item__category {
display: inline-flex;
align-items: center;
justify-content: center;
width: fit-content;
padding: 6px 10px;
border-radius: 999px;
border: 1px solid rgba(236, 208, 111, 0.22);
background: rgba(236, 208, 111, 0.08);
font-size: 11px;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--accent);
}

.indicator-item__meta h3 {
margin: 0;
font-size: 20px;
line-height: 1.15;
color: #ffffff;
}

.indicator-item__meta p {
margin: 0;
line-height: 1.6;
color: #d7d0d0;
}

.indicator-item__toggle {
align-self: start;
padding: 12px 16px;
border-radius: 14px;
border: 1px solid rgba(255, 255, 255, 0.28);
background: rgba(11, 16, 24, 0.94);
color: var(--text);
font: inherit;
font-weight: 700;
cursor: pointer;
transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.indicator-item__toggle.is-active {
border-color: rgba(236, 208, 111, 0.4);
background: rgba(236, 208, 111, 0.14);
color: var(--accent);
}

.indicator-item__actions {
display: flex;
flex-wrap: wrap;
gap: 10px;
}

.indicator-item__secondary {
padding: 12px 16px;
border-radius: 14px;
border: 1px solid rgba(255, 255, 255, 0.22);
background: rgba(255, 255, 255, 0.03);
color: #d7d0d0;
font: inherit;
font-weight: 700;
cursor: pointer;
}

.indicator-item__secondary:hover,
.indicator-legend__action:hover {
border-color: rgba(236, 208, 111, 0.34);
color: var(--accent);
background: rgba(236, 208, 111, 0.08);
}

.indicator-settings-card {
display: grid;
gap: 16px;
padding: 18px;
border-radius: 24px;
border: 1px solid rgba(236, 208, 111, 0.18);
background: linear-gradient(180deg, rgba(236, 208, 111, 0.07), rgba(255, 255, 255, 0.02));
}

.indicator-settings-card__head {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 14px;
}

.indicator-settings-card__eyebrow {
display: block;
margin-bottom: 8px;
font-size: 11px;
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--accent);
}

.indicator-settings-card__head h3 {
margin: 0;
font-size: 24px;
line-height: 1.1;
color: #ffffff;
}

.indicator-settings-card__actions {
display: flex;
flex-wrap: wrap;
gap: 10px;
justify-content: flex-end;
}

.indicator-settings-card__fields {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 12px;
}

.indicator-settings-field {
display: grid;
gap: 8px;
}

.indicator-settings-field span {
font-size: 11px;
letter-spacing: 0.08em;
text-transform: uppercase;
color: rgba(255, 255, 255, 0.66);
}

.indicator-settings-field input {
width: 100%;
padding: 12px 14px;
border-radius: 14px;
border: 1px solid rgba(255, 255, 255, 0.28);
background: rgba(11, 16, 24, 0.92);
color: #ffffff;
font: inherit;
}

.indicator-settings-field input[type="color"] {
padding: 6px;
height: 46px;
}

.indicator-settings-card__hint {
margin: 0;
line-height: 1.6;
color: #d7d0d0;
}

.indicator-modal__empty {
margin: 0;
line-height: 1.6;
color: #d7d0d0;
}

.auth-tabs {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
margin-bottom: 14px;
}

.auth-tab {
padding: 12px 14px;
border-radius: 14px;
border: 1px solid rgba(255, 255, 255, 0.32);
background: rgba(255, 255, 255, 0.03);
color: var(--text);
font: inherit;
font-weight: 700;
cursor: pointer;
}

.auth-tab.is-active {
background: var(--accent);
border-color: var(--accent);
color: var(--accent-ink);
}

.auth-modal__message {
min-height: 22px;
margin: 0 0 12px;
font-size: 14px;
color: var(--muted);
}

.auth-modal__message.is-error {
color: #f87171;
}

.auth-modal__message.is-success {
color: #4ade80;
}

.auth-resend {
display: inline-flex;
align-items: center;
justify-content: center;
width: 100%;
margin: -2px 0 12px;
padding: 11px 14px;
border-radius: 14px;
border: 1px solid rgba(236, 208, 111, 0.28);
background: rgba(236, 208, 111, 0.08);
color: var(--accent);
font: inherit;
font-weight: 700;
cursor: pointer;
transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.auth-resend:hover {
border-color: rgba(236, 208, 111, 0.5);
background: rgba(236, 208, 111, 0.12);
color: var(--accent-strong);
}

.auth-form {
display: grid;
gap: 12px;
}

.auth-form__hint {
margin: -2px 0 2px;
font-size: 13px;
line-height: 1.5;
color: rgba(255, 255, 255, 0.72);
}

.auth-form__switch {
display: flex;
justify-content: flex-end;
margin: -2px 0 0;
}

.auth-form__switch--center {
justify-content: center;
margin: 0;
}

.auth-link-button {
padding: 0;
border: 0;
background: transparent;
color: var(--accent);
font: inherit;
font-size: 13px;
font-weight: 700;
cursor: pointer;
}

.auth-link-button:hover {
color: var(--accent-strong);
text-decoration: underline;
}

.auth-field {
display: grid;
gap: 6px;
}

.auth-field span {
font-size: 12px;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--accent);
}

.auth-field input {
width: 100%;
padding: 12px 14px;
border-radius: 14px;
border: 1px solid rgba(255, 255, 255, 0.3);
background: rgba(11, 16, 24, 0.92);
color: var(--text);
font: inherit;
}

.auth-field input:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 2px rgba(236, 208, 111, 0.12);
}

.auth-submit {
margin-top: 4px;
padding: 13px 16px;
border: 0;
border-radius: 16px;
background: var(--accent);
color: var(--accent-ink);
font: inherit;
font-weight: 800;
cursor: pointer;
}

.auth-submit:disabled,
.auth-tab:disabled,
.auth-modal__close:disabled,
.auth-resend:disabled,
.profile-trigger:disabled,
.profile-menu__item--button:disabled,
.auth-link-button:disabled {
opacity: 0.7;
cursor: wait;
}

.status-text {
display: block;
min-height: 22px;
font-size: 14px;
line-height: 1.55;
color: #ddd6d6;
}

.auth-submit--link {
display: inline-flex;
align-items: center;
justify-content: center;
text-decoration: none;
}

.auth-verify-shell {
display: flex;
align-items: center;
justify-content: center;
}

.auth-verify-card {
width: min(100%, 640px);
padding: 36px;
background: var(--panel);
border: 1px solid var(--panel-border);
border-radius: 28px;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.auth-verify-card--success {
border-color: rgba(74, 222, 128, 0.3);
}

.auth-verify-card--error {
border-color: rgba(248, 113, 113, 0.3);
}

.auth-verify-card h1 {
margin: 0 0 14px;
font-size: 40px;
line-height: 1.1;
}

.auth-verify-copy {
margin: 0;
font-size: 18px;
line-height: 1.7;
color: #ddd6d6;
}

.auth-verify-actions {
display: flex;
flex-wrap: wrap;
gap: 12px;
margin-top: 28px;
}

.sma-field {
display: grid;
gap: 6px;
}

.sma-field span {
font-size: 11px;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--accent);
}

.sma-field input {
width: 100%;
padding: 10px 12px;
border-radius: 12px;
border: 1px solid rgba(255, 255, 255, 0.3);
background: rgba(11, 16, 24, 0.92);
color: var(--text);
font: inherit;
}

.sma-field input:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 2px rgba(236, 208, 111, 0.12);
}

.workspace {
display: block;
position: relative;
margin-top: -4px;
min-width: 0;
overflow-x: clip;
}

.chart-column {
display: grid;
gap: 18px;
align-items: start;
min-width: 0;
padding-right: 74px;
transition: padding-right 0.28s ease;
}

.app-shell.is-inspector-open .chart-column {
padding-right: calc(86px + min(430px, calc(100vw - 210px)));
}

.inspector {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 0;
  pointer-events: none;
  z-index: 28;
}
.chart-stage {
position: relative;
min-height: calc(100vh - 168px);
padding: 0;
overflow: hidden;
background: transparent;
}

.chart-stage::before {
content: "";
position: absolute;
inset: 0;
opacity: 0;
pointer-events: none;
transition: background 0.2s ease;
border-radius: 18px;
display: none;
}

.chart-stage[data-zone="long"]::before {
background: none;
}

.chart-stage[data-zone="short"]::before {
background: none;
}

.zone-pill {
position: absolute;
top: 14px;
left: 70px;
z-index: 9;
padding: 8px 14px;
border-radius: 999px;
font-size: 12px;
letter-spacing: 0.12em;
text-transform: uppercase;
background: rgba(0, 0, 0, 0.88);
border: 1px solid rgba(255, 255, 255, 0.35);
}

.chart-stage[data-zone="long"] .zone-pill {
color: var(--long);
border-color: rgba(34, 197, 94, 0.4);
}

.chart-stage[data-zone="short"] .zone-pill {
color: var(--short);
border-color: rgba(239, 68, 68, 0.4);
}

#chart {
position: relative;
z-index: 1;
width: 100%;
height: 100%;
border-radius: 18px;
overflow: hidden;
}

.chart-shell {
position: relative;
width: 100%;
height: calc(100vh - 168px);
min-height: 520px;
border-radius: 18px;
overflow: hidden;
background: #0f0f0f;
border: 1px solid rgba(255, 255, 255, 0.28);
}

.inline-loader-spinner {
display: inline-flex;
width: 16px;
height: 16px;
border: 2px solid rgba(236, 208, 111, 0.16);
border-top-color: var(--accent);
border-radius: 50%;
animation: bt-spin 0.8s linear infinite;
flex-shrink: 0;
}

.chart-loader,
.panel-loader {
position: absolute;
left: 50%;
top: 50%;
z-index: 14;
display: inline-flex;
align-items: center;
gap: 10px;
padding: 12px 16px;
border-radius: 14px;
border: 1px solid rgba(236, 208, 111, 0.22);
background: rgba(17, 17, 18, 0.88);
box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
backdrop-filter: blur(12px);
transform: translate(-50%, -50%);
color: var(--text);
pointer-events: none;
}

.chart-loader.is-hidden,
.panel-loader.is-hidden {
display: none;
}

.chart-loader__label,
.panel-loader__label {
font-size: 14px;
font-weight: 600;
letter-spacing: 0.01em;
}

.drawing-toolbar {
position: absolute;
top: 14px;
left: 14px;
z-index: 10;
display: flex;
flex-direction: column;
gap: 8px;
padding: 8px 6px;
border-radius: 16px;
border: 1px solid rgba(255, 255, 255, 0.24);
background: rgba(6, 10, 20, 0.82);
backdrop-filter: blur(10px);
}

.drawing-favorites-toggle {
 position: relative;
 z-index: 1;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 width: 34px;
 height: 34px;
 margin-top: 10px;
 padding: 0;
 border-radius: 10px;
 border: 1px solid transparent;
 background: transparent;
 color: rgba(255, 255, 255, 0.74);
 cursor: pointer;
 transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.drawing-favorites-toggle:hover,
.drawing-favorites-toggle.is-active {
 border-color: rgba(236, 208, 111, 0.32);
 background: rgba(236, 208, 111, 0.12);
 color: var(--accent);
}

.drawing-favorites-toggle svg {
 width: 16px;
 height: 16px;
 stroke: currentColor;
 fill: none;
 stroke-width: 1.8;
 stroke-linecap: round;
 stroke-linejoin: round;
}

.drawing-favorites-dock {
  position: absolute;
  right: 14px;
  left: auto;
  top: clamp(110px, 22vh, 300px);
  z-index: 35;
  width: 56px;
  max-height: min(70dvh, 560px);
  display: grid;
  gap: 8px;
  padding: 8px 6px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(16, 18, 24, 0.97);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  }

.drawing-favorites-dock--fixed {
  cursor: default;
  }

.drawing-favorites-dock.is-hidden {
display: none;
}

.drawing-favorites-dock__head {
  display: none;
  }

.drawing-favorites-dock__list {
  display: grid;
  gap: 8px;
  max-height: min(60dvh, 520px);
  overflow: auto;
  padding-right: 0;
  justify-items: center;
  }

.drawing-favorites-dock__item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
  }

.drawing-favorites-dock__item:hover,
.drawing-favorites-dock__item.is-active {
border-color: rgba(236, 208, 111, 0.44);
background: rgba(236, 208, 111, 0.12);
color: var(--accent);
}

.drawing-favorites-dock__item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  }

.drawing-favorites-dock__item-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  }

.drawing-favorites-dock__item-label {
  display: none;
  }

.drawing-favorites-dock__empty {
  display: none;
  }

.drawing-favorites-dock__empty.is-hidden {
display: none;
}

.drawing-toolbar__button {
display: inline-flex;
align-items: center;
justify-content: center;
width: 34px;
height: 34px;
padding: 0;
border-radius: 10px;
border: 1px solid transparent;
background: transparent;
color: rgba(255, 255, 255, 0.74);
cursor: pointer;
transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.drawing-toolbar__button:hover,
.drawing-toolbar__button.is-active {
background: rgba(236, 208, 111, 0.12);
border-color: rgba(236, 208, 111, 0.28);
color: var(--accent);
}

.drawing-toolbar__button svg {
width: 18px;
height: 18px;
stroke: currentColor;
fill: none;
stroke-width: 1.8;
stroke-linecap: round;
stroke-linejoin: round;
}

.drawing-overlay {
position: absolute;
inset: 0;
z-index: 7;
pointer-events: none;
overflow: visible;
}

.drawing-overlay.is-interactive {
pointer-events: auto;
cursor: crosshair;
}

.drawing-overlay.is-eraser {
cursor: not-allowed;
}

.drawing-item {
  pointer-events: stroke;
  cursor: pointer;
}

.drawing-item line,
.drawing-item path,
.drawing-item rect {
  vector-effect: non-scaling-stroke;
}

.drawing-item rect {
  pointer-events: all;
}

.drawing-item--hvolume .drawing-volume-profile-bar,
.drawing-item--hvolume .drawing-volume-profile-poc {
  pointer-events: none;
}

.drawing-item.is-selected {
  filter: drop-shadow(0 0 10px rgba(96, 165, 250, 0.34));
  cursor: move;
}

.drawing-item.is-selected line,
.drawing-item.is-selected path,
.drawing-item.is-selected rect {
stroke-opacity: 1;
}

.drawing-item.is-draft {
opacity: 0.72;
}

.drawing-handle {
  fill: #0f172a;
  stroke: #3b82f6;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  cursor: grab;
}

.drawing-handle-hit {
  fill: transparent;
  stroke: transparent;
  pointer-events: all;
  cursor: grab;
}

.drawing-selection-toolbar {
position: absolute;
left: 50%;
top: 50%;
z-index: 12;
display: inline-flex;
align-items: center;
gap: 10px;
padding: 8px 10px;
border-radius: 16px;
border: 1px solid rgba(255, 255, 255, 0.3);
background: rgba(17, 17, 18, 0.96);
box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42);
backdrop-filter: blur(12px);
transform: translateX(-50%);
pointer-events: auto;
}

.drawing-selection-toolbar.is-hidden {
display: none;
}

.drawing-selection-toolbar__group {
display: inline-flex;
align-items: center;
gap: 6px;
}

.drawing-selection-toolbar__group + .drawing-selection-toolbar__group {
padding-left: 10px;
border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.drawing-selection-toolbar__width,
.drawing-selection-toolbar__delete {
border: 1px solid rgba(255, 255, 255, 0.26);
background: rgba(255, 255, 255, 0.03);
color: #f8fafc;
transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.drawing-selection-toolbar__color-trigger {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 width: 34px;
 height: 34px;
 padding: 0;
 border-radius: 10px;
 border: 1px solid rgba(255, 255, 255, 0.3);
 background: rgba(255, 255, 255, 0.03);
 color: #f8fafc;
 cursor: pointer;
 transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.16s ease;
}

.drawing-selection-toolbar__color-preview {
 width: 20px;
 height: 20px;
 border-radius: 5px;
 border: 1px solid rgba(255, 255, 255, 0.18);
 background: var(--swatch-color, var(--accent));
 box-shadow: inset 0 0 0 1px rgba(2, 6, 23, 0.72);
}

.drawing-selection-toolbar__width {
min-width: 48px;
height: 32px;
padding: 0 12px;
border-radius: 10px;
font: inherit;
font-size: 13px;
font-weight: 700;
cursor: pointer;
}

.drawing-selection-toolbar__delete {
display: inline-flex;
align-items: center;
justify-content: center;
width: 34px;
height: 34px;
padding: 0;
border-radius: 10px;
cursor: pointer;
}

.drawing-selection-toolbar__delete svg {
width: 16px;
height: 16px;
stroke: currentColor;
fill: none;
stroke-width: 1.8;
stroke-linecap: round;
stroke-linejoin: round;
}

.drawing-selection-toolbar__color-trigger:hover,
.drawing-selection-toolbar__width:hover,
.drawing-selection-toolbar__delete:hover {
border-color: rgba(236, 208, 111, 0.34);
transform: translateY(-1px);
}

.drawing-selection-toolbar__color-trigger.is-active {
 border-color: rgba(96, 165, 250, 0.75);
 background: rgba(96, 165, 250, 0.12);
}

.drawing-selection-toolbar__width.is-active {
border-color: rgba(236, 208, 111, 0.4);
background: rgba(236, 208, 111, 0.12);
color: var(--accent);
}

.drawing-selection-toolbar__delete:hover {
color: #f87171;
border-color: rgba(248, 113, 113, 0.34);
background: rgba(248, 113, 113, 0.08);
}

.drawing-color-popover {
 position: absolute;
 z-index: 16;
 width: min(320px, calc(100vw - 24px));
 padding: 10px 10px 12px;
 border-radius: 12px;
 border: 1px solid rgba(255, 255, 255, 0.34);
 background: rgba(18, 20, 28, 0.98);
 box-shadow: 0 16px 46px rgba(0, 0, 0, 0.42);
}

.drawing-color-popover.is-hidden {
 display: none;
}

.drawing-color-popover__grid {
 display: grid;
 grid-template-columns: repeat(10, minmax(0, 1fr));
 gap: 6px;
}

.drawing-color-popover__swatch {
 width: 100%;
 aspect-ratio: 1 / 1;
 border-radius: 4px;
 border: 1px solid rgba(255, 255, 255, 0.18);
 background: var(--swatch);
 cursor: pointer;
}

.drawing-color-popover__swatch:hover {
 border-color: rgba(236, 208, 111, 0.9);
}

.drawing-color-popover__custom-row {
 margin-top: 10px;
 display: flex;
 align-items: center;
 gap: 8px;
}

.drawing-color-popover__native {
 width: 40px;
 height: 30px;
 padding: 0;
 border-radius: 8px;
 border: 1px solid rgba(255, 255, 255, 0.34);
 background: rgba(12, 14, 20, 0.96);
 cursor: pointer;
}

.drawing-color-popover__opacity {
 margin-top: 10px;
 display: grid;
 gap: 6px;
}

.drawing-color-popover__opacity > span {
 font-size: 12px;
 color: rgba(255, 255, 255, 0.72);
}

.drawing-color-popover__opacity-row {
 display: grid;
 grid-template-columns: minmax(0, 1fr) auto;
 align-items: center;
 gap: 8px;
}

.drawing-color-popover__opacity-row input[type="range"] {
 width: 100%;
}

.drawing-color-popover__opacity-row strong {
 font-size: 13px;
 color: #ffffff;
}

.indicator-legend {
position: absolute;
top: 56px;
left: 70px;
z-index: 8;
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 6px;
max-width: min(420px, 34vw);
pointer-events: none;
}

.indicator-legend.is-empty {
display: none;
}

.indicator-legend__item {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
min-height: 30px;
padding: 4px 8px;
border-radius: 10px;
border: 1px solid rgba(255, 255, 255, 0.28);
background: rgba(6, 10, 20, 0.82);
backdrop-filter: blur(10px);
color: #ffffff;
font: inherit;
font-size: 12px;
font-weight: 700;
pointer-events: auto;
}

.indicator-legend__item.is-muted {
opacity: 0.52;
}

.indicator-legend__main {
display: inline-flex;
align-items: center;
gap: 8px;
min-width: 0;
}

.indicator-legend__label {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.indicator-legend__actions {
display: inline-flex;
align-items: center;
gap: 4px;
opacity: 0;
transform: translateX(4px);
transition: opacity 0.16s ease, transform 0.16s ease;
}

.indicator-legend__item:hover .indicator-legend__actions,
.indicator-legend__item:focus-within .indicator-legend__actions {
opacity: 1;
transform: translateX(0);
}

.indicator-legend__action {
display: inline-flex;
align-items: center;
justify-content: center;
width: 24px;
height: 24px;
padding: 0;
border-radius: 8px;
border: 1px solid rgba(255, 255, 255, 0.22);
background: rgba(255, 255, 255, 0.03);
color: rgba(255, 255, 255, 0.76);
cursor: pointer;
}

.indicator-legend__action svg {
width: 14px;
height: 14px;
stroke: currentColor;
fill: none;
stroke-width: 1.8;
stroke-linecap: round;
stroke-linejoin: round;
}

.indicator-legend__dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: var(--indicator-accent, var(--accent));
box-shadow: 0 0 0 4px rgba(236, 208, 111, 0.12);
}

.zone-overlay {
position: absolute;
inset: 0;
z-index: 5;
pointer-events: none;
overflow: hidden;
}

.fib-overlay {
position: absolute;
inset: 0;
z-index: 6;
pointer-events: none;
overflow: hidden;
}

.zone-band {
position: absolute;
top: 0;
bottom: 0;
min-width: 1px;
}

.zone-band--long {
background: linear-gradient(180deg, rgba(34, 197, 94, 0.18), rgba(34, 197, 94, 0.08));
}

.zone-band--short {
background: linear-gradient(180deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.08));
}

.zone-band.zone-band--active {
box-shadow: none;
}

.trend-overlay-svg {
width: 100%;
height: 100%;
display: block;
overflow: visible;
}

.trend-ray {
fill: none;
stroke-width: 2.5;
stroke-linecap: round;
vector-effect: non-scaling-stroke;
opacity: 0.96;
}

.trend-ray--anchor {
stroke-width: 3;
}

.trend-ray--extension {
opacity: 0.82;
}

.trend-ray--long {
stroke: rgba(34, 197, 94, 0.92);
}

.trend-ray--short {
stroke: rgba(239, 68, 68, 0.92);
}

.trend-anchor {
stroke-width: 1.5;
vector-effect: non-scaling-stroke;
}

.trend-anchor--long {
fill: rgba(34, 197, 94, 0.98);
stroke: rgba(7, 18, 10, 0.9);
}

.trend-anchor--short {
fill: rgba(239, 68, 68, 0.98);
stroke: rgba(38, 8, 8, 0.9);
}

.trend-setup-line {
stroke: rgba(236, 208, 111, 0.96);
stroke-width: 2;
stroke-dasharray: 6 6;
vector-effect: non-scaling-stroke;
opacity: 0.9;
}

.fib-level {
position: absolute;
left: 0;
right: 0;
transform: translateY(-50%);
}

.fib-level__line {
position: absolute;
top: 50%;
border-top-style: solid;
transform: translateY(-50%);
opacity: 0.95;
}

.fib-level__label {
position: absolute;
right: 88px;
top: -4px;
transform: translateY(-100%);
font-size: 12px;
font-weight: 700;
letter-spacing: 0.01em;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
white-space: nowrap;
}

.fib-countertrend-line {
position: absolute;
height: 0;
border-top: 2px solid;
transform-origin: left center;
opacity: 0.96;
filter: drop-shadow(0 0 10px rgba(2, 6, 23, 0.44));
}

.fib-countertrend-point {
position: absolute;
width: 8px;
height: 8px;
border-radius: 50%;
border: 1.5px solid;
transform: translate(-50%, -50%);
box-shadow: 0 0 0 3px rgba(2, 6, 23, 0.4);
}

.fib-countertrend-label {
position: absolute;
transform: translateY(-100%);
font-size: 11px;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
white-space: nowrap;
}

.panel-card {
padding: 18px;
}

.access-guard {
position: relative;
isolation: isolate;
}

.access-guard > :not(.access-veil) {
position: relative;
z-index: 1;
transition: filter 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.access-veil {
position: absolute;
inset: 0;
z-index: 8;
display: none;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 26px;
text-align: center;
border-radius: inherit;
background:
linear-gradient(180deg, rgba(10, 10, 12, 0.68), rgba(10, 10, 12, 0.82)),
radial-gradient(circle at top, rgba(236, 208, 111, 0.09), transparent 52%);
backdrop-filter: blur(8px);
}

.access-veil__copy {
display: grid;
justify-items: center;
gap: 8px;
max-width: 360px;
}

.access-veil__copy strong {
font-size: 20px;
line-height: 1.15;
color: #ffffff;
}

.access-veil__copy span {
line-height: 1.6;
color: #ddd3d3;
}

.access-veil__actions {
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
flex-wrap: wrap;
margin-top: 6px;
}

.access-veil__auth-button {
min-height: 36px;
padding: 0 16px;
border-radius: 999px;
border: 1px solid rgba(236, 208, 111, 0.28);
background: rgba(15, 19, 30, 0.86);
color: #f8fafc;
font: inherit;
font-weight: 700;
letter-spacing: 0.02em;
cursor: pointer;
transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.16s ease;
}

.access-veil__auth-button.is-primary {
background: linear-gradient(135deg, #ecd06f, #d7b64d);
border-color: rgba(236, 208, 111, 0.72);
color: #121111;
}

.access-veil__auth-button:hover {
transform: translateY(-1px);
border-color: rgba(236, 208, 111, 0.56);
}

.access-veil__icon {
position: relative;
display: inline-flex;
width: 58px;
height: 58px;
margin-bottom: 14px;
border-radius: 50%;
border: 1px solid rgba(236, 208, 111, 0.2);
background: rgba(236, 208, 111, 0.08);
}

.access-veil__icon::before {
content: "";
position: absolute;
left: 12px;
right: 12px;
top: 21px;
height: 12px;
border: 2px solid rgba(236, 208, 111, 0.92);
border-radius: 999px / 90px;
}

.access-veil__icon::after {
content: "";
position: absolute;
width: 34px;
height: 2px;
left: 11px;
top: 27px;
background: rgba(236, 208, 111, 0.96);
transform: rotate(-35deg);
transform-origin: center;
box-shadow: 0 0 0 1px rgba(236, 208, 111, 0.14);
}

.app-shell.is-guest .access-guard > :not(.access-veil) {
filter: blur(10px);
opacity: 0.24;
pointer-events: none;
user-select: none;
}

.app-shell.is-guest .access-guard .access-veil {
display: flex;
}

.logic-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
gap: 12px;
}

.logic-group + .logic-group {
margin-top: 18px;
}

.logic-toggle {
padding: 14px 16px;
border-radius: 16px;
border: 1px solid rgba(255, 255, 255, 0.32);
background: rgba(11, 16, 24, 0.94);
color: var(--text);
font: inherit;
font-weight: 700;
letter-spacing: 0.04em;
text-transform: uppercase;
cursor: pointer;
transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.logic-toggle:hover {
border-color: var(--accent);
color: var(--accent);
transform: translateY(-1px);
}

.logic-toggle.is-active {
background: var(--accent);
border-color: var(--accent);
color: var(--accent-ink);
}

.logic-copy {
margin: 14px 0 0;
line-height: 1.5;
color: #ddd6d6;
}

.logic-copy--compact {
margin-top: 8px;
font-size: 13px;
line-height: 1.46;
}

.logic-input-field {
display: grid;
gap: 7px;
}

.logic-input-field span {
font-size: 11px;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--accent);
}

.logic-input-field input {
padding: 10px 12px;
border-radius: 12px;
border: 1px solid rgba(255, 255, 255, 0.3);
background: rgba(11, 16, 24, 0.92);
color: var(--text);
font: inherit;
}

.logic-input-field input:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 2px rgba(236, 208, 111, 0.12);
}

.logic-entry-levels {
display: grid;
gap: 10px;
}

.logic-entry-levels__row {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
gap: 10px;
align-items: center;
}

.logic-entry-levels__toggle {
display: inline-flex;
align-items: center;
gap: 10px;
padding: 10px 12px;
border-radius: 12px;
border: 1px solid rgba(255, 255, 255, 0.3);
background: rgba(11, 16, 24, 0.86);
color: var(--text);
cursor: pointer;
}

.logic-entry-levels__toggle input {
accent-color: var(--accent);
}

.logic-entry-levels__toggle span {
font-weight: 700;
letter-spacing: 0.02em;
}

.logic-entry-levels__percent {
display: grid;
gap: 6px;
}

.logic-entry-levels__percent span {
font-size: 10px;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--accent);
}

.logic-entry-levels__percent input {
padding: 10px 12px;
border-radius: 12px;
border: 1px solid rgba(255, 255, 255, 0.3);
background: rgba(11, 16, 24, 0.92);
color: var(--text);
font: inherit;
}

.logic-entry-levels__percent input:disabled {
opacity: 0.5;
cursor: not-allowed;
}

.logic-entry-levels__percent input:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 2px rgba(236, 208, 111, 0.12);
}

@media (max-width: 620px) {
.logic-entry-levels__row {
grid-template-columns: 1fr;
}
}

.telegram-test {
display: grid;
gap: 14px;
}

.telegram-test__field {
display: grid;
gap: 8px;
}

.telegram-test__field span {
font-size: 12px;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--accent);
}

.telegram-test__field textarea {
width: 100%;
min-height: 120px;
padding: 14px 16px;
border-radius: 18px;
border: 1px solid rgba(255, 255, 255, 0.32);
background: rgba(11, 16, 24, 0.94);
color: var(--text);
font: inherit;
resize: vertical;
}

.telegram-test__field textarea:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 2px rgba(236, 208, 111, 0.12);
}

.telegram-test__actions {
display: flex;
justify-content: flex-start;
}

.telegram-test__status {
min-height: 20px;
margin: 0;
font-size: 14px;
color: var(--muted);
}

.telegram-test__status.is-success {
color: #4ade80;
}

.telegram-test__status.is-error {
color: #f87171;
}

.trades-panel {
display: grid;
gap: 16px;
position: relative;
}

.trades-panel .panel-head {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: flex-end;
gap: 14px;
}

.trade-view-switch {
display: flex;
flex-wrap: wrap;
gap: 10px;
}

.trade-view-button {
padding: 10px 14px;
border-radius: 999px;
border: 1px solid rgba(255, 255, 255, 0.32);
background: rgba(11, 16, 24, 0.94);
color: var(--text);
font: inherit;
cursor: pointer;
transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.trade-view-button:hover {
border-color: var(--accent);
color: var(--accent);
}

.trade-view-button.is-active {
background: var(--accent);
border-color: var(--accent);
color: var(--accent-ink);
font-weight: 700;
}

.trade-toolbar {
display: flex;
flex-wrap: wrap;
gap: 12px;
}

.filter-field {
display: grid;
gap: 6px;
min-width: 120px;
}

@media (max-width: 1500px) {
.topbar {
grid-template-columns: repeat(2, minmax(220px, 1fr));
align-items: stretch;
}
}

@media (max-width: 900px) {
.auth-strip {
padding: 0;
margin-left: -22px;
margin-right: -22px;
}

.auth-strip__inner {
flex-direction: column;
align-items: stretch;
padding: 12px 0;
padding-left: 14px;
padding-right: 14px;
}

.auth-toolbar {
width: 100%;
}

.auth-select-field {
width: 100%;
}

.topbar {
grid-template-columns: 1fr;
}

.auth-strip__inner {
justify-content: stretch;
}

.auth-guest,
.auth-user {
justify-content: stretch;
}

.profile-menu {
left: 20px;
right: 20px;
}
}

.filter-field span {
font-size: 11px;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--accent);
}

.filter-field select {
padding: 10px 12px;
border-radius: 12px;
border: 1px solid rgba(255, 255, 255, 0.3);
background: rgba(11, 16, 24, 0.92);
color: var(--text);
}

.filter-field input {
padding: 10px 12px;
border-radius: 12px;
border: 1px solid rgba(255, 255, 255, 0.3);
background: rgba(11, 16, 24, 0.92);
color: var(--text);
font: inherit;
}

.filter-field input:focus,
.filter-field select:focus,
.trade-view-button:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 2px rgba(236, 208, 111, 0.12);
}

.filter-field--deposit {
min-width: 150px;
}

.trade-view-panel {
display: none;
}

.trade-view-panel.is-active {
display: grid;
gap: 16px;
}

.trade-summary {
display: grid;
grid-template-columns: repeat(6, minmax(0, 1fr));
gap: 12px;
}

.trade-card {
padding: 12px;
border-radius: 16px;
background: rgba(11, 16, 24, 0.9);
border: 1px solid rgba(255, 255, 255, 0.22);
}

.trade-card dt {
margin: 0 0 6px;
font-size: 11px;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--accent);
}

.trade-card dd {
margin: 0;
font-size: 20px;
font-weight: 700;
}

.trade-card--positive dd {
color: var(--long);
}

.trade-card--negative dd {
color: var(--short);
}

.equity-card {
display: grid;
gap: 16px;
padding: 16px;
border-radius: 18px;
background: rgba(11, 16, 24, 0.9);
border: 1px solid rgba(255, 255, 255, 0.22);
}

.equity-card__head {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: flex-end;
gap: 12px;
}

.equity-kicker {
margin: 0 0 6px;
font-size: 11px;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--accent);
}

.equity-card__head h3 {
margin: 0;
font-size: 20px;
color: var(--text);
}

.equity-caption {
font-size: 13px;
color: var(--muted);
}

.equity-chart-wrap {
border-radius: 16px;
overflow: hidden;
border: 1px solid rgba(255, 255, 255, 0.18);
background:
linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 28%),
rgba(11, 11, 14, 0.95);
min-height: 320px;
}

.equity-chart {
display: block;
width: 100%;
height: 320px;
overflow: visible;
}

.equity-chart text {
 font-family: "Montserrat", "Segoe UI", "Trebuchet MS", Arial, sans-serif;
fill: #b1a8a8;
font-size: 13px;
text-rendering: geometricPrecision;
-webkit-font-smoothing: antialiased;
font-smooth: always;
}

.equity-chart .grid-line {
stroke: rgba(255, 255, 255, 0.18);
stroke-width: 1;
shape-rendering: crispEdges;
}

.equity-chart .baseline {
stroke: rgba(236, 208, 111, 0.28);
stroke-width: 1;
stroke-dasharray: 4 4;
}

.equity-chart .equity-area {
fill: rgba(236, 208, 111, 0.12);
}

.equity-chart .equity-line {
fill: none;
stroke: #ecd06f;
stroke-width: 2.5;
stroke-linejoin: round;
stroke-linecap: round;
}

.equity-chart .equity-point {
fill: #ecd06f;
stroke: rgba(11, 11, 14, 0.95);
stroke-width: 2;
}

.equity-chart .equity-point--open {
fill: #22c55e;
}

.trade-table-wrap {
overflow: auto;
border-radius: 16px;
border: 1px solid rgba(255, 255, 255, 0.22);
background: rgba(11, 16, 24, 0.86);
}

.trade-table {
width: 100%;
border-collapse: collapse;
min-width: 760px;
}

.trade-table th,
.trade-table td {
padding: 12px 14px;
text-align: left;
border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.trade-table th {
font-size: 11px;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--accent);
background: rgba(11, 16, 24, 0.98);
position: sticky;
top: 0;
z-index: 1;
}

.trade-table td {
font-size: 14px;
color: #e6e0e0;
}

.trade-entry-allocation {
display: inline-block;
margin-top: 2px;
font-size: 11px;
letter-spacing: 0.04em;
text-transform: uppercase;
color: var(--accent);
}

.trade-table tbody tr:hover {
background: rgba(236, 208, 111, 0.08);
}

.trade-side {
font-weight: 700;
text-transform: uppercase;
}

.trade-side--long {
color: var(--long);
}

.trade-side--short {
color: var(--short);
}

.trade-status {
font-weight: 700;
text-transform: uppercase;
}

.trade-status--open {
color: var(--accent);
}

.trade-status--closed {
color: #e6e0e0;
}

.trade-pnl--positive {
color: var(--long);
font-weight: 700;
}

.trade-pnl--negative {
color: var(--short);
font-weight: 700;
}

.trade-pnl--flat {
color: #e6e0e0;
font-weight: 700;
}

.trade-empty {
text-align: center;
color: var(--muted);
}

.panel-head {
margin-bottom: 16px;
}

.metric-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 12px;
margin: 0;
}

.metric-card {
padding: 12px;
border-radius: 16px;
background: rgba(11, 16, 24, 0.9);
border: 1px solid rgba(255, 255, 255, 0.22);
}

.metric-card dt {
margin: 0 0 6px;
font-size: 11px;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--accent);
}

.metric-card dd {
margin: 0;
font-size: 15px;
line-height: 1.45;
}

.metric-card strong {
font-size: 18px;
}

.metric-card.metric-card--zone-long strong,
.event-badge.event-badge--long {
color: var(--long);
}

.metric-card.metric-card--zone-short strong,
.event-badge.event-badge--short {
color: var(--short);
}

.event-list {
display: grid;
gap: 12px;
list-style: none;
margin: 0;
padding: 0;
max-height: calc(100vh - 280px);
overflow: auto;
}

.event-item {
padding: 14px;
border-radius: 18px;
background: rgba(11, 16, 24, 0.92);
border: 1px solid rgba(255, 255, 255, 0.22);
}

.event-topline {
display: flex;
justify-content: space-between;
gap: 12px;
align-items: center;
margin-bottom: 8px;
}

.event-badge {
font-size: 12px;
letter-spacing: 0.08em;
text-transform: uppercase;
}

.event-result {
font-size: 12px;
color: #ddd6d6;
}

.event-title,
.event-copy {
margin: 0;
line-height: 1.5;
}

.event-copy {
margin-top: 6px;
color: #ddd6d6;
}

.event-copy.event-copy--muted {
color: var(--muted);
}

@media (max-width: 1180px) {
.topbar,
.workspace {
display: block;
}

.chart-stage {
min-height: 70vh;
}

}

@media (max-width: 720px) {
.app-shell {
  padding: 14px;
  }

.brand-block,
.toolbar-group,
.panel-card,
.chart-stage {
border-radius: 20px;
}

.toolbar-group {
position: relative;
z-index: 41;
overflow: visible;
}

.metric-grid {
  grid-template-columns: 1fr;
  }

.workspace-nav {
  margin-left: -14px;
}

.trade-summary {
grid-template-columns: 1fr 1fr;
}

.trade-view-switch {
width: 100%;
}

.trade-view-button {
flex: 1 1 0;
text-align: center;
}

#chart {
height: calc(100vh - 260px);
min-height: 420px;
}

.chart-shell {
height: calc(100vh - 260px);
min-height: 420px;
}
}

.app-shell--content {
max-width: 1460px;
margin: 0 auto;
}

.content-topbar,
.analytics-hero-card,
.analytics-summary-card,
.analytics-feature-card,
.analytics-post-card,
.analytics-empty-state,
.analytics-post-hero,
.analytics-article-card,
.analytics-sidebar-card,
.analytics-admin-form-card,
.analytics-admin-list-card {
padding: 28px;
}

.content-topbar {
display: flex;
justify-content: space-between;
align-items: flex-end;
gap: 24px;
}

.content-topbar__copy h1,
.analytics-empty-state h1,
.analytics-empty-state h2,
.analytics-post-hero h1 {
margin: 0;
font-size: clamp(32px, 4.8vw, 54px);
line-height: 1.02;
color: #ffffff;
max-width: 13ch;
}

.content-topbar__lead,
.analytics-post-hero__lead {
margin: 12px 0 0;
max-width: 780px;
font-size: 18px;
line-height: 1.7;
color: #ddd6d6;
}

.content-topbar__actions,
.analytics-card-actions,
.analytics-admin-actions,
.analytics-admin-item__actions {
display: flex;
flex-wrap: wrap;
gap: 12px;
align-items: center;
}

.analytics-hero-grid {
display: grid;
grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
gap: 18px;
margin-top: 18px;
}

.analytics-hero-card h2,
.analytics-feature-card__copy h2,
.analytics-sidebar-card h2,
.analytics-admin-form-card h2,
.analytics-admin-list-card h2 {
margin: 0;
font-size: clamp(26px, 3vw, 40px);
line-height: 1.08;
color: #ffffff;
max-width: 18ch;
}

.analytics-hero-card p,
.analytics-summary-copy,
.analytics-feature-card__copy p,
.analytics-post-card__body p,
.analytics-sidebar-card p,
.analytics-empty-state p,
.analytics-admin-item p {
margin: 0;
font-size: 17px;
line-height: 1.72;
color: #d8d0d0;
}

.analytics-hero-tags {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-top: 18px;
}

.analytics-hero-tags span,
.analytics-badge {
display: inline-flex;
align-items: center;
padding: 8px 14px;
border-radius: 999px;
border: 1px solid rgba(236, 208, 111, 0.28);
background: rgba(236, 208, 111, 0.08);
font-size: 12px;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--accent);
}

.analytics-summary-card {
display: grid;
align-content: space-between;
gap: 18px;
}

.analytics-summary-metric {
display: grid;
gap: 8px;
}

.analytics-summary-metric strong {
font-size: clamp(42px, 6vw, 72px);
line-height: 0.9;
color: #ffffff;
}

.analytics-summary-metric span {
font-size: 14px;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--accent);
}

.analytics-feature-card {
display: grid;
grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
gap: 24px;
align-items: stretch;
margin-top: 18px;
}

.analytics-feature-card__copy,
.analytics-post-card__body {
display: grid;
gap: 16px;
align-content: start;
}

.analytics-post-meta {
display: flex;
flex-wrap: wrap;
gap: 10px 12px;
align-items: center;
font-size: 12px;
letter-spacing: 0.05em;
text-transform: uppercase;
color: var(--muted);
}

.analytics-feature-card__media,
.analytics-post-card__media,
.analytics-post-hero__media {
overflow: hidden;
border-radius: 22px;
border: 1px solid rgba(255, 255, 255, 0.22);
background: rgba(11, 16, 24, 0.92);
}

.analytics-feature-card__media {
min-height: 320px;
}

.analytics-feature-card__media img,
.analytics-post-card__media img,
.analytics-post-hero__media img {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
}

.analytics-card-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 18px;
margin-top: 18px;
}

.analytics-post-card {
display: flex;
flex-direction: column;
gap: 18px;
min-height: 100%;
}

.analytics-post-card__media {
aspect-ratio: 16 / 9;
}

.analytics-post-card__body h3,
.analytics-admin-item__copy h3 {
margin: 0;
font-size: 28px;
line-height: 1.12;
color: #ffffff;
}

.analytics-empty-state {
display: grid;
justify-items: center;
gap: 16px;
margin-top: 18px;
text-align: center;
}

.analytics-empty-state--compact {
margin-top: 0;
padding: 0;
text-align: left;
}

.analytics-post-hero {
display: grid;
grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.85fr);
gap: 24px;
align-items: stretch;
}

.analytics-post-page .analytics-post-hero {
grid-template-columns: minmax(0, 1fr);
}

.analytics-post-page .analytics-post-hero__media {
min-height: 320px;
}

.analytics-post-hero__copy {
display: grid;
gap: 16px;
align-content: start;
}

.analytics-post-layout {
display: grid;
grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.8fr);
gap: 18px;
margin-top: 18px;
align-items: start;
}

.analytics-post-page .analytics-post-layout {
grid-template-columns: minmax(0, 1fr);
}

.analytics-post-page .analytics-post-sidebar {
display: none;
}

.analytics-article-prose {
font-size: 18px;
line-height: 1.82;
color: #ece2e2;
}

.analytics-article-prose > *:first-child {
margin-top: 0;
}

.analytics-article-prose h2,
.analytics-article-prose h3 {
margin: 28px 0 14px;
color: #ffffff;
line-height: 1.15;
}

.analytics-article-prose .analytics-article-subtitle {
margin: 30px 0 12px;
font-size: 30px;
line-height: 1.12;
color: #ffffff;
}

.analytics-article-prose h2 {
font-size: 34px;
}

.analytics-article-prose h3 {
font-size: 26px;
}

.analytics-article-prose p,
.analytics-article-prose ul,
.analytics-article-prose blockquote {
margin: 0 0 18px;
}

.analytics-article-prose ul {
padding-left: 24px;
}

.analytics-article-prose li + li {
margin-top: 8px;
}

.analytics-article-prose blockquote {
padding: 18px 20px;
border-left: 3px solid var(--accent);
border-radius: 0 18px 18px 0;
background: rgba(236, 208, 111, 0.06);
color: #f3ecec;
}

.analytics-post-sidebar {
display: grid;
gap: 18px;
}

.analytics-related-list {
display: grid;
gap: 12px;
}

.analytics-related-item {
display: grid;
gap: 6px;
padding: 16px 18px;
border-radius: 18px;
border: 1px solid rgba(255, 255, 255, 0.18);
background: rgba(11, 16, 24, 0.84);
text-decoration: none;
color: inherit;
transition: border-color 0.18s ease, transform 0.18s ease;
}

.analytics-related-item:hover {
border-color: rgba(236, 208, 111, 0.4);
transform: translateY(-1px);
}

.analytics-related-item strong {
font-size: 18px;
line-height: 1.28;
color: #ffffff;
}

.analytics-related-item span {
font-size: 15px;
line-height: 1.62;
color: #d4cccc;
}

.analytics-flash {
margin-top: 18px;
padding: 14px 18px;
border-radius: 18px;
border: 1px solid rgba(255, 255, 255, 0.24);
font-size: 15px;
line-height: 1.5;
}

.analytics-flash--success {
background: rgba(34, 197, 94, 0.12);
border-color: rgba(34, 197, 94, 0.28);
color: #d9ffe6;
}

.analytics-flash--error {
background: rgba(239, 68, 68, 0.12);
border-color: rgba(239, 68, 68, 0.28);
color: #ffd8d8;
}

.analytics-admin-layout {
display: grid;
grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
gap: 18px;
margin-top: 18px;
align-items: start;
}

.analytics-admin-form,
.analytics-admin-list {
display: grid;
gap: 16px;
}

.analytics-admin-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 16px;
}

.analytics-field {
display: grid;
gap: 8px;
}

.analytics-field span {
font-size: 12px;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--accent);
}

.analytics-field input,
.analytics-field select,
.analytics-field textarea {
width: 100%;
padding: 14px 16px;
border-radius: 16px;
border: 1px solid rgba(255, 255, 255, 0.24);
background: rgba(11, 16, 24, 0.9);
color: var(--text);
font: inherit;
}

.analytics-field textarea {
resize: vertical;
min-height: 130px;
}

.analytics-field input:focus,
.analytics-field select:focus,
.analytics-field textarea:focus {
outline: none;
border-color: rgba(236, 208, 111, 0.42);
box-shadow: 0 0 0 3px rgba(236, 208, 111, 0.1);
}

.analytics-checkbox {
align-content: end;
}

.analytics-checkbox input {
width: 20px;
height: 20px;
margin: 0;
accent-color: var(--accent);
}

.analytics-admin-item {
display: grid;
gap: 16px;
padding: 18px;
border-radius: 20px;
border: 1px solid rgba(255, 255, 255, 0.18);
background: rgba(11, 16, 24, 0.88);
}

.analytics-admin-item__copy {
display: grid;
gap: 12px;
}

.analytics-content-builder {
display: grid;
gap: 14px;
padding: 16px;
border-radius: 18px;
border: 1px solid rgba(255, 255, 255, 0.24);
background: rgba(16, 18, 32, 0.6);
}

.analytics-content-builder__list {
display: grid;
gap: 12px;
}

.analytics-content-builder__actions {
display: flex;
flex-wrap: wrap;
gap: 10px;
}

.analytics-content-builder__hint {
margin: 0;
font-size: 13px;
line-height: 1.5;
color: #a9a4a4;
}

.analytics-content-block {
display: grid;
gap: 12px;
padding: 14px;
border-radius: 14px;
border: 1px solid rgba(255, 255, 255, 0.2);
background: rgba(11, 16, 24, 0.86);
}

.analytics-content-block__header {
display: flex;
justify-content: space-between;
align-items: center;
gap: 10px;
}

.analytics-content-block__title {
font-size: 14px;
line-height: 1.25;
color: #f3ecec;
}

.analytics-content-block__controls {
display: flex;
gap: 8px;
}

.analytics-content-block__controls .control-button {
min-height: 32px;
padding: 0 11px;
font-size: 12px;
}

.analytics-content-block__body {
display: grid;
gap: 10px;
}

.analytics-content-upload__status {
font-size: 13px;
line-height: 1.45;
color: #9fdab8;
}

.analytics-content-upload__status.is-error {
color: #ff9c9c;
}

.analytics-content-upload__preview {
display: grid;
gap: 10px;
padding: 10px;
border-radius: 14px;
border: 1px solid rgba(255, 255, 255, 0.2);
background: rgba(16, 18, 32, 0.72);
}

.analytics-content-upload__preview img {
display: block;
width: 100%;
max-height: 340px;
object-fit: cover;
border-radius: 10px;
}

.analytics-article-image {
margin: 0 0 22px;
padding: 8px;
border-radius: 20px;
border: 1px solid rgba(255, 255, 255, 0.22);
background: rgba(16, 18, 32, 0.78);
}

.analytics-article-image img {
display: block;
width: 100%;
height: auto;
border-radius: 14px;
}

.analytics-article-image figcaption {
margin-top: 8px;
font-size: 13px;
line-height: 1.5;
color: #a9a4a4;
text-align: center;
}

.control-button--danger {
border-color: rgba(239, 68, 68, 0.38);
color: #ffd1d1;
}

.control-button--danger:hover {
border-color: rgba(239, 68, 68, 0.58);
color: #fff0f0;
}

@media (max-width: 1180px) {
.content-topbar,
.analytics-feature-card,
.analytics-post-hero,
.analytics-post-layout,
.analytics-admin-layout,
.analytics-hero-grid {
grid-template-columns: 1fr;
}

.content-topbar {
display: grid;
align-items: start;
}

.analytics-card-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}

@media (max-width: 720px) {
.app-shell--content {
padding: 14px;
}

.content-topbar,
.analytics-hero-card,
.analytics-summary-card,
.analytics-feature-card,
.analytics-post-card,
.analytics-empty-state,
.analytics-post-hero,
.analytics-article-card,
.analytics-sidebar-card,
.analytics-admin-form-card,
.analytics-admin-list-card {
padding: 22px;
}

.content-topbar__copy h1,
.analytics-empty-state h1,
.analytics-empty-state h2,
.analytics-post-hero h1 {
max-width: none;
font-size: 34px;
}

.analytics-hero-card h2,
.analytics-feature-card__copy h2,
.analytics-sidebar-card h2,
.analytics-admin-form-card h2,
.analytics-admin-list-card h2 {
font-size: 28px;
max-width: none;
}

.analytics-card-grid,
.analytics-admin-grid {
grid-template-columns: 1fr;
}

.analytics-post-card__body h3,
.analytics-admin-item__copy h3 {
font-size: 24px;
}

.analytics-content-block__header {
align-items: flex-start;
flex-direction: column;
}

.analytics-content-block__controls {
width: 100%;
}

.analytics-content-block__controls .control-button {
flex: 1 1 0;
justify-content: center;
}

.analytics-article-prose {
font-size: 17px;
}
}

.auth-system-summary {
display: grid;
gap: 2px;
}

.auth-system-summary__eyebrow {
font-size: 11px;
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--accent);
}

.auth-system-summary__title {
font-size: 15px;
font-weight: 700;
color: #ffffff;
}

.chart-tabs-bar {
display: flex;
align-items: center;
gap: 10px;
padding: 10px 14px;
margin-bottom: 10px;
overflow: hidden;
}

.chart-tabs {
display: flex;
align-items: center;
gap: 8px;
min-width: 0;
flex: 1 1 auto;
overflow-x: auto;
scrollbar-width: thin;
}

.chart-tabs::-webkit-scrollbar {
height: 6px;
}

.chart-tabs::-webkit-scrollbar-thumb {
background: rgba(236, 208, 111, 0.24);
border-radius: 999px;
}

.chart-tab {
display: inline-flex;
align-items: center;
gap: 10px;
min-width: 0;
max-width: 220px;
padding: 10px 12px;
border-radius: 14px;
border: 1px solid rgba(255, 255, 255, 0.22);
background: rgba(255, 255, 255, 0.03);
color: var(--muted);
cursor: pointer;
transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.chart-tab:hover {
border-color: rgba(236, 208, 111, 0.34);
color: var(--text);
}

.chart-tab.is-active {
border-color: rgba(236, 208, 111, 0.48);
background: rgba(236, 208, 111, 0.1);
color: var(--text);
}

.chart-tab__dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: rgba(236, 208, 111, 0.28);
flex-shrink: 0;
}

.chart-tab.is-active .chart-tab__dot {
background: var(--accent);
box-shadow: 0 0 0 4px rgba(236, 208, 111, 0.12);
}

.chart-tab__meta {
display: grid;
gap: 2px;
min-width: 0;
flex: 1 1 auto;
}

.chart-tab__symbol,
.chart-tab__timeframe {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

.chart-tab__symbol {
font-size: 13px;
font-weight: 700;
color: inherit;
}

.chart-tab__timeframe {
font-size: 11px;
letter-spacing: 0.12em;
text-transform: uppercase;
color: rgba(255, 255, 255, 0.58);
}

.chart-tab__close {
display: inline-flex;
align-items: center;
justify-content: center;
width: 22px;
height: 22px;
border: 0;
border-radius: 50%;
background: rgba(255, 255, 255, 0.06);
color: inherit;
cursor: pointer;
flex-shrink: 0;
transition: background 0.2s ease, color 0.2s ease;
}

.chart-tab__close:hover {
background: rgba(239, 68, 68, 0.18);
color: #ff9a9a;
}

.chart-tab-add {
width: 42px;
min-width: 42px;
padding-inline: 0;
font-size: 22px;
line-height: 1;
justify-content: center;
}

.market-topbar {
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(0, 1.6fr);
  gap: 12px 14px;
  align-items: stretch;
  padding: 14px 16px;
  margin-bottom: 2px;
  position: relative;
  z-index: 40;
  }

.market-summary {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 12px;
align-items: stretch;
min-width: 0;
}

.market-summary__item {
display: grid;
gap: 6px;
align-content: center;
min-height: 62px;
padding: 10px 14px;
border-radius: 18px;
border: 1px solid rgba(255, 255, 255, 0.24);
background: rgba(255, 255, 255, 0.03);
}

.market-summary__item strong {
display: block;
font-size: 18px;
line-height: 1.15;
color: var(--text);
}

.market-summary__item--change strong {
font-size: 16px;
}

.history-load-chip {
display: inline-flex;
align-items: center;
gap: 10px;
min-height: 44px;
padding: 10px 14px;
border-radius: 16px;
border: 1px solid rgba(255, 255, 255, 0.22);
background: rgba(255, 255, 255, 0.025);
color: rgba(255, 255, 255, 0.76);
font-size: 13px;
line-height: 1.45;
}

.history-load-chip__icon {
display: inline-flex;
width: 16px;
height: 16px;
border-radius: 999px;
flex-shrink: 0;
}

.history-load-chip__text {
display: block;
min-width: 0;
word-break: break-word;
}

.history-status-row {
display: flex;
align-items: stretch;
gap: 10px;
grid-column: 1 / -1;
min-width: 0;
}

.history-status-row .history-load-chip {
flex: 1 1 auto;
min-width: 0;
}

.alert-toggle {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
min-width: 52px;
padding-inline: 14px;
flex-shrink: 0;
}

.control-button--icon {
min-height: 44px;
}

.alert-toggle__icon {
width: 16px;
height: 16px;
stroke: currentColor;
stroke-width: 1.8;
fill: none;
stroke-linecap: round;
stroke-linejoin: round;
flex-shrink: 0;
}

.alert-toggle__label {
font-size: 12px;
font-weight: 700;
letter-spacing: 0.06em;
text-transform: uppercase;
}

.alert-toggle.is-muted {
opacity: 0.72;
}

.alert-toast-stack {
position: fixed;
top: 92px;
right: 18px;
z-index: 160;
display: grid;
gap: 10px;
max-width: min(360px, calc(100vw - 32px));
pointer-events: none;
}

.alert-toast {
display: grid;
gap: 6px;
padding: 14px 16px;
border-radius: 18px;
border: 1px solid rgba(255, 255, 255, 0.34);
background: rgba(18, 18, 22, 0.96);
box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
backdrop-filter: blur(12px);
pointer-events: auto;
animation: alert-toast-slide-in 0.22s ease-out;
}

.alert-toast__topline {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
}

.alert-toast__source {
display: inline-flex;
align-items: center;
gap: 8px;
min-width: 0;
font-size: 12px;
letter-spacing: 0.06em;
text-transform: uppercase;
color: var(--accent);
}

.alert-toast__dot {
width: 9px;
height: 9px;
border-radius: 50%;
background: var(--accent);
box-shadow: 0 0 0 5px rgba(236, 208, 111, 0.12);
flex-shrink: 0;
}

.alert-toast__close {
padding: 0;
border: 0;
background: transparent;
color: rgba(255, 255, 255, 0.48);
font-size: 18px;
line-height: 1;
cursor: pointer;
}

.alert-toast__close:hover {
color: #ffffff;
}

.alert-toast__title {
margin: 0;
font-size: 18px;
font-weight: 700;
line-height: 1.25;
color: #ffffff;
}

.alert-toast__copy {
margin: 0;
font-size: 14px;
line-height: 1.45;
color: rgba(255, 255, 255, 0.82);
}

.alert-toast__meta {
display: flex;
flex-wrap: wrap;
gap: 8px 12px;
font-size: 12px;
color: rgba(255, 255, 255, 0.54);
}

@keyframes alert-toast-slide-in {
from {
opacity: 0;
transform: translateX(18px) scale(0.98);
}
to {
opacity: 1;
transform: translateX(0) scale(1);
}
}

.history-load-chip.is-idle .history-load-chip__icon,
.history-load-chip.is-partial .history-load-chip__icon,
.history-load-chip.is-error .history-load-chip__icon {
background: currentColor;
opacity: 0.88;
}

.history-load-chip.is-ready .history-load-chip__icon {
position: relative;
background: transparent;
border-radius: 0;
opacity: 1;
}

.history-load-chip.is-ready .history-load-chip__icon::before {
content: "";
width: 9px;
height: 5px;
border-left: 2px solid currentColor;
border-bottom: 2px solid currentColor;
transform: rotate(-45deg);
}

.history-load-chip.is-loading {
color: var(--accent);
border-color: rgba(236, 208, 111, 0.28);
background: rgba(236, 208, 111, 0.06);
}

.history-load-chip.is-loading .history-load-chip__icon {
width: 16px;
height: 16px;
border: 2px solid rgba(236, 208, 111, 0.16);
border-top-color: var(--accent);
background: transparent;
animation: bt-spin 0.8s linear infinite;
}

.history-load-chip.is-ready {
color: #20d7be;
border-color: rgba(32, 215, 190, 0.24);
background: rgba(32, 215, 190, 0.06);
}

.history-load-chip.is-partial {
color: #facc15;
border-color: rgba(250, 204, 21, 0.24);
background: rgba(250, 204, 21, 0.06);
}

.history-load-chip.is-error {
color: #ff8f8f;
border-color: rgba(255, 92, 92, 0.28);
background: rgba(255, 92, 92, 0.08);
}

#selected-price-change.is-positive {
color: #20d7be;
}

#selected-price-change.is-negative {
color: #ff5c5c;
}

.market-select-hidden {
display: none !important;
}

.market-field {
display: grid;
align-content: center;
gap: 6px;
min-width: 0;
}

.market-field .toolbar-label {
margin: 0;
font-size: 11px;
letter-spacing: 0.14em;
}

.market-field--pair select,
.market-field--sma input {
width: 100%;
padding: 12px 14px;
border-radius: 16px;
border: 1px solid rgba(255, 255, 255, 0.32);
background: rgba(11, 16, 24, 0.94);
color: var(--text);
font: inherit;
}

.market-field--pair select:focus,
.market-field--sma input:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 2px rgba(236, 208, 111, 0.12);
}

.market-field--timeframe {
min-width: 0;
}

.replay-panel {
display: grid;
gap: 10px;
margin-top: 12px;
padding-top: 10px;
border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.replay-panel--toolbar {
display: inline-flex;
align-items: center;
gap: 10px;
margin: 0;
padding: 0;
border-top: 0;
min-width: 0;
flex: 0 1 auto;
}

.replay-panel__controls {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 10px;
}

.replay-panel--toolbar .replay-panel__controls {
flex-wrap: nowrap;
gap: 8px;
}

.replay-panel__status {
display: flex;
align-items: center;
gap: 10px;
min-height: 20px;
padding-left: 2px;
font-size: 13px;
line-height: 1.45;
color: #cfc7c7;
}

.replay-panel--toolbar .replay-panel__status {
min-height: auto;
padding-left: 0;
font-size: 12px;
line-height: 1.35;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 230px;
}

.replay-panel__status::before {
content: "";
width: 8px;
height: 8px;
border-radius: 50%;
background: rgba(236, 208, 111, 0.26);
box-shadow: 0 0 0 4px rgba(236, 208, 111, 0.08);
flex-shrink: 0;
}

.replay-panel__status.is-playing::before {
background: #22c55e;
box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.replay-speed {
display: flex;
flex-wrap: wrap;
gap: 8px;
}

.replay-speed .control-button {
min-width: 58px;
padding-inline: 12px;
}

.chart-shell.is-replay-selecting {
cursor: crosshair;
}

.chart-shell.is-replay-selecting::after {
content: "Кликните по свече, чтобы выбрать старт симуляции";
position: absolute;
left: 50%;
top: 16px;
transform: translateX(-50%);
z-index: 16;
padding: 10px 14px;
border-radius: 999px;
border: 1px solid rgba(236, 208, 111, 0.24);
background: rgba(10, 14, 25, 0.92);
color: var(--accent);
font-size: 12px;
letter-spacing: 0.06em;
text-transform: uppercase;
pointer-events: none;
box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.market-field--compact {
align-self: end;
}

.market-field--indicators.market-field--compact {
display: flex;
align-items: center;
gap: 0;
align-self: center;
}

.market-field--indicators .control-button--indicator {
width: auto;
}

.watchlist-panel {
display: grid;
gap: 14px;
}

.panel-head--watchlist {
display: flex;
justify-content: space-between;
align-items: flex-end;
gap: 14px;
}

.watchlist-timeframe {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 8px 12px;
border-radius: 999px;
border: 1px solid rgba(236, 208, 111, 0.22);
background: rgba(236, 208, 111, 0.08);
font-size: 12px;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--accent);
}

.watchlist-toolbar {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
gap: 10px;
align-items: center;
margin-bottom: 14px;
}

.watchlist-search {
display: flex;
align-items: center;
gap: 10px;
min-height: 46px;
padding: 0 14px;
border: 1px solid rgba(255, 255, 255, 0.18);
border-radius: 14px;
background: rgba(255, 255, 255, 0.03);
}

.watchlist-search svg {
width: 16px;
height: 16px;
stroke: rgba(255, 255, 255, 0.56);
stroke-width: 1.8;
fill: none;
flex-shrink: 0;
}

.watchlist-search input {
width: 100%;
border: 0;
outline: none;
background: transparent;
color: var(--text);
font: inherit;
}

.watchlist-search input::placeholder {
color: rgba(255, 255, 255, 0.46);
}

.watchlist-toolbar__actions {
display: inline-flex;
align-items: center;
gap: 8px;
}

.watchlist-categories {
display: flex;
align-items: center;
gap: 8px;
margin: 0 0 14px;
padding: 0 2px 4px 0;
overflow-x: auto;
overflow-y: hidden;
scrollbar-width: thin;
scrollbar-color: rgba(236, 208, 111, 0.24) transparent;
}

.watchlist-categories::-webkit-scrollbar {
height: 6px;
}

.watchlist-categories::-webkit-scrollbar-thumb {
background: rgba(236, 208, 111, 0.24);
border-radius: 999px;
}

.watchlist-category-chip {
display: inline-flex;
align-items: center;
gap: 8px;
flex: 0 0 auto;
min-height: 34px;
padding: 0 12px;
border: 1px solid rgba(255, 255, 255, 0.18);
border-radius: 999px;
background: rgba(255, 255, 255, 0.03);
color: rgba(255, 255, 255, 0.72);
font: inherit;
font-size: 12px;
font-weight: 700;
letter-spacing: 0.04em;
cursor: pointer;
transition: border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease, transform 0.16s ease;
}

.watchlist-category-chip:hover {
border-color: rgba(236, 208, 111, 0.32);
color: var(--text);
transform: translateY(-1px);
}

.watchlist-category-chip.is-active {
border-color: rgba(236, 208, 111, 0.38);
background: rgba(236, 208, 111, 0.12);
color: var(--accent);
}

.watchlist-category-chip__label {
white-space: nowrap;
}

.watchlist-category-chip__count {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 20px;
height: 20px;
padding: 0 6px;
border-radius: 999px;
background: rgba(236, 208, 111, 0.12);
color: inherit;
font-size: 11px;
font-weight: 800;
letter-spacing: 0;
}

.watchlist-filter-button,
.watchlist-sort-button {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 6px;
min-height: 38px;
padding: 0 12px;
border: 1px solid rgba(255, 255, 255, 0.18);
border-radius: 12px;
background: rgba(255, 255, 255, 0.03);
color: rgba(255, 255, 255, 0.72);
font: inherit;
font-weight: 700;
cursor: pointer;
transition: border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease;
}

.watchlist-filter-button:hover,
.watchlist-sort-button:hover {
border-color: rgba(236, 208, 111, 0.3);
color: var(--text);
}

.watchlist-filter-button.is-active,
.watchlist-sort-button.is-active {
border-color: rgba(236, 208, 111, 0.36);
background: rgba(236, 208, 111, 0.1);
color: var(--accent);
}

.watchlist-sort-button {
justify-content: flex-start;
width: 100%;
min-height: 28px;
padding: 0;
border: 0;
background: transparent;
border-radius: 0;
font-size: inherit;
letter-spacing: inherit;
text-transform: inherit;
color: inherit;
}

.watchlist-sort-button::after {
content: "";
width: 0;
height: 0;
border-left: 4px solid transparent;
border-right: 4px solid transparent;
opacity: 0;
transform: translateY(1px);
}

.watchlist-sort-button.is-active::after {
opacity: 1;
}

.watchlist-sort-button[data-sort-direction="asc"]::after {
border-bottom: 6px solid var(--accent);
}

.watchlist-sort-button[data-sort-direction="desc"]::after {
border-top: 6px solid var(--accent);
}

.watchlist-table {
display: grid;
gap: 6px;
}

.watchlist-table__head,
.watchlist-row {
display: grid;
grid-template-columns: minmax(180px, 1.7fr) minmax(86px, 0.9fr) minmax(70px, 0.72fr) minmax(70px, 0.62fr) minmax(90px, 0.85fr);
gap: 12px;
align-items: center;
}

.watchlist-table__head {
padding: 0 12px 4px;
font-size: 12px;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
color: rgba(255, 255, 255, 0.58);
}

.watchlist-row {
padding: 12px;
border: 1px solid rgba(255, 255, 255, 0.14);
border-radius: 16px;
background: rgba(255, 255, 255, 0.02);
color: var(--text);
position: relative;
transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.16s ease;
}

.watchlist-row:hover {
border-color: rgba(236, 208, 111, 0.32);
background: rgba(255, 255, 255, 0.04);
transform: translateY(-1px);
}

.watchlist-row.is-active {
border-color: rgba(236, 208, 111, 0.42);
background: linear-gradient(180deg, rgba(236, 208, 111, 0.14), rgba(236, 208, 111, 0.05));
box-shadow: inset 0 0 0 1px rgba(236, 208, 111, 0.16);
}

.watchlist-row.is-locked {
opacity: 1;
cursor: not-allowed;
border-style: dashed;
border-color: rgba(236, 208, 111, 0.22);
background: linear-gradient(180deg, rgba(236, 208, 111, 0.08), rgba(255, 255, 255, 0.03));
}

.watchlist-row.is-locked::after {
content: "PRO";
position: absolute;
top: 10px;
right: 12px;
display: inline-flex;
align-items: center;
justify-content: center;
padding: 3px 7px;
border-radius: 999px;
background: rgba(236, 208, 111, 0.14);
border: 1px solid rgba(236, 208, 111, 0.24);
font-size: 10px;
font-weight: 800;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--accent);
}

.watchlist-row.is-locked .watchlist-row__price,
.watchlist-row.is-locked .watchlist-row__change,
.watchlist-row.is-locked .watchlist-row__volume {
color: rgba(255, 255, 255, 0.58) !important;
}

.watchlist-row--loading {
cursor: default;
}

.watchlist-row--loading:hover {
transform: none;
border-color: rgba(255, 255, 255, 0.14);
background: rgba(255, 255, 255, 0.02);
}

.watchlist-row__symbol {
font-weight: 700;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.watchlist-row__instrument {
display: flex;
align-items: center;
gap: 8px;
min-width: 0;
}

.watchlist-row__favorite,
.watchlist-row__remove {
display: inline-flex;
align-items: center;
justify-content: center;
width: 28px;
height: 28px;
padding: 0;
border: 1px solid rgba(255, 255, 255, 0.18);
border-radius: 10px;
background: rgba(255, 255, 255, 0.02);
color: rgba(255, 255, 255, 0.56);
font: inherit;
cursor: pointer;
transition: border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease;
flex-shrink: 0;
}

.watchlist-row__favorite:hover,
.watchlist-row__remove:hover {
border-color: rgba(236, 208, 111, 0.28);
color: var(--text);
}

.watchlist-row__favorite.is-active {
border-color: rgba(236, 208, 111, 0.36);
background: rgba(236, 208, 111, 0.12);
color: var(--accent);
}

.watchlist-row__select {
display: block;
min-width: 0;
padding: 0;
border: 0;
background: transparent;
color: inherit;
font: inherit;
text-align: left;
cursor: pointer;
}

.watchlist-row__price,
.watchlist-row__change,
.watchlist-row__volume {
font-variant-numeric: tabular-nums;
}

.watchlist-row__change.is-positive {
color: #20d7be;
}

.watchlist-row__change.is-negative {
color: #ff5c5c;
}

.watchlist-empty {
display: grid;
gap: 6px;
padding: 14px;
border: 1px dashed rgba(255, 255, 255, 0.22);
border-radius: 16px;
color: rgba(255, 255, 255, 0.7);
}

.watchlist-suggestions {
display: grid;
gap: 8px;
padding: 8px 0 4px;
}

.watchlist-suggestions__title {
margin: 0;
font-size: 11px;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
color: rgba(255, 255, 255, 0.54);
}

.watchlist-add-row {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
align-items: center;
gap: 10px;
padding: 10px 12px;
border: 1px dashed rgba(236, 208, 111, 0.22);
border-radius: 12px;
background: rgba(236, 208, 111, 0.05);
color: var(--text);
font: inherit;
cursor: pointer;
transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.16s ease;
}

.watchlist-add-row:hover {
border-color: rgba(236, 208, 111, 0.34);
background: rgba(236, 208, 111, 0.09);
transform: translateY(-1px);
}

.market-topbar .timeframe-toolbar {
justify-content: flex-start;
gap: 10px;
flex-wrap: wrap;
}

.market-topbar .button-row {
gap: 8px;
flex-wrap: nowrap;
}

.market-topbar .control-button {
padding: 10px 16px;
min-height: 44px;
font-weight: 700;
}

.market-topbar .timeframe-more {
margin-left: auto;
}

@media (max-width: 1320px) {
.market-topbar {
  grid-template-columns: minmax(260px, 1fr) minmax(300px, 1.15fr) minmax(260px, 0.95fr);
  }
  
  .market-field--timeframe {
  grid-column: 1 / -1;
  }

  .market-tools {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  }
  
@media (max-width: 1080px) {
.market-topbar {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  }

.market-summary {
  grid-column: 1 / -1;
}
}

@media (max-width: 720px) {
  .auth-system-summary__title {
  font-size: 14px;
  }
  
.market-topbar {
  grid-template-columns: 1fr;
  padding: 16px;
  gap: 12px;
  }

  .market-summary {
  grid-template-columns: 1fr;
  }

  .market-summary__item strong {
  font-size: 18px;
  }
  
.market-topbar .button-row {
flex-wrap: wrap;
}

.market-topbar .control-button {
flex: 0 0 auto;
}

.watchlist-table__head,
.watchlist-row {
grid-template-columns: minmax(160px, 1.35fr) minmax(74px, 0.8fr) minmax(64px, 0.64fr) minmax(64px, 0.6fr) minmax(84px, 0.8fr);
gap: 8px;
}

.watchlist-table__head {
padding: 0 8px 4px;
font-size: 11px;
}

.watchlist-row {
padding: 11px 10px;
font-size: 13px;
}

.watchlist-toolbar {
grid-template-columns: 1fr;
}

}

@media (max-width: 860px) {
.indicator-modal__dialog {
  width: 100%;
  max-height: 86vh;
  padding: 20px;
}

.indicator-list {
  grid-template-columns: 1fr;
}
}

@media (max-width: 720px) {
.indicator-modal {
  padding: 14px;
}

.indicator-modal__dialog {
  padding: 18px;
  gap: 16px;
}

.indicator-modal__head h2 {
  font-size: 28px;
}

.indicator-modal__toolbar {
  grid-template-columns: 1fr;
}

.indicator-legend {
  top: 54px;
  left: 12px;
  max-width: calc(100% - 24px);
}

.drawing-toolbar {
  top: 12px;
  left: 12px;
  padding: 6px 5px;
}

.drawing-toolbar__button {
  width: 30px;
  height: 30px;
}

.zone-pill {
  left: 56px;
}

.indicator-legend {
  left: 56px;
}

.drawing-selection-toolbar {
  gap: 8px;
  padding: 7px 8px;
}

.drawing-selection-toolbar__group + .drawing-selection-toolbar__group {
  padding-left: 8px;
}

.drawing-selection-toolbar__color-trigger {
  width: 32px;
  height: 32px;
}

.drawing-selection-toolbar__color-preview {
  width: 18px;
  height: 18px;
}

.drawing-selection-toolbar__width {
  min-width: 42px;
  height: 30px;
  padding: 0 10px;
}

.drawing-selection-toolbar__delete {
  width: 32px;
  height: 32px;
}
}

.inspector {
pointer-events: none;
}

.inspector-shell {
position: absolute;
top: 0;
right: 0;
width: 58px;
height: calc(100vh - 138px);
z-index: 24;
pointer-events: none;
overflow: visible;
}

.watchlist-panel {
position: absolute;
top: 10px;
right: 70px;
width: min(430px, calc(100vw - 210px));
max-height: calc(100vh - 138px);
display: grid;
grid-template-rows: auto minmax(0, 1fr);
gap: 16px;
align-content: start;
overflow: hidden;
pointer-events: auto;
z-index: 24;
transform: translateX(calc(100% + 18px));
opacity: 0;
visibility: hidden;
transition: transform 0.28s ease, opacity 0.2s ease, visibility 0.2s ease;
}

.inspector-shell.is-open .watchlist-panel {
transform: translateX(0);
opacity: 1;
visibility: visible;
}

.inspector-rail {
position: absolute;
top: 10px;
right: 0;
display: flex;
flex-direction: column;
align-items: flex-end;
gap: 10px;
width: 58px;
pointer-events: auto;
}

.inspector-rail__button {
display: inline-flex;
align-items: center;
justify-content: center;
width: 48px;
height: 48px;
padding: 0;
border-radius: 14px 0 0 14px;
border: 1px solid rgba(255, 255, 255, 0.26);
border-right: 0;
background: rgba(24, 24, 28, 0.96);
color: rgba(255, 255, 255, 0.72);
font: inherit;
font-weight: 700;
cursor: pointer;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.inspector-rail__button svg {
width: 22px;
height: 22px;
stroke: currentColor;
fill: none;
stroke-width: 1.8;
stroke-linecap: round;
stroke-linejoin: round;
}

.inspector-rail__button:hover {
transform: translateX(-2px);
border-color: rgba(236, 208, 111, 0.34);
color: #ffffff;
}

.inspector-rail__button.is-active {
border-color: rgba(236, 208, 111, 0.42);
background: linear-gradient(180deg, rgba(236, 208, 111, 0.18), rgba(236, 208, 111, 0.08));
color: var(--accent);
}

.inspector-panel {
display: none;
min-height: 0;
}

.inspector-panel.is-active {
display: block;
}

.watchlist-timeframe.is-hidden {
display: none !important;
}

.watchlist-table {
grid-template-rows: auto minmax(0, 1fr);
min-height: 100%;
}

.watchlist-table__body {
display: grid;
gap: 8px;
align-content: start;
min-height: 0;
max-height: calc(100vh - 302px);
overflow-y: auto;
padding-right: 4px;
}

.watchlist-table__body::-webkit-scrollbar {
width: 8px;
}

.watchlist-table__body::-webkit-scrollbar-thumb {
background: rgba(236, 208, 111, 0.22);
border-radius: 999px;
}

.settings-drawer {
display: grid;
gap: 16px;
align-content: start;
padding: 4px 0 0;
}

.inspector-panel[data-inspector-panel="analytics"] .settings-drawer {
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
}

.settings-drawer__copy {
margin: 0;
line-height: 1.62;
color: #d7d0d0;
}

.watchlist-panel .logic-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}

.watchlist-panel .logic-copy {
margin-top: 0;
color: #cfc8c8;
}

@media (max-width: 1180px) {
.inspector-shell {
  width: 54px;
  height: calc(100vh - 142px);
}

.watchlist-panel {
  top: 10px;
  right: 64px;
  width: min(400px, calc(100vw - 160px));
  max-height: calc(100vh - 142px);
}

.watchlist-table__body {
  max-height: calc(100vh - 306px);
}

.chart-column {
  padding-right: 68px;
}

.app-shell.is-inspector-open .chart-column {
  padding-right: calc(78px + min(400px, calc(100vw - 160px)));
}
}

@media (max-width: 720px) {
.inspector-shell {
  width: 48px;
  height: calc(100vh - 152px);
}

.inspector-rail__button {
  width: 42px;
  height: 42px;
  border-radius: 12px 0 0 12px;
}

.watchlist-panel {
  top: 8px;
  right: 52px;
  width: calc(100vw - 78px);
  max-height: calc(100vh - 152px);
}

.watchlist-panel .logic-grid {
  grid-template-columns: 1fr;
}

.watchlist-table__body {
  max-height: calc(100vh - 320px);
}

.watchlist-table__head,
.watchlist-row {
  grid-template-columns: minmax(150px, 1.4fr) minmax(74px, 0.85fr) minmax(64px, 0.7fr) minmax(64px, 0.7fr) minmax(78px, 0.85fr);
}

.chart-column {
  padding-right: 56px;
}

.app-shell.is-inspector-open .chart-column {
  padding-right: 56px;
}
}

/* Final watchlist layout overrides */
.watchlist-panel {
  width: min(540px, calc(100vw - 150px));
  height: calc(100vh - 138px);
  max-height: none;
}

.inspector-panel.is-active {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.inspector-panel.is-active[data-inspector-panel="watchlist"] {
  grid-template-rows: auto auto minmax(0, 1fr);
  align-content: start;
}

.inspector-panel.is-active[data-inspector-panel="settings"] {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.watchlist-toolbar {
  grid-template-columns: minmax(0, 1fr);
}

.watchlist-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.watchlist-search {
  min-width: 0;
}

.watchlist-search input {
  min-width: 0;
}

.watchlist-filter-button {
  white-space: nowrap;
}

.watchlist-toolbar,
.watchlist-categories,
.watchlist-table {
  min-height: 0;
}

.watchlist-categories {
  margin: 0 0 10px;
  align-self: start;
}

.watchlist-table {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 6px;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
}

.watchlist-table__head,
.watchlist-table__body {
  min-width: 540px;
}

.watchlist-table__head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding-top: 4px;
  background:
    linear-gradient(180deg, rgba(30, 30, 34, 0.98), rgba(30, 30, 34, 0.92));
}

.watchlist-table__body {
  max-height: none;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.watchlist-table__head,
.watchlist-row {
  grid-template-columns: minmax(156px, 1.34fr) minmax(82px, 0.86fr) minmax(82px, 0.8fr) minmax(60px, 0.56fr) minmax(88px, 0.82fr);
  gap: 6px;
}

.watchlist-table__head .watchlist-sort-button:last-child {
  justify-content: flex-start;
}

.watchlist-row__instrument {
  display: grid;
  grid-template-columns: 24px minmax(0, max-content) 24px;
  justify-content: start;
  gap: 1px;
}

.watchlist-row__select {
  width: auto;
  max-width: 100%;
}

.watchlist-row__favorite,
.watchlist-row__remove {
  width: 24px;
  height: 24px;
  border-radius: 8px;
}

.watchlist-row__price,
.watchlist-row__change,
.watchlist-row__volume {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  justify-self: start;
  text-align: left;
}

@media (max-width: 1180px) {
  .watchlist-panel {
    width: min(500px, calc(100vw - 118px));
    height: calc(100vh - 142px);
  }

  .app-shell.is-inspector-open .chart-column {
    padding-right: calc(78px + min(500px, calc(100vw - 118px)));
  }
}

@media (max-width: 720px) {
  .watchlist-panel {
    width: calc(100vw - 64px);
    height: calc(100vh - 152px);
  }

  .watchlist-table__head,
  .watchlist-table__body {
    min-width: 520px;
  }

  .watchlist-table__head,
  .watchlist-row {
    grid-template-columns: minmax(148px, 1.24fr) minmax(76px, 0.82fr) minmax(78px, 0.78fr) minmax(58px, 0.54fr) minmax(84px, 0.8fr);
    gap: 6px;
  }

  .watchlist-category-chip {
    min-height: 32px;
    padding: 0 10px;
    font-size: 11px;
  }
}

/* Final topbar compaction overrides */
.market-field--timeframe {
  align-content: start;
}

.market-topbar .timeframe-toolbar {
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  width: max-content;
  max-width: 100%;
}

.market-topbar .button-row {
  flex: 0 0 auto;
}

.market-topbar .timeframe-more {
  margin-left: 0 !important;
  flex: 0 0 auto;
}

.market-field--timeframe .market-field--indicators {
  margin-left: 0 !important;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
}

.market-field--timeframe {
  justify-self: start;
}

.market-field--timeframe .control-button--indicator {
  white-space: nowrap;
}

.market-field--timeframe .replay-panel--toolbar {
  align-self: end;
}

.market-topbar .replay-panel--toolbar .control-button {
  min-height: 40px;
  padding: 9px 14px;
}

@media (max-width: 1320px) {
  .market-topbar .timeframe-toolbar {
    flex-wrap: wrap;
    width: 100%;
  }

  .market-field--timeframe .replay-panel--toolbar {
    width: 100%;
  }

  .replay-panel--toolbar .replay-panel__controls {
    flex-wrap: wrap;
  }
}

/* Final modal, loader and watchlist interaction overrides */
.indicator-modal__toolbar.is-hidden,
.indicator-popular.is-hidden,
.indicator-list.is-hidden {
  display: none !important;
}

.watchlist-timeframe {
  gap: 8px;
}

.watchlist-timeframe.is-loading::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid rgba(236, 208, 111, 0.16);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: bt-spin 0.8s linear infinite;
flex-shrink: 0;
}

.watchlist-row {
  cursor: pointer;
}

.watchlist-row.is-locked,
.watchlist-row--loading {
  cursor: default;
}

.watchlist-row__select {
  cursor: inherit;
}

.watchlist-row--loading .watchlist-row__instrument {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.watchlist-row__price,
.watchlist-row__change,
.watchlist-row__volume {
  align-self: center;
}

@keyframes bt-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Compact header and replay dock overrides */
.auth-strip {
  margin: -22px -22px 10px;
}

.auth-strip__inner {
  min-height: 64px;
  padding-top: 9px;
  padding-bottom: 9px;
}

.auth-system-summary {
  gap: 0;
}

.auth-system-summary__eyebrow {
  font-size: 10px;
  letter-spacing: 0.14em;
}

.auth-system-summary__title {
  font-size: 13px;
  line-height: 1.2;
}

.auth-block .control-button,
.profile-trigger {
  min-height: 42px;
}

.chart-tabs-bar {
  padding: 8px 12px;
  margin-bottom: 8px;
}

.chart-tab {
  min-height: 50px;
  padding: 8px 12px;
}

.chart-tab__meta {
  gap: 2px;
}

.chart-tab__symbol {
  font-size: 12px;
}

.chart-tab__timeframe {
  font-size: 11px;
}

.market-topbar {
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 10px 14px;
  margin-bottom: 8px;
}

.market-topbar .market-field--timeframe {
  display: grid;
  gap: 4px;
}

.market-topbar .toolbar-label {
  margin-bottom: 0;
  font-size: 10px;
}

.market-topbar .timeframe-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  width: 100%;
  min-width: 0;
}

.market-topbar .button-row {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  flex-wrap: nowrap;
}

.market-topbar .control-button {
  min-height: 40px;
  padding: 8px 14px;
}

.market-topbar .timeframe-more {
  margin-left: 0 !important;
  flex: 0 0 auto;
}

.market-field--indicators.market-field--compact {
  flex: 0 0 auto;
  margin-left: 6px;
}

.market-toolbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: 0 0 auto;
}

.market-toolbar-actions .control-button {
  white-space: nowrap;
}

.alert-toggle__label {
  font-size: 11px;
}

.alert-toast-stack {
  top: 74px;
}

.chart-shell {
  overflow: hidden;
}

.chart-status-row {
  position: absolute;
  top: 56px;
  left: 70px;
  z-index: 13;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  justify-items: start;
  gap: 8px;
  max-width: calc(100% - 96px);
  pointer-events: none;
}

.chart-history-chip,
.chart-indicator-chip,
.chart-alert-chip {
  min-height: 36px;
  max-width: min(560px, calc(100vw - 220px));
  padding: 8px 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
  pointer-events: none;
}

.chart-history-chip .history-load-chip__text,
.chart-indicator-chip .history-load-chip__text,
.chart-alert-chip .history-load-chip__text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.replay-dock {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: 18px;
}

.replay-dock .replay-panel__controls {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.replay-dock .replay-panel__status {
  justify-content: center;
  min-height: 18px;
  padding-left: 0;
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

.replay-dock .control-button {
  min-height: 38px;
  padding: 8px 14px;
}

.replay-dock .replay-speed .control-button {
  min-width: 48px;
}

.chart-shell.is-replay-selecting::after {
  content: "Кликните по свече, чтобы выбрать старт симуляции";
}

@media (max-width: 1280px) {
  .market-topbar .timeframe-toolbar {
    flex-wrap: wrap;
  }

  .market-toolbar-actions {
    margin-left: 0;
  }
}

@media (max-width: 720px) {
  .auth-strip__inner {
    min-height: 58px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .market-topbar {
    padding: 10px 12px;
  }

  .chart-status-row {
    left: 58px;
    top: 52px;
    max-width: calc(100% - 70px);
    gap: 8px;
  }
}

/* Viewport-fit chart layout */
.app-shell {
  min-height: 100dvh;
  padding-top: 16px;
  padding-bottom: 14px;
}

.auth-strip {
  margin: -16px -22px 10px;
}

.auth-strip__inner {
  min-height: 64px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.chart-tabs-bar {
  margin-bottom: 10px;
  padding: 10px 14px;
}

.chart-tab {
  min-height: 44px;
  padding: 6px 12px;
}

.chart-tab-add {
  min-width: 42px;
  min-height: 42px;
  padding: 0;
}

.workspace {
  min-height: 0;
}

.chart-column {
  gap: 10px;
}

.chart-stage {
  min-height: var(--chart-stage-height, 0px);
}

.chart-shell {
  height: var(--chart-shell-height, calc(100dvh - 230px));
  min-height: 380px;
}

.chart-top-toolbar {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 13;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  max-width: min(100%, calc(100% - 104px));
  padding: 8px 10px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(8, 12, 20, 0.78);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(12px);
}

.chart-top-toolbar__cluster {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.chart-top-toolbar__timeframes {
  flex-wrap: nowrap;
  gap: 8px;
}

.chart-top-toolbar .control-button {
  min-height: 38px;
  padding: 8px 14px;
}

.chart-top-toolbar .control-button--indicator {
  width: auto;
  min-width: 0;
  padding-right: 14px;
}

.chart-top-toolbar .timeframe-more {
  flex: 0 0 auto;
}

.chart-top-toolbar .timeframe-more__trigger {
  min-width: 42px;
  padding-inline: 12px;
}

.market-toolbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.market-toolbar-actions .control-button {
  white-space: nowrap;
}

.chart-replay-toolbar {
  position: absolute;
  top: 62px;
  right: 16px;
  z-index: 13;
  display: flex;
  justify-content: flex-end;
  max-width: calc(100% - 120px);
  pointer-events: none;
}

.chart-replay-toolbar .replay-panel {
  pointer-events: auto;
}

.chart-replay-toolbar .replay-panel--toolbar {
  padding: 7px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(8, 12, 20, 0.78);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(10px);
}

.chart-status-row {
  top: 14px;
  left: 232px;
  max-width: calc(100% - 272px);
}

.chart-history-chip,
.chart-indicator-chip {
  min-height: 34px;
  max-width: min(420px, calc(100vw - 260px));
}

.zone-pill {
  top: 14px;
  left: 92px;
}

.drawing-toolbar {
  top: 14px;
  left: 14px;
}

.replay-dock {
  margin-top: 0;
  padding: 8px 12px;
  border-radius: 16px;
}

.replay-dock .replay-panel__controls {
  gap: 6px;
}

.replay-dock .control-button {
  min-height: 36px;
  padding: 7px 12px;
}

@media (max-width: 1400px) {
  .chart-top-toolbar {
    left: 92px;
    justify-content: flex-start;
    max-width: calc(100% - 108px);
    flex-wrap: wrap;
  }

  .chart-replay-toolbar {
    right: 12px;
    max-width: calc(100% - 102px);
  }

  .chart-status-row {
    left: 214px;
    max-width: calc(100% - 242px);
  }
}

@media (max-width: 980px) {
  .app-shell {
    padding-inline: 14px;
  }

  .auth-strip {
    margin-left: -14px;
    margin-right: -14px;
  }

  .chart-shell {
    min-height: 320px;
  }

  .chart-top-toolbar {
    left: 78px;
    right: 12px;
    top: 12px;
    gap: 8px;
    padding: 7px 8px;
  }

  .chart-top-toolbar__cluster {
    flex-wrap: wrap;
  }

  .chart-top-toolbar .control-button {
    min-height: 34px;
    padding: 7px 12px;
  }

  .zone-pill {
    left: 78px;
    top: 14px;
  }

  .chart-replay-toolbar {
    left: 78px;
    right: 12px;
    top: 56px;
    max-width: none;
    justify-content: flex-end;
  }

  .chart-status-row {
    left: 154px;
    top: 106px;
    max-width: calc(100% - 170px);
  }
}

@media (max-width: 720px) {
  .auth-strip {
    margin-bottom: 8px;
  }

  .chart-tabs-bar {
    padding: 8px 10px;
  }

  .chart-top-toolbar {
    left: 64px;
    right: 10px;
    top: 10px;
  }

  .zone-pill {
    left: 64px;
  }

  .chart-replay-toolbar {
    left: 64px;
    right: 10px;
    top: 52px;
  }

  .chart-status-row {
    left: 168px;
    top: 100px;
    max-width: calc(100% - 180px);
  }

  .chart-history-chip,
  .chart-indicator-chip {
    max-width: calc(100% - 180px);
  }
}

.chart-layout-more {
  position: relative;
  flex: 0 0 auto;
}

.chart-layout-more__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 48px;
  padding-inline: 12px;
}

.chart-layout-more__icon {
  display: inline-flex;
  width: 14px;
  height: 14px;
}

.chart-layout-more__icon svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-layout-more__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chart-layout-more__menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 120;
  display: grid;
  gap: 8px;
  min-width: 200px;
  padding: 10px;
  background: rgba(20, 20, 20, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
}

.chart-layout-more__item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.chart-layout-more__item:hover {
  border-color: rgba(236, 208, 111, 0.45);
}

.chart-layout-more__item.is-active {
  border-color: rgba(236, 208, 111, 0.48);
  background: rgba(236, 208, 111, 0.12);
  color: var(--accent);
}

.chart-layout-more__item-grid {
  display: grid;
  gap: 2px;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.chart-layout-more__item-grid::before,
.chart-layout-more__item-grid::after {
  content: "";
}

.chart-layout-more__item-grid > i,
.chart-layout-more__item-grid::before,
.chart-layout-more__item-grid::after {
  border-radius: 2px;
  border: 1px solid rgba(236, 208, 111, 0.7);
}

.chart-layout-more__item-grid--1 {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

.chart-layout-more__item-grid--1::before {
  grid-column: 1;
  grid-row: 1;
}

.chart-layout-more__item-grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.chart-layout-more__item-grid--2::before,
.chart-layout-more__item-grid--2::after {
  grid-row: 1;
}

.chart-layout-more__item-grid--4 {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
}

.chart-layout-more__item-grid--4::before {
  grid-column: 1;
  grid-row: 1;
}

.chart-layout-more__item-grid--4::after {
  grid-column: 2;
  grid-row: 1;
}

.chart-layout-more__item-grid--4 {
  box-shadow:
    inset 0 -7px 0 0 rgba(236, 208, 111, 0.14),
    inset -7px 0 0 0 rgba(236, 208, 111, 0.14);
}

.chart-layout-more__item-grid--6 {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  box-shadow: inset 0 -7px 0 0 rgba(236, 208, 111, 0.12);
}

#chart.is-hidden {
  display: none;
}

.chart-shell.has-multi-layout .zone-pill,
.chart-shell.has-multi-layout .chart-status-row,
.chart-shell.has-multi-layout .drawing-toolbar,
.chart-shell.has-multi-layout .drawing-favorites-toggle,
.chart-shell.has-multi-layout .drawing-favorites-dock,
.chart-shell.has-multi-layout .drawing-overlay,
.chart-shell.has-multi-layout .drawing-selection-toolbar,
.chart-shell.has-multi-layout .zone-overlay:not(.multi-chart-zone-overlay),
.chart-shell.has-multi-layout .indicator-legend {
  display: none !important;
}

.multi-chart-overlay {
  position: absolute;
  inset: 0;
  z-index: 11;
  padding: calc(var(--chart-toolbar-height, 56px) + 12px) 12px 12px;
  display: grid;
  gap: 10px;
  grid-template-columns: var(--multi-chart-columns-template, repeat(var(--multi-chart-columns, 2), minmax(0, 1fr)));
  grid-template-rows: var(--multi-chart-rows-template, repeat(var(--multi-chart-rows, 1), minmax(180px, 1fr)));
  background: rgba(2, 6, 23, 0.7);
  backdrop-filter: blur(2px);
}

.multi-chart-overlay.is-hidden {
  display: none;
}

.multi-chart-overlay[data-layout="1"] {
  --multi-chart-columns: 1;
}

.multi-chart-overlay[data-layout="2"] {
  --multi-chart-columns: 2;
}

.multi-chart-overlay[data-layout="4"] {
  --multi-chart-columns: 2;
}

.multi-chart-overlay[data-layout="6"] {
  --multi-chart-columns: 3;
}

.multi-chart-panel {
  position: relative;
  min-width: 0;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(5, 10, 18, 0.92);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.multi-chart-panel.is-active {
  border-color: rgba(236, 208, 111, 0.48);
  box-shadow: 0 0 0 1px rgba(236, 208, 111, 0.22) inset;
}

.multi-chart-panel__header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 8px 10px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 16, 26, 0.84);
}

.multi-chart-panel__title {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.multi-chart-panel__symbol {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #f8fafc;
}

.multi-chart-panel__meta {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: none;
  color: rgba(236, 208, 111, 0.82);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.multi-chart-status-row {
  display: flex;
  align-items: stretch;
  gap: 6px;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 14, 24, 0.72);
}

.multi-chart-history-chip,
.multi-chart-indicator-chip {
  flex: 1 1 0;
  min-width: 0;
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 10px;
  gap: 6px;
  font-size: 10px;
  line-height: 1.3;
}

.multi-chart-history-chip .history-load-chip__icon,
.multi-chart-indicator-chip .history-load-chip__icon {
  width: 10px;
  height: 10px;
}

.multi-chart-history-chip .history-load-chip__text,
.multi-chart-indicator-chip .history-load-chip__text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
}

.multi-chart-panel__body {
  position: relative;
  flex: 1 1 auto;
  min-height: 120px;
}

.multi-chart-zone-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.multi-chart-panel__canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.multi-chart-fib-overlay .fib-level__label {
  right: 8px;
  font-size: 10px;
}

.multi-chart-panel.is-empty .multi-chart-panel__canvas {
  display: none;
}

.multi-chart-panel.is-empty .multi-chart-panel__body {
  background:
    radial-gradient(circle at 12% 14%, rgba(236, 208, 111, 0.08), transparent 55%),
    linear-gradient(150deg, rgba(20, 26, 38, 0.88), rgba(6, 10, 18, 0.88));
}

.multi-chart-panel .panel-loader {
  z-index: 8;
}

.multi-chart-splitter {
  position: absolute;
  z-index: 22;
  border: 0;
  background: rgba(236, 208, 111, 0.24);
  border-radius: 999px;
  padding: 0;
  margin: 0;
  transition: background 0.16s ease;
}

.multi-chart-splitter:hover {
  background: rgba(236, 208, 111, 0.48);
}

.multi-chart-splitter--vertical {
  width: 10px;
  margin-left: -5px;
  cursor: col-resize;
}

.multi-chart-splitter--horizontal {
  height: 10px;
  margin-top: -5px;
  cursor: row-resize;
}

@media (max-width: 1280px) {
  .multi-chart-overlay[data-layout="6"] {
    --multi-chart-columns: 2;
  }
}

@media (max-width: 900px) {
  .chart-layout-more__label {
    display: none;
  }

  .multi-chart-overlay {
    padding-top: calc(var(--chart-toolbar-height, 56px) + 8px);
  }

  .multi-chart-overlay[data-layout="2"],
  .multi-chart-overlay[data-layout="4"],
  .multi-chart-overlay[data-layout="6"] {
    --multi-chart-columns: 1;
  }
}

/* Final UX refinements: context menu, chart settings, alerts, grouped tools, docked panels */
:root {
  --inspector-rail-width: 58px;
  --inspector-panel-max-width: 540px;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  overflow: hidden;
}

.app-shell {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.workspace {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.chart-column {
  min-height: 0;
  overflow: hidden;
  padding-right: var(--inspector-rail-width);
}

.app-shell.is-inspector-open .chart-column {
  padding-right: calc(
    var(--inspector-rail-width) + min(var(--inspector-panel-max-width), calc(100vw - 150px))
  );
}

.chart-stage {
  min-height: var(--chart-stage-height, 0px);
}

.chart-shell {
  height: var(--chart-shell-height, calc(100dvh - 230px));
  min-height: 320px;
}

.chart-shell.is-panning,
.chart-shell.is-panning * {
  cursor: grabbing !important;
}

.chart-top-toolbar {
  gap: 8px;
  padding: 6px 10px;
  border-radius: 16px;
}

.chart-top-toolbar .control-button {
  min-height: 34px;
  padding: 7px 12px;
}

.chart-top-toolbar__cluster {
  flex-wrap: wrap;
}

.chart-type-more {
  position: relative;
  flex: 0 0 auto;
}

.chart-type-more__trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 46px;
  padding-inline: 11px;
}

.chart-type-more__icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
}

.chart-type-more__icon svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-type-more__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chart-type-more__menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 130;
  display: grid;
  gap: 8px;
  min-width: 220px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(18, 20, 28, 0.98);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
}

.chart-type-more__item {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.chart-type-more__item:hover {
  border-color: rgba(236, 208, 111, 0.4);
  color: var(--accent);
}

.chart-type-more__item.is-active {
  border-color: rgba(236, 208, 111, 0.56);
  background: rgba(236, 208, 111, 0.14);
  color: var(--accent);
  font-weight: 700;
}

.drawing-toolbar__group {
  position: relative;
}

.drawing-toolbar__button--group::after {
  content: "";
  position: absolute;
  right: 5px;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.6;
}

.drawing-toolbar__menu {
  position: absolute;
  top: 0;
  left: calc(100% + 8px);
  z-index: 120;
  min-width: 240px;
  max-height: min(72dvh, 640px);
  overflow: auto;
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(16, 18, 24, 0.98);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
}

.drawing-toolbar__menu-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.drawing-toolbar__menu-item.is-decorated {
  padding-right: 38px;
}

.drawing-toolbar__menu-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: rgba(255, 255, 255, 0.82);
  flex: 0 0 auto;
}

.drawing-toolbar__menu-item-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.drawing-toolbar__menu-item-label {
  flex: 1 1 auto;
  min-width: 0;
}

.drawing-toolbar__menu-item-favorite {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.46);
  font-size: 15px;
  line-height: 1;
  transition: color 0.16s ease, background-color 0.16s ease, transform 0.16s ease;
}

.drawing-toolbar__menu-item-favorite:hover {
  color: var(--accent);
  background: rgba(236, 208, 111, 0.14);
  transform: translateY(-50%) scale(1.06);
}

.drawing-toolbar__menu-item-favorite.is-active {
  color: var(--accent);
}

.drawing-toolbar__menu-item:hover {
  border-color: rgba(236, 208, 111, 0.35);
  color: var(--accent);
}

.drawing-toolbar__menu-item.is-disabled,
.drawing-toolbar__menu-item:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chart-context-menu {
  position: absolute;
  z-index: 140;
  width: min(320px, calc(100% - 16px));
  min-width: 260px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(16, 18, 24, 0.98);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

.chart-context-menu__item {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #e5e7eb;
  font: inherit;
  text-align: left;
  white-space: normal;
  cursor: pointer;
}

.chart-context-menu__item:hover {
  background: rgba(236, 208, 111, 0.14);
  color: var(--accent);
}

.chart-settings-modal,
.alert-settings-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.chart-settings-modal__backdrop,
.alert-settings-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(8px);
}

.chart-settings-modal__dialog,
.alert-settings-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 860px);
  max-height: min(88dvh, 920px);
  overflow: auto;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(18, 20, 28, 0.98);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.52);
}

.chart-settings-modal__head,
.alert-settings-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.chart-settings-modal__head h2,
.alert-settings-modal__head h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1.08;
}

.chart-settings-modal__close,
.alert-settings-modal__close {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.03);
  color: #ffffff;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.chart-settings-modal__lead,
.alert-settings-modal__lead {
  margin: 8px 0 0;
  line-height: 1.56;
  color: #d7d0d0;
}

.chart-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.chart-settings-grid--colors {
  margin-top: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.chart-settings-field {
  display: grid;
  gap: 8px;
}

.chart-settings-field span {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.chart-settings-field input,
.chart-settings-field select {
  width: 100%;
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(12, 14, 20, 0.96);
  color: #ffffff;
  font: inherit;
}

.chart-settings-field input[type="color"] {
  padding: 4px;
}

.chart-settings-switches {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
  margin-bottom: 8px;
}

.chart-settings-switches label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.chart-settings-palette {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
}

.chart-settings-palette__swatch {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: var(--swatch);
  cursor: pointer;
}

.chart-settings-hint {
  margin: 10px 0 0;
  color: #c9c2c2;
}

.chart-settings-actions,
.alert-settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.alert-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.alert-settings-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
}

.alert-settings-field {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.alert-settings-field input[type="text"],
.alert-settings-field input[type="search"] {
  min-width: 0;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(12, 14, 20, 0.96);
  color: #ffffff;
  font: inherit;
}

.alert-settings-field > span,
.alert-settings-timeframes > span {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.alert-settings-symbol-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}

.alert-settings-symbol-row input {
  min-width: 0;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(12, 14, 20, 0.96);
  color: #ffffff;
  font: inherit;
}

.alert-symbols {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.alert-symbol-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
  font: inherit;
  cursor: pointer;
}

.alert-symbol-chip:hover {
  border-color: rgba(236, 208, 111, 0.42);
  color: var(--accent);
}

.alert-symbols__empty {
  color: #c9c2c2;
}

.alert-settings-timeframes {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.alert-settings-note {
  margin: 10px 0 0;
  color: #c9c2c2;
  line-height: 1.5;
}

.alert-telegram-test {
  margin-top: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(12, 14, 20, 0.88);
  display: grid;
  gap: 10px;
}

.alert-telegram-test__head {
  display: grid;
  gap: 4px;
}

.alert-telegram-test__head h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.alert-telegram-test__lead {
  margin: 0;
  color: #c9c2c2;
  line-height: 1.45;
}

.alert-telegram-test__field {
  display: grid;
  gap: 8px;
}

.alert-telegram-test__field > span {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.alert-telegram-test__field input {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(12, 14, 20, 0.96);
  color: #ffffff;
  font: inherit;
}

.alert-telegram-test__actions {
  display: flex;
  justify-content: flex-start;
}

.logic-link-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(236, 208, 111, 0.28);
  background: linear-gradient(180deg, rgba(236, 208, 111, 0.1), rgba(255, 255, 255, 0.02));
  color: #ffffff;
  text-decoration: none;
}

.logic-link-card strong {
  color: var(--accent);
}

.logic-link-card:hover {
  border-color: rgba(236, 208, 111, 0.52);
  transform: translateY(-1px);
}

.settings-analytics-feed {
  display: grid;
  gap: 10px;
  min-height: 0;
  max-height: calc(100vh - 260px);
  overflow-y: auto;
  padding-right: 4px;
}

.settings-analytics-feed::-webkit-scrollbar {
  width: 8px;
}

.settings-analytics-feed::-webkit-scrollbar-thumb {
  background: rgba(236, 208, 111, 0.22);
  border-radius: 999px;
}

.settings-analytics-feed__status {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #b8b3b3;
}

.settings-analytics-feed__item {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(10, 12, 18, 0.76);
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.settings-analytics-feed__item:hover {
  border-color: rgba(236, 208, 111, 0.45);
  background: rgba(14, 17, 26, 0.92);
  transform: translateY(-1px);
}

.settings-analytics-feed__media {
  border-radius: 10px;
  overflow: hidden;
  background: rgba(9, 11, 16, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.25);
  aspect-ratio: 4 / 3;
}

.settings-analytics-feed__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.settings-analytics-feed__body {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.settings-analytics-feed__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: #a9a2a2;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.settings-analytics-feed__title {
  margin: 0;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.settings-analytics-feed__excerpt {
  margin: 0;
  color: #c8c2c2;
  font-size: 12px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 900px) {
  .settings-analytics-feed__item {
    grid-template-columns: 1fr;
  }

  .settings-analytics-feed__media {
    aspect-ratio: 16 / 9;
  }
}

.inspector {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 0;
  pointer-events: none;
  z-index: 28;
}

.inspector-shell {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--inspector-rail-width);
  height: 100%;
  pointer-events: none;
}

.inspector-rail {
  top: 0;
  right: 0;
  height: 100%;
  padding-top: 8px;
  gap: 8px;
}

.watchlist-panel {
  top: 0;
  right: var(--inspector-rail-width);
  width: min(var(--inspector-panel-max-width), calc(100vw - 150px));
  height: 100%;
  max-height: none;
  border-radius: 0;
  border-right: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.34);
  border-bottom: 1px solid rgba(255, 255, 255, 0.34);
  border-left: 1px solid rgba(255, 255, 255, 0.34);
  transform: translateX(calc(100% + 2px));
}

.inspector-shell.is-open .watchlist-panel {
  transform: translateX(0);
}

.watchlist-table__body {
  max-height: none;
}

.trades-panel {
  position: relative;
  height: var(--trades-panel-height, 300px);
  min-height: var(--trades-panel-collapsed-height, 24px);
  max-height: 55dvh;
  overflow: hidden;
  z-index: 8;
}

.trades-panel__resize-handle {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 10px;
  cursor: ns-resize;
  background:
    linear-gradient(180deg, rgba(236, 208, 111, 0.34), rgba(236, 208, 111, 0.08));
  z-index: 3;
}

.trades-panel__resize-handle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 2px;
  width: 56px;
  height: 4px;
  margin-left: -28px;
  border-radius: 999px;
  background: rgba(236, 208, 111, 0.62);
}

.trades-panel .panel-head {
  padding-top: 14px;
}

body.is-trades-resizing,
body.is-trades-resizing * {
  cursor: ns-resize !important;
  user-select: none !important;
}

@media (max-width: 980px) {
  .chart-settings-grid,
  .chart-settings-grid--colors,
  .alert-settings-grid {
    grid-template-columns: 1fr;
  }

  .chart-settings-palette {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .alert-settings-symbol-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .watchlist-panel {
    width: calc(100vw - 112px);
  }

  .app-shell.is-inspector-open .chart-column {
    padding-right: calc(var(--inspector-rail-width) + (100vw - 112px));
  }
}

@media (max-width: 720px) {
  :root {
    --inspector-rail-width: 48px;
  }

  .watchlist-panel {
    width: calc(100vw - 64px);
  }

  .app-shell.is-inspector-open .chart-column {
    padding-right: calc(var(--inspector-rail-width) + (100vw - 64px));
  }

  .chart-type-more__label {
    display: none;
  }
}

/* --- Layout cleanup: tabs/auth row + compact stats drawer --- */
.auth-strip {
  display: none !important;
}

.chart-tabs-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 8px 12px;
  margin-bottom: 8px;
  position: relative;
  z-index: 80;
  overflow: visible;
}

.chart-tabs {
  flex: 1 1 auto;
  min-width: 0;
}

.chart-tab-add {
  order: 2;
  margin-left: 0;
}

.chart-tabs-auth {
  order: 3;
  margin-left: auto;
  display: flex;
  align-items: center;
  min-width: 0;
  position: relative;
  z-index: 120;
}

.chart-tabs-auth .auth-block {
  width: auto;
  min-width: auto;
  max-width: none;
  position: relative;
}

.chart-tabs-auth .auth-guest,
.chart-tabs-auth .auth-user {
  justify-content: flex-end;
  min-height: 46px;
}

.chart-tabs-auth .auth-guest {
  display: none !important;
}

.chart-tabs-auth .profile-trigger {
  min-width: 46px;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  justify-content: center;
  gap: 0;
}

.chart-tabs-auth .profile-meta,
.chart-tabs-auth .profile-name,
.chart-tabs-auth .profile-plan {
  display: none !important;
}

.chart-tabs-auth .profile-avatar {
  width: 34px;
  height: 34px;
  font-size: 14px;
}

.chart-tabs-auth .profile-menu {
  right: 0;
  top: calc(100% + 8px);
  z-index: 260;
  min-width: 220px;
}

.trades-panel {
  height: var(--trades-panel-height, 240px);
  min-height: var(--trades-panel-collapsed-height, 24px);
  max-height: 60dvh;
  transition: height 0.16s ease;
}

.trades-panel__resize-handle {
  top: 0;
  left: 0;
  right: 0;
  height: 36px;
  position: absolute;
  cursor: ns-resize;
  background: transparent;
  border-bottom: 0;
  z-index: 20;
  pointer-events: auto;
  touch-action: none;
}

.trades-panel__resize-handle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 12px;
  width: 64px;
  height: 4px;
  margin-left: -32px;
  border-radius: 999px;
  background: rgba(236, 208, 111, 0.72);
}

.trades-panel .panel-head {
  padding-top: 32px;
}

.trades-panel.is-collapsed > :not(.trades-panel__resize-handle) {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 980px) {
  .chart-tabs-auth .auth-block {
    min-width: auto;
    max-width: none;
  }

  .chart-tabs-auth .profile-trigger {
    min-width: 42px;
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 760px) {
  .chart-tabs-bar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .chart-tabs {
    order: 1;
    flex-basis: 100%;
  }

  .chart-tab-add {
    order: 2;
  }

  .chart-tabs-auth {
    order: 3;
    margin-left: 0;
  }
}

/* --- Chart settings (TradingView-like compact modal) --- */
.chart-settings-modal__dialog--tv {
  width: min(100%, 420px);
  max-height: min(88dvh, 760px);
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
}

.chart-settings-modal__dialog--tv .chart-settings-modal__head {
  margin: 0;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
}

.chart-settings-modal__dialog--tv .chart-settings-modal__head h2 {
  font-size: 22px;
  line-height: 1.15;
}

.chart-settings-tv {
  position: relative;
  padding: 14px 16px 12px;
  display: grid;
  gap: 14px;
}

.chart-settings-tv__checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #e5e7eb;
  font-size: 16px;
}

.chart-settings-tv__checkbox input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.chart-settings-tv__checkbox--wide {
  color: #d7d0d0;
  font-size: 15px;
}

.chart-settings-tv__rows {
  display: grid;
  gap: 10px;
}

.chart-settings-tv__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chart-settings-tv__label {
  color: #e5e7eb;
  font-size: 16px;
}

.chart-settings-tv__color-pair {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chart-color-chip {
  width: 38px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: var(--chip-color, #22c55e);
  box-shadow: inset 0 0 0 2px rgba(2, 6, 23, 0.72);
  cursor: pointer;
  transition: border-color 0.14s ease, transform 0.14s ease;
}

.chart-color-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(236, 208, 111, 0.6);
}

.chart-color-chip.is-active {
  border-color: #60a5fa;
  box-shadow:
    0 0 0 1px rgba(96, 165, 250, 0.95),
    inset 0 0 0 2px rgba(2, 6, 23, 0.72);
}

.chart-settings-tv__subtitle {
  margin: 6px 0 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.chart-settings-tv__field {
  display: grid;
  gap: 8px;
}

.chart-settings-tv__field label {
  font-size: 16px;
  line-height: 1.2;
  font-weight: 600;
  color: #f1f5f9;
}

.chart-settings-tv__field select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(12, 14, 20, 0.96);
  color: #f8fafc;
  font: inherit;
}

.chart-color-popover {
  position: absolute;
  z-index: 5;
  width: min(320px, calc(100% - 20px));
  padding: 10px 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(18, 20, 28, 0.98);
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.42);
}

.chart-color-popover__grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 6px;
}

.chart-color-popover__swatch {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: var(--swatch);
  cursor: pointer;
}

.chart-color-popover__swatch:hover {
  border-color: rgba(236, 208, 111, 0.9);
}

.chart-color-popover__custom-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-color-popover__native {
  width: 40px;
  height: 30px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(12, 14, 20, 0.96);
  cursor: pointer;
}

.chart-color-popover__opacity {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.chart-color-popover__opacity > span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}

.chart-color-popover__opacity-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.chart-color-popover__opacity-row input[type="range"] {
  width: 100%;
}

.chart-color-popover__opacity-row strong {
  font-size: 13px;
  color: #ffffff;
}

.chart-settings-hidden-inputs {
  display: none !important;
}

.chart-settings-modal__dialog--tv .chart-settings-actions {
  margin: 0;
  padding: 12px 16px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
}

.chart-settings-modal__dialog--tv #chart-settings-reset {
  background: rgba(255, 255, 255, 0.03);
  color: #f1f5f9;
}

.chart-settings-modal__dialog--tv #chart-settings-apply {
  background: #f3f4f6;
  border-color: #f3f4f6;
  color: #0f172a;
  font-weight: 700;
}

.chart-settings-modal__dialog--tv #chart-settings-apply:hover {
  color: #0f172a;
  background: #ffffff;
  border-color: #ffffff;
}

/* --- Profile icon-only + drawing toolbar size upgrade --- */
.chart-shell .drawing-toolbar {
  top: 10px;
  left: 10px;
  z-index: 46;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 18px;
}

.chart-shell .drawing-toolbar__button {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.chart-shell .drawing-toolbar__button svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

.chart-shell .drawing-favorites-toggle {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  margin-top: 12px;
}

.chart-shell .drawing-favorites-toggle svg {
  width: 20px;
  height: 20px;
}

.chart-shell .drawing-favorites-dock {
    width: 56px;
  }

/* --- Final trades drawer behavior: smooth lift + inner scroll --- */
.trades-panel {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  height: var(--trades-panel-height, 24px);
  min-height: var(--trades-panel-collapsed-height, 24px);
  max-height: min(72dvh, 760px);
  overflow: hidden;
  z-index: 40;
  transition: height 0.18s ease;
  will-change: height;
}

.trades-panel.is-resizing {
  transition: none !important;
}

.trades-panel__scroll {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 18px 18px max(34px, env(safe-area-inset-bottom));
  scrollbar-gutter: stable;
}

.trades-panel__scroll::-webkit-scrollbar {
  width: 10px;
}

.trades-panel__scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
}

.trades-panel__scroll::-webkit-scrollbar-thumb {
  background: rgba(236, 208, 111, 0.34);
  border-radius: 999px;
}

.trades-panel__resize-handle {
  position: relative;
  flex: 0 0 24px;
  height: 24px;
  cursor: ns-resize;
  background: linear-gradient(180deg, rgba(236, 208, 111, 0.18), rgba(236, 208, 111, 0.02));
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  z-index: 30;
  pointer-events: auto;
  touch-action: none;
}

.trades-panel__resize-handle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 10px;
  width: 68px;
  height: 4px;
  margin-left: -34px;
  border-radius: 999px;
  background: rgba(236, 208, 111, 0.72);
}

.trades-panel .panel-head {
  padding-top: 10px;
}

.trades-panel.is-collapsed > :not(.trades-panel__resize-handle) {
  opacity: 0;
  pointer-events: none;
}

.trades-panel.is-collapsed .trades-panel__scroll {
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
}

.drawing-toolbar__menu {
  min-width: 290px;
}

.drawing-toolbar__menu-item {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 15px;
}

.drawing-toolbar__menu-section {
  margin: 6px 2px 2px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.56);
}

/* --- Mobile overlap hotfix: toolbar / status chips / left tools --- */
@media (max-width: 900px) {
  .chart-top-toolbar {
    left: 66px;
    right: 8px;
    top: 8px;
    max-width: none;
    width: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
    gap: 5px;
    padding: 6px;
    border-radius: 14px;
  }

  .chart-top-toolbar__cluster {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    min-width: 0;
  }

  .chart-top-toolbar__timeframes {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .chart-top-toolbar__timeframes::-webkit-scrollbar {
    display: none;
  }

  .chart-top-toolbar .control-button {
    min-height: 30px;
    padding: 5px 8px;
    border-radius: 12px;
    font-size: 12px;
  }

  .chart-top-toolbar .control-button__icon {
    width: 13px;
    height: 13px;
  }

  .market-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 5px;
    margin-left: 0;
  }

  .zone-pill {
    top: calc(var(--chart-toolbar-height, 56px) + 10px);
    left: 66px;
    z-index: 12;
  }

  .chart-status-row {
    top: calc(var(--chart-toolbar-height, 56px) + 10px);
    left: auto;
    right: 6px;
    max-width: min(62vw, 260px);
    justify-items: stretch;
    gap: 5px;
    z-index: 12;
  }

  .chart-history-chip,
  .chart-indicator-chip {
    width: 100%;
    max-width: 100%;
    min-height: 30px;
    padding: 6px 9px;
    font-size: 12px;
  }

  .drawing-toolbar {
    top: calc(var(--chart-toolbar-height, 56px) + 42px);
    left: 6px;
    padding: 6px 4px;
    gap: 5px;
    border-radius: 14px;
  }

  .chart-shell .drawing-toolbar__button {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .chart-shell .drawing-toolbar__button svg {
    width: 18px;
    height: 18px;
  }

  .chart-shell .drawing-favorites-toggle {
    width: 34px;
    height: 34px;
    margin-top: 8px;
    border-radius: 10px;
  }

  .chart-shell .drawing-favorites-toggle svg {
    width: 17px;
    height: 17px;
  }
}

@media (max-width: 600px) {
  .chart-top-toolbar {
    left: 58px;
    right: 6px;
    padding: 6px;
  }

  .zone-pill {
    left: 58px;
  }

  .chart-status-row {
    right: 6px;
    max-width: min(66vw, 230px);
  }

  .drawing-toolbar {
    left: 6px;
  }

  .chart-top-toolbar .control-button--indicator .control-button__lead span,
  .chart-top-toolbar .alert-toggle__label {
    display: none;
  }
}

/* --- Chart fullscreen icon + focus mode --- */
.chart-fullscreen-toggle {
  min-width: 40px;
  width: 40px;
  padding: 0;
}

.chart-fullscreen-toggle svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-fullscreen-toggle.is-active {
  border-color: rgba(236, 208, 111, 0.48);
  background: linear-gradient(180deg, rgba(236, 208, 111, 0.18), rgba(236, 208, 111, 0.08));
  color: var(--accent);
}

.chart-stage:fullscreen,
.chart-stage:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  margin: 0;
  border-radius: 0;
  border: none;
}

.chart-stage:fullscreen .chart-shell,
.chart-stage:-webkit-full-screen .chart-shell {
  height: 100%;
  min-height: 100%;
  border-radius: 0;
}

body.is-chart-focus-mode {
  overflow: hidden;
}

body.is-chart-focus-mode .auth-strip,
body.is-chart-focus-mode .chart-tabs-bar,
body.is-chart-focus-mode .trades-panel,
body.is-chart-focus-mode .inspector {
  display: none !important;
}

body.is-chart-focus-fallback .app-shell {
  min-height: 100dvh;
  padding: 0;
}

body.is-chart-focus-fallback .workspace,
body.is-chart-focus-fallback .chart-column {
  min-height: 100dvh;
  height: 100dvh;
  margin: 0;
  padding: 0 !important;
  overflow: hidden;
}

body.is-chart-focus-fallback .chart-stage {
  position: fixed;
  inset: 0;
  z-index: 1200;
  min-height: 100dvh !important;
  border: none;
  border-radius: 0;
  margin: 0;
}

body.is-chart-focus-fallback .chart-shell {
  height: 100dvh !important;
  min-height: 100dvh !important;
  border-radius: 0;
}

/* Design sync with site-wide visual system */
:root {
  --bg: #03060b;
  --panel: linear-gradient(180deg, rgba(8, 11, 17, 0.86), rgba(6, 9, 15, 0.9));
  --panel-soft: linear-gradient(180deg, rgba(12, 17, 26, 0.92), rgba(8, 13, 20, 0.94));
  --panel-border: rgba(255, 149, 38, 0.26);
}

body {
  background:
    radial-gradient(circle at 14% -6%, rgba(255, 148, 46, 0.16), transparent 40%),
    radial-gradient(circle at 88% -10%, rgba(236, 208, 111, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 24%),
    #03060b !important;
}

.app-shell .panel-card,
.app-shell .chart-stage,
.app-shell .auth-modal__dialog,
.app-shell .indicator-modal__dialog,
.app-shell .chart-settings-modal__dialog,
.app-shell .alert-settings-modal__dialog,
.app-shell .profile-menu,
.app-shell .watchlist-panel,
.app-shell .inspector-panel,
.app-shell .chart-context-menu,
.app-shell .drawing-color-popover,
.app-shell .chart-color-popover,
.app-shell .drawing-favorites-dock {
  background: linear-gradient(180deg, rgba(8, 11, 17, 0.9), rgba(7, 10, 16, 0.94)) !important;
  border-color: rgba(255, 149, 38, 0.26) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 14px 32px rgba(0, 0, 0, 0.38);
}

.app-shell .control-button:not(.control-button--primary):not(.is-active),
.app-shell .timeframe-more__trigger,
.app-shell .chart-layout-more__trigger,
.app-shell .chart-type-more__trigger,
.app-shell .trade-view-button:not(.is-active),
.app-shell .profile-trigger,
.app-shell .auth-tab,
.app-shell .auth-resend,
.app-shell .filter-field input,
.app-shell .filter-field select,
.app-shell .auth-field input {
  background: rgba(8, 12, 20, 0.92) !important;
  border-color: rgba(255, 184, 90, 0.3) !important;
}

.app-shell .trade-view-button.is-active {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: var(--accent-ink) !important;
}

.zone-pill {
  display: none !important;
}

/* Unified status chip near the left drawing tools panel */
.chart-shell .chart-status-row {
  top: 8px;
  left: 64px;
  right: 420px;
  max-width: none;
  justify-items: start;
  gap: 0;
  z-index: 12;
}

.chart-shell .chart-status-row .history-load-chip {
  width: fit-content;
  max-width: 100%;
}

.chart-shell .chart-status-row .history-load-chip__text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 900px) {
  .chart-shell .chart-status-row {
    top: 8px;
    left: 50px;
    right: 300px;
    max-width: none;
  }
}

@media (max-width: 600px) {
  .chart-shell .chart-status-row {
    top: calc(var(--chart-toolbar-height, 56px) + 8px);
    left: 46px;
    right: 6px;
    max-width: none;
  }
}

