:root {
  --bg: #f0e6d8;
  --bg-dark: #e5d9c8;
  --card: #ffffff;
  --burgundy: #7a1a1a;
  --burgundy-dark: #5a1010;
  --brown: #3d1f0a;
  --gold: #b8860b;
  --yellow-bg: #fff8e1;
  --yellow-border: #e8d48b;
  --text: #1a1a1a;
  --text-secondary: #6b5a4a;
  --border: #ddd0c0;
  --shadow: 0 8px 32px rgba(61, 31, 10, 0.12);
  --shadow-sm: 0 2px 8px rgba(61, 31, 10, 0.08);
  --radius: 20px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Inter", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.app {
  width: 100%;
  max-width: 420px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px 16px 32px;
  background: var(--bg);
}

.app-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.header-emblem {
  flex-shrink: 0;
  width: 52px;
  height: 62px;
}

.emblem-svg {
  width: 100%;
  height: 100%;
}

.header-text {
  display: grid;
  gap: 2px;
  flex: 1;
}

.header-bank {
  color: var(--burgundy);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.header-sub {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.header-badges {
  flex-shrink: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.badge--spei {
  color: #fff;
  background: var(--burgundy);
}

.hero {
  text-align: center;
  margin-bottom: 24px;
}

.hero__title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 8px;
}

.hero__sub {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px 26px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.card__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(122, 26, 26, 0.08);
  flex-shrink: 0;
}

.card__title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

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

.field__label {
  color: var(--brown);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.field__input {
  width: 100%;
  height: 50px;
  padding: 0 15px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #faf7f3;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.field__wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.field__input {
  padding-right: 44px;
}

.field__copy {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 10px;
  background: rgba(122, 26, 26, 0.06);
  color: var(--burgundy);
  font-size: 15px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s ease, transform 0.15s ease;
  line-height: 1;
}

.field__copy:hover {
  background: rgba(122, 26, 26, 0.14);
}

.field__copy:active {
  transform: translateY(-50%) scale(0.88);
}

.field__input[readonly] {
  cursor: pointer;
}

.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--brown);
  color: #fff;
  padding: 10px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  z-index: 100;
}

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

.btn-submit {
  display: block;
  width: 100%;
  height: 54px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--burgundy);
  color: #fff;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  margin-bottom: 4px;
}

.btn-submit:hover {
  background: var(--burgundy-dark);
}

.btn-submit:active {
  transform: scale(0.97);
}

.field__input::placeholder {
  color: #b5a898;
  font-weight: 400;
}

.field__input:focus {
  border-color: var(--burgundy);
  background: var(--card);
  box-shadow: 0 0 0 3px rgba(122, 26, 26, 0.1);
}

.aviso-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 16px 18px;
  border: 1px solid var(--yellow-border);
  border-radius: var(--radius);
  background: var(--yellow-bg);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  font: inherit;
  text-align: left;
  margin-bottom: 16px;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
}

.aviso-btn:hover {
  background: #fffae6;
  box-shadow: var(--shadow);
}

.aviso-btn:active {
  transform: scale(0.99);
}

.aviso-btn__icon {
  font-size: 16px;
  line-height: 1;
}

.aviso-btn__text {
  flex: 1;
  font-size: 15px;
  font-weight: 700;
  color: var(--brown);
}

.aviso-btn__arrow {
  font-size: 14px;
  color: var(--text-secondary);
  transition: transform 0.25s ease;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 18, 6, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 20px;
}

.modal-overlay--open {
  opacity: 1;
  visibility: visible;
}

.modal {
  width: 100%;
  max-width: 440px;
  max-height: 88vh;
  background: var(--card);
  border-radius: 26px 26px 24px 24px;
  box-shadow: 0 20px 60px rgba(30, 18, 6, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(30px);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-overlay--open .modal {
  transform: translateY(0);
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal__header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal__icon {
  font-size: 18px;
}

.modal__title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--brown);
}

.modal__close {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 999px;
  background: rgba(61, 31, 10, 0.06);
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.modal__close:hover {
  background: rgba(61, 31, 10, 0.12);
}

.modal__body {
  padding: 18px 22px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal__alert {
  background: rgba(122, 26, 26, 0.06);
  border-left: 3px solid var(--burgundy);
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--burgundy-dark);
  margin-bottom: 22px;
}

.modal-step {
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
}

.modal-step:last-of-type {
  margin-bottom: 0;
}

.modal-step__num {
  flex-shrink: 0;
  font-size: 22px;
  line-height: 1.4;
}

.modal-step__body {
  flex: 1;
}

.modal-step__title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--brown);
}

.modal-step__body p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 6px;
}

.modal-step__body p:last-child {
  margin-bottom: 0;
}

.modal-step__list {
  margin: 6px 0 8px;
  padding-left: 20px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.modal-step__list li {
  list-style: disc;
}

.modal-code {
  background: rgba(61, 31, 10, 0.06);
  padding: 2px 10px;
  border-radius: 6px;
  font-family: "Inter", monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--burgundy);
}

.modal-step__note {
  position: relative;
  padding-left: 0;
  font-size: 13px !important;
  color: var(--text-secondary) !important;
}

.modal-help {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding: 14px 16px;
  background: rgba(61, 31, 10, 0.03);
  border-radius: 12px;
}

.modal-help__icon {
  flex-shrink: 0;
  font-size: 18px;
  line-height: 1.4;
}

.modal-help__body {
  flex: 1;
}

.modal-help__body strong {
  display: block;
  font-size: 14px;
  color: var(--brown);
  margin-bottom: 4px;
}

.modal-help__body p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.footer-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 24px 0 8px;
}

.footer-badge {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0.7;
}

.footer-dot {
  color: var(--text-secondary);
  font-size: 11px;
  opacity: 0.4;
}

@media (min-width: 480px) {
  .app {
    padding: 32px 24px 40px;
  }

  .hero__title {
    font-size: 34px;
  }

  .card {
    padding: 26px 24px 30px;
  }

  .field__input {
    height: 54px;
    font-size: 16px;
  }
}

@media (min-width: 768px) {
  body {
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .app {
    max-width: 440px;
    min-height: auto;
    margin: 40px auto;
    border-radius: 32px;
    background: var(--bg);
    box-shadow: var(--shadow);
    padding: 32px 24px 28px;
  }
}
