@font-face {
  font-family: "TeleNeo";
  src: url("/assets/fonts/teleneo-variable.woff2") format("woff2");
  font-weight: 250 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --magenta: #e20074;
  --magenta-dark: #bd0062;
  --ink: #1f1f1f;
  --muted: #6c6c6c;
  --line: #d7d7d7;
  --error: #c9002b;
  --bg: #f3f3f3;
  --radius: 8px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "TeleNeo", Arial, "Helvetica Neue", Helvetica, sans-serif;
  line-height: 1.45;
}

button, input { font: inherit; }

img { display: block; max-width: 100%; }

.app {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background: #fff;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  padding: 0 18px;
  border-bottom: 1px solid #ececec;
}

.brand img { width: 34px; height: 34px; }

.account {
  font-size: 13px;
  font-weight: 700;
  color: var(--magenta);
}

.main {
  flex: 1;
  padding: 30px 20px 40px;
}

.step[hidden] { display: none; }

h1 {
  margin: 0 0 14px;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.lead {
  margin: 0 0 24px;
  color: #3f3f3f;
  font-size: 16px;
}

.status-icon,
.success-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  border-radius: 50%;
  font-size: 30px;
  font-weight: 700;
}

.status-icon {
  color: #fff;
  background: var(--magenta);
}

.success-icon {
  color: #fff;
  background: #168a4a;
}

.invoice {
  margin: 0 0 16px;
  padding: 16px;
  border: 1px solid #e3e3e3;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .06);
}

.invoice-label {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.invoice dl { margin: 0; }

.invoice dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0;
  border-top: 1px solid #efefef;
}

.invoice dt {
  color: var(--muted);
  font-size: 14px;
}

.invoice dd {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  text-align: right;
}

.invoice-total {
  margin-top: 4px;
  padding-top: 11px !important;
  border-top: 1px solid #dedede !important;
}

.invoice-total dt { color: var(--ink); font-weight: 700; }

.invoice-total dd {
  color: var(--magenta);
  font-size: 20px;
}

.warning { color: var(--magenta); }

.warning-line {
  margin: 0 0 24px;
  padding-left: 11px;
  border-left: 3px solid var(--magenta);
  color: #4a4a4a;
  font-size: 14px;
}

.card-context {
  margin: -12px 0 22px;
  color: var(--muted);
  font-size: 14px;
}

.btn {
  display: block;
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border: 0;
  border-radius: 6px;
  background: var(--magenta);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.btn:hover,
.btn:focus-visible { background: var(--magenta-dark); }

.btn:disabled { opacity: .65; cursor: wait; }

.secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.back {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--magenta);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.field { margin-bottom: 17px; }

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 700;
}

.field input {
  width: 100%;
  height: 48px;
  padding: 0 12px;
  border: 1px solid #bdbdbd;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
}

.field input:focus {
  outline: 2px solid #ef8fbe;
  outline-offset: 1px;
  border-color: var(--magenta);
}

.field.has-error input { border-color: var(--error); }

.error {
  display: none;
  margin: 5px 0 0;
  color: var(--error);
  font-size: 13px;
}

.field.has-error .error,
#otp-form.has-error .error { display: block; }

.card-wrap { position: relative; }

.brands {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.brands span {
  display: grid;
  place-items: center;
  min-width: 43px;
  height: 22px;
  padding: 0 5px;
  border: 1px solid #dadada;
  border-radius: 3px;
  color: #1b4b91;
  font-size: 8px;
  font-weight: 700;
}

.row { display: flex; gap: 12px; }

.row .field { flex: 1 1 0; min-width: 0; }

form .btn { margin-top: 15px; }

.otp {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 4px;
}

.otp input {
  width: 100%;
  height: 52px;
  padding: 0;
  border: 1px solid #bdbdbd;
  border-radius: 6px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
}

.otp input:focus {
  outline: 2px solid #ef8fbe;
  border-color: var(--magenta);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 22px;
  border-top: 1px solid #eee;
  color: #777;
  font-size: 11px;
}

@media (min-width: 768px) {
  body { padding: 28px 0; }
  .app {
    min-height: calc(100vh - 56px);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,.16);
    overflow: hidden;
  }
}

/* статус заявки */
.pay-note { margin: 10px 0 0; font-size: 14px; color: #4a4a4a; }
.pay-note.is-ok { color: #1f7a3d; font-weight: 600; }
.pay-note.is-bad { color: #b42318; font-weight: 600; }
.pay-note .btn { margin-top: 10px; width: 100%; }

/* hidden должен перебивать display у flex-контейнеров */
[hidden] { display: none !important; }
