:root {
    color-scheme: dark;
    --bg: #07111f;
    --panel: rgba(11, 22, 40, 0.88);
    --panel-strong: rgba(11, 22, 40, 0.96);
    --line: #1a2942;
    --text: #ffffff;
    --muted: #9db0c8;
    --accent: #00d4aa;
    --accent-2: #3aa8ff;
    --danger: #ff4d5a;
    --success: #00e676;
    --warning: #f5b942;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html,
body {
    min-height: 100%;
}

.landing-body {
    overflow-x: hidden;
}

.site-nav {
    position: fixed;
    top: 12px;
    left: 50%;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1180px, calc(100% - 24px));
    min-height: 64px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(11, 17, 26, 0.82);
    box-shadow: var(--shadow);
    transform: translateX(-50%);
    backdrop-filter: blur(18px);
}

.terminal-nav {
    width: calc(100% - 24px);
}

.nav-brand {
    color: var(--text);
    font-size: 18px;
    font-weight: 900;
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-links a,
.nav-cta {
    color: var(--muted);
    font-size: 14px;
    text-decoration: none;
    transition: color 160ms ease, transform 160ms ease;
}

.nav-links a:hover,
.nav-cta:hover {
    color: var(--text);
    transform: translateY(-1px);
}

.nav-cta,
.primary-cta,
.secondary-cta {
    border-radius: 8px;
    padding: 11px 15px;
    font-weight: 800;
}

.nav-cta,
.primary-cta {
    background: linear-gradient(135deg, var(--accent), #76f7c8);
    color: #041018;
}

.secondary-cta {
    border: 1px solid var(--line);
    color: var(--text);
    text-decoration: none;
}

.landing-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.78fr);
    gap: 42px;
    align-items: center;
    min-height: 100vh;
    padding: 118px max(24px, calc((100vw - 1180px) / 2)) 72px;
}

.hero-copy h1 {
    max-width: 760px;
    margin: 10px 0 18px;
    font-size: clamp(42px, 7vw, 86px);
    line-height: 0.96;
    letter-spacing: 0;
}

.hero-copy p {
    max-width: 640px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.65;
}

.hero-kicker {
    display: inline-flex;
    border: 1px solid rgba(49, 212, 160, 0.45);
    border-radius: 999px;
    padding: 8px 12px;
    color: #bfffe9;
    background: rgba(49, 212, 160, 0.1);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.primary-cta {
    text-decoration: none;
}

.hero-terminal {
    padding: 18px;
    animation: floatTerminal 5s ease-in-out infinite;
}

@keyframes floatTerminal {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.preview-top,
.preview-grid {
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-top span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--danger);
}

.preview-top span:nth-child(2) {
    background: var(--warning);
}

.preview-top span:nth-child(3) {
    background: var(--accent);
}

.preview-top strong {
    margin-left: auto;
}

.preview-chart {
    display: flex;
    align-items: end;
    gap: 12px;
    height: 280px;
    margin: 18px 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(5, 10, 16, 0.72);
}

.preview-chart i {
    flex: 1;
    border-radius: 999px 999px 0 0;
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
    animation: pulseBar 1.8s ease-in-out infinite alternate;
}

.preview-chart i:nth-child(2n) {
    animation-delay: 240ms;
}

@keyframes pulseBar {
    from { opacity: 0.58; transform: scaleY(0.86); }
    to { opacity: 1; transform: scaleY(1); }
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.preview-grid div,
.landing-section article,
.stats-band div,
.testimonials blockquote {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(18, 27, 39, 0.72);
}

.preview-grid div {
    display: grid;
    gap: 4px;
    padding: 12px;
}

.preview-grid small,
.landing-section p,
.stats-band span,
.testimonials span {
    color: var(--muted);
}

.landing-section {
    width: min(1180px, calc(100% - 24px));
    margin: 0 auto 24px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.landing-section article,
.testimonials blockquote {
    margin: 0;
    padding: 22px;
    transition: transform 160ms ease, border-color 160ms ease;
}

.landing-section article:hover,
.testimonials blockquote:hover {
    border-color: rgba(90, 184, 255, 0.52);
    transform: translateY(-3px);
}

.landing-section h2 {
    margin: 0 0 10px;
}

.stats-band {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    width: min(1180px, calc(100% - 24px));
    margin: 18px auto 24px;
}

.stats-band div {
    display: grid;
    gap: 4px;
    padding: 20px;
}

.stats-band strong {
    font-size: 34px;
}

.testimonials {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.testimonials span {
    display: block;
    margin-top: 14px;
}

.landing-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1180px, calc(100% - 24px));
    margin: 40px auto 24px;
    padding: 22px 0;
    border-top: 1px solid var(--line);
}

.landing-footer nav {
    display: flex;
    gap: 16px;
}

.landing-footer a {
    color: var(--muted);
    text-decoration: none;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 15% 12%, rgba(49, 212, 160, 0.14), transparent 26rem),
        radial-gradient(circle at 82% 8%, rgba(90, 184, 255, 0.12), transparent 24rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.terminal-shell {
    display: grid;
    grid-template-columns: 68px minmax(260px, 320px) minmax(420px, 1fr) minmax(300px, 380px);
    gap: 12px;
    height: 100vh;
    padding: 88px 12px 12px;
}

.account-switcher,
.tools-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.account-current,
.account-menu button,
.account-menu a,
.tools-trigger,
.tools-dropdown button,
.builder-link {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--text);
    padding: 7px 10px;
    text-decoration: none;
}

.account-current,
.account-menu button,
.account-menu a {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 168px;
    text-align: left;
}

.account-current small,
.account-menu small {
    display: block;
    color: var(--muted);
}

.account-current strong,
.account-menu strong {
    display: block;
    font-size: 13px;
}

.account-menu,
.tools-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 80;
    display: none;
    min-width: 230px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-strong);
    box-shadow: var(--shadow);
}

