/* InstaGix Forex — flat professional terminal (MT5-style, no glow) */

.fx-terminal {
    --fx-bg: #1e222d;
    --fx-bg2: #252932;
    --fx-bg3: #2a2e39;
    --fx-border: #363a45;
    --fx-border2: #434651;
    --fx-text: #d1d4dc;
    --fx-muted: #787b86;
    --fx-dim: #5d606b;
    --fx-up: #26a69a;
    --fx-down: #ef5350;
    --fx-accent: #2962ff;
    --fx-gold: #f0b90b;

    display: grid;
    grid-template-columns: 168px 1fr 168px;
    grid-template-rows: 36px auto minmax(0, 1fr) auto;
    gap: 0;
    min-height: 500px;
    height: 100%;
    font-family: "Segoe UI", "Tahoma", system-ui, sans-serif;
    font-size: 12px;
    color: var(--fx-text);
    text-align: left;
    background: var(--fx-bg);
    border: none;
    border-radius: 0;
    overflow: hidden;
    position: relative;
}

/* ── Title bar ── */
.fx-topbar {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    background: var(--fx-bg2);
    border-bottom: 1px solid var(--fx-border);
    height: 36px;
    box-sizing: border-box;
}

.fx-topbar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fx-topbar-logo {
    width: 20px;
    height: 20px;
    background: var(--fx-accent);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
}

.fx-topbar-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--fx-text);
    letter-spacing: 0.02em;
}

.fx-topbar-ver {
    font-size: 10px;
    color: var(--fx-muted);
    font-weight: 400;
}

.fx-topbar-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 11px;
}

.fx-topbar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-right: 4px;
    padding-right: 12px;
    border-right: 1px solid var(--fx-border);
}

.fx-nav-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--fx-muted);
    font-size: 10px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 2px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.fx-nav-btn:hover {
    color: var(--fx-text);
    background: var(--fx-bg3);
}

.fx-nav-btn--active {
    color: var(--fx-text);
    background: var(--fx-bg3);
    border-color: var(--fx-border2);
}

.fx-nav-btn--logout {
    margin-left: 4px;
    border-color: rgba(248, 113, 113, 0.25);
    color: #f87171;
}

.fx-nav-btn--logout:hover {
    background: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.4);
    color: #fca5a5;
}

/* ── Personal account cabinet ── */
.fx-account-panel {
    grid-column: 1 / -1;
    grid-row: 3 / -1;
    overflow-y: auto;
    padding: 16px 18px 20px;
    background: var(--fx-bg);
    min-height: 0;
}

.fx-terminal.fx-terminal--account .fx-pairs,
.fx-terminal.fx-terminal--account .fx-chart-panel,
.fx-terminal.fx-terminal--account .fx-trade-panel,
.fx-terminal.fx-terminal--account .fx-bottom,
.fx-terminal.fx-terminal--account #fx-event-banner {
    display: none !important;
}

.fx-terminal.fx-terminal--account .fx-account-panel {
    display: block;
}

.fx-account-panel[hidden] {
    display: none !important;
}

.fx-ac-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--fx-border);
}

.fx-ac-title {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 600;
    color: var(--fx-text);
}

.fx-ac-sub {
    margin: 0;
    font-size: 11px;
    color: var(--fx-muted);
}

.fx-ac-user {
    text-align: right;
}

.fx-ac-user__label {
    display: block;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--fx-dim);
    margin-bottom: 2px;
}

.fx-ac-user__name {
    font-size: 12px;
    font-weight: 600;
    color: var(--fx-accent);
    font-family: Consolas, "JetBrains Mono", monospace;
}

.fx-ac-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.fx-ac-stat {
    background: var(--fx-bg2);
    border: 1px solid var(--fx-border);
    border-radius: 2px;
    padding: 10px 12px;
}

.fx-ac-stat--primary {
    border-color: rgba(41, 98, 255, 0.45);
    background: linear-gradient(135deg, rgba(41, 98, 255, 0.08) 0%, var(--fx-bg2) 60%);
}

.fx-ac-stat__label {
    display: block;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--fx-muted);
    margin-bottom: 4px;
}

.fx-ac-stat__val {
    display: block;
    font-size: 18px;
    font-weight: 700;
    font-family: Consolas, "JetBrains Mono", monospace;
    color: var(--fx-text);
    line-height: 1.2;
}

.fx-ac-stat__val--up { color: var(--fx-up); }

.fx-ac-stat__hint {
    display: block;
    margin-top: 4px;
    font-size: 9px;
    color: var(--fx-dim);
}

.fx-ac-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.fx-ac-card {
    background: var(--fx-bg2);
    border: 1px solid var(--fx-border);
    border-radius: 2px;
    padding: 14px;
}

.fx-ac-card--deposit { border-top: 2px solid var(--fx-up); }
.fx-ac-card--withdraw { border-top: 2px solid #42a5f5; }

.fx-ac-card__title {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--fx-text);
}

.fx-ac-card__desc {
    margin: 0 0 12px;
    font-size: 10px;
    color: var(--fx-muted);
    line-height: 1.45;
}

.fx-ac-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
}

.fx-ac-tab {
    flex: 1;
    background: var(--fx-bg);
    border: 1px solid var(--fx-border);
    color: var(--fx-muted);
    font-size: 10px;
    font-weight: 600;
    padding: 6px 8px;
    border-radius: 2px;
    cursor: pointer;
    font-family: inherit;
}

.fx-ac-tab--active {
    color: var(--fx-text);
    border-color: var(--fx-accent);
    background: rgba(41, 98, 255, 0.08);
}

.fx-ac-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.fx-ac-chip {
    background: var(--fx-bg);
    border: 1px solid var(--fx-border);
    color: var(--fx-muted);
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 2px;
    cursor: pointer;
    font-family: Consolas, "JetBrains Mono", monospace;
}

.fx-ac-chip:hover {
    border-color: var(--fx-border2);
    color: var(--fx-text);
}

.fx-ac-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.fx-ac-row .fx-input { flex: 1; }

.fx-ac-btn {
    flex-shrink: 0;
    border: 1px solid transparent;
    border-radius: 2px;
    padding: 8px 14px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    color: #fff;
}

.fx-ac-btn--buy {
    background: var(--fx-up);
    border-color: #1f8a7f;
}

.fx-ac-btn--sell {
    background: #42a5f5;
    border-color: #2b8fd9;
}

.fx-ac-btn:hover { filter: brightness(1.06); }

.fx-ac-btn-ghost {
    width: 100%;
    background: transparent;
    border: 1px dashed var(--fx-border2);
    color: var(--fx-muted);
    font-size: 10px;
    padding: 6px 8px;
    border-radius: 2px;
    cursor: pointer;
    font-family: inherit;
}

