:root {
  --bg: #f6f7f2;
  --panel: #ffffff;
  --panel-soft: #fbfbf7;
  --ink: #1f2722;
  --muted: #65706a;
  --line: #dde2d9;
  --brand: #146c5f;
  --brand-strong: #0d5048;
  --accent: #e46f3c;
  --warn: #c84630;
  --ok: #18824c;
  --shadow: 0 18px 45px rgba(37, 45, 39, 0.1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

a {
  text-decoration: none;
}

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

button {
  border: 0;
  cursor: pointer;
}

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

.plans-screen {
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: 32px;
}

.plans-wrap {
  width: min(1040px, 100%);
  margin: 0 auto;
}

.plans-heading {
  margin-bottom: 28px;
}

.eyebrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  font-size: clamp(34px, 7vw, 70px);
  line-height: 0.95;
  margin-bottom: 14px;
}

h2 {
  font-size: 26px;
  margin-bottom: 16px;
}

h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

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

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

.quick-login-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.login-form {
  width: min(720px, 100%);
}

.plan-card {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  text-align: left;
}

.plan-card.active {
  border-color: rgba(20, 108, 95, 0.35);
}

.plan-card.disabled {
  cursor: default;
  opacity: 0.72;
}

.plan-title {
  font-size: 28px;
  font-weight: 850;
}

.plan-features {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.pill {
  align-self: flex-start;
  padding: 7px 10px;
  border-radius: 999px;
  background: #edf5f1;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 800;
}

.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  transition: grid-template-columns 0.2s ease;
}

.layout.sidebar-collapsed {
  grid-template-columns: 76px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  background: #15231f;
  color: #f7faf6;
}

.brand-block {
  min-height: 62px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  padding: 0 8px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 14px;
}

.brand-copy {
  min-width: 0;
}

.brand-name {
  font-size: 21px;
  font-weight: 850;
}

.collapse-btn {
  order: 2;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 900;
}

.sidebar-collapsed .sidebar {
  padding-inline: 10px;
}

.sidebar-collapsed .brand-block {
  justify-content: center;
  padding-inline: 0;
}

.sidebar-collapsed .brand-copy,
.sidebar-collapsed .nav-label {
  display: none;
}

.sidebar-collapsed .nav-btn,
.sidebar-collapsed .back-btn {
  justify-content: center;
  padding-inline: 0;
}

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

.nav-btn,
.back-btn {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  text-align: left;
}

.nav-btn.active,
.nav-btn:hover,
.back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-icon {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  text-align: center;
  font-weight: 900;
}

.nav-svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.back-btn {
  margin-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
}

.main {
  min-width: 0;
  padding: 28px;
  padding-bottom: 92px;
}

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

.topbar h1 {
  font-size: 32px;
  line-height: 1.1;
  margin: 0;
}

.mobile-bar {
  display: none;
}

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

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

.dashboard-controls h2 {
  margin-bottom: 4px;
}

.segmented {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.segmented button {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.segmented button.active {
  background: var(--brand);
  color: #fff;
}

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

.daily-summary {
  margin-bottom: 18px;
}

.plus-main .panel {
  margin-bottom: 18px;
}

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

.section-head h2,
.section-head p {
  margin-bottom: 0;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.summary-line {
  display: grid;
  gap: 5px;
  padding: 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.summary-line span {
  color: var(--muted);
  font-size: 12px;
}

.summary-line strong {
  font-size: 17px;
}

.stat-card,
.panel,
.item-card,
.order-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(37, 45, 39, 0.06);
}

.stat-card {
  padding: 18px;
  display: grid;
  align-content: center;
}

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

.stat-value {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 850;
}

.panel {
  padding: 18px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.toolbar-left,
.toolbar-right {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.input,
.select,
.textarea {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px 11px;
}

.textarea {
  width: 100%;
  min-height: 86px;
  resize: vertical;
}

.primary,
.secondary,
.danger,
.ghost {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 800;
}

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

.primary:hover {
  background: var(--brand-strong);
}

.primary:disabled,
.secondary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.secondary {
  background: #eef4f0;
  color: var(--brand-strong);
}

.danger {
  background: #fff0ed;
  color: var(--warn);
}

.ghost {
  background: transparent;
  color: var(--muted);
}

.wide {
  width: 100%;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef4f0;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.badge.sold,
.badge.cancelled {
  background: #fff0ed;
  color: var(--warn);
}

.badge.off {
  background: #f0f0ee;
  color: #72746f;
}

.badge.status-new {
  background: #fff4df;
  color: #935b08;
}

.badge.status-preparing,
.badge.status-waiting-payment,
.badge.status-unpaid {
  background: #fff0e7;
  color: #a3411d;
}

.badge.status-ready {
  background: #e8f5ff;
  color: #1f6385;
}

.badge.status-served,
.badge.status-completed,
.badge.status-paid {
  background: #e6f4ed;
  color: #00614f;
}

.badge.status-cancelled {
  background: #fff0ed;
  color: var(--warn);
}

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

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

.item-card {
  overflow: hidden;
}

.item-image {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #f5d6c8, #d6ebe3);
  overflow: hidden;
}

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

.item-body {
  padding: 14px;
}

.item-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 8px;
}

.price {
  font-weight: 850;
  color: var(--brand-strong);
  white-space: nowrap;
}

.qr-page {
  width: min(980px, 100%);
}

.qr-hero,
.qr-wrap {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 30px;
  align-items: center;
}

.qr-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 8px 0;
  text-align: center;
}

.qr-card h2 {
  margin-bottom: 2px;
}

.qr-card img {
  width: min(280px, 100%);
  height: auto;
  aspect-ratio: 1;
  border: 10px solid white;
  box-shadow: 0 8px 24px rgba(37, 45, 39, 0.12);
}

.qr-url {
  max-width: 100%;
  padding: 8px 10px;
  border-radius: 999px;
  background: #edf5f1;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 800;
  word-break: break-all;
}

.qr-info {
  display: grid;
  gap: 14px;
  align-content: center;
}

.qr-info h3 {
  font-size: 24px;
  margin-bottom: 0;
}

.qr-preview {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.qr-preview span {
  color: var(--muted);
}

.customer-page {
  min-height: 100vh;
  padding: 18px;
}

.customer-wrap {
  width: min(980px, 100%);
  margin: 0 auto;
}

.customer-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 8px 0 18px;
}

.customer-header h1 {
  font-size: 36px;
  margin: 0;
}

.customer-order-wrap {
  width: min(1180px, 100%);
}

.customer-order-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 18px;
  align-items: start;
}

.customer-order-toolbar {
  position: sticky;
  top: 0;
  z-index: 8;
  padding: 10px;
  margin: -10px -10px 12px;
  border-bottom: 1px solid rgba(213, 220, 210, 0.8);
  background: rgba(244, 246, 241, 0.96);
  box-shadow: 0 8px 18px rgba(14, 30, 25, 0.06);
  backdrop-filter: blur(10px);
}

/* Modern Customer Mobile Header */
.customer-mobile-header {
  background: #fff;
  border: 1px solid rgba(212, 195, 163, 0.4);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

.customer-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.customer-brand-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.customer-brand-name {
  font-size: 24px;
  font-weight: 850;
  color: #121316;
  letter-spacing: -0.5px;
}

.customer-table-tag {
  background: #121316;
  color: #f6f3ee;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.3px;
}

.customer-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 3px 10px;
  border-radius: 999px;
}

.customer-search-wrap {
  position: relative;
  width: 100%;
  margin-bottom: 12px;
}

.customer-search-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #8c827a;
}

.customer-search-wrap input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px 12px 42px !important;
  border-radius: 12px !important;
  border: 1.5px solid #e2d9cd !important;
  background: #faf8f5 !important;
  font-size: 14px !important;
  color: #121316 !important;
}

.customer-search-wrap input:focus {
  border-color: #121316 !important;
  background: #fff !important;
}

.customer-category-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 2px 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.customer-category-scroll::-webkit-scrollbar {
  display: none;
}

.customer-cat-btn {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
  background: #faf8f5;
  border: 1.5px solid #ded5c7;
  color: #3d3b37;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.customer-cat-btn:hover {
  border-color: #121316;
  color: #121316;
}

.customer-cat-btn.active {
  background: #121316 !important;
  color: #f6f3ee !important;
  border-color: #121316 !important;
  box-shadow: 0 4px 12px rgba(18, 19, 22, 0.25);
}

.cart-pill-badge {
  background: #00f0c0;
  color: #041417;
  font-size: 11px;
  font-weight: 850;
  padding: 2px 6px;
  border-radius: 999px;
  line-height: 1;
}

.customer-basket {
  position: static;
}

.customer-success {
  display: grid;
  gap: 10px;
  max-width: 520px;
}

.customer-history {
  margin-top: 18px;
}

.customer-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

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

.customer-floating-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 20px;
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1.5px solid #00f0c0;
  border-radius: 999px;
  background: rgba(7, 25, 29, 0.95);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 240, 192, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  max-width: 440px;
  width: min(440px, calc(100% - 32px));
}

.customer-floating-nav button {
  flex: 1;
  min-height: 44px;
  border-radius: 999px;
  background: transparent;
  color: #d5e2e0;
  font-size: 13.5px;
  font-weight: 750;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.customer-floating-nav button.active {
  background: #00f0c0;
  color: #041417;
  box-shadow: 0 2px 10px rgba(0, 240, 192, 0.35);
}

.customer-page-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.customer-page-panel {
  max-width: 620px;
  margin-inline: auto;
}

.customer-back {
  margin-bottom: 14px;
}

.customer-basket {
  display: grid;
  gap: 12px;
}

.customer-basket .basket-head {
  align-items: flex-start;
  margin-bottom: 2px;
}

.customer-basket .cart-list {
  gap: 10px;
}

.customer-basket .cart-line {
  padding: 12px;
  gap: 8px 12px;
}

.customer-basket .line-note-input {
  margin-top: 8px;
}

.customer-basket > .input {
  margin-top: 0;
}

.modal-food-image {
  border-radius: 8px;
  margin-bottom: 12px;
}

.card-description {
  min-height: 50px;
}

.text-link {
  color: var(--brand-strong);
  font: inherit;
  font-weight: 900;
  text-decoration: underline;
}

.customer-order-detail {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.customer-order-detail + .customer-order-detail {
  margin-top: 12px;
}

.customer-order-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

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

.customer-order-items {
  display: grid;
  gap: 8px;
}

.pos-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.85fr);
  gap: 16px;
  align-items: start;
}

.category-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.category-btn {
  min-height: 40px;
  padding: 9px 13px;
  border-radius: 999px;
  background: #eef1ed;
  color: var(--ink);
  font-weight: 800;
  white-space: nowrap;
}

.category-btn.active {
  background: var(--brand);
  color: #fff;
}

.pos-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}

