:root {
    --bg: #070b13;
    --panel: rgba(19, 29, 45, 0.86);
    --panel-solid: #121c2b;
    --panel-soft: #172438;
    --text: #eef6ff;
    --muted: #8fa3bf;
    --line: rgba(148, 163, 184, 0.18);
    --blue: #1388ff;
    --blue-2: #0b66c3;
    --green: #24c17a;
    --yellow: #f0b429;
    --red: #f05252;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(19, 136, 255, 0.22), transparent 32rem),
        radial-gradient(circle at bottom right, rgba(36, 193, 122, 0.12), transparent 28rem),
        var(--bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.app-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 24px;
    border-right: 1px solid var(--line);
    background: rgba(5, 10, 18, 0.82);
    backdrop-filter: blur(18px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--blue), #49d39c);
    color: white;
    font-weight: 900;
    box-shadow: 0 14px 35px rgba(19, 136, 255, 0.28);
}

.brand strong,
.brand small {
    display: block;
}

.brand small,
.eyebrow,
p,
li {
    color: var(--muted);
}

.menu {
    display: grid;
    gap: 8px;
}

.menu a {
    padding: 13px 15px;
    border: 1px solid transparent;
    border-radius: 14px;
    color: var(--muted);
    transition: 0.18s ease;
}

.menu a:hover,
.menu a.active {
    color: var(--text);
    background: var(--panel-soft);
    border-color: var(--line);
}

.sidebar-card {
    margin-top: 28px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(19, 136, 255, 0.14), rgba(255, 255, 255, 0.03));
}

.sidebar-card span,
.metric span,
.status-item span,
.secret-list span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.sidebar-card strong {
    display: block;
    margin: 6px 0;
    font-size: 26px;
}

.main {
    padding: 30px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.eyebrow {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 12px;
    font-weight: 800;
}

h1,
h2 {
    margin: 0;
    line-height: 1.08;
}

h1 {
    margin-top: 8px;
    font-size: clamp(28px, 4vw, 44px);
}

h2 {
    font-size: clamp(22px, 3vw, 34px);
}

p {
    line-height: 1.65;
}

.top-actions,
.hero-actions,
.inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 18px;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--blue), var(--blue-2));
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(19, 136, 255, 0.24);
}

.btn.ghost,
button.ghost {
    background: var(--panel-soft);
    color: var(--text);
    box-shadow: none;
    border: 1px solid var(--line);
}

.alert {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--panel);
}

.alert.success {
    border-color: rgba(36, 193, 122, 0.4);
    color: #a8f5ce;
}

.alert.error {
    border-color: rgba(240, 82, 82, 0.45);
    color: #ffc4c4;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.8fr);
    gap: 22px;
    margin-bottom: 22px;
}

.hero-card,
.panel,
.metric,
.status-item {
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.hero-card {
    padding: clamp(28px, 5vw, 52px);
}

.hero-card p {
    max-width: 760px;
}

.hero-actions {
    margin-top: 24px;
}

.status-stack {
    display: grid;
    gap: 12px;
}

.status-item {
    padding: 20px;
}

.status-item strong {
    display: block;
    margin-top: 8px;
    font-size: 24px;
}

.status-item.ok strong {
    color: var(--green);
}

.status-item.warn strong {
    color: var(--yellow);
}

.status-item.danger strong {
    color: var(--red);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.metric {
    padding: 20px;
}

.metric strong {
    display: block;
    margin-top: 8px;
    font-size: 27px;
}

.panel {
    padding: 24px;
    margin-bottom: 22px;
}

.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 18px;
}

.steps div {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
}

.steps b {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: var(--blue);
}

.steps span {
    color: var(--muted);
    line-height: 1.55;
}

.settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
    gap: 22px;
}

.form-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.wide-form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.section-title {
    grid-column: 1 / -1;
    margin-bottom: 4px;
}

label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 700;
}

input,
select {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(5, 10, 18, 0.74);
    color: var(--text);
    outline: none;
}

input:focus,
select:focus {
    border-color: rgba(19, 136, 255, 0.72);
    box-shadow: 0 0 0 4px rgba(19, 136, 255, 0.12);
}

.form-panel button {
    grid-column: 1 / -1;
}

.secret-list {
    display: grid;
    gap: 12px;
    margin: 16px 0;
}

.secret-list div {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
}

.secret-list strong {
    display: block;
    margin-top: 5px;
    word-break: break-all;
}

.empty-state {
    display: grid;
    place-items: start;
    gap: 14px;
    max-width: 900px;
}

.docs ol {
    display: grid;
    gap: 10px;
}

pre {
    overflow: auto;
    padding: 18px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #060a12;
}

code {
    color: #b8d7ff;
}

@media (max-width: 1180px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
    }

    .menu {
        grid-template-columns: repeat(3, 1fr);
    }

    .hero-grid,
    .settings-grid,
    .metric-grid,
    .steps,
    .wide-form {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    .main,
    .sidebar {
        padding: 18px;
    }

    .topbar,
    .hero-grid,
    .settings-grid,
    .metric-grid,
    .steps,
    .form-panel,
    .wide-form {
        grid-template-columns: 1fr;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .menu {
        grid-template-columns: 1fr;
    }
}

/* Sade premium düzen: neon/parlama azaltıldı */
.aurora-layer,
.noise-layer {
    display: none;
}

.grid-layer {
    opacity: .16;
    background-size: 80px 80px;
}

.sidebar,
.topbar,
.terminal-panel,
.panel,
.summary-card,
.app-page-hero,
.risk-matrix article,
.position-large-card,
.position-health-card,
.order-ledger,
.deploy-roadmap {
    box-shadow: 0 16px 48px rgba(0,0,0,.28) !important;
}

.terminal-panel::after,
.hero-card::before,
.panel::before,
.metric::before,
.status-item::before,
.command-visual::before,
.summary-card::before,
.credential-vault::after,
.connection-lab::after,
.risk-command::after,
.pro-chart::after,
.btn::before,
button::before,
.menu a::after {
    display: none !important;
    animation: none !important;
}

.brand-mark,
.balance-orb,
.live-dot::before,
.market-row.active::after {
    box-shadow: none !important;
}

.btn,
button {
    box-shadow: none;
}

.metric:hover,
.status-item:hover,
.panel:hover {
    transform: none;
    box-shadow: 0 16px 48px rgba(0,0,0,.28);
}

.market-board {
    max-height: 720px;
    display: flex;
    flex-direction: column;
}

.market-head-actions {
    display: grid;
    gap: 8px;
    justify-items: end;
}

.market-head-actions small {
    color: var(--muted);
    font-size: 11px;
}

.market-head-actions small + small {
    color: #fff;
    font-weight: 800;
}

.market-list {
    max-height: 520px;
    overflow-y: auto;
    padding-right: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.22) transparent;
}

