/* Mobile specific enhancements */
@media (max-width: 768px){
  body { font-size:14px; }
  h1,h2 { font-size:clamp(1.2rem,4vw,1.6rem); }
  h3 { font-size:clamp(1.05rem,3.6vw,1.25rem); }
  .table { font-size:.82rem; }
  .table td,.table th { padding:.35rem .45rem; }
  .form-floating > label { font-size:.78rem; }
  .btn, .nav-link { min-height:40px; font-size:.9rem; padding:.45rem .75rem; }
  .navbar-brand { font-size:.95rem; }
  .action-bar-sticky { flex-wrap:wrap; justify-content:center; gap:.5rem; padding:.5rem .75rem; }
  .fab-add { width:46px; height:46px; font-size:1.1rem; }
  .card, .card-glass { box-shadow:0 2px 8px rgba(0,0,0,.12); }
  .summary-bar { gap:.25rem .5rem; }
  .summary-bar .item { font-size:.68rem; }
  .form-section { padding:.75rem .85rem; }
  /* extra spacing to avoid FAB overlap */
  main { padding-bottom:70px; }

  /* Office filter horizontal scrolling (reinforced) */
  .office-scroll { overflow-x:auto; -webkit-overflow-scrolling:touch; display:flex; flex-wrap:nowrap; gap:.5rem; padding-bottom:.25rem; white-space:nowrap; }
  .office-scroll .nav-item { display:inline-block; }
  .office-tab-btn { white-space:nowrap; padding:.35rem .6rem; font-size:.85rem; }
}

/* Horizontal scroll helper */
.table-responsive { overflow-x:auto; }

/* Improve tap targets */
.nav-link, .btn { padding:.55rem .9rem; }

/* Utility classes */
.hide-mobile { display:none !important; }
@media (min-width: 769px){ .hide-mobile { display:initial !important; } }

/* Accessibility */
:focus-visible { outline:2px solid #2563eb; outline-offset:2px; }

/* Dark mode preference */
@media (prefers-color-scheme: dark){
  body { background:#0f172a; color:#e2e8f0; }
  .card, .card-glass, .form-section { background:#1e293b; color:#e2e8f0; }
  .table-modern thead { background:#1e293b; }
  .table-modern tbody tr:hover { background:#334155; }
  .navbar, .sidebar { background:#1e293b !important; }
  .offline-indicator { background:#b91c1c; }
}
