:root {
    --bg-dark: #06111d;
    --bg-deeper: #020913;
    --glass-bg: rgba(7, 18, 34, 0.72);
    --glass-strong: rgba(8, 22, 41, 0.9);
    --panel-soft: rgba(8, 24, 46, 0.62);
    --primary: #6effb3;
    --primary-strong: #54f0ff;
    --secondary: #4d82ff;
    --accent: #97ff72;
    --danger: #ff637d;
    --warning: #ffd76a;
    --text-main: #edf7ff;
    --text-dim: #8ea8bf;
    --text-muted: #64809a;
    --border: rgba(132, 189, 255, 0.16);
    --border-strong: rgba(110, 255, 179, 0.3);
    --shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Inter", sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    color: var(--text-main);
    overflow-x: hidden;
    background:
        radial-gradient(circle at 8% 10%, rgba(84, 240, 255, 0.16), transparent 26%),
        radial-gradient(circle at 88% 14%, rgba(110, 255, 179, 0.12), transparent 28%),
        radial-gradient(circle at 52% 100%, rgba(77, 130, 255, 0.12), transparent 34%),
        linear-gradient(180deg, #07111d 0%, #030a13 52%, #02060e 100%);
}

.glass-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(115deg, rgba(255, 255, 255, 0.02), transparent 35%),
        radial-gradient(circle at 50% 15%, rgba(84, 240, 255, 0.08), transparent 24%),
        radial-gradient(circle at 50% 80%, rgba(110, 255, 179, 0.06), transparent 26%);
    pointer-events: none;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1rem 2.2rem;
    background: rgba(3, 11, 22, 0.78);
    border-bottom: 1px solid rgba(132, 189, 255, 0.14);
    backdrop-filter: blur(24px);
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.22);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 220px;
}

.logo-icon {
    display: grid;
    place-items: center;
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(84, 240, 255, 0.18), rgba(110, 255, 179, 0.1));
    border: 1px solid rgba(132, 189, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    font-size: 1.35rem;
}

.logo-text {
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-strong) 45%, #ffffff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.v-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.45rem;
    padding: 0.22rem 0.45rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    vertical-align: middle;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
}

.nav-btn {
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-dim);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.72rem 1rem;
    border-radius: 14px;
    cursor: pointer;
    transition: 0.25s ease;
}

.nav-btn:hover,
.nav-btn.active {
    color: var(--text-main);
    border-color: rgba(110, 255, 179, 0.18);
    background: linear-gradient(180deg, rgba(84, 240, 255, 0.12), rgba(77, 130, 255, 0.08));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 24px rgba(0, 0, 0, 0.2);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.75rem 1rem;
    min-width: 220px;
    justify-content: flex-end;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(132, 189, 255, 0.12);
    border-radius: 16px;
    color: var(--text-dim);
    font-size: 0.82rem;
}

.web-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(132, 189, 255, 0.16);
    background: rgba(255, 255, 255, 0.04);
    font-weight: 800;
    letter-spacing: 0.04em;
}

.web-status.up {
    color: var(--primary);
    border-color: rgba(110, 255, 179, 0.22);
}

.web-status.down {
    color: var(--danger);
    border-color: rgba(255, 99, 125, 0.22);
}

.web-status.unknown {
    color: var(--text-dim);
}

.dot {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    background: var(--text-muted);
    display: inline-block;
}

.dot.up {
    background: var(--primary);
    box-shadow: 0 0 18px rgba(110, 255, 179, 0.75);
}

.dot.down {
    background: var(--danger);
    box-shadow: 0 0 18px rgba(255, 99, 125, 0.75);
}

.container {
    width: min(1520px, calc(100vw - 40px));
    margin: 0 auto;
    padding: 1.75rem 0 3rem;
}

