        @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;
            --chart-accent: #ff914d;
            --chart-accent-rgb: 255, 145, 77;
        }

        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;
        }

        .app-analyze-btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            height: 30px;
            padding: 0 12px;
            border-radius: 8px;
            border: 1px solid rgba(255, 145, 77, 0.35);
            background: linear-gradient(135deg, rgba(255, 145, 77, 0.18), rgba(255, 145, 77, 0.06));
            color: rgba(255, 255, 255, 0.92);
            font-size: 11px;
            font-weight: 700;
            cursor: pointer;
            transition: transform 0.12s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
            font-family: 'Rajdhani', sans-serif;
            letter-spacing: 0.2px;
            user-select: none;
            white-space: nowrap;
        }

        .app-analyze-btn .material-icons {
            font-size: 16px;
            color: #ff914d;
        }

        .app-analyze-btn:hover {
            border-color: rgba(255, 145, 77, 0.6);
            background: linear-gradient(135deg, rgba(255, 145, 77, 0.28), rgba(255, 145, 77, 0.08));
            box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
            transform: translateY(-1px);
        }

        .app-analyze-btn.is-active {
            border-color: rgba(34, 197, 94, 0.55);
            background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(34, 197, 94, 0.06));
        }

        .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 .app-logo-image {
            height: 38px;
            display: block;
            margin: 0;
            padding: 0;
        }

        .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;
        }

        #derivAccountsStep {
            background: transparent;
            border: none;
            border-radius: 0;
            padding: 0;
            box-shadow: none;
        }

        #derivModeStep,
        #derivModeStep.is-active,
        #derivModeStep.is-complete,
        #derivModeStep.is-locked {
            background: transparent !important;
            border: none !important;
            border-radius: 0 !important;
            box-shadow: none !important;
            padding: 0 !important;
        }

        #derivXQuantStep,
        #derivXQuantStep.is-active,
        #derivXQuantStep.is-complete,
        #derivXQuantStep.is-locked {
            background: transparent !important;
            border: none !important;
            border-radius: 0 !important;
            box-shadow: none !important;
            padding: 0 !important;
        }

        .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: 6px;
            flex-wrap: wrap;
        }

        .deriv-login-image-btn {
            width: auto;
            max-width: 88%;
            margin: 0 auto;
            padding: 0;
            border: none;
            background: transparent;
            box-shadow: none !important;
            outline: none !important;
            cursor: pointer;
            appearance: none;
            -webkit-appearance: none;
        }

        .deriv-login-image-btn__img {
            display: block;
            width: auto;
            max-width: 100%;
            height: auto;
            max-height: 132px;
            object-fit: contain;
            filter: none;
            transition: filter 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
        }

        .deriv-login-image-btn:hover .deriv-login-image-btn__img {
            transform: translateY(-1px);
            filter: drop-shadow(0 0 14px rgba(255, 145, 77, 0.72)) drop-shadow(0 0 22px rgba(255, 145, 77, 0.38));
        }

        .deriv-login-image-btn:focus-visible .deriv-login-image-btn__img {
            filter: drop-shadow(0 0 14px rgba(255, 145, 77, 0.72)) drop-shadow(0 0 22px rgba(255, 145, 77, 0.38));
        }

        .deriv-login-image-btn:disabled {
            cursor: not-allowed;
        }

        .deriv-login-image-btn:disabled .deriv-login-image-btn__img {
            opacity: 0.5;
            filter: none;
            transform: none;
        }

        .login-modal {
            position: fixed;
            inset: 0;
            z-index: 10000;
            justify-content: center;
            align-items: center;
            background: rgba(0, 0, 0, 0.82);
            padding: 24px;
        }

        .login-modal__frame {
            position: relative;
            width: min(440px, 92vw);
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .login-modal__frame-image {
            display: block;
            width: 100%;
            height: auto;
            pointer-events: none;
            user-select: none;
        }

        .login-modal__content {
            position: absolute;
            inset: 0;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            padding: 0 52px;
        }

        .login-modal__step {
            width: 100%;
        }

        .login-modal__step--email {
            max-width: 268px;
            margin-top: 62px;
        }

        .login-modal__step--code {
            max-width: 310px;
            margin-top: 78px;
        }

        .login-modal__input,
        .login-code-input {
            box-sizing: border-box;
            color: #f1f5f9;
            font-family: 'Rajdhani', sans-serif;
            background: rgba(15, 23, 42, 0.74);
            border: 1px solid rgba(255, 255, 255, 0.14);
            border-radius: 10px;
            outline: none;
        }

        .login-modal__input {
            width: 100%;
            padding: 12px 14px;
            text-align: center;
            font-size: 15px;
        }

        .login-modal__input:hover,
        .login-modal__input:focus,
        .login-code-input:hover,
        .login-code-input:focus {
            border-color: rgba(var(--chart-accent-rgb, 255, 145, 77), 0.85);
            box-shadow: 0 0 12px rgba(var(--chart-accent-rgb, 255, 145, 77), 0.28);
        }

        .login-modal__primary-btn,
        .login-modal__secondary-btn {
            width: 100%;
            font-family: 'Rajdhani', sans-serif;
            cursor: pointer;
        }

        .login-modal__primary-btn {
            margin-top: 14px;
            padding: 12px;
            color: #fff;
            font-size: 14px;
            font-weight: 600;
            background: rgba(255, 145, 77, 0.18);
            border: 1px solid rgba(255, 145, 77, 0.6);
            border-radius: 10px;
            box-shadow: 0 8px 32px rgba(255, 145, 77, 0.2);
        }

        .login-modal__image-btn {
            display: block;
            width: auto;
            max-width: 78%;
            margin: -18px auto 0;
            padding: 0;
            background: transparent;
            border: none;
            border-radius: 0;
            box-shadow: none;
            outline: none;
            appearance: none;
            -webkit-appearance: none;
            overflow: visible;
        }

        .login-modal__image-btn-img {
            display: block;
            width: auto;
            max-width: 100%;
            height: auto;
            border: none;
            outline: none;
            transition: filter 0.18s ease, transform 0.18s ease;
        }

        .login-modal__image-btn:hover .login-modal__image-btn-img,
        .login-modal__image-btn:focus-visible .login-modal__image-btn-img {
            transform: translateY(-1px);
            filter: drop-shadow(0 0 14px rgba(var(--chart-accent-rgb, 255, 145, 77), 0.72)) drop-shadow(0 0 24px rgba(var(--chart-accent-rgb, 255, 145, 77), 0.42));
        }

        .login-modal__verify-btn {
            width: 76%;
            margin: -20px auto 0;
        }

        .login-modal__secondary-btn {
            margin-top: 10px;
            padding: 10px;
            color: #94a3b8;
            font-size: 12px;
            background: transparent;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 8px;
        }

        .login-modal__back-link {
            display: flex;
            align-items: center;
            gap: 6px;
            margin-top: 18px;
            margin-bottom: 24px;
            color: #94a3b8;
            font-size: 13px;
            cursor: pointer;
            transition: color 0.2s ease;
        }

        .login-modal__back-link:hover {
            color: #cbd5e1;
        }

        .login-modal__back-icon {
            font-size: 16px;
        }

        .login-modal__code-text {
            margin-bottom: 14px;
            color: #94a3b8;
            font-size: 12px;
            text-align: center;
        }

        .login-modal__email-display {
            color: #06b6d4;
        }

        .login-modal__code-inputs {
            display: flex;
            justify-content: center;
            gap: 8px;
            margin-top: 18px;
            margin-bottom: 10px;
        }

        .login-code-input {
            width: 42px;
            height: 50px;
            text-align: center;
            font-size: 22px;
            font-weight: 600;
            transition: all 0.2s ease;
        }

        .login-modal__message {
            margin-top: 15px;
            text-align: center;
            font-size: 12px;
            font-family: 'Rajdhani', sans-serif;
        }

        .login-modal__close {
            position: absolute;
            top: 18px;
            right: 18px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0;
            background: transparent;
            border: none;
            color: #888;
            cursor: pointer;
            font-size: 20px;
        }

        .deriv-step-btn {
            flex: 0 0 auto;
            min-width: 96px;
            padding: 6px 9px;
            background: linear-gradient(90deg, #ff9a4d, #ff774d);
            border: 1px solid rgba(255, 145, 77, 0.9);
            color: #0b0f1a;
            font-size: 10px;
            font-weight: 700;
            letter-spacing: 0.1px;
            border-radius: 6px;
            cursor: pointer;
            font-family: 'Rajdhani', sans-serif;
            transition: all 0.18s ease;
            box-shadow: 0 4px 12px rgba(255, 145, 77, 0.2);
        }

        .deriv-step-btn:hover {
            filter: brightness(1.05);
            box-shadow: 0 6px 14px rgba(255, 145, 77, 0.28);
        }

        .deriv-step-btn.secondary {
            background: #0f172a;
            border: 1px solid rgba(148, 163, 184, 0.35);
            color: #e2e8f0;
            box-shadow: none;
        }

        .deriv-step-btn.secondary:hover {
            background: #121c31;
            border-color: rgba(148, 163, 184, 0.55);
        }

        .deriv-step-btn:disabled {
            opacity: 0.55;
            cursor: not-allowed;
            box-shadow: none;
        }

        .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: 7px 9px;
            background: #0f172a;
            border: 1px solid rgba(148, 163, 184, 0.35);
            color: #e2e8f0;
            font-size: 10px;
            font-weight: 700;
            border-radius: 6px;
            cursor: pointer;
            font-family: 'Rajdhani', sans-serif;
            transition: all 0.18s ease;
        }

        .deriv-panel-btn:hover {
            background: #121c31;
            border-color: rgba(148, 163, 184, 0.55);
        }

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

        .deriv-panel-image-btn {
            width: 100%;
            padding: 0;
            border: none;
            background: transparent;
            cursor: pointer;
            appearance: none;
            -webkit-appearance: none;
            transition: filter 0.18s ease, transform 0.18s ease;
        }

        .deriv-panel-image-btn__img {
            display: block;
            width: 100%;
            height: 132px;
            object-fit: fill;
            border-radius: 10px;
            box-shadow: none !important;
            filter: none;
            transition: filter 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
        }

        .deriv-panel-image-btn:hover .deriv-panel-image-btn__img {
            transform: translateY(-1px);
            filter: drop-shadow(0 0 14px rgba(255, 145, 77, 0.72)) drop-shadow(0 0 22px rgba(255, 145, 77, 0.38));
        }

        .deriv-panel-image-btn:focus-visible {
            outline: none;
        }

        .deriv-panel-image-btn:focus-visible .deriv-panel-image-btn__img {
            filter: drop-shadow(0 0 18px rgba(255, 145, 77, 0.9)) drop-shadow(0 0 30px rgba(255, 145, 77, 0.55));
        }

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

        .deriv-panel-image-btn:disabled .deriv-panel-image-btn__img {
            opacity: 0.5;
            filter: none;
            transform: none;
        }

        .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-left {
            display: flex;
            align-items: center;
            gap: 8px;
            flex: 1;
            min-width: 0;
        }

        .options-open-card__meta {
            display: flex;
            flex-direction: column;
            gap: 2px;
            min-width: 0;
        }

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

        .options-open-card__status-wrap {
            display: flex;
            align-items: center;
            gap: 6px;
            flex-shrink: 0;
        }

        .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__action {
            border: 1px solid rgba(56, 189, 248, 0.45);
            background: rgba(56, 189, 248, 0.18);
            color: #7dd3fc;
            border-radius: 6px;
            padding: 2px 5px;
            font-size: 7px;
            line-height: 1;
            font-weight: 600;
            text-transform: none;
            letter-spacing: 0.2px;
            cursor: pointer;
            flex-shrink: 0;
            margin-right: -3px;
        }

        .options-open-card__action:disabled {
            opacity: 0.55;
            cursor: default;
        }

        .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;
            z-index: 1200;
        }

        .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: 1400;
            max-height: 220px;
            overflow-y: auto;
            overscroll-behavior: contain;
        }

        .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-type-item:disabled,
        .options-type-item.is-disabled {
            opacity: 0.45;
            cursor: default;
            color: rgba(226, 232, 240, 0.75);
            border-color: rgba(148, 163, 184, 0.2);
        }

        .options-type-item:disabled:hover,
        .options-type-item.is-disabled:hover {
            background: transparent;
            border-color: rgba(148, 163, 184, 0.2);
            color: rgba(226, 232, 240, 0.75);
        }

        .options-type-separator {
            height: 1px;
            margin: 4px 8px;
            background: linear-gradient(90deg, rgba(255, 145, 77, 0), rgba(255, 145, 77, 0.45), rgba(255, 145, 77, 0));
        }

        .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: default;
        }

        .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: default;
            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;
        }

        .options-analyze-center-btn {
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
            z-index: 1000;
            height: 30px;
            line-height: 1;
            margin: 0;
        }

        .options-analyze-center-btn:hover {
            transform: translate(-50%, -50%);
            border-color: rgba(255, 145, 77, 0.35);
            box-shadow: none;
            background: linear-gradient(135deg, rgba(255, 145, 77, 0.28), rgba(255, 145, 77, 0.12));
        }

        .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);
        }

        #optionsRiseBtn::before,
        #optionsFallBtn::before {
            background-image: none !important;
        }

        .options-action-btn.is-disabled {
            opacity: 0.62;
            filter: saturate(0.68);
        }

        .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(--chart-base-bg, 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: url('assets/bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    pointer-events: none;
    opacity: var(--chart-bg-image-opacity, 0.24);
}

.chart-area::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--chart-bg-overlay, rgba(2, 6, 23, 0.46));
    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: 44px;
            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: 10020;
            font-family: 'Rajdhani', sans-serif;
            width: min(78vw, 260px);
        }

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

        .options-quick-bar__top {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 4px;
        }

        .options-quick-bar__section {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
            min-width: 0;
            width: 100%;
        }

        .options-quick-bar__payout {
            flex: 0 0 auto;
        }

        .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: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
            width: 100%;
        }

        .options-quick-bar .options-stake-row {
            display: grid;
            grid-template-columns: 18px minmax(0, 1fr) 18px;
            align-items: center;
            gap: 3px;
            margin-top: 0;
            background: transparent;
            border: none;
            border-radius: 0;
            padding: 0;
            min-height: 0;
            width: auto;
        }

        .options-quick-bar .options-stake-center {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-width: 0;
            gap: 1px;
        }

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

        .options-quick-bar #optionsStakeInput {
            width: 52px;
            height: 18px;
            font-size: 12px;
            padding: 0 2px;
        }

        .options-quick-bar input[data-quick="stake-input"] {
            width: 52px;
            height: 18px;
            padding: 0 2px;
            text-align: center;
            font-size: 12px;
            background: transparent;
            border: none;
            border-radius: 0;
            box-shadow: none;
            outline: none;
            color: #ffffff;
            -moz-appearance: textfield;
        }

        .options-quick-bar input[data-quick="stake-input"]::-webkit-outer-spin-button,
        .options-quick-bar input[data-quick="stake-input"]::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }

        .options-quick-bar .options-currency {
            font-size: 8px;
            line-height: 1;
            color: rgba(255, 255, 255, 0.65);
        }

        .options-quick-bar .options-payout-row strong {
            font-size: 18px;
            line-height: 1;
        }

        .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;
            width: 100%;
        }

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

        .options-quick-bar .options-action-btn.up {
            border-color: rgba(46, 204, 113, 0.7);
            background: linear-gradient(90deg, rgba(46, 204, 113, 0.28), rgba(46, 204, 113, 0.08));
            color: #2ecc71;
        }

        .options-quick-bar .options-action-btn.up:hover {
            border-color: rgba(46, 204, 113, 0.9);
            background: rgba(46, 204, 113, 0.16);
            color: #34d27d;
        }

        /* 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: transparent;
            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);
}

.chartzella-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(6, 8, 15, 0.72);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 5000;
}

.bots-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(6, 8, 15, 0.72);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 5000;
}

.analysis-popup-backdrop {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: transparent;
    backdrop-filter: none;
    z-index: 6050;
    pointer-events: none;
}

.analysis-popup-backdrop.open {
    display: flex;
}

.analysis-popup-window {
    width: min(360px, 90vw);
    min-height: auto;
    max-height: 88vh;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.62), rgba(2, 6, 23, 0.58));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 145, 77, 0.3);
    border-radius: 12px;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: auto;
}

.analysis-popup-window.is-dragging {
    cursor: grabbing;
}

.analysis-popup-body {
    padding: 0;
    max-height: 88vh;
    overflow: auto;
}

.analysis-popup-body #analysisPanel {
    display: flex !important;
    flex-direction: column;
    gap: 8px;
}

.analysis-popup-body #analysisPanel .panel-title {
    cursor: grab;
}

.analysis-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    text-align: center;
    padding-right: 34px;
}

.analysis-popup-body #analysisPanel #analysisCloseBtn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.analysis-header-title {
    display: inline-block;
    width: 100%;
    text-align: center;
}

.chartzella-modal {
    background: rgba(13, 17, 29, 0.08);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 145, 77, 0.25);
    border-radius: 16px;
    padding: 18px 22px 22px 22px;
    width: 92vw;
    max-width: 1400px;
    height: 85vh;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    position: relative;
    display: flex;
    flex-direction: column;
}

.bots-modal {
    background: rgba(13, 17, 29, 0.08);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 145, 77, 0.25);
    border-radius: 16px;
    padding: 14px 20px 18px 20px;
    width: min(1240px, 96vw);
    max-width: min(1240px, 96vw);
    height: min(860px, 92vh);
    max-height: min(860px, 92vh);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chartzella-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 50;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.04);
    color: #ff914d;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.2s;
}

.bots-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 50;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.04);
    color: #ff914d;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.2s;
}

.bots-back {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 50;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.04);
    color: #ff914d;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
    display: none;
    align-items: center;
    justify-content: center;
}

.chartzella-close:hover {
    background: rgba(255, 145, 77, 0.15);
}

.bots-close:hover {
    background: rgba(255, 145, 77, 0.15);
}

.bots-back:hover {
    background: rgba(255, 145, 77, 0.15);
}

.chartzella-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    height: 100%;
    overflow: auto;
    /* Reserve space so the close button never overlaps the first card. */
    padding-top: 22px;
}

.bots-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    height: 100%;
    overflow: hidden;
    padding: 22px 0 0;
}

.chartzella-hero {
    display: none !important;
}

.chartzella-caption {
    color: #f5c9a6;
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    text-align: center;
}

.chartzella-content {
    width: 100%;
    min-height: 100%;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    gap: 12px;
    overflow: visible;
    position: relative;
}

.bots-content {
    width: 100%;
    height: 100%;
    min-height: 100%;
    position: relative;
    overflow: hidden;
}

.bots-builder {
    width: 100%;
    height: 100%;
    min-height: 100%;
    display: block;
    padding: 0;
    color: #e2e8f0;
    font-family: 'Rajdhani', sans-serif;
    position: relative;
}

.bots-step {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 12px 24px 24px;
    border-radius: 0;
    border: none;
    background: transparent;
    opacity: 0;
    transform: translateY(36px) scale(0.96);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}

.bots-step.is-hidden {
    display: none;
}

.bots-step.is-active {
    display: flex;
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.bots-step.is-leaving {
    display: flex;
    opacity: 0;
    transform: translateY(-28px) scale(0.94);
    pointer-events: none;
}

.bots-step.is-entering {
    display: flex;
    pointer-events: none;
}

.bots-step.is-entering:not(.is-active) {
    opacity: 0;
    transform: translateY(32px) scale(0.96);
}

.bots-step__header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    flex-wrap: wrap;
}

.bots-step__header--market {
    margin: 0;
}

.bots-step__header h3 {
    margin: 0;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
}

.bots-step__header p {
    margin: 2px 0 0;
    color: rgba(226, 232, 240, 0.72);
    font-size: 11px;
}

.bots-step__number {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(255, 145, 77, 0.95), rgba(234, 88, 12, 0.92));
    color: #1c0d04;
    font-size: 13px;
    font-weight: 800;
    flex: 0 0 auto;
}

.bots-step__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    width: min(100%, 980px);
    justify-items: center;
    align-items: center;
}

.bots-step__grid--market {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 28px;
    width: min(100%, 1080px);
}

.bots-option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0;
    min-height: 0;
    border-radius: 0;
    border: none;
    background: transparent;
    color: #e2e8f0;
    cursor: pointer;
    transition: transform 0.18s ease, opacity 0.18s ease;
    overflow: visible;
    box-shadow: none;
}

.bots-option:hover {
    transform: translateY(-2px);
}

.bots-option--text {
    align-items: center;
    justify-content: center;
    min-height: 74px;
    text-align: center;
    border-radius: 14px;
    border: 1px solid rgba(255, 145, 77, 0.24);
    background: rgba(8, 12, 22, 0.68);
    padding: 10px 12px;
}

.bots-option__title {
    color: #fff7ed;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.05;
}

.bots-option__meta {
    color: rgba(226, 232, 240, 0.72);
    font-size: 11px;
}

.bots-option--image img {
    display: block;
    width: auto;
    max-width: min(100%, 230px);
    height: auto;
    object-fit: contain;
    border-radius: 0;
    background: transparent;
    box-shadow: none !important;
    filter: none;
    transition: filter 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
    pointer-events: none;
}

.bots-step__grid:not(.bots-step__grid--market) .bots-option--image img {
    max-width: min(100%, 360px);
}

.bots-option--market img {
    max-width: min(100%, 420px);
}

.bots-option--image:hover img {
    transform: translateY(-1px);
    filter: drop-shadow(0 0 18px rgba(255, 145, 77, 0.9)) drop-shadow(0 0 30px rgba(255, 145, 77, 0.55));
}

.bots-option--image.is-selected img,
.bots-option--image:focus-visible img {
    filter: drop-shadow(0 0 18px rgba(255, 145, 77, 0.9)) drop-shadow(0 0 32px rgba(255, 145, 77, 0.6));
}

.bots-start {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 18px;
}

.bots-step-start-layout {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.bots-status-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.bots-start--compact {
    margin-bottom: 0;
    padding-top: 6px;
}

.bots-start__button {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 0;
    border: none;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.bots-start__button img {
    width: auto;
    max-width: min(100%, 150px);
    height: auto;
    display: block;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.32));
    transition: filter 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

.bots-start__button:hover:not(:disabled) {
    transform: translateY(-2px);
}

.bots-start__button:hover:not(:disabled) img {
    filter: drop-shadow(0 0 18px rgba(255, 145, 77, 0.9)) drop-shadow(0 0 30px rgba(255, 145, 77, 0.55));
}

.bots-start__button:disabled {
    opacity: 0.5;
    cursor: default;
}

.bots-status-card {
    width: min(100%, 920px);
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 22px 24px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(255, 145, 77, 0.18), transparent 34%),
        linear-gradient(145deg, rgba(10, 14, 24, 0.88), rgba(3, 7, 18, 0.82));
    border: 1px solid rgba(255, 145, 77, 0.18);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.bots-status-card--compact {
    width: 100%;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 20px;
}

.bots-status-card__hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.bots-status-card__hero--compact {
    gap: 10px;
}

.bots-status-card__hero-copy {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bots-status-card__eyebrow {
    color: rgba(255, 203, 163, 0.82);
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 700;
}

.bots-status-card__headline {
    color: #fff7ed;
    font-size: 28px;
    line-height: 1;
    font-weight: 700;
}

.bots-status-card__headline--sm {
    font-size: 18px;
}

.bots-status-card__subline {
    color: rgba(226, 232, 240, 0.72);
    font-size: 15px;
    line-height: 1.35;
    max-width: 620px;
}

.bots-status-card__subline--sm {
    font-size: 12px;
    line-height: 1.25;
}

.bots-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 114px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.bots-status-badge.is-live {
    color: #d1fae5;
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(16, 185, 129, 0.28);
}

.bots-status-badge.is-busy {
    color: #fef3c7;
    background: rgba(245, 158, 11, 0.16);
    border-color: rgba(245, 158, 11, 0.28);
}

.bots-status-badge.is-idle {
    color: #fed7aa;
    background: rgba(255, 145, 77, 0.14);
    border-color: rgba(255, 145, 77, 0.22);
}

.bots-status-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.bots-status-metric {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.bots-status-metric__label {
    color: rgba(226, 232, 240, 0.58);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.bots-status-metric__value {
    color: #fff;
    font-size: 16px;
    line-height: 1;
    font-weight: 700;
}

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

.bots-status-list__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.bots-status-list__key {
    color: rgba(226, 232, 240, 0.62);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.bots-status-list__value {
    color: #f8fafc;
    font-size: 11px;
    font-weight: 700;
    text-align: right;
    overflow-wrap: anywhere;
}

.bots-status-list__value--mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, monospace;
    font-size: 10px;
}

.bots-status-list--active {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 190px;
    overflow: auto;
    padding-right: 4px;
}

.bots-status-list--active .bots-status-list__row {
    align-items: flex-start;
}

.chartzella-content.cz-clean {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cz-loading-overlay {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 5;
    pointer-events: none;
}

.cz-loading-overlay.is-active {
    display: flex;
}

.cz-loading-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(8, 12, 24, 0.54);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.26);
}

.cz-loading-spinner {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.18);
    border-top-color: #ff914d;
    animation: cz-spin 0.8s linear infinite;
}

.cz-loading-text {
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

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

.botbuilder-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(4, 7, 14, 0.78);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50000 !important;
    padding: 6px;
}

.botbuilder-modal {
    width: 95vw;
    height: 95vh;
    max-width: 95vw;
    max-height: 95vh;
    background: linear-gradient(170deg, rgba(11, 16, 28, 0.96), rgba(4, 8, 18, 0.98));
    border: 1px solid rgba(255, 145, 77, 0.38);
    border-radius: 14px;
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55);
    position: relative;
    overflow: hidden;
}

.botbuilder-close {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #ff914d;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 6;
    transition: all 0.2s ease;
}

.botbuilder-close:hover {
    border-color: rgba(255, 145, 77, 0.45);
    background: rgba(255, 145, 77, 0.14);
}

.botbuilder-body {
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;
    padding: 8px;
    color: rgba(226, 232, 240, 0.92);
    font-family: 'Rajdhani', sans-serif;
    display: flex;
    flex-direction: column;
    gap: 8px;
    line-height: 1.45;
}

.botbuilder-header {
    border: 1px solid rgba(255, 145, 77, 0.25);
    border-radius: 12px;
    padding: 14px;
    background: linear-gradient(135deg, rgba(255, 145, 77, 0.12), rgba(56, 189, 248, 0.08));
}

.botbuilder-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #ffd7be;
    border: 1px solid rgba(255, 145, 77, 0.38);
    border-radius: 999px;
    padding: 4px 10px;
    margin-bottom: 8px;
    background: rgba(255, 145, 77, 0.18);
}

.botbuilder-header h2 {
    margin: 0;
    color: #ffb07a;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.botbuilder-header p {
    margin: 8px 0 0 0;
    font-size: 14px;
    color: rgba(226, 232, 240, 0.86);
}

.botbuilder-section {
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.45);
    border-radius: 12px;
    padding: 12px 14px;
}

.botbuilder-section h3 {
    margin: 0 0 8px 0;
    color: #ff914d;
    font-size: 17px;
    font-weight: 700;
}

.botbuilder-section ul,
.botbuilder-section ol {
    margin: 0;
    padding-left: 20px;
    display: grid;
    gap: 6px;
}

.botbuilder-section li {
    font-size: 14px;
    color: rgba(226, 232, 240, 0.92);
}

.xqb-workbench {
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: 10px;
    background: linear-gradient(160deg, rgba(6, 11, 23, 0.92), rgba(4, 8, 18, 0.96));
    box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.25);
    padding: 7px;
    display: grid;
    grid-template-rows: 1fr;
    gap: 0;
    flex: 1;
    min-height: 0;
    height: 100%;
}

.xqb-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.xqb-inline-label {
    color: rgba(186, 230, 253, 0.94);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.22px;
    text-transform: uppercase;
}

.xqb-inline-input {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 12px;
    font-family: 'Rajdhani', sans-serif;
    padding: 6px 8px;
    min-width: 190px;
    outline: none;
}

.xqb-template-select {
    min-width: 210px;
}

.xqb-snapshot-select {
    min-width: 260px;
}

.xqb-mode-select {
    min-width: 112px;
}

.xqb-inline-input:focus {
    border-color: rgba(56, 189, 248, 0.7);
}

.xqb-btn {
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.82);
    color: rgba(226, 232, 240, 0.95);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 0.2px;
    padding: 5px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.xqb-btn:hover {
    border-color: rgba(56, 189, 248, 0.62);
    background: rgba(15, 23, 42, 0.95);
}

.xqb-btn:disabled {
    opacity: 0.58;
    cursor: not-allowed;
}

.xqb-btn--accent {
    border-color: rgba(255, 145, 77, 0.5);
    background: rgba(255, 145, 77, 0.14);
    color: #ffd6be;
}

.xqb-btn--accent:hover {
    border-color: rgba(255, 145, 77, 0.82);
    background: rgba(255, 145, 77, 0.2);
}

.xqb-btn--danger {
    border-color: rgba(239, 68, 68, 0.45);
    background: rgba(127, 29, 29, 0.28);
    color: #fecaca;
}

.xqb-btn--danger:hover {
    border-color: rgba(239, 68, 68, 0.75);
    background: rgba(127, 29, 29, 0.4);
}

.xqb-status {
    margin-left: auto;
    min-height: 20px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: #dbeafe;
    border: 1px solid rgba(148, 163, 184, 0.32);
    background: rgba(15, 23, 42, 0.68);
}

.xqb-status[data-kind="success"] {
    color: #bbf7d0;
    border-color: rgba(34, 197, 94, 0.45);
    background: rgba(34, 197, 94, 0.14);
}

.xqb-status[data-kind="warn"] {
    color: #fde68a;
    border-color: rgba(245, 158, 11, 0.45);
    background: rgba(180, 83, 9, 0.22);
}

.xqb-status[data-kind="error"] {
    color: #fecaca;
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(127, 29, 29, 0.3);
}

.xqb-access-status {
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.64);
    color: rgba(226, 232, 240, 0.9);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2px;
    padding: 6px 8px;
}

.xqb-access-status[data-kind="success"] {
    color: #bbf7d0;
    border-color: rgba(34, 197, 94, 0.45);
    background: rgba(20, 83, 45, 0.32);
}

.xqb-access-status[data-kind="warn"] {
    color: #fde68a;
    border-color: rgba(245, 158, 11, 0.45);
    background: rgba(146, 64, 14, 0.32);
}

.xqb-access-status[data-kind="error"] {
    color: #fecaca;
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(127, 29, 29, 0.32);
}

.xqb-workbench.is-readonly .xqb-palette-panel,
.xqb-workbench.is-readonly .xqb-node-delete,
.xqb-workbench.is-readonly .xqb-port,
.xqb-workbench.is-readonly .xqb-edge-hit {
    opacity: 0.82;
}

.xqb-workbench.is-readonly .xqb-node-delete,
.xqb-workbench.is-readonly .xqb-port,
.xqb-workbench.is-readonly .xqb-edge-hit {
    pointer-events: none;
}

.xqb-workbench.is-readonly .xqb-step-lane {
    pointer-events: none;
    opacity: 0.45;
}

.xqb-workbench.is-readonly .xqb-node-head {
    cursor: default;
}

.xqb-shell {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr) 250px;
    gap: 7px;
    min-height: 0;
    height: 100%;
}