.fx-ac-btn-ghost:hover {
    border-color: var(--fx-accent);
    color: var(--fx-text);
}

.fx-ac-note {
    margin: 10px 0 0;
    font-size: 9px;
    color: var(--fx-dim);
    line-height: 1.45;
}

.fx-ac-log {
    border: 1px solid var(--fx-border);
    border-radius: 2px;
    background: var(--fx-bg2);
    overflow: hidden;
}

.fx-ac-log__head {
    padding: 8px 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--fx-muted);
    background: var(--fx-bg3);
    border-bottom: 1px solid var(--fx-border);
}

.fx-ac-log__body {
    max-height: 160px;
    overflow-y: auto;
    padding: 6px 0;
}

.fx-ac-log__empty {
    padding: 16px 12px;
    font-size: 11px;
    color: var(--fx-dim);
    text-align: center;
}

.fx-ac-tx {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "type amt"
        "note time";
    gap: 2px 12px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--fx-border);
    font-size: 10px;
}

.fx-ac-tx:last-child { border-bottom: none; }

.fx-ac-tx__type {
    grid-area: type;
    color: var(--fx-text);
    font-weight: 600;
}

.fx-ac-tx__amt {
    grid-area: amt;
    text-align: right;
    font-family: Consolas, "JetBrains Mono", monospace;
}

.fx-ac-tx--in .fx-ac-tx__amt { color: var(--fx-up); }
.fx-ac-tx--out .fx-ac-tx__amt { color: #42a5f5; }

.fx-ac-tx__note {
    grid-area: note;
    color: var(--fx-dim);
}

.fx-ac-tx__time {
    grid-area: time;
    text-align: right;
    color: var(--fx-dim);
    font-family: Consolas, monospace;
}

@media (max-width: 900px) {
    .fx-ac-stats { grid-template-columns: repeat(2, 1fr); }
    .fx-ac-grid { grid-template-columns: 1fr; }
    .fx-topbar-nav { display: none; }
}

.fx-stat-item {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.fx-stat-item label {
    color: var(--fx-muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.fx-stat-item .fx-bal {
    color: var(--fx-text);
    font-weight: 600;
    font-family: "Consolas", "JetBrains Mono", monospace;
}

.fx-stat-item .fx-pnl {
    font-weight: 600;
    font-family: "Consolas", "JetBrains Mono", monospace;
}

.fx-stat-item .fx-pnl.fx-up { color: var(--fx-up); }
.fx-stat-item .fx-pnl.fx-down { color: var(--fx-down); }

.fx-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--fx-up);
    display: inline-block;
    margin-right: 4px;
}

/* ── Event banner ── */
.fx-event-banner {
    grid-column: 1 / -1;
    padding: 6px 12px;
    background: var(--fx-bg3);
    border-bottom: 1px solid var(--fx-border);
    font-size: 11px;
    display: none;
    line-height: 1.4;
}

.fx-event-banner.show { display: block; }
.fx-event-banner.up {
    border-left: 3px solid var(--fx-up);
    background: #1e2a28;
}
.fx-event-banner.down {
    border-left: 3px solid var(--fx-down);
    background: #2a1e1e;
}

.fx-event-banner b { font-weight: 600; }
.fx-event-banner .fx-event-pct { color: var(--fx-muted); }

/* ── Buy / Sell side lists ── */
.fx-pairs,
.fx-trade-panel {
    grid-row: 3;
    display: flex;
    flex-direction: column;
    background: var(--fx-bg2);
    overflow: hidden;
}

.fx-pairs { border-right: 1px solid var(--fx-border); }
.fx-trade-panel { border-left: 1px solid var(--fx-border); }

.fx-pairs-head {
    padding: 8px 10px 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--fx-border);
    background: var(--fx-bg);
    flex-shrink: 0;
}

.fx-pairs-head--buy { color: var(--fx-up); }
.fx-pairs-head--sell { color: var(--fx-down); }

.fx-pairs-cols {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px;
    padding: 4px 10px 5px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--fx-muted);
    border-bottom: 1px solid var(--fx-border);
    background: var(--fx-bg);
    flex-shrink: 0;
}

.fx-pairs-cols span:last-child {
    text-align: right;
    min-width: 52px;
}

.fx-pairs-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 2px 0;
}

.fx-pair-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px;
    align-items: center;
    width: 100%;
    padding: 6px 10px;
    border: none;
    border-left: 2px solid transparent;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    color: var(--fx-text);
    transition: background 0.1s;
}

.fx-pair-row:hover { background: var(--fx-bg3); }

.fx-pair-row.active {
    background: rgba(41, 98, 255, 0.12);
    border-left-color: var(--fx-accent);
}

.fx-pair-row.is-lot-open {
    background: rgba(38, 166, 154, 0.1);
    border-left-color: var(--fx-up);
}

.fx-side--market .fx-pair-row.is-lot-open {
    background: rgba(38, 166, 154, 0.1);
    border-left-color: var(--fx-up);
}

.fx-side--sell .fx-pair-row.is-lot-open {
    background: rgba(239, 83, 80, 0.08);
    border-left-color: var(--fx-down);
}

.fx-trade-float--buy-only {
    justify-content: flex-start;
    padding-left: 14px;
}

.fx-trade-float--buy-only .fx-trade-float__row {
    justify-content: flex-start;
    max-width: 240px;
    margin-right: auto;
}

.fx-trade-float--sell-only {
    justify-content: flex-end;
    padding-right: 14px;
}

.fx-trade-float--sell-only .fx-trade-float__row {
    justify-content: flex-end;
    max-width: 240px;
    margin-left: auto;
}