.market-list::-webkit-scrollbar {
    width: 6px;
}

.market-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.22);
    border-radius: 999px;
}

.market-row:hover,
.market-row.active {
    transform: none;
    border-color: rgba(255,255,255,.18);
    background: rgba(255,255,255,.065);
}

.chart-line {
    animation: drawLine .55s ease forwards !important;
    filter: none !important;
}

.chart-area {
    opacity: .46;
}

.buy-zone,
.target-line {
    background: rgba(255,255,255,.045);
}

.orderbook-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 0 18px 18px;
}

.orderbook-preview[hidden] {
    display: none;
}

.orderbook-preview div {
    padding: 14px;
    border: 1px solid rgba(255,255,255,.075);
    border-radius: 16px;
    background: rgba(255,255,255,.035);
}

.orderbook-preview span,
.orderbook-preview strong {
    display: block;
}

.orderbook-preview span {
    color: var(--muted);
    font-size: 12px;
}

.orderbook-preview strong {
    margin-top: 6px;
}

/* Ultra premium override layer inspired by Kopya theme assets */
:root {
    --bg: #030303;
    --panel: rgba(255, 255, 255, 0.045);
    --panel-solid: #0a0a0b;
    --panel-soft: rgba(255, 255, 255, 0.075);
    --text: #ffffff;
    --muted: #a1a1aa;
    --line: rgba(255, 255, 255, 0.09);
    --blue: #dc2626;
    --blue-2: #7f1d1d;
    --green: #34d399;
    --yellow: #fbbf24;
    --red: #f87171;
    --shadow: 0 30px 90px rgba(0, 0, 0, 0.48);
}

body {
    overflow-x: hidden;
    background: #030303;
}

.aurora-layer,
.grid-layer,
.noise-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.aurora-layer {
    z-index: -3;
    filter: blur(8px);
}

.aurora-layer span {
    position: absolute;
    width: 34vw;
    height: 34vw;
    min-width: 360px;
    min-height: 360px;
    border-radius: 999px;
    opacity: 0.38;
    animation: floatOrb 14s ease-in-out infinite alternate;
}

.aurora-layer span:nth-child(1) {
    left: -8%;
    top: -12%;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.7), transparent 68%);
}

.aurora-layer span:nth-child(2) {
    right: -10%;
    top: 20%;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.42), transparent 70%);
    animation-delay: -5s;
}

.aurora-layer span:nth-child(3) {
    left: 35%;
    bottom: -20%;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.28), transparent 72%);
    animation-delay: -9s;
}

.grid-layer {
    z-index: -2;
    background:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(circle at 58% 22%, black, transparent 72%);
}

.noise-layer {
    z-index: -1;
    opacity: 0.18;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.13) 0 1px, transparent 1px),
        radial-gradient(circle at 80% 60%, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px);
    background-size: 34px 34px, 51px 51px;
}

.app-shell {
    grid-template-columns: 300px minmax(0, 1fr);
}

.sidebar {
    background:
        linear-gradient(180deg, rgba(5, 5, 5, 0.94), rgba(10, 10, 11, 0.76)),
        radial-gradient(circle at top, rgba(220, 38, 38, 0.18), transparent 40%);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.07);
}

.brand-mark {
    background: radial-gradient(circle at 30% 20%, #fff, #ef4444 28%, #7f1d1d 72%);
}

.brand-mark svg,
.menu svg,
.top-pill svg,
.metric svg,
.status-item svg {
    width: 18px;
    height: 18px;
}

.menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.menu a::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-110%);
}

.menu a:hover::after,
.menu a.active::after {
    animation: shine 1.1s ease;
}

.main {
    padding: 34px;
}

.topbar {
    position: sticky;
    top: 18px;
    z-index: 20;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(5, 5, 5, 0.68);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
}

.top-actions {
    align-items: center;
}

.top-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    font-weight: 800;
}

.top-pill.ok {
    color: #b7f8d8;
    border-color: rgba(52, 211, 153, 0.28);
}

.top-pill.warn {
    color: #ffe7a3;
    border-color: rgba(251, 191, 36, 0.28);
}

.btn,
button {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ef4444, #991b1b);
    box-shadow: 0 18px 45px rgba(220, 38, 38, 0.26);
}

.btn::before,
button::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
    transform: translateX(-110%);
}

.btn:hover::before,
button:hover::before {
    animation: shine 0.9s ease;
}

.btn.ghost,
button.ghost {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
}

.hero-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.7fr);
    align-items: stretch;
}

.hero-card,
.panel,
.metric,
.status-item,
.command-visual {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
        rgba(10, 10, 11, 0.82);
    backdrop-filter: blur(18px);
}

.hero-card::before,
.panel::before,
.metric::before,
.status-item::before,
.command-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,255,255,.28), rgba(220,38,38,.18), rgba(96,165,250,.12));
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

.luxury-hero {
    min-height: 440px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.luxury-hero h2 {
    max-width: 900px;
    font-size: clamp(38px, 5.4vw, 72px);
    letter-spacing: -0.06em;
}

.luxury-hero p {
    max-width: 780px;
    margin-top: 18px;
    font-size: 17px;
}

.ticker-tape {
    margin-top: 26px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255,255,255,.04);
}

.ticker-track {
    display: flex;
    gap: 32px;
    width: max-content;
    padding: 12px 18px;
    animation: tickerMove 18s linear infinite;
}

