:root,
[data-theme="dark"] {
  --bg: #08111f;
  --bg-soft: #101c30;
  --surface: rgba(19, 31, 53, 0.72);
  --surface-strong: rgba(17, 28, 47, 0.9);
  --surface-alt: rgba(31, 45, 71, 0.84);
  --surface-elevated: rgba(11, 20, 34, 0.92);
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #f4f7fb;
  --muted: #9fb0cb;
  --primary: #66a8ff;
  --primary-strong: #3f87ff;
  --success: #4fd197;
  --warning: #f3b459;
  --danger: #ff7f7f;
  --info: #72d3ff;
  --blue-bg: rgba(102, 168, 255, 0.16);
  --green-bg: rgba(79, 209, 151, 0.16);
  --yellow-bg: rgba(243, 180, 89, 0.16);
  --red-bg: rgba(255, 127, 127, 0.14);
  --shadow: 0 32px 80px rgba(0, 0, 0, 0.4);
  --radius: 22px;
  --radius-sm: 14px;
  --blur: blur(24px);
  --field-bg: rgba(255, 255, 255, 0.06);
  --field-focus-bg: rgba(255, 255, 255, 0.11);
  --soft-fill: rgba(255, 255, 255, 0.08);
  --page-gradient:
    radial-gradient(circle at top left, rgba(102, 168, 255, 0.22), transparent 34%),
    radial-gradient(circle at 82% 14%, rgba(79, 209, 151, 0.16), transparent 26%),
    linear-gradient(180deg, #0b1524 0%, #08111f 52%, #050b14 100%);
}

[data-theme="light"] {
  --bg: #eef3fb;
  --bg-soft: #f8fbff;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.88);
  --surface-alt: rgba(246, 250, 255, 0.92);
  --surface-elevated: rgba(255, 255, 255, 0.96);
  --border: rgba(121, 142, 182, 0.18);
  --border-strong: rgba(121, 142, 182, 0.28);
  --text: #10213c;
  --muted: #667894;
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --success: #1f9d66;
  --warning: #cb7d16;
  --danger: #d64545;
  --info: #147da8;
  --blue-bg: rgba(37, 99, 235, 0.1);
  --green-bg: rgba(31, 157, 102, 0.1);
  --yellow-bg: rgba(203, 125, 22, 0.12);
  --red-bg: rgba(214, 69, 69, 0.1);
  --shadow: 0 28px 70px rgba(31, 50, 86, 0.16);
  --field-bg: rgba(228, 236, 247, 0.88);
  --field-focus-bg: rgba(255, 255, 255, 0.98);
  --soft-fill: rgba(226, 234, 246, 0.82);
  --page-gradient:
    radial-gradient(circle at top left, rgba(119, 178, 255, 0.24), transparent 30%),
    radial-gradient(circle at 92% 12%, rgba(95, 203, 164, 0.18), transparent 24%),
    linear-gradient(180deg, #f9fbff 0%, #eef3fb 54%, #e4ebf7 100%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 15px;
  color-scheme: dark light;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--page-gradient);
  letter-spacing: -0.01em;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 6px;
  padding: 12px 14px;
  color: var(--text);
  background: var(--field-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(102, 168, 255, 0.48);
  background: var(--field-focus-bg);
}

input[type="radio"], input[type="checkbox"] {
  width: unset;
  min-width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  accent-color: var(--primary-strong);
}

label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
}

.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  color: var(--muted);
}

.glass-panel,
.card,
.login-card,
.summary-bar,
.modal-box,
.hero-strip,
.app-header {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  margin: 16px;
  border-radius: 24px;
}

.logo {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  /* flex-wrap: wrap; */
  color: var(--muted);
  font-size: 0.84rem;
  overflow-x: scroll;
  scrollbar-width: thin;
}

.header-link {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s ease;
}

.header-link:hover,
.header-link-danger:hover {
  color: var(--text);
}

.header-link-danger {
  color: var(--danger);
}

.app-main {
  max-width: 1280px;
  margin: 0 auto 48px;
  padding: 0 16px 32px;
}

