/* Chủ hồ — layout + màn hình quản lý (nạp qua hoicau_pond_owner_styles()). */
:root {
  color-scheme: light;
  --po-accent: #0F766E;
  --app-tf-accent: var(--po-accent);
  --po-accent-deep: #134E4A;
  --po-bg: #F3F7F6;
  --po-ink: #1C2423;
  --po-muted: rgba(28,36,35,.55);
  --po-surface: #FFFEFE;
  --po-border: rgba(28,36,35,.1);
  --po-border-strong: rgba(15,118,110,.22);
}
body {
  margin: 0; background: var(--po-bg); color: var(--po-ink);
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}
button, select, input, textarea { font: inherit; }
.page {
  width: min(640px, 100%); margin: 0 auto;
  padding: 12px 0 calc(28px + env(safe-area-inset-bottom));
}
.page-pad { padding-left: 16px; padding-right: 16px; }
.page-title {
  margin: 0 0 12px; padding: 4px 16px 0;
  font-size: 22px; font-weight: 800; letter-spacing: -.3px;
}
.guest, .empty, .error {
  margin: 28px 16px; padding: 24px; border-radius: 16px;
  background: var(--po-surface); text-align: center;
  border: 1px solid var(--po-border);
  box-shadow: 0 1px 0 rgba(28,36,35,.03);
}
.guest h2, .empty h2 { margin: 12px 0 8px; font-size: 18px; }
.guest p, .empty p, .error p { margin: 0; color: var(--po-muted); }
.guest button, .empty a.cta, .error button, .btn-primary, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 16px; height: 44px; padding: 0 18px; border: 0; border-radius: 12px;
  background: var(--po-accent); color: #fff; font-weight: 700; cursor: pointer;
}
.btn.ghost { background: rgba(28,36,35,.06); color: var(--po-ink); }
.btn.danger { background: #C62828; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 12px; margin-top: 0; }
.card {
  margin: 0 16px 10px; padding: 14px 16px; border-radius: 16px;
  background: var(--po-surface);
  border: 1px solid var(--po-border);
  box-shadow: 0 1px 0 rgba(28,36,35,.03);
}
.card.bleed {
  margin: 0 16px 10px; border-radius: 16px; padding: 14px 0 8px;
  background: var(--po-surface);
  border: 1px solid var(--po-border);
}
.card h3 { margin: 0; font-size: 15px; font-weight: 800; }
.muted { color: var(--po-muted); font-size: 13px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stat-val { font-size: 26px; font-weight: 800; letter-spacing: -.4px; color: #fff; }
.revenue-card {
  margin: 0 16px 10px; padding: 16px; border-radius: 16px; color: #fff;
  background: linear-gradient(135deg, var(--po-accent), var(--po-accent-deep));
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 8px 20px rgba(15,118,110,.22);
}
.revenue-card .muted { color: rgba(255,255,255,.78); }
.revenue-card .link-more {
  background: rgba(255,255,255,.16); color: #fff;
}
.debt-card { margin: 0 16px 10px; }
.debt-card .stat-val { color: #C2410C; font-size: 22px; }
.rev-summary {
  margin: 0 16px 14px; padding: 14px;
  border-radius: 14px; background: #fff;
  border: 1px solid color-mix(in srgb, var(--po-accent) 20%, var(--po-border));
}
.rev-summary-top {
  display: flex; align-items: center; gap: 10px;
}
.rev-summary-top strong { font-size: 15px; font-weight: 800; }
.rev-period-btn {
  margin-left: auto; appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--po-accent) 10%, #fff);
  color: var(--po-accent); font-size: 12px; font-weight: 700;
}
.rev-total {
  margin-top: 10px; font-size: 22px; font-weight: 800;
  color: var(--po-accent); letter-spacing: -.3px;
}
.rev-meta {
  margin: 8px 0 0; color: var(--po-muted); font-size: 13px; line-height: 1.35;
}
.rev-empty {
  margin: 40px 16px 0; text-align: center; color: var(--po-muted);
}
.rev-empty .ico { font-size: 40px; line-height: 1; opacity: .55; }
.rev-empty .t {
  margin-top: 12px; color: var(--po-ink);
  font-size: 16px; font-weight: 700;
}
.rev-empty p { margin: 6px 0 0; font-size: 13px; }
.rev-orders { display: grid; gap: 10px; padding: 0 16px 8px; }
.rev-order {
  display: flex; align-items: stretch; gap: 0;
  background: #fff; border-radius: 16px;
  border: 1px solid #E2E8F0; overflow: hidden;
}
.rev-order-main {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px;
  padding: 12px 4px 12px 14px; color: inherit;
}
.rev-order .ava {
  flex: none; width: 44px; height: 44px; border-radius: 999px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--po-accent) 12%, #fff);
  color: var(--po-accent); font-weight: 800;
}
.rev-order .ava.is-debt {
  background: color-mix(in srgb, #C2410C 12%, #fff);
  color: #C2410C;
}
.rev-order .meta { flex: 1; min-width: 0; }
.rev-order .t {
  display: block; font-weight: 700; font-size: 15px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rev-order .s {
  display: block; margin-top: 2px; color: var(--po-muted);
  font-size: 12.5px; line-height: 1.3;
}
.rev-order .amt { flex: none; text-align: right; padding-right: 2px; }
.rev-order .total { display: block; font-weight: 800; color: var(--po-accent); }
.rev-order .st {
  display: block; margin-top: 2px; font-size: 11px; font-weight: 700;
  color: var(--po-accent);
}
.rev-order .st.is-debt { color: #C2410C; }
.rev-del {
  flex: none; width: 44px; border: 0; background: transparent;
  color: #DC2626; cursor: pointer;
  display: grid; place-items: center;
}
.rev-del svg { width: 20px; height: 20px; display: block; }
.rev-del:disabled { opacity: .45; cursor: default; }
.mem-head {
  display: flex; align-items: center; gap: 10px;
  margin: 0 16px 10px; padding: 14px 16px;
  border-radius: 16px;
  background: var(--po-surface);
  border: 1px solid var(--po-border);
  box-shadow: 0 1px 0 rgba(28,36,35,.03);
}
.mem-head .page-title { flex: 1; min-width: 0; padding: 0; margin: 0; font-size: 20px; }
.mem-actions {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; gap: 10px;
  margin: 0 16px; padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, transparent, var(--po-bg, #F3F7F6) 30%);
}
.mem-actions button {
  appearance: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; border-radius: 12px; font-size: 15px; font-weight: 800;
}
.mem-actions svg { width: 20px; height: 20px; flex: none; }
.mem-del {
  flex: 1; background: #fff; color: #D92D20;
  border: 1px solid color-mix(in srgb, #D92D20 55%, transparent);
}
.mem-save { flex: 2; border: 0; background: var(--po-accent); color: #fff; }
.mem-actions button:disabled { opacity: .55; cursor: default; }
.mem-panel {
  margin: 0 16px 10px;
  border-radius: 16px;
  background: var(--po-surface);
  border: 1px solid var(--po-border);
  box-shadow: 0 1px 0 rgba(28,36,35,.03);
  overflow: hidden;
}
.mem-tabs {
  display: grid; grid-template-columns: 1fr 1fr;
  margin: 0; border-bottom: 1px solid var(--po-border);
  background: color-mix(in srgb, var(--po-surface) 88%, #E8F0EE);
}
.mem-tabs button {
  appearance: none; border: 0; border-bottom: 3px solid transparent;
  background: transparent; color: var(--po-muted);
  min-height: 44px; font-size: 14px; font-weight: 700; cursor: pointer;
}
.mem-tabs button.on {
  color: var(--po-accent); border-bottom-color: var(--po-accent); font-weight: 800;
  background: var(--po-surface);
}
.mem-body { padding: 12px; }
.mem-card {
  margin-bottom: 12px; padding: 14px;
  border-radius: 14px; background: #fff;
  border: 1px solid var(--po-border);
  box-shadow: 0 1px 0 rgba(28,36,35,.03);
}
.mem-card:last-child { margin-bottom: 0; }
.mem-card-title {
  margin: 0 0 10px; font-size: 15px; font-weight: 800;
}
.mem-card .app-tf { margin-bottom: 10px; }
.mem-card .app-tf:last-child { margin-bottom: 0; }
.mem-stat {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
  border-top: 1px solid rgba(28,36,35,.06);
}
.mem-stat:first-of-type { border-top: 0; padding-top: 0; }
.mem-stat .lbl { flex: 1; min-width: 0; color: rgba(28,36,35,.7); font-size: 14px; }
.mem-stat .val { font-weight: 700; }
.mem-stat.is-debt .val { color: #C2410C; }
.mem-empty {
  padding: 40px 16px; text-align: center; color: var(--po-muted);
  border-radius: 14px; background: #fff; border: 1px solid var(--po-border);
}
.mem-empty .ico { font-size: 40px; opacity: .5; line-height: 1; }
.mem-empty p { margin: 12px 0 0; font-size: 14px; }
.mem-sessions { display: grid; gap: 8px; }
.mem-session {
  display: flex; align-items: center; gap: 10px;
  padding: 14px; border-radius: 14px;
  background: #fff; border: 1px solid var(--po-border);
  box-shadow: 0 1px 0 rgba(28,36,35,.03);
  color: inherit;
}
.mem-session .meta { flex: 1; min-width: 0; }
.mem-session .t { display: block; font-weight: 700; font-size: 14px; }
.mem-session .s {
  display: block; margin-top: 2px; color: var(--po-muted); font-size: 13px;
}
.mem-session .amt { flex: none; text-align: right; }
.mem-session .total { display: block; font-weight: 800; }
.mem-session .debt {
  display: block; margin-top: 2px; color: #C2410C;
  font-size: 12px; font-weight: 700;
}
.mem-session .chev {
  flex: none; color: rgba(28,36,35,.35); font-size: 22px; line-height: 1;
}
.pond-chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 8px;
  -webkit-overflow-scrolling: touch;
}
.pond-chip {
  flex: none; height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--po-border);
  background: var(--po-surface); color: var(--po-ink); font-weight: 700; font-size: 13px;
  box-shadow: none; cursor: pointer;
}
.pond-chip.on {
  background: color-mix(in srgb, var(--po-accent) 12%, #fff);
  color: var(--po-accent); border-color: var(--po-accent);
  box-shadow: none;
}
/* Chọn hồ — đồng bộ border với các block card khác */
.pond-select {
  margin: 0 16px 10px;
  border-radius: 16px;
  background: var(--po-surface);
  border: 1px solid var(--po-border);
  box-shadow: 0 1px 0 rgba(28,36,35,.03);
  overflow: hidden;
}
.pond-select-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 14px 16px; border: 0; background: transparent;
  text-align: left; color: inherit; cursor: pointer;
}
.pond-select-btn:active { background: rgba(15,118,110,.06); }
.pond-select-ico {
  flex: none; width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; color: var(--po-accent);
  background: color-mix(in srgb, var(--po-accent) 12%, #fff);
}
.pond-select-ico svg { width: 22px; height: 22px; display: block; }
.pond-select-text { flex: 1; min-width: 0; }
.pond-select-name {
  display: block; font-weight: 800; font-size: 16px; line-height: 1.25;
  color: var(--po-ink); word-break: break-word;
}
.pond-select-addr {
  display: block; margin-top: 3px; color: var(--po-muted); font-size: 13px;
  line-height: 1.3; word-break: break-word;
}
.pond-select-chev {
  flex: none; color: rgba(28,36,35,.45); font-size: 22px; line-height: 1;
}
.pond-pick-list { display: flex; flex-direction: column; gap: 4px; margin: 0 -4px; }
.pond-pick-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 10px; border: 0; border-radius: 12px;
  background: transparent; text-align: left; color: inherit; cursor: pointer;
}
.pond-pick-item.on {
  background: color-mix(in srgb, var(--po-accent) 8%, #fff);
}
.pond-pick-item .ico { flex: none; color: rgba(28,36,35,.4); font-size: 20px; line-height: 1; }
.pond-pick-item.on .ico { color: var(--po-accent); }
.pond-pick-item .meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pond-pick-item .t {
  display: block; font-weight: 600; font-size: 14px; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pond-pick-item.on .t { font-weight: 800; }
.pond-pick-item .s {
  display: block; color: var(--po-muted); font-size: 12px; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.section-head {
  display: flex; align-items: center; gap: 8px;
  padding: 0 16px; margin-bottom: 8px;
}
.section-head h3 { flex: 1; margin: 0; font-size: 15px; font-weight: 800; }
.section-head .section-title {
  display: flex; align-items: center; gap: 8px;
  flex: 1; min-width: 0;
}
.section-head .section-title h3 { flex: none; }
.section-head.has-rule {
  padding-bottom: 12px; margin-bottom: 0;
  border-bottom: 1px solid var(--po-border);
}
.card.bleed > .section-head.has-rule + .list,
.card.bleed > .section-head.has-rule + .tabs,
.card.bleed > .section-head.has-rule + .muted,
.card.bleed > .section-head.has-rule + p.muted {
  margin-top: 0;
}
.card.bleed > .section-head.has-rule + .list > .item:first-child,
.card.bleed > .section-head.has-rule + .item {
  border-top: 0;
}
.count-pill {
  min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px;
  background: color-mix(in srgb, var(--po-accent) 14%, #fff); color: var(--po-accent);
  font-size: 12px; font-weight: 800; display: inline-grid; place-items: center;
  border: 1px solid color-mix(in srgb, var(--po-accent) 28%, #fff);
}
.icon-btn {
  width: 36px; height: 36px; border: 1px solid color-mix(in srgb, var(--po-accent) 28%, #fff);
  border-radius: 10px; cursor: pointer;
  background: color-mix(in srgb, var(--po-accent) 12%, #fff); color: var(--po-accent);
  display: grid; place-items: center; font-size: 20px; font-weight: 700; line-height: 1;
}
.list { display: flex; flex-direction: column; }
.item {
  display: block; width: 100%; padding: 12px 16px; border: 0;
  border-top: 1px solid var(--po-border); background: transparent;
  text-align: left; color: inherit; cursor: pointer;
}
.item:first-child { border-top: 0; }
.card.bleed > .section-head + .item,
.card.bleed > .section-head + .list > .item:first-child {
  border-top: 0;
}
.item .t { font-weight: 700; font-size: 14px; }
.item .s { margin-top: 3px; color: var(--po-muted); font-size: 12px; }
.item.session-row {
  display: block; padding: 14px 16px;
}
.item.session-row .t {
  font-weight: 800; font-size: 16px; line-height: 1.25; color: var(--po-ink);
}
.session-cols {
  display: grid;
  grid-template-columns: 1fr 1fr 1.15fr;
  gap: 8px;
  margin-top: 10px;
}
.session-cols .col { min-width: 0; }
.session-cols .col.center { text-align: center; }
.session-cols .col.right { text-align: right; }
.session-cols .lbl {
  display: block; font-size: 11px; font-weight: 700;
  letter-spacing: .02em; color: var(--po-muted);
}
.session-cols .val {
  display: block; margin-top: 3px; font-size: 14.5px; font-weight: 800;
  line-height: 1.2; color: var(--po-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.session-cols .col.right .val { color: var(--po-accent); }
.session-link { display: block; color: inherit; text-decoration: none; }
.session-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.session-acts .btn.ghost.is-danger { color: #B42318; background: #FDECEA; }
.session-grid,
.seat-grid {
  display: grid; gap: 8px; padding: 0 16px 10px;
}
.session-grid {
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
}
.seat-grid {
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
}
@media (min-width: 520px) {
  .seat-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
}
.seat-tile,
.session-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; min-height: 96px; padding: 10px 8px;
  border-radius: 12px; border: 1px solid var(--po-border);
  background: #fff; text-align: center; color: inherit; text-decoration: none;
  cursor: pointer;
}
.seat-tile.is-empty {
  background: #F3F7F6; color: var(--po-muted);
  border-style: dashed; cursor: default;
}
.seat-tile.is-busy,
.session-tile {
  border-color: color-mix(in srgb, var(--po-accent) 32%, var(--po-border));
  background: color-mix(in srgb, var(--po-accent) 6%, #fff);
}
.seat-tile .seat-no,
.session-tile .seat-no {
  font-size: 11px; font-weight: 800; color: var(--po-muted); letter-spacing: .02em;
}
.seat-tile.is-busy .seat-no { color: var(--po-accent); }
.seat-tile .ava,
.session-tile .ava {
  width: 34px; height: 34px; border-radius: 999px;
  display: grid; place-items: center;
  background: #CCFBF1; color: var(--po-accent);
  font-size: 14px; font-weight: 800;
}
.seat-tile .name,
.session-tile .name {
  width: 100%; font-size: 12px; font-weight: 700; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.seat-tile .meta,
.session-tile .meta {
  width: 100%; font-size: 10px; color: var(--po-muted); line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.seat-unassigned {
  margin: 4px 16px 0; font-size: 12px; font-weight: 700; color: var(--po-muted);
}
.see-more {
  display: block; width: calc(100% - 32px); margin: 4px 16px 8px; height: 40px;
  border: 1px solid var(--po-border); border-radius: 12px; background: rgba(28,36,35,.03);
  color: rgba(28,36,35,.7); font-weight: 700; cursor: pointer;
}
.link-more {
  flex: none; height: 32px; padding: 0 12px; border: 1px solid var(--po-border); border-radius: 10px; cursor: pointer;
  background: rgba(28,36,35,.04); color: rgba(28,36,35,.7); font-weight: 700; font-size: 12px;
  white-space: nowrap;
}
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 8px 16px 4px; }
.tabs button, .period button {
  flex: none; height: 32px; padding: 0 12px; border: 1px solid var(--po-border); border-radius: 999px; cursor: pointer;
  background: var(--po-surface); color: rgba(28,36,35,.7); font-weight: 700; font-size: 12px;
}
.tabs button.on, .period button.on {
  background: var(--po-accent); color: #fff; border-color: var(--po-accent);
}
.period { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.guides { margin: 12px 16px 0; }
.guides h3 { margin: 0 0 10px; font-size: 15px; font-weight: 800; }
.guide {
  display: flex; gap: 12px; align-items: center; padding: 10px 0;
  border-top: 1px solid var(--po-border);
}
.guide:first-of-type { border-top: 0; }
.guide img { width: 64px; height: 48px; object-fit: cover; border-radius: 10px; background: #e8eeed; border: 1px solid var(--po-border); }
.skel {
  height: 72px; margin: 0 16px 10px; border-radius: 14px;
  border: 1px solid var(--po-border);
  background: linear-gradient(90deg,#eef3f2,#f7fafa,#eef3f2); background-size: 200% 100%;
  animation: shimmer 1.1s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.form-stack {
  display: flex; flex-direction: column; gap: 12px;
  margin: 0 16px 12px; padding: 16px;
  border-radius: 16px;
  background: var(--po-surface);
  border: 1px solid var(--po-border);
  box-shadow: 0 1px 0 rgba(28,36,35,.03);
}
.field label {
  display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; color: rgba(28,36,35,.7);
}
.field input, .field select, .field textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--po-border); background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--po-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--po-accent) 18%, transparent);
}
.field textarea { min-height: 96px; resize: vertical; }
.app-loc {
  display: flex; align-items: center; gap: 0;
  width: 100%; min-height: 56px; padding: 0;
  border-radius: 14px; border: 1px solid rgba(28,36,35,.18);
  background: #fff; color: inherit; text-align: left; cursor: pointer;
}
.app-loc:active { background: rgba(15,118,110,.04); }
.app-loc .app-tf-prefix {
  flex: none; width: 44px; display: grid; place-items: center;
  color: var(--po-accent);
}
.app-loc .app-tf-prefix svg { width: 22px; height: 22px; display: block; }
.app-loc-main { flex: 1; min-width: 0; padding: 10px 0; }
.app-loc-label {
  display: block; font-size: 12px; font-weight: 700; color: var(--po-muted);
}
.app-loc.has-value .app-loc-label { color: var(--po-accent); }
.app-loc-value {
  display: block; margin-top: 2px; font-size: 15px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: rgba(28,36,35,.4);
}
.app-loc.has-value .app-loc-value { color: var(--po-ink); }
.app-loc .app-tf-suffix {
  flex: none; width: 44px; display: grid; place-items: center;
  color: rgba(28,36,35,.45);
}
.app-loc .app-tf-suffix svg { width: 20px; height: 20px; display: block; }
.app-select {
  display: flex; flex-direction: column; gap: 6px;
}
.app-select-label {
  font-size: 13px; font-weight: 700; color: rgba(28,36,35,.7);
}
.app-select select {
  width: 100%; min-height: 52px; padding: 0 14px;
  border-radius: 14px; border: 1px solid rgba(28,36,35,.18);
  background: #fff; font-weight: 600;
}
.app-select select:focus {
  outline: none; border-color: var(--po-accent);
  box-shadow: 0 0 0 1.5px var(--po-accent);
}
.po-media-label {
  margin: 4px 0 0; font-size: 14px; font-weight: 800;
}
.img-pick .thumb-wrap {
  position: relative; width: 72px; height: 72px;
}
.img-pick .thumb-wrap .thumb {
  width: 72px; height: 72px; object-fit: cover; border-radius: 12px;
  border: 1px solid var(--po-border); display: block;
}
.img-pick .thumb-del {
  position: absolute; top: -6px; right: -6px;
  width: 22px; height: 22px; border: 0; border-radius: 999px;
  background: #C62828; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}
.po-map-sheet {
  z-index: 80;
}
.po-map-panel {
  display: flex; flex-direction: column;
  width: min(720px, 100%); height: min(92vh, 820px);
  margin: auto; background: #fff; border-radius: 16px 16px 0 0;
  overflow: hidden;
}
@media (max-width: 720px) {
  .po-map-panel {
    width: 100%; height: 100%; border-radius: 0;
  }
}
.po-map-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-bottom: 1px solid var(--po-border);
  background: #fff;
}
.po-map-bar h2 {
  flex: 1; margin: 0; text-align: center;
  font-size: 16px; font-weight: 800;
}
.po-map-bar .ghost, .po-map-bar .ok {
  appearance: none; border: 0; background: transparent;
  min-width: 56px; height: 36px; font-weight: 800; cursor: pointer;
}
.po-map-bar .ok { color: var(--po-accent); }
.po-map-bar .ghost { color: var(--po-muted); }
.po-map-canvas { flex: 1; min-height: 280px; background: #e8eeed; }
.po-map-footer {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--po-border); background: #fff;
}
.po-map-addr {
  flex: 1; min-width: 0; margin: 0;
  font-size: 13px; font-weight: 600; color: var(--po-ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.po-map-me {
  flex: none; width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid var(--po-border); background: #fff;
  color: var(--po-accent); font-size: 18px; cursor: pointer;
}

.ac-wrap { position: relative; }
.ac-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40;
  max-height: 220px; overflow: auto;
  margin: 0; padding: 6px; list-style: none;
  background: var(--po-surface);
  border: 1px solid var(--po-border);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0,0,0,.12);
}
.ac-list[hidden] { display: none !important; }
.ac-item {
  display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px;
  background: transparent; text-align: left; color: inherit; cursor: pointer;
}
.ac-item:hover, .ac-item:focus { background: color-mix(in srgb, var(--po-accent) 10%, #fff); outline: none; }
.ac-item .t { display: block; font-weight: 700; font-size: 14px; }
.ac-item .s { display: block; margin-top: 2px; color: var(--po-muted); font-size: 12px; }
.ac-empty {
  padding: 10px 12px; color: var(--po-muted); font-size: 13px;
}
.match-banner {
  margin-top: 8px; padding: 10px 12px; border-radius: 12px;
  background: rgba(15, 118, 110, 0.1); color: #0F766E;
  font-size: 13px; font-weight: 700;
}
.match-banner[hidden] { display: none !important; }
.res-tile {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--po-border);
  background: #fff; text-align: left; color: inherit; cursor: pointer; font: inherit;
}
.res-tile:last-child { border-bottom: 0; }
.res-ava {
  flex: none; width: 44px; height: 44px; border-radius: 999px;
  display: grid; place-items: center;
  background: #FFF7ED; color: #C2410C; font-weight: 800; font-size: 16px;
}
.res-meta { flex: 1; min-width: 0; }
.res-meta .t, .res-meta .st { display: block; }
.res-meta .t {
  font-weight: 700; font-size: 15px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.res-meta .st {
  margin-top: 2px; font-size: 12px; font-weight: 700;
}
.res-meta .st.is-pending { color: #C2410C; }
.res-meta .st.is-ok { color: #0F766E; }
.res-meta .st.is-muted { color: #616161; }
.res-meta .s {
  margin-top: 2px; color: var(--po-muted); font-size: 12.5px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.res-chev { flex: none; color: rgba(28,36,35,.35); font-size: 20px; }
.res-head { justify-content: flex-end; }
.res-filter-btn {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  padding: 6px 4px 6px 12px; border: 0; border-radius: 999px;
  background: transparent; color: var(--po-accent); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer;
}
.res-filter-btn:hover { background: color-mix(in srgb, var(--po-accent) 8%, #fff); }
.res-filter-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-filter-more { font-size: 20px; line-height: 1; color: var(--po-ink, #1C2423); padding: 0 6px; }
.res-empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 32px 24px; text-align: center;
}
.res-empty-ico { color: rgba(28,36,35,.35); }
.res-empty-ico svg { width: 48px; height: 48px; }
.res-empty p { margin: 0; }
.res-menu-manual { text-decoration: none; }
.res-menu-divider { height: 1px; margin: 4px 10px; background: var(--po-border); }
#po-res-actions-sub { display: flex; flex-direction: column; gap: 4px; }
.res-sheet-phone { color: var(--po-muted); }
.res-sheet-st { font-weight: 700; }
.res-sheet-st.is-pending { color: #C2410C; }
.res-sheet-st.is-ok { color: #0F766E; }
.res-sheet-none { margin: 4px 0 0; }
.btn.res-outline-danger {
  background: #fff; color: #B3261E; border: 1px solid #B3261E;
}
.btn.res-text-danger {
  background: transparent; color: #B3261E; border: 0;
}
.checkin-pond {
  display: flex; align-items: center; gap: 12px;
  margin: 0 16px 14px; padding: 12px 14px;
  border-radius: 14px;
  background: var(--po-surface);
  border: 1px solid var(--po-border);
}
.checkin-pond-ico {
  flex: none; width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--po-accent) 12%, #fff);
  color: var(--po-accent);
}
.checkin-pond-ico svg { width: 22px; height: 22px; display: block; }
.checkin-pond-label {
  font-size: 12px; font-weight: 600; color: var(--po-muted);
}
.checkin-pond-name {
  margin-top: 2px; font-size: 16px; font-weight: 800; letter-spacing: -.2px;
  line-height: 1.25;
}
.field-row {
  display: flex; align-items: stretch; gap: 8px;
}
.field-row .field-main { flex: 1; min-width: 0; }
.field-side-btn {
  flex: none; width: 52px; min-height: 56px; margin: 0; padding: 0;
  border: 0; border-radius: 14px; cursor: pointer;
  background: var(--po-accent); color: #fff;
  display: grid; place-items: center;
}
.field-side-btn:active { filter: brightness(.96); }
.field-side-btn svg { width: 22px; height: 22px; display: block; }
.field-side-btn .plus { font-size: 28px; font-weight: 500; line-height: 1; }
.ticket-pick {
  display: flex; align-items: center; gap: 8px; width: 100%;
  min-height: 56px; padding: 10px 12px; border-radius: 14px;
  border: 1px solid rgba(28,36,35,.18); background: #fff;
  text-align: left; color: inherit; cursor: pointer;
}
.ticket-pick:focus {
  outline: none; border-color: var(--po-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--po-accent) 18%, transparent);
}
.ticket-pick .tp-text { flex: 1; min-width: 0; }
.ticket-pick .tp-name {
  display: block; font-weight: 800; font-size: 14px; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ticket-pick .tp-details {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0;
  margin-top: 4px; font-size: 12.5px; line-height: 1.35;
}
.ticket-pick .tp-price {
  font-weight: 700; color: var(--po-accent);
}
.ticket-pick .tp-unit {
  color: var(--po-muted);
}
.ticket-pick .tp-sep {
  margin: 0 8px; color: rgba(28,36,35,.28); font-weight: 700;
}
.ticket-pick .tp-chev { flex: none; color: rgba(28,36,35,.45); font-size: 20px; }
.pond-pick-item .tp-details {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0;
  margin-top: 3px; font-size: 12.5px;
}
.pond-pick-item .tp-price { font-weight: 700; color: var(--po-accent); }
.pond-pick-item .tp-unit { color: var(--po-muted); }
.pond-pick-item .tp-sep {
  margin: 0 8px; color: rgba(28,36,35,.28); font-weight: 700;
}
.ticket-list { display: flex; flex-direction: column; gap: 8px; }
.ticket-opt {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px;
  border-radius: 12px; border: 1.5px solid var(--po-border); background: #fff;
  text-align: left; cursor: pointer;
}
.ticket-opt.on {
  border-color: var(--po-accent);
  background: color-mix(in srgb, var(--po-accent) 8%, #fff);
}
.end-seg {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0; border: 1.5px solid var(--po-border); border-radius: 12px;
  overflow: hidden; background: #fff;
}
.end-seg button {
  appearance: none; border: 0; border-right: 1px solid var(--po-border);
  background: transparent; color: rgba(28,36,35,.72);
  min-height: 44px; padding: 8px 6px; font-size: 13px; font-weight: 700;
  cursor: pointer;
}
.end-seg button:last-child { border-right: 0; }
.end-seg button.on {
  background: color-mix(in srgb, var(--po-accent) 12%, #fff);
  color: var(--po-accent);
}
.po-money-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.po-money-row .lbl {
  font-size: 14px; font-weight: 600; color: rgba(28,36,35,.7);
}
.po-money-row .val {
  font-size: 16px; font-weight: 800; color: var(--po-accent);
}
.po-money-row .val.is-debt { color: #C62828; }
.po-money-row .val.is-ok { color: var(--po-accent); }
.po-money-hint {
  margin: 0; font-size: 12.5px; color: var(--po-muted); line-height: 1.35;
}
.po-money-hint.is-ok { color: var(--po-accent); }
.banner-warn {
  padding: 14px; border-radius: 14px;
  background: #FFF8EE; color: rgba(28,36,35,.85); font-size: 14px; font-weight: 600;
  border: 1px solid #F0C987;
}
.banner-warn .banner-row { display: flex; gap: 10px; align-items: flex-start; }
.banner-warn .banner-ico {
  flex: none; width: 28px; height: 28px; color: #C2410C; font-size: 22px; line-height: 1;
}
.po-sheet {
  position: fixed; inset: 0; z-index: 9999; display: none;
  flex-direction: column; justify-content: flex-end; align-items: center;
  background: rgba(4,32,30,.42);
}
.po-sheet[hidden] { display: none !important; }
.po-sheet.is-open { display: flex !important; }
.po-sheet-panel {
  width: min(520px, 100%); max-height: min(85vh, 640px); overflow: auto;
  background: var(--po-surface); border-radius: 20px 20px 0 0;
  border: 1px solid var(--po-border); border-bottom: 0;
  padding: 8px 16px calc(20px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 28px rgba(0,0,0,.12);
}
.po-sheet-panel.is-tall {
  max-height: min(92vh, 780px);
  display: flex; flex-direction: column;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  background: #F3F7F6;
}
.po-sheet-panel.is-tall .ax-body {
  flex: 1; min-height: 0; overflow: auto; margin: 0 -16px; padding: 0 16px 8px;
}
.po-sheet-handle {
  width: 40px; height: 4px; margin: 6px auto 12px; border-radius: 999px;
  background: rgba(28,36,35,.15);
}
.po-sheet-panel h2 { margin: 0 0 8px; font-size: 18px; font-weight: 800; }
.po-sheet-panel .sheet-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.po-sheet-panel .sheet-actions .btn,
.po-sheet-panel .sheet-actions .btn-primary { margin: 0; width: 100%; }
.ax-head {
  display: flex; align-items: center; gap: 8px; margin: 0 0 8px;
}
.ax-head h2 { margin: 0; flex: 1; font-size: 17px; font-weight: 800; }
.ax-head .ax-toggle {
  border: 0; background: transparent; color: var(--po-accent);
  font-weight: 700; font-size: 13px; cursor: pointer; padding: 6px 4px;
}
.ax-search { margin-bottom: 10px; }
.ax-sec {
  background: #fff; border-radius: 16px; margin-bottom: 10px; overflow: hidden;
}
.ax-sec-head {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; border: 0; background: transparent; cursor: pointer;
  text-align: left; color: inherit;
}
.ax-sec-head .ico {
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center; flex: none; overflow: hidden;
  background: color-mix(in srgb, var(--po-accent) 12%, #fff);
  color: var(--po-accent);
}
.ax-sec-head .ico svg { width: 16px; height: 16px; }
.ax-sec-head .ico img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ax-sec-head .ico.is-prod {
  background: color-mix(in srgb, #EA580C 12%, #fff); color: #EA580C;
}
.ax-sec-head h3 { margin: 0; flex: 1; font-size: 14px; font-weight: 800; }
.ax-sec-head .count {
  padding: 3px 8px; border-radius: 999px; background: #F3F7F6;
  font-size: 11px; font-weight: 700; color: var(--po-muted);
}
.ax-sec-head .chev { color: var(--po-muted); font-size: 18px; line-height: 1; }
.ax-sec.is-collapsed .ax-grid { display: none; }
.ax-sec.is-collapsed .ax-sec-head .chev { transform: rotate(-90deg); }
.ax-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px; padding: 0 12px 10px;
}
@media (min-width: 380px) {
  .ax-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 520px) {
  .ax-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.ax-tile {
  display: flex; flex-direction: column; border-radius: 7px; overflow: hidden;
  border: 1px solid color-mix(in srgb, #EA580C 22%, var(--po-border));
  background: #fff; padding: 0; cursor: pointer; text-align: center; color: inherit;
  min-width: 0;
}
.ax-tile.is-ticket {
  border-color: color-mix(in srgb, var(--po-accent) 28%, var(--po-border));
}
.ax-tile .media {
  aspect-ratio: 1; display: grid; place-items: center;
  background: color-mix(in srgb, #EA580C 8%, #fff); overflow: hidden;
}
.ax-tile.is-ticket .media {
  background: color-mix(in srgb, var(--po-accent) 8%, #fff);
  color: var(--po-accent);
}
.ax-tile .media img { width: 100%; height: 100%; object-fit: cover; }
.ax-tile .media svg { width: 28px; height: 28px; }
.ax-tile .name {
  margin: 4px 3px 0; font-size: 9px; font-weight: 700; line-height: 1.15;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ax-tile .price {
  margin: 2px 3px 0; font-size: 9px; font-weight: 800; line-height: 1.15;
  color: #C2410C; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ax-tile.is-ticket .price { color: var(--po-accent); }
.ax-tile .add-bar {
  margin-top: 4px; height: 16px; display: grid; place-items: center;
  background: color-mix(in srgb, #EA580C 12%, #fff); color: #EA580C;
  font-size: 12px; font-weight: 800; line-height: 1;
}
.ax-tile.is-ticket .add-bar {
  background: color-mix(in srgb, var(--po-accent) 12%, #fff); color: var(--po-accent);
}
.ax-empty-hint {
  padding: 14px; border-radius: 14px; background: #fff;
  border: 1px solid color-mix(in srgb, var(--po-accent) 20%, var(--po-border));
  margin-bottom: 10px;
}
.ax-empty-hint h4 { margin: 0 0 6px; font-size: 14px; font-weight: 800; }
.ax-empty-hint p { margin: 0; font-size: 13px; color: var(--po-muted); line-height: 1.4; }
.ax-empty-hint .btn-primary { margin-top: 12px; width: 100%; }
.ax-manual { display: flex; flex-direction: column; gap: 12px; padding-bottom: 8px; }
.ax-manual .hint { margin: 0; font-size: 12px; color: var(--po-muted); line-height: 1.4; }
.match-banner {
  padding: 10px 12px; border-radius: 12px;
  background: color-mix(in srgb, var(--po-accent) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--po-accent) 24%, #fff);
  font-size: 13px;
}

/* Session detail (Flutter-like) */
.sd-block {
  margin: 0 0 10px; padding: 16px;
  background: var(--po-surface);
  border-top: 1px solid var(--po-border);
  border-bottom: 1px solid var(--po-border);
}
.sd-guest-name {
  margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.3px; line-height: 1.2;
}
.sd-guest-phone { margin: 6px 0 0; color: var(--po-muted); font-size: 14px; }
.sd-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
  margin-top: 16px;
}
.sd-stat {
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px 8px; border-radius: 14px; border: 0;
  background: #F3F7F6; text-align: left; color: inherit; cursor: default;
  min-height: 72px;
}
button.sd-stat { cursor: pointer; }
button.sd-stat:active { filter: brightness(.98); }
.sd-stat .lab {
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; color: var(--po-muted);
}
.sd-stat .lab svg { width: 14px; height: 14px; }
.sd-stat .val {
  font-size: 16px; font-weight: 800; letter-spacing: -.2px;
  display: flex; align-items: center; gap: 4px;
}
.sd-stat .edit { color: rgba(28,36,35,.35); font-size: 12px; }
.sd-sec-head {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 16px 8px;
}
.sd-sec-head h3 { margin: 0; flex: 1; font-size: 14px; font-weight: 800; }
.sd-sec-head .ico { color: var(--po-accent); display: grid; place-items: center; }
.sd-sec-head .ico svg { width: 18px; height: 18px; }
.sd-add {
  flex: none; height: 32px; padding: 0 8px; border: 0; border-radius: 8px;
  background: transparent; color: var(--po-accent); font-weight: 700; font-size: 13px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 2px;
  text-decoration: none;
}
.sd-add:disabled { opacity: .5; cursor: default; }
.sd-busy {
  width: 28px; height: 28px; margin: 8px auto;
  border: 2.5px solid rgba(15,118,110,.2);
  border-top-color: var(--po-accent);
  border-radius: 50%;
  animation: sd-spin .7s linear infinite;
}
@keyframes sd-spin { to { transform: rotate(360deg); } }
.sd-dock .acts.is-busy { justify-content: center; min-height: 48px; }
#po-complete-body .field { margin: 0; }
#po-complete-body .field label { margin-bottom: 8px; }
.sd-empty {
  padding: 14px 16px 18px; color: var(--po-muted); font-size: 13px;
}
.sd-line {
  display: grid; grid-template-columns: 28px 1fr; gap: 10px;
  padding: 12px 16px; align-items: start;
}
.sd-line + .sd-line { border-top: 1px solid rgba(28,36,35,.08); }
.sd-thumb {
  width: 28px; height: 28px; border-radius: 8px;
  background: color-mix(in srgb, var(--po-accent) 10%, #fff);
  color: var(--po-accent); display: grid; place-items: center; margin-top: 2px;
}
.sd-thumb svg { width: 16px; height: 16px; }
.sd-thumb img { width: 28px; height: 28px; object-fit: cover; border-radius: 8px; }
.sd-line-top {
  display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px;
}
.sd-line-name {
  flex: 1; min-width: 0; font-weight: 700; font-size: 14px; line-height: 1.3;
}
.sd-del {
  flex: none; width: 28px; height: 28px; border: 0; border-radius: 8px;
  background: transparent; color: #C62828; cursor: pointer; font-size: 16px;
}
.sd-line-row {
  display: flex; align-items: center; gap: 8px;
}
.sd-price {
  flex: none; border: 0; background: transparent; padding: 0;
  color: var(--po-accent); font-weight: 700; font-size: 13px;
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.sd-qty {
  display: inline-flex; align-items: center; gap: 0;
  margin-left: auto; border-radius: 10px; overflow: hidden;
  background: color-mix(in srgb, var(--po-accent) 8%, #fff);
}
.sd-qty button {
  width: 30px; height: 30px; border: 0; background: transparent;
  color: var(--po-accent); font-weight: 800; cursor: pointer;
}
.sd-qty span {
  min-width: 22px; text-align: center; font-weight: 800; font-size: 13px;
}
.sd-amount {
  flex: none; min-width: 72px; text-align: right;
  font-weight: 800; color: var(--po-accent); font-size: 13px;
}
.sd-sticky,
.sd-dock {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  display: flex; justify-content: center;
  padding: 0; margin: 0;
  background: transparent; border: 0; box-shadow: none;
  pointer-events: none;
}
.sd-sticky .sd-sticky-panel,
.sd-dock .sd-sticky-panel {
  pointer-events: auto;
  width: min(640px, 100%);
  padding: 12px 16px 10px;
  background: #fff;
  border-top: 1px solid var(--po-border);
  box-shadow: 0 -8px 24px rgba(0,0,0,.08);
}
.sd-sticky .total-row,
.sd-dock .total-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}
.sd-sticky .total-row strong,
.sd-dock .total-row strong { font-size: 15px; font-weight: 800; }
.sd-sticky .total-amt,
.sd-dock .total-amt {
  margin-left: auto; border: 0; background: transparent; cursor: pointer;
  color: var(--po-accent); font-size: 16px; font-weight: 800;
  display: inline-flex; align-items: center; gap: 4px; padding: 0;
}
.sd-sticky .break,
.sd-dock .break {
  margin: 0 0 10px; color: var(--po-muted); font-size: 12px;
}
.sd-sticky .acts,
.sd-dock .acts {
  display: flex; gap: 8px;
}
.sd-sticky .acts .btn,
.sd-sticky .acts .btn-primary,
.sd-dock .acts .btn,
.sd-dock .acts .btn-primary {
  margin: 0; flex: 1; height: 44px;
}
.sd-sticky .acts .btn-primary,
.sd-dock .acts .btn-primary { flex: 2; }
.sd-sticky .acts .btn.cancel,
.sd-dock .acts .btn.cancel {
  background: transparent; color: #C62828;
  border: 1.5px solid color-mix(in srgb, #C62828 40%, #fff);
}

/*
 * Chi tiết phiên: chỉ bố cục trong .php-col / .page.
 * Không đụng display của .php-shell (desktop grid 3 cột).
 * Cuộn full chiều rộng cột giữa → thanh scroll giáp inbox bên phải.
 */
body.po-sd .php-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
body.po-sd .page {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body.po-sd .page.has-sd-sticky {
  padding-bottom: 0 !important;
}
body.po-sd .sd-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 12px;
}
body.po-sd .sd-scroll-inner {
  width: min(640px, 100%);
  margin: 0 auto;
}
body.po-sd .sd-dock {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  flex: none;
  width: 100%;
  display: block;
  pointer-events: auto;
  background: #fff;
  border-top: 1px solid var(--po-border);
  box-shadow: 0 -6px 18px rgba(0,0,0,.07);
  z-index: 5;
  transform: none !important;
}
body.po-sd .sd-dock .sd-sticky-panel {
  width: min(640px, 100%);
  margin: 0 auto;
  box-shadow: none;
  border: 0;
  border-radius: 0;
}

/* Mobile: khóa viewport, bottom-nav trong luồng — không đổi shell */
@media (max-width: 1099.98px) {
  body.po-sd {
    height: 100dvh;
    height: 100vh;
    overflow: hidden;
    padding-bottom: 0 !important;
    display: flex;
    flex-direction: column;
  }
  body.po-sd .php-shell {
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }
  body.po-sd .php-col {
    height: 100%;
    overflow: hidden;
  }
  body.po-sd .page {
    height: 100%;
  }
  body.po-sd .bottom-nav {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    flex: none;
    width: 100%;
  }
}

/* Desktop shell: giữ grid 3 cột, chỉ cho cột giữa cuộn trong page */
@media (min-width: 1100px) and (hover: hover) and (pointer: fine) {
  body.po-sd .php-shell {
    display: grid !important;
  }
  body.po-sd .php-col {
    overflow: hidden;
    height: 100%;
  }
  body.po-sd .page {
    height: 100%;
    max-height: 100%;
    padding-top: 12px !important;
  }
}

.sd-status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px; padding: 6px 10px; border-radius: 999px;
  background: rgba(28,36,35,.06); font-size: 12px; font-weight: 700;
}
.sd-debt { color: #C2410C; }
.inv-hero {
  margin: 0 16px 12px; padding: 16px;
  border-radius: 16px;
  background: var(--po-surface);
  border: 1px solid var(--po-border);
  box-shadow: 0 1px 0 rgba(28,36,35,.03);
}
.inv-hero .sd-guest-name { margin: 0; }
.inv-hero .sd-guest-phone { margin: 4px 0 0; }
.inv-meta { margin: 4px 0 0; color: var(--po-muted); font-size: 13px; line-height: 1.35; }
.inv-summary {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  margin-top: 14px; padding: 14px 8px;
  background: #fff; border-radius: 14px;
  border: 1px solid color-mix(in srgb, #C2410C 18%, var(--po-border));
}
.inv-summary .cell {
  text-align: center; padding: 0 6px;
  border-right: 1px solid rgba(28,36,35,.08);
}
.inv-summary .cell:last-child { border-right: 0; }
.inv-summary .lbl {
  display: block; font-size: 12px; font-weight: 600; color: var(--po-muted);
}
.inv-summary .val {
  display: block; margin-top: 4px; font-size: 14px; font-weight: 800;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.inv-summary .val.is-paid { color: var(--po-accent); }
.inv-summary .val.is-debt { color: #C2410C; }
.inv-summary .val.is-ok { color: var(--po-accent); }
.inv-panel {
  margin: 0 16px 10px;
  border-radius: 16px;
  background: var(--po-surface);
  border: 1px solid var(--po-border);
  box-shadow: 0 1px 0 rgba(28,36,35,.03);
  overflow: hidden;
}
.inv-tabs {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin: 0; border-bottom: 1px solid var(--po-border);
  background: color-mix(in srgb, var(--po-surface) 88%, #E8F0EE);
}
.inv-tabs button {
  appearance: none; border: 0; border-bottom: 3px solid transparent;
  background: transparent; color: var(--po-muted);
  min-height: 44px; font-size: 14px; font-weight: 700; cursor: pointer;
}
.inv-tabs button.on {
  color: var(--po-accent); border-bottom-color: var(--po-accent); font-weight: 800;
  background: var(--po-surface);
}
.inv-tab-body { padding: 12px; }
.inv-card {
  padding: 16px; border-radius: 14px; background: #fff;
  border: 1px solid var(--po-border);
}
.inv-ok {
  display: flex; align-items: center; gap: 10px;
  color: var(--po-accent);
}
.inv-ok .ok-ico {
  width: 28px; height: 28px; border-radius: 999px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--po-accent) 14%, #fff);
  font-weight: 800;
}
.inv-empty {
  padding: 36px 16px; text-align: center; color: var(--po-muted); font-size: 14px;
  border-radius: 14px; background: #fff; border: 1px solid var(--po-border);
}
.inv-pay-item {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 8px; padding: 12px;
  background: #fff; border-radius: 14px; border: 1px solid var(--po-border);
}
.inv-pay-item:last-child { margin-bottom: 0; }
.inv-pay-item .ava {
  flex: none; width: 36px; height: 36px; border-radius: 999px;
  display: grid; place-items: center;
  background: #CCFBF1; color: var(--po-accent); font-weight: 800;
}
.inv-pay-item .meta { flex: 1; min-width: 0; }
.inv-pay-item .t { font-weight: 700; font-size: 14px; }
.inv-pay-item .s { margin-top: 2px; color: var(--po-muted); font-size: 12px; }
.inv-pay-item .amt { font-weight: 800; color: var(--po-accent); }
.inv-line {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0;
}
.inv-line + .inv-line { border-top: 1px solid rgba(28,36,35,.06); }
.inv-line .n { flex: 1; min-width: 0; font-weight: 600; }
.inv-line .q { color: var(--po-muted); font-size: 13px; }
.inv-line .a { font-weight: 800; }
.inv-line.is-total {
  margin-top: 4px; padding-top: 12px;
  border-top: 1px solid rgba(28,36,35,.12);
}
.inv-line.is-total .n { font-weight: 800; }
.inv-line.is-total .a { color: var(--po-accent); }

.actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pond-grid { display: grid; gap: 10px; padding: 0 16px; }
.pond-tile {
  display: flex; gap: 12px; align-items: stretch; padding: 0; overflow: hidden;
  border-radius: 14px; background: var(--po-surface);
  border: 1px solid var(--po-border);
  box-shadow: 0 1px 0 rgba(28,36,35,.03);
}
.pond-tile img {
  width: 96px; height: 96px; object-fit: cover; background: #e8eeed; flex: none;
}
.pond-tile .body { flex: 1; min-width: 0; padding: 12px 12px 12px 0; }
.pond-tile .t { font-weight: 800; font-size: 15px; }
.mp-head {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 8px 4px 0; margin-bottom: 4px;
}
.mp-head .page-title { flex: 1; min-width: 0; margin-bottom: 0; }
.mp-menu-btn {
  flex: none; width: 40px; height: 40px; margin-right: 8px;
  border: 0; border-radius: 999px; background: transparent;
  color: var(--po-ink); font-size: 22px; line-height: 1; cursor: pointer;
}
.mp-menu-btn:active { background: rgba(28,36,35,.06); }
.mp-menu-list { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.mp-menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 6px; border-radius: 12px; color: inherit;
}
.mp-menu-item:active { background: color-mix(in srgb, var(--po-accent) 8%, #fff); }
.mp-menu-item .ava {
  flex: none; width: 40px; height: 40px; border-radius: 999px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--po-accent) 10%, #fff);
  color: var(--po-accent); font-weight: 800; font-size: 18px;
}
.mp-menu-item .meta { flex: 1; min-width: 0; }
.mp-menu-item .t { display: block; font-weight: 700; font-size: 15px; }
.mp-menu-item .s {
  display: block; margin-top: 2px; color: var(--po-muted); font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mp-menu-item .chev { flex: none; color: rgba(28,36,35,.35); font-size: 22px; }
.mp-list { display: grid; gap: 10px; padding: 8px 12px 20px; }
.mp-tile {
  display: flex; align-items: center; gap: 12px;
  padding: 10px; border-radius: 14px;
  background: #fff; border: 1px solid var(--po-border);
  box-shadow: 0 1px 0 rgba(28,36,35,.03);
  color: inherit;
}
.mp-tile .cover {
  flex: none; width: 72px; height: 72px; border-radius: 10px;
  object-fit: cover; background: #e8eeed;
}
.mp-tile .cover-ph {
  flex: none; width: 72px; height: 72px; border-radius: 10px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--po-accent) 10%, #fff);
  color: var(--po-accent); font-size: 22px;
}
.mp-tile .meta { flex: 1; min-width: 0; }
.mp-tile .t {
  display: block; font-weight: 800; font-size: 15px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mp-tile .addr {
  margin-top: 4px; color: rgba(28,36,35,.65);
  font-size: 13px; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.mp-tile .sub {
  display: block; margin-top: 4px;
  color: var(--po-accent); font-size: 12.5px; font-weight: 600;
}
.mp-tile .chev { flex: none; color: rgba(28,36,35,.35); font-size: 22px; }
.mp-empty {
  margin: 40px 24px; padding: 28px 20px; text-align: center;
  border-radius: 16px; background: var(--po-surface);
  border: 1px solid var(--po-border);
}
.mp-empty .ico { font-size: 40px; opacity: .55; line-height: 1; }
.mp-empty h2 { margin: 12px 0 8px; font-size: 17px; }
.mp-empty p { margin: 0; color: var(--po-muted); font-size: 14px; line-height: 1.4; }
.mp-claim {
  display: flex; align-items: center; gap: 10px;
  padding: 14px; border-radius: 14px;
  background: #fff; border: 1px solid var(--po-border);
}
.mp-claim-main { flex: 1; min-width: 0; color: inherit; }
.mp-claim .t { display: block; font-weight: 800; font-size: 15px; }
.mp-claim .addr {
  display: block; margin-top: 3px; color: var(--po-muted); font-size: 13px;
}
.mp-claim .sub {
  display: block; margin-top: 4px; color: var(--po-accent);
  font-size: 12.5px; font-weight: 600;
}
.btn-primary.sm {
  height: 36px; padding: 0 14px; margin: 0 12px 0 0;
  font-size: 13px; border-radius: 999px; flex: none;
}
.fish-toolbar {
  display: flex; gap: 8px; align-items: center;
  padding: 0 12px 10px;
}
.fish-search {
  flex: 1; min-width: 0; height: 44px; padding: 0 14px;
  border: 1.5px solid var(--po-border); border-radius: 12px;
  background: #fff; font: inherit;
}
.fish-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 0 12px 10px;
}
.fish-chip {
  border: 0; border-radius: 999px; padding: 8px 12px;
  background: color-mix(in srgb, var(--po-accent) 14%, #fff);
  color: var(--po-accent); font-weight: 700; font-size: 13px; cursor: pointer;
}
.fish-list {
  display: flex; flex-direction: column; gap: 2px;
  margin: 0 12px 8px; padding: 4px 0;
  border-radius: 14px; background: #fff;
  border: 1px solid var(--po-border);
}
.fish-row {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 10px 12px; border: 0;
  background: transparent; text-align: left; cursor: pointer; color: inherit;
}
.fish-row:active { background: color-mix(in srgb, var(--po-accent) 8%, #fff); }
.fish-row.is-on { background: color-mix(in srgb, var(--po-accent) 8%, #fff); }
.fish-row .ava {
  flex: none; width: 44px; height: 44px; border-radius: 999px;
  object-fit: cover; background: #e8eeed;
}
.fish-row .ava.ph {
  display: grid; place-items: center; font-size: 18px;
  background: color-mix(in srgb, var(--po-accent) 10%, #fff);
}
.fish-row .meta { flex: 1; min-width: 0; }
.fish-row .t { display: block; font-weight: 700; font-size: 15px; }
.fish-row .s {
  display: block; margin-top: 2px; color: var(--po-muted); font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fish-row .check {
  flex: none; width: 22px; color: var(--po-accent);
  font-weight: 800; font-size: 16px; text-align: center;
}
.method-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 0 12px;
}
.method-chip {
  border: 1px solid rgba(28,36,35,.18); border-radius: 999px;
  padding: 10px 14px; background: #fff; color: rgba(28,36,35,.75);
  font-weight: 700; font-size: 13px; cursor: pointer;
}
.method-chip.is-on {
  border-color: color-mix(in srgb, var(--po-accent) 40%, transparent);
  background: color-mix(in srgb, var(--po-accent) 16%, #fff);
  color: var(--po-accent);
}
.method-add {
  display: flex; gap: 10px; align-items: flex-start;
}
.method-add .btn { margin-top: 4px; flex: none; }
.wh-panel {
  margin: 0 16px 12px; padding: 14px;
  border-radius: 16px;
  background: var(--po-surface);
  border: 1px solid var(--po-border);
  box-shadow: 0 1px 0 rgba(28,36,35,.03);
}
.wh-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 12px;
}
.wh-panel .app-tf { margin: 0; }
.wh-search {
  width: 100%; height: 44px; padding: 0 12px;
  border-radius: 12px; border: 1px solid var(--po-border); background: #fff;
}
.wh-empty {
  margin: 0 16px 12px; padding: 28px 20px; text-align: center;
  border-radius: 16px;
  background: var(--po-surface);
  border: 1px solid var(--po-border);
  box-shadow: 0 1px 0 rgba(28,36,35,.03);
}
.wh-empty h2 { margin: 0 0 8px; font-size: 17px; }
.wh-empty p { margin: 0; color: var(--po-muted); font-size: 13px; }
.wh-catalog {
  margin: 0 16px 16px;
  padding: 4px 12px 12px;
  border-radius: 16px;
  background: var(--po-surface);
  border: 1px solid var(--po-border);
  box-shadow: 0 1px 0 rgba(28,36,35,.03);
}
.wh-section {
  margin: 0;
  padding: 10px 0 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.wh-section + .wh-section {
  border-top: 1px solid var(--po-border);
}
.wh-section.is-collapsed { padding-bottom: 4px; }
.wh-section.is-collapsed .wh-grid { display: none; }
.wh-section-head {
  display: flex; align-items: center; gap: 8px;
  margin: 0; padding: 4px 4px 0;
  width: 100%; border: 0; background: transparent; cursor: pointer;
  text-align: left; color: inherit; font: inherit;
}
.wh-section:not(.is-collapsed) .wh-section-head { margin-bottom: 10px; }
.wh-section-head h3 {
  margin: 0; flex: 1; font-size: 14px; font-weight: 800;
}
.wh-section-head .chev {
  flex: none; width: 18px; height: 18px; color: var(--po-muted);
  transition: transform .18s ease;
}
.wh-section.is-collapsed .wh-section-head .chev { transform: rotate(-90deg); }
.wh-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
@media (min-width: 560px) {
  .wh-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
}
@media (min-width: 720px) {
  .wh-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.wh-card {
  display: flex; flex-direction: column;
  border-radius: 12px; overflow: hidden;
  background: #fff;
  border: 1px solid var(--po-border);
  box-shadow: 0 1px 0 rgba(28,36,35,.03);
  color: inherit; text-decoration: none;
  min-width: 0;
}
.wh-card:hover { border-color: color-mix(in srgb, var(--po-accent) 40%, var(--po-border)); }
.wh-card .thumb {
  display: block; aspect-ratio: 1; width: 100%;
  object-fit: cover; background: #e8eeed; border: 0;
}
.wh-card .thumb-ph {
  aspect-ratio: 1; width: 100%; background: #e8eeed;
  display: grid; place-items: center; color: var(--po-muted); font-size: 16px;
}
.wh-card .body { padding: 6px 7px 8px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wh-card .t {
  font-weight: 700; font-size: 11px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.wh-card .price { font-weight: 800; font-size: 12px; color: var(--po-accent); }
.wh-card .s { color: var(--po-muted); font-size: 10px; }
.po-dialog {
  position: fixed; inset: 0; z-index: 10050; display: none;
  place-items: center; padding: 20px;
  background: rgba(4,32,30,.42);
}
.po-dialog[hidden] { display: none !important; }
.po-dialog.is-open { display: grid !important; }
.po-dialog-panel {
  width: min(420px, 100%);
  background: var(--po-surface);
  border: 1px solid var(--po-border);
  border-radius: 16px;
  padding: 18px 16px 16px;
  box-shadow: 0 16px 40px rgba(0,0,0,.18);
}
.po-dialog-panel h2 {
  margin: 0 0 10px; font-size: 17px; font-weight: 800;
}
.po-dialog-panel p {
  margin: 0; color: rgba(28,36,35,.82); font-size: 14px; line-height: 1.45;
  white-space: pre-wrap;
}
.po-dialog-panel .sheet-actions {
  display: flex; flex-direction: column; gap: 8px; margin-top: 16px;
}
.po-dialog-panel .sheet-actions.is-row {
  flex-direction: row; gap: 10px;
}
.po-dialog-panel .sheet-actions .btn,
.po-dialog-panel .sheet-actions .btn-primary {
  margin: 0; width: 100%;
}
.po-dialog-panel .sheet-actions.is-row .btn,
.po-dialog-panel .sheet-actions.is-row .btn-primary {
  flex: 1; width: auto;
}
.po-dialog-panel .btn.danger,
.btn.danger {
  background: #C62828; color: #fff;
}
.po-dialog-panel .btn.danger:disabled {
  opacity: .6; cursor: default;
}
.wh-row {
  display: flex; gap: 12px; align-items: center; padding: 12px 16px;
  border-top: 1px solid var(--po-border); background: var(--po-surface);
}
.wh-row:first-child { border-top: 0; border-radius: 16px 16px 0 0; }
.wh-row img {
  width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: #e8eeed; flex: none;
  border: 1px solid var(--po-border);
}
.img-pick {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.img-pick .thumb {
  width: 72px; height: 72px; border-radius: 12px; object-fit: cover; background: #e8eeed;
  border: 1px solid var(--po-border);
}
.img-pick .add {
  width: 72px; height: 72px; border-radius: 12px; border: 1.5px dashed rgba(28,36,35,.28);
  background: #fff; cursor: pointer; display: grid; place-items: center; color: var(--po-muted);
}

