        @import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&display=swap');
        @import url('https://fonts.googleapis.com/css2?family=Teko:wght@500;600;700&display=swap');

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Rajdhani', sans-serif;
            background: #000000;
            color: #00ffcc;
            overflow: hidden;
            height: 100vh;
        }

        :root {
            --app-topbar-height: 44px;
            --base-black: #000000;
            --left-bar-width: 48px;
            --right-bar-width: 48px;
        }

        body.auth-locked .app-topbar,
        body.auth-locked .main-container {
            filter: blur(6px);
            pointer-events: none;
            user-select: none;
        }

        .app-topbar {
            height: var(--app-topbar-height);
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 16px;
            background: var(--base-black);
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            line-height: 1;
        }

        .app-topbar-left,
        .app-topbar-right {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .app-topbar-left {
            flex: 1;
        }

        .app-topbar-right {
            margin-left: auto;
            margin-right: 0;
        }

        .lang-selector {
            position: relative;
            display: flex;
            align-items: center;
        }

        .lang-toggle {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            height: 30px;
            padding: 0 10px;
            border-radius: 6px;
            border: 1px solid rgba(255, 255, 255, 0.18);
            background: rgba(255, 255, 255, 0.04);
            color: rgba(255, 255, 255, 0.85);
            font-size: 11px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            font-family: 'Rajdhani', sans-serif;
        }

        .lang-toggle .material-icons {
            font-size: 16px;
        }

        .lang-toggle:hover {
            border-color: rgba(255, 255, 255, 0.35);
            background: rgba(255, 255, 255, 0.08);
            color: #ffffff;
        }

        .lang-menu {
            position: absolute;
            top: 38px;
            right: 0;
            min-width: 140px;
            background: rgba(15, 15, 25, 0.98);
            border: 1px solid rgba(255, 255, 255, 0.15);
            border-radius: 10px;
            box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
            padding: 6px;
            display: none;
            z-index: 2000;
        }

        .lang-menu.open {
            display: grid;
            gap: 4px;
        }

        .lang-option {
            background: transparent;
            border: none;
            color: rgba(255, 255, 255, 0.8);
            padding: 8px 10px;
            border-radius: 8px;
            font-size: 12px;
            text-align: left;
            cursor: pointer;
            font-family: 'Rajdhani', sans-serif;
            transition: all 0.2s ease;
        }

        .lang-option:hover,
        .lang-option.active {
            background: rgba(255, 145, 77, 0.15);
            color: #ff914d;
        }

        .app-logo img {
            height: 24px;
            display: block;
            filter: drop-shadow(0 0 8px rgba(176, 38, 255, 0.35));
        }

        .app-logo {
            display: flex;
            align-items: center;
        }

        .app-logo-crop {
            display: block;
        }

        .app-logo-image {
            height: 24px;
            display: block;
        }

        .app-separator {
            width: 1px;
            height: 18px;
            background: rgba(255, 255, 255, 0.15);
        }

        .app-tabs {
            display: flex;
            gap: 8px;
            align-items: center;
        }

        .app-tab {
            padding: 4px 10px;
            border-radius: 6px;
            border: 1px solid rgba(255, 255, 255, 0.15);
            color: rgba(255, 255, 255, 0.75);
            font-size: 12px;
            font-weight: 600;
            line-height: 1;
            text-decoration: none;
            transition: all 0.2s ease;
            font-family: 'Rajdhani', sans-serif;
            letter-spacing: 0.2px;
        }

        .app-tab:hover {
            color: #ffffff;
            border-color: rgba(255, 255, 255, 0.35);
            background: rgba(255, 255, 255, 0.06);
        }

        .app-tab.active {
            color: #ff914d;
            border-color: rgba(255, 145, 77, 0.5);
            background: rgba(255, 145, 77, 0.08);
            box-shadow: 0 0 12px rgba(255, 145, 77, 0.25);
        }

        .app-login-btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            height: 30px;
            padding: 0 10px;
            border-radius: 999px;
            border: 1px solid rgba(255, 255, 255, 0.18);
            background: rgba(255, 255, 255, 0.04);
            color: rgba(255, 255, 255, 0.85);
            font-size: 11px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            font-family: 'Rajdhani', sans-serif;
        }

        .app-login-btn:hover {
            border-color: rgba(255, 255, 255, 0.35);
            background: rgba(255, 255, 255, 0.08);
            color: #ffffff;
        }

        .app-login-btn .material-icons {
            font-size: 16px;
        }

        .app-user-info {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 4px 10px;
            background: rgba(255, 145, 77, 0.15);
            border: 1px solid rgba(255, 145, 77, 0.3);
            border-radius: 4px;
            cursor: pointer;
            position: relative;
            font-size: 12px;
            line-height: 1;
        }

        .deriv-steps {
            display: grid;
            gap: 12px;
        }

        .deriv-step {
            background: rgba(15, 23, 42, 0.6);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 12px;
            padding: 10px 12px;
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
        }

        .deriv-step.is-active {
            border-color: rgba(255, 145, 77, 0.5);
            box-shadow: 0 0 12px rgba(255, 145, 77, 0.18);
        }

        .deriv-step.is-complete {
            border-color: rgba(255, 145, 77, 0.55);
            box-shadow: 0 0 12px rgba(255, 145, 77, 0.18);
        }

        .deriv-step.is-locked {
            opacity: 0.6;
        }

        .deriv-step-header {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .deriv-step-indicator {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            font-weight: 700;
            color: #e2e8f0;
            background: rgba(148, 163, 184, 0.2);
            border: 1px solid rgba(148, 163, 184, 0.35);
        }

        .deriv-step.is-complete .deriv-step-indicator {
            background: rgba(255, 145, 77, 0.25);
            border-color: rgba(255, 145, 77, 0.7);
            color: #ffd1b5;
        }

        .deriv-step.is-active .deriv-step-indicator {
            background: rgba(255, 145, 77, 0.2);
            border-color: rgba(255, 145, 77, 0.7);
            color: #ffd1b5;
        }

        .deriv-step-text {
            flex: 1;
        }

        .deriv-step-title {
            font-size: 12px;
            font-weight: 700;
            color: #e2e8f0;
            font-family: 'Rajdhani', sans-serif;
        }

        .deriv-step-desc {
            font-size: 10px;
            color: rgba(226, 232, 240, 0.7);
            margin-top: 2px;
        }

        .deriv-step-status {
            font-size: 10px;
            color: rgba(226, 232, 240, 0.6);
            font-weight: 600;
        }

        .deriv-step-actions {
            margin-top: 8px;
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .deriv-step-btn {
            flex: 1;
            min-width: 120px;
            padding: 7px 10px;
            background: transparent;
            border: 1px solid rgba(255, 145, 77, 0.7);
            color: #ff914d;
            font-size: 11px;
            border-radius: 10px;
            cursor: pointer;
            font-family: 'Rajdhani', sans-serif;
            transition: all 0.2s ease;
        }

        .deriv-step-btn:hover {
            background: rgba(255, 145, 77, 0.12);
            border-color: rgba(255, 145, 77, 0.9);
        }

        .deriv-step-btn.secondary {
            background: transparent;
            border-color: rgba(255, 145, 77, 0.7);
            color: #ff914d;
        }

        .deriv-step-btn.secondary:hover {
            background: rgba(255, 145, 77, 0.12);
            border-color: rgba(255, 145, 77, 0.9);
        }

        .deriv-step-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .deriv-steps.accounts-only .deriv-step[data-step='1'],
        .deriv-steps.accounts-only .deriv-step[data-step='2'] {
            display: none;
        }

        .deriv-steps.logged-in .deriv-step[data-step='1'] {
            display: none;
        }

        .deriv-steps.accounts-only .deriv-step[data-step='3'] {
            padding: 0;
            border: none;
            background: transparent;
            box-shadow: none;
        }

        .deriv-steps.accounts-only .deriv-step[data-step='3'] .deriv-step-header,
        .deriv-steps.accounts-only .deriv-step[data-step='3'] .deriv-step-status {
            display: none;
        }

        .deriv-panel-actions {
            margin-top: 12px;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .deriv-panel-btn {
            width: 100%;
            padding: 8px 10px;
            background: transparent;
            border: 1px solid rgba(255, 145, 77, 0.7);
            color: #ff914d;
            font-size: 11px;
            font-weight: 700;
            border-radius: 10px;
            cursor: pointer;
            font-family: 'Rajdhani', sans-serif;
            transition: all 0.2s ease;
        }

        .deriv-panel-btn:hover {
            background: rgba(255, 145, 77, 0.12);
            border-color: rgba(255, 145, 77, 0.9);
        }

        .deriv-panel-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .options-panel-header {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            margin-bottom: 14px;
        }

        .options-quick-form {
            padding: 12px;
            border-radius: 14px;
            border: 1px solid rgba(255, 145, 77, 0.2);
            background: rgba(2, 6, 23, 0.65);
        }

        .options-quick-form.compact {
            padding: 8px;
            border-radius: 12px;
        }

        .options-quick-form.compact .options-field {
            gap: 4px;
        }

        .options-quick-form.compact .options-type-toggle {
            padding: 6px 10px;
            min-height: 40px;
            height: 40px;
            font-size: 13px;
        }

        .options-quick-form.compact .options-type-icon img {
            width: 16px;
            height: 16px;
            object-fit: contain;
        }

        #optionsTypeIcon {
            width: 16px;
            height: 16px;
            object-fit: contain;
        }

        .options-quick-form.compact .options-type-icon {
            width: 28px;
            height: 28px;
            border-radius: 6px;
        }

        .options-quick-form.compact .options-duration-toggle {
            padding: 6px 10px;
            min-height: 40px;
            height: 40px;
        }

        .options-quick-form.compact .options-slider-wrap {
            margin-top: 6px;
        }

        .options-quick-form.compact .options-stake-row {
            margin-top: 6px;
        }

        .options-quick-form.compact .options-payout-row {
            margin-top: 6px;
        }

        .options-quick-form.compact .options-action-row {
            margin-top: 8px;
        }

        .options-quick-form.compact .options-stake-row input,
        .options-quick-form.compact .options-stake-row .options-stepper {
            height: 40px;
        }

        .options-quick-form.compact .options-stake-row input {
            line-height: 40px;
        }

        .options-quick-form.compact .options-action-btn {
            min-height: 58px;
            padding: 6px 10px;
            font-size: 12px;
            gap: 4px;
        }

        .options-quick-form.compact .options-action-btn strong {
            font-size: 18px;
        }

        #optionsPanel {
            height: 100%;
            display: flex;
            flex-direction: column;
        }

        #optionsPanel .options-quick-form.compact {
            display: flex;
            flex-direction: column;
            flex: 1;
            min-height: 0;
        }

        .options-open-positions {
            margin-top: 10px;
            border: 1px solid rgba(255, 145, 77, 0.6);
            border-radius: 12px;
            background: rgba(2, 6, 23, 0.6);
            padding: 8px;
            display: flex;
            flex-direction: column;
            flex: 1;
            min-height: 0;
        }

        .options-open-positions__header {
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 6px;
            font-family: 'Rajdhani', sans-serif;
            font-size: 12px;
            color: #f8fafc;
            text-transform: uppercase;
            letter-spacing: 0.4px;
            position: relative;
        }

        .options-open-positions__count {
            position: absolute;
            right: 0;
            background: rgba(255, 145, 77, 0.2);
            color: #ff914d;
            font-weight: 700;
            padding: 2px 8px;
            border-radius: 999px;
            font-size: 12px;
        }

        .options-open-positions__list {
            display: flex;
            flex-direction: column;
            gap: 6px;
            max-height: none;
            flex: 1;
            overflow-y: auto;
        }

        .options-open-positions__empty {
            color: rgba(226, 232, 240, 0.6);
            font-size: 11px;
            padding: 6px 4px;
            text-align: center;
        }

        .options-open-card {
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 10px;
            background: rgba(15, 23, 42, 0.6);
            padding: 6px 8px;
            color: #e2e8f0;
            font-size: 11px;
        }

        .options-open-card summary {
            list-style: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 6px;
        }

        .options-open-card summary::-webkit-details-marker {
            display: none;
        }

        .options-open-card__row {
            display: flex;
            justify-content: space-between;
            gap: 8px;
            margin-top: 6px;
            color: rgba(226, 232, 240, 0.75);
        }

        .options-open-card__badge {
            background: rgba(255, 145, 77, 0.2);
            color: #ff914d;
            border-radius: 6px;
            padding: 1px 6px;
            font-size: 10px;
            font-weight: 600;
        }

        .options-open-card__timer {
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.3px;
            color: rgba(226, 232, 240, 0.7);
        }

        .options-open-counter {
            position: relative;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 40px;
            overflow: hidden;
        }

        .options-open-counter__ring {
            width: 100%;
            height: 100%;
            transform: rotate(-90deg);
        }

        .options-open-counter__bg {
            fill: none;
            stroke: rgba(255, 255, 255, 0.2);
            stroke-width: 2;
        }

        .options-open-counter__progress {
            fill: none;
            stroke-width: 2;
            stroke-linecap: round;
            transition: stroke-dashoffset 0.2s linear;
        }

        .options-open-counter .options-open-card__timer {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.2px;
            line-height: 1;
            text-align: center;
            font-variant-numeric: tabular-nums;
        }

        .options-open-card .symbol-tab-counter__text {
            text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
        }

        .options-open-card__progress {
            height: 4px;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.08);
            overflow: hidden;
            width: 100%;
        }

        .options-open-card__progress span {
            display: block;
            height: 100%;
            background: #ff914d;
            width: 0%;
        }

        .options-duration-item {
            min-height: 36px;
            display: flex;
            align-items: center;
        }
        .options-field {
            display: flex;
            flex-direction: column;
            gap: 6px;
            font-size: 10px;
            color: rgba(226, 232, 240, 0.7);
        }

        .options-field select,
        .options-field input {
            background: rgba(0, 9, 34, 0.9);
            border: 1px solid rgba(255, 145, 77, 0.3);
            border-radius: 10px;
            color: #fff;
            padding: 8px 10px;
            font-size: 11px;
            font-family: 'Rajdhani', sans-serif;
        }

        .options-type-field {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .options-type-select {
            position: relative;
        }

        .options-type-toggle {
            width: 100%;
            background: rgba(0, 9, 34, 0.9);
            border: 1px solid rgba(255, 145, 77, 0.3);
            border-radius: 10px;
            color: #fff;
            padding: 12px 14px;
            font-size: 16px;
            font-family: 'Rajdhani', sans-serif;
            display: grid;
            grid-template-columns: auto 1fr auto;
            gap: 12px;
            align-items: center;
            cursor: pointer;
            min-height: 56px;
        }

        .options-type-icon {
            display: inline-flex;
            width: 30px;
            height: 30px;
            align-items: center;
            justify-content: center;
            background: rgba(255, 145, 77, 0.12);
            border-radius: 8px;
            border: 1px solid rgba(255, 145, 77, 0.35);
        }

        .options-type-icon img {
            width: 28px;
            height: 28px;
            object-fit: contain;
        }

        .options-type-label {
            text-align: left;
            font-weight: 700;
            color: #e2e8f0;
            font-size: 16px;
        }

        .options-type-caret {
            color: rgba(226, 232, 240, 0.6);
            font-size: 16px;
        }

        .options-type-menu {
            position: absolute;
            top: calc(100% + 6px);
            left: 0;
            right: 0;
            background: rgba(8, 10, 24, 0.98);
            border: 1px solid rgba(255, 145, 77, 0.35);
            border-radius: 12px;
            box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
            padding: 6px;
            display: none;
            z-index: 20;
        }

        .options-type-menu.is-open {
            display: grid;
            gap: 4px;
        }

        .options-type-item {
            display: grid;
            grid-template-columns: auto 1fr;
            align-items: center;
            gap: 12px;
            padding: 10px 12px;
            border-radius: 10px;
            border: 1px solid transparent;
            background: transparent;
            color: #e2e8f0;
            font-size: 15px;
            font-family: 'Rajdhani', sans-serif;
            cursor: pointer;
            text-align: left;
        }

        .options-type-item img {
            width: 26px;
            height: 26px;
            object-fit: contain;
        }

        .options-type-item[data-options-type="Accumulators"] img {
            width: 32px;
            height: 32px;
        }

        .options-type-toggle.is-accumulators .options-type-icon img {
            width: 34px;
            height: 34px;
        }

        .options-type-item:hover {
            background: rgba(255, 145, 77, 0.12);
            border-color: rgba(255, 145, 77, 0.4);
            color: #ff914d;
        }

        .options-type-item.is-active {
            background: rgba(255, 145, 77, 0.2);
            border-color: rgba(255, 145, 77, 0.7);
            color: #ff914d;
            font-weight: 700;
        }

        .options-field-row {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
            margin-top: 10px;
        }

        .options-toggle-row {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 8px;
            margin-top: 10px;
        }

        .options-toggle {
            background: rgba(148, 163, 184, 0.08);
            border: 1px solid rgba(255, 145, 77, 0.25);
            color: rgba(226, 232, 240, 0.75);
            border-radius: 10px;
            padding: 6px 8px;
            font-size: 11px;
            font-weight: 600;
            cursor: pointer;
            font-family: 'Rajdhani', sans-serif;
        }

        .options-toggle.is-active {
            background: rgba(255, 145, 77, 0.2);
            border-color: rgba(255, 145, 77, 0.7);
            color: #ff914d;
        }

        .options-toggle.is-disabled {
            opacity: 0.45;
            cursor: not-allowed;
        }

        .options-duration-field {
            display: flex;
            flex-direction: column;
            gap: 6px;
            margin-top: 10px;
        }

        .options-duration-select {
            position: relative;
        }

        .options-duration-toggle {
            width: 100%;
            background: rgba(0, 9, 34, 0.9);
            border: 1px solid rgba(255, 145, 77, 0.3);
            border-radius: 10px;
            color: #fff;
            padding: 12px 14px;
            font-size: 16px;
            font-family: 'Rajdhani', sans-serif;
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            min-height: 70px;
        }

        .options-duration-label {
            font-weight: 700;
            color: #e2e8f0;
        }

        .options-duration-caret {
            color: rgba(226, 232, 240, 0.6);
            font-size: 16px;
        }

        .options-duration-menu {
            position: absolute;
            top: calc(100% + 6px);
            left: 0;
            right: 0;
            background: rgba(8, 10, 24, 0.98);
            border: 1px solid rgba(255, 145, 77, 0.35);
            border-radius: 12px;
            box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
            padding: 6px;
            display: none;
            z-index: 200;
            pointer-events: auto;
        }

        .options-duration-menu.is-open {
            display: grid;
            gap: 4px;
        }

        .options-duration-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            padding: 10px 12px;
            border-radius: 10px;
            border: 1px solid transparent;
            background: transparent;
            color: #e2e8f0;
            font-size: 15px;
            font-family: 'Rajdhani', sans-serif;
            cursor: pointer;
            text-align: left;
        }

        .options-duration-item:hover {
            background: rgba(255, 145, 77, 0.12);
            border-color: rgba(255, 145, 77, 0.4);
            color: #ff914d;
        }

        .options-duration-item.is-active {
            background: rgba(255, 145, 77, 0.2);
            border-color: rgba(255, 145, 77, 0.7);
            color: #ff914d;
            font-weight: 700;
        }

        .options-duration-item:disabled,
        .options-duration-item.is-disabled {
            opacity: 0.45;
            cursor: not-allowed;
            background: transparent;
            border-color: transparent;
            color: rgba(226, 232, 240, 0.5);
        }

        .options-slider-wrap {
            margin-top: 12px;
            background: rgba(0, 0, 0, 0.4);
            border-radius: 10px;
            padding: 8px 10px;
            border: 1px solid rgba(255, 145, 77, 0.2);
        }

        .options-slider-track {
            display: grid;
            grid-template-columns: repeat(10, minmax(0, 1fr));
            gap: 4px;
        }

        .options-slider-track span {
            height: 6px;
            border-radius: 999px;
            background: rgba(148, 163, 184, 0.35);
        }

        .options-slider-track span.active {
            background: #ff914d;
        }

        .options-slider-track span.is-selected {
            background: rgba(255, 145, 77, 0.8);
        }

        .options-slider-track span.is-disabled {
            background: rgba(148, 163, 184, 0.2);
            opacity: 0.5;
            cursor: not-allowed;
        }

        .options-slider-label {
            margin-top: 6px;
            font-size: 11px;
            font-weight: 700;
            color: #e2e8f0;
            text-align: center;
        }

        .options-minutes-field {
            margin-top: 1px;
            width: 100%;
            box-sizing: border-box;
        }

        .options-stake-row {
            display: grid;
            grid-template-columns: 28px 1fr 36px 28px;
            gap: 6px;
            align-items: center;
            margin-top: 12px;
            background: rgba(0, 0, 0, 0.35);
            border-radius: 12px;
            padding: 6px 6px;
            border: 1px solid rgba(255, 145, 77, 0.2);
            min-height: 45px;
            width: 100%;
            box-sizing: border-box;
        }

        .options-stake-row input {
            background: transparent;
            border: none;
            color: #fff;
            font-size: 16px;
            font-weight: 700;
            text-align: center;
            width: 100%;
        }

        .options-currency {
            color: rgba(226, 232, 240, 0.7);
            font-size: 12px;
            text-align: center;
            width: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .options-stepper {
            background: rgba(255, 145, 77, 0.12);
            border: 1px solid rgba(255, 145, 77, 0.5);
            color: #ff914d;
            border-radius: 10px;
            height: 32px;
            min-width: 32px;
            width: 32px;
            cursor: pointer;
            font-weight: 700;
        }

        .options-payout-row {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            margin-top: 12px;
            font-size: 13px;
            color: rgba(226, 232, 240, 0.7);
            gap: 4px;
        }

        .options-payout-row strong {
            color: #fff;
            font-size: 72px;
            font-weight: 800;
        }

        #optionsPayoutValue {
            font-size: 72px;
            line-height: 1.05;
        }

        .options-payout-currency {
            font-size: 0.35em;
            letter-spacing: 0.02em;
            opacity: 0.7;
        }

        .options-action-row {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
            margin-top: 12px;
        }

        .options-action-row--overlay {
            position: relative;
            overflow: visible;
        }

        .options-user-dual-btn {
            display: none;
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
            height: 28px;
            padding: 0 16px;
            border-radius: 999px;
            border: 1px solid rgba(255, 255, 255, 0.7);
            background: rgba(15, 23, 42, 0.95);
            color: #ffffff;
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.4px;
            cursor: pointer;
            z-index: 999;
            line-height: 28px;
            box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
        }

        .options-user-dual-btn--quick {
            height: 24px;
            line-height: 24px;
            padding: 0 12px;
            font-size: 10px;
        }

        .grexfarrier-user .options-user-dual-btn {
            display: inline-flex !important;
        }

        .grexfarrier-user #optionsUserQuickCenter {
            display: flex !important;
        }

        .options-action-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            padding: 10px 12px;
            font-size: 14px;
            font-weight: 800;
            border-radius: 12px;
            border: 1px solid var(--options-up-border, rgba(255, 145, 77, 0.6));
            background: linear-gradient(90deg, var(--options-up-bg, rgba(255, 145, 77, 0.25)), var(--options-up-bg-soft, rgba(255, 145, 77, 0.05)));
            color: var(--options-up-color, #ff914d);
            cursor: pointer;
            transition: all 0.2s ease;
            font-family: 'Rajdhani', sans-serif;
            min-height: 72px;
            aspect-ratio: 1 / 1;
            gap: 6px;
            position: relative;
            overflow: hidden;
        }

        .options-action-btn strong {
            font-size: 14px;
        }

        .options-action-btn span,
        .options-action-btn strong {
            position: relative;
            z-index: 1;
        }

        .options-action-btn::before {
            content: '';
            position: absolute;
            left: 10px;
            top: 6px;
            width: 78%;
            height: 78%;
            background-image: var(--options-btn-icon);
            background-repeat: no-repeat;
            background-size: 200% 100%;
            background-position: left center;
            opacity: 0.25;
            filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
        }

        .options-action-btn.down::before {
            background-position: right center;
        }

        .options-action-btn.up::before {
            left: 16px;
        }

        .options-action-btn.up:hover {
            background: var(--options-up-bg, rgba(46, 204, 113, 0.12));
            border-color: var(--options-up-border, rgba(46, 204, 113, 0.9));
            color: var(--options-up-color, #2ecc71);
        }

        .options-action-btn.down:hover {
            background: var(--options-down-bg, rgba(255, 82, 82, 0.12));
            border-color: var(--options-down-border, rgba(255, 82, 82, 0.9));
            color: var(--options-down-color, #ff5252);
        }

        .options-action-btn.down {
            border-color: var(--options-down-border, rgba(255, 82, 82, 0.6));
            background: linear-gradient(90deg, var(--options-down-bg, rgba(255, 82, 82, 0.25)), var(--options-down-bg-soft, rgba(255, 82, 82, 0.05)));
            color: var(--options-down-color, #ff5252);
        }

        .options-open-contract-drawer {
            position: fixed;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 1200;
            height: 20vh;
            min-height: 160px;
            background: rgba(8, 12, 24, 0.96);
            border-top: 1px solid rgba(255, 255, 255, 0.08);
            box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.45);
            transform: translateY(calc(100% - 34px));
            transition: transform 0.35s ease;
            display: flex;
            flex-direction: column;
        }

        .options-open-contract-drawer.is-open {
            transform: translateY(0);
        }

        .options-open-contract-drawer__header {
            height: 34px;
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 0 12px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            background: rgba(15, 23, 42, 0.85);
        }

        .options-open-contract-toggle {
            width: 28px;
            height: 20px;
            border-radius: 10px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            background: rgba(255, 255, 255, 0.06);
            color: #e2e8f0;
            font-size: 12px;
            line-height: 1;
            cursor: pointer;
            transition: transform 0.35s ease, background 0.2s ease;
        }

        .options-open-contract-drawer.is-open .options-open-contract-toggle {
            transform: rotate(180deg);
            background: rgba(255, 255, 255, 0.12);
        }

        .options-open-contract-drawer__title {
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: 0.4px;
            color: rgba(255, 255, 255, 0.85);
            font-weight: 600;
        }

        .options-open-contract-drawer__count {
            margin-left: auto;
            font-size: 11px;
            color: rgba(226, 232, 240, 0.7);
        }

        .options-open-contract-table {
            display: flex;
            flex-direction: column;
            height: calc(100% - 34px);
            overflow: hidden;
        }

        .options-open-contract-row {
            display: grid;
            grid-template-columns: 1.4fr 0.8fr 0.9fr 0.9fr 0.9fr 1fr 1fr 0.8fr;
            gap: 8px;
            align-items: center;
            padding: 6px 12px;
            font-size: 11px;
            color: rgba(226, 232, 240, 0.8);
            border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        }

        .options-open-contract-row--head {
            position: sticky;
            top: 0;
            background: rgba(6, 10, 22, 0.95);
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: 0.4px;
            color: rgba(148, 163, 184, 0.9);
            z-index: 1;
        }

        .options-open-contract-body {
            overflow-y: auto;
            height: 100%;
        }

        .options-open-contract-cell {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .options-open-contract-row.is-won {
            color: #86efac;
        }

        .options-open-contract-row.is-lost {
            color: #fecaca;
        }

        .options-open-contract-status {
            font-weight: 700;
        }

        .options-open-contract-value {
            color: #fff;
            font-weight: 700;
        }

        .risk-result {
            text-align: center;
            font-size: 14px;
            font-weight: 600;
            color: #e2e8f0;
            padding: 6px 8px;
        }

        .risk-table {
            display: grid;
            gap: 6px;
            font-size: 11px;
            color: #e2e8f0;
        }

        .risk-table-row {
            display: grid;
            grid-template-columns: 1fr 1.2fr 1.2fr 1.2fr;
            gap: 6px;
            padding: 6px 8px;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.08);
        }

        .risk-table-row.header {
            background: rgba(15, 23, 42, 0.6);
            color: rgba(255, 255, 255, 0.8);
            text-transform: uppercase;
            font-size: 10px;
            letter-spacing: 0.4px;
        }

        /* HEADER - TradingView Style */
        .header {
            background: var(--base-black);
            padding: 4px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        }

        .header-left {
            display: flex;
            gap: 20px;
            align-items: center;
        }

        .header .material-icons {
            color: #959595;
            transition: color 0.2s ease;
        }

        .header .material-icons:hover {
            color: #ffffff;
        }

        .logo {
            height: 28px;
            filter: drop-shadow(0 0 8px rgba(176, 38, 255, 0.4));
        }

        .symbol-info {
            display: flex;
            gap: 15px;
            align-items: center;
        }

        .symbol-name {
            font-size: 18px;
            font-weight: 700;
            color: #ffffff;
            text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
        }

        .price-display {
            font-size: 16px;
            font-weight: 600;
            padding: 6px 14px;
            background: rgba(255, 145, 77, 0.15);
            border: 1px solid #ff914d;
            border-radius: 6px;
            color: #ff914d;
            box-shadow: 0 0 15px rgba(255, 145, 77, 0.4);
        }

        .controls {
            display: flex;
            gap: 10px;
            align-items: center;
        }

        .controls select {
            padding: 8px 14px;
            background: rgba(176, 38, 255, 0.1);
            border: 1px solid rgba(0, 255, 204, 0.4);
            color: #ffffff;
            border-radius: 6px;
            font-size: 12px;
            font-family: 'Rajdhani', monospace;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s;
            backdrop-filter: blur(10px);
            box-shadow: 0 0 10px rgba(176, 38, 255, 0.2);
        }

        .controls select:hover {
            background: rgba(176, 38, 255, 0.2);
            box-shadow: 0 0 15px rgba(176, 38, 255, 0.4);
        }

        .controls input {
            padding: 8px 14px;
            background: rgba(176, 38, 255, 0.1);
            border: 1px solid rgba(176, 38, 255, 0.4);
            color: #ffffff;
            border-radius: 6px;
            font-size: 12px;
            font-family: 'Rajdhani', monospace;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s;
            backdrop-filter: blur(10px);
            box-shadow: 0 0 10px rgba(176, 38, 255, 0.2);
        }

        .controls input:hover {
            background: rgba(176, 38, 255, 0.2);
            box-shadow: 0 0 15px rgba(176, 38, 255, 0.4);
        }

        .controls button {
            padding: 8px 14px;
            background: rgba(176, 38, 255, 0.15);
            border: 1px solid rgba(176, 38, 255, 0.5);
            color: #ffffff;
            border-radius: 6px;
            font-size: 12px;
            font-family: 'Rajdhani', monospace;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            backdrop-filter: blur(10px);
            box-shadow: 0 0 10px rgba(176, 38, 255, 0.3);
        }

        .controls button:hover {
            background: rgba(176, 38, 255, 0.3);
            transform: translateY(-2px);
            box-shadow: 0 0 20px rgba(176, 38, 255, 0.6), 0 4px 15px rgba(176, 38, 255, 0.3);
            border-color: #b026ff;
        }

        .status-indicator {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 6px 12px;
            background: rgba(255, 145, 77, 0.15);
            border-radius: 6px;
            border: 1px solid rgba(255, 145, 77, 0.4);
            box-shadow: 0 0 15px rgba(255, 145, 77, 0.3);
        }

        .status-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: #ff914d;
            box-shadow: 0 0 10px rgba(255, 145, 77, 0.8);
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0%, 100% {
                opacity: 1;
                box-shadow: 0 0 10px rgba(255, 145, 77, 0.8);
            }
            50% {
                opacity: 0.6;
                box-shadow: 0 0 20px rgba(255, 145, 77, 1);
            }
        }

        /* MAIN CONTAINER */
.main-container {
    display: flex;
    height: calc(100vh - 60px - var(--app-topbar-height));
    position: relative;
    --side-panel-width: 0px;
    --chart-right-offset: var(--right-bar-width);
}

.main-container.panel-open {
    --side-panel-width: clamp(260px, 22vw, 330px);
    --chart-right-offset: var(--right-bar-width);
}

        /* CHART AREA */
.chart-area {
    display: flex;
    flex-direction: column;
    background: var(--base-black);
    position: relative;
    isolation: isolate;
    /* Prevent browser page pan/zoom so gestures are handled by the chart. */
    touch-action: none;
    overscroll-behavior: none;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: calc(100% - var(--left-bar-width) - var(--chart-right-offset) - var(--side-panel-width));
    margin-left: var(--left-bar-width);
    flex-shrink: 0;
}

.chart-area::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.95)), url('assets/bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    pointer-events: none;
}