.account-switcher.is-open .account-menu,
.tools-menu.is-open .tools-dropdown {
    display: grid;
    gap: 6px;
}

.admin-mode .account-current {
    border-color: rgba(245, 185, 66, 0.45);
}

.flag-us {
    width: 18px;
    height: 12px;
    margin-top: 2px;
    border-radius: 2px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    background:
        linear-gradient(90deg, #2456a6 0 40%, transparent 40%),
        repeating-linear-gradient(180deg, #fff 0 2px, #d64343 2px 4px);
}

.glass-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--panel-strong);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.brand-mark,
.rail-btn {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    border: 1px solid var(--line);
    color: var(--text);
    text-decoration: none;
}

.brand-mark {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #051018;
    font-weight: 900;
}

.rail-btn {
    background: rgba(255, 255, 255, 0.04);
}

.rail-btn.is-active,
.tab.is-active,
.segmented button.is-active {
    border-color: rgba(49, 212, 160, 0.65);
    background: rgba(49, 212, 160, 0.14);
    color: #bfffe9;
}

.market-panel,
.order-column,
.workspace {
    min-height: 0;
}

.market-panel,
.trade-ticket,
.digits-panel,
.bot-panel,
.topbar,
.chart-panel,
.bottom-panel {
    padding: 14px;
}

.market-forex .digits-panel {
    display: none;
}

.market-forex .barrier-field {
    display: none;
}

.workspace {
    display: grid;
    grid-template-rows: auto minmax(310px, 1fr) minmax(210px, 32vh);
    gap: 12px;
}

.order-column {
    display: grid;
    grid-template-rows: auto auto minmax(220px, 1fr);
    gap: 12px;
    overflow: hidden;
}

.panel-header,
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.panel-header.compact h2,
.topbar h2,
.panel-header h1 {
    margin: 0;
    font-size: 18px;
    letter-spacing: 0;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.connection-pill,
.risk-chip {
    padding: 5px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.connection-pill.online,
.risk-chip.normal {
    color: var(--accent);
    border-color: rgba(49, 212, 160, 0.45);
}

.search-box,
.trade-ticket label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
}

.search-box {
    margin: 16px 0 10px;
}

input,
select {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(7, 12, 19, 0.68);
    color: var(--text);
    padding: 10px 11px;
    outline: none;
}

input:focus,
select:focus {
    border-color: rgba(90, 184, 255, 0.72);
}

.market-tabs,
.segmented,
.icon-actions,
.ticket-actions,
.bot-templates {
    display: flex;
    gap: 6px;
}

.tab,
.segmented button,
.icon-actions button,
.bot-templates button {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    padding: 8px 10px;
}

.market-list {
    display: grid;
    gap: 8px;
    height: calc(100vh - 210px);
    margin-top: 12px;
    overflow: auto;
    padding-right: 3px;
}

.market-row {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.market-row.is-active {
    border-color: rgba(90, 184, 255, 0.62);
    background: rgba(90, 184, 255, 0.1);
}

.market-main {
    min-width: 0;
    border: 0;
    background: transparent;
    color: inherit;
    padding: 0;
    text-align: left;
}

.favorite-btn {
    width: 26px;
    height: 26px;
    border: 0;
    background: transparent;
    color: var(--muted);
}

.favorite-btn.is-on {
    color: var(--warning);
}

.market-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.market-meta {
    color: var(--muted);
    font-size: 12px;
}

.market-price {
    font-variant-numeric: tabular-nums;
}

.market-price.up,
.positive {
    color: var(--accent);
}

.market-price.down,
.negative {
    color: var(--danger);
}

.quote-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.18);
}

.neutral {
    color: var(--muted);
}

.text-link {
    color: var(--muted);
    text-decoration: none;
}

.topbar-actions {
    display: flex;
    gap: 10px;
}

.chart-panel {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr;
    min-height: 0;
}

.chart-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.tools-dropdown {
    left: 0;
    right: auto;
    grid-template-columns: 1fr;
    min-width: 260px;
}

.tools-dropdown button {
    text-align: left;
}

.tools-dropdown button.is-selected-tool {
    border-color: rgba(245, 185, 66, 0.68);
    color: #ffe3a5;
}

#price-chart {
    width: 100%;
    height: 100%;
    min-height: 280px;
}

.crosshair-readout {
    position: absolute;
    right: 18px;
    bottom: 18px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(5, 10, 16, 0.78);
    color: var(--muted);
    font-size: 12px;
}

.portfolio-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 12px 0;
}

.portfolio-summary div {
    display: grid;
    gap: 4px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.portfolio-summary span {
    color: var(--muted);
    font-size: 12px;
}

.admin-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.admin-strip a {
    border: 1px solid rgba(245, 185, 66, 0.34);
    border-radius: 8px;
    background: rgba(245, 185, 66, 0.08);
    color: #ffe3a5;
    padding: 8px 10px;
    font-size: 12px;
    text-decoration: none;
}

.table-wrap {
    overflow: auto;
}

.trades-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.trades-table th,
.trades-table td {
    padding: 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    font-size: 13px;
}

.trades-table th {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
}

.trade-ticket form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.trade-ticket label:first-child,
.quote-box,
.ticket-actions,
.risk-copy,
.barrier-field,
.accumulator-controls {
    grid-column: 1 / -1;
}

.accumulator-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(0, 212, 170, 0.22);
    border-radius: 8px;
    background: rgba(0, 212, 170, 0.06);
}

