* { box-sizing: border-box; font-family: -apple-system,BlinkMacSystemFont,system-ui,sans-serif; }
body { margin:0; background:#0b1120; color:#e5e7eb; }
#app { min-height: 100vh; display:flex; flex-direction:column; }

.top-bar{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 12px; background:#111827; border-bottom:1px solid rgba(255,255,255,.08);
  position:sticky; top:0; z-index:10;
}
.brand-pill{
  background:#e3d7c5; color:#111827; font-weight:900; font-size:12px;
  padding:7px 10px; border-radius:999px; letter-spacing:.6px;
}
.top-actions { display:flex; gap:8px; }

.tabs{
  display:flex; gap:8px; padding:10px 12px; background:#0f172a;
  border-bottom:1px solid rgba(255,255,255,.08); position:sticky; top:52px; z-index:9;
  overflow:auto;
}
.tab-button{
  border:none; padding:8px 12px; border-radius:999px; cursor:pointer;
  background:#111827; color:#e5e7eb; font-weight:800; font-size:13px;
  white-space:nowrap;
}
.tab-button.active{ background:#e3d7c5; color:#111827; }

main{ flex:1; padding:12px; max-width:900px; width:100%; margin:0 auto; }
.tab{ display:none; }
.tab.active{ display:block; }

.card{
  background:#0f172a; border:1px solid rgba(255,255,255,.08);
  border-radius:16px; padding:12px; margin-bottom:12px;
}
.card-title{ font-weight:900; margin-bottom:10px; }
.row-between{ display:flex; justify-content:space-between; align-items:center; gap:10px; }

label{ display:block; font-size:13px; font-weight:800; margin:10px 0; color:#cbd5e1; }
input, select, textarea{
  width:100%; margin-top:6px; padding:10px 10px;
  border-radius:12px; border:1px solid rgba(255,255,255,.10);
  background:#111827; color:#e5e7eb; font-size:14px;
}
textarea{ resize:vertical; }
.ghost{ opacity:.7; }
.grid-2{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
@media (max-width: 560px){ .grid-2{ grid-template-columns:1fr; } }

.btn{
  border:none; cursor:pointer; border-radius:999px;
  padding:10px 12px; font-weight:900; font-size:13px;
  background:#1f2937; color:#e5e7eb;
}
.btn.small{ padding:8px 10px; font-size:12px; }
.btn.primary{ background:#e3d7c5; color:#111827; }
.btn.danger{ background:#ef4444; color:#fff; }

.hint-box{
  background:#111827; border:1px dashed rgba(227,215,197,.55);
  border-radius:14px; padding:10px; margin-top:10px;
}
.hidden{ display:none !important; }
.mini-muted{ font-size:12px; color:#94a3b8; font-weight:700; }

.lines-box{ display:flex; flex-direction:column; gap:8px; margin-top:10px; }
.line-row{
  display:grid; grid-template-columns: 1fr 110px 44px;
  gap:8px; align-items:center;
}
.line-row input{ margin:0; }
.line-row .rm{
  width:44px; height:44px; border-radius:14px;
  background:#111827; border:1px solid rgba(255,255,255,.10);
  color:#e5e7eb; font-weight:900; cursor:pointer;
}
.line-row .rm:hover{ background:#ef4444; border-color:#ef4444; }

.totals{ margin-top:12px; padding-top:10px; border-top:1px solid rgba(255,255,255,.08); }
.tot-row{ display:flex; justify-content:space-between; align-items:center; padding:8px 0; }
.tot-row.big{ font-size:16px; }
.tot-row b{ color:#e3d7c5; }

.list{ margin-top:12px; display:flex; flex-direction:column; gap:10px; }
.item{
  background:#111827; border:1px solid rgba(255,255,255,.08);
  border-radius:14px; padding:10px;
}
.item h4{ margin:0 0 6px 0; font-size:14px; }
.item .meta{ font-size:12px; color:#94a3b8; font-weight:700; }
.item .actions{ display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; }

.bottom-bar{
  padding:12px; text-align:center; font-size:12px; color:#94a3b8;
  border-top:1px solid rgba(255,255,255,.08); background:#0f172a;
}

/* PRINT */
@media print {
  body{ background:#fff; color:#111; }
  .top-bar,.tabs,.bottom-bar,.btn{ display:none !important; }
  main{ padding:0; max-width:100%; }
  .card{ border:none; background:#fff; }
  #printArea{ display:block !important; }
}
.print-area{ display:none; }