:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #151823;
  --muted: #7b8495;
  --line: #dfe3ea;
  --line-strong: #c9cfdb;
  --primary: #416ff4;
  --primary-dark: #20366d;
  --danger: #d33b3b;
  --success: #1c9c5b;
  --warning-bg: #fff0d2;
  --info-bg: #e7f8ff;
  --shadow: 0 24px 70px rgba(22, 28, 45, 0.1);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.checkout-page {
  background: #ffffff;
}

.payment-template {
  background: #ffffff;
}

.payment-template,
.payment-template * {
  font-weight: 400 !important;
}

.payment-template .app {
  position: relative;
  min-height: 100vh;
  padding: 0 0 70px;
  background: #ffffff;
}

.payment-template .main__bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: #ffffff;
}

.payment-template .cont__box,
.payment-template .app__content {
  width: min(900px, calc(100% - 32px));
  margin-right: auto;
  margin-left: auto;
}

.payment-template .app__header {
  position: absolute;
  top: 30px;
  right: 32px;
  z-index: 2;
  display: flex;
  width: auto;
  min-height: 34px;
  margin: 0;
  align-items: center;
  justify-content: flex-end;
}

.payment-template .header-logo {
  display: none;
  align-items: center;
  color: #24304a;
  font-size: 16px;
  font-weight: 850;
  letter-spacing: 0;
}

.payment-template .app__lang {
  position: relative;
  margin-left: 0;
}

.payment-template .language-menu {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  gap: 5px;
  padding: 0;
  color: #1b2b58;
  background: transparent;
  border: 0;
  font-size: 11px;
  font-weight: 400;
}

.payment-template .language-menu .flag-ru {
  width: 32px;
  height: 20px;
}

.payment-template .language-arrow {
  display: none;
}

.payment-template .app__title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 48px;
  padding: 110px 0 42px;
}

.payment-template .app__title h3 {
  display: grid;
  gap: 10px;
  min-width: 0;
  font-size: 24px;
  font-weight: 600 !important;
  line-height: 1.18;
}

.payment-template .app__title h3 .mb-2 {
  font-weight: 600 !important;
}

.payment-template .text-medium {
  font-weight: 700;
}

.payment-template .text-normal {
  font-weight: 500;
}

.payment-template .text-gray-700 {
  color: #7a8292;
}

.payment-template .text-blue-700 {
  color: #17295c;
}

.payment-template .text-sm {
  font-size: 14px;
}

.payment-template .mb-2 {
  display: block;
}

.payment-template .cup {
  cursor: pointer;
}

.payment-template .copy-inline {
  width: fit-content;
  margin-top: 0;
  color: #7a8292;
  font-size: 14px;
  font-weight: 400;
  gap: 3px;
}

.payment-template .copy-inline strong {
  color: #747d8e;
  font-weight: 400;
  margin-left: 0;
}

.payment-template .app__title .amount {
  flex: 0 0 auto;
  max-width: 100%;
  color: #101115;
  font-size: 48px;
  font-weight: 600 !important;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}

.payment-template .app__content {
  min-height: 420px;
  padding: 32px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 24px 76px rgba(26, 31, 47, 0.1);
}

.payment-template .app__notification.inactive {
  display: none;
}

.payment-template .app__content__title {
  margin-bottom: 32px;
}

.payment-template .app__content__title h3 {
  font-size: 24px;
  font-weight: 400;
  line-height: 1.18;
}

.payment-template .app__content__methods {
  display: grid;
  grid-template-columns: repeat(3, minmax(190px, 1fr));
  gap: 22px;
}

.payment-template .app__content__method {
  display: grid;
  min-height: 118px;
  place-items: center;
  padding: 24px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid #d7dbe2;
  border-radius: 8px;
}

.payment-template .app__content__method:hover,
.payment-template .app__content__method:focus-visible {
  border-color: #416ff4;
  box-shadow: 0 14px 34px rgba(65, 111, 244, 0.14);
  outline: 0;
}

