.trading-bot-page {
    --bot-ink: #f4f5f7;
    --bot-muted: #9ba5b3;
    --bot-line: rgba(222, 231, 241, .09);
    --bot-panel: #111820;
    --bot-panel-raised: #151e28;
    --bot-gold: #e8bd66;
    --bot-green: #62d49a;
}

.trading-bot-page .main-content {
    max-width: 1720px;
    padding: 30px clamp(20px, 4.1vw, 64px) 54px;
}

.trading-bot-page .topbar {
    min-height: 218px;
    align-items: center;
    gap: 32px;
    margin-bottom: 20px;
    padding: clamp(26px, 3.5vw, 48px);
    border: 1px solid rgba(232, 189, 102, .17);
    border-radius: 24px;
    background:
        radial-gradient(ellipse at 81% 22%, rgba(232, 189, 102, .15), transparent 36%),
        linear-gradient(119deg, #161e28 0%, #101720 60%, #171b21 100%);
    box-shadow: 0 24px 65px rgba(0, 0, 0, .23), inset 0 1px rgba(255, 255, 255, .035);
}

.trading-bot-page .topbar::after {
    position: absolute;
    right: 17%;
    bottom: -112px;
    width: 270px;
    height: 170px;
    border: 1px solid rgba(232, 189, 102, .1);
    border-radius: 50%;
    content: "";
    transform: rotate(-24deg);
}

.trading-bot-page .topbar-left {
    max-width: 670px;
}

.trading-bot-page .topbar-left .terminal-eyebrow {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
    color: var(--bot-gold);
    font-size: 10px;
    letter-spacing: 1.55px;
}

.trading-bot-page .topbar-left h1 {
    margin: 0;
    font-size: clamp(34px, 4.5vw, 52px);
    font-weight: 650;
    letter-spacing: -.055em;
    line-height: 1.08;
}

.trading-bot-page .topbar-left p {
    max-width: 550px;
    margin-top: 13px;
    color: #abb5c2;
    font-size: 14px;
    line-height: 1.7;
}

.trading-bot-page .topbar-right {
    flex: 0 1 380px;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

.trading-bot-page .bot-hero-status {
    display: grid;
    min-width: 142px;
    gap: 8px;
    padding: 13px 15px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 14px;
    background: rgba(8, 12, 17, .3);
}

.trading-bot-page .bot-hero-status-label {
    color: #82909e;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.25px;
}

.trading-bot-page .bot-hero-status .status-badge {
    width: fit-content;
    min-height: 28px;
    padding: 6px 10px;
    border: 1px solid rgba(241, 129, 129, .19);
    background: rgba(241, 129, 129, .1);
    color: #f29999;
    font-size: 11px;
}

.trading-bot-page .bot-hero-status .status-badge.status-connected {
    border-color: rgba(98, 212, 154, .22);
    background: rgba(98, 212, 154, .1);
    color: #7ee2ad;
}

.trading-bot-page .trading-hero-art {
    right: 23%;
    width: 184px;
    opacity: .43;
}

.trading-bot-page .connection-toast {
    margin: 0 0 16px;
    border-radius: 12px;
}

.trading-bot-page .entitlement-notice {
    margin: 0 0 16px;
    border-color: rgba(232, 189, 102, .22);
    border-radius: 14px;
    background: linear-gradient(110deg, rgba(232, 189, 102, .1), #111820);
}

.trading-bot-page .market-notice {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin: 0 0 20px;
    padding: 14px 17px;
    border: 1px solid rgba(232, 189, 102, .15);
    border-radius: 13px;
    background: rgba(232, 189, 102, .055);
}

.trading-bot-page .broker-catalog-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 145px), 1fr));
    gap: 10px;
    margin: 8px 0 12px;
}

.trading-bot-page .broker-choice {
    display: flex;
    min-width: 0;
    min-height: 70px;
    align-items: center;
    gap: 12px;
    padding: 11px 13px;
    border: 1px solid var(--bot-line);
    border-radius: 12px;
    background: var(--bot-panel-raised);
    color: var(--bot-ink);
    text-align: left;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.trading-bot-page .broker-choice:hover {
    border-color: rgba(232, 189, 102, .5);
    transform: translateY(-1px);
}

.trading-bot-page .broker-choice[aria-pressed="true"] {
    border-color: var(--bot-gold);
    background: rgba(232, 189, 102, .1);
    box-shadow: 0 0 0 1px rgba(232, 189, 102, .16);
}

.trading-bot-page .broker-choice-logo {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    overflow: hidden;
    border-radius: 9px;
    background: #fff;
    color: #17202a;
    font-size: 13px;
    font-weight: 800;
}

.trading-bot-page .broker-choice-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.trading-bot-page .broker-choice-name {
    overflow-wrap: anywhere;
    font-size: 13px;
    font-weight: 700;
}

.trading-bot-page .broker-catalog-value {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

@media (max-width: 520px) {
    .trading-bot-page .broker-catalog-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.trading-bot-page .market-notice > i {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 10px;
    background: rgba(232, 189, 102, .12);
    color: var(--bot-gold);
}

.trading-bot-page .market-notice strong {
    color: #f0d295;
    font-size: 12px;
}

.trading-bot-page .market-notice p {
    margin-top: 3px;
    color: #9ba5b3;
    font-size: 11px;
    line-height: 1.6;
}

.trading-bot-page .saved-accounts-section,
.trading-bot-page .connected-account,
.trading-bot-page .accounts-section,
.trading-bot-page #botTradingSection {
    margin-bottom: 18px;
    padding: clamp(22px, 3vw, 34px);
    border: 1px solid var(--bot-line);
    border-radius: 20px;
    background: linear-gradient(145deg, #121a23, #10171f);
    box-shadow: 0 16px 42px rgba(0, 0, 0, .16);
}

.trading-bot-page .saved-accounts-section .section-header {
    align-items: center;
    gap: 22px;
    margin-bottom: 0;
}

.trading-bot-page .saved-accounts-section .terminal-eyebrow,
.trading-bot-page .accounts-section .terminal-eyebrow,
.trading-bot-page .empty-account .terminal-eyebrow {
    color: var(--bot-gold);
    font-size: 9px;
    letter-spacing: 1.35px;
}

.trading-bot-page .saved-accounts-section h2,
.trading-bot-page .accounts-section h2 {
    margin: 9px 0 5px;
    color: var(--bot-ink);
    font-size: clamp(21px, 2.5vw, 27px);
    letter-spacing: -.035em;
}

.trading-bot-page .saved-accounts-section .section-header p,
.trading-bot-page .accounts-section .section-header p {
    max-width: 620px;
    color: var(--bot-muted);
    font-size: 12px;
    line-height: 1.65;
}

.trading-bot-page .saved-accounts-section .selected-account-notice {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-top: 10px;
    color: #c5af7a;
    font-size: 11px;
}

.trading-bot-page .account-selector-actions {
    flex: 0 0 auto;
    gap: 8px;
}

.trading-bot-page .account-selector-actions button,
.trading-bot-page .connection-actions button {
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 650;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.trading-bot-page .account-selector-actions .secondary-btn,
.trading-bot-page .connection-actions .secondary-btn {
    background: #1b2632;
    color: #d6dde5;
}

.trading-bot-page .account-selector-actions .secondary-btn:hover,
.trading-bot-page .connection-actions .secondary-btn:hover {
    border-color: rgba(232, 189, 102, .25);
    background: #202e3b;
    transform: translateY(-1px);
}

.trading-bot-page .saved-accounts-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
    gap: 12px;
    margin-top: 24px;
}

.trading-bot-page .saved-mt5-account {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, .075);
    border-radius: 15px;
    background: #151e28;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.trading-bot-page .saved-mt5-account.is-selected {
    border-color: rgba(232, 189, 102, .36);
    background: linear-gradient(115deg, rgba(232, 189, 102, .075), #151e28 45%);
    box-shadow: inset 3px 0 var(--bot-gold);
}

.trading-bot-page .saved-mt5-account-mark {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid rgba(232, 189, 102, .15);
    border-radius: 13px;
    background: rgba(232, 189, 102, .09);
    color: var(--bot-gold);
    font-size: 17px;
}

.trading-bot-page .saved-mt5-account-copy {
    display: grid;
    min-width: 0;
    gap: 6px;
}

.trading-bot-page .saved-mt5-account-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px 10px;
}

.trading-bot-page .saved-mt5-account-title strong {
    overflow-wrap: anywhere;
    color: #eff2f5;
    font-size: 13px;
}

.trading-bot-page .saved-mt5-account-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #aab4c0;
    font-size: 9px;
    font-weight: 650;
    white-space: nowrap;
}

.trading-bot-page .saved-mt5-account-status::before {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #8a96a4;
    content: "";
}

.trading-bot-page .saved-mt5-account-status.is-connected {
    color: #78dca6;
}

.trading-bot-page .saved-mt5-account-status.is-connected::before {
    background: #62d49a;
    box-shadow: 0 0 9px rgba(98, 212, 154, .6);
}

.trading-bot-page .saved-mt5-account-details {
    color: #929eac;
    font-size: 10px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.trading-bot-page .saved-mt5-account-error {
    color: #ff9b9b;
    font-size: 10px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.trading-bot-page .saved-mt5-account-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

.trading-bot-page .saved-mt5-account-actions button {
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid rgba(232, 189, 102, .25);
    border-radius: 9px;
    font-size: 10px;
    font-weight: 700;
}

.trading-bot-page .saved-mt5-account-actions .primary-btn {
    background: var(--bot-gold);
    color: #1a1711;
}

.trading-bot-page .saved-mt5-account-actions .secondary-btn {
    border-color: rgba(98, 212, 154, .2);
    background: rgba(98, 212, 154, .1);
    color: #7ee2ad;
}

.trading-bot-page .saved-mt5-account-actions .warning-btn {
    border-color: rgba(241, 196, 117, .22);
    background: rgba(241, 196, 117, .1);
    color: #efd08c;
}

.trading-bot-page .saved-mt5-account-actions button:disabled {
    cursor: default;
    opacity: .72;
}

.trading-bot-page .credentials-update-modal {
    width: min(100%, 560px);
}

.trading-bot-page .credentials-update-form {
    display: grid;
    gap: 16px;
}

.trading-bot-page .credentials-update-form .form-group input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid rgba(232, 189, 102, .22);
    border-radius: 9px;
    background: #101725;
    color: #f3f5f8;
}

.trading-bot-page .credentials-update-form .preferences-message:empty {
    display: none;
}

.trading-bot-page .saved-accounts-empty {
    grid-column: 1 / -1;
    margin: 0;
    padding: 23px;
    border: 1px dashed rgba(255, 255, 255, .13);
    border-radius: 13px;
    color: var(--bot-muted);
    font-size: 12px;
    text-align: center;
}

.trading-bot-page .connected-account {
    position: relative;
    overflow: hidden;
    border-color: rgba(232, 189, 102, .19);
    background:
        radial-gradient(ellipse at 95% 3%, rgba(232, 189, 102, .11), transparent 34%),
        linear-gradient(145deg, #141d27, #10171f);
}

.trading-bot-page .connected-account::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--bot-gold), rgba(232, 189, 102, 0));
    content: "";
}