.fx-pair-row__sym {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.fx-pair-row__code {
    font-size: 11px;
    font-weight: 600;
    color: var(--fx-text);
}

.fx-pair-row__name {
    font-size: 9px;
    color: var(--fx-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fx-pair-row__px {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    min-width: 52px;
}

.fx-pair-row__price {
    font-size: 11px;
    font-family: "Consolas", "JetBrains Mono", monospace;
    font-weight: 500;
}

.fx-pair-row__chg {
    font-size: 9px;
    font-family: "Consolas", monospace;
}

.fx-pair-row__chg.fx-up { color: var(--fx-up); }
.fx-pair-row__chg.fx-down { color: var(--fx-down); }

/* ── Floating buy/sell panels over chart ── */
.fx-trade-float {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 10px 12px 16px;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.fx-trade-float--open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.fx-trade-float__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 12, 18, 0.58);
    pointer-events: auto;
    opacity: 0;
    transition: opacity 0.28s ease;
}

.fx-trade-float--open .fx-trade-float__backdrop {
    opacity: 1;
}

.fx-trade-float__row {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 440px;
    justify-content: center;
    pointer-events: none;
}

.fx-trade-float__panel {
    flex: 1;
    min-width: 0;
    max-width: 210px;
    background: var(--fx-bg2);
    border: 1px solid var(--fx-border2);
    border-radius: 4px;
    padding: 10px 11px;
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.55);
    pointer-events: auto;
    opacity: 0;
    transform: translateY(16px);
    transition:
        opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.fx-trade-float--open .fx-trade-float__panel.is-active {
    opacity: 1;
    transform: translateY(0);
}

.fx-trade-float__panel--buy { border-top: 2px solid var(--fx-up); }
.fx-trade-float__panel--sell { border-top: 2px solid var(--fx-down); }

.fx-trade-float__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.fx-trade-float__brand {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.fx-trade-float__icon {
    font-size: 18px;
    line-height: 1;
    color: var(--fx-gold);
}

.fx-trade-float__code {
    font-size: 13px;
    font-weight: 700;
    color: var(--fx-text);
}

.fx-trade-float__name {
    font-size: 9px;
    color: var(--fx-muted);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.fx-trade-float__close {
    border: none;
    background: transparent;
    color: var(--fx-muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
    flex-shrink: 0;
}

.fx-trade-float__close:hover { color: var(--fx-text); }

.fx-trade-float__price-block {
    text-align: center;
    padding: 8px 6px;
    margin-bottom: 8px;
    background: var(--fx-bg3);
    border: 1px solid var(--fx-border);
    border-radius: 3px;
}

.fx-trade-float__label {
    display: block;
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--fx-muted);
    margin-bottom: 3px;
}

.fx-trade-float__pick {
    display: block;
    font-size: 22px;
    font-family: "Consolas", "JetBrains Mono", monospace;
    font-weight: 600;
    line-height: 1.15;
}

.fx-trade-float__live {
    display: block;
    margin-top: 4px;
    font-size: 9px;
    color: var(--fx-muted);
}

.fx-trade-float__live b {
    font-family: "Consolas", monospace;
    font-weight: 600;
    color: var(--fx-text);
}

.fx-trade-float__meta {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    font-size: 9px;
    color: var(--fx-muted);
    margin-bottom: 8px;
}

.fx-trade-float__meta b {
    color: var(--fx-text);
    font-weight: 600;
}

.fx-trade-float__hold--empty { color: var(--fx-muted) !important; }

.fx-trade-float__total {
    font-size: 10px;
    color: var(--fx-muted);
    margin: 5px 0 8px;
    font-family: "Consolas", monospace;
}

.fx-trade-float__btn {
    width: 100%;
    margin-bottom: 6px;
    font-size: 10px;
    padding: 9px 8px;
    letter-spacing: 0.04em;
}

.fx-trade-float__owned {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
    margin: 2px 0 8px;
    padding: 7px 8px;
    background: var(--fx-bg3);
    border: 1px solid var(--fx-border);
    border-radius: 3px;
    text-align: center;
}

.fx-trade-float__owned--empty {
    opacity: 0.75;
}

.fx-trade-float__owned-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--fx-muted);
}

.fx-trade-float__owned-val {
    font-size: 15px;
    font-weight: 700;
    font-family: "Consolas", "JetBrains Mono", monospace;
    color: var(--fx-up);
}

.fx-trade-float__owned-val--empty {
    color: var(--fx-muted);
    font-weight: 600;
}

.fx-trade-float__owned-suffix {
    font-size: 9px;
    color: var(--fx-muted);
}

.fx-trade-float__limit {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--fx-border);
    border-radius: 2px;
    background: transparent;
    color: var(--fx-muted);
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    font-family: inherit;
}

.fx-trade-float__limit:hover:not(:disabled) {
    border-color: var(--fx-border2);
    color: var(--fx-text);
}

.fx-trade-float__limit:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.fx-trade-float__limit--buy:hover:not(:disabled) {
    border-color: rgba(38, 166, 154, 0.45);
    color: var(--fx-up);
}

.fx-trade-float__limit--sell:hover:not(:disabled) {
    border-color: rgba(239, 83, 80, 0.45);
    color: var(--fx-down);
}

.fx-lot-feedback {
    font-size: 9px;
    padding: 5px 6px;
    margin-bottom: 6px;
    border-radius: 2px;
    line-height: 1.3;
}

.fx-lot-feedback--buy,
.fx-lot-feedback--sell,
.fx-lot-feedback--order,
.fx-lot-feedback--info {
    background: rgba(41, 98, 255, 0.12);
    color: #a8c4ff;
}

.fx-lot-feedback--error,
.fx-lot-feedback--warn {
    background: rgba(239, 83, 80, 0.12);
    color: #ffb4b0;
}

/* ── Chart area ── */
.fx-chart-panel {
    grid-row: 3;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--fx-bg);
    border-right: 1px solid var(--fx-border);
}

.fx-instrument-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid var(--fx-border);
    background: var(--fx-bg2);
    flex-wrap: wrap;
    gap: 8px;
}

.fx-instrument-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--fx-text);
}

.fx-instrument-desc {
    font-size: 10px;
    color: var(--fx-muted);
    margin-top: 1px;
}

.fx-chart-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
}

.fx-tf-group {
    display: flex;
    gap: 0;
    border: 1px solid var(--fx-border);
    border-radius: 2px;
    overflow: hidden;
}

.fx-tf-btn {
    padding: 4px 10px;
    font-size: 10px;
    border: none;
    border-right: 1px solid var(--fx-border);
    background: var(--fx-bg3);
    color: var(--fx-muted);
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
}

.fx-tf-btn:last-child { border-right: none; }
.fx-tf-btn:hover { background: #32353f; color: var(--fx-text); }
.fx-tf-btn.active {
    background: var(--fx-accent);
    color: #fff;
}

.fx-btn-deposit {
    padding: 4px 10px;
    font-size: 10px;
    border: 1px solid var(--fx-border2);
    background: var(--fx-bg3);
    color: var(--fx-gold);
    cursor: pointer;
    border-radius: 2px;
    font-family: inherit;
    font-weight: 500;
    margin-left: 8px;
}

.fx-btn-deposit:hover {
    background: #32353f;
    border-color: var(--fx-gold);
}

.fx-price-row {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 10px 12px 6px;
    flex-wrap: wrap;
}

.fx-live-price {
    font-size: 28px;
    font-weight: 600;
    font-family: "Consolas", "JetBrains Mono", monospace;
    color: var(--fx-text);
    letter-spacing: -0.02em;
}

.fx-live-price.fx-up { color: var(--fx-up); }
.fx-live-price.fx-down { color: var(--fx-down); }

.fx-live-meta {
    font-size: 11px;
    color: var(--fx-muted);
    font-family: "Consolas", monospace;
}

.fx-live-meta b {
    color: var(--fx-text);
    font-weight: 500;
}

.fx-live-meta .fx-up { color: var(--fx-up); }
.fx-live-meta .fx-down { color: var(--fx-down); }

.fx-chart-box {
    flex: 1;
    min-height: 160px;
    background: #131722;
    border-top: 1px solid var(--fx-border);
    position: relative;
}

#fx-chart {
    width: 100%;
    height: 100%;
    display: block;
}

