/* Phoenix Hibachi V1651 Clean Rebuild consolidated runtime CSS.
   Consolidated from the approved live fixes so index.html no longer loads stacked patch files. */



/* Phoenix OS Master Build V164
   Purpose: final customer-facing overrides without patch-stacking core flows.
   Scope: unified login, invoice branding, modal scroll/focus, public contact privacy.
*/
:root {
  --phx-business-phone: "(516) 518-3325";
}

/* One neutral public login入口. Role routing happens after authentication. */
.phx-unified-login-tabs { display: none !important; }
.unified-login-note {
  border: 1px solid rgba(255,215,121,.22);
  background: rgba(255,215,121,.07);
  border-radius: 16px;
  padding: 10px 12px;
  color: var(--soft, #d9c7a6);
  font-size: .82rem;
  font-weight: 800;
  line-height: 1.45;
}

/* Modal / dropdown repair: the dialog shell can hide overflow, but the card must scroll. */
dialog[open] { overflow: hidden; }
.booking-modal[open], .login-modal[open], .dashboard-modal[open], .print-modal[open] {
  max-height: 100dvh;
}
.booking-modal .modal-card,
.login-modal .modal-card,
.dashboard-modal .modal-card,
.print-modal .modal-card,
#changePasswordModal .modal-card {
  max-height: calc(100dvh - 24px) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.mobile-nav.open {
  max-height: calc(100dvh - 96px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* Clean close icon. Remove ugly mobile blue focus ring, keep accessible focus-visible. */
.modal-close {
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  display: inline-grid !important;
  place-items: center;
  line-height: 0;
  font-size: 0 !important;
}
.modal-close:focus { outline: none !important; box-shadow: none !important; }
.modal-close:focus-visible {
  outline: 2px solid rgba(243,190,76,.82) !important;
  outline-offset: 3px;
}
.modal-close svg { width: 17px; height: 17px; display: block; pointer-events: none; }

/* V164 invoice branding: restored logo + watermark + official contact. */
.guest-invoice-v164 {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.guest-invoice-v164::before {
  content: attr(data-watermark);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%) rotate(-28deg);
  width: 160%;
  text-align: center;
  font-size: 42px;
  font-weight: 950;
  letter-spacing: .16em;
  color: rgba(20,61,152,.060);
  white-space: normal;
  z-index: -1;
}
.guest-invoice-v164::after {
  content: "PHOENIX HIBACHI • AUTHENTIC ORDER • PHOENIX HIBACHI • AUTHENTIC ORDER";
  position: absolute;
  left: -40px;
  right: -40px;
  bottom: 86px;
  transform: rotate(-12deg);
  font-size: 14px;
  font-weight: 950;
  letter-spacing: .22em;
  color: rgba(214,154,22,.14);
  text-align: center;
  z-index: -1;
}
.invoice-brand-v164 {
  text-align: center;
  position: relative;
  display: grid;
  gap: 2px;
  justify-items: center;
}
.invoice-logo-v164 {
  width: 88px !important;
  height: 88px !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto 3px !important;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}
.invoice-brand-v164 .invoice-brand-contact {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: #3b2a17;
}
.invoice-security-seal-v164 {
  border: 1px dashed #ba8500;
  background: rgba(255,246,213,.76);
  padding: 10px 12px;
  margin: 16px 0;
  display: grid;
  gap: 4px;
  color: #111;
}
.invoice-security-seal-v164 b {
  letter-spacing: .08em;
  text-transform: uppercase;
}
.invoice-security-seal-v164 span { font-size: 13px; color: #333; }
.invoice-payment-grid-v164,
.invoice-ledger-grid-v164 {
  display: grid;
  gap: 7px;
  margin: 14px 0;
  border: 1px solid rgba(0,0,0,.13);
  background: rgba(255,255,255,.72);
  padding: 12px;
}
.invoice-ledger-grid-v164 div,
.invoice-payment-grid-v164 div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px dotted rgba(0,0,0,.18);
  padding-bottom: 5px;
}
.invoice-ledger-grid-v164 div:last-child,
.invoice-payment-grid-v164 div:last-child { border-bottom: 0; }
.invoice-ledger-grid-v164 b,
.invoice-payment-grid-v164 b { color: #111; }
.invoice-ledger-grid-v164 .balance-due-v164 b,
.invoice-ledger-grid-v164 .balance-due-v164 span {
  font-size: 1.05rem;
  color: #8a140c;
  font-weight: 950;
}
.invoice-rule-box-v164 .coupon-red-warning { color: #b00000; font-weight: 950; }

@media(max-width:760px){
  .guest-invoice-v164::before{font-size:26px;width:180%;}
  .invoice-logo-v164{width:66px!important;height:66px!important;}
}
@media print{
  .guest-invoice-v164::before{color:rgba(20,61,152,.075)!important;}
  .guest-invoice-v164::after{color:rgba(214,154,22,.16)!important;}
  .invoice-logo-v164,.invoice-security-seal-v164{print-color-adjust:exact;-webkit-print-color-adjust:exact;}
}



/* Phoenix OS V164.1 UI Finish
   Fixes: admin action duplication, scroll-covering controls, one-page invoice print,
   unified alert layer, cleaner order/protein display. */

/* Admin order tools: keep them in normal flow. Do not let action controls cover content while scrolling. */
.dashboard-modal .dashboard-tabs,
body.portal-mode .dashboard-tabs,
.v102-order-tools,
.v101-order-tools,
.v107-payment-button,
.v142-social-composer {
  position: static !important;
  top: auto !important;
}

.dashboard-modal .modal-card,
.login-modal .modal-card,
.booking-modal .modal-card,
.print-modal .modal-card {
  scroll-padding-top: 18px;
}

/* Merge Modify Time into Order Details. The time editor remains inside the details panel. */
[data-v102-time-open],
[data-v101-open-time] {
  display: none !important;
}

.v102-order-panel .v1641-order-food {
  border-left: 3px solid rgba(255, 203, 82, .72);
  padding-left: 10px;
}
.v102-order-panel .v1641-order-food small {
  display: block;
  color: var(--soft, #c9bda8);
  margin-top: 3px;
}

/* Unified Phoenix modal alert. Replaces raw browser alert boxes visually. */
.phx-alert-layer-v1641 {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, .58);
  backdrop-filter: blur(9px);
}
.phx-alert-card-v1641 {
  width: min(520px, calc(100vw - 38px));
  border: 1px solid rgba(255, 205, 89, .42);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(18, 12, 6, .98), rgba(7, 5, 3, .98));
  color: #fff9ea;
  box-shadow: 0 22px 70px rgba(0,0,0,.72), inset 0 1px 0 rgba(255,255,255,.05);
  padding: 22px;
  display: grid;
  gap: 14px;
}
.phx-alert-card-v1641 h3 {
  margin: 0;
  color: #ffd56a;
  font-family: Georgia, serif;
  font-size: 1.2rem;
  letter-spacing: .02em;
}
.phx-alert-card-v1641 p {
  margin: 0;
  color: #f4ead8;
  white-space: pre-wrap;
  line-height: 1.45;
}
.phx-alert-card-v1641 button {
  justify-self: end;
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 950;
  letter-spacing: .04em;
  background: linear-gradient(135deg, #ffd56a, #d79a18);
  color: #1b0d03;
  cursor: pointer;
}
.phx-alert-card-v1641 button:focus-visible {
  outline: 2px solid rgba(255, 213, 106, .82);
  outline-offset: 3px;
}

/* Print preview should stay visually compact. */
.print-modal[open] .print-card #printArea.phx-force-one-page-v1641 {
  width: 8.5in !important;
  max-width: none !important;
  padding: .24in !important;
  zoom: .68 !important;
  margin: 0 auto 10px !important;
}
.print-modal[open] .print-card #printArea.phx-force-one-page-v1641 .guest-invoice {
  font-size: 11.5px !important;
  line-height: 1.08 !important;
}

@media print {
  @page { size: Letter portrait; margin: 3.5mm; }

  body.printing-invoice #printArea.phx-force-one-page-v1641,
  body.printing-invoice #printArea.phx-force-one-page-v1641.invoice-paper {
    width: 100% !important;
    height: auto !important;
    max-height: 10.55in !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  body.printing-invoice #printArea.phx-force-one-page-v1641 .guest-invoice {
    font-size: 6.15pt !important;
    line-height: .98 !important;
    max-height: 10.55in !important;
    overflow: hidden !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  body.printing-invoice #printArea.phx-force-one-page-v1641 .invoice-top-line { margin-bottom: 2px !important; }
  body.printing-invoice #printArea.phx-force-one-page-v1641 .invoice-ref { font-size: 6.5pt !important; margin-bottom: 1px !important; }
  body.printing-invoice #printArea.phx-force-one-page-v1641 .invoice-brand { margin-bottom: 3px !important; gap: 0 !important; }
  body.printing-invoice #printArea.phx-force-one-page-v1641 .invoice-logo-v103,
  body.printing-invoice #printArea.phx-force-one-page-v1641 .invoice-logo-v164 { width: 30px !important; height: 30px !important; margin-bottom: 1px !important; }
  body.printing-invoice #printArea.phx-force-one-page-v1641 .invoice-brand strong { font-size: 8.2pt !important; }
  body.printing-invoice #printArea.phx-force-one-page-v1641 .invoice-brand span { font-size: 5.9pt !important; }
  body.printing-invoice #printArea.phx-force-one-page-v1641 .invoice-main-grid { gap: 7px !important; grid-template-columns: .95fr 1.15fr !important; }
  body.printing-invoice #printArea.phx-force-one-page-v1641 .invoice-labels div,
  body.printing-invoice #printArea.phx-force-one-page-v1641 .invoice-notes,
  body.printing-invoice #printArea.phx-force-one-page-v1641 .invoice-protein-detail,
  body.printing-invoice #printArea.phx-force-one-page-v1641 .invoice-remark {
    grid-template-columns: 68px 1fr !important;
    margin: 0 0 1px !important;
    gap: 2px !important;
  }
  body.printing-invoice #printArea.phx-force-one-page-v1641 .invoice-row {
    grid-template-columns: 1fr 48px 58px !important;
    gap: 2px !important;
    line-height: .98 !important;
  }
  body.printing-invoice #printArea.phx-force-one-page-v1641 .invoice-payment-grid-v164,
  body.printing-invoice #printArea.phx-force-one-page-v1641 .invoice-ledger-grid-v164,
  body.printing-invoice #printArea.phx-force-one-page-v1641 .invoice-rule-box,
  body.printing-invoice #printArea.phx-force-one-page-v1641 .invoice-security-seal-v103,
  body.printing-invoice #printArea.phx-force-one-page-v1641 .invoice-security-seal-v164,
  body.printing-invoice #printArea.phx-force-one-page-v1641 .tip-suggestions,
  body.printing-invoice #printArea.phx-force-one-page-v1641 .tip-suggestions-final,
  body.printing-invoice #printArea.phx-force-one-page-v1641 .tip-suggestions-clean {
    margin: 2px 0 !important;
    padding: 2px 4px !important;
    gap: 1px !important;
  }
  body.printing-invoice #printArea.phx-force-one-page-v1641 .invoice-payment-grid-v164 div,
  body.printing-invoice #printArea.phx-force-one-page-v1641 .invoice-ledger-grid-v164 div {
    padding-bottom: 1px !important;
    gap: 6px !important;
  }
  body.printing-invoice #printArea.phx-force-one-page-v1641 .invoice-rule-box span,
  body.printing-invoice #printArea.phx-force-one-page-v1641 .invoice-security-seal-v103 span,
  body.printing-invoice #printArea.phx-force-one-page-v1641 .invoice-security-seal-v164 span {
    font-size: 5.5pt !important;
    line-height: .98 !important;
  }
  body.printing-invoice #printArea.phx-force-one-page-v1641 .invoice-food-alert span,
  body.printing-invoice #printArea.phx-force-one-page-v1641 .invoice-food-alert b { font-size: 6.1pt !important; }
  body.printing-invoice #printArea.phx-force-one-page-v1641 .tip-suggestions-final table,
  body.printing-invoice #printArea.phx-force-one-page-v1641 .tip-suggestions-clean .tip-row { font-size: 5.8pt !important; }

  /* This footer was creating an almost-empty second print page in Chrome. */
  body.printing-invoice #printArea.phx-force-one-page-v1641 .invoice-footer-red {
    display: none !important;
  }
}



