:root {
  --sidebar-w: 250px;
  --brand: #1e6b3c;
  --brand-dark: #154d2b;
}
* { box-sizing: border-box; }
body { background: #f4f6f8; font-family: 'Segoe UI', Roboto, Arial, sans-serif; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); background: var(--brand-dark); color: #fff; flex-shrink: 0;
  position: fixed; top: 0; bottom: 0; left: 0; overflow-y: auto; z-index: 1000;
  transition: transform .2s ease;
}
.sidebar-brand { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 1rem; font-weight: 600; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand-logo { height: 32px; width: auto; border-radius: 4px; }
.sidebar-close {
  display: none; background: transparent; border: none; color: rgba(255,255,255,.75);
  font-size: 1.1rem; line-height: 1; padding: .25rem .4rem; border-radius: .3rem;
}
.sidebar-close:hover { background: rgba(255,255,255,.1); color: #fff; }
.sidebar-nav { padding: .5rem 0 2rem; }
.nav-section { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: rgba(255,255,255,.5); padding: .9rem 1rem .3rem; }
.nav-link { display: flex; align-items: center; gap: .6rem; color: rgba(255,255,255,.85); padding: .5rem 1rem; font-size: .92rem; }
.nav-link:hover, .nav-link.active { background: rgba(255,255,255,.08); color: #fff; }
.nav-group-toggle {
  width: 100%; background: transparent; border: none; cursor: pointer; text-align: left;
  font: inherit; color: inherit;
}
.nav-group-chevron { transition: transform .2s ease; font-size: .75rem; opacity: .75; }
.nav-group-toggle.collapsed .nav-group-chevron { transform: rotate(-90deg); }
.nav-group-body { padding: .15rem 0 .4rem; background: rgba(0,0,0,.12); }
.nav-sublink { padding-left: 2.2rem; font-size: .88rem; }
.sidebar-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 999;
}
.sidebar-backdrop.show { display: block; }
.main-col { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { background: #fff; border-bottom: 1px solid #e5e7eb; padding: .6rem 1.2rem; display: flex; align-items: center; position: sticky; top: 0; z-index: 900; }
.content { padding: 1.25rem; flex: 1; }
.card { border: 1px solid #e9ecef; border-radius: .6rem; }
.kpi-card { border-radius: .75rem; color: #fff; padding: 1rem 1.2rem; }
.kpi-card h3 { margin: 0; font-size: 1.6rem; font-weight: 700; }
.kpi-card small { opacity: .85; }
.table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: #6c757d; border-bottom-width: 1px; }
.auth-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--brand-dark), var(--brand)); }
.auth-card { background: #fff; border-radius: .8rem; padding: 2rem; width: 100%; max-width: 400px; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.line-item-row td { vertical-align: middle; }
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.show { transform: translateX(0); }
  .sidebar-close { display: inline-block; }
  .main-col { margin-left: 0; }
}
@media print {
  .no-print { display: none !important; }
}