:root {
  color-scheme: dark;
  --bg: #090d17;
  --panel: #111827;
  --panel-2: #151f30;
  --panel-3: #1a263a;
  --line: rgba(153, 177, 212, .13);
  --muted: #8492a9;
  --text: #edf3ff;
  --green: #20d6a0;
  --green-soft: rgba(32, 214, 160, .12);
  --red: #ff657d;
  --red-soft: rgba(255, 101, 125, .12);
  --blue: #5c9dff;
  --blue-soft: rgba(92, 157, 255, .13);
  --amber: #f3bb57;
  --radius: 18px;
  --shadow: 0 14px 40px rgba(0, 0, 0, .23);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: Tahoma, "Segoe UI", sans-serif; }
body { background-image: radial-gradient(ellipse at 8% 0%, rgba(34, 84, 151, .18), transparent 34%), radial-gradient(ellipse at 100% 18%, rgba(14, 135, 103, .10), transparent 28%); }
button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; }
.app-shell { width: min(100%, 520px); min-height: 100vh; margin: 0 auto; padding: 0 15px calc(100px + env(safe-area-inset-bottom)); position: relative; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 20; background: rgba(9, 13, 23, .86); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(153,177,212,.08); margin: 0 -15px 18px; padding: 0 16px; }
.brand-lockup, .top-actions, .profile-chip { display: flex; align-items: center; }
.brand-lockup { gap: 10px; }
.brand-mark { width: 39px; height: 39px; border-radius: 13px; background: linear-gradient(145deg, #29dda9, #147c9e); box-shadow: 0 6px 22px rgba(32,214,160,.18); display: grid; place-items: center; font-weight: 900; color: #061b20; font-size: 21px; transform: skew(-4deg); }
.brand-name { font-size: 14px; font-weight: 900; letter-spacing: 1.6px; }
.brand-dot { font-size: 8px; color: var(--green); vertical-align: middle; }
.brand-sub { color: var(--muted); font-size: 8px; letter-spacing: 1.2px; margin-top: 4px; direction: ltr; text-align: right; }
.top-actions { gap: 9px; }
.icon-button { width: 36px; height: 36px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); position: relative; font-size: 19px; }
.notification-dot { position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px rgba(255,101,125,.12); }
.profile-chip { gap: 7px; border: 1px solid var(--line); background: var(--panel); border-radius: 13px; padding: 4px 9px 4px 5px; color: #c9d5e8; font-size: 10px; }
.profile-avatar { width: 25px; height: 25px; border-radius: 9px; display: grid; place-items: center; background: linear-gradient(140deg, #405a7d, #26374f); color: white; font-weight: bold; }
.view { min-height: calc(100vh - 180px); animation: appear .2s ease-out; }
@keyframes appear { from { opacity: .5; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; margin: 8px 1px 16px; gap: 12px; }
.page-title { font-size: 21px; line-height: 1.4; margin: 0; font-weight: 800; }
.page-subtitle { color: var(--muted); font-size: 10px; margin-top: 5px; line-height: 1.8; }
.eyebrow { color: var(--green); font-size: 9px; letter-spacing: 1.2px; direction: ltr; text-align: right; margin-bottom: 5px; }
.env-pill, .status-pill, .demo-pill, .tag { border-radius: 99px; padding: 6px 9px; font-size: 9px; white-space: nowrap; border: 1px solid var(--line); background: rgba(255,255,255,.035); color: #bac8dc; }
.env-pill { color: var(--amber); border-color: rgba(243,187,87,.22); background: rgba(243,187,87,.08); }
.demo-banner { border: 1px solid rgba(243,187,87,.2); background: rgba(243,187,87,.075); color: #e7c77f; border-radius: 13px; padding: 10px 12px; font-size: 10px; line-height: 1.9; margin-bottom: 14px; display: flex; gap: 8px; align-items: flex-start; }
.demo-banner strong { color: #ffe1a1; }
.hero-card { background: linear-gradient(135deg, #14283a 0%, #122436 54%, #112b32 100%); border: 1px solid rgba(93, 179, 177, .16); border-radius: 23px; padding: 18px; box-shadow: var(--shadow); overflow: hidden; position: relative; }
.hero-card:after { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; left: -60px; top: -95px; border: 1px solid rgba(76, 220, 182, .12); box-shadow: 0 0 0 22px rgba(76,220,182,.025), 0 0 0 45px rgba(76,220,182,.02); }
.hero-top { display: flex; align-items: center; justify-content: space-between; color: #bbcadc; font-size: 10px; position: relative; z-index: 1; }
.hero-label { display: flex; align-items: center; gap: 7px; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(32,214,160,.13); }
.hero-balance { position: relative; z-index: 1; font-size: 30px; font-weight: 800; letter-spacing: -.6px; margin: 19px 0 4px; direction: ltr; text-align: right; }
.hero-unit { font-size: 10px; color: #a9bacd; }
.hero-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; position: relative; z-index: 1; }
.hero-foot small { display: block; font-size: 9px; color: #91a5bb; margin-bottom: 5px; }
.hero-foot strong { font-size: 13px; direction: ltr; display: inline-block; }
.positive { color: var(--green) !important; }
.negative { color: var(--red) !important; }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.stat-card, .panel, .action-card, .list-card { background: linear-gradient(145deg, rgba(20,29,45,.98), rgba(16,24,38,.98)); border: 1px solid var(--line); border-radius: var(--radius); }
.stat-card { padding: 13px; min-height: 88px; }
.stat-label { font-size: 9px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat-value { font-size: 17px; font-weight: 800; direction: ltr; text-align: right; margin-top: 12px; }
.stat-hint { color: var(--muted); font-size: 8px; margin-top: 5px; }
.section-row { display: flex; justify-content: space-between; align-items: center; margin: 21px 1px 11px; }
.section-title { font-size: 13px; font-weight: 800; margin: 0; }
.text-action { background: none; border: 0; color: var(--green); font-size: 10px; padding: 5px; }
.panel { padding: 14px; margin-bottom: 12px; }
.chart-head { display: flex; justify-content: space-between; align-items: center; font-size: 10px; color: #bac8dc; }
.chart-legend { display: flex; gap: 13px; color: var(--muted); font-size: 8px; }
.legend-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--green); margin-left: 4px; }
.chart { width: 100%; height: 105px; display: block; margin-top: 9px; }
.chart-grid { stroke: rgba(151,174,207,.1); stroke-width: 1; stroke-dasharray: 3 5; }
.quick-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.quick-action { min-height: 76px; background: var(--panel); border: 1px solid var(--line); border-radius: 15px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: 9px; color: #b9c8dc; }
.quick-icon { width: 31px; height: 31px; border-radius: 11px; background: var(--blue-soft); color: #83b4ff; display: grid; place-items: center; font-size: 17px; }
.quick-action:nth-child(2) .quick-icon { color: var(--green); background: var(--green-soft); }
.quick-action:nth-child(3) .quick-icon { color: var(--amber); background: rgba(243,187,87,.1); }
.quick-action:nth-child(4) .quick-icon { color: #c89bff; background: rgba(200,155,255,.11); }
.list-card { padding: 13px; display: flex; align-items: center; gap: 11px; margin-bottom: 9px; }
.coin-icon { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; color: #e9f2ff; background: #273950; font-size: 12px; font-weight: 900; }
.coin-icon.green { background: rgba(32,214,160,.13); color: var(--green); }
.coin-icon.red { background: rgba(255,101,125,.13); color: var(--red); }
.list-main { min-width: 0; flex: 1; }
.list-title { font-size: 11px; font-weight: 800; }
.list-sub { color: var(--muted); font-size: 9px; margin-top: 5px; }
.list-value { text-align: left; direction: ltr; font-size: 11px; font-weight: 700; }
.list-value small { display: block; font-size: 9px; margin-top: 5px; font-weight: 500; }
.action-card { padding: 14px; margin-bottom: 10px; display: flex; align-items: center; gap: 12px; text-align: right; width: 100%; }
.action-card .quick-icon { flex: 0 0 auto; }
.action-card .list-main { flex: 1; }
.action-card .chevron { color: #718199; font-size: 18px; }
.action-card:active, .quick-action:active, .primary-btn:active { transform: scale(.985); }
.button-row { display: flex; gap: 8px; margin-top: 12px; }
.primary-btn, .secondary-btn, .danger-btn { border: 0; border-radius: 13px; padding: 12px 14px; font-size: 10px; font-weight: 800; flex: 1; }
.primary-btn { background: linear-gradient(100deg, #20d6a0, #12b78c); color: #05231c; box-shadow: 0 7px 20px rgba(32,214,160,.14); }
.secondary-btn { background: var(--panel-3); color: #d6e2f4; border: 1px solid var(--line); }
.danger-btn { background: var(--red-soft); color: #ff91a2; border: 1px solid rgba(255,101,125,.18); }
.full { width: 100%; }
.bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, 520px); padding: 9px 13px calc(9px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5,1fr); z-index: 25; background: rgba(12,18,30,.94); backdrop-filter: blur(22px); border-top: 1px solid rgba(153,177,212,.13); }
.nav-item { border: 0; background: transparent; color: #718099; display: flex; align-items: center; flex-direction: column; gap: 3px; font-size: 8px; padding: 3px 0; }
.nav-icon { font-size: 19px; height: 22px; line-height: 22px; }
.nav-item.active { color: var(--green); }
.nav-item.active .nav-icon { filter: drop-shadow(0 0 8px rgba(32,214,160,.34)); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.switch-row:last-child { border-bottom: 0; }
.switch-label { font-size: 11px; font-weight: 700; }
.switch-help { font-size: 9px; color: var(--muted); margin-top: 4px; line-height: 1.6; }
.switch { width: 42px; height: 24px; border-radius: 20px; border: 1px solid var(--line); background: #263247; position: relative; flex: 0 0 auto; }
.switch:after { content: ""; position: absolute; top: 3px; right: 3px; width: 16px; height: 16px; border-radius: 50%; background: #8290a6; transition: .18s; }
.switch.on { background: rgba(32,214,160,.22); border-color: rgba(32,214,160,.3); }
.switch.on:after { right: 21px; background: var(--green); }
.metric-line { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 10px; }
.metric-line:last-child { border-bottom: 0; }
.metric-line span { color: var(--muted); }
.metric-line strong { direction: ltr; }
.tag.success { color: var(--green); background: var(--green-soft); border-color: rgba(32,214,160,.16); }
.tag.warning { color: var(--amber); background: rgba(243,187,87,.09); border-color: rgba(243,187,87,.16); }
.tag.danger { color: var(--red); background: var(--red-soft); border-color: rgba(255,101,125,.16); }
.segmented { display: flex; padding: 4px; gap: 4px; background: #0c1422; border: 1px solid var(--line); border-radius: 13px; margin: 12px 0; }
.segmented button { flex: 1; border: 0; border-radius: 9px; padding: 9px 5px; background: transparent; color: var(--muted); font-size: 9px; }
.segmented button.active { background: #24364e; color: #eaf3ff; }
.field { margin: 11px 0; }
.field label { display: block; font-size: 9px; color: #aab8cc; margin-bottom: 7px; }
.field input, .field select { width: 100%; border-radius: 12px; border: 1px solid var(--line); background: #0b1321; color: var(--text); outline: 0; padding: 12px; font-size: 11px; }
.field input:focus, .field select:focus { border-color: rgba(32,214,160,.55); }
.modal-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.65); display: flex; align-items: flex-end; justify-content: center; padding: 12px; }
.modal { width: min(100%, 500px); border: 1px solid var(--line); background: #121d2d; border-radius: 22px; padding: 18px; box-shadow: 0 20px 70px rgba(0,0,0,.55); max-height: 82vh; overflow: auto; animation: slideup .2s ease-out; }
@keyframes slideup { from { transform: translateY(22px); opacity: .5; } to { transform: translateY(0); opacity: 1; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.modal-head h3 { margin: 0; font-size: 14px; }
.close-modal { border: 0; border-radius: 10px; background: #233147; width: 30px; height: 30px; }
.toast { position: fixed; z-index: 70; bottom: calc(83px + env(safe-area-inset-bottom)); left: 50%; transform: translate(-50%, 15px); opacity: 0; pointer-events: none; background: #24364b; color: #e8f4ff; border: 1px solid rgba(255,255,255,.12); padding: 11px 15px; border-radius: 13px; font-size: 10px; box-shadow: var(--shadow); transition: .22s; width: max-content; max-width: calc(100% - 36px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.empty-state { padding: 28px 14px; text-align: center; color: var(--muted); font-size: 10px; line-height: 2; }
.empty-icon { display: block; font-size: 28px; margin-bottom: 8px; opacity: .8; }
.info-note { color: #9eacc1; font-size: 9px; line-height: 2; padding: 10px 12px; border-right: 2px solid #446a93; background: rgba(92,157,255,.06); border-radius: 9px; margin: 10px 0; }
.danger-note { border-right-color: var(--red); background: rgba(255,101,125,.06); }
@media (min-width: 700px) { .app-shell { border-left: 1px solid rgba(153,177,212,.06); border-right: 1px solid rgba(153,177,212,.06); } }