/* Phoenix Hibachi V164.2 — Auth/Profile finish
   - Center top-layer system notices
   - Login/email confirmation helper
   - Logout/session reset polish
   - Persistent avatar status UI
*/

.phx-v1642-system-dialog {
  border: 0;
  padding: 0;
  max-width: min(92vw, 460px);
  background: transparent;
  color: #fff;
  z-index: 2147483647;
}
.phx-v1642-system-dialog::backdrop {
  background: rgba(0,0,0,.66);
  backdrop-filter: blur(10px);
}
.phx-v1642-system-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(244, 198, 93, .38);
  background:
    radial-gradient(circle at 20% 0%, rgba(244,198,93,.24), transparent 34%),
    linear-gradient(145deg, rgba(16,14,12,.98), rgba(36,22,13,.98));
  box-shadow: 0 34px 90px rgba(0,0,0,.72), inset 0 1px 0 rgba(255,255,255,.08);
  padding: 28px 26px 24px;
  text-align: center;
}
.phx-v1642-system-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, #f6d47b, #d8962f, #fff2b2);
}
.phx-v1642-eyebrow {
  margin: 0 0 8px;
  color: #f8cf74;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 11px;
  font-weight: 800;
}
.phx-v1642-system-card h3 {
  margin: 0 0 10px;
  color: #fff7df;
  font-size: clamp(21px, 4.5vw, 28px);
  line-height: 1.12;
}
.phx-v1642-system-card p {
  margin: 0;
  color: rgba(255,255,255,.84);
  line-height: 1.55;
  white-space: pre-line;
}
.phx-v1642-system-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}
.phx-v1642-btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 850;
  cursor: pointer;
  color: #211407;
  background: linear-gradient(135deg, #ffe7a3, #d99a32);
  box-shadow: 0 12px 30px rgba(218,151,45,.24);
}
.phx-v1642-btn.secondary {
  color: #fff7dd;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: none;
}
.phx-v1642-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.16);
  color: #fff7dd;
  background: rgba(255,255,255,.08);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.phx-v1642-close:focus { outline: none; }
