/* Bố cục trang khách: làm cho điện thoại trước, máy tính thì canh giữa cột 520px. Màu lấy từ /shared/base.css. */
:root {
  --app-w: 520px;
  --gutter: 16px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --shadow-sm: 0 1px 2px rgba(31, 29, 27, 0.06), 0 1px 8px rgba(31, 29, 27, 0.04);
  --shadow: 0 2px 6px rgba(31, 29, 27, 0.06), 0 10px 28px rgba(31, 29, 27, 0.1);
  --muted-bg: #efece8;
}

[hidden] { display: none !important; }
body { min-height: 100vh; overflow-wrap: break-word; }
body.no-scroll { overflow: hidden; }
a, button, label { -webkit-tap-highlight-color: rgba(210, 70, 45, 0.12); }
.icon { flex-shrink: 0; vertical-align: -0.2em; }

.app { position: relative; max-width: var(--app-w); min-height: 100vh; margin: 0 auto; background: var(--bg); }
@media (min-width: 560px) {
  body { background: #ebe7e2; }
  .app { box-shadow: 0 0 0 1px var(--line), 0 12px 48px rgba(31, 29, 27, 0.08); }
}
.page { padding-bottom: calc(28px + var(--safe-b)); }
.page.has-bar { padding-bottom: calc(108px + var(--safe-b)); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.text-ok { color: var(--ok); font-weight: 600; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.selectable { -webkit-user-select: all; user-select: all; }
.block { padding: 12px 12px 0; }
.block-tight { margin-top: 10px; }

/* ---- Nút ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border: 1.5px solid transparent; border-radius: 999px;
  background: var(--surface); color: var(--text); font-size: 15px; font-weight: 600; line-height: 1.2;
  text-align: center; text-decoration: none; transition: background-color 0.15s, border-color 0.15s, transform 0.1s;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-outline { border-color: var(--line); }
.btn-soft { background: var(--brand-soft); color: var(--brand-dark); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-ghost { background: transparent; color: var(--danger); border-color: var(--danger-soft); }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn-lg { min-height: 52px; padding: 12px 24px; font-size: 17px; }
.btn-block { display: flex; width: 100%; }
@media (hover: hover) {
  .btn-primary:hover:not(:disabled) { background: var(--brand-dark); }
  .btn-outline:hover { border-color: var(--brand-line); }
  .btn-soft:hover { background: #fde3d9; }
}
.link-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px;
  border: 0; background: none; color: var(--brand-dark); font-weight: 600; font-size: 15px; text-decoration: none;
}
.link-center { justify-content: center; width: 100%; }

.spinner {
  display: inline-block; width: 20px; height: 20px; border: 2.5px solid var(--brand-line);
  border-top-color: var(--brand); border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: middle;
}
.spinner-sm { width: 14px; height: 14px; border-width: 2px; flex-shrink: 0; }
.spinner-light { width: 18px; height: 18px; border-color: rgba(255, 255, 255, 0.45); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Nhãn, thông báo ---- */
.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; line-height: 1.4; white-space: nowrap;
}
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-danger { background: var(--danger-soft); color: var(--danger); }
.pill-info { background: var(--info-soft); color: var(--info); }
.pill-brand { background: var(--brand-soft); color: var(--brand-dark); }
.pill-muted { background: var(--muted-bg); color: var(--text-2); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: live 2s infinite; }
@keyframes live {
  0% { box-shadow: 0 0 0 0 rgba(31, 122, 77, 0.45); }
  70% { box-shadow: 0 0 0 6px rgba(31, 122, 77, 0); }
  100% { box-shadow: 0 0 0 0 rgba(31, 122, 77, 0); }
}

.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); font-size: 14px; line-height: 1.45; }
.notice > .icon { margin-top: 1px; }
.notice-body { flex: 1 1 auto; min-width: 0; }
.notice-body p { margin: 0; }
.notice-body p + p { margin-top: 4px; }
.notice-info { background: var(--info-soft); }
.notice-info > .icon { color: var(--info); }
.notice-warn { background: var(--warn-soft); }
.notice-warn > .icon { color: var(--warn); }
.notice-danger { background: var(--danger-soft); }
.notice-danger > .icon { color: var(--danger); }
.notice-close {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin: -12px -12px -12px 0; border: 0; background: none; color: var(--text-2);
}
.notice-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* ---- Thanh trên cùng ---- */
.topbar {
  position: -webkit-sticky; position: sticky; top: 0; z-index: 25;
  display: flex; align-items: center; gap: 4px; min-height: 56px; padding: var(--safe-t) 6px 0;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.topbar-back {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px;
  width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--text);
}
.topbar-back:active { background: var(--bg); }
.topbar-title { flex: 1 1 auto; min-width: 0; text-align: center; }
.topbar-title h1 { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-title p { margin: 0; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-spacer { flex: 0 0 44px; width: 44px; }

/* ---- Đầu trang quán ---- */
.cover {
  position: relative; height: 150px; padding: calc(10px + var(--safe-t)) 12px 0; color: var(--on-brand);
  background:
    radial-gradient(circle at 88% 18%, rgba(255, 255, 255, 0.16) 0, rgba(255, 255, 255, 0.16) 56px, transparent 57px),
    radial-gradient(circle at 8% 120%, rgba(255, 255, 255, 0.12) 0, rgba(255, 255, 255, 0.12) 92px, transparent 93px),
    linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
}
.cover-empty { height: 110px; }
.cover-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
/* SĐT đang dùng + nút Đổi số (trên nền màu thương hiệu) */
.acct {
  display: inline-flex; align-items: center; min-width: 0; min-height: 44px; padding-left: 12px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.2); color: #fff; font-size: 14px;
}
.acct-phone { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.acct-switch {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px 0 10px; border: 0; background: none;
  color: #fff; font-size: 14px; font-weight: 700; white-space: nowrap; text-decoration: underline; text-underline-offset: 3px;
}
.acct-switch::before { content: ""; width: 1px; height: 16px; margin-right: 10px; background: rgba(255, 255, 255, 0.45); }
@media (max-width: 374px) {
  .acct-icon, .cover-link .icon { display: none; }
}
/* Dòng "Đơn của số …" ở trang Đơn của tôi */
.acct-line {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 12px 0; padding: 2px 4px 2px 14px;
  border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); font-size: 14px;
}
.acct-line-text { display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: var(--text-2); }
.acct-line-text strong { color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.acct-line-text .icon { color: var(--text-3); }
.acct-line-btn { flex: 0 0 auto; padding: 0 12px; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.cover-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.2); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none;
}
.shop-card { position: relative; margin: -78px 12px 0; padding: 16px; border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.shop-head { display: flex; gap: 12px; align-items: center; }
.shop-logo {
  display: flex; align-items: center; justify-content: center; flex: 0 0 56px; width: 56px; height: 56px;
  border-radius: 16px; background: var(--brand-soft); color: var(--brand);
}
.shop-meta { min-width: 0; }
.shop-meta h1 { margin: 0 0 6px; font-size: 20px; line-height: 1.25; }
.shop-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.shop-open { font-size: 13px; color: var(--text-2); }
.shop-line { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; font-size: 14px; color: var(--text-2); }
.shop-line > .icon { margin-top: 2px; color: var(--text-3); }
button.shop-fee {
  width: 100%; min-height: 44px; margin-top: 10px; padding: 8px 12px; border: 0; border-radius: var(--radius);
  background: var(--ok-soft); color: var(--ok); font-weight: 600; text-align: left; align-items: center;
}
button.shop-fee > .icon { margin-top: 0; color: var(--ok); }
.shop-fee span:first-of-type { flex: 1 1 auto; }
.shop-fee-more { flex: 0 0 auto; font-size: 13px; text-decoration: underline; text-underline-offset: 2px; }
.shop-actions { display: flex; gap: 8px; margin-top: 12px; }
.shop-actions .btn { flex: 1 1 0; }
.fee-table { width: 100%; margin: 8px 0 12px; border-collapse: collapse; font-size: 15px; }
.fee-table th, .fee-table td { padding: 10px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.fee-table th { width: 42%; font-weight: 600; }
/* Giỏ hàng, phí ship thu khi giao: bảng phí thu nhỏ, tô dòng ứng với số suất của đơn. */
.ship-collect { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--brand-soft); }
.ship-collect .quote { margin: 0; }
.ship-mine { margin: 8px 0 0; font-size: 15px; }
.fee-table-sm { margin: 6px 0 4px; font-size: 14px; }
.fee-table-sm th, .fee-table-sm td { padding: 6px 4px; }
.fee-table tr.is-mine th, .fee-table tr.is-mine td { color: var(--brand-dark); font-weight: 700; background: rgba(255, 255, 255, 0.7); }

/* ---- Đơn đang theo dõi, đặt lại ---- */
.active-order {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--brand-line);
  border-radius: var(--radius-lg); background: var(--brand-soft); color: var(--text); text-decoration: none;
}
.ao-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #fff; }
.ao-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ao-items { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ao-more { font-size: 12px; color: var(--brand-dark); }
.ao-cta { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 2px; color: var(--brand-dark); font-size: 14px; font-weight: 700; }
.reorder { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.reorder-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.reorder-head h2 { margin: 0; font-size: 16px; }
.reorder-head .muted { font-size: 13px; white-space: nowrap; }
.reorder-items {
  margin: 6px 0 10px; font-size: 14px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.reorder-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }

/* ---- Thực đơn ---- */
.menu { margin-top: 16px; background: var(--surface); }
.tabs {
  position: -webkit-sticky; position: sticky; top: 0; z-index: 20;
  display: flex; gap: 2px; padding: var(--safe-t) 8px 0; overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 2px 8px rgba(31, 29, 27, 0.04);
}
.tabs::-webkit-scrollbar { display: none; }
/* Còn tab khuất bên phải (hoặc chỉ bên trái): phủ lớp trắng mờ dần ở mép đó (dính mép nhờ sticky),
   báo khách vuốt ngang để xem thêm nhóm món. Không dùng mask vì thanh dính trên đầu, mask làm lộ món cuộn bên dưới. */
.tabs.more-right::after, .tabs.more-left::before {
  content: ""; position: -webkit-sticky; position: sticky; z-index: 1; flex: 0 0 40px; pointer-events: none;
}
.tabs.more-right::after { right: -8px; margin-left: -40px; background: linear-gradient(to right, rgba(255, 255, 255, 0), #fff 80%); }
.tabs.more-left::before { left: -8px; margin-right: -40px; background: linear-gradient(to left, rgba(255, 255, 255, 0), #fff 80%); }
.tab {
  position: relative; flex: 0 0 auto; min-height: 48px; padding: 0 12px; border: 0; background: none;
  color: var(--text-2); font-size: 15px; font-weight: 600; white-space: nowrap;
}
.tab.is-active { color: var(--brand); }
.tab.is-active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px;
  border-radius: 3px 3px 0 0; background: var(--brand);
}
.cat { scroll-margin-top: 52px; }
.cat-title { margin: 0; padding: 18px var(--gutter) 4px; font-size: 17px; font-weight: 700; }
.item { display: flex; gap: 12px; padding: 12px var(--gutter); border-bottom: 1px solid var(--line); }
.cat:last-child .item:last-child { border-bottom: 0; }
.item-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.item-name { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.35; }
.item-desc {
  margin: 2px 0 0; font-size: 13px; color: var(--text-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.item-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; }
.item-price { font-size: 15px; font-weight: 700; }
.item.is-out .thumb, .item.is-out .item-name, .item.is-out .item-desc, .item.is-out .item-price { opacity: 0.45; }
.tag-out {
  display: inline-flex; align-items: center; min-height: 28px; padding: 2px 10px; border-radius: 999px;
  background: var(--muted-bg); color: var(--text-2); font-size: 13px; font-weight: 600; white-space: nowrap;
}
.thumb { flex: 0 0 84px; border-radius: 12px; overflow: hidden; background: var(--brand-soft); }
/* color: transparent: ảnh đang tải/hỏng thì không hiện chữ alt đè lên khung. */
.thumb img { width: 100%; height: 100%; object-fit: cover; color: transparent; }
.thumb-empty { display: flex; align-items: center; justify-content: center; color: var(--brand-line); background: linear-gradient(135deg, var(--brand-soft), #fde3d9); }
button.thumb-btn {
  position: relative; display: block; padding: 0; border: 0; cursor: zoom-in;
  -webkit-appearance: none; appearance: none; transition: transform 0.1s;
}
.thumb-btn:active { transform: scale(0.96); }
.thumb-zoom {
  position: absolute; right: 4px; bottom: 4px; display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; background: rgba(31, 29, 27, 0.55); color: #fff;
}
.menu-foot { margin: 0; padding: 16px var(--gutter) 0; font-size: 13px; color: var(--text-3); text-align: center; }

/* Nút tròn: vòng nhìn thấy 32–34px, vùng chạm mở rộng ra ~46px. */
.round-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0; border: 1.5px solid var(--brand); border-radius: 50%;
  background: var(--surface); color: var(--brand);
}
.round-btn::after { content: ""; position: absolute; top: -6px; right: -6px; bottom: -6px; left: -6px; }
.round-btn:active { transform: scale(0.94); }
.round-add { background: var(--brand); color: var(--on-brand); }
.round-btn.is-disabled { border-color: var(--line); background: var(--muted-bg); color: var(--text-3); }
.stepper { display: inline-flex; align-items: center; gap: 12px; }
.stepper-qty { min-width: 22px; font-size: 16px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.stepper-sm .round-btn { width: 32px; height: 32px; }

/* ---- Thanh nổi ở đáy ---- */
.bottom-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  max-width: var(--app-w); margin: 0 auto; padding: 10px 12px calc(10px + var(--safe-b));
}
.cartbar {
  display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 8px 14px 8px 14px;
  border-radius: 16px; background: var(--brand); color: var(--on-brand); text-decoration: none;
  box-shadow: 0 8px 24px rgba(154, 47, 27, 0.35);
}
.cartbar:active { background: var(--brand-dark); }
.cartbar-icon { position: relative; display: flex; flex: 0 0 auto; }
.cartbar-badge {
  position: absolute; top: -7px; right: -11px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: #fff; color: var(--brand-dark); font-size: 12px; font-weight: 700; line-height: 20px; text-align: center;
  animation: bump 0.3s ease-out;
}
@keyframes bump { 0% { transform: scale(0.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
.cartbar-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; padding-left: 8px; }
.cartbar-text strong { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cartbar-text small { font-size: 12px; opacity: 0.9; }
.cartbar-cta { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 2px; font-size: 15px; font-weight: 700; white-space: nowrap; }
@media (max-width: 370px) {
  .cartbar-text strong { font-size: 15px; }
  .cartbar-cta { font-size: 14px; }
}

.submitbar {
  display: flex; align-items: center; gap: 12px; background: var(--surface);
  border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(31, 29, 27, 0.06); transition: transform 0.2s;
}
.submitbar.is-hidden { transform: translateY(120%); }
.submit-total { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.submit-total small { font-size: 12px; color: var(--text-2); }
.submit-total strong { font-size: 19px; color: var(--brand-dark); font-variant-numeric: tabular-nums; }
.submit-btn { flex: 0 0 auto; min-width: 150px; }

/* ---- Thẻ nội dung ---- */
.card { margin: 12px 12px 0; padding: 16px; border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.card-title { margin: 0 0 10px; font-size: 16px; font-weight: 700; }
.card-head .card-title { margin: 0; }

/* ---- Giỏ hàng ---- */
.lines { list-style: none; margin: 0; padding: 0; }
.line { padding: 12px 0; border-top: 1px solid var(--line); }
.line:first-child { padding-top: 4px; border-top: 0; }
.line-main { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.line-info { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.line-name { font-weight: 600; }
.line-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.line-price small { font-size: 12px; color: var(--text-3); }
.line.is-out .line-name, .line.is-out .line-price { opacity: 0.5; text-decoration: line-through; }
.line-note { margin-top: 8px; }
.line-note-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: -2px 0 -10px; padding: 0;
  border: 0; background: none; color: var(--text-2); font-size: 13px;
}

.field { margin-top: 14px; }
.field > label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.req { color: var(--danger); }
.optional { font-size: 13px; font-weight: 400; color: var(--text-3); }
.input {
  display: block; width: 100%; min-height: 48px; padding: 12px 14px; border: 1.5px solid var(--line);
  border-radius: var(--radius); background: var(--surface); font-size: 16px; line-height: 1.3;
  -webkit-appearance: none; appearance: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder { color: var(--text-3); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.input.is-invalid { border-color: var(--danger); }
.input.is-invalid:focus { box-shadow: 0 0 0 3px var(--danger-soft); }
.input-sm { min-height: 44px; padding: 10px 12px; }
.textarea { min-height: 76px; resize: vertical; }
.field-err { margin: 6px 0 0; font-size: 13px; font-weight: 500; color: var(--danger); }
.field-hint { margin: 6px 0 0; font-size: 13px; color: var(--text-3); }
.field-hint-acct { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; color: var(--text-2); }
.field-hint-acct strong { color: var(--text); font-variant-numeric: tabular-nums; }
.link-inline { min-height: 44px; margin: -10px 0; padding: 0; font-size: 13px; text-decoration: underline; text-underline-offset: 2px; }

.seg { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg); }
.seg-opt {
  flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  border-radius: 9px; color: var(--text-2); font-weight: 600; cursor: pointer;
}
.seg-opt.is-on { background: var(--surface); color: var(--brand-dark); box-shadow: var(--shadow-sm), 0 0 0 1px var(--brand-line); }
.seg-opt:focus-within { outline: 2px solid var(--brand); outline-offset: 1px; }

.options { display: flex; flex-direction: column; gap: 8px; }
.option {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer;
}
.option.is-on { border-color: var(--brand); background: var(--brand-soft); }
.option:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.option-radio { position: relative; flex: 0 0 20px; width: 20px; height: 20px; border: 2px solid var(--text-3); border-radius: 50%; }
.option.is-on .option-radio { border-color: var(--brand); }
.option.is-on .option-radio::after { content: ""; position: absolute; top: 3px; left: 3px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.option-icon { display: flex; flex: 0 0 auto; color: var(--brand-dark); }
.option-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.option-text small { font-size: 13px; color: var(--text-2); }

.addr-block { margin-top: 4px; }
.chips {
  display: flex; gap: 8px; margin: 14px -16px 0; padding: 0 16px 2px; overflow-x: auto;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chips-wrap { flex-wrap: wrap; margin: 12px 0 0; padding: 0; overflow: visible; }
.chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; max-width: 240px; min-height: 44px;
  padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--text); font-size: 14px;
}
.chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip.is-on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }

.ac-field { position: relative; }
.ac-field .input { padding-right: 48px; }
.ac-clear {
  position: absolute; top: 2px; right: 2px; display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 0; background: none; color: var(--text-3);
}
.ac-list {
  list-style: none; max-height: 320px; margin: 6px 0 0; padding: 4px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow);
}
.ac-opt { display: flex; align-items: flex-start; gap: 10px; min-height: 48px; padding: 10px; border-radius: 8px; cursor: pointer; }
.ac-opt > .icon { margin-top: 2px; color: var(--text-3); }
.ac-opt.is-active { background: var(--brand-soft); }
@media (hover: hover) { .ac-opt:hover { background: var(--brand-soft); } }
.ac-text { min-width: 0; display: flex; flex-direction: column; }
.ac-text strong { font-weight: 600; }
.ac-text small { font-size: 13px; color: var(--text-2); }
.ac-status { padding: 12px 10px; font-size: 14px; color: var(--text-2); }
/* Ghi nguồn Google Maps (theo quy định của Google: chữ thường 400, 12–16px, màu #5E5E5E, không xuống dòng). */
.gmp-attr {
  font-family: Roboto, Arial, sans-serif; font-style: normal; font-weight: 400; font-size: 12px; line-height: 1.4;
  letter-spacing: normal; white-space: nowrap; color: #5e5e5e;
}
.ac-attr { display: flex; justify-content: flex-end; margin-top: 4px; padding: 6px 10px 4px; border-top: 1px solid var(--line); }
.quote-attr { display: flex; justify-content: flex-end; margin: 4px 0 0; }

.quote { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 14px; }
.quote > .icon { color: var(--brand); }
.quote-muted { color: var(--text-2); }
.quote-muted > .icon { color: var(--text-3); }
.quote-box { margin-top: 10px; padding: 10px 12px; border-radius: var(--radius); background: var(--bg); }
.quote-box .quote { margin: 0; }
.quote-where { margin: 4px 0 0 24px; font-size: 12px; color: var(--text-3); }
.nudge { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 14px; color: var(--ok); }

.pickup-info { display: flex; gap: 12px; margin-top: 14px; padding: 12px; border-radius: var(--radius); background: var(--bg); }
.pickup-info > .icon { margin-top: 2px; color: var(--brand); }
.pickup-info p { margin: 4px 0 0; font-size: 14px; }

.sum-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 6px 0; font-size: 15px; }
.sum-row > span:first-child { color: var(--text-2); }
.sum-row > span:last-child, .sum-row > strong { font-variant-numeric: tabular-nums; text-align: right; }
.sum-total { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 17px; }
.sum-total > span:first-child { color: var(--text); font-weight: 600; }
.sum-total strong { font-size: 20px; color: var(--brand-dark); }

/* ---- Theo dõi đơn ---- */
.hero {
  display: flex; gap: 14px; align-items: flex-start; margin: 12px 12px 0; padding: 18px 16px;
  border-top: 4px solid var(--brand); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm);
}
.hero-icon {
  display: flex; align-items: center; justify-content: center; flex: 0 0 52px; width: 52px; height: 52px;
  border-radius: 50%; background: var(--brand-soft); color: var(--brand);
}
.hero-new { border-top-color: var(--warn); }
.hero-new .hero-icon { background: var(--warn-soft); color: var(--warn); }
.hero-done { border-top-color: var(--ok); }
.hero-done .hero-icon { background: var(--ok-soft); color: var(--ok); }
.hero-cancelled { border-top-color: var(--danger); }
.hero-cancelled .hero-icon { background: var(--danger-soft); color: var(--danger); }
.hero-text { min-width: 0; }
.hero-code { margin: 0 0 2px; font-size: 13px; color: var(--text-3); }
.hero h1 { margin: 0; font-size: 20px; line-height: 1.3; }
.hero-sub { margin: 6px 0 0; font-size: 14px; color: var(--text-2); }
.hero-eta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 8px 0 0; }
.hero-eta span { font-size: 14px; color: var(--text-2); }
.hero-eta strong { font-size: 26px; color: var(--brand-dark); font-variant-numeric: tabular-nums; }

.tl { list-style: none; margin: 4px 0 0; padding: 0; }
.tl-step { position: relative; display: flex; gap: 12px; padding-bottom: 20px; }
.tl-step:last-child { padding-bottom: 0; }
.tl-step::before { content: ""; position: absolute; left: 11px; top: 26px; bottom: 2px; width: 2px; border-radius: 2px; background: var(--line); }
.tl-step:last-child::before { display: none; }
.tl-step.line-on::before { background: var(--brand); }
.tl-step.line-cancel::before { background: var(--danger); }
.tl-dot {
  position: relative; z-index: 1; display: flex; align-items: center; justify-content: center;
  flex: 0 0 24px; width: 24px; height: 24px; border: 2px solid var(--line); border-radius: 50%;
  background: var(--surface); color: #fff;
}
.is-done .tl-dot { border-color: var(--brand); background: var(--brand); }
.is-current .tl-dot { border-color: var(--brand); }
.is-current .tl-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); animation: pulse 1.6s ease-in-out infinite; }
.is-cancel .tl-dot { border-color: var(--danger); background: var(--danger); }
.tl-body { flex: 1 1 auto; min-width: 0; padding-top: 1px; }
.tl-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tl-label { font-weight: 600; }
.is-todo .tl-label { color: var(--text-3); font-weight: 500; }
.is-current .tl-label { color: var(--brand-dark); }
.is-cancel .tl-label { color: var(--danger); }
.tl-time { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.tl-hint { margin: 2px 0 0; font-size: 13px; color: var(--text-2); }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(0.6); opacity: 0.6; } }
.auto-note { margin: 14px 0 0; }

.shipper { display: flex; align-items: center; gap: 12px; }
.avatar {
  display: flex; align-items: center; justify-content: center; flex: 0 0 48px; width: 48px; height: 48px;
  border-radius: 50%; background: var(--brand); color: #fff; font-size: 20px; font-weight: 700;
}
.shipper-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.shipper-info small { font-size: 13px; color: var(--text-2); }
.shipper-info strong { font-size: 16px; }

.pay-method { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-weight: 600; }
.pay-method > .icon { color: var(--brand); }
.qr { margin-top: 12px; }
.qr-lead { margin: 0 0 10px; font-size: 14px; color: var(--text-2); }
.qr-img { display: flex; justify-content: center; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.qr-img img { width: 260px; max-width: 100%; height: auto; }
.qr-tip { margin: 8px 0 12px; font-size: 13px; color: var(--text-3); text-align: center; }
.kv { margin: 0; }
.kv > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 6px 0; border-top: 1px solid var(--line); }
.kv dt { flex: 0 0 auto; font-size: 14px; color: var(--text-2); }
.kv dd { min-width: 0; margin: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; text-align: right; }
.copy-btn {
  position: relative; display: inline-flex; align-items: center; gap: 4px; min-height: 34px; padding: 4px 10px;
  border: 1px solid var(--brand-line); border-radius: 999px; background: var(--surface); color: var(--brand-dark);
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.copy-btn::after { content: ""; position: absolute; top: -6px; right: -4px; bottom: -6px; left: -4px; }
.copy-btn.is-done { border-color: var(--ok-soft); background: var(--ok-soft); color: var(--ok); }
.qr-note { display: flex; gap: 8px; margin: 12px 0 0; padding: 10px 12px; border-radius: var(--radius); background: var(--warn-soft); font-size: 13px; }
.qr-note > .icon { color: var(--warn); }

.info-row { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; font-size: 15px; }
.info-row > .icon { margin-top: 2px; color: var(--text-3); }
.info-row small { display: block; font-size: 13px; }
.oitems { list-style: none; margin: 0 0 8px; padding: 0; }
.oitems li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.oi-qty { flex: 0 0 30px; font-weight: 700; color: var(--brand-dark); }
.oi-name { flex: 1 1 auto; min-width: 0; }
.oi-name small { display: block; font-size: 13px; font-style: italic; color: var(--text-2); }
.oi-price { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.onote { display: flex; gap: 8px; margin: 10px 0 0; padding: 10px 12px; border-radius: var(--radius); background: var(--bg); font-size: 14px; }
.onote > .icon { margin-top: 1px; color: var(--text-3); }
.actions-card { display: flex; flex-direction: column; gap: 10px; }
.actions-row { display: flex; gap: 10px; }
.actions-row .btn { flex: 1 1 0; }
.page-foot { margin: 16px 0 0; font-size: 14px; color: var(--text-3); text-align: center; }
.page-note { margin: 16px var(--gutter) 0; font-size: 13px; color: var(--text-3); text-align: center; }

/* ---- Đơn của tôi ---- */
.olist { list-style: none; margin: 0; padding: 0; }
.ocard { margin: 12px 12px 0; overflow: hidden; border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.ocard-main { display: block; padding: 14px 16px 10px; color: var(--text); text-decoration: none; }
.ocard-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ocard-items {
  margin: 6px 0; font-size: 14px; color: var(--text-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ocard-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14px; }
.ocard-actions { display: flex; gap: 8px; padding: 0 16px 14px; }
.ocard-actions .btn { flex: 1 1 0; }
.ocard-origin { margin: 6px 0 0; }
.ocard-origin .pill { gap: 4px; }

/* ---- Mã giảm giá ---- */
.vcard { padding-top: 8px; padding-bottom: 8px; }
.vrow {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 0;
  border: 0; background: none; color: var(--text); text-align: left;
}
.vrow-icon { display: flex; flex: 0 0 auto; color: var(--brand); }
.vrow-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.vrow-text strong { font-size: 16px; }
.vrow-text small { font-size: 13px; color: var(--text-2); }
.vrow-value { flex: 0 0 auto; font-weight: 700; color: var(--ok); font-variant-numeric: tabular-nums; white-space: nowrap; }
.vrow-value.is-link { color: var(--brand-dark); font-weight: 600; font-size: 14px; }
.vrow-chev { color: var(--text-3); }
.vtags { list-style: none; margin: 4px 0 8px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.vtag {
  display: flex; align-items: center; gap: 6px; min-height: 52px; padding: 4px 0 4px 12px;
  border: 1.5px dashed var(--brand-line); border-radius: var(--radius); background: var(--brand-soft);
}
.vtag.is-off { border-color: var(--line); background: var(--bg); }
.vtag-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.vtag-code { font-weight: 700; color: var(--brand-dark); letter-spacing: 0.04em; overflow-wrap: anywhere; }
.vtag.is-off .vtag-code { color: var(--text-2); }
.vtag-body small { font-size: 13px; color: var(--text-2); }
.vtag-x {
  flex: 0 0 44px; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border: 0; border-radius: 50%; background: none; color: var(--text-2);
}
.vtag-x:active { background: rgba(0, 0, 0, 0.06); }
.vcode {
  display: inline-block; padding: 0 6px; border-radius: 6px; background: var(--ok-soft); color: var(--ok);
  font-size: 12px; font-weight: 700; letter-spacing: 0.03em; line-height: 1.6; vertical-align: 1px;
}
.sum-disc > span:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
.sum-disc > span:last-child { flex: 0 0 auto; color: var(--ok); font-weight: 600; }
.sum-disc > span.sum-pending { flex: 0 1 auto; max-width: 55%; color: var(--text-2); font-weight: 400; font-size: 14px; }
.submit-total .submit-save { color: var(--ok); font-weight: 600; }

.vc-form { margin-top: 4px; }
.vc-input-row { display: flex; gap: 8px; }
.vc-input { flex: 1 1 auto; width: auto; min-width: 0; text-transform: uppercase; letter-spacing: 0.04em; }
.vc-input::placeholder { text-transform: none; letter-spacing: 0; }
.vc-input-row .btn { flex: 0 0 auto; min-height: 48px; border-radius: var(--radius); }
.vc-confirm { margin-top: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--warn-soft); font-size: 14px; }
.vc-confirm p { margin: 0; }
.vc-confirm .sheet-actions { margin-top: 12px; }
.vc-h { margin: 18px 0 8px; font-size: 15px; font-weight: 700; }
.vc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sheet .vc-empty { margin: 0; }

.vticket {
  display: flex; align-items: stretch; width: 100%; min-height: 76px; padding: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); text-align: left;
}
button.vticket:active { background: var(--bg); }
.vticket.is-on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.vticket-stub {
  flex: 0 0 68px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 8px 4px; background: var(--brand-dark); color: #fff; font-size: 12px; font-weight: 700; line-height: 1.2; text-align: center;
}
.vticket-ship .vticket-stub { background: var(--ok); }
.vticket-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 10px 8px 10px 12px; }
.vticket-title { font-size: 15px; line-height: 1.3; }
.vticket-sub { font-size: 13px; color: var(--text-2); }
.vticket-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12px; color: var(--text-3); }
.vticket-code { font-weight: 700; color: var(--text-2); letter-spacing: 0.04em; }
.vticket-reason { font-size: 13px; font-weight: 600; color: var(--warn); }
.vticket-side { flex: 0 0 auto; display: flex; align-items: center; padding-right: 12px; }
.vticket-use {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 999px;
  background: var(--brand); color: var(--on-brand); font-size: 13px; font-weight: 700; white-space: nowrap;
}
.vticket-use.is-on { background: var(--ok-soft); color: var(--ok); }
.vticket.is-dim .vticket-stub, .vticket.is-dim .vticket-title, .vticket.is-dim .vticket-sub, .vticket.is-dim .vticket-meta { opacity: 0.5; }

.vbanner {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 14px;
  border: 1.5px dashed var(--brand-line); border-radius: var(--radius-lg); background: var(--brand-soft); color: var(--text); text-align: left;
}
.vbanner:active { background: #fde3d9; }
.vbanner-icon {
  display: flex; align-items: center; justify-content: center; flex: 0 0 40px; width: 40px; height: 40px;
  border-radius: 50%; background: var(--brand); color: var(--on-brand);
}
.vbanner-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.vbanner-text strong { font-size: 15px; }
.vbanner-text small { font-size: 13px; color: var(--text-2); }
.vbanner-cta { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 2px; color: var(--brand-dark); font-size: 14px; font-weight: 700; }

.ocard-voucher { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--ok); }
.ocard-voucher span { min-width: 0; overflow-wrap: anywhere; }

/* ---- Hộp thoại, thông báo nhanh ---- */
.sheet-backdrop {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 50; display: flex; align-items: flex-end;
  justify-content: center; background: rgba(20, 18, 16, 0.45); animation: fade 0.15s ease-out;
}
.sheet {
  width: 100%; max-width: var(--app-w); max-height: 88vh; overflow-y: auto; padding: 8px 20px calc(20px + var(--safe-b));
  border-radius: 20px 20px 0 0; background: var(--surface); animation: sheet-up 0.22s ease-out;
}
.sheet { color: var(--text); }
.sheet-grip { width: 40px; height: 4px; margin: 0 auto 12px; border-radius: 4px; background: var(--line); }
.sheet-title { margin: 0 0 8px; font-size: 18px; }
.sheet .muted { margin: 0 0 8px; font-size: 14px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 18px; }
.sheet-actions .btn { flex: 1 1 0; }
/* Hộp thoại xem ảnh món */
.sheet-dish .sheet-title { margin-bottom: 4px; font-size: 20px; line-height: 1.3; }
.dish-photo {
  position: relative; margin: 0 0 14px; overflow: hidden; border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-soft), #fde3d9);
}
/* Khung vuông giữ chỗ trước khi ảnh tải xong (iOS 12 chưa có aspect-ratio); màn hình thấp thì dẹt lại để vẫn thấy nút đặt. */
.dish-photo::before { content: ""; display: block; padding-top: 100%; }
@media (max-height: 700px) { .dish-photo::before { padding-top: 75%; } }
@media (max-height: 480px) { .dish-photo::before { padding-top: 45%; } }
.dish-photo > img, .dish-ph { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.dish-photo > img { object-fit: cover; color: transparent; }
.dish-ph { display: flex; align-items: center; justify-content: center; color: var(--brand-line); }
.dish-close {
  position: absolute; top: 8px; right: 8px; display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: rgba(31, 29, 27, 0.55); color: #fff;
}
.dish-close::after { content: ""; position: absolute; top: -4px; right: -4px; bottom: -4px; left: -4px; }
.dish-desc { margin: 0; font-size: 15px; color: var(--text-2); white-space: pre-line; }
.dish-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
}
.dish-price { font-size: 20px; font-weight: 700; color: var(--brand-dark); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dish-add { flex: 0 0 auto; }
.btn.dish-add.is-disabled, .btn.dish-add.is-disabled:hover { background: var(--muted-bg); color: var(--text-3); }
.sheet .dish-note { margin: 10px 0 0; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0.6; } to { transform: none; opacity: 1; } }
@media (min-width: 560px) {
  .sheet-backdrop { align-items: center; }
  .sheet { max-width: 440px; padding-bottom: 20px; border-radius: 20px; }
}

.toast-host {
  position: fixed; left: 0; right: 0; bottom: calc(96px + var(--safe-b)); z-index: 60;
  display: flex; justify-content: center; padding: 0 16px; pointer-events: none;
}
.toast {
  max-width: 440px; padding: 12px 16px; border-radius: 12px; background: rgba(31, 29, 27, 0.92); color: #fff;
  font-size: 14px; line-height: 1.4; text-align: center; box-shadow: var(--shadow); animation: toast-in 0.2s ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---- Trạng thái rỗng, lỗi, đang tải ---- */
.empty { display: flex; flex-direction: column; align-items: center; padding: 48px 24px; text-align: center; }
.empty-icon {
  display: flex; align-items: center; justify-content: center; width: 76px; height: 76px; margin-bottom: 16px;
  border-radius: 50%; background: var(--brand-soft); color: var(--brand);
}
.empty-icon-warn { background: var(--warn-soft); color: var(--warn); }
.empty h2 { margin: 0 0 6px; font-size: 18px; }
.empty p { max-width: 340px; margin: 0 0 18px; color: var(--text-2); }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.menu-empty { display: flex; flex-direction: column; align-items: center; }
.menu-empty-reload { margin-top: 12px; }

.skeleton-list { margin-top: 16px; padding: 8px 0; background: var(--surface); }
.sk-row { display: flex; gap: 12px; padding: 12px var(--gutter); }
.sk {
  border-radius: 8px; background: linear-gradient(90deg, #eeeae5 0%, #f8f5f1 50%, #eeeae5 100%);
  background-size: 200% 100%; animation: shimmer 1.2s linear infinite;
}
.sk-thumb { flex: 0 0 84px; width: 84px; height: 84px; border-radius: 12px; }
.sk-lines { flex: 1 1 auto; display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.sk-line { width: 80%; height: 14px; }
.sk-short { width: 55%; }
.sk-price { width: 30%; margin-top: 12px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---- Màn hình đăng nhập bằng SĐT ---- */
.login { min-height: 100vh; }
.login-cover {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: calc(24px + var(--safe-t)) 16px 60px;
  color: var(--on-brand); text-align: center;
  background:
    radial-gradient(circle at 88% 18%, rgba(255, 255, 255, 0.16) 0, rgba(255, 255, 255, 0.16) 56px, transparent 57px),
    radial-gradient(circle at 8% 120%, rgba(255, 255, 255, 0.12) 0, rgba(255, 255, 255, 0.12) 92px, transparent 93px),
    linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
}
.login-logo {
  display: flex; align-items: center; justify-content: center; width: 64px; height: 64px;
  border-radius: 18px; background: #fff; color: var(--brand); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
.login-shop { margin: 6px 0 0; font-size: 20px; font-weight: 700; line-height: 1.25; }
.login-status { margin-top: 2px; }
.login-card { position: relative; margin: -40px 12px 0; padding: 20px 16px; border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.login-title { margin: 0 0 14px; font-size: 19px; line-height: 1.3; }
.login-label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.login-input { min-height: 52px; font-size: 20px; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.login-input::placeholder { font-size: 16px; letter-spacing: 0; }
.login-btn { margin-top: 14px; }
.login-note { margin: 12px 0 0; font-size: 13px; color: var(--text-2); text-align: center; }
.login-alt { margin: 16px 12px 0; padding: 16px; border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); text-align: center; }
.login-alt-title { margin: 0; font-size: 15px; }
.login-alt .muted { margin: 4px 0 0; font-size: 14px; }
.login-alt .shop-actions { margin-top: 12px; }

.boot { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 70vh; padding: 24px; text-align: center; }
.boot-logo {
  display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; margin-bottom: 14px;
  border-radius: 20px; background: var(--brand); color: #fff; animation: breathe 1.6s ease-in-out infinite;
}
.boot-name { margin: 0; font-size: 18px; font-weight: 700; }
.boot-text { max-width: 320px; margin: 6px 0 16px; color: var(--text-2); }
.boot .btn + .btn { margin-top: 10px; }
@keyframes breathe { 50% { transform: scale(0.94); opacity: 0.85; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
}
