:root {
    --ink: #11161c;
    --muted: #536879;
    --line: #d9e2e7;
    --paper: #ffffff;
    --wash: #f6f8f5;
    --green: #0d8b67;
    --green-dark: #086145;
    --gold: #d6a84f;
    --danger: #b74444;
    --warning: #ad7b25;
    --shadow: 0 18px 42px rgba(17, 22, 28, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: var(--wash);
    letter-spacing: 0;
}

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

img {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

.site-header,
.app-shell {
    background: var(--paper);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    padding: 14px clamp(18px, 4vw, 56px);
    border-bottom: 1px solid var(--line);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--ink);
    white-space: nowrap;
}

.brand span {
    font-size: 1.14rem;
}

.top-nav,
.header-actions,
.row-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-nav a {
    color: var(--muted);
    font-weight: 650;
    font-size: 0.95rem;
}

.top-nav a:hover {
    color: var(--green);
}

.primary-button,
.ghost-button,
.danger-button,
.small-button,
button.primary-button,
button.ghost-button {
    border: 0;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    font-weight: 760;
    cursor: pointer;
    white-space: nowrap;
}

.ui-icon {
    width: 18px;
    height: 18px;
    display: block;
    flex: 0 0 auto;
}

.icon-button {
    gap: 8px;
}

.theme-icon {
    display: none;
}

html[data-theme="dark"] .theme-icon-sun,
html[data-theme="light"] .theme-icon-moon {
    display: inline-flex;
}

.notification-button {
    position: relative;
}

.badge-count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 19px;
    height: 19px;
    display: inline-grid;
    place-items: center;
    padding: 0 5px;
    border-radius: 999px;
    color: white;
    background: var(--danger);
    font-size: 0.7rem;
    font-weight: 900;
    line-height: 1;
}

.primary-button,
button.primary-button {
    color: white;
    background: var(--green);
}

.primary-button:hover,
button.primary-button:hover {
    background: var(--green-dark);
}

.ghost-button,
button.ghost-button {
    color: var(--ink);
    background: #eef4f2;
}

.danger-button {
    color: white;
    background: var(--danger);
}

.small-button {
    min-height: 34px;
    padding: 0 12px;
    color: var(--ink);
    background: #eef4f2;
    font-size: 0.88rem;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
    align-items: center;
    gap: clamp(28px, 5vw, 70px);
    min-height: calc(100vh - 76px);
    padding: clamp(48px, 7vw, 92px) clamp(18px, 5vw, 72px) 36px;
    background: var(--paper);
}

.hero-copy {
    max-width: 670px;
}

.eyebrow {
    color: var(--green);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
    font-size: 0.78rem;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 18px;
    font-size: clamp(2.5rem, 6vw, 5.4rem);
    line-height: 0.98;
}

h2 {
    margin-bottom: 12px;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.04;
}

h3 {
    margin-bottom: 10px;
    font-size: 1.08rem;
}

p {
    color: var(--muted);
    line-height: 1.7;
}

.hero-copy p {
    max-width: 580px;
    font-size: 1.08rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 28px 0;
}

.hero-stats,
.stat-grid,
.metric-grid,
.quick-grid,
.package-grid,
.feature-grid,
.portfolio-grid,
.course-grid,
.wallet-grid,
.broker-grid,
.data-grid {
    display: grid;
    gap: 18px;
}

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

.hero-stat,
.metric-card,
.feature-card,
.package-card,
.portfolio-card,
.course-card,
.wallet-card,
.broker-card,
.table-card,
.form-card,
.chat-panel,
.auth-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(17, 22, 28, 0.05);
}

.hero-stat {
    padding: 18px;
}

.hero-stat strong,
.metric-card strong,
.price {
    display: block;
    font-size: 1.45rem;
}

.hero-image {
    position: relative;
    min-height: 470px;
}

.hero-image img,
.split-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.hero-image img {
    min-height: 470px;
}

.floating-ticket {
    position: absolute;
    right: clamp(14px, 4vw, 36px);
    bottom: 28px;
    max-width: 280px;
    padding: 18px;
    color: white;
    background: rgba(17, 22, 28, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.floating-ticket p {
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 0;
}

.section {
    padding: clamp(56px, 8vw, 96px) clamp(18px, 5vw, 72px);
}

.section.alt {
    background: var(--paper);
}

.page-hero {
    padding-top: clamp(72px, 9vw, 118px);
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.section-heading p {
    max-width: 590px;
}

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

.feature-grid,
.portfolio-grid,
.course-grid,
.wallet-grid,
.broker-grid,
.data-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.package-card,
.feature-card,
.portfolio-card,
.course-card,
.wallet-card,
.broker-card,
.form-card,
.table-card,
.auth-card,
.metric-card {
    padding: 22px;
}

.investment-plan-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(240px, 1fr));
    gap: 18px;
}

.investment-plan-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(44, 236, 154, 0.12), rgba(244, 184, 74, 0.16)),
        var(--paper);
    box-shadow: var(--shadow);
}

.plan-titlebar {
    padding: 14px 18px;
    color: #0b0b0d;
    background: #ecd91d;
    text-align: center;
    font-weight: 900;
}

.plan-body {
    display: grid;
    gap: 12px;
    padding: 22px 18px 18px;
}