.trading-bot-page .account-header {
    align-items: center;
    margin-bottom: 25px;
}

.trading-bot-page .broker-logo {
    display: grid;
    place-items: center;
    border: 1px solid rgba(232, 189, 102, .2);
    background: rgba(232, 189, 102, .1);
    color: var(--bot-gold);
}

.mt5-connection-overlay[hidden] {
    display: none;
}

.mt5-connection-overlay {
    position: fixed;
    z-index: 10000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(5, 9, 14, .78);
    backdrop-filter: blur(9px);
}

.mt5-connection-card {
    display: grid;
    justify-items: center;
    width: min(100%, 430px);
    padding: 34px 30px;
    border: 1px solid rgba(232, 189, 102, .24);
    border-radius: 22px;
    background: linear-gradient(145deg, #18222d, #0e151d);
    box-shadow: 0 28px 90px rgba(0, 0, 0, .45);
    text-align: center;
}

.mt5-connection-brands {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 25px;
}

.mt5-connection-broker,
.mt5-connection-terminal {
    display: grid;
    width: 66px;
    height: 66px;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 16px;
    background: rgba(255, 255, 255, .06);
}

.mt5-connection-broker img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

.mt5-connection-broker-initials {
    color: var(--bot-gold);
    font-size: 21px;
    font-weight: 750;
}

.mt5-connection-link {
    color: var(--bot-gold);
    font-size: 17px;
}

.mt5-connection-terminal {
    padding: 5px;
}

.mt5-connection-terminal img {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: contain;
}

.mt5-connection-spinner {
    width: 28px;
    height: 28px;
    margin-bottom: 15px;
    border: 3px solid rgba(232, 189, 102, .2);
    border-top-color: var(--bot-gold);
    border-radius: 50%;
    animation: mt5-connection-spin .8s linear infinite;
}

.mt5-connection-card h2 {
    margin: 0;
    color: #f4f5f7;
    font-size: 20px;
}

.mt5-connection-card p {
    margin: 10px 0 16px;
    color: #b1bac6;
    line-height: 1.55;
}

.mt5-connection-card small {
    color: #8793a1;
}

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

@media (prefers-reduced-motion: reduce) {
    .mt5-connection-spinner {
        animation-duration: 2s;
    }
}

.trading-bot-page .account-title h2 {
    color: var(--bot-ink);
    font-size: 22px;
    letter-spacing: -.035em;
}

.trading-bot-page .account-title p {
    color: #a0abb7;
    font-size: 12px;
}

.trading-bot-page .account-badge {
    border: 1px solid rgba(232, 189, 102, .19);
    background: rgba(232, 189, 102, .08);
    color: #e6c984;
    letter-spacing: .06em;
}

.trading-bot-page .account-number {
    margin-bottom: 23px;
    padding: 17px 19px;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 14px;
    background: rgba(7, 11, 16, .24);
}

.trading-bot-page .account-number small,
.trading-bot-page .meta-item > span {
    color: #8e9aa8;
    font-size: 10px;
}

.trading-bot-page .account-number h1 {
    margin-top: 4px;
    color: #f0d08a;
    font-size: clamp(23px, 3vw, 31px);
    font-variant-numeric: tabular-nums;
    letter-spacing: .015em;
}

.trading-bot-page .account-meta {
    gap: 9px;
}

.trading-bot-page .meta-item,
.trading-bot-page .stat-card {
    min-width: 0;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, .065);
    border-radius: 13px;
    background: rgba(255, 255, 255, .025);
}

.trading-bot-page .meta-item strong {
    display: block;
    margin-top: 6px;
    color: #e6ebf0;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.trading-bot-page .account-stats {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
    gap: 10px;
    margin-top: 17px;
}