.quote-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
}

.buy-btn,
.sell-btn {
    flex: 1;
    border: 0;
    border-radius: 8px;
    color: #061018;
    font-weight: 800;
    padding: 11px;
}

.buy-btn {
    background: var(--accent);
}

.sell-btn {
    background: var(--danger);
}

.risk-copy {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.digits-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.digit-cell {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 6px;
    min-height: 92px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
}

.digit-cell.is-hot {
    border-color: rgba(0, 230, 118, 0.75);
}

.digit-cell.is-low {
    border-color: rgba(255, 77, 90, 0.72);
}

.digit-cell.is-active-tick {
    animation: digitBucket 520ms ease;
}

.digit-flame {
    position: absolute;
    top: 6px;
    right: 7px;
    font-size: 28px;
    line-height: 1;
    opacity: 0;
    transform-origin: center bottom;
}

.digit-cell.is-hot .digit-flame {
    color: var(--success);
    opacity: 1;
    animation: flamePulse 900ms ease-in-out infinite;
}

.digit-cell.is-low .digit-flame {
    color: var(--danger);
    opacity: 1;
    animation: flamePulse 700ms ease-in-out infinite;
}

.digit-cell.is-win {
    animation: digitWin 700ms ease-in-out 3;
}

.digit-cell.is-loss {
    animation: digitLoss 700ms ease-in-out 3;
}

@keyframes digitWin {
    50% { background: rgba(49, 212, 160, 0.35); }
}

@keyframes digitLoss {
    50% { background: rgba(255, 77, 90, 0.34); }
}

@keyframes digitBucket {
    50% {
        background: rgba(0, 212, 170, 0.2);
        transform: translateY(-2px);
    }
}

@keyframes flamePulse {
    50% {
        transform: scale(1.22);
        filter: drop-shadow(0 0 12px currentColor);
    }
}

.digit-bar {
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.digit-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transition: width 260ms ease, background 180ms ease;
}

.digit-cell.is-low .digit-bar span {
    background: linear-gradient(90deg, var(--danger), #ff9a7b);
}

.digit-percent {
    color: var(--muted);
    font-size: 11px;
}

.strategy-row {
    display: grid;
    grid-template-columns: auto 58px 1fr auto 76px;
    gap: 6px;
    align-items: center;
    color: var(--muted);
    font-size: 12px;
}

.bot-templates {
    margin: 10px 0;
    flex-wrap: wrap;
}

.bot-log {
    min-height: 110px;
    max-height: 180px;
    overflow: auto;
    margin: 10px 0 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.24);
    color: var(--muted);
    white-space: pre-wrap;
}

.builder-link {
    display: block;
    margin-top: 10px;
    text-align: center;
    font-weight: 800;
}

.bot-builder-shell {
    display: grid;
    grid-template-columns: 260px minmax(420px, 1fr) 300px;
    gap: 12px;
    min-height: 100vh;
    padding: 88px 12px 12px;
}

.builder-palette,
.builder-canvas,
.builder-config {
    min-height: 0;
    padding: 14px;
}

.block-list,
.node-stack,
.config-grid {
    display: grid;
    gap: 8px;
}

.strategy-block,
.builder-node {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    padding: 10px;
}

.builder-stage {
    position: relative;
    min-height: 520px;
    margin-top: 12px;
    border: 1px dashed rgba(157, 176, 200, 0.32);
    border-radius: 8px;
    background:
        linear-gradient(rgba(157, 176, 200, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(157, 176, 200, 0.06) 1px, transparent 1px);
    background-size: 28px 28px;
}

.builder-node {
    position: absolute;
    width: 210px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.builder-node small {
    color: var(--muted);
}

.node-connector {
    position: absolute;
    height: 2px;
    background: var(--accent);
    transform-origin: left center;
}

@media (max-width: 1180px) {
    .site-nav {
        position: sticky;
        top: 0;
        left: auto;
        width: 100%;
        border-radius: 0;
        transform: none;
    }

    .nav-links {
        gap: 10px;
        overflow-x: auto;
    }

    .terminal-shell {
        grid-template-columns: 58px minmax(220px, 280px) 1fr;
        padding-top: 12px;
    }

    .order-column {
        grid-column: 2 / -1;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-rows: auto;
    }
}

@media (max-width: 780px) {
    .site-nav,
    .landing-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .account-switcher,
    .nav-links {
        width: 100%;
        overflow-x: auto;
    }

    .landing-hero,
    .feature-grid,
    .stats-band,
    .testimonials {
        grid-template-columns: 1fr;
    }

    .landing-hero {
        padding-top: 40px;
    }

    .terminal-shell {
        height: auto;
        min-height: 100vh;
        grid-template-columns: 1fr;
    }

    .rail {
        flex-direction: row;
    }

    .market-list {
        height: 320px;
    }

    .workspace,
    .order-column {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        grid-column: auto;
    }

    .chart-toolbar,
    .topbar,
    .panel-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .portfolio-summary,
    .trade-ticket form,
    .accumulator-controls {
        grid-template-columns: 1fr;
    }

    .digits-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .strategy-row {
        grid-template-columns: 1fr;
    }

    .bot-builder-shell {
        grid-template-columns: 1fr;
        padding-top: 12px;
    }
}

body:has(.deriv-terminal) {
    overflow: hidden;
    background: #141819;
}

.deriv-terminal {
    --dt-bg: #15191a;
    --dt-panel: #191d1e;
    --dt-panel-2: #202425;
    --dt-line: #313637;
    --dt-text: #f2f3f3;
    --dt-muted: #a2a8aa;
    --dt-chart: #171c24;
    --dt-chart-line: #e7edf3;
    --dt-accent: #00c390;
    --dt-red: #ff444f;
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) minmax(300px, 340px);
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: var(--dt-bg);
    color: var(--dt-text);
    font-size: 14px;
    line-height: 1.35;
}

.auth-body {
    min-height: 100vh;
    background:
        linear-gradient(120deg, rgba(0, 195, 144, 0.12), transparent 36rem),
        #111820;
}

.auth-shell {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px;
}

.auth-logo {
    position: fixed;
    top: 24px;
    left: 24px;
    color: #fff;
    font-size: 20px;
    font-weight: 900;
    text-decoration: none;
}

.auth-panel {
    display: grid;
    gap: 16px;
    width: min(440px, 100%);
    border: 1px solid #2e3744;
    border-radius: 8px;
    background: #171c24;
    color: #f2f3f3;
    padding: 28px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

.auth-kicker {
    color: #00d8a5;
    font-size: 13px;
    font-weight: 800;
}

.auth-panel h1 {
    margin: 0;
    font-size: 32px;
    line-height: 1.05;
}

.auth-panel p,
.auth-panel small {
    margin: 0;
    color: #a2a8aa;
    line-height: 1.55;
}

.auth-error {
    border: 1px solid rgba(255, 68, 79, 0.4);
    border-radius: 8px;
    background: rgba(255, 68, 79, 0.1);
    color: #ff9aa1;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.4;
}

.auth-primary,
.auth-secondary {
    display: grid;
    place-items: center;
    min-height: 48px;
    border-radius: 999px;
    font-weight: 900;
    text-decoration: none;
}

.auth-primary {
    background: #ff444f;
    color: #fff;
}

.auth-secondary {
    border: 1px solid #333c47;
    color: #f2f3f3;
}

.deriv-terminal.theme-light,
body.theme-light .deriv-terminal {
    --dt-bg: #f4f5f5;
    --dt-panel: #ffffff;
    --dt-panel-2: #f2f3f3;
    --dt-line: #dde0e2;
    --dt-text: #171b1c;
    --dt-muted: #61696c;
    --dt-chart: #ffffff;
    --dt-chart-line: #111;
}

.deriv-terminal button,
.deriv-terminal input,
.deriv-terminal select,
.deriv-terminal a {
    font: inherit;
}

.deriv-terminal button,
.deriv-terminal a {
    min-width: 0;
}

.deriv-terminal [hidden] {
    display: none !important;
}

.deriv-rail {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    padding: 16px 6px;
    min-height: 0;
    overflow: visible auto;
    border-right: 1px solid var(--dt-line);
    background: var(--dt-panel);
}

.deriv-logo {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--dt-red);
    color: white;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
}

.rail-item {
    display: grid;
    place-items: center;
    gap: 4px;
    width: 74px;
    min-height: 54px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--dt-text);
    font-size: 14px;
    text-decoration: none;
}

.rail-item span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rail-item.is-active,
.rail-item:hover {
    color: var(--dt-red);
}

.rail-spacer {
    flex: 1;
}

.trade-workspace {
    display: grid;
    grid-template-rows: 68px minmax(0, 1fr);
    min-width: 0;
    min-height: 0;
}

.trade-topbar {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 0 14px;
    overflow: hidden;
    border-bottom: 1px solid var(--dt-line);
    background: var(--dt-panel);
}

.app-grid {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border: 0;
    border-right: 1px solid var(--dt-line);
    background: transparent;
    color: var(--dt-muted);
    font-size: 12px;
    font-weight: 800;
}

.trade-type-tabs {
    display: flex;
    gap: 8px;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}

.trade-type-tabs::-webkit-scrollbar {
    display: none;
}

.trade-type-tabs button,
.choice-pill button {
    flex: 0 0 auto;
    border: 1px solid var(--dt-line);
    border-radius: 999px;
    background: transparent;
    color: var(--dt-text);
    max-width: 168px;
    overflow: hidden;
    padding: 8px 12px;
    font-size: 13px;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trade-type-tabs button.is-active,
.choice-pill button.is-active {
    border-color: #fff;
    background: #fff;
    color: #11171c;
    box-shadow: none;
}

.chart-stage {
    position: relative;
    min-width: 0;
    min-height: 0;
    background: var(--dt-chart);
    background-size: 100px 80px;
    overflow: hidden;
}

#price-chart {
    display: block;
    width: 100%;
    height: 100%;
}

.symbol-card {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 18px;
    gap: 10px;
    align-items: center;
    width: min(330px, calc(100% - 24px));
    border: 1px solid #3b4041;
    border-radius: 4px;
    background: #1d232d;
    color: #fff;
    padding: 9px 11px;
    text-align: left;
}

.symbol-card > span {
    min-width: 0;
}

.symbol-card strong,
.symbol-card small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.symbol-card small {
    color: #c6cdcf;
    font-size: 12px;
}

.mini-candles {
    color: #70d9dd;
    font-size: 24px;
}

.floating-tools {
    position: absolute;
    top: 102px;
    left: 12px;
    z-index: 4;
    display: grid;
    gap: 8px;
    width: 56px;
    padding: 8px;
    border-radius: 4px;
    background: #202630;
}

.floating-tools button,
.zoom-stack button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 3px;
    background: #111820;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.zoom-stack {
    position: absolute;
    left: 14px;
    bottom: 80px;
    z-index: 4;
    display: grid;
    gap: 4px;
}