/* ── Order panel (right) ── */
.fx-trade-panel {
    gap: 0;
}

.fx-positions-section {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.fx-panel-section {
    padding: 10px 12px;
    border-bottom: 1px solid var(--fx-border);
}

.fx-panel-section:last-child { border-bottom: none; }

.fx-panel-section h4 {
    margin: 0 0 8px;
    font-size: 10px;
    font-weight: 600;
    color: var(--fx-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.fx-holding {
    font-size: 11px;
    padding: 6px 8px;
    background: var(--fx-bg);
    border: 1px solid var(--fx-border);
    border-radius: 2px;
    color: var(--fx-muted);
}

.fx-holding span {
    color: var(--fx-text);
    font-weight: 600;
    font-family: "Consolas", monospace;
}

.fx-portfolio {
    margin-top: 8px;
    font-size: 10px;
    border: 1px solid var(--fx-border);
    border-radius: 2px;
    background: var(--fx-bg);
    overflow: hidden;
}

.fx-portfolio-head,
.fx-portfolio-row {
    display: grid;
    grid-template-columns: 1fr 0.65fr 0.75fr;
    gap: 4px;
    padding: 4px 8px;
}

.fx-portfolio-head {
    color: var(--fx-muted);
    border-bottom: 1px solid var(--fx-border);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--fx-bg3);
}

.fx-portfolio-row {
    border-bottom: 1px solid var(--fx-border);
    font-family: "Consolas", monospace;
    font-size: 10px;
}

.fx-portfolio-row:last-child { border-bottom: none; }

/* ── Positions panel (right) ── */
.fx-positions-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.fx-positions-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    overflow-y: auto;
}

.fx-position-card {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px;
    background: var(--fx-bg);
    border: 1px solid var(--fx-border);
    border-radius: 2px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    font-family: inherit;
    color: inherit;
}

.fx-position-card:hover {
    border-color: var(--fx-down);
    background: rgba(239, 83, 80, 0.06);
}

.fx-position-card__top {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.fx-position-card__icon {
    font-size: 12px;
    opacity: 0.85;
}

.fx-position-card__code {
    font-weight: 600;
    font-size: 11px;
}

.fx-position-card__name {
    font-size: 9px;
    color: var(--fx-muted);
    margin-bottom: 4px;
}

.fx-position-card__amt {
    font-family: "Consolas", monospace;
    font-size: 13px;
    color: var(--fx-text);
}

.fx-position-card__val {
    font-size: 10px;
    color: var(--fx-muted);
    margin-top: 2px;
}

.fx-position-card__action {
    margin-top: 6px;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--fx-down);
    opacity: 0;
    transition: opacity 0.15s;
}

.fx-position-card:hover .fx-position-card__action {
    opacity: 1;
}

.fx-positions-empty {
    padding: 20px 8px;
    text-align: center;
    color: var(--fx-muted);
    font-size: 11px;
    line-height: 1.6;
}

.fx-positions-empty .fx-hint {
    margin-top: 6px;
    font-size: 10px;
}
.fx-portfolio-row span:last-child {
    color: var(--fx-gold);
    text-align: right;
}

.fx-portfolio-empty {
    padding: 8px;
    color: var(--fx-dim);
    text-align: center;
    font-size: 10px;
}

.fx-trade-inputs {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fx-input {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 8px;
    font-size: 12px;
    font-family: "Consolas", monospace;
    background: var(--fx-bg);
    border: 1px solid var(--fx-border);
    border-radius: 2px;
    color: var(--fx-text);
    outline: none;
}

.fx-input:focus {
    border-color: var(--fx-accent);
}

.fx-input::placeholder { color: var(--fx-dim); }

.fx-field-label {
    font-size: 9px;
    color: var(--fx-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 3px;
}

.fx-trade-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 8px;
}

.fx-btn {
    padding: 9px 8px;
    font-size: 11px;
    font-weight: 600;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: filter 0.1s;
}

.fx-btn:hover { filter: brightness(1.08); }
.fx-btn:active { filter: brightness(0.95); }

.fx-btn-buy {
    background: var(--fx-up);
    color: #fff;
}

.fx-btn-sell {
    background: var(--fx-down);
    color: #fff;
}

.fx-stop-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.fx-auto-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}

.fx-auto-grid .fx-btn-outline {
    font-size: 9px;
    padding: 7px 4px;
    line-height: 1.2;
    text-align: center;
}

.fx-hint {
    margin: 0 0 8px;
    font-size: 9px;
    color: var(--fx-dim);
    line-height: 1.35;
}

.fx-btn-outline-neutral {
    color: var(--fx-muted);
    border-color: var(--fx-border2);
}

.fx-btn-outline-neutral:hover {
    background: var(--fx-bg3);
    color: var(--fx-text);
}

.fx-btn-outline {
    padding: 6px 8px;
    font-size: 10px;
    font-weight: 600;
    border: 1px solid var(--fx-border2);
    background: var(--fx-bg);
    border-radius: 2px;
    cursor: pointer;
    font-family: inherit;
    text-transform: uppercase;
}

.fx-btn-outline-buy {
    color: var(--fx-up);
    border-color: var(--fx-up);
}

.fx-btn-outline-buy:hover { background: #1a2826; }

.fx-btn-outline-sell {
    color: var(--fx-down);
    border-color: var(--fx-down);
}

.fx-btn-outline-sell:hover { background: #2a1e1e; }

.fx-orders-list {
    font-size: 10px;
    color: var(--fx-muted);
    max-height: 72px;
    overflow-y: auto;
    margin-top: 8px;
    font-family: "Consolas", monospace;
}

.fx-order-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid var(--fx-border);
}

.fx-order-row:last-child { border-bottom: none; }

.fx-order-cancel {
    color: var(--fx-down);
    cursor: pointer;
    font-size: 11px;
    padding: 0 4px;
    opacity: 0.7;
}

.fx-order-cancel:hover { opacity: 1; }

/* ── Bottom terminal ── */
.fx-bottom {
    grid-column: 1 / -1;
    grid-row: 4;
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--fx-border);
    background: var(--fx-bg2);
    height: var(--fx-bottom-h, 130px);
    min-height: 72px;
    max-height: 75%;
    overflow: hidden;
    flex-shrink: 0;
}

.fx-bottom-resizer {
    flex: 0 0 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: ns-resize;
    background: var(--fx-bg);
    border-bottom: 1px solid var(--fx-border);
    user-select: none;
    touch-action: none;
    z-index: 5;
}

.fx-bottom-resizer:hover,
.fx-bottom-resizer.fx-bottom-resizer--active {
    background: var(--fx-bg3);
}

.fx-bottom-resizer__grip {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--fx-border2);
    pointer-events: none;
    box-shadow: 12px 0 0 var(--fx-border2), -12px 0 0 var(--fx-border2);
}