.app-footer-note {
  margin-top: 20px;
  padding: 12px 2px 0;
  text-align: center;
  font-size: 0.74rem;
  line-height: 1.6;
  opacity: 0.68;
}

.app-footer-subtle {
  font-size: 0.7rem;
  opacity: 0.82;
}

.page-shell {
  display: grid;
  gap: 16px;
}

.hero-strip {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  border-radius: 28px;
  padding: 26px;
}

.hero-strip h1 {
  font-size: clamp(1.4rem, 3vw, 2.3rem);
  line-height: 1.05;
}

.eyebrow {
  margin-bottom: 8px;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-actions,
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content:center;
}

.hero-actions-wrap {
  justify-content: center;
}

.pill-btn,
.tab-btn,
.theme-toggle {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--soft-fill);
  color: var(--muted);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.pill-btn.active,
.tab-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff;
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.22);
}

.pill-btn:hover,
.tab-btn:hover,
.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  color: var(--text);
}

.theme-toggle {
  min-width: 74px;
}

.role-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  /* flex-wrap: wrap; */
}

.route-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 700;
}

.role-switch-links {
  display: inline-flex;
  gap: 6px;
  /* flex-wrap: wrap; */
}

.route-chip {
  background: var(--soft-fill);
  color: var(--muted);
  border: 1px solid transparent;
  transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.route-chip:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  color: var(--text);
}

.route-chip.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff;
}

.compact-tabs {
  padding: 6px;
  border-radius: 999px;
  background: var(--field-bg);
}

.category-tabs {
  border-radius: 20px;
  padding: 8px;
  background: var(--field-bg);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 16px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.btn:not(:disabled):hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
}