.price-badge {
    position: absolute;
    right: 4px;
    top: 50%;
    z-index: 4;
    border-radius: 4px;
    background: #000;
    color: #fff;
    padding: 5px 8px;
    font-weight: 800;
}

.ticket-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    border-left: 1px solid var(--dt-line);
    background: #171c24;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.account-strip {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid var(--dt-line);
}

.mobile-account-strip {
    display: none;
}

.account-strip.is-open .account-menu {
    display: grid;
    gap: 6px;
}

.account-strip .account-menu {
    top: 58px;
    right: 16px;
}

.account-current {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--dt-text);
    text-align: left;
}

.account-current small {
    display: block;
    color: #4bded1;
}

.account-current strong {
    display: block;
    overflow: hidden;
    max-width: 168px;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-current > span:first-child {
    min-width: 0;
}

.deposit-btn {
    display: inline-grid;
    place-items: center;
    min-height: 36px;
    max-width: 116px;
    border-radius: 999px;
    background: #d80716;
    color: #fff;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    white-space: nowrap;
}

.trade-ticket {
    padding: 14px;
    overflow: auto;
    min-width: 0;
}

.how-to {
    display: block;
    margin-bottom: 12px;
    color: var(--dt-text);
    font-size: 13px;
    text-decoration: none;
}

.trade-ticket form {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.choice-pill {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--dt-line);
    border-radius: 999px;
    background: #222832;
    padding: 3px;
    min-width: 0;
}

.choice-pill button {
    border: 0;
    min-width: 0;
    overflow: hidden;
    padding: 9px 7px;
    text-overflow: ellipsis;
}

.choice-pill button.is-active {
    background: #505762;
    color: #00d8a5;
}

.ticket-field {
    position: relative;
    display: grid;
    gap: 5px;
    min-width: 0;
    border: 1px solid var(--dt-line);
    border-radius: 6px;
    background: #202630;
    padding: 10px 14px;
    color: var(--dt-muted);
    overflow: hidden;
}

.ticket-field input,
.ticket-field select {
    border: 0;
    background: transparent;
    color: var(--dt-text);
    min-width: 0;
    padding: 0;
    font-size: 14px;
}

.ticket-field b {
    position: absolute;
    right: 16px;
    bottom: 10px;
    color: var(--dt-muted);
    font-size: 12px;
}

.terms-list {
    display: grid;
    gap: 8px;
    color: var(--dt-muted);
    font-size: 12px;
}

.terms-list div {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    min-width: 0;
    padding: 0 8px;
}

.terms-list span,
.terms-list strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.digit-picker {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
    border: 1px solid var(--dt-line);
    border-radius: 6px;
    background: #202630;
    padding: 12px;
    min-width: 0;
}

.digit-picker button {
    border: 1px solid var(--dt-line);
    border-radius: 6px;
    background: #050708;
    color: var(--dt-text);
    min-width: 0;
    min-height: 38px;
    padding: 8px 0;
    font-size: 16px;
    line-height: 1;
}

.digit-picker button.is-active {
    background: #fff;
    color: #050708;
}

.digit-picker button.is-live {
    box-shadow: 0 0 0 2px #fff inset;
}

.digit-picker button.is-favorable {
    border-color: rgba(0, 212, 170, 0.72);
    color: #7fffe2;
}

.digit-picker button.is-unfavorable {
    border-color: rgba(255, 68, 79, 0.58);
    color: #ff9aa1;
}

.digit-picker small {
    color: var(--dt-muted);
    text-align: center;
}

.buy-btn {
    display: grid;
    gap: 2px;
    border: 0;
    border-radius: 999px;
    background: var(--dt-accent);
    color: #fff;
    padding: 13px;
    font-size: 16px;
    font-weight: 900;
    min-width: 0;
    overflow-wrap: anywhere;
}

.buy-btn span {
    font-size: 11px;
    line-height: 1.25;
}

.risk-copy {
    min-height: 18px;
    color: var(--dt-muted);
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
}

.terminal-clock {
    display: flex;
    gap: 10px;
    padding: 16px;
    border-top: 1px solid var(--dt-line);
    color: var(--dt-text);
}

.terminal-clock span {
    color: #4dbcc5;
}

.markets-popover {
    position: absolute;
    top: 152px;
    left: 84px;
    z-index: 20;
    display: grid;
    grid-template-columns: 240px 320px;
    width: min(560px, calc(100vw - 120px));
    max-height: calc(100vh - 190px);
    border-radius: 4px;
    background: #1d2122;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.46);
    overflow: hidden;
}

.markets-popover aside,
.markets-popover section {
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 14px;
}

.markets-popover aside {
    background: #222627;
}

.markets-popover button {
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #fff;
    padding: 10px;
    text-align: left;
}

.markets-popover button.is-active,
.markets-popover button:hover {
    background: rgba(255, 255, 255, 0.06);
}

.market-list {
    display: grid;
    gap: 0;
    max-height: calc(100vh - 270px);
    overflow: auto;
}

.deriv-terminal .market-list {
    height: auto;
    max-height: calc(100vh - 270px);
}

.deriv-terminal .market-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
}

