/* ============================================================
   ICCU myeBranch – Authentication Page
   ============================================================ */

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

:root {
  --green:       #2e7d32;
  --green-dark:  #1a5c1a;
  --green-nav:   #1e6b22;
  --green-btn:   #2e7d32;
  --green-pale:  #e8f5e9;
  --red:         #c0392b;
  --grey-bg:     #e5e5e5;
  --white:       #fff;
  --text:        #222;
  --text-mid:    #555;
  --blue-link:   #1565c0;
  --shadow:      0 2px 28px rgba(0,0,0,.14);
  --r-card:      12px;
  --r-field:     6px;
}

html { height: 100%; }
body {
  min-height: 100%;
  font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
  font-size: 14px;
  color: var(--text);
  background-color: var(--grey-bg);
  position: relative;
}
a      { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; }
img    { display: block; }

/* ═══════════════════════════════════════
   TOP BAR
   Screenshot: English | Español on LEFT
   near-centre, Contact Locations on RIGHT
   near-centre. Both groups are NOT at the
   very edges — they sit about 25% from left
   and right respectively.
═══════════════════════════════════════ */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 30px;
  background: var(--green-nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Constrain inner content width so links
     sit centred-ish, not at very edges */
  padding: 0;
  z-index: 500;
}

/* inner wrapper that matches the card width
   and centres the links above the card */
.topbar__inner {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
}

.topbar__left,
.topbar__right { display: flex; align-items: center; gap: 8px; }

.topbar__lang,
.topbar__link {
  color: rgba(255,255,255,.9);
  font-size: 13px;
  transition: opacity .15s;
}
.topbar__lang:hover, .topbar__link:hover { opacity: .7; text-decoration: underline; }
.topbar__lang.active { color: #fff; font-weight: 700; }
.topbar__sep { color: rgba(255,255,255,.45); font-size: 13px; }

/* ═══════════════════════════════════════
   BACKGROUND DECORATIONS
═══════════════════════════════════════ */
.page-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.deco { position: absolute; }
.deco--tl { top: 0;    left: 0;   width: 500px; height: 500px; }
.deco--br { bottom: 0; right: 0;  width: 500px; height: 500px; }
.deco--bl { bottom: 0; left: 0;   width: 300px; height: 300px; }
.deco--tr { top: 0;    right: 0;  width: 300px; height: 300px; }

/* ═══════════════════════════════════════
   PAGE MAIN
═══════════════════════════════════════ */
.page-main {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 50px 16px 36px;
}

/* ═══════════════════════════════════════
   CARD
═══════════════════════════════════════ */
.card {
  display: flex;
  width: 980px;
  max-width: calc(100vw - 32px);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--white);
  min-height: 760px;
}

/* ═══════════════════════════════════════
   CARD LEFT  – login panel
═══════════════════════════════════════ */
.card__left {
  flex: 0 0 500px;
  width: 500px;
  background: var(--white);
  padding: 28px 52px 34px;
  display: flex;
  flex-direction: column;
  position: relative;
  border-radius: var(--r-card) 0 0 var(--r-card);
}

