:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #687385;
  --line: #d7dde8;
  --panel: #ffffff;
  --page: #f4f6f8;
  --accent: #146c5c;
  --accent-2: #205b9f;
  --warn: #a45222;
  --danger: #a93d3d;
  --ok: #2f7d45;
  --shadow: 0 8px 24px rgba(20, 32, 42, 0.08);
  --shadow-hover: 0 12px 28px rgba(20, 32, 42, 0.14);
  --ring: 0 0 0 3px rgba(20, 108, 92, 0.18);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body.is-auth-booting #app {
  visibility: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, Segoe UI, Arial, sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

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

button {
  cursor: pointer;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    background-color 140ms ease,
    border-color 140ms ease,
    color 140ms ease;
}

button,
select,
input,
textarea {
  max-width: 100%;
}

#app {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: #202832;
  color: #f7fafc;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 52px;
}


.brand-logo {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.24);
  flex: 0 0 auto;
}
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: #f2c14e;
  color: #202832;
  border-radius: 6px;
  font-weight: 800;
}

.brand span,
.session-user,
.topbar p {
  color: var(--muted);
  font-size: 13px;
}

.sidebar .brand span,
.sidebar .session-user {
  color: #aeb8c6;
}

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

.nav-item {
  border: 0;
  color: #dbe3ec;
  background: transparent;
  text-align: left;
  padding: 11px 12px;
  border-radius: 6px;
  transition:
    transform 140ms ease,
    background-color 140ms ease,
    color 140ms ease;
}

.nav-item.active,
.nav-item:hover {
  background: #344253;
  color: #ffffff;
}

.nav-item:hover {
  transform: translateX(2px);
}

.session-box {
  margin-top: auto;
  display: grid;
  gap: 10px;
}

.main {
  min-width: 0;
  padding: 20px;
  overflow-x: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 16px;
}

.top-actions,
.inline-form,
.customer-row,
.discount-row,
.button-group,
.table-tools,
.order-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.inline-form,
.button-group,
.order-actions {
  flex-wrap: wrap;
}

input,
select,
textarea {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #ffffff;
  color: var(--ink);
  min-width: 0;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    background-color 140ms ease;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}

textarea {
  resize: vertical;
}

.api-input {
  width: 250px;
}

.branch-select {
  width: min(240px, 100%);
}

.primary-button,
.secondary-button,
.success-button,
.danger-button {
  border: 1px solid transparent;
  border-radius: 6px;
  min-height: 38px;
  padding: 8px 12px;
  font-weight: 700;
  white-space: nowrap;
  text-align: center;
}

.primary-button:hover,
.secondary-button:hover,
.success-button:hover,
.danger-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(20, 32, 42, 0.16);
}

.primary-button:active,
.secondary-button:active,
.success-button:active,
.danger-button:active,
.qty-controls button:active,
.nav-item:active,
.menu-card:active,
.table-card:active,
.list-row:active {
  transform: translateY(0) scale(0.98);
}

.primary-button {
  background: var(--accent);
  color: #fff;
}

.primary-button:hover {
  background: #0f5e50;
}

.success-button {
  background: var(--ok);
  color: #fff;
}

.success-button:hover {
  background: #276c3b;
}

.danger-button {
  background: var(--danger);
  color: #fff;
}

.danger-button:hover {
  background: #8f3030;
}

.secondary-button {
  background: #eef2f6;
  color: var(--ink);
  border-color: var(--line);
}

.secondary-button:hover {
  background: #e4ebf3;
  border-color: #c6cfdd;
}

.small-button {
  min-height: 30px;
  padding: 4px 8px;
}

.login-panel {
  max-width: 420px;
  margin: 8vh auto 0;
}

.login-form,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-form {
  padding: 24px;
  display: grid;
  gap: 14px;
}

label,
.stack-form {
  display: grid;
  gap: 6px;
}

.workspace.is-disabled {
  display: none;
}

.subscription-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #b7dccf;
  background: linear-gradient(135deg, #f4fffb, #e8f8f0);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
  box-shadow: 0 10px 24px rgba(12, 76, 62, 0.08);
}

.subscription-banner div {
  display: grid;
  gap: 3px;
}

.subscription-banner strong {
  color: #0f5948;
}

.subscription-banner span {
  color: var(--muted);
}

.subscription-banner.warning {
  border-color: #e9c46a;
  background: linear-gradient(135deg, #fffaf0, #fff3cf);
}

.subscription-banner.warning strong {
  color: #8a5a00;
}

.subscription-banner.danger {
  border-color: #ef9a9a;
  background: linear-gradient(135deg, #fff5f5, #ffe3e3);
}

.subscription-banner.danger strong {
  color: #a82424;
}

.subscription-banner.locked {
  border-color: rgba(111, 63, 245, 0.28);
  background: linear-gradient(135deg, #f7f3ff, #eef4ff);
}

.subscription-banner.locked strong {
  color: #5126d9;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.panel {
  padding: 14px;
}

.panel-header {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.pos-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(360px, 410px);
  gap: 14px;
  align-items: start;
}

.split-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.section-panel {
  margin-top: 14px;
}

.wrap-form {
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.wrap-form select,
.wrap-form input {
  flex: 1 1 180px;
}

.category-strip,
.menu-grid,
.table-grid,
.kitchen-board,
.list,
.order-items,
.metrics-grid {
  display: grid;
  gap: 10px;
}

.category-strip {
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  margin-bottom: 12px;
}

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

.menu-card,
.table-card,
.kitchen-ticket,
.list-row,
.metric,
.cart-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 12px;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    border-color 150ms ease,
    background-color 150ms ease;
}

.menu-card:hover,
.table-card:hover,
.list-row:hover,
.metric:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(20, 108, 92, 0.42);
  background: #ffffff;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  padding: 16px;
}

.menu-card {
  min-height: 106px;
  display: grid;
  gap: 8px;
  align-content: space-between;
  overflow: hidden;
}

.menu-card-image-wrap {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 6px;
  background: #eef3f7;
}

.menu-card-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.menu-card-image-wrap.is-missing {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  padding: 8px;
}

.menu-admin-row-with-image {
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
}

.menu-admin-row-with-image strong {
  grid-column: 2;
}

.menu-admin-row-with-image > span {
  grid-column: 2;
}

.menu-admin-row-with-image .row-actions {
  grid-column: 1 / -1;
  grid-row: 3;
}

.menu-admin-thumb {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  background: #eef3f7;
  border: 1px solid var(--line);
}

.menu-admin-thumb-missing {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
}

.customer-ledger-panel,
.supplier-ledger-panel {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.muted-line {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.ledger-filter-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr)) auto auto;
  gap: 10px;
  align-items: end;
  margin: 12px 0;
}

.ledger-filter-bar label {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}

.ledger-filter-bar input {
  margin-top: 4px;
}

.customer-ledger-table {
  display: grid;
  gap: 6px;
}

.customer-ledger-head,
.customer-ledger-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.1fr) 90px 110px minmax(160px, 1fr);
  gap: 10px;
  align-items: center;
}

