:root { --sidebar-w: 240px; }
body { background: var(--bs-tertiary-bg); }
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w); background: #111827; color: #cbd5e1;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 1rem .75rem;
}
.sidebar-brand { display: flex; align-items: center; color: #fff; font-weight: 700; padding: .25rem .5rem 1rem; font-size: 1.05rem; }
.sidebar .nav-link { color: #cbd5e1; border-radius: .5rem; padding: .55rem .75rem; display: flex; align-items: center; font-size: .92rem; }
.sidebar .nav-link:hover { background: #1f2937; color: #fff; }
.sidebar .nav-link.active { background: #2563eb; color: #fff; }
.main-area { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; padding: .6rem 1rem; background: var(--bs-body-bg); border-bottom: 1px solid var(--bs-border-color); position: sticky; top: 0; z-index: 20; }
.content { flex: 1 1 auto; }
.stat-card { border: 0; box-shadow: 0 1px 2px rgba(0,0,0,.06); height: 100%; }
.stat-card .label { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--bs-secondary-color); }
.stat-card .value { font-size: 1.45rem; font-weight: 700; line-height: 1.2; }
.stat-card .sub { font-size: .75rem; color: var(--bs-secondary-color); }
.chart-box { position: relative; height: 280px; }
.table-sm td, .table-sm th { vertical-align: middle; }
th.sortable { cursor: pointer; white-space: nowrap; user-select: none; }
th.sortable:hover { text-decoration: underline; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; }
.pos { color: #16a34a; } .neg { color: #dc2626; }
@media (max-width: 991.98px) {
  .sidebar { position: fixed; left: calc(-1 * var(--sidebar-w)); z-index: 1040; transition: left .2s; }
  .sidebar.open { left: 0; }
}
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.dest-row { border: 1px solid var(--bs-border-color); border-radius: .5rem; padding: .75rem; margin-bottom: .75rem; background: var(--bs-body-bg); }
