:root {
    --mg-primary: #1F3B64;
    --mg-sidebar: #16253d;
    --mg-bg: #f3f5f9;
}

html, body { height: 100%; }
body { background: var(--mg-bg); font-size: .925rem; }

.app { display: flex; min-height: 100vh; }

.sidebar {
    width: 240px; flex: 0 0 240px; background: var(--mg-sidebar); color: #fff;
    position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 1030;
}
.sidebar .brand { display: block; background: #fff; padding: 14px 18px; text-align: center; }
.sidebar .brand img { max-width: 100%; max-height: 52px; }
.sidebar .nav-section { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.4); padding: 16px 20px 4px; }
.sidebar .nav-link { color: rgba(255,255,255,.8); padding: 9px 20px; display: flex; align-items: center; gap: 10px; border-left: 3px solid transparent; }
.sidebar .nav-link:hover { color: #fff; background: rgba(255,255,255,.06); }
.sidebar .nav-link.active { color: #fff; background: rgba(255,255,255,.1); border-left-color: #f0ad1e; }

.content { flex: 1; min-width: 0; }
.topbar { background: #fff; border-bottom: 1px solid #e3e7ee; padding: 14px 24px; position: sticky; top: 0; z-index: 1020; }

.card { border: 1px solid #e3e7ee; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.stat-card .icon { width: 46px; height: 46px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.35rem; }
.stat-card .value { font-size: 1.5rem; font-weight: 600; }

.table td, .table th { vertical-align: middle; }
.table-sm td, .table-sm th { padding: .4rem .5rem; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mono { font-family: Consolas, "Courier New", monospace; }
input.price-input { max-width: 120px; text-align: right; }
input.qty-input { max-width: 80px; text-align: right; }

.btn-primary { --bs-btn-bg: var(--mg-primary); --bs-btn-border-color: var(--mg-primary); --bs-btn-hover-bg: #152a49; --bs-btn-hover-border-color: #152a49; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #16253d, #1F3B64); padding: 16px; }
.login-card { width: 100%; max-width: 380px; }

.lookup-results { max-height: 320px; overflow-y: auto; }

@media (max-width: 991.98px) {
    .sidebar { position: fixed; left: -260px; transition: left .2s; }
    body.sidebar-open .sidebar { left: 0; }
}