.phx-v1642-close:focus-visible { outline: 2px solid rgba(244,198,93,.85); outline-offset: 3px; }

.phx-v1642-login-helper {
  margin-top: 12px;
  border: 1px solid rgba(244,198,93,.26);
  border-radius: 16px;
  background: rgba(244,198,93,.08);
  padding: 12px;
  color: rgba(255,255,255,.82);
  font-size: 13px;
  line-height: 1.45;
}
.phx-v1642-login-helper button {
  margin-top: 8px;
  border: 0;
  border-radius: 999px;
  padding: 9px 13px;
  font-weight: 800;
  cursor: pointer;
  color: #2a1808;
  background: linear-gradient(135deg, #ffe7a3, #d99a32);
}

.phx-v1642-avatar-status {
  margin-top: 8px;
  font-size: 12px;
  color: rgba(255,255,255,.72);
}
.phx-v1642-avatar-status.ok { color: #c9f7d2; }
.phx-v1642-avatar-status.warn { color: #ffe0a3; }
.phx-v1642-avatar-status.error { color: #ffb7b7; }

body.phx-v1642-logging-out .portal-account,
body.phx-v1642-logging-out #portalAccount,
body.phx-v1642-logging-out #mobilePortalEntry {
  display: none !important;
}
body.phx-v1642-logging-out .login-entry,
body.phx-v1642-logging-out .mobile-login-entry {
  display: inline-flex !important;
}



/* Phoenix OS V164.3 — Order age and clean one-page invoice print. */

.phx-v1643-order-header {
  display: grid !important;
  grid-template-columns: minmax(160px, 1fr) auto auto !important;
  align-items: start !important;
  gap: 10px !important;
}
.phx-v1643-order-age {
  justify-self: end;
  align-self: start;
  border: 1px solid rgba(255, 203, 82, .24);
  border-radius: 999px;
  padding: 4px 9px;
  color: rgba(255, 238, 190, .92);
  background: rgba(255, 205, 89, .07);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}
[data-v120-action="time"] { display: none !important; }

.print-modal[open] .print-card #printArea.phx-v1643-print-polish,
.print-modal[open] .print-card #printArea.phx-force-one-page-v1641.phx-v1643-print-polish {
  width: 8.05in !important;
  max-width: none !important;
  padding: .26in .30in !important;
  margin: 0 auto 14px !important;
  zoom: .96 !important;
  background: #fff !important;
  color: #111 !important;
}
.print-modal[open] .print-card #printArea.phx-v1643-print-polish .guest-invoice {
  font-size: 12.4px !important;
  line-height: 1.13 !important;
}
.print-modal[open] .print-card #printArea.phx-v1643-print-polish .invoice-top-line { background: #888 !important; height: 1px !important; }
.print-modal[open] .print-card #printArea.phx-v1643-print-polish .invoice-highlight-yellow span,
.print-modal[open] .print-card #printArea.phx-v1643-print-polish .invoice-food-alert span { background: #fff8c9 !important; }

@media print {
  @page { size: Letter portrait; margin: 4.5mm; }

  body.printing-invoice #printArea.phx-v1643-print-polish,
  body.printing-invoice #printArea.phx-v1643-print-polish.invoice-paper,
  body.printing-invoice #printArea.phx-force-one-page-v1641.phx-v1643-print-polish,
  body.printing-invoice #printArea.phx-force-one-page-v1641.phx-v1643-print-polish.invoice-paper {
    width: 100% !important;
    min-height: auto !important;
    height: auto !important;
    max-height: 10.58in !important;
    padding: 0 !important;
    margin: 0 auto !important;
    overflow: hidden !important;
    box-shadow: none !important;
    border: 0 !important;
    background: #fff !important;
    color: #111 !important;
    print-color-adjust: economy !important;
    -webkit-print-color-adjust: economy !important;
  }

  body.printing-invoice #printArea.phx-v1643-print-polish .guest-invoice {
    width: 7.72in !important;
    max-width: 7.72in !important;
    margin: 0 auto !important;
    padding: 0 !important;
    max-height: 10.48in !important;
    overflow: hidden !important;
    font-size: 8.05pt !important;
    line-height: 1.06 !important;
    color: #111 !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  body.printing-invoice #printArea.phx-v1643-print-polish[data-print-fit="compact"] .guest-invoice { font-size: 7.55pt !important; line-height: 1.03 !important; }
  body.printing-invoice #printArea.phx-v1643-print-polish[data-print-fit="ultra"] .guest-invoice { font-size: 7.05pt !important; line-height: 1.0 !important; }

  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-top-line {
    height: 1px !important;
    background: #777 !important;
    margin: 0 0 5px !important;
  }
  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-ref {
    font-size: 6.6pt !important;
    margin: 0 0 3px !important;
    color: #333 !important;
  }
  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-brand {
    gap: 1px !important;
    margin: 0 0 7px !important;
    color: #183b78 !important;
    letter-spacing: .06em !important;
  }
  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-logo-v103,
  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-logo-v164 {
    width: 38px !important;
    height: 38px !important;
    margin: 0 auto 1px !important;
    opacity: .9 !important;
  }
  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-brand strong { font-size: 9.4pt !important; color:#143d98 !important; }
  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-brand span { font-size: 5.9pt !important; color:#222 !important; letter-spacing:0 !important; }
  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-brand-contact { display:flex !important; justify-content:center !important; gap:8px !important; flex-wrap:wrap !important; }

  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-main-grid {
    display: grid !important;
    grid-template-columns: .96fr 1.06fr !important;
    gap: 12px !important;
    align-items: start !important;
  }
  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-labels { gap: 1px !important; }
  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-labels div,
  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-notes,
  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-protein-detail,
  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-remark {
    display: grid !important;
    grid-template-columns: 82px 1fr !important;
    gap: 4px !important;
    margin: 0 0 2px !important;
  }
  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-labels b,
  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-notes b,
  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-protein-detail b { color:#111 !important; }

  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-highlight-yellow span,
  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-highlight-value,
  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-food-alert span {
    background: #fff8ce !important;
    border: 1px solid #e8d889 !important;
    padding: 2px 5px !important;
    min-height: auto !important;
    color: #111 !important;
  }
  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-food-alert b {
    color: #a80000 !important;
    letter-spacing: .035em !important;
  }

  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-money-block { gap: 1px !important; }
  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-row {
    display: grid !important;
    grid-template-columns: 1.13fr .62fr .84fr !important;
    gap: 5px !important;
    line-height: 1.05 !important;
    align-items: start !important;
  }
  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-row span { font-weight: 650 !important; }
  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-row em { font-style: normal !important; color:#333 !important; }
  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-row b { text-align:right !important; white-space:nowrap !important; color:#111 !important; }

  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-payment-grid-v164,
  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-ledger-grid-v164,
  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-rule-box,
  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-security-seal-v103,
  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-security-seal-v164,
  body.printing-invoice #printArea.phx-v1643-print-polish .tip-suggestions,
  body.printing-invoice #printArea.phx-v1643-print-polish .tip-suggestions-final,
  body.printing-invoice #printArea.phx-v1643-print-polish .tip-suggestions-clean {
    margin: 5px 0 !important;
    padding: 4px 6px !important;
    gap: 2px !important;
    border-color: #cfcfcf !important;
    background: #fffdf4 !important;
  }
  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-payment-grid-v164 div,
  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-ledger-grid-v164 div {
    display:flex !important;
    justify-content:space-between !important;
    gap:10px !important;
    border-bottom: 1px dotted #c9c9c9 !important;
    padding: 0 0 2px !important;
  }
  body.printing-invoice #printArea.phx-v1643-print-polish .balance-due-v164 span,
  body.printing-invoice #printArea.phx-v1643-print-polish .balance-due-v164 b {
    color:#b00000 !important;
    font-size: 10.4pt !important;
  }
  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-rule-box { background:#fbfbfb !important; }
  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-rule-box b { font-size: 7.5pt !important; }
  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-rule-box span,
  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-security-seal-v103 span,
  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-security-seal-v164 span {
    font-size: 6.45pt !important;
    line-height: 1.05 !important;
    color:#333 !important;
  }
  body.printing-invoice #printArea.phx-v1643-print-polish .coupon-red-warning { font-size: 6.8pt !important; color:#a80000 !important; }
  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-cash-note { display:none !important; }

  body.printing-invoice #printArea.phx-v1643-print-polish .tip-suggestions-final {
    display:grid !important;
    grid-template-columns: 88px 1fr !important;
    align-items:start !important;
  }
  body.printing-invoice #printArea.phx-v1643-print-polish .tip-suggestions-final b { text-transform:uppercase !important; color:#111 !important; }
  body.printing-invoice #printArea.phx-v1643-print-polish .tip-suggestions-final table {
    width:100% !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
    font-size: 6.6pt !important;
  }
  body.printing-invoice #printArea.phx-v1643-print-polish .tip-suggestions-final th,
  body.printing-invoice #printArea.phx-v1643-print-polish .tip-suggestions-final td {
    border-bottom: 1px dotted #d4d4d4 !important;
    padding: 1px 3px !important;
    text-align:right !important;
  }
  body.printing-invoice #printArea.phx-v1643-print-polish .tip-suggestions-final th:first-child,
  body.printing-invoice #printArea.phx-v1643-print-polish .tip-suggestions-final td:first-child { text-align:left !important; }
  body.printing-invoice #printArea.phx-v1643-print-polish .tip-suggestions-final em { grid-column: 2 !important; font-size: 6pt !important; color:#9b0000 !important; }

  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-security-seal-v164,
  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-security-seal-v103 {
    border: 1px dashed #d7b456 !important;
    background: #fffdf2 !important;
  }
  body.printing-invoice #printArea.phx-v1643-print-polish .invoice-footer-red { display:none !important; }
  body.printing-invoice #printArea.phx-v1643-print-polish .guest-invoice-v164::before,
  body.printing-invoice #printArea.phx-v1643-print-polish .guest-invoice-v103::before { color: rgba(20,61,152,.035) !important; }
  body.printing-invoice #printArea.phx-v1643-print-polish .guest-invoice-v164::after,
  body.printing-invoice #printArea.phx-v1643-print-polish .guest-invoice-v103::after { display:none !important; }
}

@media (max-width: 760px) {
  .phx-v1643-order-header { grid-template-columns: 1fr auto !important; }
  .phx-v1643-order-age { grid-column: 1 / -1; justify-self: start; }
}



/* Phoenix OS V164.4 — mobile overlay + clean auth UX
   No database schema changes. Works with V164.2 SQL/profile policies. */

/* Put mobile menu above floating quick buttons and page sections. */
.mobile-nav.open {
  position: fixed !important;
  top: calc(env(safe-area-inset-top, 0px) + 74px) !important;
  left: 12px !important;
  right: 12px !important;
  z-index: 2147482000 !important;
  max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 92px) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch !important;
  box-shadow: 0 32px 90px rgba(0,0,0,.82), 0 0 0 9999px rgba(0,0,0,.18) !important;
}
.mobile-nav.open a,
.mobile-nav.open button {
  position: relative;
  z-index: 1;
}
body.phx-mobile-menu-open .floating-book,
body.phx-mobile-menu-open .quick-actions,
body.phx-mobile-menu-open .assist-dock,
body.phx-mobile-menu-open [data-floating-actions] {
  z-index: 10 !important;
  pointer-events: none !important;
  opacity: .28 !important;
}