.pos-item {
  min-height: 118px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.pos-item:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cart-list {
  display: grid;
  gap: 12px;
  max-height: 44vh;
  overflow: auto;
  padding-right: 4px;
}

.cart-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.line-note-input {
  margin-top: 8px;
  min-height: 38px;
}

.cart-line-total {
  color: var(--brand-dark);
}

.qty-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #eef1ed;
  color: var(--ink);
  font-weight: 900;
}

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

.discount-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, 0.75fr);
  gap: 8px;
  margin-top: 12px;
}

.discount-row .input,
.discount-row .select {
  width: 100%;
}

.total-line {
  display: flex;
  justify-content: space-between;
}

.grand {
  font-size: 22px;
  font-weight: 900;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(22, 30, 26, 0.48);
}

.modal {
  width: min(620px, 100%);
  max-height: min(92vh, 820px);
  overflow: auto;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.checkout-modal {
  width: min(560px, 100%);
}

.cashier-order-modal {
  width: min(920px, 100%);
}

.cashier-order-layout {
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.8fr);
}

.modal-pos-items {
  margin-top: 12px;
  max-height: 52vh;
  overflow: auto;
  padding-right: 4px;
}

.cashier-order-layout #plus-order-note {
  margin-top: 12px;
}

.modal-header,
.modal-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.modal-footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.modal-body {
  padding: 18px;
}