/* ── Three-dot menu (HORIZONTAL) ── */
.threedot {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 10;
}
.threedot__btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 3.5px;
  transition: background .15s;
}
.threedot__btn:hover { background: #e0e0e0; }
.threedot__btn span {
  display: block;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #777;
}
.threedot__menu {
  position: absolute;
  top: 42px; right: 0;
  min-width: 220px;
  background: var(--white);
  border: 1px solid #eee;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,.15);
  overflow: hidden;
  z-index: 20;
  transform: scale(.92) translateY(-8px);
  transform-origin: top right;
  opacity: 0;
  pointer-events: none;
  transition: transform .2s ease, opacity .2s ease;
}
.threedot__menu.open {
  display: block;
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.threedot__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background .12s;
}
.threedot__item:hover { background: var(--green-pale); }
.threedot__icon {
  width: 20px; height: 20px;
  flex-shrink: 0;
  color: var(--green);
}

/* ── Logo ── */
.logo {
  display: flex;
  justify-content: center;
  margin: 16px 0 32px;
}
.logo__img {
  width: 168px;
  height: auto;
  object-fit: contain;
}

/* ═══════════════════════════════════════
   FORM
═══════════════════════════════════════ */
.form { display: flex; flex-direction: column; gap: 6px; }

.field { margin-bottom: 2px; }

/* gap between username and password rows */
#field-user { margin-bottom: 10px; }

.field__input {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1.5px solid transparent;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  background: #f0f0f0;
  outline: none;
  transition: border-color .15s, background .15s;
}
.field__input:focus {
  border-color: transparent;
  background: #e8e8e8;
  box-shadow: none;
}
.field__input.is-err {
  border-color: #e05252;
  background: #fff;
}

.field__err {
  color: var(--red);
  font-size: 12px;
  margin: 4px 2px 12px;
  display: none;
}
.field__err.visible { display: block; }

/* password */
.field__pwrap { position: relative; }
.field__pwrap .field__input { padding-right: 44px; }
.field__eye {
  position: absolute;
  top: 50%; right: 13px;
  transform: translateY(-50%);
  color: #bbb; line-height: 0;
  transition: color .15s;
}
.field__eye:hover { color: var(--green); }
.field__eye svg { width: 20px; height: 20px; }

/* Remember Me */
.remember { display: flex; align-items: center; gap: 10px; margin: 10px 0 16px; }
.toggle { position: relative; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle__track {
  display: block; width: 40px; height: 22px;
  border-radius: 11px; background: #ccc;
  transition: background .2s; position: relative;
}
.toggle input:checked ~ .toggle__track { background: var(--green); }
.toggle__thumb {
  position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: transform .2s;
}
.toggle input:checked ~ .toggle__track .toggle__thumb { transform: translateX(18px); }
.remember__label { font-size: 14px; color: var(--text-mid); user-select: none; }

/* Cloudflare widget */
.cf-widget {
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid #e0e0e0; border-radius: 4px;
  background: #fafafa; padding: 7px 10px; margin-bottom: 20px;
  width: 220px;
  margin-left: auto;
  margin-right: auto;
}
.cf-widget__left { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.cf-widget__icon { width: 22px; height: 22px; flex-shrink: 0; }
.cf-widget__icon svg { width: 22px; height: 22px; display: block; }
.cf-spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.cf-widget__text { font-size: 12.5px; color: var(--text-mid); }
.cf-widget__text.done { color: var(--green); font-weight: 600; }
.cf-widget__right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.cf-logo-img { width: 68px; height: auto; object-fit: contain; }
.cf-links { display: flex; align-items: center; gap: 3px; }
.cf-links a, .cf-links span { font-size: 9.5px; color: #aaa; }
.cf-links a:hover { text-decoration: underline; }

/* Login error */
.login-err {
  display: flex; align-items: center; gap: 8px;
  background: #fff0f0; border: 1px solid #f5c6c6;
  border-radius: var(--r-field); padding: 9px 12px;
  color: var(--red); font-size: 13px; margin-bottom: 12px;
}
.login-err svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Log In button */
.btn-login {
  width: 100%; height: 46px;
  border-radius: 40px;
  background: var(--green-btn); color: #fff;
  font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s, transform .1s, opacity .15s;
  letter-spacing: .3px;
}
.btn-login:hover:not(:disabled) { background: var(--green-dark); }
.btn-login:active:not(:disabled) { transform: scale(.99); }
.btn-login:disabled { opacity: .6; cursor: not-allowed; }
.btn-spin { width: 20px; height: 20px; animation: spin .8s linear infinite; }

/* Links */
.forgot { text-align: center; margin-top: 20px; color: var(--text-mid); font-size: 13.5px; }
.forgot__link { color: var(--blue-link); font-size: 13.5px; }
.forgot__link:hover { text-decoration: underline; }
.enroll-link { display: block; text-align: center; margin-top: 18px; color: var(--green); font-weight: 700; font-size: 15px; }
.enroll-link:hover { text-decoration: underline; }
.join-link { display: block; text-align: center; margin-top: 14px; color: var(--blue-link); font-size: 13.5px; }
.join-link:hover { text-decoration: underline; }

.card__right {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 760px;
  border-radius: 0 var(--r-card) var(--r-card) 0;
}

.promo__img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* ═══════════════════════════════════════
   FOOTER  – white background
═══════════════════════════════════════ */
.footer {
  position: relative;
  z-index: 1;
  background: var(--white);
  padding: 26px 0 18px;
}
.footer__inner {
  width: 980px;
  max-width: calc(100vw - 32px);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.footer__nav { display: flex; gap: 20px; margin-bottom: 16px; }
.footer__nav a { color: var(--text); font-size: 13.5px; text-decoration: underline; }
.footer__nav a:hover { color: var(--green); }

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

/* NCUA */
.ncua__box {
  border: 1.5px solid #333; border-radius: 3px;
  padding: 5px 8px; max-width: 192px; background: #fff;
}
.ncua__small { font-size: 7px; color: #444; line-height: 1.3; margin-bottom: 2px; }
.ncua__logo  { font-size: 22px; font-weight: 900; color: #111; letter-spacing: 3px; line-height: 1; margin: 2px 0 1px; }
.ncua__tag   { font-size: 8px; color: #555; }

/* Equal Housing */
.ehl svg { width: 52px; height: 60px; }

.footer__copy { font-size: 12px; color: var(--text-mid); }

.footer__right { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.footer__routing { font-size: 14px; }
.footer__routing strong { font-weight: 700; }

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

/*
  App store image: 5760 × 3240px, two buttons side by side.
  Each button half = 2880px wide.
  Buttons are vertically centred in image.
  Display size: 158 × 48px (bigger)

  Scale: 158/2880 = 0.05486
  Rendered total:  5760 × 0.05486 = 316px wide, 3240 × 0.05486 = 178px tall
  Vertical centre: 178/2 = 89px  →  offset-y = -(89 - 24) = -65px
  Google button:  offset-x = -158px
*/
.appbtn { display: block; }
.appbtn__img {
  width: 158px;
  height: 48px;
  background-image: url('f56cbae9-e83b-4b83-9a95-71a78334ee66-cover.png');
  background-size: 316px 178px;
  border-radius: 8px;
  overflow: hidden;
  transition: opacity .15s;
}
.appbtn__img--apple  { background-position: 0px -65px; }
.appbtn__img--google { background-position: -158px -65px; }
.appbtn:hover .appbtn__img { opacity: .85; }

/* ═══════════════════════════════════════
   CHAT FAB
═══════════════════════════════════════ */
.chat-fab {
  position: fixed;
  bottom: 22px; right: 22px;
  width: 54px; height: 54px;
  border-radius: 50%; padding: 0;
  z-index: 600;
  box-shadow: 0 4px 18px rgba(0,0,0,.22);
  transition: transform .15s, box-shadow .15s;
}
.chat-fab:hover { transform: scale(1.07); box-shadow: 0 6px 24px rgba(0,0,0,.28); }
.chat-fab svg { display: block; width: 54px; height: 54px; }

/* ═══════════════════════════════════════
   CHAT WIDGET
═══════════════════════════════════════ */
.chat-widget {
  position: fixed; bottom: 86px; right: 22px;
  width: 310px; background: var(--white);
  border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,.18);
  z-index: 600; display: flex; flex-direction: column;
  overflow: hidden; animation: popUp .18s ease;
}
@keyframes popUp { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.chat-widget__head {
  background: var(--green); color: #fff;
  padding: 11px 16px; display: flex;
  justify-content: space-between; align-items: center;
  font-weight: 600; font-size: 14px;
}
.chat-widget__head button { color: #fff; opacity: .8; font-size: 16px; }
.chat-widget__head button:hover { opacity: 1; }
.chat-widget__body {
  flex: 1; max-height: 240px; overflow-y: auto;
  padding: 14px; background: #f8f9fa;
  display: flex; flex-direction: column; gap: 9px;
}
.chat-bubble { max-width: 82%; padding: 8px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.4; }
.chat-bubble--agent { background: #e9ecef; color: var(--text); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-bubble--user  { background: var(--green); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-widget__foot { display: flex; border-top: 1px solid #eee; }
.chat-widget__foot input { flex: 1; border: none; outline: none; padding: 11px 14px; font-size: 13.5px; background: #fff; }
.chat-widget__foot button { padding: 0 16px; background: var(--green); color: #fff; font-weight: 600; font-size: 13.5px; transition: background .12s; }
.chat-widget__foot button:hover { background: var(--green-dark); }

/* ═══════════════════════════════════════
   MODALS
═══════════════════════════════════════ */
.modal-wrap {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 700; display: flex;
  align-items: center; justify-content: center;
  animation: fadeIn .16s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--white);
  border-radius: 16px;          /* more rounded to match screenshot */
  padding: 34px 34px 30px;
  width: 420px;
  max-width: 96vw;
  position: relative;
  box-shadow: 0 8px 40px rgba(0,0,0,.2);
  animation: slideUp .2s ease;
}
.modal--wide { width: 500px; }
@keyframes slideUp { from { transform: translateY(18px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal h3 { font-size: 20px; font-weight: 700; color: var(--green); margin-bottom: 8px; }
.modal p  { font-size: 13.5px; color: var(--text-mid); margin-bottom: 16px; }
.modal .field__input { margin-bottom: 0; }
.modal__close { position: absolute; top: 14px; right: 16px; font-size: 18px; color: #aaa; line-height: 1; }
.modal__close:hover { color: var(--text); }
.modal__success { margin-top: 14px; padding: 10px 14px; background: var(--green-pale); border-radius: var(--r-field); color: var(--green); font-size: 13.5px; font-weight: 500; }
.enroll-grid { display: flex; flex-direction: column; gap: 10px; }

/* ═══════════════════════════════════════
   SUCCESS SCREEN
═══════════════════════════════════════ */
.success-screen {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 100%; min-height: 540px;
  padding: 40px 32px; text-align: center; animation: fadeIn .4s ease;
}
.success-screen__icon { width: 72px; height: 72px; margin-bottom: 20px; }
.success-screen h2 { font-size: 22px; color: var(--green); margin-bottom: 8px; }
.success-screen h2 span { font-weight: 800; }
.success-screen p { color: var(--text-mid); font-size: 14px; margin-bottom: 4px; }
.success-screen__bar { width: 75%; height: 4px; background: #e0e0e0; border-radius: 2px; margin-top: 20px; overflow: hidden; }
.success-screen__progress { height: 100%; background: var(--green); border-radius: 2px; animation: progress 2.5s linear forwards; }
@keyframes progress { from { width: 0; } to { width: 100%; } }

/* ═══════════════════════════════════════
   SHAKE
═══════════════════════════════════════ */
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-7px); }
  40%      { transform: translateX(7px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}
.shake { animation: shake .45s ease; }

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 1020px) {
  .card { flex-direction: column; width: 100%; max-width: 500px; }
  .card__left  { flex: none; width: 100%; padding: 22px 28px 28px; border-radius: var(--r-card) var(--r-card) 0 0; }
  .card__right { min-height: 260px; border-radius: 0 0 var(--r-card) var(--r-card); }
  .footer__inner { width: 100%; padding: 0 16px; }
  .footer__inner > div { flex: 1 1 100%; }
  .footer__right { align-items: flex-start; }
}
@media (max-width: 480px) {
  .card__right { display: none; }
  .card__left  { padding: 18px 18px 22px; }
  .footer      { padding: 18px 16px 12px; }
  .topbar      { padding: 0; }
}
