:root{
  font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;
  color:#eef6ff;
  background:#07101f;
}
*{box-sizing:border-box}
html,body{overflow-x:hidden}
body{
  margin:0;
  min-height:100vh;
  background:radial-gradient(circle at top,#102344 0,#07101f 48%,#030712 100%);
}
header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  padding:16px 14px 10px;
  background:rgba(7,16,31,.95);
  border-bottom:1px solid #1e3656;
}
.eyebrow{font-size:11px;letter-spacing:.16em;color:#67e8f9;font-weight:800}
h1{font-size:20px;line-height:1.1;margin:4px 0 6px}
h2{font-size:22px;margin:8px 0 14px}
h3{font-size:18px;margin:0}
.syncinfo{font-size:12px;color:#9fd8ff;font-weight:700;line-height:1.35}
.iconbtn,.softbtn,.danger-outline{
  border:1px solid #2b4869;
  background:#10233d;
  color:#fff;
  border-radius:14px;
  padding:10px 14px;
  font-weight:800;
}
.iconbtn{font-size:22px;min-width:58px;min-height:58px;display:flex;align-items:center;justify-content:center}
.softbtn{font-size:14px;padding:10px 12px}
nav{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  padding:12px 14px 8px;
}
nav button{
  border:0;
  border-radius:14px;
  padding:11px 6px;
  background:#17263b;
  color:#dbeafe;
  font-weight:800;
  font-size:15px;
  min-height:52px;
}
nav button.active{background:#0891b2;color:#fff}
main{padding:4px 14px 36px;max-width:980px;margin:auto}
.page{display:none}
.page.active{display:block}
.cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
.card{
  background:#0e1b2d;
  border:1px solid #203a59;
  border-radius:18px;
  padding:14px;
  min-height:92px;
  box-shadow:0 10px 28px rgba(0,0,0,.18);
}
.card .label{font-size:13px;color:#9fb4cb;font-weight:700}
.card .value{font-size:18px;font-weight:900;margin-top:8px;word-break:break-word}
.green{border-color:#176942}
.cyan{border-color:#0e7490}
.red{border-color:#8a2f3d}
.violet{border-color:#6d4fc2}
.yellow{border-color:#8b6915}
.subsection{
  margin-top:16px;
  background:#091424;
  border:1px solid #1f3855;
  border-radius:18px;
  padding:14px;
}
.compact-subsection{padding-bottom:12px}
.subsection-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}
.picker,.expense-form{display:grid;grid-template-columns:1fr auto;gap:10px;margin:12px 0 16px}
.picker input,.expense-form input,.expense-form select,.login-card input{
  width:100%;
  background:#0e1b2d;
  border:1px solid #294764;
  color:white;
  border-radius:14px;
  padding:13px;
  font-size:16px;
}
.picker button,.expense-form button,.login-card button{
  border:0;
  border-radius:14px;
  background:#0891b2;
  color:#fff;
  font-weight:900;
  padding:13px 18px;
  font-size:15px;
}
.expense-form{grid-template-columns:1fr 1fr}
.expense-form #expenseComment,.expense-form button{grid-column:1/-1}
.list{display:flex;flex-direction:column;gap:9px;margin-top:12px}
.row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  background:#0d1929;
  border:1px solid #1f3855;
  border-radius:15px;
  padding:12px;
}
.row-main{min-width:0}
.row-title{font-weight:900;line-height:1.35}
.row-sub{font-size:13px;color:#91a8c0;margin-top:3px;line-height:1.35}
.delete{
  border:0;
  border-radius:12px;
  background:#7f1d1d;
  color:white;
  padding:9px 11px;
  font-weight:900;
  flex:0 0 auto;
}
.muted{color:#91a8c0;font-size:13px;line-height:1.45;margin:6px 0 0}
.hidden-block{display:none}
.overlay{
  position:fixed;
  inset:0;
  z-index:20;
  background:#050b15;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
}
.overlay.hidden{display:none}
.login-card{
  width:min(420px,100%);
  background:#0e1b2d;
  border:1px solid #294764;
  border-radius:24px;
  padding:24px;
}
.login-card button{width:100%;margin-top:12px}
.error{color:#fca5a5;margin-top:10px;min-height:20px}
#toast{
  position:fixed;
  left:50%;
  bottom:20px;
  transform:translateX(-50%);
  z-index:30;
  background:#16263a;
  color:white;
  padding:11px 16px;
  border-radius:12px;
  display:none;
  box-shadow:0 8px 24px #0008;
  max-width:92vw;
  text-align:center;
}
@media(max-width:520px){
  h1{font-size:17px}
  .syncinfo{font-size:11px}
  nav button{font-size:14px;padding:10px 4px;min-height:48px}
  .cards{grid-template-columns:1fr 1fr}
  .card{padding:13px;min-height:88px}
  .card .value{font-size:16px}
  .subsection-head{align-items:flex-start;flex-direction:column}
  .softbtn,.danger-outline{width:100%}
  .row{align-items:flex-start;flex-direction:column}
  .delete{width:100%}
}
@media(min-width:760px){
  nav{grid-template-columns:repeat(7,1fr)}
  .cards{grid-template-columns:repeat(4,1fr)}
  .card .value{font-size:22px}
}
.row-actions{display:flex;gap:8px;flex:0 0 auto}.edit-expense{border:0;border-radius:12px;background:#0e7490;color:#fff;padding:9px 11px;font-weight:900}.edit-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}.edit-actions button{width:100%;margin-top:0}.login-card select{width:100%;background:#0e1b2d;border:1px solid #294764;color:white;border-radius:14px;padding:13px;font-size:16px;margin-bottom:10px}.login-card #editExpenseAmount,.login-card #editExpenseComment{margin-bottom:10px}@media(max-width:520px){.row-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}.edit-expense,.row-actions .delete{width:100%}}