.trading-bot-page .stat-card {
    display: grid;
    min-height: 103px;
    align-content: start;
    gap: 8px;
    transition: border-color .2s ease, transform .2s ease;
}

.trading-bot-page .stat-card > i {
    color: var(--bot-gold);
    font-size: 14px;
}

.trading-bot-page .stat-card > span {
    color: #9aa5b1;
    font-size: 10px;
}

.trading-bot-page .stat-card h3 {
    color: #f0f2f5;
    font-size: clamp(15px, 1.5vw, 19px);
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.trading-bot-page .prop-account-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 17px 0;
    padding: 16px 18px;
    border-color: rgba(232, 189, 102, .18);
    border-radius: 13px;
    background: rgba(232, 189, 102, .055);
}

.trading-bot-page .prop-account-action > div {
    display: grid;
    min-width: 0;
    gap: 5px;
}

.trading-bot-page .prop-account-action > div span {
    color: var(--muted, #aab4c8);
    line-height: 1.5;
}

.trading-bot-page .prop-account-action > a {
    flex: 0 0 auto;
}

@media (max-width: 640px) {
    .trading-bot-page .prop-account-action {
        align-items: stretch;
        flex-direction: column;
    }

    .trading-bot-page .prop-account-action > a {
        justify-content: center;
        text-align: center;
    }
}

.trading-bot-page .accounts-section .section-header {
    align-items: center;
    margin-bottom: 18px;
}

.trading-bot-page .accounts-section .section-header h2 {
    margin-top: 0;
}

.trading-bot-page .empty-account {
    display: flex;
    align-items: center;
    gap: 17px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 15px;
    background: #151e28;
}

.trading-bot-page .empty-account-icon {
    display: grid;
    width: 50px;
    height: 50px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(232, 189, 102, .17);
    border-radius: 15px;
    background: rgba(232, 189, 102, .085);
    color: var(--bot-gold);
    font-size: 17px;
}

.trading-bot-page .empty-account-copy {
    min-width: 0;
    flex: 1;
}

.trading-bot-page .empty-account-copy strong {
    display: block;
    margin-top: 5px;
    color: #eff2f5;
    font-size: 14px;
}

.trading-bot-page .empty-account-copy p {
    margin-top: 5px;
    color: #9ba6b3;
    font-size: 11px;
    line-height: 1.6;
}

.trading-bot-page .connection-summary {
    grid-template-columns: minmax(160px, 1fr) minmax(140px, .7fr);
    gap: 11px;
}

.trading-bot-page .connection-summary-item {
    padding: 17px;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 13px;
    background: #151e28;
}

.trading-bot-page .connection-summary-item span {
    color: #929eac;
    font-size: 10px;
}

.trading-bot-page .connection-summary-item strong {
    display: block;
    margin-top: 7px;
    color: #edf0f4;
    font-size: 15px;
    overflow-wrap: anywhere;
}

.trading-bot-page #runningTime {
    color: #e9c77c;
    font-variant-numeric: tabular-nums;
}

.trading-bot-page .connection-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 5px;
}

.trading-bot-page .connection-actions .warning-btn {
    border-color: rgba(241, 196, 117, .2);
    background: rgba(241, 196, 117, .09);
    color: #e9c77c;
}

.trading-bot-page .connection-actions .danger-btn {
    border-color: rgba(241, 129, 129, .2);
    background: rgba(241, 129, 129, .09);
    color: #f29999;
}

.trading-bot-page #botTradingSection {
    border-color: rgba(131, 181, 244, .16);
    background: linear-gradient(125deg, rgba(131, 181, 244, .055), #111820 58%);
}

.trading-bot-page #botTradingSection .terminal-eyebrow {
    color: #91bdf1;
}

.trading-bot-page #botTradingSection h2 {
    margin: 10px 0 6px;
    color: #edf2f8;
    font-size: 20px;
}

.trading-bot-page #botTradingSection p {
    max-width: 820px;
    color: #a3aebb;
    font-size: 12px;
    line-height: 1.7;
}

.trading-bot-page #botTradingSection .secondary-btn {
    display: inline-flex;
    margin-top: 15px;
    padding: 11px 14px;
    border-radius: 9px;
    background: #1b2632;
    color: #dce3eb;
    font-size: 11px;
}

.trading-bot-page .saved-accounts-section,
.trading-bot-page .connected-account,
.trading-bot-page .accounts-section,
.trading-bot-page #botTradingSection {
    animation: botPanelEnter .5s both;
}

.trading-bot-page .saved-accounts-section { animation-delay: .06s; }
.trading-bot-page .connected-account { animation-delay: .1s; }
.trading-bot-page .accounts-section { animation-delay: .14s; }
.trading-bot-page #botTradingSection { animation-delay: .18s; }

.trading-bot-page :is(button, a, input, select):focus-visible {
    outline: 2px solid #f1d28f;
    outline-offset: 3px;
}

