:root{
  --bg:#0b1220;
  --card:rgba(6,10,18,0.86);
  --text:#F8FAFC;
  --muted:#D0D6EF;
  --border:rgba(248,250,252,0.14);
  --primary:#ff5b6c;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
  --radius: 16px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color:var(--text);
  background: radial-gradient(1200px 800px at 20% 0%, rgba(255,91,108,0.25), transparent 55%),
              radial-gradient(1200px 800px at 80% 10%, rgba(34,197,94,0.18), transparent 50%),
              linear-gradient(180deg, #060914, var(--bg));
}

.topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 14px 8px;
}

.brand{display:flex; gap:12px; align-items:center}
.brand__dot{
  width:12px;height:12px;border-radius:999px;
  background: var(--primary);
  box-shadow: 0 0 0 6px rgba(255,255,255,0.04);
}
.brand__title{font-weight:800; letter-spacing:0.2px}
.brand__subtitle{font-size:12px; color:var(--muted); opacity:0.9}

.topbar__actions{display:flex; gap:8px; align-items:center}

.tabs{
  display:flex; gap:8px; padding:0 14px 12px;
  overflow-x:auto;
}
.tab{
  border:1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color:var(--text);
  padding:10px 12px;
  border-radius:999px;
  cursor:pointer;
  white-space:nowrap;
}
.tab.is-active{
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.22);
}

.main{padding:0 14px 22px}

.panel{display:none}
.panel.is-active{display:block}

.grid2{
  display:grid;
  grid-template-columns: 1fr;
  gap:12px;
}
@media (min-width: 980px){
  .grid2{grid-template-columns: 1fr 1fr;}
}

.card{
  background: var(--card);
  border:1px solid var(--border);
  border-radius: var(--radius);
  padding:14px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.card__title{
  font-weight:800;
  margin-bottom:10px;
}

.row{display:flex; gap:10px; align-items:center; flex-wrap:wrap}
.input{
  width:100%;
  padding:11px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color:var(--text);
  outline:none;
}
.select{max-width: 260px}

.btn{
  padding:11px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  cursor:pointer;
  background: rgba(255,255,255,0.06);
  color: var(--text);
}
.btn--primary{
  background: var(--primary);
  border-color: rgba(255,255,255,0.22);
  color:#07121a;
  font-weight:900;
}
.btn--ghost{background: rgba(255,255,255,0.04)}

.list{
  margin-top:12px;
  display:flex;
  flex-direction:column;
  gap:10px;
  max-height: 56vh;
  overflow:auto;
  padding-right:6px;
}
.item{
  border:1px solid var(--border);
  border-radius: 14px;
  padding:12px;
  background: rgba(255,255,255,0.05);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.item__title{font-weight:800}
.item__sub{font-size:12px; color:var(--muted)}
.item__right{display:flex; gap:10px; align-items:center}
.pill{
  font-size:12px;
  padding:6px 9px;
  border-radius:999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,0.04);
}

.divider{height:1px; background:var(--border); margin:12px 0}

.totals{display:flex; flex-direction:column; gap:8px}
.totals__row{display:flex; justify-content:space-between; color:var(--muted)}
.totals__row--big{font-weight:900; color:var(--text); font-size:18px}

.muted{color:var(--muted); font-size:13px}
.log{
  margin-top:10px;
  border:1px dashed var(--border);
  border-radius:12px;
  padding:10px;
  font-size:13px;
  color:var(--muted);
  white-space:pre-wrap;
}

.modal{
  position:fixed; inset:0;
  background: rgba(0,0,0,0.55);
  display:flex;
  align-items:flex-end;
  justify-content:center;
  padding:16px;
}
.modal__sheet{
  width:min(720px, 100%);
  border-radius: 18px;
  background: var(--card);
  border:1px solid var(--border);
  box-shadow: var(--shadow);
  padding:14px;
}
.modal__title{font-weight:900; margin-bottom:10px}
.modal__body{color:var(--muted)}
.modal__actions{display:flex; gap:10px; justify-content:flex-end; margin-top:14px}