.tab-content {
    display: none;
    animation: fadeIn 0.35s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.section-header h1 {
    font-size: clamp(1.8rem, 2.4vw, 2.9rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    margin-bottom: 0.35rem;
}

.section-header p {
    max-width: 820px;
    color: var(--text-dim);
    line-height: 1.65;
}

.premium-hero {
    align-items: stretch;
    margin-bottom: 1.4rem;
}

.hero-copy,
.hero-side-card,
.performance-stage,
.panel-surface,
.table-container,
.logs-viewer,
.settings-form,
.news-analysis,
.news-summary,
.news-top-list,
.news-recommendation,
.hedge-fund-report,
.upload-area,
.history-item {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
        var(--glass-bg);
    border: 1px solid var(--border);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.hero-copy,
.hero-side-card {
    min-height: 230px;
    padding: 1.85rem 2rem;
}

.hero-copy {
    flex: 1.5;
}

.hero-copy::before,
.hero-side-card::before,
.performance-stage::before,
.panel-surface::before,
.instance-card::before,
.stat-card::before,
.table-container::before,
.logs-viewer::before,
.settings-form::before,
.news-analysis::before,
.hedge-fund-report::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(84, 240, 255, 0.07), transparent 28%, rgba(110, 255, 179, 0.04) 72%, transparent 100%);
}

.hero-kicker,
.performance-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 800;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1.35rem;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.75rem 0.95rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(132, 189, 255, 0.14);
    color: var(--text-dim);
    font-size: 0.82rem;
}

.hero-pill strong {
    color: var(--text-main);
    font-size: 0.86rem;
}

.hero-side-card {
    flex: 0.95;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-bottom: 1.5rem;
}

.hero-side-label {
    color: var(--primary-strong);
    font-size: 0.76rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 800;
}

.hero-side-title {
    display: block;
    margin-top: 0.6rem;
    font-size: clamp(1.35rem, 1.8vw, 1.8rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.hero-side-card p {
    margin-top: 0.85rem;
    color: var(--text-dim);
}

.performance-stage {
    margin-bottom: 1.4rem;
    padding: 1.5rem 1.5rem 1.7rem;
}

.performance-stage-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.performance-stage-header h2 {
    margin-top: 0.45rem;
    font-size: clamp(1.4rem, 1.9vw, 2rem);
    letter-spacing: -0.03em;
}

.performance-stage-copy {
    max-width: 360px;
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: right;
}

.performance-stage-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.85rem;
}

.performance-stage-controls select {
    min-width: 260px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid rgba(132, 189, 255, 0.16);
    border-radius: 14px;
    padding: 0.75rem 0.9rem;
    outline: none;
}

.performance-chart {
    position: relative;
    min-height: 360px;
    border-radius: 22px;
    border: 1px solid rgba(132, 189, 255, 0.15);
    background:
        linear-gradient(180deg, rgba(2, 12, 24, 0.46), rgba(4, 14, 28, 0.88)),
        radial-gradient(circle at 50% 0%, rgba(84, 240, 255, 0.12), transparent 36%);
    overflow: hidden;
    padding: 4.2rem 1.1rem 2.8rem;
}

.chart-grid,
.chart-grid::before,
.chart-grid::after {
    position: absolute;
    inset: 0;
    content: "";
}

.chart-grid {
    background-image:
        linear-gradient(rgba(140, 180, 220, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(140, 180, 220, 0.08) 1px, transparent 1px);
    background-size: 9% 16.666%, 9% 16.666%;
}

.chart-grid::before {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.03), transparent 18%, transparent 82%, rgba(255, 255, 255, 0.03));
}

.chart-grid::after {
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.32));
}

.chart-glow {
    position: absolute;
    filter: blur(24px);
    opacity: 0.6;
}

.chart-glow-primary {
    right: 10%;
    top: 18%;
    width: 34%;
    height: 38%;
    background: rgba(110, 255, 179, 0.32);
}

.chart-glow-secondary {
    left: 12%;
    bottom: 12%;
    width: 30%;
    height: 34%;
    background: rgba(77, 130, 255, 0.32);
}

