/* Tata letak HP (Android). Semua halaman & fungsi sama dengan versi desktop; hanya susunannya. */
@media (max-width: 820px) {
  body { flex-direction: column; }
  button, input, select, textarea { font-size: 15px; }
  .field input, .field select, .field textarea, .filters input, .filters select, .search-big { font-size: 16px; }

  /* Bilah atas: logo + tombol muat ulang / buka spreadsheet */
  .sidebar { width: 100%; flex-direction: row; align-items: center; gap: 8px; padding: 8px 12px; flex-shrink: 0; }
  .brand { padding: 0; gap: 8px; min-width: 0; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-name { font-size: 14px; white-space: nowrap; }
  .brand-sub { display: none; }
  .sidebar-foot { margin: 0 0 0 auto; flex-direction: row; align-items: center; gap: 6px; }
  .clock { display: none; }
  .btn-ghost { padding: 7px 9px; font-size: 12px; white-space: nowrap; }
  .sync { display: none; }

  /* Menu di bawah layar */
  .nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; flex-direction: row; gap: 2px;
    background: var(--side); padding: 6px 4px 8px; border-top: 1px solid #3d2e33;
  }
  .nav-item { flex: 1; flex-direction: column; justify-content: center; gap: 4px; padding: 6px 2px; font-size: 11px; text-align: center; position: relative; line-height: 1.15; }
  .nav-badge { position: absolute; top: 0; left: calc(50% + 8px); margin: 0; }

  .main { padding: 14px 12px 92px; }
  .page-head { margin-bottom: 14px; gap: 12px; }
  .page-head h1 { font-size: 20px; }
  .page-head p { font-size: 13px; }
  .stats { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat { min-width: 0; padding: 8px 12px; }
  .stat span { font-size: 18px; }

  /* Kalender: geser ke samping untuk melihat seminggu penuh */
  .cal-title { font-size: 17px; }
  .calendar { overflow-x: auto; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
  .week { min-width: 820px; }
  .day-num { font-size: 40px; }
  .legend { gap: 8px; }

  /* Form & daftar */
  .split, .order-cols { grid-template-columns: minmax(0, 1fr); }
  .split > *, .order-cols > * { min-width: 0; }
  .form { position: static; padding: 14px; }
  .report { padding: 14px; min-height: 0; }
  .filters { width: 100%; }
  .filters > * { flex: 1 1 140px; }
  .filters input[type=search] { width: 100%; }
  .jentry { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 8px; padding: 10px 2px; }
  .order-list { max-height: none; }

  /* Detail (modal) muncul dari bawah */
  .modal { padding: 0; place-items: end stretch; }
  .modal-box { width: 100%; max-height: 92vh; border-radius: 14px 14px 0 0; }
  .modal-body { padding: 18px 16px 24px; }
  .modal-body h2 { font-size: 18px; }
  .kv { grid-template-columns: 1fr; }
  .m-actions .btn { flex: 1 1 auto; padding: 11px 14px; }
  .m-list li { flex-wrap: wrap; }

  .toast { bottom: 88px; max-width: calc(100% - 24px); text-align: center; }
}