.ticker-track span {
    color: var(--muted);
    white-space: nowrap;
}

.ticker-track b {
    color: #fff;
}

.command-visual {
    min-height: 440px;
    display: grid;
    place-items: center;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.panel-glow {
    background:
        radial-gradient(circle at 50% 35%, rgba(220, 38, 38, 0.26), transparent 34%),
        linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.025));
}

.orbital-core {
    position: relative;
    width: 280px;
    height: 280px;
}

.orbit {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 50%;
    animation: spin 12s linear infinite;
}

.orbit-two {
    inset: 32px;
    animation-duration: 8s;
    animation-direction: reverse;
}

.orbit-three {
    inset: 62px;
    animation-duration: 5s;
}

.orbit span {
    position: absolute;
    top: 16px;
    left: 50%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 28px #ef4444;
}

.core-icon {
    position: absolute;
    inset: 92px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.18), rgba(220,38,38,.22));
    box-shadow: inset 0 0 28px rgba(255,255,255,.08), 0 0 70px rgba(220,38,38,.28);
}

.core-icon svg {
    width: 58px;
    height: 58px;
}

.terminal-card {
    position: absolute;
    right: 24px;
    bottom: 24px;
    display: grid;
    gap: 9px;
    width: min(310px, calc(100% - 48px));
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(0,0,0,.54);
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.terminal-dots span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ef4444;
}

.terminal-dots span:nth-child(2) { background: #fbbf24; }
.terminal-dots span:nth-child(3) { background: #34d399; }

.terminal-card code {
    color: #d4d4d8;
    font-size: 13px;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}

.status-item {
    min-height: 150px;
    transform-style: preserve-3d;
}

.status-item > svg {
    width: 28px;
    height: 28px;
    margin-bottom: 16px;
    color: #ef4444;
}

.metric {
    min-height: 170px;
    transition: transform .25s ease, box-shadow .25s ease;
}

.metric:hover,
.status-item:hover,
.panel:hover {
    transform: translateY(-4px);
    box-shadow: 0 34px 110px rgba(0, 0, 0, 0.56);
}

.metric svg {
    width: 30px;
    height: 30px;
    margin-bottom: 18px;
    color: #ef4444;
}

.metric em {
    display: inline-flex;
    margin-top: 12px;
    color: var(--muted);
    font-style: normal;
}

.dashboard-mosaic {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 22px;
}

.signal-row {
    display: grid;
    grid-template-columns: 90px 1fr auto;
    gap: 14px;
    align-items: center;
    margin-top: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,.035);
}

.signal-row b {
    font-size: 20px;
}

.signal-row span {
    color: var(--muted);
}

.signal-row strong {
    color: #fff;
}

.signal-row.hot {
    border-color: rgba(251,191,36,.26);
}

.signal-row.danger {
    border-color: rgba(248,113,113,.28);
}

.chart-bars {
    display: flex;
    align-items: end;
    gap: 14px;
    height: 260px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.18));
}

.chart-bars span {
    flex: 1;
    min-width: 16px;
    border-radius: 999px 999px 8px 8px;
    background: linear-gradient(180deg, #f87171, #7f1d1d);
    box-shadow: 0 0 32px rgba(248, 113, 113, 0.28);
    animation: barPulse 2.2s ease-in-out infinite alternate;
}

.chart-bars span:nth-child(even) {
    animation-delay: .35s;
}

.chart-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    color: var(--muted);
}

.timeline {
    display: grid;
    gap: 16px;
}

.timeline div {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 14px;
    align-items: start;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,.035);
}

.timeline svg {
    width: 28px;
    height: 28px;
    color: #ef4444;
}

.premium-steps {
    margin: 0;
    grid-template-columns: repeat(2, 1fr);
}

.feature-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: center;
    gap: 24px;
    min-height: 360px;
}

.feature-hero h2 {
    max-width: 850px;
    font-size: clamp(32px, 4.2vw, 58px);
    letter-spacing: -0.05em;
}

.feature-hero p {
    max-width: 720px;
    margin: 14px 0 22px;
}

.radar-visual {
    position: relative;
    display: grid;
    place-items: center;
    width: 280px;
    height: 280px;
    margin-inline: auto;
}

.radar-visual span {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(239,68,68,.28);
    border-radius: 50%;
    animation: radarPing 2.8s ease-out infinite;
}

.radar-visual span:nth-child(2) { animation-delay: .7s; }
.radar-visual span:nth-child(3) { animation-delay: 1.4s; }

.radar-visual svg {
    width: 86px;
    height: 86px;
    color: #ef4444;
}

.ultra-table {
    display: grid;
    gap: 10px;
}

.table-row {
    display: grid;
    grid-template-columns: 0.7fr 0.8fr 0.8fr 0.8fr 1.3fr 1fr;
    gap: 12px;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,.035);
}

.table-head {
    color: var(--muted);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .08em;
}

.tag {
    display: inline-flex;
    width: max-content;
    padding: 7px 10px;
    border-radius: 999px;
    font-weight: 800;
    background: rgba(255,255,255,.08);
}

