/* Pharmaceutical Stock Monitor – plain CSS, no build step */
:root { --brand: #1F4FD6; --brand-dark: #06143F; --sidebar-w: 250px; }
body { background: #f5f7fb; color: #1d2433; font-size: .925rem; }
a { color: var(--brand); }
.app-shell { display: flex; min-height: 100vh; }

.sidebar { width: var(--sidebar-w); background-color: var(--brand-dark) !important; color: #cfd6e6; flex-shrink: 0; }
@media (min-width: 992px) { .sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; visibility: visible !important; transform: none !important; } }
.sidebar-brand { display: flex; gap: .6rem; align-items: center; padding: 1rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-logo { height: 36px; width: auto; }
.brand-title { color: #fff; font-weight: 600; line-height: 1.2; font-size: .95rem; }
.brand-sub { font-size: .72rem; color: #9aa6c2; }
.sidebar-nav { padding: .5rem 0 2rem; display: flex; flex-direction: column; }
.sidebar-nav a { color: #cfd6e6; text-decoration: none; padding: .5rem 1rem; display: flex; gap: .6rem; align-items: center; border-left: 3px solid transparent; }
.sidebar-nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.sidebar-nav a.active { background: rgba(255,255,255,.09); color: #fff; border-left-color: #6f9bff; }
.nav-section { text-transform: uppercase; font-size: .68rem; letter-spacing: .06em; color: #7f8bab; padding: 1rem 1rem .3rem; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { background: #fff; border-bottom: 1px solid #e4e8f0; padding: .55rem 1.25rem; display: flex; align-items: center; gap: .75rem; position: sticky; top: 0; z-index: 1020; }
.content { padding: 1.25rem; }
@media (max-width: 576px) { .content { padding: .75rem; } }
.page-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: .75rem; margin-bottom: 1rem; }
.page-header h1 { font-size: 1.35rem; margin: 0; font-weight: 600; color: var(--brand-dark); }
.page-header .subtitle { color: #6b7488; font-size: .85rem; }

.card { border: 1px solid #e4e8f0; box-shadow: none; border-radius: .5rem; }
.card-header { background: #fff; font-weight: 600; border-bottom: 1px solid #eef1f6; }
.stat { padding: .9rem 1rem; height: 100%; }
.stat .label { font-size: .78rem; color: #6b7488; }
.stat .value { font-size: 1.55rem; font-weight: 700; color: var(--brand-dark); line-height: 1.2; }
.stat .hint { font-size: .75rem; color: #8a93a6; }
.stat.good .value { color: #1B8A5A; } .stat.warn .value { color: #b7791f; } .stat.orange .value { color: #d9480f; } .stat.bad .value { color: #c92a2a; }
.stat a.stretched-link { color: inherit; }

/* stock status colours */
.badge.status-adequate { background: #d3f2e1; color: #11643f; }
.badge.status-low { background: #fff1c2; color: #8a5a00; }
.badge.status-critical { background: #ffd8bf; color: #a63b00; }
.badge.status-out_of_stock { background: #ffd6d6; color: #a61e1e; }
.badge.status-not_reported { background: #e6e8ee; color: #4b5263; }
.badge.status-stale { background: #3d4454; color: #fff; }
.badge.cls-uncategorized { background: #ffe3e3; color: #a61e1e; }
.badge.cls-auto_classified { background: #e7efff; color: #1F4FD6; }
.badge.cls-verified { background: #d3f2e1; color: #11643f; }
.text-orange { color: #d9480f; } .bg-orange { background: #d9480f; }

.filters { background: #fff; border: 1px solid #e4e8f0; border-radius: .5rem; padding: .75rem; margin-bottom: 1rem; }
.filters .form-label { font-size: .75rem; color: #6b7488; margin-bottom: .15rem; }
.report-meta { font-size: .8rem; color: #4b5263; background: #f8f9fc; border: 1px dashed #d8deea; border-radius: .4rem; padding: .5rem .75rem; }
table.dataTable td, table.dataTable th { font-size: .85rem; vertical-align: middle; }
table.dataTable thead th { background: #f1f4fa; color: #283149; font-weight: 600; white-space: nowrap; }
.table-tight td, .table-tight th { padding: .35rem .5rem; font-size: .85rem; }
.chart-box { position: relative; height: 280px; }
.audit-json { max-width: 380px; max-height: 160px; overflow: auto; background: #f8f9fc; padding: .3rem; border-radius: .25rem; white-space: pre-wrap; }
.tracer-zero { background: #ffe0e0 !important; color: #a61e1e; font-weight: 600; }
.select2-container--bootstrap-5 .select2-selection { min-height: calc(1.5em + .5rem + 2px); font-size: .875rem; }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #f5f7fb 0%, #e6ecf8 100%); }
.login-card { width: 100%; max-width: 410px; }
@media print { .sidebar, .topbar, .filters, .no-print, .dataTables_filter, .dataTables_length, .dataTables_paginate { display: none !important; } .content { padding: 0; } }