.customer-ledger-head {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  border-bottom: 1px solid var(--line);
  padding: 0 0 8px;
}

.customer-ledger-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfd;
}

.ledger-entry-actions {
  justify-content: flex-start;
  margin-top: 6px;
}

.customer-ledger-row.is-charge strong {
  color: var(--danger);
}

.customer-ledger-row.is-payment strong {
  color: var(--accent);
}

@media (max-width: 760px) {
  .ledger-filter-bar {
    grid-template-columns: 1fr 1fr;
  }

  .customer-ledger-head {
    display: none;
  }

  .customer-ledger-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.menu-card strong,
.list-row strong,
.cart-row strong {
  overflow-wrap: anywhere;
}

.price {
  color: var(--accent-2);
  font-weight: 800;
}

.deal-price {
  display: inline-flex;
  gap: 8px;
  align-items: baseline;
}

.deal-price small {
  color: var(--muted);
  font-size: 0.8em;
  font-weight: 700;
  text-decoration: line-through;
}

.deal-badge {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  color: #0f6f3e;
  background: #e4f7eb;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.deal-components {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.deal-component-picker {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  max-height: 260px;
  overflow: auto;
}

.deal-picker-title {
  color: #344054;
  font-size: 13px;
  font-weight: 900;
}

.deal-component-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 74px;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
}

.deal-component-row span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.deal-component-row small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.compact-empty {
  min-height: 0;
  padding: 12px;
}

.variant-manager-list {
  display: grid;
  gap: 8px;
}

.variant-manager-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.variant-manager-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.inline-check {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  color: var(--muted);
  font-weight: 750;
}

.inline-check input {
  min-height: auto;
}

.order-panel {
  min-height: 620px;
  display: grid;
  grid-template-rows: auto auto minmax(220px, 1fr) auto auto auto;
  position: sticky;
  top: 14px;
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.customer-row {
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.customer-row input {
  flex: 1 1 150px;
}
.pos-status-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 4px 0 10px;
}

.pos-status-strip div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 9px 10px;
  min-width: 0;
}

.pos-status-strip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 3px;
}

.pos-status-strip strong {
  display: block;
  overflow-wrap: anywhere;
}
.order-note-input {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px 12px;
  font: inherit;
}

.order-note-input:focus {
  outline: none;
  border-color: rgba(20, 108, 92, 0.55);
  box-shadow: 0 0 0 3px rgba(20, 108, 92, 0.12);
}

.discount-row {
  margin-top: 10px;
  flex-wrap: wrap;
}

.discount-row select {
  flex: 1 1 180px;
}

.discount-row button,
.order-actions button {
  flex: 1 1 110px;
}

.payment-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.payment-grid {
  display: grid;
  grid-template-columns: minmax(140px, 0.8fr) minmax(180px, 1fr);
  gap: 8px;
}

.payment-grid input:last-child {
  grid-column: 1 / -1;
}
.quick-pay-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.ghost-button {
  background: #f8fafc;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 800;
  padding: 10px 12px;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.ghost-button:hover {
  background: #eef7f5;
  border-color: rgba(20, 108, 92, 0.45);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(18, 38, 63, 0.08);
}

.ghost-button:active {
  transform: translateY(0);
  box-shadow: none;
}

.payment-help {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.payment-help.is-warning {
  color: #a84f1f;
  font-weight: 700;
}

.payment-help.is-ready {
  color: var(--accent);
  font-weight: 700;
}

.table-tools {
  flex-wrap: wrap;
}

.table-tools select {
  flex: 1 1 150px;
}

.table-tools button {
  flex: 1 1 120px;
}

.active-order-box {
  display: grid;
  gap: 8px;
}

.active-order-header,
.active-order-line {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
}

.active-order-header,
.active-order-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
}
.active-order-note {
  border: 1px solid rgba(20, 108, 92, 0.28);
  border-radius: 8px;
  background: #eef7f5;
  padding: 10px;
}

.active-order-note span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.active-order-note strong {
  overflow-wrap: anywhere;
}

.active-order-header {
  grid-template-columns: minmax(0, 1fr) auto;
}

.active-order-line span {
  overflow-wrap: anywhere;
}

.active-order-line em {
  color: var(--danger);
  font-style: normal;
  font-weight: 700;
}

.cart-row,
.list-row {
  display: grid;
  gap: 8px;
}

.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.low-stock-row {
  border-color: var(--warn);
  background: #fffaf0;
}

.low-stock-row strong::after {
  content: " LOW";
  color: var(--warn);
  font-size: 12px;
  font-weight: 800;
}

.cart-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.cart-line > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.qty-controls {
  display: flex;
  gap: 4px;
  align-items: center;
  flex: 0 0 auto;
}

.qty-controls button {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
}

.qty-controls button:hover {
  border-color: var(--accent);
  background: #eef8f5;
}

.qty-controls button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.active-qty-controls strong {
  min-width: 18px;
  text-align: center;
}

.totals {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  display: grid;
  gap: 8px;
}

.totals div,
.metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chart-bars {
  display: grid;
  gap: 10px;
  min-height: 140px;
  align-content: center;
}

.chart-row {
  display: grid;
  grid-template-columns: minmax(84px, 120px) minmax(0, 1fr) minmax(84px, auto);
  gap: 10px;
  align-items: center;
  font-size: 14px;
}

.chart-row span,
.chart-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.chart-track {
  height: 14px;
  border-radius: 999px;
  background: #e7edf3;
  overflow: hidden;
}

.chart-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.28);
}

.empty-chart {
  min-height: 110px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  text-align: center;
  padding: 16px;
}

.form-message {
  min-height: 20px;
  color: var(--warn);
  font-size: 13px;
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
  box-shadow: none;
}

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

.table-card {
  min-height: 118px;
  display: grid;
  gap: 10px;
  align-content: space-between;
  position: relative;
  overflow: hidden;
}

.table-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: transparent;
  transition: background-color 150ms ease;
}

.table-card:hover::before {
  background: var(--accent);
}

.table-card-free:hover::before {
  background: var(--ok);
}

.table-card-occupied:hover::before {
  background: var(--danger);
}

.table-card-occupied:hover {
  border-color: rgba(169, 61, 61, 0.42);
}

.table-card-free:hover {
  border-color: rgba(47, 125, 69, 0.42);
}

.table-card:active {
  border-color: var(--accent);
  box-shadow: var(--ring);
}

.table-card-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.table-card .row-actions {
  justify-content: flex-start;
}

.status {
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  background: #eaf1f8;
}

.status.occupied {
  background: #ffe7df;
  color: var(--danger);
}

