﻿/* =========================================================
   Login page (Login.aspx) - responsive for desktop, tablet, phone
   Uses the same palette as app.css
   ========================================================= */
:root {
    --fx-ink: #17243A;
    --fx-paper: #F2F4F7;
    --fx-gold: #E7C66B;
    --fx-line: #DCE1E8;
    --fx-muted: #5E6B7D;
    --fx-primary: #1F4E8C;
    --tblr-font-sans-serif: "IBM Plex Sans", "Segoe UI", Tahoma, Arial, sans-serif;
    --tblr-primary: #1F4E8C;
    --tblr-primary-rgb: 31, 78, 140;
}
html, body { height: 100%; }
body { margin: 0; font-family: var(--tblr-font-sans-serif); background: var(--fx-paper); color: var(--fx-ink); -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }

.lg { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(380px, 1.05fr) 1fr; }

/* ---------- brand panel ---------- */
.lg-brand { position: relative; overflow: hidden; background: var(--fx-ink); color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.lg-brand::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 40px 40px; -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%); }
.lg-brand::after { content: ""; position: absolute; width: 520px; height: 520px; right: -180px; bottom: -200px; border-radius: 50%; background: radial-gradient(circle, rgba(231,198,107,.18), transparent 65%); }
.lg-brand > * { position: relative; z-index: 1; }
.lg-logo { display: flex; align-items: center; gap: 12px; }
.lg-logo-mark { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 10px; background: rgba(231,198,107,.14); border: 1px solid rgba(231,198,107,.35); display: grid; place-items: center; color: var(--fx-gold); font-size: 22px; }
.lg-logo b { display: block; font-weight: 600; font-size: 1.02rem; letter-spacing: .01em; }
.lg-logo small { color: #9FB0C8; font-size: .78rem; }
.lg-pair { font-size: clamp(2.4rem, 4.2vw, 3.6rem); font-weight: 300; letter-spacing: -.02em; line-height: 1.05; margin: 0; color: #fff; }
.lg-pair b { font-weight: 600; color: var(--fx-gold); }
.lg-tag { color: #9FB0C8; max-width: 40ch; margin: 14px 0 0; font-size: 1rem; }
.lg-foot { color: #7F90A8; font-size: .8rem; }

/* ---------- Bank of China rate card ---------- */
.lg-rate { margin-top: 28px; max-width: 440px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.10); border-radius: 14px; padding: 18px 20px; }
.lg-rate-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: #C9D3E1; font-size: .84rem; }
.lg-rate-head i { color: var(--fx-gold); margin-right: 6px; font-size: 16px; vertical-align: -2px; }
.lg-live { display: flex; align-items: center; gap: 6px; color: #7FD1AE; font-size: .76rem; font-weight: 500; white-space: nowrap; }
.lg-live .dot { width: 7px; height: 7px; border-radius: 50%; background: #3CCB8B; box-shadow: 0 0 0 0 rgba(60,203,139,.6); animation: lgpulse 2s infinite; }
.lg-live.off { color: #9FB0C8; }
.lg-live.off .dot { background: #7F90A8; animation: none; }
@keyframes lgpulse { 70% { box-shadow: 0 0 0 7px rgba(60,203,139,0); } 100% { box-shadow: 0 0 0 0 rgba(60,203,139,0); } }
.lg-rate-main { display: flex; align-items: flex-end; justify-content: space-between; margin: 12px 0 14px; }
.lg-rate-main small, .lg-rate-grid small { display: block; color: #8FA1BA; font-size: .74rem; margin-bottom: 2px; }
.lg-rate-main .big { font-size: 2.3rem; font-weight: 600; color: #fff; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.01em; transition: color .4s; }
.lg-rate-main .big.flash { color: var(--fx-gold); }
.lg-rate-unit { color: #8FA1BA; font-size: .74rem; text-align: right; line-height: 1.3; }
.lg-rate-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.08); }
.lg-rate-grid b { font-weight: 500; color: #E9EEF5; font-variant-numeric: tabular-nums; font-size: .95rem; }
.lg-rate-foot { margin-top: 12px; color: #7F90A8; font-size: .74rem; display: flex; align-items: center; gap: 5px; }
@media (prefers-reduced-motion: reduce) { .lg-live .dot { animation: none; } }

/* ---------- form ---------- */
.lg-main { display: flex; align-items: center; justify-content: center; padding: 32px 24px; }
.lg-card { width: 100%; max-width: 400px; }
.lg-card h1 { font-size: 1.65rem; font-weight: 600; margin: 0 0 4px; color: var(--fx-ink); }
.lg-card .lg-sub { color: var(--fx-muted); margin: 0 0 28px; }
.lg-field { margin-bottom: 18px; }
.lg-field .form-label { font-weight: 500; margin-bottom: 6px; }
.lg-input { position: relative; }
.lg-input > i.lead { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #8A97A8; font-size: 18px; pointer-events: none; }
.lg-input .form-control { width: 100%; height: 48px; padding-left: 42px; font-size: 16px; border-color: var(--fx-line); border-radius: 8px; background: #fff; }
.lg-input .form-control:focus { border-color: var(--fx-primary); box-shadow: 0 0 0 3px rgba(31,78,140,.15); }
.lg-input.has-toggle .form-control { padding-right: 48px; }
.lg-input input::-ms-reveal, .lg-input input::-ms-clear { display: none; } /* Edge has its own eye button */
.lg-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: transparent; color: #6B788A; border-radius: 6px; display: grid; place-items: center; font-size: 19px; cursor: pointer; }
.lg-eye:hover, .lg-eye:focus-visible { background: #EEF1F5; color: var(--fx-ink); outline: none; }
.lg-caps { display: none; margin-top: 6px; font-size: .82rem; color: #A3740C; align-items: center; gap: 5px; }
.lg-caps.show { display: flex; }
.lg-row { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 24px; }
.lg-row .form-check { margin: 0; min-height: 24px; display: flex; align-items: center; gap: 8px; padding-left: 0; cursor: pointer; }
.lg-row .form-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--fx-primary); cursor: pointer; }

.lg-btn-wrap { position: relative; }
.lg-btn { height: 48px; font-size: 1rem; font-weight: 500; border-radius: 8px; }
.lg-btn-wrap .spinner-border { display: none; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -62px; border-width: 2px; color: #fff; z-index: 2; pointer-events: none; }
.lg-btn-wrap.busy .spinner-border { display: block; }
.lg-btn-wrap.busy .lg-btn { pointer-events: none; opacity: .85; }

.lg-alert { display: flex; gap: 10px; align-items: flex-start; border-radius: 8px; padding: 12px 14px; margin-bottom: 20px; background: #FEF3F2; border: 1px solid #FECDCA; color: #912018; font-size: .92rem; }
.lg-alert i { font-size: 18px; margin-top: 1px; }
.lg-help { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--fx-line); color: var(--fx-muted); font-size: .84rem; display: flex; gap: 8px; align-items: center; }
.lg-help i { font-size: 17px; }
.lg-mfoot { display: none; text-align: center; color: #8A97A8; font-size: .78rem; margin-top: 22px; }

/* ---------- tablet ---------- */
@media (max-width: 991.98px) {
    .lg { grid-template-columns: 1fr 1fr; }
    .lg-brand { padding: 36px 32px; }
    .lg-rate-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- phone ---------- */
@media (max-width: 767.98px) {
    .lg { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .lg-brand { padding: calc(22px + env(safe-area-inset-top)) 22px 64px; gap: 22px; }
    .lg-brand::after { width: 320px; height: 320px; right: -120px; bottom: -160px; }
    .lg-pair { font-size: 2.1rem; }
    .lg-tag, .lg-foot { display: none; }
    .lg-rate { margin-top: 16px; padding: 12px 14px; border-radius: 12px; max-width: none; }
    .lg-rate-main { margin: 8px 0 10px; }
    .lg-rate-main .big { font-size: 1.7rem; }
    .lg-rate-grid { grid-template-columns: repeat(2, 1fr); gap: 6px 10px; padding-top: 8px; }
    .lg-rate-grid .x { display: none; }
    .lg-rate-foot { margin-top: 8px; }
    .lg-main { align-items: flex-start; padding: 0 16px calc(24px + env(safe-area-inset-bottom)); margin-top: -44px; position: relative; z-index: 2; }
    .lg-card { background: #fff; border: 1px solid var(--fx-line); border-radius: 14px; padding: 24px 20px; box-shadow: 0 10px 30px rgba(23,36,58,.10); }
    .lg-card h1 { font-size: 1.4rem; }
    .lg-card .lg-sub { margin-bottom: 22px; }
    .lg-mfoot { display: block; }
}
@media (max-width: 360px) {
    .lg-card { padding: 20px 16px; }
    .lg-pair { font-size: 1.8rem; }
}

/* ---------- phone turned sideways ---------- */
@media (max-height: 500px) and (orientation: landscape) {
    .lg { grid-template-columns: 1fr 1.3fr; grid-template-rows: none; }
    .lg-brand { padding: 20px 24px; }
    .lg-tag, .lg-foot, .lg-rate-grid, .lg-rate-foot { display: none; }
    .lg-pair { font-size: 1.8rem; }
    .lg-rate { margin-top: 12px; padding: 10px 14px; }
    .lg-main { margin-top: 0; padding: 16px; align-items: center; }
    .lg-card { box-shadow: none; border: 0; padding: 0; background: transparent; }
    .lg-mfoot { display: none; }
}


/* =========================================================
   New UI (December 2026): logo, navy button, gold focus,
   tablet layout with the form card over the navy panel
   ========================================================= */
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; }
.lg-brand > .lg-watermark { position: absolute; z-index: 0; width: 520px; height: 520px; right: -150px; bottom: -140px; opacity: .07; pointer-events: none; }
.lg-logo { gap: 14px; }
.lg-logo .lg-mark { flex: none; }
.lg-logo b { font-weight: 700; font-size: 1.3rem; letter-spacing: .03em; }
.lg-logo small { display: block; font-size: .72rem; letter-spacing: .22em; color: #9FB0C8; }

.lg-rate { border-radius: 16px; padding: 20px 22px; }
.lg-rate-main .big { font-size: 2.6rem; }

.lg-input .form-control { border-radius: 12px; height: 50px; }
.lg-input .form-control:focus { border-color: var(--fx-ink); box-shadow: 0 0 0 3px rgba(231, 198, 107, .45); }
.lg-btn { height: 52px; border-radius: 12px; font-weight: 600; background: var(--fx-ink); border-color: var(--fx-ink); }
.lg-btn:hover, .lg-btn:focus { background: #22345A; border-color: #22345A; }
.lg-row .form-check input { accent-color: var(--fx-ink); }
.lg-card h1 { font-size: 1.9rem; }
.lg-alert { border-radius: 12px; }

/* tablet: navy panel on top, the form as a card over it */
@media (min-width: 768px) and (max-width: 991.98px) {
    .lg { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .lg-brand { padding: 48px 56px 150px; gap: 28px; justify-content: flex-start; }
    .lg-brand > .lg-watermark { width: 420px; height: 420px; right: -120px; bottom: -160px; }
    .lg-foot { display: none; }
    .lg-rate { max-width: none; }
    .lg-rate-grid { grid-template-columns: repeat(4, 1fr); }
    .lg-main { align-items: flex-start; margin-top: -100px; padding: 0 24px 32px; position: relative; z-index: 2; }
    .lg-card { max-width: 480px; background: #fff; border-radius: 20px; padding: 36px; box-shadow: 0 20px 50px rgba(23, 36, 58, .18); }
    .lg-mfoot { display: block; }
}

/* phone: logo and one-line rate on top, the form shows without scrolling */
@media (max-width: 767.98px) {
    .lg-brand { padding-bottom: 60px; gap: 16px; }
    .lg-brand > .lg-watermark { width: 300px; height: 300px; right: -110px; bottom: -120px; }
    .lg-logo .lg-mark { width: 42px; height: 42px; }
    .lg-logo b { font-size: 1.1rem; }
    .lg-pair { display: none; }
    .lg-rate { margin-top: 4px; padding: 12px 14px; }
    .lg-rate-main { margin: 6px 0 0; }
    .lg-rate-main .big { font-size: 1.8rem; }
    .lg-rate-grid { display: none; }
    .lg-rate-foot { margin-top: 6px; }
    .lg-card { border-radius: 18px; }
    .lg-card h1 { font-size: 1.45rem; }
}
