/* ==============================================================
   Barclays Bank — auth.css
   Login, Register and Create-PIN pages.
   ============================================================== */

.auth-page {
  min-height: calc(100vh - 76px);
  display: flex;
  align-items: center;
  padding: 56px 24px;
  background:
    radial-gradient(600px 300px at 85% -10%, var(--primary-light), transparent),
    var(--background);
}

.auth-shell {
  max-width: 980px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
}

.auth-side {
  background: linear-gradient(160deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-side .brand {
  color: #fff;
  margin-bottom: 40px;
}

.auth-side .brand-mark {
  background: rgba(255, 255, 255, 0.15);
}

.auth-side h2 {
  color: #fff;
  font-size: 1.6rem;
}

.auth-side p {
  color: rgba(255, 255, 255, 0.8);
}

.auth-side-list {
  margin-top: 28px;
}

.auth-side-list li {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
}

.auth-side-list i {
  color: var(--accent);
  margin-top: 3px;
}

.auth-side-note {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 32px;
}

.auth-card {
  padding: 48px 44px;
}

.auth-card h1 {
  font-size: 1.7rem;
  margin-bottom: 6px;
}

.auth-card .auth-sub {
  margin-bottom: 28px;
}

.auth-switch {
  margin-top: 22px;
  text-align: center;
  font-size: 0.9rem;
}

.auth-switch a {
  color: var(--primary);
  font-weight: 600;
}

.input-with-icon {
  position: relative;
}

.input-with-icon .form-control {
  padding-left: 42px;
}

.input-with-icon i.leading {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.95rem;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.95rem;
  padding: 4px;
}

.password-toggle:hover {
  color: var(--ink);
}

.form-row-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 0.88rem;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-row input {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

.terms-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 18px 0;
  font-size: 0.85rem;
}

.terms-row input {
  margin-top: 4px;
  accent-color: var(--primary);
}

.account-type-toggle {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.account-type-option {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.account-type-option input {
  display: none;
}

.account-type-option i {
  display: block;
  margin-bottom: 6px;
  font-size: 1.1rem;
}

.account-type-option.selected,
.account-type-option:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

/* Password strength meter */
.strength-meter {
  margin-top: 8px;
}

.strength-track {
  height: 6px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--danger);
}

.strength-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 6px;
  display: block;
}

/* ---------------- PIN interface ---------------- */
.pin-page-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 18px;
}

.pin-group {
  margin-bottom: 28px;
}

.pin-group-label {
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 12px;
  display: block;
}

.pin-boxes {
  display: flex;
  gap: 14px;
}

.pin-box {
  width: 64px;
  height: 72px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: 1.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  background: var(--background);
  -webkit-text-security: disc;
}

.pin-box::placeholder {
  color: transparent;
}

.pin-security-note {
  display: flex;
  gap: 12px;
  background: var(--primary-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-top: 24px;
  font-size: 0.85rem;
}

.pin-security-note i {
  color: var(--primary);
  font-size: 1.05rem;
  margin-top: 2px;
}

.pin-security-note strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
}

.success-box {
  text-align: center;
  padding: 12px 0 4px;
}

.success-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #EAFBEF;
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 18px;
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-side {
    display: none;
  }
}

/* Westhaven National Bank authentication experience */

.auth-body {
  background: #0b0d17;
  color: #f5f7fb;
}

.auth-body .site-footer {
  display: none;
}

.auth-body .site-header {
  background: rgba(11, 13, 23, 0.94);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.auth-body .site-header .brand,
.auth-body .site-header .nav-link,
.auth-body .site-header .btn-ghost {
  color: #f5f7fb;
}

.auth-body .site-header .brand-accent {
  color: var(--accent);
}

.auth-body .site-header .nav-link {
  color: #a5aabd;
}

.auth-body .site-header .nav-link:hover,
.auth-body .site-header .nav-link.active {
  color: #fff;
  background: rgba(14, 107, 79, 0.25);
}

.auth-body .site-header .btn-ghost {
  border-color: rgba(255, 255, 255, 0.16);
}

.auth-body .nav-toggle {
  border-color: rgba(255, 255, 255, 0.16);
}

.auth-body .nav-toggle-bar {
  background: #fff;
}

.auth-page {
  min-height: calc(100vh - 76px);
  padding: 0;
  background: #0b0d17;
}

.auth-shell {
  width: 100%;
  max-width: 1380px;
  min-height: calc(100vh - 76px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.85fr);
  background: #151827;
  overflow: hidden;
}

.auth-side {
  position: relative;
  min-height: 700px;
  padding: 52px clamp(32px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(8, 12, 18, 0.92), rgba(8, 12, 18, 0.56)),
    linear-gradient(180deg, rgba(14, 107, 79, 0.12), rgba(8, 12, 18, 0.76)),
    url('https://images.unsplash.com/photo-1610375461246-83df859d849d?auto=format&fit=crop&w=1600&q=85') center / cover;
}

.auth-side::after {
  content: '';
  position: absolute;
  inset: auto 8% 11% 8%;
  height: 1px;
  background: linear-gradient(90deg, var(--primary), transparent);
  opacity: 0.8;
}

.auth-side>* {
  position: relative;
  z-index: 1;
}

.auth-side .brand {
  color: #fff;
  margin-bottom: 42px;
}

.auth-side .brand-mark {
  background: var(--primary);
}

.auth-side h2 {
  max-width: 510px;
  margin-top: auto;
  color: #fff;
  font-size: clamp(2.3rem, 4vw, 4.4rem);
  letter-spacing: -0.04em;
}

.auth-side h2::first-line {
  color: #fff;
}

.auth-side p {
  color: rgba(235, 241, 239, 0.72);
}

.auth-side-list {
  margin-top: 28px;
}

.auth-side-list li {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.82);
}

