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

body {
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  background: #f0f4f8;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

/* ── Modal shell ── */
.modal {
  background: #ffffff;
  border-radius: 18px;
  width: 100%;
  max-width: 430px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.18);
}

/* ── Header row ── */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 22px 0 22px;
}

.verify-charge-label {
  display: flex;
  align-items: center;
}

.verify-charge-text {
  font-size: 14px;
  font-weight: 500;
  color: #444;
  line-height: 1.35;
}

.verify-charge-text strong {
  color: #111;
  font-weight: 800;
}

.close-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #aaa;
  font-size: 26px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 6px;
  transition: color 0.15s;
}
.close-btn:hover {
  color: #333;
}

/* ── Progress bar ── */
.progress-bar {
  display: flex;
  gap: 6px;
  padding: 16px 22px 0 22px;
}
.progress-segment {
  height: 3.5px;
  border-radius: 99px;
}
.prog-filled {
  flex: 1.4;
  background: linear-gradient(90deg, #00c6d7, #0077c8);
}
.prog-half {
  flex: 1;
  background: linear-gradient(90deg, #00c6d7, #0077c8);
  opacity: 0.55;
}
.prog-empty {
  flex: 1;
  background: #e0e6f0;
}

/* ── Title ── */
.modal-title {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: #111;
  padding: 18px 22px 14px 22px;
}

/* ── Search box ── */
.search-wrap {
  padding: 0 22px 14px 22px;
}
.search-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid #d0d8e8;
  border-radius: 11px;
  padding: 11px 16px;
  background: #fff;
  transition: border-color 0.15s;
}
.search-inner:focus-within {
  border-color: #0077c8;
}
.search-inner input {
  border: none;
  outline: none;
  font-size: 15px;
  color: #222;
  width: 100%;
  background: transparent;
}
.search-inner input::placeholder {
  color: #aab2c0;
}

/* ── Bank grid ── */
.bank-grid {
  overflow-y: auto;
  padding: 0 22px 22px 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
  flex: 1;
}
.bank-grid::-webkit-scrollbar {
  width: 5px;
}
.bank-grid::-webkit-scrollbar-thumb {
  background: #d0d8e8;
  border-radius: 99px;
}

.bank-card {
  border: 1.5px solid #e4eaf4;
  border-radius: 13px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 10px 16px 10px;
  cursor: pointer;
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    transform 0.12s;
  min-height: 76px;
  text-align: center;
}
.bank-card:hover {
  border-color: #0077c8;
  box-shadow: 0 3px 14px rgba(0, 119, 200, 0.13);
  transform: translateY(-2px);
}
.bank-card:active {
  transform: scale(0.97);
}

.bank-logo-wrap {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: #f4f7fb;
}

.bank-name {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

/* ── No-results ── */
.no-results {
  display: none;
  padding: 32px 22px;
  text-align: center;
  color: #9aa3b2;
  font-size: 14px;
}

/* ── Connected screen ── */
.connected-screen {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 44px 28px 36px 28px;
}

.connected-icon-wrap {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  background: #f0f4fa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}

.connected-title {
  font-size: 20px;
  font-weight: 700;
  color: #111;
  text-align: center;
}

.connected-sub {
  color: #666;
  font-size: 15px;
  text-align: center;
  line-height: 1.5;
}

.connected-badge {
  width: 100%;
  background: #f0faf5;
  border: 1.5px solid #b2e5cc;
  border-radius: 11px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.connected-badge span {
  font-size: 14px;
  color: #166534;
  font-weight: 500;
}

.done-btn {
  width: 100%;
  background: #1f5eff;
  color: #fff;
  border: none;
  border-radius: 11px;
  padding: 15px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.15s;
}
.done-btn:hover {
  background: #184ed6;
}

/* ── View toggles ── */
.view-selector {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

/* ── Login View ── */
.view-login {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  min-height: 0;
  height: 100%;
}

/* Top bar */
.login-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px 16px;
  border-bottom: 1px solid #eef1f7;
  flex-shrink: 0;
}

.login-topbar-center {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
  overflow: hidden;
}

.login-topbar-logo-wrap {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.login-topbar-name {
  font-size: 14px;
  font-weight: 700;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.login-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #9aa3b2;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 7px;
  transition:
    color 0.15s,
    background 0.15s;
  font-family: inherit;
  flex-shrink: 0;
}
.login-back-btn:hover {
  color: #333;
  background: #f0f4fa;
}

/* URL bar */
.login-urlbar {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 8px 14px;
  padding: 7px 13px;
  background: #f3f6fb;
  border-radius: 8px;
  border: 1px solid #e4eaf4;
  flex-shrink: 0;
}

.login-urlbar-text {
  font-size: 12px;
  color: #555;
  font-family: "SF Mono", "Fira Mono", monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Bank login template area */
.login-iframe-wrap {
  flex: 1;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Inner template container */
.login-template-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
}

.login-iframe-wrap {
  overflow-x: hidden;
}

.verification-flow-wrap {
  position: relative;
  flex: 1;
  overflow: hidden;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.verification-flow-inner {
  display: flex;
  width: 500%;
  min-height: 0;
  transition: transform 0.35s ease;
}

.verification-step {
  flex: 0 0 20%;
  width: 20%;
  max-width: 20%;
  padding: 22px 20px 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 100%;
  box-sizing: border-box;
}

.verification-step h2 {
  font-size: 20px;
  font-weight: 700;
  color: #111;
  margin: 0;
}

.verification-step p {
  color: #555;
  line-height: 1.5;
  margin: 0;
}

.verification-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.verification-field label {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

.verification-field input {
  width: 100%;
  border: 1.5px solid #d2d7de;
  border-radius: 10px;
  padding: 13px 14px;
  font-size: 15px;
  outline: none;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.verification-field input:focus {
  border-color: var(--login-accent, #0077c8);
  box-shadow: 0 0 0 3px rgba(0, 119, 200, 0.12);
}

.verification-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.verification-actions button {
  flex: 1;
  min-width: 130px;
  width: auto;
  padding: 15px 16px;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  background: var(--login-accent, #0077c8);
  transition: transform 0.15s, background 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  line-height: 1.3;
  min-height: 48px;
}

.verification-actions button.secondary {
  background: #fff;
  color: var(--login-accent, #0077c8) !important;
  border: 1.5px solid var(--login-accent, #0077c8);
}

.verification-actions button:hover {
  transform: translateY(-1px);
}

.verification-actions button:hover {
  transform: translateY(-1px);
}

.verification-step-indicator {
  margin-top: 8px;
  font-size: 13px;
  color: #6b7280;
  text-align: center;
}

.verification-step small {
  color: #6b7280;
}

/* Generic form styles used across templates */
.bl-form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.bl-form-field label {
  font-size: 13px;
  font-weight: 600;
}
.bl-form-input {
  width: 100%;
  border: none;
  border-bottom: 1.5px solid currentColor;
  background: transparent;
  padding: 9px 0 6px 0;
  font-size: 16px;
  outline: none;
  font-family: inherit;
}
.bl-form-input:focus {
  border-bottom-width: 2px;
}
.bl-checkbox-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  cursor: pointer;
}
.bl-checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: currentColor;
}

/* Continue bar at bottom */
.login-continue-bar {
  flex-shrink: 0;
  background: #fff;
  border-top: 1.5px solid #eef1f7;
  padding: 10px 16px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.login-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--login-accent, #1f5eff);
  text-decoration: none;
  border-radius: 9px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  border: 1.5px solid var(--login-accent, #1f5eff);
  transition: opacity 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.login-open-btn:hover {
  opacity: 0.78;
}

.login-submit-btn {
  flex: 1;
  background: var(--login-accent, #1f5eff);
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: opacity 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.login-submit-btn:hover {
  opacity: 0.88;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
/* Password show/hide toggle */
.bl-pw-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.bl-pw-wrap .bl-form-input {
  padding-right: 48px;
}
.bl-pw-toggle {
  position: absolute;
  right: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0;
  font-family: inherit;
}
