:root {
  --bg: #e7e7e7;
  --white: #ffffff;
  --text: #171717;
  --muted: #666666;
  --border: #d5d5d5;
  --link: #2867e8;
  --green: #75c879;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.4;
  overflow-x: hidden;
  overflow-y: auto;
}

.login-area {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  padding: 60px 20px 40px;
}

.login-card {
  width: 100%;
  max-width: 628px;
  padding: 40px 35px 45px;
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}
.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.logo-container h2{
  color: #009639;
  font-weight: 100;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  margin: 0;
  white-space: nowrap;
}
.bank{
  color: #171717
}
.logo {
  display: block;
  width: clamp(32px, 8vw, 60px);
  height: auto;
  margin: 0;
  flex-shrink: 0;
}

.login-form {
  display: flex;
  flex-direction: column;
  margin-top: 16px;
}

.field-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 7px;
  font-size: 16px;
}

.field-row label {
  color: var(--text);
}

.password-row {
  margin-top: 17px;
}

.input {
  width: 100%;
  height: 37px;
  padding: 0 12px;
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus {
  border-color: var(--link);
  box-shadow: 0 0 0 2px rgba(40, 103, 232, 0.12);
}

.input-wrap {
  position: relative;
}

.input-wrap .input {
  padding-right: 42px;
}

.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  background: none;
  border: none;
  color: #888888;
  cursor: pointer;
}

.toggle-password:hover {
  color: var(--text);
}

.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 22px;
}

.enroll {
  margin: 0;
  font-size: 16px;
  color: var(--text);
}

.link {
  color: var(--link);
  text-decoration: none;
}

.link:hover,
.link:focus {
  text-decoration: underline;
}