/* Remove the confusing mixed Chinese/English login explainer box. */
.unified-login-note,
.phx-v1642-login-helper {
  display: none !important;
}

/* Make the login card cleaner after removing helper blocks. */
.login-card .modal-help {
  margin-bottom: 18px;
}
.login-card label {
  margin-top: 14px;
}

/* V164.4 resend/confirmation dialog */
.phx-v1644-confirm-dialog {
  border: 0;
  padding: 0;
  width: min(92vw, 520px);
  max-width: min(92vw, 520px);
  background: transparent;
  color: #fff;
  z-index: 2147483647;
}
.phx-v1644-confirm-dialog::backdrop {
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(10px);
}
.phx-v1644-confirm-card {
  position: relative;
  border: 1px solid rgba(244,198,93,.34);
  border-radius: 26px;
  background:
    radial-gradient(circle at 12% 0%, rgba(244,198,93,.22), transparent 36%),
    linear-gradient(145deg, rgba(12,10,8,.99), rgba(39,24,12,.99));
  box-shadow: 0 34px 100px rgba(0,0,0,.78), inset 0 1px 0 rgba(255,255,255,.08);
  padding: 28px 24px 24px;
  text-align: left;
  overflow: hidden;
}
.phx-v1644-confirm-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, #ffe8a8, #dda13a, #fff3bf);
}
.phx-v1644-confirm-card h3 {
  margin: 0 0 10px;
  font-size: clamp(24px, 5vw, 34px);
  line-height: 1.08;
  color: #fff7df;
}
.phx-v1644-eyebrow {
  margin: 0 0 8px;
  color: #f8cf74;
  text-transform: uppercase;
  letter-spacing: .17em;
  font-weight: 900;
  font-size: 11px;
}
.phx-v1644-confirm-card p {
  margin: 0 0 14px;
  color: rgba(255,255,255,.82);
  line-height: 1.55;
}
.phx-v1644-confirm-card label {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  font-weight: 850;
  color: rgba(255,255,255,.86);
}
.phx-v1644-confirm-card input {
  width: 100%;
  min-height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(244,198,93,.28);
  background: rgba(0,0,0,.42);
  color: #fff;
  padding: 0 14px;
  font-size: 16px;
  font-weight: 800;
}
.phx-v1644-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.phx-v1644-confirm-actions button,
.phx-v1644-close {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 900;
  cursor: pointer;
}
.phx-v1644-confirm-actions .primary {
  color: #211407;
  background: linear-gradient(135deg, #ffe7a3, #d99a32);
  box-shadow: 0 12px 30px rgba(218,151,45,.22);
}
.phx-v1644-confirm-actions .secondary,
.phx-v1644-close {
  color: #fff7dd;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
}
.phx-v1644-confirm-actions button:disabled {
  opacity: .55;
  cursor: not-allowed;
}
.phx-v1644-status {
  min-height: 18px;
  margin-top: 10px;
  color: #ffe0a3;
  font-size: 13px;
  font-weight: 800;
}
.phx-v1644-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  padding: 0;
}