.checkout-grid {
  display: grid;
  gap: 12px;
}

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

.payment-order-review {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.payment-review-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.payment-review-line:first-of-type {
  border-top: 0;
}

.payment-review-line .icon-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.checkout-order {
  display: grid;
  gap: 10px;
}

.checkout-order h3 {
  margin-bottom: 0;
}

.checkout-lines {
  display: grid;
  gap: 8px;
  max-height: 170px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

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

.checkout-line span {
  min-width: 0;
}

.payment-total {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-radius: 8px;
  background: #eef4f0;
}

.payment-total span {
  color: var(--muted);
  font-weight: 800;
}

.payment-total strong {
  font-size: 28px;
  color: var(--brand-strong);
}

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

.payment-choice button {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
}

.payment-choice button.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.payment-box {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.payment-box h3 {
  margin-bottom: 0;
}

.active-payment {
  border-color: rgba(20, 108, 95, 0.26);
}

.change-box {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 8px;
  background: #fff;
}

.change-box span {
  color: var(--muted);
  font-weight: 800;
}

.change-box strong {
  color: var(--brand-strong);
  font-size: 24px;
}

.qr-confirm {
  text-align: center;
}

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

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

.field.full {
  grid-column: 1 / -1;
}

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

.receipt {
  width: min(320px, 100%);
  margin: 0 auto;
  padding: 14px;
  border: 1px dashed #9ea69f;
  background: #fff;
  color: #111;
  font-family: "Courier New", monospace;
  font-size: 12px;
}

.receipt h2 {
  text-align: center;
  font-family: inherit;
}

.receipt-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.receipt-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  margin-bottom: 4px;
}

.barcode {
  display: flex;
  justify-content: center;
  align-items: stretch;
  height: 52px;
  margin-top: 12px;
  overflow: hidden;
}

.barcode .bar,
.barcode .space {
  display: block;
  height: 100%;
  flex: 0 0 auto;
}

.barcode .bar {
  background: #111;
}

.barcode .space {
  background: #fff;
}

.barcode-text {
  margin-top: 5px;
  text-align: center;
  font-size: 11px;
  word-break: break-all;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(210px, 0.34fr) minmax(0, 1fr);
  gap: 22px 28px;
  align-items: start;
}

.settings-section {
  padding-top: 8px;
}

.settings-section h2 {
  margin-bottom: 4px;
  font-size: 18px;
}

.settings-section p {
  margin-bottom: 0;
}

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

.charge-stack {
  display: grid;
  gap: 14px;
  padding-top: 2px;
}

.charge-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.45fr);
  gap: 12px;
  align-items: end;
}