.roi-badge {
    justify-self: center;
    padding: 10px 18px;
    border-radius: 8px;
    color: #050505;
    background: #ecd91d;
    font-size: 2.3rem;
    font-weight: 950;
    line-height: 1;
}

.plan-period {
    color: var(--ink);
    text-align: center;
    font-size: 1.05rem;
    font-weight: 850;
    margin-bottom: 4px;
}

.plan-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 8px;
    color: var(--ink);
    background: color-mix(in srgb, var(--panel-strong) 84%, transparent);
}

.plan-row span::before {
    content: "✓";
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    border-radius: 50%;
    color: #0a0a0a;
    background: #ecd91d;
    font-size: 0.74rem;
    font-weight: 950;
}

.plan-invest-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border: 0;
    border-radius: 8px;
    color: #0a0a0a;
    background: #ecd91d;
    font-weight: 900;
    cursor: pointer;
}

.investment-modal[hidden] {
    display: none;
}

.investment-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 22px;
}

.investment-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.64);
    backdrop-filter: blur(8px);
}

.investment-confirm {
    position: relative;
    z-index: 1;
    width: min(100%, 720px);
    max-height: calc(100vh - 44px);
    overflow-y: auto;
    padding: 26px;
    border: 1px solid color-mix(in srgb, var(--line) 70%, #85a8c9);
    border-radius: 12px;
    background: #101a2b;
    color: #ffffff;
    box-shadow: var(--shadow);
}

.modal-close {
    position: absolute;
    right: 16px;
    top: 16px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    font-size: 1.4rem;
    cursor: pointer;
}

.balance-strip {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin: 22px 0;
    padding: 18px;
    border-radius: 8px;
    background: #2d405f;
}

.balance-strip span,
.confirm-grid span,
.investment-summary span {
    color: #a8c4e8;
}

.balance-strip strong {
    font-size: 1.2rem;
}

.confirm-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #31415b;
}

.confirm-grid span,
.confirm-grid strong {
    display: block;
}

.investment-summary {
    display: grid;
    gap: 12px;
    margin: 18px 0;
    padding: 18px;
    border-radius: 8px;
    background: #1e2f4a;
}

.investment-summary div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

body.modal-open {
    overflow: hidden;
}

.related-market-card,
.investment-plan-card {
    transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.related-market-card:hover,
.investment-plan-card:hover {
    border-color: color-mix(in srgb, var(--purple) 55%, var(--line));
    transform: translateY(-2px);
}

.tag,
.status,
.risk-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--green-dark);
    background: #e3f2ed;
}

.status.pending {
    color: var(--warning);
    background: #fff1d6;
}

.status.rejected,
.status.inactive {
    color: var(--danger);
    background: #ffe2e2;
}

.status.approved,
.status.active,
.status.completed {
    color: var(--green-dark);
    background: #e3f2ed;
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
    align-items: center;
    gap: clamp(28px, 6vw, 76px);
}

.split-image {
    min-height: 420px;
}

.feature-list {
    display: grid;
    gap: 14px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

.feature-list li {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
}

.site-footer {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
    gap: 32px;
    padding: 42px clamp(18px, 5vw, 72px);
    color: #dce6e2;
    background: var(--ink);
}

.site-footer p,
.site-footer a {
    color: #b6c4ca;
}

.site-footer a:hover {
    color: #ffffff;
}

.site-footer h3,
.footer-brand {
    color: white;
}

.flash {
    position: fixed;
    top: 88px;
    right: 18px;
    z-index: 50;
    max-width: 420px;
    padding: 14px 16px;
    color: var(--green-dark);
    background: #e3f2ed;
    border: 1px solid #bfdfd3;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.flash.error {
    color: var(--danger);
    background: #ffe2e2;
    border-color: #f1bcbc;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: clamp(18px, 4vw, 46px);
    background: var(--wash);
}

.auth-card {
    width: min(100%, 440px);
}

.auth-card .brand {
    margin-bottom: 24px;
}

.auth-shell {
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
    gap: 18px;
    align-items: stretch;
}

.auth-shell-compact {
    width: min(980px, 100%);
}

.auth-shell-single {
    width: min(520px, 100%);
    grid-template-columns: 1fr;
}

.auth-shell .auth-card {
    width: 100%;
}

.auth-panel,
.auth-visual {
    min-height: 610px;
    padding: clamp(24px, 4vw, 42px);
}

.auth-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-shell-single .auth-panel {
    min-height: auto;
}

.auth-visual {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.auth-visual h2 {
    max-width: 640px;
    margin: 24px 0;
    font-size: clamp(2rem, 5vw, 4.4rem);
    line-height: 0.96;
}

.auth-topline,
.field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.auth-topline {
    margin-bottom: 34px;
}

.auth-topline .brand {
    margin-bottom: 0;
}

.auth-theme-button {
    min-width: 42px;
}

.auth-panel h1 {
    margin-bottom: 10px;
    font-size: clamp(2.2rem, 6vw, 4.2rem);
    line-height: 0.98;
}

.auth-panel > p {
    margin-top: 0;
    margin-bottom: 24px;
}

.field-label-row a,
.auth-switch a,
.auth-reset-link a {
    color: var(--green);
    font-weight: 780;
}

.auth-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.auth-actions .primary-button,
.auth-actions .ghost-button {
    width: 100%;
}

.auth-switch {
    margin: 22px 0 0;
    color: var(--muted);
}

.auth-market-board {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.auth-market-board article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 17px 18px;
    border-bottom: 1px solid var(--line);
}

.auth-market-board article:last-child {
    border-bottom: 0;
}

.auth-market-board span {
    color: var(--muted);
    font-weight: 780;
}

.auth-market-board strong {
    text-align: right;
}

.auth-reset-link {
    display: grid;
    gap: 8px;
    margin-bottom: 20px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-strong);
}

.auth-reset-link p {
    margin: 0;
}

.field {
    display: grid;
    gap: 7px;
    margin-bottom: 16px;
}

.field label {
    font-weight: 760;
    color: var(--ink);
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 13px;
    background: white;
    color: var(--ink);
}

.field textarea {
    min-height: 110px;
    resize: vertical;
}

.hint {
    color: var(--muted);
    font-size: 0.9rem;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 22px;
    border-right: 1px solid var(--line);
    background: var(--ink);
    color: white;
}

.sidebar .brand {
    color: white;
    margin-bottom: 30px;
}

.side-nav {
    display: grid;
    gap: 7px;
}

.side-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    color: #c8d5d9;
    font-weight: 720;
}