/* Better inline login errors when an exact message is shown. */
.phx-v1644-login-error {
  margin: 14px 0;
  border: 1px solid rgba(255,102,102,.55);
  border-radius: 18px;
  background: rgba(90,10,10,.48);
  color: #ffe4e4;
  padding: 14px;
  font-weight: 850;
  line-height: 1.42;
}



/* Phoenix OS V164.5 — readable one-page invoice + cleaner email confirm + contact action polish */

/* Keep the mobile menu and auth confirm dialog above floating buttons and Safari overlays. */
.phx-mobile-menu-open .floating-actions,
.phx-mobile-menu-open #assistantDock,
.phx-mobile-menu-open .assistant-dock,
.phx-mobile-menu-open .contact-dock { z-index: 1 !important; pointer-events: none !important; opacity: .25 !important; }
#mobileNav.open { z-index: 2147483000 !important; position: fixed !important; inset: 92px 10px auto 10px !important; max-height: calc(100dvh - 112px) !important; overflow-y: auto !important; }
.phx-v1644-confirm-dialog,
.phx-v1644-confirm-dialog[open] { z-index: 2147483600 !important; }
.phx-v1644-confirm-dialog::backdrop { background: rgba(0,0,0,.72) !important; backdrop-filter: blur(8px); }

/* Hide the resend email text field. The email comes from signup/login state. */
.phx-v1644-confirm-dialog [data-v1644-email-wrap] { display: none !important; }
.phx-v1645-confirm-email-display {
  display: block;
  margin: 14px 0 6px;
  padding: 14px 16px;
  border: 1px solid rgba(245,196,82,.34);
  border-radius: 18px;
  background: rgba(0,0,0,.42);
  color: #fff8df;
  font-weight: 900;
  word-break: break-word;
}
.phx-v1645-confirm-email-display small {
  display:block;
  margin-bottom: 5px;
  color: rgba(255,245,220,.66);
  font-size: .82em;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.phx-v1644-confirm-dialog .phx-v1644-confirm-actions { display:flex !important; flex-wrap:wrap !important; gap: 10px !important; }
.phx-v1644-confirm-dialog .phx-v1644-confirm-actions button { min-height: 48px !important; }

/* Contact buttons: make the intent clearer after Gmail/SMS enhancement. */
.phx-v1645-contact-ready { position: relative; }
.phx-v1645-contact-ready::after {
  content: attr(data-v1645-mode);
  display:inline-block;
  margin-left: 6px;
  font-size: 10px;
  opacity:.72;
  letter-spacing:.04em;
}

/* Print modal preview: show closer to real paper size and larger text. */
.print-modal[open] .print-card { max-width: min(98vw, 980px) !important; }
.print-modal[open] #printArea.phx-v1645-readable-print {
  width: min(8.5in, calc(100vw - 36px)) !important;
  min-height: 10.9in !important;
  padding: .14in .18in !important;
  margin: 0 auto !important;
  background: #fff !important;
  box-shadow: 0 12px 40px rgba(0,0,0,.25) !important;
}
.print-modal[open] #printArea.phx-v1645-readable-print .guest-invoice {
  width: 100% !important;
  max-width: 100% !important;
  font-size: 10.4px !important;
  line-height: 1.18 !important;
}
.print-modal[open] #printArea.phx-v1645-readable-print .invoice-rule-box span:not(.coupon-red-warning) { display:none !important; }
.print-modal[open] #printArea.phx-v1645-readable-print .phx-v1645-zero-row { display:none !important; }
.print-modal[open] #printArea.phx-v1645-readable-print .phx-v1645-empty-adjustments { display:none !important; }