.payment-template .app__content__method .logo-pill {
  min-width: 124px;
  min-height: 42px;
  max-width: 100%;
  color: #ffffff;
  background: var(--brand-color, #333333);
  box-shadow: inset 0 0 0 999px rgba(255, 255, 255, 0);
  font-size: 22px;
  font-weight: 800;
}

.payment-template .method-logo {
  display: block;
  width: auto;
  max-width: 164px;
  max-height: 62px;
  object-fit: contain;
}

.payment-template .app__content__method[data-method="sberpay"] .method-logo {
  width: 104px;
  max-height: 48px;
}

.payment-template .app__content__method[data-method="tpay"] .method-logo {
  width: 108px;
  max-height: 48px;
}

.payment-template .app__content__method[data-method="vtb"] .method-logo {
  width: 111px;
  max-height: 48px;
}

.payment-template .app__content__method[data-method="alfabank"] .method-logo {
  width: 156px;
  max-height: 64px;
}

.details-method-logo {
  display: block;
  width: auto;
  max-width: 168px;
  max-height: 64px;
  object-fit: contain;
}

.payment-template .app__content__method[data-method="sberpay"] .logo-pill {
  background: linear-gradient(120deg, #8ee000, #00b8d9);
}

.payment-template .app__content__method[data-method="tpay"] .logo-pill {
  color: #ffffff;
  background: #303236;
}

.payment-template .app__content__method[data-method="vtb"] .logo-pill {
  background: #7657ff;
}

.payment-template .app__content__method[data-method="alfabank"] .logo-pill {
  min-width: 150px;
  color: #ef3124;
  background: transparent;
  font-size: 21px;
}

.payment-template .app__content__footer {
  margin-top: 42px;
  color: #818999;
  font-size: 14px;
  font-weight: 400;
}

.payment-template .app__content__footer strong,
.payment-template #timeLeft {
  font-weight: 400;
}

.payment-template #returnButton {
  font-weight: 400;
}

.payment-template .details-panel {
  margin-top: 0;
}

.payment-template .checking-panel {
  min-height: 300px;
  padding: 32px;
}

.checkout-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 72px;
}

.checkout-top {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr);
  gap: 32px;
  align-items: start;
  margin-bottom: 40px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: 31px;
  line-height: 1.12;
}

h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1.2;
}

h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.copy-inline {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 0;
  color: #6f7788;
  background: transparent;
  border: 0;
  text-align: left;
}

.copy-inline strong {
  margin-left: 2px;
  font-weight: 700;
}

.copy-glyph {
  position: relative;
  display: block;
  width: 17px;
  height: 19px;
  flex: 0 0 auto;
  background: url("/assets/copy.svg") center / contain no-repeat;
}

.copy-glyph::before,
.copy-glyph::after {
  position: absolute;
  display: none;
  content: "";
  width: 10px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 2px;
}

.copy-glyph::before {
  left: 5px;
  top: 1px;
}

.copy-glyph::after {
  left: 1px;
  top: 5px;
  background: #ffffff;
}

.amount-box {
  display: grid;
  justify-items: end;
  gap: 58px;
}

.language-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #1d2b54;
  font-weight: 700;
}

