:root {
  color: #17130f;
  background: #f4f1ec;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { background: #f4f1ec; }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.is-hidden { display: none !important; }

.login-screen {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #17130f;
}

.login-card {
  width: 100%;
  max-width: 410px;
  padding: 34px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .3);
}

.login-mark {
  display: flex;
  width: 64px;
  height: 64px;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  border-radius: 19px;
  background: #eb674d;
  color: #fff;
  font-size: 2rem;
  font-weight: 900;
}

.eyebrow { margin: 0 0 6px; color: #eb674d; font-size: .78rem; font-weight: 900; letter-spacing: .14em; }
.login-card h1 { margin: 0 0 10px; font-size: 2rem; line-height: 1.05; }
.login-help { margin: 0 0 24px; color: #716861; }
.login-card label { display: block; margin-bottom: 7px; color: #4e4640; font-size: .82rem; font-weight: 800; }
.login-card input {
  width: 100%;
  min-height: 58px;
  padding: 0 16px;
  border: 2px solid #ddd6cf;
  border-radius: 13px;
  outline: 0;
  background: #faf8f5;
  font-size: 1.4rem;
  letter-spacing: .2em;
}
.login-card input:focus { border-color: #eb674d; }
.error { min-height: 22px; margin: 8px 0; color: #b42118; font-size: .82rem; font-weight: 700; }
.login-button {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 13px;
  background: #eb674d;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 900;
}

.terminal { min-height: 100vh; padding-bottom: 150px; }
.topbar {
  position: -webkit-sticky;
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 58px;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid #d8d1ca;
  background: #fff;
}
.topbar > * + * { margin-left: 9px; }
.market-name {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  color: #2b2521;
}
.market-name strong { overflow: hidden; margin-left: 8px; font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }
.pin-dot { width: 11px; height: 11px; flex: none; border-radius: 50%; background: #eb674d; }
.top-button, .icon-button {
  min-height: 40px;
  border: 1px solid #d8d1ca;
  border-radius: 11px;
  background: #f5f2ee;
  color: #332d28;
  font-weight: 800;
}
.top-button { padding: 0 11px; font-size: .76rem; }
.test-badge {
  padding: 6px 8px;
  border-radius: 8px;
  background: #fff0c7;
  color: #8a5a00;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .08em;
}
.top-button b {
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  border-radius: 10px;
  background: #eb674d;
  color: #fff;
  font-size: .7rem;
}
.icon-button { width: 40px; padding: 0; font-size: 1.2rem; }
.sync { display: flex; align-items: center; color: #8a6500; font-size: .72rem; font-weight: 900; white-space: nowrap; }
.sync i { width: 9px; height: 9px; margin-right: 6px; border-radius: 50%; background: currentColor; }
.sync-ready { color: #08783d; }
.sync-offline { color: #c2441d; }
.sync-wait { color: #8a6500; }

.optional-panel {
  position: -webkit-sticky;
  position: sticky;
  z-index: 18;
  top: 58px;
  display: flex;
  padding: 10px 12px;
  border-bottom: 1px solid #d8d1ca;
  background: #fff;
}
.optional-panel > div { display: flex; flex: 1; flex-wrap: wrap; }
.optional-panel > div button { margin: 3px; }
.optional-choice, .close-button {
  min-height: 42px;
  border: 1px solid #d8d1ca;
  border-radius: 10px;
  background: #f5f2ee;
  color: #332d28;
  font-size: .78rem;
  font-weight: 800;
}
.optional-choice { padding: 7px 11px; }
.optional-choice.is-selected { border-color: #17130f; background: #17130f; color: #fff; }
.close-button { width: 42px; flex: none; padding: 0; font-size: 1.5rem; }

.product-list { padding: 12px; }
.product-row {
  display: flex;
  min-height: 76px;
  margin-bottom: 11px;
}
.product-main {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding: 10px 16px;
  border: 0;
  border-radius: 14px 0 0 14px;
  background: #888;
  color: #fff;
  text-align: left;
}
.product-name { font-size: 1.03rem; font-weight: 900; line-height: 1.15; }
.product-price { margin-top: 4px; color: rgba(255,255,255,.85); font-size: .78rem; font-weight: 800; }
.stepper {
  display: flex;
  width: 146px;
  flex: none;
  align-items: stretch;
  border: 2px solid #d8d1ca;
  border-left: 0;
  border-radius: 0 14px 14px 0;
  background: #fff;
}
.stepper button {
  width: 48px;
  border: 0;
  background: #f3efea;
  color: #29231f;
  font-size: 1.5rem;
  font-weight: 700;
}
.stepper button:last-child { border-radius: 0 11px 11px 0; background: #29231f; color: #fff; }
.stepper span { display: flex; width: 48px; align-items: center; justify-content: center; color: #29231f; font-size: 1.45rem; font-weight: 900; }
.product-row.is-active .product-main { box-shadow: inset 6px 0 0 rgba(255,255,255,.9); }

.checkout {
  position: fixed;
  z-index: 25;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 10px 12px;
  padding-bottom: calc(10px + constant(safe-area-inset-bottom));
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid #d8d1ca;
  background: #fff;
  box-shadow: 0 -8px 30px rgba(37, 29, 23, .12);
}
.checkout-controls, .checkout-action { display: flex; align-items: center; }
.checkout-controls { margin-bottom: 9px; }
.payment-switch { display: flex; flex: none; }
.payment-switch button, .country-button {
  min-height: 42px;
  border: 1px solid #d8d1ca;
  background: #f5f2ee;
  color: #625951;
  font-size: .76rem;
  font-weight: 900;
}
.payment-switch button { padding: 0 11px; }
.payment-switch button:first-child { border-radius: 10px 0 0 10px; }
.payment-switch button:last-child { border-left: 0; border-radius: 0 10px 10px 0; }
.payment-switch button.is-selected { border-color: #eb674d; background: #eb674d; color: #fff; }
.country-button {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  margin-left: 9px;
  padding: 0 11px;
  border-radius: 10px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.country-button strong { color: #29231f; }
.checkout-action { justify-content: space-between; }
.total { display: flex; min-width: 0; flex-direction: column; }
.total span { color: #716861; font-size: .72rem; font-weight: 800; }
.total strong { color: #17130f; font-size: 1.75rem; line-height: 1.05; white-space: nowrap; }
.save-button {
  min-width: 150px;
  min-height: 54px;
  border: 2px solid #111;
  border-radius: 12px;
  background: #111;
  color: #fff;
  font-size: 1.02rem;
  font-weight: 900;
  box-shadow: none;
}
.save-button:active { background: #fff; color: #111; }
.save-button:disabled {
  border-color: #c9c4be;
  background: #fff;
  color: #8b847d;
}
.terminal.is-test .save-button {
  border-color: #111;
  background: #111;
  color: #fff;
}

.modal {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: flex-end;
  padding: 12px;
  background: rgba(23, 19, 15, .56);
}
.modal-card {
  width: 100%;
  max-height: 78vh;
  overflow: auto;
  padding: 15px;
  border-radius: 18px 18px 10px 10px;
  background: #fff;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; }
.modal-head h2 { margin: 0; font-size: 1.15rem; }
.country-search {
  width: 100%;
  min-height: 48px;
  margin: 12px 0;
  padding: 0 13px;
  border: 2px solid #d8d1ca;
  border-radius: 11px;
  outline: 0;
}
.country-search:focus { border-color: #eb674d; }
.country-group { margin: 14px 0 7px; color: #8a8179; font-size: .68rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.country-list button {
  min-height: 42px;
  margin: 3px;
  padding: 7px 11px;
  border: 1px solid #d8d1ca;
  border-radius: 9px;
  background: #f5f2ee;
  color: #29231f;
  font-size: .8rem;
  font-weight: 800;
}
.country-list button.is-selected { border-color: #eb674d; background: #eb674d; color: #fff; }

@media (min-width: 720px) {
  .product-list {
    display: flex;
    max-width: 980px;
    flex-wrap: wrap;
    margin: 0 auto;
  }
  .product-row { width: calc(50% - 12px); margin: 6px; }
  .checkout { display: flex; min-height: 92px; align-items: center; }
  .checkout-controls { flex: 1; margin: 0 16px 0 0; }
  .checkout-action { min-width: 330px; }
}

@media (max-width: 420px) {
  :root { font-size: 16px; }
  .topbar > * + * { margin-left: 6px; }
  .sync span { display: none; }
  .product-list { padding: 8px; }
  .product-row { min-height: 70px; margin-bottom: 8px; }
  .stepper { width: 132px; }
  .stepper button, .stepper span { width: 44px; }
}