html[data-theme="light"] .trading-bot-page .topbar {
    border-color: rgba(178, 135, 55, .2);
    background:
        radial-gradient(ellipse at 81% 22%, rgba(232, 189, 102, .18), transparent 36%),
        linear-gradient(119deg, #fff 0%, #f4f6f8 66%, #fffaf0 100%);
    box-shadow: 0 20px 52px rgba(31, 45, 68, .09);
}

html[data-theme="light"] body.trading-bot-page {
    background: #f1f5f9 !important;
    color: #172033 !important;
}

html[data-theme="light"] .trading-bot-page .main-content {
    background:
        radial-gradient(ellipse at 82% 0, rgba(178, 135, 55, .055), transparent 34rem),
        #f1f5f9 !important;
}

html[data-theme="light"] .trading-bot-page .topbar-left h1,
html[data-theme="light"] .trading-bot-page .saved-accounts-section h2,
html[data-theme="light"] .trading-bot-page .accounts-section h2,
html[data-theme="light"] .trading-bot-page .account-title h2 {
    color: #172033;
}

html[data-theme="light"] .trading-bot-page .topbar-left p,
html[data-theme="light"] .trading-bot-page .saved-accounts-section .section-header p,
html[data-theme="light"] .trading-bot-page .accounts-section .section-header p {
    color: #64748b;
}

html[data-theme="light"] .trading-bot-page .bot-hero-status {
    border-color: #e0e5eb;
    background: rgba(255, 255, 255, .72);
}

html[data-theme="light"] .trading-bot-page .bot-hero-status-label {
    color: #64748b;
}

html[data-theme="light"] .trading-bot-page .saved-accounts-section,
html[data-theme="light"] .trading-bot-page .connected-account,
html[data-theme="light"] .trading-bot-page .accounts-section,
html[data-theme="light"] .trading-bot-page #botTradingSection {
    border-color: #dce3eb;
    background: linear-gradient(145deg, #fff, #f9fafc);
    box-shadow: 0 12px 32px rgba(31, 45, 68, .06);
}

html[data-theme="light"] .trading-bot-page .market-notice {
    border-color: rgba(178, 135, 55, .23);
    background: rgba(232, 189, 102, .1);
}

html[data-theme="light"] .trading-bot-page .market-notice strong {
    color: #684d13;
}

html[data-theme="light"] .trading-bot-page .market-notice p,
html[data-theme="light"] .trading-bot-page .saved-accounts-section .selected-account-notice {
    color: #64748b;
}

html[data-theme="light"] .trading-bot-page .saved-mt5-account,
html[data-theme="light"] .trading-bot-page .empty-account,
html[data-theme="light"] .trading-bot-page .connection-summary-item {
    border-color: #e1e6ed;
    background: #f6f8fa;
}

html[data-theme="light"] .trading-bot-page .empty-account {
    background: linear-gradient(125deg, #fff, #f7f9fb);
}

html[data-theme="light"] .trading-bot-page .empty-account-icon {
    border-color: rgba(178, 135, 55, .2);
    background: rgba(232, 189, 102, .12);
}

html[data-theme="light"] .trading-bot-page .saved-mt5-account.is-selected {
    border-color: rgba(178, 135, 55, .45);
    background: linear-gradient(115deg, rgba(232, 189, 102, .12), #f6f8fa 55%);
}

html[data-theme="light"] .trading-bot-page .saved-mt5-account-title strong,
html[data-theme="light"] .trading-bot-page .empty-account-copy strong,
html[data-theme="light"] .trading-bot-page .connection-summary-item strong,
html[data-theme="light"] .trading-bot-page .meta-item strong,
html[data-theme="light"] .trading-bot-page .stat-card h3 {
    color: #172033;
}

html[data-theme="light"] .trading-bot-page .saved-mt5-account-details,
html[data-theme="light"] .trading-bot-page .empty-account-copy p,
html[data-theme="light"] .trading-bot-page .connection-summary-item span,
html[data-theme="light"] .trading-bot-page .meta-item > span,
html[data-theme="light"] .trading-bot-page .stat-card > span {
    color: #64748b;
}

html[data-theme="light"] .trading-bot-page .meta-item,
html[data-theme="light"] .trading-bot-page .stat-card,
html[data-theme="light"] .trading-bot-page .account-number {
    border-color: #e1e6ed;
    background: rgba(241, 245, 249, .78);
}

html[data-theme="light"] .trading-bot-page .account-number h1 {
    color: #79580d;
}

html[data-theme="light"] .trading-bot-page .account-title p {
    color: #64748b;
}

html[data-theme="light"] .trading-bot-page #botTradingSection h2 {
    color: #172033;
}

html[data-theme="light"] .trading-bot-page #botTradingSection p {
    color: #475569;
}

@media (max-width: 1100px) {
    .trading-bot-page .topbar {
        min-height: 200px;
    }

    .trading-bot-page .trading-hero-art {
        right: 18%;
    }
}

@media (max-width: 780px) {
    .trading-bot-page .main-content {
        padding: 20px 20px 36px;
    }

    .trading-bot-page .topbar {
        align-items: flex-start;
        min-height: 0;
        gap: 22px;
        padding: 26px;
    }

    .trading-bot-page .topbar-right {
        flex: 0 0 auto;
        align-items: flex-start;
        justify-content: flex-start;
    }

    .trading-bot-page .trading-hero-art {
        right: 10%;
        opacity: .23;
    }

    .trading-bot-page .saved-accounts-section .section-header {
        align-items: flex-start;
    }

    .trading-bot-page .saved-mt5-account {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .trading-bot-page .saved-mt5-account-actions {
        grid-column: 2;
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .trading-bot-page .main-content {
        padding: 15px 13px 28px;
    }

    .trading-bot-page .topbar {
        gap: 19px;
        margin-bottom: 14px;
        padding: 22px 19px;
        border-radius: 19px;
    }

    .trading-bot-page .topbar-left {
        padding-right: 18px;
    }

    .trading-bot-page .topbar-left h1 {
        font-size: clamp(31px, 9vw, 40px);
    }

    .trading-bot-page .topbar-left p {
        max-width: 390px;
        font-size: 12px;
    }

    .trading-bot-page .topbar-right {
        width: 100%;
        flex: 1 1 auto;
        flex-wrap: wrap;
        align-items: center;
        gap: 9px;
    }

    .trading-bot-page .bot-hero-status {
        grid-template-columns: auto auto;
        align-items: center;
        min-width: 0;
        gap: 6px 9px;
        padding: 9px 11px;
    }

    .trading-bot-page .bot-hero-status-label {
        grid-column: 1 / -1;
    }

    .trading-bot-page .trading-hero-art {
        top: 18px;
        right: 10px;
        width: 78px;
        opacity: .17;
        transform: none;
    }

    .trading-bot-page .hero-orbit-inner { inset: 12px; }
    .trading-bot-page .hero-core { width: 35px; border-radius: 11px; font-size: 14px; }

    .trading-bot-page .market-notice {
        gap: 10px;
        margin-bottom: 14px;
        padding: 12px;
    }

    .trading-bot-page .market-notice p {
        font-size: 10px;
    }

    .trading-bot-page .saved-accounts-section,
    .trading-bot-page .connected-account,
    .trading-bot-page .accounts-section,
    .trading-bot-page #botTradingSection {
        margin-bottom: 13px;
        padding: 19px 16px;
        border-radius: 16px;
    }

    .trading-bot-page .saved-accounts-section .section-header {
        flex-direction: column;
        gap: 15px;
    }

    .trading-bot-page .account-selector-actions {
        width: 100%;
    }

    .trading-bot-page .account-selector-actions button {
        flex: 1;
        justify-content: center;
    }

    .trading-bot-page .saved-accounts-list {
        grid-template-columns: 1fr;
        gap: 9px;
        margin-top: 18px;
    }

    .trading-bot-page .saved-mt5-account {
        gap: 11px;
        padding: 13px;
    }

    .trading-bot-page .saved-mt5-account-mark {
        width: 40px;
        height: 40px;
    }

    .trading-bot-page .saved-mt5-account-title {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .trading-bot-page .saved-mt5-account-actions {
        gap: 6px;
    }

    .trading-bot-page .empty-account {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 12px;
        padding: 14px;
    }

    .trading-bot-page .empty-account-icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .trading-bot-page .empty-account-copy {
        flex-basis: calc(100% - 56px);
    }

    .trading-bot-page .connection-summary {
        grid-template-columns: 1fr;
    }

    .trading-bot-page .connection-actions button {
        flex: 1 1 calc(50% - 8px);
        padding-inline: 9px;
    }

    .trading-bot-page .account-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .trading-bot-page .account-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .trading-bot-page .account-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 360px) {
    .trading-bot-page .topbar {
        padding: 19px 15px;
    }

    .trading-bot-page .topbar-left .terminal-eyebrow {
        font-size: 8px;
        letter-spacing: 1px;
    }

    .trading-bot-page .bot-hero-status {
        grid-template-columns: 1fr;
    }

    .trading-bot-page .bot-hero-status-label {
        grid-column: auto;
    }

    .trading-bot-page .account-meta {
        grid-template-columns: 1fr;
    }

    .trading-bot-page .connection-actions {
        flex-direction: column;
    }

    .trading-bot-page .connection-actions button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .trading-bot-page .topbar,
    .trading-bot-page .topbar::before,
    .trading-bot-page .topbar::after,
    .trading-bot-page .saved-accounts-section,
    .trading-bot-page .connected-account,
    .trading-bot-page .accounts-section,
    .trading-bot-page #botTradingSection {
        animation: none;
    }

    .trading-bot-page :is(.saved-mt5-account, .stat-card) {
        transition: none;
    }
}

.trading-bot-page .topbar {
    min-height: 196px;
    padding-right: clamp(270px, 29vw, 385px);
}

.trading-bot-page .topbar-right {
    flex: 0 1 265px;
}

.trading-bot-page .bot-hero-status {
    min-width: 190px;
    padding: 14px 16px;
    border-color: rgba(232, 189, 102, .14);
    background: rgba(7, 11, 16, .43);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .13), inset 0 0 22px rgba(232, 189, 102, .025);
}

.trading-bot-page .trading-hero-art {
    top: auto;
    right: clamp(20px, 4vw, 58px);
    bottom: 16px;
    width: min(31%, 355px);
    aspect-ratio: 2.45;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    gap: 8px;
    opacity: 1;
    transform: none;
}

.trading-bot-page .hero-chart-caption {
    display: flex;
    align-items: center;
    gap: 7px;
    padding-left: 2px;
    color: #93a0ad;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1.15px;
}

.trading-bot-page .hero-chart-caption strong {
    margin-left: auto;
    padding: 4px 7px;
    border: 1px solid rgba(232, 189, 102, .19);
    border-radius: 6px;
    background: rgba(232, 189, 102, .075);
    color: #e8c778;
    font-size: 8px;
    letter-spacing: .7px;
}

.trading-bot-page .hero-chart-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #62d49a;
    box-shadow: 0 0 10px rgba(98, 212, 154, .85);
    animation: botDotPulse 2.4s ease-in-out infinite;
}