.side-nav a.active,
.side-nav a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.11);
}

.main-panel {
    min-width: 0;
    padding: 28px clamp(18px, 4vw, 46px) 46px;
}

.app-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 26px;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 4px;
    border-radius: 999px;
    text-decoration: none;
}

.user-chip:hover {
    background: var(--panel-strong);
}

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    color: white;
    background: var(--green);
    font-weight: 850;
}

.avatar-image {
    overflow: hidden;
    background: var(--panel-strong);
}

.avatar-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.compact-avatar {
    width: 38px;
    height: 38px;
    font-size: 0.82rem;
}

.mobile-avatar-link {
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    text-decoration: none;
}

.large-avatar {
    width: 92px;
    height: 92px;
    font-size: 1.7rem;
}

.metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 22px;
}

.quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 22px;
}

.chart-card {
    min-height: 310px;
}

.chart-card canvas {
    width: 100%;
    height: 220px;
}

.table-card {
    overflow-x: auto;
}

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

th,
td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

th {
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-grid .field.full,
.full {
    grid-column: 1 / -1;
}

.wallet-address {
    overflow-wrap: anywhere;
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 0.88rem;
}

.qr-frame {
    display: grid;
    place-items: center;
    width: 150px;
    height: 150px;
    padding: 8px;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
}

.qr-frame img {
    width: 100%;
    height: 100%;
}

.chat-panel {
    padding: 0;
    overflow: hidden;
}

.message-list {
    display: grid;
    gap: 12px;
    max-height: 460px;
    overflow-y: auto;
    padding: 22px;
    background: #f8faf9;
}

.message {
    max-width: 72%;
    padding: 12px 14px;
    border-radius: 8px;
    background: white;
    border: 1px solid var(--line);
}

.message.mine {
    justify-self: end;
    color: white;
    background: var(--green);
    border-color: var(--green);
}

.message small {
    display: block;
    margin-top: 7px;
    color: inherit;
    opacity: 0.75;
}

.chat-form {
    display: grid;
    gap: 12px;
    padding: 18px;
    border-top: 1px solid var(--line);
    background: white;
}

.empty-state {
    padding: 28px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: var(--paper);
}

@media (max-width: 1080px) {
    .hero,
    .split,
    .site-footer,
    .app-shell {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
    }

    .top-nav {
        display: none;
    }

    .public-header {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        align-items: center;
        gap: 10px;
    }

    .public-header .brand {
        justify-self: center;
    }

    .public-header .header-actions {
        display: none;
    }

    .public-menu-button,
    .public-mobile-actions {
        display: inline-grid;
    }

    .public-mobile-sidebar {
        width: 320px;
        max-width: 86vw;
        height: 100vh;
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 80;
        display: grid;
        align-content: start;
        gap: 24px;
        padding: 24px;
        color: #ffffff;
        background: #0d0a14;
        border-right: 1px solid var(--line);
        transform: translateX(-110%);
        transition: transform 180ms ease;
        box-shadow: 24px 0 70px rgba(0, 0, 0, 0.45);
    }

    body.sidebar-open .public-mobile-sidebar {
        transform: translateX(0);
    }

    .public-mobile-sidebar .brand,
    .public-mobile-sidebar .side-nav a {
        color: #ffffff;
    }

    .public-mobile-sidebar .side-nav {
        grid-template-columns: 1fr;
    }

    .package-grid,
    .feature-grid,
    .portfolio-grid,
    .course-grid,
    .wallet-grid,
    .broker-grid,
    .data-grid,
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sidebar {
        position: static;
        height: auto;
    }

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

@media (max-width: 720px) {
    .site-header,
    .section-heading,
    .app-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .header-actions,
    .hero-actions,
    .row-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .primary-button,
    .ghost-button,
    .danger-button {
        flex: 1 1 auto;
    }

    .hero-stats,
    .package-grid,
    .feature-grid,
    .portfolio-grid,
    .course-grid,
    .wallet-grid,
    .broker-grid,
    .data-grid,
    .metric-grid,
    .quick-grid,
    .form-grid,
    .side-nav {
        grid-template-columns: 1fr;
    }

    .hero-image,
    .hero-image img,
    .split-image {
        min-height: 300px;
    }

    .floating-ticket {
        position: static;
        margin-top: 12px;
        max-width: none;
    }

    .message {
        max-width: 90%;
    }
}

/* Advanced exchange theme */
:root {
    color-scheme: dark;
    --ink: #f7f4ff;
    --muted: #9b97ae;
    --line: #272134;
    --paper: #16121f;
    --wash: #09070f;
    --panel: #201b2b;
    --panel-strong: #272238;
    --input: #221d2e;
    --green: #2cec9a;
    --green-dark: #19bf7b;
    --gold: #f4b84a;
    --purple: #7137ff;
    --purple-soft: #8a5cff;
    --danger: #ff6d84;
    --warning: #f2b85e;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

html[data-theme="light"] {
    color-scheme: light;
    --ink: #11161c;
    --muted: #627184;
    --line: #d9e2e7;
    --paper: #ffffff;
    --wash: #f4f7fb;
    --panel: #ffffff;
    --panel-strong: #eef3f7;
    --input: #ffffff;
    --green: #0d8b67;
    --green-dark: #086145;
    --gold: #c88f25;
    --purple: #5d35d8;
    --purple-soft: #7657e8;
    --danger: #b74444;
    --warning: #ad7b25;
    --shadow: 0 18px 42px rgba(17, 22, 28, 0.12);
}

body {
    background:
        radial-gradient(circle at top left, rgba(113, 55, 255, 0.13), transparent 28rem),
        var(--wash);
}

html[data-theme="light"] body {
    background:
        radial-gradient(circle at top left, rgba(13, 139, 103, 0.12), transparent 28rem),
        var(--wash);
}

.site-header {
    background: color-mix(in srgb, var(--paper) 92%, transparent);
    backdrop-filter: blur(20px);
}

.site-footer,
.sidebar {
    background: #0d0a14;
    color: var(--ink);
}

.site-footer .brand,
.site-footer h3 {
    color: #ffffff;
}

html[data-theme="light"] .sidebar {
    background: #11161c;
    color: #ffffff;
}

html[data-theme="light"] .site-footer {
    background: #11161c;
}

.brand,
.top-nav a,
.field label,
th,
td,
.auth-card h1,
.metric-card strong,
.package-card strong,
.portfolio-card strong,
.course-card strong,
.broker-card strong {
    color: var(--ink);
}

.portfolio-market {
    display: grid;
    gap: 18px;
}

.portfolio-asset-table {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #101722;
}

.portfolio-asset-table table {
    min-width: 1320px;
    color: #ffffff;
}

.portfolio-asset-table th {
    color: #dbe7ff;
    background: #0d1521;
    text-transform: none;
    font-size: 0.82rem;
}

.portfolio-asset-table td {
    border-bottom-color: #263244;
    vertical-align: middle;
}

.portfolio-asset-table tbody tr {
    background: #111a28;
}

.portfolio-asset-table tbody tr:nth-child(odd) {
    background: #151d2b;
}

.portfolio-asset-table tbody tr:hover {
    background: #1b2638;
}

.portfolio-asset-table canvas {
    width: 116px;
    height: 38px;
}

.portfolio-asset-name {
    display: inline-grid;
    grid-template-columns: auto auto auto;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.portfolio-asset-name span:last-child {
    color: #9eadc4;
    font-weight: 700;
}

.rank-cell {
    color: #b9c8e3;
    font-weight: 850;
    text-align: center;
}

.sidebar .brand {
    color: #ffffff;
}

.sidebar .side-nav a {
    color: #c8d5d9;
}

.sidebar .side-nav a.active,
.sidebar .side-nav a:hover {
    color: #ffffff;
}

p,
.hint,
.top-nav a {
    color: var(--muted);
}

.hero-stat,
.metric-card,
.feature-card,
.package-card,
.portfolio-card,
.course-card,
.wallet-card,
.broker-card,
.table-card,
.form-card,
.chat-panel,
.auth-card,
.asset-strip article,
.suggestion-card,
.market-card,
.mover-card,
.trade-rail {
    background: var(--paper);
    border-color: var(--line);
    box-shadow: var(--shadow);
}

.primary-button,
button.primary-button {
    background: linear-gradient(135deg, var(--purple), var(--purple-soft));
}

.primary-button:hover,
button.primary-button:hover {
    background: linear-gradient(135deg, var(--purple-soft), var(--green-dark));
}

.ghost-button,
button.ghost-button,
.small-button {
    color: var(--ink);
    background: var(--panel-strong);
}

.danger-button {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 8px;
}

.icon-button {
    min-width: 42px;
    padding: 0 12px;
}

.auth-mode {
    width: 100%;
    margin: -8px 0 20px;
}

.field input,
.field select,
.field textarea,
.dashboard-search input,
.trade-input,
.repeat-row {
    color: var(--ink);
    background: var(--input);
    border-color: var(--line);
}

.field input::placeholder,
.dashboard-search input::placeholder {
    color: var(--muted);
}

.tag,
.status,
.risk-pill {
    color: var(--green);
    background: color-mix(in srgb, var(--green) 14%, transparent);
}

.status.pending {
    color: var(--warning);
    background: color-mix(in srgb, var(--warning) 18%, transparent);
}

.status.rejected,
.status.inactive,
.status.unverified {
    color: var(--danger);
    background: color-mix(in srgb, var(--danger) 16%, transparent);
}

.status.approved,
.status.active,
.status.completed,
.status.verified {
    color: var(--green);
    background: color-mix(in srgb, var(--green) 14%, transparent);
}

.market-hero {
    min-height: calc(100vh - 76px);
    align-items: center;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--paper) 86%, transparent), color-mix(in srgb, var(--wash) 94%, transparent)),
        var(--wash);
}

.market-hero h1 {
    max-width: 760px;
}

.trust-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.trust-strip span {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    color: var(--ink);
    background: var(--panel);
    border: 1px solid var(--line);
    font-weight: 760;
    font-size: 0.9rem;
}

.hero-terminal {
    min-height: 520px;
    padding: 24px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--panel) 92%, transparent), color-mix(in srgb, var(--paper) 95%, transparent)),
        var(--paper);
    box-shadow: var(--shadow);
}

