/* Feature: Sign in (#login) and Staff sign-in (#staff-login).
   Owner: Jiliana
   Clarity look: a coloured band at the top (red for customers, charcoal for staff, so staff can
   see at once they are somewhere else), with the white card sitting over its bottom edge.
   Simple name/mobile sign-in. Clarity variables only. */

.screen-login, .screen-staff-login {
  --band: 21rem;
  display: grid; justify-items: center; align-content: start; min-height: calc(100vh - 3rem);
  /* Two soft circles on the band, then the band itself, then the grey page */
  background:
    radial-gradient(circle at 8% 0, rgba(255, 255, 255, .12) 0 10rem, transparent 10rem) top / 100% var(--band) no-repeat,
    radial-gradient(circle at 94% 85%, rgba(158, 27, 50, .45) 0 8rem, transparent 8rem) top / 100% var(--band) no-repeat,
    linear-gradient(var(--red) 0 var(--band), var(--bg) var(--band));
}
/* On a phone the top row wraps onto two lines, so the band is taller to still reach behind the card */
@media (max-width: 40rem) { .screen-login, .screen-staff-login { --band: 24.5rem; } }
.screen-staff-login {
  background:
    radial-gradient(circle at 8% 0, rgba(255, 255, 255, .08) 0 10rem, transparent 10rem) top / 100% var(--band) no-repeat,
    linear-gradient(var(--charcoal) 0 var(--band), var(--bg) var(--band));
}

/* ---------- Top row on the band: "Home" on the left, language and text size on the right ----------
   All text on the band is bold and at least 19px, so white on OCBC red (4.4:1) counts as large text. */
.login-top {
  --focus: var(--white);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem;
  width: 100%; max-width: 60rem; padding: 1rem 1rem 0; color: var(--white);
}
.login-home {
  display: inline-flex; align-items: center; gap: .25rem; min-height: 48px; padding: 0 .75rem 0 .375rem;
  color: var(--white); font-size: 1.1875rem; font-weight: 700; text-decoration: none; border-radius: 999px;
  transition: background-color .15s;
}
.login-home:hover { background: rgba(255, 255, 255, .14); }
/* The Back button (a button, not a link, on the customer sign-in) looks the same on the band */
.login-home.back-btn { background: transparent; border-color: transparent; font: inherit; font-size: 1.1875rem; font-weight: 700; }
@media (hover: hover) { .login-home.back-btn:hover { background: rgba(255, 255, 255, .14); border-color: transparent; } }
.login-home .icon { width: 1.375rem; height: 1.375rem; }
.login-tools { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .5rem .75rem; }
.login-tools .text-size-label { color: var(--white); font-size: 1.1875rem; font-weight: 700; }
.login-tools .lang-pick, .login-tools .text-size button { --focus: var(--white); border-color: transparent; }
/* On the charcoal staff band the picked size (charcoal) needs a white edge to be seen */
.screen-staff-login .login-tools .text-size button[aria-pressed="true"] { border-color: var(--white); }

/* ---------- Brand and tagline ---------- */
.login-brand { width: 100%; max-width: 34rem; padding: .75rem 1.25rem 6.5rem; color: var(--white); text-align: center; }
.login-brand .brand-mark { background: var(--white); border-radius: 12px; }
.login-kicker { margin: .75rem 0 .25rem; font-size: 1.1875rem; font-weight: 700; }
.login-tagline { margin: 0; font-family: var(--font-head); font-size: 2.125rem; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
@media (min-width: 40rem) { .login-tagline { font-size: 2.5rem; } }

/* ---------- The card ---------- */
.login-main { position: relative; width: 100%; max-width: 32rem; margin-top: -5.25rem; padding: 0 1rem 3rem; }
.login-card {
  width: 100%; padding: 2rem 1.5rem; background: var(--surface);
  border-radius: 24px; box-shadow: 0 16px 48px rgba(54, 59, 64, .16);
}
@media (min-width: 40rem) { .login-card { padding: 2.5rem; } }
.login-sub { color: var(--muted); }
.login-card .btn-link { display: block; margin: .5rem auto 0; }

/* A message from access.js ("Please sign in to use this"): calm grey, not an error */
.login-message {
  margin: 0 0 1.25rem; padding: .75rem 1rem; border-radius: var(--radius);
  background: var(--slate-tint); color: var(--charcoal); font-weight: 700;
}
.login-message:empty { display: none; }

.field input { transition: border-color .15s, box-shadow .15s; }
.field input:hover { border-color: var(--text); }

.login-note { display: flex; gap: .5rem; align-items: flex-start; margin: 1rem 0 0; color: var(--muted); font-size: 1rem; }
.login-note .icon { width: 1.25rem; height: 1.25rem; margin-top: .1rem; }

/* Password / PIN row with its Show button (customers and staff) */
.pw-row { display: flex; gap: .5rem; }
.pw-row input { flex: 1; min-width: 0; }
.pw-toggle {
  flex: none; min-width: 5rem; min-height: 56px; padding: 0 1rem; cursor: pointer;
  background: var(--surface); color: var(--text); font-weight: 700;
  border: 2px solid var(--field-border); border-radius: var(--radius);
}

/* ---------- "In a hurry?": the urgent tools, one tap away, no sign-in needed ---------- */
.login-hurry {
  margin-top: 1.25rem; padding: 1.25rem 1.5rem 1rem;
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.login-hurry h2 { margin-bottom: .125rem; font-size: 1.25rem; }
.login-hurry p { margin-bottom: .5rem; color: var(--muted); }
.hurry-link {
  display: flex; align-items: center; gap: .75rem; min-height: 56px; padding: .5rem 0;
  color: var(--text); font-weight: 700; text-decoration: none; border-top: 1px solid var(--border);
}
.hurry-link > .icon:first-child {
  flex: none; width: 2.5rem; height: 2.5rem; padding: .5rem; border-radius: 50%;
  background: var(--red-tint); color: var(--red-dark);
}
.hurry-link span { flex: 1; }
.hurry-arrow { color: var(--red-dark); transition: transform .15s; }
.hurry-link:hover span { text-decoration: underline; text-underline-offset: 3px; }
.hurry-link:hover .hurry-arrow { transform: translateX(3px); }

/* ---------- "Bank staff? Staff sign-in": small and last, so customers come first ---------- */
.staff-entry { margin: 1.75rem 0 0; color: var(--muted); font-size: 1rem; text-align: center; }
.staff-entry a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 .25rem; color: var(--text); font-weight: 700; }

/* ---------- Sign up (#login/signup) link at the bottom of the card (from main, Wei Ye) ---------- */
.login-switch { margin: 1.25rem 0 0; text-align: center; font-size: 1rem; }
.login-switch a { font-weight: 700; color: var(--red-dark, var(--red)); text-underline-offset: 3px; }
.login-switch a:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; border-radius: 4px; }
/* Demo mode note (no sign-in server here) */
.login-demo { margin: 0 0 1rem; padding: .625rem .875rem; border-radius: var(--radius); background: var(--slate-tint); color: var(--charcoal); font-size: 1rem; font-weight: 600; }
.login-demo:empty { display: none; }
