:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #151823;
  --muted: #7b8495;
  --line: #dfe3ea;
  --line-strong: #c9cfdb;
  --primary: #416ff4;
  --primary-dark: #20366d;
  --accent: #416ff4;
  --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;
}

.admin-side-submenu--currencies {
  max-height: 42vh;
  overflow-y: auto;
}

.currency-band {
  display: grid;
  gap: 22px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.currency-band__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.currency-band__head h2 {
  margin: 4px 0 8px;
}

.currency-band__hint {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.currency-band__count {
  flex: 0 0 auto;
  padding: 9px 13px;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.currency-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.currency-card {
  display: flex;
  min-height: 74px;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  background: color-mix(in srgb, var(--surface) 88%, var(--bg));
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.currency-card.is-enabled {
  border-color: color-mix(in srgb, var(--primary) 65%, var(--line));
  box-shadow: 0 8px 24px color-mix(in srgb, var(--primary) 12%, transparent);
}

.currency-card__symbol {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  color: #fff;
  background: var(--primary);
  border-radius: 12px;
  font-size: 17px;
  font-weight: 900;
}

.currency-card__copy {
  display: grid;
  min-width: 0;
  gap: 3px;
  flex: 1 1 auto;
}

.currency-card__copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.currency-card__copy small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}

.currency-switch {
  position: relative;
  width: 44px;
  height: 25px;
  flex: 0 0 44px;
}

.currency-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.currency-switch span {
  display: block;
  width: 44px;
  height: 25px;
  padding: 3px;
  background: var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: background .18s ease;
}

.currency-switch span::after {
  display: block;
  width: 19px;
  height: 19px;
  content: "";
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .18);
  transition: transform .18s ease;
}

.currency-switch input:checked + span {
  background: var(--primary);
}

.currency-switch input:checked + span::after {
  transform: translateX(19px);
}

@media (max-width: 720px) {
  .currency-band__head {
    flex-direction: column;
  }
}

.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-check-rejected {
  background: #e04444;
}

.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: #eef2f7;
}

.admin-shell {
  width: 100%;
  margin: 0 auto;
  padding: 0 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-workspace {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  min-height: 100vh;
}

.admin-main {
  min-width: 0;
  padding: 0;
}

.admin-side-nav {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-content: stretch;
  gap: 18px;
  height: 100vh;
  min-height: 100vh;
  padding: 18px;
  color: #c5cedf;
  background: #20293b;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

.admin-side-brand {
  display: grid;
  gap: 6px;
  padding: 14px 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-side-brand span {
  color: #ffffff;
  font-size: 26px;
  font-weight: 850;
  line-height: 1;
}

.admin-side-brand small {
  color: #8f9bb3;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.admin-side-menu,
.admin-side-submenu {
  display: grid;
  align-content: start;
  gap: 6px;
}

.admin-side-menu {
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.admin-side-menu::-webkit-scrollbar {
  width: 4px;
}

.admin-side-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.admin-side-link,
.admin-side-sublink {
  width: 100%;
  min-height: 42px;
  padding: 0 13px;
  color: #a9b4cb;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  text-align: left;
  font-weight: 850;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
}

.admin-side-link:hover,
.admin-side-sublink:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.admin-side-link.is-active,
.admin-side-sublink.is-active {
  color: #ffffff;
  background: #416ff4;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 24px rgba(65, 111, 244, 0.22);
}

.admin-side-group {
  display: grid;
  gap: 8px;
}

.admin-side-link--group {
  position: relative;
}

.admin-side-link--group::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 14px;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-62%) rotate(45deg);
}

.admin-side-group.is-collapsed .admin-side-link--group::after {
  transform: translateY(-50%) rotate(-45deg);
}

.admin-side-group.is-collapsed .admin-side-submenu {
  display: none;
}

.admin-side-submenu {
  padding: 2px 0 0 10px;
}

.admin-side-sublink {
  position: relative;
  min-height: 36px;
  padding-left: 22px;
  font-size: 14px;
}

.admin-side-sublink::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 9px;
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
  opacity: 0.55;
  transform: translateY(-50%);
}

.admin-side-footer {
  display: grid;
  gap: 10px;
  align-self: end;
  justify-items: center;
  padding: 18px 8px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-side-footer .button {
  width: min(170px, 100%);
  min-height: 40px;
  color: #dce5f7;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}

.admin-side-footer .button:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

.theme-toggle {
  display: flex;
  width: min(170px, 100%);
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px 6px 12px;
  color: #dce5f7;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 850;
}

.theme-toggle:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

.theme-toggle__icon {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  width: 38px;
  height: 22px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.theme-toggle__icon::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.26);
  transition: transform 160ms ease, background 160ms ease;
}

.theme-toggle.is-active .theme-toggle__icon {
  background: rgba(65, 111, 244, 0.55);
  border-color: rgba(116, 152, 255, 0.58);
}

.theme-toggle.is-active .theme-toggle__icon::after {
  background: #dce7ff;
  transform: translateX(16px);
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  min-height: 42px;
  margin-bottom: 16px;
}

.admin-header h1 {
  color: #111827;
  font-size: 34px;
  line-height: 1.05;
}

.admin-header .eyebrow {
  color: #8b95a8;
  font-size: 12px;
  font-weight: 850;
}

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

.admin-actions .button {
  min-height: 42px;
  padding: 0 18px;
}

.settings-band,
.invoice-band,
.methods-sidebar,
.withdraw-method-panel,
.editor-panel {
  background: #ffffff;
  border: 1px solid #e0e6ef;
  border-radius: 0;
  box-shadow: none;
}

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

.invoice-band {
  display: grid;
  gap: 16px;
  padding: 24px;
  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;
}

.method-order-panel {
  display: grid;
  align-content: start;
  gap: 0;
  min-height: 100vh;
  padding: 24px;
  background: #ffffff;
  border: 1px solid #e0e6ef;
  border-radius: 0;
}

.withdraw-method-panel {
  min-height: 100vh;
  padding: 0;
}

.withdraw-method-card {
  display: grid;
  gap: 0;
  min-height: 100vh;
  align-content: start;
}

.withdraw-method-head {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.withdraw-method-head h2 {
  color: #141b2d;
  font-size: 24px;
}

.withdraw-method-form {
  display: grid;
  grid-template-columns: minmax(220px, 420px);
  gap: 18px;
  padding: 24px;
}

.withdraw-method-form label {
  display: grid;
  gap: 8px;
  color: #596273;
  font-weight: 850;
}

.withdraw-method-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid #ccd5e2;
  border-radius: 6px;
  font-weight: 760;
}

.method-order-head {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.method-order-head h2 {
  margin: 0;
  color: #141b2d;
  font-size: 24px;
  line-height: 1.1;
}

.method-order-count {
  display: inline-grid;
  min-width: 36px;
  min-height: 36px;
  place-items: center;
  color: var(--primary);
  background: #eef3ff;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 900;
}

.method-order-list {
  display: grid;
  gap: 0;
  overflow: hidden;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.method-order-item {
  display: grid;
  grid-template-columns: 48px 54px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 74px;
  padding: 12px 14px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.method-order-item:last-child {
  border-bottom: 0;
}

.method-order-position,
.method-order-icon {
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  font-weight: 900;
}

.method-order-position {
  width: 34px;
  height: 34px;
  color: var(--primary);
  background: #eef3ff;
  font-size: 15px;
}

.method-order-icon {
  width: 46px;
  height: 46px;
  color: #416ff4;
  background: #f2f5ff;
  border: 1px solid var(--line);
  font-size: 12px;
}

.method-order-info {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.method-order-info strong {
  color: #141b2d;
  font-size: 17px;
  font-weight: 900;
}

.method-order-info small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.method-order-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.order-arrow {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #ffffff;
  background: var(--primary);
  border: 0;
  border-radius: 6px;
  font-size: 18px;
  font-weight: 900;
}

.order-arrow:disabled {
  color: #9aa5b8;
  background: #edf1f7;
  cursor: not-allowed;
}

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

.settings-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: stretch;
}

.settings-form label {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  min-height: 64px;
  min-width: 0;
  padding: 12px 14px;
  color: #4a5568;
  border-bottom: 1px solid #edf1f7;
  font-size: 13px;
  font-weight: 850;
}

.settings-form label:last-of-type {
  border-bottom: 0;
}

.settings-form input {
  height: 44px;
  padding: 10px 13px;
  color: #141b2d;
  background: #fbfcff;
  border-color: #ccd5e2;
  font-size: 14px;
  font-weight: 760;
}

.wide-field {
  grid-column: auto;
}

.settings-submit {
  grid-column: auto;
  justify-self: start;
  min-width: 218px;
  margin: 18px 14px 0;
}

.admin-grid {
  display: grid;
  grid-template-columns: 318px minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  min-height: 100vh;
}

.methods-sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  padding: 18px;
  border-right: 0;
  border-radius: 0;
}

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

.sidebar-head {
  align-items: flex-start;
  margin-bottom: 14px;
}

.sidebar-head h2 {
  color: #141b2d;
  font-size: 24px;
}

.sidebar-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.icon-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  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: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e3e8f2;
  border-radius: 8px;
}

.admin-category-list {
  display: grid;
  gap: 0;
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid #e3e8f2;
  border-radius: 8px;
}

.admin-category-item {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  color: #26303f;
  background: #f8faff;
  border: 0;
  border-bottom: 1px solid #e3e8f2;
  border-radius: 0;
  text-align: left;
}

.admin-category-item:last-child {
  border-bottom: 0;
}

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

.category-toggle {
  min-width: 92px;
  min-height: 36px;
  padding: 0 10px;
  color: #718096;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 750;
}

.category-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.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: 11px;
  color: var(--text);
  background: #ffffff;
  border: 0;
  border-bottom: 1px solid #e3e8f2;
  border-radius: 0;
  text-align: left;
}

.admin-method-item:last-child {
  border-bottom: 0;
}

.admin-method-item.is-active {
  border-color: #e3e8f2;
  background: #f4f7ff;
  box-shadow: inset 3px 0 0 var(--primary);
}

.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-logo b {
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.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 {
  min-height: 100vh;
  padding: 24px;
  border-radius: 0;
}

.editor-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(120px, max-content));
  gap: 0;
  overflow: hidden;
  margin-bottom: 20px;
  padding: 0;
  background: #f2f5fb;
  border: 1px solid #e0e6ef;
  border-radius: 8px;
}

.methods-sidebar .editor-tabs {
  display: grid;
  grid-template-columns: 1fr;
  margin-bottom: 14px;
}

.editor-tab {
  min-height: 38px;
  padding: 0 14px;
  color: #667085;
  background: transparent;
  border: 0;
  border-right: 1px solid #e0e6ef;
  border-radius: 7px;
  font-weight: 850;
  white-space: nowrap;
}

.editor-tab:last-child {
  border-right: 0;
}

.editor-tab.is-active {
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 10px 20px rgba(65, 111, 244, 0.18);
}

.editor-panel.is-card-category .method-requisite-field,
.editor-panel.is-sbp-category .method-requisite-field,
.editor-panel.is-common-requisites-category .method-requisite-field,
.editor-panel.is-crypto-category .method-requisite-field {
  display: none;
}

.method-crypto-field {
  display: none !important;
}

.editor-panel.is-crypto-category .method-crypto-field {
  display: grid !important;
}

.editor-panel.is-crypto-category #methodForm .form-grid > label:not(.method-crypto-field) {
  display: none !important;
}

.editor-panel.is-crypto-category #methodForm .form-grid {
  grid-template-columns: minmax(0, 1fr);
}

.card-requisites-panel,
.card-text-template-panel {
  display: grid;
  gap: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.category-settings-panel {
  display: grid;
  gap: 0;
  margin-bottom: 22px;
}

.category-settings-form {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
  gap: 12px 18px;
  align-items: end;
  padding: 16px;
  background: #f8faff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.category-settings-form label {
  display: grid;
  gap: 8px;
  color: #4b5567;
  font-size: 13px;
  font-weight: 800;
}

.category-settings-form input {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
}

.category-settings-hint {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.category-settings-form .editor-actions {
  grid-column: 1 / -1;
}

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

.card-requisites-form,
.card-requisites-list,
.card-template-form {
  display: grid;
  gap: 0;
}

.scope-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 4px;
  justify-self: start;
  padding: 4px;
  background: #f2f5fb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.scope-switch__button {
  min-height: 34px;
  padding: 0 14px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-weight: 850;
}

.scope-switch__button.is-active {
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 10px 18px rgba(65, 111, 244, 0.18);
}

.scope-hint {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.panel-toggle-line {
  justify-self: start;
  width: 100%;
  padding: 12px 14px;
  color: var(--text);
  background: #f8faff;
  border: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  font-size: 14px;
  font-weight: 850;
}

.card-template-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 0;
  align-items: start;
}

.card-template-grid {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px 0 0 8px;
}

.card-template-grid label {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 62px;
  padding: 10px 14px;
  color: #4b5567;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 800;
}

.card-template-grid label:last-child {
  border-bottom: 0;
}

.card-template-grid input,
.card-template-grid textarea {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 650;
}

.card-template-grid textarea {
  min-height: 78px;
  resize: vertical;
}

.placeholder-help {
  display: grid;
  gap: 8px;
  padding: 14px;
  color: #4b5567;
  background: #f8faff;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 8px 8px 0;
}

.placeholder-help h3 {
  margin: 0;
  font-size: 16px;
}

.placeholder-help p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.placeholder-help code {
  padding: 2px 5px;
  color: #17295c;
  background: #eef3ff;
  border-radius: 4px;
  font-weight: 800;
}

.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: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.card-requisites-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.card-requisite-row:last-child {
  border-bottom: 0;
}

.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: 0;
}

.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: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.method-form .form-grid > label {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  min-height: 62px;
  gap: 16px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.method-form .form-grid > label:last-child {
  border-bottom: 0;
}

.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;
}


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

.admin-page.theme-dark {
  --bg: #0b1020;
  --surface: #101827;
  --text: #eef3ff;
  --muted: #94a3b8;
  --line: #263247;
  --line-strong: #3a4861;
  --primary: #4f7cff;
  --primary-dark: #b9c8ff;
  --accent: #4f7cff;
  --danger: #ef5350;
  --success: #31d083;
  --shadow: none;
  color: var(--text);
  background: #0b1020;
  color-scheme: dark;
}

.admin-page.theme-dark .admin-main {
  background: #0b1020;
}

.admin-page.theme-dark .login-form,
.admin-page.theme-dark .settings-band,
.admin-page.theme-dark .invoice-band,
.admin-page.theme-dark .methods-sidebar,
.admin-page.theme-dark .withdraw-method-panel,
.admin-page.theme-dark .method-order-panel,
.admin-page.theme-dark .editor-panel {
  color: var(--text);
  background: #101827;
  border-color: #263247;
}

.admin-page.theme-dark .admin-side-nav {
  background: #070d1a;
  border-right-color: #1c2638;
}

.admin-page.theme-dark .category-settings-form {
  background: #0c1424;
  border-color: #263247;
}

.admin-page.theme-dark h1,
.admin-page.theme-dark h2,
.admin-page.theme-dark h3,
.admin-page.theme-dark .sidebar-head h2,
.admin-page.theme-dark .editor-head h2,
.admin-page.theme-dark .method-order-head h2,
.admin-page.theme-dark .withdraw-method-head h2,
.admin-page.theme-dark .method-order-info strong,
.admin-page.theme-dark .admin-method-title,
.admin-page.theme-dark .invoice-id {
  color: #f6f8ff;
}

.admin-page.theme-dark label,
.admin-page.theme-dark .settings-form label,
.admin-page.theme-dark .method-form .form-grid > label,
.admin-page.theme-dark .card-template-grid label,
.admin-page.theme-dark .withdraw-method-form label,
.admin-page.theme-dark .card-requisite-row label {
  color: #bdc7d9;
}

.admin-page.theme-dark input,
.admin-page.theme-dark textarea,
.admin-page.theme-dark select,
.admin-page.theme-dark .settings-form input,
.admin-page.theme-dark .method-form .form-grid > label > input,
.admin-page.theme-dark .method-form .form-grid > label > select,
.admin-page.theme-dark .method-form .form-grid > label > textarea,
.admin-page.theme-dark .card-template-grid input,
.admin-page.theme-dark .card-template-grid textarea,
.admin-page.theme-dark .withdraw-method-form input,
.admin-page.theme-dark .card-requisite-row input,
.admin-page.theme-dark .card-requisite-row select {
  color: #eef3ff;
  background: #0c1424;
  border-color: #3a4861;
}

.admin-page.theme-dark input::placeholder,
.admin-page.theme-dark textarea::placeholder {
  color: #64748b;
}

.admin-page.theme-dark input:focus,
.admin-page.theme-dark textarea:focus,
.admin-page.theme-dark select:focus {
  border-color: #6f91ff;
  box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.2);
}