.flag-ru {
  width: 48px;
  height: 30px;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  background: linear-gradient(#ffffff 0 33%, #1157d8 33% 66%, #d82d33 66%);
}

.language-select::after {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #111827;
  content: "";
}

.amount {
  color: #111318;
  font-size: 62px;
  font-weight: 750;
  line-height: 1;
  text-align: right;
}

.payment-panel,
.details-panel {
  min-height: 420px;
  padding: 32px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel-head {
  margin-bottom: 32px;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(190px, 1fr));
  gap: 22px;
}

.method-card {
  display: grid;
  min-height: 118px;
  place-items: center;
  padding: 24px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.method-card:hover,
.method-card:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 14px 34px rgba(65, 111, 244, 0.14);
  outline: 0;
  transform: translateY(-1px);
}

.logo-pill {
  display: inline-flex;
  min-width: 138px;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 9px 22px;
  color: #ffffff;
  background: var(--brand-color, #333);
  border-radius: 999px;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.method-meta {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 42px;
  color: var(--muted);
  font-weight: 700;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.button-primary {
  color: #ffffff;
  background: var(--primary);
}

.button-primary:hover {
  background: #315fdc;
}

.button-ghost {
  color: var(--primary-dark);
  background: #ffffff;
  border-color: var(--line-strong);
}

.button-ghost:hover {
  border-color: var(--primary);
}

.button-danger {
  color: #ffffff;
  background: var(--danger);
}

.details-panel {
  padding: 28px;
}

.payment-template #detailsView {
  width: min(1024px, calc(100% - 32px));
}

.payment-template.is-details-open .app__title {
  width: min(1024px, calc(100% - 32px));
}

.checking-content {
  display: grid;
  justify-items: start;
}

.checking-content h2 {
  margin: 0 0 26px;
  color: #111318;
  font-size: 24px;
  font-weight: 600 !important;
  line-height: 1.2;
}

.checking-muted {
  margin: 0 0 42px;
  color: #7a8292;
  font-size: 16px;
  line-height: 1.35;
}

.checking-amount {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 70px;
  color: #9a9a9a;
  font-size: 24px;
  line-height: 1.2;
}

.checking-amount strong {
  color: #747b8d;
  font-size: 26px;
  font-weight: 600 !important;
}

.checking-return {
  min-width: 220px;
  color: #17295c;
  background: #f3f5fb;
  border-color: #f3f5fb;
}

.payment-template.is-success-open,
.payment-template.is-success-open .app,
.payment-template.is-success-open .main__bg {
  background: #ffffff;
}

.payment-template.is-success-open .app__title {
  display: none;
}

.payment-template.is-success-open .app__header {
  position: fixed;
  top: 30px;
  right: 32px;
}

.payment-template.is-success-open #checkingView {
  width: min(360px, calc(100% - 32px));
  min-height: auto;
  margin-top: 150px;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.success-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  justify-items: center;
  min-height: 300px;
  padding: 28px 20px 20px;
  background: #ffffff;
  border: 1px solid rgba(223, 227, 234, 0.9);
  border-radius: 10px;
  box-shadow: 0 24px 76px rgba(26, 31, 47, 0.1);
}

.success-check {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin-bottom: 12px;
  color: #ffffff;
  background: #27b99a;
  border-radius: 10px;
  font-size: 22px;
  line-height: 1;
}

.success-card h2 {
  margin: 0;
  color: #111318;
  font-size: 18px;
  font-weight: 600 !important;
  line-height: 1.2;
}

.success-return {
  align-self: end;
  width: 100%;
  min-height: 44px;
  color: #111318;
  background: #ffffff;
  border-color: #111318;
}

.success-return:hover {
  border-color: #111318;
}

.sberpay-details {
  display: grid;
  gap: 18px;
}

.sberpay-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, clamp(220px, 24vw, 300px));
  gap: clamp(22px, 3vw, 40px);
  align-items: center;
  min-height: 320px;
  padding: 36px;
  border: 1px solid #d7dbe2;
  border-radius: 6px;
}

.sberpay-hero-copy {
  position: relative;
  display: grid;
  gap: 22px;
}

.sberpay-hero .details-method-logo {
  width: 104px;
  max-width: 104px;
  max-height: 48px;
}

.sberpay-hero-title {
  max-width: 570px;
  color: #747b8d;
  font-size: 36px;
  font-weight: 400;
  line-height: 1.34;
}

.sberpay-arrow {
  display: block;
  width: 210px;
  height: 36px;
  margin-top: -8px;
  margin-left: min(55%, 390px);
}

.sberpay-arc {
  display: none;
}

.sberpay-qr {
  width: clamp(220px, 24vw, 300px);
  height: clamp(220px, 24vw, 300px);
  padding: 0;
  justify-self: end;
}

.sberpay-qr img {
  width: 100%;
  height: 100%;
}

.sberpay-info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.sberpay-info-box,
.sberpay-warning-box {
  min-height: 180px;
  padding: 18px 20px;
  border-radius: 6px;
  font-size: 15px;
  line-height: 1.45;
}

.sberpay-info-box {
  background: #e4f8ff;
}

.sberpay-warning-box {
  background: #ffe8bd;
  border: 2px solid #17285c;
}

.sberpay-warning-box .circle-icon {
  background: #e5a12d;
}

.sberpay-info-box .box-title,
.sberpay-warning-box .box-title {
  margin-bottom: 10px;
}

.sberpay-info-box .requisite-line {
  display: grid;
  grid-template-columns: max-content minmax(0, max-content) 20px;
  gap: 2px;
  align-items: center;
  width: fit-content;
  margin: 4px 0;
}

.sberpay-info-box .requisite-line-no-copy {
  grid-template-columns: max-content minmax(0, max-content);
}

.sberpay-info-box .requisite-line strong,
.sberpay-info-box .requisite-line span {
  font-weight: 400;
  line-height: 1.25;
}

.sberpay-info-box .copy-mini {
  display: grid;
  width: 20px;
  height: 22px;
  place-items: center;
  margin: 0;
  padding: 0;
}