.status.free {
  background: #e7f5eb;
  color: var(--ok);
}

.status.pending {
  background: #fff2d6;
  color: var(--warn);
}

.status.preparing {
  background: #eaf1f8;
  color: var(--accent);
}

.kitchen-board {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.kitchen-ticket {
  display: grid;
  gap: 8px;
}

.kitchen-ticket.is-late {
  border-color: var(--danger);
  background: #fff7f7;
}

.kitchen-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.muted-label {
  color: var(--muted);
  font-size: 13px;
}

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

.field-label input,
.field-label select,
.field-label textarea {
  color: var(--ink);
  font-weight: 400;
}

.stack-form {
  margin-bottom: 12px;
}

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

.metric {
  background: #ffffff;
  box-shadow: var(--shadow);
}

.metric strong {
  font-size: 24px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.receipt-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 14px;
  min-height: 160px;
  display: grid;
  gap: 8px;
}

.compact-receipt {
  margin-top: 10px;
  max-height: 260px;
  overflow: auto;
}

.receipt-print-area {
  max-width: 380px;
  margin: 0 auto;
  display: grid;
  gap: 8px;
  box-sizing: border-box;
}

body[data-receipt-width="58"] .receipt-print-area {
  max-width: 220px;
  font-size: 12px;
}

body[data-receipt-width="80"] .receipt-print-area {
  max-width: 300px;
}

.receipt-print-area h2,
.receipt-print-area p {
  text-align: center;
}

.receipt-print-area hr {
  width: 100%;
  border: 0;
  border-top: 1px dashed var(--line);
}

.receipt-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 12px;
  align-items: baseline;
}

.receipt-line span,
.receipt-line strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.receipt-line strong {
  text-align: right;
}

.receipt-line.total {
  font-size: 18px;
}

.list-row {
  cursor: pointer;
}

.clickable-card,
.list-row {
  cursor: pointer;
}

.clickable-card:hover,
.list-row:hover {
  border-color: var(--accent);
}

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

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(17, 24, 39, 0.52);
  padding: 18px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-panel {
  width: min(620px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(17, 24, 39, 0.24);
  padding: 16px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

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

.print-root {
  display: none;
}

@media print {
  @page {
    margin: 4mm;
  }

  html,
  body {
    width: auto;
    min-height: 0;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
  }

  body.print-root-active #app,
  body.print-root-active .modal-backdrop {
    display: none !important;
  }

  body * {
    visibility: hidden;
  }

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

  #printRoot {
    position: static;
    left: 0;
    top: 0;
    display: block;
    box-shadow: none;
    border: 0;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 1mm;
    box-sizing: border-box;
    overflow: visible;
  }

  body[data-receipt-width="58"] #printRoot {
    width: 52mm;
  }

  body[data-receipt-width="80"] #printRoot {
    width: 72mm;
  }

  .receipt-print-area {
    max-width: none;
    margin: 0;
    padding: 0;
    page-break-inside: avoid;
    break-inside: avoid;
    color: #000;
  }
}

@media (max-width: 1280px) {
  #app {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .sidebar {
    padding: 14px;
  }

  .pos-layout {
    grid-template-columns: minmax(360px, 1fr) minmax(340px, 380px);
  }

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

@media (max-width: 1000px) {
  #app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 2;
  }

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

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

  .order-panel {
    position: static;
    max-height: none;
  }

  .topbar,
  .top-actions,
  .inline-form {
    align-items: stretch;
    flex-direction: column;
  }

  .api-input {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .main {
    padding: 12px;
  }

  .sidebar {
    gap: 12px;
  }

  .brand {
    min-height: auto;
  }

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

  .nav-item {
    text-align: center;
    padding: 10px 8px;
  }

  .payment-grid,
  .quick-pay-row,
  .pos-status-strip {
    grid-template-columns: 1fr;
  }

  .payment-grid input:last-child {
    grid-column: auto;
  }

  .chart-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .menu-grid,
  .category-strip,
  .table-grid {
    grid-template-columns: 1fr;
  }

  .panel-header {
    align-items: stretch;
    flex-direction: column;
  }
}


body:not(.is-authenticated) .nav,
body:not(.is-authenticated) .session-box {
  display: none;
}

body:not(.is-authenticated) .sidebar {
  background: #102833;
}

.welcome-panel {
  display: grid;
  gap: 18px;
}

.welcome-hero {
  min-height: 430px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 24px;
  align-items: center;
  padding: 34px;
  border: 1px solid #cdd9e3;
  border-radius: 8px;
  background: #103845;
  color: #ffffff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.welcome-copy {
  display: grid;
  gap: 16px;
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #d8f3ee;
  font-size: 13px;
  font-weight: 700;
}

.welcome-copy h2 {
  font-size: 44px;
  line-height: 1.05;
  max-width: 620px;
}

.welcome-copy p {
  max-width: 680px;
  color: #e3f0f0;
  font-size: 17px;
  line-height: 1.6;
}

.welcome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.welcome-showcase {
  justify-self: end;
  width: min(100%, 360px);
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  box-shadow: 0 18px 48px rgba(5, 28, 36, 0.28);
}

.welcome-showcase img {
  width: min(100%, 220px);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  justify-self: center;
  border: 1px solid var(--line);
}

.showcase-metrics {
  display: grid;
  gap: 8px;
}

.showcase-metrics div,
.feature-strip div,
.plan-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.showcase-metrics div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
}

.showcase-metrics span,
.feature-strip span,
.plan-card p,
.section-heading p {
  color: var(--muted);
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.feature-strip div {
  display: grid;
  gap: 6px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.plans-section {
  display: grid;
  gap: 14px;
}

.section-heading {
  display: grid;
  gap: 4px;
}

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

.plan-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    border-color 140ms ease;
}

.plan-card:hover {
  transform: translateY(-2px);
  border-color: #9bb8c5;
  box-shadow: var(--shadow-hover);
}

.plan-card h3 {
  margin: 0;
  color: var(--accent-2);
  font-size: 15px;
}

.featured-plan {
  border-color: rgba(20, 108, 92, 0.55);
  background: #f2fbf8;
}

.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.active-auth-tab {
  background: #d8ece8;
  border-color: rgba(20, 108, 92, 0.35);
  color: var(--accent);
}

@media (max-width: 1000px) {
  .welcome-hero,
  .feature-strip,
  .plan-grid {
    grid-template-columns: 1fr;
  }

  .welcome-showcase {
    justify-self: stretch;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .welcome-hero {
    min-height: auto;
    padding: 22px;
  }

  .welcome-copy h2 {
    font-size: 32px;
  }

  .auth-tabs,
  .welcome-actions {
    display: grid;
  }
}


body:not(.is-authenticated) .top-actions {
  display: none;
}

body:not(.is-authenticated) .workspace {
  display: none !important;
}

body:not(.is-authenticated) .main {
  padding-top: 18px;
}

.plan-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid #dbe4ec;
  border-radius: 6px;
  background: #f8fbfc;
}

.plan-price span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.plan-price strong {
  color: var(--accent);
}

.plan-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}