.admin-page.theme-dark .settings-form label,
.admin-page.theme-dark .method-form .form-grid > label,
.admin-page.theme-dark .card-template-grid label,
.admin-page.theme-dark .card-requisite-row,
.admin-page.theme-dark .admin-method-item,
.admin-page.theme-dark .admin-category-item {
  border-bottom-color: #263247;
}

.admin-page.theme-dark .admin-method-list,
.admin-page.theme-dark .admin-category-list,
.admin-page.theme-dark .method-order-list,
.admin-page.theme-dark .form-grid,
.admin-page.theme-dark .card-template-grid,
.admin-page.theme-dark .card-requisites-list,
.admin-page.theme-dark .editor-tabs,
.admin-page.theme-dark .scope-switch,
.admin-page.theme-dark .panel-toggle-line,
.admin-page.theme-dark .placeholder-help {
  background: #101827;
  border-color: #263247;
}

.admin-page.theme-dark .admin-method-item,
.admin-page.theme-dark .admin-category-item,
.admin-page.theme-dark .card-requisite-row,
.admin-page.theme-dark .method-order-item,
.admin-page.theme-dark .panel-toggle-line,
.admin-page.theme-dark .placeholder-help,
.admin-page.theme-dark .invoice-item {
  color: var(--text);
  background: #101827;
}