.xqb-mobile-scrim,
.xqb-mobile-dock {
    display: none;
}

.xqb-mobile-dock-btn {
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.86);
    color: rgba(226, 232, 240, 0.95);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 0.2px;
    line-height: 1;
    min-height: 36px;
    padding: 8px 10px;
    cursor: pointer;
}

.xqb-mobile-dock-btn.is-active {
    border-color: rgba(56, 189, 248, 0.75);
    background: rgba(8, 47, 73, 0.62);
    color: #bae6fd;
}

.xqb-workbench.is-palette-hidden .xqb-shell {
    grid-template-columns: 34px minmax(0, 1fr) 250px;
}

.xqb-workbench.is-inspector-hidden .xqb-shell {
    grid-template-columns: 190px minmax(0, 1fr) 34px;
}

.xqb-workbench.is-palette-hidden.is-inspector-hidden .xqb-shell {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
}

.xqb-workbench.is-palette-hidden .xqb-palette-panel .xqb-panel-body {
    display: none;
}

.xqb-workbench.is-inspector-hidden .xqb-inspector-panel .xqb-panel-body {
    display: none;
}

.xqb-workbench.is-palette-hidden .xqb-palette-panel .xqb-panel-head {
    justify-content: center;
    padding: 8px 4px;
}

.xqb-workbench.is-inspector-hidden .xqb-inspector-panel .xqb-panel-head {
    justify-content: flex-start;
    padding: 7px 6px;
}

.xqb-workbench.is-palette-hidden .xqb-palette-panel .xqb-panel-title,
.xqb-workbench.is-palette-hidden .xqb-palette-panel #xqbPaletteCount,
.xqb-workbench.is-inspector-hidden .xqb-inspector-panel .xqb-panel-title {
    display: none;
}

.xqb-panel-icon-btn {
    border: 1px solid rgba(249, 115, 22, 0.68);
    background: rgba(124, 45, 18, 0.52);
    color: #fed7aa;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    padding: 3px 6px;
    cursor: pointer;
}

.xqb-panel-icon-btn:hover {
    border-color: rgba(251, 146, 60, 0.95);
    background: rgba(154, 52, 18, 0.72);
    color: #ffedd5;
}

.xqb-panel {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.76);
    overflow: hidden;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.xqb-panel-head {
    padding: 5px 7px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.xqb-inspector-panel .xqb-panel-head {
    justify-content: flex-start;
    gap: 6px;
}

.xqb-panel-body {
    padding: 6px;
    flex: 1;
    min-height: 0;
}

.xqb-palette-panel .xqb-panel-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 0;
    overflow: hidden;
}

.xqb-palette-list {
    display: grid;
    gap: 4px;
    grid-auto-rows: max-content;
    align-content: start;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding-right: 2px;
    padding-bottom: 4px;
    background: transparent;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.55) transparent;
}

.xqb-palette-list::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    background: transparent;
}

.xqb-palette-list::-webkit-scrollbar-track {
    background: transparent !important;
    box-shadow: none;
}

.xqb-palette-list::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.45);
    border: 2px solid transparent;
    background-clip: padding-box;
    border-radius: 999px;
}

.xqb-palette-list::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.65);
}

.xqb-palette-list::-webkit-scrollbar-corner {
    background: transparent;
}

#xqbPaletteList::-webkit-scrollbar-track,
#xqbPaletteList::-webkit-scrollbar-corner {
    background: transparent !important;
}

.xqb-palette-panel .xqb-field {
    margin-bottom: 4px;
}

.xqb-palette-panel .xqb-field input {
    width: 100%;
}

.xqb-palette-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 24px;
    gap: 4px;
    align-items: center;
}

.xqb-palette-trash-btn {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 1px solid rgba(239, 68, 68, 0.75);
    background: rgba(127, 29, 29, 0.72);
    color: #fecaca;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.xqb-palette-trash-btn:hover {
    background: rgba(153, 27, 27, 0.92);
    border-color: rgba(248, 113, 113, 0.95);
}

.xqb-palette-group {
    display: grid;
    gap: 4px;
    align-content: start;
    align-items: start;
}

.xqb-palette-group-title {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 7px;
    background: rgba(15, 23, 42, 0.72);
    padding: 4px 6px;
    color: rgba(148, 163, 184, 0.95);
    font-size: 10px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    font-weight: 700;
    font-family: 'Rajdhani', sans-serif;
    margin-top: 1px;
    cursor: pointer;
    text-align: left;
}

.xqb-palette-group-title:hover {
    border-color: rgba(125, 211, 252, 0.55);
    color: #e2e8f0;
}

.xqb-palette-group-title-text {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.xqb-palette-group-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.9);
    color: rgba(148, 163, 184, 0.95);
    font-size: 10px;
    line-height: 1;
    flex: 0 0 auto;
}

.xqb-palette-group.is-collapsed .xqb-palette-group-toggle {
    border-color: rgba(34, 197, 94, 0.55);
    color: #86efac;
    background: rgba(20, 83, 45, 0.34);
}

.xqb-palette-group-body {
    display: grid;
    gap: 4px;
}

.xqb-palette-group.is-collapsed .xqb-palette-group-body {
    display: none;
}

.xqb-block-item {
    border: 1px solid var(--xqb-step-border, rgba(148, 163, 184, 0.24));
    border-left: 4px solid var(--xqb-step-accent, var(--xqb-accent, #38bdf8));
    border-radius: 7px;
    background:
        linear-gradient(180deg, var(--xqb-step-tint, rgba(15, 23, 42, 0.12)), rgba(15, 23, 42, 0.62));
    padding: 4px 5px 4px 6px;
    cursor: grab;
    display: grid;
    gap: 3px;
    transition: all 0.16s ease;
}

.xqb-block-item:active {
    cursor: grabbing;
}

.xqb-block-item:hover {
    border-color: var(--xqb-step-accent, rgba(56, 189, 248, 0.45));
    background:
        linear-gradient(180deg, var(--xqb-step-tint, rgba(15, 23, 42, 0.2)), rgba(15, 23, 42, 0.78));
    transform: translateY(-1px);
}

.xqb-block-item.is-locked {
    opacity: 0.48;
    filter: saturate(0.78);
    border-style: dashed;
    cursor: not-allowed;
}

.xqb-block-item.is-locked:active {
    cursor: not-allowed;
}

.xqb-block-item.is-locked:hover {
    transform: none;
}

.xqb-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}

.xqb-block-name {
    color: #e2e8f0;
    font-size: 10px;
    font-weight: 700;
}

.xqb-block-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid var(--xqb-step-border, rgba(148, 163, 184, 0.4));
    color: var(--xqb-step-accent, rgba(186, 230, 253, 0.9));
    background: rgba(2, 6, 23, 0.45);
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.2px;
    padding: 1px 4px;
    white-space: nowrap;
}

.xqb-block-desc {
    color: rgba(148, 163, 184, 0.94);
    font-size: 9px;
    line-height: 1.15;
}

.xqb-canvas-wrap {
    position: relative;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.xqb-canvas-viewport {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: 9px;
    background:
      radial-gradient(circle at 0 0, rgba(255, 145, 77, 0.12), transparent 42%),
      linear-gradient(rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0.82));
}

.xqb-canvas-viewport {
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.55) transparent;
}

.xqb-canvas-viewport::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.xqb-canvas-viewport::-webkit-scrollbar-track {
    background: transparent;
}

.xqb-canvas-viewport::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.45);
    border-radius: 999px;
}

.xqb-canvas-viewport::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.65);
}

.xqb-canvas-viewport::-webkit-scrollbar-corner {
    background: transparent;
}

.xqb-canvas-stage {
    position: relative;
    min-width: 100%;
    min-height: 100%;
}

.xqb-board {
    position: relative;
    width: 100%;
    height: 100%;
    transform-origin: 0 0;
    will-change: transform;
    background-image:
      linear-gradient(rgba(148, 163, 184, 0.12) 1px, transparent 1px),
      linear-gradient(90deg, rgba(148, 163, 184, 0.12) 1px, transparent 1px),
      linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
      linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
    background-size: 40px 40px, 40px 40px, 8px 8px, 8px 8px;
    border-radius: 8px;
}

.xqb-step-lanes {
    position: absolute;
    inset: 0;
    pointer-events: auto;
    z-index: 2;
}

.xqb-step-lane {
    position: absolute;
    border: 1px dashed var(--xqb-step-border, rgba(148, 163, 184, 0.24));
    border-radius: 12px;
    background: linear-gradient(180deg, var(--xqb-step-tint, rgba(15, 23, 42, 0.2)), rgba(15, 23, 42, 0.06));
    pointer-events: auto;
    cursor: move;
}

.xqb-step-lane.is-active {
    border-color: var(--xqb-step-accent, rgba(255, 145, 77, 0.45));
    box-shadow: inset 0 0 0 1px var(--xqb-step-border, rgba(148, 163, 184, 0.24));
}

.xqb-step-lane.is-complete {
    border-color: var(--xqb-step-accent, rgba(56, 189, 248, 0.5));
    background: linear-gradient(180deg, var(--xqb-step-tint, rgba(15, 23, 42, 0.26)), rgba(15, 23, 42, 0.08));
}

.xqb-step-lane.is-optional:not(.is-complete) {
    opacity: 0.8;
}

.xqb-step-lane-head {
    position: absolute;
    top: 8px;
    left: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    pointer-events: none;
}

.xqb-step-lane-title {
    color: var(--xqb-step-accent, rgba(186, 230, 253, 0.92));
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.22px;
    text-transform: uppercase;
}

.xqb-step-lane-status {
    margin-left: auto;
    color: rgba(148, 163, 184, 0.94);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.22px;
    text-transform: uppercase;
}

.xqb-step-lane-handle {
    position: absolute;
    width: 11px;
    height: 11px;
    border-radius: 3px;
    border: 1px solid rgba(249, 115, 22, 0.8);
    background: rgba(124, 45, 18, 0.88);
    box-shadow: 0 0 0 1px rgba(2, 6, 23, 0.42);
    pointer-events: auto;
}

.xqb-step-lane-handle:hover {
    border-color: rgba(251, 146, 60, 0.98);
    background: rgba(154, 52, 18, 0.96);
}

.xqb-step-lane-handle--nw {
    top: -6px;
    left: -6px;
    cursor: nwse-resize;
}

.xqb-step-lane-handle--ne {
    top: -6px;
    right: -6px;
    cursor: nesw-resize;
}

.xqb-step-lane-handle--sw {
    bottom: -6px;
    left: -6px;
    cursor: nesw-resize;
}

.xqb-step-lane-handle--se {
    bottom: -6px;
    right: -6px;
    cursor: nwse-resize;
}

.xqb-edges {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

#xqbNodes {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
}

.xqb-edge {
    pointer-events: none;
}

.xqb-edge-hit {
    fill: none;
    stroke: transparent;
    stroke-width: 6;
    pointer-events: stroke;
    cursor: pointer;
}

.xqb-edge-path {
    fill: none;
    stroke: rgba(56, 189, 248, 0.8);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.xqb-edge-path--draft {
    stroke-width: 2.4;
    stroke-dasharray: 6 4;
    opacity: 0.92;
}

.xqb-edge:hover .xqb-edge-path {
    stroke-width: 2.9;
    filter: drop-shadow(0 0 4px rgba(148, 163, 184, 0.55));
}

.xqb-node {
    position: absolute;
    width: 300px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-left: 4px solid var(--xqb-node-accent, #38bdf8);
    border-radius: 14px;
    background: rgba(10, 15, 28, 0.95);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.34);
    color: #e2e8f0;
    user-select: none;
    overflow: visible;
    pointer-events: auto;
}

.xqb-node::before,
.xqb-node::after {
    content: none;
    display: none;
}

.xqb-node.is-selected {
    border-color: rgba(255, 145, 77, 0.78);
    box-shadow: 0 0 0 2px rgba(255, 145, 77, 0.22), 0 10px 26px rgba(0, 0, 0, 0.38);
}

.xqb-node.is-desktop-geared {
    border: none;
    border-left: none;
    background: transparent;
}

.xqb-node.is-desktop-geared .xqb-node-svg-shell {
    position: absolute;
    left: 0;
    top: 0;
    pointer-events: none;
    overflow: visible;
    z-index: 1;
}

.xqb-node.is-desktop-geared .xqb-node-svg-path {
    stroke: var(--xqb-mobile-notch-border, rgba(148, 163, 184, 0.42));
    stroke-width: 1.1;
    vector-effect: non-scaling-stroke;
}

.xqb-node.is-desktop-geared .xqb-node-head,
.xqb-node.is-desktop-geared .xqb-node-body {
    position: relative;
    z-index: 2;
    background: transparent;
}

.xqb-node.is-desktop-geared .xqb-node-head {
    padding-top: 13px;
}

.xqb-node.is-desktop-geared .xqb-node-body {
    padding-bottom: 12px;
}

.xqb-node.is-desktop-geared.is-desktop-inlet-multi .xqb-node-head-main {
    position: relative;
    justify-content: center;
}

.xqb-node.is-desktop-geared.is-desktop-inlet-multi .xqb-node-name-row {
    justify-content: center;
    width: 100%;
    padding-right: 18px;
}

.xqb-node.is-desktop-geared.is-desktop-inlet-multi .xqb-node-name {
    max-width: 170px;
    text-align: center;
}

.xqb-node.is-desktop-geared.is-desktop-inlet-multi .xqb-node-delete {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.xqb-node-head {
    padding: 6px 7px 5px 7px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    display: grid;
    gap: 4px;
    cursor: grab;
}

.xqb-node-head:active {
    cursor: grabbing;
}

.xqb-node-head-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.xqb-node-title {
    display: grid;
    gap: 2px;
}

.xqb-node-name-row {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    flex-wrap: wrap;
}

.xqb-node-name {
    font-size: 11px;
    font-weight: 700;
    line-height: 1.15;
    min-width: 0;
    max-width: 116px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xqb-node-type {
    font-size: 10px;
    color: rgba(148, 163, 184, 0.95);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.xqb-node-step-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1px 4px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.36);
    background: rgba(15, 23, 42, 0.72);
    color: rgba(186, 230, 253, 0.95);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.2px;
    vertical-align: middle;
}

.xqb-node[data-step-id="operation"] .xqb-node-step-tag {
    border-color: rgba(245, 158, 11, 0.5);
    color: #fde68a;
}

.xqb-node[data-step-id="entry"] .xqb-node-step-tag {
    border-color: rgba(56, 189, 248, 0.55);
    color: #bae6fd;
}

.xqb-node[data-step-id="sell"] .xqb-node-step-tag {
    border-color: rgba(239, 68, 68, 0.5);
    color: #fecaca;
}

.xqb-node[data-step-id="reset"] .xqb-node-step-tag {
    border-color: rgba(34, 197, 94, 0.55);
    color: #bbf7d0;
}

.xqb-node-debug-line {
    font-size: 9px;
    color: rgba(186, 230, 253, 0.92);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xqb-node-debug-badge {
    border-radius: 999px;
    padding: 1px 6px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.2px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.75);
}

.xqb-node-debug-badge.is-true,
.xqb-node-debug-badge.is-action {
    color: #bbf7d0;
    border-color: rgba(34, 197, 94, 0.55);
    background: rgba(20, 83, 45, 0.35);
}

.xqb-node-debug-badge.is-false {
    color: #fda4af;
    border-color: rgba(239, 68, 68, 0.55);
    background: rgba(127, 29, 29, 0.35);
}

.xqb-node-debug-badge.is-value {
    color: #bae6fd;
    border-color: rgba(56, 189, 248, 0.55);
    background: rgba(8, 47, 73, 0.4);
}

.xqb-node.is-debug-true,
.xqb-node.is-debug-action {
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.25), 0 8px 20px rgba(0, 0, 0, 0.34);
}

.xqb-node.is-debug-false {
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.22), 0 8px 20px rgba(0, 0, 0, 0.34);
}

.xqb-node.is-debug-value {
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.22), 0 8px 20px rgba(0, 0, 0, 0.34);
}

.xqb-node-delete {
    border: 1px solid rgba(148, 163, 184, 0.34);
    background: rgba(15, 23, 42, 0.72);
    color: #fca5a5;
    border-radius: 6px;
    width: 18px;
    height: 18px;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
}

.xqb-node-delete:hover {
    border-color: rgba(239, 68, 68, 0.6);
    background: rgba(127, 29, 29, 0.34);
}

.xqb-node-body {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    gap: 2px;
    align-items: start;
    padding: 4px 6px 6px 6px;
}

.xqb-node-inline-params {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 4px 5px;
    border: 1px dashed rgba(148, 163, 184, 0.24);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(8, 13, 24, 0.55), rgba(8, 13, 24, 0.15));
}

.xqb-desktop-notch-strip {
    position: absolute;
    left: 0;
    right: 0;
    height: 0;
    pointer-events: none;
    z-index: 3;
}

.xqb-desktop-notch-strip--top {
    top: 0;
}

.xqb-desktop-notch-strip--bottom {
    top: 100%;
}

.xqb-desktop-kind-notch {
    position: absolute;
    top: 0;
    width: 60px;
    height: 24px;
    margin-left: -30px;
    padding: 0 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 6.8px;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    font-weight: 700;
    border: 1px solid rgba(148, 163, 184, 0.42);
}

.xqb-desktop-notch-strip--top .xqb-desktop-kind-notch {
    border-radius: 0 0 14px 14px;
    border-top: none;
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.1);
    color: transparent;
    font-size: 0;
    letter-spacing: 0;
}

.xqb-desktop-notch-strip--bottom .xqb-desktop-kind-notch {
    border-radius: 0 0 14px 14px;
    border-top: none;
    box-shadow: 0 2px 6px rgba(2, 6, 23, 0.34);
}

.xqb-desktop-kind-notch.is-flow {
    background: rgba(245, 158, 11, 0.28);
    color: #fde68a;
    border-color: rgba(245, 158, 11, 0.62);
}

.xqb-desktop-kind-notch.is-data {
    background: rgba(56, 189, 248, 0.24);
    color: #bae6fd;
    border-color: rgba(56, 189, 248, 0.6);
}

.xqb-desktop-kind-notch.is-signal {
    background: rgba(34, 197, 94, 0.25);
    color: #bbf7d0;
    border-color: rgba(34, 197, 94, 0.56);
}

.xqb-desktop-kind-notch.is-action {
    background: rgba(239, 68, 68, 0.24);
    color: #fecaca;
    border-color: rgba(239, 68, 68, 0.56);
}

.xqb-desktop-notch-strip--top .xqb-desktop-kind-notch.is-flow {
    background: rgba(245, 158, 11, 0.16);
}

.xqb-desktop-notch-strip--top .xqb-desktop-kind-notch.is-data {
    background: rgba(56, 189, 248, 0.16);
}

.xqb-desktop-notch-strip--top .xqb-desktop-kind-notch.is-signal {
    background: rgba(34, 197, 94, 0.16);
}

.xqb-desktop-notch-strip--top .xqb-desktop-kind-notch.is-action {
    background: rgba(239, 68, 68, 0.16);
}

.xqb-inline-param-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 86px;
    gap: 5px;
    align-items: center;
}

.xqb-inline-param-row--picker {
    grid-template-columns: 1fr;
    gap: 4px;
}

.xqb-inline-param-label {
    font-size: 9px;
    color: rgba(186, 230, 253, 0.95);
    letter-spacing: 0.2px;
    line-height: 1.1;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
}

.xqb-param-help {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 1px solid rgba(125, 211, 252, 0.6);
    background: rgba(2, 132, 199, 0.22);
    color: #e0f2fe;
    font-size: 9px;
    line-height: 12px;
    text-align: center;
    font-weight: 700;
    cursor: help;
    flex: 0 0 auto;
}

.xqb-inline-param-input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 7px;
    background: rgba(15, 23, 42, 0.74);
    color: #f1f5f9;
    font-size: 9px;
    font-family: 'Rajdhani', sans-serif;
    padding: 2px 5px;
    outline: none;
    height: 20px;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.xqb-inline-param-input:hover {
    background: rgba(15, 23, 42, 0.84);
    border-color: rgba(255, 255, 255, 0.24);
}

.xqb-inline-param-input:focus {
    border-color: rgba(255, 145, 77, 0.8);
    box-shadow: 0 0 0 2px rgba(255, 145, 77, 0.16);
}

.xqb-indicator-layout {
    display: grid;
    gap: 5px;
}

.xqb-indicator-picker {
    position: relative;
    z-index: 3;
}

.xqb-indicator-picker[open] {
    z-index: 12;
}

.xqb-indicator-picker-summary {
    list-style: none;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 7px;
    background: rgba(15, 23, 42, 0.74);
    color: #f1f5f9;
    font-size: 9px;
    padding: 3px 22px 3px 7px;
    height: 20px;
    line-height: 14px;
    cursor: pointer;
    user-select: none;
    position: relative;
    font-family: 'Rajdhani', sans-serif;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.xqb-indicator-picker-summary:hover {
    background: rgba(15, 23, 42, 0.84);
    border-color: rgba(255, 255, 255, 0.24);
}

.xqb-indicator-picker-summary:focus-visible {
    border-color: rgba(255, 145, 77, 0.8);
    box-shadow: 0 0 0 2px rgba(255, 145, 77, 0.16);
    outline: none;
}

.xqb-indicator-picker-summary::-webkit-details-marker {
    display: none;
}

.xqb-indicator-picker-summary::after {
    content: '▾';
    position: absolute;
    right: 7px;
    top: 2px;
    font-size: 10px;
    color: rgba(255, 145, 77, 0.95);
}

.xqb-indicator-picker[open] .xqb-indicator-picker-summary {
    border-color: rgba(255, 145, 77, 0.78);
    background: rgba(15, 23, 42, 0.88);
    box-shadow: 0 0 0 2px rgba(255, 145, 77, 0.16);
}

.xqb-indicator-picker-grid {
    position: absolute;
    left: 0;
    top: calc(100% + 4px);
    width: max(100%, 220px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(5, 10, 20, 0.98);
    padding: 5px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    max-height: 198px;
    overflow: auto;
    box-shadow: 0 12px 24px rgba(2, 6, 23, 0.68), 0 0 0 1px rgba(255, 145, 77, 0.1);
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.5) transparent;
}

.xqb-indicator-picker-grid::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

.xqb-indicator-picker-grid::-webkit-scrollbar-track,
.xqb-indicator-picker-grid::-webkit-scrollbar-corner {
    background: transparent;
}

.xqb-indicator-picker-grid::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.45);
    border-radius: 999px;
}

.xqb-indicator-picker-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.65);
}

.xqb-symbol-picker-grid {
    width: max(100%, 244px);
    grid-template-columns: minmax(0, 1fr);
    max-height: 274px;
    gap: 5px;
}

.xqb-symbol-search-input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 7px;
    background: rgba(15, 23, 42, 0.74);
    color: #f1f5f9;
    font-size: 9px;
    font-family: 'Rajdhani', sans-serif;
    padding: 3px 6px;
    height: 22px;
    outline: none;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.xqb-symbol-search-input:hover {
    background: rgba(15, 23, 42, 0.84);
    border-color: rgba(255, 255, 255, 0.24);
}

.xqb-symbol-search-input:focus {
    border-color: rgba(255, 145, 77, 0.8);
    box-shadow: 0 0 0 2px rgba(255, 145, 77, 0.16);
}

.xqb-symbol-picker-options {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    max-height: 108px;
    overflow: auto;
    padding-right: 2px;
}

.xqb-symbol-option[hidden] {
    display: none !important;
}

.xqb-symbol-picker-empty {
    border: 1px dashed rgba(148, 163, 184, 0.35);
    border-radius: 6px;
    padding: 6px;
    font-size: 9px;
    color: rgba(148, 163, 184, 0.95);
    text-align: center;
}

.xqb-op-controls {
    border: 1px solid rgba(255, 145, 77, 0.28);
    border-radius: 6px;
    background: linear-gradient(180deg, rgba(255, 145, 77, 0.08), rgba(15, 23, 42, 0.22));
    padding: 5px;
    display: grid;
    gap: 4px;
}

.xqb-op-controls-row {
    display: grid;
    grid-template-columns: minmax(58px, auto) minmax(0, 1fr);
    align-items: center;
    gap: 5px;
}

.xqb-op-controls-label {
    font-size: 8px;
    color: rgba(255, 237, 222, 0.92);
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.xqb-op-control-select,
.xqb-op-control-input {
    width: 100%;
    min-width: 0;
    height: 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 7px;
    background: rgba(15, 23, 42, 0.74);
    color: #f1f5f9;
    font-size: 9px;
    font-family: 'Rajdhani', sans-serif;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.xqb-op-control-select:hover,
.xqb-op-control-input:hover {
    background: rgba(15, 23, 42, 0.84);
    border-color: rgba(255, 255, 255, 0.24);
}

.xqb-op-control-input {
    padding: 2px 5px;
}

.xqb-op-control-select {
    padding: 2px 19px 2px 5px;
    appearance: none;
    -webkit-appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, rgba(255, 145, 77, 0.95) 50%),
        linear-gradient(135deg, rgba(255, 145, 77, 0.95) 50%, transparent 50%);
    background-position:
        calc(100% - 10px) calc(50% - 1px),
        calc(100% - 6px) calc(50% - 1px);
    background-size: 4px 4px;
    background-repeat: no-repeat;
}

.xqb-op-control-select:focus,
.xqb-op-control-input:focus {
    border-color: rgba(255, 145, 77, 0.8);
    box-shadow: 0 0 0 2px rgba(255, 145, 77, 0.16);
}

.xqb-op-control-select option {
    background: #0f172a;
    color: #e2e8f0;
}

.xqb-op-controls-note {
    font-size: 8px;
    color: rgba(255, 214, 183, 0.9);
    line-height: 1.2;
}

.xqb-op-controls-note.is-warn {
    color: rgba(251, 191, 36, 0.92);
}

.xqb-op-control-picker {
    width: 100%;
}

.xqb-op-control-picker > .xqb-indicator-picker-summary {
    width: 100%;
    min-width: 0;
}

.xqb-op-control-picker-grid {
    width: max(100%, 160px);
    grid-template-columns: minmax(0, 1fr);
}

.xqb-indicator-option {
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.78);
    color: #f1f5f9;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.15;
    min-height: 24px;
    padding: 4px 6px;
    text-align: left;
    cursor: pointer;
    font-family: 'Rajdhani', sans-serif;
}

.xqb-indicator-option:hover {
    border-color: rgba(255, 145, 77, 0.65);
    background: rgba(255, 145, 77, 0.12);
    color: #fff5ec;
}

.xqb-indicator-option.is-active {
    border-color: rgba(255, 145, 77, 0.82);
    background: rgba(255, 145, 77, 0.24);
    color: #ffd7bf;
    box-shadow: inset 0 0 0 1px rgba(255, 145, 77, 0.2);
}

.xqb-node[data-node-type="indicator_universal"] .xqb-node-inline-params {
    gap: 5px;
}

.xqb-node[data-node-type="indicator_universal"] .xqb-indicator-params-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
}

.xqb-node[data-node-type="indicator_universal"] .xqb-indicator-params-grid .xqb-inline-param-row {
    grid-template-columns: 1fr;
    gap: 3px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 6px;
    padding: 4px;
    background: rgba(15, 23, 42, 0.35);
}

.xqb-inline-param-empty {
    font-size: 9px;
    color: rgba(148, 163, 184, 0.9);
}

.xqb-port-col {
    display: grid;
    gap: 5px;
    align-content: start;
    min-width: 0;
}

.xqb-port-col.inputs {
    margin-left: -4px;
}

.xqb-port-col.outputs {
    margin-right: -4px;
    justify-items: end;
}

.xqb-port-row {
    display: flex;
    align-items: center;
    gap: 3px;
    min-height: 20px;
    max-width: 52px;
}

.xqb-port-row.is-docked-custom {
    position: absolute;
    left: var(--xqb-port-row-dock-left, 0px);
    top: var(--xqb-port-row-dock-top, 0px);
    z-index: 11;
    max-width: none;
}

.xqb-port-row.is-docked-custom[data-port-dock-side="left"] {
    justify-content: flex-start;
}

.xqb-port-row.is-docked-custom[data-port-dock-side="right"] {
    justify-content: flex-end;
}

.xqb-port-row.is-docked-custom[data-port-dock-side="right"] .xqb-port {
    order: 2;
}

.xqb-port-row.is-docked-custom[data-port-dock-side="right"] .xqb-port-label {
    order: 1;
    text-align: right;
}

