:root { --bd:#d7dae0; --mut:#6b7280; --acc:#0e2445; --gold:#d9a22a; }
* { box-sizing: border-box; }
body { margin:0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color:#111827; background:#f6f7f9; }
.topbar { display:flex; justify-content:space-between; align-items:center; background:var(--acc); color:#fff; padding:.6rem 1.2rem; }
.topbar a { color:#fff; text-decoration:none; margin-left:1rem; }
.brand { font-weight:700; letter-spacing:.5px; }
.wrap { max-width:1200px; margin:1.2rem auto; padding:0 1rem; }
.narrow { max-width:360px; }
h1 { font-size:1.4rem; } h2 { font-size:1.1rem; margin:.8rem 0 .4rem; }
.card { background:#fff; border:1px solid var(--bd); border-radius:10px; padding:.8rem 1rem; margin-bottom:1rem; }
.cardhead { font-weight:600; display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid var(--bd); padding-bottom:.3rem; margin-bottom:.4rem; }
.grid3 { display:grid; grid-template-columns:1fr 1fr 1fr; gap:1rem; }
.grid4 { display:grid; grid-template-columns:repeat(4,1fr); gap:.6rem; }
@media (max-width:1000px){ .grid3,.grid4 { grid-template-columns:1fr 1fr; } }
label { display:block; font-size:.85rem; color:#374151; }
input, select, textarea { width:100%; padding:.35rem .5rem; border:1px solid var(--bd); border-radius:6px; font:inherit; }
table { width:100%; border-collapse:collapse; font-size:.85rem; }
th, td { text-align:left; padding:.2rem .25rem; }
thead th { color:var(--mut); font-weight:600; border-bottom:1px solid var(--bd); }
tfoot th { border-top:2px solid var(--bd); background:#f3f4f6; }
.tot { font-variant-numeric: tabular-nums; font-weight:700; }
.chico { font-size:.82rem; }
.scrollable { max-height: 55vh; overflow-y: auto; border:1px solid var(--bd); border-radius:8px; }
.scrollable table { margin:0; }
.scrollable thead th { position: sticky; top: 0; background:#f3f4f6; z-index: 2; }
.scrollable tfoot th { position: sticky; bottom: 0; background:#f3f4f6; z-index: 2; }
.grid2 { display:grid; grid-template-columns: 1.2fr 1fr; gap:1rem; }
@media (max-width:900px){ .grid2 { grid-template-columns:1fr; } }
.fila-total th, .fila-total td { background:#e8f5e9; }
.cierre-tabla input { max-width: 190px; }
.pager { display:flex; justify-content:space-between; align-items:center; margin-top:.8rem; font-size:.9rem; gap:1rem; }
.pager a { text-decoration:none; }
td input { padding:.2rem .35rem; }
.num { text-align:right; }
button { background:var(--acc); color:#fff; border:0; border-radius:6px; padding:.5rem .9rem; cursor:pointer; font:inherit; }
button.mini { padding:.1rem .45rem; font-size:.8rem; background:#eef1f5; color:#111; }
button.del { background:#fde8e8; color:#b91c1c; }
button.link { background:none; color:#fff; padding:0; text-decoration:underline; }
.btn.secondary { background:#e5e7eb; color:#111; text-decoration:none; padding:.5rem .9rem; border-radius:6px; }
.row-form { display:flex; gap:.8rem; align-items:end; flex-wrap:wrap; }
.actions { display:flex; gap:.6rem; margin-top:.6rem; }
.tag { font-size:.75rem; padding:.05rem .4rem; border-radius:999px; background:#eef1f5; }
.tag.cerrado { background:#e6f4ea; color:#065f46; }
.tag.borrador { background:#fef3c7; color:#92400e; }
.muted { color:var(--mut); } .who { margin-left:1rem; opacity:.9; }
.error { color:#b91c1c; } .ok { color:#065f46; background:#e6f4ea; padding:.4rem .7rem; border-radius:6px; }
.inline { display:inline; }
hr { border:0; border-top:1px solid var(--bd); }
