@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800;900&family=Barlow:wght@400;500;600;700&display=swap");

:root {
  color-scheme: light;
  --navy: #0b1220;
  --navy-2: #111d31;
  --charcoal: #15120f;
  --ember: #8f2f12;
  --gold: #d8aa3d;
  --gold-2: #f1c75a;
  --cream: #fff8ec;
  --paper: #fbf6eb;
  --surface: #ffffff;
  --surface-soft: #f6efe2;
  --ink: #191d29;
  --muted: #6d7485;
  --line: #e4d8c5;
  --teal: #11766f;
  --danger: #b91c1c;
  --shadow: 0 18px 42px rgba(18, 18, 18, 0.14);
  --shadow-soft: 0 8px 24px rgba(18, 18, 18, 0.08);
  --radius: 8px;
  --font-display: "Barlow Condensed", system-ui, sans-serif;
  --font-body: "Barlow", system-ui, sans-serif;
  font-family: var(--font-body);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

a {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
}

.eyebrow,
.section-label {
  margin: 0;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Public QR menu */

.public-menu-page {
  min-height: 100vh;
  background: var(--paper);
}

.public-hero {
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(135deg, rgba(11, 18, 32, 0.96), rgba(21, 18, 15, 0.91)),
    repeating-linear-gradient(90deg, rgba(216, 170, 61, 0.09) 0 1px, transparent 1px 72px);
  color: #fff;
  padding: 18px clamp(16px, 5vw, 56px) 34px;
}

.public-hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(58vw, 620px);
  height: min(58vw, 620px);
  background:
    radial-gradient(circle at 62% 55%, rgba(216, 170, 61, 0.22), transparent 0 14%, rgba(143, 47, 18, 0.14) 15% 31%, transparent 32%),
    linear-gradient(135deg, transparent 0 45%, rgba(216, 170, 61, 0.12) 45% 47%, transparent 47%);
  opacity: 0.9;
  pointer-events: none;
}

.public-nav {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.public-logo,
.public-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.public-logo span,
.brand-mark {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--gold);
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.public-logo strong {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.public-badge {
  min-height: 36px;
  border: 1px solid rgba(216, 170, 61, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold-2);
  padding: 6px 14px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.public-hero-content {
  position: relative;
  z-index: 1;
  width: min(780px, 100%);
  padding: 70px 0 44px;
}

.public-hero-content h1 {
  margin: 8px 0 12px;
  font-family: var(--font-display);
  font-size: clamp(58px, 14vw, 128px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.9;
  text-transform: uppercase;
}

.public-hero-content p:last-child {
  width: min(580px, 100%);
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(17px, 3.4vw, 23px);
}

.public-stats {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.public-stats span {
  border: 1px solid rgba(216, 170, 61, 0.36);
  border-radius: 999px;
  color: #fff;
  padding: 8px 14px;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.public-menu-section {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 34px clamp(16px, 4vw, 28px) 48px;
}

.section-header {
  display: flex;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-header h2 {
  margin: 0;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: clamp(32px, 7vw, 54px);
  font-weight: 900;
  text-transform: uppercase;
}

.public-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.public-menu-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.public-menu-card header {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  background: var(--navy);
  color: #fff;
  padding: 16px;
}

.public-menu-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 900;
  text-transform: uppercase;
}

.public-menu-card header span {
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 700;
}

.public-price-list {
  display: grid;
  padding: 8px 16px 10px;
}

.public-price-row {
  display: flex;
  min-height: 54px;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px dashed var(--line);
}

.public-price-row:last-child {
  border-bottom: 0;
}

.public-price-row span {
  color: var(--ink);
  font-weight: 700;
}

.public-price-row strong {
  color: var(--ember);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
}

/* Staff app */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 12px clamp(14px, 3vw, 28px);
  border-bottom: 1px solid rgba(216, 170, 61, 0.18);
  background: rgba(11, 18, 32, 0.96);
  color: #fff;
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.brand strong {
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 600;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.page {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 18px clamp(14px, 3vw, 28px) 32px;
}

.login-page {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 28px clamp(16px, 4vw, 28px) 36px;
}

.staff-login-page {
  min-height: 100vh;
  display: grid;
  align-content: start;
}

.staff-login-hero {
  padding: 20px 0 22px;
}

.staff-login-hero h1 {
  margin: 6px 0 8px;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: clamp(42px, 10vw, 74px);
  font-weight: 900;
  line-height: 0.92;
  text-transform: uppercase;
}

.staff-login-hero p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.login-box,
.section,
.order-card,
.pay-card,
.menu-product,
.admin-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.login-box {
  padding: 18px;
}

.section {
  padding: 16px;
}

.stack {
  display: grid;
  gap: 14px;
}

.grid {
  display: grid;
  gap: 14px;
}

.grid.two {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
}

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

.section-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-head h2,
.section-head h3 {
  margin: 0;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 900;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

.role-grid,
.variant-grid,
.quick-grid {
  display: grid;
  gap: 10px;
}

.role-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
}

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

.quick-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.btn,
.tab,
.role-btn,
.variant-btn,
.ghost-btn,
.danger-btn,
.pay-btn,
.print-btn {
  min-height: 46px;
  border-radius: var(--radius);
  padding: 10px 14px;
  text-align: center;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.btn:active,
.tab:active,
.role-btn:active,
.variant-btn:active,
.ghost-btn:active,
.danger-btn:active,
.pay-btn:active,
.print-btn:active {
  transform: translateY(1px);
}

.btn,
.pay-btn,
.print-btn {
  background: var(--teal);
  color: #fff;
  font-weight: 800;
}

.btn:hover,
.pay-btn:hover {
  background: #0d5d58;
}

.ghost-btn,
.tab,
.role-btn,
.variant-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.topbar .ghost-btn {
  border-color: rgba(216, 170, 61, 0.42);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.ghost-btn:hover,
.tab:hover,
.role-btn:hover,
.variant-btn:hover {
  border-color: var(--gold);
}

.role-btn.active,
.tab.active {
  border-color: var(--gold);
  background: #fff4d7;
  color: var(--navy);
  font-weight: 900;
}

.danger-btn {
  border: 1px solid rgba(185, 28, 28, 0.35);
  background: #fff1f2;
  color: var(--danger);
  font-weight: 800;
}

.print-btn {
  background: var(--ember);
}

.print-btn:hover {
  background: #76260e;
}

.field {
  display: grid;
  gap: 6px;
}

.field label,
.field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
}

.textarea {
  min-height: 70px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--gold);
  outline: 3px solid rgba(216, 170, 61, 0.18);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.toolbar .input,
.toolbar .select {
  flex: 1 1 160px;
  width: auto;
}

.cart-list,
.order-list,
.pay-list,
.admin-list,
.menu-list {
  display: grid;
  gap: 10px;
}

.menu-product {
  overflow: hidden;
}

.menu-product header {
  display: flex;
  justify-content: space-between;
  background: var(--surface-soft);
  padding: 13px 14px;
}

.menu-product h3 {
  margin: 0;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  text-transform: uppercase;
}

.variant-btn {
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 800;
}

.variant-btn small {
  color: var(--ember);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
}

.variant-btn.unavailable {
  background: #f8fafc;
  color: var(--muted);
}

.product-body {
  padding: 12px;
}

.cart-item,
.summary-item,
.receipt-line {
  display: grid;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.cart-item:last-child,
.summary-item:last-child,
.receipt-line:last-child {
  border-bottom: 0;
}

.cart-main,
.row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.cart-main strong,
.row strong {
  min-width: 0;
}

.stepper {
  display: inline-grid;
  grid-template-columns: 38px 38px 38px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.stepper button {
  min-height: 38px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
}

.stepper span {
  text-align: center;
  font-weight: 900;
}

.total-bar {
  position: sticky;
  bottom: 0;
  display: grid;
  gap: 10px;
  margin: 12px -16px -16px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  padding: 12px 16px;
}

.total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 19px;
  font-weight: 900;
}

.order-card,
.pay-card,
.admin-row {
  padding: 14px;
}

.order-card header,
.pay-card header {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: #fff4d7;
  color: var(--ember);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 900;
}

.price {
  color: var(--ember);
  font-weight: 900;
}

.pay-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 100px;
  gap: 10px;
  align-items: center;
}

.admin-table-row {
  grid-template-columns: minmax(0, 1fr) 92px 90px 92px;
}

.check {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.check input {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
}

.toast {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 50;
  max-width: min(360px, calc(100vw - 28px));
  border-radius: var(--radius);
  background: var(--navy);
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  padding: 12px 14px;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  padding: 18px;
  text-align: center;
}

.print-root {
  display: none;
}

.ticket {
  width: 72mm;
  padding: 2mm;
  color: #000;
  font-family: "Courier New", monospace;
  font-size: 12px;
}

.ticket h1 {
  margin: 0 0 4px;
  text-align: center;
  font-size: 17px;
}

.ticket .ticket-meta {
  border-bottom: 1px dashed #000;
  margin-bottom: 6px;
  padding-bottom: 6px;
  text-align: center;
}

.ticket-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 4px;
  margin: 4px 0;
}

.ticket-note {
  margin: 0 0 4px 32px;
  font-size: 11px;
}

.ticket-total {
  border-top: 1px dashed #000;
  margin-top: 6px;
  padding-top: 6px;
  text-align: right;
  font-weight: 900;
}

@media (max-width: 900px) {
  .public-menu-grid {
    grid-template-columns: 1fr;
  }

  .section-header {
    align-items: start;
    flex-direction: column;
  }

  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 620px) {
  .public-hero {
    min-height: 66vh;
  }

  .public-nav {
    align-items: flex-start;
  }

  .public-logo strong {
    font-size: 18px;
  }

  .public-badge {
    font-size: 11px;
    padding-inline: 10px;
  }

  .public-hero-content {
    padding: 52px 0 30px;
  }

  .public-menu-card h3 {
    font-size: 27px;
  }

  .topbar {
    align-items: flex-start;
  }

  .role-grid,
  .variant-grid {
    grid-template-columns: 1fr;
  }

  .admin-row,
  .admin-table-row {
    grid-template-columns: 1fr;
  }

  .pay-actions {
    grid-template-columns: 1fr;
  }
}

@media print {
  @page {
    size: 80mm auto;
    margin: 0;
  }

  body {
    background: #fff;
  }

  body * {
    visibility: hidden;
  }

  #printRoot,
  #printRoot * {
    visibility: visible;
  }

  #printRoot {
    display: block;
    position: absolute;
    inset: 0 auto auto 0;
  }

  .ticket {
    width: 78mm;
    padding: 3mm;
  }
}