.trading-bot-page .hero-market-chart {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
    filter: drop-shadow(0 5px 14px rgba(232, 189, 102, .1));
}

.trading-bot-page .hero-chart-grid {
    fill: none;
    stroke: rgba(215, 225, 235, .085);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.trading-bot-page .hero-chart-area {
    fill: url("#heroChartFill");
}

.trading-bot-page .hero-chart-line {
    fill: none;
    stroke: #e8bd66;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
    filter: url("#heroChartGlow");
    stroke-dasharray: 470;
    stroke-dashoffset: 470;
    animation: heroChartDraw 1.7s .2s ease-out forwards;
}

.trading-bot-page .hero-chart-end {
    fill: #ffe0a0;
    stroke: rgba(232, 189, 102, .35);
    stroke-width: 7;
    vector-effect: non-scaling-stroke;
    animation: botDotPulse 2.4s ease-in-out infinite;
}

@keyframes heroChartDraw {
    to { stroke-dashoffset: 0; }
}

.trading-bot-page .saved-accounts-section {
    position: relative;
    overflow: hidden;
    border-color: rgba(232, 189, 102, .17);
    background:
        radial-gradient(ellipse at 96% 0, rgba(232, 189, 102, .085), transparent 36%),
        linear-gradient(145deg, #141c26, #10171f 72%);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .2), inset 0 1px rgba(255, 255, 255, .025);
}

.trading-bot-page .saved-accounts-section::before {
    position: absolute;
    top: 0;
    left: clamp(22px, 3vw, 34px);
    width: 92px;
    height: 2px;
    background: linear-gradient(90deg, #f1d28f, rgba(241, 210, 143, 0));
    content: "";
    filter: drop-shadow(0 0 6px rgba(232, 189, 102, .75));
}

.trading-bot-page .account-selector-actions .primary-btn {
    border: 1px solid rgba(255, 228, 174, .42);
    background: linear-gradient(135deg, #f1d28f, #dfb65e);
    box-shadow: 0 7px 22px rgba(226, 184, 97, .16);
    color: #201b11;
}

.trading-bot-page .account-selector-actions .primary-btn:hover {
    box-shadow: 0 10px 26px rgba(226, 184, 97, .25);
    transform: translateY(-2px);
}

.trading-bot-page .empty-account-hint {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    margin-top: 9px;
    padding: 6px 9px;
    border: 1px solid rgba(232, 189, 102, .13);
    border-radius: 7px;
    background: rgba(232, 189, 102, .055);
    color: #bfaa78;
    font-size: 10px;
    line-height: 1.55;
}

html[data-theme="light"] .trading-bot-page .bot-hero-status {
    border-color: #e1e6ed;
    background: rgba(255, 255, 255, .83);
}

html[data-theme="light"] .trading-bot-page .hero-chart-caption {
    color: #64748b;
}

html[data-theme="light"] .trading-bot-page .hero-chart-grid {
    stroke: rgba(71, 85, 105, .16);
}

html[data-theme="light"] .trading-bot-page .saved-accounts-section {
    border-color: rgba(178, 135, 55, .23);
    background:
        radial-gradient(ellipse at 96% 0, rgba(232, 189, 102, .12), transparent 36%),
        linear-gradient(145deg, #fff, #f9fafc 72%);
}

html[data-theme="light"] .trading-bot-page .empty-account-hint {
    color: #79580d;
    border-color: rgba(178, 135, 55, .19);
    background: rgba(232, 189, 102, .1);
}

@media (max-width: 380px) {
    .trading-bot-page .accounts-section #accountsGrid,
    .trading-bot-page .accounts-section #accountsGrid .connection-summary-item,
    .trading-bot-page .accounts-section #accountsGrid .connection-actions {
        min-width: 0;
        width: 100%;
    }

    .trading-bot-page .accounts-section #accountsGrid {
        grid-template-columns: minmax(0, 1fr);
    }

    .trading-bot-page .accounts-section #accountsGrid .connection-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .trading-bot-page .accounts-section #accountsGrid .connection-actions button {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 900px) {
    .trading-bot-page .topbar {
        padding-right: 29%;
    }

    .trading-bot-page .trading-hero-art {
        right: 24px;
        width: 25%;
        opacity: .82;
    }
}

@media (max-width: 780px) {
    .trading-bot-page .topbar {
        padding-right: 26px;
    }

    .trading-bot-page .topbar-right {
        flex: 0 0 auto;
    }

    .trading-bot-page .trading-hero-art {
        display: none;
    }
}

@media (max-width: 560px) {
    .trading-bot-page .topbar {
        min-height: 0;
    }

    .trading-bot-page .bot-hero-status {
        min-width: 0;
    }

    .trading-bot-page .saved-accounts-section::before {
        left: 19px;
    }

    .trading-bot-page .empty-account-hint {
        max-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .trading-bot-page .hero-chart-pulse,
    .trading-bot-page .hero-chart-line,
    .trading-bot-page .hero-chart-end {
        animation: none;
    }

    .trading-bot-page .hero-chart-line {
        stroke-dashoffset: 0;
    }
}

html[data-theme="light"] .trading-bot-page .daily-limits-panel{
    border-color:#e3d7b5;
    background:linear-gradient(135deg,#fffdf8,#f8fafc);
    color:#182230;
}

html[data-theme="light"] .trading-bot-page .daily-limits-heading h2,
html[data-theme="light"] .trading-bot-page .daily-limit-meter-heading span strong{
    color:#182230;
}

html[data-theme="light"] .trading-bot-page .daily-limits-heading p{
    color:#596579;
}

html[data-theme="light"] .trading-bot-page .daily-limit-pnl,
html[data-theme="light"] .trading-bot-page .daily-limit-meter{
    border-color:#e1e6ed;
    background:#fff;
}

html[data-theme="light"] .trading-bot-page .daily-limit-pnl span,
html[data-theme="light"] .trading-bot-page .daily-limit-meter-heading span,
html[data-theme="light"] .trading-bot-page .daily-limit-meter small{
    color:#657184;
}

html[data-theme="light"] .trading-bot-page .daily-limit-pnl strong,
html[data-theme="light"] .trading-bot-page .daily-limit-meter-heading>strong{
    color:#182230;
}

html[data-theme="light"] .trading-bot-page .daily-limit-track{
    background:#e7ebf0;
}

html[data-theme="light"] .trading-bot-page .daily-limit-setup-notice{
    border-color:#ead19a;
    background:#fff8e8;
}

html[data-theme="light"] .trading-bot-page .daily-limit-setup-notice strong,
html[data-theme="light"] .trading-bot-page .daily-limit-setup-notice p{
    color:#755317;
}

.trading-bot-page .topbar {
    display: block;
    min-height: 276px;
    padding: 42px clamp(24px, 3.5vw, 48px) 30px;
    z-index: 20;
}

.trading-bot-page .topbar::after {
    display: none;
}

.trading-bot-page .topbar-left {
    max-width: min(58%, 640px);
}

.trading-bot-page .topbar-right {
    display: contents;
}

.trading-bot-page .bot-hero-status {
    position: absolute;
    z-index: 2;
    bottom: 19px;
    left: clamp(24px, 3.5vw, 48px);
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 11px;
}

.trading-bot-page .user-menu-actions {
    position: static;
    z-index: 30;
    gap: 8px;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 999px;
    background: rgba(17, 24, 39, .72);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .16);
}

.trading-bot-page .trading-user-menu-bar {
    min-height: 52px;
    margin-bottom: 14px;
}

.trading-bot-page .bot-hero-status-label {
    font-size: 8px;
    white-space: nowrap;
}

.trading-bot-page .bot-hero-status .status-badge {
    min-height: 24px;
    padding: 4px 8px;
    font-size: 10px;
}

.trading-bot-page .trading-hero-art {
    right: clamp(26px, 4vw, 58px);
    bottom: 17px;
    width: min(30%, 310px);
    aspect-ratio: 2.7;
    gap: 5px;
}

@media (max-width: 1080px) and (min-width: 781px) {
    .trading-bot-page .topbar {
        min-height: 260px;
        padding-left: 28px;
    }

    .trading-bot-page .topbar-left {
        max-width: 52%;
    }

    .trading-bot-page .topbar-left h1 {
        font-size: 38px;
    }

    .trading-bot-page .bot-hero-status {
        gap: 6px;
        padding-inline: 8px;
    }

    .trading-bot-page .bot-hero-status-label {
        display: none;
    }

    .trading-bot-page .trading-hero-art {
        right: 26px;
        width: 28%;
    }
}

@media (max-width: 780px) {
    .trading-bot-page .topbar {
        display: flex;
        min-height: 0;
        flex-direction: column;
        align-items: stretch;
        padding: 24px;
    }

    .trading-bot-page .topbar-left {
        max-width: 100%;
        padding-top: 44px;
    }

    .trading-bot-page .topbar-right {
            display: flex;
            position: static;
            width: 100%;
            max-width: 100%;
        justify-content: space-between;
        gap: 10px;
        margin-top: 2px;
    }

    .trading-bot-page .bot-hero-status {
        position: static;
        bottom: auto;
        left: auto;
    }

    .trading-bot-page .trading-hero-art {
        display: none;
    }
}

@media (max-width: 930px) and (min-width: 701px) {
    .trading-bot-page .user-menu-actions {
        top: 5px;
        right: 18px;
    }
}

@media (max-width: 930px) {
    .trading-bot-page .sidebar {
        flex-wrap: wrap;
        gap: 8px 12px;
    }

    .trading-bot-page .sidebar .logo {
        width: 100%;
    }

    .trading-bot-page .sidebar nav {
        width: 100%;
        flex: 1 0 100%;
    }
}

@media (max-width: 520px) {
    .trading-bot-page .sidebar {
        flex-wrap: nowrap;
        overflow: visible;
    }

    .trading-bot-page .sidebar .logo {
        width: auto;
        margin: 0 auto 0 0;
    }

    .trading-bot-page .sidebar nav {
        width: auto;
        flex: 0 0 auto;
        order: 3;
    }

    .trading-bot-page .sidebar nav ul {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        display: none;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        padding: 10px 13px 13px;
        border-bottom: 1px solid var(--workspace-border);
        background: var(--workspace-bg);
        box-shadow: 0 14px 22px rgba(0,0,0,.24);
    }

    .trading-bot-page .sidebar nav.is-open ul {
        display: grid;
    }

    .trading-bot-page .sidebar-menu-toggle {
        display: inline-grid;
        width: 34px;
        height: 36px;
        flex: none;
        place-items: center;
        border: 1px solid rgba(221, 231, 240, .12);
        border-radius: 9px;
        background: #151e27;
        color: #f2f4f6;
        font-size: 15px;
        cursor: pointer;
    }

    .trading-bot-page .sidebar-nav a {
        min-height: 40px;
        justify-content: flex-start;
        gap: 8px;
        padding: 0 10px;
        font-size: 12px;
    }

    .trading-bot-page .sidebar > .user-menu-actions {
        position: static;
        top: auto;
        right: auto;
        z-index: auto;
        order: 2;
        flex: none;
        align-items: center;
        gap: 5px;
    }

    .trading-bot-page .sidebar > .user-menu-actions .user-menu-icon,
    .trading-bot-page .sidebar > .user-menu-actions .user-profile-trigger {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 360px) {
    .trading-bot-page .sidebar .fundpilot-wordmark {
        display: none;
    }
}

@media (max-width: 520px) {
    .trading-bot-page .trading-user-menu-bar:empty {
        display: none;
    }
}

@media (max-width: 560px) {
    .trading-bot-page .topbar {
        padding: 21px 18px;
    }

    .trading-bot-page .topbar-left {
        padding-top: 45px;
    }

    .trading-bot-page .topbar-right {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .trading-bot-page .bot-hero-status {
        flex-wrap: wrap;
        max-width: 100%;
    }

    .trading-bot-page .user-menu-actions {
        top: 12px;
        right: 12px;
    }
}

@media (max-width: 360px) {
    .trading-bot-page .bot-hero-status {
        flex-wrap: wrap;
    }

}

.trading-bot-page .connect-modal {
    width: min(100%, 560px);
    max-width: 560px;
    border-color: rgba(232, 189, 102, .26);
    background:
        radial-gradient(ellipse at 2% 0, rgba(232, 189, 102, .09), transparent 35%),
        linear-gradient(150deg, #10151b, #090c10 60%);
}

.trading-bot-page .connect-modal .modal-header {
    padding-bottom: 16px;
}

.trading-bot-page .connect-modal-kicker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 17px;
    color: #d4b46e;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 1.35px;
}

.trading-bot-page .connect-modal .modal-icon {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid rgba(232, 189, 102, .25);
    background: rgba(232, 189, 102, .09);
    color: #f2cd78;
    font-size: 13px;
}

.trading-bot-page .connect-modal-secure {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    padding: 6px 8px;
    border: 1px solid rgba(98, 212, 154, .17);
    border-radius: 999px;
    background: rgba(98, 212, 154, .055);
    color: #80dcb0;
    font-size: 8px;
    letter-spacing: .8px;
    white-space: nowrap;
}

.trading-bot-page .connect-modal .steps {
    justify-content: stretch;
    gap: 0;
    padding: 11px 28px 2px;
}

.trading-bot-page .connect-modal .step {
    flex: 1;
    gap: 9px;
    color: #788492;
    font-size: 11px;
    transition: color .2s ease;
}

.trading-bot-page .connect-modal .step > span {
    display: grid;
    gap: 2px;
}

.trading-bot-page .connect-modal .step small {
    color: #697482;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1px;
}

.trading-bot-page .connect-modal .step.active,
.trading-bot-page .connect-modal .step.complete {
    color: #f2f4f6;
}

.trading-bot-page .connect-modal .step.active small,
.trading-bot-page .connect-modal .step.complete small {
    color: #d4b46e;
}

.trading-bot-page .connect-modal .circle {
    display: grid;
    flex: 0 0 30px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .11);
    background: #171d25;
    color: #8692a1;
    font-size: 11px;
    transition: border-color .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}

.trading-bot-page .connect-modal .step.active .circle {
    border-color: rgba(232, 189, 102, .55);
    background: linear-gradient(145deg, #f1d28f, #d7ad54);
    box-shadow: 0 0 18px rgba(232, 189, 102, .19);
    color: #17130b;
}

.trading-bot-page .connect-modal .step.complete .circle {
    border-color: rgba(98, 212, 154, .35);
    background: rgba(98, 212, 154, .12);
    color: #7ee2ad;
}

.trading-bot-page .connect-modal .line {
    width: auto;
    min-width: 18px;
    flex: .28;
    height: 1px;
    background: linear-gradient(90deg, rgba(232, 189, 102, .38), rgba(255, 255, 255, .12));
}

.trading-bot-page .connect-modal .connection-progress {
    display: block;
    padding: 13px 28px 0;
}

.trading-bot-page .connection-progress-label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    height: auto;
    flex: none;
    margin-bottom: 8px;
    overflow: visible;
    border-radius: 0;
    background: none;
    color: #b5bfca;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .8px;
}

.trading-bot-page .connection-progress-label > span {
    display: inline;
    width: auto;
    height: auto;
    border-radius: 0;
    background: none;
    box-shadow: none;
}

.trading-bot-page #connectionStepCount {
    color: #d4b46e;
}

.trading-bot-page #connectionProgressPercent {
    color: #95a1af;
    font-weight: 550;
    letter-spacing: 0;
}

.trading-bot-page .connect-modal .connection-progress-track {
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: #252c34;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35);
}

.trading-bot-page .connect-modal #connectionProgressFill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #bd9346, #f5d98f 72%, #f7e5b6);
    box-shadow: 0 0 12px rgba(232, 189, 102, .45);
    transition: width .45s cubic-bezier(.2, .75, .25, 1);
}

.trading-bot-page .connect-modal #connectionProgressFill.is-verifying {
    background-size: 200% 100%;
    animation: connectionProgressShimmer 1.2s linear infinite;
}

.trading-bot-page .connect-modal #connectionProgressHint {
    margin: 7px 0 0;
    color: #7f8a98;
    font-size: 10px;
    line-height: 1.5;
}

