.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at top left, rgba(65, 153, 252, 0.1), transparent 30rem),
    #fff;
}

.topbar {
  width: 100%;
  max-width: 1200px;
  height: 145px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.top-link {
  width: 100px;
  text-align: center;
  color: #5878bc;
  font-size: 20px;
  font-weight: 500;
}

.brand {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 0 20px;
}

.brand-mark {
  width: clamp(70px, 10vw, 120px);
  height: clamp(70px, 10vw, 120px);
  display: grid;
  place-items: center;
  border-radius: 34px;
  background: linear-gradient(145deg, #f5fbff, #ffffff);
  box-shadow: 0 18px 45px rgba(65, 153, 252, 0.16);
}

.brand-mark svg {
  width: 68%;
  height: 68%;
}

.content {
  width: 100%;
  max-width: 1064px;
  margin: 0 auto;
  flex: 1;
  padding: 0 24px 30px;
  text-align: center;
}

.hero {
  display: flex;
  justify-content: center;
  padding: 5px 0 28px;
}

.hero-copy {
  max-width: 700px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--color-blue);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  color: #26384d;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 600;
}

.hero-text {
  margin: 24px auto 0;
  color: var(--color-text);
  font-size: 18px;
  font-weight: 300;
  line-height: 1.45;
}

.tabs {
  width: min(420px, 100%);
  margin: 0 auto 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tab-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--color-text);
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(88, 112, 135, 0.07);
}

.tab-link.active {
  color: #fff;
  background: var(--color-blue);
  border-color: var(--color-blue);
}

.wallet-section {
  position: relative;
  z-index: 0;
  width: 100%;
  margin-bottom: 34px;
}

.searchbox {
  max-width: 620px;
  margin: 0 auto 24px;
}

.searchbox input {
  width: 100%;
  height: 48px;
  padding: 0 22px;
  border: 1px solid #d6e2ef;
  border-radius: 999px;
  color: #26384d;
  background: #fff;
  box-shadow: 0 12px 28px rgba(88, 112, 135, 0.08);
  outline: none;
}

.searchbox input:focus {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 4px rgba(65, 153, 252, 0.12);
}

.wallet-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 30px;
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.72);
}

.wallet-card {
  min-height: 166px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  border-radius: 22px;
  background: transparent;
  color: var(--color-text);
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.wallet-card:hover,
.wallet-card:focus-visible {
  transform: translateY(-3px);
  background: #fff;
  box-shadow: var(--shadow-card);
  outline: none;
}

.wallet-icon {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 25px 25px 10px;
}

.wallet-icon-frame {
  width: 92px;
  height: 92px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(145deg, #eef6ff, #dfefff);
  color: #4073b6;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.wallet-icon-frame.square {
  border-radius: 22px;
}

.wallet-icon-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wallet-icon-frame.contain img {
  object-fit: contain;
  padding: 6px;
  background: #fff;
}

.wallet-fallback {
  display: none;
}

.wallet-fallback.is-visible {
  display: inline;
}

.wallet-name {
  max-width: 100%;
  padding: 0 10px 18px;
  color: var(--color-text);
  font-size: 16px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.empty-state {
  margin: 28px 0;
  color: var(--color-muted);
  font-weight: 700;
}

.footer {
  width: 100%;
  max-width: 1200px;
  min-height: 150px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-link {
  width: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 700;
}

.social-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #587087;
  font-size: 12px;
}

.manual-panel {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(22, 34, 48, 0.22);
  backdrop-filter: blur(2px);
}

.manual-card {
  width: min(410px, 100%);
  position: relative;
  padding: 30px 24px 26px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-modal);
  text-align: center;
}

.close-manual {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #8a9aaa;
  background: transparent;
}

.close-manual svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.back-action {
  margin: 0 auto 14px;
  color: var(--color-blue);
  background: transparent;
  font-weight: 700;
}

.loading-orbit {
  width: 46px;
  height: 46px;
  margin: 0 auto 12px;
  border: 4px solid #eef5fc;
  border-top-color: var(--color-blue);
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
}

.manual-title {
  margin: 0 0 18px;
  color: #26384d;
  font-weight: 700;
}

.manual-wallet {
  width: 100%;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  color: #26384d;
  background: #fff;
  box-shadow: 0 10px 24px rgba(88, 112, 135, 0.08);
  text-align: left;
}

.manual-wallet strong {
  display: block;
  color: #e8831d;
  font-size: 18px;
}

.manual-wallet small {
  display: block;
  margin-top: 4px;
  color: var(--color-muted);
  font-size: 13px;
}

.manual-icon,
.modal-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(145deg, #eef6ff, #dfefff);
  color: #4073b6;
  font-weight: 800;
}

.manual-icon {
  width: 42px;
  height: 42px;
}

.manual-icon img,
.modal-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(10, 15, 24, 0.74);
}

.import-modal {
  width: min(820px, 100%);
  overflow: hidden;
  border-radius: 8px;
  background: #1b1c1e;
  box-shadow: var(--shadow-modal);
  text-align: left;
}

.modal-body {
  padding: 30px 84px 26px;
}

.modal-heading {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 38px;
}

.modal-icon {
  width: 58px;
  height: 58px;
  border-radius: 6px;
}

.modal-heading h2 {
  margin: 0;
  color: #f0e4d4;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.3;
}

.safety-banner {
  display: grid;
  gap: 6px;
  margin-bottom: 26px;
  padding: 16px 18px;
  border: 1px solid rgba(43, 121, 219, 0.9);
  border-radius: 12px;
  color: #78b5ff;
  background: #202224;
  font-size: 14px;
}

.customer-tabs {
  margin-bottom: 22px;
}

.import-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 2px solid #8733b2;
}

