/* =====================================================
   SMARTMOP - RESPONSIVE
   ===================================================== */
@media (max-width: 1280px) {
    .dash { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .dash > .stack:last-child { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; align-items: start; }
}
@media (max-width: 1100px) {
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .app { grid-template-columns: minmax(0, 1fr); }
    .sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); transform: translateX(-100%); transition: transform 0.25s ease; }
    .sidebar.open { transform: none; }
    .scrim.show { display: block; position: fixed; inset: 0; z-index: 20; background: rgba(15, 25, 45, 0.5); }
    .menu-btn { display: grid; }
    .topbar, .page { padding-left: 16px; padding-right: 16px; }
    .topbar h1 { font-size: 24px; }
    .clock { border-left: 0; padding-left: 0; }
    .two-col { grid-template-columns: 1fr !important; }
}
@media (max-width: 680px) {
    .dash { grid-template-columns: minmax(0, 1fr); }
    .dash > .stack:last-child { grid-template-columns: 1fr; }
    /* Status tiles: one compact row instead of three full-width cards */
    .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .stat { padding: 12px; gap: 0; }
    .stat-icon, .stat-body small { display: none; }
    .stat-body > span { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .stat-body strong { font-size: 16px; }
    .stat-body .progress { margin-top: 6px; height: 6px; }
    .card { padding: 16px; }
    .topbar { padding-top: 16px; gap: 12px; }
    .topbar h1 { font-size: 20px; }
    .topbar p, .clock small { display: none; }
    .top-actions { gap: 12px; width: 100%; }
    .clock strong { font-size: 16px; }
    .form-grid { grid-template-columns: 1fr; }
    .settings-card { padding: 18px; }
    .btn-emergency { width: 100%; justify-content: center; }
    .cam-tools button { min-width: 52px; }
    .bell-menu { right: auto; left: 0; width: min(320px, 86vw); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .sidebar { transition: none; } }