.admin-page.theme-dark .admin-method-item:hover,
.admin-page.theme-dark .admin-category-item:hover {
  background: #151f33;
}

.admin-page.theme-dark .admin-method-item.is-active,
.admin-page.theme-dark .admin-category-item.is-active {
  color: #f6f8ff;
  background: #172540;
  box-shadow: inset 3px 0 0 var(--primary);
}

.admin-page.theme-dark .admin-method-logo,
.admin-page.theme-dark .method-order-icon,
.admin-page.theme-dark .asset-preview {
  color: #94a3b8;
  background: #0d1628;
  border-color: #334159;
}

.admin-page.theme-dark .upload-hint,
.admin-page.theme-dark .admin-method-status,
.admin-page.theme-dark .method-order-info small,
.admin-page.theme-dark .invoice-meta,
.admin-page.theme-dark .admin-empty-state,
.admin-page.theme-dark .placeholder-help p,
.admin-page.theme-dark .form-message {
  color: #94a3b8;
}

.admin-page.theme-dark .form-message.is-error {
  color: #ff8f8a;
}

.admin-page.theme-dark .form-message.is-ok {
  color: #8af0b5;
}

.admin-page.theme-dark .editor-tab,
.admin-page.theme-dark .scope-switch__button {
  color: #9da9bd;
  border-color: #263247;
}

.admin-page.theme-dark .editor-tab.is-active,
.admin-page.theme-dark .scope-switch__button.is-active {
  color: #ffffff;
}

.admin-page.theme-dark .category-toggle {
  color: #94a3b8;
  background: #0c1424;
  border-color: #334159;
}

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

.admin-page.theme-dark .invoice-head code,
.admin-page.theme-dark .api-endpoints code {
  color: #bdc7d9;
  background: #111d31;
  border-color: #263247;
}

.admin-page.theme-dark .invoice-status {
  color: #cbd5e1;
  background: #1d293d;
}

.admin-page.theme-dark .invoice-status-proof_uploaded,
.admin-page.theme-dark .invoice-status-approved {
  color: #8af0b5;
  background: rgba(49, 208, 131, 0.14);
}

.admin-page.theme-dark .invoice-status-rejected,
.admin-page.theme-dark .invoice-status-expired {
  color: #ffaaa6;
  background: rgba(239, 83, 80, 0.14);
}

.admin-page.theme-dark .placeholder-help code {
  color: #c9d6ff;
  background: #172540;
}

.admin-page.theme-dark .method-order-head,
.admin-page.theme-dark .withdraw-method-head,
.admin-page.theme-dark .method-order-item {
  border-color: #263247;
}

.admin-page.theme-dark .method-order-count,
.admin-page.theme-dark .method-order-position {
  color: #c9d6ff;
  background: #172540;
}

.admin-page.theme-dark .order-arrow:disabled {
  color: #64748b;
  background: #1d293d;
}

.admin-page.theme-dark .button-ghost {
  color: #dce5f7;
  background: #101827;
  border-color: #344158;
}

.admin-page.theme-dark .button-ghost:hover {
  border-color: #6f91ff;
}

@media (max-width: 1280px) {
  .settings-form label {
    grid-column: auto;
  }

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

  .settings-submit {
    grid-column: auto;
  }

  .admin-grid {
    grid-template-columns: 300px minmax(0, 1fr);
  }
}

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

  .admin-side-nav {
    position: static;
    height: auto;
    min-height: auto;
    overflow: visible;
  }

  .methods-sidebar {
    position: static;
  }

  .admin-side-menu {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }

  .editor-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 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,
  .card-template-grid label {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .settings-form label {
    grid-template-columns: 210px minmax(0, 1fr);
  }

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

  .settings-form label,
  .settings-form .wide-field,
  .settings-submit {
    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;
  }

  .admin-page .admin-shell {
    width: 100%;
    padding-top: 0;
  }

  h1 {
    font-size: 27px;
  }

  h2 {
    font-size: 22px;
  }

  .amount {
    font-size: 37px;
  }

  .payment-panel,
  .details-panel,
  .details-hero,
  .admin-side-nav,
  .settings-band,
  .invoice-band,
  .withdraw-method-head,
  .withdraw-method-form,
  .method-order-panel,
  .editor-panel,
  .methods-sidebar {
    padding: 18px;
  }

  .admin-side-menu {
    grid-template-columns: 1fr;
  }

  .editor-tabs {
    grid-template-columns: 1fr;
  }

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

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

  .method-order-item {
    grid-template-columns: 38px minmax(0, 1fr) auto;
  }

  .method-order-icon {
    display: none;
  }

  .settings-form label {
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: start;
    padding: 12px 0;
  }

  .settings-submit {
    width: 100%;
    margin: 16px 0 0;
  }

  .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));
  }
}

/* NSPKPay premium admin refresh */
.admin-page {
  --admin-bg: #0b1220;
  --admin-bg-soft: #101827;
  --admin-surface: rgba(19, 29, 48, 0.94);
  --admin-surface-strong: rgba(22, 30, 48, 0.98);
  --admin-card: rgba(21, 30, 48, 0.92);
  --admin-card-hover: rgba(31, 43, 68, 0.96);
  --admin-text: #ffffff;
  --admin-muted: #94a3b8;
  --admin-muted-strong: #cbd5e1;
  --admin-line: rgba(255, 255, 255, 0.08);
  --admin-line-strong: rgba(255, 255, 255, 0.14);
  --admin-primary: #6d8dff;
  --admin-primary-hover: #7b9bff;
  --admin-success: #22c55e;
  --admin-warning: #f59e0b;
  --admin-danger: #ef4444;
  --admin-radius-lg: 24px;
  --admin-radius: 18px;
  --admin-radius-sm: 14px;
  --admin-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  --admin-glow: 0 18px 44px rgba(109, 141, 255, 0.22);
  min-height: 100vh;
  color: var(--admin-text);
  background:
    radial-gradient(circle at 16% -4%, rgba(109, 141, 255, 0.22), transparent 34%),
    radial-gradient(circle at 88% 8%, rgba(34, 197, 94, 0.12), transparent 30%),
    linear-gradient(135deg, #08101d 0%, var(--admin-bg) 48%, #0a1425 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}

.admin-page:not(.theme-dark) {
  --admin-bg: #f5f7fb;
  --admin-bg-soft: #eef3f9;
  --admin-surface: rgba(255, 255, 255, 0.94);
  --admin-surface-strong: rgba(255, 255, 255, 0.98);
  --admin-card: rgba(255, 255, 255, 0.94);
  --admin-card-hover: #ffffff;
  --admin-text: #111827;
  --admin-muted: #667085;
  --admin-muted-strong: #344054;
  --admin-line: rgba(15, 23, 42, 0.09);
  --admin-line-strong: rgba(15, 23, 42, 0.15);
  --admin-shadow: 0 24px 64px rgba(15, 23, 42, 0.11);
  --admin-glow: 0 18px 44px rgba(109, 141, 255, 0.16);
  color: var(--admin-text);
  background:
    radial-gradient(circle at 16% -4%, rgba(109, 141, 255, 0.18), transparent 34%),
    radial-gradient(circle at 88% 8%, rgba(34, 197, 94, 0.1), transparent 30%),
    linear-gradient(135deg, #f7f9fd 0%, #eef3f9 100%);
  color-scheme: light;
}

.admin-page * {
  letter-spacing: 0;
}

.admin-page h1,
.admin-page h2,
.admin-page h3,
.admin-page p {
  margin-top: 0;
}

.admin-page .admin-shell {
  width: 100%;
  max-width: none;
  padding: 0;
}

.admin-page .admin-workspace {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 0;
  min-height: 100vh;
  background: transparent;
}

.admin-page .admin-main {
  min-width: 0;
  padding: 28px clamp(20px, 3vw, 42px) 42px;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 92px;
  margin-bottom: 24px;
  padding: 22px 26px;
  color: var(--admin-text);
  background: var(--admin-surface);
  border: 1px solid var(--admin-line);
  border-radius: var(--admin-radius-lg);
  box-shadow: var(--admin-shadow);
  backdrop-filter: blur(18px);
}

.admin-topbar__eyebrow {
  margin-bottom: 7px;
  color: var(--admin-primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-topbar h1,
.admin-page #adminPageTitle {
  margin: 0;
  color: var(--admin-text);
  font-size: clamp(26px, 2.5vw, 34px);
  font-weight: 900;
  line-height: 1.05;
}

.admin-live-status {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  color: var(--admin-muted-strong);
  background: rgba(109, 141, 255, 0.12);
  border: 1px solid var(--admin-line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 850;
}

.admin-live-status span {
  width: 8px;
  height: 8px;
  background: var(--admin-success);
  border-radius: 999px;
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.14);
}

.admin-page .admin-side-nav {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 22px;
  height: 100vh;
  min-height: 100vh;
  padding: 24px 22px;
  color: var(--admin-muted);
  background:
    linear-gradient(180deg, rgba(19, 29, 48, 0.98), rgba(10, 18, 32, 0.98)),
    var(--admin-bg);
  border-right: 1px solid var(--admin-line);
  box-shadow: 16px 0 50px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  backdrop-filter: blur(18px);
}

.admin-page:not(.theme-dark) .admin-side-nav {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 252, 0.96)),
    var(--admin-bg);
  box-shadow: 16px 0 50px rgba(15, 23, 42, 0.08);
}

.admin-page .admin-side-brand {
  position: relative;
  display: flex;
  min-height: 76px;
  align-items: center;
  gap: 14px;
  padding: 0 0 22px;
  border-bottom: 1px solid var(--admin-line);
}

.admin-page .admin-side-brand::before {
  content: "N";
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--admin-primary), #22c55e);
  border-radius: 18px;
  box-shadow: var(--admin-glow);
  font-size: 22px;
  font-weight: 950;
}

.admin-page .admin-side-brand span {
  color: var(--admin-text);
  font-size: 25px;
  font-weight: 950;
  line-height: 1;
}

.admin-page .admin-side-brand small {
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.admin-page .admin-side-menu {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  padding-right: 4px;
  overflow-y: auto;
}

.admin-page .admin-side-menu::-webkit-scrollbar,
.admin-page .admin-method-list::-webkit-scrollbar,
.admin-page .editor-panel::-webkit-scrollbar {
  width: 5px;
}

.admin-page .admin-side-menu::-webkit-scrollbar-thumb,
.admin-page .admin-method-list::-webkit-scrollbar-thumb,
.admin-page .editor-panel::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.38);
  border-radius: 999px;
}

