/* Trang đăng nhập, kích hoạt, liên kết quá hạn, chép từ design-template (bf-login, bf-login-back, bf-login-err, bf-expired).
   Mọi bộ chọn nằm dưới .lg (đăng nhập, kích hoạt) hoặc .lgx (liên kết quá hạn) để không đè lên app.css. */
:root {
  --ngà: #FAFAF7;
  --đồng-trầm: #825331;
  --nâu-xám: #756D63;
  --lam-lg: #203B85;
  --lam-lg-2: #182E6B;
  --viền: #DFE5EF;
  --viền-2: #B9C4D8;
  --lỗi: #A6311E;
  --nền-tắt: #F2F4F8;
  --lỗi-nhạt: #F7E3DE;
}
body:has(.lg) { background: var(--men); }
.lg .wrap { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 58fr) minmax(0, 42fr); }
.lg .art { position: relative; overflow: hidden; isolation: isolate; background: var(--ngà); display: grid; place-items: center; padding: 48px 32px; box-shadow: inset -1px 0 0 var(--viền); }
.lg .drum-img { position: absolute; z-index: -1; left: 50%; top: 50%; width: max(160%, 150vh); max-width: none; height: auto; aspect-ratio: 1; margin: 0; translate: -50% -50%; opacity: .2; filter: blur(1.5px); animation: xoay 240s linear infinite; pointer-events: none; }
@keyframes xoay {
from { rotate: 0deg; } to { rotate: 360deg; }
}
.lg .intro { text-align: center; max-width: 560px; }
.lg .intro h1 { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 40px; line-height: 1.2; color: var(--đồng-trầm); text-wrap: balance; }
.lg .intro p { margin: 12px 0 0; color: var(--nâu-xám); font-size: 18px; }
.lg .form-side { background: var(--men); display: flex; flex-direction: column; }
.lg .form { margin: auto; width: 100%; max-width: 432px; padding: 40px 24px 32px; }
.lg .lg-head { text-align: center; margin-bottom: 32px; }
.lg .emblem { display: block; width: 88px; height: auto; aspect-ratio: 160 / 162; margin: 0 auto 16px; }
.lg .sys { display: none; }
.lg .form h2 { margin: 0; text-wrap: balance; font-family: var(--serif); font-weight: 700; font-size: 32px; line-height: 1.2; color: var(--lam-lg); }
.lg .form .lede { margin: 8px 0 0; color: var(--muc-2); font-size: 16px; }
.lg .form .lede.back { color: var(--lam-lg); font-weight: 600; }
.lg .fields { display: flex; flex-direction: column; gap: 20px; }
.lg .field { gap: 8px; }
.lg .field label { font-size: 15px; }
.lg .field .inp { height: 48px; padding: 0 16px; font-size: 16px; border: 1px solid var(--viền); border-radius: 8px; background: var(--men); transition: border-color .15s, box-shadow .15s; }
.lg .field .inp::placeholder { color: var(--nâu-xám); opacity: .8; }
.lg .field .inp:hover { border-color: var(--viền-2); }
.lg .field .inp:focus { outline: none; border-color: var(--lam-lg); box-shadow: 0 0 0 3px var(--lam-soft); }
.lg .field .inp:disabled { background: var(--nền-tắt); color: var(--muc-2); cursor: not-allowed; }
.lg .field .inp[aria-invalid="true"] { border-color: var(--lỗi); }
.lg .field .inp[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px var(--lỗi-nhạt); }
.lg .field .err { display: flex; gap: 8px; align-items: flex-start; margin: 0; color: var(--lỗi); font-size: 14px; }
.lg .field .err svg.ic { width: 16px; height: 16px; margin-top: 2px; flex: none; }
.lg .pw { position: relative; }
.lg .pw .inp { padding-right: 64px; }
.lg .pw .tl { position: absolute; right: 16px; top: 14px; font-size: 14px; color: var(--lam-lg); }
.lg .who-saved { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 8px; background: var(--lam-mist); }
.lg .who-saved .av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--lam-lg); color: var(--on-lam); font-weight: 700; }
.lg .who-saved b { display: block; font-weight: 600; }
.lg .who-saved span { color: var(--muc-2); font-size: 14px; }
.lg .who-saved .tl { margin-left: auto; font-size: 14px; color: var(--lam-lg); }
.lg .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; font-size: 15px; }
.lg .row label { display: flex; gap: 8px; align-items: center; min-height: 44px; cursor: pointer; }
.lg .row input { width: 18px; height: 18px; accent-color: var(--lam-lg); margin: 0; }
.lg .row .tl { color: var(--lam-lg); min-height: 44px; display: inline-flex; align-items: center; }
.lg .go { width: 100%; height: 52px; margin-top: 16px; font-size: 16px; border-radius: 8px; background: var(--lam-lg); border-color: var(--lam-lg); }
.lg .go:hover { background: var(--lam-lg-2); }
.lg .go:disabled { background: var(--lam-lg); }
.lg .otp { margin: 12px 0 0; color: var(--muc-2); font-size: 14px; text-align: center; }
.lg .help { margin: 32px 0 0; padding: 24px 0 0; border-top: 1px solid var(--viền); }
.lg .help h3 { margin: 0 0 12px; font-size: 15px; font-weight: 600; color: var(--muc); }
.lg .help ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.lg .help li { display: grid; grid-template-columns: 20px 80px minmax(0, 1fr); gap: 8px; align-items: center; }
.lg .help li svg.ic { color: var(--lam-lg); width: 18px; height: 18px; }
.lg .help li span { color: var(--muc-2); }
.lg .help a { color: var(--lam-lg); font-weight: 600; text-underline-offset: 3px; overflow-wrap: anywhere; }
@media (max-width: 1100px) {
.lg .wrap { grid-template-columns: minmax(0, 1fr) minmax(400px, 1fr); }
.lg .intro h1 { font-size: 32px; }
.lg .intro p { font-size: 16px; }
}
@media (max-width: 767px) {
html, body:has(.lg) { overflow-x: hidden; }
body:has(.lg) { background: var(--ngà); }
.lg .wrap { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
.lg .art { overflow: visible; isolation: auto; background: transparent; box-shadow: none; padding: 0; }
.lg .intro { display: none; }
.lg .sys { display: block; margin: 0 0 20px; }
.lg .sys b { display: block; font-family: var(--serif); font-weight: 700; font-size: 20px; line-height: 1.3; color: var(--đồng-trầm); text-wrap: balance; }
.lg .sys span { display: block; margin-top: 2px; color: var(--nâu-xám); font-size: 14px; }
.lg .form-side { background: transparent; }
.lg .drum-img { position: fixed; width: max(240vw, 120vh); opacity: .16; filter: blur(1px); }
.lg .form { margin: 0 auto; padding: 32px 20px 32px; }
.lg .lg-head { margin-bottom: 24px; }
.lg .emblem { width: 64px; margin-bottom: 12px; }
.lg .form h2 { font-size: 26px; }
.lg .help li { grid-template-columns: 20px 64px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
.lg .drum-img { animation: none; }
}
.lg .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r-1); font: 600 15px var(--sans); cursor: pointer; text-decoration: none; border: 1px solid var(--lam); background: transparent; color: var(--lam); white-space: nowrap; box-shadow: none; }
.lg .btn:hover { background: var(--lam-mist); }
.lg .btn-primary { background: var(--lam); color: var(--on-lam); }
.lg .btn-primary:hover { background: var(--lam-900); color: var(--on-lam); }
.lg .btn-quiet { border-color: var(--rule); color: var(--muc); }
.lg .tl { background: none; border: 0; padding: 0; font: 600 14.5px var(--sans); color: var(--lam); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.lg .btn:active, .lg .tl:active { transform: translateY(1px); }
.lg .btn:disabled, .lg .tl:disabled { opacity: .55; cursor: not-allowed; }
.lg .field { display: flex; flex-direction: column; gap: 4px; }
.lg .field label { font-size: 14px; font-weight: 600; color: var(--muc); }
.lg .inp { height: 40px; padding: 0 12px; border: 1px solid var(--rule); border-radius: var(--r-1); background: var(--men); font: 15.5px var(--sans); color: var(--muc); width: 100%; }
.lg svg.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.lg .err-box { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 16px; padding: 12px 16px; border-radius: 8px; background: var(--lỗi-nhạt); color: var(--lỗi); font-size: 14.5px; }
.lg .note { margin: 12px 0 0; color: var(--muc-2); font-size: 14px; text-align: center; }
.lg .code-out { font-weight: 700; letter-spacing: .08em; color: var(--lam-lg); }
.lg .demo { margin-top: 20px; padding: 12px 16px; border-radius: 8px; background: var(--lam-mist); font-size: 14px; }
.lg .demo summary { cursor: pointer; font-weight: 600; }
.lg .demo ul { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 4px; }
.lg .demo li { display: flex; justify-content: space-between; gap: 12px; }
.lg .demo code { font-size: 13px; }
.lg .panel { background: var(--men); border-radius: var(--r-2); }
.lg .g-sat { box-shadow: inset 0 2px 0 var(--sat); }
.lgx .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r-1); font: 600 15px var(--sans); cursor: pointer; text-decoration: none; border: 1px solid var(--lam); background: transparent; color: var(--lam); white-space: nowrap; box-shadow: none; }
.lgx .btn:hover { background: var(--lam-mist); }
.lgx .btn-primary { background: var(--lam); color: var(--on-lam); }
.lgx .btn-primary:hover { background: var(--lam-900); color: var(--on-lam); }
.lgx .btn-quiet { border-color: var(--rule); color: var(--muc); }
.lgx .tl { background: none; border: 0; padding: 0; font: 600 14.5px var(--sans); color: var(--lam); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.lgx .btn:active, .lgx .tl:active { transform: translateY(1px); }
.lgx .btn:disabled, .lgx .tl:disabled { opacity: .55; cursor: not-allowed; }
.lgx .field { display: flex; flex-direction: column; gap: 4px; }
.lgx .field label { font-size: 14px; font-weight: 600; color: var(--muc); }
.lgx .inp { height: 40px; padding: 0 12px; border: 1px solid var(--rule); border-radius: var(--r-1); background: var(--men); font: 15.5px var(--sans); color: var(--muc); width: 100%; }
.lgx svg.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.lgx .err-box { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 16px; padding: 12px 16px; border-radius: 8px; background: var(--lỗi-nhạt); color: var(--lỗi); font-size: 14.5px; }
.lgx .note { margin: 12px 0 0; color: var(--muc-2); font-size: 14px; text-align: center; }
.lgx .code-out { font-weight: 700; letter-spacing: .08em; color: var(--lam-lg); }
.lgx .demo { margin-top: 20px; padding: 12px 16px; border-radius: 8px; background: var(--lam-mist); font-size: 14px; }
.lgx .demo summary { cursor: pointer; font-weight: 600; }
.lgx .demo ul { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 4px; }
.lgx .demo li { display: flex; justify-content: space-between; gap: 12px; }
.lgx .demo code { font-size: 13px; }
.lgx .panel { background: var(--men); border-radius: var(--r-2); }
.lgx .g-sat { box-shadow: inset 0 2px 0 var(--sat); }
.lgx .xwrap { min-height: 100vh; display: flex; flex-direction: column; }
.lgx .xbar { background: var(--lam-900); color: var(--on-lam); padding: 0 32px; height: 56px; display: flex; align-items: center; }
.lgx .xbar b { font-family: var(--serif); font-weight: 700; font-size: 18px; }
.lgx .card { margin: 64px auto; width: 100%; max-width: 560px; padding: 32px 36px; }
.lgx .card h1 { margin: 0 0 8px; font-family: var(--serif); font-size: 26px; color: var(--lam); }
.lgx .card p { margin: 0 0 12px; max-width: 60ch; }
.lgx .card dl { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px 12px; margin: 16px 0 20px; padding: 16px; border-radius: var(--r-1); background: var(--lam-mist); font-size: 15px; }
.lgx .card dt { color: var(--muc-2); }
.lgx .card dd { margin: 0; font-weight: 600; }
.lgx .card .row { display: flex; gap: 8px; flex-wrap: wrap; }
.lgx .card .small { margin-top: 16px; color: var(--muc-2); font-size: 14px; }
/* Chỉnh để không bị app.css cũ chen vào: bỏ đường kẻ của .row cũ; giữ trống đồng nằm trên nền trang. */
.lg .row, .lgx .row { border-top: 0; padding: 0; }
.lg .wrap { position: relative; isolation: isolate; }