.hero-terminal canvas {
    width: 100%;
    height: 260px;
    margin: 22px 0;
}

.terminal-top {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
}

.terminal-top strong {
    font-size: 1.8rem;
}

.terminal-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.terminal-grid article {
    padding: 18px;
    border-radius: 12px;
    background: var(--panel-strong);
    border: 1px solid var(--line);
}

.terminal-grid span,
.terminal-grid em {
    display: block;
    color: var(--muted);
    font-style: normal;
    font-weight: 760;
}

.terminal-grid strong {
    display: block;
    margin: 8px 0;
}

.asset-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(180px, 1fr));
    gap: 14px;
    padding: 18px clamp(18px, 5vw, 72px);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
}

.asset-strip article {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    min-width: 180px;
    padding: 14px;
    border-radius: 12px;
}

.asset-strip p {
    margin-bottom: 0;
    line-height: 1.3;
}

.asset-strip em,
.up,
.down {
    font-style: normal;
    font-weight: 860;
}

.up {
    color: var(--green);
}

.down {
    color: var(--danger);
}

.product-band {
    background: var(--paper);
}

.feature-spot {
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--green) 18%, var(--paper)), var(--paper));
}

.exchange-shell {
    background: var(--wash);
}

.exchange-shell .sidebar {
    width: 174px;
    padding: 16px 10px;
    background: var(--paper);
    border-right-color: var(--line);
}