.admin-page .admin-side-link,
.admin-page .admin-side-sublink {
  position: relative;
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  padding: 0 14px 0 18px;
  color: var(--admin-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 850;
  text-align: left;
  transition: transform 220ms ease-out, color 220ms ease-out, background 220ms ease-out, border-color 220ms ease-out, box-shadow 220ms ease-out;
}

.admin-page .admin-side-link::before {
  content: "";
  width: 6px;
  height: 24px;
  margin-left: -10px;
  background: transparent;
  border-radius: 999px;
  transition: background 220ms ease-out, box-shadow 220ms ease-out;
}

.admin-page .admin-side-link:hover,
.admin-page .admin-side-sublink:hover {
  color: var(--admin-text);
  background: rgba(109, 141, 255, 0.1);
  border-color: var(--admin-line);
  transform: translateX(2px);
}

.admin-page .admin-side-link.is-active,
.admin-page .admin-side-sublink.is-active {
  color: var(--admin-text);
  background: linear-gradient(135deg, rgba(109, 141, 255, 0.26), rgba(109, 141, 255, 0.1));
  border-color: rgba(109, 141, 255, 0.42);
  box-shadow: 0 14px 32px rgba(109, 141, 255, 0.14);
}

.admin-page .admin-side-link.is-active::before {
  background: var(--admin-primary);
  box-shadow: 0 0 18px rgba(109, 141, 255, 0.72);
}

.admin-page .admin-side-group {
  display: grid;
  gap: 8px;
}

.admin-page .admin-side-submenu {
  display: grid;
  gap: 6px;
  padding: 0 0 2px 24px;
  overflow: hidden;
  transition: max-height 260ms ease-out, opacity 220ms ease-out, transform 220ms ease-out;
}

.admin-page .admin-side-group.is-collapsed .admin-side-submenu {
  display: grid;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
}

.admin-page .admin-side-group:not(.is-collapsed) .admin-side-submenu {
  max-height: 320px;
  opacity: 1;
  transform: translateY(0);
}

.admin-page .admin-side-sublink {
  min-height: 38px;
  padding-left: 16px;
  border-radius: 13px;
  font-size: 14px;
}

.admin-page .admin-side-sublink::before {
  left: 2px;
  width: 5px;
  height: 5px;
  color: currentColor;
  opacity: 0.6;
}

.admin-page .admin-side-footer {
  display: grid;
  gap: 12px;
  padding: 18px 0 0;
  border-top: 1px solid var(--admin-line);
}

.admin-page .theme-toggle,
.admin-page .admin-side-footer .button {
  width: 100%;
  min-height: 48px;
  color: var(--admin-muted-strong);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--admin-line);
  border-radius: 16px;
  font-size: 14px;
  font-weight: 850;
  transition: transform 220ms ease-out, border-color 220ms ease-out, background 220ms ease-out, color 220ms ease-out;
}

.admin-page:not(.theme-dark) .theme-toggle,
.admin-page:not(.theme-dark) .admin-side-footer .button {
  background: rgba(15, 23, 42, 0.04);
}

.admin-page .theme-toggle:hover,
.admin-page .admin-side-footer .button:hover {
  color: var(--admin-text);
  background: rgba(109, 141, 255, 0.12);
  border-color: rgba(109, 141, 255, 0.38);
  transform: translateY(-1px);
}

.admin-page .theme-toggle__icon {
  width: 44px;
  height: 24px;
  background: rgba(148, 163, 184, 0.22);
  border-color: var(--admin-line);
}

.admin-page .theme-toggle__icon::after {
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
}

.admin-page .theme-toggle.is-active .theme-toggle__icon::after {
  transform: translateX(20px);
}

.admin-page .button,
.admin-page .icon-button,
.admin-page .category-toggle,
.admin-page .order-arrow {
  border-radius: 14px;
  font-weight: 900;
  transition: transform 220ms ease-out, box-shadow 220ms ease-out, background 220ms ease-out, border-color 220ms ease-out, color 220ms ease-out;
}

.admin-page .button-primary,
.admin-page .icon-button,
.admin-page .order-arrow {
  color: #ffffff;
  background: linear-gradient(135deg, var(--admin-primary), #5474f4);
  border-color: transparent;
  box-shadow: 0 14px 30px rgba(109, 141, 255, 0.28);
}

.admin-page .button-primary:hover,
.admin-page .icon-button:hover,
.admin-page .order-arrow:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--admin-primary-hover), #6383ff);
  box-shadow: 0 18px 42px rgba(109, 141, 255, 0.34);
  transform: translateY(-1px);
}

.admin-page .button-ghost {
  color: var(--admin-muted-strong);
  background: transparent;
  border-color: var(--admin-line);
}

.admin-page .button-ghost:hover {
  color: var(--admin-text);
  background: rgba(109, 141, 255, 0.1);
  border-color: rgba(109, 141, 255, 0.38);
}

.admin-page .button-danger {
  color: #ffffff;
  background: linear-gradient(135deg, var(--admin-danger), #dc2626);
  box-shadow: 0 14px 30px rgba(239, 68, 68, 0.2);
}

.admin-page input,
.admin-page textarea,
.admin-page select,
.admin-page .settings-form input,
.admin-page .method-form .form-grid > label > input,
.admin-page .method-form .form-grid > label > select,
.admin-page .method-form .form-grid > label > textarea,
.admin-page .card-template-grid input,
.admin-page .card-template-grid textarea,
.admin-page .withdraw-method-form input,
.admin-page .card-requisite-row input,
.admin-page .card-requisite-row select {
  min-height: 48px;
  color: var(--admin-text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--admin-line-strong);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  font-size: 15px;
  font-weight: 750;
  transition: border-color 180ms ease-out, box-shadow 180ms ease-out, background 180ms ease-out;
}

.admin-page:not(.theme-dark) input,
.admin-page:not(.theme-dark) textarea,
.admin-page:not(.theme-dark) select,
.admin-page:not(.theme-dark) .settings-form input,
.admin-page:not(.theme-dark) .method-form .form-grid > label > input,
.admin-page:not(.theme-dark) .method-form .form-grid > label > select,
.admin-page:not(.theme-dark) .method-form .form-grid > label > textarea,
.admin-page:not(.theme-dark) .card-template-grid input,
.admin-page:not(.theme-dark) .card-template-grid textarea,
.admin-page:not(.theme-dark) .withdraw-method-form input,
.admin-page:not(.theme-dark) .card-requisite-row input,
.admin-page:not(.theme-dark) .card-requisite-row select {
  color: var(--admin-text);
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.14);
}

.admin-page input::placeholder,
.admin-page textarea::placeholder {
  color: #74849a;
}

.admin-page input:focus,
.admin-page textarea:focus,
.admin-page select:focus {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 4px rgba(109, 141, 255, 0.16);
}