.payment-template .copy-inline .copy-glyph,
.sberpay-info-box .copy-glyph {
  width: 20px;
  height: 22px;
}

.payment-template .copy-inline .copy-glyph::before,
.payment-template .copy-inline .copy-glyph::after,
.sberpay-info-box .copy-glyph::before,
.sberpay-info-box .copy-glyph::after {
  display: none;
}

.payment-template .copy-inline .copy-glyph::before,
.sberpay-info-box .copy-glyph::before {
  left: 4px;
  top: 0;
}

.payment-template .copy-inline .copy-glyph::after,
.sberpay-info-box .copy-glyph::after {
  left: 0;
  top: 4px;
  background: transparent;
}

.sberpay-warning-box p {
  margin: 0 0 20px;
}

.sberpay-warning-box p:last-child {
  margin-bottom: 0;
}

.sberpay-instructions {
  display: grid;
  gap: 16px;
}

.sberpay-instruction-toggle {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 40px;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 9px 20px;
  color: #ffffff;
  background: #4f76f2;
  border: 0;
  border-radius: 999px;
  font-size: 14px;
  white-space: nowrap;
}

.sberpay-instruction-toggle.is-open {
  background: #6577a3;
}

.sberpay-chevron {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 180ms ease;
}

.sberpay-instruction-toggle.is-open .sberpay-chevron {
  transform: rotate(225deg);
}

.sberpay-instruction-body {
  color: #1d2230;
}

.sberpay-instruction-content {
  display: grid;
  gap: 12px;
  padding: 6px 0 10px;
}

.sberpay-instruction-content h3 {
  color: #111318;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.25;
}

.sberpay-muted {
  margin: 0;
  color: #7a8292;
}

.sberpay-phone {
  margin: 14px 0 -4px;
  color: #111318;
  font-size: 19px;
  font-weight: 500;
}

.sberpay-instruction-content hr {
  width: 100%;
  margin: 4px 0;
  border: 0;
  border-top: 1px solid #d7dbe2;
}

.sberpay-instruction-content ul {
  margin: 2px 0 0 30px;
  padding: 0;
  color: #333a48;
  line-height: 1.6;
}

.sberpay-instruction-content .sberpay-instruction-end {
  margin: 16px 0 0;
}

.sberpay-actions {
  position: relative;
  display: grid;
  grid-template-columns: minmax(430px, 1fr) 220px;
  grid-template-areas: "proof return";
  gap: 18px;
  align-items: center;
  margin-top: 34px;
  min-height: 44px;
}

.sberpay-proof-flow {
  grid-area: proof;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 16px;
}

.sberpay-paid {
  width: 220px;
  flex: 0 0 auto;
  color: #ffffff;
  background: #15265d;
  border-color: #15265d;
}

.sberpay-receipt {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 16px;
}

.sberpay-receipt-button {
  width: 220px;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 10px 18px;
  color: #17295c;
  background: #ffffff;
  border-color: #c9cfdb;
}

.sberpay-receipt-note {
  max-width: 230px;
  color: #818999;
  font-size: 13px;
  line-height: 1.25;
}

.sberpay-time {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #818999;
  font-size: 13px;
  font-weight: 400;
  text-align: center;
  white-space: nowrap;
}

.is-receipt-step .sberpay-time {
  left: 61%;
}

.sberpay-actions #returnFromDetails {
  grid-area: return;
  justify-self: end;
  width: 220px;
}

.sberpay-time strong {
  font-weight: 400;
}

.details-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 40px;
  align-items: center;
  min-height: 300px;
  padding: 36px 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.details-copy {
  display: grid;
  gap: 24px;
}

.details-title {
  color: #747b8d;
  font-size: 42px;
  font-weight: 600;
  line-height: 1.35;
}

.qr-frame {
  display: grid;
  place-items: center;
  width: 240px;
  height: 240px;
  margin-left: auto;
  padding: 12px;
  background: #ffffff;
}

.qr-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-frame.sberpay-qr {
  width: clamp(220px, 24vw, 300px);
  height: clamp(220px, 24vw, 300px);
  padding: 0;
}

.qr-frame.sberpay-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-frame.sberpay-qr .qr-grid {
  width: 100%;
  height: 100%;
}

.qr-grid {
  display: grid;
  width: 216px;
  height: 216px;
  grid-template-columns: repeat(29, 1fr);
  grid-template-rows: repeat(29, 1fr);
  background: #ffffff;
}