.tag.ok { color: #a7f3d0; }
.tag.warn { color: #fde68a; }
.tag.danger { color: #fecaca; }

.position-stack,
.order-flow {
    display: grid;
    gap: 14px;
}

.position-stack div,
.order-flow div {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255,255,255,.04);
}

.position-stack b,
.position-stack span,
.position-stack strong {
    display: block;
}

.position-stack span {
    margin: 5px 0;
    color: var(--muted);
}

.order-flow {
    grid-template-columns: repeat(2, 1fr);
}

.order-flow div {
    display: grid;
    place-items: center;
    min-height: 110px;
    gap: 8px;
}

.order-flow svg {
    width: 34px;
    height: 34px;
    color: #ef4444;
}

.mini-meter {
    height: 7px;
    margin-top: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
}

.mini-meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ef4444, #fbbf24);
    box-shadow: 0 0 24px rgba(239,68,68,.42);
}

@keyframes floatOrb {
    to { transform: translate3d(40px, 60px, 0) scale(1.08); }
}

@keyframes shine {
    to { transform: translateX(110%); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes tickerMove {
    to { transform: translateX(-50%); }
}

@keyframes barPulse {
    from { opacity: .58; transform: scaleY(.92); }
    to { opacity: 1; transform: scaleY(1.04); }
}

@keyframes radarPing {
    from { transform: scale(.35); opacity: 1; }
    to { transform: scale(1.15); opacity: 0; }
}

@media (max-width: 1180px) {
    .hero-grid,
    .dashboard-mosaic,
    .feature-hero,
    .status-grid {
        grid-template-columns: 1fr 1fr;
    }

    .table-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    .hero-grid,
    .dashboard-mosaic,
    .feature-hero,
    .status-grid,
    .premium-steps,
    .order-flow {
        grid-template-columns: 1fr;
    }

    .luxury-hero h2,
    .feature-hero h2 {
        font-size: 36px;
    }

    .command-visual {
        min-height: 360px;
    }
}

/* Exchange-grade composition */
.exchange-terminal {
    display: grid;
    grid-template-columns: minmax(240px, 0.78fr) minmax(520px, 1.58fr) minmax(300px, 0.86fr);
    gap: 16px;
    align-items: stretch;
    margin-bottom: 16px;
}

.terminal-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.085);
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.068), rgba(255,255,255,.022)),
        rgba(8, 8, 9, .88);
    box-shadow: 0 22px 74px rgba(0,0,0,.42);
    backdrop-filter: blur(18px);
}

.terminal-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, transparent, rgba(255,255,255,.035), transparent),
        radial-gradient(circle at 30% 0%, rgba(220,38,38,.10), transparent 34%);
    opacity: .78;
}

.panel-head,
.stage-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border-bottom: 1px solid rgba(255,255,255,.07);
}

.panel-head h2,
.stage-top h2 {
    margin-top: 6px;
    font-size: 22px;
    letter-spacing: -0.035em;
}

.chip-btn,
.market-tabs button,
.chart-toolbar button,
.order-toggle button {
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.048);
    color: var(--muted);
    box-shadow: none;
    border-radius: 999px;
    min-height: 34px;
    padding: 7px 12px;
    font-size: 12px;
}

.chip-btn.active,
.market-tabs button.active,
.chart-toolbar button.active,
.order-toggle button.active {
    color: #fff;
    background: linear-gradient(135deg, #dc2626, #7f1d1d);
    border-color: rgba(248,113,113,.34);
}

.market-tabs {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 8px;
    padding: 14px 14px 4px;
    overflow-x: auto;
}

.market-list {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 8px;
    padding: 14px;
}

.market-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    align-items: center;
    width: 100%;
    min-height: 64px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,.055);
    border-radius: 16px;
    background: rgba(255,255,255,.03);
    color: var(--text);
    font: inherit;
    text-align: left;
    box-shadow: none;
    cursor: pointer;
    transition: transform .22s ease, border-color .22s ease, background .22s ease;
}

.market-row::before {
    display: none;
}

.market-row:hover,
.market-row.active {
    transform: translateX(4px);
    border-color: rgba(248,113,113,.24);
    background: linear-gradient(90deg, rgba(220,38,38,.14), rgba(255,255,255,.035));
}

.market-row.active::after {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 18px #ef4444;
    animation: rowBlink 1.4s ease-in-out infinite;
}

.market-row span,
.market-row small,
.market-row b {
    display: block;
}

.market-row small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.market-row strong {
    font-size: 14px;
}

.up {
    color: #34d399 !important;
}

.down {
    color: #f87171 !important;
}

.trade-stage {
    min-height: 650px;
}

.stage-top {
    padding: 22px;
}

.stage-top h2 {
    font-size: clamp(32px, 3.4vw, 54px);
}

.stage-top p {
    max-width: 540px;
}

.price-block {
    min-width: 220px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 18px;
    background: rgba(0,0,0,.25);
    text-align: right;
}

.price-block span,
.price-block em {
    display: block;
    color: var(--muted);
    font-style: normal;
    font-size: 12px;
}

.price-block strong {
    display: block;
    margin: 5px 0;
    font-size: 28px;
}

.chart-shell {
    position: relative;
    z-index: 1;
    padding: 16px 18px 0;
}

.chart-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.pro-chart {
    position: relative;
    overflow: hidden;
    height: 320px;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 20px;
    background:
        linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px),
        radial-gradient(circle at 70% 20%, rgba(220,38,38,.13), transparent 36%),
        rgba(0,0,0,.23);
    background-size: 100% 25%, 12.5% 100%, auto, auto;
}

.pro-chart::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.075), transparent);
    transform: translateX(-100%);
    animation: chartSweep 4.8s ease-in-out infinite;
}

.pro-chart svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.chart-area {
    fill: url(#chartFill);
    opacity: .86;
}

.chart-line {
    fill: none;
    stroke: #ef4444;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    animation: drawLine 2.1s ease forwards, glowPulse 2.8s ease-in-out infinite alternate 2.1s;
}

.buy-zone,
.target-line {
    position: absolute;
    top: 18px;
    bottom: 18px;
    border-radius: 14px;
    border: 1px dashed rgba(52,211,153,.42);
    background: linear-gradient(180deg, rgba(52,211,153,.11), transparent);
}

.buy-zone span,
.target-line span {
    position: absolute;
    left: 10px;
    top: 10px;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(0,0,0,.45);
    color: #a7f3d0;
    font-size: 11px;
    font-weight: 800;
}

.target-line {
    width: 2px;
    border-color: rgba(251,191,36,.52);
    background: rgba(251,191,36,.3);
}

.target-line span {
    left: auto;
    right: 8px;
    color: #fde68a;
    white-space: nowrap;
}

.analysis-strip {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 16px 18px 18px;
}

.analysis-strip div {
    padding: 14px;
    border: 1px solid rgba(255,255,255,.065);
    border-radius: 16px;
    background: rgba(255,255,255,.035);
}

.analysis-strip span,
.analysis-strip strong {
    display: block;
}

.analysis-strip span {
    color: var(--muted);
    font-size: 12px;
}

.analysis-strip strong {
    margin-top: 6px;
    font-size: 15px;
}

.order-console {
    padding-bottom: 18px;
}

.live-dot {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #a7f3d0;
    font-weight: 900;
}

.live-dot::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 0 rgba(52,211,153,.55);
    animation: livePulse 1.35s ease-out infinite;
}

