:root {
  --red: #e30613;
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --shadow: 0 10px 30px rgba(2, 6, 23, 0.08);
  --radius: 16px;
  --shadow-strong: 0 18px 60px rgba(2, 6, 23, 0.14);
  --danger: #b91c1c;
  --warning: #f59e0b;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: url('background.jpg') center center/cover no-repeat fixed,
    radial-gradient(1200px 600px at 50% -20%, rgba(227, 6, 19, 0.08), transparent 60%),
    var(--bg);
}

.app {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.phone {
  width: min(100%, 430px);
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.header {
  padding: 16px 14px 10px;
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  z-index: 5;
}

.brand {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand__logo {
  height: 44px;
  width: auto;
  display: block;
}

.stepper {
  max-width: 520px;
  margin: 10px auto 0;
  display: grid;
  gap: 8px;
}

.stepper__track {
  height: 8px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.9);
  overflow: hidden;
}

.stepper__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(227, 6, 19, 0.65), rgba(227, 6, 19, 1));
  border-radius: 999px;
  transition: width 400ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(227, 6, 19, 0.3);
}

.stepper__labels {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.stepper__label {
  font-size: 10px;
  color: #94a3b8;
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.stepper__label.is-active {
  color: var(--red);
}

.main {
  padding: 14px;
  display: block;
}

.screens {
  width: 100%;
  position: relative;
}

.card {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-strong);
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  pointer-events: none;
  transition:
    opacity 300ms ease,
    transform 300ms ease,
    box-shadow 300ms ease;
  position: absolute;
  inset: 0;
}

.card.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  position: relative;
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.12);
}

.card__header {
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(227, 6, 19, 0.06), rgba(227, 6, 19, 0));
}

.card__content {
  padding: 18px;
}

.title {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 10px 0 0;
  font-size: 18px;
}

.text {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.5;
}

.alert {
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 14px;
  padding: 12px;
  margin: 10px 0 14px;
  background: rgba(245, 158, 11, 0.1);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  animation: slideIn 0.4s ease;
  transition: all 0.3s ease;
}

.alert:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

.alert--danger {
  border-color: rgba(185, 28, 28, 0.3);
  background: rgba(185, 28, 28, 0.1);
}

.alert--warning {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.1);
}

.alert__icon {
  font-size: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}

.alert__content {
  font-size: 14px;
  line-height: 1.4;
}

.info {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  margin: 10px 0 14px;
  background: #fff;
  animation: fadeIn 0.5s ease;
  transition: all 0.3s ease;
}

.info:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.info__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 6px 0;
  color: var(--text);
}

.info__label {
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.info__icon {
  height: 18px;
  width: 18px;
  color: rgba(227, 6, 19, 0.9);
  display: inline-grid;
  place-items: center;
}

.info__icon svg {
  height: 18px;
  width: 18px;
}

.info__value {
  font-weight: 700;
  color: #0b1220;
}

.info__value--negative {
  color: var(--red);
}

.security-info {
  border: 1px solid rgba(227, 6, 19, 0.3);
  border-radius: 14px;
  padding: 16px;
  margin: 10px 0 14px;
  background: rgba(227, 6, 19, 0.06);
  text-align: center;
  animation: slideIn 0.6s ease;
  transition: all 0.3s ease;
}

.security-info:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(227, 6, 19, 0.15);
}

.security-info__icon {
  font-size: 32px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
}

.security-info__title {
  margin: 8px 0 4px;
  font-size: 18px;
  font-weight: 700;
  color: var(--red);
}

.actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
}

.btn {
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.btn--primary:hover {
  background: #cc0510;
  border-color: #cc0510;
  box-shadow: 0 8px 25px rgba(227, 6, 19, 0.3);
}

.btn--primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.btn--primary:hover::before {
  left: 100%;
}

.btn--secondary {
  background: #fff;
  border-color: rgba(227, 6, 19, 0.25);
  color: var(--red);
}

.btn--secondary:hover {
  background: rgba(227, 6, 19, 0.05);
  border-color: rgba(227, 6, 19, 0.4);
}

.btn:focus-visible,
.key:focus-visible,
.link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(227, 6, 19, 0.16);
}

.form {
  display: grid;
  gap: 12px;
}

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

.field {
  display: grid;
  gap: 6px;
}

.field--half {
  display: grid;
  gap: 6px;
}

.field__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.field__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1f2937;
}

.helper {
  font-size: 12px;
  color: #94a3b8;
}

.input {
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 14px;
  outline: none;
  transition: all 0.3s ease;
  position: relative;
}

.input:focus {
  border-color: rgba(227, 6, 19, 0.55);
  box-shadow: 0 0 0 4px rgba(227, 6, 19, 0.12);
  transform: translateY(-1px);
}

.input:hover {
  border-color: rgba(227, 6, 19, 0.3);
}

.link {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  color: var(--red);
  font-weight: 600;
  cursor: pointer;
}

.hint {
  color: var(--muted);
  border-left: 3px solid rgba(227, 6, 19, 0.35);
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(227, 6, 19, 0.06);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  font-weight: 600;
  max-width: min(92vw, 420px);
  box-shadow: 0 20px 70px rgba(2, 6, 23, 0.35);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
  z-index: 50;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.is-danger {
  background: rgba(185, 28, 28, 0.92);
}

.loading {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(8px);
  z-index: 40;
}

.loading__card {
  width: min(92vw, 380px);
  border-radius: 18px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #fff;
  box-shadow: var(--shadow-strong);
  padding: 16px;
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
}

.loading__spinner {
  height: 34px;
  width: 34px;
  border-radius: 999px;
  border: 3px solid rgba(227, 6, 19, 0.22);
  border-top-color: rgba(227, 6, 19, 0.95);
  animation: spin 900ms linear infinite;
}

.loading__title {
  font-weight: 800;
  letter-spacing: -0.01em;
}

.loading__text {
  font-size: 13px;
  color: #64748b;
}

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

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.success {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.success__badge {
  height: 54px;
  width: 54px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(227, 6, 19, 0.12);
  color: var(--red);
}

.confirmation-details {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  margin: 10px 0 14px;
  background: #fff;
}

.confirmation-details__item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 6px 0;
  color: var(--text);
}

.confirmation-details__label {
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.confirmation-details__value {
  font-weight: 700;
  color: #0b1220;
}

.confirmation-details__value--blocked {
  color: var(--danger);
}

.confirmation-details__value--secured {
  color: var(--red);
}

.footer {
  padding: 14px 16px 18px;
}

.footer__inner {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
  color: #94a3b8;
  font-size: 12px;
}

.is-hidden {
  display: none;
}

.grid {
  display: grid;
  gap: 12px;
}

@media (min-width: 520px) {
  .header {
    padding-top: 26px;
  }

  .brand__logo {
    height: 52px;
  }

  .card__content {
    padding: 20px;
  }
}
