/* SplitApp mobile-first minimal UI (no external CDN) */

:root{
  --bg:#0b0c10;
  --card:#111319;
  --muted:#9aa4b2;
  --text:#f4f7fb;
  --line:#1f2430;
  --primary:#2a6df4;
  --danger:#d64545;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

@media (prefers-color-scheme: light){
  :root{
    --bg:#f5f7fb;
    --card:#ffffff;
    --muted:#667085;
    --text:#101828;
    --line:#e7ebf3;
    --shadow: 0 8px 26px rgba(16,24,40,.08);
  }
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:var(--bg);
  color:var(--text);
}

a{ color:inherit; text-decoration:none; }
label{ display:block; font-size:13px; color:var(--muted); margin-bottom:6px; }
input, select, button, textarea{
  font: inherit;
}

.wrap{ max-width: 760px; margin: 0 auto; padding: 14px 12px 90px; }
.topbar{
  position:sticky; top:0;
  background: linear-gradient(to bottom, var(--bg) 0%, rgba(0,0,0,0) 120%);
  backdrop-filter: blur(8px);
  padding: 10px 0 12px;
  z-index: 20;
  display:flex; align-items:center; justify-content:space-between;
}
.brand a{ font-weight: 800; letter-spacing:.2px; font-size:18px; }
.top-actions{ display:flex; gap:8px; }

.bottombar{
  position:fixed; left:0; right:0; bottom:0;
  background: rgba(17,19,25,.92);
  border-top:1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(10px);
  display:flex;
  justify-content:space-around;
  padding: 10px 8px;
  z-index: 30;
}
@media (prefers-color-scheme: light){
  .bottombar{ background: rgba(255,255,255,.92); border-top:1px solid var(--line); }
}
.tab{ padding:10px 12px; border-radius:12px; font-weight:700; font-size:14px; }
.tab:hover{ background: rgba(255,255,255,.06); }

.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:18px;
  padding:14px;
  box-shadow: var(--shadow);
}
.h1{ margin:0 0 8px; font-size:22px; }
.muted{ color:var(--muted); }
.small{ font-size:12px; }
.stack{ display:flex; flex-direction:column; gap:10px; }
.spacer{ height:10px; }
.section{ margin-top: 12px; }
.header{
  display:flex; align-items:flex-start; justify-content:space-between;
  gap:12px;
}
.header.small{ align-items:center; }
.seg{ display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }

.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  font-weight:800;
  font-size:14px;
  cursor:pointer;
}
.btn:hover{ background: rgba(255,255,255,.08); }
.btn.primary{ background: var(--primary); border-color: rgba(0,0,0,0); color: white; }
.btn.ghost{ background: transparent; }
.btn.danger, .danger{ color: var(--danger); }

.alert{
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  padding:10px 12px;
  border-radius:14px;
}
.alert.ok{ border-color: rgba(42,109,244,.35); }
.alert.danger{ border-color: rgba(214,69,69,.5); }

input, select{
  width:100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--text);
}
input:focus, select:focus{ outline: 2px solid rgba(42,109,244,.4); outline-offset:2px; }

.two{ display:grid; grid-template-columns: 1fr; gap:10px; }
@media (min-width: 560px){ .two{ grid-template-columns: 1fr 1fr; } }

.row{
  display:flex; align-items:center; gap:10px;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.02);
}
.row:hover{ background: rgba(255,255,255,.05); }
.row.static:hover{ background: rgba(255,255,255,.02); }
.row-main{ flex:1; min-width:0; }
.row-title{ font-weight: 850; }
.row-amt{ font-weight: 900; white-space:nowrap; }
.chev{ color: var(--muted); font-size: 20px; padding-left: 4px; }

.pills{ display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; }
.pill{ padding:8px 10px; border:1px solid var(--line); border-radius:999px; background: rgba(255,255,255,.03); font-weight:700; font-size:13px; }

.member-row, .benef-row{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.02);
}
.member-row .left, .benef-row .left{ display:flex; align-items:center; gap:10px; }
.member-row input[type="checkbox"], .benef-row input[type="checkbox"]{ width:18px; height:18px; }
.check{ display:flex; align-items:center; gap:8px; color:var(--muted); font-size:13px; }

.benef-row .right{ display:flex; align-items:center; gap:10px; }
.weight{ width:88px; text-align:center; }
.share{ min-width:84px; text-align:right; }
.share-val{ font-weight:900; }

details summary{
  cursor:pointer;
  font-weight:900;
}