.signup-pricing {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.compact-plans .plan-card {
  padding: 14px;
}

.login-panel {
  max-width: 1180px;
}

.auth-form {
  max-width: 460px;
  margin: 0 auto;
}






.pricing-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.pricing-actions button {
  min-width: 140px;
}

.plan-card .choose-plan-btn {
  margin-top: auto;
  width: 100%;
}

.signup-request-form {
  max-width: 760px;
}

.form-helper {
  color: var(--muted);
  margin: -4px 0 4px;
}

.full-span-panel {
  grid-column: 1 / -1;
}




.review-comment {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.compact-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 12px;
}

.public-review-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #082f3a 0%, #146c5c 48%, #f8c84b 100%);
  display: grid;
  place-items: center;
  padding: 24px;
}

.public-review-shell {
  width: min(560px, 100%);
}

.public-review-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 8px;
  box-shadow: 0 22px 70px rgba(8, 47, 58, 0.28);
  padding: 28px;
}

.public-review-logo {
  width: 86px;
  height: 86px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  margin-bottom: 16px;
}

.public-review-card h1 {
  margin: 0 0 8px;
  font-size: 32px;
}

.public-review-card p {
  color: var(--muted);
}

.public-review-card textarea {
  min-height: 120px;
}

.public-review-card .form-message {
  border-radius: 8px;
  padding: 10px 12px;
}

.public-review-card .form-message.success {
  background: #e7f8ef;
  border: 1px solid #9ad7b5;
  color: #0b6b3d;
}

.public-review-card .form-message.error {
  background: #fff0ed;
  border: 1px solid #efb2a6;
  color: #9d2c19;
}

.public-review-card form.is-submitted {
  opacity: 0.72;
}

.kitchen-order-ticket {
  gap: 12px;
}

.kitchen-ticket-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.kitchen-ticket-header div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.kitchen-ticket-header strong {
  font-size: 20px;
  overflow-wrap: anywhere;
}

.kitchen-ticket-header .status {
  flex: 0 0 auto;
}

.kitchen-item-list {
  display: grid;
  gap: 8px;
}

.kitchen-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
}

.kitchen-item-row div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.kitchen-item-row span,
.kitchen-item-row em {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.kitchen-item-row em {
  color: #9a5a1f;
  font-style: normal;
  font-weight: 700;
}

.kitchen-item-row > .status,
.kitchen-item-row > .row-actions {
  justify-self: start;
}

.kitchen-item-row .row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cart-modifiers,
.active-order-line small,
.receipt-line small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.modifier-admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8fbfc;
}

.modifier-admin-row span {
  color: var(--muted);
  font-size: 13px;
}

.table-order-summary {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.table-order-summary span,
.table-order-summary small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}

.table-order-summary strong {
  color: var(--accent);
  font-size: 18px;
}

.table-order-summary.is-free {
  border-top-style: dashed;
}

.table-card .row-actions {
  flex-wrap: wrap;
}


/* Public website shell: keep POS controls hidden before login */
body:not(.is-authenticated) #app {
  display: block;
  min-height: 100vh;
}

body:not(.is-authenticated) .sidebar,
body:not(.is-authenticated) .topbar,
body:not(.is-authenticated) #workspace {
  display: none !important;
}

body:not(.is-authenticated) .main {
  min-height: 100vh;
  width: 100%;
}

body.is-authenticated .welcome-panel,
body.is-authenticated .login-panel {
  display: none !important;
}

body:not(.is-authenticated) .auth-tabs {
  display: none !important;
}

body:not(.is-authenticated) .login-panel:not([hidden]) {
  display: grid;
  min-height: 100vh;
  align-content: start;
  background: #eef4f7;
}

body:not(.is-authenticated) #loginForm:not([hidden]),
body:not(.is-authenticated) #signupForm:not([hidden]) {
  width: min(560px, calc(100% - 32px));
  margin: 48px auto;
}

body:not(.is-authenticated) #signupPricing:not([hidden]) {
  display: grid;
  width: min(1220px, calc(100% - 32px));
  margin: 24px auto 40px;
}
/* Premium public landing and pricing redesign */
body:not(.is-authenticated) {
  background: #eef4f7;
}

body:not(.is-authenticated) .main {
  padding: 0;
}

body:not(.is-authenticated) .topbar {
  padding: 18px 26px;
  margin: 0;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(20, 32, 42, 0.08);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 5;
}

body:not(.is-authenticated) .welcome-panel,
body:not(.is-authenticated) .login-panel {
  padding: 24px;
}

.pro-hero {
  min-height: min(720px, calc(100vh - 112px));
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  align-items: center;
  gap: 34px;
  padding: clamp(28px, 5vw, 66px);
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 85% 16%, rgba(248, 200, 75, 0.22), transparent 28%),
    linear-gradient(135deg, #082f3a 0%, #0f4c5c 43%, #146c5c 100%);
  box-shadow: none;
}

.pro-hero .welcome-copy {
  gap: 18px;
}

.pro-hero .welcome-copy h2 {
  font-size: clamp(40px, 6vw, 72px);
  line-height: 0.98;
  max-width: 820px;
}

.pro-hero .welcome-copy p {
  max-width: 760px;
  font-size: 18px;
  color: rgba(240, 250, 250, 0.9);
}

.hero-action {
  min-width: 150px;
  min-height: 46px;
  font-size: 15px;
}

.hero-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.hero-trust-row span {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 8px 12px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 700;
}

.pos-showcase {
  width: min(100%, 500px);
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 26px 80px rgba(3, 20, 28, 0.34);
}

.showcase-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.showcase-topbar img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--line);
}

.showcase-topbar div {
  display: grid;
  gap: 3px;
}

.showcase-topbar span,
.showcase-sale-card span,
.showcase-sale-card small {
  color: var(--muted);
  font-size: 13px;
}

.showcase-screen {
  display: grid;
  gap: 12px;
  border: 1px solid #dbe5ec;
  border-radius: 8px;
  background: #f7fafb;
  padding: 14px;
}

.showcase-sale-card {
  display: grid;
  gap: 4px;
  padding: 18px;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, #103845, #146c5c);
}

.showcase-sale-card strong {
  font-size: 30px;
}

.showcase-sale-card small {
  color: rgba(255, 255, 255, 0.78);
}

.showcase-ticket-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.showcase-ticket-grid div {
  display: grid;
  gap: 4px;
  border: 1px solid #dbe5ec;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.showcase-ticket-grid span {
  color: var(--muted);
  font-size: 12px;
}