@keyframes connectionProgressShimmer {
    to { background-position: -200% 0; }
}

.trading-bot-page .connect-modal form {
    padding-top: 17px;
}

.trading-bot-page .connect-modal #brokerCredentials {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.trading-bot-page .connect-modal #brokerCredentials > .form-group:has(.connection-account-type),
.trading-bot-page .connect-modal #brokerSelectionField,
.trading-bot-page .connect-modal #brokerCredentials > .form-group.full-width {
    grid-column: 1 / -1;
}

.trading-bot-page .connect-modal .connection-preflight {
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    gap: 12px;
    margin-bottom: 1px;
    padding: 12px 13px;
    border: 1px solid rgba(232, 189, 102, .15);
    border-radius: 12px;
    background:
        linear-gradient(105deg, rgba(232, 189, 102, .075), rgba(232, 189, 102, .025) 65%, rgba(255, 255, 255, .015));
}

.trading-bot-page .connection-preflight-icon {
    display: grid;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid rgba(232, 189, 102, .17);
    border-radius: 9px;
    background: rgba(232, 189, 102, .09);
    color: #e6c678;
    font-size: 12px;
}

.trading-bot-page .connection-preflight > div {
    min-width: 0;
}

.trading-bot-page .connection-preflight strong {
    display: block;
    color: #e7eaf0;
    font-size: 11px;
    font-weight: 700;
}