.admin-page label,
.admin-page .settings-form label,
.admin-page .method-form .form-grid > label,
.admin-page .card-template-grid label,
.admin-page .withdraw-method-form label,
.admin-page .card-requisite-row label {
  color: var(--admin-muted-strong);
  font-size: 13px;
  font-weight: 850;
}

.admin-page .settings-band,
.admin-page .invoice-band,
.admin-page .methods-sidebar,
.admin-page .withdraw-method-panel,
.admin-page .method-order-panel,
.admin-page .editor-panel,
.admin-page .login-form {
  color: var(--admin-text);
  background: var(--admin-card);
  border: 1px solid var(--admin-line);
  border-radius: var(--admin-radius-lg);
  box-shadow: var(--admin-shadow);
  backdrop-filter: blur(18px);
}

.admin-page .settings-band,
.admin-page .invoice-band,
.admin-page .method-order-panel {
  padding: 24px;
}

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

.admin-page .methods-sidebar {
  position: sticky;
  top: 24px;
  display: grid;
  align-content: start;
  gap: 16px;
  max-height: calc(100vh - 48px);
  min-height: 0;
  padding: 20px;
  overflow: hidden;
}

.admin-page .editor-panel {
  min-height: calc(100vh - 148px);
  max-height: none;
  padding: 26px;
  overflow: auto;
}

.admin-page .sidebar-head {
  margin-bottom: 0;
}

.admin-page .sidebar-head h2,
.admin-page .editor-head h2,
.admin-page .method-order-head h2,
.admin-page .withdraw-method-head h2,
.admin-page .invoice-head h2 {
  margin: 0;
  color: var(--admin-text);
  font-size: 24px;
  font-weight: 950;
  line-height: 1.1;
}

.admin-page .sidebar-actions {
  gap: 10px;
}

.admin-page .category-toggle {
  min-width: 112px;
  min-height: 42px;
  color: var(--admin-muted-strong);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--admin-line);
}

.admin-page:not(.theme-dark) .category-toggle {
  background: #f8fafc;
}

.admin-page .category-toggle.is-on {
  color: #ffffff;
  background: linear-gradient(135deg, var(--admin-success), #16a34a);
  border-color: transparent;
}

.admin-page .icon-button {
  width: 42px;
  height: 42px;
  font-size: 25px;
}

.admin-page .admin-method-list {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 210px);
  padding: 2px;
  overflow: auto;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.admin-page .admin-method-item {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 13px;
  min-height: 78px;
  align-items: center;
  padding: 13px 14px;
  color: var(--admin-text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--admin-line);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transition: transform 220ms ease-out, background 220ms ease-out, border-color 220ms ease-out, box-shadow 220ms ease-out;
}

.admin-page:not(.theme-dark) .admin-method-item {
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.admin-page .admin-method-item:hover {
  background: var(--admin-card-hover);
  border-color: rgba(109, 141, 255, 0.35);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}

.admin-page .admin-method-item.is-active {
  background: linear-gradient(135deg, rgba(109, 141, 255, 0.24), rgba(109, 141, 255, 0.1));
  border-color: rgba(109, 141, 255, 0.58);
  box-shadow: inset 4px 0 0 var(--admin-primary), 0 18px 36px rgba(109, 141, 255, 0.18);
}

.admin-page .admin-method-logo,
.admin-page .method-order-icon,
.admin-page .asset-preview {
  width: 50px;
  height: 50px;
  color: var(--admin-primary);
  background: rgba(109, 141, 255, 0.12);
  border: 1px solid var(--admin-line);
  border-radius: 16px;
}

.admin-page .admin-method-logo img {
  max-width: 38px;
  max-height: 32px;
}

.admin-page .admin-method-title {
  display: block;
  color: var(--admin-text);
  font-size: 16px;
  font-weight: 950;
  line-height: 1.1;
}

.admin-page .admin-method-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: var(--admin-muted);
  font-size: 13px;
  font-weight: 850;
}

.admin-page .admin-method-status::before {
  content: "";
  width: 7px;
  height: 7px;
  background: currentColor;
  border-radius: 50%;
}

.admin-page .admin-method-item:has(.admin-method-status)::after {
  content: "";
}

.admin-page .editor-tabs,
.admin-page .scope-switch {
  display: grid;
  gap: 6px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--admin-line);
  border-radius: 18px;
}

.admin-page:not(.theme-dark) .editor-tabs,
.admin-page:not(.theme-dark) .scope-switch {
  background: #f1f5f9;
}

.admin-page .methods-sidebar .editor-tabs {
  grid-template-columns: 1fr;
  margin-bottom: 0;
}

.admin-page .editor-tab,
.admin-page .scope-switch__button {
  min-height: 44px;
  color: var(--admin-muted);
  border: 0;
  border-radius: 14px;
  font-weight: 900;
  transition: background 200ms ease-out, color 200ms ease-out, box-shadow 200ms ease-out, transform 200ms ease-out;
}

.admin-page .editor-tab:hover,
.admin-page .scope-switch__button:hover {
  color: var(--admin-text);
  background: rgba(109, 141, 255, 0.1);
}

.admin-page .editor-tab.is-active,
.admin-page .scope-switch__button.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--admin-primary), #5474f4);
  box-shadow: 0 14px 28px rgba(109, 141, 255, 0.22);
}

.admin-page .editor-head {
  min-height: 72px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--admin-line);
}

.admin-page .eyebrow {
  margin: 0 0 8px;
  color: var(--admin-primary);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-page .toggle-line {
  color: var(--admin-muted-strong);
  font-weight: 900;
}

.admin-page .toggle-line input[type="checkbox"] {
  appearance: none;
  position: relative;
  width: 46px;
  height: 26px;
  padding: 0;
  background: rgba(148, 163, 184, 0.24);
  border: 1px solid var(--admin-line-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: background 180ms ease-out, border-color 180ms ease-out;
}

.admin-page .toggle-line input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #ffffff;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 180ms ease-out;
}

.admin-page .toggle-line input[type="checkbox"]:checked {
  background: linear-gradient(135deg, var(--admin-primary), #22c55e);
  border-color: transparent;
}

.admin-page .toggle-line input[type="checkbox"]:checked::after {
  transform: translateX(20px);
}

.admin-page .form-grid,
.admin-page .card-template-grid,
.admin-page .card-requisites-list,
.admin-page .method-order-list {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--admin-line);
  border-radius: 20px;
}

.admin-page:not(.theme-dark) .form-grid,
.admin-page:not(.theme-dark) .card-template-grid,
.admin-page:not(.theme-dark) .card-requisites-list,
.admin-page:not(.theme-dark) .method-order-list {
  background: #ffffff;
}

.admin-page .method-form .form-grid > label,
.admin-page .card-template-grid label,
.admin-page .settings-form label {
  min-height: 72px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--admin-line);
}

.admin-page .method-form .form-grid > label:last-child,
.admin-page .card-template-grid label:last-child,
.admin-page .settings-form label:last-of-type {
  border-bottom: 0;
}

.admin-page .settings-form {
  grid-template-columns: 1fr;
  gap: 0;
}

.admin-page .settings-submit {
  margin: 18px 0 0;
}

.admin-page .upload-field {
  grid-template-columns: 190px minmax(220px, 360px) max-content minmax(120px, 170px);
}

.admin-page .upload-hint {
  color: var(--admin-muted);
  font-weight: 850;
}

.admin-page .asset-preview {
  width: auto;
  min-width: 130px;
  height: auto;
  min-height: 52px;
  padding: 8px 10px;
  border-style: dashed;
}

.admin-page .asset-preview img {
  max-width: 136px;
  max-height: 38px;
}

.admin-page .asset-preview.qr-image-preview {
  min-height: 128px;
  padding: 8px;
}

.admin-page .asset-preview.qr-image-preview img {
  width: 112px;
  height: 112px;
  max-width: 100%;
  max-height: 112px;
  object-fit: contain;
  image-rendering: pixelated;
}


.admin-page .card-template-layout {
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  gap: 16px;
}

.admin-page .placeholder-help {
  align-content: start;
  gap: 10px;
  padding: 18px;
  color: var(--admin-muted-strong);
  background: rgba(109, 141, 255, 0.08);
  border: 1px solid var(--admin-line);
  border-radius: 20px;
}

.admin-page .placeholder-help h3 {
  color: var(--admin-text);
}

.admin-page .placeholder-help p,
.admin-page .admin-empty-state,
.admin-page .form-message,
.admin-page .method-order-info small,
.admin-page .invoice-meta {
  color: var(--admin-muted);
}

.admin-page .placeholder-help code {
  color: var(--admin-primary);
  background: rgba(109, 141, 255, 0.12);
  border-radius: 8px;
}

.admin-page .panel-toggle-line {
  width: 100%;
  margin-bottom: 14px;
  padding: 14px 16px;
  color: var(--admin-muted-strong);
  background: rgba(109, 141, 255, 0.08);
  border: 1px solid var(--admin-line);
  border-radius: 18px;
}

.admin-page .card-requisites-form,
.admin-page .card-requisites-list,
.admin-page .card-template-form,
.admin-page .method-form {
  gap: 16px;
}

