/* ====== RESET ====== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --G:   #32E94D;
  --Gd:  #23D842;
  --Gbg: #BDF9C8;
  --PBG: #F2F2F7;
  --W:   #FFFFFF;
  --T:   #1C1C1E;
  --Ts:  #8E8E93;
  --DIV: #E5E5EA;
  --ARR: #C7C7CC;
  --F:   -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html, body {
  height: 100%;
  font-family: var(--F);
  background: #C8C8CC;
  color: var(--T);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

/* ====== PAGE SYSTEM ====== */
.page {
  display: none;
  flex-direction: column;
  height: 100dvh;
  max-width: 430px;
  margin: 0 auto;
  background: var(--PBG);
  overflow: hidden;
  box-shadow: 0 0 50px rgba(0,0,0,.3);
}
.page.active {
  display: flex;
  animation: fadeUp .2s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ====== HEADER ====== */
.hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--W);
  border-bottom: .5px solid var(--DIV);
  padding: 0 6px;
  height: 52px;
  flex-shrink: 0;
}
.hdr-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.3px;
}
.hdr-btn {
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.hdr-btn:active { background: rgba(0,0,0,.06); }

/* ====== SCROLL AREA ====== */
.scroll {
  flex: 1;
  overflow-y: auto;
  padding: 14px 0 12px;
  -webkit-overflow-scrolling: touch;
}

/* ====== BUSINESS BANNER ====== */
.biz-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--Gbg);
  border-radius: 16px;
  margin: 0 16px 12px;
  padding: 13px 14px;
  border: none;
  width: calc(100% - 32px);
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.biz-banner:active { opacity: .75; }
.biz-banner > svg path { stroke: var(--G); }
.biz-icon-bg {
  width: 36px;
  height: 36px;
  background: var(--G);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.biz-text {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--T);
}

/* ====== WORLD DELIVERY BANNER ====== */
.world-banner {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 16px 12px;
  padding: 11px 14px;
  background: var(--W);
  border-radius: 12px;
  border-left: 3px solid var(--G);
}
.world-banner-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.world-banner-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--T);
  line-height: 1.35;
}

/* ====== CARD ====== */
.card {
  background: var(--W);
  border-radius: 16px;
  margin: 0 16px 12px;
  padding: 14px 16px;
}
.card-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.3px;
  margin-bottom: 8px;
}
.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}
.card-sub {
  font-size: 13px;
  color: var(--Ts);
  line-height: 1.4;
  margin-bottom: 4px;
}

/* ====== PLUS BTN ====== */
.plus-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--PBG);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ====== INFO ROWS ====== */
.info-row {
  display: flex;
  align-items: flex-start;
  padding: 11px 0;
}
.info-icon {
  width: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.info-texts {
  flex: 1;
  padding-left: 10px;
}
.info-lbl {
  font-size: 12px;
  color: var(--Ts);
  margin-bottom: 3px;
}
.info-val {
  font-size: 15px;
  font-weight: 500;
  color: var(--T);
  line-height: 1.35;
}
.info-sub {
  font-size: 12px;
  color: var(--Ts);
  margin-top: 3px;
}

/* ====== SEPARATORS ====== */
.sep {
  height: .5px;
  background: var(--DIV);
}
.sep-inset {
  margin-left: 38px;
}

/* ====== FORM FIELDS ====== */
.fld-grp { padding: 11px 0; position: relative; }
.fld-lbl {
  display: block;
  font-size: 12px;
  color: var(--Ts);
  margin-bottom: 5px;
}
.fld-inp {
  width: 100%;
  border: none;
  outline: none;
  font-size: 16px;
  font-weight: 400;
  color: var(--T);
  background: transparent;
  font-family: var(--F);
  -webkit-appearance: none;
  padding: 0;
}
.fld-inp::placeholder { color: var(--ARR); }
.fld-inp:focus { color: var(--T); }
.fld-hint {
  font-size: 11.5px;
  color: var(--Ts);
  margin-top: 6px;
  line-height: 1.4;
}

.ac-wrap { z-index: 2; }
.ac-list {
  position: static;
  margin-top: 10px;
  z-index: 20;
  background: var(--W);
  border: 1px solid var(--DIV);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  overflow: hidden;
  max-height: 176px;
  overflow-y: auto;
}
.ac-item {
  padding: 11px 14px;
  font-size: 15px;
  color: var(--T);
  line-height: 1.25;
  cursor: pointer;
  outline: none;
}
.ac-item + .ac-item { border-top: .5px solid var(--DIV); }
.ac-item:hover,
.ac-item:focus {
  background: var(--Gbg);
  color: var(--G);
}

/* ====== BOTTOM BAR ====== */
.btm-bar {
  background: var(--W);
  border-top: .5px solid var(--DIV);
  padding: 12px 16px 34px;
  flex-shrink: 0;
}

/* ====== GREEN BUTTON ====== */
.btn-green {
  width: 100%;
  background: var(--G);
  color: var(--T);
  border: none;
  border-radius: 14px;
  padding: 16px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--F);
  letter-spacing: -.2px;
  -webkit-tap-highlight-color: transparent;
  transition: background .12s, transform .08s;
}
.btn-green:hover { background: var(--Gd); }
.btn-green:active { background: var(--Gd); transform: scale(.98); }

/* ====== RESULT PAGE ====== */
.sum-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}
.sum-lbl { font-size: 15px; color: var(--Ts); }
.sum-val { font-size: 16px; font-weight: 700; }
.sum-val.green { color: var(--G); }
.sum-val.big { font-size: 22px; color: var(--T); }