.pro-feature-strip,
.product-highlights,
.pro-pricing-section,
.pricing-page {
  max-width: 1220px;
  width: calc(100% - 48px);
  margin: 0 auto;
}

.pro-feature-strip {
  margin-top: 22px;
}

.pro-feature-strip div {
  min-height: 132px;
  border: 0;
  border-left: 4px solid var(--accent);
}

.product-highlights {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.product-highlights article,
.pricing-note-grid div {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.product-highlights span {
  color: var(--accent-2);
  font-weight: 800;
}

.product-highlights p,
.pricing-note-grid span {
  color: var(--muted);
  line-height: 1.45;
}

.pro-pricing-section {
  margin-top: 24px;
  margin-bottom: 34px;
  padding: 28px;
  border: 1px solid #dbe5ec;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.pricing-heading {
  text-align: center;
  justify-items: center;
  margin-bottom: 6px;
}

.pricing-heading h2,
.pricing-hero-card h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.light-eyebrow {
  border-color: rgba(20, 108, 92, 0.18);
  background: #e9f6f2;
  color: var(--accent);
}

.pro-plan-grid {
  gap: 16px;
}

.pro-plan-card {
  position: relative;
  gap: 12px;
  padding: 22px;
  border-radius: 8px;
  overflow: hidden;
}

.pro-plan-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, #146c5c, #205b9f, #f8c84b);
}

.plan-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.plan-topline span,
.plan-badge {
  border-radius: 999px;
  padding: 6px 10px;
  background: #edf4fa;
  color: #205b9f;
  font-size: 12px;
  font-weight: 800;
}

.plan-badge {
  width: fit-content;
  background: #fff4cc;
  color: #7a5600;
}

.yearly-price {
  border-color: rgba(20, 108, 92, 0.2);
  background: #effaf6;
}

.pricing-page {
  padding: 0 0 28px;
}

.pricing-hero-card {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 12px;
  padding: clamp(28px, 5vw, 54px);
  border-radius: 8px;
  background:
    radial-gradient(circle at 80% 18%, rgba(248, 200, 75, 0.22), transparent 28%),
    linear-gradient(135deg, #102833, #146c5c);
  color: #ffffff;
  margin-bottom: 18px;
}

.pricing-hero-card p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.55;
}

.pricing-note-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.pricing-comparison-section {
  padding-top: 24px;
}

.pricing-comparison {
  overflow-x: auto;
  border: 1px solid rgba(145, 158, 171, 0.22);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: 0 26px 70px rgba(20, 32, 42, 0.11);
}

.pricing-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) repeat(4, minmax(190px, 1fr));
  min-width: 1040px;
  border-bottom: 1px solid #edf1f5;
}

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

.pricing-row > div,
.pricing-row > article {
  min-width: 0;
  border-left: 1px solid #edf1f5;
  padding: 15px 18px;
  text-align: center;
}

.pricing-row > :first-child {
  border-left: 0;
  text-align: left;
}

.pricing-plan-row > div,
.pricing-plan-row > article {
  padding: 30px 22px 22px;
}

.comparison-plan {
  position: relative;
  display: grid;
  align-content: start;
  gap: 13px;
  min-height: 312px;
}

.comparison-plan h3 {
  margin: 0;
  font-size: 25px;
  line-height: 1.1;
  color: #111827;
}

.comparison-plan strong {
  font-size: 13px;
  color: #111827;
}

.comparison-plan p {
  min-height: 56px;
  margin: 0;
  color: #667085;
  font-size: 15px;
  line-height: 1.55;
}

.comparison-price {
  margin: 10px 0 6px;
  color: #101828;
  font-size: 30px;
  font-weight: 900;
}

.comparison-price span {
  color: #475467;
  font-size: 16px;
  font-weight: 700;
}

.popular-plan {
  border-left-color: rgba(111, 63, 245, 0.24) !important;
  box-shadow: inset 0 0 0 2px #6f3ff5, 0 18px 36px rgba(111, 63, 245, 0.14);
  background: linear-gradient(180deg, rgba(111, 63, 245, 0.09), rgba(255, 255, 255, 0.98));
}

.popular-plan h3,
.popular-plan .comparison-price,
.highlight-text,
.check-mark {
  color: #6f3ff5;
}