.qr-cell {
  width: 100%;
  height: 100%;
  background: transparent;
}

.qr-cell.is-on {
  background: #111111;
}

.qr-open-link {
  display: block;
  width: 100%;
  height: 100%;
}

.qr-open-link img {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  object-fit: contain;
}

.open-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(65, 111, 244, 0.12), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f5f7fb 100%);
}

.open-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px 16px;
}

.open-card {
  display: grid;
  width: min(480px, 100%);
  gap: 18px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
  text-align: center;
}

.open-mark {
  position: relative;
  width: 58px;
  height: 58px;
  margin: 0 auto;
  border-radius: 50%;
  background: #eef5ff;
}

.open-mark::before,
.open-mark::after {
  position: absolute;
  content: "";
  border-radius: 50%;
}

.open-mark::before {
  inset: 13px;
  border: 3px solid #416ff4;
  border-top-color: transparent;
  animation: open-spin 1s linear infinite;
}

.open-mark::after {
  inset: 24px;
  background: #1c9c5b;
}

.is-open-fallback .open-mark::before {
  border-color: #1c9c5b;
  animation: none;
}

.open-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.open-card h1 {
  margin: 0;
  color: #151823;
  font-size: 30px;
  line-height: 1.2;
}

.open-text,
.open-invoice {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.open-progress {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 8px 0;
}

.open-progress span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #416ff4;
  animation: open-pulse 1s ease-in-out infinite;
}

.open-progress span:nth-child(2) {
  animation-delay: 0.15s;
}

.open-progress span:nth-child(3) {
  animation-delay: 0.3s;
}

.is-open-fallback .open-progress {
  display: none;
}

.open-actions {
  display: grid;
  gap: 10px;
}

.open-app-button {
  color: #ffffff;
  background: #1c9c5b;
}

.open-app-button:hover {
  background: #16834c;
}

@keyframes open-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes open-pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }

  50% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.requisites-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  margin-top: 22px;
}

.info-box,
.warning-box {
  min-height: 150px;
  padding: 20px 22px;
  border-radius: var(--radius);
}

.info-box {
  background: var(--info-bg);
}

.warning-box {
  background: var(--warning-bg);
  border: 2px solid var(--primary-dark);
}

.box-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-weight: 800;
}

.circle-icon {
  display: inline-grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  color: #ffffff;
  background: var(--primary);
  border-radius: 50%;
  font-size: 14px;
  font-weight: 900;
}

.warning-box .circle-icon {
  background: #e5a12d;
}

.requisite-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 7px 0;
  color: #26303f;
  line-height: 1.45;
}

.requisite-line strong {
  flex: 0 0 auto;
}

.copy-mini {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  color: var(--primary);
  background: transparent;
  border: 0;
}

.instructions {
  margin-top: 22px;
}

.instruction-toggle {
  display: inline-flex;
  max-width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  color: #ffffff;
  background: #4e74f1;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
}

.instruction-body {
  margin: 14px 0 0;
  padding: 20px 22px;
  color: #384150;
  background: #f5f7fb;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  white-space: pre-line;
}

.details-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.admin-page {
  background: #f3f5f8;
}