.order-toggle {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 14px 18px;
}

.order-form-preview {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 14px;
    padding: 4px 18px 18px;
}

.order-form-preview label {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
}

.order-form-preview strong {
    color: #fff;
}

.range-track {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,.075);
}

.range-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ef4444, #fb7185);
    animation: rangeBreath 2.2s ease-in-out infinite alternate;
}

.range-track.gold span {
    background: linear-gradient(90deg, #f59e0b, #fde68a);
}

.range-track.danger span {
    background: linear-gradient(90deg, #991b1b, #ef4444);
}

.profit-card {
    position: relative;
    z-index: 1;
    margin: 0 18px 16px;
    padding: 16px;
    border: 1px solid rgba(251,191,36,.18);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(251,191,36,.10), rgba(255,255,255,.025));
}

.profit-card span {
    color: #fde68a;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .1em;
}

.profit-card p {
    margin-top: 10px;
    color: #f4f4f5;
    font-size: 14px;
}

.full-width {
    width: calc(100% - 36px);
    margin-inline: 18px;
}

.exchange-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.summary-card {
    position: relative;
    overflow: hidden;
    min-height: 150px;
    padding: 18px;
    border: 1px solid rgba(255,255,255,.085);
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.022)),
        rgba(8,8,9,.82);
}

.summary-card::before {
    content: "";
    position: absolute;
    inset: auto 18px 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ef4444, transparent);
    animation: bottomScan 2.8s linear infinite;
}

.summary-card svg {
    width: 26px;
    height: 26px;
    color: #ef4444;
}

.summary-card span,
.summary-card small,
.summary-card strong {
    display: block;
}

.summary-card span {
    margin-top: 14px;
    color: var(--muted);
    font-size: 12px;
}

.summary-card strong {
    margin: 5px 0;
    font-size: 24px;
}

.summary-card small {
    color: var(--muted);
    line-height: 1.45;
}

.summary-card.ok strong { color: #a7f3d0; }
.summary-card.warn strong { color: #fde68a; }
.summary-card.danger strong { color: #fecaca; }

.institutional-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.portfolio-list,
.feed-list {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 10px;
    padding: 16px;
}

.portfolio-list div,
.feed-list div {
    padding: 14px;
    border: 1px solid rgba(255,255,255,.065);
    border-radius: 16px;
    background: rgba(255,255,255,.033);
}

.portfolio-list span,
.portfolio-list strong,
.portfolio-list em {
    display: block;
}

.portfolio-list span,
.portfolio-list em {
    color: var(--muted);
    font-style: normal;
    font-size: 12px;
}

.portfolio-list strong {
    margin: 5px 0;
    font-size: 22px;
}

.heat-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 9px;
    padding: 16px;
}

.heat-grid span {
    min-height: 64px;
    border-radius: 14px;
    background: rgba(255,255,255,.06);
    animation: heatWave 2.4s ease-in-out infinite alternate;
}

.heat-grid span.hot {
    background: linear-gradient(135deg, rgba(239,68,68,.72), rgba(127,29,29,.28));
}

.heat-grid span.cold {
    background: linear-gradient(135deg, rgba(52,211,153,.5), rgba(6,78,59,.22));
}

.heat-grid span:nth-child(3n) {
    animation-delay: .4s;
}

.feed-list div {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 12px;
}

.feed-list svg {
    width: 24px;
    height: 24px;
    color: #ef4444;
}

.feed-list p {
    margin: 0;
    color: var(--muted);
}

.feed-list b {
    color: #fff;
}

@keyframes drawLine {
    to { stroke-dashoffset: 0; }
}

@keyframes glowPulse {
    from { filter: drop-shadow(0 0 6px rgba(239,68,68,.25)); }
    to { filter: drop-shadow(0 0 18px rgba(239,68,68,.58)); }
}

@keyframes livePulse {
    to { box-shadow: 0 0 0 12px rgba(52,211,153,0); }
}

@keyframes rangeBreath {
    from { filter: brightness(.85); transform: scaleX(.96); transform-origin: left; }
    to { filter: brightness(1.18); transform: scaleX(1); transform-origin: left; }
}

@keyframes heatWave {
    from { opacity: .62; transform: scale(.96); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes rowBlink {
    50% { opacity: .3; transform: scale(1.8); }
}

@keyframes chartSweep {
    0%, 48% { transform: translateX(-100%); opacity: 0; }
    55% { opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}

@keyframes bottomScan {
    from { transform: translateX(-60%); }
    to { transform: translateX(60%); }
}

@media (max-width: 1380px) {
    .exchange-terminal {
        grid-template-columns: 280px minmax(0, 1fr);
    }

    .order-console {
        grid-column: 1 / -1;
    }
}

@media (max-width: 1024px) {
    .exchange-terminal,
    .exchange-summary,
    .institutional-grid {
        grid-template-columns: 1fr;
    }

    .analysis-strip {
        grid-template-columns: 1fr 1fr;
    }

    .price-block {
        text-align: left;
    }

    .stage-top,
    .panel-head {
        flex-direction: column;
    }
}

/* x1000 application shell */
.balance-pill {
    display: grid;
    grid-template-columns: 38px minmax(120px, auto) 18px;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 7px 12px 7px 8px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 999px;
    background:
        linear-gradient(135deg, rgba(220,38,38,.18), rgba(255,255,255,.05)),
        rgba(8,8,9,.86);
    color: #fff;
    box-shadow: 0 18px 54px rgba(0,0,0,.38);
}

.balance-pill small,
.balance-pill strong {
    display: block;
    text-align: left;
}

.balance-pill small {
    color: var(--muted);
    font-size: 11px;
}

.balance-pill strong {
    font-size: 14px;
    white-space: nowrap;
}

.balance-orb {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: radial-gradient(circle, #ef4444, #7f1d1d);
    box-shadow: 0 0 34px rgba(239,68,68,.35);
}

.balance-drawer {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
}

.balance-drawer.open {
    display: block;
}

.balance-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.58);
    backdrop-filter: blur(8px);
}

.balance-sheet {
    position: absolute;
    top: 18px;
    right: 18px;
    bottom: 18px;
    width: min(460px, calc(100vw - 36px));
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(220,38,38,.22), transparent 34%),
        linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.025)),
        #080809;
    box-shadow: 0 40px 120px rgba(0,0,0,.62);
    animation: drawerIn .28s ease;
}

.balance-sheet-head,
.balance-actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 22px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.balance-sheet-head h2 {
    margin: 6px 0;
    font-size: 30px;
}

.icon-btn {
    width: 42px;
    min-height: 42px;
    padding: 0;
    border-radius: 50%;
}

.balance-total-card {
    margin: 18px;
    padding: 20px;
    border: 1px solid rgba(52,211,153,.18);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(52,211,153,.14), rgba(255,255,255,.035));
}