.comparison-badge {
  justify-self: center;
  border-radius: 999px;
  padding: 6px 14px;
  background: linear-gradient(135deg, #5f35ee, #9b4dff);
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(111, 63, 245, 0.24);
}

.dark-plan-button,
.gradient-plan-button {
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.dark-plan-button {
  background: linear-gradient(135deg, #111827, #030712);
  box-shadow: 0 10px 20px rgba(17, 24, 39, 0.18);
}

.gradient-plan-button {
  background: linear-gradient(135deg, #5f35ee, #8c3cff);
  box-shadow: 0 12px 24px rgba(111, 63, 245, 0.28);
}

.dark-plan-button:hover,
.gradient-plan-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(17, 24, 39, 0.2);
}

.feature-title {
  color: #182230;
  font-weight: 900;
}

.section-row {
  background: #fbfcfe;
}

.section-row .feature-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-row .feature-title::before {
  content: "*";
  color: #6f3ff5;
}

.check-mark {
  font-size: 20px;
  font-weight: 900;
}

.compact-pricing-heading {
  margin-bottom: 16px;
}

body:not(.is-authenticated) .login-panel {
  max-width: none;
}

body:not(.is-authenticated) .auth-form {
  margin-top: 28px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

@media (max-width: 1100px) {
  .pro-hero,
  .product-highlights,
  .pricing-note-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pos-showcase {
    justify-self: stretch;
    width: 100%;
  }
}

@media (max-width: 760px) {
  body:not(.is-authenticated) .welcome-panel,
  body:not(.is-authenticated) .login-panel {
    padding: 14px;
  }

  .pro-hero,
  .product-highlights,
  .pricing-note-grid,
  .showcase-ticket-grid {
    grid-template-columns: 1fr;
  }

  .pro-feature-strip,
  .product-highlights,
  .pro-pricing-section,
  .pricing-page {
    width: 100%;
  }

  .pro-pricing-section {
    padding: 18px;
  }
}

/* Public page button and type polish */
body:not(.is-authenticated) {
  font-family: "Segoe UI Variable Display", "Segoe UI", Inter, Arial, sans-serif;
}

body:not(.is-authenticated) h1,
body:not(.is-authenticated) h2,
body:not(.is-authenticated) h3,
body:not(.is-authenticated) .plan-card strong {
  font-family: "Segoe UI Variable Display", "Segoe UI", Inter, Arial, sans-serif;
  font-weight: 850;
}

body:not(.is-authenticated) .primary-button,
body:not(.is-authenticated) .secondary-button,
.trial-button,
.trial-link-button {
  position: relative;
  border: 0;
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(7, 47, 58, 0.18);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

body:not(.is-authenticated) .primary-button {
  background: linear-gradient(135deg, #2563eb 0%, #0891b2 52%, #7c3aed 100%);
  color: #ffffff;
}

body:not(.is-authenticated) .secondary-button {
  background: linear-gradient(135deg, #ffffff 0%, #eef7fb 100%);
  color: #102833;
  border: 1px solid rgba(32, 91, 159, 0.18);
}

.trial-button,
.trial-link-button {
  cursor: pointer;
  border-radius: 8px;
  min-height: 42px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 850;
  font-family: inherit;
}

.trial-button {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  color: #ffffff;
}

.trial-link-button {
  width: 100%;
  margin-top: 8px;
  background: linear-gradient(135deg, #eef2ff 0%, #ecfeff 100%);
  color: #1d4ed8;
  border: 1px solid rgba(37, 99, 235, 0.2);
}

body:not(.is-authenticated) .primary-button:hover,
body:not(.is-authenticated) .secondary-button:hover,
.trial-button:hover,
.trial-link-button:hover {
  transform: translateY(-2px);
  filter: saturate(1.12);
  box-shadow: 0 18px 38px rgba(7, 47, 58, 0.24);
}

body:not(.is-authenticated) .primary-button:active,
body:not(.is-authenticated) .secondary-button:active,
.trial-button:active,
.trial-link-button:active {
  transform: translateY(0);
}

.pro-hero .welcome-copy h2,
.pricing-hero-card h2,
.pricing-heading h2 {
  text-wrap: balance;
}

.plan-price strong {
  font-variant-numeric: tabular-nums;
}
/* Live API status indicator */
.api-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.api-status-badge span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #9aa7b4;
  box-shadow: 0 0 0 4px rgba(154, 167, 180, 0.14);
}

.api-status-badge.is-online {
  color: #0f6b4f;
  border-color: rgba(19, 121, 95, 0.24);
  background: #f0fbf6;
}

.api-status-badge.is-online span {
  background: #18a66f;
  box-shadow: 0 0 0 4px rgba(24, 166, 111, 0.16);
}

.api-status-badge.is-offline {
  color: #a53333;
  border-color: rgba(180, 55, 55, 0.25);
  background: #fff5f5;
}

.api-status-badge.is-offline span {
  background: #c74242;
  box-shadow: 0 0 0 4px rgba(199, 66, 66, 0.15);
}

.offline-sync-badge {
  border: 1px solid #fed7aa;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  padding: 8px 12px;
  font-weight: 900;
  white-space: nowrap;
}

.offline-sync-badge.has-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.offline-ready-badge {
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  padding: 8px 12px;
  font-weight: 900;
  white-space: nowrap;
}

button.offline-ready-badge {
  cursor: pointer;
}

.offline-ready-badge.is-ready {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.offline-ready-badge.is-not-ready {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}

.feature-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
}

.feature-checklist strong {
  grid-column: 1 / -1;
}

.feature-checklist label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--muted);
}

.feature-checklist input {
  width: 18px;
  height: 18px;
}

.api-status-badge.is-checking span {
  animation: statusPulse 1.1s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 0.45; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.08); }
}

@media (max-width: 900px) {
  .api-status-badge strong {
    display: none;
  }
}

/* Authenticated merchant dashboard polish */
body.is-authenticated {
  --ink: #111827;
  --muted: #697586;
  --line: #e3e8ef;
  --panel: #ffffff;
  --page: #f4f6f8;
  --accent: #0f766e;
  --accent-2: #2563eb;
  --warn: #b7791f;
  --danger: #d83f4b;
  --ok: #13885f;
  --shadow: 0 10px 28px rgba(17, 24, 39, 0.07);
  --shadow-hover: 0 14px 34px rgba(17, 24, 39, 0.12);
  --ring: 0 0 0 3px rgba(15, 118, 110, 0.16);
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.07), transparent 34rem),
    linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  color: var(--ink);
  font-family: Montserrat, Inter, Segoe UI, Arial, sans-serif;
}

body.is-authenticated #app {
  grid-template-columns: 264px minmax(0, 1fr);
  background: transparent;
}

body.is-authenticated .sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  max-height: 100vh;
  padding: 0;
  gap: 0;
  overflow: auto;
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.12), transparent 180px),
    #151719;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 12px 0 32px rgba(17, 24, 39, 0.12);
}

body.is-authenticated .brand {
  min-height: 72px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.is-authenticated .brand strong {
  color: #ffffff;
  font-size: 17px;
  font-weight: 900;
}

body.is-authenticated .brand span {
  color: #9aa4b2;
  font-size: 12px;
  font-weight: 700;
}

body.is-authenticated .brand-logo,
body.is-authenticated .brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

body.is-authenticated .nav {
  padding: 14px 10px;
  gap: 4px;
}

body.is-authenticated .nav-item {
  position: relative;
  min-height: 42px;
  padding: 11px 14px 11px 16px;
  border-radius: 9px;
  color: #aeb7c2;
  font-size: 14px;
  font-weight: 800;
}

body.is-authenticated .nav-item::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 999px;
  background: transparent;
}

body.is-authenticated .nav-item:hover {
  transform: translateX(2px);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

body.is-authenticated .nav-item.active {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb 0%, #0891b2 54%, #7c3aed 100%);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.24);
}

body.is-authenticated .nav-item.active::before {
  background: #ffffff;
}

body.is-authenticated .session-box {
  margin-top: auto;
  padding: 14px 18px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body.is-authenticated .session-user {
  color: #c3cad4;
  font-weight: 700;
}

body.is-authenticated .main {
  min-width: 0;
  padding: 0 24px 24px;
  background: transparent;
}

body.is-authenticated .topbar {
  position: sticky;
  top: 0;
  z-index: 6;
  margin: 0 -24px 18px;
  padding: 14px 24px;
  background: rgba(244, 246, 248, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(12px);
}

body.is-authenticated .topbar h1 {
  margin: 0;
  color: #0f172a;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 900;
}

body.is-authenticated .topbar p {
  color: #667085;
  font-weight: 700;
}

body.is-authenticated .top-actions {
  align-items: center;
}

body.is-authenticated .panel,
body.is-authenticated .login-form,
body.is-authenticated .upgrade-box,
body.is-authenticated .subscription-banner {
  border: 1px solid rgba(213, 220, 230, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

body.is-authenticated .panel {
  padding: 18px;
}

body.is-authenticated .panel-header h2,
body.is-authenticated .panel h2 {
  color: #111827;
  font-size: 17px;
  font-weight: 900;
}

body.is-authenticated input,
body.is-authenticated select,
body.is-authenticated textarea {
  min-height: 42px;
  border-color: #dbe2ea;
  border-radius: 8px;
  background: #ffffff;
}

body.is-authenticated input:focus,
body.is-authenticated select:focus,
body.is-authenticated textarea:focus {
  outline: none;
  border-color: rgba(15, 118, 110, 0.55);
  box-shadow: var(--ring);
}

body.is-authenticated .primary-button,
body.is-authenticated .success-button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #0891b2);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18);
}

body.is-authenticated .primary-button:hover,
body.is-authenticated .success-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.26);
}

body.is-authenticated .secondary-button {
  min-height: 40px;
  border-color: #dce4ed;
  border-radius: 8px;
  color: #111827;
  background: #f8fafc;
}

body.is-authenticated .secondary-button:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.32);
  color: #0f766e;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.08);
}

