/* Airy light UI — no external libs */

:root{
  --bg: #F6F7FB;
  --card: #FFFFFF;
  --text: #0F172A;
  --muted: #64748B;
  --line: #E7EAF2;
  --shadow: 0 16px 40px rgba(15, 23, 42, .06);
  --radius: 22px;

  --btn: rgba(15,23,42,.92);
  --btnText: #FFFFFF;

  --softBg: rgba(15, 23, 42, .06);
  --softHover: rgba(15, 23, 42, .10);

  --ghostBorder: rgba(15, 23, 42, .16);
  --ghostHover: rgba(15, 23, 42, .06);

  --good: #16A34A;
  --bad: #B91C1C;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji";
  background: radial-gradient(1200px 700px at 20% 0%, #FFFFFF 0%, var(--bg) 60%) fixed;
  color: var(--text);
}

a{ color: inherit; text-decoration: none; }
code{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

.is-hidden{ display:none !important; }

.topbar{
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(246,247,251,.78);
  border-bottom: 1px solid rgba(231,234,242,.9);
}
.topbar__inner{
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width: 240px;
}
.brand__logo{
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}
.brand__title{ font-weight: 650; letter-spacing: .2px; }
.brand__sub{ font-size: 12px; color: var(--muted); margin-top: 2px; }

.nav{
  display:flex;
  align-items:center;
  gap: 6px;
  flex: 1;
  justify-content: center;
  flex-wrap: wrap;
}
.nav__link{
  font-size: 13px;
  color: rgba(15,23,42,.82);
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.nav__link:hover{
  background: rgba(255,255,255,.7);
  border-color: rgba(231,234,242,.9);
}

.topbar__actions{ display:flex; gap:10px; }

.page{ max-width: 1180px; margin: 0 auto; padding: 18px 18px 42px; }

.hero{ padding: 18px 0 6px; }
.hero__grid{
  display:grid;
  grid-template-columns: 360px 1fr;
  gap: 18px;
  align-items:start;
}

.heroCard{
  background: rgba(255,255,255,.85);
  border: 1px solid rgba(231,234,242,.95);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  overflow:hidden;
  position: sticky;
  top: 86px;
}
.heroCard__art{
  background: linear-gradient(180deg, rgba(15,23,42,.02), rgba(15,23,42,.00));
  padding: 18px 18px 0;
}
.heroCard__art img{
  width: 100%;
  height: auto;
  display:block;
  border-radius: 18px;
  border: 1px solid rgba(231,234,242,.9);
  background: #fff;
}
.heroCard__meta{ padding: 18px 18px 20px; }
.heroCard__title{ font-size: 18px; font-weight: 640; letter-spacing: .2px; margin: 10px 0 8px; }
.heroCard__hint{ font-size: 13px; line-height: 1.5; color: var(--muted); }

.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(231,234,242,.95);
  background: rgba(255,255,255,.8);
  font-size: 12px;
  color: rgba(15,23,42,.78);
}

.heroMain{ min-width: 0; }
.heroMain__head{
  display:flex;
  gap: 16px;
  align-items:flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.kicker{ font-size: 12px; color: var(--muted); letter-spacing: .6px; text-transform: uppercase; }
.h1{ margin: 6px 0 6px; font-size: 34px; letter-spacing: -0.4px; }
.sub{ color: var(--muted); line-height: 1.55; max-width: 62ch; }

.balanceCard{
  min-width: 220px;
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(231,234,242,.95);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 10px 26px rgba(15,23,42,.05);
}
.balanceCard__label{ font-size: 12px; color: var(--muted); }
.balanceCard__value{ font-size: 26px; font-weight: 720; letter-spacing: -0.2px; margin-top: 2px; }
.balanceCard__note{ font-size: 12px; color: var(--muted); margin-top: 2px; }

.quickRow{ display:flex; gap: 10px; flex-wrap: wrap; margin: 8px 0 18px; }
.panelRow{ display:flex; flex-direction: column; gap: 16px; }

.panel{
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(231,234,242,.95);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(15,23,42,.05);
  padding: 18px;
}
.panel__head{ margin-bottom: 14px; }
.panel__head--row{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.h2{ margin:0; font-size: 18px; letter-spacing: -0.2px; }
.panel__sub{ margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.55; }

.cards{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.card{
  border: 1px solid rgba(231,234,242,.95);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255,255,255,.95);
  display:flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.card__top{ display:flex; align-items:flex-start; justify-content: space-between; gap: 10px; }
.card__title{ font-weight: 700; letter-spacing: .1px; }
.card__desc{ font-size: 13px; color: var(--muted); line-height: 1.45; }
.card__actions{ display:flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }

.badge{
  font-size: 12px;
  color: rgba(15,23,42,.75);
  background: rgba(15,23,42,.05);
  border: 1px solid rgba(15,23,42,.06);
  padding: 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.list{ display:flex; flex-direction: column; gap: 8px; }
.item{
  display:grid;
  grid-template-columns: 110px 1fr 140px;
  gap: 12px;
  align-items:center;
  border: 1px solid rgba(231,234,242,.95);
  background: rgba(255,255,255,.96);
  border-radius: 16px;
  padding: 12px 12px;
}
.item__amt{ font-weight: 760; letter-spacing: -.1px; }
.item__amt.is-plus{ color: var(--good); }
.item__amt.is-minus{ color: var(--bad); }
.item__title{ font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.item__meta{ font-size: 12px; color: var(--muted); margin-top: 2px; }
.item__right{ text-align: right; }
.item__date{ font-size: 12px; color: var(--muted); }
.item__exp{ font-size: 12px; color: rgba(15,23,42,.75); margin-top: 2px; }

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

.rowActions{ display:flex; gap:10px; flex-wrap:wrap; }

/* Matrix */
.matrixWrap{ overflow:auto; }
.matrix{
  width:100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 560px;
  border: 1px solid rgba(231,234,242,.95);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,.96);
}
.matrix th, .matrix td{
  padding: 12px 12px;
  border-bottom: 1px solid rgba(231,234,242,.95);
  vertical-align: middle;
}
.matrix thead th{
  font-size: 12px;
  color: rgba(15,23,42,.72);
  font-weight: 700;
  background: rgba(246,247,251,.65);
  text-align: center;
}
.matrix thead th:first-child{ text-align:left; }
.matrix tbody td:first-child{
  font-weight: 650;
  color: rgba(15,23,42,.90);
  width: 42%;
}
.matrix tbody tr:last-child td{ border-bottom: 0; }
.matrix td:nth-child(n+2), .matrix th:nth-child(n+2){
  text-align:center;
  width:auto;
  min-width: 120px;
}

/* Sticky first column for wide tables */
.matrix thead th:first-child,
.matrix tbody td:first-child{
  position: sticky;
  left: 0;
  background: rgba(255,255,255,.96);
}
.matrix thead th:first-child{ background: rgba(246,247,251,.65); }
.mchk{
  width: 16px; height: 16px;
  accent-color: rgba(15,23,42,.88);
}
.mchk[disabled]{ opacity: .55; }

/* Profile */
.profileGrid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.pf{
  border: 1px solid rgba(231,234,242,.95);
  background: rgba(255,255,255,.96);
  border-radius: 16px;
  padding: 12px;
  min-width: 0;
}
.pf__k{ font-size: 12px; color: var(--muted); }
.pf__v{ margin-top: 6px; font-weight: 650; overflow-wrap: anywhere; }

.form{
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(231,234,242,.95);
}
.formGrid{
  display:grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
  align-items:start;
}
.col-12{ grid-column: span 12; }

.field{ display:flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__label{ font-size: 12px; color: var(--muted); }

.checks{
  display:flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(231,234,242,.95);
  background: rgba(255,255,255,.92);
}
.check{ display:flex; align-items:center; gap: 10px; font-size: 13px; color: rgba(15,23,42,.78); }
.check input{ transform: translateY(1px); }

.muted{ color: var(--muted); font-size: 12px; line-height: 1.45; }

.btn{
  border: 0;
  cursor: pointer;
  user-select: none;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 650;
  letter-spacing: .1px;
  font-size: 13px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  transition: transform .08s ease, background .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.btn:active{ transform: translateY(1px); }
.btn--primary{
  background: var(--btn);
  color: #fff;
  box-shadow: 0 12px 26px rgba(15,23,42,.12);
}
.btn--primary:hover{ background: rgba(15,23,42,.86); }
.btn--soft{
  background: var(--softBg);
  color: rgba(15,23,42,.86);
  border: 1px solid rgba(231,234,242,.0);
}
.btn--soft:hover{ background: var(--softHover); }
.btn--ghost{
  background: transparent;
  color: rgba(15,23,42,.86);
  border: 1px solid var(--ghostBorder);
}
.btn--ghost:hover{ background: var(--ghostHover); }
.btn[disabled]{ opacity: .55; cursor:not-allowed; }

.seg{
  display:inline-flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid rgba(231,234,242,.95);
  background: rgba(255,255,255,.85);
}
.seg__btn{
  border: 1px solid transparent;
  background: transparent;
  color: rgba(15,23,42,.78);
  padding: 8px 10px;
  border-radius: 999px;
  font-weight: 650;
  cursor: pointer;
  font-size: 12px;
}
.seg__btn:hover{ background: rgba(15,23,42,.05); }
.seg__btn.is-active{ background: rgba(15,23,42,.08); color: rgba(15,23,42,.92); }

.ctaRow{ display:flex; gap: 10px; flex-wrap: wrap; align-items:center; margin-top: 12px; }

.footer{ margin-top: 18px; padding: 18px 0 0; }
.footer__inner{
  border-top: 1px solid rgba(231,234,242,.95);
  padding-top: 14px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.toast{
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 18px;
  background: rgba(15,23,42,.92);
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  box-shadow: 0 16px 40px rgba(15,23,42,.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.toast.is-show{ opacity: 1; transform: translateX(-50%) translateY(-2px); }

/* responsive */
@media (max-width: 980px){
  .hero__grid{ grid-template-columns: 1fr; }
  .heroCard{ position: relative; top: 0; }
  .cards{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .profileGrid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px){
  .topbar__inner{ padding: 12px 14px; }
  .brand{ min-width: 0; }
  .brand__text{ display:none; }
  .page{ padding: 14px 14px 36px; }
  .h1{ font-size: 28px; }
  .cards{ grid-template-columns: 1fr; }
  .profileGrid{ grid-template-columns: 1fr; }
  .item{ grid-template-columns: 1fr; }
  .item__right{ text-align: left; }
}