.balance-total-card span,
.balance-total-card small,
.balance-total-card strong {
    display: block;
}

.balance-total-card span,
.balance-total-card small {
    color: var(--muted);
}

.balance-total-card strong {
    margin: 8px 0;
    font-size: 38px;
    letter-spacing: -.04em;
}

.balance-list {
    display: grid;
    gap: 10px;
    max-height: calc(100vh - 330px);
    overflow-y: auto;
    padding: 0 18px 18px;
}

.balance-asset,
.balance-empty {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(255,255,255,.075);
    border-radius: 18px;
    background: rgba(255,255,255,.035);
}

.asset-logo {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(239,68,68,.45), rgba(255,255,255,.07));
    font-weight: 900;
}

.balance-asset b,
.balance-asset span,
.balance-asset small {
    display: block;
}

.balance-asset span,
.balance-asset small {
    color: var(--muted);
}

.balance-asset strong {
    text-align: right;
}

.balance-actions {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    border-top: 1px solid rgba(255,255,255,.08);
    border-bottom: 0;
    background: rgba(8,8,9,.88);
    backdrop-filter: blur(14px);
}

.app-page-hero,
.position-command-grid,
.risk-matrix,
.order-ledger,
.deploy-roadmap {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
}

.app-page-hero {
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, .8fr);
    align-items: stretch;
    padding: 28px;
    border: 1px solid rgba(255,255,255,.085);
    border-radius: 28px;
    background:
        radial-gradient(circle at 78% 20%, rgba(220,38,38,.20), transparent 32%),
        linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.025)),
        rgba(8,8,9,.88);
    box-shadow: 0 24px 80px rgba(0,0,0,.42);
}

.app-page-hero h2 {
    max-width: 980px;
    font-size: clamp(34px, 4.5vw, 64px);
    letter-spacing: -.06em;
}

.app-page-hero p {
    max-width: 760px;
    margin-top: 12px;
}

.hero-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.hero-mini-grid div {
    padding: 16px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 20px;
    background: rgba(255,255,255,.04);
}

.hero-mini-grid svg {
    width: 24px;
    height: 24px;
    color: #ef4444;
}

.hero-mini-grid span,
.hero-mini-grid strong {
    display: block;
}

.hero-mini-grid span {
    margin-top: 10px;
    color: var(--muted);
}

.hero-mini-grid strong {
    margin-top: 4px;
    font-size: 20px;
}

.credential-vault,
.connection-lab,
.risk-command {
    border-radius: 28px;
}

.credential-vault::after,
.connection-lab::after,
.risk-command::after {
    content: "";
    position: absolute;
    inset: auto 20px 0;
    height: 3px;
    border-radius: 999px 999px 0 0;
    background: linear-gradient(90deg, transparent, rgba(239,68,68,.9), transparent);
    animation: bottomScan 3.2s linear infinite;
}

.form-panel label {
    position: relative;
    min-width: 0;
}

.form-panel input,
.form-panel select,
.secret-input-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.form-panel input,
.form-panel select {
    min-height: 52px;
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.02)),
        rgba(0,0,0,.26);
}

.secret-input-wrap {
    position: relative;
    display: block;
}

.secret-input-wrap input {
    padding-right: 82px;
}

.secret-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    min-height: 34px;
    padding: 6px 10px;
    font-size: 12px;
    box-shadow: none;
    z-index: 1;
}

.credential-vault label:has(input[name="BTCTURK_API_KEY"]),
.credential-vault label:has(input[name="BTCTURK_API_SECRET"]),
.credential-vault label:has(input[name="TELEGRAM_BOT_TOKEN"]),
.credential-vault label:has(input[name="SITE_URL"]) {
    grid-column: 1 / -1;
}

.form-panel label small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
}

.connection-lab {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.connection-test-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: auto;
    padding-top: 16px;
}

.connection-test-actions .inline-form {
    display: block;
    margin: 0;
}

.connection-test-actions .btn {
    width: 100%;
}

.form-panel input:hover,
.form-panel select:hover {
    border-color: rgba(248,113,113,.24);
}

.connection-flow {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 16px 0;
}

.connection-flow div {
    display: grid;
    place-items: center;
    min-height: 78px;
    border: 1px solid rgba(255,255,255,.075);
    border-radius: 16px;
    background: rgba(255,255,255,.035);
}

.connection-flow svg {
    color: #ef4444;
}

.connection-flow span {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

.diagnostic-console {
    margin: 16px 0;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 20px;
    background:
        radial-gradient(circle at top right, rgba(220,38,38,.12), transparent 34%),
        rgba(0,0,0,.22);
}

.diagnostic-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border-bottom: 1px solid rgba(255,255,255,.07);
}

.diagnostic-head span {
    font-weight: 900;
}

.diagnostic-list {
    display: grid;
    gap: 8px;
    padding: 12px;
}