.xqb-port-row.is-docked-custom[data-port-dock-side="top"],
.xqb-port-row.is-docked-custom[data-port-dock-side="bottom"] {
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.xqb-port-row.is-docked-custom[data-port-dock-side="top"] .xqb-port {
    order: 1;
}

.xqb-port-row.is-docked-custom[data-port-dock-side="top"] .xqb-port-label {
    order: 2;
    text-align: center;
}

.xqb-port-row.is-docked-custom[data-port-dock-side="bottom"] .xqb-port {
    order: 2;
}

.xqb-port-row.is-docked-custom[data-port-dock-side="bottom"] .xqb-port-label {
    order: 1;
    text-align: center;
}

.xqb-port-row--input {
    justify-content: flex-start;
}

.xqb-port-row--output {
    justify-content: flex-end;
}

.xqb-port-label {
    font-size: 8px;
    color: rgba(203, 213, 225, 0.95);
    line-height: 1.1;
    max-width: 36px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xqb-port-label-empty {
    opacity: 0.75;
    font-style: italic;
}

.xqb-port {
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(15, 23, 42, 0.95);
    width: 14px;
    height: 11px;
    border-radius: 4px;
    padding: 0;
    cursor: pointer;
    flex: 0 0 auto;
    position: relative;
}

.xqb-port.is-docked-custom {
    position: relative;
    z-index: 10;
}

.xqb-port.is-docked-custom::before,
.xqb-port.is-docked-custom::after {
    content: none;
}

.xqb-port.is-docked-custom[data-port-dock-side]::before {
    content: none;
}

.xqb-port.is-docked-custom[data-port-dock-side]::after {
    content: '';
    position: absolute;
    border: inherit;
    background: inherit;
}

.xqb-port.is-docked-custom[data-port-dock-side="right"]::after {
    right: -9px;
    top: 50%;
    width: 9px;
    height: 8px;
    transform: translateY(-50%);
    border-left: 0;
    border-radius: 0 5px 5px 0;
}

.xqb-port.is-docked-custom[data-port-dock-side="left"]::after {
    left: -9px;
    top: 50%;
    width: 9px;
    height: 8px;
    transform: translateY(-50%);
    border-right: 0;
    border-radius: 5px 0 0 5px;
}

.xqb-port.is-docked-custom[data-port-dock-side="top"]::after {
    left: 50%;
    top: -9px;
    width: 8px;
    height: 9px;
    transform: translateX(-50%);
    border-bottom: 0;
    border-radius: 5px 5px 0 0;
}

.xqb-port.is-docked-custom[data-port-dock-side="bottom"]::after {
    left: 50%;
    bottom: -9px;
    width: 8px;
    height: 9px;
    transform: translateX(-50%);
    border-top: 0;
    border-radius: 0 0 5px 5px;
}

.xqb-port.is-dock-dragging {
    box-shadow: 0 0 0 3px rgba(255, 145, 77, 0.34);
    cursor: grabbing;
}

.xqb-node.is-port-dock-dragging {
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.22), 0 10px 26px rgba(0, 0, 0, 0.38);
}

.xqb-port[data-direction="output"]::after {
    content: '';
    position: absolute;
    right: -9px;
    top: 50%;
    width: 9px;
    height: 8px;
    transform: translateY(-50%);
    border: inherit;
    border-left: 0;
    border-radius: 0 5px 5px 0;
    background: inherit;
}

.xqb-port[data-direction="input"]::before {
    content: '';
    position: absolute;
    left: -9px;
    top: 50%;
    width: 9px;
    height: 8px;
    transform: translateY(-50%);
    border: inherit;
    border-right: 0;
    border-radius: 5px 0 0 5px;
    background: inherit;
}

.xqb-port[data-kind="event"] {
    border-color: rgba(245, 158, 11, 0.72);
    background: rgba(245, 158, 11, 0.24);
}

.xqb-port[data-kind="number"] {
    border-color: rgba(56, 189, 248, 0.75);
    background: rgba(56, 189, 248, 0.24);
}

.xqb-port[data-kind="bool"] {
    border-color: rgba(34, 197, 94, 0.75);
    background: rgba(34, 197, 94, 0.24);
}

.xqb-port[data-kind="action"] {
    border-color: rgba(239, 68, 68, 0.75);
    background: rgba(239, 68, 68, 0.24);
}

.xqb-port:hover {
    transform: scale(1.08);
}

.xqb-port.is-pending {
    box-shadow: 0 0 0 3px rgba(255, 145, 77, 0.32);
}

.xqb-inspector-wrap {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-height: 0;
    height: 100%;
}

.xqb-inspector-tabs {
    display: flex;
    align-items: flex-end;
    gap: 0;
    padding: 0 1px;
    isolation: isolate;
}

.xqb-inspector-tab-btn {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    height: 29px;
    margin-right: -9px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-bottom: 0;
    background: rgba(15, 23, 42, 0.88);
    color: rgba(203, 213, 225, 0.95);
    border-radius: 9px 9px 0 0;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 100%, 0 100%);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2px;
    padding: 6px 14px 5px 9px;
    cursor: pointer;
    font-family: 'Rajdhani', sans-serif;
    text-align: left;
    z-index: 1;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.xqb-inspector-tab-btn::after {
    content: '';
    position: absolute;
    top: 2px;
    bottom: 1px;
    right: 10px;
    width: 1px;
    background: rgba(148, 163, 184, 0.48);
    transform: skewX(-28deg);
    pointer-events: none;
}

.xqb-inspector-tab-btn:last-child {
    margin-right: 0;
}

.xqb-inspector-tab-btn:hover {
    border-color: rgba(56, 189, 248, 0.45);
    color: #e2e8f0;
    z-index: 2;
}

.xqb-inspector-tab-btn:hover::after {
    background: rgba(56, 189, 248, 0.6);
}

.xqb-inspector-tab-btn.is-active {
    border-color: rgba(56, 189, 248, 0.82);
    background: rgba(8, 47, 73, 0.62);
    color: #bae6fd;
    z-index: 3;
}

.xqb-inspector-tab-btn.is-active::after {
    background: rgba(125, 211, 252, 0.86);
}

.xqb-inspector-tab-panel {
    display: none;
}

.xqb-inspector-tab-panel.is-active {
    display: grid;
    gap: 7px;
    align-content: start;
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding-right: 2px;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.5) transparent;
}

.xqb-inspector-tab-panel[data-tab-panel="builder"] .xqb-inline-input {
    width: 100%;
    min-width: 0;
}

.xqb-inspector-tab-panel[data-tab-panel="builder"] .xqb-mode-select,
.xqb-inspector-tab-panel[data-tab-panel="builder"] .xqb-template-select,
.xqb-inspector-tab-panel[data-tab-panel="builder"] .xqb-snapshot-select {
    min-width: 0;
    width: 100%;
}

.xqb-inspector-tab-panel[data-tab-panel="builder"] .xqb-btn {
    padding: 6px 8px;
    font-size: 10px;
}

.xqb-builder-card {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.48);
    padding: 7px;
    display: grid;
    gap: 6px;
}

.xqb-builder-card-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.24px;
    color: #dbeafe;
    text-transform: uppercase;
}

.xqb-builder-main-row {
    align-items: flex-end;
}

.xqb-builder-hint {
    font-size: 9px;
    color: rgba(186, 230, 253, 0.85);
    line-height: 1.25;
    padding: 4px 6px;
    border: 1px dashed rgba(125, 211, 252, 0.34);
    border-radius: 7px;
    background: rgba(8, 47, 73, 0.22);
}

.xqb-builder-separator {
    height: 1px;
    width: 100%;
    margin: 4px 0 2px;
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.15), rgba(148, 163, 184, 0.45), rgba(56, 189, 248, 0.15));
}

.xqb-strategy-picker {
    position: relative;
}

.xqb-strategy-picker-toggle {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    text-align: left;
    cursor: pointer;
}

.xqb-strategy-picker-toggle::after {
    content: '▾';
    font-size: 11px;
    color: rgba(186, 230, 253, 0.92);
    transition: transform 0.18s ease;
}

.xqb-strategy-picker.is-open .xqb-strategy-picker-toggle::after {
    transform: rotate(180deg);
}

.xqb-strategy-picker-toggle:disabled {
    cursor: not-allowed;
}

.xqb-strategy-picker-menu {
    position: absolute;
    z-index: 45;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    display: grid;
    gap: 6px;
    padding: 8px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(2, 6, 23, 0.98);
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.55);
}

.xqb-strategy-picker-menu[hidden] {
    display: none !important;
}

.xqb-strategy-picker-saveas {
    width: 100%;
    border: 1px solid rgba(56, 189, 248, 0.45);
    background: rgba(8, 47, 73, 0.42);
    color: #bae6fd;
    border-radius: 8px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 8px;
    text-align: left;
    cursor: pointer;
}

.xqb-strategy-picker-saveas:hover:not(:disabled) {
    border-color: rgba(56, 189, 248, 0.72);
    background: rgba(8, 47, 73, 0.56);
}

.xqb-strategy-picker-saveas:disabled {
    opacity: 0.58;
    cursor: not-allowed;
}

.xqb-strategy-picker-list {
    display: grid;
    gap: 6px;
    max-height: 220px;
    overflow: auto;
    padding-right: 2px;
}

.xqb-strategy-picker-empty {
    border: 1px dashed rgba(148, 163, 184, 0.32);
    border-radius: 8px;
    padding: 8px;
    font-size: 11px;
    color: rgba(186, 230, 253, 0.9);
}

.xqb-strategy-picker-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    align-items: center;
}

.xqb-strategy-picker-item--saveas {
    grid-template-columns: minmax(0, 1fr);
}

.xqb-strategy-picker-item.is-active .xqb-strategy-picker-item-main {
    border-color: rgba(56, 189, 248, 0.74);
    background: rgba(8, 47, 73, 0.58);
    color: #bae6fd;
}

.xqb-strategy-picker-item-main {
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.7);
    color: rgba(226, 232, 240, 0.95);
    border-radius: 8px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 12px;
    line-height: 1.2;
    padding: 6px 8px;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.xqb-strategy-picker-item-main:hover:not(:disabled) {
    border-color: rgba(125, 211, 252, 0.58);
}

.xqb-strategy-picker-item-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.xqb-strategy-picker-item-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.78);
    color: #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
}

.xqb-strategy-picker-item-btn--save:hover:not(:disabled) {
    border-color: rgba(56, 189, 248, 0.72);
    background: rgba(8, 47, 73, 0.56);
}

.xqb-strategy-picker-item-btn--delete {
    border-color: rgba(239, 68, 68, 0.45);
    background: rgba(127, 29, 29, 0.32);
    color: #fecaca;
}

.xqb-strategy-picker-item-btn--delete:hover:not(:disabled) {
    border-color: rgba(248, 113, 113, 0.8);
    background: rgba(127, 29, 29, 0.52);
}

.xqb-strategy-picker-item-main:disabled,
.xqb-strategy-picker-item-btn:disabled {
    opacity: 0.58;
    cursor: not-allowed;
}

.xqb-strategy-modal {
    position: fixed;
    inset: 0;
    z-index: 10040;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.xqb-strategy-modal[hidden] {
    display: none !important;
}

.xqb-strategy-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.78);
}

.xqb-strategy-modal-card {
    position: relative;
    z-index: 1;
    width: min(420px, calc(100vw - 32px));
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 12px;
    background: linear-gradient(160deg, rgba(8, 12, 24, 0.98), rgba(3, 7, 17, 0.98));
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.55);
    padding: 12px;
    display: grid;
    gap: 10px;
}

.xqb-strategy-modal-title {
    font-size: 14px;
    font-weight: 700;
    color: #dbeafe;
}

.xqb-confirm-modal-message {
    font-size: 12px;
    color: rgba(226, 232, 240, 0.9);
    line-height: 1.35;
}

.xqb-strategy-modal-actions {
    display: inline-flex;
    justify-content: flex-end;
    gap: 6px;
}

.deriv-strategy-share-modal-card {
    width: min(440px, calc(100vw - 32px));
}

.deriv-strategy-share-modal__section {
    display: grid;
    gap: 8px;
}

.deriv-strategy-settings-modal-card {
    width: min(760px, calc(100vw - 32px));
    max-height: min(88vh, 860px);
    overflow: auto;
}

.deriv-strategy-settings-modal__fields {
    display: grid;
    gap: 12px;
}

.deriv-strategy-settings-modal__group {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.03);
}

.deriv-strategy-settings-modal__group-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #7dd3fc;
}

.deriv-strategy-settings-modal__group-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
}

.deriv-strategy-settings-modal__field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.deriv-strategy-settings-modal__field.is-full-width {
    grid-column: 1 / -1;
}

.deriv-strategy-settings-modal__field-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.deriv-strategy-settings-modal__label {
    font-size: 12px;
    font-weight: 600;
    color: #e2e8f0;
}

.deriv-strategy-settings-modal__type {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(148, 163, 184, 0.95);
}

.deriv-strategy-settings-modal__hint {
    font-size: 11px;
    line-height: 1.35;
    color: rgba(148, 163, 184, 0.95);
}

.deriv-strategy-settings-modal__input,
.deriv-strategy-settings-modal__select {
    width: 100%;
    min-height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.88);
    color: #f8fafc;
    padding: 9px 12px;
    font-size: 13px;
    outline: none;
}

.deriv-strategy-settings-modal__input[type="color"] {
    padding: 4px 6px;
    min-height: 40px;
}

.deriv-strategy-settings-modal__input:focus,
.deriv-strategy-settings-modal__select:focus {
    border-color: rgba(56, 189, 248, 0.55);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.14);
}

.deriv-strategy-settings-modal__checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 0 2px;
    color: #f8fafc;
    font-size: 13px;
}

.deriv-strategy-settings-modal__checkbox input {
    width: 16px;
    height: 16px;
}

.deriv-strategy-settings-modal__empty {
    font-size: 12px;
    line-height: 1.4;
    color: rgba(148, 163, 184, 0.95);
    padding: 8px 2px 2px;
}

@media (max-width: 720px) {
    .deriv-strategy-settings-modal-card {
        width: min(96vw, calc(100vw - 16px));
    }

    .deriv-strategy-settings-modal__group-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.deriv-strategy-share-modal__all-btn {
    min-height: 42px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(255, 255, 255, 0.04);
    color: #e2e8f0;
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.18s ease;
}

.deriv-strategy-share-modal__all-btn.is-active {
    border-color: rgba(255, 145, 77, 0.42);
    background: rgba(255, 145, 77, 0.16);
    color: #ffb84d;
    box-shadow: inset 0 0 0 1px rgba(255, 145, 77, 0.12);
}

.deriv-strategy-share-modal__divider {
    font-size: 11px;
    color: rgba(148, 163, 184, 0.88);
}

.deriv-strategy-share-modal__label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(226, 232, 240, 0.92);
}

.deriv-strategy-share-modal__input {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(255, 255, 255, 0.04);
    color: #e2e8f0;
    padding: 0 12px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    outline: none;
    transition: 0.18s ease;
}

.deriv-strategy-share-modal__email-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 8px;
    align-items: center;
}

.deriv-strategy-share-modal__add-btn {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(255, 255, 255, 0.04);
    color: #ffb84d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.18s ease;
}

.deriv-strategy-share-modal__add-btn .material-icons {
    font-size: 18px;
}

.deriv-strategy-share-modal__add-btn:hover {
    border-color: rgba(255, 145, 77, 0.4);
    background: rgba(255, 145, 77, 0.12);
}

.deriv-strategy-share-modal__input:focus {
    border-color: rgba(255, 145, 77, 0.42);
    box-shadow: 0 0 0 3px rgba(255, 145, 77, 0.14);
}

.deriv-strategy-share-modal__hint {
    font-size: 11px;
    line-height: 1.35;
    color: rgba(148, 163, 184, 0.9);
}

.deriv-strategy-share-modal__email-list {
    display: grid;
    gap: 6px;
}

.deriv-strategy-share-modal__email-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.deriv-strategy-share-modal__email-chip-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #e2e8f0;
    font-size: 12px;
}

.deriv-strategy-share-modal__email-chip-remove {
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.12);
    color: #ff7b7b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.18s ease;
}

.deriv-strategy-share-modal__email-chip-remove:hover {
    background: rgba(239, 68, 68, 0.22);
}

.xqb-inspector-tab-panel[data-tab-panel="builder"] .xqb-status {
    margin-left: 0;
    margin-top: 2px;
    width: 100%;
    justify-content: flex-start;
}

.xqb-hover-info {
    position: fixed;
    max-width: 260px;
    padding: 6px 8px;
    border: 1px solid rgba(56, 189, 248, 0.55);
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.96);
    color: #e2e8f0;
    font-size: 10px;
    line-height: 1.25;
    pointer-events: none;
    z-index: 99999;
    white-space: pre-line;
    opacity: 0;
    transform: translateY(2px);
    transition: opacity 0.08s ease, transform 0.08s ease;
    box-shadow: 0 8px 22px rgba(2, 6, 23, 0.55);
}

.xqb-hover-info.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.xqb-inspector-tab-panel.is-active::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

.xqb-inspector-tab-panel.is-active::-webkit-scrollbar-track,
.xqb-inspector-tab-panel.is-active::-webkit-scrollbar-corner {
    background: transparent;
}

.xqb-inspector-tab-panel.is-active::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.45);
    border-radius: 999px;
}

.xqb-inspector-tab-panel.is-active::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.62);
}

.xqb-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 10px;
    letter-spacing: 0.4px;
    color: #bae6fd;
    background: rgba(56, 189, 248, 0.12);
    text-transform: uppercase;
    font-weight: 700;
}

.xqb-inspector-debug {
    margin-top: 8px;
    border: 1px dashed rgba(56, 189, 248, 0.35);
    border-radius: 8px;
    padding: 6px;
    display: grid;
    gap: 4px;
    background: rgba(8, 47, 73, 0.2);
}

.xqb-inspector-debug-head {
    font-size: 10px;
    color: #bae6fd;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    font-weight: 700;
}

.xqb-debug-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 10px;
}

.xqb-debug-key {
    color: rgba(148, 163, 184, 0.95);
}

.xqb-debug-value {
    color: #e2e8f0;
    font-weight: 600;
    text-align: right;
}

.xqb-inspector-empty {
    font-size: 11px;
    color: rgba(148, 163, 184, 0.95);
    border: 1px dashed rgba(148, 163, 184, 0.35);
    border-radius: 8px;
    padding: 8px;
}

.xqb-form-grid {
    display: grid;
    gap: 6px;
}

.xqb-field {
    display: grid;
    gap: 3px;
}

.xqb-inline-row {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: wrap;
}

.xqb-mini-input {
    min-width: 142px;
    max-width: 164px;
}

.xqb-backtest-controls {
    display: grid;
    gap: 6px;
}

.xqb-backtest-range-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.xqb-backtest-range-row .xqb-mini-input {
    width: 100%;
    min-width: 0;
    max-width: none;
}

.xqb-backtest-actions-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.xqb-backtest-actions-row .xqb-btn {
    width: 100%;
}

.xqb-field label {
    font-size: 10px;
    color: rgba(186, 230, 253, 0.95);
    letter-spacing: 0.2px;
}

.xqb-field input,
.xqb-field select,
.xqb-textarea {
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 7px;
    color: #e2e8f0;
    font-size: 11px;
    font-family: 'Rajdhani', sans-serif;
    padding: 5px 7px;
    outline: none;
}

.xqb-field input:focus,
.xqb-field select:focus,
.xqb-textarea:focus {
    border-color: rgba(56, 189, 248, 0.65);
}

.xqb-textarea {
    resize: vertical;
    min-height: 90px;
}

.xqb-json-preview {
    min-height: 86px;
    max-height: 130px;
}

.xqb-run-output {
    min-height: 86px;
    max-height: 140px;
}

.xqb-code-preview {
    min-height: 100px;
    max-height: 170px;
    font-family: 'Fira Code', 'JetBrains Mono', monospace;
    font-size: 10px;
}

.xqb-backtest-results {
    display: grid;
    gap: 6px;
}

.xqb-backtest-empty {
    border: 1px dashed rgba(148, 163, 184, 0.35);
    border-radius: 8px;
    padding: 8px 9px;
    font-size: 10px;
    color: rgba(186, 230, 253, 0.92);
    background: rgba(15, 23, 42, 0.44);
    line-height: 1.25;
}

.xqb-backtest-summary {
    display: grid;
    gap: 7px;
}

.xqb-backtest-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.xqb-backtest-metric {
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.62);
    padding: 5px 7px;
    display: grid;
    gap: 2px;
}

.xqb-backtest-metric-label {
    font-size: 9px;
    color: rgba(148, 163, 184, 0.98);
    letter-spacing: 0.2px;
}

.xqb-backtest-metric-value {
    font-size: 12px;
    color: #e2e8f0;
    line-height: 1.05;
}

.xqb-backtest-table-wrap {
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.55);
}

.xqb-backtest-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.xqb-backtest-table th,
.xqb-backtest-table td {
    font-size: 10px;
    padding: 5px 7px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.xqb-backtest-table th {
    width: 42%;
    text-align: left;
    color: rgba(148, 163, 184, 0.98);
    font-weight: 700;
    background: rgba(8, 47, 73, 0.26);
}

.xqb-backtest-table td {
    color: #e2e8f0;
    word-break: break-word;
}

.xqb-backtest-table tr:last-child th,
.xqb-backtest-table tr:last-child td {
    border-bottom: 0;
}

.xqb-legend {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 9px;
}

.xqb-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: rgba(203, 213, 225, 0.95);
}

.xqb-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    display: inline-block;
}

.xqb-dot.event { background: rgba(245, 158, 11, 0.8); }
.xqb-dot.number { background: rgba(56, 189, 248, 0.85); }
.xqb-dot.bool { background: rgba(34, 197, 94, 0.85); }
.xqb-dot.action { background: rgba(239, 68, 68, 0.85); }

.xqb-roadmap-note {
    margin-top: 2px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px dashed rgba(148, 163, 184, 0.35);
    color: rgba(186, 230, 253, 0.9);
    font-size: 12px;
    background: rgba(15, 23, 42, 0.48);
}

@media (max-width: 1600px) {
    .xqb-shell {
        grid-template-columns: 180px minmax(0, 1fr) 230px;
    }
}

@media (max-width: 1280px) {
    .xqb-shell {
        grid-template-columns: 170px minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr) auto;
    }

    .xqb-inspector-panel {
        grid-column: 1 / -1;
    }

}

@media (max-width: 980px) {
    .xqb-workbench {
        padding: 6px;
        border-radius: 12px;
        height: 100%;
        min-height: 0;
    }

    .xqb-shell {
        position: relative;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr);
        gap: 0;
        min-height: 0;
        height: 100%;
    }

    .xqb-workbench.is-palette-hidden .xqb-shell,
    .xqb-workbench.is-inspector-hidden .xqb-shell,
    .xqb-workbench.is-palette-hidden.is-inspector-hidden .xqb-shell {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr);
    }

    .xqb-canvas-panel {
        position: relative;
        z-index: 1;
        min-height: 0;
        height: 100%;
    }

    .xqb-canvas-panel .xqb-panel-body {
        padding: 0;
        min-height: 0;
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .xqb-canvas-wrap {
        min-height: 0;
        height: 100%;
        padding-bottom: 58px;
    }

    .xqb-canvas-viewport {
        height: 100%;
        min-height: 100%;
        border-radius: 10px;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x pan-y;
        overscroll-behavior: contain;
    }

    .xqb-palette-panel,
    .xqb-inspector-panel {
        position: absolute;
        top: 8px;
        bottom: 62px;
        width: min(88vw, 340px);
        max-width: 340px;
        z-index: 32;
        border-radius: 12px;
        background: rgba(2, 6, 23, 0.96);
        box-shadow: 0 18px 34px rgba(2, 6, 23, 0.46);
    }

    .xqb-palette-panel {
        left: 8px;
        transition: transform 0.22s ease, opacity 0.18s ease;
    }

    .xqb-inspector-panel {
        right: 8px;
        transition: transform 0.22s ease, opacity 0.18s ease;
    }

    .xqb-palette-panel .xqb-panel-head,
    .xqb-inspector-panel .xqb-panel-head {
        padding: 8px 10px;
        font-size: 12px;
    }

    .xqb-palette-panel .xqb-panel-icon-btn,
    .xqb-inspector-panel .xqb-panel-icon-btn {
        display: none;
    }

    .xqb-palette-panel .xqb-panel-body,
    .xqb-inspector-panel .xqb-panel-body {
        max-height: none;
        overflow: auto;
        padding: 8px;
    }

    .xqb-palette-panel .xqb-panel-body {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .xqb-workbench.is-palette-hidden .xqb-palette-panel .xqb-panel-body {
        display: flex;
    }

    .xqb-workbench.is-inspector-hidden .xqb-inspector-panel .xqb-panel-body {
        display: block;
    }

    .xqb-workbench.is-palette-hidden .xqb-palette-panel .xqb-panel-title,
    .xqb-workbench.is-palette-hidden .xqb-palette-panel #xqbPaletteCount,
    .xqb-workbench.is-inspector-hidden .xqb-inspector-panel .xqb-panel-title {
        display: inline-flex;
    }

    .xqb-workbench.is-palette-hidden .xqb-palette-panel {
        transform: translateX(calc(-100% - 16px));
        opacity: 0;
        pointer-events: none;
    }

    .xqb-workbench.is-inspector-hidden .xqb-inspector-panel {
        transform: translateX(calc(100% + 16px));
        opacity: 0;
        pointer-events: none;
    }

    .xqb-mobile-scrim {
        position: absolute;
        inset: 0;
        z-index: 24;
        background: rgba(2, 6, 23, 0.45);
        backdrop-filter: blur(1px);
    }

    .xqb-mobile-scrim[hidden] {
        display: none !important;
    }

    .xqb-mobile-dock {
        position: absolute;
        left: 10px;
        right: 10px;
        bottom: 10px;
        z-index: 40;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        padding: 7px;
        border: 1px solid rgba(148, 163, 184, 0.34);
        border-radius: 12px;
        background: rgba(2, 6, 23, 0.9);
        box-shadow: 0 10px 28px rgba(2, 6, 23, 0.46);
    }

    .xqb-mobile-dock[hidden] {
        display: none !important;
    }

    .xqb-template-select {
        min-width: 0;
        flex: 1 1 200px;
    }

    .xqb-strategy-picker-menu {
        position: static;
        margin-top: 6px;
    }

    .xqb-snapshot-select {
        min-width: 0;
        flex: 1 1 220px;
    }

    .xqb-mini-input {
        min-width: 0;
        max-width: none;
        flex: 1 1 48%;
    }

    .xqb-inline-row .xqb-btn {
        width: 100%;
    }

    .xqb-board {
        width: 100%;
        height: 100%;
    }

    .xqb-status {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
    }

    .xqb-node {
        width: 312px;
        border-radius: 12px;
    }

    .xqb-node.is-mobile-geared {
        --xqb-mobile-node-radius: 16px;
        --xqb-mobile-tab-depth: 20px;
        border: none;
        border-left: none;
        border-radius: var(--xqb-mobile-node-radius);
        background: transparent;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.34);
    }

    .xqb-node.is-mobile-geared.is-selected {
        box-shadow: 0 0 0 2px rgba(255, 145, 77, 0.26), 0 10px 26px rgba(0, 0, 0, 0.42);
    }

    .xqb-node.is-mobile-geared .xqb-node-svg-shell {
        position: absolute;
        left: 0;
        top: 0;
        pointer-events: none;
        overflow: visible;
        z-index: 1;
    }

    .xqb-node.is-mobile-geared .xqb-node-svg-path {
        stroke: var(--xqb-mobile-notch-border, rgba(148, 163, 184, 0.42));
        stroke-width: 1.1;
        vector-effect: non-scaling-stroke;
    }

    .xqb-node.is-mobile-geared .xqb-node-head {
        padding-top: 9px;
    }

    .xqb-node.is-mobile-geared.is-mobile-inlet-multi .xqb-node-head {
        padding-top: 14px;
    }

    .xqb-node.is-mobile-geared.is-mobile-inlet-multi .xqb-node-head-main {
        position: relative;
        justify-content: center;
    }

    .xqb-node.is-mobile-geared.is-mobile-inlet-multi .xqb-node-name-row {
        justify-content: center;
        width: 100%;
        padding-right: 18px;
    }

    .xqb-node.is-mobile-geared.is-mobile-inlet-multi .xqb-node-name {
        max-width: 166px;
        text-align: center;
    }

    .xqb-node.is-mobile-geared.is-mobile-inlet-multi .xqb-node-delete {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }

    .xqb-node.is-mobile-geared .xqb-node-body {
        grid-template-columns: 1fr;
        padding: 6px 8px 9px 8px;
    }

    .xqb-node.is-mobile-geared .xqb-port-col,
    .xqb-node.is-mobile-geared .xqb-port-row,
    .xqb-node.is-mobile-geared .xqb-port,
    .xqb-node.is-mobile-geared .xqb-port-label {
        display: none !important;
    }

    .xqb-node-name {
        max-width: 104px;
        font-size: 10px;
    }

    .xqb-node-step-tag {
        font-size: 7px;
        padding: 1px 4px;
    }

    .xqb-node-delete {
        width: 17px;
        height: 17px;
        font-size: 11px;
    }

    .xqb-inline-param-row {
        grid-template-columns: minmax(52px, 0.72fr) minmax(132px, 1.28fr);
        gap: 5px;
    }

    .xqb-inline-param-input {
        font-size: 9.5px;
        padding: 2px 6px;
        height: 22px;
    }

    .xqb-inline-param-label {
        font-size: 8px;
    }

    .xqb-param-help {
        width: 12px;
        height: 12px;
        line-height: 10px;
        font-size: 8px;
    }

    .xqb-indicator-picker-summary {
        font-size: 8.5px;
        height: 18px;
        padding: 2px 19px 2px 6px;
    }

    .xqb-symbol-picker-grid {
        width: max(100%, 224px);
    }

    .xqb-symbol-search-input {
        font-size: 8px;
        height: 20px;
        padding: 2px 5px;
    }

    .xqb-op-controls-label,
    .xqb-op-controls-note {
        font-size: 7px;
    }

    .xqb-op-control-select,
    .xqb-op-control-input,
    .xqb-op-control-picker > .xqb-indicator-picker-summary {
        font-size: 9px;
        height: 22px;
        padding-left: 6px;
        padding-right: 6px;
    }

    .xqb-op-control-select,
    .xqb-op-control-picker > .xqb-indicator-picker-summary {
        padding-right: 19px;
    }

    .xqb-op-controls-row {
        grid-template-columns: minmax(50px, 0.7fr) minmax(128px, 1.3fr);
        gap: 5px;
    }

    .xqb-node-body {
        grid-template-columns: 36px minmax(0, 1fr) 36px;
        gap: 2px;
        padding: 4px 6px 6px 6px;
    }

    .xqb-port-row {
        min-height: 20px;
        gap: 3px;
        max-width: 50px;
    }

    .xqb-port-label {
        max-width: 32px;
        font-size: 8px;
    }

    .xqb-port-col.inputs {
        margin-left: -2px;
    }

    .xqb-port-col.outputs {
        margin-right: -2px;
    }

    .xqb-port {
        width: 14px;
        height: 11px;
    }

    .xqb-port[data-direction="output"]::after,
    .xqb-port[data-direction="input"]::before {
        width: 7px;
        height: 6px;
    }

    .xqb-step-lanes {
        display: none;
        pointer-events: none;
        z-index: 1;
    }

    .xqb-edges {
        display: none;
    }

    .xqb-workbench:not(.is-mobile) .xqb-edges {
        display: block;
    }

    .xqb-step-lane--mobile-base {
        border: none;
        background: transparent;
        box-shadow: none;
        cursor: default;
        pointer-events: none;
    }

    .xqb-step-base-head {
        position: absolute;
        left: 10px;
        right: 10px;
        top: 6px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    .xqb-step-base-title {
        font-size: 11px;
        color: rgba(239, 246, 255, 0.94);
        line-height: 1.1;
        letter-spacing: 0.1px;
        font-weight: 700;
    }

    .xqb-step-base-status {
        font-size: 9px;
        color: rgba(186, 230, 253, 0.82);
        white-space: nowrap;
        letter-spacing: 0.1px;
    }

    .xqb-step-base-slot {
        position: absolute;
        left: 10px;
        right: 10px;
        top: 40px;
        height: 14px;
        border-radius: 8px;
        border: none;
        background: transparent;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        color: rgba(226, 232, 240, 0.92);
        overflow: visible;
    }

    .xqb-step-base-slot.has-top-notch::before {
        content: '';
        position: absolute;
        left: 50%;
        top: -1px;
        width: 52px;
        height: 12px;
        margin-left: -26px;
        border-radius: 0 0 9px 9px;
        background: rgba(2, 6, 23, 0.96);
        border-left: 1px solid var(--xqb-step-border, rgba(148, 163, 184, 0.42));
        border-right: 1px solid var(--xqb-step-border, rgba(148, 163, 184, 0.42));
        border-bottom: 1px solid var(--xqb-step-border, rgba(148, 163, 184, 0.42));
        box-shadow: 0 2px 6px rgba(2, 6, 23, 0.34);
    }

    .xqb-step-base-slot.has-bottom-notch::after {
        content: '';
        position: absolute;
        left: 50%;
        bottom: -12px;
        width: 52px;
        height: 12px;
        margin-left: -26px;
        border-radius: 0 0 9px 9px;
        background: var(--xqb-step-accent, #38bdf8);
        border-left: 1px solid var(--xqb-step-border, rgba(148, 163, 184, 0.42));
        border-right: 1px solid var(--xqb-step-border, rgba(148, 163, 184, 0.42));
        border-bottom: 1px solid var(--xqb-step-border, rgba(148, 163, 184, 0.42));
        box-shadow: 0 2px 6px rgba(2, 6, 23, 0.34);
    }

    .xqb-step-base-slot-text {
        font-size: 9.5px;
        letter-spacing: 0.1px;
        color: rgba(226, 232, 240, 0.86);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .xqb-step-lane--mobile-base.is-active .xqb-step-base-slot {
        box-shadow: none;
    }

    .xqb-step-lane--mobile-base.is-empty .xqb-step-base-slot-text {
        color: rgba(186, 230, 253, 0.78);
    }

    .xqb-node-step-tag {
        display: none;
    }

    .xqb-node.is-mobile-geared::before,
    .xqb-node.is-mobile-geared::after {
        content: none;
        display: none;
    }

    .xqb-mobile-notch-strip {
        position: absolute;
        left: 0;
        right: 0;
        height: 0;
        pointer-events: none;
        z-index: 3;
    }

    .xqb-mobile-notch-strip--top {
        top: 0;
    }

    .xqb-mobile-notch-strip--bottom {
        top: 100%;
    }

    .xqb-mobile-kind-notch {
        position: absolute;
        top: 0;
        width: 60px;
        height: 20px;
        margin-left: -30px;
        padding: 0 7px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 7px;
        letter-spacing: 0.2px;
        text-transform: uppercase;
        font-weight: 700;
        border: 1px solid rgba(148, 163, 184, 0.42);
    }

    .xqb-mobile-notch-strip--top .xqb-mobile-kind-notch {
        height: 24px;
        border-radius: 0 0 var(--xqb-mobile-node-radius, 16px) var(--xqb-mobile-node-radius, 16px);
        border-top: none;
        background: rgba(2, 6, 23, 0.96);
        box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.1);
        color: transparent !important;
        text-shadow: none !important;
    }

    .xqb-mobile-notch-strip--bottom .xqb-mobile-kind-notch {
        border-radius: 0 0 var(--xqb-mobile-node-radius, 16px) var(--xqb-mobile-node-radius, 16px);
        border-top: none;
        box-shadow: 0 2px 6px rgba(2, 6, 23, 0.34);
    }

    /* IF (condition_*): slightly lower than base */
    .xqb-node.is-mobile-geared[data-node-type^="condition_"] .xqb-mobile-notch-strip--bottom {
        top: calc(100% + 10px);
    }

    .xqb-node.is-mobile-geared[data-node-type^="condition_"] .xqb-mobile-notch-strip--bottom .xqb-mobile-kind-notch {
        transform: translateY(8px);
        align-items: flex-end;
        padding-bottom: 2px;
    }

    /* AND / OR / NOT (logic_*): noticeably lower */
    .xqb-node.is-mobile-geared[data-node-type^="logic_"] .xqb-mobile-notch-strip--bottom {
        top: calc(100% + 15px);
    }

    .xqb-node.is-mobile-geared[data-node-type^="logic_"] .xqb-mobile-notch-strip--bottom .xqb-mobile-kind-notch {
        transform: translateY(13px);
        align-items: flex-end;
        padding-bottom: 3px;
    }

    .xqb-mobile-kind-notch.is-flow {
        background: rgba(245, 158, 11, 0.26);
        color: #fde68a;
        border-color: rgba(245, 158, 11, 0.62);
    }

    .xqb-mobile-kind-notch.is-data {
        background: rgba(56, 189, 248, 0.22);
        color: #bae6fd;
        border-color: rgba(56, 189, 248, 0.6);
    }

    .xqb-mobile-kind-notch.is-signal {
        background: rgba(34, 197, 94, 0.24);
        color: #bbf7d0;
        border-color: rgba(34, 197, 94, 0.56);
    }

    .xqb-mobile-kind-notch.is-action {
        background: rgba(239, 68, 68, 0.22);
        color: #fecaca;
        border-color: rgba(239, 68, 68, 0.56);
    }

    .xqb-mobile-notch-strip--top .xqb-mobile-kind-notch.is-flow {
        background: rgba(245, 158, 11, 0.14);
    }

    .xqb-mobile-notch-strip--top .xqb-mobile-kind-notch.is-data {
        background: rgba(56, 189, 248, 0.14);
    }

    .xqb-mobile-notch-strip--top .xqb-mobile-kind-notch.is-signal {
        background: rgba(34, 197, 94, 0.14);
    }

    .xqb-mobile-notch-strip--top .xqb-mobile-kind-notch.is-action {
        background: rgba(239, 68, 68, 0.14);
    }

    /* Keep top sockets colorized but label-less; when connected just strengthen edge cue. */
    .xqb-mobile-notch-strip--top .xqb-mobile-kind-notch.is-connected {
        color: transparent !important;
        border-color: var(--xqb-mobile-notch-border, rgba(148, 163, 184, 0.42)) !important;
        box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.16), 0 0 0 1px rgba(255, 255, 255, 0.03);
        text-shadow: none !important;
    }

    .xqb-node.is-mobile-geared .xqb-node-head,
    .xqb-node.is-mobile-geared .xqb-node-body {
        position: relative;
        z-index: 2;
        background: transparent;
    }

    .xqb-node.is-mobile-geared .xqb-node-head {
        border-bottom-color: rgba(148, 163, 184, 0.24);
    }

    .xqb-node.is-mobile-geared .xqb-node-inline-params {
        background: linear-gradient(180deg, rgba(8, 13, 24, 0.62), rgba(8, 13, 24, 0.26));
        border-color: rgba(148, 163, 184, 0.26);
    }

    .xqb-node.is-mobile-geared[data-node-type="operation_setup"] .xqb-inline-param-row--picker {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .xqb-node.is-mobile-geared[data-node-type="operation_setup"] .xqb-inline-param-row--picker > .xqb-inline-param-label[for$="-symbol"],
    .xqb-node.is-mobile-geared[data-node-type="operation_setup"] .xqb-inline-param-row--picker > .xqb-inline-param-label[for$="-operation-controls"] {
        display: none;
    }

    .xqb-node.is-mobile-geared[data-node-type="operation_setup"] .xqb-inline-param-row--picker > .xqb-indicator-picker,
    .xqb-node.is-mobile-geared[data-node-type="operation_setup"] .xqb-inline-param-row--picker > [id$="-operation-controls"] {
        width: 100%;
    }

    .xqb-node.is-mobile-geared[data-node-type="operation_setup"] .xqb-indicator-picker-summary {
        text-align: center;
    }

    .xqb-node.is-mobile-geared[data-node-type="operation_setup"] .xqb-op-controls-row {
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 2px;
    }

    .xqb-node.is-mobile-geared[data-node-type="operation_setup"] .xqb-op-controls-label {
        font-size: 8px;
        white-space: normal;
    }

    .xqb-node-head,
    .xqb-port {
        touch-action: none;
    }

    .xqb-step-lanes,
    .xqb-step-lane,
    .xqb-step-lane-head {
        touch-action: pan-x pan-y;
    }
}

.cz-journal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 6000;
}

#chartZellaModal .cz-journal {
    background: rgba(3, 8, 18, 0.42);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.cz-journal-inner {
    width: 1120px;
    max-width: 92vw;
    max-height: 88vh;
    background: linear-gradient(180deg, rgba(13,17,29,0.9) 0%, rgba(8,12,24,0.96) 100%);
    border: 1px solid rgba(255,145,77,0.35);
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.45);
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-family: 'Rajdhani', sans-serif;
    overflow: auto;
}

