/* ════════════════════════════════════════════════════════════════
   mobile.css — MKT NVG Tool
   Nội dung: Hamburger button, Sidebar overlay, Task card mobile,
             Mobile filter bar, @media 900px, @media 480px
   Patch M1 — tách từ index.html dòng 735–887
   ════════════════════════════════════════════════════════════════ */

/* ── RESPONSIVE — desktop defaults ── */
.hamburger {
  display: none;
  position: fixed; top: 12px; left: 12px; z-index: 200;
  background: var(--navy); color: var(--white);
  border: none; border-radius: 8px; padding: 8px 10px;
  font-size: 18px; cursor: pointer;
}
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 98;
}
.sidebar-overlay.show { display: block; }

/* ── TASK CARD (mobile only) ── */
.task-card-mobile {
  background: var(--white);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(26,53,87,.08);
  border-left: 4px solid var(--gray-200);
  transition: transform .12s, box-shadow .12s;
  cursor: pointer;
}
.task-card-mobile:active { transform: scale(.98); }
.task-card-mobile.urgent { border-left-color: var(--red); background: #FFF8F8; }
.task-card-mobile.high   { border-left-color: var(--amber); background: #FFFBF5; }
.task-card-mobile.done   { border-left-color: var(--teal); opacity: .72; }
.task-card-mobile .tc-title {
  font-size: 14px; font-weight: 600; color: var(--navy);
  margin-bottom: 4px; line-height: 1.35;
}
.task-card-mobile .tc-meta {
  font-size: 11px; color: var(--gray-400); margin-bottom: 10px;
}
.task-card-mobile .tc-row {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 10px;
}
.task-card-mobile .tc-badges { display: flex; gap: 5px; flex-wrap: wrap; flex: 1; }
.task-card-mobile .tc-right { text-align: right; flex-shrink: 0; }

/* ── MOBILE FILTER BAR ── */
.mob-filter-bar {
  display: none; /* desktop: ẩn */
  background: var(--white);
  padding: 10px 14px 8px;
  border-bottom: 1px solid var(--gray-200);
  gap: 8px; flex-direction: column;
}
.mob-search {
  width: 100%; height: 40px; padding: 0 14px;
  border: 1.5px solid #CBD5E1; border-radius: 10px;
  font-size: 14px; color: #1E293B; background: #F8FAFC;
  outline: none;
}
.mob-search:focus { border-color: var(--navy-mid); background: #fff; }
.mob-selects { display: flex; gap: 8px; }
.mob-selects select {
  flex: 1; height: 36px; padding: 0 8px;
  border: 1.5px solid #CBD5E1; border-radius: 8px;
  font-size: 12px; color: #1E293B; background: #fff;
  cursor: pointer; outline: none;
}
.mob-status-scroll {
  display: flex; gap: 6px; overflow-x: auto;
  padding-bottom: 4px; scrollbar-width: none;
}
.mob-status-scroll::-webkit-scrollbar { display: none; }
.mob-status-btn {
  height: 32px; padding: 0 14px;
  border-radius: 20px; border: 1.5px solid #E2E8F0;
  background: #fff; color: #475569;
  font-size: 12px; font-weight: 500;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: all .12s;
}
.mob-status-btn.active {
  background: var(--navy); color: #fff;
  border-color: var(--navy);
}

/* ── MEDIA QUERY 900px ── */
@media (max-width: 900px) {
  /* Sidebar */
  .hamburger { display: flex; align-items: center; }
  .sidebar {
    position: fixed; top: 0; left: -240px; height: 100vh;
    z-index: 99; width: 220px;
    transition: left .25s ease; overflow-y: auto;
  }
  .sidebar.open { left: 0; box-shadow: 4px 0 24px rgba(0,0,0,.35); }
  .main { margin-left: 0 !important; }

  /* Topbar */
  .topbar { padding-left: 52px; height: 50px; }
  .topbar-title { font-size: 14px; }
  .topbar-actions #topbarDate { display: none; }
  .topbar-actions #btnSyncData { display: none; }

  /* Content */
  .content { padding: 12px; }

  /* Stats — 2x2 grid */
  .stats-row { grid-template-columns: repeat(2,1fr); gap: 8px; margin-bottom:12px; }
  .stat-card { padding: 12px; gap:10px; }
  .stat-icon { width:36px;height:36px;font-size:16px; }
  .stat-num { font-size: 22px; }
  .stat-label { font-size: 11px; }

  /* Tabs */
  .tabs { overflow-x: auto; white-space: nowrap; padding-bottom:1px; scrollbar-width:none; }
  .tabs::-webkit-scrollbar { display:none; }
  .tab { padding: 8px 14px; font-size: 12px; flex-shrink:0; }

  /* Filter bar */
  .desktop-filter { display: none !important; }
  .mob-filter-bar { display: flex !important; }

  /* Task table → ẩn, dùng card thay */
  .task-table-wrap { display: none; }
  .task-cards-wrap { display: block; }

  /* Workload grid */
  .workload-grid { grid-template-columns: repeat(2,1fr); }

  /* Kanban — horizontal scroll */
  .kanban-board {
    grid-template-columns: repeat(5,240px);
    overflow-x: auto; padding-bottom:8px;
  }

  /* Modal */
  .modal { width: 96vw !important; }
  .modal-body { padding: 14px 16px; }

  /* Forms */
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
  #workloadPreview { display: none; }

  /* KPI grid */
  .kpi-grid-2 { grid-template-columns: 1fr !important; }
}

/* ── MEDIA QUERY 480px ── */
@media (max-width: 480px) {
  .topbar { padding-left: 48px; height: 48px; }
  .topbar-title { font-size: 13px; }
  .stats-row { gap: 6px; }
  .stat-card { padding: 10px; }
  .workload-grid { grid-template-columns: 1fr; }
  .kanban-board { grid-template-columns: repeat(5,200px); }
  .content { padding: 10px; }
}
