:root { --brand:#0d6efd; --sidebar-bg:#1f2937; --sidebar-fg:#cbd5e1; }
* { box-sizing: border-box; }
body { background:#f4f6f9; margin:0; font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif; }

.layout { display:flex; min-height:100vh; }
.sidebar {
  width:240px; background:var(--sidebar-bg); color:var(--sidebar-fg);
  display:flex; flex-direction:column; padding:0 0 1rem; flex-shrink:0;
  position:sticky; top:0; height:100vh; overflow-y:auto;
}
.sidebar .brand { font-size:1.1rem; font-weight:600; color:#fff; padding:1.1rem 1.25rem; gap:.5rem; align-items:center; border-bottom:1px solid rgba(255,255,255,.08); }
.sidebar .navlink { display:flex; align-items:center; gap:.65rem; color:var(--sidebar-fg); text-decoration:none; padding:.7rem 1.25rem; font-size:.95rem; }
.sidebar .navlink:hover { background:rgba(255,255,255,.06); color:#fff; }
.sidebar .navlink.active { background:var(--brand); color:#fff; font-weight:500; }
.sidebar .mt-auto { margin-top:auto; border-top:1px solid rgba(255,255,255,.08); padding-top:.5rem; }

.content { flex:1; padding:1.5rem 1.75rem; max-width:100%; min-width:0; }
@media (max-width: 991.98px){
  .layout { flex-direction:column; }
  .sidebar { width:100%; height:auto; position:static; }
  .content { padding:1rem; }
}

.page-head { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:.75rem; margin-bottom:1.25rem; }
.page-head h1 { font-size:1.5rem; margin:0; }
.card { border:none; box-shadow:0 1px 3px rgba(0,0,0,.08); }
.table-responsive { background:#fff; border-radius:.5rem; }
.stat-card { border-radius:.6rem; padding:1.1rem 1.25rem; color:#fff; }
.stat-card .v { font-size:1.7rem; font-weight:700; line-height:1.1; }
.stat-card .l { opacity:.85; font-size:.85rem; }

/* Login */
.login-wrap { display:flex; min-height:100vh; align-items:center; justify-content:center; padding:1rem; }
.login-card { width:100%; max-width:380px; }

/* Invoice line editor */
.line-row td { vertical-align:middle; }
.line-row .desc { min-width:200px; }
table.lines input { border:1px solid #dee2e6; }

/* print invoice */
@media print {
  .no-print { display:none !important; }
}
