* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  direction: rtl;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f4f5f7;
  color: #202124;
  font-family: Arial, Tahoma, sans-serif;
}

button,
input {
  font: inherit;
}

button {
  touch-action: manipulation;
}

.app {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 16px;
}

.card {
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .07);
}

.login-card {
  max-width: 430px;
  margin: 10vh auto 0;
  text-align: center;
}

.lock {
  font-size: 44px;
  margin-bottom: 8px;
}

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

h1 {
  font-size: 25px;
  margin-bottom: 8px;
}

h2 {
  font-size: 24px;
  margin-bottom: 6px;
}

h3 {
  margin-bottom: 3px;
  font-size: 19px;
}

.muted {
  color: #73777d;
  line-height: 1.5;
}

.eyebrow {
  color: #777;
  font-size: 13px;
  margin-bottom: 3px;
}

label {
  display: block;
  font-weight: 700;
  margin: 18px 0 8px;
}

input {
  width: 100%;
  min-height: 52px;
  border: 1px solid #d8dce1;
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  background: #fff;
  font-size: 17px;
}

input:focus {
  border-color: #222;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .07);
}

.btn {
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
}

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

.primary {
  background: #111;
  color: #fff;
}

.secondary {
  background: #eef0f2;
  color: #202124;
}

.login-card .btn {
  width: 100%;
  margin-top: 16px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 8px;
  z-index: 5;
}

.topbar-actions {
  display: flex;
  gap: 7px;
}

.small {
  min-height: 42px;
  padding: 9px 14px;
}


/* =========================
   MENU
========================= */

.menu-card {
  text-align: center;
}

.menu-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 25px;
}

.menu-option {
  border: 2px solid #e3e5e8;
  background: #fff;
  border-radius: 17px;
  padding: 22px 16px;
  cursor: pointer;
  text-align: right;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: .15s ease;
}

.menu-option:hover {
  border-color: #111;
  transform: translateY(-2px);
}

.menu-option:active {
  transform: scale(.98);
}

.menu-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #f1f2f4;
  display: grid;
  place-items: center;
  font-size: 25px;
  flex: 0 0 52px;
}

.menu-option strong {
  display: block;
  font-size: 18px;
  margin-bottom: 5px;
}

.menu-option span {
  display: block;
  color: #777;
  font-size: 13px;
  line-height: 1.4;
}


/* =========================
   ITEMS
========================= */

.section-title {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 28px;
  margin-bottom: 12px;
}

.section-title > span {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #f1f2f4;
  font-size: 23px;
}

.section-title small {
  color: #777;
}

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

.item {
  border: 2px solid #e3e5e8;
  border-radius: 15px;
  padding: 12px;
  background: #fff;
  transition: .15s ease;
}

.item.active {
  border-color: #111;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .08);
}

.item-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 9px;
}

.shape {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex: 0 0 18px;
  border: 2px solid rgba(0, 0, 0, .12);
}

.item-name {
  font-weight: 800;
}

.item-pack {
  color: #777;
  font-size: 12px;
  margin-right: auto;
  white-space: nowrap;
}

.qty {
  width: 100%;
  min-height: 48px;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  direction: ltr;
}

.breakdown {
  min-height: 25px;
  padding-top: 7px;
  font-size: 14px;
  color: #333;
  text-align: center;
}

.breakdown strong {
  font-size: 15px;
}


/* =========================
   ACTIONS
========================= */

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

.message {
  min-height: 22px;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 700;
}

.message.error {
  color: #b42318;
}

.message.success {
  color: #137333;
}

.hint {
  margin-top: 16px;
  background: #f7f7f8;
  border-radius: 12px;
  padding: 12px;
  color: #666;
  font-size: 13px;
  line-height: 1.6;
}

.hint span {
  color: #111;
  font-weight: 700;
}


/* =========================
   RESULT
========================= */

.result-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 11px 0;
  border-bottom: 1px solid #eee;
}

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

.result-name {
  font-weight: 700;
}

.result-value {
  direction: rtl;
  text-align: left;
  font-weight: 700;
}


/* =========================
   REVIEW
========================= */

.review-list {
  margin-top: 18px;
}

.empty-review {
  text-align: center;
  padding: 30px 15px;
  color: #777;
  background: #f7f7f8;
  border-radius: 14px;
}


/* CUSTOMER */

.customer-group {
  border: 2px solid #e3e5e8;
  border-radius: 15px;
  margin-bottom: 10px;
  overflow: hidden;
  background: #fff;
}

.customer-header {
  width: 100%;
  min-height: 62px;
  border: 0;
  background: #fff;
  padding: 10px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  text-align: right;
}

.customer-header:hover {
  background: #f8f8f9;
}

.customer-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.customer-title strong {
  font-size: 17px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-title span {
  background: #eef0f2;
  color: #666;
  border-radius: 20px;
  padding: 4px 9px;
  font-size: 12px;
  white-space: nowrap;
}

.customer-toggle {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #eef0f2;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 700;
  flex: 0 0 30px;
}


/* ORDERS */

.customer-orders {
  border-top: 1px solid #e8e8e8;
  padding: 10px;
  background: #f7f7f8;
}

.review-order {
  background: #fff;
  border: 1px solid #e1e3e6;
  border-radius: 13px;
  padding: 13px;
  margin-bottom: 9px;
}

.review-order:last-child {
  margin-bottom: 0;
}

.order-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.order-header > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.order-header strong {
  font-size: 14px;
}

.order-header span {
  color: #777;
  font-size: 12px;
}

.order-user {
  white-space: nowrap;
}

.review-items {
  padding-top: 7px;
}

.review-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
}

.review-item:last-child {
  border-bottom: 0;
  padding-bottom: 2px;
}

.review-item strong {
  text-align: left;
  font-size: 13px;
}


/* =========================
   HIDDEN
========================= */

.hidden {
  display: none !important;
}


/* =========================
   MOBILE
========================= */

@media (max-width: 600px) {

  .app {
    padding: 10px;
  }

  .card {
    padding: 16px;
    border-radius: 15px;
  }

  .menu-options {
    grid-template-columns: 1fr;
  }

  .items-grid {
    grid-template-columns: 1fr;
  }

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

  .topbar {
    top: 5px;
  }

  .topbar-actions {
    gap: 5px;
  }

  .topbar-actions .small {
    padding-left: 10px;
    padding-right: 10px;
  }

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

  .order-user {
    white-space: normal;
  }

  .review-item {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .review-item strong {
    text-align: right;
  }

}