.deriv-terminal .market-change {
    color: var(--dt-muted);
    font-size: 12px;
    white-space: nowrap;
}

.market-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    border-bottom: 1px solid #333839;
    padding: 11px;
}

.favorite-btn {
    display: none;
}

.market-main {
    border: 0;
    background: transparent;
    color: #fff;
    text-align: left;
}

.market-name,
.market-meta {
    display: block;
}

.market-meta {
    color: #aeb5b7;
    font-size: 12px;
}

.modal-layer {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.34);
}

.trade-modal {
    display: grid;
    gap: 22px;
    width: min(424px, calc(100vw - 28px));
    border-radius: 4px;
    background: #181c1d;
    color: #f5f6f6;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

.trade-modal.wide {
    grid-template-columns: 240px minmax(280px, 1fr);
    width: min(600px, calc(100vw - 28px));
    min-height: 450px;
}

.trade-modal.small {
    width: min(322px, calc(100vw - 28px));
    min-height: 430px;
}

.trade-modal header {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #333839;
}

.trade-modal header input {
    max-width: 284px;
}

.trade-modal header button,
.danger-link {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 28px;
}

.chart-type-grid,
.interval-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 0 24px;
}

.chart-type-grid button,
.interval-grid button {
    border: 1px solid #3b4041;
    border-radius: 4px;
    background: transparent;
    color: #777;
    padding: 14px 10px;
}