.import-tab {
  position: relative;
  padding: 12px 8px 16px;
  border-bottom: 3px solid transparent;
  color: #af9f8e;
  background: transparent;
  font-size: 19px;
  font-weight: 500;
}

.import-tab.active {
  color: #f0e4d4;
  border-bottom-color: #2f6cab;
}

.customer-form {
  display: grid;
  gap: 0;
}

.field-group {
  display: grid;
  gap: 12px;
  color: #f0e4d4;
  font-size: 17px;
  font-weight: 700;
}

.form-control {
  width: 100%;
  min-height: 60px;
  padding: 14px 22px;
  border: 1px solid #4d525a;
  border-radius: 16px;
  color: #f0e4d4;
  background: #1b1c1e;
  font-size: 18px;
  outline: none;
}

.form-control::placeholder {
  color: #8b8175;
}

.form-control:focus {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px rgba(47, 108, 171, 0.16);
}

.textarea-control {
  min-height: 160px;
  resize: vertical;
}

.hint {
  margin: 22px 0 0;
  color: #f0e4d4;
  font-size: 16px;
}

.json-import-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
}

.json-import-button {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  color: #f0e4d4;
  background: #2b4f75;
  font-size: 15px;
  font-weight: 700;
}

.json-import-button:hover {
  background: #336392;
}

.json-import-tip {
  color: #af9f8e;
  font-size: 14px;
}

.safe-result {
  margin-top: 16px;
  padding: 13px 15px;
  border: 1px solid rgba(43, 121, 219, 0.9);
  border-radius: 12px;
  color: #78b5ff;
  background: #202224;
  font-size: 14px;
}

.safe-result.error {
  border-color: rgba(194, 53, 53, 0.9);
  color: #f5b0b0;
  background: #291d1d;
}

.safe-result.success {
  border-color: rgba(46, 164, 94, 0.9);
  color: #9ce5b0;
  background: #1d2620;
}

.modal-actions {
  display: flex;
  gap: 12px;
  padding: 22px 84px 30px;
  background: #202224;
}

.proceed-button,
.cancel-button {
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 9px 24px;
  color: #fff;
  font-size: 22px;
  font-weight: 500;
}

.proceed-button {
  flex: 1;
  gap: 8px;
  background: #3773b1;
}

.proceed-button:hover {
  background: #2e679f;
}

.proceed-button svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cancel-button {
  min-width: 136px;
  background: #b71c1c;
}

.cancel-button:hover {
  background: #9e1717;
}

/* Language toggle button */
.lang-toggle {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 50;
  min-width: 56px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(65, 153, 252, 0.35);
  border-radius: 999px;
  color: #4199fc;
  background: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(65, 153, 252, 0.12);
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.lang-toggle:hover {
  color: #fff;
  background: var(--color-blue);
  box-shadow: 0 4px 18px rgba(65, 153, 252, 0.3);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 760px) {
  .topbar {
    height: 100px;
    padding: 0 15px;
  }

  .top-link {
    width: 76px;
    font-size: 16px;
  }

  .content {
    padding: 0 14px 24px;
  }

  .hero {
    padding-top: 0;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero-text {
    margin-top: 18px;
    font-size: 16px;
  }

  .wallet-grid {
    grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
    gap: 15px;
    padding: 15px;
  }

  .wallet-card {
    min-height: 132px;
    border-radius: 18px;
  }

  .wallet-icon {
    padding: 16px 16px 6px;
  }

  .wallet-icon-frame {
    width: 68px;
    height: 68px;
    font-size: 18px;
  }

  .wallet-name {
    font-size: 14px;
  }

  .footer {
    min-height: auto;
    flex-direction: column;
    margin: 22px 0 34px;
    gap: 14px;
  }

  .modal-body,
  .modal-actions {
    padding-left: 22px;
    padding-right: 22px;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-heading {
    gap: 16px;
    margin-bottom: 24px;
  }

  .modal-heading h2 {
    font-size: 22px;
  }

  .modal-icon {
    width: 42px;
    height: 42px;
  }

  .import-tab {
    font-size: 16px;
  }

  .form-control {
    min-height: 52px;
    padding: 12px 16px;
    font-size: 16px;
  }

  .textarea-control {
    min-height: 136px;
  }

  .json-import-row {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .cancel-button {
    width: 100%;
  }
}