.auth-side-list i {
  color: var(--accent);
  margin-top: 3px;
}

.auth-side-note {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 32px;
}

.auth-card {
  align-self: stretch;
  padding: clamp(34px, 5vw, 72px) clamp(28px, 5vw, 68px);
  background: #151827;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-card h1 {
  color: #f5f7fb;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}

.auth-card .auth-sub {
  color: #9ca3b8;
  margin-bottom: 32px;
}

.auth-card .form-group label,
.auth-card .pin-group-label {
  color: #a9afc2;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
}

.auth-card .form-control {
  background: #1b1f31;
  border-color: #30364d;
  color: #f5f7fb;
  border-radius: 11px;
  padding: 14px 15px;
}

.auth-card .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 107, 79, 0.2);
}

.auth-card .input-with-icon .form-control {
  padding-left: 42px;
}

.auth-card .input-with-icon i.leading {
  color: #727b94;
}

.auth-card .password-toggle {
  color: #8991a8;
}

.auth-card .password-toggle:hover {
  color: #fff;
}

.auth-card .checkbox-row {
  color: #9ca3b8;
}

.auth-card .auth-switch {
  color: #9ca3b8;
}

.auth-card .auth-switch a {
  color: #16c59a;
}

.auth-card .btn-primary {
  background: #12bf92;
  color: #07150f;
  border-radius: 10px;
  font-weight: 800;
  padding: 15px 26px;
}

.auth-card .btn-primary:hover {
  background: #22d5a7;
}

.auth-card .alert-danger {
  background: rgba(220, 38, 38, 0.12);
  color: #ffb4b4;
  border-color: rgba(220, 38, 38, 0.35);
}

.account-type-toggle {
  gap: 10px;
}

.account-type-option {
  border-color: #30364d;
  color: #9ca3b8;
  border-radius: 11px;
}

.account-type-option.selected,
.account-type-option:has(input:checked) {
  border-color: #12bf92;
  background: rgba(18, 191, 146, 0.1);
  color: #40d8b2;
}

.pin-page-icon {
  background: rgba(18, 191, 146, 0.12);
  color: #28d3aa;
  border-radius: 14px;
}

.pin-boxes {
  gap: 12px;
}

.pin-box {
  width: 62px;
  height: 68px;
  background: #1b1f31;
  border-color: #30364d;
  color: #fff;
  border-radius: 11px;
}

.pin-box:focus {
  outline: none;
  border-color: #12bf92;
  box-shadow: 0 0 0 3px rgba(18, 191, 146, 0.16);
}

.pin-security-note {
  background: rgba(18, 191, 146, 0.08);
  border-color: rgba(18, 191, 146, 0.25);
  color: #aeb6c9;
  border-radius: 11px;
}

.pin-security-note strong {
  color: #f5f7fb;
}

.pin-security-note i {
  color: #28d3aa;
}

@media (max-width: 760px) {
  .auth-body .main-nav {
    background: #151827;
  }

  .auth-page {
    min-height: auto;
  }

  .auth-shell {
    display: block;
    min-height: auto;
  }

  .auth-side {
    min-height: 300px;
    padding: 30px 24px;
  }

  .auth-side .brand {
    margin-bottom: 70px;
  }

  .auth-side h2 {
    font-size: 2.2rem;
  }

  .auth-side-list,
  .auth-side-note,
  .auth-side::after {
    display: none;
  }

  .auth-card {
    border-left: 0;
    padding: 38px 24px 48px;
  }
}

@media (max-width: 480px) {
  .auth-side {
    min-height: 250px;
  }

  .auth-side .brand {
    margin-bottom: 50px;
  }

  .auth-side h2 {
    font-size: 1.9rem;
  }

  .pin-box {
    width: calc((100vw - 96px) / 4);
    max-width: 62px;
    height: 58px;
  }
}

/* Full-page light variation. The global header remains unchanged. */
.auth-body {
  background: var(--primary-light);
  color: var(--ink);
}

.auth-body .site-footer {
  display: none;
}

.auth-body .site-header {
  background: rgba(246, 248, 246, 0.85);
  border-bottom-color: var(--border);
}