.diagnostic-empty,
.diagnostic-ip,
.diagnostic-item {
    padding: 12px;
    border: 1px solid rgba(255,255,255,.065);
    border-radius: 14px;
    background: rgba(255,255,255,.035);
}

.diagnostic-ip {
    color: var(--muted);
}

.diagnostic-ip b {
    color: #fff;
}

.diagnostic-item {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 12px;
    align-items: center;
}

.diagnostic-item > span {
    display: grid;
    place-items: center;
    min-height: 32px;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    font-size: 11px;
    font-weight: 900;
}

.diagnostic-item.ok > span {
    color: #a7f3d0;
    background: rgba(52,211,153,.12);
}

.diagnostic-item.danger > span {
    color: #fecaca;
    background: rgba(248,113,113,.14);
}

.diagnostic-item b,
.diagnostic-item small {
    display: block;
}

.diagnostic-item small {
    margin-top: 3px;
    color: var(--muted);
    line-height: 1.45;
}

.risk-matrix {
    grid-template-columns: repeat(4, 1fr);
}

.risk-matrix article,
.position-large-card,
.position-health-card,
.order-ledger,
.deploy-roadmap {
    position: relative;
    overflow: hidden;
    padding: 20px;
    border: 1px solid rgba(255,255,255,.085);
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.022)),
        rgba(8,8,9,.86);
    box-shadow: 0 20px 70px rgba(0,0,0,.38);
}

.risk-matrix svg {
    width: 28px;
    height: 28px;
    color: #ef4444;
}

.risk-matrix span,
.risk-matrix strong,
.risk-matrix p {
    display: block;
}

.risk-matrix span {
    margin-top: 14px;
    color: var(--muted);
}

.risk-matrix strong {
    margin: 5px 0;
    font-size: 26px;
}

.position-command-grid {
    grid-template-columns: 1.25fr .75fr;
}

.position-profit-line {
    display: grid;
    grid-template-columns: auto auto 38px auto auto;
    gap: 12px;
    align-items: center;
    width: max-content;
    max-width: 100%;
    margin: 22px 0;
    padding: 14px;
    border: 1px solid rgba(52,211,153,.16);
    border-radius: 18px;
    background: rgba(52,211,153,.06);
}

.position-profit-line span {
    color: var(--muted);
}

.position-health-card {
    display: grid;
    gap: 10px;
}

.position-health-card div {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 16px;
    background: rgba(255,255,255,.035);
}

.position-health-card svg {
    color: #ef4444;
}

.position-health-card span {
    color: var(--muted);
}

.order-ledger {
    display: grid;
    gap: 10px;
}

.ledger-row {
    display: grid;
    grid-template-columns: .7fr 1fr 1fr 1fr 1.2fr;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 16px;
    background: rgba(255,255,255,.035);
}

.ledger-head {
    color: var(--muted);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .09em;
}

.deploy-roadmap {
    padding: 28px;
}

.roadmap-hero h2 {
    max-width: 900px;
    font-size: clamp(34px, 4vw, 60px);
    letter-spacing: -.06em;
}

.roadmap-steps {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.roadmap-steps div {
    padding: 16px;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 18px;
    background: rgba(255,255,255,.035);
}

.roadmap-steps b,
.roadmap-steps span {
    display: block;
}

.roadmap-steps b {
    color: #ef4444;
    font-size: 24px;
}

.roadmap-steps span {
    margin: 8px 0;
    color: #fff;
    font-weight: 900;
}

@keyframes drawerIn {
    from { transform: translateX(30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@media (max-width: 1180px) {
    .app-page-hero,
    .position-command-grid,
    .risk-matrix,
    .roadmap-steps {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    .balance-pill {
        width: 100%;
    }

    .app-page-hero,
    .hero-mini-grid,
    .position-command-grid,
    .risk-matrix,
    .roadmap-steps,
    .ledger-row {
        grid-template-columns: 1fr;
    }

    .position-profit-line {
        grid-template-columns: 1fr;
        width: 100%;
    }
}

/* Smart settings page */
.smart-settings {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
}

.quick-start-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.quick-start-strip article {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 14px;
    align-items: start;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, .075);
    border-radius: 20px;
    background: rgba(255, 255, 255, .03);
}

.quick-start-strip b {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(239, 68, 68, .28), rgba(239, 68, 68, .08));
    color: #fecaca;
    font-size: 18px;
}

.quick-start-strip strong {
    display: block;
    margin-bottom: 4px;
}

.quick-start-strip p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.commission-volume-card {
    margin-bottom: 16px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, .075);
    border-radius: 20px;
    background: rgba(255, 255, 255, .03);
}

.commission-volume-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.commission-volume-head span {
    color: var(--muted);
    font-size: 13px;
}

.commission-volume-head strong {
    font-size: 14px;
}

.volume-progress {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
    font-size: 12px;
    color: var(--muted);
}

.volume-progress-track {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    overflow: hidden;
}

.volume-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ef4444, #f97316);
    transition: width .3s ease;
}

.strategy-mode-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.strategy-mode-card {
    display: grid;
    gap: 6px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 18px;
    background: rgba(255, 255, 255, .02);
    color: var(--text);
    text-align: left;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
    box-shadow: none;
}

.strategy-mode-card:hover {
    border-color: rgba(239, 68, 68, .35);
}

.strategy-mode-card.active {
    border-color: rgba(239, 68, 68, .55);
    background: rgba(239, 68, 68, .1);
}

.strategy-mode-card svg {
    width: 20px;
    height: 20px;
    color: #fecaca;
}

.strategy-mode-card strong {
    color: #fff;
    font-size: 14px;
}

.strategy-mode-card em {
    font-style: normal;
    font-size: 11px;
    color: #fde68a;
    font-weight: 800;
}

.strategy-mode-card p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.toggle-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.toggle-card {
    display: grid;
    gap: 6px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 18px;
    background: rgba(255, 255, 255, .02);
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}

.toggle-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.toggle-card.active {
    border-color: rgba(52, 211, 153, .45);
    background: rgba(52, 211, 153, .08);
}

.toggle-card strong {
    color: #fff;
    font-size: 14px;
}

.toggle-card p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.help-banner.strategy-banner {
    border-color: rgba(52, 211, 153, .22);
    background: linear-gradient(135deg, rgba(52, 211, 153, .08), rgba(255, 255, 255, .02));
}

.help-banner.strategy-banner svg {
    color: #a7f3d0;
}

.help-tip.inline-help {
    margin-left: 8px;
}

.help-glossary-sheet [data-help-example] {
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .05);
    font-size: 13px;
    color: #fde68a;
}