#chartZellaModal .cz-journal-inner {
    background: rgba(10, 14, 24, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42), 0 0 42px rgba(255, 145, 77, 0.08);
    backdrop-filter: blur(18px) saturate(1.12);
    -webkit-backdrop-filter: blur(18px) saturate(1.12);
}

#chartZellaModal .cz-journal-close,
#chartZellaModal .cz-journal-save {
    box-shadow: none;
}

#chartZellaModal .cz-journal-filter select:focus,
#chartZellaModal .cz-journal-notes textarea:focus {
    outline: none;
    border-color: rgba(255, 145, 77, 0.42);
    box-shadow: 0 0 0 2px rgba(255, 145, 77, 0.12);
}

#chartZellaModal .cz-journal-inner::-webkit-scrollbar,
#chartZellaModal .cz-journal-list::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#chartZellaModal .cz-journal-inner::-webkit-scrollbar-track,
#chartZellaModal .cz-journal-list::-webkit-scrollbar-track {
    background: transparent;
}

#chartZellaModal .cz-journal-inner::-webkit-scrollbar-thumb,
#chartZellaModal .cz-journal-list::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.2);
    border-radius: 999px;
}

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

.cz-journal-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
}

.cz-journal-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.cz-journal-filter {
    display: grid;
    gap: 6px;
}

.cz-journal-filter span {
    color: rgba(255, 176, 122, 0.9);
    font-size: 11px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    font-weight: 700;
}

.cz-journal-filter select {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255,145,77,0.35);
    border-radius: 9px;
    color: #e2e8f0;
    padding: 7px 9px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
}

.cz-mini-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,145,77,0.25);
    border-radius: 10px;
    padding: 10px 12px;
    box-shadow: inset 0 0 12px rgba(0,0,0,0.28);
    display: grid;
    gap: 4px;
    text-align: center;
}

.cz-mini-title {
    font-size: 11px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #ff914d;
    font-weight: 700;
}

.cz-mini-value {
    font-size: 16px;
    font-weight: 800;
    color: #e2e8f0;
    line-height: 1.2;
}

.cz-mini-bar {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
}

.cz-mini-bar div {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #3b82f6, #4fb5ff);
}

.cz-journal-label {
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #ffb07a;
    font-weight: 700;
}

.cz-journal-date {
    font-size: 16px;
    color: #e2e8f0;
    font-weight: 700;
}

.cz-journal-close {
    background: rgba(255,145,77,0.18);
    border: 1px solid rgba(255,145,77,0.4);
    color: #ffb07a;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-weight: 700;
}

.cz-journal-body {
    display: grid;
    grid-template-columns: 1.3fr 0.9fr;
    gap: 14px;
}

.cz-journal-charts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.cz-journal-chart-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,145,77,0.25);
    border-radius: 12px;
    padding: 10px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.24);
}

.cz-journal-canvas {
    width: 100%;
    height: 110px;
    display: block;
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.08));
}

.cz-journal-trades, .cz-journal-notes {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,145,77,0.25);
    border-radius: 12px;
    padding: 12px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.28);
}

.cz-journal-subtitle {
    color: #ffb07a;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 8px;
}

#czJournalFilteredCount {
    font-size: 12px;
    color: rgba(226,232,240,0.75);
    margin-left: 4px;
}

.cz-journal-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 320px;
    overflow: auto;
}

.cz-journal-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 8px 10px;
}

.cz-journal-row {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    color: #e2e8f0;
}

.cz-journal-symbol { color: #ffb07a; }
.cz-journal-pnl.positive { color: #4fb5ff; }
.cz-journal-pnl.negative { color: #ff6b6b; }

.cz-journal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: rgba(226,232,240,0.7);
    font-size: 11px;
    margin-top: 4px;
}

.cz-journal-empty {
    color: rgba(226,232,240,0.7);
    font-size: 12px;
}

.cz-journal-notes textarea {
    width: 100%;
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,145,77,0.35);
    border-radius: 10px;
    color: #e2e8f0;
    padding: 10px;
    font-family: 'Rajdhani', sans-serif;
    min-height: 200px;
    resize: vertical;
}

.cz-journal-save {
    margin-top: 10px;
    background: linear-gradient(90deg, rgba(255,145,77,0.35), rgba(69,153,217,0.35));
    border: 1px solid rgba(255,145,77,0.45);
    color: #fff;
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 700;
    width: 100%;
}

@media (max-width: 1050px) {
    .cz-journal-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cz-journal-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: none;
    }

    .cz-journal-charts {
        grid-template-columns: 1fr;
    }

    .cz-journal-body {
        grid-template-columns: 1fr;
    }
}


.cz-logo-row {
    display: none;
}

.cz-left {
    grid-column: 1;
    grid-row: 3;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: auto;
    padding-right: 4px;
}

.cz-main {
    grid-column: 2;
    grid-row: 3;
    display: grid;
    grid-template-rows: 1fr;
    gap: 10px;
    overflow: hidden;
}

.cz-right {
    grid-column: 3;
    grid-row: 3;
    overflow: auto;
}

.cz-kpi-row {
    grid-column: 1 / span 3;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.cz-bottom {
    grid-column: 1 / span 3;
    grid-row: 4;
}

.cz-kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.cz-top-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    width: 100%;
}

.cz-range-bar {
    display: grid;
    grid-template-columns: minmax(180px, 1.2fr) repeat(2, minmax(170px, 1fr)) auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(12, 18, 35, 0.82) 0%, rgba(8, 12, 24, 0.9) 100%);
    border: 1px solid rgba(255, 145, 77, 0.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    position: relative;
    z-index: 1;
}