@media print {
  @page { size: Letter portrait; margin: 3mm; }

  body.printing-invoice #printArea.phx-v1645-readable-print,
  body.printing-invoice #printArea.phx-v1645-readable-print.invoice-paper {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    padding: 0 !important;
    margin: 0 auto !important;
    overflow: visible !important;
    border: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
    print-color-adjust: economy !important;
    -webkit-print-color-adjust: economy !important;
  }

  body.printing-invoice #printArea.phx-v1645-readable-print .guest-invoice {
    width: 8.08in !important;
    max-width: 8.08in !important;
    margin: 0 auto !important;
    padding: 0 !important;
    max-height: 10.72in !important;
    overflow: hidden !important;
    font-size: 9.7pt !important;
    line-height: 1.13 !important;
    color: #111 !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  body.printing-invoice #printArea.phx-v1645-readable-print[data-v1645-density="compact"] .guest-invoice { font-size: 9.05pt !important; line-height: 1.08 !important; }
  body.printing-invoice #printArea.phx-v1645-readable-print[data-v1645-density="tight"] .guest-invoice { font-size: 8.45pt !important; line-height: 1.035 !important; }

  body.printing-invoice #printArea.phx-v1645-readable-print .invoice-top-line { margin: 0 0 3px !important; height: 1px !important; background:#888 !important; }
  body.printing-invoice #printArea.phx-v1645-readable-print .invoice-ref { font-size: 7.2pt !important; margin-bottom: 2px !important; color:#333 !important; }
  body.printing-invoice #printArea.phx-v1645-readable-print .invoice-brand { margin: 0 0 6px !important; gap: 0 !important; }
  body.printing-invoice #printArea.phx-v1645-readable-print .invoice-logo-v103,
  body.printing-invoice #printArea.phx-v1645-readable-print .invoice-logo-v164 { width: 42px !important; height: 42px !important; opacity:.92 !important; }
  body.printing-invoice #printArea.phx-v1645-readable-print .invoice-brand strong { font-size: 10.8pt !important; color:#143d98 !important; }
  body.printing-invoice #printArea.phx-v1645-readable-print .invoice-brand span { font-size: 6.5pt !important; color:#222 !important; }

  body.printing-invoice #printArea.phx-v1645-readable-print .invoice-main-grid {
    display:grid !important;
    grid-template-columns: 1fr 1.08fr !important;
    gap: 15px !important;
    align-items:start !important;
    margin-bottom: 5px !important;
  }
  body.printing-invoice #printArea.phx-v1645-readable-print .invoice-labels div,
  body.printing-invoice #printArea.phx-v1645-readable-print .invoice-notes,
  body.printing-invoice #printArea.phx-v1645-readable-print .invoice-protein-detail,
  body.printing-invoice #printArea.phx-v1645-readable-print .invoice-remark {
    grid-template-columns: 95px 1fr !important;
    gap: 5px !important;
    margin-bottom: 3px !important;
  }
  body.printing-invoice #printArea.phx-v1645-readable-print .invoice-highlight-yellow span,
  body.printing-invoice #printArea.phx-v1645-readable-print .invoice-highlight-value,
  body.printing-invoice #printArea.phx-v1645-readable-print .invoice-food-alert span {
    background:#fff9d7 !important;
    border: 1px solid #eadc9a !important;
    padding: 2px 5px !important;
  }

  body.printing-invoice #printArea.phx-v1645-readable-print .invoice-row {
    display:grid !important;
    grid-template-columns: 1.2fr .58fr .82fr !important;
    gap: 8px !important;
    line-height: 1.12 !important;
    margin-bottom: 1px !important;
  }
  body.printing-invoice #printArea.phx-v1645-readable-print .invoice-row b { text-align:right !important; white-space:nowrap !important; }

  body.printing-invoice #printArea.phx-v1645-readable-print .invoice-payment-grid-v164,
  body.printing-invoice #printArea.phx-v1645-readable-print .invoice-ledger-grid-v164,
  body.printing-invoice #printArea.phx-v1645-readable-print .invoice-rule-box,
  body.printing-invoice #printArea.phx-v1645-readable-print .tip-suggestions-final,
  body.printing-invoice #printArea.phx-v1645-readable-print .invoice-security-seal-v103,
  body.printing-invoice #printArea.phx-v1645-readable-print .invoice-security-seal-v164 {
    margin: 5px 0 !important;
    padding: 5px 7px !important;
    border: 1px solid #d2d2d2 !important;
    background:#fffdf5 !important;
  }
  body.printing-invoice #printArea.phx-v1645-readable-print .invoice-payment-grid-v164 div,
  body.printing-invoice #printArea.phx-v1645-readable-print .invoice-ledger-grid-v164 div {
    display:flex !important;
    justify-content:space-between !important;
    border-bottom: 1px dotted #d0d0d0 !important;
    padding: 1px 0 !important;
  }
  body.printing-invoice #printArea.phx-v1645-readable-print .phx-v1645-zero-row,
  body.printing-invoice #printArea.phx-v1645-readable-print .phx-v1645-empty-adjustments { display:none !important; }

  body.printing-invoice #printArea.phx-v1645-readable-print .invoice-rule-box span { display:none !important; }
  body.printing-invoice #printArea.phx-v1645-readable-print .invoice-rule-box b::after {
    content: " · Final price, discounts, credits, and payment confirmation must be confirmed by Phoenix Hibachi.";
    font-weight: 700;
    color:#9b0000;
  }
  body.printing-invoice #printArea.phx-v1645-readable-print .invoice-rule-box .coupon-red-warning { display:none !important; }
  body.printing-invoice #printArea.phx-v1645-readable-print .invoice-cash-note,
  body.printing-invoice #printArea.phx-v1645-readable-print .invoice-footer-red { display:none !important; }

  body.printing-invoice #printArea.phx-v1645-readable-print .balance-due-v164 b,
  body.printing-invoice #printArea.phx-v1645-readable-print .balance-due-v164 span { color:#b00000 !important; font-size: 11.2pt !important; font-weight:900 !important; }
  body.printing-invoice #printArea.phx-v1645-readable-print .tip-suggestions-final { grid-template-columns: 105px 1fr !important; }
  body.printing-invoice #printArea.phx-v1645-readable-print .tip-suggestions-final table { font-size: 7.5pt !important; }
  body.printing-invoice #printArea.phx-v1645-readable-print .tip-suggestions-final th,
  body.printing-invoice #printArea.phx-v1645-readable-print .tip-suggestions-final td { padding: 1px 4px !important; }
  body.printing-invoice #printArea.phx-v1645-readable-print .invoice-security-seal-v164,
  body.printing-invoice #printArea.phx-v1645-readable-print .invoice-security-seal-v103 { border-style:dashed !important; }
}


