/* OG Asset Manager — base styles. Bootstrap 5.3 underneath. */
:root {
    --og-navy: #14213d;
    --og-navy-2: #1d2d50;
    --og-gold: #c99a2e;
    --og-bg: #f5f6f8;
    --sidebar-w: 248px;
    --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --bs-primary: #1f4e8c;
    --bs-primary-rgb: 31, 78, 140;
    --bs-link-color: #1f4e8c;
    --bs-link-color-rgb: 31, 78, 140;
}
body { background: var(--og-bg); font-size: .925rem; }
.btn-primary { --bs-btn-bg: #1f4e8c; --bs-btn-border-color: #1f4e8c; --bs-btn-hover-bg: #183f72; --bs-btn-hover-border-color: #183f72; --bs-btn-active-bg: #143560; }
.btn-outline-primary { --bs-btn-color: #1f4e8c; --bs-btn-border-color: #1f4e8c; --bs-btn-hover-bg: #1f4e8c; --bs-btn-hover-border-color: #1f4e8c; }
.text-bg-primary { background-color: #1f4e8c !important; }

.brand-mark { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--og-gold); color: var(--og-navy); font-weight: 700; letter-spacing: .5px; }
.brand-text { color: #fff; font-weight: 600; font-size: 1.05rem; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar { background: var(--og-navy); color: #c9d1e3; width: var(--sidebar-w); display: flex; flex-direction: column; }
@media (min-width: 992px) {
    /* Bootstrap forces .offcanvas-lg transparent on desktop; keep the navy sidebar. */
    .sidebar, .sidebar.offcanvas-lg { position: fixed; inset: 0 auto 0 0; background-color: var(--og-navy) !important; z-index: 1030; }
    .main { margin-left: var(--sidebar-w); }
}
.sidebar.offcanvas-lg { --bs-offcanvas-bg: var(--og-navy); --bs-offcanvas-width: var(--sidebar-w); }
.sidebar-brand { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 14px; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 0 10px 12px; }
.nav-section { text-transform: uppercase; font-size: .68rem; letter-spacing: .08em; color: #7d8bab; margin: 16px 10px 6px; font-weight: 600; }
.sidebar .nav-link { display: flex; align-items: center; gap: 10px; color: #c9d1e3; padding: 8px 10px; border-radius: 8px; font-size: .9rem; }
.sidebar .nav-link i { font-size: 1.05rem; width: 20px; text-align: center; }
.sidebar .nav-link:hover { background: var(--og-navy-2); color: #fff; }
.sidebar .nav-link.active { background: rgba(201, 154, 46, .16); color: #fff; box-shadow: inset 3px 0 0 var(--og-gold); }
.sidebar-user { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.08); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: 12px; padding: 14px 24px; background: rgba(245,246,248,.92); backdrop-filter: blur(6px); border-bottom: 1px solid #e3e6ec; }
.page-title { font-size: 1.25rem; font-weight: 600; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-subtitle { color: #6c757d; font-size: .85rem; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.content { padding: 20px 24px 96px; }
@media (max-width: 575.98px) { .content { padding: 14px 12px 96px; } .topbar { padding: 10px 12px; } .page-actions .btn-label { display: none; } }

.card { border: 1px solid #e3e6ec; border-radius: 12px; box-shadow: none; }
.card-header { background: #fff; border-bottom: 1px solid #eef0f4; font-weight: 600; border-radius: 12px 12px 0 0 !important; }
.table > :not(caption) > * > * { padding: .6rem .75rem; }
.table thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: #6c757d; font-weight: 600; background: #fafbfc; white-space: nowrap; }
.table-card { margin: 0; }
.table-card td, .table-card th { vertical-align: middle; }
.stat-card .stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.stat-card .stat-label { color: #6c757d; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.code-chip { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; background: #eef2f8; color: #1f4e8c; padding: 2px 6px; border-radius: 5px; white-space: nowrap; }
.dl-grid { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 6px 12px; margin: 0; }
.dl-grid dt { color: #6c757d; font-weight: 500; }
.dl-grid dd { margin: 0; word-break: break-word; }
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 16px 22px; }
.timeline li::before { content: ''; position: absolute; left: 5px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: #1f4e8c; }
.timeline li::after { content: ''; position: absolute; left: 9px; top: 18px; bottom: 0; width: 1px; background: #d6dbe4; }
.timeline li:last-child::after { display: none; }
.form-label { font-weight: 500; font-size: .85rem; }
.required::after { content: ' *'; color: #dc3545; }
.empty-state { text-align: center; padding: 48px 16px; color: #6c757d; }
.empty-state i { font-size: 2.4rem; display: block; margin-bottom: 8px; color: #adb5bd; }

.bottom-bar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 1030; display: flex; justify-content: space-around; align-items: center; background: #fff; border-top: 1px solid #e3e6ec; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
.bottom-bar a { display: flex; flex-direction: column; align-items: center; color: #6c757d; text-decoration: none; font-size: .7rem; min-width: 64px; }
.bottom-bar a i { font-size: 1.3rem; }
.bottom-bar a.active { color: #1f4e8c; }
.bottom-bar .scan-btn { width: 58px; height: 58px; margin-top: -26px; border-radius: 50%; background: var(--og-navy); color: #fff; justify-content: center; box-shadow: 0 4px 14px rgba(20,33,61,.35); border: 3px solid var(--og-gold); }
.bottom-bar .scan-btn i { font-size: 1.6rem; }

.login-page { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, var(--og-navy) 0%, #24385f 100%); padding: 16px; }
.login-card { width: 100%; max-width: 420px; border-radius: 16px; }
.login-card .brand-mark { width: 44px; height: 44px; }

@media print {
    .sidebar, .topbar, .bottom-bar, .no-print, #offline-banner { display: none !important; }
    .main { margin: 0 !important; }
    .content { padding: 0 !important; }
    body { background: #fff; }
}
