:root{
  --bg:#0b1220;
  --panel:#0f1a2c;
  --panel2:#111f35;
  --txt:#e8eefc;
  --muted:#93a6c6;
  --line:rgba(255,255,255,.08);
  --btn:#2b79ff;
  --danger:#ff3b30;
  --shadow:0 10px 30px rgba(0,0,0,.35);
  --radius:18px;
}
*{box-sizing:border-box}
body{
  margin:0; background:radial-gradient(1200px 600px at 30% -10%, #182b4a 0%, transparent 60%), var(--bg);
  color:var(--txt);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
.topbar{
  position:sticky; top:0; z-index:10;
  display:flex; gap:16px; align-items:center; justify-content:space-between;
  padding:14px 18px;
  background:rgba(10,16,28,.86);
  backdrop-filter: blur(12px);
  border-bottom:1px solid var(--line);
}
.brandTitle{font-weight:900; letter-spacing:.08em}
.brandSub{font-weight:900; font-size:22px; margin-top:-2px}
.brandTag{color:var(--muted); font-size:12px; margin-top:2px}
.nav{display:flex; gap:14px; align-items:center}
.nav a{color:var(--muted); text-decoration:none; padding:10px 10px; border-radius:12px}
.nav a.on{color:var(--txt); background:rgba(255,255,255,.06)}
.wrap{max-width:1100px; margin:18px auto; padding:0 14px}
.card{
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:18px;
}
h1{margin:0 0 12px 0; font-size:34px}
h2{margin:16px 0 10px; font-size:18px; color:var(--muted)}
.muted{color:var(--muted)}
.grid{display:grid; grid-template-columns: 2fr 1fr 1fr 2fr auto; gap:10px; align-items:center}
.grid2{display:grid; grid-template-columns: 1fr 1fr; gap:10px}
.grid2 label{display:flex; flex-direction:column; gap:6px; color:var(--muted); font-size:12px}
input,select{
  width:100%; padding:12px 12px; border-radius:14px;
  border:1px solid var(--line); outline:none;
  background:rgba(0,0,0,.25); color:var(--txt);
}
input::placeholder{color:rgba(147,166,198,.7)}
.btn, button.btn{
  background:linear-gradient(180deg, rgba(43,121,255,1), rgba(30,92,210,1));
  border:none; color:white; font-weight:800;
  padding:12px 14px; border-radius:14px; cursor:pointer;
  box-shadow:0 10px 20px rgba(43,121,255,.22);
  text-decoration:none;
}
button.danger{
  background:rgba(255,59,48,.12);
  border:1px solid rgba(255,59,48,.35);
  color:#ffd0cd;
  padding:10px 12px; border-radius:12px; cursor:pointer;
}
.tableWrap{overflow:auto; margin-top:14px; border-radius:14px; border:1px solid var(--line)}
table{width:100%; border-collapse:collapse; min-width:780px; background:rgba(0,0,0,.18)}
th,td{padding:12px; border-bottom:1px solid var(--line)}
th{color:var(--muted); font-weight:700; text-align:left; background:rgba(255,255,255,.03)}
.right{text-align:right}
.inline{display:inline}
.link{color:#9cc3ff; text-decoration:none; margin-right:10px}
.foot{
  color:var(--muted);
  padding:18px; text-align:center; border-top:1px solid var(--line);
  margin-top:22px;
}
.lines{display:flex; flex-direction:column; gap:10px}
.line{
  display:grid; grid-template-columns: 3fr 1fr 1fr 1fr 1fr auto;
  gap:10px; align-items:center;
}
.line .x{
  background:rgba(255,255,255,.06);
  border:1px solid var(--line);
  color:var(--muted);
  padding:10px; border-radius:12px; cursor:pointer;
}
.actions{display:flex; gap:12px; margin-top:14px}
.row{display:flex; gap:12px; align-items:flex-start; justify-content:space-between}
.totals{display:flex; gap:16px; justify-content:flex-end; margin-top:14px; color:var(--muted)}
.totals .grand{color:var(--txt); font-size:18px}
.flash{margin:0 0 14px 0; display:flex; flex-direction:column; gap:8px}
.f{padding:12px 14px; border-radius:14px; border:1px solid var(--line); background:rgba(0,0,0,.22)}
.f.err{border-color:rgba(255,59,48,.35)}
@media (max-width: 860px){
  .grid{grid-template-columns:1fr; }
  .grid2{grid-template-columns:1fr}
  .nav{gap:8px}
  h1{font-size:28px}
  .line{grid-template-columns:1fr 1fr; }
}