/* Phoenix Hibachi V2.3.3 — verified payment badges + red add-on packing alert. */
.phx-v1643-order-header{
  grid-template-columns:minmax(180px,1fr) auto auto auto!important;
  align-items:start!important;
}
.phx-v233-payment-badge{
  justify-self:end;
  align-self:start;
  border-radius:999px;
  padding:5px 10px;
  font-size:11px;
  line-height:1.1;
  font-weight:950;
  letter-spacing:.04em;
  white-space:nowrap;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.06);
  color:#ddd;
}
.phx-v233-payment-badge.is-full{
  color:#07170d;
  background:#62e59a;
  border-color:#62e59a;
}
.phx-v233-payment-badge.is-deposit{
  color:#0a1a10;
  background:#9cf0bd;
  border-color:#73dca0;
}
.phx-v233-payment-badge.is-pending{
  color:#2b1b00;
  background:#ffd36a;
  border-color:#ffd36a;
}
.phx-v233-payment-badge.is-unpaid{
  color:#ffd0d0;
  background:rgba(197,48,48,.16);
  border-color:rgba(255,102,102,.48);
}

.print-modal[open] #printArea .invoice-addon-row span,
.print-modal[open] #printArea .invoice-addon-row b,
.print-modal[open] #printArea .phx-v233-addon-row span,
.print-modal[open] #printArea .phx-v233-addon-row b{
  color:#c60000!important;
  font-weight:950!important;
}
.print-modal[open] #printArea .invoice-addon-alert,
.print-modal[open] #printArea .phx-v233-addon-alert{
  display:grid!important;
  grid-template-columns:112px minmax(0,1fr)!important;
  gap:8px!important;
  align-items:start!important;
  margin:6px 0!important;
  padding:7px 9px!important;
  border:2px solid #e00000!important;
  border-radius:4px!important;
  background:#fff0f0!important;
  color:#b00000!important;
}
.print-modal[open] #printArea .invoice-addon-alert b,
.print-modal[open] #printArea .phx-v233-addon-alert b{
  color:#b00000!important;
  font-weight:950!important;
  letter-spacing:.03em!important;
}
.print-modal[open] #printArea .invoice-addon-alert span,
.print-modal[open] #printArea .phx-v233-addon-alert span{
  color:#b00000!important;
  font-weight:900!important;
}