.fx-bottom-resizer__hint {
    font-size: 8px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fx-dim);
    pointer-events: none;
    margin-left: 8px;
}

.fx-bottom-resizer:hover .fx-bottom-resizer__hint,
.fx-bottom-resizer.fx-bottom-resizer--active .fx-bottom-resizer__hint {
    color: var(--fx-muted);
}

.fx-bottom-grid {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.fx-feed-box {
    border-right: 1px solid var(--fx-border);
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.fx-feed-box.fx-feed-collapsed,
.fx-feed-box.fx-feed-expanded,
#fx-news-box.fx-feed-expanded {
    max-height: none;
}

.fx-feed-box:last-child { border-right: none; }

.fx-feed-head {
    padding: 6px 12px;
    font-size: 10px;
    font-weight: 600;
    color: var(--fx-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--fx-border);
    background: var(--fx-bg);
}

.fx-feed-head--toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.fx-feed-head--toggle:hover {
    background: var(--fx-bg3);
    color: var(--fx-text);
}

.fx-feed-chevron {
    font-size: 10px;
    color: var(--fx-muted);
    transition: transform 0.2s;
}

.fx-news-count {
    color: var(--fx-dim);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

.fx-news-more {
    text-align: center;
    padding: 8px;
    font-size: 10px;
    color: var(--fx-accent);
    cursor: pointer;
    border-top: 1px dashed var(--fx-border);
}

.fx-news-more:hover {
    color: var(--fx-text);
    background: var(--fx-bg3);
}

.fx-feed-body {
    flex: 1;
    overflow-y: auto;
    padding: 6px 12px;
    font-size: 11px;
}

.fx-feed-empty {
    color: var(--fx-dim);
    text-align: center;
    padding: 12px 8px;
    font-size: 10px;
}

.fx-news-item {
    padding: 5px 0;
    border-bottom: 1px solid var(--fx-border);
    line-height: 1.35;
}

.fx-news-item:last-child { border-bottom: none; }

.fx-news-tier {
    font-size: 9px;
    color: var(--fx-dim);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.fx-news-title {
    font-weight: 600;
    margin: 2px 0;
}

.fx-news-item.up .fx-news-title { color: var(--fx-up); }
.fx-news-item.down .fx-news-title { color: var(--fx-down); }

.fx-news-desc { color: var(--fx-muted); font-size: 10px; }

.fx-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    line-height: 1.35;
    font-family: "Consolas", "JetBrains Mono", monospace;
    table-layout: fixed;
}

.fx-history-table th {
    color: var(--fx-muted);
    text-align: left;
    padding: 6px 5px;
    border-bottom: 1px solid var(--fx-border);
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.fx-history-table th:nth-child(1) { width: 14%; }
.fx-history-table th:nth-child(2) { width: 18%; }
.fx-history-table th:nth-child(3) { width: 16%; }
.fx-history-table th:nth-child(4) { width: 16%; }
.fx-history-table th:nth-child(5) { width: 14%; }
.fx-history-table th:nth-child(6) { width: 22%; }

.fx-history-table td {
    padding: 7px 5px;
    border-bottom: 1px solid var(--fx-border);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
    font-size: 13px;
}

.fx-history-table tr:last-child td { border-bottom: none; }

.fx-history-order {
    color: var(--fx-dim);
    font-size: 12px;
}

.fx-history-currency {
    color: var(--fx-text);
    font-family: "Segoe UI", system-ui, sans-serif;
    font-size: 13px;
    font-weight: 500;
}

.fx-history-time {
    color: var(--fx-muted);
    font-size: 12px;
}

.fx-history-type {
    font-family: "Segoe UI", system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
}

.fx-history-lots,
.fx-history-price {
    text-align: right;
    font-size: 13px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

#fx-history-box .fx-feed-body {
    padding: 8px 10px;
}

.fx-up { color: var(--fx-up) !important; }
.fx-down { color: var(--fx-down) !important; }

/* ── Scrollbars ── */
.fx-pairs-list,
.fx-feed-body,
.fx-orders-list,
.fx-positions-list {
    scrollbar-width: thin;
    scrollbar-color: var(--fx-border2) transparent;
}

.fx-pairs-list::-webkit-scrollbar,
.fx-feed-body::-webkit-scrollbar,
.fx-orders-list::-webkit-scrollbar,
.fx-positions-list::-webkit-scrollbar { width: 4px; }

.fx-pairs-list::-webkit-scrollbar-thumb,
.fx-feed-body::-webkit-scrollbar-thumb,
.fx-orders-list::-webkit-scrollbar-thumb,
.fx-positions-list::-webkit-scrollbar-thumb {
    background: var(--fx-border2);
    border-radius: 2px;
}

/* ── Trade toasts (inside Darknot / fx-terminal) ── */
.fx-toast-stack {
    position: absolute;
    top: 44px;
    right: 12px;
    z-index: 80;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    pointer-events: none;
    max-width: min(340px, calc(100% - 24px));
}

.fx-toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    background: var(--fx-bg2);
    border: 1px solid var(--fx-border);
    border-radius: 2px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    animation: fxToastIn 0.28s ease both;
}

.fx-toast--out {
    animation: fxToastOut 0.26s ease both;
}

.fx-toast--buy {
    border-left: 3px solid var(--fx-up);
    background: linear-gradient(90deg, rgba(38, 166, 154, 0.1) 0%, var(--fx-bg2) 40%);
}

.fx-toast--sell {
    border-left: 3px solid #42a5f5;
    background: linear-gradient(90deg, rgba(66, 165, 245, 0.1) 0%, var(--fx-bg2) 40%);
}

.fx-toast--error {
    border-left: 3px solid var(--fx-down);
    background: linear-gradient(90deg, rgba(239, 83, 80, 0.12) 0%, #2a1e1e 40%);
}

.fx-toast--warn {
    border-left: 3px solid #f0b90b;
    background: linear-gradient(90deg, rgba(240, 185, 11, 0.1) 0%, #2a2418 40%);
}

.fx-toast--order,
.fx-toast--info {
    border-left: 3px solid var(--fx-accent);
}

.fx-toast__icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    font-size: 12px;
    font-weight: 700;
    font-family: Consolas, "JetBrains Mono", monospace;
}

.fx-toast--buy .fx-toast__icon { color: var(--fx-up); background: rgba(38, 166, 154, 0.15); }
.fx-toast--sell .fx-toast__icon { color: #42a5f5; background: rgba(66, 165, 245, 0.15); }
.fx-toast--error .fx-toast__icon { color: var(--fx-down); background: rgba(239, 83, 80, 0.15); }
.fx-toast--warn .fx-toast__icon { color: #f0b90b; background: rgba(240, 185, 11, 0.15); }
.fx-toast--order .fx-toast__icon,
.fx-toast--info .fx-toast__icon { color: var(--fx-accent); background: rgba(41, 98, 255, 0.12); }

.fx-toast__body {
    flex: 1;
    min-width: 0;
}

.fx-toast__title {
    font-size: 11px;
    font-weight: 600;
    color: var(--fx-text);
    line-height: 1.3;
    margin-bottom: 2px;
}

.fx-toast__text {
    font-size: 10px;
    color: var(--fx-muted);
    line-height: 1.45;
}

.fx-toast__close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--fx-muted);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
    margin: -2px 0 0;
}

.fx-toast__close:hover {
    color: var(--fx-text);
}

@keyframes fxToastIn {
    from { opacity: 0; transform: translateX(16px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fxToastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(12px); }
}

.fx-qt-feedback {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 2px;
    font-size: 10px;
    line-height: 1.45;
    border: 1px solid var(--fx-border);
    background: var(--fx-bg3);
    color: var(--fx-text);
}

.fx-qt-feedback[hidden] {
    display: none !important;
}

.fx-qt-feedback--buy {
    border-color: rgba(38, 166, 154, 0.45);
    background: rgba(38, 166, 154, 0.1);
    color: #9fe8df;
}

.fx-qt-feedback--sell {
    border-color: rgba(66, 165, 245, 0.45);
    background: rgba(66, 165, 245, 0.1);
    color: #b3d9ff;
}

.fx-qt-feedback--error {
    border-color: rgba(239, 83, 80, 0.45);
    background: rgba(239, 83, 80, 0.1);
    color: #ffb4b0;
}

.fx-qt-feedback--warn {
    border-color: rgba(240, 185, 11, 0.45);
    background: rgba(240, 185, 11, 0.1);
    color: #ffe08a;
}

.fx-qt-feedback--order,
.fx-qt-feedback--info {
    border-color: rgba(41, 98, 255, 0.45);
    background: rgba(41, 98, 255, 0.1);
    color: #a8c4ff;
}

/* ── Quick trade overlay (click on pair) ── */
.fx-quick-trade {
    position: absolute;
    inset: 0;
    z-index: 60;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.fx-quick-trade--open {
    display: flex;
}

.fx-quick-trade__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 12, 18, 0.72);
}

.fx-quick-trade__panel {
    position: relative;
    z-index: 1;
    width: min(100%, 320px);
    background: var(--fx-bg2);
    border: 1px solid var(--fx-border2);
    border-radius: 4px;
    padding: 14px 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.fx-quick-trade__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.fx-quick-trade__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.fx-quick-trade__icon {
    font-size: 22px;
    line-height: 1;
    color: var(--fx-gold);
}

.fx-quick-trade__code {
    font-size: 15px;
    font-weight: 600;
    color: var(--fx-text);
}

.fx-quick-trade__name {
    font-size: 10px;
    color: var(--fx-muted);
    margin-top: 2px;
}

.fx-quick-trade__close {
    border: none;
    background: transparent;
    color: var(--fx-muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
}

.fx-quick-trade__close:hover { color: var(--fx-text); }

.fx-quick-trade__price-block {
    text-align: center;
    padding: 12px 10px;
    margin-bottom: 10px;
    background: var(--fx-bg3);
    border: 1px solid var(--fx-border);
    border-radius: 3px;
}

.fx-quick-trade__label {
    display: block;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--fx-muted);
    margin-bottom: 4px;
}

.fx-quick-trade__price {
    display: block;
    font-size: 26px;
    font-family: "Consolas", "JetBrains Mono", monospace;
    font-weight: 600;
    line-height: 1.15;
}

.fx-quick-trade__live {
    display: block;
    margin-top: 6px;
    font-size: 10px;
    color: var(--fx-muted);
}

.fx-quick-trade__live b {
    font-family: "Consolas", monospace;
    font-weight: 600;
}

.fx-quick-trade__meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 10px;
    color: var(--fx-muted);
    margin-bottom: 10px;
}

.fx-quick-trade__meta b {
    color: var(--fx-text);
    font-weight: 500;
}

.fx-quick-trade__total {
    font-size: 10px;
    color: var(--fx-muted);
    margin: 6px 0 12px;
    font-family: "Consolas", monospace;
}

.fx-quick-trade__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}

.fx-quick-trade__limit {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.fx-quick-trade__limit .fx-btn-outline {
    font-size: 9px;
    padding: 7px 6px;
    line-height: 1.25;
}

@media (max-width: 720px) {
    .fx-terminal {
        grid-template-columns: 1fr;
        grid-template-rows: 36px auto auto 1fr auto auto;
    }
    .fx-pairs,
    .fx-chart-panel,
    .fx-trade-panel,
    .fx-bottom {
        grid-row: auto;
    }
    .fx-pairs { border-right: none; border-bottom: 1px solid var(--fx-border); max-height: 140px; }
    .fx-trade-panel { border-left: none; border-bottom: 1px solid var(--fx-border); max-height: 140px; }
    .fx-chart-panel { border-right: none; }
    .fx-trade-float__row { flex-direction: column; max-width: 240px; }
    .fx-trade-float__panel { max-width: none; }
    .fx-bottom-grid { grid-template-columns: 1fr; }
    .fx-feed-box { border-right: none; border-bottom: 1px solid var(--fx-border); }
    .fx-feed-box:last-child { border-bottom: none; }
}

/* ── InstaGix page shell (Darknot wrapper) ── */
.dn-site--forex {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    height: 100%;
    background: #1e222d;
    animation: none;
}

.dn-site--forex .dn-chrome--forex {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    height: 32px;
    min-height: 32px;
    background: #252932;
    border: none;
    border-bottom: 1px solid #363a45;
    border-radius: 0;
}

.dn-site--forex .dn-lock {
    width: 22px;
    height: 18px;
    font-size: 9px;
    font-weight: 700;
    font-family: "Segoe UI", sans-serif;
    color: #fff;
    background: #2962ff;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: none;
}

.dn-site--forex .dn-site-title {
    font-family: "Segoe UI", system-ui, sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #d1d4dc;
    letter-spacing: 0.02em;
}

.dn-site--forex .dn-site-url {
    font-family: "Consolas", "JetBrains Mono", monospace;
    font-size: 10px;
    color: #787b86;
}

.dn-site--forex .dn-status-pulse--forex {
    font-size: 9px;
    font-weight: 600;
    color: #26a69a;
    text-shadow: none;
    animation: none;
    letter-spacing: 0.04em;
}

.dn-site--forex .dn-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0;
    background: #1e222d;
    border: none;
    line-height: normal;
    color: #d1d4dc;
}

.dn-site--forex.dn-site--compact .dn-body {
    padding: 0;
}

.dn-site--forex .fx-terminal {
    flex: 1;
    min-height: 540px;
    grid-template-rows: 36px auto minmax(0, 1fr) auto;
}

.dn-site--forex .fx-pairs,
.dn-site--forex .fx-chart-panel,
.dn-site--forex .fx-trade-panel {
    min-height: 0;
}

.dn-site--forex .fx-chart-box {
    min-height: 160px;
}

.dn-foot--forex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 12px;
    background: #252932;
    border: none;
    border-top: 1px solid #363a45;
    border-radius: 0;
    font-size: 10px;
}

.dn-foot--forex .dn-foot-meta { color: #5d606b; }
.dn-foot--forex .dn-foot-link { color: #787b86; text-decoration: none; }
.dn-foot--forex .dn-foot-link:hover { color: #d1d4dc; }

/* Browser window — forex mode (контент; хром остаётся фиолетовым Darknot) */
#win-browser.fx-browser-mode .browser-body.fx-browser-body,
#win-browser .browser-body.fx-browser-body {
    flex: 1;
    min-height: 0;
    padding: 0 !important;
    overflow: hidden !important;
    background: #1e222d !important;
    color: #d1d4dc;
}

#win-browser.fx-browser-mode ::-webkit-scrollbar-thumb {
    background: #434651;
}

#win-browser.fx-browser-mode ::-webkit-scrollbar-track {
    background: #1e222d;
}

/* ── InstaGix registration gate ── */
.ix-auth {
    --ix-bg: #1e222d;
    --ix-bg2: #252932;
    --ix-bg3: #2a2e39;
    --ix-border: #363a45;
    --ix-border2: #434651;
    --ix-text: #d1d4dc;
    --ix-muted: #787b86;
    --ix-dim: #5d606b;
    --ix-up: #26a69a;
    --ix-down: #ef5350;
    --ix-accent: #2962ff;

    display: flex;
    flex-direction: column;
    min-height: 100%;
    height: 100%;
    background: var(--ix-bg);
    font-family: "Segoe UI", "Tahoma", system-ui, sans-serif;
    font-size: 12px;
    color: var(--ix-text);
}

.ix-auth-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 16px;
    height: 40px;
    min-height: 40px;
    background: var(--ix-bg2);
    border-bottom: 1px solid var(--ix-border);
    flex-shrink: 0;
}

