:root {
    --bg: #070b14;
    --panel: rgba(255, 255, 255, 0.045);
    --panel-strong: rgba(255, 255, 255, 0.075);
    --border: rgba(255, 255, 255, 0.11);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #64748b;
    --cyan: #22d3ee;
    --violet: #8b5cf6;
    --emerald: #34d399;
    --amber: #f59e0b;
    --red: #f87171;
    --radius-xl: 24px;
    --radius-lg: 18px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 28% -10%, rgba(34, 211, 238, 0.18), transparent 32%),
        radial-gradient(circle at 90% 10%, rgba(139, 92, 246, 0.18), transparent 36%),
        radial-gradient(circle at 10% 90%, rgba(245, 158, 11, 0.10), transparent 30%),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 290px;
    flex: 0 0 290px;
    min-height: 100vh;
    padding: 22px;
    border-right: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(22px);
}

.brand {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 32px;
}

.brand-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--cyan), var(--violet));
    box-shadow: 0 18px 45px rgba(34, 211, 238, 0.18);
    font-size: 22px;
}

.brand-title {
    font-weight: 900;
    letter-spacing: -0.04em;
    font-size: 20px;
}

.brand-subtitle {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.sidebar-nav {
    display: grid;
    gap: 8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 12px 14px;
    border-radius: 17px;
    color: var(--muted);
    transition: 180ms ease;
}

.sidebar-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-link.active {
    color: #cffafe;
    background: rgba(34, 211, 238, 0.13);
    box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.16);
}

.sidebar-icon {
    width: 24px;
    text-align: center;
}

.sidebar-security-card {
    margin-top: 30px;
    padding: 18px;
    border: 1px solid rgba(34, 211, 238, 0.16);
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.10), rgba(139, 92, 246, 0.08));
}

.security-title {
    font-weight: 800;
    color: #cffafe;
    margin-bottom: 8px;
}

.sidebar-security-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.main-area {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
    padding: 24px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    min-height: 82px;
    padding: 18px 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--panel);
    backdrop-filter: blur(22px);
    box-shadow: var(--shadow);
}

.topbar-title {
    font-size: 28px;
    font-weight: 950;
    letter-spacing: -0.045em;
}

.topbar-subtitle {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-meta {
    text-align: right;
}

.user-name {
    font-weight: 800;
}

.user-role {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.logout-btn,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 15px;
    border-radius: 15px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
}

.logout-btn:hover,
.btn:hover {
    background: rgba(255, 255, 255, 0.10);
}

.btn-primary {
    border: 0;
    background: linear-gradient(135deg, var(--cyan), var(--violet));
    color: white;
    box-shadow: 0 18px 45px rgba(34, 211, 238, 0.16);
}

.content {
    flex: 1;
    padding-top: 24px;
}

.grid {
    display: grid;
    gap: 18px;
}

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

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

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

.card {
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--panel);
    backdrop-filter: blur(22px);
    box-shadow: var(--shadow);
    padding: 22px;
}

.card-title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.025em;
}

.card-subtitle {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.metric-label {
    color: var(--muted);
    font-size: 13px;
}

.metric-value {
    margin-top: 8px;
    font-size: 30px;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.metric-hint {
    margin-top: 7px;
    color: var(--muted-2);
    font-size: 12px;
}

.tone-cyan {
    background: linear-gradient(135deg, rgba(34, 211, 238, .14), rgba(34, 211, 238, .035));
}

.tone-violet {
    background: linear-gradient(135deg, rgba(139, 92, 246, .14), rgba(139, 92, 246, .035));
}

.tone-emerald {
    background: linear-gradient(135deg, rgba(52, 211, 153, .14), rgba(52, 211, 153, .035));
}

.tone-amber {
    background: linear-gradient(135deg, rgba(245, 158, 11, .16), rgba(245, 158, 11, .035));
}

.app-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted-2);
    font-size: 12px;
}

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

.auth-card {
    width: min(440px, 100%);
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.055);
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px);
}

.auth-title {
    margin: 0;
    font-size: 32px;
    font-weight: 950;
    letter-spacing: -0.055em;
}

.auth-subtitle {
    margin: 8px 0 24px;
    color: var(--muted);
    line-height: 1.5;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.form-control {
    width: 100%;
    min-height: 46px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.22);
    color: var(--text);
    outline: none;
    color-scheme: dark;
}

.form-control:focus {
    border-color: rgba(34, 211, 238, 0.45);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.10);
}

.form-control option,
.form-control optgroup {
    background: #171727;
    color: #eef2ff;
}