body.is-authenticated .danger-button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: #d83f4b;
  box-shadow: 0 10px 22px rgba(216, 63, 75, 0.18);
}

body.is-authenticated .danger-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(216, 63, 75, 0.25);
}

body.is-authenticated .menu-card,
body.is-authenticated .table-card,
body.is-authenticated .kitchen-ticket,
body.is-authenticated .list-row,
body.is-authenticated .metric,
body.is-authenticated .cart-row,
body.is-authenticated .empty-state {
  border-color: #e3e8ef;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 5px 16px rgba(17, 24, 39, 0.05);
}

body.is-authenticated .menu-card,
body.is-authenticated .table-card {
  border-top: 3px solid rgba(15, 118, 110, 0.5);
}

body.is-authenticated .menu-card:hover,
body.is-authenticated .table-card:hover,
body.is-authenticated .list-row:hover,
body.is-authenticated .metric:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 118, 110, 0.42);
  border-top-color: #0f766e;
  box-shadow: var(--shadow-hover);
}

body.is-authenticated .menu-card strong,
body.is-authenticated .list-row strong,
body.is-authenticated .cart-row strong {
  color: #111827;
  font-weight: 900;
}

body.is-authenticated .price {
  color: #0f5fa8;
  font-size: 17px;
  font-weight: 900;
}

body.is-authenticated .category-strip {
  gap: 8px;
}

body.is-authenticated .category-strip .secondary-button {
  background: #ffffff;
  border-color: #e0e7ef;
}

body.is-authenticated .category-strip .secondary-button:hover {
  color: #0f766e;
  background: #effaf6;
}

body.is-authenticated .order-panel {
  top: 82px;
  max-height: calc(100vh - 104px);
  border-top: 4px solid #0f766e;
}

body.is-authenticated .pos-status-strip div {
  background: #ffffff;
  border-color: #e3e8ef;
  border-left: 4px solid #0f766e;
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.04);
}

body.is-authenticated .pos-status-strip div:nth-child(2) {
  border-left-color: #2563eb;
}

body.is-authenticated .pos-status-strip div:nth-child(3) {
  border-left-color: #d83f4b;
}

body.is-authenticated .cart-row {
  border-left: 4px solid rgba(15, 118, 110, 0.48);
}

body.is-authenticated .payment-box {
  border-color: #e3e8ef;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #fbfcfd);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

body.is-authenticated .payment-grid {
  grid-template-columns: minmax(128px, 0.9fr) minmax(170px, 1.1fr);
}

body.is-authenticated .quick-pay-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.is-authenticated .quick-pay-row .ghost-button {
  min-height: 38px;
  border-radius: 8px;
}

body.is-authenticated .metric {
  min-height: 92px;
  border-top: 3px solid #0f766e;
}

body.is-authenticated .metric:nth-child(2n) {
  border-top-color: #2563eb;
}

body.is-authenticated .metric:nth-child(3n) {
  border-top-color: #d83f4b;
}

body.is-authenticated .metric:nth-child(4n) {
  border-top-color: #b7791f;
}

body.is-authenticated table {
  border-collapse: separate;
  border-spacing: 0;
}

body.is-authenticated th {
  color: #475467;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

body.is-authenticated td,
body.is-authenticated th {
  border-bottom: 1px solid #edf1f5;
}

body.is-authenticated tr:hover td {
  background: #fbfdfd;
}

body.is-authenticated .badge,
body.is-authenticated .status-badge {
  border-radius: 999px;
  font-weight: 900;
}

body.is-authenticated .api-status-badge {
  min-height: 40px;
  border-radius: 999px;
  font-weight: 900;
}

@media (max-width: 900px) {
  body.is-authenticated #app {
    grid-template-columns: 1fr;
  }

  body.is-authenticated .sidebar {
    position: relative;
    min-height: auto;
    max-height: none;
  }

  body.is-authenticated .main {
    padding: 0 14px 18px;
  }

  body.is-authenticated .topbar {
    margin: 0 -14px 14px;
    padding: 12px 14px;
  }

  body.is-authenticated .order-panel {
    position: static;
    max-height: none;
  }
}
/* Account plan usage rows */
#accountSummaryList .list-row:nth-child(n+4):nth-child(-n+7) {
  border-left: 4px solid rgba(19, 121, 95, 0.55);
  background: #f7fcfa;
}

.panel-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.order-history-panel .panel-header {
  align-items: flex-start;
}

.history-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.history-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.history-table th,
.history-table td {
  padding: 14px 13px;
  border-bottom: 1px solid #edf1f5;
  text-align: left;
  vertical-align: middle;
}

.history-table th {
  color: #344054;
  background: #fbfcfe;
  font-size: 13px;
  font-weight: 900;
}

.history-table tbody tr:hover {
  background: #fbfdff;
}

.history-table tbody tr:last-child td {
  border-bottom: 0;
}

.link-button {
  border: 0;
  background: transparent;
  color: #c43b47;
  font-weight: 900;
  cursor: pointer;
  padding: 0;
}

.table-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  white-space: nowrap;
}

.icon-action {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #344054;
  font-weight: 800;
  cursor: pointer;
  padding: 5px 9px;
}

.icon-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.08);
}

.danger-icon-action {
  color: #a82424;
  border-color: #f0b8b8;
  background: #fff7f7;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 900;
  text-transform: capitalize;
  background: #f2f4f7;
  color: #475467;
}

.status-paid,
.status-active {
  background: #ecfdf3;
  color: #16803c;
}