.trading-bot-page .connection-preflight p {
    margin: 3px 0 0;
    color: #8995a3;
    font-size: 10px;
    line-height: 1.45;
}

.trading-bot-page .connection-preflight-mark {
    margin-left: auto;
    color: #b89b5c;
    font-size: 10px;
}

@media (max-width: 560px) {
    .trading-bot-page .connect-modal .modal-header {
        padding-right: 56px;
        padding-left: 19px;
    }

    .trading-bot-page .connect-modal .steps {
        padding-right: 19px;
        padding-left: 19px;
    }

    .trading-bot-page .connect-modal .connection-progress {
        padding-right: 19px;
        padding-left: 19px;
    }

    .trading-bot-page .connect-modal form {
        padding-right: 19px;
        padding-left: 19px;
    }

    .trading-bot-page .connect-modal #brokerCredentials {
        grid-template-columns: 1fr;
    }

    .trading-bot-page .connect-modal #brokerCredentials > .form-group:has(.connection-account-type),
    .trading-bot-page .connect-modal #brokerSelectionField,
    .trading-bot-page .connect-modal #brokerCredentials > .form-group.full-width {
        grid-column: auto;
    }

    .trading-bot-page .connect-modal .step {
        gap: 7px;
        font-size: 10px;
    }

    .trading-bot-page .connect-modal .step small {
        font-size: 7px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .trading-bot-page .connect-modal .step,
    .trading-bot-page .connect-modal .circle,
    .trading-bot-page .connect-modal #connectionProgressFill {
        transition: none;
    }

    .trading-bot-page .connect-modal #connectionProgressFill.is-verifying {
        animation: none;
    }
}

.trading-bot-page .connect-modal .form-group {
    gap: 8px;
}

.trading-bot-page .connect-modal .form-group > label {
    color: #c9d1dc;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .5px;
}