.alert {
    margin-bottom: 16px;
    padding: 13px 15px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.alert-error {
    border: 1px solid rgba(248, 113, 113, .22);
    background: rgba(248, 113, 113, .11);
    color: #fecaca;
}

.alert-success {
    border: 1px solid rgba(52, 211, 153, .22);
    background: rgba(52, 211, 153, .11);
    color: #bbf7d0;
}

.w-100 {
    width: 100%;
}

.mt-3 {
    margin-top: 12px;
}

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

@media (max-width: 1100px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        width: auto;
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .sidebar-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .main-area {
        padding: 14px;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar-user {
        width: 100%;
        justify-content: space-between;
    }

    .user-meta {
        text-align: left;
    }

    .sidebar-nav,
    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .app-footer {
        flex-direction: column;
    }
}

.page-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    margin-bottom: 18px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px);
}

.page-hero h1 {
    margin: 6px 0 8px;
    font-size: 34px;
    line-height: 1.05;
    letter-spacing: -0.055em;
}

.page-hero p {
    max-width: 780px;
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 28px;
    padding: 6px 11px;
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.08);
    color: #cffafe;
    font-size: 12px;
    font-weight: 800;
}

.filter-bar form {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.filter-control {
    width: auto;
    min-width: 145px;
    background: rgba(255, 255, 255, 0.06);
}

.heatmap-layout {
    grid-template-columns: minmax(0, 1.5fr) minmax(360px, 0.75fr);
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 18px;
}

.legend {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.legend-gradient {
    width: 72px;
    height: 9px;
    border-radius: 999px;
    background: linear-gradient(90deg, #5b21b6, #22d3ee, #fde047);
}

.legend-bid,
.legend-ask {
    width: 30px;
    height: 9px;
    border-radius: 999px;
}

.legend-bid {
    background: rgba(52, 211, 153, 0.7);
}

.legend-ask {
    background: rgba(248, 113, 113, 0.7);
}

.pro-heatmap {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 28px;
    background:
        linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
        radial-gradient(circle at 75% 36%, rgba(250,204,21,.14), transparent 32%),
        radial-gradient(circle at 28% 62%, rgba(34,211,238,.15), transparent 34%),
        #120720;
    background-size: 100% 8.333%, 8.333% 100%, auto, auto, auto;
    box-shadow: inset 0 0 60px rgba(0,0,0,.28);
}

.price-axis {
    position: absolute;
    top: 30px;
    bottom: 46px;
    left: 14px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: var(--muted);
    font-size: 11px;
}

.time-axis {
    position: absolute;
    right: 18px;
    bottom: 15px;
    left: 76px;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    color: var(--muted-2);
    font-size: 11px;
}

.time-axis.compact {
    left: 88px;
}

.heat-band {
    position: absolute;
    z-index: 2;
    border-radius: 5px;
}

.band-yellow {
    background: linear-gradient(90deg, rgba(124,58,237,.10), rgba(250,204,21,.82), rgba(45,212,191,.35));
    box-shadow: 0 0 28px rgba(250,204,21,.38);
}

.band-yellow.soft {
    opacity: .68;
}

.band-cyan {
    background: linear-gradient(90deg, rgba(34,211,238,.18), rgba(45,212,191,.58), rgba(250,204,21,.18));
    box-shadow: 0 0 20px rgba(45,212,191,.22);
}

.band-cyan.soft {
    opacity: .66;
}

.band-violet {
    background: linear-gradient(90deg, rgba(139,92,246,.32), rgba(34,211,238,.25));
}

.heat-glow {
    position: absolute;
    z-index: 1;
    border-radius: 999px;
    filter: blur(30px);
}

.glow-top {
    top: 22%;
    right: 4%;
    width: 230px;
    height: 180px;
    background: rgba(250,204,21,.25);
}

.glow-bottom {
    top: 50%;
    left: 12%;
    width: 310px;
    height: 160px;
    background: rgba(34,211,238,.20);
}

.cluster-label {
    position: absolute;
    z-index: 7;
    padding: 8px 11px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 13px;
    background: rgba(0,0,0,.45);
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(12px);
}

.label-top {
    top: 22%;
    right: 7%;
    color: #fef3c7;
    border-color: rgba(250,204,21,.28);
}

.label-bottom {
    top: 53%;
    left: 16%;
    color: #cffafe;
    border-color: rgba(34,211,238,.28);
}

.price-line {
    position: absolute;
    inset: 0;
    z-index: 6;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.side-stack {
    display: grid;
    gap: 18px;
    align-content: start;
}

.cluster-list,
.note-list,
.hint-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.cluster-item,
.hint-item {
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255,255,255,.04);
}

.cluster-item-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.pill-red {
    color: #fecaca;
    background: rgba(248,113,113,.14);
}

.pill-green {
    color: #bbf7d0;
    background: rgba(52,211,153,.14);
}

.pill-gray {
    color: #e2e8f0;
    background: rgba(148,163,184,.14);
}

.mini-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    color: var(--text);
    font-size: 12px;
}

.mini-grid span {
    display: block;
    margin-bottom: 3px;
    color: var(--muted-2);
    font-size: 11px;
}

.note-item {
    display: flex;
    gap: 10px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255,255,255,.04);
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.note-item span {
    width: 8px;
    height: 8px;
    margin-top: 7px;
    flex: 0 0 8px;
    border-radius: 999px;
    background: var(--cyan);
}

.midline {
    position: absolute;
    top: 0;
    bottom: 42px;
    left: 54%;
    width: 1px;
    background: rgba(255,255,255,.22);
    z-index: 4;
}

.order-band {
    position: absolute;
    z-index: 2;
    height: 18px;
    border-radius: 5px;
}

.ask-band {
    right: 0;
    background: linear-gradient(90deg, rgba(248,113,113,.03), rgba(248,113,113,.72));
    box-shadow: 0 0 20px rgba(248,113,113,.22);
}

.bid-band {
    left: 0;
    background: linear-gradient(90deg, rgba(52,211,153,.72), rgba(52,211,153,.03));
    box-shadow: 0 0 20px rgba(52,211,153,.22);
}

.order-label-bid {
    left: 10%;
    top: 72%;
    color: #bbf7d0;
    border-color: rgba(52,211,153,.28);
}

.order-label-ask {
    right: 7%;
    top: 10%;
    color: #fecaca;
    border-color: rgba(248,113,113,.28);
}

.order-label-thin {
    left: 43%;
    top: 42%;
    color: #e2e8f0;
}

.orderbook-summary {
    position: absolute;
    right: 18px;
    bottom: 46px;
    left: 76px;
    z-index: 8;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    font-size: 12px;
}

.orderbook-summary div {
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(0,0,0,.38);
    color: var(--text);
    text-align: center;
    backdrop-filter: blur(10px);
}

.table-wrap {
    margin-top: 16px;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 18px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th {
    padding: 13px;
    background: rgba(255,255,255,.045);
    color: var(--muted-2);
    text-align: left;
    font-size: 12px;
}

.data-table td {
    padding: 13px;
    border-top: 1px solid var(--border);
    color: var(--muted);
}

.data-table td strong {
    color: var(--text);
}

.hint-item strong {
    display: block;
    margin-bottom: 5px;
    color: var(--text);
}

.hint-item p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

@media (max-width: 1200px) {
    .heatmap-layout {
        grid-template-columns: 1fr;
    }

    .page-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .filter-bar form {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .page-hero h1 {
        font-size: 28px;
    }

    .section-head {
        flex-direction: column;
    }

    .pro-heatmap {
        min-height: 420px;
    }

    .orderbook-summary {
        grid-template-columns: 1fr;
    }
}

.onchain-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(340px, 0.75fr);
}

.flow-list,
.whale-list,
.score-list {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.flow-item,
.whale-item {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
}

.flow-head,
.whale-head,
.score-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.flow-head strong,
.whale-head strong,
.score-head strong {
    color: var(--text);
}

.flow-head span,
.whale-head span,
.score-head span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.flow-bars {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.flow-track,
.score-track {
    height: 13px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
}

.flow-fill,
.score-fill {
    height: 100%;
    border-radius: 999px;
}

.flow-green {
    background: rgba(52, 211, 153, 0.65);
}

.flow-red {
    background: rgba(248, 113, 113, 0.65);
}

.flow-cyan {
    background: rgba(34, 211, 238, 0.65);
}

.flow-bars span {
    display: block;
    margin-top: 6px;
    color: var(--muted-2);
    font-size: 11px;
}

.text-green {
    color: var(--emerald) !important;
}

.text-red {
    color: var(--red) !important;
}

.whale-route {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.whale-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}

.whale-meta > span:first-child {
    color: var(--muted-2);
    font-size: 12px;
    font-weight: 800;
}

.score-item {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.score-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.score-fill {
    background: linear-gradient(90deg, var(--violet), var(--cyan), var(--emerald));
}

.score-text {
    margin-top: 7px;
    color: var(--muted-2);
    font-size: 12px;
}

.summary-box {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: 20px;
    background: rgba(34, 211, 238, 0.08);
}

.summary-box strong {
    color: #cffafe;
}

.summary-box p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

code {
    padding: 3px 7px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #cffafe;
}

@media (max-width: 1300px) {
    .onchain-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .flow-bars {
        grid-template-columns: 1fr;
    }
}

.exchange-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.65fr);
}

.exchange-bottom-layout {
    grid-template-columns: minmax(360px, 0.8fr) minmax(0, 1.2fr);
}

.exchange-list,
.security-check-list,
.sync-list,
.allocation-list {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.exchange-item {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto minmax(280px, 0.9fr);
    gap: 18px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.04);
}

.exchange-item-main {
    display: flex;
    align-items: center;
    gap: 14px;
}

.exchange-logo {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    flex: 0 0 46px;
    border-radius: 17px;
    background: linear-gradient(135deg, var(--cyan), var(--violet));
    box-shadow: 0 14px 34px rgba(34, 211, 238, 0.14);
    color: white;
    font-weight: 950;
}

.exchange-item-main strong {
    display: block;
    color: var(--text);
    font-size: 16px;
}

.exchange-item-main span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.exchange-permissions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.exchange-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.exchange-metrics div {
    padding: 11px;
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.22);
}

.exchange-metrics span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted-2);
    font-size: 11px;
}

.exchange-metrics strong {
    color: var(--text);
    font-size: 13px;
}

.security-warning {
    grid-column: 1 / -1;
    padding: 12px 14px;
    border: 1px solid rgba(248, 113, 113, 0.24);
    border-radius: 16px;
    background: rgba(248, 113, 113, 0.10);
    color: #fecaca;
    font-size: 13px;
}

.security-check-item {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
}

.security-check-item.good {
    border-color: rgba(52, 211, 153, 0.18);
    background: rgba(52, 211, 153, 0.07);
}

.security-check-item.danger {
    border-color: rgba(248, 113, 113, 0.18);
    background: rgba(248, 113, 113, 0.07);
}

.security-check-item strong {
    display: block;
    color: var(--text);
    margin-bottom: 5px;
}

.security-check-item p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.sync-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.04);
}