.charge-line .field {
  width: 100%;
}

.charge-line .input:disabled {
  background: #f0f1ee;
  color: #8a928c;
}

.bottom-nav {
  display: none;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 14px;
  border-radius: 8px;
  background: #15231f;
  color: #fff;
  box-shadow: var(--shadow);
  font-weight: 800;
}

.role-chip {
  padding: 9px 12px;
  border-radius: 999px;
  background: #eef4f0;
  color: var(--brand-strong);
  font-weight: 900;
}

.plus-status-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.restaurant-status-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 14px;
}

.restaurant-status-grid + .plus-order-cards {
  grid-template-columns: repeat(auto-fill, minmax(190px, 220px));
}

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

.table-card {
  min-height: 130px;
  display: grid;
  gap: 6px;
  align-content: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.table-card strong {
  font-size: 22px;
}

.table-card.occupied,
.table-card.ordering {
  border-color: #f0c49f;
  background: #fff9f3;
}

.table-card.preparing {
  border-color: #e9b86f;
  background: #fff7e8;
}

.table-card.ready {
  border-color: #79bd91;
  background: #f0fbf3;
}

.table-card.waiting-payment {
  border-color: #86abc7;
  background: #f1f7fb;
}

.floor-layout {
  display: grid;
  gap: 22px;
  margin-top: 20px;
}

.takeaway-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.floor-zone {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.floor-zone-title {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.floor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
  gap: 22px 18px;
}

.floor-table {
  min-height: 184px;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 8px;
  padding: 10px 6px;
  border-radius: 8px;
  background: transparent;
}

.floor-table-shape {
  position: relative;
  width: 118px;
  height: 98px;
}

.floor-table-top {
  position: absolute;
  left: 22px;
  top: 20px;
  width: 74px;
  height: 60px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(20, 108, 95, 0.24);
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fbf7, #dfe9e4);
  color: var(--brand-dark);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.72), 0 10px 18px rgba(18, 35, 31, 0.12);
  font-weight: 900;
}

.floor-table-seat {
  position: absolute;
  width: 18px;
  height: 38px;
  border: 1px solid rgba(20, 108, 95, 0.22);
  border-radius: 999px;
  background: #eef5f1;
  box-shadow: 0 6px 12px rgba(18, 35, 31, 0.08);
}

.seat-top {
  left: 38px;
  top: 0;
  width: 42px;
  height: 16px;
}

.seat-left {
  left: 0;
  top: 31px;
}

.seat-right {
  right: 0;
  top: 31px;
}

.seat-bottom {
  left: 38px;
  bottom: 0;
  width: 42px;
  height: 16px;
}

.floor-table button:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
}