.chart-type-grid button.is-active,
.interval-grid button.is-active {
    color: #fff;
    border-color: #6f7779;
}

.trade-modal h3 {
    margin: 6px 24px 0;
}

.modal-toggle {
    display: flex;
    justify-content: space-between;
    padding: 18px 24px;
    border-top: 1px solid #333839;
}

.modal-toggle small {
    display: block;
    color: #c5cbcd;
}

.modal-sidebar {
    display: grid;
    align-content: start;
    gap: 2px;
    background: #222627;
    padding: 0;
}

.modal-sidebar button {
    border: 0;
    background: transparent;
    color: #ddd;
    padding: 14px 20px;
    text-align: left;
}

.modal-sidebar button.is-active {
    border-left: 4px solid #e30613;
    background: #191d1e;
    font-weight: 800;
}

.modal-empty {
    display: grid;
    place-items: center;
    color: #d9d6b7;
    min-height: 260px;
    text-align: center;
}

.danger-link {
    color: #ff444f;
    font-size: 14px;
    font-weight: 900;
    padding-bottom: 30px;
}

.positions-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 88px;
    z-index: 25;
    width: 304px;
    border-right: 1px solid var(--dt-line);
    background: #171b1c;
    color: #fff;
    transform: translateX(-110%);
    transition: transform 180ms ease;
}

.positions-drawer.is-open {
    transform: translateX(0);
}

.positions-drawer header {
    display: flex;
    justify-content: space-between;
    padding: 18px;
}

.positions-drawer header button {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 24px;
}

.empty-state {
    display: grid;
    place-items: center;
    height: 70vh;
    color: #787f81;
}

.mobile-sheet-handle,
.mobile-nav {
    display: none;
}

@media (max-width: 1180px) {
    .deriv-terminal {
        grid-template-columns: 78px minmax(0, 1fr) minmax(280px, 318px);
    }

    .deriv-rail {
        padding-inline: 6px;
    }

    .rail-item {
        width: 66px;
        min-height: 50px;
        font-size: 13px;
    }

    .rail-item span {
        font-size: 10px;
    }

    .trade-topbar {
        padding-inline: 10px;
    }

    .ticket-panel {
        font-size: 13px;
    }
}