/* ====== PAYMENT ====== */
.pay-sum-card {
  background: var(--W);
  border-radius: 16px;
  margin: 0 16px 12px;
  padding: 14px 16px;
}
.pay-sum-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--Ts);
}
.pay-sum-row.bold span { font-size: 16px; font-weight: 700; color: var(--T); }
.pay-duo { display: flex; align-items: stretch; }
.pay-vline {
  width: .5px;
  background: var(--DIV);
  align-self: stretch;
  margin: 10px 0;
}
.card-inp { letter-spacing: 2px; font-size: 17px; }
.ssl-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--Ts);
  padding: 8px 16px 20px;
}

/* ====== SUCCESS ====== */
.ok-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px 60px;
  text-align: center;
  background: var(--PBG);
}
.ok-circle {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  border: none;
  background: var(--G);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  box-shadow: 0 6px 24px rgba(0,166,80,.3);
}
.ok-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.5px;
  margin-bottom: 10px;
}
.ok-text {
  font-size: 16px;
  color: var(--Ts);
  line-height: 1.6;
  margin-bottom: 28px;
}
.track-card {
  background: var(--W);
  border-radius: 16px;
  padding: 16px 28px;
  width: 100%;
  max-width: 320px;
}
.track-lbl { font-size: 12px; color: var(--Ts); margin-bottom: 4px; }
.track-num { font-size: 22px; font-weight: 700; color: var(--G); letter-spacing: 3px; }

/* ====== SHAKE ====== */
@keyframes shake {
  0%,100%{transform:translateX(0)}
  20%{transform:translateX(-5px)}
  40%{transform:translateX(5px)}
  60%{transform:translateX(-3px)}
  80%{transform:translateX(3px)}
}
.shake { animation: shake .3s ease; }

/* ====== INPUT FOCUS HIGHLIGHT ====== */
.fld-inp:focus + .fld-underline,
.fld-grp:focus-within .sep { background: var(--G); }

/* ====== TRANSFER CARD ====== */
.transfer-label {
  font-size: 13px;
  color: var(--Ts);
  font-weight: 500;
  margin-bottom: 10px;
}
.transfer-num {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--T);
  word-break: break-all;
  line-height: 1.4;
  margin-bottom: 6px;
}
.transfer-holder {
  font-size: 14px;
  color: var(--Ts);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.transfer-bank {
  font-size: 13px;
  color: var(--Ts);
  margin-top: 2px;
  margin-bottom: 14px;
  min-height: 4px;
}
.copy-btn {
  width: 100%;
  background: var(--Gbg);
  color: var(--G);
  border: none;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: var(--F);
  -webkit-tap-highlight-color: transparent;
}
.copy-btn:active { opacity: .65; }
.copy-btn:disabled {
  background: var(--PBG);
  color: var(--Ts);
  cursor: not-allowed;
  opacity: .75;
}
.pay-note {
  font-size: 13px;
  color: var(--Ts);
  text-align: center;
  padding: 4px 20px 4px;
  line-height: 1.5;
  margin-bottom: 4px;
}

/* ====== RECEIPT PAGE ====== */
.receipt-info-card {
  background: var(--W);
  border-radius: 16px;
  margin: 0 16px 12px;
  padding: 24px 20px;
  text-align: center;
}
.receipt-icon-wrap {
  width: 56px;
  height: 56px;
  background: var(--Gbg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}
.receipt-info-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.3px;
  margin-bottom: 8px;
}
.receipt-info-desc {
  font-size: 14px;
  color: var(--Ts);
  line-height: 1.5;
}
.upload-zone {
  background: var(--W);
  border-radius: 16px;
  margin: 0 16px 12px;
  padding: 28px 20px;
  text-align: center;
  border: 2px dashed var(--DIV);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .15s, background .15s;
}
.upload-zone:active { background: var(--Gbg); border-color: var(--G); }
.upload-zone-text { font-size: 16px; font-weight: 600; color: var(--G); }
.upload-zone-hint  { font-size: 12px; color: var(--Ts); }

/* ====== CHECKING SCREEN ====== */
.checking-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 24px 40px;
  text-align: center;
}
.checking-anim {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #FFF8E6;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  animation: pulse-amber 2s ease-in-out infinite;
}
@keyframes pulse-amber {
  0%,100% { box-shadow: 0 0 0 0 rgba(245,166,35,0); transform: scale(1); }
  50%      { box-shadow: 0 0 0 14px rgba(245,166,35,0); transform: scale(1.04); }
}
.checking-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.4px;
  margin-bottom: 10px;
}
.checking-desc {
  font-size: 15px;
  color: var(--Ts);
  line-height: 1.65;
}
.upload-status {
  margin-top: 18px;
  max-width: 340px;
  font-size: 13px;
  color: var(--Ts);
  line-height: 1.45;
}

/* ====== TELEGRAM FLOAT ====== */
.tg-float {
  position: fixed;
  right: max(18px, calc((100vw - 430px) / 2 + 18px));
  bottom: 92px;
  z-index: 80;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--G);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 10px 24px rgba(0,166,80,.32);
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  outline: none;
  transition: transform .12s, background .12s, opacity .12s;
}
.tg-float-icon {
  width: 32px;
  height: 32px;
  display: block;
}
.tg-float:hover { background: var(--Gd); transform: translateY(-1px); }
.tg-float:focus-visible { outline: 3px solid rgba(50,233,77,.35); outline-offset: 3px; }
.tg-float:active { transform: scale(.96); }
.tg-float[hidden] { display: none; }
