/* Thành phần dùng chung — phẳng kiểu Android/Material. Chỉ dùng biến từ theme.css. */

/* ===== Nút ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: var(--tap); padding: 0 var(--sp-4);
  border: 1px solid var(--c-border); border-radius: var(--radius);
  background: var(--c-surface); color: var(--c-text);
  font-size: var(--fs); font-weight: 500; line-height: 1.2; white-space: nowrap;
  transition: background .12s, border-color .12s;
  user-select: none; -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--c-surface-2); }
.btn:active { background: #E0E0E0; }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-primary, .btn-ok, .btn-danger { text-transform: uppercase; letter-spacing: .03em; }
.btn-primary { background: var(--c-action); border-color: var(--c-action); color: #fff; }
.btn-primary:hover { background: var(--c-action-hover); border-color: var(--c-action-hover); }
.btn-primary:active { background: #689F38; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--c-primary-dark); text-transform: uppercase; letter-spacing: .03em; }
.btn-ghost:hover { background: var(--c-primary-soft); }
.btn-outline { background: transparent; border-color: var(--c-primary); color: var(--c-primary-dark); }
.btn-outline:hover { background: var(--c-primary-soft); }
.btn-danger { background: var(--c-err); border-color: var(--c-err); color: #fff; }
.btn-danger:hover { background: #D32F2F; border-color: #D32F2F; }
.btn-ok { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.btn-ok:hover { background: var(--c-primary-dark); border-color: var(--c-primary-dark); }
.btn-sm { min-height: 36px; padding: 0 var(--sp-3); font-size: var(--fs-sm); }
.btn-lg { min-height: 56px; padding: 0 var(--sp-5); font-size: var(--fs-lg); }
.btn-block { display: flex; width: 100%; }
.btn-icon { width: var(--tap); padding: 0; font-size: var(--fs-lg); }
.btn-icon.btn-lg { width: 56px; }
/* nút lớn kiểu mẫu: .btn-action (nền #8BC34A, chữ trắng in hoa, cao 72px); bọc trong .btn-action-row */
.btn-action { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 72px; padding: 0 var(--sp-3); border: 0; border-radius: 0; background: var(--c-action); color: #fff; font-size: var(--fs); font-weight: 500; text-transform: uppercase; letter-spacing: .03em; line-height: 1.3; text-align: center; }
.btn-action:active { background: #689F38; }
.btn-action small { font-size: var(--fs); font-weight: 400; text-transform: none; }
.btn-action-row { display: flex; gap: 2px; padding: var(--sp-4); }
.btn-action-row > .btn-action { flex: 1; }
/* nút icon tròn (thanh trên, thanh lọc) */
.icon-btn { display: inline-flex; align-items: center; justify-content: center; flex: none; position: relative; width: 48px; height: 48px; border: 0; border-radius: 50%; background: transparent; color: inherit; padding: 0; }
.icon-btn:active { background: rgba(0, 0, 0, .15); }

/* ===== Card (phẳng: chỉ viền mảnh) ===== */
.card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-lg); overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--c-border); background: var(--c-surface); font-weight: 500; font-size: var(--fs-lg); }
.card-body { padding: var(--sp-4); }
.card-foot { display: flex; align-items: center; justify-content: flex-end; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--c-border); background: var(--c-surface); }

/* ===== List Android (dòng cao 56px, kẻ ngăn) ===== */
.list { background: var(--c-surface); }
.list-item { display: flex; align-items: center; gap: var(--sp-3); min-height: var(--row-h); width: 100%; padding: var(--sp-2) var(--sp-4); border: 0; border-bottom: 1px solid var(--c-border); border-radius: 0; background: var(--c-surface); color: var(--c-text); text-align: left; }
button.list-item:active, a.list-item:active { background: var(--c-surface-2); }
.list-item.active { background: var(--c-primary-soft); }
.list-main { flex: 1; min-width: 0; }
.list-title { font-size: var(--fs); color: var(--c-text); }
.list-sub { font-size: var(--fs-sm); color: var(--c-text-muted); }
.list-end { flex: none; color: var(--c-text-muted); font-variant-numeric: tabular-nums; }
.list-head { padding: var(--sp-3) var(--sp-4) var(--sp-1); font-size: var(--fs-sm); font-weight: 500; color: var(--c-primary-dark); text-transform: uppercase; letter-spacing: .04em; }