.floor-table.occupied .floor-table-top,
.floor-table.preparing .floor-table-top,
.floor-table.occupied .floor-table-seat,
.floor-table.preparing .floor-table-seat {
  background: linear-gradient(180deg, #fff4e5, #f0c58d);
  border-color: #d99b35;
}

.floor-table.ready .floor-table-top,
.floor-table.ready .floor-table-seat {
  background: linear-gradient(180deg, #f1fff4, #9ed7ad);
  border-color: var(--ok);
}

.floor-table.waiting-payment .floor-table-top,
.floor-table.waiting-payment .floor-table-seat {
  background: linear-gradient(180deg, #eef8ff, #a8c9df);
  border-color: #6ea4c5;
}

.floor-table-info {
  min-height: 62px;
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
}

.floor-table-info small {
  color: var(--muted);
  font-size: 12px;
}

.plus-order-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.order-toolbar {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(170px, 0.8fr) minmax(220px, 1fr);
  gap: 12px;
}

.takeaway-chip {
  min-height: 43px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--brand-dark);
  font-weight: 800;
}

.basket-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.basket-head h2 {
  margin-bottom: 2px;
}

.basket-head > strong {
  color: var(--brand-dark);
  font-size: 22px;
}

.basket-warning {
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid #e8c093;
  border-radius: 8px;
  background: #fff7e8;
  color: #7b4f16;
  font-weight: 800;
}

.order-filter-bar {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) minmax(150px, 180px) minmax(150px, 180px);
  align-items: center;
  gap: 12px;
  margin: 14px 0 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.order-filter-bar .segmented:not(.order-mode-switch) {
  grid-column: 1 / -1;
  width: fit-content;
}

.kitchen-history-filter {
  grid-template-columns: minmax(220px, 1fr) auto;
}

.profile-panel {
  padding: 0;
  overflow: hidden;
}

.profile-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 300px;
}

.profile-photo-wrap {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 14px;
  padding: 24px;
  background: #edf4f0;
  border-right: 1px solid var(--line);
}

.profile-avatar {
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: var(--brand);
  color: #fff;
  font-size: 36px;
  font-weight: 900;
}

.profile-photo {
  width: 132px;
  height: 132px;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: #fff;
}

.profile-details {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 24px;
}

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

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

.kds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.kds-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.kds-card.new {
  border-color: var(--accent);
}

.kds-card.preparing {
  border-color: #d99b35;
}

.kds-card.ready {
  border-color: var(--ok);
}

.kds-items {
  display: grid;
  gap: 8px;
  font-size: 18px;
}

.kitchen-note {
  padding: 10px;
  border-radius: 8px;
  background: #fff7e8;
  font-weight: 800;
}

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

.plus-order-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 220px));
  gap: 12px;
}