.cz-range-title {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.cz-range-title__label {
    color: #ffb07a;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.cz-range-title__value {
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cz-range-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.cz-range-field span {
    color: rgba(226, 232, 240, 0.82);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.cz-range-field input {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    outline: none;
}

.cz-range-field input:focus {
    border-color: rgba(255, 145, 77, 0.42);
    box-shadow: 0 0 0 2px rgba(255, 145, 77, 0.12);
}

.cz-range-apply {
    height: 38px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 145, 77, 0.34);
    background: rgba(255, 145, 77, 0.16);
    color: #ffcfb3;
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.cz-range-apply:hover {
    background: rgba(255, 145, 77, 0.24);
}

.chartzella-content::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("/assets/chartZella.png") center center / 820px auto no-repeat;
    opacity: 0.16;
    pointer-events: none;
    z-index: 0;
    filter: drop-shadow(0 0 14px rgba(0,0,0,0.4));
}

.cz-debug {
    margin-top: 6px;
    font-size: 11px;
    color: #94b8ff;
    font-family: 'Rajdhani', sans-serif;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    letter-spacing: 0.2px;
}

.cz-top-card {
    background: linear-gradient(180deg, rgba(14, 22, 38, 0.92) 0%, rgba(9, 13, 22, 0.96) 100%);
    border: 1px solid rgba(69, 153, 217, 0.28);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), inset 0 0 14px rgba(69, 153, 217, 0.12);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 82px;
}

.cz-top-card--pnl {
    grid-column: span 2;
    min-width: 260px;
}

.cz-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.cz-card-label {
    color: #ffb07a;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.cz-card-sub {
    color: rgba(232, 241, 255, 0.72);
    font-size: 10px;
}

.cz-card-body {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cz-card-body.align-center {
    justify-content: space-between;
}

.cz-card-value {
    font-size: 22px;
    font-weight: 800;
    color: #34d399;
    font-family: 'Rajdhani', sans-serif;
}

.cz-card-value.is-negative {
    color: #ff6b6b;
}

.cz-card-value.is-positive {
    color: #34d399;
}

.cz-sparkline {
    width: 100%;
    height: 46px;
}

.cz-dial {
    width: 90px;
    height: 50px;
}

.cz-dial svg {
    width: 100%;
    height: 100%;
}

.cz-dial-track {
    fill: none;
    stroke: rgba(255, 145, 77, 0.35);
    stroke-width: 10;
    stroke-linecap: round;
}

.cz-dial-fill {
    fill: none;
    stroke: #55b6ff;
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.25s ease;
}

.cz-bar {
    position: relative;
    display: flex;
    width: 120px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 145, 77, 0.14);
    overflow: hidden;
}

.cz-bar-win {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #3aa0ff, #55d6ff);
}

.cz-bar-loss {
    height: 100%;
    background: rgba(255, 145, 77, 0.85);
}

.cz-kpi {
    background: linear-gradient(180deg, rgba(12, 18, 35, 0.9) 0%, rgba(8, 12, 24, 0.95) 100%);
    border: 1px solid rgba(0, 168, 255, 0.18);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    border-radius: 12px;
    padding: 6px 9px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cz-kpi-title {
    color: #94b8ff;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.cz-kpi-value {
    font-size: 18px;
    font-weight: 800;
    color: #e8f1ff;
}

.cz-kpi-sub {
    font-size: 10px;
    color: rgba(232, 241, 255, 0.65);
}

.cz-gauge {
    position: relative;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.cz-gauge-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #00d2ff, #3a86ff);
}

.cz-spark {
    height: 18px;
    background: radial-gradient(ellipse at center, rgba(0, 168, 255, 0.18), rgba(0, 168, 255, 0));
    border: 1px solid rgba(0, 168, 255, 0.25);
    border-radius: 6px;
}

.cz-main-row {
    display: grid;
    grid-template-columns: 260px 1fr 240px;
    gap: 12px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.cz-charts-section {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.cz-chart-card {
    background: rgba(15, 16, 25, 0.8);
    border: 1px solid rgba(255, 145, 77, 0.25);
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
}

.cz-chart {
    width: 100%;
    height: 180px;
}

.cz-chart-card canvas {
    width: 100% !important;
    height: 180px !important;
    max-height: 180px;
}

.cz-list {
    max-height: 180px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Chartzella: trades history list should show 5 rows and scroll. */
#czMonthTradesList.cz-list {
    --cz-trade-row-height: 34px;
    max-height: calc((var(--cz-trade-row-height) * 5) + (6px * 4));
}

.cz-list-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    font-size: 12px;
    align-items: center;
}
.cz-list-item span { color: #cfd8e3; }
.cz-list-item span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cz-list-item .pnl-pos { color: #34d399; font-weight: 700; }
.cz-list-item .pnl-neg { color: #ff6b6b; font-weight: 700; }
.cz-list-item .pnl-flat { color: #cfd8e3; font-weight: 700; }

.cz-bar-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 160px;
}

.cz-bar {
    width: 14px;
    border-radius: 4px 4px 0 0;
    background: #4fb5ff;
    position: relative;
}

.cz-bar.neg { background: #ff6b6b; }
.cz-bar::after {
    content: attr(data-label);
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: #9fb3c8;
}

.cz-side-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cz-calendar-col {
    background: linear-gradient(180deg, rgba(12, 18, 35, 0.22) 0%, rgba(8, 12, 24, 0.28) 100%);
    border: 1px solid rgba(69, 153, 217, 0.18);
    border-radius: 12px;
    padding: 12px;
    box-shadow: inset 0 0 14px rgba(69, 153, 217, 0.12), 0 8px 24px rgba(0,0,0,0.35);
}

.cz-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    color: #fff;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.cz-cal-title { text-transform: capitalize; }

.cz-cal-nav button {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    border-radius: 6px;
    width: 32px;
    height: 24px;
    cursor: pointer;
    margin-left: 6px;
}

.cz-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-bottom: 6px;
}

.cz-cal-days span {
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.cz-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.cz-day {
    min-height: 84px;
    border-radius: 10px;
    padding: 6px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(69,153,217,0.25);
    box-shadow: inset 0 0 8px rgba(0,0,0,0.35);
    display: grid;
    grid-template-rows: auto auto auto auto;
    gap: 2px;
    color: #e2e8f0;
    font-size: 11px;
    font-family: 'Rajdhani', sans-serif;
}

.cz-day.win { border-color: rgba(79, 181, 255, 0.7); background: linear-gradient(180deg, rgba(0,255,153,0.12), rgba(0,110,255,0.08)); }
.cz-day.loss { border-color: rgba(255, 107, 107, 0.8); background: linear-gradient(180deg, rgba(255,0,0,0.16), rgba(120,0,0,0.06)); }
.cz-day.flat { border-color: rgba(255,255,255,0.12); }
.cz-day.empty { background: transparent; border: none; box-shadow: none; }

.cz-day-date { font-weight: 800; color: #fff; text-align: left; }
.cz-day-pnl { font-weight: 700; }
.cz-day-trades, .cz-day-win { font-size: 10px; color: rgba(226,232,240,0.75); }

.cz-week-row, .cz-week-stat {
    border: 1px solid rgba(69,153,217,0.25);
    border-radius: 10px;
    padding: 10px 12px;
    background: linear-gradient(180deg, rgba(12, 18, 35, 0.85) 0%, rgba(8, 12, 24, 0.95) 100%);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.25);
    color: #e2e8f0;
    font-size: 12px;
    font-family: 'Rajdhani', sans-serif;
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    align-items: center;
    gap: 8px;
}

.cz-week-range { font-weight: 700; }
.cz-week-pct { font-weight: 800; color: #ff914d; }
.cz-week-total { font-weight: 700; color: #4fb5ff; }
.cz-week-trades { font-size: 11px; color: rgba(226,232,240,0.75); }

.cz-weekly-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 4px;
}

.cz-weekly-column .cz-week-row {
    min-height: 92px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 14px;
}

.cz-week-row span {
    display: block;
    letter-spacing: 0.2px;
}

.cz-sidecard {
    background: linear-gradient(180deg, rgba(12, 18, 35, 0.9) 0%, rgba(8, 12, 24, 0.95) 100%);
    border: 1px solid rgba(69, 153, 217, 0.2);
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    font-family: 'Rajdhani', sans-serif;
}

.cz-side-head {
    color: #ffb07a;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.4px;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.cz-week-range,
.cz-cal-title,
.cz-top-card .cz-card-sub,
.cz-weekly-column .cz-week-range,
.cz-cal-days span {
    color: #ffb07a;
}

.cz-donut-small { width: 44px; height: 44px; }

.cz-donut-row.split {
    display: grid;
    grid-template-columns: 44px 1fr 44px 1fr;
    align-items: center;
    gap: 10px 8px;
}

.cz-text {
    color: #e2e8f0;
    font-size: 12px;
    line-height: 1.2;
    font-family: 'Rajdhani', sans-serif;
}

.cz-sidecard,
.cz-weekly {
    background: linear-gradient(180deg, rgba(12, 18, 35, 0.9) 0%, rgba(8, 12, 24, 0.95) 100%);
    border: 1px solid rgba(0, 168, 255, 0.2);
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    margin-bottom: 8px;
}

.cz-weekly h4 {
    margin: 0 0 6px;
    color: #ffb07a;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cz-sidecard h5 {
    margin: 0 0 6px;
    color: #94b8ff;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cz-donut-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cz-donut {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background:
      conic-gradient(var(--donut-color, #00d2ff) calc(var(--donut-pct, 0) * 100%), rgba(255,255,255,0.08) 0);
    display: grid;
    place-items: center;
    box-shadow: inset 0 0 0 3px rgba(0, 168, 255, 0.08);
}

.cz-donut span {
    color: #cfd8e3;
    font-weight: 700;
    font-size: 11px;
}

.cz-sidecard .cz-text {
    color: #cfd8e3;
    font-size: 12px;
    line-height: 1.4;
}

.cz-trades-count { color: #9fb3c8; }
.cz-month-net.pos, .cz-best-net.pos { color: #34d399; font-weight: 800; }
.cz-month-net.neg, .cz-best-net.neg { color: #ff6b6b; font-weight: 800; }
.cz-best-date { color: #cfd8e3; font-size: 12px; }
.cz-best { line-height: 1.5; }

/* Tamaños destacados */
.cz-best-net { font-size: 22px; }
.cz-month-net { font-size: 20px; }
.cz-week-total { font-size: 20px; }
.cz-day-pnl { font-size: 16px; font-weight: 700; }

.cz-grid {
    display: grid;
    gap: 12px;
}

.cz-grid.kpi {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.cz-grid.calendar-row {
    grid-template-columns: 2fr 1fr;
    gap: 14px;
}

.cz-calendar {
    background: rgba(15, 16, 25, 0.9);
    border: 1px solid rgba(255, 145, 77, 0.2);
    border-radius: 12px;
    padding: 12px;
}

.cz-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.cz-cal-title {
    color: #ffe7d6;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.cz-cal-nav button {
    background: rgba(255, 145, 77, 0.15);
    border: 1px solid rgba(255, 145, 77, 0.35);
    color: #ffb07a;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    cursor: pointer;
}

.cz-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.cz-day {
    text-align: center;
    padding: 6px 0;
    border-radius: 6px;
    background: rgba(255,255,255,0.04);
    color: #e2e8f0;
    font-size: 11px;
}

.cz-day.header {
    font-weight: 700;
    color: #ffb07a;
    background: none;
}

.cz-day.win { color: #8cfac1; }
.cz-day.loss { color: #ff7b7b; }
.cz-day.flat { color: #cbd5e1; }

.cz-weekly {
    background: rgba(15, 16, 25, 0.9);
    border: 1px solid rgba(255, 145, 77, 0.2);
    border-radius: 12px;
    padding: 12px;
}

.cz-weekly h4 {
    margin: 0 0 8px;
    color: #ffb07a;
}

.cz-week-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 6px;
    color: #e2e8f0;
    font-size: 13px;
    padding: 6px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.cz-week-row:last-child { border-bottom: none; }

.cz-charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.cz-card {
    background: rgba(15, 16, 25, 0.9);
    border: 1px solid rgba(255, 145, 77, 0.2);
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.cz-card h4 {
    margin: 0 0 6px;
    color: #ffb07a;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.cz-value {
    font-size: 22px;
    font-weight: 800;
    color: #ffe7d6;
}

.cz-sub {
    color: rgba(245, 201, 166, 0.8);
    font-size: 12px;
    margin-top: 2px;
}

.cz-chart {
    height: 260px;
    background: radial-gradient(ellipse at top left, rgba(255,145,77,0.12), transparent 45%), #0f121c;
    border: 1px dashed rgba(255, 145, 77, 0.25);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 233, 218, 0.8);
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
}

.cz-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cz-badge {
    padding: 6px 10px;
    background: rgba(255, 145, 77, 0.12);
    border: 1px solid rgba(255, 145, 77, 0.35);
    border-radius: 999px;
    color: #ffb07a;
    font-size: 12px;
    font-weight: 700;
}

.cz-table {
    width: 100%;
    border-collapse: collapse;
    color: #e2e8f0;
    font-size: 12px;
}

.cz-table th, .cz-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.cz-table th {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffb07a;
    font-weight: 700;
}

.cz-empty {
    text-align: center;
    padding: 16px;
    color: rgba(245, 201, 166, 0.8);
}


.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: 42px;
                height: 36px;
                overflow: hidden;
            }

            .app-logo .app-logo-image {
                width: 130px;
                height: 36px;
                object-fit: cover;
                object-position: left center;
                margin: 0;
                padding: 0;
            }

            .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);
                bottom: 65px;
                height: calc(100dvh - var(--app-topbar-height) - 65px);
                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: row;
                align-items: center;
                gap: 8px;
            }

            #indicatorsMenu .indicators-menu__tools {
                width: 100%;
                min-width: 0;
            }

            #indicatorsMenu .indicators-search {
                width: 100%;
                justify-content: flex-start;
            }

            #indicatorsMenu .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;
        }

        .deriv-panel-header {
            margin-bottom: 12px;
            text-align: center;
        }

        .deriv-panel-title {
            font-family: 'Rajdhani', sans-serif;
            font-size: 17px;
            font-weight: 700;
            color: #f8fafc;
            letter-spacing: 0.2px;
        }

        .deriv-panel-substatus {
            margin-top: 4px;
            font-size: 10px;
            color: #94a3b8;
        }

        .deriv-referral-box {
            background: transparent;
            border: none;
            border-radius: 0;
            padding: 0;
            margin-top: 12px;
        }

        .deriv-referral-desc {
            font-size: 10px !important;
            color: #94a3b8;
            line-height: 1.35;
        }

        .deriv-referral-desc--single {
            text-align: center;
        }

        .deriv-referral-row {
            display: flex;
            gap: 8px;
            margin-top: 8px;
        }

        .deriv-referral-input {
            flex: 1;
            min-width: 0;
            background: rgba(2, 6, 23, 0.88);
            border: 1px solid rgba(51, 65, 85, 0.95);
            color: #e2e8f0;
            padding: 8px 10px;
            border-radius: 9px;
            font-family: 'Rajdhani', sans-serif;
            font-size: 10px !important;
            letter-spacing: 0.1px;
        }

        .deriv-referral-copy-btn {
            width: 32px;
            min-width: 32px;
            height: 32px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(90deg, #ff9a4d, #ff774d);
            border: 1px solid rgba(255, 145, 77, 0.9);
            color: #0b0f1a;
            border-radius: 9px;
            cursor: pointer;
            box-shadow: 0 4px 12px rgba(255, 145, 77, 0.2);
            transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
        }

        .deriv-referral-copy-btn svg {
            width: 14px;
            height: 14px;
            fill: none;
            stroke: currentColor;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        .deriv-referral-copy-btn:hover {
            filter: brightness(1.05);
            box-shadow: 0 6px 16px rgba(255, 145, 77, 0.28);
            transform: translateY(-1px);
        }

        .deriv-referral-copy-btn:disabled {
            opacity: 0.55;
            cursor: not-allowed;
            box-shadow: none;
            transform: none;
        }

        .deriv-referral-status {
            margin-top: 6px;
            font-size: 8px;
            color: #94a3b8;
            text-align: center;
        }

        .deriv-steps--compact {
            gap: 8px;
        }

        .deriv-step {
            position: relative;
            padding: 10px 10px 9px;
            border-radius: 10px;
        }

        .deriv-step--inline .deriv-step-inline-row {
            display: block;
        }

        .deriv-step--inline .deriv-step-header {
            padding-right: 0;
            justify-content: center;
        }

        .deriv-step--inline .deriv-step-actions {
            margin-top: 10px;
            width: 100%;
        }

        .deriv-step-header {
            align-items: center;
            gap: 8px;
            padding-right: 0;
            justify-content: center;
        }

        .deriv-step-indicator {
            width: 20px;
            height: 20px;
            font-size: 10px;
        }

        .deriv-step-title {
            font-size: 11px;
            line-height: 1.1;
        }

        .deriv-step-title--center {
            width: 100%;
            text-align: center;
            font-size: 10px !important;
            color: #cbd5e1;
        }

        .deriv-step-desc {
            margin-top: 2px;
            font-size: 10px;
            line-height: 1.35;
        }

        .deriv-step-badge {
            position: absolute;
            top: 9px;
            right: 10px;
            z-index: 1;
            padding: 2px 7px;
            border-radius: 999px;
            font-size: 9px;
            font-weight: 700;
            color: rgba(226, 232, 240, 0.72);
            background: rgba(15, 23, 42, 0.9);
            border: 1px solid rgba(148, 163, 184, 0.22);
            white-space: nowrap;
            display: none;
        }

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

        .deriv-step-btn {
            min-width: 108px;
            min-height: 32px;
            padding: 6px 10px;
            font-size: 10px;
            border-radius: 8px;
        }

        .deriv-step-btn--lg {
            width: 100%;
            min-height: 48px;
            padding: 10px 18px;
            font-size: 14px;
            border-radius: 10px;
        }

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

        .deriv-mode-btn {
            min-height: 56px;
            width: 88%;
            justify-self: center;
            padding: 0;
            border: none;
            background: transparent;
            box-shadow: none !important;
            outline: none !important;
            border-radius: 0;
            cursor: pointer;
            transition: all 0.18s ease;
        }

        .deriv-mode-btn--lg {
            min-height: 104px;
        }

        .deriv-mode-btn__img {
            display: block;
            width: 100%;
            height: 104px;
            object-fit: fill;
            border-radius: 0;
            filter: none;
            transition: filter 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
        }

        .deriv-mode-btn:hover .deriv-mode-btn__img {
            transform: translateY(-1px);
            filter: drop-shadow(0 0 14px rgba(255, 145, 77, 0.72)) drop-shadow(0 0 22px rgba(255, 145, 77, 0.38));
        }

        .deriv-mode-btn.is-active .deriv-mode-btn__img {
            filter: drop-shadow(0 0 18px rgba(255, 145, 77, 0.9)) drop-shadow(0 0 32px rgba(255, 145, 77, 0.55));
        }

        .deriv-mode-btn:disabled {
            opacity: 0.45;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }

        .deriv-mode-btn:disabled .deriv-mode-btn__img {
            filter: none;
        }

        .deriv-mode-hint {
            margin-top: 6px;
            font-size: 9px;
            color: #94a3b8;
            line-height: 1.35;
            text-align: center;
        }

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

        .deriv-account-card {
            position: relative;
            display: block;
            width: 100%;
            padding: 0;
            border: none;
            background: transparent;
            cursor: pointer;
            appearance: none;
            -webkit-appearance: none;
            box-shadow: none;
            outline: none;
            overflow: visible;
            transition: transform 0.18s ease;
        }

        .deriv-account-card__image {
            display: block;
            width: 100%;
            height: auto;
            border-radius: 16px;
            box-shadow: none !important;
            filter: none;
            transition: filter 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
            pointer-events: none;
        }

        .deriv-account-card__number {
            position: absolute;
            left: 50%;
            top: calc(78% + 15px);
            transform: translate(-50%, -50%);
            width: calc(100% - 24px);
            text-align: center;
            font-family: 'Rajdhani', sans-serif;
            font-size: 18px !important;
            font-weight: 700 !important;
            line-height: 1 !important;
            letter-spacing: 0.04em;
            color: #ffffff;
            text-shadow: 0 2px 12px rgba(0, 0, 0, 0.72);
            pointer-events: none;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .deriv-account-card:hover .deriv-account-card__image {
            transform: translateY(-1px);
            filter: drop-shadow(0 0 18px rgba(255, 145, 77, 0.9)) drop-shadow(0 0 30px rgba(255, 145, 77, 0.55));
        }

        .deriv-account-card.is-active {
            border: none !important;
            outline: none !important;
            box-shadow: none !important;
            background: transparent !important;
        }

        .deriv-account-card.is-active .deriv-account-card__image {
            filter: drop-shadow(0 0 18px var(--deriv-account-glow, rgba(255, 145, 77, 0.9))) drop-shadow(0 0 32px var(--deriv-account-glow, rgba(255, 145, 77, 0.6)));
        }

        .deriv-account-card:focus-visible {
            outline: none;
            box-shadow: none;
        }

        .deriv-account-card:focus-visible .deriv-account-card__image {
            filter: drop-shadow(0 0 18px var(--deriv-account-glow, rgba(255, 145, 77, 0.9))) drop-shadow(0 0 32px var(--deriv-account-glow, rgba(255, 145, 77, 0.6)));
        }

        .deriv-panel-actions {
            margin-top: 12px;
            gap: 6px;
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .deriv-panel-btn {
            min-height: 34px;
            font-size: 10px;
            border-radius: 8px;
        }

        .deriv-panel-logo {
            display: block;
            width: 150px;
            margin: 12px auto 0;
        }

        .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: transparent;
        }

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

        @keyframes strategyPaneAlertBlink {
            0%, 100% {
                border-color: rgba(255, 82, 82, 0.9);
                box-shadow: 0 0 0 rgba(255, 82, 82, 0), 0 0 18px rgba(255, 82, 82, 0.25);
            }
            50% {
                border-color: rgba(255, 214, 102, 0.95);
                box-shadow: 0 0 0 rgba(255, 214, 102, 0), 0 0 26px rgba(255, 82, 82, 0.55);
            }
        }

        .chart-pane.strategy-alert-pending:not(.is-active) {
            animation: strategyPaneAlertBlink 1s ease-in-out infinite;
            background: rgba(255, 82, 82, 0.06);
            border-color: rgba(255, 82, 82, 0.9);
        }

        @keyframes strategyPaneHitPulse {
            0% {
                box-shadow: 0 0 0 rgba(255, 214, 102, 0), 0 0 0 rgba(255, 82, 82, 0);
            }
            35% {
                box-shadow: 0 0 0 1px rgba(255, 214, 102, 0.35), 0 0 24px rgba(255, 82, 82, 0.45);
            }
            100% {
                box-shadow: 0 0 0 rgba(255, 214, 102, 0), 0 0 0 rgba(255, 82, 82, 0);
            }
        }

        /* Short flash for alerts on the active pane (layout=1) */
        .chart-pane.strategy-alert-hit {
            animation: strategyPaneHitPulse 900ms ease-out 1;
        }

        .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.is-active {
            background: rgba(255, 145, 77, 0.18);
            color: #ff914d;
        }

        .favorite-tool-btn.is-active:hover {
            background: rgba(255, 145, 77, 0.24);
            color: #ff914d;
        }

        .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;
            bottom: 65px;
            width: 0;
            height: calc(100% - 36px - 65px);
            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: 1px solid rgba(255, 145, 77, 0.55);
            border-radius: 14px;
            margin-left: 2px;
            outline: none;
        }

        .panel-close-btn {
            width: 28px;
            height: 28px;
            border-radius: 8px;
            border: 1px solid rgba(255, 255, 255, 0.10);
            background: rgba(255, 255, 255, 0.04);
            color: rgba(255, 255, 255, 0.85);
            cursor: pointer;
            font-size: 18px;
            line-height: 1;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: background 0.2s ease, border-color 0.2s ease, transform 0.12s ease;
        }

        .panel-close-btn:hover {
            background: rgba(255, 255, 255, 0.08);
            border-color: rgba(255, 255, 255, 0.18);
            transform: translateY(-1px);
        }

        .analysis-controls {
            display: flex;
            justify-content: center;
            align-items: center;
            flex-wrap: wrap;
            gap: 8px;
            margin: 10px 0 12px;
        }

        .analysis-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            height: 30px;
            padding: 0 8px;
            border-radius: 10px;
            border: 1px solid rgba(255, 255, 255, 0.12);
            background: rgba(255, 255, 255, 0.05);
            color: rgba(255, 255, 255, 0.92);
            cursor: pointer;
            font-family: 'Rajdhani', sans-serif;
            font-weight: 700;
            font-size: 10px;
            transition: background 0.2s ease, border-color 0.2s ease, transform 0.12s ease;
            user-select: none;
            white-space: nowrap;
        }

        .analysis-btn .material-icons {
            font-size: 14px;
        }

        .analysis-btn:hover {
            background: rgba(255, 255, 255, 0.08);
            border-color: rgba(255, 255, 255, 0.20);
            transform: translateY(-1px);
        }

        .analysis-btn--primary {
            border-color: rgba(255, 145, 77, 0.35);
            background: linear-gradient(135deg, rgba(255, 145, 77, 0.22), rgba(255, 145, 77, 0.08));
        }

        .analysis-btn--primary:hover {
            border-color: rgba(255, 145, 77, 0.6);
            background: linear-gradient(135deg, rgba(255, 145, 77, 0.32), rgba(255, 145, 77, 0.10));
        }

        .analysis-btn--ghost {
            background: rgba(255, 255, 255, 0.03);
        }

        .analysis-progress-row {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 6px 8px;
            border: 1px solid rgba(255, 255, 255, 0.10);
            border-radius: 12px;
            background: rgba(2, 6, 23, 0.45);
            margin-bottom: 10px;
        }

        .analysis-spinner {
            width: 16px;
            height: 16px;
            border-radius: 999px;
            border: 2px solid rgba(255, 255, 255, 0.18);
            border-top-color: rgba(255, 145, 77, 0.95);
            animation: analysisSpin 0.8s linear infinite;
            flex: 0 0 auto;
        }

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

        .analysis-progress {
            height: 8px;
            flex: 1;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.06);
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, 0.10);
        }

        .analysis-progress-bar {
            height: 100%;
            width: 0%;
            background: linear-gradient(90deg, rgba(255,145,77,0.25), rgba(255,145,77,0.95));
            transition: width 0.18s ease;
        }

        .analysis-status {
            font-size: 10px;
            color: rgba(226, 232, 240, 0.75);
            line-height: 1.25;
            margin-bottom: 10px;
        }

        .analysis-status--center {
            text-align: center;
        }

        .analysis-result {
            display: grid;
            gap: 10px;
        }

        .analysis-card {
            border: 1px solid rgba(255, 255, 255, 0.10);
            background: rgba(2, 6, 23, 0.35);
            border-radius: 14px;
            padding: 8px;
        }

        .analysis-verdict {
            border: 1px solid rgba(255, 145, 77, 0.32);
            border-radius: 12px;
            background: linear-gradient(135deg, rgba(255, 145, 77, 0.2), rgba(255, 145, 77, 0.08));
            padding: 8px;
            margin-bottom: 8px;
        }

        .analysis-verdict-title {
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: rgba(255, 220, 190, 0.92);
            font-weight: 800;
        }

        .analysis-verdict-value {
            margin-top: 4px;
            font-size: 12px;
            font-weight: 900;
            color: rgba(255, 255, 255, 0.98);
        }

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

        .analysis-metric {
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.03);
            padding: 7px;
        }

        .analysis-metric-label {
            font-size: 9px;
            text-transform: uppercase;
            letter-spacing: 0.3px;
            color: rgba(226, 232, 240, 0.66);
            font-weight: 800;
        }

        .analysis-metric-value {
            margin-top: 3px;
            font-size: 11px;
            font-weight: 800;
            color: rgba(255, 255, 255, 0.94);
            word-break: break-word;
        }

        .analysis-indicators-title {
            margin-top: 10px;
            margin-bottom: 6px;
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: 0.4px;
            color: rgba(226, 232, 240, 0.75);
            font-weight: 800;
        }

        .analysis-kpi {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 10px;
            margin-bottom: 8px;
        }

        .analysis-kpi-title {
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: 0.4px;
            color: rgba(226, 232, 240, 0.65);
            font-weight: 800;
        }

        .analysis-kpi-value {
            font-size: 12px;
            font-weight: 900;
            color: rgba(255, 255, 255, 0.96);
        }

        .analysis-chip-row {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }

        .analysis-chip {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 4px 6px;
            border-radius: 999px;
            border: 1px solid rgba(255, 255, 255, 0.10);
            background: rgba(255, 255, 255, 0.04);
            font-size: 10px;
            color: rgba(226, 232, 240, 0.88);
            font-weight: 700;
            line-height: 1;
        }

        .analysis-chip b {
            color: rgba(255, 255, 255, 0.95);
            font-weight: 900;
        }

        @media (max-width: 520px) {
            .analysis-grid {
                grid-template-columns: 1fr;
            }
        }

        /* 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;
        }

        #strategiesPanel {
            height: 100%;
            display: flex;
            flex-direction: column;
            min-height: 0;
        }

        #strategiesPanel .sidebar-section {
            display: flex;
            flex-direction: column;
            flex: 1;
            min-height: 0;
        }

        #derivStrategiesList {
            flex: 1 1 auto;
            min-height: 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;
        }

        /* Keep analyzer typography compact; avoid global panel font-size override. */
        .slide-panel .panel-content #analysisPanel .analysis-status {
            font-size: 10px !important;
            line-height: 1.25 !important;
        }

        .slide-panel .panel-content #analysisPanel .analysis-btn {
            font-size: 10px !important;
        }

        .slide-panel .panel-content #analysisPanel .analysis-btn .material-icons {
            font-size: 14px !important;
        }

        .slide-panel .panel-content #analysisPanel .analysis-kpi-title {
            font-size: 10px !important;
            letter-spacing: 0.4px !important;
        }

        .slide-panel .panel-content #analysisPanel .analysis-kpi-value {
            font-size: 12px !important;
        }

        .slide-panel .panel-content #analysisPanel .analysis-chip {
            font-size: 10px !important;
        }

        .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;
        }

        #settingsPanel {
            padding-bottom: 4px;
        }

        #settingsPanel .sidebar-section {
            padding: 8px 10px;
            border-bottom: none;
            border: 1px solid rgba(148, 163, 184, 0.16);
            border-radius: 10px;
            background: rgba(2, 6, 23, 0.32);
        }

        #settingsPanel .sidebar-section h3 {
            margin-bottom: 6px !important;
            font-size: 11px !important;
            letter-spacing: 0.6px !important;
        }

        #settingsPanel .panel-button {
            min-height: 30px;
            padding: 6px 10px;
            border-radius: 8px;
            font-size: 11px;
        }

        body[data-theme="dark"] #settingsPanel .sidebar-section {
            border-color: rgba(255, 255, 255, 0.12);
            background:
                linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.92));
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
        }

        body[data-theme="dark"] #settingsPanel select,
        body[data-theme="dark"] #settingsPanel textarea,
        body[data-theme="dark"] #settingsPanel input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]) {
            background: rgba(15, 23, 42, 0.88) !important;
            color: #e2e8f0 !important;
            border-color: rgba(148, 163, 184, 0.22) !important;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03) !important;
            transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
        }

        body[data-theme="dark"] #settingsPanel select {
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            background-color: rgba(15, 23, 42, 0.88) !important;
            background-image:
                linear-gradient(45deg, transparent 50%, rgba(226, 232, 240, 0.82) 50%),
                linear-gradient(135deg, rgba(226, 232, 240, 0.82) 50%, transparent 50%);
            background-position:
                calc(100% - 14px) calc(50% - 2px),
                calc(100% - 9px) calc(50% - 2px);
            background-size: 5px 5px, 5px 5px;
            background-repeat: no-repeat;
            padding-right: 24px !important;
            color-scheme: dark;
            -webkit-text-fill-color: #e2e8f0 !important;
            opacity: 1 !important;
        }

        body[data-theme="dark"] #settingsPanel select:hover,
        body[data-theme="dark"] #settingsPanel textarea:hover,
        body[data-theme="dark"] #settingsPanel input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):hover {
            background: rgba(15, 23, 42, 0.96) !important;
            border-color: rgba(148, 163, 184, 0.34) !important;
        }

        body[data-theme="dark"] #settingsPanel select:focus,
        body[data-theme="dark"] #settingsPanel textarea:focus,
        body[data-theme="dark"] #settingsPanel input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):focus {
            border-color: rgba(255, 145, 77, 0.78) !important;
            box-shadow: 0 0 0 2px rgba(255, 145, 77, 0.14) !important;
        }

        body[data-theme="dark"] #settingsPanel select:disabled,
        body[data-theme="dark"] #settingsPanel textarea:disabled,
        body[data-theme="dark"] #settingsPanel input:disabled,
        body[data-theme="dark"] #settingsPanel button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        body[data-theme="dark"] #settingsPanel select option {
            background: rgba(2, 6, 23, 0.98) !important;
            color: #e2e8f0 !important;
        }

        body[data-theme="dark"] #settingsPanel #derivChartThemeSelect,
        body[data-theme="dark"] #settingsPanel #sessionSelect,
        body[data-theme="dark"] #settingsPanel #soundWinSelect,
        body[data-theme="dark"] #settingsPanel #soundStrategySelect {
            background: rgba(15, 23, 42, 0.88) !important;
            background-color: rgba(15, 23, 42, 0.88) !important;
            color: #e2e8f0 !important;
            border: 1px solid rgba(148, 163, 184, 0.22) !important;
            -webkit-text-fill-color: #e2e8f0 !important;
        }

        body[data-theme="dark"] #settingsPanel input[type="range"] {
            accent-color: #ff914d;
        }

        body[data-theme="dark"] #settingsPanel input[type="checkbox"],
        body[data-theme="dark"] #settingsPanel input[type="radio"] {
            accent-color: #ff914d;
        }

        body[data-theme="dark"] #settingsPanel .panel-button {
            background: linear-gradient(135deg, rgba(255, 145, 77, 0.18), rgba(255, 145, 77, 0.08));
            border-color: rgba(255, 145, 77, 0.38);
            color: #fff7ed;
            box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
            transition: transform 0.16s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
        }

        body[data-theme="dark"] #settingsPanel .panel-button:hover {
            background: linear-gradient(135deg, rgba(255, 145, 77, 0.28), rgba(255, 145, 77, 0.12));
            border-color: rgba(255, 145, 77, 0.62);
            box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
            transform: translateY(-1px);
        }

        body[data-theme="dark"] {
            background: #020617;
            color: #e2e8f0;
        }

        body[data-theme="dark"] .app-topbar,
        body[data-theme="dark"] .header,
        body[data-theme="dark"] .chart-header,
        body[data-theme="dark"] #symbolTabsBar,
        body[data-theme="dark"] .left-tool-bar,
        body[data-theme="dark"] .right-icon-bar,
        body[data-theme="dark"] #footprintStatusIndicator {
            background: linear-gradient(180deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.96)) !important;
            border-color: rgba(148, 163, 184, 0.14) !important;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
        }

        body[data-theme="dark"] #miniControlBar {
            background: transparent !important;
            box-shadow: none !important;
            border: none !important;
        }

        body[data-theme="dark"] .chart-area {
            background: #020617;
        }

        body[data-theme="dark"] .chart-area::before {
            background:
                url('assets/bg.jpg');
            background-size: cover;
            background-position: center;
            opacity: var(--chart-bg-image-opacity, 0.22);
        }

        body[data-theme="dark"] .app-separator {
            background: rgba(148, 163, 184, 0.18);
        }

        body[data-theme="dark"] .app-tab,
        body[data-theme="dark"] .lang-toggle,
        body[data-theme="dark"] .app-login-btn,
        body[data-theme="dark"] .app-user-info {
            border-color: rgba(148, 163, 184, 0.22);
            background: rgba(15, 23, 42, 0.54);
            color: rgba(226, 232, 240, 0.9);
        }

        body[data-theme="dark"] .app-tab:hover,
        body[data-theme="dark"] .lang-toggle:hover,
        body[data-theme="dark"] .app-login-btn:hover {
            background: rgba(15, 23, 42, 0.82);
            border-color: rgba(148, 163, 184, 0.36);
            color: #ffffff;
        }

        body[data-theme="dark"] .app-tab.active {
            color: #ff914d;
            border-color: rgba(255, 145, 77, 0.5);
            background: linear-gradient(135deg, rgba(255, 145, 77, 0.14), rgba(255, 145, 77, 0.06));
            box-shadow: 0 0 12px rgba(255, 145, 77, 0.18);
        }

        body[data-theme="dark"] .lang-menu,
        body[data-theme="dark"] #userMenu,
        body[data-theme="dark"] #timeframeHeaderMenu {
            background: rgba(2, 6, 23, 0.98) !important;
            border-color: rgba(148, 163, 184, 0.18) !important;
            box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42) !important;
        }

        body[data-theme="dark"] .lang-option {
            color: rgba(226, 232, 240, 0.82);
        }

        body[data-theme="dark"] .lang-option:hover,
        body[data-theme="dark"] .lang-option.active {
            background: rgba(255, 145, 77, 0.16);
            color: #ff914d;
        }

        body[data-theme="dark"] #timeframeHeaderDropdown,
        body[data-theme="dark"] #chartStyleDropdown,
        body[data-theme="dark"] #indicatorsBtn {
            color: rgba(226, 232, 240, 0.82) !important;
        }

        body[data-theme="dark"] #timeframeHeaderDropdown:hover,
        body[data-theme="dark"] #chartStyleDropdown:hover,
        body[data-theme="dark"] #indicatorsBtn:hover {
            color: #ffffff !important;
        }

        body[data-theme="dark"] .left-tool-bar .toolbar-caption {
            color: rgba(148, 163, 184, 0.45);
        }

        body[data-theme="dark"] .tool-button,
        body[data-theme="dark"] .icon-button,
        body[data-theme="dark"] .toolbar-icon {
            color: rgba(203, 213, 225, 0.76);
            border-radius: 10px;
        }

        body[data-theme="dark"] .tool-button:hover,
        body[data-theme="dark"] .icon-button:hover,
        body[data-theme="dark"] .toolbar-icon:hover,
        body[data-theme="dark"] .tool-submenu-container.open .tool-submenu-trigger {
            background: rgba(255, 255, 255, 0.08);
            color: #ffffff;
        }

        body[data-theme="dark"] .tool-button.active,
        body[data-theme="dark"] .icon-button.active {
            background: linear-gradient(135deg, rgba(255, 145, 77, 0.16), rgba(255, 145, 77, 0.08));
            color: #ff914d;
        }

        body[data-theme="dark"] .tool-button .lucide,
        body[data-theme="dark"] .icon-button .tool-icon,
        body[data-theme="dark"] .toolbar-icon .tool-icon,
        body[data-theme="dark"] .right-icon-bar .icon-button .material-icons {
            color: currentColor !important;
            stroke: currentColor !important;
        }

        body[data-theme="dark"] .right-icon-bar .icon-button[data-panel="options"],
        body[data-theme="dark"] .right-icon-bar .icon-button[data-panel="settings"].active,
        body[data-theme="dark"] .right-icon-bar .icon-button[data-panel="drawings"].active,
        body[data-theme="dark"] .right-icon-bar .icon-button[data-panel="strategies"].active {
            color: #ff914d;
        }

        body[data-theme="dark"] .tool-submenu,
        body[data-theme="dark"] .floating-toolbar,
        body[data-theme="dark"] .chart-grid-menu,
        body[data-theme="dark"] .favorite-toolbar,
        body[data-theme="dark"] .slide-panel {
            background: rgba(2, 6, 23, 0.96);
            border-color: rgba(148, 163, 184, 0.16);
            box-shadow: 0 14px 32px rgba(0, 0, 0, 0.36);
        }

        body[data-theme="dark"] .slide-panel.open {
            border-color: rgba(255, 145, 77, 0.48);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
        }

        body[data-theme="dark"] .panel-close-btn {
            border-color: rgba(148, 163, 184, 0.18);
            background: rgba(255, 255, 255, 0.04);
            color: rgba(226, 232, 240, 0.86);
        }

        body[data-theme="dark"] .panel-close-btn:hover {
            background: rgba(255, 145, 77, 0.14);
            border-color: rgba(255, 145, 77, 0.36);
            color: #ffffff;
        }

        body[data-theme="dark"] .tool-submenu .tool-label {
            color: rgba(226, 232, 240, 0.82);
        }

        body[data-theme="dark"] .chart-grid-label {
            color: rgba(148, 163, 184, 0.72);
        }

        body[data-theme="dark"] .chart-grid-option {
            background: rgba(255, 255, 255, 0.04);
            border-color: rgba(255, 255, 255, 0.12);
            color: rgba(148, 163, 184, 0.68);
        }

        body[data-theme="dark"] .chart-grid-option:hover {
            background: rgba(255, 255, 255, 0.08);
            border-color: rgba(148, 163, 184, 0.28);
            color: rgba(226, 232, 240, 0.92);
        }

        body[data-theme="dark"] .chart-grid-option.is-active {
            background: rgba(255, 145, 77, 0.12);
            border-color: rgba(255, 145, 77, 0.6);
            color: #ff914d;
        }

        body[data-theme="dark"] #optionsPanel,
        body[data-theme="dark"] #optionsPanel * {
            color: #e2e8f0;
        }

        body[data-theme="dark"] #optionsPanel .options-quick-form {
            background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.94));
            border-color: rgba(255, 145, 77, 0.26);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
        }

        body[data-theme="dark"] #optionsPanel .options-field,
        body[data-theme="dark"] #optionsPanel .options-payout-row,
        body[data-theme="dark"] #optionsPanel .options-open-positions__empty,
        body[data-theme="dark"] #optionsPanel .options-open-card__row,
        body[data-theme="dark"] #optionsPanel .options-open-card__timer,
        body[data-theme="dark"] #optionsPanel .options-currency,
        body[data-theme="dark"] #optionsPanel .options-mult-amount,
        body[data-theme="dark"] #optionsPanel #optionsMultiplierRiskAmount {
            color: rgba(226, 232, 240, 0.72);
        }

        body[data-theme="dark"] #optionsPanel .options-duration-toggle,
        body[data-theme="dark"] #optionsPanel .options-type-toggle,
        body[data-theme="dark"] #optionsPanel .options-field select,
        body[data-theme="dark"] #optionsPanel .options-field input,
        body[data-theme="dark"] #optionsPanel #optionsMinutesInput,
        body[data-theme="dark"] #optionsPanel #optionsStakeInput {
            background: rgba(2, 6, 23, 0.88);
            border-color: rgba(255, 145, 77, 0.24);
            color: #f8fafc;
        }

        body[data-theme="dark"] #optionsPanel .options-duration-label,
        body[data-theme="dark"] #optionsPanel .options-type-label,
        body[data-theme="dark"] #optionsPanel .options-slider-label,
        body[data-theme="dark"] #optionsPanel .options-open-positions__header,
        body[data-theme="dark"] #optionsPanel .options-open-card,
        body[data-theme="dark"] #optionsPanel .options-open-card__symbol,
        body[data-theme="dark"] #optionsPanel .options-open-contract-value {
            color: #f8fafc;
        }

        body[data-theme="dark"] #optionsPanel .options-duration-caret,
        body[data-theme="dark"] #optionsPanel .options-type-caret {
            color: rgba(226, 232, 240, 0.62);
        }

        body[data-theme="dark"] #optionsPanel .options-duration-menu,
        body[data-theme="dark"] #optionsPanel .options-type-menu {
            background: rgba(2, 6, 23, 0.98);
            border-color: rgba(255, 145, 77, 0.3);
            box-shadow: 0 14px 32px rgba(0, 0, 0, 0.38);
        }

        body[data-theme="dark"] #optionsPanel .options-slider-wrap,
        body[data-theme="dark"] #optionsPanel .options-stake-row,
        body[data-theme="dark"] #optionsPanel .options-mult-field,
        body[data-theme="dark"] #optionsPanel #optionsMultipliersConfig {
            background: rgba(2, 6, 23, 0.64) !important;
            border-color: rgba(255, 145, 77, 0.24) !important;
            box-shadow: none;
        }

        body[data-theme="dark"] #optionsPanel .options-open-positions,
        body[data-theme="dark"] #optionsPanel .options-open-card {
            background: rgba(2, 6, 23, 0.62);
            border-color: rgba(255, 145, 77, 0.22);
        }

        body[data-theme="dark"] #optionsPanel .options-open-card__progress {
            background: rgba(255, 255, 255, 0.08);
        }

        body[data-theme="dark"] #optionsPanel .options-open-counter__bg {
            stroke: rgba(255, 255, 255, 0.2);
        }

        body[data-theme="dark"] #optionsPanel #optionsModeSwitch {
            background: rgba(255, 145, 77, 0.08) !important;
            border-color: rgba(255, 145, 77, 0.45) !important;
        }

        body[data-theme="dark"] #optionsPanel .options-mode-btn {
            color: rgba(148, 163, 184, 0.92) !important;
            background: transparent !important;
        }

        body[data-theme="dark"] #optionsPanel .options-mode-btn.is-active {
            color: #ffffff !important;
            background: rgba(255, 145, 77, 0.18) !important;
        }

        body[data-theme="dark"] #strategiesPanel,
        body[data-theme="dark"] #strategiesPanel * {
            color: #e2e8f0;
        }

        body[data-theme="dark"] #strategiesPanel .sidebar-section {
            border-color: rgba(255, 255, 255, 0.12);
            background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.92));
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
        }

        body[data-theme="dark"] #strategiesPanel #derivStrategiesAccountBadge,
        body[data-theme="dark"] #strategiesPanel #derivStrategiesSymbol,
        body[data-theme="dark"] #strategiesPanel #refreshDerivStrategies,
        body[data-theme="dark"] #strategiesPanel #derivStrategyAmount {
            background: rgba(2, 6, 23, 0.68) !important;
            border-color: rgba(148, 163, 184, 0.18) !important;
            color: #e2e8f0 !important;
            box-shadow: none;
        }

        body[data-theme="dark"] #strategiesPanel label,
        body[data-theme="dark"] #strategiesPanel #derivStrategiesStatus,
        body[data-theme="dark"] #strategiesPanel .sidebar-section > div > span {
            color: rgba(148, 163, 184, 0.88) !important;
        }

        body[data-theme="dark"] #strategiesPanel input[type="checkbox"] {
            accent-color: #ff914d;
        }

        body[data-theme="dark"] #strategiesPanel #derivStrategiesList > div {
            background: rgba(255, 255, 255, 0.04) !important;
            border: 1px solid rgba(255, 255, 255, 0.1) !important;
            border-radius: 10px;
        }

        body[data-theme="dark"] #strategiesPanel #derivStrategiesList > div > div:first-child > div:first-child > div:first-child,
        body[data-theme="dark"] #strategiesPanel #derivStrategiesList > div > div:last-child {
            color: #e2e8f0 !important;
        }

        body[data-theme="dark"] #strategiesPanel #derivStrategiesList > div > div:first-child > div:first-child > div:last-child,
        body[data-theme="dark"] #strategiesPanel #derivStrategiesList > div > div:nth-child(2),
        body[data-theme="dark"] #strategiesPanel #derivStrategiesList > div > div:nth-child(3) {
            color: #94a3b8 !important;
        }

        body[data-theme="dark"] #drawingsPanel,
        body[data-theme="dark"] #drawingsPanel * {
            color: #e2e8f0;
        }

        body[data-theme="dark"] #drawingsPanel #newDrawingGroup,
        body[data-theme="dark"] #drawingsPanel #drawingList {
            background: rgba(15, 23, 42, 0.72) !important;
            border-color: rgba(148, 163, 184, 0.18) !important;
            color: #e2e8f0 !important;
            box-shadow: none;
        }

        body[data-theme="dark"] #drawingsPanel #newDrawingGroup::placeholder {
            color: rgba(148, 163, 184, 0.72);
        }

        body[data-theme="dark"] #drawingsPanel #refreshDrawingsBtn,
        body[data-theme="dark"] #drawingsPanel #addDrawingGroupBtn {
            color: rgba(203, 213, 225, 0.84);
        }

        body[data-theme="dark"] #drawingsPanel .drawing-group-section,
        body[data-theme="dark"] #drawingsPanel .drawing-group-chip {
            background: rgba(15, 23, 42, 0.68) !important;
            border-color: rgba(148, 163, 184, 0.16) !important;
        }

        body[data-theme="dark"] #drawingsPanel .drawing-group-chip[data-active="true"],
        body[data-theme="dark"] #drawingsPanel .drawing-row-selected {
            background: rgba(255, 145, 77, 0.12) !important;
            border-color: rgba(255, 145, 77, 0.34) !important;
        }

        body[data-theme="dark"] #drawingsPanel .drawing-group-body,
        body[data-theme="dark"] #drawingsPanel .drawing-row {
            border-color: rgba(255, 255, 255, 0.06) !important;
        }

        body[data-theme="dark"] #drawingsPanel .drawing-group-delete,
        body[data-theme="dark"] #drawingsPanel .group-collapse-btn,
        body[data-theme="dark"] #drawingsPanel .group-lock-btn,
        body[data-theme="dark"] #drawingsPanel .group-visibility-btn,
        body[data-theme="dark"] #drawingsPanel .group-delete-btn,
        body[data-theme="dark"] #drawingsPanel .drawing-lock-btn,
        body[data-theme="dark"] #drawingsPanel .drawing-visibility-btn,
        body[data-theme="dark"] #drawingsPanel .drawing-delete-btn {
            color: rgba(203, 213, 225, 0.8) !important;
        }

        body[data-theme="dark"] .tool-submenu .tool-fav {
            color: rgba(148, 163, 184, 0.72);
        }

        body[data-theme="dark"] .tool-submenu .tool-fav:hover {
            color: rgba(226, 232, 240, 0.96);
        }

        body[data-theme="dark"] .tool-submenu .tool-fav.is-active,
        body[data-theme="dark"] .tool-submenu .tool-fav.is-active:hover {
            color: #ffcf54;
        }

        body[data-theme="dark"] .tool-submenu-divider {
            background: rgba(148, 163, 184, 0.16);
        }

        body[data-theme="dark"] #crosshairToggle .crosshair-icon::after,
        body[data-theme="dark"] #crosshairToggle:hover .crosshair-icon::after {
            background: rgba(2, 6, 23, 0.98);
        }

        body[data-theme="dark"] .symbol-tab {
            border-radius: 12px;
        }

        body[data-theme="dark"] .symbol-tab:hover:not(.active) {
            background: rgba(15, 23, 42, 0.9) !important;
            border-color: rgba(148, 163, 184, 0.22) !important;
        }

        body[data-theme="dark"] .symbol-tab.active {
            background: linear-gradient(135deg, rgba(255, 145, 77, 0.18), rgba(15, 23, 42, 0.96)) !important;
            border-color: rgba(255, 145, 77, 0.4) !important;
            box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 145, 77, 0.14) inset;
        }

        body[data-theme="dark"] #symbolTabsContainer > button,
        body[data-theme="dark"] #symbolTabsContainer > div {
            color: rgba(226, 232, 240, 0.88);
        }

        body[data-theme="dark"] .header .material-icons,
        body[data-theme="dark"] .icon-button,
        body[data-theme="dark"] .tool-button,
        body[data-theme="dark"] .toolbar-icon {
            color: rgba(203, 213, 225, 0.76);
        }

        body[data-theme="dark"] .header .material-icons:hover {
            color: #ffffff;
        }

        body[data-theme="light"] {
            background: #f8fafc;
            color: #0f172a;
        }

        body[data-theme="light"] .app-topbar,
        body[data-theme="light"] .header,
        body[data-theme="light"] .chart-header,
        body[data-theme="light"] #symbolTabsBar,
        body[data-theme="light"] .left-tool-bar,
        body[data-theme="light"] .right-icon-bar,
        body[data-theme="light"] #footprintStatusIndicator {
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96)) !important;
            border-color: rgba(148, 163, 184, 0.2) !important;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 24px rgba(15, 23, 42, 0.05);
        }

        body[data-theme="light"] #miniControlBar {
            background: transparent !important;
            box-shadow: none !important;
            border: none !important;
        }

        body[data-theme="light"] .chart-area {
            background: #ffffff;
        }

        body[data-theme="light"] .chart-area::before {
            background: url('../assets/bgw.png');
            background-size: cover;
            background-position: center;
            opacity: var(--chart-bg-image-opacity, 0.36);
        }

        body[data-theme="light"] .app-separator {
            background: rgba(148, 163, 184, 0.28);
        }

        body[data-theme="light"] .app-tab,
        body[data-theme="light"] .lang-toggle,
        body[data-theme="light"] .app-login-btn,
        body[data-theme="light"] .app-user-info {
            border-color: rgba(148, 163, 184, 0.28);
            background: rgba(255, 255, 255, 0.88);
            color: #0f172a;
            box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
        }

        body[data-theme="light"] .app-tab:hover,
        body[data-theme="light"] .lang-toggle:hover,
        body[data-theme="light"] .app-login-btn:hover {
            background: #ffffff;
            border-color: rgba(100, 116, 139, 0.38);
            color: #020617;
        }

        body[data-theme="light"] .app-tab.active {
            color: #c2410c;
            border-color: rgba(255, 145, 77, 0.48);
            background: linear-gradient(135deg, rgba(255, 145, 77, 0.16), rgba(255, 237, 213, 0.92));
            box-shadow: 0 0 0 1px rgba(255, 145, 77, 0.12) inset, 0 10px 22px rgba(255, 145, 77, 0.12);
        }

        body[data-theme="light"] .lang-menu,
        body[data-theme="light"] #userMenu,
        body[data-theme="light"] #timeframeHeaderMenu {
            background: rgba(255, 255, 255, 0.98) !important;
            border-color: rgba(148, 163, 184, 0.22) !important;
            box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12) !important;
        }

        body[data-theme="light"] #userEmail {
            color: rgba(15, 23, 42, 0.68) !important;
            border-bottom-color: rgba(148, 163, 184, 0.16) !important;
        }

        body[data-theme="light"] #logoutBtn {
            color: #dc2626 !important;
        }

        body[data-theme="light"] .lang-option {
            color: rgba(15, 23, 42, 0.78);
        }

        body[data-theme="light"] .lang-option:hover,
        body[data-theme="light"] .lang-option.active {
            background: rgba(255, 145, 77, 0.14);
            color: #c2410c;
        }

        body[data-theme="light"] #timeframeHeaderDropdown,
        body[data-theme="light"] #chartStyleDropdown,
        body[data-theme="light"] #indicatorsBtn,
        body[data-theme="light"] #timeframeHeaderText,
        body[data-theme="light"] .tick-tf-value {
            color: rgba(15, 23, 42, 0.82) !important;
        }

        body[data-theme="light"] #timeframeHeaderDropdown:hover,
        body[data-theme="light"] #chartStyleDropdown:hover,
        body[data-theme="light"] #indicatorsBtn:hover {
            color: #020617 !important;
        }

        body[data-theme="light"] .header .material-icons {
            color: rgba(51, 65, 85, 0.76);
        }

        body[data-theme="light"] .header .material-icons:hover {
            color: #0f172a;
        }

        body[data-theme="light"] .left-tool-bar .toolbar-caption {
            color: rgba(100, 116, 139, 0.6);
        }

        body[data-theme="light"] .tool-button,
        body[data-theme="light"] .icon-button,
        body[data-theme="light"] .toolbar-icon {
            color: rgba(51, 65, 85, 0.82);
            border-radius: 10px;
        }

        body[data-theme="light"] .tool-button:hover,
        body[data-theme="light"] .icon-button:hover,
        body[data-theme="light"] .toolbar-icon:hover,
        body[data-theme="light"] .tool-submenu-container.open .tool-submenu-trigger {
            background: rgba(148, 163, 184, 0.12);
            color: #0f172a;
        }

        body[data-theme="light"] .tool-button.active,
        body[data-theme="light"] .icon-button.active {
            background: linear-gradient(135deg, rgba(255, 145, 77, 0.18), rgba(255, 237, 213, 0.92));
            color: #c2410c;
        }

        body[data-theme="light"] .tool-button .lucide,
        body[data-theme="light"] .icon-button .tool-icon,
        body[data-theme="light"] .toolbar-icon .tool-icon,
        body[data-theme="light"] .right-icon-bar .icon-button .material-icons {
            color: currentColor !important;
            stroke: currentColor !important;
        }

        body[data-theme="light"] .right-icon-bar .icon-button[data-panel="options"],
        body[data-theme="light"] .right-icon-bar .icon-button[data-panel="settings"].active,
        body[data-theme="light"] .right-icon-bar .icon-button[data-panel="drawings"].active,
        body[data-theme="light"] .right-icon-bar .icon-button[data-panel="strategies"].active {
            color: #c2410c;
        }

        body[data-theme="light"] .tool-submenu,
        body[data-theme="light"] .floating-toolbar,
        body[data-theme="light"] .chart-grid-menu,
        body[data-theme="light"] .favorite-toolbar,
        body[data-theme="light"] .slide-panel {
            background: rgba(255, 255, 255, 0.96);
            border-color: rgba(148, 163, 184, 0.2);
            box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
        }

        body[data-theme="light"] .slide-panel.open {
            border-color: rgba(255, 145, 77, 0.32);
            box-shadow: 0 24px 44px rgba(15, 23, 42, 0.14);
        }

        body[data-theme="light"] .panel-close-btn {
            border-color: rgba(148, 163, 184, 0.24);
            background: rgba(148, 163, 184, 0.08);
            color: rgba(15, 23, 42, 0.84);
        }

        body[data-theme="light"] .panel-close-btn:hover {
            background: rgba(255, 145, 77, 0.12);
            border-color: rgba(255, 145, 77, 0.36);
            color: #9a3412;
        }

        body[data-theme="light"] .tool-submenu .tool-label {
            color: rgba(15, 23, 42, 0.82);
        }

        body[data-theme="light"] .chart-grid-label {
            color: rgba(100, 116, 139, 0.82);
        }

        body[data-theme="light"] .chart-grid-option {
            background: rgba(255, 255, 255, 0.96);
            border-color: rgba(148, 163, 184, 0.22);
            color: rgba(71, 85, 105, 0.82);
            box-shadow: none;
        }

        body[data-theme="light"] .chart-grid-option:hover {
            background: rgba(255, 145, 77, 0.10);
            border-color: rgba(255, 145, 77, 0.34);
            color: #9a3412;
        }

        body[data-theme="light"] .chart-grid-option.is-active {
            background: linear-gradient(135deg, rgba(255, 145, 77, 0.16), rgba(255, 237, 213, 0.92));
            border-color: rgba(255, 145, 77, 0.42);
            color: #c2410c;
        }

        body[data-theme="light"] #optionsPanel,
        body[data-theme="light"] #optionsPanel * {
            color: #0f172a;
        }

        body[data-theme="light"] #optionsPanel .options-quick-form {
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.94));
            border-color: rgba(255, 145, 77, 0.24);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 14px 28px rgba(15, 23, 42, 0.06);
        }

        body[data-theme="light"] #optionsPanel .options-field,
        body[data-theme="light"] #optionsPanel .options-payout-row,
        body[data-theme="light"] #optionsPanel .options-open-positions__empty,
        body[data-theme="light"] #optionsPanel .options-open-card__row,
        body[data-theme="light"] #optionsPanel .options-open-card__timer,
        body[data-theme="light"] #optionsPanel .options-currency,
        body[data-theme="light"] #optionsPanel .options-mult-amount,
        body[data-theme="light"] #optionsPanel #optionsMultiplierRiskAmount {
            color: rgba(30, 41, 59, 0.86);
        }

        body[data-theme="light"] #optionsPanel .options-duration-toggle,
        body[data-theme="light"] #optionsPanel .options-type-toggle,
        body[data-theme="light"] #optionsPanel .options-field select,
        body[data-theme="light"] #optionsPanel .options-field input,
        body[data-theme="light"] #optionsPanel #optionsMinutesInput,
        body[data-theme="light"] #optionsPanel #optionsStakeInput {
            background: #ffffff;
            border-color: rgba(148, 163, 184, 0.24);
            color: #0f172a;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
        }

        body[data-theme="light"] #optionsPanel .options-duration-label,
        body[data-theme="light"] #optionsPanel .options-type-label,
        body[data-theme="light"] #optionsPanel .options-slider-label,
        body[data-theme="light"] #optionsPanel .options-open-positions__header,
        body[data-theme="light"] #optionsPanel .options-open-card,
        body[data-theme="light"] #optionsPanel .options-open-card__symbol,
        body[data-theme="light"] #optionsPanel .options-open-contract-value,
        body[data-theme="light"] #optionsPanel #optionsPayoutValue,
        body[data-theme="light"] #optionsPanel .options-payout-row strong {
            color: #0f172a;
        }

        body[data-theme="light"] #optionsPanel .options-duration-caret,
        body[data-theme="light"] #optionsPanel .options-type-caret {
            color: rgba(100, 116, 139, 0.72);
        }

        body[data-theme="light"] #optionsPanel .options-duration-menu,
        body[data-theme="light"] #optionsPanel .options-type-menu {
            background: rgba(255, 255, 255, 0.98);
            border-color: rgba(148, 163, 184, 0.22);
            box-shadow: 0 18px 36px rgba(15, 23, 42, 0.1);
        }

        body[data-theme="light"] #optionsPanel .options-duration-item,
        body[data-theme="light"] #optionsPanel .options-type-item {
            color: #0f172a;
        }

        body[data-theme="light"] #optionsPanel #optionsMultipliersConfig > div > div > span,
        body[data-theme="light"] #optionsPanel #optionsMultipliersConfig label {
            color: rgba(30, 41, 59, 0.92) !important;
        }

        body[data-theme="light"] #optionsPanel #optionsMultiplierStatus {
            color: rgba(51, 65, 85, 0.82) !important;
        }

        body[data-theme="light"] #optionsPanel .options-duration-item:disabled,
        body[data-theme="light"] #optionsPanel .options-duration-item.is-disabled,
        body[data-theme="light"] #optionsPanel .options-type-item:disabled,
        body[data-theme="light"] #optionsPanel .options-type-item.is-disabled {
            color: rgba(100, 116, 139, 0.56);
            border-color: rgba(148, 163, 184, 0.14);
        }

        body[data-theme="light"] #optionsPanel .options-slider-wrap,
        body[data-theme="light"] #optionsPanel .options-stake-row,
        body[data-theme="light"] #optionsPanel .options-mult-field,
        body[data-theme="light"] #optionsPanel #optionsMultipliersConfig {
            background: rgba(255, 255, 255, 0.92) !important;
            border-color: rgba(148, 163, 184, 0.22) !important;
            box-shadow: none;
        }

        body[data-theme="light"] #optionsPanel .options-slider-track span {
            background: rgba(148, 163, 184, 0.26);
        }

        body[data-theme="light"] #optionsPanel .options-slider-track span.active,
        body[data-theme="light"] #optionsPanel .options-slider-track span.is-selected {
            background: #ff914d;
        }

        body[data-theme="light"] #optionsPanel .options-stake-row input,
        body[data-theme="light"] #optionsPanel .options-mult-input,
        body[data-theme="light"] #optionsPanel #optionsMultiplierSelect {
            color: #0f172a;
        }

        body[data-theme="light"] #optionsPanel #optionsMultiplierSelect option {
            background: #ffffff;
            color: #0f172a;
        }

        body[data-theme="light"] #optionsPanel .options-stepper {
            background: rgba(255, 145, 77, 0.1);
            border-color: rgba(255, 145, 77, 0.34);
            color: #c2410c;
        }

        body[data-theme="light"] #optionsPanel .options-stepper:hover {
            background: rgba(255, 145, 77, 0.16);
            border-color: rgba(255, 145, 77, 0.48);
        }

        body[data-theme="light"] #optionsPanel .options-open-positions,
        body[data-theme="light"] #optionsPanel .options-open-card {
            background: rgba(255, 255, 255, 0.94);
            border-color: rgba(148, 163, 184, 0.2);
            box-shadow: none;
        }

        body[data-theme="light"] #optionsPanel .options-open-positions__count,
        body[data-theme="light"] #optionsPanel .options-open-card__badge {
            background: rgba(255, 145, 77, 0.16);
            color: #c2410c;
        }

        body[data-theme="light"] #optionsPanel .options-open-card__action {
            border-color: rgba(14, 165, 233, 0.28);
            background: rgba(14, 165, 233, 0.1);
            color: #0369a1;
        }

        body[data-theme="light"] #optionsPanel .options-open-card__progress {
            background: rgba(148, 163, 184, 0.18);
        }

        body[data-theme="light"] #optionsPanel .options-open-counter__bg {
            stroke: rgba(148, 163, 184, 0.28);
        }

        body[data-theme="light"] #optionsPanel .options-open-card .symbol-tab-counter__text {
            text-shadow: none;
        }

        body[data-theme="light"] #optionsPanel #optionsModeSwitch {
            background: rgba(255, 145, 77, 0.08) !important;
            border-color: rgba(255, 145, 77, 0.3) !important;
        }

        body[data-theme="light"] #optionsPanel .options-mode-btn {
            color: rgba(71, 85, 105, 0.9) !important;
            background: transparent !important;
        }

        body[data-theme="light"] #optionsPanel .options-mode-btn.is-active {
            color: #9a3412 !important;
            background: rgba(255, 145, 77, 0.16) !important;
        }

        body[data-theme="light"] #optionsPanel .options-action-btn.up {
            border-color: rgba(22, 163, 74, 0.3);
            background: linear-gradient(135deg, rgba(34, 197, 94, 0.16), rgba(255, 255, 255, 0.92));
            color: #15803d;
        }

        body[data-theme="light"] #optionsPanel .options-action-btn.down {
            border-color: rgba(239, 68, 68, 0.28);
            background: linear-gradient(135deg, rgba(248, 113, 113, 0.14), rgba(255, 255, 255, 0.92));
            color: #dc2626;
        }

        body[data-theme="light"] #optionsPanel .options-action-btn.up:hover {
            background: linear-gradient(135deg, rgba(34, 197, 94, 0.22), rgba(240, 253, 244, 0.98));
            border-color: rgba(22, 163, 74, 0.42);
            color: #166534;
        }

        body[data-theme="light"] #optionsPanel .options-action-btn.down:hover {
            background: linear-gradient(135deg, rgba(248, 113, 113, 0.2), rgba(254, 242, 242, 0.98));
            border-color: rgba(220, 38, 38, 0.4);
            color: #b91c1c;
        }

        body[data-theme="light"] #strategiesPanel,
        body[data-theme="light"] #strategiesPanel * {
            color: #0f172a;
        }

        body[data-theme="light"] #strategiesPanel .sidebar-section {
            border: 1px solid rgba(148, 163, 184, 0.16);
            border-radius: 12px;
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94), 0 12px 24px rgba(15, 23, 42, 0.05);
        }

        body[data-theme="light"] #strategiesPanel h3,
        body[data-theme="light"] #strategiesPanel .panel-title {
            color: #0f172a !important;
        }

        body[data-theme="light"] #strategiesPanel #derivStrategiesAccountBadge {
            background: rgba(255, 255, 255, 0.96) !important;
            border-color: rgba(148, 163, 184, 0.22) !important;
            color: #0f172a !important;
            box-shadow: none;
        }

        body[data-theme="light"] #strategiesPanel #derivStrategiesSymbol {
            background: rgba(255, 255, 255, 0.96) !important;
            border-color: rgba(148, 163, 184, 0.22) !important;
            color: rgba(51, 65, 85, 0.82) !important;
            box-shadow: none;
        }

        body[data-theme="light"] #strategiesPanel #refreshDerivStrategies {
            background: rgba(255, 255, 255, 0.96) !important;
            border-color: rgba(148, 163, 184, 0.22) !important;
            color: #475569 !important;
            box-shadow: none;
        }

        body[data-theme="light"] #strategiesPanel #refreshDerivStrategies:hover {
            background: rgba(255, 145, 77, 0.1) !important;
            border-color: rgba(255, 145, 77, 0.34) !important;
            color: #c2410c !important;
        }

        body[data-theme="light"] #strategiesPanel label,
        body[data-theme="light"] #strategiesPanel .sidebar-section > div > span,
        body[data-theme="light"] #strategiesPanel #derivStrategiesStatus {
            color: rgba(30, 41, 59, 0.88) !important;
        }

        body[data-theme="light"] #strategiesPanel input[type="checkbox"] {
            accent-color: #ff914d;
        }

        body[data-theme="light"] #strategiesPanel #derivStrategyAmount {
            background: #ffffff !important;
            border-color: rgba(148, 163, 184, 0.24) !important;
            color: #0f172a !important;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94);
        }

        body[data-theme="light"] #strategiesPanel #derivStrategyAmount::placeholder {
            color: rgba(100, 116, 139, 0.72);
        }

        body[data-theme="light"] #strategiesPanel #derivStrategiesList > div {
            background: rgba(255, 255, 255, 0.96) !important;
            border: 1px solid rgba(148, 163, 184, 0.2) !important;
            border-radius: 10px;
            box-shadow: none !important;
        }

        body[data-theme="light"] #strategiesPanel #derivStrategiesList > div > div:first-child > div:first-child > div:first-child {
            color: #0f172a !important;
        }

        body[data-theme="light"] #strategiesPanel #derivStrategiesList > div > div:first-child > div:first-child > div:last-child,
        body[data-theme="light"] #strategiesPanel #derivStrategiesList > div > div:nth-child(3) {
            color: rgba(71, 85, 105, 0.82) !important;
        }

        body[data-theme="light"] #strategiesPanel #derivStrategiesList > div > div:nth-child(2) {
            color: rgba(71, 85, 105, 0.86) !important;
        }

        body[data-theme="light"] #strategiesPanel .xqb-strategy-picker-toggle,
        body[data-theme="light"] #strategiesPanel .xqb-strategy-picker-item-main,
        body[data-theme="light"] #strategiesPanel .xqb-strategy-picker-item-btn {
            background: #ffffff;
            border-color: rgba(148, 163, 184, 0.22);
            color: #0f172a;
        }

        body[data-theme="light"] .xqb-strategy-picker-menu {
            background: rgba(255, 255, 255, 0.98);
            border-color: rgba(148, 163, 184, 0.22);
            box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
        }

        body[data-theme="light"] .xqb-strategy-picker-toggle::after {
            color: rgba(71, 85, 105, 0.88);
        }

        body[data-theme="light"] .xqb-strategy-picker-saveas {
            border-color: rgba(56, 189, 248, 0.3);
            background: rgba(224, 242, 254, 0.72);
            color: #0369a1;
        }

        body[data-theme="light"] .xqb-strategy-picker-saveas:hover:not(:disabled),
        body[data-theme="light"] .xqb-strategy-picker-item.is-active .xqb-strategy-picker-item-main {
            border-color: rgba(56, 189, 248, 0.44);
            background: rgba(224, 242, 254, 0.88);
            color: #0c4a6e;
        }

        body[data-theme="light"] .xqb-strategy-picker-empty {
            border-color: rgba(148, 163, 184, 0.28);
            color: rgba(71, 85, 105, 0.82);
        }

        body[data-theme="light"] .xqb-strategy-picker-item-btn--delete {
            background: rgba(254, 226, 226, 0.84);
            border-color: rgba(248, 113, 113, 0.3);
            color: #dc2626;
        }

        body[data-theme="light"] .xqb-strategy-modal-backdrop {
            background: rgba(15, 23, 42, 0.24);
        }

        body[data-theme="light"] .xqb-strategy-modal-card {
            border-color: rgba(148, 163, 184, 0.24);
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 252, 0.98));
            box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
        }