.exchange-shell .brand {
    justify-content: center;
    margin-bottom: 24px;
}

.exchange-shell .brand span {
    display: none;
}

.exchange-shell .side-nav {
    gap: 8px;
}

.exchange-shell .side-nav a {
    color: var(--muted);
    padding: 11px 16px;
}

.exchange-shell .side-nav a.active,
.exchange-shell .side-nav a:hover {
    color: var(--ink);
    background: var(--panel-strong);
}

.main-panel {
    background: var(--wash);
}

.exchange-topbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.dashboard-search {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 12px;
    color: var(--muted);
    background: var(--paper);
    border: 1px solid var(--line);
}

.dashboard-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    padding: 0;
}

kbd {
    padding: 3px 7px;
    border-radius: 6px;
    color: var(--ink);
    background: var(--panel-strong);
    font-size: 0.72rem;
}

.top-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.mobile-app-header,
.bottom-nav,
.sidebar-close,
.sidebar-backdrop,
.public-menu-button,
.public-mobile-actions,
.public-mobile-sidebar {
    display: none;
}

.exchange-dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 386px;
    gap: 32px;
    align-items: start;
}

.exchange-main {
    display: grid;
    gap: 28px;
}

.kyc-banner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 18px;
    border-radius: 16px;
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(113, 55, 255, 0.34), rgba(44, 236, 154, 0.12)),
        #211637;
}

.kyc-banner p {
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.4;
}

.brand-orb {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: white;
    background: linear-gradient(135deg, var(--purple), var(--green));
    box-shadow: 0 12px 28px rgba(113, 55, 255, 0.3);
    font-weight: 900;
    font-size: 1.3rem;
}

.portfolio-value h1 {
    margin-bottom: 6px;
    font-size: clamp(2.6rem, 6vw, 5.5rem);
}

.portfolio-value p {
    margin-bottom: 0;
}

.section-kicker {
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 860;
    text-transform: uppercase;
}

.for-you-grid,
.watchlist-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.suggestion-card {
    padding: 18px;
    border-radius: 12px;
    border: 1px solid var(--line);
}

.suggestion-card p {
    margin-bottom: 0;
    line-height: 1.45;
}

.asset-row,
.mini-asset-row,
.asset-row-head {
    display: grid;
    align-items: center;
    gap: 12px;
}

.asset-row {
    grid-template-columns: auto 1fr 120px auto;
    padding: 16px;
    border-radius: 12px;
    background: var(--paper);
    border: 1px solid var(--line);
}

.asset-row p,
.mini-asset-row p,
.asset-row-head p {
    margin: 0;
    line-height: 1.25;
}

.asset-row canvas {
    width: 120px;
    height: 40px;
}

.asset-price {
    text-align: right;
}

.asset-price span {
    display: block;
    font-size: 0.82rem;
}

.coin-badge {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: linear-gradient(135deg, #ff9f1a, var(--purple));
    font-weight: 900;
    overflow: hidden;
}

.coin-badge.small {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
}

.coin-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.market-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.market-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
}