.auth-body .site-header .brand,
.auth-body .site-header .nav-link,
.auth-body .site-header .btn-ghost {
  color: inherit;
}

.auth-body .site-header .brand-accent {
  color: var(--primary);
}

.auth-body .site-header .nav-link {
  color: var(--muted);
}

.auth-body .site-header .nav-link:hover,
.auth-body .site-header .nav-link.active {
  color: var(--primary);
  background: var(--primary-light);
}

.auth-body .site-header .btn-ghost {
  border-color: transparent;
}

.auth-body .nav-toggle {
  border-color: var(--border);
}

.auth-body .nav-toggle-bar {
  background: var(--ink);
}

.auth-page {
  min-height: calc(100vh - 76px);
  padding: 0;
  background: var(--primary-light);
}

.auth-shell {
  width: 100%;
  max-width: none;
  min-height: calc(100vh - 76px);
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.85fr);
  background: var(--primary-light);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.auth-side {
  min-height: calc(100vh - 76px);
  padding: 56px clamp(32px, 6vw, 88px);
  background:
    linear-gradient(90deg, rgba(10, 78, 58, 0.9), rgba(10, 78, 58, 0.48)),
    linear-gradient(180deg, rgba(18, 33, 28, 0.08), rgba(18, 33, 28, 0.7)),
    url('https://images.unsplash.com/photo-1610375461246-83df859d849d?auto=format&fit=crop&w=1600&q=85') center / cover;
}

.auth-side .brand {
  color: #fff;
}

.auth-side .brand-mark {
  background: rgba(255, 255, 255, 0.16);
}

.auth-side h2 {
  font-size: clamp(2.3rem, 4vw, 4.4rem);
  letter-spacing: -0.04em;
}

.auth-card {
  min-width: 0;
  padding: clamp(38px, 6vw, 84px) clamp(28px, 6vw, 88px);
  background: #eef6f1;
  border: 0;
  border-radius: 0;
}

.auth-card h1 {
  color: var(--ink);
  font-size: clamp(1.9rem, 3vw, 2.7rem);
}

.auth-card .auth-sub {
  color: var(--muted);
}

.auth-card .form-group label,
.auth-card .pin-group-label {
  color: var(--ink);
  font-size: 0.76rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.auth-card .form-control {
  background: rgba(255, 255, 255, 0.76);
  border-color: #cbdcd2;
  color: var(--ink);
  border-radius: 10px;
  padding: 14px 15px;
}

.auth-card .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 107, 79, 0.13);
}

.auth-card .input-with-icon .form-control {
  padding-left: 42px;
}

.auth-card .input-with-icon i.leading,
.auth-card .password-toggle {
  color: var(--muted);
}

.auth-card .password-toggle:hover {
  color: var(--primary);
}

.auth-card .checkbox-row,
.auth-card .auth-switch {
  color: var(--muted);
}

.auth-card .auth-switch a {
  color: var(--primary);
}

.auth-card .btn-primary {
  background: var(--primary);
  color: #fff;
  border-radius: 10px;
  padding: 15px 26px;
}

.auth-card .btn-primary:hover {
  background: var(--primary-dark);
}

.account-type-option {
  border-color: #cbdcd2;
  background: rgba(255, 255, 255, 0.34);
  color: var(--muted);
  border-radius: 10px;
}

.account-type-option.selected,
.account-type-option:has(input:checked) {
  border-color: var(--primary);
  background: rgba(14, 107, 79, 0.1);
  color: var(--primary);
}

.pin-page-icon {
  background: var(--primary-light);
  color: var(--primary);
}

.pin-box {
  background: rgba(255, 255, 255, 0.76);
  border-color: #cbdcd2;
  color: var(--ink);
  border-radius: 10px;
}

.pin-box:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 107, 79, 0.13);
}

.pin-security-note {
  background: rgba(231, 243, 238, 0.78);
  border-color: #cbdcd2;
  color: var(--muted);
}

.pin-security-note strong {
  color: var(--ink);
}

.pin-security-note i {
  color: var(--primary);
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-side {
    min-height: 360px;
  }
}

@media (max-width: 760px) {
  .auth-side {
    min-height: 300px;
    padding: 32px 24px;
  }

  .auth-side h2 {
    font-size: 2.35rem;
  }

  .auth-side-list,
  .auth-side-note {
    display: none;
  }

  .auth-card {
    padding: 40px 24px 52px;
  }
}

/* Keep auth form controls isolated from the public view header/footer styles. */
.auth-body .auth-card .form-control {
  width: 100%;
  min-height: auto;
  padding: 14px 15px;
  font: inherit;
}

.auth-body .auth-card .input-with-icon .form-control {
  padding-left: 42px;
}

.auth-body .auth-card .input-with-icon i.leading {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  pointer-events: none;
}

.auth-body .auth-card .password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  padding: 4px;
  border: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.auth-body .auth-card .password-toggle:hover {
  background: none;
}