.preview-toolbar small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
}

.strategy-preview-table td.reason-cell {
    max-width: 220px;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.45;
}

.strategy-preview-table tr.ineligible-row {
    opacity: .72;
}

.risk-badge.sakin { color: #a7f3d0; background: rgba(52, 211, 153, .12); }

.settings-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    position: relative;
    z-index: 3;
}

.settings-tabs .chip-btn {
    cursor: pointer;
    pointer-events: auto;
}

.settings-tab-panel {
    display: none;
    animation: fadeInPanel .25s ease;
}

.settings-tab-panel.active {
    display: block;
}

@keyframes fadeInPanel {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.help-banner {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 12px;
    align-items: start;
    margin-bottom: 16px;
    padding: 16px;
    border: 1px solid rgba(251, 191, 36, .22);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(251, 191, 36, .08), rgba(255, 255, 255, .02));
}

.help-banner svg {
    color: #fde68a;
}

.help-banner strong {
    display: block;
    margin-bottom: 4px;
}

.help-banner p {
    margin: 0;
    font-size: 14px;
}

.field-card {
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, .075);
    border-radius: 18px;
    background: rgba(255, 255, 255, .03);
}

.field-card span,
.field-card small {
    color: var(--muted);
}

.field-card select {
    width: 100%;
}

.field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.field-head span {
    color: #fff;
    font-weight: 800;
}

.help-tip {
    width: 28px;
    min-height: 28px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    color: #fde68a;
    font-weight: 900;
    box-shadow: none;
}

.field-row-2,
.field-row-3,
.manual-strategy-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 12px;
}

.field-row-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-row-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.manual-strategy-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.commission-table-wrap,
.strategy-preview-table-wrap {
    overflow-x: auto;
    margin: 16px 0;
    border: 1px solid rgba(255, 255, 255, .075);
    border-radius: 18px;
}

.commission-table,
.strategy-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.commission-table th,
.commission-table td,
.strategy-preview-table th,
.strategy-preview-table td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    text-align: left;
}

.commission-table th,
.strategy-preview-table th {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 11px;
}

.commission-table tr.active-tier {
    background: rgba(239, 68, 68, .12);
}

.commission-table tr.active-tier td:first-child {
    color: #fecaca;
    font-weight: 800;
}

.commission-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.commission-summary div {
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 16px;
    background: rgba(255, 255, 255, .03);
}

.commission-summary span,
.commission-summary strong {
    display: block;
}

.commission-summary span {
    color: var(--muted);
    font-size: 12px;
}

.commission-summary strong {
    margin-top: 6px;
    font-size: 20px;
}

.auto-strategy-note {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 12px;
    align-items: start;
    margin: 12px 0;
    padding: 16px;
    border: 1px solid rgba(52, 211, 153, .18);
    border-radius: 18px;
    background: rgba(52, 211, 153, .06);
}

.auto-strategy-note svg {
    color: #a7f3d0;
}

.auto-strategy-note strong {
    display: block;
    margin-bottom: 4px;
}

.auto-strategy-note p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.preview-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.preview-toolbar p {
    margin: 0;
    max-width: 760px;
}

.preview-empty {
    color: var(--muted);
    text-align: center;
}

.risk-badge {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    background: rgba(255, 255, 255, .08);
}

.strategy-preview-table td small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}
.risk-badge.normal { color: #fde68a; }
.risk-badge.oynak { color: #fecaca; }
.risk-badge.cok-oynak { color: #fca5a5; }

.settings-submit-row {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .07);
}

.bot-launch-panel {
    margin-bottom: 22px;
    border-radius: 28px;
}

.bot-launch-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.bot-launch-head h2 {
    margin-top: 8px;
    font-size: clamp(24px, 3vw, 34px);
}

.bot-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .05);
    white-space: nowrap;
    font-weight: 800;
    font-size: 13px;
}

.bot-status-pill.ok {
    color: #a7f3d0;
    border-color: rgba(52, 211, 153, .28);
}

.bot-status-pill.warn {
    color: #fde68a;
    border-color: rgba(251, 191, 36, .28);
}

.bot-status-pill.danger {
    color: #fecaca;
    border-color: rgba(248, 113, 113, .28);
}

.bot-launch-steps {
    display: grid;
    gap: 12px;
    margin: 0 0 16px;
    padding-left: 20px;
    color: var(--muted);
    line-height: 1.55;
}

.bot-launch-steps strong {
    color: #fff;
}

.bot-launch-steps code {
    display: block;
    margin-top: 8px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(0, 0, 0, .28);
    color: #fecaca;
    font-size: 12px;
    word-break: break-all;
}

.bot-launch-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.help-glossary-panel {
    position: fixed;
    inset: 0;
    z-index: 120;
}

.help-glossary-panel[hidden] {
    display: none;
}

.help-glossary-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .62);
    backdrop-filter: blur(8px);
}

.help-glossary-sheet {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(520px, calc(100vw - 32px));
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 24px;
    background: #0a0a0b;
    box-shadow: 0 40px 120px rgba(0, 0, 0, .62);
    transform: translate(-50%, -50%);
}

.help-glossary-sheet h3 {
    margin: 8px 0 12px;
    font-size: 28px;
}

.help-glossary-sheet p {
    margin: 0 0 10px;
}

@media (max-width: 900px) {
    .field-row-2,
    .field-row-3,
    .manual-strategy-grid,
    .commission-summary,
    .quick-start-strip,
    .strategy-mode-cards,
    .toggle-cards,
    .connection-test-actions {
        grid-template-columns: 1fr;
    }
}