body[data-theme="light"] .xqb-strategy-modal-title,
body[data-theme="light"] .xqb-confirm-modal-message {
    color: #0f172a;
}

body[data-theme="light"] .deriv-strategy-settings-modal__label,
body[data-theme="light"] .deriv-strategy-settings-modal__checkbox,
body[data-theme="light"] .deriv-strategy-settings-modal__hint,
body[data-theme="light"] .deriv-strategy-settings-modal__empty {
    color: #334155;
}

body[data-theme="light"] .deriv-strategy-settings-modal__type {
    color: #64748b;
}

body[data-theme="light"] .deriv-strategy-settings-modal__group {
    background: rgba(248, 250, 252, 0.92);
    border-color: rgba(148, 163, 184, 0.22);
}

body[data-theme="light"] .deriv-strategy-settings-modal__group-title {
    color: #0369a1;
}

body[data-theme="light"] .deriv-strategy-settings-modal__input,
body[data-theme="light"] .deriv-strategy-settings-modal__select {
    background: rgba(255, 255, 255, 0.94);
    color: #0f172a;
    border-color: rgba(148, 163, 184, 0.34);
}

body[data-theme="light"] .deriv-strategy-share-modal__all-btn {
    border-color: rgba(148, 163, 184, 0.24);
    background: rgba(248, 250, 252, 0.96);
    color: #334155;
}

body[data-theme="light"] .deriv-strategy-share-modal__all-btn.is-active {
    border-color: rgba(249, 115, 22, 0.34);
    background: rgba(255, 237, 213, 0.88);
    color: #c2410c;
    box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.08);
}

body[data-theme="light"] .deriv-strategy-share-modal__divider,
body[data-theme="light"] .deriv-strategy-share-modal__hint {
    color: rgba(71, 85, 105, 0.9);
}

body[data-theme="light"] .deriv-strategy-share-modal__label {
    color: rgba(15, 23, 42, 0.92);
}

body[data-theme="light"] .deriv-strategy-share-modal__input {
    border-color: rgba(148, 163, 184, 0.26);
    background: rgba(255, 255, 255, 0.98);
    color: #0f172a;
}

body[data-theme="light"] .deriv-strategy-share-modal__add-btn {
    border-color: rgba(148, 163, 184, 0.24);
    background: rgba(255, 255, 255, 0.98);
    color: #c2410c;
}

body[data-theme="light"] .deriv-strategy-share-modal__input:focus {
    border-color: rgba(249, 115, 22, 0.34);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

body[data-theme="light"] .deriv-strategy-share-modal__add-btn:hover {
    border-color: rgba(249, 115, 22, 0.34);
    background: rgba(255, 237, 213, 0.72);
}

body[data-theme="light"] .deriv-strategy-share-modal__email-chip {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.98);
}

body[data-theme="light"] .deriv-strategy-share-modal__email-chip-text {
    color: #0f172a;
}

body[data-theme="light"] .deriv-strategy-share-modal__email-chip-remove {
    background: rgba(254, 226, 226, 0.88);
    color: #dc2626;
}