.ix-auth-topbar__brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ix-auth-topbar__logo {
    width: 24px;
    height: 24px;
    background: var(--ix-accent);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
}

.ix-auth-topbar__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ix-text);
    line-height: 1.2;
}

.ix-auth-topbar__sub {
    font-size: 10px;
    color: var(--ix-muted);
    font-family: Consolas, "JetBrains Mono", monospace;
}

.ix-auth-topbar__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    color: var(--ix-dim);
}

.ix-auth-topbar__badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    background: rgba(240, 185, 11, 0.1);
    border: 1px solid rgba(240, 185, 11, 0.35);
    border-radius: 2px;
    color: #f0b90b;
    font-weight: 600;
}

.ix-auth-topbar__dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #f0b90b;
}

.ix-auth-topbar__sep {
    opacity: 0.35;
}

.ix-auth-layout {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
    gap: 0;
    min-height: 0;
    overflow: hidden;
}

.ix-auth-showcase {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 28px 32px;
    background:
        linear-gradient(135deg, rgba(41, 98, 255, 0.06) 0%, transparent 45%),
        linear-gradient(225deg, rgba(38, 166, 154, 0.05) 0%, transparent 40%),
        var(--ix-bg);
    border-right: 1px solid var(--ix-border);
    overflow-y: auto;
}