.trading-bot-page .connect-modal .form-group input:not([type="radio"]):not([type="checkbox"]),
.trading-bot-page .connect-modal .form-group select,
.trading-bot-page .connect-modal .prop-lot-settings input {
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(196, 209, 224, .13);
    border-radius: 11px;
    outline: none;
    background: linear-gradient(145deg, #111821, #0d131a);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025), 0 5px 16px rgba(0, 0, 0, .12);
    color: #f0f3f7;
    font-size: 13px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.trading-bot-page .connect-modal .form-group input:not([type="radio"]):not([type="checkbox"]):hover,
.trading-bot-page .connect-modal .form-group select:hover,
.trading-bot-page .connect-modal .prop-lot-settings input:hover {
    border-color: rgba(232, 189, 102, .31);
}

.trading-bot-page .connect-modal .form-group input:not([type="radio"]):not([type="checkbox"]):focus,
.trading-bot-page .connect-modal .form-group select:focus,
.trading-bot-page .connect-modal .prop-lot-settings input:focus {
    border-color: rgba(232, 189, 102, .75);
    background: #111923;
    box-shadow: 0 0 0 3px rgba(232, 189, 102, .11), inset 0 1px 0 rgba(255, 255, 255, .035);
}

.trading-bot-page .connect-modal .form-group input::placeholder,
.trading-bot-page .connect-modal .prop-lot-settings input::placeholder {
    color: #707d8c;
    opacity: 1;
}

.trading-bot-page .connect-modal .field-hint {
    color: #8491a0;
    font-size: 10px;
    line-height: 1.45;
}

.trading-bot-page .connect-modal .deriv-onboarding-guide {
    display: grid;
    gap: 6px;
    padding: 12px;
    border: 1px solid rgba(232, 189, 102, .15);
    border-radius: 12px;
    background: rgba(232, 189, 102, .04);
}

.trading-bot-page .connect-modal .deriv-onboarding-guide[hidden] {
    display: none;
}

.trading-bot-page .connect-modal .deriv-onboarding-guide strong {
    color: #e7eaf0;
    font-size: 11px;
}

.trading-bot-page .connect-modal .deriv-onboarding-guide p {
    margin: 0;
}

.trading-bot-page .connect-modal .deriv-onboarding-guide ol {
    display: grid;
    gap: 4px;
    margin: 0;
    padding-left: 18px;
}

.trading-bot-page .connect-modal .deriv-onboarding-guide a {
    width: fit-content;
    color: #e6c678;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.trading-bot-page .connect-modal .connection-account-type {
    display: grid;
    min-height: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.trading-bot-page .connect-modal .connection-account-type label {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 48px;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    padding: 10px 12px;
    border: 1px solid rgba(196, 209, 224, .12);
    border-radius: 11px;
    background: linear-gradient(145deg, #111821, #0d131a);
    color: #b9c3cf;
    font-size: 11px;
    font-weight: 650;
    transition: border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

.trading-bot-page .connect-modal .connection-account-type label:hover {
    border-color: rgba(232, 189, 102, .3);
    background: #131a23;
}

.trading-bot-page .connect-modal .connection-account-type input[type="radio"] {
    width: 15px;
    height: 15px;
    min-height: 15px;
    max-height: 15px;
    margin: 0;
    appearance: none;
    border: 1px solid #697787;
    border-radius: 50%;
    background: #0c1117;
    box-shadow: inset 0 0 0 3px #0c1117;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease;
}

.trading-bot-page .connect-modal .connection-account-type input[type="radio"]:checked {
    border-color: #e8bd66;
    background: #e8bd66;
}

.trading-bot-page .connect-modal .connection-account-type label:has(input:checked) {
    border-color: rgba(232, 189, 102, .48);
    background: linear-gradient(145deg, rgba(232, 189, 102, .12), rgba(232, 189, 102, .045));
    box-shadow: inset 0 1px rgba(255, 255, 255, .03), 0 5px 16px rgba(0, 0, 0, .12);
    color: #f1d590;
}

.trading-bot-page .connect-modal .connection-account-type label:has(input:focus-visible) {
    outline: 2px solid #e8bd66;
    outline-offset: 2px;
}

.trading-bot-page .connect-modal .prop-firm-picker {
    gap: 11px;
    padding: 15px;
    border-color: rgba(232, 189, 102, .18);
    border-radius: 14px;
    background:
        radial-gradient(ellipse at 0 0, rgba(232, 189, 102, .09), transparent 45%),
        linear-gradient(145deg, rgba(20, 28, 37, .95), rgba(13, 18, 24, .95));
}

.trading-bot-page .prop-firm-picker-heading {
    display: flex;
    align-items: flex-start;
    gap: 11px;
}

.trading-bot-page .prop-firm-picker-icon {
    display: grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(232, 189, 102, .19);
    border-radius: 10px;
    background: rgba(232, 189, 102, .09);
    color: #e8c875;
    font-size: 12px;
}

.trading-bot-page .prop-firm-picker-heading h3 {
    margin: 0 0 4px;
    color: #e8edf3;
    font-size: 12px;
    font-weight: 700;
}

.trading-bot-page .prop-firm-picker-heading p {
    margin: 0;
    color: #8f9baa;
    font-size: 10px;
    line-height: 1.5;
}

.trading-bot-page .connect-modal .prop-firm-catalog-message {
    min-height: 40px;
    padding: 10px 11px;
    border: 1px solid rgba(196, 209, 224, .085);
    border-radius: 9px;
    background: rgba(5, 9, 13, .42);
    color: #aab5c1;
    font-size: 10px;
    line-height: 1.5;
}

.trading-bot-page .connect-modal .prop-firm-retry {
    min-height: 38px;
    border: 1px solid rgba(232, 189, 102, .18);
    border-radius: 9px;
    background: rgba(232, 189, 102, .075);
    color: #e6c879;
    font-size: 10px;
    transition: background .18s ease, border-color .18s ease;
}

.trading-bot-page .connect-modal .prop-firm-retry:hover {
    border-color: rgba(232, 189, 102, .38);
    background: rgba(232, 189, 102, .13);
}

.trading-bot-page .connect-modal .prop-firm-selected-preview {
    min-height: 40px;
    margin-top: 3px;
    padding: 5px 9px;
    border: 1px solid rgba(98, 212, 154, .17);
    border-radius: 9px;
    background: rgba(98, 212, 154, .05);
    color: #a6e5c4;
    font-size: 11px;
}

.trading-bot-page .connect-modal .prop-lot-settings {
    gap: 9px;
    padding: 15px;
    border-color: rgba(232, 189, 102, .2);
    border-radius: 13px;
    background:
        radial-gradient(ellipse at 100% 0, rgba(232, 189, 102, .08), transparent 50%),
        rgba(232, 189, 102, .035);
}

.trading-bot-page .connect-modal .prop-lot-settings h3 {
    margin: 0;
    color: #edcf81;
    font-size: 13px;
}

.trading-bot-page .connect-modal .prop-lot-settings p,
.trading-bot-page .connect-modal .prop-lot-settings small {
    margin: 0;
    color: #93a0ae;
    font-size: 10px;
    line-height: 1.55;
}

.trading-bot-page .connect-modal .prop-lot-settings label {
    margin-top: 2px;
    color: #c9d1dc;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .5px;
}

.trading-bot-page #connectModal.is-prop-firm .verified-account-overview {
    border-color: rgba(232, 189, 102, .25);
    background:
        radial-gradient(ellipse at 100% 0, rgba(232, 189, 102, .07), transparent 52%),
        linear-gradient(145deg, rgba(20, 28, 37, .98), rgba(13, 18, 24, .98));
}

@media (max-width: 560px) {
    .trading-bot-page .connect-modal .connection-account-type {
        gap: 6px;
    }

    .trading-bot-page .connect-modal .connection-account-type label {
        justify-content: center;
        gap: 6px;
        padding: 9px 5px;
        font-size: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .trading-bot-page .connect-modal .form-group input,
    .trading-bot-page .connect-modal .form-group select,
    .trading-bot-page .connect-modal .prop-lot-settings input,
    .trading-bot-page .connect-modal .connection-account-type label,
    .trading-bot-page .connect-modal .connection-account-type input,
    .trading-bot-page .connect-modal .prop-firm-retry {
        transition: none;
    }
}

@media (max-width: 650px) {
    body.connection-modal-open {
        overflow: hidden;
    }

    .trading-bot-page #connectModal {
        align-items: stretch;
        justify-content: stretch;
        overflow: hidden;
    }

    .trading-bot-page .connect-modal {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: 100dvh;
        min-height: 0;
        max-height: 100dvh;
        overflow: hidden;
        border: 0;
        border-radius: 0;
        transform: none;
    }

    .trading-bot-page .connect-modal .modal-header,
    .trading-bot-page .connect-modal .steps,
    .trading-bot-page .connect-modal .connection-progress {
        flex: 0 0 auto;
    }

    .trading-bot-page .connect-modal form {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-gutter: stable;
        padding-bottom: calc(24px + env(safe-area-inset-bottom));
    }

    .trading-bot-page .connect-modal .setup-actions {
        position: sticky;
        bottom: 0;
        z-index: 2;
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }

    .trading-bot-page .connect-modal .continue-btn:hover {
        transform: none;
    }

    .trading-bot-page .saved-accounts-section,
    .trading-bot-page .connected-account,
    .trading-bot-page .accounts-section,
    .trading-bot-page #botTradingSection {
        animation: none;
    }
}