.main-container.panel-open .chart-area {
    width: calc(100% - var(--left-bar-width) - var(--chart-right-offset) - var(--side-panel-width));
}

        .chart-header {
            padding: 12px 20px;
            background: var(--base-black);
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: none;
        }

        .chart-title {
            font-size: 13px;
            font-weight: 600;
            color: #ffffff;
            text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
            letter-spacing: 1px;
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .symbol-container {
            display: flex;
            flex-direction: column;
            gap: 3px;
        }

        .symbol-tab-counter {
            position: absolute;
            right: 28px;
            bottom: 6px;
            width: 44px;
            height: 44px;
            border-radius: 999px;
            color: #ffffff;
            font-family: 'Rajdhani', sans-serif;
            font-size: 15px;
            font-weight: 700;
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 3;
            pointer-events: none;
            transform-origin: center;
            text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
            position: absolute;
        }

        .symbol-tab-ring {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            transform: rotate(-90deg);
        }

        .symbol-tab-ring-bg {
            fill: none;
            stroke: rgba(255, 255, 255, 0.2);
            stroke-width: 2;
        }

        .symbol-tab-ring-progress {
            fill: none;
            stroke: #ffffff;
            stroke-width: 2;
            stroke-linecap: round;
            transition: stroke-dashoffset 0.2s linear;
        }

        .symbol-tab-counter__text {
            position: relative;
            z-index: 2;
        }

        .symbol-meta {
            display: flex;
            gap: 8px;
            font-size: 10px;
            font-weight: 500;
            opacity: 0.7;
        }

        .symbol-meta-item {
            padding: 2px 6px;
            background: rgba(255, 145, 77, 0.15);
            border: 1px solid rgba(255, 145, 77, 0.4);
            border-radius: 3px;
            color: #ff914d;
            text-transform: uppercase;
        }

        .chart-stats {
            display: flex;
            gap: 20px;
            font-size: 12px;
        }

        .stat-item {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .stat-label {
            color: #666;
            font-size: 10px;
            text-transform: uppercase;
        }

        .stat-value {
            color: #fff;
            font-weight: 600;
        }

        .stat-value.positive { color: #ff914d; }
        .stat-value.negative { color: #ff5252; }

        .options-quick-bar {
            position: absolute;
            left: 50%;
            bottom: 14px;
            transform: translateX(-50%);
            display: flex;
            flex-direction: column;
            align-items: stretch;
            gap: 8px;
            padding: 0;
            background: transparent;
            border: none;
            border-radius: 0;
            box-shadow: none;
            backdrop-filter: none;
            z-index: 18;
            font-family: 'Rajdhani', sans-serif;
            width: min(78vw, 260px);
        }

        .options-quick-bar.is-hidden {
            display: none;
        }

        .options-quick-bar__top {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
        }

        .options-quick-bar__section {
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .options-quick-bar__label {
            font-size: 10px;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: rgba(255, 255, 255, 0.55);
        }

        .options-quick-bar__actions {
            display: flex;
            gap: 10px;
        }

        .options-quick-bar .options-stake-row {
            gap: 3px;
        }

        .options-quick-bar .options-stepper {
            width: 18px;
            height: 18px;
            font-size: 10px;
            padding: 0;
        }

        .options-quick-bar #optionsStakeInput {
            width: 44px;
            height: 18px;
            font-size: 10px;
            padding: 0 4px;
        }

        .options-quick-bar .options-currency {
            font-size: 9px;
        }

        .options-quick-bar .options-action-btn {
            min-height: 40px;
            height: 20px;
            padding: 2px 8px;
            font-size: 11px;
            line-height: 1;
            gap: 2px;
            aspect-ratio: auto;
        }

        .options-quick-bar .options-action-btn strong {
            font-size: 12px;
        }

        /* CANVAS */
        #footprintCanvas {
            flex: 1;
            background: transparent;
            background-image: none;
            cursor: crosshair;
            box-shadow: none;
            position: relative;
            z-index: 1;
            touch-action: none;
            overscroll-behavior: none;
        }

        /* SIDEBAR */
        .sidebar {
            width: 320px;
            background: var(--base-black);
            border-left: 2px solid rgba(100, 200, 255, 0.5);
            display: flex;
            flex-direction: column;
            overflow-y: auto;
            backdrop-filter: none;
        }

        .sidebar-section {
            padding: 10px;
            border-bottom: 1px solid rgba(200, 200, 200, 0.1);
        }

        .sidebar-section h3 {
            font-size: 12px;
            font-weight: 700;
            text-transform: uppercase;
            margin-bottom: 14px;
            letter-spacing: 2px;
        }

        .sidebar-section:nth-child(1) h3 {
            color: #00ffcc;
            text-shadow: 0 0 10px rgba(0, 255, 204, 0.6);
        }

        .sidebar-section:nth-child(2) h3 {
            color: #ffffff;
            text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
        }

        .sidebar-section:nth-child(3) h3 {
            color: #00ffcc;
            text-shadow: 0 0 10px rgba(0, 255, 204, 0.6);
        }

        .volume-profile {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .volume-bar {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 11px;
        }

        .price-label {
            width: 60px;
            text-align: right;
            color: #888;
        }

        .bar-container {
            flex: 1;
            height: 18px;
            background: rgba(255, 255, 255, 0.02);
            border-radius: 2px;
            overflow: hidden;
            position: relative;
        }

        .bar-fill {
            height: 100%;
            display: flex;
            transition: width 0.3s;
        }

        .bar-buy {
            background: linear-gradient(90deg, rgba(255, 145, 77, 0.3), rgba(255, 145, 77, 0.6));
        }

        .bar-sell {
            background: linear-gradient(90deg, rgba(255, 82, 82, 0.3), rgba(255, 82, 82, 0.6));
        }

        .volume-value {
            width: 50px;
            text-align: right;
            color: #fff;
            font-weight: 500;
        }

        /* MARKET DEPTH */
        .market-depth {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .depth-row {
            display: flex;
            justify-content: space-between;
            font-size: 11px;
            padding: 4px 8px;
            background: rgba(255, 255, 255, 0.02);
            border-radius: 3px;
        }

        .depth-price { color: #888; }
        .depth-buy { color: #ff914d; }
        .depth-sell { color: #ff5252; }

        /* DELTA PROFILE */
        .delta-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 6px 0;
            border-bottom: 1px solid rgba(255, 255, 255, 0.03);
            font-size: 12px;
        }

        .delta-time {
            color: #666;
        }

        .delta-value {
            font-weight: 600;
        }

        /* LEGEND */
        .legend {
            display: flex;
            gap: 15px;
            flex-wrap: wrap;
        }

        .legend-item {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 11px;
        }

        .legend-box {
            width: 12px;
            height: 12px;
            border-radius: 2px;
        }

        /* LOADING OVERLAY */
        .loading-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.8);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s;
        }

        .loading-overlay.active {
            opacity: 1;
            pointer-events: all;
        }

        .spinner {
            width: 50px;
            height: 50px;
            border: 3px solid rgba(0, 217, 255, 0.2);
            border-top-color: #00d9ff;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

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

        /* SCROLLBAR */
        .sidebar::-webkit-scrollbar {
            width: 6px;
        }

        .sidebar::-webkit-scrollbar-track {
            background: #0a0a0a;
        }

        .sidebar::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.2);
            border-radius: 3px;
        }

        .sidebar::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        /* RIGHT ICON BAR */
.right-icon-bar {
    position: absolute;
    right: 0;
    top: 0;
    width: var(--right-bar-width);
    height: calc(100vh - 36px);
    background: var(--base-black);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 4px 4px 4px;
    gap: 8px;
    z-index: 120;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}


.right-icon-bar .icon-button.trade-toggle {
    margin-top: auto;
    margin-bottom: 30px;
}

.right-icon-bar #pipToggleBtn {
    margin-bottom: 12px;
}

#pipIndicatorModeToggle {
    position: relative;
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
}

#pipIndicatorModeToggle::before {
    content: "";
    position: absolute;
    top: 1px;
    left: 1px;
    width: 12px;
    height: 12px;
    background: #ff914d;
    border-radius: 999px;
    transition: transform 0.2s ease;
}

#pipIndicatorModeToggle:checked::before {
    transform: translateX(16px);
}

        /* LEFT TOOL BAR - TradingView Style */