.sign-in {
  width: 77px;
  height: 40px;
  background-color: var(--green);
  color: var(--white);
  border: none;
  border-radius: 5px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.sign-in:hover {
  background-color: #64b868;
}

.sign-in:active {
  background-color: #56a85a;
}

.footer {
  background-color: var(--white);
  padding: 30px 20px 40px;
  margin-top: auto;
}

.footer-inner {
  max-width: 1175px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 40px;
}

.footer-left {
  flex: 0 0 auto;
}

.footer-left h2 {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.app-downloads {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.qr-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.qr-block img {
  display: block;
  width: 100px;
  max-width: 100%;
  height: auto;
}

.store-badges {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.badge {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
  color: var(--muted);
}

.badge img {
  display: block;
  width: 120px;
  height: auto;
  max-width: 100%;
}

.footer-right {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.footer-nav a {
  padding: 2px 0;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 20px;
  font-size: 14px;
}

.routing {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--text);
}

.routing-number {
  font-weight: 600;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: none;
  border: none;
  color: var(--link);
  cursor: pointer;
}

.copy-btn:hover {
  color: #1a52c4;
}

.copy-msg {
  display: none;
  font-size: 12px;
  color: var(--muted);
}

.copy-msg.show {
  display: inline;
}

.legal {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}

.legal p {
  margin: 0;
}

.housing-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin: 0 2px;
  color: var(--text);
}

.toast {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  background-color: rgba(0, 0, 0, 0.78);
  color: var(--white);
  font-size: 14px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  text-align: center;
}

.toast.show {
  opacity: 1;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.view {
  display: none;
}

.view.active {
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.25s ease;
}

.alert-error {
  background-color: #fdecea;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 12px 16px;
  border-radius: 5px;
  margin-top: 16px;
  font-size: 15px;
}

.alert-warning {
  background-color: #fff3cd;
  border: 1px solid #ffc107;
  color: #856404;
  padding: 12px 16px;
  border-radius: 5px;
  margin-bottom: 16px;
  font-size: 15px;
}

.view-heading {
  margin: 20px 0 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}

.view-subtitle {
  margin: 0 0 20px;
  font-size: 15px;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

.otp-group {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0 24px;
}

.otp-input {
  width: 44px;
  height: 48px;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 5px;
  background-color: var(--white);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.otp-input:focus {
  border-color: var(--link);
  box-shadow: 0 0 0 2px rgba(40, 103, 232, 0.12);
}

.full-width {
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
  display: block;
}

.resend-row {
  text-align: center;
  margin: 16px 0 0;
  font-size: 15px;
  color: var(--text);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  font-size: 15px;
  color: var(--text);
}

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-row label {
  cursor: pointer;
  user-select: none;
}

.success-icon {
  display: flex;
  justify-content: center;
  margin: 20px 0 12px;
}

.success-heading {
  color: var(--green);
}

.retry-form,
.otp-form,
.decline-form {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
}

@media (max-width: 900px) {
  .login-area {
    padding: 40px 16px 28px;
    align-items: flex-start;
  }

  .login-card {
    max-width: 520px;
    padding: 28px 24px 32px;
  }

  .footer {
    padding: 28px 20px 36px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    gap: 28px;
    text-align: center;
  }

  .footer-left {
    text-align: center;
    width: 100%;
  }

  .footer-right {
    align-items: center;
    text-align: center;
    width: 100%;
  }

  .footer-top {
    flex-direction: column;
    align-items: center;
    gap: 18px;
    width: 100%;
  }

  .footer-nav {
    justify-content: center;
    gap: 12px 18px;
  }

  .app-downloads {
    flex-direction: column;
    align-items: center;
  }

  .routing {
    justify-content: center;
    flex-wrap: wrap;
  }

  .legal {
    text-align: center;
  }
}

@media (max-width: 600px) {
  .login-area {
    padding: 24px 12px 20px;
    align-items: flex-start;
  }

  .login-card {
    padding: 22px 18px 28px;
    border-radius: 6px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
  }

  .logo-container {
    gap: 6px;
    margin-bottom: 4px;
  }

  .logo-container h2 {
    font-size: clamp(1rem, 5vw, 1.25rem);
  }

  .login-form {
    margin-top: 12px;
  }

  .field-row {
    font-size: 14px;
  }

  .field-row .link {
    font-size: 13px;
    flex-shrink: 0;
  }

  .input {
    height: 46px;
    font-size: 16px;
    border-radius: 6px;
  }

  .toggle-password {
    width: 44px;
    height: 44px;
    right: 2px;
  }

  .controls {
    flex-direction: column;
    gap: 14px;
    margin-top: 18px;
  }

  .enroll {
    width: 100%;
    text-align: center;
    font-size: 14px;
    order: 2;
  }

  .sign-in {
    width: 100%;
    height: 48px;
    font-size: 16px;
    border-radius: 6px;
    order: 1;
  }

  .footer {
    padding: 24px 16px 30px;
  }

  .footer-inner {
    gap: 24px;
  }

  .footer-left h2 {
    font-size: 15px;
    margin-bottom: 12px;
  }

  .qr-block img {
    width: 80px;
    height: auto;
  }

  .app-downloads {
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }

  .store-badges {
    align-items: center;
    gap: 12px;
  }

  .badge img {
    width: 130px;
    height: auto;
  }

  .footer-nav {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 14px;
  }

  .footer-nav a {
    padding: 4px 0;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
  }

  .routing {
    font-size: 12px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .legal {
    font-size: 11px;
  }

  .toast {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    font-size: 13px;
    padding: 10px 16px;
    max-width: calc(100% - 24px);
  }

  .otp-input {
    width: 38px;
    height: 42px;
    font-size: 18px;
  }

  .otp-group {
    gap: 8px;
  }

  .full-width {
    max-width: 100%;
    height: 48px;
    font-size: 16px;
    border-radius: 6px;
  }

  .checkbox-row {
    font-size: 14px;
  }

  .view-heading {
    font-size: 18px;
  }

  .view-subtitle {
    font-size: 14px;
  }
}

@media (max-width: 380px) {
  .login-area {
    padding: 16px 8px 12px;
  }

  .login-card {
    padding: 18px 14px 22px;
  }

  .logo {
    width: 28px;
  }

  .logo-container h2 {
    font-size: 0.95rem;
  }

  .field-row {
    font-size: 13px;
    flex-wrap: wrap;
    gap: 4px;
  }

  .input {
    height: 44px;
    padding: 0 10px;
  }

  .sign-in {
    height: 46px;
  }

  .qr-block img {
    width: 70px;
  }

  .badge img {
    width: 110px;
  }

  .footer-nav {
    font-size: 13px;
    gap: 8px;
  }

  .footer {
    padding: 20px 12px 26px;
  }

  .legal {
    font-size: 10px;
  }

  .otp-input {
    width: 34px;
    height: 40px;
    font-size: 16px;
  }

  .otp-group {
    gap: 6px;
  }

  .checkbox-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