.sync-list span {
    color: var(--muted);
    font-size: 13px;
}

.sync-list strong {
    color: var(--text);
    font-size: 13px;
}

.allocation-item {
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.allocation-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.allocation-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
}

.allocation-head strong {
    color: var(--text);
}

.allocation-head span {
    color: var(--muted);
    font-size: 13px;
}

.allocation-track {
    height: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
}

.allocation-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--cyan), var(--violet));
}

.allocation-percent {
    margin-top: 6px;
    color: var(--muted-2);
    font-size: 12px;
}

@media (max-width: 1300px) {
    .exchange-layout,
    .exchange-bottom-layout {
        grid-template-columns: 1fr;
    }

    .exchange-item {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 720px) {
    .exchange-metrics {
        grid-template-columns: 1fr;
    }
}

.api-create-layout {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.42fr);
}

.api-form {
    max-width: 760px;
}

.permission-box {
    display: grid;
    gap: 12px;
    margin: 20px 0;
}

.permission-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
}

.permission-row strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text);
}

.permission-row p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.permission-row input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: var(--cyan);
}

.permission-row.good {
    border-color: rgba(52, 211, 153, 0.18);
    background: rgba(52, 211, 153, 0.07);
}

.permission-row.warning {
    border-color: rgba(245, 158, 11, 0.18);
    background: rgba(245, 158, 11, 0.07);
}

.permission-row.danger {
    border-color: rgba(248, 113, 113, 0.18);
    background: rgba(248, 113, 113, 0.07);
}

@media (max-width: 1200px) {
    .api-create-layout {
        grid-template-columns: 1fr;
    }
}

.exchange-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.exchange-actions form {
    margin: 0;
}

.btn-danger {
    border-color: rgba(248, 113, 113, 0.28);
    background: rgba(248, 113, 113, 0.10);
    color: #fecaca;
}

.btn-danger:hover {
    background: rgba(248, 113, 113, 0.18);
}

.liq-canvas-card {
    min-width: 0;
}

.liq-heatmap-wrap {
    position: relative;
    width: 100%;
    min-height: 560px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 28px;
    background: #10071d;
    box-shadow:
        inset 0 0 80px rgba(0, 0, 0, 0.35),
        0 24px 80px rgba(0, 0, 0, 0.24);
}

#liquidationCanvas {
    display: block;
    width: 100%;
    height: 100%;
}

.liq-loading {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    background: rgba(7, 11, 20, 0.72);
    color: var(--muted);
    font-size: 14px;
    backdrop-filter: blur(8px);
}

@media (max-width: 720px) {
    .liq-heatmap-wrap {
        min-height: 420px;
    }
}