.plus-order-card {
  display: grid;
  gap: 8px;
  width: 220px;
  min-height: 150px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.plus-order-card > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.panel-soft {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  margin-bottom: 10px;
}

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

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

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

.activity-head {
  margin-top: 22px;
}

.report-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.top-items-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

@media (max-width: 920px) {
  .layout {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .mobile-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 12px 16px;
    background: #15231f;
    color: #fff;
  }

  .main {
    padding: 18px;
    padding-bottom: 92px;
  }

  .stats-grid,
  .plan-grid,
  .quick-login-grid,
  .plus-status-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

  .dashboard-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented {
    width: 100%;
  }

  .segmented button {
    flex: 1;
  }

  .qr-hero,
  .qr-wrap,
  .pos-grid,
  .plus-order-layout,
  .order-toolbar,
  .order-filter-bar,
  .profile-card,
  .profile-grid,
  .plus-tabs-grid {
    grid-template-columns: 1fr;
  }

  .profile-photo-wrap {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .order-filter-bar .segmented {
    width: 100%;
  }

  .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    border-top: 1px solid var(--line);
    background: #fff;
  }

  .bottom-nav button {
    min-height: 64px;
    display: grid;
    place-items: center;
    gap: 2px;
    background: #fff;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
  }

  .bottom-nav button.active {
    color: var(--brand);
  }

  .bottom-nav:has(button:nth-child(4):last-child) {
    grid-template-columns: repeat(4, 1fr);
  }

  .toast {
    bottom: 84px;
  }
}

@media (max-width: 620px) {
  .plans-screen {
    padding: 18px;
  }

  .plan-grid,
  .quick-login-grid,
  .stats-grid,
  .split-grid,
  .summary-grid,
  .plus-status-band,
  .restaurant-status-grid,
  .kds-stats,
  .charge-line,
  .settings-fields,
  .form-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .report-metrics {
    grid-template-columns: 1fr;
  }

  .topbar,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .plus-main .topbar {
    gap: 10px;
    margin-bottom: 16px;
  }

  .plus-main .topbar h1 {
    font-size: 30px;
    line-height: 1.05;
  }

  .plus-main .role-chip {
    width: 100%;
    justify-content: center;
    min-height: 42px;
  }

  .toolbar-left,
  .toolbar-right,
  .input,
  .select {
    width: 100%;
  }

  .main {
    padding: 16px;
    padding-bottom: 118px;
  }

  .mobile-bar {
    padding: 14px 16px;
  }

  .mobile-bar .secondary {
    min-height: 40px;
    padding-inline: 14px;
  }

  .panel {
    padding: 16px;
  }

  .plus-order-layout {
    gap: 14px;
  }

  .plus-order-layout > aside.panel {
    order: -1;
  }

  .order-toolbar {
    gap: 10px;
  }

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

  .pos-item {
    min-height: 112px;
    padding: 12px;
  }

  .pos-item strong {
    display: block;
    line-height: 1.2;
  }

  .basket-head {
    align-items: center;
  }

  .basket-head > strong {
    font-size: 20px;
  }

  .cart-list {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .cart-line {
    gap: 8px;
  }

  .line-note-input {
    min-height: 36px;
  }

  .floor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 12px;
  }

  .floor-zone {
    padding: 14px 10px;
  }

  .floor-table {
    min-height: 172px;
  }

  .order-filter-bar {
    padding: 10px;
    gap: 10px;
  }

  .table-wrap {
    margin-inline: -4px;
  }

  .bottom-nav {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .bottom-nav button {
    min-height: 72px;
    padding: 8px 4px;
  }

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

  .customer-page {
    padding-bottom: 92px;
  }

  .customer-order-grid {
    grid-template-columns: 1fr;
  }

  .customer-menu-panel {
    overflow: visible;
  }

  .customer-order-toolbar {
    top: 0;
    width: calc(100vw - 36px);
    margin: -12px 0 12px calc(50% - 50vw + 18px);
    padding: 12px;
    border-bottom: 1px solid rgba(213, 220, 210, 0.8);
    border-radius: 0;
    background: rgba(244, 246, 241, 0.97);
  }

  .customer-basket {
    position: static;
    scroll-margin-top: 82px;
  }

  .customer-order-grid .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

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

  .public-menu-grid .item-body {
    padding: 10px;
  }

  .public-menu-grid .item-image {
    aspect-ratio: 1 / 0.85;
  }

  .public-menu-grid .item-meta {
    align-items: flex-start;
    gap: 6px;
  }

  .public-menu-grid .item-meta h3,
  .public-menu-grid .price {
    font-size: 14px;
  }

  .public-menu-grid .item-body p {
    font-size: 12px;
    line-height: 1.35;
  }

  .customer-order-grid .item-body {
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    padding: 10px;
  }

  .customer-order-grid .item-image {
    aspect-ratio: 1 / 0.85;
  }

  .customer-order-grid .item-meta {
    align-items: flex-start;
    gap: 6px;
  }

  .customer-order-grid .item-meta h3,
  .customer-order-grid .price {
    font-size: 14px;
  }

  .customer-order-grid .item-body p {
    font-size: 12px;
    line-height: 1.35;
  }

  .customer-order-grid .card-description {
    min-height: 50px;
    overflow: hidden;
  }

  .customer-menu-panel {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .customer-order-grid .item-card {
    border-radius: 14px;
    border: 1.5px solid rgba(212, 195, 163, 0.5);
    background: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .customer-order-grid .item-card .primary {
    min-height: 38px;
    padding: 6px 12px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 13px;
    background: #121316;
    color: #f6f3ee;
    border: none;
    transition: all 0.15s ease;
  }

  .customer-order-grid .item-card .primary:hover {
    background: #00f0c0;
    color: #041417;
  }

  .customer-history-row {
    grid-template-columns: 1fr;
  }

  .customer-history {
    scroll-margin-top: 82px;
  }

  .customer-page-panel {
    padding: 14px;
  }

  .customer-basket {
    gap: 10px;
  }

  .customer-basket .basket-head h2 {
    margin-bottom: 2px;
  }

  .customer-basket .cart-line {
    border-radius: 8px;
  }

  .customer-page {
    padding-bottom: 120px !important;
  }

  .customer-order-wrap {
    padding-bottom: 110px !important;
  }

  .customer-floating-nav {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 16px;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 10px;
    border: 1.5px solid rgba(200, 184, 158, 0.35);
    border-radius: 999px;
    background: rgba(18, 19, 22, 0.96);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 240, 192, 0.18);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    max-width: 440px;
    width: calc(100% - 24px);
  }

  .customer-floating-nav button {
    flex: 1;
    min-height: 44px;
    border-radius: 999px;
    background: transparent;
    color: #f6f3ee;
    font-size: 13px;
    font-weight: 750;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .customer-floating-nav button.active {
    background: #00f0c0;
    color: #041417;
    font-weight: 800;
    box-shadow: 0 2px 12px rgba(0, 240, 192, 0.4);
  }

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

@media (max-width: 420px) {
  .receipt {
    width: min(232px, 100%);
    padding: 10px;
    font-size: 11px;
  }

  .barcode {
    height: 44px;
  }

  .barcode .bar,
  .barcode .space {
    transform: scaleX(0.75);
    transform-origin: left;
  }
}

@media print {
  body {
    background: #fff;
  }

  body * {
    visibility: hidden;
  }

  .receipt,
  .receipt * {
    visibility: visible;
  }

  .receipt {
    position: absolute;
    inset: 0 auto auto 0;
    width: 80mm;
    max-width: 80mm;
    border: 0;
    box-shadow: none;
    padding: 3mm;
  }

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