:root { --brand: #2b3a55; --brand-accent: #8a6d3b; }
body { background: #f4f5f8; }
.bg-brand { background: var(--brand) !important; }
.btn-brand { background: var(--brand-accent); color: #fff; border: 0; }
.btn-brand:hover { background: #75592e; color: #fff; }
.app-shell { min-height: 100vh; }
.sidebar { --bs-offcanvas-width: min(300px, 85vw); color: #fff; }
.sidebar-header { display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: 1rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.sidebar-brand, .mobile-brand { color: inherit; font-size: 1.1rem; font-weight: 600; text-decoration: none; }
.brand-logo { max-width: 32px; max-height: 32px; object-fit: contain; margin-right: .5rem; vertical-align: middle; }
.document-brand { display: flex; align-items: center; gap: .75rem; }
.document-logo { display: block; max-width: 160px; max-height: 72px; object-fit: contain; }
.company-details { line-height: 1.35; }
.company-address { white-space: pre-line; }
.sidebar-body { display: flex; flex-direction: column; padding: 1rem; }
.sidebar-nav .nav-link { color: rgba(255,255,255,.78); border-radius: .375rem; padding: .65rem .8rem; }
.sidebar-nav .nav-link:hover, .sidebar-nav .nav-link.active { color: #fff; background: rgba(255,255,255,.14); }
.sidebar-dropdown .dropdown-menu { position: static !important; width: 100%; margin: .25rem 0 .5rem; transform: none !important; background: rgba(0,0,0,.12); border: 0; }
.sidebar-dropdown .dropdown-item { color: rgba(255,255,255,.78); }
.sidebar-dropdown .dropdown-item:hover, .sidebar-dropdown .dropdown-item:focus { color: #fff; background: rgba(255,255,255,.14); }
.sidebar-account { display: flex; flex-direction: column; align-items: flex-start; gap: .65rem; margin-top: auto; padding: 1rem .8rem .25rem; border-top: 1px solid rgba(255,255,255,.12); }
.sidebar-user { line-height: 1.6; }
.mobile-header { display: flex; align-items: center; gap: 1rem; min-height: 64px; padding: .75rem 1rem; background: #fff; border-bottom: 1px solid #dee2e6; }
.mobile-brand { color: var(--brand); }
.app-main { min-width: 0; flex: 1; }
.stat-card .display-6 { font-size: 1.8rem; font-weight: 600; }
.card { border: 0; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.login-wrap { max-width: 420px; margin: 8vh auto 0; }
main.container-xl { padding-top: 1rem; padding-bottom: 3rem; }
.table > :not(caption) > * > * { vertical-align: middle; }
@media (min-width: 992px) {
  .app-shell { display: flex; }
  .sidebar { position: sticky; top: 0; flex: 0 0 260px; width: 260px; height: 100vh; border-right: 0 !important; }
  .sidebar-header { min-height: 72px; }
  .sidebar-body { height: calc(100vh - 72px); overflow-y: auto; }
}
/* Larger touch targets on small screens */
@media (max-width: 767.98px) {
  .btn, .form-control, .form-select { min-height: 44px; }
  .btn-sm { min-height: 36px; }
  h1.h3 { font-size: 1.3rem; }
}
@media print {
  .no-print, nav, .alert { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}