.admin-page .card-requisite-row {
  grid-template-columns: 74px repeat(5, minmax(130px, 1fr)) auto;
  gap: 10px;
  padding: 14px;
  color: var(--admin-text);
  background: transparent;
  border-bottom: 1px solid var(--admin-line);
}

.admin-page .card-requisite-remove {
  min-height: 42px;
  align-self: end;
}

.admin-page .editor-actions {
  gap: 12px;
  margin-top: 2px;
}

.admin-page .method-order-panel {
  min-height: 0;
  align-content: start;
}

.admin-page .method-order-head {
  min-height: 60px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--admin-line);
}

.admin-page .method-order-count,
.admin-page .method-order-position {
  color: #ffffff;
  background: linear-gradient(135deg, var(--admin-primary), #5474f4);
  border-radius: 14px;
  box-shadow: 0 10px 22px rgba(109, 141, 255, 0.2);
}

.admin-page .method-order-list {
  gap: 0;
  margin-top: 18px;
}

.admin-page .method-order-item {
  min-height: 86px;
  color: var(--admin-text);
  background: transparent;
  border-bottom: 1px solid var(--admin-line);
}

.admin-page .method-order-item:hover {
  background: rgba(109, 141, 255, 0.08);
}

.admin-page .method-order-info strong {
  color: var(--admin-text);
  font-weight: 950;
}

.admin-page .order-arrow:disabled {
  color: var(--admin-muted);
  background: rgba(148, 163, 184, 0.14);
  box-shadow: none;
}

.admin-page .withdraw-method-panel {
  min-height: 0;
  padding: 0;
}

.admin-page .withdraw-method-card {
  min-height: 0;
  gap: 18px;
  padding: 24px;
}

.admin-page .withdraw-method-head {
  min-height: 64px;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--admin-line);
}

.admin-page .withdraw-method-form {
  grid-template-columns: minmax(0, 440px);
  gap: 16px;
  padding: 0;
}

.admin-page .invoice-band {
  gap: 18px;
}

.admin-page .invoice-head {
  align-items: flex-start;
}

.admin-page .api-endpoints {
  gap: 8px;
}

.admin-page .invoice-head code,
.admin-page .api-endpoints code {
  color: var(--admin-muted-strong);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--admin-line);
  border-radius: 12px;
}

.admin-page:not(.theme-dark) .invoice-head code,
.admin-page:not(.theme-dark) .api-endpoints code {
  background: #f8fafc;
}

.admin-page .invoice-list {
  gap: 10px;
}

.admin-page .invoice-item {
  grid-template-columns: minmax(260px, 1fr) 170px 150px 120px;
  min-height: 74px;
  padding: 14px 16px;
  color: var(--admin-text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--admin-line);
  border-radius: 18px;
  transition: transform 220ms ease-out, background 220ms ease-out, border-color 220ms ease-out;
}

.admin-page:not(.theme-dark) .invoice-item {
  background: #ffffff;
}

.admin-page .invoice-item:hover {
  background: var(--admin-card-hover);
  border-color: rgba(109, 141, 255, 0.32);
  transform: translateY(-1px);
}

.admin-page .invoice-id {
  color: var(--admin-text);
  font-size: 14px;
}

.admin-page .invoice-status {
  color: var(--admin-muted-strong);
  background: rgba(148, 163, 184, 0.16);
  border-radius: 999px;
}

.admin-page .invoice-status-proof_uploaded,
.admin-page .invoice-status-approved {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.18);
}

.admin-page:not(.theme-dark) .invoice-status-proof_uploaded,
.admin-page:not(.theme-dark) .invoice-status-approved {
  color: #15803d;
}

.admin-page .invoice-status-rejected,
.admin-page .invoice-status-expired {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.18);
}

.admin-page:not(.theme-dark) .invoice-status-rejected,
.admin-page:not(.theme-dark) .invoice-status-expired {
  color: #b91c1c;
}

.admin-page .form-message.is-error {
  color: #fecaca;
}

.admin-page:not(.theme-dark) .form-message.is-error {
  color: #dc2626;
}

.admin-page .form-message.is-ok {
  color: #86efac;
}

.admin-page:not(.theme-dark) .form-message.is-ok {
  color: #16a34a;
}

.admin-page .login-panel {
  padding: 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(109, 141, 255, 0.24), transparent 34%),
    var(--admin-bg);
}

.admin-page .login-form {
  width: min(430px, 100%);
  padding: 34px;
}

.admin-page .login-form h1 {
  color: var(--admin-text);
  font-size: 32px;
}

@media (max-width: 1180px) {
  .admin-page .admin-workspace {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .admin-page .admin-grid {
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  }

  .admin-page .card-template-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .admin-page .admin-workspace,
  .admin-page .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-page .admin-side-nav {
    position: static;
    height: auto;
    min-height: auto;
    overflow: visible;
  }

  .admin-page .admin-side-menu {
    grid-template-columns: 1fr;
  }

  .admin-page .admin-main {
    padding: 18px;
  }

  .admin-page .methods-sidebar {
    position: static;
    max-height: none;
  }

  .admin-page .admin-method-list {
    max-height: none;
  }

  .admin-page .editor-panel {
    min-height: 0;
  }

  .admin-page .settings-form label,
  .admin-page .method-form .form-grid > label,
  .admin-page .card-template-grid label {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .admin-page .method-form .form-grid > label > input,
  .admin-page .method-form .form-grid > label > select,
  .admin-page .method-form .form-grid > label > textarea {
    grid-column: auto;
    grid-row: auto;
  }

  .admin-page .upload-field {
    grid-template-columns: 1fr;
  }

  .admin-page .upload-hint,
  .admin-page .asset-preview {
    grid-column: auto;
    grid-row: auto;
  }

  .admin-page .card-requisite-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .admin-page .admin-main {
    padding: 12px;
  }

  .admin-topbar {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
    padding: 18px;
    border-radius: 20px;
  }

  .admin-page .settings-band,
  .admin-page .invoice-band,
  .admin-page .methods-sidebar,
  .admin-page .withdraw-method-panel,
  .admin-page .method-order-panel,
  .admin-page .editor-panel {
    padding: 16px;
    border-radius: 20px;
  }

  .admin-page .withdraw-method-card {
    padding: 0;
  }

  .admin-page .sidebar-head,
  .admin-page .editor-head,
  .admin-page .invoice-head,
  .admin-page .method-order-head,
  .admin-page .withdraw-method-head {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-page .sidebar-actions,
  .admin-page .api-endpoints,
  .admin-page .editor-actions,
  .admin-page .method-order-controls {
    width: 100%;
  }

  .admin-page .button,
  .admin-page .category-toggle {
    width: 100%;
  }

  .admin-page .icon-button,
  .admin-page .order-arrow {
    width: 44px;
    flex: 0 0 auto;
  }

  .admin-page .invoice-item,
  .admin-page .method-order-item {
    grid-template-columns: 1fr;
  }
}

/* Compact fixes for method assets and switches */
.admin-page .method-form .form-grid > label.upload-field {
  grid-template-columns: minmax(150px, 210px) minmax(0, 220px) max-content minmax(112px, 160px);
  column-gap: 12px;
  overflow: hidden;
}

.admin-page .upload-field input[type="file"] {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 40px;
  height: 40px;
  padding: 7px 9px;
  overflow: hidden;
  box-sizing: border-box;
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.admin-page .upload-field .upload-hint {
  min-width: 0;
  font-size: 12px;
  white-space: nowrap;
}

.admin-page .upload-field .asset-preview {
  min-width: 112px;
  max-width: 160px;
  min-height: 48px;
  overflow: hidden;
}

.admin-page .editor-head .toggle-line {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 136px;
  margin-left: auto;
  padding: 8px 10px;
  color: var(--admin-muted-strong);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--admin-line);
  border-radius: 999px;
}

.admin-page:not(.theme-dark) .editor-head .toggle-line {
  background: rgba(15, 23, 42, 0.04);
}

.admin-page .toggle-line input[type="checkbox"],
.admin-page .card-requisite-check input[type="checkbox"] {
  appearance: none;
  position: relative;
  width: 48px;
  min-width: 48px;
  max-width: 48px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  background: rgba(148, 163, 184, 0.25);
  border: 1px solid var(--admin-line-strong);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.18);
  transition: background 180ms ease-out, border-color 180ms ease-out, box-shadow 180ms ease-out;
}

.admin-page .toggle-line input[type="checkbox"]::after,
.admin-page .card-requisite-check input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #ffffff;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.24);
  transition: transform 180ms ease-out;
}

.admin-page .toggle-line input[type="checkbox"]:checked,
.admin-page .card-requisite-check input[type="checkbox"]:checked {
  background: linear-gradient(135deg, var(--admin-primary), var(--admin-success));
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.18);
}

.admin-page .toggle-line input[type="checkbox"]:checked::after,
.admin-page .card-requisite-check input[type="checkbox"]:checked::after {
  transform: translateX(22px);
}