.btn-success {
  color: #082415;
  background: linear-gradient(135deg, #7af3be, var(--success));
}

.btn-warning {
  color: #2d1900;
  background: linear-gradient(135deg, #ffd48d, var(--warning));
}

.btn-danger {
  color: #fff;
  background: linear-gradient(135deg, #ff9ea2, var(--danger));
}

.btn-ghost {
  color: var(--text);
  border-color: var(--border);
  background: var(--field-bg);
}

.btn-sm {
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 0.78rem;
}

.w-full {
  width: 100%;
}

.page-link {
  text-decoration: none;
}

.card,
.glass-panel {
  border-radius: var(--radius);
  padding: 18px;
}

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

.section-head.compact {
  margin-bottom: 12px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.95fr);
  gap: 16px;
}

.stack-panel {
  display: grid;
  gap: 16px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.card-title {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.card-value {
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  font-weight: 700;
}

.table-grid,
.table-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

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

.table-btn {
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--soft-fill);
  color: var(--text);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.table-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(102, 168, 255, 0.34);
}

.table-btn.occupied {
  background: var(--yellow-bg);
  border-color: rgba(243, 180, 89, 0.48);
}

.table-meta,
.small-muted,
.order-time {
  font-size: 0.76rem;
  color: var(--muted);
}

.activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.activity-card {
  display: grid;
  gap: 10px;
}

.menu-item-row,
.order-item-row,
.kitchen-row,
.list-row {
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.menu-item-row {
  grid-template-columns: minmax(0, 1fr) auto auto auto;
}

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

.kitchen-row {
  grid-template-columns: minmax(0, 1fr) auto auto auto auto;
}

.queue-head {
  padding-top: 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.queue-item-name,
.menu-item-name,
.oi-name {
  min-width: 0;
  font-weight: 600;
}

.menu-item-price {
  color: var(--muted);
  min-width: 54px;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.qty-plus {
  background: linear-gradient(135deg, #7af3be, var(--success));
  color: #0b2418;
}

.qty-minus {
  background: linear-gradient(135deg, #ff9ea2, var(--danger));
}

.qty-display,
.item-meta {
  min-width: 36px;
  text-align: center;
}

.item-total,
.text-primary {
  color: var(--primary);
}

.summary-bar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  border-radius: 22px;
  padding: 16px 20px;
  background: var(--surface-strong);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

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

.summary-bar .total {
  font-size: 1.32rem;
  font-weight: 700;
  color: var(--success);
}

.has-summary-bar {
  padding-bottom: 130px;
}

.order-card {
  border-radius: 22px;
  border: 1px solid var(--border);
  padding: 16px;
  margin-bottom: 12px;
  background: var(--field-bg);
}

.order-card.status-cooking {
  background: var(--yellow-bg);
}

.order-card.status-ready_for_bill {
  background: var(--green-bg);
}

.order-card.status-bill_requested {
  background: var(--blue-bg);
}

.order-card.status-flagged_issue {
  background: var(--red-bg);
}

.order-card[data-open-receipt] {
  cursor: pointer;
}

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

.order-id {
  color: var(--muted);
  font-size: 0.78rem;
}

.order-total-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.order-total-strong {
  font-size: 1rem;
  font-weight: 700;
}

.strike {
  text-decoration: line-through;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-blue {
  background: var(--blue-bg);
  color: var(--primary);
}

.badge-green {
  background: var(--green-bg);
  color: var(--success);
}

.badge-yellow {
  background: var(--yellow-bg);
  color: var(--warning);
}

.badge-red {
  background: var(--red-bg);
  color: var(--danger);
}

.badge-gray {
  background: rgba(255, 255, 255, 0.09);
  color: var(--muted);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(6, 12, 22, 0.46);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-box {
  position: relative;
  width: min(100%, 520px);
  max-height: 90vh;
  overflow: auto;
}

.modal-confirm {
  width: min(100%, 440px);
}

.receipt-modal-box {
  width: min(100%, 980px);
  padding-top: 22px;
}

.receipt-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  padding-right: 52px;
}

.receipt-modal-actions {
  margin-top: 0;
}

.receipt-frame {
  width: 100%;
  min-height: min(78vh, 820px);
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff;
}

.modal-title {
  margin-bottom: 16px;
  font-size: 1.02rem;
  font-weight: 700;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 0, 0, 0.08);
  color: var(--danger);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.modal-actions-wrap {
  flex-wrap: wrap;
}

.modal-action-full {
  flex: 1 1 100%;
}

.info-box,
.login-card .sub {
  background: var(--field-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
}

.total-row {
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 1rem;
  font-weight: 700;
}

#toast-container {
  position: fixed;
  top: 96px;
  right: 18px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  min-width: 220px;
  max-width: 320px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  box-shadow: var(--shadow);
}

.toast.success {
  color: var(--success);
  border-color: rgba(79, 209, 151, 0.38);
}

.toast.error {
  color: var(--danger);
  border-color: rgba(255, 127, 127, 0.34);
}

.toast.info {
  color: var(--info);
  border-color: rgba(114, 211, 255, 0.34);
}

.toast.warning {
  color: var(--warning);
  border-color: rgba(243, 180, 89, 0.34);
}

.loader {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

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

.text-success {
  color: var(--success);
}

.text-danger {
  color: var(--danger);
}

.text-warning {
  color: var(--warning);
}

.hidden {
  display: none !important;
}

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

.flex {
  display: flex;
}

.gap-8 {
  gap: 8px;
}

.gap-12 {
  gap: 12px;
}

.mt-8 {
  margin-top: 8px;
}

.mt-16 {
  margin-top: 16px;
}

.mb-8 {
  margin-bottom: 8px;
}

.mb-16 {
  margin-bottom: 16px;
}

.custom-item-grid,
.settings-grid {
  display: grid;
  gap: 12px;
}

.custom-item-grid {
  grid-template-columns: minmax(0, 1.6fr) 82px 110px auto;
}

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

.settings-wide {
  grid-column: 1 / -1;
}

.form-group {
  display: grid;
  gap: 6px;
}

.oi-remove {
  border: none;
  border-radius: 999px;
  width: 34px;
  height: 34px;
  background: transparent;
  color: var(--danger);
  cursor: pointer;
}

.oi-remove:hover:not(:disabled) {
  background: var(--red-bg);
}

.oi-remove:disabled {
  opacity: 0.26;
  cursor: not-allowed;
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: min(100%, 420px);
  padding: 28px;
  border-radius: 28px;
}

.login-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--success));
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.login-card h1 {
  margin-bottom: 6px;
  text-align: center;
}

.login-card .sub {
  margin-bottom: 22px;
  text-align: center;
  color: var(--muted);
  font-size: 0.86rem;
}

.manual-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.manual-section {
  margin-bottom: 20px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}

.manual-section h2 {
  margin-bottom: 12px;
  color: var(--primary);
}

.manual-section p,
.manual-section li {
  line-height: 1.7;
}

.manual-section li {
  margin-bottom: 8px;
}

.role-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.role-waiter {
  /* background: var(--blue-bg); */
  color: var(--primary);
}

.role-kitchen {
  /* background: var(--yellow-bg); */
  color: var(--warning);
}

.role-cashier {
  /* background: var(--green-bg); */
  color: var(--success);
}

.pos-table {
  width: 100%;
  border-collapse: collapse;
}

.pos-table th,
.pos-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.pos-table th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
}

code {
  font-family: "SF Mono", SF Mono, Consolas, "Liberation Mono", Menlo, Courier, monospace;
  background: var(--field-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 4px 8px;
  color: var(--text);
  overflow-wrap: anywhere;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.payment-breakdown,
.customer-list-grid,
.table-editor-grid {
  display: grid;
  gap: 12px;
}

.payment-breakdown {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.payment-card,
.customer-card,
.table-editor-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-soft);
  padding: 14px 16px;
}

.payment-card strong,
.customer-card strong,
.table-editor-card strong {
  display: block;
  margin-bottom: 6px;
}

.payment-card .meta,
.customer-card .meta,
.table-editor-card .meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.tier-none {
  background: rgba(148, 163, 184, 0.16);
  color: var(--muted);
}

.tier-green {
  background: rgba(34, 197, 94, 0.16);
  color: #166534;
}

.tier-gold {
  background: rgba(245, 158, 11, 0.18);
  color: #92400e;
}

.tier-platinum {
  background: rgba(59, 130, 246, 0.16);
  color: #1d4ed8;
}

[data-theme="dark"] .tier-green {
  color: #86efac;
}

[data-theme="dark"] .tier-gold {
  color: #fcd34d;
}

[data-theme="dark"] .tier-platinum {
  color: #93c5fd;
}

.pager-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.pager-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.frame-modal-box {
  width: min(1120px, 100%);
  max-height: min(92vh, 900px);
  padding: 18px;
}

.frame-modal-iframe {
  width: 100%;
  height: min(78vh, 760px);
  border: 0;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
}

.payment-method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.payment-method-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-soft);
  cursor: pointer;
  font-size: 0.92rem;
}

.payment-method-chip input {
  margin: 0;
}

.payment-summary-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.embedded-note {
  color: var(--muted);
  font-size: 0.82rem;
}

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

.section-spacer {
  margin-top: 18px;
}

@media (max-width: 980px) {
  .split-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .app-header {
    margin: 10px;
    padding: 14px 16px;
    border-radius: 18px;
  }

  .hero-strip {
    padding: 20px;
    border-radius: 22px;
    align-items: center;
    flex-direction: column;
    text-align: center;
  }

  .menu-item-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .menu-item-price {
    text-align: right;
  }

  .order-item-row,
  .kitchen-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .custom-item-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .summary-bar {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 14px 16px;
    flex-direction: column;
    align-items: stretch;
  }

  .summary-actions {
    width: 100%;
  }

  .summary-actions .btn {
    flex: 1 1 0;
  }

  .modal-overlay {
    padding: 10px;
    align-items: flex-end;
  }

  .receipt-modal-head {
    flex-direction: column;
    padding-right: 44px;
  }

  .receipt-modal-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .receipt-modal-actions .btn {
    flex: 1 1 0;
  }

  .frame-modal-box {
    padding: 14px;
  }

  .frame-modal-iframe {
    height: min(72vh, 680px);
  }
}

@media (max-width: 520px) {
  .app-main {
    padding: 0 10px 130px;
  }

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

  .order-card-header,
  .section-head {
    align-items: flex-start;
  }

  .hero-actions {
    width: 100%;
  }
}
