body { background-color: #f8f9fa; }
.table-sticky thead th { position: sticky; top: 0; background: #fff; z-index: 2; }
.toast-container { position: fixed; bottom: 1rem; right: 1rem; z-index: 1080; }
@media print { .navbar, .btn, .toast-container { display: none !important; } }

/* Improve responsive container on small devices/landscape */
@media (max-width: 992px) {
  .container { max-width: 100%; padding-left: 8px; padding-right: 8px; }
}

.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Compact action buttons on narrow landscape */
@media (max-width: 820px) and (orientation: landscape) {
  .table-responsive .btn { padding: .2rem .45rem; font-size: .85rem; }
}

/* Mobile stacked table for narrow screens */
@media (max-width: 576px) {
  .table-responsive-stack table,
  .table-responsive-stack thead,
  .table-responsive-stack tbody,
  .table-responsive-stack th,
  .table-responsive-stack td,
  .table-responsive-stack tr { display: block; width: 100%; }

  .table-responsive-stack thead { display: none; }

  .table-responsive-stack tr { border: 1px solid #e9ecef; border-radius: .25rem; margin-bottom: .75rem; background: #fff; }

  .table-responsive-stack td { position: relative; padding-left: 48%; border: 0; border-bottom: 1px solid #e9ecef; }
  .table-responsive-stack td:last-child { border-bottom: 0; }
  .table-responsive-stack td::before {
    content: attr(data-label);
    position: absolute;
    left: .75rem;
    top: .5rem;
    width: 44%;
    font-weight: 600;
    color: #6c757d;
    white-space: nowrap;
  }

  .table-responsive-stack .actions { display: flex; gap: .5rem; padding-top: .25rem; }
}