@media (max-width: 900px) {
    body:has(.deriv-terminal) {
        background: #553238;
    }

    .deriv-terminal {
        grid-template-columns: minmax(0, 100vw);
        justify-content: center;
        height: 100dvh;
        overflow: hidden;
        font-size: 13px;
    }

    .deriv-rail,
    .positions-drawer {
        display: none;
    }

    .trade-workspace {
        grid-row: 1;
        grid-template-rows: auto minmax(0, 1fr);
        height: calc(100dvh - 58px);
        background: var(--dt-panel);
    }

    .trade-topbar {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        height: auto;
        padding: 8px;
        overflow: visible;
    }

    .mobile-account-strip {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 10px;
        align-items: center;
        padding: 4px 8px 10px;
        min-width: 0;
    }

    .mobile-account-strip small {
        display: block;
        color: #4bded1;
    }

    .mobile-account-strip strong {
        display: block;
        overflow: hidden;
        font-size: 14px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .app-grid {
        display: none;
    }

    .chart-stage {
        min-height: 0;
        margin: 0 8px 170px;
        border-radius: 6px;
        overflow: hidden;
    }

    .symbol-card {
        top: 10px;
        left: 8px;
        width: calc(100% - 16px);
        background: transparent;
        border: 1px solid var(--dt-line);
        padding: 8px 10px;
    }

    .symbol-card strong {
        font-size: 14px;
    }

    .floating-tools,
    .zoom-stack,
    .crosshair-readout {
        display: none;
    }

    .price-badge {
        right: 4px;
    }

    .ticket-panel {
        position: fixed;
        left: 50%;
        bottom: 58px;
        z-index: 18;
        width: min(390px, 100vw);
        max-height: min(62dvh, 430px);
        border: 0;
        border-radius: 16px 16px 0 0;
        transform: translate(-50%, calc(100% - 190px));
        transition: transform 180ms ease;
    }

    .ticket-panel.is-open {
        transform: translate(-50%, 0);
    }

    .account-strip,
    .terminal-clock,
    .how-to,
    .risk-copy {
        display: none;
    }

    .trade-ticket {
        padding: 26px 10px 10px;
    }

    .trade-ticket::before {
        content: "";
        position: absolute;
        top: 10px;
        left: 50%;
        width: 34px;
        height: 4px;
        border-radius: 999px;
        background: #6a7072;
        transform: translateX(-50%);
    }

    .mobile-sheet-handle {
        position: fixed;
        left: 50%;
        bottom: 238px;
        z-index: 22;
        display: grid;
        place-items: center;
        width: 56px;
        height: 28px;
        border: 0;
        border-radius: 999px;
        background: #25292a;
        color: #777;
        transform: translateX(-50%);
    }

    .mobile-nav {
        position: fixed;
        left: 50%;
        bottom: 0;
        z-index: 24;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        width: min(390px, 100vw);
        height: 58px;
        border-top: 1px solid var(--dt-line);
        background: var(--dt-panel);
    }

    .mobile-nav button,
    .mobile-nav a {
        display: grid;
        place-items: center;
        border: 0;
        background: transparent;
        color: var(--dt-text);
        font-size: 18px;
        text-decoration: none;
    }

    .mobile-nav span {
        font-size: 11px;
    }

    .mobile-nav .is-active {
        color: var(--dt-red);
    }

    .markets-popover {
        top: 136px;
        left: 50%;
        grid-template-columns: 1fr;
        width: min(390px, calc(100vw - 18px));
        transform: translateX(-50%);
    }

    .trade-type-tabs {
        padding-bottom: 4px;
    }

    .choice-pill button,
    .buy-btn {
        font-size: 14px;
    }

    .digit-picker {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 6px;
        padding: 8px;
    }

    .digit-picker button {
        min-height: 34px;
        font-size: 14px;
    }

    .digit-picker small {
        font-size: 10px;
    }

    .markets-popover aside {
        display: none;
    }
}

@media (max-width: 420px) {
    .trade-type-tabs button {
        max-width: 132px;
        padding-inline: 10px;
        font-size: 12px;
    }

    .ticket-panel {
        max-height: 58dvh;
        transform: translate(-50%, calc(100% - 176px));
    }

    .mobile-sheet-handle {
        bottom: 224px;
    }

    .trade-ticket form {
        gap: 8px;
    }
}

body.bot-page {
    overflow: hidden;
    background: #15191a;
}

.deriv-bot-builder {
    --dt-bg: #15191a;
    --dt-panel: #191d1e;
    --dt-panel-2: #202425;
    --dt-line: #313637;
    --dt-text: #f2f3f3;
    --dt-muted: #a2a8aa;
    --dt-red: #d80716;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    height: 100vh;
    color: var(--dt-text);
}

.bot-main {
    display: grid;
    grid-template-rows: 76px minmax(0, 1fr);
    min-width: 0;
}

.bot-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--dt-line);
    background: var(--dt-panel-2);
    padding: 0 16px;
}

.bot-topbar nav {
    display: flex;
    align-self: stretch;
}

.bot-topbar nav a {
    display: grid;
    place-items: center;
    min-width: 126px;
    border-bottom: 2px solid transparent;
    color: var(--dt-text);
    text-decoration: none;
}

.bot-topbar nav a.is-active {
    border-color: var(--dt-red);
    background: #15191a;
    font-weight: 900;
}

.bot-account {
    display: flex;
    align-items: center;
    gap: 14px;
}

.bot-account small {
    display: block;
    color: #4bded1;
}

.bot-account strong {
    display: block;
}

.bot-content {
    display: grid;
    grid-template-columns: 240px minmax(520px, 1fr) 356px;
    gap: 10px;
    min-height: 0;
    padding: 8px;
    background: #15191a;
}

.blocks-menu {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
    min-width: 0;
}

.quick-strategy {
    border: 0;
    border-radius: 4px;
    background: var(--dt-red);
    color: #fff;
    padding: 12px;
    font-weight: 900;
}

.blocks-menu section,
.bot-summary {
    border: 1px solid var(--dt-line);
    background: var(--dt-panel);
}

.blocks-menu h2 {
    margin: 0;
    padding: 14px;
    font-size: 16px;
    text-align: center;
}

.blocks-menu input {
    width: calc(100% - 20px);
    margin: 0 10px 10px;
}

.block-menu-item {
    display: block;
    width: 100%;
    border: 0;
    border-top: 1px solid var(--dt-line);
    background: transparent;
    color: var(--dt-text);
    padding: 14px 10px;
    text-align: left;
    font-weight: 800;
}

.bot-canvas-wrap {
    min-width: 0;
    min-height: 0;
}

.bot-toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    width: max-content;
    max-width: 100%;
    margin-bottom: 14px;
    border: 1px solid var(--dt-line);
    border-radius: 4px;
    background: #171b1c;
    padding: 8px 16px;
    overflow-x: auto;
}