.left-tool-bar {
            position: absolute;
            left: 0;
            top: 0px;
            width: 48px;
            height: calc(100vh - 36px);
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            padding: 0px 4px 4px 4px;
            background: var(--base-black);
            border-right: 1px solid rgba(255, 255, 255, 0.08);
            z-index: 120;
        }

        @media (max-width: 900px) {
            :root {
                --app-topbar-height: 40px;
                --left-bar-width: 48px;
                --right-bar-width: 48px;
            }

            body {
                overscroll-behavior: none;
            }

            .app-topbar {
                padding: 0 8px;
                position: relative;
            }

            .app-topbar-left {
                gap: 8px;
                min-width: 0;
            }

            .app-separator {
                display: none;
            }

            .app-tabs {
                gap: 4px;
                overflow-x: auto;
                scrollbar-width: none;
            }

            .app-tabs::-webkit-scrollbar {
                display: none;
            }

            .app-tab {
                padding: 3px 6px;
                font-size: 10px;
            }

            .app-logo-crop {
                width: 30px;
                height: 24px;
                overflow: hidden;
            }

            .app-logo-image {
                width: 130px;
                height: 24px;
                object-fit: cover;
                object-position: left center;
            }

            .app-user-info {
                padding: 4px;
                border-radius: 999px;
                margin-right: 12px;
            }

            .app-login-btn {
                height: 28px;
                padding: 0 8px;
                font-size: 10px;
            }

            .app-topbar-right {
                gap: 6px;
                padding-right: 40px;
            }

            .lang-selector {
                position: absolute;
                top: 6px;
                right: 6px;
            }

            .lang-toggle {
                height: 28px;
                padding: 0 8px;
            }

            .main-container {
                height: calc(100dvh - var(--app-topbar-height));
            }

            .left-tool-bar,
            .right-icon-bar {
                position: fixed;
                top: var(--app-topbar-height);
                height: calc(100dvh - var(--app-topbar-height));
            }

            .chart-area {
                margin-left: var(--left-bar-width);
                width: calc(100% - var(--left-bar-width) - var(--chart-right-offset));
                touch-action: none;
                overscroll-behavior: none;
            }

            .main-container.panel-open .chart-area {
                width: calc(100% - var(--left-bar-width) - var(--chart-right-offset));
            }

            #footprintCanvas {
                touch-action: none;
            }

            .slide-panel {
                position: fixed;
                right: 0;
                top: var(--app-topbar-height);
                height: calc(100dvh - var(--app-topbar-height));
                width: 0;
            }

            .slide-panel.open {
                width: 100%;
            }

        #indicatorsMenu {
            width: calc(100vw - 48px);
            margin: 0 8px;
            background: rgba(12, 13, 20, 0.98);
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 10px;
            box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
            padding: 12px;
            z-index: 25000;
        }

        #miniTfList {
            background: rgba(12, 13, 20, 0.98) !important;
            border: 1px solid rgba(255, 255, 255, 0.12) !important;
            border-radius: 10px !important;
            box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65) !important;
            padding: 12px !important;
            color: rgba(255, 255, 255, 0.75);
            font-family: 'Rajdhani', sans-serif;
            z-index: 25000 !important;
        }

            #miniTfList .mini-tf-btn {
                background: rgba(255, 255, 255, 0.04) !important;
                border: 1px solid rgba(255, 255, 255, 0.12) !important;
                color: rgba(255, 255, 255, 0.75) !important;
                font-size: 12px !important;
                font-weight: 600 !important;
            }

            #miniTfList .mini-tf-btn.selected {
                background: rgba(255, 145, 77, 0.16) !important;
                border-color: rgba(255, 145, 77, 0.5) !important;
                color: #ffffff !important;
            }

            #indicatorsMenu .chart-style-menu__header {
                border-bottom: 1px solid rgba(255, 255, 255, 0.08);
                margin: -12px -12px 8px;
                padding: 12px 14px;
            }

            #indicatorsMenu .indicator-categories {
                display: flex;
                flex-direction: column;
                gap: 12px;
                min-width: 240px;
                max-width: 360px;
            }

            #indicatorsMenu .indicators-menu__header {
                flex-direction: column;
                align-items: flex-start;
                gap: 8px;
            }

            #indicatorsMenu .indicators-search {
                width: 100%;
                justify-content: space-between;
            }

            #indicatorsMenu .indicators-search.is-open .indicators-search__input {
                width: 100%;
            }

            #indicatorsMenu .indicator-category {
                background: transparent;
                border: none;
                border-radius: 8px;
                padding: 0;
            }

            #indicatorsMenu .indicator-menu-item span:last-child {
                font-family: 'Rajdhani', sans-serif;
                font-size: 13px;
                font-weight: 600;
            }

            #indicatorsMenu .indicator-menu-item {
                color: rgba(255, 255, 255, 0.7);
                background: transparent;
            }

	            /* Keep options quick bar identical to desktop on mobile.
	               (Do not override position/size inside this media query.) */

            #indicatorsMenu > div {
                width: 100%;
            }

            .chart-style-menu {
                min-width: 0;
                width: min(82vw, 280px);
                min-height: 320px;
                max-height: 90vh;
                overflow: hidden;
            }

            .chart-style-menu__body {
                display: flex !important;
                flex-direction: column !important;
                height: 100%;
                overflow-y: auto;
            }

            .chart-style-menu__preview {
                order: 0;
                width: 100%;
            }

            .chart-style-menu__list {
                order: 1;
                width: 100%;
            }

            .chart-style-menu__preview-box {
                padding: 4px 8px;
            }

            .chart-style-menu__preview-box canvas {
                max-height: 90px;
            }

            .chart-style-menu__colors {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

            body.mobile-bars-hidden .left-tool-bar,
            body.mobile-bars-hidden .right-icon-bar {
                opacity: 0;
                pointer-events: none;
            }

            body.mobile-bars-hidden .chart-area {
                margin-left: 0;
                width: 100%;
            }

            body.mobile-bars-hidden .main-container.panel-open .chart-area {
                width: 100%;
            }
        }

        @supports (-webkit-touch-callout: none) {
            @media (max-width: 900px) {
                :root {
                    --app-topbar-height: 48px;
                    --left-bar-width: 64px;
                    --right-bar-width: 64px;
                }

                .left-tool-bar,
                .right-icon-bar {
                    width: 64px;
                }

                .tool-button {
                    width: 44px;
                    height: 44px;
                }

                .chart-area {
                    margin-left: 64px;
                    width: calc(100% - 128px);
                }

                .main-container.panel-open .chart-area {
                    width: calc(100% - 128px);
                }

                .app-tab {
                    font-size: 12px;
                    padding: 5px 9px;
                }
            }
        }

        #symbolTabsBar {
            background: var(--base-black) !important;
            overflow-y: visible !important;
        }

        .chart-grid-selector {
            position: relative;
            display: flex;
            align-items: center;
            margin-right: 6px;
            flex-shrink: 0;
        }

        .chart-grid-toggle {
            width: 50px;
            height: 50px;
            border-radius: 6px;
            border: 1px solid rgba(255, 255, 255, 0.12);
            background: rgba(0, 0, 0, 0.4);
            color: rgba(255, 255, 255, 0.65);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .chart-grid-toggle:hover {
            color: #ffffff;
            border-color: rgba(255, 255, 255, 0.3);
            background: rgba(255, 255, 255, 0.08);
        }

        .chart-grid-menu {
            position: fixed;
            min-width: 280px;
            background: rgba(15, 15, 25, 0.98);
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 10px;
            padding: 10px 12px;
            display: none;
            flex-direction: column;
            gap: 10px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
            opacity: 1;
            transform: translateY(0);
            pointer-events: auto;
            z-index: 25000;
        }

        .chart-grid-selector.is-open .chart-grid-menu {
            display: flex;
        }

        .chart-grid-section {
            display: grid;
            grid-template-columns: 70px 1fr;
            align-items: center;
            gap: 10px;
        }

        .chart-grid-label {
            font-size: 10px;
            font-weight: 700;
            letter-spacing: 0.6px;
            text-transform: uppercase;
            color: rgba(255, 255, 255, 0.55);
            font-family: 'Rajdhani', sans-serif;
        }

        .chart-grid-options {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .chart-grid-option {
            width: 34px;
            height: 30px;
            border-radius: 6px;
            border: 1px solid rgba(255, 255, 255, 0.12);
            background: rgba(255, 255, 255, 0.04);
            color: rgba(255, 255, 255, 0.45);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
            padding: 0;
        }

        .chart-grid-option:hover {
            color: rgba(255, 255, 255, 0.8);
            border-color: rgba(255, 255, 255, 0.35);
            background: rgba(255, 255, 255, 0.1);
        }

        .chart-grid-option.is-active {
            color: #ff914d;
            border-color: rgba(255, 145, 77, 0.6);
            background: rgba(255, 145, 77, 0.12);
        }

        .chart-grid-icon {
            width: 30px;
            height: 30px;
        }

        .chart-grid-cell {
            fill: currentColor;
        }

        .chart-grid-root {
            position: absolute;
            inset: 0;
            top: 64px;
            display: grid;
            gap: 8px;
            /* padding: 8px; */
            z-index: 1;
        }

        .chart-pane {
            position: relative;
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 8px;
            overflow: hidden;
            background: rgba(8, 10, 16, 0.4);
        }

        .chart-pane.is-active {
            border-color: rgba(255, 145, 77, 0.6);
            box-shadow: 0 0 0 1px rgba(255, 145, 77, 0.2);
        }

        .chart-pane.is-dragging {
            opacity: 0.7;
            cursor: grabbing;
        }

        .chart-pane.is-drop-target {
            border-color: rgba(56, 189, 248, 0.8);
            box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
        }

        .chart-pane.is-swapping {
            transition: transform 2000ms ease;
            z-index: 5;
            will-change: transform;
        }

        .chart-pane-drag-handle {
            position: absolute;
            left: 8px;
            bottom: 16px;
            width: 24px;
            height: 24px;
            border-radius: 6px;
            background: rgba(148, 163, 184, 0.16);
            border: 1px solid rgba(148, 163, 184, 0.35);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: grab;
            z-index: 4;
        }

        .chart-pane-drag-handle svg {
            width: 16px;
            height: 16px;
            fill: rgba(148, 163, 184, 0.8);
        }

        .chart-pane.is-dragging .chart-pane-drag-handle {
            cursor: grabbing;
            background: rgba(148, 163, 184, 0.25);
        }

        .chart-pane-drag-ghost {
            position: fixed;
            top: -9999px;
            left: -9999px;
            opacity: 0.85;
            pointer-events: none;
            z-index: 9999;
            border: 1px solid rgba(148, 163, 184, 0.5);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
        }

        .chart-pane canvas {
            width: 100%;
            height: 100%;
            display: block;
            background: transparent;
            cursor: crosshair;
        }

        #miniControlBar {
            background: var(--base-black);
        }

        #footprintStatusIndicator {
            background: var(--base-black) !important;
        }

        .left-tool-bar .toolbar-caption {
            font-size: 9px;
            letter-spacing: 1px;
            text-transform: uppercase;
            color: rgba(255, 255, 255, 0.4);
            margin-top: 0px;
            margin-bottom: 0px;
        }