.ix-auth-showcase__overline {
    margin: 0 0 8px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ix-up);
}

.ix-auth-showcase__title {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--ix-text);
    max-width: 420px;
}

.ix-auth-showcase__lead {
    margin: 0;
    font-size: 12px;
    line-height: 1.65;
    color: var(--ix-muted);
    max-width: 440px;
}

.ix-auth-showcase__panel {
    border: 1px solid var(--ix-border);
    border-radius: 2px;
    background: var(--ix-bg2);
    overflow: hidden;
    max-width: 420px;
}

.ix-auth-showcase__panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--ix-bg3);
    border-bottom: 1px solid var(--ix-border);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ix-muted);
}

.ix-auth-showcase__live {
    color: var(--ix-up);
    font-weight: 600;
}

.ix-auth-pairs {
    display: flex;
    flex-direction: column;
}

.ix-auth-pair {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--ix-border);
    font-size: 11px;
}

.ix-auth-pair:last-child {
    border-bottom: none;
}

.ix-auth-pair__code {
    font-weight: 600;
    color: var(--ix-text);
    font-family: Consolas, "JetBrains Mono", monospace;
}

.ix-auth-pair__name {
    color: var(--ix-muted);
}

.ix-auth-pair__price {
    font-family: Consolas, "JetBrains Mono", monospace;
    font-weight: 600;
    color: var(--ix-up);
}

.ix-auth-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 440px;
}

.ix-auth-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: var(--ix-bg2);
    border: 1px solid var(--ix-border);
    border-radius: 2px;
    font-size: 11px;
    line-height: 1.5;
    color: var(--ix-muted);
}

.ix-auth-features li b {
    color: var(--ix-text);
    font-weight: 600;
}

.ix-auth-features__icon {
    flex-shrink: 0;
    width: 22px;
    text-align: center;
    color: var(--ix-accent);
    font-size: 13px;
}

.ix-auth-card {
    display: flex;
    flex-direction: column;
    padding: 28px 24px;
    background: var(--ix-bg2);
    overflow-y: auto;
    transition: border-color 0.2s;
}