.market-card > p {
    margin-bottom: 22px;
    line-height: 1.35;
}

.market-list {
    display: grid;
    gap: 16px;
}

.mini-asset-row {
    grid-template-columns: auto minmax(0, 1fr) 94px auto;
}

.mini-asset-row canvas {
    width: 94px;
    height: 34px;
}

.compact-heading {
    margin-bottom: 18px;
}

.segmented-control,
.trade-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    background: var(--paper);
    border: 1px solid var(--line);
}

.segmented-control button,
.trade-tabs button {
    border: 0;
    min-height: 34px;
    padding: 0 13px;
    border-radius: 9px;
    color: var(--muted);
    background: transparent;
    font-weight: 820;
    cursor: pointer;
}

.segmented-control button.active,
.trade-tabs button.active {
    color: var(--ink);
    background: var(--panel-strong);
}

.mover-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(180px, 1fr));
    gap: 16px;
    overflow-x: auto;
}

.mover-card {
    min-width: 180px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.asset-row-head {
    grid-template-columns: auto 1fr;
}

.mover-card canvas {
    width: 100%;
    height: 92px;
    margin: 16px 0;
}

.trade-rail {
    position: sticky;
    top: 98px;
    display: grid;
    gap: 14px;
    padding: 16px;
    border-radius: 20px;
    border: 1px solid var(--line);
}

.trade-rail form {
    display: grid;
    gap: 14px;
}

.trade-mode-title {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 0 16px;
    border-radius: 12px;
    color: var(--ink);
    background: var(--panel-strong);
    font-weight: 860;
}

.trade-input {
    min-height: 184px;
    display: grid;
    gap: 22px;
    align-content: start;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.trade-input strong {
    font-size: 4rem;
    line-height: 1;
    color: var(--muted);
}

.coin-select {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 7px 12px 7px 7px;
    border-radius: 12px;
    background: var(--panel-strong);
    font-weight: 820;
}

.coin-select select {
    max-width: 190px;
    border: 0;
    color: var(--ink);
    background: transparent;
    font-weight: 850;
    outline: 0;
}

.trade-amount-input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
    font-size: clamp(3rem, 7vw, 4.5rem);
    font-weight: 850;
    line-height: 1;
}

.trade-amount-input::placeholder {
    color: var(--muted);
}

.convert-panel {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    gap: 10px;
}

.convert-arrow {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-bottom: 16px;
    border-radius: 50%;
    color: var(--muted);
    background: var(--panel-strong);
}

.repeat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 70px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--muted);
}

.switch input {
    position: absolute;
    opacity: 0;
}

.switch span {
    display: block;
    width: 36px;
    height: 20px;
    border-radius: 999px;
    background: var(--panel-strong);
    position: relative;
}

.switch span::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    background: var(--muted);
    transition: transform 160ms ease, background 160ms ease;
}

.switch input:checked + span::after {
    transform: translateX(16px);
    background: var(--green);
}

.trade-button {
    width: 100%;
    min-height: 48px;
}

.chart-card canvas {
    border-radius: 10px;
}

.message-list,
.chat-form,
.empty-state {
    background: var(--paper);
}

.message {
    color: var(--ink);
    background: var(--panel);
    border-color: var(--line);
}

.message.mine {
    color: #ffffff;
    background: linear-gradient(135deg, var(--purple), var(--green-dark));
}

.holdings-grid {
    display: grid;
    gap: 12px;
}

.holding-row {
    color: inherit;
    text-decoration: none;
    transition: border-color 160ms ease, transform 160ms ease;
}

.holding-row:hover {
    border-color: color-mix(in srgb, var(--purple) 55%, var(--line));
    transform: translateY(-1px);
}

.compact-empty {
    padding: 18px;
    text-align: left;
}

.asset-detail {
    display: grid;
    gap: 22px;
    min-height: 560px;
    margin-bottom: 22px;
}

.asset-detail-head {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
}

.asset-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.asset-title h2 {
    margin-bottom: 0;
}

.asset-title span {
    color: var(--muted);
}

.asset-detail-head > div > strong {
    display: block;
    color: var(--ink);
    font-size: clamp(2rem, 5vw, 3.2rem);
}

.large-market-chart {
    width: 100%;
    min-height: 360px;
}

.related-markets {
    margin-top: 16px;
}

.activity-head,
.orders-grid,
.kyc-layout,
.profile-layout {
    display: grid;
    gap: 18px;
}

.activity-head {
    grid-template-columns: 1fr auto;
    align-items: end;
}

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

.profile-card h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
}

.profile-avatar-preview {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 18px 0 24px;
    padding: 16px;
    border-radius: 14px;
    background: var(--panel-strong);
    border: 1px solid var(--line);
}

.security-card {
    grid-column: 2;
}

.wallet-link-shell {
    display: grid;
    gap: 22px;
}

.wallet-link-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.wallet-connect-board {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 22px;
    align-items: start;
}

.wallet-picker {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #f5f5f5;
    color: #0e1420;
}

.wallet-picker h3 {
    margin: 0;
    padding: 22px;
    text-align: center;
    color: #0e1420;
}

.wallet-option-list {
    display: grid;
    gap: 6px;
    max-height: 640px;
    overflow-y: auto;
    padding: 18px;
    background: #d8d8d8;
}