.tool-button {
            width: 36px;
            height: 36px;
            border-radius: 4px;
            border: none;
            background: transparent;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #959595;
            font-size: 28px;
            cursor: pointer;
            transition: all 0.2s ease;
            position: relative;
}

.tool-button .lucide {
    width: 24px;
    height: 24px;
    stroke-width: 1.5;
}

        .tool-button:hover {
            background: rgba(255, 255, 255, 0.1);
            color: #ffffff;
        }

        .tool-button.active {
            background: transparent;
            color: #ff914d;
        }

/* Crosshair icon - hide center to show only line ends */
#crosshairToggle .crosshair-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#crosshairToggle .crosshair-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: rgba(15, 15, 25, 0.98);
    border-radius: 50%;
}

#crosshairToggle:hover .crosshair-icon::after {
    background: rgba(15, 15, 25, 0.98);
}

        .tool-divider {
            display: none;
        }

        .tool-stack {
            display: flex;
            flex-direction: column;
            gap: 2px;
            width: 100%;
            align-items: center;
        }

        .tool-button[data-tool="reset"] {
            margin-top: auto;
        }

        .tool-button[data-tool="reset"]:hover {
            background: rgba(255, 82, 82, 0.15);
        }

        .icon-button {
            width: 40px;
            height: 40px;
            background: transparent;
            border: none;
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
            color: #959595;
        }

        .icon-button .material-icons {
            font-size: 26px;
        }

        .icon-button:hover {
            background: rgba(255, 255, 255, 0.1);
            color: #ffffff;
        }

        .icon-button.active {
            background: transparent;
            color: #ff914d;
        }

        /* TOOL SUBMENU STYLES */
        .tool-submenu-container {
            position: relative;
        }

        .tool-submenu-trigger {
            position: relative;
        }