.admin-shell {
  width: min(1760px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 54px;
}

.login-panel {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.login-form {
  width: min(420px, 100%);
  padding: 30px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.login-form h1 {
  margin-bottom: 24px;
}

label {
  display: grid;
  gap: 8px;
  color: #445064;
  font-size: 14px;
  font-weight: 800;
}

input,
textarea,
select {
  width: 100%;
  min-width: 0;
  padding: 12px 13px;
  color: #161b26;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  outline: 0;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(65, 111, 244, 0.13);
}

input[type="color"] {
  min-height: 45px;
  padding: 4px;
}

.form-message {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.form-message.is-error {
  color: var(--danger);
}

.form-message.is-ok {
  color: var(--success);
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.settings-band,
.invoice-band,
.methods-sidebar,
.editor-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.settings-band {
  padding: 20px;
  margin-bottom: 22px;
}

.invoice-band {
  display: grid;
  gap: 16px;
  padding: 20px;
  margin-bottom: 22px;
}

.invoice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.invoice-head code,
.api-endpoints code {
  padding: 8px 12px;
  color: #445064;
  background: #f4f6fa;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.api-endpoints {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.invoice-list {
  display: grid;
  gap: 8px;
}

.invoice-item {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 150px 140px 100px;
  gap: 14px;
  align-items: center;
  min-height: 56px;
  padding: 10px 12px;
  background: #f8f9fc;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.invoice-id {
  margin: 0;
  color: #161b26;
  font-size: 13px;
  font-weight: 800;
}

.invoice-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.invoice-status {
  width: fit-content;
  padding: 5px 9px;
  color: #445064;
  background: #eef1f7;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.invoice-status-proof_uploaded,
.invoice-status-approved {
  color: #11653d;
  background: #e7f8ef;
}

.invoice-status-rejected,
.invoice-status-expired {
  color: #9a2525;
  background: #fff0f0;
}

.api-key-field input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.settings-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
}

.wide-field {
  grid-column: span 2;
}

.admin-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.methods-sidebar {
  padding: 18px;
}

.sidebar-head,
.editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sidebar-head {
  margin-bottom: 14px;
}

.icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #ffffff;
  background: var(--primary);
  border: 0;
  border-radius: 6px;
  font-size: 24px;
  font-weight: 800;
}

.admin-method-list {
  display: grid;
  gap: 10px;
}

.admin-category-list {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.admin-category-item {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  color: #26303f;
  background: #f7f8fb;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: left;
}

.admin-category-select {
  flex: 1;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  text-align: left;
}

.category-toggle {
  min-width: 86px;
  padding: 7px 9px;
  color: #718096;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 750;
}

.category-toggle.is-on {
  color: #ffffff;
  background: var(--primary);
  border-color: var(--primary);
}

.admin-category-item.is-active {
  color: #17295c;
  background: #eef3ff;
  border-color: var(--primary);
}

.admin-category-item span,
.admin-empty-state {
  color: var(--muted);
  font-size: 13px;
}

.admin-method-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: left;
}

.admin-method-item.is-active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(65, 111, 244, 0.12);
}

.admin-method-swatch {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  background: var(--brand-color);
}

.admin-method-logo {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: #f4f6fa;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.admin-method-logo img {
  max-width: 34px;
  max-height: 28px;
  object-fit: contain;
}

.admin-method-title {
  margin: 0;
  font-weight: 850;
}

.admin-method-status {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.editor-panel {
  padding: 20px 22px;
}

.editor-panel.is-card-category .method-requisite-field {
  display: none;
}

.card-requisites-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.admin-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.card-requisites-form,
.card-requisites-list {
  display: grid;
  gap: 12px;
}

.card-requisite-row {
  display: grid;
  grid-template-columns: 72px repeat(5, minmax(120px, 1fr)) 92px;
  gap: 8px;
  align-items: end;
  padding: 12px;
  background: #f8faff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.card-requisite-row label {
  display: grid;
  gap: 6px;
  color: #4b5567;
  font-size: 12px;
  font-weight: 750;
}

.card-requisite-row input,
.card-requisite-row select {
  min-width: 0;
  height: 38px;
  padding: 8px 10px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 650;
}

.card-requisite-check {
  align-self: center;
  justify-items: center;
}

.card-requisite-check input {
  width: 18px;
  height: 18px;
  padding: 0;
}

.card-requisite-remove {
  height: 38px;
  padding: 0 10px;
}

.method-form {
  display: grid;
  gap: 16px;
}

.toggle-line {
  display: inline-flex;
  grid-auto-flow: column;
  align-items: center;
  gap: 9px;
}

.toggle-line input {
  width: 18px;
  height: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.method-form .form-grid > label {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  min-height: 46px;
  gap: 16px;
  align-items: center;
}

.method-form .form-grid > .wide-field {
  grid-column: auto;
}

.method-form .form-grid > label > input,
.method-form .form-grid > label > select,
.method-form .form-grid > label > textarea {
  grid-column: 2;
  grid-row: 1;
}

.method-form .form-grid > label > textarea {
  min-height: 46px;
}

.method-form .form-grid > label > textarea[rows="5"] {
  min-height: 66px;
}

.upload-field {
  grid-template-columns: 190px minmax(260px, 360px) 120px minmax(120px, 160px);
  align-content: center;
}

.upload-field input[type="file"] {
  min-height: 42px;
  padding: 8px 10px;
}

.upload-hint {
  grid-column: 3;
  grid-row: 1;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.asset-preview {
  grid-column: 4;
  grid-row: 1;
  display: grid;
  min-height: 42px;
  place-items: center;
  padding: 6px 10px;
  color: var(--muted);
  background: #f7f8fb;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

.asset-preview img {
  max-width: 126px;
  max-height: 34px;
  object-fit: contain;
}

.qr-preview {
  min-height: 46px;
}

.qr-preview img {
  max-width: 40px;
  max-height: 40px;
}

.editor-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

@media (max-width: 920px) {
  .checkout-top,
  .details-hero,
  .requisites-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .amount-box {
    justify-items: start;
    gap: 24px;
  }

  .amount {
    font-size: 46px;
    text-align: left;
  }

  .method-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .qr-frame {
    margin: 0;
  }

  .settings-form,
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wide-field {
    grid-column: 1 / -1;
  }

  .payment-template .app__title {
    display: grid;
    gap: 24px;
    padding: 82px 0 34px;
  }

  .payment-template .app__title .amount {
    font-size: clamp(34px, 8vw, 48px);
    text-align: left;
  }

  .payment-template .app__content__methods {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sberpay-hero,
  .sberpay-info-grid {
    grid-template-columns: 1fr;
  }

  .sberpay-hero {
    min-height: auto;
  }

  .sberpay-actions {
    grid-template-columns: 1fr;
    grid-template-areas:
      "proof"
      "time"
      "return";
  }

  .sberpay-proof-flow {
    flex-wrap: wrap;
  }

  .sberpay-paid {
    width: 220px;
  }

  .sberpay-qr {
    margin: 0;
    justify-self: center;
  }

  .sberpay-actions {
    align-items: stretch;
  }

  .sberpay-time {
    position: static;
    transform: none;
    justify-self: center;
    text-align: center;
  }
}

@media (max-width: 620px) {
  .checkout-shell,
  .admin-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 22px;
  }

  h1 {
    font-size: 27px;
  }

  h2 {
    font-size: 22px;
  }

  .amount {
    font-size: 37px;
  }

  .payment-panel,
  .details-panel,
  .details-hero,
  .settings-band,
  .invoice-band,
  .editor-panel,
  .methods-sidebar {
    padding: 18px;
  }

  .method-grid,
  .settings-form,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .panel-footer,
  .admin-header,
  .invoice-head {
    align-items: stretch;
    flex-direction: column;
  }

  .invoice-item {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
    white-space: normal;
  }

  .details-title {
    font-size: 30px;
  }

  .qr-frame {
    width: 100%;
    max-width: 240px;
    height: auto;
    aspect-ratio: 1;
  }

  .qr-grid {
    width: 100%;
    height: 100%;
  }

  .payment-template .app {
    padding-top: 0;
    padding-bottom: 28px;
  }

  .payment-template .cont__box,
  .payment-template .app__content {
    width: min(100% - 16px, 900px);
  }

  .payment-template .app__header {
    min-height: 34px;
    top: 16px;
    right: 14px;
  }

  .payment-template .header-logo {
    font-size: 14px;
  }

  .payment-template .language-menu {
    font-size: 11px;
  }

  .payment-template .language-menu .flag-ru {
    width: 32px;
    height: 20px;
  }

  .payment-template .app__title h3 {
    gap: 8px;
    font-size: 22px;
  }

  .payment-template .app__title .amount {
    font-size: clamp(30px, 10vw, 38px);
    white-space: normal;
  }

  .payment-template .app__title {
    gap: 14px;
    padding: 60px 0 20px;
  }

  .payment-template .copy-inline {
    max-width: 100%;
    align-items: flex-start;
    text-align: left;
  }

  .payment-template .copy-inline span:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .payment-template .app__content {
    min-height: auto;
    padding: 16px;
    border-radius: 8px;
  }

  .payment-template .app__content__title h3 {
    font-size: 21px;
  }

  .payment-template .app__content__methods {
    grid-template-columns: 1fr;
  }

  .payment-template .app__content__method {
    min-height: 92px;
    padding: 18px;
  }

  .payment-template .app__content__footer {
    align-items: stretch;
    flex-direction: column;
  }

  .sberpay-proof-flow,
  .sberpay-receipt {
    align-items: stretch;
    flex-direction: column;
  }

  .sberpay-paid,
  .sberpay-receipt-button {
    width: 100%;
  }

  .sberpay-receipt-note {
    max-width: none;
  }

  .sberpay-hero {
    gap: 16px;
    padding: 16px;
  }

  .sberpay-hero .details-method-logo {
    width: 92px;
    max-width: 92px;
    max-height: 42px;
  }

  .sberpay-hero-title {
    max-width: none;
    font-size: 22px;
    line-height: 1.28;
  }

  .sberpay-arrow {
    width: 132px;
    height: auto;
    margin-top: -8px;
    margin-left: min(42%, 160px);
  }

  .sberpay-qr,
  .qr-frame.sberpay-qr,
  .qr-frame.sberpay-qr img,
  .qr-frame.sberpay-qr .qr-grid {
    width: min(300px, calc(100vw - 64px));
    height: min(300px, calc(100vw - 64px));
  }

  .sberpay-info-box,
  .sberpay-warning-box {
    min-height: auto;
    padding: 14px;
    font-size: 14px;
  }

  .sberpay-info-box .requisite-line {
    grid-template-columns: max-content minmax(0, 1fr) 20px;
    width: 100%;
  }

  .sberpay-info-box .requisite-line-no-copy {
    grid-template-columns: max-content minmax(0, 1fr);
  }

  .sberpay-info-box .requisite-line span {
    overflow-wrap: anywhere;
  }

  .sberpay-warning-box p {
    margin-bottom: 12px;
  }

  .sberpay-instruction-toggle {
    width: 100%;
    max-width: 100%;
    min-height: 38px;
    justify-content: space-between;
    padding: 9px 14px;
    border-radius: 8px;
    white-space: normal;
    text-align: left;
  }

  .sberpay-instruction-content h3 {
    font-size: 20px;
  }

  .sberpay-phone {
    font-size: 19px;
    overflow-wrap: anywhere;
  }

  .sberpay-instruction-content ul {
    margin-left: 20px;
  }

  .sberpay-actions {
    gap: 14px;
    margin-top: 22px;
  }

  .sberpay-actions #returnFromDetails {
    width: 100%;
  }

  .checking-content h2 {
    font-size: 22px;
  }

  .checking-muted {
    margin-bottom: 32px;
    font-size: 15px;
  }

  .checking-amount {
    margin-bottom: 48px;
    font-size: 21px;
  }

  .checking-amount strong {
    font-size: 23px;
  }

  .payment-template.is-success-open #checkingView {
    width: min(100% - 32px, 360px);
    margin-top: 112px;
  }

  .success-card {
    min-height: 280px;
  }
}

@media (max-width: 380px) {
  .payment-template .cont__box,
  .payment-template .app__content {
    width: min(100% - 12px, 900px);
  }

  .payment-template .app__header {
    top: 14px;
    right: 12px;
  }

  .payment-template .app__title {
    gap: 12px;
    padding: 56px 0 18px;
  }

  .payment-template .app__title h3 {
    font-size: 20px;
  }

  .payment-template .copy-inline {
    font-size: 13px;
  }

  .payment-template .app__title .amount {
    font-size: clamp(28px, 9vw, 34px);
  }

  .payment-template .app__content {
    padding: 14px;
  }

  .payment-template .app__content__title {
    margin-bottom: 22px;
  }

  .payment-template .app__content__title h3 {
    font-size: 20px;
  }

  .payment-template .app__content__method {
    min-height: 86px;
    padding: 14px;
  }

  .sberpay-hero {
    gap: 14px;
    padding: 14px;
  }

  .sberpay-hero-title {
    font-size: 20px;
  }

  .sberpay-arrow {
    width: 118px;
  }

  .sberpay-qr,
  .qr-frame.sberpay-qr,
  .qr-frame.sberpay-qr img,
  .qr-frame.sberpay-qr .qr-grid {
    width: min(300px, calc(100vw - 56px));
    height: min(300px, calc(100vw - 56px));
  }

  .sberpay-info-box,
  .sberpay-warning-box {
    padding: 12px;
    font-size: 13.5px;
  }

  .sberpay-instruction-toggle {
    font-size: 13px;
  }

  .sberpay-actions {
    margin-top: 18px;
  }
}

@media (max-width: 340px) {
  .payment-template .app__title .amount {
    font-size: 27px;
  }

  .sberpay-hero-title {
    font-size: 19px;
  }

  .sberpay-qr,
  .qr-frame.sberpay-qr,
  .qr-frame.sberpay-qr img,
  .qr-frame.sberpay-qr .qr-grid {
    width: min(292px, calc(100vw - 48px));
    height: min(292px, calc(100vw - 48px));
  }
}
