:root {
    color-scheme: light;
    --background: #f4f5f7;
    --white: #fff;
    --ink: #202432;
    --muted: #626b7c;
    --line: #e8ebef;
    --lime: #d9f784;
    --night: #222837;
    --sidebar-width: 228px;
    --radius: 20px;
    font: 15px/1.45 Inter, "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--ink); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
h1, h2, p, ul { margin: 0; }
svg { width: 20px; height: 20px; flex: 0 0 auto; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #668416; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.sidebar { display: flex; flex-direction: column; min-height: 100vh; position: sticky; top: 0; align-self: start; padding: 35px 19px 23px; background: #fff; border-right: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; width: fit-content; margin-left: 8px; font-size: 23px; font-weight: 760; line-height: 1; letter-spacing: -.065em; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--lime); color: #242d17; }
.brand-mark svg { width: 22px; height: 22px; stroke-width: 1.9; }
.navigation { margin-top: 51px; display: grid; gap: 6px; }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 12px; min-height: 45px; border-radius: 10px; color: #525c6f; font-size: 13px; font-weight: 560; }
.nav-link svg { width: 17px; height: 17px; }
.nav-link:hover { background: #f4f6f4; color: var(--ink); }
.nav-link.active { background: #eff7dc; color: #263417; font-weight: 700; }

.workspace { min-width: 0; }
.topbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 35px; background: #fff; border-bottom: 1px solid var(--line); }
.topbar-path, .account { display: flex; align-items: center; gap: 11px; }
.topbar-path { font-size: 12px; font-weight: 650; }
.account { flex-shrink: 0; }
.account-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 650; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #edf2e2; color: #3d5024; }
.avatar svg { width: 16px; height: 16px; }
.icon-button { display: inline-grid; align-items: center; justify-items: center; border: 0; color: inherit; background: transparent; border-radius: 9px; width: 34px; height: 34px; padding: 0; }
.icon-button:hover { background: #eef0f3; }
.menu-toggle { display: none; }
.button { min-height: 42px; padding: 9px 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; font-size: 13px; font-weight: 690; white-space: nowrap; transition: background-color .18s ease, border-color .18s ease; }
.button svg { width: 16px; height: 16px; }
.button-primary { color: #253016; background: var(--lime); border-color: #d0ee79; }
.button-primary:hover { background: #cbec6a; }
.button-light { color: #303747; background: #fff; border-color: #e0e4ea; }
.button-light:hover { background: #edf0f3; border-color: #d4d9e1; }

.main { max-width: 1475px; margin: 0 auto; padding: 32px 35px 36px; }
.heading-row { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
h1 { margin-top: 10px; font-size: clamp(28px, 3.5vw, 41px); line-height: 1.1; font-weight: 740; letter-spacing: -.055em; }
.subtitle { margin-top: 8px; font-size: 13px; color: var(--muted); }
.heading-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(285px, 1fr); gap: 18px; }
.details-grid { margin-top: 18px; align-items: start; }
.panel { min-width: 0; background: #fff; border: 1px solid #e5e8ed; border-radius: var(--radius); box-shadow: 0 2px 4px #1f263503; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px 13px; }
.panel-heading h2 { font-size: 17px; line-height: 1.2; letter-spacing: -.035em; font-weight: 750; }
.panel-heading p { margin-top: 4px; color: var(--muted); font-size: 12px; }
.panel-icon { display: grid; place-items: center; width: 34px; height: 34px; color: #586177; background: #f2f4f7; border-radius: 9px; }
.panel-icon svg { width: 17px; height: 17px; }

.balance-card { min-width: 0; position: relative; isolation: isolate; display: flex; flex-direction: column; overflow: hidden; padding: 21px 25px 16px; border-radius: var(--radius); background: radial-gradient(ellipse at 92% 7%, #354435 0%, transparent 57%), linear-gradient(140deg, #292e40, #202635 70%); color: #f9fafb; }
.balance-top { display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.balance-label { display: flex; align-items: center; gap: 6px; color: #d5dbe9; font-size: 13px; }
.balance-toggle { width: 26px; height: 26px; }
.balance-toggle svg { width: 16px; height: 16px; }
.balance-toggle svg:last-child, .balance-toggle[aria-pressed="true"] svg:first-child { display: none; }
.balance-toggle[aria-pressed="true"] svg:last-child { display: block; }
.balance-toggle:hover { background: #ffffff19; }
.balance-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-top: 3px; font-size: clamp(29px, 3.45vw, 50px); line-height: 1.09; font-weight: 700; letter-spacing: -.065em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.currency { color: #c8cfdd; font-size: 12px; font-weight: 650; letter-spacing: .04em; }
.balance-converted { margin-top: 4px; color: #ced5e6; font-size: 12px; font-weight: 570; font-variant-numeric: tabular-nums; }
.balance-card :focus-visible { outline-color: var(--lime); }

.allocation-card { display: flex; flex-direction: column; }
.allocation-graphic { width: 138px; height: 138px; position: relative; margin: 4px auto 12px; }
.allocation-graphic canvas { width: 100%; height: 100%; }
.allocation-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.allocation-center strong { font-size: 29px; line-height: 1.1; letter-spacing: -.06em; }
.allocation-center span { color: var(--muted); font-size: 10px; margin-top: 3px; }
.allocation-legend { margin: auto 22px 19px; padding: 12px 0 0; border-top: 1px solid var(--line); list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.allocation-legend li { display: flex; align-items: center; gap: 6px; color: #4b5364; font-size: 11px; }
.allocation-legend strong { margin-left: auto; font-variant-numeric: tabular-nums; font-size: 11px; color: #303747; }
.legend-dot { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--asset-color); }
.asset-btc { --asset-color: #eea442; color: #6e3e02; }
.asset-eth { --asset-color: #8882e8; color: #453b9f; }
.asset-usdt { --asset-color: #35a587; color: #145943; }
.asset-sol { --asset-color: #65c5b7; color: #225d55; }

.asset-search { display: flex; align-items: center; gap: 7px; min-width: 0; width: 146px; padding: 6px 8px; border: 1px solid #e3e7ed; border-radius: 8px; color: #687285; }
.asset-search:focus-within { outline: 2px solid #668416; outline-offset: 2px; }
.asset-search svg { width: 15px; height: 15px; }
.asset-search input { padding: 0; width: 100%; min-width: 0; font-size: 12px; border: 0; background: transparent; color: var(--ink); outline: none; }
.asset-search input::placeholder { color: #687285; }
.table-scroll { overflow-x: auto; }
.wallet-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.wallet-table thead { background: #f8f9fa; color: #626b7c; }
.wallet-table th { font-size: 11px; font-weight: 650; text-align: left; }
.wallet-table th, .wallet-table td { padding: 9px 10px; border-bottom: 1px solid #edf0f3; }
.wallet-table :is(th, td):first-child { padding-left: 22px; }
.wallet-table :is(th, td):last-child { padding-right: 22px; }
.wallet-table .number { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.balance-cell { font-weight: 690; }
.value-cell { color: #596273; }
.asset-title { display: flex; align-items: center; gap: 9px; }
.asset-title strong, .asset-title small { display: block; }
.asset-title strong { font-size: 12px; }
.asset-title small { color: var(--muted); font-size: 11px; }
.asset-mark { display: grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; font-size: 18px; font-weight: 740; background: color-mix(in srgb, var(--asset-color) 24%, white); }
.row-actions { width: 37px; text-align: right; }
.asset-action { width: 29px; height: 29px; border: 1px solid #edf0f3; color: #545f72; }
.asset-action svg { width: 14px; height: 14px; }
.assets-empty td, .empty-state { padding: 20px 22px; color: var(--muted); }
.text-link { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; color: #485b25; font-size: 11px; font-weight: 750; }
.text-link svg { width: 14px; height: 14px; }
.activity-list { list-style: none; padding: 0 22px 11px; }
.activity-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.activity-list li:last-child { border-bottom: 0; }
.transaction-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; }
.transaction-icon svg { width: 16px; height: 16px; }
.txn-deposit { background: #eaf6e8; color: #36703d; }
.txn-transfer { background: #eeedf9; color: #5d55a1; }
.activity-description strong, .activity-description small { display: block; }
.activity-description strong, .activity-amount { font-size: 12px; font-weight: 700; }
.activity-description small { color: var(--muted); font-size: 11px; }
.activity-amount { text-align: right; font-variant-numeric: tabular-nums; }

.history-filters { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; padding: 18px 22px; }
.history-filters label, .stack-form label { display: grid; gap: 5px; font-size: 13px; font-weight: 680; }
.history-filters select { min-width: 130px; }
.history-table { min-width: 690px; }
.history-table td { color: #535d71; }
.history-table td:last-child { white-space: nowrap; }
.pagination { display: flex; justify-content: end; align-items: center; gap: 10px; padding: 15px 22px; font-size: 12px; color: var(--muted); }

.notice { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 16px; border-radius: 9px; font-size: 13px; font-weight: 660; }
.notice svg { width: 17px; height: 17px; }
.notice-success { background: #e9f3df; color: #365929; }
.notice-error { background: #fceae8; color: #922f2c; }

.auth-panel { border-radius: 0; padding: clamp(20px, 3vw, 39px); }
.stack-form { display: grid; gap: 12px; }
.stack-form input:not([type="hidden"]), select { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid #dce1e8; border-radius: 8px; background: #fff; color: var(--ink); font-weight: 500; }
.stack-form small { color: var(--muted); font-size: 11px; }
.stack-form .button-primary { margin-top: 3px; justify-content: space-between; }
.auth-switch { margin-top: 16px; font-size: 12px; color: var(--muted); }
.auth-switch a { color: #516529; font-weight: 740; text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 1050px) {
    :root { --sidebar-width: 186px; }
    .sidebar { padding-left: 12px; padding-right: 12px; }
    .main, .topbar { padding-left: 22px; padding-right: 22px; }
    .dashboard-grid { gap: 12px; grid-template-columns: minmax(0, 1.5fr) minmax(245px, 1fr); }
    .details-grid { margin-top: 12px; }
    .panel-heading, .wallet-table :is(th, td):first-child { padding-left: 15px; }
    .panel-heading, .wallet-table :is(th, td):last-child { padding-right: 15px; }
    .activity-list { padding-left: 15px; padding-right: 15px; }
    .balance-card { padding-left: 19px; padding-right: 19px; }
}

@media (max-width: 825px) {
    .shell { display: block; }
    .sidebar { display: none; position: fixed; inset: 56px auto 0 0; width: 225px; min-height: 0; z-index: 5; padding: 21px 15px; box-shadow: 12px 10px 30px #222c431e; }
    .sidebar.is-open { display: flex; }
    .navigation { margin-top: 24px; }
    .menu-toggle { display: inline-grid; }
    .topbar { min-height: 56px; padding-top: 8px; padding-bottom: 8px; }
    .topbar-path { gap: 7px; }
    .main { padding-top: 23px; }
}

@media (max-width: 640px) {
    .main, .topbar { padding-left: 14px; padding-right: 14px; }
    .heading-row { flex-wrap: wrap; margin-bottom: 15px; }
    .heading-actions { gap: 6px; }
    .heading-actions .button { padding: 8px 10px; min-height: 38px; font-size: 12px; }
    .heading-actions .button svg { width: 14px; height: 14px; }
    .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
    .balance-total { font-size: clamp(28px, 9vw, 43px); }
    .balance-card { padding: 16px 15px 11px; }
    .balance-top { flex-wrap: wrap-reverse; }
    .allocation-graphic { width: 123px; height: 123px; }
    .allocation-legend { margin-right: 15px; margin-left: 15px; }
    .asset-search { width: 118px; }
    .asset-table th, .asset-table td { padding-left: 5px; padding-right: 5px; }
    .row-actions { width: 26px; }
    .asset-mark, .activity-list .transaction-icon { width: 28px; height: 28px; }
    .asset-title { gap: 6px; }
}

@media (max-width: 360px) {
    .asset-table td, .asset-table th { font-size: 11px; }
    .account-name { max-width: 90px; }
    .asset-search { width: 105px; }
}

.balance-private .balance-converted { visibility: hidden; }

@media (prefers-reduced-motion: reduce) {
    .button { transition: none; }
}

.guest-header { min-height: 72px; padding: 12px clamp(16px, 5vw, 60px); display: flex; gap: 10px; align-items: center; justify-content: space-between; background: #fff; border-bottom: 1px solid var(--line); }
.guest-header .brand { margin-left: 0; }
.guest-header nav { display: flex; gap: 8px; }
.guest-main { margin: 0 auto; width: min(1180px, 100%); padding: clamp(18px, 5vw, 56px); }
.home-hero { min-height: 470px; position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; overflow: hidden; padding: clamp(24px, 6vw, 72px); border-radius: 27px; color: #fff; background: radial-gradient(ellipse at 82% 28%, #3c4a34, transparent 60%), #222837; }
.home-content { position: relative; z-index: 1; }
.home-content h1 { margin-top: 0; font-size: clamp(38px, 6.6vw, 79px); line-height: .99; }
.home-content p { max-width: 365px; margin: 20px 0 24px; color: #d9dfec; font-size: 16px; }
.home-login { color: #f8faff; border-color: #aab5c86a; margin-left: 4px; }
.home-login:hover { background: #ffffff15; }
.home-art { min-height: 280px; position: relative; display: grid; place-items: center; }
.home-art::before, .home-art::after { content: ""; width: min(100%, 290px); aspect-ratio: 1; border: 1px solid #d3f47542; border-radius: 50%; position: absolute; }
.home-art::after { width: min(74%, 222px); box-shadow: 0 0 0 28px #d3f47506, 0 0 70px #d3f47515; }
.home-emblem { aspect-ratio: 1; width: min(54%, 160px); z-index: 1; border-radius: 31%; display: grid; place-items: center; color: #283818; background: linear-gradient(135deg, #efffb8, #b8dc57); transform: rotate(-12deg); box-shadow: 11px 13px 0 #7f9d43, 20px 26px 35px #0d131b70; }
.home-emblem svg { width: 53%; height: 53%; }
.auth-single { max-width: 470px; margin: 0 auto; border-radius: 20px; padding: clamp(23px, 4vw, 39px); }
.auth-single h1 { margin-top: 0; }
.auth-single > p { margin: 9px 0 18px; color: var(--muted); font-size: 14px; }
.auth-single > p:last-child { margin: 15px 0 0; }
.secret-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; margin-bottom: 15px; background: #f1f4ec; border-radius: 9px; }
.secret-box code { overflow-wrap: anywhere; font-size: 14px; }
.recovery-codes { list-style: none; padding: 0; margin: 12px 0 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 6px; }
.recovery-codes code { display: inline-block; padding: 6px 8px; background: #f1f4ec; border-radius: 7px; }

.balance-card { min-height: 195px; justify-content: space-between; }
.balance-rate-note { margin-top: 16px; color: #ccd3df; font-size: 12px; }
.allocation-empty { display: grid; justify-items: center; gap: 2px; padding: 10px 12px 20px; color: var(--muted); font-size: 12px; }
.allocation-empty strong { display: grid; place-items: center; width: 65px; height: 65px; border: 5px solid #eef0f3; border-radius: 50%; color: var(--ink); font-size: 24px; }
.asset-usdc { --asset-color: #66a2f1; color: #1d55a0; }
.asset-bnb { --asset-color: #e5b346; color: #684a05; }
.asset-avax { --asset-color: #f06d72; color: #902321; }
.asset-link { --asset-color: #5e78e9; color: #293d97; }
.txn-withdrawal { background: #fbefe8; color: #9a4f31; }

.settings-panel { padding: 21px 23px; }
.settings-panel h2 { font-size: 18px; margin-bottom: 10px; }
.settings-panel p { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.settings-panel .stack-form { max-width: 520px; }
.movement-panel { max-width: 660px; }
.movement-selector { padding: 0 0 15px; }
.details-list { display: grid; margin: 0 0 16px; max-width: 100%; }
.details-list > div { display: grid; grid-template-columns: minmax(95px, .35fr) minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.details-list dt { color: var(--muted); font-size: 13px; }
.details-list dd { min-width: 0; margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.details-list .button { margin: 4px 0 0 4px; padding: 5px 8px; min-height: 30px; }
.wrap-code { overflow-wrap: anywhere; word-break: break-word; }
.state-badge { display: inline-block; padding: 3px 7px; border-radius: 8px; background: #eef0f3; color: #3d4658; font-size: 11px; font-weight: 650; white-space: nowrap; }
.state-pending { background: #fff2d8; color: #6d4b14; }
.state-approved { background: #eaeafa; color: #514594; }
.state-completed { background: #e8f4e3; color: #346333; }
.state-rejected { background: #faeae8; color: #87322d; }
.tx-reference { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }

.admin-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.admin-stack, .admin-forms, .admin-settings-grid { display: grid; gap: 13px; }
.admin-stack { margin-top: 14px; }
.admin-forms { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.admin-settings-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.short-form { max-width: 410px; }
.admin-network { color: var(--muted); font-size: 12px; font-weight: 570; }
.review-action { max-width: 590px; margin-top: 9px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; }
.review-action summary, .member-card summary { cursor: pointer; font-weight: 720; overflow-wrap: anywhere; }
.review-action .stack-form, .member-card > p { margin-top: 12px; }
.stack-form .check-label { display: flex; align-items: flex-start; gap: 7px; font-size: 13px; }
.stack-form .check-label input { width: auto; margin: .22em 0 0; padding: 0; accent-color: #668416; }
.input { min-width: 0; padding: 9px 10px; border: 1px solid #dce1e8; border-radius: 8px; }
.audit-detail { min-width: 200px; overflow-wrap: anywhere; }

@media (max-width: 640px) {
    .guest-header .brand { font-size: 20px; }
    .guest-header .brand-mark { width: 30px; height: 30px; border-radius: 8px; }
    .guest-header nav .button { min-height: 37px; padding: 7px 9px; font-size: 12px; }
    .home-hero { grid-template-columns: 1fr; min-height: 0; }
    .home-art { min-height: 200px; margin-top: 17px; }
    .home-art::before { width: 182px; }
    .home-art::after { width: 138px; }
    .home-emblem { width: 98px; }
    .asset-table th, .asset-table td { font-size: 11px; }
    .settings-panel { padding: 16px 13px; }
}

.chart-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 17px; }
.chart-heading h2 { font-size: 11px; color: #ced5e6; font-weight: 650; }
.chart-periods { display: flex; gap: 2px; background: #171c2a55; border-radius: 7px; padding: 3px; }
.chart-periods button { background: transparent; color: #cbd2e1; border: 0; padding: 3px 8px; border-radius: 5px; font-size: 10px; font-weight: 680; }
.chart-periods button[aria-pressed="true"] { background: #ffffff1e; color: var(--lime); }
.chart-area { position: relative; height: 111px; margin-top: 4px; }
#balance-chart { display: block; width: 100%; height: 100%; }
.chart-tooltip { position: absolute; pointer-events: none; top: 4px; padding: 5px 8px; border-radius: 6px; color: #222936; background: #f7f9f0; white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 11px; }
.chart-dates { display: flex; justify-content: space-between; align-items: center; min-height: 22px; color: #bdc6d7; font-size: 10px; padding-top: 4px; }
.balance-private .chart-area, .balance-private .chart-dates { visibility: hidden; }

.admin-metric {
    margin: .25rem 0 .75rem;
    font-size: 2rem;
    line-height: 1;
    font-weight: 750;
}

.ticket-message {
    padding: .8rem 0;
    border-bottom: 1px solid var(--border, #dfe3eb);
}
.ticket-message p { overflow-wrap: anywhere; margin-bottom: 0; }
.ticket-message small { margin-inline-start: .5rem; }
.stack-form textarea {
    width: 100%;
    resize: vertical;
    border: 1px solid var(--border, #dfe3eb);
    border-radius: .5rem;
    padding: .75rem;
    font: inherit;
    color: inherit;
    background: #fff;
}