.bot-toolbar button {
    width: 30px;
    height: 24px;
    border: 0;
    background: transparent;
    color: var(--dt-text);
    font-size: 20px;
}

.bot-stage {
    position: relative;
    min-height: calc(100vh - 178px);
    overflow: auto;
    transform-origin: top left;
}

.bot-block {
    position: absolute;
    width: 278px;
    border: 1px solid #0878a0;
    border-radius: 4px;
    background: #09516d;
    color: #fff;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.bot-block.block-large {
    width: 450px;
}

.bot-block h3 {
    margin: 0;
    padding: 8px 10px;
    background: #075a78;
    font-size: 14px;
}

.bot-block h4,
.bot-block p,
.bot-block label {
    display: block;
    margin: 8px 10px;
    font-size: 12px;
}

.bot-block span,
.bot-block b {
    display: inline-block;
    border: 1px solid #53595b;
    border-radius: 999px;
    background: #25292a;
    padding: 4px 8px;
    font-weight: 500;
}

.bot-summary {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.run-strip {
    display: grid;
    grid-template-columns: 82px 1fr;
    align-items: center;
}

.run-strip button {
    border: 0;
    background: #4bb6b4;
    color: #fff;
    padding: 12px;
    font-weight: 900;
}

.run-strip strong {
    border: 1px solid var(--dt-line);
    padding: 10px;
    text-align: center;
    font-size: 12px;
}

.bot-summary nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid var(--dt-line);
}

.bot-summary nav button {
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--dt-muted);
    padding: 12px;
}

.bot-summary nav button.is-active {
    border-color: var(--dt-red);
    color: var(--dt-text);
    font-weight: 900;
}

.summary-empty {
    display: grid;
    place-items: center;
    color: var(--dt-muted);
    text-align: center;
}

.bot-summary footer {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    border-top: 1px solid var(--dt-line);
    padding: 16px;
}

.bot-summary footer span {
    display: grid;
    gap: 6px;
    color: var(--dt-muted);
    font-size: 12px;
}

.bot-summary footer strong {
    color: var(--dt-text);
}

.bot-summary footer button {
    grid-column: 1 / -1;
    border: 1px solid var(--dt-line);
    border-radius: 4px;
    background: transparent;
    color: var(--dt-text);
    padding: 10px;
    font-weight: 900;
}

.bot-dialog {
    display: grid;
    gap: 18px;
    border-radius: 28px;
    background: #1b1f20;
    color: #f5f6f6;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}

.bot-dialog.small {
    width: min(330px, calc(100vw - 24px));
    padding: 24px;
}

.bot-dialog.load {
    grid-template-columns: 330px minmax(420px, 1fr);
    width: min(1000px, calc(100vw - 48px));
    min-height: 700px;
    padding: 24px;
}

.bot-dialog.chart-dialog {
    width: min(535px, calc(100vw - 24px));
    border-radius: 6px;
    padding: 12px;
}

.bot-dialog header,
.bot-dialog footer,
.load-tabs,
.save-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.bot-dialog header {
    grid-column: 1 / -1;
}

.bot-dialog header button {
    border: 0;
    border-radius: 999px;
    background: #25292a;
    color: #fff;
    width: 48px;
    height: 48px;
    font-size: 28px;
}

.bot-dialog p {
    color: #d7dcdd;
    line-height: 1.6;
}

.bot-dialog footer {
    grid-column: 1 / -1;
    border-top: 1px solid var(--dt-line);
    padding-top: 18px;
}

.bot-dialog footer button,
.save-options button {
    border: 1px solid #697073;
    border-radius: 999px;
    background: transparent;
    color: #fff;
    padding: 12px 28px;
    font-weight: 900;
}

.bot-dialog .danger-btn {
    border-color: var(--dt-red);
    background: var(--dt-red);
}

.load-tabs {
    grid-column: 1;
    justify-content: flex-start;
}

.load-tabs button {
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #ddd;
    padding: 12px 28px;
}

.load-tabs button.is-active {
    border-color: var(--dt-red);
    font-weight: 900;
}

.bot-dialog.load aside {
    grid-column: 1;
    border-top: 1px solid var(--dt-line);
    background: #242829;
    padding: 14px;
}

.bot-preview {
    grid-column: 2;
    grid-row: 2 / span 2;
    display: grid;
    gap: 12px;
}

.preview-blocks {
    min-height: 500px;
    border: 1px solid #53595b;
    background:
        linear-gradient(90deg, transparent 58%, #09516d 58% 82%, transparent 82%),
        linear-gradient(#09516d 0 20%, transparent 20% 45%, #09516d 45% 64%, transparent 64%);
}

.save-options {
    justify-content: flex-start;
}

.save-options button {
    display: grid;
    place-items: center;
    width: 128px;
    height: 120px;
    border-radius: 4px;
}

.save-options button.is-active {
    border-color: #889093;
}

.mini-chart,
.tradingview-mock {
    background: #fff;
    color: #111;
    min-height: 520px;
    padding: 16px;
}

.mini-chart svg,
.tradingview-mock svg {
    width: 100%;
    height: 420px;
}

.tradingview-mock h2 {
    margin: 0;
    color: #ff444f;
    font-size: 34px;
    font-style: italic;
}

.tv-toolbar {
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 12px 0;
}

@media (max-width: 1100px) {
    .bot-content {
        grid-template-columns: 220px minmax(480px, 1fr);
    }

    .bot-summary {
        display: none;
    }
}
