/* ============================================================
   KOREA — Global responsive (mobile / tablet / desktop)
   Auto-resize + mobile-first polish
   ============================================================ */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Base ổn định — order tự scale riêng, không phình toàn site */
  font-size: 16px;
  /* Real mobile viewport height (JS updates --app-vh) */
  --app-vh: 1vh;
  --app-height: 100dvh;
  --touch-min: 44px;
  --order-fab-h: 72px;
  --page-pad: clamp(0.65rem, 3vw, 1.25rem);
}

img, video {
  max-width: 100%;
  height: auto;
}

/* Safe area for notched phones */
body {
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
  max-width: 100vw;
  overflow-x: hidden;
}

body.view-order {
  /* prevent bounce scroll issues on order */
  overscroll-behavior-y: contain;
}

/* Kill accidental horizontal scroll from wide children */
#app,
.app-shell {
  max-width: 100vw;
  overflow-x: clip;
}

.container,
.container-wide {
  width: min(1200px, calc(100% - 1.5rem));
  max-width: 100%;
  padding-left: max(0.25rem, env(safe-area-inset-left));
  padding-right: max(0.25rem, env(safe-area-inset-right));
  box-sizing: border-box;
}

/* Touch-friendly form controls globally on coarse pointers */
@media (hover: none), (pointer: coarse) {
  button,
  .btn,
  .cat-chip,
  .kds-tab,
  .table-tile,
  .mod-opt,
  a.btn {
    min-height: var(--touch-min);
  }

  input,
  select,
  textarea {
    font-size: 16px !important; /* prevent iOS zoom-on-focus */
    min-height: var(--touch-min);
  }

  /* Tables that can overflow — scroll instead of squeeze */
  .hr-table-wrap,
  .menu-admin-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ---------- Topbar ---------- */
.topbar {
  height: auto;
  min-height: var(--header-h);
}

.topbar-inner {
  flex-wrap: wrap;
  padding: 0.5rem 0;
  row-gap: 0.45rem;
}

/* Mobile nav drawer trigger */
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: #fff;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
}

/* ---------- Tablet ≤ 1024 ---------- */
@media (max-width: 1024px) {
  :root {
    --header-h: 58px;
  }

  .container-wide {
    width: min(100%, calc(100% - 1.25rem));
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-card .value {
    font-size: 1.25rem;
  }

  .tables-grid {
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  }

  .table-tile .t-num {
    font-size: 1.1rem;
  }

  .kds-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }

  .pos-layout {
    grid-template-columns: 1fr;
  }

  .pos-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.25rem;
  }

  .pos-tabs::-webkit-scrollbar {
    display: none;
  }

  .pos-tabs .kds-tab {
    flex-shrink: 0;
    font-size: 0.8rem;
    padding: 0.45rem 0.75rem;
  }

  .media-admin-head {
    flex-direction: column;
  }

  .hr-grid,
  .best-layout {
    grid-template-columns: 1fr;
  }

  .best-selected {
    position: static;
  }
}