.wallet-option {
    width: 100%;
    min-height: 52px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    border: 1px solid #ababab;
    border-radius: 8px;
    padding: 8px 14px;
    color: #0e1420;
    background: #f5f5f5;
    cursor: pointer;
    text-align: left;
}

.wallet-option:hover {
    border-color: #3387d7;
    background: #ffffff;
}

.wallet-online {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #20a879;
}

.wallet-logo {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--purple), var(--green));
    font-size: 0.76rem;
    font-weight: 900;
    overflow: hidden;
}

.wallet-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #ffffff;
}

.linked-wallet-summary {
    position: sticky;
    top: 96px;
}

.linked-wallet-list {
    display: grid;
    gap: 12px;
}

.linked-wallet-list article,
.notification-item,
.wallet-choice-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
}

.wallet-link-modal[hidden] {
    display: none;
}

.wallet-link-modal {
    position: fixed;
    inset: 0;
    z-index: 125;
    display: grid;
    place-items: center;
    padding: 22px;
}

.wallet-link-card {
    position: relative;
    z-index: 1;
    width: min(100%, 620px);
    padding: 34px;
    border-radius: 12px;
    background: #ffffff;
    color: #11161c;
    box-shadow: var(--shadow);
}

.wallet-link-card .modal-close {
    color: #11161c;
    background: #eef2f7;
}

.wallet-link-card .field label,
.wallet-link-card h3,
.wallet-link-card p {
    color: #11161c;
}

.wallet-link-card .field input,
.wallet-link-card .field select,
.wallet-link-card .field textarea {
    color: #11161c;
    background: #ffffff;
    border-color: #d7dde7;
}

.link-back {
    border: 0;
    color: #1d6fd1;
    background: transparent;
    font-weight: 750;
    cursor: pointer;
}

.connect-alert {
    margin: 28px 0 18px;
    padding: 18px;
    border: 1px solid #ff3f4f;
    border-radius: 10px;
    color: #ff3f4f;
}

.wallet-import-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 22px;
}

.wallet-manual-form {
    display: grid;
    gap: 16px;
}

.wallet-manual-form[hidden],
.wallet-loading[hidden],
.deposit-step[hidden] {
    display: none;
}

.notification-list {
    display: grid;
    gap: 12px;
}

.notification-item {
    grid-template-columns: 1fr auto;
    align-items: start;
}

.notification-item.unread {
    border-color: color-mix(in srgb, var(--green) 55%, var(--line));
    background: color-mix(in srgb, var(--green) 8%, var(--panel));
}

.deposit-flow-card {
    width: min(100%, 680px);
    margin: 0 auto;
    padding: 24px;
    border: 1px solid color-mix(in srgb, var(--line) 72%, #49617f);
    border-radius: 8px;
    background: #101a2b;
    color: #ffffff;
}

.deposit-flow-card p,
.deposit-flow-card .hint {
    color: #9ec1e7;
}

.deposit-step {
    display: grid;
    gap: 18px;
}

.deposit-step h2 {
    margin-bottom: 0;
    font-size: 1.55rem;
}

.deposit-method-list {
    display: grid;
    gap: 16px;
}

.deposit-method {
    width: 100%;
    min-height: 82px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid #294365;
    border-radius: 8px;
    color: #ffffff;
    background: #1d2b42;
    cursor: pointer;
    text-align: left;
}

.deposit-method:hover,
.deposit-method.selected {
    border-color: var(--green);
}

.deposit-method.unavailable {
    opacity: 0.55;
}

.deposit-method.invalid {
    border-color: var(--danger);
}

.deposit-method em {
    display: block;
    color: #9ec1e7;
    font-style: normal;
}

.method-state {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border: 2px solid var(--green);
    border-radius: 50%;
    color: var(--green);
    font-size: 0.8rem;
    font-weight: 900;
}

.deposit-method.unavailable .method-state {
    border-color: var(--danger);
    color: var(--danger);
}

.deposit-final-panel {
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 18px;
    border-radius: 8px;
    background: #1d2b42;
}

.crypto-send-amount {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--green);
    font-size: clamp(1.8rem, 5vw, 2.4rem);
    font-weight: 900;
}

.crypto-send-amount em {
    color: #9ec1e7;
    font-style: normal;
    font-size: 1.1rem;
}

.deposit-qr {
    width: 138px;
    height: 138px;
    padding: 4px;
    border-radius: 8px;
    background: #ffffff;
}

.deposit-address-row {
    width: 100%;
    min-height: 38px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    background: #0d1627;
    overflow-wrap: anywhere;
    text-align: center;
}

.copy-icon-button {
    min-height: 30px;
    border: 0;
    border-radius: 6px;
    color: #ffffff;
    background: #2d405f;
    cursor: pointer;
    font-weight: 800;
}

.deposit-summary {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid #294365;
    border-radius: 8px;
}

.deposit-summary div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.deposit-summary span {
    color: #9ec1e7;
}

.deposit-summary div:last-child strong {
    color: var(--green);
    font-size: 1.15rem;
}

@media (max-width: 1240px) {
    .investment-plan-grid {
        grid-template-columns: repeat(2, minmax(240px, 1fr));
    }
}