.tool-submenu-icon-secondary {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    opacity: 0.55;
    pointer-events: none;
}

        .tool-submenu {
            position: absolute;
            left: 44px;
            top: 0;
            background: rgba(30, 30, 40, 0.98);
            border: 1px solid rgba(255, 255, 255, 0.15);
            border-radius: 6px;
            padding: 4px;
            display: flex;
            flex-direction: column;
            gap: 4px;
            z-index: 200;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(10px);
            min-width: 44px;
            opacity: 0;
            pointer-events: none;
            transform: translateX(-10px);
            transition: opacity 0.15s ease 0.15s, transform 0.15s ease 0.15s;
        }

        /* Puente invisible entre trigger y submenu */
        .tool-submenu::before {
            content: '';
            position: absolute;
            right: 100%;
            top: 0;
            bottom: 0;
            width: 8px;
            background: transparent;
        }

        .tool-submenu-container.open .tool-submenu {
            opacity: 1;
            pointer-events: all;
            transform: translateX(0);
            transition-delay: 0s;
        }

        .tool-submenu-container.open .tool-submenu-trigger {
            background: rgba(255, 255, 255, 0.1);
        }

        .tool-submenu .tool-button {
            margin: 0;
            width: auto;
            min-width: 160px;
            height: 32px;
            justify-content: flex-start;
            gap: 10px;
            padding: 0 10px;
            font-size: 12px;
        }

        .tool-submenu .tool-fav {
            margin-left: auto;
            background: transparent;
            border: none;
            padding: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 18px;
            height: 18px;
            color: rgba(255, 255, 255, 0.45);
            cursor: pointer;
        }

        .tool-submenu .tool-fav .tool-icon {
            width: 14px;
            height: 14px;
            stroke-width: 1.5;
        }

        .tool-submenu .tool-fav:hover {
            color: rgba(255, 255, 255, 0.85);
        }

        .tool-submenu .tool-fav.is-active {
            color: #ffcf54;
        }

        .tool-submenu .tool-label {
            color: rgba(255, 255, 255, 0.8);
            font-family: 'Rajdhani', sans-serif;
            font-size: 12px;
            letter-spacing: 0.2px;
            white-space: nowrap;
        }

        .tool-submenu-divider {
            height: 1px;
            width: calc(100% - 12px);
            margin: 4px 6px;
            background: rgba(255, 255, 255, 0.12);
        }

        /* TOOL SUBMENU GRID LAYOUT */
        .tool-submenu-grid {
            display: grid !important;
            grid-template-columns: repeat(4, 36px);
            gap: 4px;
            min-width: auto;
            width: max-content;
        }

        .tool-submenu-grid .tool-button {
            width: 36px;
            height: 36px;
        }

        .favorite-toolbar {
            position: fixed;
            top: 120px;
            left: 120px;
            display: flex;
            gap: 0;
            background: rgba(38, 45, 60, 0.96);
            border: 1px solid rgba(255, 255, 255, 0.18);
            border-radius: 6px;
            padding: 4px 4px 4px 2px;
            z-index: 25000;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(10px);
            user-select: none;
        }

        .favorite-toolbar.hidden {
            display: none;
        }

        .favorite-toolbar__body {
            display: flex;
            gap: 0;
            align-items: center;
            flex-wrap: nowrap;
        }

        .favorite-toolbar__handle {
            width: 20px;
            border-radius: 4px;
            margin-right: 2px;
            background-image: radial-gradient(circle, rgba(255, 255, 255, 0.35) 1.2px, transparent 1.3px);
            background-size: 8px 8px;
            background-position: 0 0;
            background-repeat: repeat;
            cursor: move;
        }

        .favorite-tool-btn {
            width: 34px;
            height: 34px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            border-radius: 4px;
            transition: all 0.2s ease;
            color: rgba(255, 255, 255, 0.85);
            background: transparent;
            border: none;
        }

        .favorite-tool-btn:hover {
            background: rgba(255, 255, 255, 0.1);
            color: #ffffff;
        }

        .favorite-tool-btn .tool-icon {
            width: 18px;
            height: 18px;
        }

        .favorite-tool-icon {
            width: 18px;
            height: 18px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        /* SLIDING PANEL */
        .slide-panel {
            position: absolute;
            right: var(--right-bar-width);
            top: 36px;
            width: 0;
            height: calc(100% - 36px);
            background: rgba(12, 14, 24, 0.96);
            overflow: hidden;
            transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 99;
            backdrop-filter: blur(12px);
            box-shadow: none;
            border-left: none;
            font-size: 16px;
        }

        .slide-panel.open {
            width: clamp(260px, 22vw, 330px);
            box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
            border-left: 1px solid rgba(255, 255, 255, 0.06);
        }

        /* DRAWING POPUP */
        .drawing-popup {    
            position: absolute;
            min-width: 260px;
            max-width: 320px;
            background: rgba(200, 200, 220, 0.15);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 60px rgba(102, 126, 234, 0.3);
            border-radius: 20px;
            padding: 28px;
            z-index: 220;
            transition: opacity 0.2s ease, transform 0.2s ease;
            cursor: move;
            user-select: none;
        }

        .drawing-popup.hidden {
            display: none;
        }

        .drawing-popup h4 {
            margin-bottom: 12px;
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: 2px;
            color: #00ffcc;
            text-shadow: 0 0 10px rgba(0, 255, 204, 0.6);
        }

        .drawing-popup .popup-field {
            display: flex;
            flex-direction: column;
            gap: 6px;
            margin-bottom: 10px;
        }

        .drawing-popup label {
            font-size: 10px;
            text-transform: uppercase;
            color: rgba(255, 255, 255, 0.65);
            letter-spacing: 1px;
        }

        .drawing-popup input,
        .drawing-popup select {
            background: rgba(0, 255, 204, 0.08);
            border: 1px solid rgba(0, 255, 204, 0.25);
            border-radius: 8px;
            padding: 6px 10px;
            color: #ffffff;
            font-family: 'Rajdhani', monospace;
            font-size: 12px;
            outline: none;
            transition: border 0.2s ease, box-shadow 0.2s ease;
        }

        .drawing-popup input:focus,
        .drawing-popup select:focus {
            border-color: rgba(0, 255, 204, 0.55);
            box-shadow: 0 0 12px rgba(0, 255, 204, 0.35);
        }

        .drawing-popup input[type="color"] {
            height: 36px;
            padding: 0;
            cursor: pointer;
        }

        .drawing-popup .popup-actions {
            margin-top: 12px;
            display: flex;
            gap: 10px;
            justify-content: flex-start;
        }

        .drawing-popup button {
            padding: 8px 16px;
            border-radius: 8px;
            border: 1px solid rgba(0, 255, 204, 0.4);
            background: rgba(0, 255, 204, 0.15);
            color: #ffffff;
            font-size: 11px;
            font-family: 'Rajdhani', monospace;
            text-transform: uppercase;
            letter-spacing: 1px;
            cursor: pointer;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }

        .drawing-popup button:hover {
            transform: translateY(-1px);
            box-shadow: 0 5px 16px rgba(0, 255, 204, 0.35);
        }

        .drawing-popup button.danger {
            border-color: rgba(255, 82, 82, 0.5);
            background: rgba(255, 82, 82, 0.1);
        }

        .drawing-popup button.danger:hover {
            box-shadow: 0 5px 16px rgba(255, 82, 82, 0.3);
        }

        /* FLOATING TOOLBAR - TradingView Style */
        .floating-toolbar {
            position: fixed;
            top: 60px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 0;
            background: rgba(38, 45, 60, 0.96);
            border: 1px solid rgba(255, 255, 255, 0.18);
            border-radius: 6px;
            padding: 4px;
            z-index: 20000;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(10px);
            cursor: move;
            user-select: none;
        }

        .floating-toolbar.hidden {
            display: none;
        }

        .toolbar-icon {
            width: 34px;
            height: 34px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            border-radius: 4px;
            transition: all 0.2s ease;
            color: rgba(255, 255, 255, 0.85);
        }

        .toolbar-icon:hover {
            background: rgba(255, 255, 255, 0.1);
            color: #ffffff;
        }

        .toolbar-icon .tool-icon {
            width: 18px;
            height: 18px;
        }

        .toolbar-icon#toolDelete:hover {
            background: rgba(255, 82, 82, 0.15);
            color: #ff5252;
        }

        .panel-content {
            padding: 6px;
            width: 100%;
            height: 100%;
            overflow-y: auto;
            opacity: 0;
            transition: opacity 0.3s ease 0.1s;
        }

        .panel-section {
            width: 100%;
            min-width: 0;
        }

        .slide-panel .panel-content,
        .slide-panel .panel-content * {
            font-size: 18px;
        }
        .slide-panel .panel-content #optionsPanel,
        .slide-panel .panel-content #optionsPanel * {
            font-size: 14px;
        }

        .slide-panel.open .panel-content {
            opacity: 1;
        }

        .panel-content::-webkit-scrollbar {
            width: 6px;
        }

        .panel-content::-webkit-scrollbar-track {
            background: #0a0a0a;
        }

        .panel-content::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.2);
            border-radius: 3px;
        }

        .panel-content::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        .panel-title {
            font-size: 15px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: #e2e8f0;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            padding-bottom: 8px;
        }

        /* SYMBOL LIST IN PANEL */
        .symbol-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .symbol-item {
            padding: 4px 6px 6px;
            background: rgba(15, 23, 42, 0.6);
            border: 1px solid rgba(148, 163, 184, 0.18);
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .symbol-item:hover {
            background: rgba(30, 41, 59, 0.75);
            border-color: rgba(148, 163, 184, 0.45);
            transform: translateX(-5px);
            box-shadow: 0 0 12px rgba(148, 163, 184, 0.25);
        }

        .symbol-item.active {
            background: rgba(0, 255, 204, 0.15);
            border-color: #00ffcc;
            box-shadow: 0 0 20px rgba(0, 255, 204, 0.6);
        }

        .symbol-item .symbol-code {
            font-size: 16px;
            font-weight: 800;
            color: #f8fafc;
        }

        .symbol-item .symbol-name {
            font-size: 12px;
            color: rgba(226, 232, 240, 0.9);
            text-shadow: none;
        }

        .symbol-mini-canvas {
            width: 100%;
            height: 90px;
            border-radius: 6px;
            background: rgba(15, 23, 42, 0.45);
        }

        .symbol-mini {
            position: relative;
            width: 100%;
            margin-top: 0;
        }

        .symbol-mini-overlay {
            position: absolute;
            left: 6px;
            top: 4px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            pointer-events: none;
        }

        .symbol-mini-left {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .symbol-mini-top-right {
            position: absolute;
            right: 6px;
            top: 4px;
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: rgba(148, 163, 184, 0.9);
            pointer-events: none;
        }

        .symbol-mini-pnl {
            position: absolute;
            right: 4px;
            bottom: 2px;
            font-size: 12px;
            font-weight: 700;
            color: #94a3b8;
            pointer-events: none;
        }

        /* VOLUME STATS IN PANEL */
        .panel-stats {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .panel-stat-card {
            padding: 12px;
            background: rgba(0, 255, 204, 0.05);
            border: 1px solid rgba(0, 255, 204, 0.2);
            border-radius: 8px;
        }

        .panel-stat-label {
            font-size: 10px;
            color: #666;
            text-transform: uppercase;
            margin-bottom: 5px;
        }

        .panel-stat-value {
            font-size: 16px;
            font-weight: 700;
            color: #ffffff;
        }

        .panel-stat-value.positive { color: #ff914d; }
        .panel-stat-value.negative { color: #ff5252; }

        /* SETTINGS PANEL */
        .settings-placeholder {
            padding: 20px;
            text-align: center;
            color: #666;
            font-size: 12px;
        }

        /* STATS PANEL */
        .stats-panel {
            position: absolute;
            bottom: 50px;
            left: 0;
            right: 80px;
            height: 140px;
            z-index: 100;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            pointer-events: none;
        }

        .stats-panel-resize-handle {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 6px;
            background: linear-gradient(180deg, rgba(150, 150, 150, 0.3), transparent);
            cursor: ns-resize;
            z-index: 101;
            transition: background 0.2s;
            pointer-events: auto;
        }

        .stats-panel-resize-handle:hover {
            background: linear-gradient(180deg, rgba(255, 145, 77, 0.5), transparent);
        }

        .stats-panel-content {
            flex: 1;
            overflow: hidden;
            padding: 0;
            pointer-events: auto;
            background: rgba(5, 5, 15, 0.3);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
        }

        .stats-table-wrapper {
            display: flex;
            width: 100%;
            height: 100%;
        }

        .stats-table {
            display: flex;
            font-family: 'Rajdhani', monospace;
            font-size: 10px;
            background: transparent;
            width: 100%;
        }

        .stats-column {
            display: flex;
            flex-direction: column;
            flex-shrink: 0;
            border-right: 1px solid rgba(150, 150, 150, 0.3);
        }

        .stats-column:last-child {
            border-right: none;
        }

        .stats-row-header {
            padding: 4px 6px;
            background: rgba(50, 50, 50, 0.5);
            color: #888;
            font-weight: 600;
            text-align: left;
            font-size: 8px;
            border-bottom: 1px solid rgba(150, 150, 150, 0.3);
            white-space: nowrap;
        }

        .stats-cell {
            padding: 4px 4px;
            text-align: center;
            border-bottom: 1px solid rgba(150, 150, 150, 0.2);
            color: #ccc;
            font-weight: 500;
            font-size: 8px;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .stats-cell.positive {
            background: rgba(255, 145, 77, 0.1);
            color: #ff914d;
        }

        .stats-cell.negative {
            background: rgba(255, 82, 82, 0.1);
            color: #ff5252;
        }

        .stats-cell.neutral {
            color: #999;
        }

        .stats-time-cell {
            padding: 4px 2px;
            text-align: center;
            background: rgba(0, 0, 0, 0.3);
            color: #666;
            font-size: 7px;
            border-bottom: 1px solid rgba(150, 150, 150, 0.3);
            font-weight: 500;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        /* DROPDOWN OPTIONS HOVER STYLES */
        .timeframe-option:hover,
        .chart-style-option:hover {
            background: rgba(255, 255, 255, 0.1) !important;
            color: #ffffff !important;
        }

        .chart-style-option .material-icons {
            color: #959595;
        }

        .chart-style-option:hover .material-icons {
            color: #ffffff;
        }

        .timeframe-option.selected,
        .chart-style-option.selected {
            background: transparent !important;
            color: #ff914d !important;
        }

        .timeframe-option.selected .material-icons,
        .chart-style-option.selected .material-icons {
            color: #ff914d !important;
        }

        .chart-style-menu {
            position: absolute;
            top: 100%;
            left: 0;
            margin-top: 6px;
            background: rgba(12, 13, 20, 0.98);
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 10px;
            max-height: 0;
            overflow: hidden;
            opacity: 0;
            transition: max-height 0.3s ease, opacity 0.3s ease;
            box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
            min-width: 420px;
            font-family: 'Rajdhani', sans-serif;
            z-index: 25000;
        }

        .chart-style-menu__header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 14px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            letter-spacing: 0.08em;
            text-transform: uppercase;
            font-size: 11px;
            color: rgba(255, 255, 255, 0.75);
        }

        .chart-style-menu__hint {
            font-size: 10px;
            letter-spacing: 0.12em;
            color: rgba(255, 255, 255, 0.45);
        }

        .chart-style-menu__body {
            display: grid;
            grid-template-columns: 1fr 1.15fr;
            gap: 12px;
            padding: 12px;
        }

        .chart-style-menu__list {
            display: flex;
            flex-direction: column;
            gap: 6px;
            padding: 6px;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.03);
        }

        .chart-type-option {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 10px;
            font-size: 13px;
            color: rgba(255, 255, 255, 0.7);
            cursor: pointer;
            border-radius: 6px;
            transition: background 0.2s ease, color 0.2s ease;
        }

        .chart-type-option .material-icons {
            font-size: 18px;
            color: rgba(255, 255, 255, 0.55);
        }

        .chart-type-option:hover {
            background: rgba(255, 255, 255, 0.08);
            color: #ffffff;
        }

        .chart-type-option:hover .material-icons {
            color: #ffffff;
        }

        .chart-type-option.selected {
            background: rgba(255, 145, 77, 0.16);
            color: #ffffff;
        }

        .chart-type-option.selected .material-icons {
            color: #ff914d;
        }

        .chart-style-menu__preview {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

.chart-style-menu__preview-box {
    border-radius: 8px;
    padding: 10px;
    background: rgba(7, 9, 14, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

        .chart-style-menu__preview-box canvas {
            display: block;
            width: 100%;
            height: auto;
        }

.chart-style-menu__colors {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.chart-style-color-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 6px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
}

.chart-style-color-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.chart-style-color-title {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.chart-style-current {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.chart-style-palette {
    position: absolute;
    inset: 8px;
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    border-radius: 8px;
    background: rgba(10, 12, 18, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    align-items: center;
    justify-content: flex-start;
}

.chart-style-palette.is-open {
    display: flex;
}


.chart-style-palette__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    width: 100%;
    max-width: 170px;
    grid-auto-rows: 18px;
}

.chart-style-palette__swatch {
    width: 100%;
    height: 18px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.chart-style-palette__swatch:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.45);
}

.chart-style-palette__add {
    align-self: flex-start;
    width: 100%;
    max-width: 170px;
    height: 18px;
    border-radius: 5px;
    border: 1px dashed rgba(255, 255, 255, 0.35);
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 13px;
    position: relative;
    z-index: 2;
}

.chart-style-custom-row {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.65);
    width: 100%;
    max-width: 170px;
    position: absolute;
    left: 0;
    top: 0;
    padding: 6px 8px;
    border-radius: 6px;
    background: rgba(12, 14, 20, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
    z-index: 3;
}

.chart-style-custom-row.is-open {
    display: flex;
}

.chart-style-custom-row input[type="color"] {
    width: 34px;
    height: 24px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
}

        /* HEADER DROPDOWN HOVER - TradingView Style */
        #timeframeHeaderDropdown:hover,
        #chartStyleDropdown:hover {
            background: rgba(255, 255, 255, 0.1) !important;
            border-radius: 4px;
            color: #ffffff !important;
        }

        #chartStyleDropdown:hover .material-icons {
            color: #ffffff !important;
        }

        /* PANEL NORMALIZED STYLES */
        .panel-label {
            display: block;
            font-size: 11px;
            color: #888;
            margin-bottom: 8px;
            text-transform: uppercase;
        }

        .panel-dropdown {
            width: 100%;
            padding: 10px;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.2);
            color: #ffffff;
            border-radius: 6px;
            font-size: 13px;
            font-family: 'Rajdhani', monospace;
            font-weight: 500;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            transition: all 0.3s;
        }

        .panel-dropdown:hover {
            background: rgba(255, 255, 255, 0.05);
            border-color: rgba(255, 255, 255, 0.3);
        }

        .panel-dropdown-menu {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            margin-top: 5px;
            background: rgba(10, 10, 20, 0.98);
            border: 1px solid rgba(0, 255, 204, 0.3);
            border-radius: 6px;
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease, opacity 0.3s ease;
            opacity: 0;
            z-index: 1000;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
        }

        .panel-section-header {
            font-size: 11px;
            color: #a8a8a8;
            font-weight: 600;
            margin-bottom: 6px;
            padding: 4px 0;
            border-bottom: 1px solid rgba(0, 255, 204, 0.2);
        }

        .panel-checkbox-label {
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            padding: 4px;
            border-radius: 4px;
            transition: background 0.2s;
            font-size: 11px;
            color: #ccc;
        }

        .panel-checkbox-label:hover {
            background: rgba(0, 255, 204, 0.1);
        }

        .panel-checkbox-label input[type="checkbox"] {
            width: 14px;
            height: 14px;
            cursor: pointer;
        }

        .panel-checkbox-label-block {
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            padding: 6px 10px;
            background: rgba(0, 255, 204, 0.05);
            border: 1px solid rgba(0, 255, 204, 0.3);
            border-radius: 6px;
            transition: all 0.3s;
        }

        .panel-checkbox-label-block:hover {
            background: rgba(0, 255, 204, 0.1);
        }

        .panel-checkbox-label-block input[type="checkbox"] {
            width: 14px;
            height: 14px;
            cursor: pointer;
        }

        .panel-checkbox-label-block span {
            font-size: 11px;
            color: #ccc;
            font-family: 'Rajdhani', monospace;
            font-weight: 500;
        }

        .panel-button {
            width: 100%;
            padding: 8px;
            background: rgba(0, 255, 204, 0.15);
            border: 1px solid rgba(0, 255, 204, 0.4);
            color: #ffffff;
            border-radius: 6px;
            font-size: 12px;
            font-family: 'Rajdhani', monospace;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            box-shadow: 0 0 10px rgba(0, 255, 204, 0.2);
            margin-top: 10px;
        }

        .panel-button:hover {
            background: rgba(0, 255, 204, 0.25);
            box-shadow: 0 0 20px rgba(0, 255, 204, 0.4);
            border-color: #00ffcc;
        }

        .panel-select {
            width: 100%;
            padding: 10px;
            background: rgba(0, 255, 204, 0.05);
            border: 1px solid rgba(0, 255, 204, 0.3);
            color: #ffffff;
            border-radius: 6px;
            font-size: 13px;
            font-family: 'Rajdhani', monospace;
            font-weight: 500;
            cursor: pointer;
        }

        .panel-select:hover {
            background: rgba(0, 255, 204, 0.1);
            border-color: rgba(0, 255, 204, 0.5);
        }

        .panel-info-box {
            margin-top: 10px;
            padding: 10px;
            background: rgba(0, 255, 204, 0.05);
            border: 1px solid rgba(0, 255, 204, 0.2);
            border-radius: 6px;
            font-size: 10px;
            color: #888;
            line-height: 1.6;
        }

        .panel-input-small {
            width: 65px;
            padding: 2px 4px;
            background: rgba(0, 0, 0, 0.5);
            border: 1px solid rgba(0, 255, 204, 0.3);
            border-radius: 4px;
            color: #ccc;
            font-size: 10px;
            font-family: 'Rajdhani', monospace;
        }

        .panel-input-color {
            flex: 1;
            padding: 4px 6px;
            background: rgba(0, 0, 0, 0.5);
            border: 1px solid rgba(0, 255, 204, 0.3);
            border-radius: 3px;
            color: #ccc;
            font-size: 10px;
            font-family: monospace;
        }

        /* Hidden class for modals */
        .hidden {
            display: none !important;
        }

        /* Confirmation Modal Styles */
        #confirmModal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(4px);
            z-index: 10001;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* Confirmation Modal Animation */
        @keyframes modalFadeIn {
            from {
                opacity: 0;
                transform: scale(0.9) translateY(-20px);
            }
            to {
                opacity: 1;
                transform: scale(1) translateY(0);
            }
        }

        /* Confirmation Modal Button Hover Effects */
        #confirmModalCancel:hover {
            background: rgba(255, 255, 255, 0.15) !important;
            border-color: rgba(255, 255, 255, 0.3) !important;
            transform: translateY(-1px);
        }

        #confirmModalConfirm:hover {
            background: rgba(255, 82, 82, 1) !important;
            border-color: rgba(255, 82, 82, 0.6) !important;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(255, 82, 82, 0.4);
        }

        /* Indicator Template Modal Styles */
        #indicatorTemplateModal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(4px);
            z-index: 10002;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .indicator-template-modal__panel {
            background: rgba(20, 20, 40, 0.85);
            backdrop-filter: blur(20px);
            border: 1px solid rgba(102, 126, 234, 0.3);
            border-radius: 16px;
            padding: 22px 24px;
            min-width: 320px;
            max-width: 420px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 60px rgba(102, 126, 234, 0.2);
            animation: modalFadeIn 0.2s ease-out;
        }

        .indicator-template-modal__header {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 12px;
        }

        .indicator-template-modal__icon {
            color: #93c5fd;
            font-size: 28px;
        }

        .indicator-template-modal__title {
            color: #fff;
            margin: 0;
            font-family: 'Rajdhani', sans-serif;
            font-size: 17px;
        }

        .indicator-template-modal__message {
            color: #a1a1aa;
            font-family: 'Rajdhani', sans-serif;
            font-size: 13px;
            margin: 0 0 18px 0;
            line-height: 1.5;
        }

        .indicator-template-modal__field {
            display: flex;
            flex-direction: column;
            gap: 6px;
            margin-bottom: 16px;
        }

        .indicator-template-modal__label {
            color: #cbd5f5;
            font-family: 'Rajdhani', sans-serif;
            font-size: 12px;
        }

        .indicator-template-modal__input,
        .indicator-template-modal__select {
            padding: 8px 10px;
            border-radius: 8px;
            border: 1px solid rgba(148, 163, 184, 0.35);
            background: rgba(15, 23, 42, 0.85);
            color: #e2e8f0;
            font-size: 12px;
            font-family: 'Rajdhani', sans-serif;
        }

        .indicator-template-modal__input:focus,
        .indicator-template-modal__select:focus {
            outline: none;
            border-color: rgba(147, 197, 253, 0.7);
            box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
        }

        .indicator-template-modal__actions {
            display: flex;
            gap: 12px;
            justify-content: flex-end;
        }

        .indicator-template-modal__btn {
            padding: 9px 18px;
            border-radius: 8px;
            font-family: 'Rajdhani', sans-serif;
            font-size: 12px;
            cursor: pointer;
            transition: all 0.2s;
            border: 1px solid transparent;
            background: transparent;
            color: #e2e8f0;
        }

        .indicator-template-modal__btn--ghost {
            background: rgba(255, 255, 255, 0.1);
            border-color: rgba(255, 255, 255, 0.2);
        }

        .indicator-template-modal__btn--accent {
            background: rgba(59, 130, 246, 0.75);
            border-color: rgba(59, 130, 246, 0.4);
            font-weight: 600;
        }

        .indicator-template-modal__btn--ghost:hover {
            background: rgba(255, 255, 255, 0.15);
            border-color: rgba(255, 255, 255, 0.3);
            transform: translateY(-1px);
        }

        .indicator-template-modal__btn--accent:hover {
            background: rgba(59, 130, 246, 0.95);
            border-color: rgba(59, 130, 246, 0.6);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
        }

        /* Indicators Menu Styles */
        #indicatorsMenu {
            display: none;
            position: absolute;
            top: 100%;
            left: 0;
            min-width: 820px;
            max-width: min(1120px, 92vw);
            background: rgba(12, 14, 22, 0.98);
            border: 1px solid rgba(255, 255, 255, 0.14);
            border-radius: 10px;
            padding: 12px 14px 16px;
            box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
        }

        #indicatorsMenu .indicator-categories {
            display: grid;
            grid-template-columns: repeat(5, minmax(180px, 1fr));
            gap: 16px 18px;
            align-items: start;
        }

        .indicators-templates {
            position: relative;
            display: flex;
            align-items: center;
        }

        .indicators-templates__toggle {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 28px;
            height: 28px;
            border-radius: 6px;
            border: 1px solid rgba(255, 255, 255, 0.12);
            background: rgba(15, 23, 42, 0.75);
            color: #cbd5f5;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .indicators-templates__toggle:hover {
            background: rgba(255, 255, 255, 0.08);
            border-color: rgba(255, 255, 255, 0.3);
            color: #fff;
        }

        .indicator-templates-dropdown {
            position: absolute;
            top: calc(100% + 8px);
            right: 0;
            min-width: 220px;
            max-width: 320px;
            background: rgba(12, 14, 22, 0.98);
            border: 1px solid rgba(255, 255, 255, 0.14);
            border-radius: 10px;
            padding: 10px;
            box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55);
            z-index: 3200;
            opacity: 0;
            transform: translateX(12px);
            pointer-events: none;
            transition: opacity 0.2s ease, transform 0.2s ease;
        }

        .indicators-templates.is-open .indicator-templates-dropdown {
            opacity: 1;
            transform: translateX(0);
            pointer-events: auto;
        }

        .indicator-templates-dropdown__action {
            width: 100%;
            padding: 8px 10px;
            border-radius: 8px;
            border: 1px solid rgba(59, 130, 246, 0.45);
            background: rgba(59, 130, 246, 0.18);
            color: #93c5fd;
            font-size: 11px;
            font-family: 'Rajdhani', sans-serif;
            cursor: pointer;
            transition: all 0.2s ease;
            text-align: left;
        }


        .indicator-templates-dropdown__action:hover {
            background: rgba(59, 130, 246, 0.35);
            border-color: rgba(59, 130, 246, 0.7);
        }

        .indicator-templates-dropdown__list {
            margin-top: 8px;
            display: flex;
            flex-direction: column;
            gap: 6px;
            max-height: 220px;
            overflow-y: auto;
        }

        .indicator-template-save-btn {
            padding: 6px 12px;
            border-radius: 8px;
            border: 1px solid rgba(59, 130, 246, 0.45);
            background: rgba(59, 130, 246, 0.18);
            color: #93c5fd;
            font-size: 11px;
            font-family: 'Rajdhani', sans-serif;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .indicator-template-save-btn:hover {
            background: rgba(59, 130, 246, 0.35);
            border-color: rgba(59, 130, 246, 0.7);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
        }

        .indicator-template-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            padding: 6px 10px;
            border-radius: 8px;
            background: rgba(15, 23, 42, 0.75);
            border: 1px solid rgba(148, 163, 184, 0.2);
            color: #e2e8f0;
            font-size: 11px;
            font-family: 'Rajdhani', sans-serif;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .indicator-template-item:hover {
            border-color: rgba(148, 163, 184, 0.5);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
        }

        .indicator-template-item__name {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .indicator-template-item__delete {
            color: #fca5a5;
            width: 14px;
            height: 14px;
        }

        .indicator-templates-empty {
            color: #64748b;
            font-size: 11px;
            font-family: 'Rajdhani', sans-serif;
            padding: 4px 2px;
        }

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

        .indicators-menu__title {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .indicators-search {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .indicators-search__toggle {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 28px;
            height: 28px;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.14);
            color: rgba(255, 255, 255, 0.8);
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .indicators-search__toggle:hover {
            background: rgba(255, 255, 255, 0.14);
            color: #fff;
        }

        .indicators-search__input {
            display: flex;
            align-items: center;
            gap: 6px;
            width: 0;
            opacity: 0;
            padding: 0;
            overflow: hidden;
            border-radius: 999px;
            border: 1px solid rgba(255, 255, 255, 0.14);
            background: rgba(8, 10, 18, 0.9);
            color: rgba(255, 255, 255, 0.8);
            transform: translateX(6px) scale(0.98);
            pointer-events: none;
            transition: width 0.22s ease, opacity 0.22s ease, transform 0.22s ease, padding 0.22s ease;
        }

        .indicators-search__input .material-icons {
            font-size: 16px;
            color: rgba(255, 255, 255, 0.6);
        }

        .indicators-search__input input {
            width: 100%;
            border: none;
            outline: none;
            background: transparent;
            color: #fff;
            font-size: 12px;
            font-family: 'Rajdhani', sans-serif;
        }

        .indicators-search__clear {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            border: none;
            background: rgba(255, 255, 255, 0.12);
            color: rgba(255, 255, 255, 0.8);
            cursor: pointer;
        }

        .indicators-search.is-open .indicators-search__input {
            width: 220px;
            opacity: 1;
            padding: 4px 8px;
            transform: translateX(0) scale(1);
            pointer-events: auto;
        }

        .indicators-search__empty {
            display: none;
            margin-top: 10px;
            padding: 8px 10px;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.04);
            color: rgba(255, 255, 255, 0.7);
            font-size: 12px;
            font-family: 'Rajdhani', sans-serif;
            text-align: center;
        }

        /* Match the "symbol picker" item style (card-like). */
        .indicator-menu-item {
            background: rgba(255, 255, 255, 0.06) !important;
            border: 1px solid rgba(255, 255, 255, 0.12) !important;
            border-radius: 8px !important;
            padding: 10px !important;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 12px;
        }

        .indicator-menu-item:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
            border-color: rgba(255, 255, 255, 0.22) !important;
        }

        .indicator-menu-item:active {
            transform: scale(0.98);
        }

        /* Space between indicator cards (without affecting the category header). */
        .indicator-menu-item + .indicator-menu-item {
            margin-top: 8px;
        }

        #indicatorsMenu {
            animation: fadeInIndicators 0.2s ease;
        }

        .drawing-row-selected {
            background: rgba(59, 130, 246, 0.14) !important;
            border-color: rgba(59, 130, 246, 0.35) !important;
        }

        .indicator-chip-left {
            display: flex;
            align-items: center;
            gap: 6px;
            min-width: 0;
            flex: 1;
        }

        .indicator-chip-name {
            font-weight: 500;
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .indicator-chip-actions {
            display: flex;
            align-items: center;
            gap: 6px;
            flex-shrink: 0;
        }

        .indicator-chip .lucide {
            width: 14px;
            height: 14px;
            stroke-width: 1.5;
        }

        .indicator-chip-actions .lucide {
            width: 16px;
            height: 16px;
        }

        @keyframes fadeInIndicators {
            from {
                opacity: 0;
                transform: translateY(-8px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* SETTINGS DROPDOWN MENU */
        .settings-dropdown {
            position: fixed;
            background: rgba(15, 23, 42, 0.98);
            border: 1px solid rgba(176, 38, 255, 0.3);
            border-radius: 8px;
            padding: 6px;
            min-width: 200px;
            max-height: 400px;
            overflow-y: auto;
            z-index: 20001;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(12px);
        }

        .settings-dropdown.hidden {
            display: none;
        }

        .dropdown-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 12px;
            color: #e2e8f0;
            font-size: 13px;
            font-family: 'Rajdhani', sans-serif;
            cursor: pointer;
            border-radius: 6px;
            transition: all 0.2s;
        }

        .dropdown-item:hover {
            background: rgba(176, 38, 255, 0.15);
            color: #b026ff;
        }

        .dropdown-divider {
            height: 1px;
            background: rgba(255, 255, 255, 0.1);
            margin: 4px 0;
        }

        .dropdown-section-title {
            padding: 8px 12px 4px;
            color: #94a3b8;
            font-size: 11px;
            font-family: 'Rajdhani', sans-serif;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .template-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 8px 12px;
            color: #cbd5e1;
            font-size: 13px;
            font-family: 'Rajdhani', sans-serif;
            cursor: pointer;
            border-radius: 6px;
            transition: all 0.2s;
        }

        .template-item:hover {
            background: rgba(176, 38, 255, 0.1);
        }

        .template-item-name {
            flex: 1;
        }

        .template-item-delete {
            opacity: 0;
            color: #ef4444;
            transition: opacity 0.2s;
        }

        .template-item:hover .template-item-delete {
            opacity: 1;
        }

        .template-item-delete:hover {
            color: #dc2626;
        }

        /* ========================================
           IQ OPTION STYLE ENHANCEMENTS
           ======================================== */

        /* Symbol Tabs Bar */
        #symbolTabsBar::-webkit-scrollbar {
            height: 3px;
        }

        #symbolTabsBar::-webkit-scrollbar-track {
            background: transparent;
        }

        #symbolTabsBar::-webkit-scrollbar-thumb {
            background: rgba(255, 145, 77, 0.3);
            border-radius: 2px;
        }

        .symbol-tab {
            transition: all 0.2s ease;
            cursor: grab;
        }

        .symbol-tab.is-dragging {
            opacity: 0.6;
            cursor: grabbing;
        }

        .symbol-tab.drag-over-left {
            box-shadow: inset 4px 0 0 rgba(255, 145, 77, 0.8);
        }

        .symbol-tab.drag-over-right {
            box-shadow: inset -4px 0 0 rgba(255, 145, 77, 0.8);
        }

        .symbol-tab:hover:not(.active) {
            background: rgba(100, 100, 120, 0.2) !important;
            border-color: rgba(255, 255, 255, 0.2) !important;
        }

        .symbol-tab.active {
            box-shadow: 0 2px 8px rgba(255, 145, 77, 0.3);
        }

        .symbol-tab-close:hover {
            background: rgba(255, 255, 255, 0.1) !important;
            color: rgba(255, 255, 255, 0.9) !important;
        }

        .symbol-tab.active .symbol-tab-close:hover {
            background: rgba(255, 145, 77, 0.2) !important;
            color: rgba(255, 145, 77, 1) !important;
        }

        #addSymbolTab {
            display: flex !important;
            visibility: visible !important;
            opacity: 1 !important;
        }

        #addSymbolTab:hover {
            background: rgba(100, 100, 120, 0.25) !important;
            border-color: rgba(255, 255, 255, 0.25) !important;
            color: rgba(255, 255, 255, 0.9) !important;
        }

        #symbolTabsBar {
            visibility: visible !important;
            display: flex !important;
        }

        #symbolTabsContainer {
            display: flex !important;
        }

        /* Canvas with World Map Background & Grid */
        #footprintCanvas {
            flex: 1;
            background: transparent;
            background-image: none;
            cursor: crosshair;
            position: relative;
            z-index: 1;
        }

        /* Adjust Active Indicators Area for Symbol Tabs */
        #activeIndicatorsArea {
            top: 110px !important;
            left: 10px !important;
            z-index: 24 !important;
        }

        /* Orange Line Chart Style - Applied via JavaScript */
        .chart-line-orange {
            stroke: #ff914d;
            stroke-width: 2;
            fill: none;
        }

        .chart-area-orange {
            fill: url(#orangeGradient);
        }

        .indicator-menu-item.is-disabled {
            opacity: 0.45;
            cursor: not-allowed;
            pointer-events: none;
        }

        .indicator-menu-item.is-disabled span {
            color: rgba(255, 255, 255, 0.4) !important;
        }

        .indicator-menu-item.is-disabled .material-icons {
            color: rgba(255, 255, 255, 0.35) !important;
        }

        #indicator-chip-ao {
            margin-top: 92px;
        }

        #indicatorsMenu {
            position: fixed !important;
            z-index: 10000 !important;
        }

        #activeIndicatorsArea {
            z-index: 24 !important;
        }

        /* Symbol Selector Dropdown Styles */
        #symbolsGrid::-webkit-scrollbar {
            width: 6px;
        }

        #symbolsGrid::-webkit-scrollbar-track {
            background: rgba(2, 6, 23, 0.4);
            border-radius: 3px;
        }

        #symbolsGrid::-webkit-scrollbar-thumb {
            background: rgba(255, 145, 77, 0.3);
            border-radius: 3px;
        }

        #symbolsGrid::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 145, 77, 0.5);
        }

        #symbolSearchInput:focus {
            outline: none;
            border-color: rgba(255, 145, 77, 0.4);
            box-shadow: 0 0 0 2px rgba(255, 145, 77, 0.1);
        }

        /* Mobile-friendly: keep symbol cards in a single column (no horizontal navigation). */
        #symbolsGrid {
            overflow-x: hidden !important;
        }

        .symbol-dropdown-item:active {
            transform: scale(0.98);
        }
        .options-quick-form.compact #optionsMinutesInput,
        .options-quick-form.compact #optionsStakeInput {
            height: 34px;
            line-height: 34px;
        }

        .options-quick-form.compact .options-minutes-field .options-stepper,
        .options-quick-form.compact .options-stake-row .options-stepper {
            height: 34px;
            min-height: 34px;
        }

        .options-quick-form.compact .options-minutes-field .options-currency,
        .options-quick-form.compact .options-stake-row .options-currency {
            height: 34px;
            line-height: 34px;
        }