@media print{
  body.printing-invoice #printArea .invoice-addon-row span,
  body.printing-invoice #printArea .invoice-addon-row b,
  body.printing-invoice #printArea .phx-v233-addon-row span,
  body.printing-invoice #printArea .phx-v233-addon-row b{
    color:#b00000!important;
    font-weight:950!important;
  }
  body.printing-invoice #printArea .invoice-addon-alert,
  body.printing-invoice #printArea .phx-v233-addon-alert{
    display:grid!important;
    grid-template-columns:90px minmax(0,1fr)!important;
    gap:5px!important;
    margin:4px 0!important;
    padding:4px 6px!important;
    border:1.5px solid #b00000!important;
    background:#fff!important;
    color:#b00000!important;
    break-inside:avoid!important;
  }
  body.printing-invoice #printArea .invoice-addon-alert b,
  body.printing-invoice #printArea .invoice-addon-alert span,
  body.printing-invoice #printArea .phx-v233-addon-alert b,
  body.printing-invoice #printArea .phx-v233-addon-alert span{
    color:#b00000!important;
    font-weight:950!important;
    font-size:7.2pt!important;
  }
}
@media(max-width:980px){
  .phx-v1643-order-header{grid-template-columns:minmax(150px,1fr) auto!important}
  .phx-v1643-order-age,
  .phx-v233-payment-badge{grid-column:1/-1;justify-self:start}
}


/* V235 transactional SMS consent */
.phx-sms-consent-line{align-items:flex-start!important;gap:12px!important;background:rgba(255,255,255,.035)!important;border:1px solid rgba(227,167,45,.2)!important}
.phx-sms-consent-line input{margin-top:4px;flex:0 0 auto}
.phx-sms-consent-line span{display:block;line-height:1.55}
.phx-sms-consent-line a{color:#f3bf4d;text-decoration:underline;text-underline-offset:2px}
.footer-bottom a{color:inherit;text-decoration:underline;text-underline-offset:3px}

body.phx-stripe-disabled .phx-payment-method-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
@media(max-width:900px){body.phx-stripe-disabled .phx-payment-method-grid{grid-template-columns:1fr!important}}