body[data-theme="light"] #drawingsPanel,
body[data-theme="light"] #drawingsPanel * {
    color: #0f172a;
}

        body[data-theme="light"] #drawingsPanel .panel-title {
            color: #0f172a;
        }

        body[data-theme="light"] #drawingsPanel #refreshDrawingsBtn,
        body[data-theme="light"] #drawingsPanel #addDrawingGroupBtn {
            color: rgba(71, 85, 105, 0.88);
        }

        body[data-theme="light"] #drawingsPanel #refreshDrawingsBtn:hover,
        body[data-theme="light"] #drawingsPanel #addDrawingGroupBtn:hover {
            color: #c2410c;
        }

        body[data-theme="light"] #drawingsPanel #newDrawingGroup {
            background: #ffffff !important;
            border-color: rgba(148, 163, 184, 0.24) !important;
            color: #0f172a !important;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94);
        }

        body[data-theme="light"] #drawingsPanel #newDrawingGroup::placeholder {
            color: rgba(100, 116, 139, 0.72);
        }

        body[data-theme="light"] #drawingsPanel #drawingList {
            background: rgba(255, 255, 255, 0.96) !important;
            border-color: rgba(148, 163, 184, 0.18) !important;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
        }

        body[data-theme="light"] #drawingsPanel #drawingList > div[style*="color:#94a3b8"] {
            color: rgba(71, 85, 105, 0.82) !important;
        }

        body[data-theme="light"] #drawingsPanel .drawing-group-section {
            background: rgba(255, 255, 255, 0.96) !important;
            border: 1px solid rgba(148, 163, 184, 0.18) !important;
            border-radius: 10px;
            box-shadow: none !important;
        }

        body[data-theme="light"] #drawingsPanel .drawing-group-section > div:first-child {
            background: rgba(248, 250, 252, 0.9) !important;
            border-bottom: 1px solid rgba(148, 163, 184, 0.12);
        }

        body[data-theme="light"] #drawingsPanel .drawing-group-chip {
            background: rgba(255, 255, 255, 0.98) !important;
            border: 1px solid rgba(148, 163, 184, 0.18) !important;
            border-radius: 8px;
            box-shadow: none !important;
        }

        body[data-theme="light"] #drawingsPanel .drawing-group-chip[style*="background:rgba(14,165,233,0.15)"] {
            background: rgba(255, 145, 77, 0.12) !important;
            border-color: rgba(255, 145, 77, 0.34) !important;
        }

        body[data-theme="light"] #drawingsPanel .drawing-group-chip span,
        body[data-theme="light"] #drawingsPanel .drawing-group-section span,
        body[data-theme="light"] #drawingsPanel .drawing-row span {
            color: inherit !important;
        }

        body[data-theme="light"] #drawingsPanel .drawing-group-chip span[style*="color:#94a3b8"],
        body[data-theme="light"] #drawingsPanel .drawing-group-section span[style*="color:#94a3b8"],
        body[data-theme="light"] #drawingsPanel .drawing-row span[style*="color:#94a3b8"] {
            color: rgba(100, 116, 139, 0.82) !important;
        }

        body[data-theme="light"] #drawingsPanel .drawing-group-section span[style*="color:#e2e8f0"],
        body[data-theme="light"] #drawingsPanel .drawing-row span[style*="color:#e2e8f0"] {
            color: #0f172a !important;
        }

        body[data-theme="light"] #drawingsPanel .drawing-group-body,
        body[data-theme="light"] #drawingsPanel .drawing-row {
            border-color: rgba(148, 163, 184, 0.12) !important;
        }

        body[data-theme="light"] #drawingsPanel .drawing-row-selected {
            background: rgba(255, 145, 77, 0.12) !important;
            border-color: rgba(255, 145, 77, 0.34) !important;
        }

        body[data-theme="light"] #drawingsPanel .drawing-group-delete,
        body[data-theme="light"] #drawingsPanel .group-collapse-btn,
        body[data-theme="light"] #drawingsPanel .group-lock-btn,
        body[data-theme="light"] #drawingsPanel .group-visibility-btn,
        body[data-theme="light"] #drawingsPanel .group-delete-btn,
        body[data-theme="light"] #drawingsPanel .drawing-lock-btn,
        body[data-theme="light"] #drawingsPanel .drawing-visibility-btn,
        body[data-theme="light"] #drawingsPanel .drawing-delete-btn {
            color: rgba(71, 85, 105, 0.84) !important;
        }

        body[data-theme="light"] #drawingsPanel .drawing-group-delete:hover,
        body[data-theme="light"] #drawingsPanel .group-collapse-btn:hover,
        body[data-theme="light"] #drawingsPanel .group-lock-btn:hover,
        body[data-theme="light"] #drawingsPanel .group-visibility-btn:hover,
        body[data-theme="light"] #drawingsPanel .group-delete-btn:hover,
        body[data-theme="light"] #drawingsPanel .drawing-lock-btn:hover,
        body[data-theme="light"] #drawingsPanel .drawing-visibility-btn:hover,
        body[data-theme="light"] #drawingsPanel .drawing-delete-btn:hover {
            color: #c2410c !important;
        }

        body[data-theme="light"] #favoriteToolbar .favorite-toolbar__handle {
            background-image: radial-gradient(circle, rgba(71, 85, 105, 0.32) 1.2px, transparent 1.3px);
        }

        body[data-theme="light"] #favoriteToolbar .favorite-tool-btn {
            color: rgba(15, 23, 42, 0.86);
            background: transparent;
        }

        body[data-theme="light"] #favoriteToolbar .favorite-tool-btn:hover {
            background: rgba(255, 145, 77, 0.12);
            color: #9a3412;
        }

        body[data-theme="light"] #favoriteToolbar .favorite-tool-btn.is-active,
        body[data-theme="light"] #favoriteToolbar .favorite-tool-btn.is-active:hover {
            background: rgba(255, 145, 77, 0.18);
            color: #c2410c;
        }

        body[data-theme="light"] #favoriteToolbar .favorite-tool-btn .tool-icon,
        body[data-theme="light"] #favoriteToolbar .favorite-tool-icon,
        body[data-theme="light"] #favoriteToolbar .favorite-tool-icon .tool-icon,
        body[data-theme="light"] #favoriteToolbar .favorite-tool-btn .lucide {
            color: currentColor !important;
            stroke: currentColor !important;
        }

        body[data-theme="light"] .tool-submenu .tool-fav {
            color: rgba(71, 85, 105, 0.88);
        }

        body[data-theme="light"] .tool-submenu .tool-fav:hover {
            color: #0f172a;
        }

        body[data-theme="light"] .tool-submenu .tool-fav.is-active,
        body[data-theme="light"] .tool-submenu .tool-fav.is-active:hover {
            color: #ffb84d;
        }

        body[data-theme="light"] .tool-submenu-divider {
            background: rgba(148, 163, 184, 0.18);
        }

        body[data-theme="light"] #indicatorsMenu .indicator-category {
            background: #ffffff !important;
            border: 1px solid rgba(148, 163, 184, 0.18) !important;
            border-radius: 12px !important;
            padding: 10px !important;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
        }

        body[data-theme="light"] #indicatorsMenu .indicator-menu-item {
            background: transparent !important;
            color: #0f172a !important;
            border-radius: 8px !important;
            transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
        }

        body[data-theme="light"] #indicatorsMenu .indicator-menu-item span:last-child {
            color: #0f172a !important;
        }

        body[data-theme="light"] #indicatorsMenu .indicator-menu-item:hover {
            background: rgba(255, 255, 255, 0.96) !important;
            transform: translateY(-1px);
        }

        body[data-theme="light"] #crosshairToggle .crosshair-icon::after,
        body[data-theme="light"] #crosshairToggle:hover .crosshair-icon::after {
            background: rgba(255, 255, 255, 0.98);
        }

        body[data-theme="light"] .symbol-tab {
            border-radius: 12px;
        }

        body[data-theme="light"] .symbol-tab:hover:not(.active) {
            background: rgba(241, 245, 249, 0.96) !important;
            border-color: rgba(148, 163, 184, 0.28) !important;
        }

        body[data-theme="light"] .symbol-tab.active {
            background: linear-gradient(135deg, rgba(255, 145, 77, 0.16), rgba(255, 255, 255, 0.96)) !important;
            border-color: rgba(255, 145, 77, 0.38) !important;
            box-shadow: 0 8px 18px rgba(255, 145, 77, 0.1), 0 0 0 1px rgba(255, 145, 77, 0.1) inset;
        }

        body[data-theme="light"] #symbolTabsContainer > button,
        body[data-theme="light"] #symbolTabsContainer > div,
        body[data-theme="light"] .symbol-tab-counter,
        body[data-theme="light"] .symbol-name,
        body[data-theme="light"] .chart-title {
            color: #0f172a;
            text-shadow: none;
        }

        body[data-theme="light"] #symbolTabsBar,
        body[data-theme="light"] #symbolTabsContainer,
        body[data-theme="light"] #symbolTabsContainer *,
        body[data-theme="light"] .symbol-tab,
        body[data-theme="light"] .symbol-tab span,
        body[data-theme="light"] .symbol-tab div,
        body[data-theme="light"] .symbol-tab-close,
        body[data-theme="light"] #addSymbolTab {
            color: #0f172a !important;
        }

        body[data-theme="light"] #addSymbolTab {
            background: rgba(255, 255, 255, 0.94) !important;
            border: 1px solid rgba(148, 163, 184, 0.28) !important;
            box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
        }

        body[data-theme="light"] #addSymbolTab:hover {
            background: rgba(255, 145, 77, 0.12) !important;
            border-color: rgba(255, 145, 77, 0.36) !important;
            color: #9a3412 !important;
        }

        body[data-theme="light"] .symbol-tab-ring-bg {
            stroke: rgba(148, 163, 184, 0.32);
        }

        body[data-theme="light"] .symbol-tab-ring-progress {
            stroke: #c2410c;
        }

        body[data-theme="light"] #settingsPanel .sidebar-section {
            border-color: rgba(148, 163, 184, 0.22);
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.94));
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 20px rgba(15, 23, 42, 0.06);
        }

        body[data-theme="light"] #settingsPanel,
        body[data-theme="light"] #settingsPanel .panel-title,
        body[data-theme="light"] #settingsPanel h3,
        body[data-theme="light"] #settingsPanel h4,
        body[data-theme="light"] #settingsPanel label,
        body[data-theme="light"] #settingsPanel span,
        body[data-theme="light"] #settingsPanel div,
        body[data-theme="light"] #settingsPanel p {
            color: #0f172a !important;
            text-shadow: none !important;
        }

        body[data-theme="light"] #settingsPanel .material-icons {
            color: rgba(51, 65, 85, 0.78) !important;
        }

        body[data-theme="light"] #settingsPanel select,
        body[data-theme="light"] #settingsPanel textarea,
        body[data-theme="light"] #settingsPanel input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]) {
            background: rgba(255, 255, 255, 0.96) !important;
            color: #0f172a !important;
            border-color: rgba(148, 163, 184, 0.28) !important;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
            transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
        }

        body[data-theme="light"] #settingsPanel select {
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            background-color: rgba(255, 255, 255, 0.96) !important;
            background-image:
                linear-gradient(45deg, transparent 50%, rgba(71, 85, 105, 0.82) 50%),
                linear-gradient(135deg, rgba(71, 85, 105, 0.82) 50%, transparent 50%);
            background-position:
                calc(100% - 14px) calc(50% - 2px),
                calc(100% - 9px) calc(50% - 2px);
            background-size: 5px 5px, 5px 5px;
            background-repeat: no-repeat;
            padding-right: 24px !important;
            color-scheme: light;
            -webkit-text-fill-color: #0f172a !important;
            opacity: 1 !important;
        }

        body[data-theme="light"] #settingsPanel select:hover,
        body[data-theme="light"] #settingsPanel textarea:hover,
        body[data-theme="light"] #settingsPanel input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):hover {
            background: #ffffff !important;
            border-color: rgba(100, 116, 139, 0.38) !important;
        }

        body[data-theme="light"] #settingsPanel select:focus,
        body[data-theme="light"] #settingsPanel textarea:focus,
        body[data-theme="light"] #settingsPanel input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):focus {
            border-color: rgba(255, 145, 77, 0.76) !important;
            box-shadow: 0 0 0 2px rgba(255, 145, 77, 0.16) !important;
        }

        body[data-theme="light"] #settingsPanel select:disabled,
        body[data-theme="light"] #settingsPanel textarea:disabled,
        body[data-theme="light"] #settingsPanel input:disabled,
        body[data-theme="light"] #settingsPanel button:disabled {
            opacity: 0.58;
            cursor: not-allowed;
        }

        body[data-theme="light"] #settingsPanel select option {
            background: #ffffff !important;
            color: #0f172a !important;
        }

        body[data-theme="light"] #settingsPanel #derivChartThemeSelect,
        body[data-theme="light"] #settingsPanel #sessionSelect,
        body[data-theme="light"] #settingsPanel #soundWinSelect,
        body[data-theme="light"] #settingsPanel #soundStrategySelect {
            background: rgba(255, 255, 255, 0.96) !important;
            background-color: rgba(255, 255, 255, 0.96) !important;
            color: #0f172a !important;
            border: 1px solid rgba(148, 163, 184, 0.28) !important;
            -webkit-text-fill-color: #0f172a !important;
        }

        body[data-theme="light"] #settingsPanel input[type="range"],
        body[data-theme="light"] #settingsPanel input[type="checkbox"],
        body[data-theme="light"] #settingsPanel input[type="radio"] {
            accent-color: #ff914d;
        }

        body[data-theme="light"] #settingsPanel .panel-button {
            background: linear-gradient(135deg, rgba(255, 145, 77, 0.14), rgba(255, 237, 213, 0.94));
            border-color: rgba(255, 145, 77, 0.34);
            color: #9a3412;
            box-shadow: 0 10px 22px rgba(255, 145, 77, 0.1);
            transition: transform 0.16s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
        }

        body[data-theme="light"] #settingsPanel .panel-button:hover {
            background: linear-gradient(135deg, rgba(255, 145, 77, 0.22), rgba(255, 237, 213, 0.98));
            border-color: rgba(255, 145, 77, 0.48);
            box-shadow: 0 12px 24px rgba(255, 145, 77, 0.14);
            transform: translateY(-1px);
        }

        body[data-theme="light"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
        body[data-theme="light"] select,
        body[data-theme="light"] textarea {
            background: rgba(255, 255, 255, 0.96);
            color: #0f172a;
            border-color: rgba(148, 163, 184, 0.28);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
            caret-color: #c2410c;
        }

        body[data-theme="light"] input::placeholder,
        body[data-theme="light"] textarea::placeholder {
            color: rgba(100, 116, 139, 0.72);
        }

        body[data-theme="light"] input[type="date"],
        body[data-theme="light"] input[type="time"] {
            color-scheme: light;
        }

        body[data-theme="light"] #tradeHistoryPanel {
            color: #0f172a;
        }

        body[data-theme="light"] #tradeSummary {
            background: rgba(255, 255, 255, 0.88) !important;
            border-bottom-color: rgba(148, 163, 184, 0.18) !important;
            box-shadow: inset 0 -1px 0 rgba(148, 163, 184, 0.08);
        }

        body[data-theme="light"] #tradeSummary div,
        body[data-theme="light"] #tradeHistoryPanel > div,
        body[data-theme="light"] #tradeHistoryList {
            color: #0f172a;
        }

        body[data-theme="light"] #summaryTrades {
            color: #0f172a !important;
        }

        body[data-theme="light"] #historyStartDate,
        body[data-theme="light"] #historyEndDate,
        body[data-theme="light"] #symbolSearchInput,
        body[data-theme="light"] #newDrawingGroup {
            background: rgba(255, 255, 255, 0.96) !important;
            color: #0f172a !important;
            border-color: rgba(148, 163, 184, 0.28) !important;
        }

        body[data-theme="light"] #applyHistoryFilter {
            background: linear-gradient(135deg, rgba(255, 145, 77, 0.16), rgba(255, 237, 213, 0.94)) !important;
            border-color: rgba(255, 145, 77, 0.36) !important;
            color: #9a3412 !important;
        }

        body[data-theme="light"] #tradeHistoryList > div {
            color: rgba(71, 85, 105, 0.86) !important;
        }

        body[data-theme="light"] #tradeHistoryList,
        body[data-theme="light"] #tradeHistoryList .trade-item,
        body[data-theme="light"] #tradeHistoryList .trade-item div,
        body[data-theme="light"] #tradeHistoryList .trade-item strong {
            color: #0f172a !important;
        }

        body[data-theme="light"] #tradeHistoryList .trade-item .trade-pnl-positive,
        body[data-theme="light"] #tradeHistoryList .trade-item .trade-pnl-positive * {
            color: #22c55e !important;
        }

        body[data-theme="light"] #tradeHistoryList .trade-item .trade-pnl-negative,
        body[data-theme="light"] #tradeHistoryList .trade-item .trade-pnl-negative * {
            color: #ef4444 !important;
        }

        body[data-theme="light"] #tradeHistoryList .trade-item .trade-pnl-neutral,
        body[data-theme="light"] #tradeHistoryList .trade-item .trade-pnl-neutral * {
            color: #94a3b8 !important;
        }

        body[data-theme="light"] #tradeHistoryList .material-icons {
            color: rgba(51, 65, 85, 0.72) !important;
        }

        body[data-theme="light"] .chart-style-menu,
        body[data-theme="light"] #indicatorsMenu,
        body[data-theme="light"] #miniTfList {
            background: linear-gradient(180deg, rgba(226, 232, 240, 0.94), rgba(241, 245, 249, 0.98)) !important;
            border-color: rgba(148, 163, 184, 0.24) !important;
            box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12) !important;
            color: #0f172a !important;
        }

        body[data-theme="light"] .chart-style-menu__header,
        body[data-theme="light"] .chart-style-menu__hint,
        body[data-theme="light"] .chart-type-option,
        body[data-theme="light"] #indicatorsMenu span:not(.material-icons),
        body[data-theme="light"] #indicatorsMenu .indicators-menu__title,
        body[data-theme="light"] #indicatorsMenu .indicators-menu__header,
        body[data-theme="light"] #miniTfList,
        body[data-theme="light"] #miniTfList .tick-tf-value {
            color: #0f172a !important;
        }

        body[data-theme="light"] .chart-style-menu__list,
        body[data-theme="light"] .chart-style-menu__preview-box,
        body[data-theme="light"] #indicatorsMenu .indicator-card,
        body[data-theme="light"] #indicatorsMenu .indicators-search__input,
        body[data-theme="light"] #miniTfToggle,
        body[data-theme="light"] #miniChartStyleBtn,
        body[data-theme="light"] #miniIndicatorsBtn,
        body[data-theme="light"] #miniTfList .mini-tf-btn {
            background: rgba(255, 255, 255, 0.96) !important;
            border-color: rgba(148, 163, 184, 0.24) !important;
            color: #0f172a !important;
            box-shadow: none !important;
        }

        body[data-theme="light"] #chartStyleMenu {
            --chart-style-menu-surface-strong: rgba(255, 255, 255, 0.98);
            --chart-style-menu-surface-soft: rgba(241, 245, 249, 0.94);
            --chart-style-menu-border: rgba(148, 163, 184, 0.22);
            --chart-style-menu-card-bg: rgba(255, 255, 255, 0.68);
            --chart-style-menu-preview-bg: rgba(255, 255, 255, 0.62);
            --chart-style-menu-shadow: 0 20px 44px rgba(15, 23, 42, 0.14);
        }

        body[data-theme="light"] #chartStyleMenu .chart-style-menu__header {
            border-bottom: 1px solid rgba(148, 163, 184, 0.18);
        }

        body[data-theme="light"] #chartStyleMenu .chart-style-menu__title,
        body[data-theme="light"] #chartStyleMenu .chart-style-menu__hint,
        body[data-theme="light"] #chartStyleMenu .chart-type-option,
        body[data-theme="light"] #chartStyleMenu .chart-type-option .material-icons,
        body[data-theme="light"] #chartStyleMenu .chart-style-color-title,
        body[data-theme="light"] #chartStyleMenu .chart-style-custom-row,
        body[data-theme="light"] #chartStyleMenu .chart-style-custom-row span {
            color: #0f172a !important;
        }

        body[data-theme="light"] #chartStyleMenu .chart-style-menu__list,
        body[data-theme="light"] #chartStyleMenu .chart-style-color-group,
        body[data-theme="light"] #chartStyleMenu .chart-style-surface-group {
            background: var(--chart-style-menu-card-bg) !important;
            border: 1px solid var(--chart-style-menu-border);
        }

        body[data-theme="light"] #chartStyleMenu .chart-style-menu__preview-box {
            background: var(--chart-style-menu-preview-bg) !important;
            border-color: var(--chart-style-menu-border) !important;
        }

        body[data-theme="light"] #chartStyleMenu .chart-type-option:hover {
            background: rgba(255, 145, 77, 0.12) !important;
            color: #9a3412 !important;
        }

        body[data-theme="light"] #chartStyleMenu .chart-type-option:hover .material-icons {
            color: #9a3412 !important;
        }

        body[data-theme="light"] #chartStyleMenu .chart-type-option.selected {
            background: linear-gradient(135deg, rgba(255, 145, 77, 0.16), rgba(255, 237, 213, 0.94)) !important;
            color: #9a3412 !important;
        }

        body[data-theme="light"] #chartStyleMenu .chart-type-option.selected .material-icons {
            color: #c2410c !important;
        }

        body[data-theme="light"] #chartStyleMenu .chart-style-current {
            border-color: rgba(148, 163, 184, 0.26) !important;
            box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 4px 10px rgba(15, 23, 42, 0.08) !important;
        }

        body[data-theme="dark"] #chartStyleMenu .chart-style-current {
            border-color: rgba(255, 255, 255, 0.18) !important;
            box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.44), 0 4px 10px rgba(0, 0, 0, 0.28) !important;
        }

        body[data-theme="light"] #chartStyleMenu .chart-style-palette {
            background: linear-gradient(180deg, rgba(226, 232, 240, 0.94), rgba(248, 250, 252, 0.98)) !important;
            border-color: rgba(148, 163, 184, 0.22) !important;
        }

        body[data-theme="light"] #chartStyleMenu .chart-style-palette__swatch {
            border-color: rgba(148, 163, 184, 0.28) !important;
        }

        body[data-theme="light"] #chartStyleMenu .chart-style-palette__add {
            border-color: rgba(148, 163, 184, 0.36) !important;
            color: rgba(15, 23, 42, 0.74) !important;
        }

        body[data-theme="light"] #chartStyleMenu .chart-style-custom-row {
            background: rgba(255, 255, 255, 0.92) !important;
            border-color: rgba(148, 163, 184, 0.2) !important;
            box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08) !important;
        }

        body[data-theme="light"] #chartStyleMenu .chart-style-custom-row input[type="color"] {
            border-color: rgba(148, 163, 184, 0.28) !important;
            background: #ffffff !important;
        }

        body[data-theme="light"] #chartStyleMenu .chart-style-opacity-control,
        body[data-theme="light"] #chartStyleMenu .chart-style-opacity-control strong {
            color: #0f172a !important;
        }

        body[data-theme="dark"] #chartStyleMenu {
            --chart-style-menu-surface-strong: rgba(51, 65, 85, 0.92);
            --chart-style-menu-surface-soft: rgba(15, 23, 42, 0.88);
            --chart-style-menu-border: rgba(148, 163, 184, 0.16);
            --chart-style-menu-card-bg: rgba(15, 23, 42, 0.18);
            --chart-style-menu-preview-bg: rgba(15, 23, 42, 0.32);
            --chart-style-menu-shadow: 0 18px 40px rgba(0, 0, 0, 0.52);
        }

        body[data-theme="light"] .chart-type-option:hover,
        body[data-theme="light"] #miniTfList .mini-tf-btn:hover {
            background: rgba(255, 145, 77, 0.1) !important;
            color: #9a3412 !important;
        }

        body[data-theme="light"] #miniTfList .mini-tf-btn.selected {
            background: linear-gradient(135deg, rgba(255, 145, 77, 0.16), rgba(255, 237, 213, 0.94)) !important;
            border-color: rgba(255, 145, 77, 0.4) !important;
            color: #9a3412 !important;
        }

        body[data-theme="light"] div[id$="Panel"][style*="backdrop-filter"]:not(#slidePanel):not(#tradeHistoryPanel):not(#settingsPanel):not(#drawingsPanel):not(#analysisPanel):not(#optionsPanel):not(#derivPanel):not(#strategiesPanel):not(#pinescriptPanel),
        body[data-theme="light"] div[id$="Modal"][style*="backdrop-filter"] {
            background: rgba(248, 250, 252, 0.18) !important;
            border: 1px solid rgba(255, 255, 255, 0.22) !important;
            box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14), 0 0 48px rgba(255, 145, 77, 0.08) !important;
            backdrop-filter: blur(16px) saturate(1.15) !important;
            -webkit-backdrop-filter: blur(16px) saturate(1.15) !important;
        }

        body[data-theme="light"] div[id$="Panel"][style*="backdrop-filter"] .panel-header,
        body[data-theme="light"] div[id$="Modal"][style*="backdrop-filter"] .panel-header {
            background: rgba(255, 255, 255, 0.12) !important;
            border-bottom: 1px solid rgba(255, 255, 255, 0.16) !important;
        }

        body[data-theme="light"] div[id$="Panel"][style*="backdrop-filter"] .panel-header > span:not(.material-icons),
        body[data-theme="light"] div[id$="Modal"][style*="backdrop-filter"] .panel-header > span:not(.material-icons),
        body[data-theme="light"] div[id$="Modal"][style*="backdrop-filter"] h3,
        body[data-theme="light"] div[id$="Modal"][style*="backdrop-filter"] label,
        body[data-theme="light"] div[id$="Modal"][style*="backdrop-filter"] span:not(.material-icons) {
            color: #0f172a !important;
        }

        body[data-theme="light"] div[id$="Panel"][style*="backdrop-filter"],
        body[data-theme="light"] div[id$="Modal"][style*="backdrop-filter"] {
            font-size: 12px !important;
        }

        body[data-theme="light"] div[id$="Panel"][style*="backdrop-filter"] h3,
        body[data-theme="light"] div[id$="Modal"][style*="backdrop-filter"] h3 {
            font-size: 15px !important;
        }

        body[data-theme="light"] div[id$="Panel"][style*="backdrop-filter"] h4,
        body[data-theme="light"] div[id$="Modal"][style*="backdrop-filter"] h4,
        body[data-theme="light"] div[id$="Panel"][style*="backdrop-filter"] label,
        body[data-theme="light"] div[id$="Modal"][style*="backdrop-filter"] label {
            font-size: 11px !important;
        }

        body[data-theme="light"] div[id$="Panel"][style*="backdrop-filter"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
        body[data-theme="light"] div[id$="Panel"][style*="backdrop-filter"] select,
        body[data-theme="light"] div[id$="Panel"][style*="backdrop-filter"] textarea,
        body[data-theme="light"] div[id$="Modal"][style*="backdrop-filter"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
        body[data-theme="light"] div[id$="Modal"][style*="backdrop-filter"] select,
        body[data-theme="light"] div[id$="Modal"][style*="backdrop-filter"] textarea,
        body[data-theme="light"] div[id$="Panel"][style*="backdrop-filter"] button:not(.material-icons),
        body[data-theme="light"] div[id$="Modal"][style*="backdrop-filter"] button:not(.material-icons) {
            font-size: 12px !important;
        }

        body[data-theme="light"] div[id$="Panel"][style*="backdrop-filter"] .panel-reset,
        body[data-theme="light"] div[id$="Panel"][style*="backdrop-filter"] .panel-settings,
        body[data-theme="light"] div[id$="Modal"][style*="backdrop-filter"] .panel-reset,
        body[data-theme="light"] div[id$="Modal"][style*="backdrop-filter"] .panel-settings {
            color: rgba(51, 65, 85, 0.72) !important;
        }

        body[data-theme="light"] div[id$="Panel"][style*="backdrop-filter"] .panel-close,
        body[data-theme="light"] div[id$="Modal"][style*="backdrop-filter"] .panel-close {
            color: rgba(220, 38, 38, 0.72) !important;
        }

        body[data-theme="light"] div[id$="Panel"][style*="backdrop-filter"] path,
        body[data-theme="light"] div[id$="Modal"][style*="backdrop-filter"] path {
            stroke: rgba(100, 116, 139, 0.72) !important;
        }

        body[data-theme="light"] div[id$="Panel"][style*="backdrop-filter"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
        body[data-theme="light"] div[id$="Panel"][style*="backdrop-filter"] select,
        body[data-theme="light"] div[id$="Panel"][style*="backdrop-filter"] textarea,
        body[data-theme="light"] div[id$="Modal"][style*="backdrop-filter"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
        body[data-theme="light"] div[id$="Modal"][style*="backdrop-filter"] select,
        body[data-theme="light"] div[id$="Modal"][style*="backdrop-filter"] textarea {
            background: rgba(255, 255, 255, 0.2) !important;
            color: #0f172a !important;
            border: 1px solid rgba(255, 255, 255, 0.24) !important;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
        }

        body[data-theme="light"] div[id$="Panel"][style*="backdrop-filter"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):focus,
        body[data-theme="light"] div[id$="Panel"][style*="backdrop-filter"] select:focus,
        body[data-theme="light"] div[id$="Panel"][style*="backdrop-filter"] textarea:focus,
        body[data-theme="light"] div[id$="Modal"][style*="backdrop-filter"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):focus,
        body[data-theme="light"] div[id$="Modal"][style*="backdrop-filter"] select:focus,
        body[data-theme="light"] div[id$="Modal"][style*="backdrop-filter"] textarea:focus {
            border-color: rgba(255, 145, 77, 0.46) !important;
            box-shadow: 0 0 0 2px rgba(255, 145, 77, 0.12) !important;
        }

        body[data-theme="light"] div[id$="Panel"][style*="backdrop-filter"] button:not(.material-icons),
        body[data-theme="light"] div[id$="Modal"][style*="backdrop-filter"] button:not(.material-icons) {
            backdrop-filter: blur(10px) !important;
            -webkit-backdrop-filter: blur(10px) !important;
            font-family: 'Rajdhani', sans-serif !important;
            color: #0f172a !important;
        }

        body[data-theme="light"] div[id$="Panel"][style*="backdrop-filter"] .material-icons,
        body[data-theme="light"] div[id$="Modal"][style*="backdrop-filter"] .material-icons,
        body[data-theme="light"] div[id$="Panel"][style*="backdrop-filter"] i[data-lucide],
        body[data-theme="light"] div[id$="Modal"][style*="backdrop-filter"] i[data-lucide] {
            color: rgba(51, 65, 85, 0.82) !important;
            stroke: rgba(51, 65, 85, 0.82) !important;
        }

        body[data-theme="light"] div[id$="Panel"][style*="backdrop-filter"] button[id*="cancel" i],
        body[data-theme="light"] div[id$="Modal"][style*="backdrop-filter"] button[id*="cancel" i],
        body[data-theme="light"] div[id$="Panel"][style*="backdrop-filter"] button[title*="cancel" i],
        body[data-theme="light"] div[id$="Modal"][style*="backdrop-filter"] button[title*="cancel" i],
        body[data-theme="light"] div[id$="Panel"][style*="backdrop-filter"] button[title*="cerrar" i],
        body[data-theme="light"] div[id$="Modal"][style*="backdrop-filter"] button[title*="cerrar" i],
        body[data-theme="light"] .indicator-template-modal__btn--ghost,
        body[data-theme="light"] .drawing-popup .popup-actions button:first-child {
            background: rgba(220, 38, 38, 0.14) !important;
            border: 1px solid rgba(220, 38, 38, 0.3) !important;
            color: #991b1b !important;
            box-shadow: none !important;
        }

        body[data-theme="light"] div[id$="Panel"][style*="backdrop-filter"] button[id*="cancel" i]:hover,
        body[data-theme="light"] div[id$="Modal"][style*="backdrop-filter"] button[id*="cancel" i]:hover,
        body[data-theme="light"] .indicator-template-modal__btn--ghost:hover,
        body[data-theme="light"] .drawing-popup .popup-actions button:first-child:hover {
            background: rgba(220, 38, 38, 0.2) !important;
            border-color: rgba(220, 38, 38, 0.42) !important;
            color: #7f1d1d !important;
        }

        body[data-theme="light"] .drawing-popup {
            background: rgba(248, 250, 252, 0.18);
            border: 1px solid rgba(255, 255, 255, 0.24);
            box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14), 0 0 48px rgba(255, 145, 77, 0.08);
            backdrop-filter: blur(16px) saturate(1.15);
            -webkit-backdrop-filter: blur(16px) saturate(1.15);
        }

        body[data-theme="light"] .drawing-popup h4 {
            color: #c2410c;
            text-shadow: none;
            font-size: 11px;
        }

        body[data-theme="light"] .drawing-popup label {
            color: rgba(30, 41, 59, 0.82);
            font-size: 10px;
        }

        body[data-theme="light"] .drawing-popup input,
        body[data-theme="light"] .drawing-popup select {
            background: rgba(255, 255, 255, 0.22);
            border: 1px solid rgba(255, 255, 255, 0.24);
            color: #0f172a;
            font-size: 11px;
        }

        body[data-theme="light"] .drawing-popup input:focus,
        body[data-theme="light"] .drawing-popup select:focus {
            border-color: rgba(255, 145, 77, 0.46);
            box-shadow: 0 0 0 2px rgba(255, 145, 77, 0.12);
        }

        body[data-theme="light"] .drawing-popup button {
            border-color: rgba(255, 145, 77, 0.34);
            background: rgba(255, 145, 77, 0.14);
            color: #0f172a;
            box-shadow: none;
            font-family: 'Rajdhani', sans-serif;
            font-size: 10px;
        }

        body[data-theme="light"] .drawing-popup button.danger {
            border-color: rgba(220, 38, 38, 0.34);
            background: rgba(220, 38, 38, 0.14);
            color: #991b1b;
        }

        body[data-theme="light"] .indicator-template-modal__panel {
            background: rgba(248, 250, 252, 0.18);
            border: 1px solid rgba(255, 255, 255, 0.24);
            box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
            backdrop-filter: blur(18px) saturate(1.15);
            -webkit-backdrop-filter: blur(18px) saturate(1.15);
        }

        body[data-theme="light"] .indicator-template-modal__title,
        body[data-theme="light"] .indicator-template-modal__message,
        body[data-theme="light"] .indicator-template-modal__label {
            color: #0f172a;
        }

        body[data-theme="light"] .indicator-template-modal__title {
            font-size: 15px;
        }

        body[data-theme="light"] .indicator-template-modal__message,
        body[data-theme="light"] .indicator-template-modal__label,
        body[data-theme="light"] .indicator-template-modal__input,
        body[data-theme="light"] .indicator-template-modal__select,
        body[data-theme="light"] .indicator-template-modal__btn {
            font-size: 12px;
        }

        body[data-theme="light"] .indicator-template-modal__input,
        body[data-theme="light"] .indicator-template-modal__select {
            background: rgba(255, 255, 255, 0.22);
            border: 1px solid rgba(255, 255, 255, 0.24);
            color: #0f172a;
        }

        body[data-theme="light"] .indicator-template-modal__btn--ghost {
            background: rgba(220, 38, 38, 0.14);
            border-color: rgba(220, 38, 38, 0.3);
            color: #991b1b;
        }

        body[data-theme="light"] .indicator-template-modal__btn--ghost:hover {
            background: rgba(220, 38, 38, 0.2);
            border-color: rgba(220, 38, 38, 0.42);
            color: #7f1d1d;
        }

        body[data-theme="light"] #chartZellaModal {
            background: rgba(15, 23, 42, 0.18) !important;
            backdrop-filter: blur(8px) !important;
            -webkit-backdrop-filter: blur(8px) !important;
        }

        body[data-theme="light"] #chartZellaModal .cz-journal {
            background: rgba(248, 250, 252, 0.14) !important;
            backdrop-filter: blur(12px) !important;
            -webkit-backdrop-filter: blur(12px) !important;
        }

        body[data-theme="light"] #chartZellaModal .chartzella-modal {
            background: rgba(248, 250, 252, 0.18) !important;
            border: 1px solid rgba(255, 255, 255, 0.24) !important;
            box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16), 0 0 48px rgba(255, 145, 77, 0.08) !important;
            backdrop-filter: blur(18px) saturate(1.15) !important;
            -webkit-backdrop-filter: blur(18px) saturate(1.15) !important;
        }

        body[data-theme="light"] #chartZellaModal .chartzella-close {
            background: rgba(255, 255, 255, 0.16);
            color: #c2410c;
            border: 1px solid rgba(255, 145, 77, 0.24);
        }

        body[data-theme="light"] #chartZellaModal .chartzella-close:hover {
            background: rgba(255, 145, 77, 0.14);
            color: #9a3412;
        }

        body[data-theme="light"] #chartZellaModal .chartzella-caption,
        body[data-theme="light"] #chartZellaModal .cz-range-title__label,
        body[data-theme="light"] #chartZellaModal .cz-range-field span,
        body[data-theme="light"] #chartZellaModal .cz-journal-label,
        body[data-theme="light"] #chartZellaModal .cz-mini-title,
        body[data-theme="light"] #chartZellaModal .cz-card-label,
        body[data-theme="light"] #chartZellaModal .cz-side-head,
        body[data-theme="light"] #chartZellaModal .cz-weekly h4,
        body[data-theme="light"] #chartZellaModal .cz-cal-title,
        body[data-theme="light"] #chartZellaModal .cz-day.header,
        body[data-theme="light"] #chartZellaModal .cz-kpi-title,
        body[data-theme="light"] #chartZellaModal .cz-journal-subtitle {
            color: #c2410c !important;
        }

        body[data-theme="light"] #chartZellaModal .cz-journal-date,
        body[data-theme="light"] #chartZellaModal .cz-range-title__value,
        body[data-theme="light"] #chartZellaModal .cz-mini-value,
        body[data-theme="light"] #chartZellaModal .cz-card-value,
        body[data-theme="light"] #chartZellaModal .cz-kpi-value,
        body[data-theme="light"] #chartZellaModal .cz-text,
        body[data-theme="light"] #chartZellaModal .cz-list-item span,
        body[data-theme="light"] #chartZellaModal .cz-week-row,
        body[data-theme="light"] #chartZellaModal .cz-week-stat,
        body[data-theme="light"] #chartZellaModal .cz-day,
        body[data-theme="light"] #chartZellaModal .cz-journal-row,
        body[data-theme="light"] #chartZellaModal .cz-journal-empty,
        body[data-theme="light"] #chartZellaModal .cz-journal-meta,
        body[data-theme="light"] #chartZellaModal #czJournalFilteredCount,
        body[data-theme="light"] #chartZellaModal .cz-card-sub,
        body[data-theme="light"] #chartZellaModal .cz-kpi-sub,
        body[data-theme="light"] #chartZellaModal .cz-best-date,
        body[data-theme="light"] #chartZellaModal .cz-trades-count,
        body[data-theme="light"] #chartZellaModal .cz-bar::after,
        body[data-theme="light"] #chartZellaModal .cz-cal-days span {
            color: #0f172a !important;
        }

        body[data-theme="light"] #chartZellaModal .cz-journal,
        body[data-theme="light"] #chartZellaModal .cz-range-bar,
        body[data-theme="light"] #chartZellaModal .cz-loading-card,
        body[data-theme="light"] #chartZellaModal .cz-mini-card,
        body[data-theme="light"] #chartZellaModal .cz-journal-inner,
        body[data-theme="light"] #chartZellaModal .cz-journal-chart-card,
        body[data-theme="light"] #chartZellaModal .cz-journal-trades,
        body[data-theme="light"] #chartZellaModal .cz-journal-notes,
        body[data-theme="light"] #chartZellaModal .cz-top-card,
        body[data-theme="light"] #chartZellaModal .cz-kpi,
        body[data-theme="light"] #chartZellaModal .cz-chart-card,
        body[data-theme="light"] #chartZellaModal .cz-calendar,
        body[data-theme="light"] #chartZellaModal .cz-weekly,
        body[data-theme="light"] #chartZellaModal .cz-sidecard,
        body[data-theme="light"] #chartZellaModal .cz-calendar-col,
        body[data-theme="light"] #chartZellaModal .cz-list-item,
        body[data-theme="light"] #chartZellaModal .cz-journal-item {
            background: rgba(255, 255, 255, 0.14) !important;
            border: 1px solid rgba(255, 255, 255, 0.2) !important;
            box-shadow: none !important;
        }

        body[data-theme="light"] #chartZellaModal .cz-journal-filter span {
            color: rgba(154, 52, 18, 0.92) !important;
        }

        body[data-theme="light"] #chartZellaModal .cz-journal-filter select,
        body[data-theme="light"] #chartZellaModal .cz-range-field input,
        body[data-theme="light"] #chartZellaModal .cz-journal-notes textarea {
            background: rgba(255, 255, 255, 0.2) !important;
            border: 1px solid rgba(255, 255, 255, 0.24) !important;
            color: #0f172a !important;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
        }

        body[data-theme="light"] #chartZellaModal .cz-range-apply,
        body[data-theme="light"] #chartZellaModal .cz-journal-save,
        body[data-theme="light"] #chartZellaModal .cz-journal-close,
        body[data-theme="light"] #chartZellaModal .cz-cal-nav button {
            background: rgba(255, 145, 77, 0.14) !important;
            border: 1px solid rgba(255, 145, 77, 0.28) !important;
            color: #9a3412 !important;
            box-shadow: none !important;
        }

        body[data-theme="light"] #chartZellaModal .cz-journal-close:hover,
        body[data-theme="light"] #chartZellaModal .cz-journal-save:hover {
            background: rgba(255, 145, 77, 0.2) !important;
            border-color: rgba(255, 145, 77, 0.36) !important;
        }

        body[data-theme="light"] #chartZellaModal .cz-range-field input::-webkit-calendar-picker-indicator {
            filter: invert(22%) sepia(69%) saturate(1768%) hue-rotate(354deg) brightness(94%) contrast(90%);
            opacity: 0.86;
        }

        body[data-theme="light"] #chartZellaModal .cz-loading-text {
            color: #0f172a !important;
        }

        body[data-theme="light"] #chartZellaModal .cz-loading-spinner {
            border-color: rgba(148, 163, 184, 0.28);
            border-top-color: #ff914d;
        }

        @media (max-width: 1100px) {
            .cz-range-bar {
                grid-template-columns: 1fr 1fr;
            }

            .cz-range-title {
                grid-column: 1 / -1;
            }

            .cz-range-apply {
                grid-column: 1 / -1;
            }
        }

        body[data-theme="light"] #chartZellaModal .cz-card-value.is-positive,
        body[data-theme="light"] #chartZellaModal .cz-journal-pnl.positive,
        body[data-theme="light"] #chartZellaModal .cz-list-item .pnl-pos,
        body[data-theme="light"] #chartZellaModal .cz-month-net.pos,
        body[data-theme="light"] #chartZellaModal .cz-best-net.pos,
        body[data-theme="light"] #chartZellaModal .cz-day.win,
        body[data-theme="light"] #chartZellaModal .cz-day-pnl.pos {
            color: #16a34a !important;
        }

        body[data-theme="light"] #chartZellaModal .cz-card-value.is-negative,
        body[data-theme="light"] #chartZellaModal .cz-journal-pnl.negative,
        body[data-theme="light"] #chartZellaModal .cz-list-item .pnl-neg,
        body[data-theme="light"] #chartZellaModal .cz-month-net.neg,
        body[data-theme="light"] #chartZellaModal .cz-best-net.neg,
        body[data-theme="light"] #chartZellaModal .cz-day.loss,
        body[data-theme="light"] #chartZellaModal .cz-day-pnl.neg {
            color: #dc2626 !important;
        }

        body[data-theme="light"] #chartZellaModal .chartzella-body::-webkit-scrollbar,
        body[data-theme="light"] #chartZellaModal .cz-list::-webkit-scrollbar,
        body[data-theme="light"] #chartZellaModal .cz-journal-list::-webkit-scrollbar,
        body[data-theme="light"] #chartZellaModal .cz-left::-webkit-scrollbar,
        body[data-theme="light"] #chartZellaModal .cz-right::-webkit-scrollbar {
            width: 8px;
            height: 8px;
        }

        body[data-theme="light"] #chartZellaModal .chartzella-body::-webkit-scrollbar-track,
        body[data-theme="light"] #chartZellaModal .cz-list::-webkit-scrollbar-track,
        body[data-theme="light"] #chartZellaModal .cz-journal-list::-webkit-scrollbar-track,
        body[data-theme="light"] #chartZellaModal .cz-left::-webkit-scrollbar-track,
        body[data-theme="light"] #chartZellaModal .cz-right::-webkit-scrollbar-track {
            background: transparent;
        }

        body[data-theme="light"] #chartZellaModal .chartzella-body::-webkit-scrollbar-thumb,
        body[data-theme="light"] #chartZellaModal .cz-list::-webkit-scrollbar-thumb,
        body[data-theme="light"] #chartZellaModal .cz-journal-list::-webkit-scrollbar-thumb,
        body[data-theme="light"] #chartZellaModal .cz-left::-webkit-scrollbar-thumb,
        body[data-theme="light"] #chartZellaModal .cz-right::-webkit-scrollbar-thumb {
            background: rgba(148, 163, 184, 0.22);
            border-radius: 999px;
        }

        body[data-theme="light"] #chartZellaModal #czWeeklyRows,
        body[data-theme="light"] #chartZellaModal .cz-weekly-column {
            background: transparent !important;
        }

        body[data-theme="light"] #chartZellaModal #czWeeklyRows .cz-week-row,
        body[data-theme="light"] #chartZellaModal .cz-weekly-column .cz-week-row {
            background: rgba(255, 255, 255, 0.16) !important;
            border: 1px solid rgba(255, 255, 255, 0.22) !important;
            box-shadow: none !important;
            color: #0f172a !important;
        }

        body[data-theme="light"] #chartZellaModal #czWeeklyRows .cz-week-range,
        body[data-theme="light"] #chartZellaModal .cz-weekly-column .cz-week-range {
            color: #9a3412 !important;
        }

        body[data-theme="light"] #chartZellaModal #czWeeklyRows .cz-week-trades,
        body[data-theme="light"] #chartZellaModal .cz-weekly-column .cz-week-trades {
            color: rgba(71, 85, 105, 0.82) !important;
        }

        body[data-theme="light"] #derivPanel,
        body[data-theme="light"] #derivPanel * {
            text-shadow: none !important;
        }

        body[data-theme="light"] #derivPanel .deriv-panel-title,
        body[data-theme="light"] #derivPanel .deriv-step-title,
        body[data-theme="light"] #derivPanel .deriv-step-title--center,
        body[data-theme="light"] #derivPanel .deriv-step-desc,
        body[data-theme="light"] #derivPanel .deriv-step-status,
        body[data-theme="light"] #derivPanel .deriv-panel-substatus,
        body[data-theme="light"] #derivPanel .deriv-referral-desc,
        body[data-theme="light"] #derivPanel .deriv-referral-status {
            color: #0f172a !important;
        }

        body[data-theme="light"] #derivPanel .deriv-panel-substatus,
        body[data-theme="light"] #derivPanel .deriv-referral-desc,
        body[data-theme="light"] #derivPanel .deriv-referral-status,
        body[data-theme="light"] #derivPanel .deriv-step-desc,
        body[data-theme="light"] #derivPanel .deriv-step-status {
            color: rgba(71, 85, 105, 0.86) !important;
        }

        body[data-theme="light"] #derivPanel .deriv-step {
            background: rgba(255, 255, 255, 0.96);
            border-color: rgba(148, 163, 184, 0.24);
            box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
        }

        body[data-theme="light"] #derivPanel #derivAccountsStep,
        body[data-theme="light"] #derivPanel #derivAccountsStep.is-active,
        body[data-theme="light"] #derivPanel #derivAccountsStep.is-complete {
            background: transparent !important;
            border: none !important;
            box-shadow: none !important;
            padding: 0 !important;
        }

        body[data-theme="light"] #derivPanel .deriv-steps--compact .deriv-step,
        body[data-theme="light"] #derivPanel .deriv-steps--compact .deriv-step.is-active,
        body[data-theme="light"] #derivPanel .deriv-steps--compact .deriv-step.is-complete {
            box-shadow: none !important;
        }

        body[data-theme="light"] #derivPanel .deriv-step.is-active,
        body[data-theme="light"] #derivPanel .deriv-step.is-complete {
            border-color: rgba(255, 145, 77, 0.42);
            box-shadow: 0 10px 22px rgba(255, 145, 77, 0.12);
        }

        body[data-theme="light"] #derivPanel .deriv-step-indicator {
            background: rgba(148, 163, 184, 0.12);
            border-color: rgba(148, 163, 184, 0.3);
            color: #334155;
        }

        body[data-theme="light"] #derivPanel .deriv-step.is-active .deriv-step-indicator,
        body[data-theme="light"] #derivPanel .deriv-step.is-complete .deriv-step-indicator {
            background: rgba(255, 145, 77, 0.14);
            border-color: rgba(255, 145, 77, 0.46);
            color: #9a3412;
        }

        body[data-theme="light"] #derivPanel .deriv-step-btn {
            color: #9a3412;
            box-shadow: 0 8px 18px rgba(255, 145, 77, 0.12);
        }

        body[data-theme="light"] #derivPanel .deriv-step-btn.secondary,
        body[data-theme="light"] #derivPanel .deriv-panel-btn {
            background: rgba(255, 255, 255, 0.96);
            border-color: rgba(148, 163, 184, 0.28);
            color: #0f172a;
            box-shadow: 0 6px 14px rgba(15, 23, 42, 0.05);
        }

        body[data-theme="light"] #derivPanel .deriv-step-btn.secondary:hover,
        body[data-theme="light"] #derivPanel .deriv-panel-btn:hover {
            background: #ffffff;
            border-color: rgba(100, 116, 139, 0.38);
            color: #020617;
        }

        body[data-theme="light"] #derivPanel .deriv-panel-image-btn:hover .deriv-panel-image-btn__img {
            filter: drop-shadow(0 0 14px rgba(255, 145, 77, 0.68)) drop-shadow(0 0 22px rgba(255, 145, 77, 0.32));
        }

        body[data-theme="light"] #derivPanel .deriv-referral-input {
            background: rgba(255, 255, 255, 0.98);
            border-color: rgba(148, 163, 184, 0.28);
            color: #0f172a;
        }

        body[data-theme="light"] #derivPanel .deriv-referral-input::placeholder {
            color: rgba(100, 116, 139, 0.7);
        }

        body[data-theme="light"] #derivPanel .deriv-panel-logo {
            filter: saturate(0.9) contrast(1.02);
        }

        /* 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: linear-gradient(180deg, var(--chart-style-menu-surface-strong, rgba(31, 41, 55, 0.92)), var(--chart-style-menu-surface-soft, rgba(12, 13, 20, 0.9)));
            border: 1px solid var(--chart-style-menu-border, rgba(255, 255, 255, 0.12));
            border-radius: 10px;
            max-height: 0;
            overflow-x: hidden;
            overflow-y: auto;
            opacity: 0;
            transition: max-height 0.3s ease, opacity 0.3s ease;
            box-shadow: var(--chart-style-menu-shadow, 0 18px 40px rgba(0, 0, 0, 0.65));
            width: min(92vw, 560px);
            min-width: min(92vw, 560px);
            font-family: 'Rajdhani', sans-serif;
            z-index: 25000;
            backdrop-filter: blur(14px);
        }

        .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: minmax(180px, 0.92fr) minmax(320px, 1.25fr);
            gap: 14px;
            padding: 14px;
        }

        .chart-style-menu__list {
            display: flex;
            flex-direction: column;
            gap: 6px;
            padding: 6px;
            border-radius: 8px;
            background: var(--chart-style-menu-card-bg, rgba(255, 255, 255, 0.03));
            border: 1px solid var(--chart-style-menu-border, rgba(255, 255, 255, 0.08));
        }

        .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-top {
            display: grid;
            grid-template-columns: minmax(0, 1fr) 150px;
            gap: 10px;
            align-items: stretch;
        }

        .chart-style-menu__preview-box,
        .chart-style-menu__colors {
            min-height: 100%;
        }

.chart-style-menu__preview-box {
    border-radius: 8px;
    padding: 10px;
    background: var(--chart-style-menu-preview-bg, rgba(7, 9, 14, 0.8));
    border: 1px solid var(--chart-style-menu-border, 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: 1fr;
    gap: 8px;
    align-content: stretch;
}

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

.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-opacity-control {
    display: grid;
    width: 100%;
    grid-template-columns: auto auto minmax(0, 1fr);
    grid-template-areas:
        "label value slider";
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.76);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 2px 0;
}

.chart-style-opacity-control span {
    grid-area: label;
}

.chart-style-opacity-control strong {
    grid-area: value;
    min-width: 38px;
    text-align: right;
    color: rgba(255, 255, 255, 0.86);
}

.chart-style-opacity-control input[type="range"] {
    grid-area: slider;
    width: 100%;
    accent-color: #ff914d;
    cursor: pointer;
}

.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);
            left: 0;
            right: auto;
            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.is-active {
            border-color: rgba(59, 130, 246, 0.72);
            background: rgba(30, 64, 175, 0.24);
            box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2);
        }

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

        .indicator-template-item__active {
            display: none;
            flex: 0 0 auto;
            padding: 2px 6px;
            border-radius: 999px;
            background: rgba(59, 130, 246, 0.2);
            color: #93c5fd;
            font-size: 10px;
            line-height: 1;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }

        .indicator-template-item.is-active .indicator-template-item__active {
            display: inline-flex;
            align-items: center;
        }

        .indicator-template-item__delete {
            flex: 0 0 auto;
            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__tools {
            display: flex;
            align-items: center;
            gap: 10px;
            min-width: 0;
            flex: 0 0 auto;
        }

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

        .indicators-menu__title--inline {
            flex-direction: row;
            align-items: center;
            gap: 0;
            margin-left: auto;
            white-space: nowrap;
        }

        .indicators-search {
            display: flex;
            align-items: center;
            width: clamp(170px, 24vw, 260px);
            min-width: 0;
        }

        .indicators-search__toggle {
            display: none;
            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: 100%;
            opacity: 1;
            padding: 4px 8px;
            overflow: visible;
            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: none;
            pointer-events: auto;
            transition: border-color 0.18s ease, box-shadow 0.18s 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__input:focus-within {
            border-color: rgba(255, 145, 77, 0.58);
            box-shadow: 0 0 0 1px rgba(255, 145, 77, 0.22);
        }

        .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);
        }

        @keyframes strategyTabAlertBlink {
            0%, 100% {
                border-color: rgba(255, 82, 82, 0.9);
                box-shadow: 0 0 0 rgba(255, 82, 82, 0), 0 0 14px rgba(255, 82, 82, 0.25);
            }
            50% {
                border-color: rgba(255, 214, 102, 0.95);
                box-shadow: 0 0 0 rgba(255, 214, 102, 0), 0 0 20px rgba(255, 82, 82, 0.55);
            }
        }

        .symbol-tab.strategy-alert-pending:not(.active) {
            animation: strategyTabAlertBlink 1s ease-in-out infinite;
            background: rgba(255, 82, 82, 0.14) !important;
            border-color: rgba(255, 82, 82, 0.9) !important;
        }

        @keyframes strategyTabHitPulse {
            0% {
                transform: translateY(0);
                box-shadow: 0 0 0 rgba(255, 82, 82, 0), 0 0 0 rgba(255, 214, 102, 0);
            }
            35% {
                transform: translateY(-1px);
                box-shadow: 0 0 0 1px rgba(255, 214, 102, 0.35), 0 0 24px rgba(255, 82, 82, 0.55);
            }
            100% {
                transform: translateY(0);
                box-shadow: 0 0 0 rgba(255, 82, 82, 0), 0 0 0 rgba(255, 214, 102, 0);
            }
        }

        .symbol-tab.strategy-alert-hit:not(.active) {
            animation: strategyTabHitPulse 2s ease-out 1;
        }

        .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);
}


/* Modal buttons */
.modal-btn{
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}
.modal-btn:hover{
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.25);
}
.modal-btn.primary{
  background: linear-gradient(135deg, #ff9a5f 0%, #ff7043 100%);
  border-color: rgba(255,145,77,0.5);
  color: #0b1020;
  box-shadow: 0 6px 14px rgba(255,112,67,0.35);
}
.modal-btn.primary:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(255,112,67,0.45);
}
.modal-btn.secondary{
  background: rgba(255,255,255,0.05);
}
.trend-board__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.trend-board__title{
  font-size:14px;
  font-weight:700;
  letter-spacing:0.4px;
  color:#ffb07a;
}
.trend-board__meta{
  font-size:11px;
  color:#94a3b8;
}
.trend-board__refresh{
  background: rgba(255,145,77,0.12);
  border: 1px solid rgba(255,145,77,0.4);
  color: #ffb07a;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-weight: 700;
}
.trend-board__refresh:hover{background:rgba(255,145,77,0.2);box-shadow:0 6px 14px rgba(0,0,0,0.25)}