/* ---------- Mobile ≤ 768 ---------- */
@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-pills {
    display: none;
    width: 100%;
    order: 10;
    flex-wrap: wrap;
    border-radius: 14px;
    padding: 0.35rem;
  }

  .nav-pills.is-open {
    display: flex;
  }

  .nav-pills a,
  .nav-pills button {
    flex: 1 1 auto;
    text-align: center;
    min-width: 30%;
    font-size: 0.8rem;
    padding: 0.55rem 0.5rem;
  }

  .brand-text span {
    display: none;
  }

  .topbar-inner > .flex.gap-2 {
    margin-left: auto;
  }

  /* ===== ORDER mobile: card dọc, ảnh giữa, cân đối ===== */
  .customer-layout {
    min-height: calc(var(--app-height, 100dvh) - var(--header-h));
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .customer-layout main {
    font-size: 0.9rem;
    padding-bottom: calc(3.6rem + env(safe-area-inset-bottom, 0px)) !important;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .customer-layout .container {
    width: min(100%, calc(100% - 0.9rem)) !important;
    max-width: 100%;
    margin-inline: auto;
    padding-left: 0.2rem;
    padding-right: 0.2rem;
    box-sizing: border-box;
  }

  .menu-section h2 {
    font-size: 0.95rem !important;
    font-weight: 800;
    margin: 0.75rem 0 0.55rem;
    letter-spacing: -0.01em;
    justify-content: center;
    text-align: center;
    width: 100%;
  }

  /* Lưới 2 cột đều — không lệch */
  .menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.65rem;
    width: 100%;
  }

  .menu-card {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: unset !important;
    align-items: stretch;
    text-align: center;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 3px 14px rgba(28, 25, 23, 0.06);
  }

  .menu-card .thumb {
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 0;
    background: linear-gradient(165deg, #faf7f5, #efe8e4);
  }

  .menu-card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
  }

  .menu-card .body {
    padding: 0.55rem 0.5rem 0.65rem;
    gap: 0.2rem;
    min-width: 0;
    align-items: center;
    text-align: center;
    min-height: 4.6rem;
  }

  .menu-card h3 {
    font-size: 0.8rem !important;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
    width: 100%;
    text-align: center;
  }

  .menu-card .desc {
    display: none;
  }

  .menu-card .price-row {
    padding-top: 0.3rem;
    gap: 0.3rem;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .menu-card .price {
    font-size: 0.84rem !important;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--gold, #b45309) !important;
    white-space: nowrap;
  }

  .menu-card .add-btn {
    width: 30px;
    height: 30px;
    font-size: 1.05rem;
    flex-shrink: 0;
  }

  .cat-scroll {
    top: var(--header-h);
    padding: 0.2rem 0 0.5rem;
    margin-left: 0;
    margin-right: 0;
    -webkit-overflow-scrolling: touch;
    gap: 0.3rem;
  }

  .cat-chip {
    font-size: 0.72rem !important;
    padding: 0.35rem 0.65rem;
    min-height: 32px;
    font-weight: 600;
    flex-shrink: 0;
  }

  .search-box {
    width: 100%;
    margin-bottom: 0.35rem;
  }

  .search-box input,
  #search-input {
    font-size: 0.88rem !important;
    min-height: 40px;
    width: 100%;
    max-width: 100%;
    padding: 0.5rem 0.75rem !important;
    box-sizing: border-box;
    border-radius: 12px;
  }

  .order-guest-card {
    width: 100%;
    box-sizing: border-box;
    padding: 0.65rem 0.75rem !important;
    margin-bottom: 0.55rem !important;
    border-radius: 12px;
  }

  .order-guest-card label.tiny {
    font-size: 0.75rem !important;
    font-weight: 700 !important;
  }

  .order-guest-card input,
  #order-customer-name {
    font-size: 0.88rem !important;
    min-height: 40px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.45rem 0.65rem !important;
  }

  .order-guest-card .tiny.muted {
    font-size: 0.7rem !important;
  }

  .table-bar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.45rem 0;
    gap: 0.4rem;
  }

  .table-bar .tiny {
    font-size: 0.7rem;
  }

  .table-pill,
  .table-pill-lg {
    font-size: 0.8rem !important;
    padding: 0.35rem 0.65rem;
  }

  .my-order-card {
    font-size: 0.8rem !important;
    padding: 0.65rem !important;
  }

  .my-order-card strong {
    font-size: 0.85rem !important;
  }

  /* FAB gọn */
  .fab-cart {
    left: max(0.65rem, env(safe-area-inset-left));
    right: max(0.65rem, env(safe-area-inset-right));
    bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
    justify-content: space-between;
    width: auto;
    max-width: calc(100vw - 1.3rem);
    min-height: 46px;
    padding: 0.55rem 0.9rem;
    font-size: 0.82rem;
    border-radius: 14px;
    z-index: 85;
    box-sizing: border-box;
  }

  .fab-cart .count {
    min-width: 22px;
    height: 22px;
    font-size: 0.72rem;
  }

  /* Giỏ hàng drawer gọn */
  .cart-drawer {
    max-height: min(88dvh, calc(var(--app-height, 100dvh) * 0.88));
    height: auto;
    width: 100%;
    max-width: 100vw;
    left: 0;
    right: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    border-radius: 16px 16px 0 0;
  }

  .cart-head h3 {
    font-size: 0.95rem !important;
    font-weight: 800;
  }

  .cart-line {
    gap: 0.55rem;
    padding: 0.55rem 0;
  }

  .cart-line img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
  }

  .cart-line h4 {
    font-size: 0.85rem !important;
    font-weight: 700;
  }

  .cart-line .mods {
    font-size: 0.72rem !important;
  }

  .cart-line .line-price {
    font-size: 0.85rem !important;
    font-weight: 800;
  }

  .cart-line .qty-ctrl button {
    width: 30px;
    height: 30px;
    font-size: 0.95rem;
  }

  .cart-line .qty-ctrl span {
    font-size: 0.85rem;
    min-width: 1.25rem;
    text-align: center;
    font-weight: 700;
  }

  .cart-totals .row {
    font-size: 0.85rem !important;
  }

  .cart-totals .row.total {
    font-size: 0.98rem !important;
    font-weight: 800;
  }

  .cart-foot .btn-lg,
  #btn-checkout {
    min-height: 46px;
    font-size: 0.9rem !important;
    font-weight: 800;
    padding: 0.65rem 1rem;
  }

  .points-redeem-box {
    font-size: 0.78rem !important;
    padding: 0.4rem 0.5rem;
  }

  .points-redeem-box input[type="number"] {
    font-size: 0.85rem !important;
    min-height: 36px;
  }

  /* ===== Modal chọn món — tinh tế, không phình chữ ===== */
  .modal-overlay {
    align-items: flex-end;
    padding: 0 !important;
  }

  .modal {
    max-height: 90dvh;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 16px 16px 0 0 !important;
    padding-bottom: calc(0.35rem + env(safe-area-inset-bottom, 0px));
  }

  .modal-hero {
    aspect-ratio: 16 / 10;
    min-height: 140px;
    max-height: 180px;
  }

  .modal-hero .close {
    width: 36px;
    height: 36px;
    font-size: 1.05rem;
    top: 8px;
    right: 8px;
  }

  .modal-body {
    padding: 0.85rem 0.95rem 1rem !important;
  }

  .modal-body h2 {
    font-size: 1.05rem !important;
    line-height: 1.3;
    font-weight: 800;
  }

  .modal-body .price {
    font-size: 1.05rem !important;
    font-weight: 800;
    margin-bottom: 0.4rem;
  }

  .modal-body .desc,
  .modal-body p,
  .modal-body .modal-desc {
    font-size: 0.82rem !important;
    line-height: 1.4;
  }

  .mod-group label.group-label {
    font-size: 0.75rem !important;
    margin-bottom: 0.4rem;
    font-weight: 700;
  }

  .mod-options {
    gap: 0.35rem;
  }

  .mod-opt {
    font-size: 0.78rem !important;
    padding: 0.45rem 0.7rem !important;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    font-weight: 600;
  }

  .note-input {
    font-size: 0.88rem !important;
    min-height: 64px;
    padding: 0.55rem 0.7rem;
  }

  .modal-actions {
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
  }

  .modal-actions .qty-ctrl,
  .modal-actions .qty-control {
    min-height: 40px;
  }

  .modal-actions .btn,
  .modal-actions .btn-primary,
  .modal-actions .btn-lg {
    min-height: 44px;
    font-size: 0.88rem !important;
    font-weight: 800;
    flex: 1 1 auto;
    padding: 0.55rem 0.85rem;
  }

  .modal-body .qty-ctrl,
  .modal-actions .qty-ctrl {
    gap: 0.35rem;
  }

  .modal-body .qty-ctrl button,
  .modal-actions .qty-ctrl button {
    width: 34px;
    height: 34px;
    font-size: 1.05rem;
    border-radius: 10px;
  }

  .modal-body .qty-ctrl span,
  .modal-actions .qty-ctrl span {
    font-size: 0.95rem;
    font-weight: 800;
    min-width: 1.5rem;
    text-align: center;
  }

  .status-tracker {
    font-size: 0.82rem;
    gap: 0.35rem;
  }

  /* ===== POS admin mobile: dễ bấm & đọc ===== */
  .stats-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
  }

  .stat-card {
    padding: 0.9rem 0.95rem;
  }

  .stat-card .label {
    font-size: 0.82rem;
  }

  .stat-card .value {
    font-size: 1.35rem !important;
    font-weight: 900;
  }

  .tables-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
  }

  .table-tile {
    min-height: 72px;
    padding: 0.55rem 0.35rem;
  }

  .table-tile .t-num {
    font-size: 1.25rem !important;
    font-weight: 900;
  }

  .table-tile .t-status {
    font-size: 0.72rem;
  }

  .order-card {
    font-size: 0.98rem;
  }

  .order-card-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .order-card-head h4 {
    font-size: 1.1rem !important;
  }

  .order-items-list li {
    font-size: 0.98rem;
    padding: 0.35rem 0;
  }

  .order-actions {
    width: 100%;
    gap: 0.45rem;
  }

  .order-actions .btn {
    flex: 1 1 auto;
    min-height: 46px;
    font-size: 0.95rem !important;
    font-weight: 700;
  }

  .pos-tabs .kds-tab,
  .kds-tab {
    font-size: 0.9rem !important;
    padding: 0.6rem 0.85rem !important;
    min-height: 42px;
  }

  .pending-banner {
    flex-direction: column;
    align-items: stretch;
    font-size: 0.98rem;
  }

  .pending-banner strong {
    font-size: 1.05rem;
  }

  .pending-banner .btn {
    width: 100%;
    min-height: 46px;
  }

  .section-title {
    font-size: 1.1rem !important;
  }

  .btn-sm {
    min-height: 40px;
    font-size: 0.9rem !important;
    padding: 0.5rem 0.75rem;
  }

  .btn {
    min-height: 44px;
  }

  /* ===== KDS bếp: ticket to, rõ ===== */
  .kds-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .kds-header-stats {
    width: 100%;
    gap: 0.4rem;
  }

  .kds-header-stats .badge {
    font-size: 0.85rem;
    padding: 0.4rem 0.65rem;
  }

  .display {
    font-size: 1.25rem !important;
  }

  .ticket {
    border-radius: 16px;
    padding: 0.85rem;
  }

  .ticket-head .timer {
    font-size: 1.15rem !important;
    font-weight: 900;
  }

  .ticket-body .batch-name {
    font-size: 1.25rem !important;
    font-weight: 900;
    line-height: 1.3;
  }

  .ticket-body .batch-qty {
    font-size: 2.1rem !important;
    font-weight: 900;
  }

  .ticket-meta {
    font-size: 0.95rem !important;
  }

  .ticket-lines li {
    font-size: 0.98rem;
    padding: 0.4rem 0;
    gap: 0.5rem;
  }

  .ticket-lines .btn {
    min-width: 44px;
    min-height: 44px;
  }

  .ticket-foot .btn,
  .ticket-foot .btn-block {
    min-height: 52px;
    font-size: 1.05rem !important;
    font-weight: 800;
  }

  .ticket-table .ticket-body h3 {
    font-size: 1.2rem !important;
  }

  /* HR / admin tables */
  .hr-table {
    font-size: 0.9rem;
  }

  .hr-emp-card strong {
    font-size: 1.05rem;
  }

  .media-cat-title {
    font-size: 1.05rem !important;
  }

  .qr-table-num {
    font-size: 1.2rem !important;
  }

  .media-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .media-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .media-actions .btn,
  .media-actions .media-upload {
    width: 100%;
    justify-content: center;
    min-height: 44px;
    font-size: 0.92rem !important;
  }

  /* Touch scroll categories */
  .cat-scroll {
    -webkit-overflow-scrolling: touch;
    gap: 0.45rem;
  }

  .menu-section h2 {
    font-size: 1.15rem !important;
    font-weight: 900;
    margin: 0.85rem 0 0.65rem;
  }

  .best-picker-grid {
    grid-template-columns: 1fr;
  }

  .best-row {
    grid-template-columns: 22px 36px 1fr;
    grid-template-rows: auto auto;
  }

  .best-move {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .hr-emp-grid {
    grid-template-columns: 1fr;
  }

  .hr-table {
    font-size: 0.8rem;
  }

  .hr-table th,
  .hr-table td {
    padding: 0.4rem 0.35rem;
  }

  .pending-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .pending-banner .btn {
    width: 100%;
  }

  .auth-card {
    margin: 0 0.15rem;
  }

  .toast-wrap {
    left: 12px;
    right: 12px;
    top: calc(var(--header-h) + 8px);
  }

  .toast {
    max-width: none;
  }

  /* Luxury landing */
  .lux-hero-grid {
    grid-template-columns: 1fr !important;
  }

  .lux-slider {
    max-width: none;
    width: 100%;
  }

  .lux-gallery {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem;
  }

  .lux-strip-item {
    flex-basis: 120px !important;
    width: 120px !important;
  }

  .mkt-promise-grid {
    grid-template-columns: 1fr !important;
  }

  .mkt-spice-track {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .mkt-related-grid {
    grid-template-columns: 1fr !important;
  }

  .mkt-related-card {
    grid-template-columns: 96px 1fr !important;
  }

  .mkt-steps-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  .mkt-footer-grid {
    grid-template-columns: 1fr !important;
  }

  .mkt-cta-inner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .mkt-cta-actions {
    justify-content: center;
  }

  .mkt-cta-actions .btn {
    flex: 1 1 auto;
  }
}

/* ---------- Small phone ≤ 480 ---------- */
@media (max-width: 480px) {
  html {
    font-size: 15px;
  }

  .container,
  .container-wide {
    width: calc(100% - 0.7rem) !important;
  }

  .tables-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .table-tile {
    min-height: 60px;
  }

  .table-tile .t-num {
    font-size: 1rem !important;
  }

  .menu-grid {
    gap: 0.55rem;
  }

  .menu-card h3 {
    font-size: 0.76rem !important;
    min-height: 2.3em;
  }

  .menu-card .price {
    font-size: 0.8rem !important;
  }

  .menu-card .add-btn {
    width: 28px;
    height: 28px;
    font-size: 0.95rem;
  }

  .menu-card .body {
    padding: 0.5rem 0.45rem 0.55rem;
    min-height: 4.2rem;
  }

  .menu-section h2 {
    font-size: 0.9rem !important;
  }

  .modal-body h2 {
    font-size: 1rem !important;
  }

  .modal-body .price {
    font-size: 1rem !important;
  }

  .brand-text strong {
    font-size: 0.9rem;
  }

  .topbar-actions .btn-sm {
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
  }

  .points-chip {
    font-size: 0.7rem;
  }

  .btn-lg {
    padding: 0.7rem 1rem;
    font-size: 0.9rem !important;
    min-height: 44px;
  }

  .fab-cart {
    font-size: 0.78rem !important;
    min-height: 44px !important;
  }

  .ticket-body .batch-name {
    font-size: 1rem !important;
  }

  .ticket-body .batch-qty {
    font-size: 1.5rem !important;
  }

  .lux-hero-copy h1 {
    font-size: 1.75rem !important;
  }

  .stats-row {
    grid-template-columns: 1fr 1fr;
  }

  .media-grid {
    grid-template-columns: 1fr;
  }

  .mkt-steps-grid {
    grid-template-columns: 1fr !important;
  }

  .mkt-sig-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ---------- Landscape phone ---------- */
@media (max-height: 500px) and (orientation: landscape) {
  .cart-drawer {
    max-height: 95dvh;
  }

  .lux-slider-stage {
    aspect-ratio: 21 / 9;
  }
}

/* Tablet portrait 769–1024 */
@media (min-width: 769px) and (max-width: 1024px) {
  .menu-grid,
  .customer-layout .menu-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0.85rem;
  }

  .customer-layout .menu-card {
    display: flex !important;
    flex-direction: column !important;
    text-align: center;
  }

  .customer-layout .menu-card .thumb {
    aspect-ratio: 1 / 1 !important;
    width: 100%;
  }

  .customer-layout .menu-card .body {
    align-items: center;
    text-align: center;
  }

  .tables-grid {
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  }

  .lux-gallery {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  .kds-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .media-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .best-picker-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

/* ============================================================
   System-wide mobile polish (POS / KDS / Serve / Auth / Board)
   ============================================================ */
@media (max-width: 768px) {
  .topbar {
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .topbar-inner {
    width: 100%;
    max-width: 100%;
    gap: 0.4rem;
  }

  .nav-pills a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .pos-layout {
    width: 100%;
    max-width: 100%;
  }

  .pos-tabs {
    width: 100%;
    max-width: 100%;
  }

  .pos-admin-shortcuts .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .order-card {
    max-width: 100%;
    overflow: hidden;
  }

  .order-items-list {
    word-break: break-word;
  }

  .serve-layout,
  .serve-board {
    width: 100%;
    max-width: 100%;
  }

  .serve-stats {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .serve-stat {
    min-width: 0;
    width: 100%;
  }

  .serve-pipeline {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
  }

  .serve-pipe-step {
    flex-shrink: 0;
    font-size: 0.78rem;
  }

  .serve-line {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .serve-line .btn {
    width: 100%;
  }

  .auth-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .auth-form input,
  .auth-form select,
  .auth-form textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .public-board {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .modal-overlay {
    width: 100%;
    max-width: 100vw;
  }

  .modal {
    max-width: 100vw !important;
  }

  .hr-grid {
    grid-template-columns: 1fr !important;
  }

  .media-grid {
    grid-template-columns: 1fr !important;
  }

  .best-layout {
    grid-template-columns: 1fr !important;
  }

  .toast-wrap {
    max-width: 100vw;
    box-sizing: border-box;
  }
}

@media (max-width: 360px) {
  .menu-card h3 {
    font-size: 0.72rem !important;
  }

  .menu-card .price {
    font-size: 0.76rem !important;
  }

  .menu-card .body {
    min-height: 4rem;
  }

  .fab-cart {
    font-size: 0.75rem !important;
    padding: 0.5rem 0.75rem;
  }
}
