:root { --sidebar-w: 248px; --brand: #0d6efd; }
body.app { background: var(--bs-tertiary-bg); }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); flex-shrink: 0; background: var(--bs-body-bg); border-right: 1px solid var(--bs-border-color);
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; z-index: 1040; }
.sidebar-dark { background: #111827; border-color: #1f2937; }
.sidebar .brand { display: flex; align-items: center; gap: .6rem; padding: 1rem 1.25rem; font-weight: 700; font-size: 1.1rem;
  text-decoration: none; color: inherit; border-bottom: 1px solid var(--bs-border-color); }
.sidebar-dark .brand { color: #fff; border-color: #1f2937; }
.sidebar .brand i { color: var(--brand); font-size: 1.4rem; }
.nav-scroll { overflow-y: auto; padding: .5rem 0 2rem; flex: 1; }
.nav-section { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #6b7280; padding: 1rem 1.25rem .35rem; }
.nav-link-item { display: flex; align-items: center; gap: .7rem; padding: .45rem 1.25rem; color: var(--bs-body-color); text-decoration: none; font-size: .9rem; border-left: 3px solid transparent; }
.sidebar-dark .nav-link-item { color: #d1d5db; }
.nav-link-item:hover { background: rgba(127,127,127,.1); }
.nav-link-item.active { border-left-color: var(--brand); background: rgba(13,110,253,.12); color: var(--brand); font-weight: 600; }
.sidebar-dark .nav-link-item.active { color: #fff; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: .75rem; padding: .6rem 1.25rem; background: var(--bs-body-bg); border-bottom: 1px solid var(--bs-border-color); position: sticky; top: 0; z-index: 1030; }
.topbar-search { align-items: center; gap: .5rem; flex: 1; max-width: 480px; }
.content { padding: 1.25rem; }
.page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.card { border-color: var(--bs-border-color-translucent); box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.card-header { background: transparent; font-weight: 600; }
.stat-card .stat-icon { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-size: 1.25rem; }
.stat-card .stat-value { font-size: 1.35rem; font-weight: 700; line-height: 1.1; }
.stat-card .stat-label { font-size: .8rem; color: var(--bs-secondary-color); }
.table > :not(caption) > * > * { vertical-align: middle; }
.table-sm td, .table-sm th { font-size: .875rem; }
.table thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--bs-secondary-color); white-space: nowrap; }
.filter-bar { display: flex; gap: .5rem; flex-wrap: wrap; align-items: end; }
.filter-bar .form-control, .filter-bar .form-select { width: auto; min-width: 140px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #0f172a, #1e3a8a); padding: 1rem; }
.auth-card { width: 100%; max-width: 400px; }
@media (max-width: 991px) {
  .sidebar { position: fixed; left: calc(-1 * var(--sidebar-w)); transition: left .2s; }
  .sidebar.open { left: 0; }
}
@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .content { padding: 0; }
  body.app { background: #fff; }
}