/* Global form field styles to avoid white inputs on dark theme */
input, select, textarea {
  background: rgba(15, 23, 42, 0.7);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  font-family: 'Rajdhani', sans-serif;
  caret-color: #ff914d;
  -webkit-appearance: none;
  appearance: none;
}

input:focus, select:focus, textarea:focus {
  border-color: rgba(255, 145, 77, 0.8);
  outline: none;
}

input:hover, select:hover, textarea:hover {
  background: rgba(15, 23, 42, 0.8);
}

/* Preserve native look for checkboxes/radios so they toggle visibly */
input[type="checkbox"],
input[type="radio"] {
  -webkit-appearance: auto;
  appearance: auto;
  background: transparent;
  border: none;
  padding: 0;
  width: auto;
  height: auto;
  accent-color: #ff914d;
  cursor: pointer;
}

/* Prevent WebKit autofill from forcing white background */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px rgba(15, 23, 42, 0.9) inset !important;
  -webkit-text-fill-color: #e2e8f0 !important;
}

@media (max-width: 900px) {
  /* Indicators menu: single column on mobile (match symbol picker behavior). */
  #indicatorsMenu .indicator-categories {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: 1fr !important;
    min-width: 0 !important;
    max-width: none !important;
    width: 100% !important;
  }

  #indicatorsMenu .indicator-category {
    width: 100% !important;
  }
}

@media (max-width: 900px) {
  /* Indicator settings modals: fit within mobile viewport (many are absolutely-positioned with desktop widths). */
  div[id$="SettingsModal"]:not(#smcSettingsModal) {
    position: fixed !important;
    left: 8px !important;
    right: 8px !important;
    top: calc(var(--app-topbar-height) + 8px) !important;
    bottom: auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: calc(100vw - 16px) !important;
    max-height: calc(100dvh - var(--app-topbar-height) - 16px) !important;
    overflow: auto !important;
    box-sizing: border-box !important;
    padding: 16px !important;
    cursor: default !important;
    user-select: text !important;
    z-index: 30000 !important;
  }
}