@media (max-width: 720px) {
  body.is-authenticated {
    background: #eef3f7;
  }

  body.is-authenticated #app {
    display: block;
    min-height: 100svh;
  }

  body.is-authenticated .sidebar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px 10px 8px;
    background: #111923;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.2);
  }

  body.is-authenticated .brand {
    min-height: 38px;
  }

  body.is-authenticated .brand-logo {
    width: 36px;
    height: 36px;
  }

  body.is-authenticated .brand strong {
    font-size: 15px;
  }

  body.is-authenticated .brand span,
  body.is-authenticated .session-user {
    display: none;
  }

  body.is-authenticated .nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0 4px;
    scrollbar-width: none;
  }

  body.is-authenticated .nav::-webkit-scrollbar {
    display: none;
  }

  body.is-authenticated .nav-item {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #dbe3ec;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 850;
  }

  body.is-authenticated .nav-item.active {
    background: #ffffff;
    color: #111923;
  }

  body.is-authenticated .session-box {
    display: none;
  }

  body.is-authenticated .main {
    padding: 0 10px 22px;
  }

  body.is-authenticated .topbar {
    position: sticky;
    top: 104px;
    z-index: 35;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 0 -10px 10px;
    padding: 10px;
    border-bottom: 1px solid #dce3ea;
    background: rgba(244, 247, 250, 0.96);
    backdrop-filter: blur(10px);
  }

  body.is-authenticated .topbar h1 {
    font-size: 20px;
  }

  body.is-authenticated .topbar p {
    display: none;
  }

  body.is-authenticated .top-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    width: 100%;
  }

  body.is-authenticated .branch-select {
    min-height: 42px;
    grid-column: 1 / -1;
  }

  body.is-authenticated .offline-sync-badge {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 12px;
  }

  body.is-authenticated .api-status-badge {
    justify-content: center;
    min-height: 40px;
    padding: 8px 10px;
  }

  body.is-authenticated .api-status-badge strong {
    display: inline;
    font-size: 12px;
  }

  body.is-authenticated .api-input,
  body.is-authenticated #saveApiBtn {
    display: none;
  }

  body.is-authenticated .workspace {
    padding-top: 0;
  }

  body.is-authenticated .panel {
    padding: 12px;
    border-radius: 12px;
  }

  body.is-authenticated .pos-layout,
  body.is-authenticated .split-layout,
  body.is-authenticated .dashboard-grid,
  body.is-authenticated .settings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  body.is-authenticated .panel-header {
    min-height: 38px;
    margin-bottom: 10px;
  }

  body.is-authenticated .panel-header h2 {
    font-size: 18px;
  }

  body.is-authenticated .menu-panel {
    order: 1;
  }

  body.is-authenticated .order-panel {
    order: 2;
    position: static;
    min-height: 0;
    max-height: none;
    overflow: visible;
    grid-template-rows: none;
  }

  body.is-authenticated #menuSearchInput {
    min-height: 46px;
    border-radius: 12px;
    font-size: 16px;
  }

  body.is-authenticated .category-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-bottom: 10px;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  body.is-authenticated .category-strip::-webkit-scrollbar {
    display: none;
  }

  body.is-authenticated .category-strip button {
    flex: 0 0 auto;
    min-height: 42px;
    min-width: 104px;
    border-radius: 999px;
    padding: 9px 13px;
  }

  body.is-authenticated .menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  body.is-authenticated .menu-card {
    min-height: 122px;
    padding: 11px;
    border-radius: 12px;
    text-align: left;
  }

  body.is-authenticated .menu-card strong {
    font-size: 15px;
    line-height: 1.2;
  }

  body.is-authenticated .menu-card .price {
    font-size: 16px;
  }

  body.is-authenticated .deal-badge {
    border-radius: 8px;
    font-size: 11px;
  }

  body.is-authenticated .customer-row,
  body.is-authenticated .discount-row,
  body.is-authenticated .payment-grid,
  body.is-authenticated .table-tools {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  body.is-authenticated .customer-row input,
  body.is-authenticated .customer-row select,
  body.is-authenticated .discount-row select,
  body.is-authenticated .payment-grid input,
  body.is-authenticated .payment-grid select,
  body.is-authenticated .table-tools input,
  body.is-authenticated .table-tools select {
    width: 100%;
    min-height: 44px;
    font-size: 16px;
    border-radius: 10px;
  }

  body.is-authenticated .pos-status-strip {
    grid-template-columns: 1fr;
  }

  body.is-authenticated .order-note-input {
    min-height: 70px;
    border-radius: 10px;
    font-size: 15px;
  }

  body.is-authenticated .order-items {
    max-height: none;
  }

  body.is-authenticated .cart-row {
    border-radius: 12px;
    padding: 12px;
  }

  body.is-authenticated .qty-controls button {
    width: 38px;
    min-height: 38px;
    border-radius: 10px;
  }

  body.is-authenticated .totals {
    position: sticky;
    bottom: 0;
    z-index: 25;
    margin: 10px -12px 0;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid #dce3ea;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.08);
  }

  body.is-authenticated .order-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body.is-authenticated .order-actions button,
  body.is-authenticated .table-tools button,
  body.is-authenticated .quick-pay-row button,
  body.is-authenticated .discount-row button {
    min-height: 46px;
    border-radius: 12px;
  }

  body.is-authenticated #payOrderBtn {
    grid-column: span 2;
    min-height: 52px;
    font-size: 18px;
  }

  body.is-authenticated .receipt-box,
  body.is-authenticated .active-order-box {
    max-height: 260px;
    overflow: auto;
  }
}

@media (max-width: 390px) {
  body.is-authenticated .menu-grid {
    grid-template-columns: 1fr;
  }

  body.is-authenticated .top-actions {
    grid-template-columns: 1fr;
  }

  body.is-authenticated .order-actions {
    grid-template-columns: 1fr;
  }

  body.is-authenticated #payOrderBtn {
    grid-column: auto;
  }
}

.status-unpaid,
.status-pending,
.status-past-due {
  background: #fff8db;
  color: #946200;
}

.status-ready,
.status-served {
  background: #e8fbff;
  color: #087b8f;
}

.status-cancelled,
.status-refunded,
.status-inactive {
  background: #fff0f0;
  color: #b42318;
}

.status-open,
.status-sent-to-kitchen {
  background: #eef4ff;
  color: #3457d5;
}

.status-role {
  background: #f4f0ff;
  color: #6f3ff5;
}

.empty-table-cell {
  color: var(--muted);
  text-align: center !important;
  padding: 30px !important;
}

.team-hero-panel {
  width: min(720px, 100%);
  margin: 0 auto 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    radial-gradient(circle at top, rgba(37, 99, 235, 0.07), transparent 22rem),
    #ffffff;
  box-shadow: var(--shadow);
  padding: 46px 28px;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 16px;
}

.team-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.22);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.team-hero-panel h2 {
  margin: 0;
}

.team-hero-panel p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.team-layout {
  align-items: start;
}

.team-form-panel {
  position: sticky;
  top: 86px;
}

.staff-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 13px;
}

.staff-card + .staff-card {
  margin-top: 10px;
}

.staff-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #111827;
  color: #ffffff;
  font-weight: 900;
}

.staff-card-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.staff-card-main span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.staff-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@media (max-width: 900px) {
  .staff-card {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .staff-card .row-actions {
    grid-column: 1 / -1;
  }

  .team-form-panel {
    position: static;
  }
}