/* ===== Form: gạch chân ===== */
.input, .select, .textarea {
  display: block; width: 100%; min-height: var(--tap); padding: var(--sp-2);
  background: var(--c-surface); color: var(--c-text);
  border: 0; border-bottom: 1px solid #9E9E9E; border-radius: 0;
  font-size: var(--fs); line-height: 1.4;
  transition: border-color .12s, box-shadow .12s;
}
.textarea { min-height: 88px; resize: vertical; border: 1px solid #9E9E9E; border-radius: var(--radius); }
.select { appearance: none; -webkit-appearance: none; padding-right: var(--sp-6);
  background-image: linear-gradient(45deg, transparent 50%, var(--c-text-muted) 50%), linear-gradient(135deg, var(--c-text-muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.input::placeholder, .textarea::placeholder { color: var(--c-text-muted); opacity: .8; }
.input:focus, .select:focus { outline: none; border-bottom-color: var(--c-primary); box-shadow: 0 1px 0 0 var(--c-primary); }
.textarea:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 1px var(--c-primary); }
.input:disabled, .select:disabled, .textarea:disabled { background: var(--c-surface-2); opacity: .7; cursor: not-allowed; }
.input-box { border: 1px solid #9E9E9E; border-radius: var(--radius); padding: var(--sp-2) var(--sp-3); }
.field { display: flex; flex-direction: column; margin-bottom: var(--sp-3); }
.field > label { font-size: var(--fs-sm); font-weight: 400; color: var(--c-text-muted); }
.input-group { display: flex; align-items: stretch; width: 100%; }
.input-group > .input, .input-group > .select { flex: 1; min-width: 0; }
.input-group > .btn { margin-left: var(--sp-2); }

/* ===== Chip (phẳng) ===== */
.chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.chip {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-1);
  min-height: 40px; padding: 0 var(--sp-3);
  background: var(--c-surface-2); color: var(--c-text);
  border: 1px solid var(--c-border); border-radius: var(--radius);
  font-size: var(--fs); font-weight: 400; white-space: nowrap; cursor: pointer; user-select: none;
  transition: background .12s;
}
.chip:hover { background: #EEEEEE; }
.chip.active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }

/* ===== Badge ===== */
.badge { display: inline-flex; align-items: center; padding: 1px var(--sp-2); border-radius: var(--radius); font-size: 12px; font-weight: 500; line-height: 1.5; background: var(--c-primary-soft); color: var(--c-primary-dark); white-space: nowrap; }
.badge-ok { background: var(--c-ok-soft); color: var(--c-ok); }
.badge-err { background: var(--c-err-soft); color: #C62828; }
.badge-warn { background: var(--c-warn-soft); color: var(--c-warn); }
.badge-info { background: var(--c-info-soft); color: var(--c-info); }
.badge-muted { background: var(--c-surface-2); color: var(--c-text-muted); }

/* ===== Table ===== */
.table-wrap { width: 100%; overflow: auto; border: 0; border-top: 1px solid var(--c-border); border-bottom: 1px solid var(--c-border); background: var(--c-surface); }
.table { width: 100%; font-size: var(--fs); }
.table th, .table td { padding: var(--sp-3); text-align: left; border-bottom: 1px solid var(--c-border); vertical-align: middle; }
.table th { position: sticky; top: 0; background: var(--c-surface); color: var(--c-text-muted); font-size: var(--fs-sm); font-weight: 500; white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--c-surface-2); }
.table .num, .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ===== Grid ===== */
.grid { display: grid; gap: var(--sp-4); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
@media (max-width: 599px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ===== Ô vuông màu (lưới sản phẩm): đặt --tile-bg / --tile-fg inline ===== */
.tile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 10px; }
.tile {
  position: relative; display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1 / 1; min-width: 0; padding: 6px; overflow: hidden;
  border: 0; border-radius: 0; background: var(--tile-bg); color: var(--tile-fg);
  font-size: 14px; font-weight: 400; line-height: 1.25; text-align: center; word-break: break-word;
  user-select: none;
}
.tile:active { filter: brightness(.9); }
.tile.dark { --tile-fg: #fff; }
.tile.tile-red { --tile-bg: #F44336; --tile-fg: #fff; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile .tile-name { position: relative; z-index: 1; }
.tile img ~ .tile-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 4px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; }
@media (min-width: 600px) { .tile-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 720px) { .tile-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 900px) { .tile-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); } }
.tile:hover { filter: brightness(.95); }

/* ===== Thanh lọc ("Tất cả mặt hàng" | mã vạch | tìm kiếm) ===== */
.filterbar { display: flex; align-items: center; min-height: 48px; border-bottom: 1px solid var(--c-border); background: #fff; }
.filterbar-main { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); min-height: 48px; padding: 0 var(--sp-4); border: 0; background: transparent; text-align: left; font-size: var(--fs); }
.filterbar-sep { width: 1px; align-self: stretch; margin: 8px 0; background: var(--c-border); }
.filterbar .icon-btn { border-radius: 0; width: 52px; height: 48px; color: var(--c-text-muted); }

/* ===== Tabs ===== */
.tabs { display: flex; border-bottom: 1px solid var(--c-border); overflow-x: auto; background: var(--c-surface); }
.tab { display: inline-flex; align-items: center; min-height: 48px; padding: 0 var(--sp-4); background: transparent; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--c-text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .03em; font-size: var(--fs-sm); white-space: nowrap; cursor: pointer; }
.tab:hover { background: var(--c-surface-2); }
.tab.active { color: var(--c-primary-dark); border-bottom-color: var(--c-primary); }

/* ===== Modal: dialog Material ===== */
.modal-backdrop { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: var(--sp-5) var(--sp-4); background: var(--c-scrim); }
.modal { display: flex; flex-direction: column; width: 100%; max-width: 560px; max-height: 90vh; max-height: 90dvh; background: var(--c-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-4) var(--sp-4) var(--sp-2); background: var(--c-surface); }
.modal-head h3 { font-size: var(--fs-lg); font-weight: 500; }
.modal-close { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: -8px -8px -8px 0; border: 0; border-radius: 50%; background: transparent; color: var(--c-text-muted); line-height: 1; }
.modal-close:hover { background: var(--c-surface-2); }
.modal-close svg.ic { width: 22px; height: 22px; }
.modal-body { padding: var(--sp-2) var(--sp-4) var(--sp-4); overflow-y: auto; flex: 1; }
.modal-foot { display: flex; justify-content: flex-end; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3) var(--sp-3); background: var(--c-surface); }
@media (max-width: 599px) { .modal-backdrop { padding: var(--sp-4) var(--sp-3); } }

/* ===== Toast: snackbar đen ở đáy ===== */
.toast-wrap { position: fixed; left: 0; right: 0; bottom: calc(var(--sp-4) + var(--safe-b)); z-index: 2000; display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); padding: 0 var(--sp-3); pointer-events: none; }
.toast { pointer-events: auto; width: 100%; max-width: 480px; padding: 14px var(--sp-4); border-radius: var(--radius); border-left: 4px solid transparent; background: var(--c-snack); color: #fff; font-size: var(--fs-sm); font-weight: 400; animation: toast-in .2s ease-out; transition: opacity .25s, transform .25s; }
.toast-ok { border-left-color: #8BC34A; }
.toast-err { border-left-color: #F44336; }
.toast-info { border-left-color: #64B5F6; }
.toast.hide { opacity: 0; transform: translateY(12px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ===== Numpad & PIN (phẳng) ===== */
.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; width: 100%; max-width: 320px; margin: 0 auto; background: var(--c-border); border: 1px solid var(--c-border); }
.numpad button { min-height: 60px; border: 0; border-radius: 0; background: var(--c-surface); color: var(--c-text); font-size: var(--fs-xl); font-weight: 400; transition: background .1s; }
.numpad button:hover { background: var(--c-surface-2); }
.numpad button:active { background: var(--c-primary-soft); }
.pin-dots { display: flex; justify-content: center; gap: var(--sp-4); margin: var(--sp-4) 0; }
.pin-dots > span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--c-primary); background: transparent; }
.pin-dots > span.filled { background: var(--c-primary); }

/* ===== Empty ===== */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-2); padding: var(--sp-6) var(--sp-4); text-align: center; color: var(--c-text-muted); }
.empty .empty-icon, .empty > .icon { font-size: 48px; line-height: 1; }

/* ===== Tiện ích ===== */
.row { display: flex; flex-direction: row; align-items: center; }
.col { display: flex; flex-direction: column; }
.wrap { flex-wrap: wrap; }
.gap-1 { gap: var(--sp-1); } .gap-2 { gap: var(--sp-2); } .gap-3 { gap: var(--sp-3); } .gap-4 { gap: var(--sp-4); } .gap-5 { gap: var(--sp-5); }
.grow { flex: 1; min-width: 0; }
.between { justify-content: space-between; }
.center { justify-content: center; align-items: center; text-align: center; }
.right { margin-left: auto; text-align: right; }
.muted { color: var(--c-text-muted); }
.text-sm { font-size: var(--fs-sm); } .text-lg { font-size: var(--fs-lg); } .text-xl { font-size: var(--fs-xl); }
.bold { font-weight: 500; }
.mt-1 { margin-top: var(--sp-1); } .mt-2 { margin-top: var(--sp-2); } .mt-3 { margin-top: var(--sp-3); } .mt-4 { margin-top: var(--sp-4); } .mt-5 { margin-top: var(--sp-5); }
.mb-1 { margin-bottom: var(--sp-1); } .mb-2 { margin-bottom: var(--sp-2); } .mb-3 { margin-bottom: var(--sp-3); } .mb-4 { margin-bottom: var(--sp-4); } .mb-5 { margin-bottom: var(--sp-5); }
.p-1 { padding: var(--sp-1); } .p-2 { padding: var(--sp-2); } .p-3 { padding: var(--sp-3); } .p-4 { padding: var(--sp-4); } .p-5 { padding: var(--sp-5); }
.hidden { display: none !important; }
.scroll-y { overflow-y: auto; min-height: 0; }
.money { font-weight: 500; color: var(--c-primary-dark); font-variant-numeric: tabular-nums; }

/* ===== Khung app ===== */
body.app-body { height: 100vh; height: 100dvh; overflow: hidden; }
#app { height: 100%; }
.app-shell { display: flex; flex-direction: column; height: 100vh; height: 100dvh; background: #fff; }
.app-status { flex: none; height: var(--safe-t); background: var(--c-primary-dark); }
.app-header { flex: none; display: flex; align-items: center; gap: 2px; height: var(--header-h); padding: 0 var(--sp-1); padding-left: calc(var(--sp-1) + var(--safe-l)); padding-right: calc(var(--sp-1) + var(--safe-r)); background: var(--c-primary); color: #fff; z-index: 10; }
.app-title { font-size: 20px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0 var(--sp-1) 0 var(--sp-2); min-width: 0; }
.app-title-extra { display: flex; align-items: center; flex: none; }
.app-actions { display: flex; align-items: center; margin-left: auto; flex: none; }
.app-badge-ic { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.app-badge-ic .app-badge-num { position: absolute; font-size: 11px; font-weight: 500; line-height: 1; top: 50%; left: 50%; transform: translate(-50%, -45%); }
.app-main { flex: 1; overflow: auto; min-height: 0; background: #fff; padding-bottom: var(--safe-b); padding-left: var(--safe-l); padding-right: var(--safe-r); -webkit-overflow-scrolling: touch; }
.page { padding: var(--sp-3); }

/* Ngăn kéo menu trái */
.drawer-scrim { position: fixed; inset: 0; z-index: 900; background: var(--c-scrim); opacity: 0; pointer-events: none; transition: opacity .2s; }
.drawer-scrim.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; bottom: 0; left: 0; z-index: 901; display: flex; flex-direction: column; width: 280px; max-width: 85vw; background: #fff; box-shadow: var(--shadow-lg); transform: translateX(-105%); transition: transform .2s ease-out; padding-bottom: var(--safe-b); visibility: hidden; }
.drawer.open { transform: none; visibility: visible; }
.drawer-head { flex: none; padding: calc(var(--sp-4) + var(--safe-t)) var(--sp-4) var(--sp-4); background: var(--c-primary-dark); color: #fff; }
.drawer-shop { font-size: var(--fs-lg); font-weight: 500; }
.drawer-user { margin-top: 2px; font-size: var(--fs-sm); opacity: .85; }
.drawer-list { flex: 1; overflow-y: auto; padding: var(--sp-2) 0; }
.drawer-item { display: flex; align-items: center; gap: var(--sp-4); width: 100%; min-height: 48px; padding: 0 var(--sp-4); border: 0; background: transparent; color: var(--c-text); font-size: var(--fs); font-weight: 500; text-align: left; }
.drawer-item:active { background: var(--c-surface-2); }
.drawer-item.active { background: var(--c-primary-soft); color: var(--c-primary-dark); }
.drawer-sep { height: 1px; margin: var(--sp-2) 0; background: var(--c-border); }

/* Menu ⋮ */
.menu-pop { position: fixed; z-index: 950; min-width: 180px; padding: var(--sp-2) 0; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.menu-pop button { display: block; width: 100%; min-height: 44px; padding: 0 var(--sp-4); border: 0; background: transparent; text-align: left; font-size: var(--fs); }
.menu-pop button:active { background: var(--c-surface-2); }

/* ===== Avatar ===== */
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--c-primary); color: #fff; font-weight: 500; font-size: var(--fs-lg); text-transform: uppercase; }

/* ===== Đăng nhập: phẳng, nền trắng ===== */
.login-screen { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; background: #fff; }
.login-bar { flex: none; display: flex; align-items: center; height: calc(var(--header-h) + var(--safe-t)); padding: var(--safe-t) var(--sp-4) 0; background: var(--c-primary); color: #fff; font-size: 20px; font-weight: 500; box-shadow: inset 0 var(--safe-t) 0 var(--c-primary-dark); }
.login-body { flex: 1; display: flex; flex-direction: column; width: 100%; max-width: 420px; margin: 0 auto; padding-bottom: var(--safe-b); }
.login-title { font-size: var(--fs-lg); font-weight: 500; text-align: center; }
.login-card { display: block; }
.login-staff-list { display: flex; flex-direction: column; border-top: 1px solid var(--c-border); }
.login-staff { display: flex; align-items: center; gap: var(--sp-3); min-height: var(--row-h); width: 100%; padding: var(--sp-2) var(--sp-4); text-align: left; background: #fff; color: var(--c-text); border: 0; border-bottom: 1px solid var(--c-border); border-radius: 0; font-weight: 400; }
.login-staff.active { background: var(--c-primary-soft); }
.login-staff .login-role, .login-staff small { display: block; font-size: var(--fs-sm); color: var(--c-text-muted); }
.login-pin { display: flex; flex-direction: column; align-items: center; padding: var(--sp-4); }
.login-pin .pin-dots { margin: var(--sp-3) 0; }
.login-error { min-height: 22px; margin-top: var(--sp-2); color: var(--c-err); font-size: var(--fs-sm); text-align: center; }
.shake { animation: shake .4s ease-in-out; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@media (min-width: 900px) {
  .login-body { flex: none; margin-top: var(--sp-5); border: 1px solid var(--c-border); }
}
@media (max-height: 700px) { .numpad button { min-height: 48px; } }


/* ===== Đáp ứng mọi thiết bị ===== */
/* nội dung không kéo giãn quá rộng trên desktop */
.page { max-width: 1280px; margin-left: auto; margin-right: auto; width: 100%; }
.page.pg-dash { max-width: 1440px; }
.page.pg-sales { max-width: none; }
.app-main:has(.pg-dash) { background: var(--c-surface-2); }
.modal-backdrop { padding-left: calc(var(--sp-4) + var(--safe-l)); padding-right: calc(var(--sp-4) + var(--safe-r)); padding-bottom: calc(var(--sp-5) + var(--safe-b)); }

/* hover cho chuột */
@media (hover: hover) {
  .list-item:hover, button.list-item:hover { background: var(--c-surface-2); }
  .list-item.active:hover { background: var(--c-primary-soft); }
  .icon-btn:hover { background: rgba(0, 0, 0, .1); }
  .filterbar-main:hover { background: var(--c-surface-2); }
  .btn-action:hover { background: var(--c-action-hover); }
  .drawer-item:hover, .menu-pop button:hover { background: var(--c-surface-2); }
  .drawer-item.active:hover { background: var(--c-primary-soft); }
  .login-staff:hover { background: var(--c-surface-2); }
}
.btn-action:focus-visible, .icon-btn:focus-visible, .tile:focus-visible { outline: 2px solid var(--c-primary-dark); outline-offset: -3px; }
.app-header :focus-visible, .sl-bar :focus-visible { outline-color: #fff; }
.app-header, .login-bar { padding-top: 0; }

/* cảm ứng: vùng chạm tối thiểu 44px */
@media (pointer: coarse) {
  .btn-sm, .chip, .menu-ib { min-height: 44px; }
  .menu-ib { min-width: 44px; }
  .modal-close { width: 44px; height: 44px; }
  .tab { min-height: 48px; }
}

/* khung ứng dụng trên màn lớn */
@media (min-width: 900px) {
  .page { padding: var(--sp-4) var(--sp-5); }
  .drawer { width: 300px; }
  .login-body { max-width: 440px; }
}
@media (min-width: 1400px) {
  :root { --fs: 16px; }
}

/* ===== Đơn hàng trên màn lớn (selector đủ mạnh để thắng <style> do JS chèn) ===== */
@media (min-width: 900px) {
  .app-main .pg-orders { max-width: 1100px; margin: 0 auto; border-left: 1px solid var(--c-border); border-right: 1px solid var(--c-border); padding: 0; height: 100%; }
}
@media (min-width: 1200px) {
  .app-main .pg-orders .po-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; column-gap: 0; }
  .app-main .pg-orders .po-list > .list-item:nth-child(odd) { border-right: 1px solid var(--c-border); }
}
.pg-orders .po-bar { gap: var(--sp-1); padding: var(--sp-1) var(--sp-2); }
.pg-orders .list-item:focus-visible { outline: 2px solid var(--c-primary); outline-offset: -2px; }
