body { background: #f5f6f8; }
.sidebar { width: 230px; flex-shrink: 0; min-height: calc(100vh - 56px); }
@media (min-width: 992px) { .sidebar { position: sticky; top: 56px; height: calc(100vh - 56px); overflow-y: auto; display: flex; flex-direction: column; } }
.sidebar .nav-link { color: #333; border-radius: .375rem; padding: .45rem .75rem; }
.sidebar .nav-link i { width: 1.4rem; display: inline-block; }
.sidebar .nav-link.active, .sidebar .nav-link:hover { background: #0d6efd; color: #fff; }
.main-content { min-width: 0; }
.card { border: 0; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.stat-card .stat-value { font-size: 1.6rem; font-weight: 600; }
.table td, .table th { vertical-align: middle; }
.actions { white-space: nowrap; }
/* POS */
.pos-results { max-height: calc(100vh - 250px); overflow-y: auto; }
.pos-item { cursor: pointer; transition: .1s; }
.pos-item:hover { background: #e9f2ff; }
.pos-cart { max-height: calc(100vh - 460px); min-height: 180px; overflow-y: auto; }
.pos-total { font-size: 2rem; font-weight: 700; }
.pos-cart input.qty { width: 64px; }
.event-tag { font-size: .7rem; }

/* ---------- Camera scanner ---------- */
.scan-reader { width: 100%; min-height: 240px; overflow: hidden; }
.scan-reader video { width: 100% !important; height: auto !important; object-fit: cover; border-radius: .375rem; }
.scan-btn { white-space: nowrap; }

/* ---------- Mobile / tablet ---------- */
.pos-mobile-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; display: flex; align-items: center; gap: .25rem;
  background: #212529; color: #fff; padding: .5rem .75rem calc(.5rem + env(safe-area-inset-bottom)); box-shadow: 0 -2px 8px rgba(0,0,0,.25); }
.pos-mobile-bar .btn { min-height: 46px; }
@media (max-width: 991.98px) {
  body.page-pos { padding-bottom: 80px; }
  .pos-results { max-height: 45vh; }
  .pos-cart { max-height: none; min-height: 120px; }
  .pos-total { font-size: 1.6rem; }
  .pos-cart .input-group .btn { min-width: 36px; }
  .navbar-brand { max-width: 55vw; font-size: 1.05rem; }
}
@media (max-width: 575.98px) {
  h4 { font-size: 1.2rem; }
  .table { font-size: .875rem; }
  .actions .btn { padding: .3rem .5rem; }
  .card-body { padding: .75rem; }
  .form-control, .form-select { font-size: 16px; } /* stops iOS zoom on focus */
}
.pos-toast { top: 60px; }
@media (max-width: 991.98px) { .pos-toast { top: auto; bottom: 84px; } }
