
:root {
  --ink: #112e24;
  --muted: #52685c;
  --green: #006b48;
  --lime: #c5f250;
  --line: #d3e1d7;
  --bg: #f2f7f0;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: 'DM Sans', sans-serif; font-size: 16px; line-height: 1.5; }
button, input, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid #009863; outline-offset: 4px; }
a { color: inherit; text-decoration: none; }
.sidebar { width: 252px; position: fixed; inset: 0 auto 0 0; background: #fff; border-right: 1px solid var(--line); padding: 34px 20px; display: flex; flex-direction: column; }
.brand { font-size: 40px; font-weight: 800; letter-spacing: -2px; display: flex; align-items: center; gap: 9px; }
.mark { font-style: italic; display: grid; place-items: center; width: 43px; height: 43px; background: var(--green); color: var(--lime); border-radius: 13px; font-size: 36px; letter-spacing: -5px; padding-right: 6px; line-height: 1; }
.brand-dot { color: #4c8518; margin-left: -9px; }
.workspace { font-size: 12px; font-weight: 650; letter-spacing: .7px; color: var(--muted); margin: 44px 10px 18px; }
nav { display: grid; gap: 8px; }
nav a, nav button { display: flex; gap: 12px; align-items: center; border: 0; background: none; text-align: left; padding: 14px 12px; border-radius: 8px; color: #3e594b; font-size: 16px; font-weight: 550; }
nav span { font-size: 22px; }
nav .active { background: var(--green); color: white; font-weight: 650; }
nav a:hover, nav button:hover { background: #e1f0d8; color: #075334; }
nav .active:hover { background: #005638; color: white; }
.side-bottom { margin-top: auto; }
.network { font-size: 14px; padding: 18px 7px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
i { display: inline-block; width: 7px; height: 7px; border-radius: 100%; background: #008956; }
.network span { margin-left: auto; }
.profile { display: flex; align-items: center; gap: 10px; padding-top: 23px; font-size: 15px; font-weight: 600; }
.avatar { display: grid; place-items: center; background: #d9edcb; color: #1b542f; border: 3px solid white; outline: 1px solid #b8d3a8; border-radius: 50%; height: 42px; width: 42px; font-size: 14px; font-weight: 700; flex-shrink: 0; }
.profile small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; font-weight: 400; }
.profile > span { margin-left: auto; }
.small { height: 36px; width: 36px; font-size: 12px; }
main { max-width: 1660px; margin-left: 252px; padding: 0 40px; }
header { min-height: 91px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.breadcrumb { font-size: 14px; color: #486352; }
.breadcrumb span { margin: 0 15px; color: #708574; }
.header-right { display: flex; align-items: center; gap: 18px; }
.demo-tag { font-size: 12px; font-weight: 700; letter-spacing: .7px; color: #23582f; background: #e1efcc; border: 1px solid #a8c77c; border-radius: 5px; padding: 5px 9px; white-space: nowrap; }
.icon-button { border: 0; background: none; color: #285f42; font-size: 25px; min-width: 40px; min-height: 40px; }
.heading { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; margin: 35px 0 29px; }
.eyebrow { font-size: 12px; font-weight: 650; letter-spacing: 1.2px; color: #387146; }
h1 { font-family: Manrope, sans-serif; font-size: clamp(30px, 2.8vw, 40px); font-weight: 750; letter-spacing: -1.3px; line-height: 1.25; margin: 12px 0; }
h1 span { color: #438a13; }
p { color: var(--muted); font-size: 16px; margin: 8px 0; }
.secondary { padding: 12px 16px; border: 1px solid #80ab8a; background: white; color: #175b37; border-radius: 7px; font-size: 14px; font-weight: 600; }
.secondary:hover { background: #e6f2de; }
.summary-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: 22px; }
.balance-card { background: #064c35; border-radius: 13px; color: #fff; padding: 28px; position: relative; overflow: hidden; }
.balance-card:after { content: ''; position: absolute; width: 300px; height: 300px; border: 45px solid #c5f2500d; border-radius: 50%; right: -65px; top: -80px; pointer-events: none; }
.card-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; align-items: center; font-size: 16px; font-weight: 600; }
.pill { font-size: 12px; font-weight: 600; letter-spacing: .9px; padding: 6px 9px; border: 1px solid #a8d58e; border-radius: 4px; color: #e3f7c9; }
.balance { font-family: Manrope, sans-serif; font-size: clamp(40px, 4vw, 56px); font-weight: 650; letter-spacing: -1.4px; margin: 20px 0 8px; display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 12px; line-height: 1.3; overflow-wrap: anywhere; }
.balance > span { min-width: 0; max-width: 100%; }
.balance small { font-size: 24px; letter-spacing: 0; color: #def3c3; font-weight: 500; }
.balance-sub { font-size: 14px; color: #d0e6d7; display: flex; flex-wrap: wrap; gap: 6px 17px; }
.balance-sub > span { color: var(--lime); font-weight: 600; }
.balance-footer { border-top: 1px solid #ffffff38; margin-top: 26px; padding-top: 23px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 18px; }
.balance-footer > div:first-child { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.balance-footer small { display: block; font-size: 12px; color: #cee4d3; margin-top: 4px; }
.mini-mark { border: 1px solid #badb83; border-radius: 50%; width: 36px; height: 36px; display: grid; place-items: center; font-style: italic; font-size: 28px; color: var(--lime); line-height: 1; flex-shrink: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; z-index: 1; }
.actions button { padding: 11px 20px; border: 1px solid var(--lime); border-radius: 7px; background: var(--lime); color: #16351c; font-size: 16px; font-weight: 650; min-height: 46px; }
.actions button:hover { background: #ddff8d; }
.actions button + button { background: #ffffff0a; color: white; border-color: #a5d0b3; }
.actions button + button:hover { background: #ffffff20; }
.insight-card { background: white; border: 1px solid var(--line); border-radius: 13px; padding: 28px; }
.flow { display: flex; gap: 13px; align-items: center; margin-top: 23px; font-size: 14px; color: var(--muted); }
.flow-icon { display: grid; place-items: center; background: #d9f1dc; color: #087443; border-radius: 50%; width: 40px; height: 40px; font-size: 22px; flex-shrink: 0; }
.out { background: #ffebd4; color: #a44514; }
.flow strong { display: block; font-size: 25px; font-weight: 650; color: #123b29; margin-top: 4px; }
.flow small { font-size: 13px; color: var(--muted); }
.insight-note { border-top: 1px solid var(--line); margin-top: 23px; padding-top: 16px; font-size: 13px; color: #43604a; }
.insight-note i { margin-right: 5px; }
.chart-card, .activity-card { background: white; border: 1px solid var(--line); border-radius: 12px; margin-top: 23px; padding: 25px 26px; }
.section-top { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: center; }
h2 { font-size: 21px; font-weight: 700; margin: 0; }
.section-top p { font-size: 14px; }
.ranges { display: flex; gap: 4px; background: #edf3e7; padding: 4px; border-radius: 7px; }
.ranges button { border: 0; background: none; min-height: 40px; padding: 7px 14px; font-size: 14px; font-weight: 600; color: #47643f; border-radius: 5px; }
.ranges button:hover { background: #d9eacb; }
.ranges .selected { background: var(--green); color: white; box-shadow: 0 2px 5px #063d2424; }
.chart-area { display: flex; height: 200px; margin-top: 27px; gap: 20px; }
.axis { display: flex; flex-direction: column; justify-content: space-between; padding: 12px 0 23px; font-size: 12px; color: var(--muted); flex-shrink: 0; }
.chart-area svg { width: 100%; min-width: 0; overflow: visible; }
.grid { stroke: #d4e0d2; stroke-dasharray: 4 5; fill: none; }
#line { stroke: #008653; stroke-width: 4; }
#fill stop { stop-color: #67c94b; }
#fill stop:first-child { stop-opacity: .48; }
.dates { display: flex; justify-content: space-between; gap: 8px; padding-left: 64px; margin-top: 9px; font-size: 12px; color: var(--muted); }
.chart-caption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); margin-top: 20px; }
.chart-caption i { margin-right: 6px; }
.filter { font-size: 14px; color: var(--muted); }
.filter select { margin-left: 7px; padding: 10px 12px; border: 1px solid #a7bf9e; border-radius: 6px; background: white; color: #234f32; font-size: 14px; font-weight: 500; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; margin-top: 19px; text-align: left; white-space: nowrap; }
th { font-size: 13px; color: #446044; font-weight: 600; padding: 14px 12px 14px 0; border-bottom: 1px solid var(--line); }
td { padding: 18px 12px 18px 0; border-bottom: 1px solid #e3ecdf; font-size: 14px; color: #52654b; }
td:first-child { display: flex; align-items: center; gap: 12px; color: #1b3a28; font-size: 15px; font-weight: 550; }
td small { display: block; font-size: 12px; color: #5b6d50; margin-top: 4px; font-weight: 400; }
td .flow-icon { width: 36px; height: 36px; font-size: 20px; }
.status { background: #dcf2d9; color: #266325; font-size: 12px; font-weight: 600; padding: 5px 9px; border-radius: 5px; }
.amount { text-align: right; }
.positive { color: #087443; }
td.amount { font-weight: 650; font-size: 15px; }
td:last-child { padding-left: 12px; padding-right: 0; text-align: right; color: #2d7146; }
.table-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); margin-top: 18px; }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; padding: 28px 0; color: var(--muted); font-size: 12px; }
.footer-brand { color: #336640; font-weight: 550; }
dialog { border: 1px solid var(--line); border-radius: 16px; width: min(480px, 90vw); padding: 28px; color: var(--ink); box-shadow: 0 20px 100px #102a2633; }
dialog::backdrop { background: #10352b80; backdrop-filter: blur(4px); }
.modal-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.modal-heading button { background: none; border: 0; font-size: 30px; color: #40623d; min-width: 44px; min-height: 44px; }
dialog label { display: block; font-size: 16px; font-weight: 550; margin-top: 18px; }
dialog input { display: block; width: 100%; padding: 12px; border: 1px solid #a3bc98; border-radius: 6px; margin-top: 8px; background: #f7faf3; color: var(--ink); }
dialog p { line-height: 1.6; }
dialog code { display: block; padding: 15px; background: #e4f1d3; overflow-wrap: anywhere; margin: 18px 0; font-size: 15px; }
.primary { border: 0; background: var(--green); color: white; padding: 13px 18px; border-radius: 7px; width: 100%; margin-top: 14px; font-size: 16px; font-weight: 650; }
.primary:hover { background: #005334; }
#form-error { color: #a52f22; }
#toast { position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%); background: #064c35; color: white; border-radius: 8px; padding: 14px 22px; font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: calc(100vw - 32px); width: max-content; z-index: 2; }
#toast.visible { opacity: 1; }
@media (min-width: 1500px) { main { margin-right: auto; } }
@media (max-width: 1180px) {
  .sidebar { width: 228px; padding: 30px 14px; }
  main { margin-left: 228px; padding: 0 28px; }
  .summary-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .balance-card, .insight-card { padding: 23px; }
  .balance-footer { align-items: flex-start; flex-direction: column; }
  .flow strong { font-size: 22px; }
}
@media (max-width: 980px) {
  .summary-grid { grid-template-columns: minmax(0, 1fr); }
  .insight-card { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
  .insight-card .card-top { flex-basis: 100%; }
  .flow { margin: 0; flex: 1 1 auto; }
  .insight-note { flex-basis: 100%; margin-top: 0; }
  .balance-footer { flex-direction: row; align-items: center; }
}
@media (max-width: 720px) {
  .sidebar { position: static; width: 100%; padding: 18px 20px; flex-direction: row; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
  .brand { font-size: 32px; }
  .mark { width: 36px; height: 36px; font-size: 30px; }
  .workspace, .side-bottom { display: none; }
  nav { display: flex; gap: 3px; }
  nav a, nav button { font-size: 0; padding: 8px 11px; min-height: 44px; gap: 0; }
  nav span { font-size: 23px; }
  main { margin: 0; padding: 0 20px; }
  header { min-height: 74px; }
  .header-right { gap: 6px; }
  .breadcrumb span { margin: 0 8px; }
  .heading { margin: 28px 0 23px; }
  .eyebrow { font-size: 12px; letter-spacing: .8px; }
  h1 { font-size: 32px; letter-spacing: -1px; }
  .balance { font-size: 44px; }
  .balance-card, .insight-card { padding: 24px; }
  .insight-card { display: none; }
  .balance-footer small { line-height: 1.5; }
  .chart-card, .activity-card { padding: 22px 18px; }
  .ranges button { padding: 7px 12px; }
  .chart-area { height: 175px; gap: 12px; }
  .dates { padding-left: 57px; }
  .dates span:nth-child(even) { display: none; }
  .dates span:last-child { display: inline; }
  th:nth-child(3), td:nth-child(3) { display: none; }
  td { padding-right: 16px; }
  footer { line-height: 1.6; }
}
@media (max-width: 420px) {
  .sidebar { padding: 16px 14px; }
  .brand { gap: 6px; }
  nav a, nav button { padding: 8px; }
  main { padding: 0 14px; }
  .header-right .small { display: none; }
  .breadcrumb { font-size: 13px; }
  h1 { font-size: 30px; }
  .balance-card { padding: 22px; }
  .balance { font-size: 38px; column-gap: 9px; }
  .balance small { font-size: 21px; }
  .balance-footer { flex-direction: column; align-items: stretch; }
  .actions { display: grid; grid-template-columns: 1fr 1fr; }
  .actions button { padding: 11px 10px; }
  .chart-caption { font-size: 12px; }
  dialog { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } #toast { transition: none; } }

/* Profile overview */
[hidden] { display: none !important; }
.export-pdf { display: inline-flex; align-items: center; gap: 10px; background: var(--green); border-color: var(--green); color: white; font-size: 16px; min-height: 48px; }
.export-pdf:hover { background: #005334; color: white; }
.export-pdf span { font-size: 21px; }
.profile-overview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 23px; }
.score-card { background: #064c35; color: white; border-radius: 14px; padding: 30px; display: flex; flex-direction: column; }
.score-card h2 { color: #e6f7dc; font-size: 20px; }
.score-value { display: flex; flex-wrap: wrap; align-items: baseline; gap: 16px; margin: 16px 0 18px; font-family: Manrope, sans-serif; }
.score-value > span:first-child { font-size: clamp(76px, 7.5vw, 112px); font-weight: 800; letter-spacing: -5px; line-height: 1.15; color: var(--lime); overflow-wrap: anywhere; max-width: 100%; }
.score-growth { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 18px; font-size: 14px; color: #d0e6d7; }
.score-growth > span:first-child { color: var(--lime); font-weight: 650; }
.score-note { color: #c9e1d2; font-size: 13px; line-height: 1.6; margin: auto 0 0; padding-top: 24px; max-width: 320px; }
.profile-details { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 30px; }
.sample-tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 5px 10px; color: #365c2d; background: #edf4e5; border-radius: 5px; }
.profile-identity { display: flex; align-items: center; gap: 18px; margin: 24px 0; }
.profile-avatar { display: grid; place-items: center; width: 72px; height: 72px; flex-shrink: 0; background: #dff1c7; border: 1px solid #b1d484; border-radius: 20px; font-size: 26px; font-weight: 750; color: #205730; }
.profile-identity h3 { margin: 0; font-family: Manrope, sans-serif; font-size: 26px; line-height: 1.3; letter-spacing: -.5px; }
.profile-identity p { margin: 5px 0 0; font-size: 15px; }
.profile-fields { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; margin: 0; border-top: 1px solid var(--line); padding-top: 22px; }
.profile-fields dt { color: var(--muted); font-size: 13px; margin-bottom: 5px; }
.profile-fields dd { margin: 0; font-size: 15px; font-weight: 600; }
.wallet-field { grid-column: 1 / -1; }
.wallet-field dd { overflow-wrap: anywhere; font-family: ui-monospace, monospace; font-size: 14px; }
.statistics-section { margin-top: 30px; }
.statistics-note { color: #426445; font-size: 13px; }
.statistics-note i { margin-right: 5px; }
.statistics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 17px; }
.stat-card { padding: 22px 20px; border: 1px solid var(--line); background: white; border-radius: 12px; min-width: 0; }
.stat-label { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 550; color: #42604b; }
.stat-label > span { color: #006b48; font-size: 21px; line-height: 1; }
.stat-card strong { display: block; margin: 13px 0 3px; font-family: Manrope, sans-serif; font-size: clamp(24px, 2.1vw, 33px); font-weight: 750; letter-spacing: -.7px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.stat-card small { color: var(--muted); font-size: 12px; }
.stat-card:nth-child(2) strong { color: #087443; }
.stat-card:nth-child(3) .stat-label > span { color: #a44514; }
.chart-hidden { padding: 65px 20px; text-align: center; background: #f4f8ef; border-radius: 8px; }
.wallet-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.activity-filter { display: flex; justify-content: flex-end; margin-top: 18px; }
@media (max-width: 1180px) {
  .score-card, .profile-details { padding: 24px; }
  .profile-overview { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
  .statistics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card strong { font-size: 32px; }
}
@media (max-width: 980px) {
  .profile-overview { grid-template-columns: minmax(0, 1fr); }
  .score-value > span:first-child { font-size: 100px; }
  .score-note { max-width: none; }
}
@media (max-width: 720px) {
  .score-card, .profile-details { padding: 24px; }
  .score-value > span:first-child { font-size: 92px; }
  .profile-identity h3 { font-size: 25px; }
  .stat-card { padding: 20px 16px; }
  .stat-card strong { font-size: 27px; }
  .statistics-grid { gap: 12px; }
  .stat-label { font-size: 13px; gap: 6px; }
}
@media (max-width: 360px) {
  .profile-fields { grid-template-columns: 1fr; }
  .profile-identity { gap: 12px; }
  .profile-avatar { width: 58px; height: 58px; border-radius: 16px; }
  .profile-identity h3 { font-size: 22px; }
  .score-value > span:first-child { font-size: 80px; }
  .statistics-grid { grid-template-columns: 1fr; }
}

/* Local profile workspace */
.heading-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.heading-actions button { white-space: nowrap; }
.compact-button { padding: 8px 12px; min-height: 40px; font-size: 14px; }
.profile-switch { display: block; margin-top: 18px; font-size: 12px; font-weight: 600; color: var(--muted); }
.profile-switch select { display: block; width: 100%; max-width: 100%; margin-top: 7px; border: 1px solid #a7bf9e; border-radius: 7px; background: #f5f9f0; padding: 10px 8px; color: var(--ink); font-size: 14px; text-overflow: ellipsis; }
.profile-bio { margin: -8px 0 22px; overflow-wrap: anywhere; line-height: 1.6; font-size: 15px; }
.profile-identity > div:last-child { min-width: 0; }
.profile-identity h3, .profile-identity p, .profile-fields dd, #sidebar-name { overflow-wrap: anywhere; }
#sidebar-name { display: block; max-width: 145px; }
.profile-fields dd { white-space: pre-wrap; }
.management-section { margin-top: 30px; scroll-margin-top: 24px; }
#activity { scroll-margin-top: 24px; }
.statistics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.statistics-grid .stat-card strong { font-size: 30px; }
.score-note { max-width: none; }
.export-options { display: grid; gap: 12px; margin-top: 22px; }
.export-option { display: block; text-align: left; border: 1px solid #aac69e; border-radius: 9px; background: #f5faef; padding: 18px; color: var(--ink); }
.export-option:hover { background: #e7f3d8; border-color: var(--green); }
.export-option strong { display: block; color: var(--green); font-size: 17px; }
.export-option span { display: block; font-size: 14px; color: var(--muted); line-height: 1.5; margin-top: 6px; }
.export-privacy { font-size: 13px; margin-top: 18px; }
@media (max-width: 1180px) { .statistics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .sidebar { flex-wrap: wrap; gap: 12px; }
  nav { flex-wrap: wrap; }
  .side-bottom { display: block; width: 100%; }
  .side-bottom .network, .side-bottom .profile { display: none; }
  .profile-switch { display: flex; align-items: center; gap: 12px; margin: 0; }
  .profile-switch select { width: auto; flex: 1; min-width: 0; margin: 0; }
  .heading-actions { width: 100%; }
  .statistics-grid .stat-card strong { font-size: 25px; }
}
@media (max-width: 360px) { .statistics-grid { grid-template-columns: 1fr; } .heading-actions button { flex: 1; } }
.storage-notice { background: #fff1d4; color: #795119; border: 1px solid #ddbd7f; padding: 14px 18px; border-radius: 8px; font-size: 14px; }
td.empty-transactions { display: table-cell; padding: 30px 14px; text-align: center; color: var(--muted); font-weight: 400; white-space: normal; }
.sidebar { overflow-y: auto; }
