:root {
    --brand: #7b1e3a;
    --brand-dark: #4e1024;
    --brand-soft: #f6e9ee;
}
body { background: #f4f5f7; font-size: .925rem; }
.sidebar {
    width: 250px; min-height: 100vh; background: linear-gradient(180deg, var(--brand-dark), #2b0a15);
    color: #fff; position: sticky; top: 0; height: 100vh; overflow-y: auto; flex-shrink: 0;
}
.sidebar .brand { display: flex; gap: .75rem; align-items: center; padding: 1.1rem 1rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar .brand i { font-size: 1.8rem; color: #f3c969; }
.sidebar .nav-link { color: rgba(255,255,255,.8); padding: .45rem 1rem; border-radius: .4rem; margin: 1px .5rem; display: flex; gap: .6rem; align-items: center; }
.sidebar .nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar .nav-link.active { background: var(--brand); color: #fff; }
.sidebar .nav-header { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.45); padding: 1rem 1.5rem .3rem; }
.main-col { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.main-col main { flex: 1; }
.app-footer { text-align: center; font-size: .8rem; color: #6b7280; padding: .75rem 1rem; border-top: 1px solid #e5e7eb; background: #fff; }
.topbar { background: #fff; border-bottom: 1px solid #e5e7eb; padding: .7rem 1.25rem; display: flex; align-items: center; gap: .75rem; position: sticky; top: 0; z-index: 10; }
.card { border: 0; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.card-header { background: #fff; font-weight: 600; }
.stat-card .icon { width: 46px; height: 46px; border-radius: .6rem; display: grid; place-items: center; font-size: 1.35rem; }
.btn-brand { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-brand:hover { background: var(--brand-dark); color: #fff; }
.table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: #6b7280; background: #f9fafb; white-space: nowrap; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-section td { background: var(--brand-soft) !important; font-weight: 700; }
.row-bold td, .row-total td { font-weight: 700; }
.row-total td { border-top: 2px solid #333; }
.badge-status-completed, .badge-status-posted, .badge-status-delivered, .badge-status-sent { background: #198754; }
.badge-status-voided, .badge-status-cancelled, .badge-status-failed { background: #dc3545; }
.badge-status-pending, .badge-status-dispatched { background: #fd7e14; }
.badge-status-manual { background: #0d6efd; }
.badge-status-disabled { background: #6c757d; }

@media (max-width: 991.98px) {
    .sidebar { position: fixed; left: -260px; z-index: 1050; transition: left .2s; }
    .sidebar.show { left: 0; }
}

/* POS */
.pos-wrap { height: calc(100vh - 120px); }
.pos-products { overflow-y: auto; }
.pos-cart { display: flex; flex-direction: column; height: 100%; }
.pos-cart .lines { flex: 1; overflow-y: auto; }
.product-tile { cursor: pointer; transition: transform .08s; border: 1px solid #eee !important; }
.product-tile:hover { transform: translateY(-2px); border-color: var(--brand) !important; }
.pos-total { font-size: 2rem; font-weight: 800; color: var(--brand); }

@media print {
    body { background: #fff; }
    .main-col main { padding: 0 !important; }
}
