:root {
  --green: #5bb04f;
  --teal: #2a9c8c;
  --blue: #1290c2;
  --ink: #0f2a33;
  --ink-2: #3d5660;
  --ink-3: #6f8790;
  --paper: #ffffff;
  --wash: #f2f6f4;
  --line: #dfe8e5;
  --danger: #b4372f;
  --danger-wash: #fbefed;
  --radius: 14px;
  --brand-grad: linear-gradient(90deg, var(--green), var(--teal) 55%, var(--blue));
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(91, 176, 79, 0.14), transparent 60%),
    radial-gradient(800px 380px at 100% 0%, rgba(18, 144, 194, 0.12), transparent 60%),
    var(--wash);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.55;
}

.sandbox {
  background: repeating-linear-gradient(-45deg, #fff4d6, #fff4d6 10px, #ffeab0 10px, #ffeab0 20px);
  color: #6a4b00;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 16px;
  letter-spacing: 0.02em;
}

.shell { max-width: 520px; margin: 0 auto; padding: 28px 16px 64px; }

.masthead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.masthead img { height: 34px; width: auto; display: block; }
.masthead .with { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.masthead .with b { color: var(--ink-2); font-weight: 600; letter-spacing: 0.01em; }

.card {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(15, 42, 51, 0.04), 0 18px 40px -24px rgba(15, 42, 51, 0.35);
  position: relative;
  overflow: hidden;
}
.card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--brand-grad); }

.receipt { padding: 26px 22px 6px; }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-3); font-weight: 600; margin: 0 0 4px; }
h1 { font-size: 22px; line-height: 1.25; margin: 0 0 18px; font-weight: 600; letter-spacing: -0.01em; }

.lines { list-style: none; padding: 0; margin: 0; }
.line { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.line:first-child { border-top: 0; }
.thumb { width: 44px; height: 44px; border-radius: 10px; background: var(--wash) center/cover no-repeat; }
.line .name { font-size: 14px; font-weight: 500; line-height: 1.35; }
.line .qty { font-size: 12px; color: var(--ink-3); }
.line .amt, .sum .amt { font-variant-numeric: tabular-nums; font-weight: 500; white-space: nowrap; }

/* perforation between the order and the payment step */
.perf { position: relative; height: 22px; margin: 6px 0 0; }
.perf::before { content: ''; position: absolute; left: 18px; right: 18px; top: 50%; border-top: 2px dashed var(--line); }
.perf::after, .perf span { content: ''; position: absolute; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--wash); }
.perf::after { right: -11px; }
.perf span { left: -11px; }

.sum { padding: 4px 22px 18px; }
.sum .row { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-2); padding: 3px 0; }
.sum .total { font-size: 17px; color: var(--ink); font-weight: 600; padding-top: 8px; }
.sum .deposit { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--wash); font-size: 13px; color: var(--ink-2); display: flex; justify-content: space-between; gap: 12px; }

.step { padding: 20px 22px 24px; border-top: 1px solid var(--line); }
.step h2 { font-size: 16px; font-weight: 600; margin: 0 0 4px; }
.step p { margin: 0 0 14px; color: var(--ink-2); font-size: 14px; }

label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--ink-2); }
.phone { display: flex; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; transition: border-color 0.15s ease, box-shadow 0.15s ease; background: #fff; }
.phone:focus-within { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(42, 156, 140, 0.15); }
.phone .cc { padding: 0 12px; display: flex; align-items: center; font-size: 14px; color: var(--ink-3); background: var(--wash); border-right: 1.5px solid var(--line); font-variant-numeric: tabular-nums; }
.phone input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 16px; padding: 13px 12px; min-width: 0; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }

.btn {
  appearance: none; border: 0; cursor: pointer; width: 100%; margin-top: 14px;
  font: inherit; font-weight: 600; font-size: 15px; color: #fff;
  padding: 14px 18px; border-radius: 12px;
  background: var(--ink);
  position: relative; overflow: hidden;
  transition: transform 0.12s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 20px -12px rgba(15, 42, 51, 0.7);
}
.btn::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--brand-grad); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost::after { display: none; }

.fine { font-size: 12px; color: var(--ink-3); margin: 16px 0 0; }
.fine a { color: inherit; }

.notice { border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-top: 14px; }
.notice.error { background: var(--danger-wash); color: var(--danger); }
.notice.info { background: var(--wash); color: var(--ink-2); }

.state { padding: 34px 22px 30px; text-align: center; }
.state .mark { width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; background: var(--brand-grad); color: #fff; }
.state.bad .mark { background: var(--danger-wash); color: var(--danger); }
.state h1 { margin-bottom: 8px; }
.state p { color: var(--ink-2); margin: 0 auto; max-width: 36ch; }

.skeleton { padding: 26px 22px; }
.skeleton i { display: block; height: 12px; border-radius: 6px; margin: 12px 0; background: linear-gradient(90deg, var(--wash), #e7eeeb, var(--wash)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.skeleton i:nth-child(1) { width: 30%; } .skeleton i:nth-child(2) { width: 70%; height: 18px; } .skeleton i:nth-child(3) { width: 90%; } .skeleton i:nth-child(4) { width: 60%; }

.enter { animation: rise 0.28s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

/* Veend overlay */
.veend-overlay { position: fixed; inset: 0; z-index: 50; background: rgba(15, 42, 51, 0.55); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 12px; animation: fade 0.2s ease both; }
.veend-frame { width: min(480px, 100%); height: min(760px, 100%); background: #fff; border-radius: 16px; overflow: hidden; position: relative; box-shadow: 0 30px 60px -20px rgba(0,0,0,0.5); }
.veend-frame iframe { border: 0; width: 100%; height: 100%; display: block; }
.veend-close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(15,42,51,0.08); color: var(--ink); font-size: 18px; cursor: pointer; }
.veend-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); font-size: 14px; }

@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 420px) {
  .shell { padding-top: 18px; }
  h1 { font-size: 20px; }
  .veend-overlay { padding: 0; }
  .veend-frame { width: 100%; height: 100%; border-radius: 0; }
}