.admin-page .card-requisite-row {
  /*
   * The requisites editor is rendered inside the right-hand column of the
   * payment-methods screen.  Seven columns had a larger minimum width than
   * that column, so the last fields were clipped by the list container.
   */
  grid-template-columns: minmax(120px, 150px) repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "toggle bank country"
    "toggle recipient type"
    "toggle requisite remove";
  align-items: end;
}

.admin-page .card-requisite-row > .card-requisite-check {
  grid-area: toggle;
}

.admin-page .card-requisite-row > label:nth-child(2) {
  grid-area: bank;
}

.admin-page .card-requisite-row > label:nth-child(3) {
  grid-area: country;
}

.admin-page .card-requisite-row > label:nth-child(4) {
  grid-area: recipient;
}

.admin-page .card-requisite-row > label:nth-child(5) {
  grid-area: type;
}

.admin-page .card-requisite-row > label:nth-child(6) {
  grid-area: requisite;
}

.admin-page .card-requisite-row > .card-requisite-remove {
  grid-area: remove;
  width: 100%;
}

@media (max-width: 760px) {
  .admin-page .card-requisite-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      "toggle"
      "bank"
      "country"
      "recipient"
      "type"
      "requisite"
      "remove";
  }
}

.admin-page .card-requisite-check {
  grid-template-columns: 48px minmax(0, 1fr);
  justify-items: start;
  align-items: center;
  align-self: stretch;
  min-height: 68px;
  padding: 10px 12px;
  background: rgba(109, 141, 255, 0.08);
  border: 1px solid var(--admin-line);
  border-radius: 16px;
}

@media (max-width: 1180px) {
  .admin-page .method-form .form-grid > label.upload-field {
    grid-template-columns: 1fr;
  }

  .admin-page .upload-field input[type="file"],
  .admin-page .upload-field .upload-hint,
  .admin-page .upload-field .asset-preview {
    grid-column: auto;
    grid-row: auto;
    max-width: none;
  }
}

/* GoldenX Admin visual language for the NSPKPay control center. */
.nspk-control {
  --admin-bg: #060e1c;
  --admin-bg-soft: #0b1627;
  --admin-surface: rgba(14, 25, 45, 0.9);
  --admin-surface-strong: rgba(18, 32, 56, 0.97);
  --admin-card: rgba(15, 27, 48, 0.9);
  --admin-card-hover: rgba(26, 43, 73, 0.98);
  --admin-text: #f7f9ff;
  --admin-muted: #8e9cb8;
  --admin-muted-strong: #c1cce2;
  --admin-line: rgba(104, 137, 205, 0.2);
  --admin-line-strong: rgba(130, 159, 224, 0.36);
  --admin-primary: #6685ff;
  --admin-primary-hover: #7895ff;
  --admin-success: #38d996;
  --admin-danger: #f05d7c;
  --admin-radius-lg: 28px;
  --admin-radius: 20px;
  --admin-radius-sm: 15px;
  --admin-shadow: 0 22px 72px rgba(0, 4, 17, 0.42);
  --admin-glow: 0 16px 40px rgba(92, 125, 255, 0.26);
  background:
    radial-gradient(720px 560px at 12% -10%, rgba(82, 115, 240, 0.26), transparent 72%),
    radial-gradient(680px 500px at 104% 0%, rgba(21, 164, 169, 0.14), transparent 68%),
    linear-gradient(135deg, #050d19 0%, #071323 48%, #060e1c 100%);
}

.nspk-control:not(.theme-dark) {
  --admin-bg: #f5f8ff;
  --admin-bg-soft: #ecf2fb;
  --admin-surface: rgba(255, 255, 255, 0.94);
  --admin-surface-strong: rgba(255, 255, 255, 0.99);
  --admin-card: rgba(255, 255, 255, 0.95);
  --admin-card-hover: #ffffff;
  --admin-text: #14213b;
  --admin-muted: #6e7d98;
  --admin-muted-strong: #33415d;
  --admin-line: rgba(65, 94, 147, 0.14);
  --admin-line-strong: rgba(65, 94, 147, 0.25);
  --admin-shadow: 0 20px 54px rgba(34, 55, 92, 0.12);
  background:
    radial-gradient(680px 520px at 8% -10%, rgba(102, 133, 255, 0.22), transparent 72%),
    linear-gradient(135deg, #f7faff 0%, #eef3fb 100%);
}

.nspk-control .admin-workspace {
  grid-template-columns: 296px minmax(0, 1fr);
}

.nspk-control .admin-main {
  padding: 30px clamp(22px, 3vw, 46px) 46px;
}

.nspk-control .admin-side-nav {
  gap: 20px;
  padding: 25px 20px 20px;
  background:
    linear-gradient(180deg, rgba(11, 23, 43, 0.98), rgba(7, 16, 31, 0.99)),
    var(--admin-bg);
  border-right-color: rgba(109, 141, 255, 0.18);
  box-shadow: 18px 0 60px rgba(0, 6, 20, 0.34);
}

.nspk-control:not(.theme-dark) .admin-side-nav {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 246, 255, 0.98));
}

.nspk-control .admin-side-brand {
  min-height: 70px;
  gap: 13px;
  padding: 0 8px 20px;
}

.nspk-control .admin-side-brand::before {
  display: none;
}