.ix-auth-card--error {
    animation: ixAuthShake 0.35s ease;
}

@keyframes ixAuthShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.ix-auth-card__head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--ix-border);
}

.ix-auth-card__icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ix-bg3);
    border: 1px solid var(--ix-border);
    border-radius: 2px;
    font-size: 16px;
    flex-shrink: 0;
}

.ix-auth-card__title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    color: var(--ix-text);
}

.ix-auth-card__sub {
    margin: 0;
    font-size: 11px;
    color: var(--ix-muted);
    line-height: 1.45;
}

.ix-auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

.ix-auth-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ix-auth-field__label {
    font-size: 11px;
    font-weight: 600;
    color: var(--ix-text);
    letter-spacing: 0.02em;
}

.ix-auth-field__hint {
    font-size: 10px;
    color: var(--ix-dim);
    margin-bottom: 2px;
}

.ix-auth-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    background: var(--ix-bg);
    border: 1px solid var(--ix-border);
    border-radius: 2px;
    color: var(--ix-text);
    font-size: 13px;
    font-family: Consolas, "JetBrains Mono", monospace;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}

.ix-auth-input::placeholder {
    color: var(--ix-dim);
}

.ix-auth-input:hover {
    border-color: var(--ix-border2);
}

.ix-auth-input:focus {
    border-color: var(--ix-accent);
    background: #1a1f2a;
}

.ix-auth-input[readonly] {
    color: var(--ix-muted);
    background: var(--ix-bg3);
    cursor: default;
}

.ix-auth-input--text {
    font-family: "Segoe UI", system-ui, sans-serif;
}

.ix-auth-secret-display {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ix-auth-secret-q {
    margin: 0;
    padding: 10px 12px;
    background: var(--ix-bg);
    border: 1px solid var(--ix-border);
    border-left: 3px solid var(--ix-accent);
    border-radius: 2px;
    font-size: 12px;
    line-height: 1.45;
    color: var(--ix-text);
}

.ix-auth-topbar__badge--secure {
    background: rgba(41, 98, 255, 0.1);
    border-color: rgba(41, 98, 255, 0.35);
    color: #7aa2ff;
}

.ix-auth-topbar__badge--secure .ix-auth-topbar__dot {
    background: #7aa2ff;
}

.ix-auth-error {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(239, 83, 80, 0.1);
    border: 1px solid rgba(239, 83, 80, 0.35);
    border-left: 3px solid var(--ix-down);
    border-radius: 2px;
    font-size: 11px;
    line-height: 1.45;
    color: #ffb4b0;
}

.ix-auth-error[hidden] {
    display: none !important;
}

.ix-auth-error__icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 83, 80, 0.2);
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    color: var(--ix-down);
}

.ix-auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 4px;
    padding: 12px 16px;
    background: var(--ix-accent);
    border: 1px solid #1e53e5;
    border-radius: 2px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.ix-auth-submit:hover {
    background: #1e53e5;
}

.ix-auth-submit:active {
    transform: scale(0.99);
}

.ix-auth-submit__arrow {
    font-size: 14px;
    opacity: 0.85;
}

.ix-auth-card__foot {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--ix-border);
}

.ix-auth-card__foot p {
    margin: 0;
    font-size: 10px;
    line-height: 1.55;
    color: var(--ix-dim);
}

.ix-auth-forgot {
    margin: 12px 0 0;
    text-align: center;
}

.ix-auth-forgot__link {
    border: none;
    background: transparent;
    color: var(--ix-accent, #4ade80);
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
    text-decoration: underline;
    padding: 4px 8px;
}

.ix-auth-forgot__link:hover {
    color: #86efac;
}

.ix-auth-gm-hint {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    background: rgba(74, 222, 128, 0.06);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: 8px;
    margin-bottom: 4px;
}

.ix-auth-gm-hint__label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ix-dim);
}

.ix-auth-gm-hint__addr {
    font-size: 12px;
    font-family: Consolas, monospace;
    color: var(--ix-text);
}

.ix-auth-alt {
    margin: 4px 0 8px;
}

.ix-auth-alt__row {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--ix-dim);
    text-align: center;
}

.ix-auth-alt__banner {
    padding: 12px 14px;
    border-radius: 8px;
    background: rgba(96, 165, 250, 0.08);
    border: 1px solid rgba(96, 165, 250, 0.22);
    margin-bottom: 4px;
}

.ix-auth-alt__banner strong {
    display: block;
    font-size: 12px;
    color: var(--ix-text);
    margin-bottom: 4px;
}

.ix-auth-alt__banner p {
    margin: 0 0 10px;
    font-size: 11px;
    line-height: 1.5;
    color: var(--ix-dim);
}

.ix-auth-alt__banner--warn {
    background: rgba(251, 191, 36, 0.08);
    border-color: rgba(251, 191, 36, 0.28);
}

.ix-auth-alt__banner--warn strong {
    color: #fbbf24;
}

.ix-auth-alt__btn {
    border: 1px solid rgba(251, 191, 36, 0.45);
    background: rgba(251, 191, 36, 0.12);
    color: #fcd34d;
    font-size: 11px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    width: 100%;
    text-align: center;
    transition: background 0.12s;
}

.ix-auth-alt__btn:hover {
    background: rgba(251, 191, 36, 0.2);
}

.ix-auth-ticker {
    flex-shrink: 0;
    height: 28px;
    overflow: hidden;
    background: var(--ix-bg3);
    border-top: 1px solid var(--ix-border);
}

.ix-auth-ticker__track {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 100%;
    padding: 0 12px;
    animation: ixAuthTicker 28s linear infinite;
    white-space: nowrap;
}

.ix-auth-ticker__item {
    font-size: 10px;
    color: var(--ix-muted);
    font-family: Consolas, "JetBrains Mono", monospace;
}

.ix-auth-ticker__item b {
    color: var(--ix-text);
    font-weight: 600;
    margin-left: 4px;
}

@keyframes ixAuthTicker {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.dn-site--forex .ix-auth {
    flex: 1;
    min-height: 480px;
}

.ix-auth-fallback {
    padding: 24px;
    color: var(--ix-muted, #787b86);
    text-align: center;
}

@media (max-width: 760px) {
    .ix-auth-layout {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }

    .ix-auth-showcase {
        border-right: none;
        border-bottom: 1px solid var(--ix-border);
        padding: 20px 16px;
    }

    .ix-auth-showcase__title {
        font-size: 18px;
    }

    .ix-auth-card {
        padding: 20px 16px;
    }

    .ix-auth-topbar__meta span:not(.ix-auth-topbar__badge) {
        display: none;
    }
}