.performance-live-head {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    z-index: 3;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.performance-chart-title {
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-main);
}

.performance-chart-summary {
    max-width: 460px;
    text-align: right;
    color: var(--text-dim);
    font-size: 0.82rem;
    line-height: 1.55;
}

.chart-live,
.mini-chart {
    position: relative;
    z-index: 2;
}

.chart-live {
    height: 310px;
}

.mini-chart {
    min-height: 220px;
}

.chart-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.chart-area {
    opacity: 0.95;
}

.chart-area-primary {
    fill: url(#equityFill);
}

.chart-area-secondary {
    fill: url(#sentimentFill);
}

.chart-line {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 4;
}

.chart-line-primary {
    stroke: url(#equityLine);
    filter: drop-shadow(0 0 12px rgba(110, 255, 179, 0.38));
}

.chart-line-secondary {
    stroke: url(#sentimentLine);
    filter: drop-shadow(0 0 10px rgba(84, 240, 255, 0.24));
}

.chart-point {
    stroke-width: 3;
}

.chart-point-primary {
    fill: #d5ffe5;
    stroke: rgba(110, 255, 179, 0.48);
}

.chart-point-secondary {
    fill: #d2e8ff;
    stroke: rgba(84, 240, 255, 0.38);
}

.chart-label {
    fill: rgba(237, 247, 255, 0.8);
    font-size: 12px;
    font-weight: 700;
}

.chart-grid-line {
    stroke: rgba(140, 180, 220, 0.08);
    stroke-width: 1;
}

.chart-axis-line {
    stroke: rgba(140, 180, 220, 0.18);
    stroke-width: 1.2;
}

.performance-history-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.performance-subpanel {
    padding: 1rem 1rem 1.1rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(132, 189, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.section-subheader.compact {
    align-items: flex-start;
    margin-bottom: 0.85rem;
}

.section-subheader.compact h2 {
    font-size: 1rem;
}

.section-subheader.compact p {
    max-width: 320px;
    font-size: 0.85rem;
}

.bar-chart-rect {
    fill: url(#barGradient);
}

.bar-chart-rect.negative {
    fill: url(#barGradientNegative);
}

.bar-chart-value {
    fill: rgba(237, 247, 255, 0.82);
    font-size: 12px;
    font-weight: 700;
    text-anchor: middle;
}

.account-trades-list {
    display: grid;
    gap: 0.75rem;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 0.25rem;
    align-content: start;
    scroll-behavior: smooth;
}

.account-trades-list:focus {
    outline: 2px solid rgba(84, 240, 255, 0.35);
    outline-offset: 4px;
}

.trade-history-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.trade-history-meta {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.trade-history-filters {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.trade-filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.38rem;
}

.trade-filter-field span {
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.trade-filter-field input,
.trade-filter-field select {
    width: 100%;
    min-height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(132, 189, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    padding: 0.72rem 0.85rem;
}

.trade-filter-field input:focus,
.trade-filter-field select:focus {
    outline: 2px solid rgba(84, 240, 255, 0.24);
    outline-offset: 1px;
    border-color: rgba(84, 240, 255, 0.24);
}

.trade-filter-actions {
    display: flex;
    align-items: flex-end;
    gap: 0.65rem;
}

.trade-history-error {
    margin-bottom: 0.8rem;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    color: #ffd7de;
    background: rgba(255, 99, 125, 0.12);
    border: 1px solid rgba(255, 99, 125, 0.22);
}

.trade-history-loading {
    display: none;
    margin-top: 0.85rem;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.trade-history-loading.visible {
    display: block;
}

.trade-history-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
}

.trade-pagination-btn {
    min-width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(132, 189, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.trade-pagination-btn:hover:not(:disabled),
.trade-pagination-btn:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(84, 240, 255, 0.28);
    background: rgba(84, 240, 255, 0.1);
    outline: none;
}

.trade-pagination-btn.active {
    color: #03111c;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: transparent;
}

.trade-pagination-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.trade-spacer {
    width: 100%;
}

.trade-row {
    display: grid;
    grid-template-columns: 1.2fr 0.7fr 0.8fr;
    gap: 0.8rem;
    align-items: center;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(132, 189, 255, 0.08);
    min-height: 84px;
}

.trade-row:focus {
    outline: 2px solid rgba(84, 240, 255, 0.3);
    outline-offset: 2px;
}

.trade-row-main {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.trade-row-symbol {
    font-weight: 800;
    color: var(--text-main);
}

.trade-row-meta {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.trade-row-side {
    justify-self: start;
}

.trade-row-pnl {
    justify-self: end;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.chart-badge,
.chart-axis {
    position: absolute;
    z-index: 2;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.chart-badge {
    padding: 0.5rem 0.7rem;
    border-radius: 999px;
    font-size: 0.72rem;
    background: rgba(5, 18, 34, 0.72);
    border: 1px solid rgba(132, 189, 255, 0.16);
}

.chart-badge-top {
    right: 1rem;
    top: 1rem;
    color: var(--primary);
}

.chart-badge-bottom {
    right: 1rem;
    bottom: 1rem;
    color: var(--primary-strong);
}

.chart-axis {
    color: var(--text-muted);
    font-size: 0.7rem;
}

.chart-axis-x {
    left: 1.2rem;
    bottom: 1rem;
}

.chart-axis-y {
    right: 1rem;
    top: 50%;
    transform: rotate(-90deg) translateY(-50%);
    transform-origin: right top;
}

.stats-overview,
.metrics-grid,
.instances-grid,
.summary-panels,
.news-content-grid {
    display: grid;
    gap: 1rem;
}

.stats-overview {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 1.4rem;
}

.stat-card {
    position: relative;
    overflow: hidden;
    padding: 1.35rem 1.35rem 1.5rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
        rgba(7, 19, 36, 0.78);
    border: 1px solid rgba(132, 189, 255, 0.14);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.stat-label {
    display: block;
    margin-bottom: 0.7rem;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.stat-value {
    font-size: clamp(2rem, 2vw, 2.6rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.05em;
    color: var(--primary);
}

.summary-panels {
    grid-template-columns: 1.4fr 1fr;
}

.panel-surface {
    padding: 1.35rem;
}

.section-subheader {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-subheader h2 {
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-subheader p {
    color: var(--text-dim);
    max-width: 460px;
}

.instances-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.market-radar-panel {
    margin-top: 1.4rem;
}

.market-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.market-toolbar select,
.market-toolbar button {
    min-height: 46px;
}

.market-toolbar select {
    min-width: 220px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid rgba(132, 189, 255, 0.16);
    border-radius: 14px;
    padding: 0.75rem 0.9rem;
    outline: none;
}

.market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.market-card {
    position: relative;
    overflow: hidden;
    padding: 1rem;
    border-radius: 22px;
    border: 1px solid rgba(132, 189, 255, 0.14);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
        rgba(6, 18, 34, 0.82);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
}

.market-card.unavailable {
    opacity: 0.72;
    border-style: dashed;
}

.market-card-header {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    align-items: flex-start;
}

.market-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
    font-weight: 800;
}

.market-card h3 {
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.market-symbol-chip {
    max-width: 42%;
    padding: 0.42rem 0.68rem;
    border-radius: 999px;
    background: rgba(84, 240, 255, 0.1);
    border: 1px solid rgba(84, 240, 255, 0.16);
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.market-price-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 0.75rem;
    margin-top: 0.95rem;
}

.market-price {
    font-size: 1.55rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: var(--text-main);
}

.market-change {
    font-size: 0.92rem;
    font-weight: 800;
}

.market-change.up {
    color: var(--primary);
}

.market-change.down {
    color: var(--danger);
}

.market-change.flat {
    color: var(--text-dim);
}

.market-chart-shell {
    margin-top: 0.95rem;
    min-height: 180px;
    border-radius: 18px;
    padding: 0.55rem;
    border: 1px solid rgba(132, 189, 255, 0.12);
    background:
        linear-gradient(180deg, rgba(2, 12, 24, 0.42), rgba(4, 14, 28, 0.78)),
        radial-gradient(circle at 50% 0%, rgba(84, 240, 255, 0.09), transparent 40%);
}

.market-chart-svg {
    width: 100%;
    height: 168px;
    display: block;
}

.market-grid-line {
    stroke: rgba(140, 180, 220, 0.12);
    stroke-width: 1;
}

.market-wick {
    stroke-width: 1.4;
    stroke-linecap: round;
}

.market-body {
    stroke-width: 1;
}

.market-wick.bullish,
.market-body.bullish {
    stroke: rgba(110, 255, 179, 0.72);
    fill: rgba(110, 255, 179, 0.36);
}

.market-wick.bearish,
.market-body.bearish {
    stroke: rgba(255, 99, 125, 0.74);
    fill: rgba(255, 99, 125, 0.34);
}

.market-chart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    color: var(--text-dim);
    text-align: center;
    padding: 0.8rem;
}

.market-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
    margin-top: 0.9rem;
}

.market-stat {
    padding: 0.72rem 0.8rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(132, 189, 255, 0.08);
}

.market-stat span {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--text-muted);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 800;
}

.market-stat strong {
    color: var(--text-main);
    font-size: 0.94rem;
}

.market-meta {
    margin-top: 0.8rem;
    color: var(--text-dim);
    font-size: 0.78rem;
    line-height: 1.5;
}

.instance-card {
    position: relative;
    overflow: hidden;
    padding: 1.2rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
        rgba(6, 18, 34, 0.86);
    border: 1px solid rgba(132, 189, 255, 0.14);
    border-radius: 22px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
}

.instance-card:hover {
    transform: translateY(-4px);
    border-color: rgba(110, 255, 179, 0.32);
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(110, 255, 179, 0.08);
}

.configured-account-card {
    border-style: dashed;
}

.instance-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.instance-card-title-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.instance-card h3 {
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.instance-id {
    margin-top: 0.3rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    word-break: break-word;
}

.instance-card-highlight {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(110, 255, 179, 0.12), rgba(84, 150, 255, 0.08));
    border: 1px solid rgba(110, 255, 179, 0.12);
}

.instance-card-highlight span {
    font-size: 0.74rem;
    letter-spacing: 0.16em;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 800;
}

.instance-card-highlight strong {
    font-size: 1.35rem;
    color: var(--text-main);
    letter-spacing: -0.04em;
}

.instance-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 0.9rem;
}

.mini-metric {
    padding: 0.9rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(132, 189, 255, 0.08);
}

.mini-metric span {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 800;
}

.mini-metric strong {
    font-size: 0.95rem;
    color: var(--text-main);
}

.status-badge,
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid rgba(110, 255, 179, 0.12);
    background: rgba(110, 255, 179, 0.12);
    color: var(--primary);
}

.status-badge.inactive {
    color: var(--warning);
    background: rgba(255, 215, 106, 0.12);
    border-color: rgba(255, 215, 106, 0.18);
}

.status-badge.active {
    color: var(--primary);
}

.badge.buy {
    color: var(--primary);
    background: rgba(110, 255, 179, 0.14);
    border-color: rgba(110, 255, 179, 0.2);
}

.badge.sell {
    color: var(--danger);
    background: rgba(255, 99, 125, 0.12);
    border-color: rgba(255, 99, 125, 0.2);
}

.loading,
.empty-state {
    padding: 1.2rem 1.3rem;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(132, 189, 255, 0.1);
    border-radius: 18px;
    color: var(--text-dim);
}

.table-container,
.logs-viewer,
.settings-form,
.news-analysis {
    padding: 1.2rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th,
td {
    padding: 1rem 1rem;
    border-bottom: 1px solid rgba(132, 189, 255, 0.08);
}

th {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 800;
}

td {
    color: var(--text-main);
    font-size: 0.94rem;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.metrics-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(132, 189, 255, 0.12);
}

.metrics-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.logs-controls,
.form-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.logs-controls {
    align-items: center;
    flex-wrap: wrap;
}

.form-group {
    flex-direction: column;
    align-items: stretch;
}

.form-group label {
    color: var(--text-dim);
    font-size: 0.88rem;
    font-weight: 700;
}

.form-group input,
.form-group textarea,
.logs-controls select,
.metrics-selector select {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    border: 1px solid rgba(132, 189, 255, 0.14);
    border-radius: 16px;
    padding: 0.85rem 1rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.logs-controls select:focus,
.metrics-selector select:focus {
    border-color: rgba(110, 255, 179, 0.28);
    box-shadow: 0 0 0 4px rgba(110, 255, 179, 0.08);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.admin-console-panel {
    margin-top: 1.4rem;
}

.account-admin-toolbar {
    display: grid;
    grid-template-columns: 1.2fr 1fr repeat(4, auto);
    gap: 0.8rem;
    align-items: center;
    margin-bottom: 1rem;
}

.account-admin-toolbar input,
.account-admin-toolbar select {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    border: 1px solid rgba(132, 189, 255, 0.14);
    border-radius: 16px;
    padding: 0.85rem 1rem;
    outline: none;
}

.account-credentials-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.admin-json-editor {
    width: 100%;
    min-height: 360px;
    background: rgba(5, 13, 24, 0.94);
    color: #d7f2ff;
    border: 1px solid rgba(132, 189, 255, 0.12);
    border-radius: 20px;
    padding: 1rem;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    resize: vertical;
}

.accounts-health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.bridge-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.runtime-toolbar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.8rem;
    align-items: center;
    margin-bottom: 1rem;
}

.runtime-toolbar select {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    border: 1px solid rgba(132, 189, 255, 0.14);
    border-radius: 16px;
    padding: 0.85rem 1rem;
    outline: none;
}

.runtime-hot-reload {
    grid-template-columns: 1fr;
}

.runtime-instance-card .instance-id {
    white-space: pre-wrap;
    word-break: break-word;
}

.account-audit-list {
    display: grid;
    gap: 0.85rem;
}

.audit-item {
    border-radius: 18px;
    padding: 0.95rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(132, 189, 255, 0.08);
}

.audit-item-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.45rem;
}

.audit-item-title {
    font-weight: 800;
    color: var(--text-main);
}

.audit-item-meta {
    color: var(--text-dim);
    font-size: 0.85rem;
}

.trade-history-error.is-success,
.trade-history-meta.is-success {
    color: #d8ffee;
    background: rgba(110, 255, 179, 0.11);
    border-color: rgba(110, 255, 179, 0.2);
    padding: 0.85rem 1rem;
    border-radius: 16px;
    border-style: solid;
}

.btn-primary,
.btn-save,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: none;
    border-radius: 16px;
    padding: 0.85rem 1.2rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: #03111c;
    box-shadow: 0 12px 28px rgba(84, 240, 255, 0.18);
}

.btn-save {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #03111c;
    box-shadow: 0 12px 28px rgba(77, 130, 255, 0.18);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid rgba(132, 189, 255, 0.16);
}

.btn-primary:hover,
.btn-save:hover,
.btn-secondary:hover {
    transform: translateY(-1px);
}

.console {
    height: 500px;
    overflow-y: auto;
    white-space: pre-wrap;
    background: linear-gradient(180deg, rgba(3, 7, 14, 0.96), rgba(5, 10, 16, 0.96));
    color: #88ffb6;
    border: 1px solid rgba(110, 255, 179, 0.16);
    border-radius: 20px;
    padding: 1.2rem;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.83rem;
    line-height: 1.55;
    box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.45);
}

.console::-webkit-scrollbar {
    width: 8px;
}

.console::-webkit-scrollbar-thumb {
    background: rgba(132, 189, 255, 0.22);
    border-radius: 999px;
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.sentiment-tag {
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
}

.sentiment-tag.bullish {
    background: rgba(110, 255, 179, 0.12);
    border: 1px solid rgba(110, 255, 179, 0.2);
    color: var(--primary);
}

.sentiment-tag.bearish {
    background: rgba(255, 99, 125, 0.12);
    border: 1px solid rgba(255, 99, 125, 0.2);
    color: var(--danger);
}

.sentiment-tag.neutral {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

.news-meta,
.history-preview {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.news-content-grid {
    grid-template-columns: 1fr 1fr;
}

.news-summary,
.news-top-list,
.news-recommendation,
.news-impact-panel {
    padding: 1.25rem;
}

.news-top-list ul {
    margin-top: 0.9rem;
    padding-left: 1.1rem;
}

.news-top-list li {
    margin-bottom: 0.6rem;
    color: var(--text-dim);
}

.news-recommendation {
    grid-column: 1 / -1;
    border-color: rgba(110, 255, 179, 0.18);
}

.news-impact-panel {
    grid-column: 1 / -1;
}

.rec-box {
    margin-top: 0.8rem;
    line-height: 1.65;
    color: var(--text-main);
}

.news-alert-banner {
    margin-bottom: 1rem;
    border-radius: 20px;
    padding: 1rem 1.15rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.news-alert-banner.active {
    border-color: rgba(255, 99, 125, 0.28);
    background: linear-gradient(135deg, rgba(255, 99, 125, 0.18), rgba(255, 99, 125, 0.06));
}

.news-alert-banner.scheduled {
    border-color: rgba(255, 194, 76, 0.28);
    background: linear-gradient(135deg, rgba(255, 194, 76, 0.18), rgba(255, 194, 76, 0.05));
}

.news-alert-banner.clear {
    border-color: rgba(110, 255, 179, 0.22);
    background: linear-gradient(135deg, rgba(110, 255, 179, 0.14), rgba(110, 255, 179, 0.05));
}

.news-alert-kicker {
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.35rem;
}

.news-alert-text {
    color: var(--text-main);
    line-height: 1.55;
}

.impact-grid {
    display: grid;
    gap: 0.9rem;
    margin-top: 0.95rem;
}

.impact-card {
    border-radius: 18px;
    padding: 1rem 1.05rem;
    border: 1px solid rgba(255, 99, 125, 0.22);
    background: linear-gradient(135deg, rgba(255, 99, 125, 0.15), rgba(255, 99, 125, 0.05));
}

.impact-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.impact-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.42rem 0.8rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    color: #ffd9e1;
    background: rgba(99, 14, 33, 0.5);
    border: 1px solid rgba(255, 99, 125, 0.28);
}

.impact-time,
.impact-window,
.impact-reason {
    color: var(--text-dim);
    font-size: 0.92rem;
}

.impact-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.55rem;
}

.impact-window {
    margin-bottom: 0.55rem;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.1rem;
}

.history-item + .history-item {
    margin-top: 0.8rem;
}

.history-date {
    min-width: 110px;
    color: var(--primary-strong);
    font-weight: 800;
}

.text-success {
    color: var(--primary);
}

.text-danger {
    color: var(--danger);
}

.vision-container {
    max-width: 1100px;
    margin: 0 auto;
}

.upload-area {
    padding: 3.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: 0.25s ease;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: rgba(110, 255, 179, 0.26);
    transform: translateY(-2px);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hedge-fund-report {
    padding: 1.5rem;
}

.analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(132, 189, 255, 0.12);
}

.bias-tag {
    padding: 0.8rem 1.4rem;
    border-radius: 16px;
    font-weight: 900;
    font-size: 1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.bias-tag.buy {
    background: rgba(110, 255, 179, 0.16);
    color: var(--primary);
}

.bias-tag.sell {
    background: rgba(255, 99, 125, 0.16);
    color: var(--danger);
}

.bias-tag.hold {
    background: rgba(255, 215, 106, 0.16);
    color: var(--warning);
}

.conviction {
    color: var(--primary-strong);
    font-weight: 800;
}

.analysis-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
}

.analysis-item h3 {
    margin-bottom: 0.8rem;
    color: var(--primary);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.analysis-item.metrics {
    padding: 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(132, 189, 255, 0.08);
}

.metric-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(132, 189, 255, 0.08);
}

.metric-row:last-child {
    border-bottom: none;
}

.metric-row span {
    color: var(--primary-strong);
    font-weight: 800;
}

.analysis-item.liquidity ul {
    list-style: none;
}

.analysis-item.liquidity li {
    padding: 0.8rem 0.95rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(132, 189, 255, 0.08);
}

.analysis-item.liquidity li + li {
    margin-top: 0.6rem;
}

.vision-loading {
    text-align: center;
    padding: 2rem;
}

.spinner {
    width: 42px;
    height: 42px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.08);
    border-top-color: var(--primary);
    animation: spin-vision 1s linear infinite;
}

@keyframes spin-vision {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1260px) {
    .navbar {
        flex-wrap: wrap;
        justify-content: center;
    }

    .status-indicator,
    .logo {
        min-width: auto;
    }

    .stats-overview,
    .summary-panels {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .container {
        width: min(100vw - 24px, 100%);
    }

    .premium-hero,
    .performance-stage-header,
    .section-header,
    .section-subheader,
    .analysis-grid,
    .summary-panels,
    .news-content-grid {
        grid-template-columns: 1fr;
        display: grid;
    }

    .performance-stage-copy {
        max-width: none;
        text-align: left;
    }

    .performance-stage-controls {
        align-items: stretch;
    }

    .performance-stage-controls select,
    .market-toolbar select,
    .market-toolbar button {
        min-width: 0;
        width: 100%;
    }

    .performance-live-head,
    .performance-history-grid {
        grid-template-columns: 1fr;
        display: grid;
    }

    .stats-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .section-header,
    .section-subheader {
        align-items: flex-start;
    }
}

@media (max-width: 720px) {
    .navbar {
        padding: 1rem;
    }

    .nav-links {
        justify-content: flex-start;
    }

    .container {
        width: min(100vw - 16px, 100%);
        padding-top: 1rem;
    }

    .hero-copy,
    .hero-side-card,
    .performance-stage,
    .panel-surface,
    .table-container,
    .logs-viewer,
    .settings-form,
    .news-analysis,
    .news-summary,
    .news-top-list,
    .news-recommendation,
    .hedge-fund-report {
        border-radius: 22px;
    }

    .stats-overview,
    .instance-card-grid {
        grid-template-columns: 1fr;
    }

    .performance-chart {
        min-height: 280px;
    }

    .chart-live {
        height: 260px;
    }

    .trade-history-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .market-toolbar {
        display: grid;
        grid-template-columns: 1fr;
    }

    .account-admin-toolbar,
    .bridge-grid,
    .account-credentials-grid,
    .runtime-toolbar {
        grid-template-columns: 1fr;
    }

    .trade-history-filters {
        grid-template-columns: 1fr 1fr;
    }

    .trade-filter-actions {
        grid-column: 1 / -1;
        justify-content: stretch;
    }

    .trade-filter-actions .btn-secondary {
        flex: 1;
    }

    .trade-history-pagination {
        justify-content: center;
    }

    .trade-row {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .trade-row-pnl {
        justify-self: start;
    }

    .status-indicator {
        width: 100%;
        justify-content: center;
    }
}