.trend-board__grid{
  display:grid;
  grid-template-columns: repeat(6, minmax(70px,1fr));
  gap:6px;
  align-items:stretch;
}
.trend-cell{
  padding:10px 8px;
  border-radius:10px;
  text-align:center;
  border:1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
  font-size:12px;
  font-weight:600;
}
.trend-cell--label{
  background: rgba(255,145,77,0.12);
  border-color: rgba(255,145,77,0.35);
  color:#ffb07a;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.4px;
}
.trend-cell--head{
  background: rgba(148,163,184,0.08);
  color:#cbd5e1;
  font-weight:700;
  border-color: rgba(255,255,255,0.08);
}
.trend-cell--value{
  font-size:13px;
  font-weight:700;
  letter-spacing:0.2px;
  color:#e2e8f0;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.trend-cell--value.is-up{
  background: rgba(34,197,94,0.14);
  border-color: rgba(34,197,94,0.35);
  color: #4ade80;
}
.trend-cell--value.is-down{
  background: rgba(248,113,113,0.14);
  border-color: rgba(248,113,113,0.35);
  color: #f87171;
}
.trend-cell--value.is-flat{
  background: rgba(148,163,184,0.12);
  border-color: rgba(148,163,184,0.3);
  color:#cbd5e1;
}

.trend-board__footer{
  margin-top:10px;
  display:flex;
  justify-content:space-between;
  gap:8px;
  font-size:12px;
  color:#cbd5e1;
}
.trend-board__footer strong{color:#ffb07a;}

@media (max-width: 960px){
  .trend-board__grid{grid-template-columns: repeat(3, minmax(90px,1fr));}
  .trend-cell--label:nth-of-type(1){grid-column:1/-1;}
  .trend-cell--label:nth-of-type(2){grid-column:1/-1;}
}
        .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;
}

/* Multipliers config inputs should match optionsMinutesInput */
.options-mult-field {
    display: flex;
    align-items: center;
    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-mult-field--risk {
    position: relative;
}

.options-mult-input {
    height: 34px;
    line-height: 34px;
    background: transparent !important;
    border: none !important;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    padding: 0 6px;
    box-sizing: border-box;
    width: 100%;
}

.options-mult-field--risk .options-mult-input {
    padding-right: 60px;
}

.options-mult-amount {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(226, 232, 240, 0.7);
    font-size: 12px;
    font-weight: 700;
    pointer-events: none;
}

select.options-mult-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

#optionsMultiplierSelect {
    background: transparent;
    color: #fff;
    font-family: 'Rajdhani', sans-serif;
    font-size: 16px;
}

#optionsMultiplierSelect option {
    background: rgba(15, 23, 42, 0.98);
    color: #fff;
}

#optionsMultiplierRiskAmount {
    color: rgba(226, 232, 240, 0.7);
    font-size: 12px;
    font-weight: 700;
}
/* 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;
}

.ml-insight-popup {
  position: fixed;
  right: 16px;
  bottom: 72px;
  width: min(360px, calc(100vw - 24px));
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  color: #e2e8f0;
  z-index: 12060;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.ml-insight-popup.is-dragging {
  transition: none;
}

.ml-insight-popup.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.deriv-connection-badge {
  position: fixed;
  right: calc(var(--right-bar-width) + 12px);
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(2, 6, 23, 0.72);
  color: rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
  font-family: 'Rajdhani', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.25px;
  z-index: 130;
  pointer-events: none;
  user-select: none;
}

.deriv-connection-badge__sep {
  color: rgba(148, 163, 184, 0.9);
}

.deriv-connection-badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 82, 82, 0.95);
  box-shadow: 0 0 0 1px rgba(255, 82, 82, 0.2), 0 0 8px rgba(255, 82, 82, 0.3);
}

.deriv-connection-badge__dot.is-on {
  background: rgba(34, 197, 94, 0.95);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.28), 0 0 10px rgba(34, 197, 94, 0.45);
}

body.mobile-bars-hidden .deriv-connection-badge {
  right: 8px;
}

.ml-insight-popup__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  cursor: move;
  user-select: none;
}

.ml-insight-popup__title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.ml-insight-popup__badge {
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.ml-insight-popup__badge.is-favorable {
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(16, 185, 129, 0.12);
}

.ml-insight-popup__badge.is-caution {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.1);
}

.ml-insight-popup__badge.is-unavailable {
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(148, 163, 184, 0.1);
}

.ml-insight-popup__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  font-size: 11px;
}

.ml-insight-popup__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ml-insight-popup__label {
  color: #94a3b8;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.ml-insight-popup__value {
  color: #e2e8f0;
  font-weight: 600;
}

.ml-insight-popup__meter {
  margin-top: 10px;
  height: 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
}

.ml-insight-popup__meter-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8 0%, #34d399 100%);
  transition: width 0.2s ease;
}

@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;
  }
}

/* Chartzella: mobile layout should stack everything vertically at full width. */
@media (max-width: 900px) {
  .chartzella-modal-backdrop {
    padding: 8px;
    align-items: flex-start;
    justify-content: center;
  }

  .bots-modal-backdrop {
    padding: 8px;
    align-items: flex-start;
    justify-content: center;
  }

  .chartzella-modal {
    padding: 12px 12px 14px 12px;
    width: 100%;
    max-width: none;
    height: auto;
    max-height: calc(100dvh - 16px);
    overflow: hidden;
  }

  .bots-modal {
    padding: 12px 12px 14px 12px;
    width: 100%;
    max-width: none;
    height: 80dvh;
    max-height: calc(100dvh - 16px);
    overflow: hidden;
  }

  .botbuilder-modal-backdrop {
    padding: 6px;
    align-items: center;
    justify-content: center;
  }

  .botbuilder-modal {
    width: 95vw;
    height: 95dvh;
    max-width: none;
    max-height: 95dvh;
    border-radius: 14px;
  }

  .botbuilder-body {
    padding: 6px;
    gap: 6px;
  }

  .botbuilder-header h2 {
    font-size: 20px;
  }

  .botbuilder-header p,
  .botbuilder-section li {
    font-size: 13px;
  }

  .botbuilder-section h3 {
    font-size: 15px;
  }

  .chartzella-body {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .chartzella-content,
  .chartzella-content.cz-clean {
    width: 100%;
    min-width: 0;
  }

  .bots-builder {
    padding: 0 0 4px;
    gap: 4px;
  }

  .bots-step {
    padding: 4px 0 0;
  }

  .bots-step__grid,
  .bots-step__grid--market {
    grid-template-columns: 1fr !important;
  }

  .bots-option--text {
    min-height: 68px;
  }

  .bots-option--image img {
    max-width: 240px;
  }

  .bots-step__grid:not(.bots-step__grid--market) .bots-option--image img {
    max-width: min(72vw, 270px);
  }

  .bots-option--market img {
    max-width: min(74vw, 260px);
  }

  .bots-start__button img {
    width: auto;
    max-width: min(46vw, 160px);
  }

  .bots-step-start-layout {
    grid-template-columns: 1fr;
  }

  .bots-start--compact {
    padding-top: 0;
  }

  .bots-status-card {
    width: 100%;
    padding: 18px 16px;
    border-radius: 22px;
    gap: 14px;
  }

  .bots-status-card__hero {
    flex-direction: column;
    align-items: stretch;
  }

  .bots-status-card__headline {
    font-size: 22px;
  }

  .bots-status-card__subline {
    font-size: 13px;
  }

  .bots-status-badge {
    align-self: flex-start;
  }

  .bots-status-grid,
  .bots-status-list {
    grid-template-columns: 1fr !important;
  }

  .bots-status-list--active {
    max-height: 220px;
  }

  .bots-status-metric__value {
    font-size: 18px;
  }

  .bots-status-list__row {
    flex-direction: column;
    align-items: flex-start;
  }

  .bots-status-list__value {
    text-align: left;
  }

  .cz-top-row {
    grid-template-columns: 1fr !important;
  }

  .cz-top-card--pnl {
    grid-column: auto !important;
    min-width: 0 !important;
  }

  .cz-card-body {
    flex-wrap: wrap;
  }

  .cz-main-row {
    grid-template-columns: 1fr !important;
  }

  .cz-side-col,
  .cz-calendar-col,
  .cz-weekly-column {
    width: 100%;
    min-width: 0;
  }

  .cz-charts-section {
    grid-template-columns: 1fr !important;
  }

  .cz-chart-card canvas {
    height: 200px !important;
    max-height: 200px;
  }

  .cz-list {
    max-height: none;
  }

  .cz-list-item {
    grid-template-columns: 1fr auto auto;
  }

  .cz-donut-row.split {
    grid-template-columns: 44px 1fr !important;
  }
}

@media (max-width: 520px) {
  .cz-top-card {
    min-height: 0;
  }

  .cz-card-value {
    font-size: 20px;
  }

  .cz-calendar-col {
    padding: 10px;
  }

  .cz-cal-days,
  .cz-cal-grid {
    gap: 4px;
  }

  .cz-day {
    min-height: 72px;
  }

  .cz-journal-filters,
  .cz-journal-stats {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 360px) {
  .chartzella-modal-backdrop {
    padding: 6px;
  }

  .bots-modal-backdrop {
    padding: 6px;
  }

  .chartzella-modal {
    padding: 10px 10px 12px 10px;
    max-height: calc(100dvh - 12px);
  }

  .bots-modal {
    padding: 10px 10px 12px 10px;
    max-height: calc(100dvh - 12px);
  }

  .bots-builder__title {
    font-size: 24px;
  }

  .bots-step__header h3 {
    font-size: 20px;
  }

  .bots-option__title {
    font-size: 20px;
  }

  .botbuilder-modal {
    width: 95vw;
    height: 95dvh;
  }

  .botbuilder-close {
    width: 30px;
    height: 30px;
    font-size: 20px;
  }

  .cz-top-row {
    gap: 10px;
  }

  .cz-card-value {
    font-size: 18px;
  }

  .cz-card-body {
    gap: 8px;
  }

  .cz-cal-days span {
    font-size: 10px;
  }

  .cz-day {
    min-height: 64px;
    padding: 5px;
  }
}

.price-display {
  background: rgba(var(--chart-accent-rgb), 0.15);
  border-color: var(--chart-accent);
  color: var(--chart-accent);
  box-shadow: 0 0 15px rgba(var(--chart-accent-rgb), 0.4);
}

.status-indicator {
  background: rgba(var(--chart-accent-rgb), 0.15);
  border-color: rgba(var(--chart-accent-rgb), 0.4);
  box-shadow: 0 0 15px rgba(var(--chart-accent-rgb), 0.3);
}

.status-dot {
  background: var(--chart-accent);
  box-shadow: 0 0 10px rgba(var(--chart-accent-rgb), 0.8);
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 10px rgba(var(--chart-accent-rgb), 0.8);
  }
  50% {
    opacity: 0.6;
    box-shadow: 0 0 20px rgba(var(--chart-accent-rgb), 1);
  }
}

.icon-button.active,
body[data-theme="dark"] .icon-button.active,
body[data-theme="light"] .icon-button.active {
  color: var(--chart-accent);
}

body[data-theme="dark"] .icon-button.active {
  background: linear-gradient(135deg, rgba(var(--chart-accent-rgb), 0.16), rgba(var(--chart-accent-rgb), 0.08));
}

body[data-theme="light"] .icon-button.active {
  background: linear-gradient(135deg, rgba(var(--chart-accent-rgb), 0.18), rgba(255, 237, 213, 0.92));
}

.favorite-tool-btn.is-active,
.favorite-tool-btn.is-active:hover,
body[data-theme="light"] #favoriteToolbar .favorite-tool-btn.is-active,
body[data-theme="light"] #favoriteToolbar .favorite-tool-btn.is-active:hover {
  background: rgba(var(--chart-accent-rgb), 0.18);
  color: var(--chart-accent);
}

.favorite-tool-btn.is-active:hover {
  background: rgba(var(--chart-accent-rgb), 0.24);
}

body[data-theme="dark"] .symbol-tab.active {
  background: linear-gradient(135deg, rgba(var(--chart-accent-rgb), 0.18), rgba(15, 23, 42, 0.96)) !important;
  border-color: rgba(var(--chart-accent-rgb), 0.4) !important;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(var(--chart-accent-rgb), 0.14) inset;
}

body[data-theme="light"] .symbol-tab.active {
  background: linear-gradient(135deg, rgba(var(--chart-accent-rgb), 0.16), rgba(255, 255, 255, 0.96)) !important;
  border-color: rgba(var(--chart-accent-rgb), 0.38) !important;
  box-shadow: 0 8px 18px rgba(var(--chart-accent-rgb), 0.1), 0 0 0 1px rgba(var(--chart-accent-rgb), 0.1) inset;
}

.symbol-tab.active .symbol-tab-close:hover {
  background: rgba(var(--chart-accent-rgb), 0.2) !important;
  color: rgba(var(--chart-accent-rgb), 1) !important;
}