.kyc-layout .form-card h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
}

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

    .trade-rail {
        position: static;
    }

    .market-columns {
        grid-template-columns: 1fr;
    }

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

    .orders-grid,
    .kyc-layout,
    .profile-layout,
    .wallet-connect-board {
        grid-template-columns: 1fr;
    }

    .security-card {
        grid-column: auto;
    }

    .linked-wallet-summary {
        position: static;
    }
}

@media (max-width: 900px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-panel,
    .auth-visual {
        min-height: auto;
    }

    .auth-visual h2 {
        font-size: clamp(2rem, 12vw, 3.3rem);
    }
}

@media (max-width: 560px) {
    .auth-actions {
        grid-template-columns: 1fr;
    }

    .auth-topline {
        align-items: flex-start;
    }
}

@media (max-width: 1080px) {
    .exchange-shell .sidebar,
    .admin-shell .sidebar {
        width: 280px;
        max-width: 86vw;
        height: 100vh;
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 80;
        padding: 22px;
        transform: translateX(-110%);
        transition: transform 180ms ease;
        box-shadow: 24px 0 70px rgba(0, 0, 0, 0.45);
    }

    .exchange-shell .brand,
    .admin-shell .brand {
        justify-content: flex-start;
    }

    .exchange-shell .brand span {
        display: inline;
    }

    body.sidebar-open .exchange-shell .sidebar,
    body.sidebar-open .admin-shell .sidebar {
        transform: translateX(0);
    }

    .exchange-shell .side-nav,
    .admin-shell .side-nav {
        grid-template-columns: 1fr;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 70;
        background: rgba(0, 0, 0, 0.48);
    }

    body.sidebar-open .sidebar-backdrop {
        display: block;
    }

    .sidebar-close {
        display: inline-grid;
        position: absolute;
        top: 16px;
        right: 16px;
    }

    .mobile-app-header {
        position: sticky;
        top: 0;
        z-index: 60;
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 58px;
        padding: 10px 14px;
        grid-column: 1 / -1;
        background: var(--wash);
        border-bottom: 1px solid var(--line);
    }

    .mobile-app-header .brand {
        color: var(--ink);
        margin: 0;
    }

    .mobile-header-actions {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .mobile-icon-button {
        width: 38px;
        height: 38px;
        display: inline-grid;
        place-items: center;
        border: 0;
        border-radius: 10px;
        color: var(--ink);
        background: var(--panel-strong);
        font-weight: 850;
        position: relative;
    }

    .mobile-icon-button .button-label {
        display: none;
    }

    .public-header {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        align-items: center;
        flex-direction: initial;
    }

    .public-menu-button,
    .public-mobile-actions {
        display: inline-grid;
    }

    .public-mobile-sidebar {
        display: grid;
    }

    .bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 65;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 4px;
        padding: 8px 8px max(8px, env(safe-area-inset-bottom));
        background: color-mix(in srgb, var(--paper) 96%, transparent);
        border-top: 1px solid var(--line);
        backdrop-filter: blur(18px);
    }

    .bottom-nav a {
        min-height: 42px;
        display: grid;
        place-items: center;
        border-radius: 10px;
        color: var(--muted);
        font-size: 0.82rem;
        font-weight: 850;
    }

    .bottom-nav a span {
        display: block;
        line-height: 1;
        font-size: 1rem;
    }

    .bottom-nav a.active {
        color: var(--ink);
        background: var(--panel-strong);
    }

    .exchange-topbar {
        display: none;
    }

    .top-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .hero-terminal {
        min-height: auto;
    }

    .asset-strip,
    .terminal-grid {
        grid-template-columns: repeat(3, minmax(180px, 1fr));
    }

    .app-shell {
        grid-template-columns: 1fr;
    }

    .main-panel {
        padding-top: 22px;
        padding-bottom: 84px;
    }
}

@media (max-width: 720px) {
    .kyc-banner,
    .asset-row,
    .mini-asset-row {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .for-you-grid,
    .watchlist-grid,
    .terminal-grid {
        grid-template-columns: 1fr;
    }

    .trade-rail {
        border-radius: 16px;
    }

    .trade-input {
        min-height: 220px;
    }

    .asset-row canvas,
    .mini-asset-row canvas {
        width: 100%;
    }

    .asset-price {
        text-align: left;
    }

    .mover-grid {
        grid-template-columns: 1fr;
    }

    .investment-plan-grid {
        grid-template-columns: 1fr;
    }

    .investment-confirm {
        padding: 22px 16px;
    }

    .confirm-grid,
    .balance-strip {
        grid-template-columns: 1fr;
    }

    .balance-strip,
    .investment-summary div {
        flex-direction: column;
    }

    .user-chip div {
        min-width: 0;
    }

    .activity-head,
    .asset-detail-head,
    .convert-panel,
    .wallet-link-head {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: flex-start;
    }

    .wallet-link-card {
        padding: 24px 16px;
    }

    .linked-wallet-list article,
    .wallet-choice-card,
    .notification-item,
    .deposit-method,
    .deposit-address-row {
        grid-template-columns: 1fr;
    }

    .deposit-flow-card {
        padding: 18px 14px;
    }

    .deposit-summary div {
        flex-direction: column;
    }

    .profile-avatar-preview {
        align-items: flex-start;
        flex-direction: column;
    }

    .convert-arrow {
        margin: 0;
    }
}