.nspk-control .admin-side-brand > .admin-side-brand__mark {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(145deg, #7090ff, #4e6ee6 58%, #2ecf9a);
  border: 1px solid rgba(203, 219, 255, 0.46);
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(76, 106, 231, 0.31), inset 0 1px rgba(255, 255, 255, 0.22);
}

.nspk-control .admin-side-brand__mark svg {
  width: 28px;
  height: 28px;
}

.nspk-control .admin-side-brand > .admin-side-brand__copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.nspk-control .admin-side-brand__copy strong {
  color: var(--admin-text);
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -0.04em;
  line-height: 1;
}

.nspk-control .admin-side-brand__copy small {
  color: var(--admin-muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.nspk-control .admin-side-link {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  min-height: 52px;
  gap: 12px;
  padding: 0 14px;
  border-radius: 17px;
}

.nspk-control .admin-side-link::before {
  display: none;
}

.nspk-control .admin-nav-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: currentColor;
}

.nspk-control .admin-nav-icon svg {
  width: 20px;
  height: 20px;
}

.nspk-control .admin-side-link.is-active,
.nspk-control .admin-side-sublink.is-active {
  background: linear-gradient(135deg, rgba(100, 132, 255, 0.34), rgba(72, 105, 207, 0.16));
  border-color: rgba(118, 149, 255, 0.56);
  box-shadow: inset 3px 0 0 #7595ff, 0 13px 30px rgba(72, 108, 231, 0.19);
}

.nspk-control .admin-side-link:hover,
.nspk-control .admin-side-sublink:hover {
  background: rgba(103, 133, 244, 0.13);
  border-color: rgba(122, 151, 255, 0.24);
}

.nspk-control .admin-side-link--group::after {
  right: 18px;
  width: 7px;
  height: 7px;
}

.nspk-control .admin-side-submenu {
  margin-left: 26px;
  padding-left: 15px;
  border-left: 1px solid rgba(120, 148, 211, 0.2);
}

.nspk-control .admin-side-sublink {
  min-height: 35px;
  padding: 0 10px;
  font-size: 13px;
}

.nspk-control .admin-side-sublink::before {
  position: static;
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 9px;
  background: currentColor;
  transform: none;
}

.nspk-control .admin-side-footer {
  padding: 17px 8px 0;
}

.nspk-control .theme-toggle,
.nspk-control .admin-side-footer .button {
  min-height: 50px;
  border-radius: 16px;
}

.nspk-control .admin-topbar {
  min-height: 104px;
  margin-bottom: 26px;
  padding: 24px 28px;
  background:
    linear-gradient(115deg, rgba(20, 35, 61, 0.96), rgba(12, 25, 47, 0.9)),
    var(--admin-surface);
  border-color: rgba(106, 140, 220, 0.27);
  border-radius: 29px;
  box-shadow: var(--admin-shadow), inset 0 1px rgba(255, 255, 255, 0.06);
}

.nspk-control .admin-topbar__actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.nspk-control .admin-topbar__context {
  padding: 9px 12px;
  color: var(--admin-muted);
  background: rgba(6, 13, 29, 0.22);
  border: 1px solid var(--admin-line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.nspk-control .admin-live-status {
  min-height: 40px;
  color: #c8ffe7;
  background: rgba(27, 202, 136, 0.12);
  border-color: rgba(63, 218, 157, 0.28);
}

.nspk-control .settings-band,
.nspk-control .invoice-band,
.nspk-control .methods-sidebar,
.nspk-control .withdraw-method-panel,
.nspk-control .method-order-panel,
.nspk-control .editor-panel,
.nspk-control .login-form {
  border-color: rgba(101, 136, 214, 0.22);
  box-shadow: var(--admin-shadow), inset 0 1px rgba(255, 255, 255, 0.035);
}

.nspk-control .settings-band,
.nspk-control .invoice-band,
.nspk-control .method-order-panel {
  padding: 27px;
}

.nspk-control .admin-grid {
  grid-template-columns: minmax(306px, 372px) minmax(0, 1fr);
  gap: 24px;
}

.nspk-control .methods-sidebar {
  top: 30px;
  padding: 21px;
}

.nspk-control .editor-panel {
  padding: 28px;
}

.nspk-control .admin-method-item,
.nspk-control .invoice-item {
  border-color: rgba(102, 137, 211, 0.18);
  background: linear-gradient(135deg, rgba(28, 43, 72, 0.8), rgba(17, 30, 52, 0.76));
}

.nspk-control:not(.theme-dark) .admin-method-item,
.nspk-control:not(.theme-dark) .invoice-item {
  background: #ffffff;
}

.nspk-control .admin-method-item.is-active {
  border-color: rgba(117, 149, 255, 0.66);
  background: linear-gradient(135deg, rgba(98, 132, 255, 0.28), rgba(24, 43, 80, 0.84));
  box-shadow: inset 3px 0 #7595ff, 0 16px 34px rgba(79, 113, 244, 0.17);
}

.nspk-control .form-grid,
.nspk-control .card-template-grid,
.nspk-control .card-requisites-list,
.nspk-control .method-order-list {
  border-color: rgba(102, 137, 211, 0.2);
  background: rgba(5, 15, 31, 0.22);
}

.nspk-control:not(.theme-dark) .form-grid,
.nspk-control:not(.theme-dark) .card-template-grid,
.nspk-control:not(.theme-dark) .card-requisites-list,
.nspk-control:not(.theme-dark) .method-order-list {
  background: #ffffff;
}

/* Keep the complete text template visible in the NSPKPay editor. */
.nspk-control .card-template-layout {
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.nspk-control .card-template-grid {
  overflow: visible;
  border-radius: 20px;
}

.nspk-control .card-template-grid label {
  grid-template-columns: minmax(170px, 0.38fr) minmax(0, 1fr);
  min-width: 0;
}

.nspk-control .card-template-grid textarea {
  max-width: 100%;
  overflow: auto;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.nspk-control .placeholder-help {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 620px) {
  .nspk-control .card-template-grid label {
    grid-template-columns: minmax(0, 1fr);
  }
}

.nspk-control input,
.nspk-control textarea,
.nspk-control select {
  background: rgba(6, 16, 34, 0.48);
  border-color: rgba(122, 150, 213, 0.3);
}

.nspk-control:not(.theme-dark) input,
.nspk-control:not(.theme-dark) textarea,
.nspk-control:not(.theme-dark) select {
  background: #f8faff;
}

.nspk-control .button-primary,
.nspk-control .icon-button,
.nspk-control .order-arrow {
  background: linear-gradient(135deg, #6d8cff, #5473ed);
  box-shadow: 0 13px 30px rgba(84, 115, 237, 0.31), inset 0 1px rgba(255, 255, 255, 0.2);
}

.nspk-control .button-primary:hover,
.nspk-control .icon-button:hover,
.nspk-control .order-arrow:hover:not(:disabled) {
  background: linear-gradient(135deg, #7c99ff, #5b7bf4);
}

.nspk-control .login-panel {
  padding: 28px;
  background:
    radial-gradient(620px 520px at 16% 18%, rgba(99, 131, 255, 0.27), transparent 64%),
    radial-gradient(520px 480px at 92% 92%, rgba(25, 207, 154, 0.1), transparent 68%),
    var(--admin-bg);
}

.nspk-control .login-form {
  position: relative;
  width: min(440px, 100%);
  padding: 36px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(22, 38, 67, 0.98), rgba(13, 26, 47, 0.98));
}

.nspk-control .login-form::before {
  content: "N";
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 22px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(145deg, #7090ff, #4e6ee6 58%, #2ecf9a);
  border-radius: 18px;
  box-shadow: var(--admin-glow);
  font-size: 22px;
  font-weight: 950;
}

.nspk-control .login-form h1 {
  margin-bottom: 26px;
  font-size: 30px;
  letter-spacing: -0.035em;
}

@media (max-width: 980px) {
  .nspk-control .admin-workspace,
  .nspk-control .admin-grid {
    grid-template-columns: 1fr;
  }

  .nspk-control .admin-side-nav {
    position: static;
    height: auto;
  }

  .nspk-control .admin-side-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nspk-control .admin-side-group {
    grid-column: span 2;
  }

  .nspk-control .admin-side-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .nspk-control .admin-main {
    padding: 14px;
  }

  .nspk-control .admin-side-menu,
  .nspk-control .admin-side-footer {
    grid-template-columns: 1fr;
  }

  .nspk-control .admin-side-group {
    grid-column: auto;
  }

  .nspk-control .admin-topbar {
    min-height: 0;
    padding: 20px;
  }

  .nspk-control .admin-topbar__actions {
    flex-wrap: wrap;
  }

  .nspk-control .admin-topbar__context {
    display: none;
  }
}

/* Desktop sidebar can be collapsed without losing navigation. The state is
 * kept by admin.js, while the compact layout deliberately leaves only the
 * section icons visible. */
.nspk-control .admin-side-collapse {
  display: inline-grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  margin-left: auto;
  color: var(--admin-muted-strong);
  background: rgba(109, 141, 255, 0.1);
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  transition: color 180ms ease-out, background 180ms ease-out, border-color 180ms ease-out, transform 180ms ease-out;
}

.nspk-control .admin-side-collapse svg {
  width: 20px;
  height: 20px;
  transition: transform 220ms ease-out;
}

.nspk-control .admin-side-collapse:hover {
  color: #ffffff;
  background: rgba(109, 141, 255, 0.24);
  border-color: rgba(109, 141, 255, 0.54);
}

@media (min-width: 981px) {
  .nspk-control .admin-workspace--sidebar-collapsed {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .nspk-control .admin-workspace--sidebar-collapsed .admin-side-nav {
    padding: 20px 12px;
  }

  .nspk-control .admin-workspace--sidebar-collapsed .admin-side-brand {
    min-height: 62px;
    justify-content: center;
    padding-bottom: 18px;
  }

  .nspk-control .admin-workspace--sidebar-collapsed .admin-side-brand__copy,
  .nspk-control .admin-workspace--sidebar-collapsed .admin-side-link > span:not(.admin-nav-icon),
  .nspk-control .admin-workspace--sidebar-collapsed .admin-side-control-label {
    display: none;
  }

  .nspk-control .admin-workspace--sidebar-collapsed .admin-side-brand::before {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    font-size: 19px;
  }

  .nspk-control .admin-workspace--sidebar-collapsed .admin-side-collapse {
    position: absolute;
    right: -5px;
    bottom: -19px;
    z-index: 2;
    width: 32px;
    height: 32px;
    border-radius: 50%;
  }

  .nspk-control .admin-workspace--sidebar-collapsed .admin-side-collapse svg {
    transform: rotate(180deg);
  }

  .nspk-control .admin-workspace--sidebar-collapsed .admin-side-link {
    justify-content: center;
    min-height: 48px;
    padding: 0;
  }

  .nspk-control .admin-workspace--sidebar-collapsed .admin-side-link::before,
  .nspk-control .admin-workspace--sidebar-collapsed .admin-side-submenu {
    display: none;
  }

  .nspk-control .admin-workspace--sidebar-collapsed .admin-side-group {
    gap: 0;
  }

  .nspk-control .admin-workspace--sidebar-collapsed .admin-side-footer {
    justify-items: center;
    gap: 10px;
  }

  .nspk-control .admin-workspace--sidebar-collapsed .theme-toggle,
  .nspk-control .admin-workspace--sidebar-collapsed .admin-side-footer .button {
    display: inline-flex;
    width: 48px;
    min-width: 48px;
    justify-content: center;
    padding: 0;
  }

  .nspk-control .admin-workspace--sidebar-collapsed .theme-toggle__icon {
    margin: 0;
  }
}

/* Checkout QR alignment: below the two-column breakpoint the QR becomes its
 * own grid row. A fixed-width grid item with margin: 0 is placed at the start
 * of that row, which made it look offset on phones. Centre the item through
 * grid alignment and constrain it by the content width, not the viewport. */
@media (max-width: 920px) {
  .payment-template .details-hero > .qr-frame,
  .payment-template .sberpay-hero > .qr-frame {
    justify-self: center;
    align-self: center;
    margin-inline: auto;
  }
}

@media (max-width: 620px) {
  .payment-template .details-hero > .qr-frame {
    width: min(240px, 100%);
    max-width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
  }

  .payment-template .sberpay-hero > .qr-frame {
    width: min(300px, 100%);
    max-width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
  }

  .payment-template .qr-frame > .qr-open-link,
  .payment-template .qr-frame > .qr-open-link > img,
  .payment-template .qr-frame > .qr-grid {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
  }
}
